Live data from Hacker News

Show HN: Givemeguid.com – CLI/curl friendly GUIDs

givemeguid.com

1–10 of 51 posts

Re: Show HN: Givemeguid.com – CLI/curl friendly GUIDs

#4
post #3

I'm having trouble imagining who would want to use this. What's the environment where you would have curl and a need for generating UUIDs, but wouldn't have access to uuidgen or similar?

This, and also, are GUID that pose a problem with CLI/curl really a thing?

Re: Show HN: Givemeguid.com – CLI/curl friendly GUIDs

#5
post #3

I'm having trouble imagining who would want to use this. What's the environment where you would have curl and a need for generating UUIDs, but wouldn't have access to uuidgen or similar?

Maybe a JS App which is made completely out of third party APIs, without anything self-hosted? Not discussing wether this is a good idea or not, though...

I was surprised to see that there is no "built-in" mechanism in JS to generate a GUID. As a C# dev, I'm used to Guid.NewGuid()

Re: Show HN: Givemeguid.com – CLI/curl friendly GUIDs

#7
post #3

I'm having trouble imagining who would want to use this. What's the environment where you would have curl and a need for generating UUIDs, but wouldn't have access to uuidgen or similar?

Maybe a JS App which is made completely out of third party APIs, without anything self-hosted? Not discussing wether this is a good idea or not, though... I was surprised to see that there is no "built-in" mechanism in JS to generate a GUID. As a C# dev, I'm used to Guid.NewGuid()

Why would you make an http request if you can just google a 3-line JS solution? You're just generating a large random number and formatting it as a UUID.

https://gist.github.com/jed/982883

If you google "generate uuid javascript" you can find approaches from Math.random to node/browser `crypto` module to shelling out OS random.

One of the main benefits of guid generation is that you don't need to synchronize with anything to generate a unique ID, so it's weird to incur an http request, especially to someone else's service. At that point you might as well just phone home to your own service.

Post reply on HN