unrepl

discussing specification of an edn-based repl and its implementations.
cgrand 2017-11-08T11:35:31.000146Z

Here is a proposal for the completion action: It takes 3 arguments: • before a string of what is before the cursor (at least the prefix to complete but may encompass more eg up to the start of the form) • after a string too, may be empty or missing • namespace a symbol It returns a list of maps with key :candidate (string) (more optional keys to be defined later)

dominicm 2017-11-08T11:37:11.000251Z

@cgrand not that unrepl is intended for this, but: would before handle "(ns foo) (de" as a value.

dominicm 2017-11-08T11:39:49.000187Z

As an aside, I believe the completion action would translate fairly well to compliment, which is considered the best available completion.

cgrand 2017-11-08T11:41:16.000441Z

@dominicm sure because the MVI that @pesterhazy is working on is going to first run a regex to ignore everything but the last word 🙂

dominicm 2017-11-08T11:44:04.000026Z

heh. Does it matter that different implementations may or may not handle that? I guess I'm putting a question over the potential ambiguity of "more".

cgrand 2017-11-08T11:48:42.000012Z

@dominicm ambiguity is on purpose: implementations have to deal with it, they may get too much or too little context

dominicm 2017-11-08T12:30:54.000148Z

@cgrand as long as the expectation is that implementations deal with it, 👍 from me