• full functional HTTPD server mode on all OSs
• other changes, additions and bug fixes
The newLISP server mode now supports HTTP with GET/POST CGI and 'net-eval' requests at the same time.
There was no 9.0.5 released so read both the 9.0.5 and 9.0.6 chapters in the change notes.
For files and change noted see:
http://newlisp.org/downloads/development/
Lutz
ps: for the HTTP mode on Win32 make sure there is a C:tmp directory
Running demo.lsp gives this error in random.lsp:
Quote
symbol is protected in function nth : rand
called from user defined function tk
called from user defined function Random:fireworks
called from user defined function Random:run
Seems the new nth breaks this:
(nth (rand 16) colors)
Also my application from the 2005er contest is broken now with the new nth!
Seems to have not wanted side effects!
??
(nth(find "DE" (list "DE" "EN"))(list "1" "2" "3"))
symbol is protected in function nth : find
Ooops I did not catch this case. I will retract the current development release.
Lutz
That would be the same reason for:
> (set 'a (list 10 20 30))
(10 20 30)
> (nth (+ 1 1) a)
symbol is protected in function nth : +
???
Jeremy
On another note (but related to new devel version), how can I use the server attributes of newlisp with a handler function?
newlisp -x 8080 my-httpd
(define (x-event .....)
That does not seem to exist any longer?
Jeremy
newLISP development version 9.0.6 has been withdrawn because of a critical error in the 'nth' function.
Version 9.0.7 with 'nth' rolled back to 9.0.5 behavior will be posted soon.
Lutz
ps: x-event has been eliminated because of built-in server mode.
Quote from: "Lutz"
x-event has been eliminated because of built-in server mode.
What do you mean? Are you speaking of the built in web server? It would seem that in many circumstances you would want to respond in a like manner with x-event type handling to services not having anything to do with http?
Jeremy
see my error posting in "*N?X forum" with 9.0.6.. for httpd mode...
Jeremy: you can simulate the old x-event mode with newlisp server mode. Start newlisp using:
./newlisp -c -d 8080 myprog
myprog contains:
(while (set 'line (read-line))
(print (upper-case line)))
(exit)
now with telnet try this:
Escape character is '^]'.
llll
LLLLdfgsdfgsdfg
DFGSDFGSDFGsdfgsdgsdfg
SDFGSDGSDFG
Or you start without myprog and can enter newLISP expressions. Instead of telnet you could have another program connecting. Read all about it here: http://newlisp.org/CodePatterns.html#distributed
Lutz