Fork me on GitHub
#nrepl
<
2020-10-02
>
cfleming00:10:03

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?

bozhidar05:10:06

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.

hoppy00:10:14

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.

bozhidar05:10:42

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

bozhidar05:10:33

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

pez10:10:12

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

flowthing10:10:31

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

❤️ 3
pez10:10:11

I think I mostly had those huge things in mind.

flowthing10:10:27

Well, it should work there, too.

pez10:10:53

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

flowthing10:10:18

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

flowthing10:10:55

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

pez11:10:22

Thanks. I'll check it out.

cfleming10:10:13

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

flowthing10:10:38

I forget the specifics, and it appears they’re lost in the mists of Slack history, unfortunately… @U1XERPZ18 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.

cfleming10:10:38

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

cfleming10:10:00

Assuming it’s not found locally, of course.

flowthing10:10:29

Yep, exactly.

shen13:10:19

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

👍 3
pez10:10:01

^ 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

pez10:10:19

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

hoppy13:10:50

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