[gambit-list] custom top-level repl one-liners

ben yakawp ben.lists at yakawp.com
Tue Dec 22 08:22:51 EST 2015


hi
Gambits repl is really awesome, especiallly the user friendly
interactive debugger. I think it would be even more awesome if one could
use a special repl friendly syntax to use an abritrary command. 

I've read something on the blog of the Gauche Scheme developer which
explains it much better (1):

"S-expression is great to represent tree structure, but it's a bit
cumbersome to give simple commands in interactive shell; If the command
line is short, the relative verbosity added by open and close
parentheses gets in a way. Also in many cases simple commands take
string arguments (e.g. to change working directory or to load file) and
that require extra double quotes.

I'm not the only one to feel that way. In Allegro CL, if you type a line
begins with :, it is interpreted as special toplevel command. Scheme 48
has similar command mode, beginning with ,. I guess there are other
implementations with similar features."

(1):
http://blog.practical-scheme.net/gauche/20150819-toplevel-repl-commands

So for 'gsi' that could mean we could write

repl> :define hello "world"
repl> :display hello

Would that be hard to implement?
ben



More information about the Gambit-list mailing list