dev-tooling

bozhidar 2023-06-23T09:31:36.511909Z

@mauricio.szabo It's not part of the protocol per-se, so it's hard to query about it. Right now you can check for ops, but not for their supported params.

bozhidar 2023-06-23T09:32:22.778429Z

That being said - CIDER supports it, hopefully Calva as well. //cc @pez You can easily check if an editor supports it by checking the message exchange between the editor and nREPL.

pez 2023-06-23T09:47:28.907719Z

How does it work? Calva doesn’t support it, but I’d be happy to make it.

mauricio.szabo 2023-06-23T14:21:40.405099Z

@pez it's quite simple, you just pass :nrepl.middleware.print/stream? 1 for the nREPL eval op and then "big" results will be returned in batches

mauricio.szabo 2023-06-23T14:23:53.852219Z

I'm thinking about supporting it on my new version of Chlorine. The "hard" part is that Chlorine interprets the result (and does not capture it as a string); I made a encoder/decoder based on bencode, but for EDN objects, I want to now try and make it compatible with nREPL stream (by being compatible meaning, make it a lazy list of fragments and let nREPL do its magic and batch specific elements)

pez 2023-06-23T14:46:40.052949Z

What are some situations when it matters?

mauricio.szabo 2023-06-23T15:20:59.289869Z

@pez you mean, when it's actually useful to return the result as batches?

pez 2023-06-23T15:24:30.886009Z

Yes, I haven’t exactly missed it in my own use of the repl.

mauricio.szabo 2023-06-23T17:21:28.996569Z

Well, when I evaluate something quite big, or infinite lists, for example, that could be useful

mauricio.szabo 2023-06-23T17:22:36.575699Z

Probably you haven't missed because you're capturing the result as strings. I am interpreting the result and converting back to EDN, in some cases this generates a big structure (when debugging Lacinia, for example) and it sometimes I can measure the parsing time in seconds (which is not a good experience, because then I have to render that structure 🤣)

mauricio.szabo 2023-06-23T17:23:01.570169Z

With the idea I'm having now, I might be able to "partially parse" something that becomes too big

mauricio.szabo 2023-06-23T19:27:15.697829Z

(BTW, @pez, everything I'm doing regarding this partial parse, the serialization, etc is completely separated from Chlorine and it's on its own repository if you want to know more about it 🙂 )

pez 2023-06-23T19:55:54.656459Z

I’d be happy to have look!

cfleming 2023-06-23T21:58:26.709479Z

I’d like to see that too!