Fork me on GitHub
#clojurescript
<
2019-01-05
>
rachit05:01:37

In regards to be the previous conversation about hosting a CLJ based IDE, we built a prototype IDE here: http://stopify.org (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.

mseddon10:01:49

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

mseddon10:01:43

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

rachit13:01:20

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.)

rachit13:01:57

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

mseddon13:01:30

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

awb9910:01:33

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.

awb9911:01:30

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

mpcarolin17:01:28

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.

tim19:01:32

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.

tim19:01:18

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.

mpcarolin17:01:44

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.”

sova-soars-the-sora18:01:16

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.

tim23:01:45

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

tim23:01:33

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.

lspector21:01:12

If I want to follow exactly https://clojurescript.org/guides/quick-start 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?

john03:01:04

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

phill23:01:58

@lspector Emacs with clojure-mode

lspector23:01:44

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.

phill23:01:49

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

borkdude23:01:25

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

lspector23:01:46

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