sqids / sqids-spec

Sqids specification for encoding multiple numbers into a single ID
https://sqids.org
43 stars 3 forks source link

ClojureScript Implementation #15

Closed ng-esque closed 9 months ago

ng-esque commented 9 months ago

I have created an implementation in ClojureScript. If you make a sqids-cljs blank repo I will fork it and create a pull request.

4kimov commented 9 months ago

Hi @ng-esque, thank you for pinging about it & the implementation. If I'm not mistaking, there's CLJS support being added to the Clojure repository. Is your repo addressing the same by any chance?

ng-esque commented 9 months ago

Hi @4kimov, thanks for letting me know about the CLJS efforts in the sqids-clojure port; I was unaware.

I was able to get the sqids-clojure CLJS branch built and installed locally, but was unable to get the CLJS branch loaded into a test project to do any perf analysis. Though I doubt there would be any glaring discrepancies, and I am sure whatever issues I was facing loading it in the test project can be worked out.

I wrote a Clojure port too, and was bummed when I went to make the PR and saw someone else had already done one. Though a clever use of Clojure's Java interop I was a tad disappointed that it was only a wrapper around the Java port, but that's mostly because I like writing, and reading, Clojure. :stuck_out_tongue_closed_eyes:

My implementation/s is/are written in CLJ/S so I feel the code specifically serves a different purpose in terms of language cohesion, but we are all porting the same spec so the libraries are redundant in their utility.

I am unsure where the broader CLJ/S community stands in regard to ease of use and discoverability when preferring whether to add JS support to existing Clojure projects or forking to a CLJS specific project. :shrug:

4kimov commented 9 months ago

Hi @ng-esque, thank you for elaborating on the differences.

Yes, the project had a bit of publicity lately, so unfortunately we've had a few parallel implementations a few hours apart (as much as we try to make people's work-in-progress more visible, it's not always easy ☹️)

I suggest we wait and see where the demand is regarding a port written in CLJ/S. If the community has a strong preference, we can always revisit. I'll close the issue for now, but feel free to follow-up if you have questions / suggestions.

Thanks again for the efforts 💪