This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-14
Channels
- # announcements (2)
- # aws (1)
- # babashka (18)
- # babashka-sci-dev (103)
- # beginners (165)
- # calva (51)
- # cider (8)
- # circleci (1)
- # clj-kondo (22)
- # clj-on-windows (2)
- # cljdoc (1)
- # cljfx (31)
- # cljs-dev (16)
- # clojure (81)
- # clojure-europe (71)
- # clojure-nl (7)
- # clojure-uk (11)
- # clojurescript (20)
- # code-reviews (26)
- # conjure (1)
- # contributions-welcome (1)
- # core-async (15)
- # cursive (8)
- # datomic (8)
- # defnpodcast (2)
- # eastwood (24)
- # emacs (10)
- # events (1)
- # fulcro (4)
- # funcool (31)
- # graalvm (43)
- # graphql (8)
- # honeysql (9)
- # introduce-yourself (1)
- # jobs (12)
- # kaocha (3)
- # lsp (28)
- # malli (4)
- # meander (4)
- # membrane (7)
- # off-topic (64)
- # other-languages (3)
- # pedestal (1)
- # polylith (31)
- # portal (5)
- # re-frame (4)
- # reitit (1)
- # releases (5)
- # rum (2)
- # schema (2)
- # sci (34)
- # shadow-cljs (21)
- # vscode (1)
@quoll has been doing a lot of hard work on https://github.com/quoll/cljs-math
any thoughts on how to proceed with clojure.java.math
and cljs.math
@dnolen @alexmiller? Thought I'd chip in here since it would be pity if quoll's work in aligning CLJ and CLJS would be overlooked.
as of 1.11.0-alpha4, it's now clojure.math
I'm not expecting any additional major changes to it at this point
and also, we added clojure.core/abs
(in core because it has full polymorphic type support like the other numeric functions in core)
@dnolen did mention that he would be prepared to align my work with ClojureScript. It was late in the year, and I was about to be offline for several weeks, so I had not planned on working on this until January. So itโs probably a good thing that you prompted me ๐ The delay has been good though. @mfikes Has helped me to make it better, ensuring that the compiler would be generating better code in many cases.
Would it be beneficial in some way if clj-kondo (optionally) suggested to write cljs.core/Var
instead of cljs.core.Var
? The latter is supported by CLJS but clj-kondo had some problems with it which I'm fixing right now and I wondered if one is preferred over the other.
Also in CLJ this isn't supported:
user=> (ns foo)
nil
foo=> (defprotocol Foo)
Foo
foo=> (ns bar)
nil
bar=> (satisfies? foo/Foo 1)
false
bar=> (satisfies? foo.Foo 1)
Execution error (NullPointerException) at bar/eval169 (REPL:1).
i think clj-kondo ought to warn in that case. is it hard to discern between that and accessing JS properties like that, a la window.console.log
?
Feel free to comment here: https://github.com/clj-kondo/clj-kondo/issues/1535
cljs.user=> (def cljs #js {:core #js {:Var 1}})
#'cljs.user/cljs
cljs.user=> cljs.core.Var
1
cljs.user=> cljs.core/Var
cljs.core/Var
yeah i would normally do that in that specific case. trying to construct a case when i wouldn't ns qualify it