Maxima's REPL




On Fri, 8 Apr 2011, Richard Fateman wrote:

< 1. I think there is indeed a huge advantage in doing the web server in lisp.

Yes, I wouldn't have thought so a while ago, but after I learning a bit about lisp
and how maxima represents objects internally, I think it is the
prefered route.

< I wrote one for Tilu, which is either online or I can send to you.  The web
< interface is old and
< rather simplistic, and does not deal with "is n positive or negative" since
< that
< doesn't happen for Tilu.  It also just does a simple text display of formulas,
< and has
< no plotting.

Yes, please do. I have arrived at a similar interface, which takes a
surprisingly small amount of code, given allegroserve.

< 
< 2. I agree with Stavros that you can look at the code;  the meat of it is in
< that file, in the function "continue".
< It is surprising how much embroidery there is to what is, essentially..
< 
< (loop (displa(meval(mread)))
< 
< I don't know what displayinput does, but just guessing, I would think it has
< to do with whether you are doing a batch() input from a file or from a
< keyboard.  If the input is from a file, do you want to display the input as
< well as the output?

Yes, this is about what I have picked up from the source.

< Or just quietly chew up the input.  And for the web interface, I'm not sure
< what you would want to do.  You could, perhaps with some benefit, display the
< input nicely.  You could display balanced parens and "pretty-print" the
< command; this might even lead some people to notice bugs in their input.  It
< certainly does the job for me when I write programs in lisp.

This is one idea. Syntax highlighting is a natural extension.

< 
< 3.  I think that most people using javascript do it because they don't know
< lisp.  Not that javascript is in any way essential or more convenient.

Ok, I hate JS. But for browser scripting, I don't think there is any
alternative. And since you don't want the browser <--> server to  
be retransmitting all the session information, it'll be necessary for
that information to be kept by the browser and the page
refreshed/redrawn when the server sends new data.

< 
<  I am quite sure that you can do it all in lisp.

Yes, right up to this last point, I think.

< 
< 4. There are still issues like -- if you provide a Maxima server, how do you
< provide security?  How do you provide for multiple users?
< (possible answers:  virtual machines; duplicate virtual machines.)
 
 Well, like the gun manufacturers, I am going to say that security is
 the user's problem, not mine ;-).

 To be serious, though, allegroserve supports ssl and authentication.
 So if I can get this working, I see it doing some of the following:
 -providing a dead-simple front-end for maxima newbies, like the sage
 notebook (i.e. the network here is just localhost);
 -providing a secure shared session for online collaboration and/or distance
 education

Ok, enough dreaming.

Leo

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.