This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-31
Channels
- # beginners (64)
- # boot-dev (5)
- # calva (2)
- # clojars (2)
- # clojure (27)
- # clojure-europe (2)
- # clojure-india (1)
- # clojure-italy (30)
- # clojure-nl (3)
- # clojure-spec (46)
- # clojure-uk (19)
- # clojurescript (38)
- # code-reviews (2)
- # cursive (2)
- # datomic (15)
- # events (2)
- # graphql (3)
- # kaocha (1)
- # leiningen (5)
- # lumo (2)
- # off-topic (29)
- # perun (1)
- # re-frame (40)
- # reagent (5)
- # rum (3)
- # spacemacs (11)
- # specter (4)
- # tools-deps (4)
Since JavaScript is single threaded (aside from workers) is there any difference of atom from volatile! ?
@heefoo yes. volatile!
has no support for metadata, validators and watchers. if you don't need those, using it instead of atom
will save a few memory bytes and a couple of predictable branches on assign
Hi! I'm having a ton of trouble getting a CIDER REPL to work with Figwheel in Spacemacs
Can someone recommend a best tutorial for setting this up, with working code examples? It seems like the Figwheel and CIDER docs are both slightly out of date and refer to each other for updates.
Even a working project.clj file would be great!
if you have configured figwheel correctly, you should be able to just cider-jack-in-clojurescript ( SPC m "
by default) and pick figwheel and the name of the build you want to run
So: I cider-jack-in-cljs
And it appears that the REPL will start, and then I select either figwheel
(old docs?) or figwheel-main
(new docs)
Yeah, I believe so. My project file is here: https://github.com/kellyi/reagent-leaflet-sandbox/blob/master/project.clj
When I do Ctrl-C, Ctrl-K, it tells me that no REPL exists
Essentially I'm trying to replicate what I do in a regular Clojure CIDER thing which is... I have something like (+ 1 2)
written in a file and I can ctrl-c ctrl-k to eval it
Let me check
Interesting. Ok, I'll try that out -- most of this was autogenerated from a lein template for a reagent frontend, so there's still some pieces I don't understand.
So it looks like it started a working CLJ CIDER REPL
And then there is another buffer that says "nREPL server started on port...." but is non-interactive
Yeah, and I see the figwheel REPL in the tmux pane in which I did lein figwheel
if you’re running figwheel already, then you’re not going to run cider-jack-in-cljs
Yeah, was that a mistake? That is how I've typically been starting the app
Oh okay. What am I supposed to run instead?
Interesting. Ok, so the CLJ REPL is coming from lein probably
you can connect remotely to the running lein figwheel
process if that’s preferable. but they are separate workflows
Got it -- that makes sense
So I'll retry by not starting figwheel from the terminal, but doing cider-jack-in-cljs
! that totally worked. Thanks for explaining this!
🙂 sure thing! what cider-jack-in-cljs
does is (when in a leiningen project):
1. Starts a Clojure REPL via leiningen, injecting piggieback and nREPL dependencies
2. Starts figwheel for building your app
3. Uses piggieback to inject the ClojureScript REPL with the build that you want into the Clojure REPL started in (1)
Awesome! That makes sense to me. Thanks again for all your help with this! I've been wanting to show off the REPL development with Reagent but couldn't figure out how to get it to work like it was in a Clojure project.