paralleldrive / cuid

Collision-resistant ids optimized for horizontal scaling and performance.
Other
3.43k stars 123 forks source link

Ruby port #2

Closed iyshannon closed 11 years ago

iyshannon commented 11 years ago

Hey,

I liked your cuid project so I ported it to Ruby, you can see it here: http://github.com/iyshannon/cuid.

Please check it out and let me know what you think, I haven't published it to RubyGems yet as I wanted to get your OK before doing so.

Thanks, Ian

ericelliott commented 11 years ago

Did this ever get published to Ruby gems? =)

iyshannon commented 11 years ago

Ah, thanks for reminding me. Got a bit sidetracked! I'll publish it this week. I looked in to the process ID thing (whether it would work on other platforms) and the platform issue comes up when trying to start external processes, not with returning the current process ID, so that's not an issue.

On Fri, Dec 7, 2012 at 2:07 AM, Eric Elliott notifications@github.comwrote:

Did this ever get published to Ruby gems? =)

— Reply to this email directly or view it on GitHubhttps://github.com/dilvie/cuid/issues/2#issuecomment-11121002.

ericelliott commented 11 years ago

Oh, that's great news! BTW, I recently published http://usecuid.org/ - Check it out, and spread the word.

iyshannon commented 11 years ago

Just published the gem: https://rubygems.org/gems/cuid

I updated my README to link to your new site and added some bits that you had in yours. Also added an option to use a more secure random number generator on the newer versions of Ruby, but it's optional and off by default because it increases run time by 2.5 times. My test script generates 600,000 cuids and the default method takes ~8 seconds while the secure method takes ~20 seconds.

I put my documentation on Github Pages; it's not accessible yet but it said it may take 10 minutes to show up.

ericelliott commented 11 years ago

Thanks for the heads up. Looks great!