Requesting input on some possible low-level changes



On Wed, 2003-09-03 at 11:19, Raymond Toy wrote:
> >>>>> "James" == James Amundson <amundson@users.sourceforge.net> writes:
> 
>     James> A) We create a generic Lisp read-eval-print loop for Maxima to use
>     James> instead of allowing access to the same loop in the underlying Lisp.
>     James> Doing so is pretty simple. I do not see any problems with this change so
>     James> far.
> 
> Will we access to the real REPL still be possible?  How would this be
> different from your generic Lisp REPL?

I'm glad you are asking these questions. It seems to me that replacing
the real REPL wouldn't be any loss. If I am missing something, I would
like to hear about it.

The standard ways of getting to the REPL are to_lisp() and ctrl-c. Both
would be modified to take you to the maxima REPL. Here is the simple
prototype REPL I've been using:

(defun maxima-read-eval-print-loop ()
  (loop
   (with-simple-restart
    (exit-to-maxima-repl "Exit to Maxima read-eval-print loop" ())
    (format t "~%~a> " (package-name *package*))
    (let ((form (read)))
      (prin1 (eval form))))))

As you can see, it isn't very complicated. According to (my reading of)
the ANSI spec, all the above is missing is the variables *, **, ***, +,
++, +++, /, //, /// and -. I intend to implement them, but have not yet
done so.

Of course, the whole point of introducing maxima-read-eval-print-loop
would be to have hooks for indicating that input is required. I haven't
added any hooks yet, however.

What am I missing?

--Jim