This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-05
Channels
- # adventofcode (111)
- # announcements (20)
- # babashka (19)
- # beginners (47)
- # calva (7)
- # clojure (56)
- # clojure-dev (27)
- # clojurescript (2)
- # events (1)
- # holy-lambda (1)
- # juxt (2)
- # meander (18)
- # minecraft (4)
- # missionary (107)
- # nextjournal (21)
- # off-topic (30)
- # reagent (7)
- # reitit (19)
- # releases (1)
- # tools-build (8)
- # tools-deps (7)
- # vim (22)
- # xtdb (4)
https://github.com/juxt/pack.alpha has seen a major rewrite today, it's now compatible with tools.build 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!).
a. this is cool, will look for excuse to use it at work b. just came across https://github.com/nanovms/ops, 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!
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
https://github.com/quoll/cljs-math is a reimplementation of the new clojure.java.math
namespace in pure ClojureScript. This calls into js/Math
for a few operations, but because java.lang.Math
(and hence clojure.java.math
) 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.
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
that code is a super interesting read!!
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
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 ๐
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])
nil
user=> (clojure.repl/dir cljs.math)
<<
>>
>>>
E
IEEE-fmod
IEEE-remainder
MAX_FLOAT_VALUE
MIN_FLOAT_VALUE
...