Marc Feeley wrote:
Gambit's REPL is such an IDE. It is textual rather than graphical but it has the same purpose: help you develop and design programs. And the "I" of IDE is completely appropriate... the REPL is integrated to the environment so it is always there when you encounter a problem, allowing the user to debug programs at any time, even if the program was considered to be bug free (a feature I call "live debugging" or "open heart debugging"). It also allows you to debug programs that run on environments, such as embedded systems, that don't have a screen or enough memory to run a full-featured IDE.
Tight integrating of all these features into REPL is somewhat wrong way. REPL must be simple as possible, but not simpler. :) More adequate decomposition, according to my views, is REPL -> IDE. And IDE should be external to REPL.
Gambit's REPL is more sophisticated than you might think.
I know. I saw a lot of code even for TTYs things in the Gambits REPL.
There is a lot of logic to give access to the environment, backtrace, threads, error messages, etc.
It is not REPL already, it is a sort of IDE. And there is not good separation between REPL and IDE levels.
Moreover Gambit's line editing has features that are more sophisticated than what is available in rlwrap. For example symbol completion, input highlighting, and emacs keybindings for s-expressions.
I mentioned rlwrap only as example. Sometimes I use it with SBCL to test something quickly in repl. But these cases are very rare. Usually there is running SBCL image with swank on my server, and I just connect to it using slime and emacs.
Perhaps you can live without these things, but I can't. I use the REPL all the time from the shell. A full-featured IDE is too heavyweight for most of my needs (I don't want to have to wait a long time for the IDE to start, just do debug a simple script or experiment with a short piece of code).
I agree that full-featured IDE is not needed in many cases of quick testing of few lines of code. But extra REPL functionality should be in external easy-to-cut-off package.
Good modular decomposition allows easy shrinking down of the system to fit specific needs.
Basic REPL with hooks and external SWANK-like system is good environment to work with.
Some words on embedded systems mentioned above.
I work a lot with various embedded systems, AVR32, Au1250 (MIPS32), AT91RM9200 (ARM) and others. That is why I choose Gambit - it allows to maintain homogeneous high-level developing environment in heterogeneous set of architectures. But I do not use Gambits REPL on these systems, because of it insufficiency in many cases. And now I work on SWANK-like package for Gambit. When this package become more or less stable and useful I contribute it to the community. Basic REPL with hooks will be sufficient in my case.
In embedded world it is very important to maintain modular architecture of the system for easy shrinking down.
PS: _repl.scm is over 3.5kLOC and full of features such as decompiling code, showing continuations, debugging and so on. Why not to separate these features across several files and document them a bit more? It will significantly speed up of developing various IDEs and interfaces for them.
Vasil