This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-24
Channels
- # announcements (4)
- # asami (5)
- # babashka (20)
- # beginners (94)
- # bristol-clojurians (1)
- # calva (23)
- # cider (2)
- # clj-commons (3)
- # clj-kondo (43)
- # cljfx (2)
- # cljs-dev (13)
- # clojure (112)
- # clojure-dev (44)
- # clojure-europe (17)
- # clojure-nl (5)
- # clojure-poland (12)
- # clojure-spec (2)
- # clojure-uk (3)
- # clojurebridge (1)
- # clojurescript (92)
- # cursive (17)
- # data-science (8)
- # datahike (1)
- # datalevin (1)
- # datomic (3)
- # deps-new (7)
- # events (2)
- # fulcro (40)
- # graalvm (110)
- # holy-lambda (16)
- # introduce-yourself (1)
- # lsp (13)
- # malli (8)
- # missionary (12)
- # off-topic (10)
- # pathom (13)
- # polylith (10)
- # portal (28)
- # re-frame (37)
- # reitit (1)
- # releases (1)
- # shadow-cljs (30)
- # spacemacs (1)
- # tools-deps (9)
- # xtdb (10)
Is there any design coordination between the clojure core team and the CLJS core team? E.g. now there is a clojure.java.math
namespace added and @quoll remarked that it would be great if this was just clojure.math
which is like clojure.string
a compatible namespace (with host-specific behavior, e.g. javascript regexes are not java regexes) between the two
a couple of times - but most of the stuff is simple and doesn't require much coordination
I suppose clojure.math
might be useful - but I'm not sure what's there - I haven't followed this change
FYI: https://clojure.github.io/clojure/branch-master/clojure.java.math-api.html#clojure.java.math
@alexmiller clojure.math
is probably worth considering, a la clojure.string
given Math
is a thing in JS - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math
Sounds like @quoll was looking at that, and given feedback that it's feasible and makes sense, would consider that
I am hoping to have an initial cut done in the next couple of days. I’m working today, and tomorrow is a “no computer” day, but I’m making good progress. I’m having to reimplement a couple of things from the JDK sources that are done in native code, but it has all been going smoothly so far
There are some limitations. Long on the JVM has a larger range, so some of the behaviors differ on Longs, though it looks like Double can be made to behave identically
e.g. (Math/abs Long/MIN_VALUE)
on the JVM results in Long/MIN_VALUE
which is negative, because Long/MIN_VALUE is one less than the negation of Long/MAX_VALUE, so that magnitude can’t be represented as a positive number.
However, on JavaScript:
• that’s outside of the range of safe integer values and can’t be stored anyway (it gets saved as an integer that’s rounded up by 192)
• (= js/Number.MIN_SAFE_INTEGER (- js/Number.MAX_SAFE_INTEGER))
is true