newLISP Fan Club

Forum => newLISP newS => Topic started by: Lutz on December 06, 2006, 08:46:13 AM

Title: development release version 9.0.6
Post by: Lutz on December 06, 2006, 08:46:13 AM
• 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
Title:
Post by: HPW on December 06, 2006, 12:13:17 PM
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)
Title:
Post by: HPW on December 06, 2006, 12:20:03 PM
Also my application from the 2005er contest is broken now with the new nth!



Seems to have not wanted side effects!



??
Title:
Post by: HPW on December 06, 2006, 12:26:30 PM
(nth(find "DE" (list "DE" "EN"))(list "1" "2" "3"))

symbol is protected in function nth : find
Title:
Post by: Lutz on December 06, 2006, 01:26:09 PM
Ooops I did not catch this case. I will retract the current development release.



Lutz
Title:
Post by: jeremyc on December 06, 2006, 01:30:04 PM
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
Title:
Post by: jeremyc on December 06, 2006, 01:31:47 PM
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
Title:
Post by: Lutz on December 06, 2006, 01:32:45 PM
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.
Title:
Post by: jeremyc on December 06, 2006, 01:39:57 PM
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
Title:
Post by: newdep on December 06, 2006, 01:50:54 PM
see my error posting in "*N?X forum" with 9.0.6.. for httpd mode...
Title:
Post by: Lutz on December 06, 2006, 02:43:30 PM
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