Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ruby implementations #58

Closed
wants to merge 1 commit into from
Closed

Add Ruby implementations #58

wants to merge 1 commit into from

Conversation

kachick
Copy link

@kachick kachick commented May 17, 2021

@alizain

Hi! I hope to be introduced my library and @abachman's prior arts.

Honestly, I don’t have confident when we can say realized binary implementation in ruby-lang.

But it has integer as the substance.
And having some method handling octets.

If this is not enough, I’ll omit the checked to binary implementation, Please tell me!

irb(main):001:0> ulid = ULID.generate
=> ULID(2021-05-17 15:18:53.572 UTC: 01F5XEH5C4SFR88MFBX0ZZWJQX)
irb(main):002:0> ulid.to_i
=> 1959988796846786577792848171152329469
irb(main):003:0> ulid.octets
=> [1, 121, 122, 232, 149, 132, 203, 240, 132, 81, 235, 232, 63, 254, 74, 253]
irb(main):004:0> ulid.milliseconds
=> 1621264733572
irb(main):005:0> ulid.entropy
=> 963077149261497129388797
irb(main):006:0> ulid.to_s
=> "01F5XEH5C4SFR88MFBX0ZZWJQX"
irb(main):007:0> ULID.parse('01F5XEH5C4SFR88MFBX0ZZWJQX') == ulid
=> true

Copy link

@clampcorder clampcorder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both included libraries have ~10% the stars each as the leading ruby ulid library, so I think it is fair to include them in the list of available ruby libraries.

@kachick
Copy link
Author

kachick commented May 13, 2024

Thanks for your review!

But this spec repository looks not updated in this 5 years, I close this PR in favor of ietf-wg-uuidrev/rfc4122bis@6fbd9f0 => kachick/ruby-ulid#540 🙇‍♂️

@kachick kachick closed this May 13, 2024
@kachick kachick deleted the add-ruby-implementations branch May 13, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants