-
Notifications
You must be signed in to change notification settings - Fork 1
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
Hacktoberfest! #1
Comments
Hey Adrian, ImprovementsLet me know what you think about the following:
DesignThe following are more of a larger design proposal which could warrant its own issue or flat out ignored. These come out of a feeling as if I'm using a Java library instead of one made for Kotlin.
Let me know how you feel about these and what warrant their own issues to further discuss them 😄. |
Hey @lost-illusi0n! Thank you for showing interest regarding the project!
I totally agree! At the time that I implemented the Kotlin library, I didn't try to dip my toes with Kotlin/Native since it was pretty experimental, but having used it for a bit I think that we can add more Kotlin/Native targets.
That's legit something that I didn't consider at the time, but I think it might be useful to some people. I approve of it!
Considering that the Kotlin library was a port from Java, I totally agree that I didn't use the most idiomatic style of Kotlin. Regarding the three design points: I agree to the first and second points. Value classes definitively weren't around at that time, and I think that the In regard to the last point, although I don't see a issue by itself, wouldn't suspension functions require a dependency in kotlinx-coroutines? If so, I'd like to either avoid or implement a SuspendingNanoflakeGenerator in another library (either as a sub-library to this one or as another repository on the Nanoflakes organization) Phew, I think that covers it all? |
Awesome, great to hear we're on the same page.
I don't think I fully understand what was asked. For the base
Yes, it contains the If avoiding the dependency in the core implementation is the goal, I would go with a Gradle multi-module approach however that may change up artifact names (e.g, we would have I'm not sure if this would warrant an entire new repository either though. Perhaps we just leave it as is for now? Regarding everything else, I'm happy to start working on them and start sending PRs once they're ready. |
Answering @lost-illusi0n
Oh, I see. I fully approve those changes!
I'd like to avoid the dependency on Kotlin Coroutines, as well as a unnecessary dependency on kotlinx-datetime on Jvm and Js if possible. I'd go with Gradle multi-modules as well! (Had forgotten the name of it so I called it sub-library in my previous comment) IMO the coroutine-aware version could be called
You have my greenlight! |
Hacktoberfest!
Hey there! If you're reading this, you're probably here for Hacktoberfest. If you're not, you're probably here because you're interested in nanoflakes. Either way, welcome!
Note
This is a child issue to nanoflakes/.github#4, the main Hacktoberfest issue for Nanoflakes. Use this issue to discuss improvements and contributions for the Kotlin implementation of Nanoflakes.
What's a Nanoflake?
Nanoflakes is a specification for unique identifiers which can be generated locally or from a remote server. The specification is designed to be simple and easy to implement, and to be compatible with Twitter's Snowflake algorithm, which Nanoflakes is based on.
The official, full specification can be found here.
I want to contribute!
Awesome! You can contribute to the Kotlin implementation by submitting PRs to this repository!
You can improve on the Kotlin implementation by...
If you have any other ideas for how you can contribute, please open an issue or
pull request to suggest them in this issue!
End note
If you have any questions, feel free to ask them in the comments below!
Nanoflakes is my hobby project, and I'm doing this for fun. I'm not expecting
anyone to contribute, but if you do, I'll be happy to accept your pull requests!
The text was updated successfully, but these errors were encountered: