Fork me on GitHub
#dev-tooling
<
2023-06-24
>
mauricio.szabo01:06:19

Ok, so https://gitlab.com/clj-editors/orbit. Please take a notice that it's still heavily on development, because I want that to be the new way to evaluate things in Chlorine. Specifically, https://gitlab.com/clj-editors/orbit/-/blob/master/src/orbit/serializer.cljc#L5-42 and its specific https://gitlab.com/clj-editors/orbit/-/blob/master/test/orbit/serializer_test.cljc#L12 which might make things clearer, or more complicated :rolling_on_the_floor_laughing:

mauricio.szabo01:06:23

There's one thing I'll change though, that is the way I'm actually serializing (but I need to test this too) - for now, I'm returning a string (and that string needs to be constructed all at once) which is a bottleneck for the serialization and it kinda defeats the point of nREPL batching the result. What I want to do is to serialize as a lazy seq and see if it works. It might make decoding harder, but if it works with nREPL stream I'll be happy to pay that price 🙂

flowthing15:06:08

Tutkain supported streaming responses (via the nrepl.middleware.print middleware) before I pivoted away from nREPL. It did yield a slight UX improvement for large results in that the client can start printing the result sooner than without streaming, but I find that once the result is sufficiently large, I want to send it to an external visualizer/inspector anyway, so it didn’t end up being particularly useful for my use case. It’s probably a lot more useful if your client can show partial results (and request additional results on demand, á là Proto REPL), though (which you can obviously do with VS Code).

pez15:06:22

On-demand additional results seems to be something else than streaming results, though? Or am I understanding that wrong?

flowthing15:06:47

Oh yes, you’re right, I’m mixing up two different things — my bad, sorry.

flowthing15:06:36

It’s been a while. 🙂

pez15:06:59

No worries. The ability to deal with incomplete results is needed in both cases, so some of the mechanics is similar/almost the same. I think elisions seem much more immediately useful/needed than streaming. But we don’t have elisions in nrepl, do we?

cfleming21:06:15

> But we don’t have elisions in nrepl, do we? Didn’t cgrand do some work on this based on his work with unrepl? Did that ever make it in? I’ve been meaning to investigate this too - I agree they seem more useful.

mauricio.szabo14:06:53

@U0567Q30W I tried to use UNREPL. It works, until it doesn't, and when it does not, it's broken to the level of being unusable. It's also quite hard to parse the results too - elisions can happen in multiple levels, and in some cases elision removes the whole object.

bozhidar15:06:11

> It’s probably a lot more useful if your client can show partial results (and request additional results on demand, á là Proto REPL), though (which you can obviously do with VS Code). In CIDER we use it for the REPL results where the partial results are fine and kind of add up naturally. It’s not very useful for inline evaluation.

🙏 2
cfleming21:06:15

> But we don’t have elisions in nrepl, do we? Didn’t cgrand do some work on this based on his work with unrepl? Did that ever make it in? I’ve been meaning to investigate this too - I agree they seem more useful.