Page 1 of 1

development release version 9.0.6

Posted: Wed Dec 06, 2006 4:46 pm
by Lutz
• 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

Posted: Wed Dec 06, 2006 8:13 pm
by HPW
Running demo.lsp gives this error in random.lsp:
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)

Posted: Wed Dec 06, 2006 8:20 pm
by HPW
Also my application from the 2005er contest is broken now with the new nth!

Seems to have not wanted side effects!

??

Posted: Wed Dec 06, 2006 8:26 pm
by HPW

Code: Select all

(nth(find "DE" (list "DE" "EN"))(list "1" "2" "3"))
symbol is protected in function nth : find

Posted: Wed Dec 06, 2006 9:26 pm
by Lutz
Ooops I did not catch this case. I will retract the current development release.

Lutz

Posted: Wed Dec 06, 2006 9:30 pm
by jeremyc
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

Posted: Wed Dec 06, 2006 9:31 pm
by jeremyc
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

Posted: Wed Dec 06, 2006 9:32 pm
by Lutz
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.

Posted: Wed Dec 06, 2006 9:39 pm
by jeremyc
Lutz wrote: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

Posted: Wed Dec 06, 2006 9:50 pm
by newdep
see my error posting in "*N?X forum" with 9.0.6.. for httpd mode...

Posted: Wed Dec 06, 2006 10:43 pm
by Lutz
Jeremy: you can simulate the old x-event mode with newlisp server mode. Start newlisp using:

Code: Select all

./newlisp -c -d 8080 myprog
myprog contains:

Code: Select all

(while (set 'line (read-line))
        (print (upper-case line)))
(exit)
now with telnet try this:

Code: Select all

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