Ark icon indicating copy to clipboard operation
Ark copied to clipboard

Add repl dedicated features

Open SuperFola opened this issue 4 years ago • 3 comments

  • [ ] (repl:toFile filename) to store the expressions (+ results in comments) in a given file
  • [ ] (repl:reset) to reset the VM state and start from something fresh
  • [ ] consider key bindings

SuperFola avatar Jun 12 '21 09:06 SuperFola

There is so much more we can do by using replxx, eg https://github.com/AmokHuginnsson/replxx/blob/master/examples/cxx-api.cxx

SuperFola avatar Oct 12 '21 11:10 SuperFola

Hello! I'm interested in this issue.

(repl:toFile filename) to store the expressions (+ results in comments) in a given file This should store the expression written so far in the runtime, quite like a log? Should there be any special formatting for the expressions and the results, so a further parsing is able to be done?

consider key bindings What kind of key bindings should be implemented?

henriquenunez avatar Oct 24 '21 00:10 henriquenunez

This should store the expression written so far in the runtime, quite like a log? Should there be any special formatting for the expressions and the results, so a further parsing is able to be done?

Aside from using the internal REPL buffer storing the code to be executed, and adding the generated results (outputed to the terminal, if we can find an easy way to retrieve that output without modifying anything else than the REPL) as comments (starting with # in the language), I don't think we need to add anything more (timestamps on queries are a bit useless for a language like this one, if it was a query language like SQL, it would have been interesting/required).

What kind of key bindings should be implemented?

At the time of writing this, I didn't have a clear idea in mind, it was more like "explore what we can do with it", in term of text completion, searching for code/snippets, etc

SuperFola avatar Oct 24 '21 09:10 SuperFola