anyone here have a setup where they use Lumo and Cursive together?
@jaydeesimon the two don't work together at the moment. The problem is that Cursive assumes nRepl middleware (take it with a pinch of salt, it closed source so we cannot really see what is going on)
yeah i noticed that there isn’t a cursive-way to connect to a socket repl
wondering if anyone is doing anything to get around that
it probably would expect jvm instrumentation even if it could
how do you all develop with lumo? use emacs?
You should be able to connect to cursive though I never tried
@jaydeesimon there's no special integration. Just text editing really.
@jaydeesimon look at Tubular by Mike Fikes
My phone is not letting me copy the link
oh wow, that's interesting
Thanks
Please avoid spreading false information that just confuses people
Telling users that X is not supported if you don’t know or never tried will only scare them away
It is not false information
Apologies. Given my experiences with all the other tooling in this area, I didn't expect cursive to work on a plain socket repl.
It's not officially supported, at least last time I spoke with Colin, but it is great to have a workaround for at least being able to send forms
sounds good everyone
i will look into using tubular
im really excited to try out lumo. i just need to my development process down pat the way I have it with clojure
out of curiousity, do you most of you use emacs?
I use vim
2 others working on lumo use emacs
None of us use special integration
Btw I am super interested in seeing if it works with Cursive, my colleagues use it :)
Also, Atom just released very nice integration for Language Server Protocol and probably an accept function could be written very easily for lumo
i will try out tubular and report back
the thing is, I really just want to write a script (one file) but be able to eval expressions through the editor
cursive doesnt really support that well
i mean cursive is optimized for leiningen and boot projects
im trying to convince myself that maybe just using emacs is a better way to go. but id have to brush up on my emacs
I have actually looked at tubular, but it seems it depends on clj-sockets, which unfortunately is Java only
So yeah definitely only working in Clojure: https://github.com/mfikes/tubular/blob/master/src/tubular/core.clj#L27
but I think the point is that you can use it to connect to lumo’s socket repl
Exactly
I’m almost 100% certain it works
Oh cool didn't get that
the workflow would be something like this. Create a lein project, add tubular, create a repl in cursive, then use that to connect to lumo socket repl
Doesnt matter what language your client is running. By the same logic, emacs can’t connect to a Clojure REPL because it’s running emacs lisp 😛
True, just thought you would integrate it in your lumo code at the beginning, sorry folks
basically, it should allow me to create some glue code which will let me do things through cursive
Yes and @mfikes has totally done that
Perhaps even has a video or blogpost
:thumbsup:
Yeah well I guess it really is just a socket client
ok thanks for the input everyone
and thank you to @anmonteiro and the lumo team. really excited to try it out
No need to really fear Tubular as a heavy dep. Here is all of its code 🙂 https://github.com/mfikes/tubular/blob/master/src/tubular/core.clj
yeah i saw that it’s pretty lightweight 🙂
@jaydeesimon search for tubular in the planck guide
will do
Again mobile slack doesnt let me paste links
The same should work with Lumo
It is in the Cursive section of http://planck-repl.org/ides.html
Thanks!
oh perfect!
thanks!
exactly what im gonna try to do
pasting here for future reference: Cursive section in http://planck-repl.org/ides.html
@mfikes when is saying "syncing namespace" in the manual , what is actually sending over the socket? I am curious 😄
@richiardiandrea IIRC, Cursive knows which namespaces are dirty and issues some load commands when you ask the IDE to do that.
Oh cool that's a nice feature, thanks @mfikes
Will suggest my colleagues to try it out
just had a free 10 mins to try out connecting to a socket repl in cursive
found some interesting behavior in cursive
not really a lumo issue but figured some of you might be interested
please share
cursive/intellij seems to take over and only lets you input through this window once you connect to the socket repl
i realized I didn’t follow the instructions exactly in the planck guide
i didn’t “Use clojure.main in normal JVM process”
when I do that, it doesn’t exhibit that behavior
Right, you definitely need to follow that step 🙂
just curious about what the difference is?
I think without it some layer in the nREPL stack gets in the way, perhaps something with stream handling
i see
@jaydeesimon also :gen-class
doesn’t do anything
not in ClojureScript
@jaydeesimon I’m planning to add support for both Lumo and the socket REPL soon. I’d hoped to have it by now, but what I’m working on has taken much longer than expected.
@cfleming that’s awesome. let me know if you need anything from Lumo and I’ll add it
@richiardiandrea @mfikes Right, the sync command works out the dependency hierarchy of all namespaces, works out which are modified and send the modified ones in dependency order.
@anmonteiro Will do, thanks!
I think that with the SDK dump command I’ll have everything, but I’ll let you know if that’s not the case.
I also have to add support for all the node resolution stuff that’s gone in recently.
@jaydeesimon BTW that input popup is an nREPL thing, you’ll get it from any nREPL client when the server tries to read from stdin.
@anmonteiro some follow-up about my obscure issue with executing Lumo 1.8.0 from Jenkins. It looks like I hit this (also obscure) NodeJS bug: https://github.com/nodejs/node/issues/11257
Relevant stacktrace I managed to catch from js/lumo.js:readSource
(when it tries to read bar.cljs
on interpreting (require 'bar)
):
TypeError: assertEncoding is not a function
at getOptions (fs.js:81:5)
at Object.fs.readFileSync (fs.js:552:13)
at Object.Oe [as readSource] ([eval]:1:21106)
at <embedded>:6359:439
at Object.lumo.repl.load_external (<embedded>:6359:509)
at Object.lumo.repl.load_and_cb_BANG_ (<embedded>:6368:429)
at Object.lumo.repl.load_other (<embedded>:6371:147)
at lumo.repl.load (<embedded>:6375:336)
at Function.cljs.js.require.cljs$core$IFn$_invoke$arity$5 (<embedded>:5850:77)
at Function.cljs.js.load_deps.cljs$core$IFn$_invoke$arity$7 (<embedded>:5860:507)
Not sure what to do next actually.
I guess I could file an issue to Lumo repo to track the problem. But currently the minimal reproduction example will require installing Jenkins 🙂
Also it doesn't help that upstream NodeJS issue has no reliable reproduction example.
I'll see what I can do, e.g bisect lumo.js commits to see when the issue starts manifesting itself.@metametadata perhaps in a Node.js upgrade in Lumo or something
please open an issue with this information
@anmonteiro okay, thanks, I'll check that and file an issue