Skip to content
This repository has been archived by the owner on Jan 22, 2023. It is now read-only.

Is there any plan to support monotonically increasing randomness? #6

Open
veluxer62 opened this issue Nov 20, 2021 · 0 comments
Open

Comments

@veluxer62
Copy link

There are an issue when i generate ULID using random function continuously. it does not guarantee sequence.

val ulids = listOf(ULID.random(), ULID.random(), ULID.random(), ULID.random())
val sortedUlid = ulids.sorted()

println("ORIGIN : " + ulids)
println("SORTED : " + sortedUlid)
println("COMPARE : " + (ulids == sortedUlid))
ORIGIN : [01FMYXM17KAV8C0P3HQ5Z0034N, 01FMYXM17KM2D00727YE0Q1ZK9, 01FMYXM17K45BJ1RR9CMPN0HDV, 01FMYXM17K8ZMZ0NVY0HSP1GQ9]
SORTED : [01FMYXM17K45BJ1RR9CMPN0HDV, 01FMYXM17K8ZMZ0NVY0HSP1GQ9, 01FMYXM17KAV8C0P3HQ5Z0034N, 01FMYXM17KM2D00727YE0Q1ZK9]
COMPARE : false

So, Is there any plan to support high-resolution time? like ulid-py?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant