development release version 9.0.6

Notices and updates
Locked
Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

development release version 9.0.6

Post 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

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post 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)
Hans-Peter

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

Also my application from the 2005er contest is broken now with the new nth!

Seems to have not wanted side effects!

??
Hans-Peter

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

Code: Select all

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

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Ooops I did not catch this case. I will retract the current development release.

Lutz

jeremyc
Posts: 33
Joined: Wed Dec 06, 2006 3:33 am

Post 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

jeremyc
Posts: 33
Joined: Wed Dec 06, 2006 3:33 am

Post 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

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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.

jeremyc
Posts: 33
Joined: Wed Dec 06, 2006 3:33 am

Post 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

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

see my error posting in "*N?X forum" with 9.0.6.. for httpd mode...
-- (define? (Cornflakes))

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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

Locked