Fork me on GitHub
#unrepl
<
2017-06-08
>
dominicm08:06:57

I knew I was being daft!

pesterhazy09:06:25

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

dominicm09:06:14

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"

dominicm09:06:40

I have a general interest in tooling too which helps

pesterhazy09:06:42

a vim client would be great, even a simple one

pesterhazy09:06:57

I guess one obstacle would be an edn parser?

cgrand09:06:20

@U08KSP3CL got one I believe

pesterhazy09:06:48

an edn parser in vimscript??

cgrand09:06:35

he mentioned something like this to me yes

pesterhazy09:06:52

beautiful šŸ™‚

kotarak11:06:57

Yup. I have one. Untested. Ugly. Probably slooooow. It's viml after all. šŸ˜Š

cgrand10:06:51

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

cgrand12:06:38

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

dominicm14:06:32

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.

cgrand14:06:29

wrapping on the ā€œauxā€ connection is acceptable

cgrand14:06:28

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

cgrand14:06:13

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

cgrand14:06:35

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

dominicm14:06:14

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

dominicm14:06:50

From a tooling perspective *e is invaluable for formatting exceptions

cgrand15:06:50

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

dominicm15:06:03

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

richiardiandrea16:06:54

dominicm: no no you don't click in cider šŸ˜

dominicm16:06:34

I mean, you'd use some kind of keybinding šŸ™‚

cgrand15:06:37

@dominicm yeah but it asks too much of the client

dominicm15:06:15

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

cgrand15:06:18

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

cgrand15:06:49

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

cgrand15:06:57

By checking if last :echoā€˜s :offset+ :len is equal to current prompt :offset

cgrand15:06:59

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