This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-02
Channels
- # announcements (9)
- # babashka (67)
- # beginners (62)
- # bitcoin (2)
- # clara (1)
- # clj-kondo (62)
- # cljfx (6)
- # cljs-dev (25)
- # clojars (17)
- # clojure (142)
- # clojure-australia (2)
- # clojure-europe (42)
- # clojure-gamedev (2)
- # clojure-nl (31)
- # clojure-poland (10)
- # clojure-spec (14)
- # clojure-uk (30)
- # clojurescript (3)
- # conjure (1)
- # cursive (10)
- # data-science (1)
- # datascript (4)
- # datomic (9)
- # depstar (7)
- # fulcro (17)
- # girouette (15)
- # graalvm (44)
- # honeysql (20)
- # jackdaw (3)
- # jobs (8)
- # jobs-discuss (10)
- # juxt (5)
- # lein-figwheel (1)
- # lsp (175)
- # malli (19)
- # pedestal (2)
- # reagent (31)
- # reitit (2)
- # remote-jobs (3)
- # reveal (12)
- # sci (77)
- # shadow-cljs (22)
- # specter (6)
- # startup-in-a-month (2)
- # tools-deps (1)
- # xtdb (21)
hello @mfikes, @sritchie09 and I were looking at BigInt
support in ClojureScript for https://github.com/sicmutils/sicmutils and http://nextjournal.com and came across your work on it https://gist.github.com/mfikes/9fc981ed7a190b8e9b2912eee98fdd5e. Are you considering getting that merged and is there remaining work we can help with to make that happen?
@mkvlr There is a lot of work to see if it is possible to even do this without breaking changes, making things depend on newer JavaScript engines, etc. ...
@mfikes adding this in such a way that it doesn’t break on older engines without BigInt
you mean?
I think I'm just expressing a very cautious view and don't have good examples of breakage at hand.
Maybe with the introduction of things like +'
codebases can opt into new behavior, etc...
@mfikes understood! If you do want some help implementing it / thinking it through, in sicmutils I ended up extending the numeric tower, IEquiv, Icomparable etc to BigInt, goog.math.Long and goog.math.Integer
the performance hit would come from numbers on the left of these operations, since the implementations of those protocols would have to change
You could feel free to take the work I've done as a basis for attempting to work up a potential patch
I’ll add that to the list, as I think at least laying out the case would be a valuable thing
this was the most sketchy thing necessary to get the goog numbers to play well
and honestly something that should probably get pushed up to Closure… these types don’t implement valueOf. (of course that’s beyond the scope of the bigint discussion)
some things about bigint: https://github.com/google/closure-compiler/wiki/BigInt-support TLDR; it will only work when your runtime support it. There is no polyfill or compiler tricks.
Wild, right? I had my 8 minute test suite drop to 2m, and emacs with many batteries in is smoking fast
Do you ever run into problems with 16GB? Or it’s just that much faster that 16GB is not an issue.
Absolutely. And the OpenJDK port is soooo close to being done: https://github.com/openjdk/jdk/pull/2200