cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
mkvlr 2021-03-02T15:44:51.010700Z

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?

mfikes 2021-03-02T15:46:07.012Z

@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 2021-03-02T15:46:49.012400Z

I haven't been pursuing it...

mkvlr 2021-03-02T15:47:09.012900Z

@mfikes adding this in such a way that it doesn’t break on older engines without BigInt you mean?

mfikes 2021-03-02T15:47:25.013300Z

Meaning, in a way that doesn't break existing codebases.

mfikes 2021-03-02T15:47:40.013600Z

And, the concern about older engines is also a valid one.

mfikes 2021-03-02T15:48:10.014Z

Also, to add to the list: In a way that doesn't regress perf.

mfikes 2021-03-02T15:48:22.014200Z

Seems pretty challenging IMHO.

mkvlr 2021-03-02T15:49:11.015Z

I don’t think I understand where you expect existing codebases to break

mfikes 2021-03-02T15:53:36.015700Z

I think I'm just expressing a very cautious view and don't have good examples of breakage at hand.

mfikes 2021-03-02T15:55:36.017300Z

Maybe with the introduction of things like +' codebases can opt into new behavior, etc...

mkvlr 2021-03-02T15:55:44.017400Z

ok understood, thanks. And in general you feel it’s pretty challenging.

Sam Ritchie 2021-03-02T16:06:16.018500Z

@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

Sam Ritchie 2021-03-02T16:06:53.019200Z

the performance hit would come from numbers on the left of these operations, since the implementations of those protocols would have to change

mfikes 2021-03-02T16:07:02.019800Z

You could feel free to take the work I've done as a basis for attempting to work up a potential patch

👍 3
Sam Ritchie 2021-03-02T16:07:47.020300Z

I’ll add that to the list, as I think at least laying out the case would be a valuable thing

Sam Ritchie 2021-03-02T16:07:50.020500Z

Sam Ritchie 2021-03-02T16:08:04.021100Z

this was the most sketchy thing necessary to get the goog numbers to play well

Sam Ritchie 2021-03-02T16:08:38.021900Z

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)

souenzzo 2021-03-02T16:56:41.023900Z

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.

dnolen 2021-03-02T22:13:01.024400Z

Apple M1 is a pretty serious performance improvement for JVM based dev

👍 1
1
☕ 1
raspasov 2021-03-03T09:10:31.027500Z

Do you ever run into problems with 16GB? Or it’s just that much faster that 16GB is not an issue.

nwjsmith 2021-03-02T22:29:21.025700Z

Absolutely. And the OpenJDK port is soooo close to being done: https://github.com/openjdk/jdk/pull/2200

Sam Ritchie 2021-03-02T22:29:36.026400Z

Wild, right? I had my 8 minute test suite drop to 2m, and emacs with many batteries in is smoking fast

borkdude 2021-03-02T22:50:49.026700Z

Any experience with docker on M1 yet?