Fork me on GitHub
dominicm15:12:27 has seen a major rewrite today, it's now compatible with and -T . Pack is a way to convert your deps.edn projects into docker images, Lambda deployment packages, Self executable jars (like uberjars), or "skinny jars" (for libraries or java -cp deployments). This release completely changes the namespaces, coordinate, and removes all the -main s that were previously present. The plan is to re-add new -main in the future on top of the new APIs (contributions welcome!).

๐ŸŽ‰ 16
๐Ÿ†’ 3
๐Ÿ™Œ 1
Ben Sless15:12:40

a. this is cool, will look for excuse to use it at work b. just came across, any thoughts on packing a unikernel?


I haven't investigated unikernels at all. That project is in go, so I don't really have any thoughts about how to utilize it right now, it might work well with the skinnyjar mode though!

Ben Sless16:12:08

Just like Clojure shells out to git, you could shell out to other tools written in less fortunate languages. Question is it's even worth the trouble from your perspective

quoll18:12:12 is a reimplementation of the new namespace in pure ClojureScript. This calls into js/Math for a few operations, but because java.lang.Math (and hence includes many more functions than are supported in JavaScript, many of the functions had to be implemented from scratch. The namespace is implemented in a .cljc file so that testing can be done in Clojure to compare directly with the equivalent Java functions, but outside of testing it is only useful in ClojureScript.

๐ŸŽ‰ 48
๐Ÿ‘ 17
cljs 11
โญ 8
gratitude 3
โค๏ธ 7

This is great! I hope this can be bundled in the clojure math core library instead of as an outside library.


Itโ€™s specifically for ClojureScript. Itโ€™s only a .cljc file for testing purposes. Once appropriate tests have been set up to compare java.util.Math results to native cljs results, then it will turn back into a .cljs file


It literally duplicates what java.lang.Math does, with some tweaks to make it work in ClojureScript


Right, yes, I mean so clojure core can have built-in support for both clojure and clojurescript


I think that the process is to get it accepted into ClojureScript

๐Ÿ‘ 1
Cora (she/her)19:12:01

that code is a super interesting read!!


I canโ€™t take credit. Itโ€™s transliterated from the JDK


I just needed to deal with a few things. e.g. unsigned comparisons, and not being able to recast Doubles as ints to read the bits, etc


Not being able to add Long values was a problem! I solved that with my own add64 function


Not exactly elegant, but it got the job done ๐Ÿ™‚

Cora (she/her)20:12:05

well I think it's great, either way. you had to understand the gaps well enough to fill them and it's interesting how they got filled in ๐Ÿ˜Š

โž• 9

A fast way to play with this :)

$ nbb -cp $(clojure -Spath -Sdeps '{:deps {com.github.quoll/cljs-math {:git/tag "v0.0.1" :git/sha "f92217e"}}}')
user=> (require '[cljs.math as m])
user=> (clojure.repl/dir cljs.math)

๐Ÿ‘ 2

Oops. I should have kept <<, >>, and >>> private!


Already won something by posting that then ;)

๐Ÿ˜† 4

Btw, impressive work!

๐Ÿ’– 3