This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-21
Channels
- # admin-announcements (3)
- # beginners (15)
- # boot (96)
- # cider (5)
- # cljsjs (2)
- # cljsrn (3)
- # clojure (22)
- # clojure-austin (2)
- # clojure-russia (16)
- # clojured (2)
- # clojurescript (65)
- # css (4)
- # cursive (89)
- # datomic (7)
- # emacs (89)
- # events (1)
- # hoplon (126)
- # leiningen (2)
- # off-topic (2)
- # om (268)
- # onyx (19)
- # parinfer (42)
- # re-frame (5)
- # reagent (30)
- # yada (8)
@dmi3y: This is because Cursive works from source, and it’s difficult to expand macros during editing.
yes, it's known issue https://github.com/cursive-ide/cursive/issues/147
Hola guys, quick question, I lein figwheel
and try to run a remote repl with cursive that connects to it
But it looks like it's still in clj mode, I can do js/window
in the figwheel repl, but that fails in the cursive REPL
Any *simple* solution to connect to my figwheel REPL and run clojurescript pieces of code?
@lsenta: The Cursive remote REPL runs over nREPL - are you running your figwheel REPL with nREPL enabled?
@cfleming I think I do, I have :nrepl-port 7002
in the project.clj for the figwheel conf
I get a:
CompilerException java.lang.RuntimeException: No such namespace: js, compiling:((ns cursive.repl.runtime
large red codetrace
@lsenta: See here: https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl#launching-figwheel-from-nrepl
You don’t need the first step (`lein repl`) since you’re connecting with the remote option but following the steps after that should work.
@cflemming
The lein figwheel is capable of launching an nREPL server that your tooling can connect to by using the :nrepl-port configuration parameter. This is not the strategy recommended below.
@lsenta: Have you seen this? https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL
I’m currently investigating how to make all this easier, but that’s as good as it gets right now I think.
So: I used the script/repl.clj
you just linked, it worked while my browser was still in the session I started with the regular lein figwheel
(start lein figwheel, open page of the project that connects to figwheel, kill lein figwheel, start script/repl.clj, browser reconnects and all is good)
I guess it's due to note: leiningen profile merging won't occur when fetching config from project.clj
Ok, there was some discussion on here a while ago about profile merging, sadly that’s getting beyond my cljs knowledge
I was really busy during the discussion and didn’t pay enough attention to it, and it’s now lost to the greedy Slack god.
Thinking about it, I assume it’s because when you’re running the REPL without using lein
(as in a quickstart-style REPL), since you’re not using lein your profiles don’t get merged and your REPL ends up with the wrong config.
@cfleming Yea I think so, I tried quickly to copy and paste parts of my config but it didn't worked
@lsenta: So you can configure figwheel to retrieve the config directly from project.clj
, is that right?
From what I understand in the last link you sent, start-figwheel!
loads the project.clj
Right. So I think that you could use lein pprint
to create a project-merged.clj
, and then slurp that and pass it to start-figwheel!
You probably need to use code like: https://github.com/bhauman/lein-figwheel/blob/a364ac2eb77a98bbd15bd483267c4f3f97cb5767/sidecar/src/figwheel_sidecar/config.clj#L250-L258
@lsenta: In fact, I think you’d need to call prep-config
and config
from that file with your slurped data too.
23:43:55 IllegalArgumentException: Don't know how to create ISeq from: com.intellij.extapi.psi.ASTWrapperPsiElement
:profiles
{:uberjar ...
:dev [:project/dev :profiles/dev],
:test [:project/test :profiles/test],
:project/dev ...
I’ll try to play around with this later today and see if I can come up with something better.
I believe it didn't moved namespace automatically when you evaluate a piece of code, but I got autocompletion, which is already better than the lein figwheel repl
If you want to reproduce the file I posted above, just lein new luminus my-app; cd my-app/; lein pprint
From what you know of the community do you think you'll be able to make a living from this?
Long term it will depend on growth in the Clojure/CLJS community, but I’m pretty optimistic about that.
I wish you the best, you're lowering the barrier to entry to clojure so much, thanks for that... and leaving a free options for hackers-wanna-be-full-time-clojurists!
The tooling has improved a massive amount in the last year, but it’s still difficult to get started for a lot of people.
You should add a project > new luminus project
and market this as the "one click to get started with clojure, clojurescript & react/reagent"
@cfleming: do you see any relatively low-hanging fruit to help growth of CLJS community? I think I will have some extra time on my hands soon
as a side note, I’m going to implement some Cursive-related workflow into Dirac soon, I want to be able to use Cursive to eval code in nREPL, but results would be echoed into Dirac REPL Console as well. If you had any ideas how to improve Dirac for Cursive users , I would be eager to hear.
it is a fork: https://github.com/binaryage/dirac
do not confuse it with cljs-devtools is an “extension”: https://github.com/binaryage/cljs-devtools
So I have a very long list of things that I would like to improve for CLJS users. I’m not sure many of them are low-hanging fruit though, and I’ve been thinking about all of them from the point of view of integrating them into Cursive.
More or less: one-click REPLs, including figwheel - these will include the current Cursive goodness (auto-formatting etc)
thanks, plastic is on hold, the project was too big and with invention of ParInfer I’m not sure if I could beat it, also Cursive improved a lot, so I don’t have such pressing need to put more effort into it at this point, but still it could be a nice research “toy” project for long winters