Fork me on GitHub

In regards to be the previous conversation about hosting a CLJ based IDE, we built a prototype IDE here: (select "Clojure" from the dropdown). You can run programs, pause them, and step through them. Something like this can be used to build a functioning REPL.


@rachit.nigam12, that's interesting- where do you perform the CPS transform for clojurescript there?


Oooh, wait, I get it, it's a JS cps transformer, that's very nifty. Nice work! And a paper, too.


To clarify, the transformation isn't CPS, because CPS performs horribly with modern JS JITs (We tried CPS first, and it had 100x-1000x slowdown depending on the language being used.)


And yes, it being a JS transformation makes it super useful because we can use it on any language that compiles to JS


but yeah, the cross language capabilities are significantly valuable to the JS targeting plt community, I'd say.


It seems that there is an entirely new version of figwheel "figwheel main". Does anyone know how this figwheel can be run with leiningen? The docs only talk of how to use it with the clj command line tools.


My mistake really... I completely missed that. Thanks again!


Can someone walk me through the clojurescript tooling ecosystem? I would like to know how these do or do not interact with one another and what their roles are: figwheel, figwheel-main, shadow-cljs, leiningen, deps.edn, clj command line tools, and anything major I may be missing. I’ve been able to work with Clojure/Script for awhile now but anytime I try to go outside the simple path (such as trying to using clojurescript with Atom’s ProtoREPL, which seems to be mainly designed for Clojure), I struggle to get things working.


What part are you struggling with? I just went through moving from LightTable to ProtoREPL and ran into some issues I was unable to resolve, however I’ve managed to get things working well. My main issue was getting the IDE’s remote repl connection to work for cljs. I got the cljs prompt to appear in the repl, but the handshake flakes out and the prompt is just visual only (not interactive). At any rate I found the IDE’s repl to be lack-luster anyway (at least compared to LT) BUT I discovered the Rebel terminal repl and it’s really, really good and works nicely with my ProtoREPL workflow. So that might work for you too.


note that with figwheel the cljs code changes are hot-loaded on file save, so the cljs repl use is not needed quite as much compared to using clojure.


Thanks for reference to the rebel-readline. That eventually lead me to the figwheel-main tutorial and that actually covered 90% of the questions I had. What I still want to know though is whether or not an editor-integrated nREPL workflow is common and recommended for CLJS novices. I really love it in Clojure, evaluating expressions and subexpressions in the editor and seeing their results inline. But the Figwheel-main page on this topic asserts the following: > “Even though this has recently become easier, you should still consider setting up a workflow that includes nREPL as an advanced undertaking as it requires a lot of contextual knowledge of the Clojure environment if something goes wrong.”


lol yes when something invariably goes wrong it's hard to find out why.. like if i open up a lighttable server.clj that has a client.cljs such as in the Sente example project, for a while i may even get the CLJS application to do in-line evaluation and connect with the actual server application running. I've yet to try ProtoREPL.


> I really love it in Clojure, evaluating expressions and subexpressions in the editor and seeing their results inline.


coming from LT I can understand this, but I’ve discovered using the save-file to load changes is much better in the long run. Here are a few points to consider. 1 figwheel has a HUD that pops up on file-save that provides good warning/error handling while preventing code loading when errors occur. 2. sometimes you have dependant changes (multiple function changes or defonce items) that get resolved when you load the file. It took me a bit to get into the workflow, but I found it was much better and more efficient. just my 2 cents though.


If I want to follow exactly but using an editor that supports clojure/script re-indentation, with as little other installation or configuration as possible (ideally not leiningen/clojure).... then what's the editor?


IMO protorepl (but without using the repl) is smooth enough. I just use a cli based repl outside my editor


@lspector Emacs with clojure-mode


Thanks @phill, but I should also have said "with no learning curve." Looking for some simple editor that anyone can install and use with no work, and which'll do Clojure/script re-indenting.


@mpcarolin Have you raised this q about tooling overview on the Google Group for ClojureScript? I would love to see some well-contemplated views.


@lspector go with your favorite editor, there’s probably some clojure plugin for it


@borkdude Textedit on MacOS doesn't have a clojure plugin 😕, Or MacDown... or anything else on my list, except things that require Clojure