A very handy feature of uLisp has always been the ability to enter uLisp programs through the serial port, such as by pasting them directly into the input field in the Arduino IDE’s Serial Monitor window.
However, with some platforms pasting long programs can overflow the serial buffer, resulting in a string of error messages due to the dropped characters. The solution was either to paste the program in smaller sections, or increase the size of the buffer before compiling and uploading uLisp to the board.
Neither of these solutions is ideal. Having to paste the program in sections is annoying, and increasing the size of the buffer takes valuable RAM away from uLisp’s workspace.
My suggestion is to provide a new echo function that allows you to turn off or on the echoing of serial characters. Before pasting a long listing you would do:
and the text you then paste in will not get echoed to the Serial Monitor (although Lisp output will still appear as normal). To return to the normal REPL mode you would type:
It will work equally well if you include (echo nil) and (echo t) at the start and end of the listing before copying and pasting it.
Does this sound like a good solution, or is there a better one?