This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (2)
- # aws (52)
- # beginners (326)
- # cider (24)
- # clara (7)
- # clj-kondo (14)
- # cljs-dev (175)
- # clojure (183)
- # clojure-ecuador (2)
- # clojure-europe (4)
- # clojure-italy (11)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojure-spec (5)
- # clojure-sweden (5)
- # clojure-uk (103)
- # clojurescript (49)
- # cursive (29)
- # data-science (9)
- # datascript (17)
- # datomic (23)
- # emacs (6)
- # events (4)
- # fulcro (19)
- # graalvm (8)
- # graphql (2)
- # hoplon (36)
- # jobs (1)
- # jobs-discuss (92)
- # juxt (3)
- # luminus (10)
- # off-topic (4)
- # pedestal (8)
- # planck (1)
- # re-frame (59)
- # reagent (1)
- # reitit (22)
- # rewrite-clj (8)
- # ring-swagger (3)
- # shadow-cljs (101)
- # spacemacs (15)
- # tools-deps (36)
- # vim (68)
@grounded_sage Perhaps you are referring to how Klipse can be hooked up with a simple tag or two: https://github.com/viebel/klipse#integration
It was Wisp
I'm looking for an equivalent to the angular "ng-template" element, in Reagent. Is there such a thing? Basically what I want to do is to output two "top level" hiccup elements, without wrapping them in another element
@olle142 thats called a fragment in React so I think its
[:<> [:div ...] [:div ...]] in reagent
Hmm, in Clojure
(range nil 6) is a NullPointerException, but in ClojureScript it produces
(nil 1 2 3 4 5). That seems wrong to me. Anyone aware if that's known/accepted behaviour?
well, cljs also thinks
(inc nil) is 1
much like js when you say
null + 1
I have grown used to counting things with
(swap! count-map-atom update thing-kind inc)
You need to use
fnil to make the above code portable.
Because Clojure(Script) don't wrap host primitives, such differences cannot be eliminated.
Interestingly cljs warns about numeric types in math operations, perhaps it would make sense to have same warning for inc/dec
I want to make my emacs a good place to work with cljs so bad, but from my experience so far a switch to Cursive seems like the better move. How do you guys feel about clojurescript support in cider?
Not support, but actually maintaining and configuring a working environment seems tricky. And having to do that on a project to project basis might not be viable
for me, I’ve whittled my workflow down to a few basic things.
For tools, I use shadow-cljs and Spacemacs with clojure-layer.
When I want to start a new project, I typically copy a couple files from another project:
public dir with
Then to do work, I open up a CLJS file in the project and:
shadow for the REPL type
- Choose my build name (e.g.
Y to open up a browser window with everything loaded
And I’m off!
AFAICT the only thing specific to Emacs/CIDER is how I connect to the REPL. All of the other busy work w.r.t. project configuration I would have to do anyway
I haven't had issues using figwheel-main and spacemacs. The biggest issue I've noticed in spacemacs using ClojureScript compared to Clojure is that I can't connect a REPL when not in a project, specifically when I'm in cljs babel blocks. I have yet to use shadow-cljs in general
nil being passed to arithmetic functions: https://dev.clojure.org/jira/browse/CLJS-3086
Do you mind if I take a look at 3085? Always wanted to dig into type inferences in the compiler
@U0FR82FU1 Assigned it to you. Feel free to ask if you get stuck.
@U0FR82FU1 I've added some implementation guidance to the ticket. It looks like it could be a fairly straightfoward one.
@carkh See https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/test.cljs#L41-L52
Does a simple test like that in the REPL produce a truthy value for you?
(require '[clojure.test :refer [is]]) (is (thrown? js/Error (ffirst 1)))
Well, that's not really important. Sorry. Was using https://clojurescript.org/guides/ns-forms#_clojure_namespace_aliasing
The way it works is that
is is a macro and it understands the
(This is not a very common pattern, FWIW, but it is the way it works.)