nrepl

https://github.com/nrepl/nrepl || https://nrepl.org
cfleming 2020-10-02T00:14:03.032800Z

I’m curious - why does the sideloading require a sideloader-start message? Why not just call sideloader-lookup as required? Is that so that the client has to specifically acknowledge that it’s sideloader-capable?

hoppy 2020-10-02T00:56:14.036Z

greetings. I'm a bit vexxed/overwhelmed by the myriad of docs on the subject, so perhaps I'll ask if there is somebody that can point me at what would be the most straightforward path to getting an nrepl server fired up from node on an embedded device? I have node there, but no java - seems like it should be possible, but I'm having trouble how to assemble the parts. Shadow is in play, if that matters. I guess I'm wanting to get a cljs repl fired up there, and do the piggieback bit on the desktop to get into it.

bozhidar 2020-10-02T05:57:06.036200Z

To enable sideloading for a session explicitly, as the assumption is most people don't need it. With the sideloading enabled some evaluation of a missing require won't give you an error until you get a response from the client with the resource or signaling the resource doesn't exist.

bozhidar 2020-10-02T05:58:42.037100Z

@hoppy if you don't have Java there you can't really start the reference nREPL implementation and would ideally need some self-hosted implementation of nREPL.

bozhidar 2020-10-02T05:59:33.037500Z

I guess this one would work https://github.com/djblue/nrepl-cljs although it's not exactly feature-complete.

pez 2020-10-02T10:45:12.038400Z

Does it mean Calva doesn't really need to inject anything but nrepl and can sideload anything else?

cfleming 2020-10-06T10:11:13.048200Z

@flowthing Why do you need a dedicated nREPL session for sideloading?

flowthing 2020-10-06T10:26:38.048400Z

I forget the specifics, and it appears they’re lost in the mists of Slack history, unfortunately… @shen would be able to tell. IIRC, if you try using the session where you send sideloader-start for other things (like clojure.test integration), you’ll get sideloader-provide requests for things you don’t want them for. That’s pretty much the extent of what I remember.

cfleming 2020-10-06T10:33:38.048600Z

Yeah, that makes sense - I guess any time someone tries to require anything, even speculatively, it’ll go back to the IDE for that.

cfleming 2020-10-06T10:34:00.048800Z

Assuming it’s not found locally, of course.

flowthing 2020-10-06T10:40:29.049Z

Yep, exactly.

shen 2020-10-06T13:09:19.049200Z

There's quite a lot of non-obvious side effects to enabling sideloading, so isolating it in its own explicit session made sense. The design is based on unrepl version of the of the feature by Christophe. I assume it was made for similar reasons

👍 1
pez 2020-10-02T10:47:01.039400Z

^ That was re: > @bozhidar How does that work, then? I’m not sure how this should work from either a client implementation or a user UI point of view

pez 2020-10-02T10:49:19.040700Z

Now I have read the rest of the convo, so never mind me. 😃

flowthing 2020-10-02T10:50:31.042200Z

Yes, that’s why it was created, I think. That’s what I do in my plugin (although I don’t sideload CIDER or anything huge like that).

❤️ 1
pez 2020-10-02T10:53:11.042500Z

I think I mostly had those huge things in mind.

flowthing 2020-10-02T10:53:27.042700Z

Well, it should work there, too.

pez 2020-10-02T10:54:53.042900Z

Could be worth considering for the stuff that only might be used during a session.

flowthing 2020-10-02T10:56:18.043100Z

https://metaredux.com/posts/2020/03/28/nrepl-0-7.html I found this blog post helpful when working on my implementation.

flowthing 2020-10-02T10:56:55.043300Z

One thing I got bitten by was that you’ll need to use a dedicated nREPL session for sideloading.

pez 2020-10-02T11:03:22.043500Z

Thanks. I'll check it out.

hoppy 2020-10-02T13:25:50.047900Z

and then there is the work that sir @mfikes did with his esp32 board: https://github.com/mfikes/esprit - there is obviously not java anywhere to be found anywhere there, but rather something javascript-y that can eval the compiler output that was made on the desktop side - or I'm not understanding what is going on at all. But it seems pretty cool/useful