This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-26
Channels
- # announcements (1)
- # autochrome-github (1)
- # babashka (9)
- # beginners (112)
- # bristol-clojurians (2)
- # calva (26)
- # cider (10)
- # clj-kondo (31)
- # cljs-dev (40)
- # clojure (114)
- # clojure-austin (1)
- # clojure-dev (112)
- # clojure-europe (22)
- # clojure-germany (5)
- # clojure-italy (1)
- # clojure-nl (2)
- # clojure-norway (1)
- # clojure-spec (10)
- # clojure-uk (96)
- # clojurescript (39)
- # core-logic (5)
- # datomic (40)
- # fulcro (34)
- # graphql (17)
- # jobs (3)
- # kaocha (4)
- # leiningen (10)
- # luminus (1)
- # malli (3)
- # meander (44)
- # midje (2)
- # off-topic (40)
- # pathom (5)
- # re-frame (8)
- # reitit (8)
- # ring (3)
- # ring-swagger (4)
- # shadow-cljs (83)
- # spacemacs (96)
- # tools-deps (16)
- # vim (4)
- # xtdb (15)
- # yada (20)
@gfredericks how much does test.check depend on goog.math.Long? I'm probably going to drop that dep since it's in fact covered by goog.math.Integer
I'm no expert, but from perusing the code, I'd say "a lot"
primarily in the random number generator
@dnolen didn't you add Long
support to core when working on transit? I thought that motivated the addition? https://github.com/cognitect/transit-js/blob/f49c7bae88bfbb4b0c36966d8a987341e44a3359/src/com/cognitect/transit/types.js#L18
@alexmiller it's marked as legacy by Closure now and you can accomplish the same thing with Integer
it s also a massive pain because it's one of the few namespaces we use that needs AOT transformation - so it's really hampering REPL maintenance
Gary is not actually working on test.check anymore so someone would need to step up to do that work
@alexmiller https://github.com/clojure/test.check/blob/master/src/main/clojure/clojure/test/check/random/longs.cljs?
the random stuff is based on that too and I know a lot of care was taken to have the outputs match in clj and cljs
Gary did a talk about it https://www.youtube.com/watch?v=u0t-6lUvXHo
@alexmiller I guess what I mean is I don't see how goog.math.Long
as an implementation detail for test.check here (over Integer) is meaningful
the only things that support it are the predicates and that was for test.check
by way of spec.alpha
I don't know anything about several pieces of this so I am not trying to debate you about it :)
@alexmiller I can probably handle the long changes - assessing this change first for REPLs
(assuming we drop them, I'm taking the time to assess using Closure to compile the problem away - and we can punt that change down the road)
The Integer class can do 64 bit bit twiddling?
Even if so, I'd wonder if performance would get worse
shift right and left - it's really the same thing just an array of integers instead of two 32 bit integers
That's the only issue I can think of
Like alex said, the current rng impl gives identical results cross platform. That's not a crucial feature though, I just thought it was cool.
That's only relevant if you consider changing the algorithm to recover perf somehow
Hmm, it might be, I'll check
The tests will fail if the cljs algorithm changes unilaterally
The weirdest part of the current code is that the multiplication algorithm was inlined so that some unnecessary checks could be removed
(I.e., pasted/translated from the goog lib)