unrepl

discussing specification of an edn-based repl and its implementations.
dominicm 2017-06-08T08:38:57.640287Z

I knew I was being daft!

pesterhazy 2017-06-08T09:15:25.187922Z

@dominicm, I'm curious, are you working on something based on unrepl?

dominicm 2017-06-08T09:22:14.288357Z

pesterhazy: not actively. But I'm in the hammock over it. I'd like to build a vim client eventually. My participation here mostly centers around me wanting to repeat cool things the Nrepl allows in the "new world"

dominicm 2017-06-08T09:22:40.294852Z

I have a general interest in tooling too which helps

pesterhazy 2017-06-08T09:31:42.429750Z

a vim client would be great, even a simple one

pesterhazy 2017-06-08T09:31:57.433790Z

I guess one obstacle would be an edn parser?

cgrand 2017-06-08T09:34:20.469442Z

@kotarak got one I believe

pesterhazy 2017-06-08T09:34:48.476165Z

an edn parser in vimscript??

dominicm 2017-06-08T09:39:30.544260Z

Yeah.

dominicm 2017-06-08T09:39:31.544323Z

It exists

cgrand 2017-06-08T09:39:35.545304Z

he mentioned something like this to me yes

pesterhazy 2017-06-08T09:39:52.549578Z

beautiful 🙂

cgrand 2017-06-08T10:50:51.495422Z

Speaking of :set-source, there’s the open question of knowing reliably when it starts to apply. Scenario; the user submitted three benchmark forms at once, the 1st form is being evaluated, the other two are waiting to be read. Meanwhile the user wants to evaluate some form from a file (with corresponding source info set). This raise at least one edge cases and several questions: • if :set-source occurs on a separate connection it shouldn’t apply bafore the 2 pending forms are evaluated • evaluating from file also require to set the ns, should eval from file and repl share the same session? • if :set-source is async how do we know when it applies (or when to apply it)?

2017-06-08T11:31:57.994798Z

Yup. I have one. Untested. Ugly. Probably slooooow. It's viml after all. 😊

cgrand 2017-06-08T12:15:38.544753Z

Currently I’m leaning towards adding an extra param to :set-source: the offset where it must become active. Still unconvinced

dominicm 2017-06-08T14:25:32.086398Z

Yeah. I had wondered about the async and multi form versions of that. This, I suppose, is another part of the trade off of not "wrapping" input forms in a special way.

cgrand 2017-06-08T14:36:29.359842Z

wrapping on the “aux” connection is acceptable

cgrand 2017-06-08T14:37:28.384064Z

It’s a related concern but there’s something that bugs me with eval-form-from-file

cgrand 2017-06-08T14:40:13.451479Z

after some time the lines/cols are all wrong, ideally the editor should version files at each eval-form and makes the version id part of the file path

cgrand 2017-06-08T14:44:35.559315Z

Back to my question on :set-source, should “eval-form-from-file” happen on the repl connection? Should it alter *1 and friends? Should it be concurrent? In my experience (I’d like to know yours) the only integration I care about is having it appears in the repl logs so as to be able to review the log more easily. This may be a pure client feature

dominicm 2017-06-08T14:57:14.883046Z

I use *1 and *e for things evaluated from a file

dominicm 2017-06-08T14:57:50.898848Z

From a tooling perspective *e is invaluable for formatting exceptions

cgrand 2017-06-08T15:37:50.908942Z

True, most of the time it’s only defstuff but when it fails *e is useful (would a nice exception browser meets this need?)

dominicm 2017-06-08T15:44:03.058135Z

@cgrand perhaps. I hear Cider's is really good (you can click on lines and stuff).

cgrand 2017-06-08T15:45:37.096023Z

@dominicm yeah but it asks too much of the client

dominicm 2017-06-08T15:46:15.111067Z

@cgrand indeed. I'm starting to look at how vim can even have something close (although, it is based on a generic exception viewer I think, not dived in yet)

cgrand 2017-06-08T15:52:18.257149Z

so new small change, the :prompt message lists :column and :offset.

cgrand 2017-06-08T15:52:49.269638Z

This si interesting for two reasons: the client can keep track of the progress of evaluation without counting chars itself

cgrand 2017-06-08T15:53:57.297019Z

By checking if last :echo‘s :offset+ :len is equal to current prompt :offset

cgrand 2017-06-08T15:54:59.321796Z

the second reason is that you can easily spot when :set-source applies (you don’t have control over when it applies yet)

richiardiandrea 2017-06-08T16:00:54.467238Z

dominicm: no no you don't click in cider 😁

dominicm 2017-06-08T16:01:34.483915Z

I mean, you'd use some kind of keybinding 🙂

👌 1