unrepl

discussing specification of an edn-based repl and its implementations.
2018-03-13T06:48:59.000094Z

@dominicm If it amounts to channels I can provide something to test. But I still use things like lambdas and partials. If that also is a problem....

dominicm 2018-03-13T07:41:08.000282Z

@ @kotarak those were back ported. The neovim team strictly feel their channel implementation is better though.

2018-03-13T08:06:45.000308Z

Pffff.... maybe under the hood. Certainly not by API. I'm still puzzled about the EOF. Will provide you something this evening. If you like you can test. If it works, this can be probably abstracted away.

dominicm 2018-03-13T08:07:48.000083Z

There is a library which abstracts already

dominicm 2018-03-13T08:09:58.000300Z

Might be worth reading

dominicm 2018-03-13T08:11:33.000057Z

I think there's a typo > Alternatively the {stream}_buffered option can be set to invoke the callback only when the underlying stream reaches EOF, and will then be passed in complete output. Should be > Alternatively the {stream}_buffered option can be set to invoke the callback only when the underlying stream reaches EOF, and will then be passed complete output.

dominicm 2018-03-13T08:14:15.000304Z

The neovim gitter is good if you have questions

2018-03-13T17:33:33.000835Z

@cgrand It has to be a map?

2018-03-13T17:34:05.000658Z

No (apply merge ...)?

2018-03-13T17:42:01.000103Z

More voodoo heuristic and regex trickery.

cgrand 2018-03-13T17:45:11.000847Z

@kotarak how do you plan to use it (in very detailed terms)?

cgrand 2018-03-13T17:47:08.000339Z

Would an option that creates a partial blob to which you would need to append your maps and then ’]\n` be ok or do you prefer a eady made blob and substitue something in it?

2018-03-13T18:06:19.000708Z

My use case is the "multiple plugins" scenario. Each provides it's own actions map. However, they simply be string concated. They have to be read to be merged. But this is hard because of the representation. Just reading the files and wrapping everything in a pair of []s would be nice. But anyway: I've got a regex, which strips the outer {}s including some possible leading comments. Then I can concat again and wrap {}s.

2018-03-13T18:06:37.000544Z

This works. Modulo key uniqueness.

2018-03-13T18:07:20.000657Z

I just prefer something more robust. regex always make me feel uneasy. But the heck. The EDN parser is now full of 'em.

2018-03-13T18:30:02.000093Z

🤦

2018-03-13T18:30:57.000662Z

make-blob still takes the actions map.

2018-03-13T18:31:18.000177Z

That kind of defeats the purpose....

2018-03-13T18:50:05.000089Z

oh. And the EDN parser currently doesn't understand. #:foo{:bar :baz}.

2018-03-13T18:50:18.000002Z

More things to fix.

2018-03-13T19:08:08.000689Z

That is also not possible for the action map, btw.

2018-03-13T19:08:35.000447Z

At least not with regexes....

cgrand 2018-03-13T19:36:39.000254Z

Baby steps

2018-03-13T19:41:03.000037Z

This is what I would propose. Please note the lack of voodoo. Whatever your opinion: the marked line contains a bug.

2018-03-13T19:44:27.000628Z

With these changes a vimpire with sunscreen can prey on innocent clojure processes without ever invoking base64 in a Makefile. And extensibly so.

2018-03-13T19:59:43.000229Z

Also note: by that change unrepl can provide the blob, and the user never has to generate it.

2018-03-13T20:02:07.000218Z

I was investigating why the process was shouting exceptions at me. Turned it read an empty map. And then mine. That of course failed because of the tagged literals.

cgrand 2018-03-13T20:26:18.000706Z

I agree with the general direction (I intended to move this stuff from make-blob to repl too). I’ll give a closer look tomorrow.