Fork me on GitHub

is there something like for clojurescript?


in the sense of an explicitly seedable random generation library?


There's an issue in CLJS that I'd like to signal my interest in, what's the best way to do that? I didn't see a way to register.


I know CLJ issue votes are examined there. I don't know whether ClojureScript devs look at them on or not.


I don't know if lets you be notified on changes or new comments on one of its issues.

Alex Miller (Clojure team)03:02:47

Most jiras should have a corresponding ask question

Alex Miller (Clojure team)03:02:16

If it doesn’t, feel free to make one and reference it


Thanks, I've registered and added an answer to the issue expanding the scope a little bit!


Or at least subscribe so I can see when there are updates


can I disable warnings from libreries I'm importing? I'm using loom in cljs, and there's always this warning:

------ WARNING #1 - :invalid-arithmetic ----------------------------------------
 Resource: loom/alg_generic.cljc:494:19
 cljs.core/bit-or, all arguments must be numbers, got [any Long] instead
there's a patch at but it hasn't been merged. I'd like to not see that warning when I use my repl


A general technique for making arbitrary changes to a library is to create your own fork, make whatever changes you want, and use that, perhaps publishing the result in a way that not only you but others could also use. That happens semi-often, and can lead to confusion for new users of the library which one to use, but it is very effective.


I don't know any ways to disable warnings for a single library. There may be hacks like filtering the output through some code that recognizes and removes the warnings you don't want to see, but that seems fragile and kludgy.


thanks @U0CMVHBL2, I'm still learning to use shadow, and so wasn't sure on how I could include a local fork from there. I also now know that this option fixes what I wanted in shadow:

:dev {:compiler-options {:warnings {:invalid-arithmetic false}}}


I'm doing :dev {:compiler-options {:invalid-arithmetic false}} in shadow-cljs.edn but maybe that doesn't work for subdependencies?

Milan Munzar19:02:05

Hey, 🙂 Do you know how to make a type based dispatch in ClojureScript. I.e. shorter version of:

(defmulti  foo (fn [x]
                   (fn? x) :function
                   (seq x) :sequence
                   :else :unsupported)))

(defmethod foo :function [_] (println "function"))
(defmethod foo :sequence [_] (println "sequence"))

Vincent Cantin23:02:37

Using cljs.analyzer.api/analyze-file , is there a way parse the source code without having the macro clojure.core/for expanded? My goal is to analyze the body of the for , and the macro expansion is making it very very difficult to find the body in the general case.


wild guess, which I've never tried and there might be very good reasons that it would not work -- redefine the for macro in some way that it will only affect your analyze-file call, so that the expansion of for is something easy for you to recognize, and leaves the input expression pretty much unchanged? e.g. you could expand it to something like (do :my-custom-magic-keyword-to-recognize-for-expansions ...) where the ... contains something where all of the original for subexpressions are there.


Maybe the ... could be a (let <for-bindings> <for-body-exprs>) so it would be more likely to be correct and not give errors of unknown symbols in the for body

👍 3
🙏 3
Vincent Cantin23:02:42

> … redefine the `for` macro in some way … That’s an excellent idea. I will try to redefine it as a fn in the env.

Vincent Cantin00:02:06

I guess it will have to be a macro because of the bindings.