tweak verbiage

This commit is contained in:
Joe Ardent 2023-07-31 07:17:20 -07:00
parent cf92b45f21
commit 724ce9d55d

View file

@ -31,7 +31,7 @@ Blog post: <https://proclamations.nebcorp-hias.com/sundries/presenting-julids/>
## A slightly deeper look
Julids are a drop-in replacement for ULIDs; all Julids are valid ULIDs, but not all ULIDs are valid Julids.
Julids are a drop-in replacement for ULIDs: all Julids are valid ULIDs, but not all ULIDs are valid Julids.
Given their compatibility relationship, Julids and ULIDs must have quite a bit in common, and indeed
they do:
@ -39,7 +39,7 @@ they do:
* they are 128-bits long
* they are lexicographically sortable
* they encode their creation time as the number of milliseconds since the [UNIX
epoch](https://en.wikipedia.org/wiki/Unix_time)
epoch](https://en.wikipedia.org/wiki/Unix_time) in their top 48 bits
* their string representation is a 26-character [base-32
Crockford](https://en.wikipedia.org/wiki/Base32) encoding of their big-endian bytes
* IDs created within the same millisecond are still meant to sort in their order of creation
@ -149,7 +149,8 @@ a simple benchmark in the examples folder of the repo, the important parts of wh
use julid::Julid;
fn main() {
[....]
/* snip some stuff */
let start = Instant::now();
for _ in 0..num {
v.push(Julid::new());
@ -186,7 +187,7 @@ timestamp as a [`DateTime`](https://docs.rs/chrono/latest/chrono/struct.DateTime
`created_at(&self)` method to `Julid`.
Something to note: don't enable the `plugin` feature in your Cargo.toml if you're using this crate
inside your Rust application, *especially* if you're also loading it as an extension in SQLite in
inside your Rust application, especially if you're *also* loading it as an extension in SQLite in
your application. You'll get a long and confusing runtime panic due to there being multiple
entrypoints defined with the same name.
@ -198,8 +199,8 @@ the C interface, which is inherently unsafe. If you are not building the plugin,
# Thanks
This crate wouldn't have been possible without a lot of inspiration (and a little shameless
stealing) from the [ulid-rs](https://github.com/dylanhart/ulid-rs) crate, as well as the
[sqlite-loadable-rs](https://github.com/asg017/sqlite-loadable-rs) crate, which made it *extremely*
easy to write the SQLite extension. Thank you, authors of those crates! Feel free to steal from this
project!
This project wouldn't have happened without a lot of inspiration (and a little shameless stealing)
from the [ulid-rs](https://github.com/dylanhart/ulid-rs) crate. For the loadable extension, the
[sqlite-loadable-rs](https://github.com/asg017/sqlite-loadable-rs) crate made it *extremely* easy to
write; what I thought would take a couple days instead took a couple hours. Thank you, authors of
those crates! Feel free to steal code from me any time!