TIL UUID v7 & base58. Especially loved the watch cmd and SEEING the 3 v7s lined up next to each other. Made sense before but grokked more fully when I saw the interactivity.
Thanks for making these. I didn't even know about the existence of V7. Also, wonder what impact this will have on other tools such as snowflake, as the main critique of UUID was the database indexing part you said.
So, I have a maxed-out M3 Max. Now, for many of these, it might be a side effect of video editing. But typically, besides the initial compile, the cargo watch for me takes sub-seconds or 1 to 2 seconds. Even for a large project (currently 10K lines of code), where I am typically in a multi-crate setup, I run my `cargo watch ... test` on one library and typically focus on one function during development.
Thanks for explanation. Though I have 2 queries 1. Can we extract time stamp from v7 string to UTC format? 2. Do we have assurance, u4/u7 will always give totally unique string always? Do they maintain trace? I have fear of conflicting duplicate !
1) For UUID v7 to time (UTC), the library usually handles that. The lib would convert from string -> bytes -> time by extracting only the first 48 bits. 2) Uniqueness - All those UUIDs, v... and so on, are stateless; each generator does not know about the others. However, the whole design of those uuid is to make the likelihood of a conflict practically impossible, but theoretically, they can occur. There are more avaiable litterature about it on the internet.
Yes, I could have mentioned those. - v5 is more specialized for use cases where we need to generate a UUID based on a SHA-1 namespace and name, making UUIDv5 deterministic and repeatable. - v6 also has a time component, similar to v7, but with a custom format. Typically, we would use v7 over v6 as it uses the well known unix time format.
What a condensed and straightforward explanation that can actually be used in the real world.
Really good explanation on different techniques to store the uuids
I wish you were my teacher for a lot of things. I would understand everything so easily and very fast . You are good 👌
TIL UUID v7 & base58. Especially loved the watch cmd and SEEING the 3 v7s lined up next to each other. Made sense before but grokked more fully when I saw the interactivity.
The content is as good as usually. The time format is perfect for me.
Straightforward & to the point, I like it 👍
Thank you for sharing this, I learned a lot! 😊
Thanks for making these. I didn't even know about the existence of V7.
Also, wonder what impact this will have on other tools such as snowflake, as the main critique of UUID was the database indexing part you said.
Really awesome! I'll need to keep this trick in mind
Thanks always learn new concept from you
Jeremy what is your hardware, because your cargo-watch is really fast, I got impressed.
So, I have a maxed-out M3 Max.
Now, for many of these, it might be a side effect of video editing.
But typically, besides the initial compile, the cargo watch for me takes sub-seconds or 1 to 2 seconds. Even for a large project (currently 10K lines of code), where I am typically in a multi-crate setup, I run my `cargo watch ... test` on one library and typically focus on one function during development.
Awesome video as usual
What an awesome video! Just…. Wow
Thanks for explanation. Though I have 2 queries
1. Can we extract time stamp from v7 string to UTC format?
2. Do we have assurance, u4/u7 will always give totally unique string always? Do they maintain trace? I have fear of conflicting duplicate !
1) For UUID v7 to time (UTC), the library usually handles that. The lib would convert from string -> bytes -> time by extracting only the first 48 bits.
2) Uniqueness - All those UUIDs, v... and so on, are stateless; each generator does not know about the others. However, the whole design of those uuid is to make the likelihood of a conflict practically impossible, but theoretically, they can occur. There are more avaiable litterature about it on the internet.
Happy Coding!
Excellent. 👍🏽
What happened to v5 and v6
Yes, I could have mentioned those.
- v5 is more specialized for use cases where we need to generate a UUID based on a SHA-1 namespace and name, making UUIDv5 deterministic and repeatable.
- v6 also has a time component, similar to v7, but with a custom format. Typically, we would use v7 over v6 as it uses the well known unix time format.
if you want user-friendly id you can use cuid
but last time i checked - author uses panics
@@CuriousSpymaybe a good reason to get into FOSS and send some patches. :)