development release version 9.0.4

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

development release version 9.0.4

Post by Lutz »

• new hyperbolic functions
• round
• expanded HTTP server mode for GET queries
• support for HTTP DELETE

For files and change notes see:

http://newlisp.org/downloads/development/

Lutz

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

Post by newdep »

Thanks Lutz!

You know what I always thought was funny in newlisp, that "pi" is missing ;-)
(Its there ofcourse (div 22 7)..)

I know it can be set ofcourse, but a lot of languages have it predefined, not
that it is always needed or should be..But because you are now touching hyperbolics I just thought to give it a ring ;-)

Norman.


BTW: I thing that 'ostype is one of the few static's in newlisp, why did you not
chose for (ostype) ?


BTW2: Ill just try it again, now your extending the internal http functions is there a change to get callbacks from those to report bytes processed?
(I requested it befor)
-- (define? (Cornflakes))

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

Post by Lutz »

For PI you can use:

Code: Select all

> (mul 2 (acos 0))
3.141592654
> (atan2 0 -1)
3.141592654
'ostype' is less to type then '(ostype)' and there are no parameters to pass. If you need more detailed info use: (sys-info). 'ostype' wil mostly be used like this: (if (= ostype "Win32") ...) etc.

(put-url ... ) and (write-file "http://...") or (append-file "htttp:// ...") report the number of bytes transferred as a small text snippet coming back.

The only thing missing is processing POST requests (v.9.0.5) and that will be all. The newLISP HTTP server mode is mainly for:

(a) distributed application support for file transfer between nodes, loading programs from remote nodes via HTTP and execute code remotely via HTTP. The same server node also understands 'net-eval' requests at the same time.

(b) for behind the firewall webserving without any security or rewriting URL's and the like. The newLISP HTTP server mode does not try to replace Apache or another web server installations, but could be used to run the web based IDE on the local desktop or assist an Apache instalallation for fast server tasks behind a firewall, e.g. as a database connector or other dedicated intelligent HTTTP server.

Lutz

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

newdep wrote:You know what I always thought was funny in newlisp, that "pi" is missing ;-)
(Its there of course (div 22 7)..)
If you have 'bc' on your machine:

Code: Select all

(replace "\" (join (exec "echo 'scale=300; 4 * a(1)' | bc -ql")) "")
"3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141272"

Does this look nice in your browser?! ;-)

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

Post by Lutz »

... beautiful (if you have one of those 40 inch screens :) ), for a nice application of PI and demonstration of loading code remotely via HTTP try the following:

Fire up newlisp-tk, and in the console window type/paste in the following:

(load "http://www.intricatevisions.com/source/ ... h-draw.lsp")

one of Fanda's nice newlisp-tk programs.

Also, for more math constants look into Jeremy's Math page here:

http://newlisp-on-noodles.org/wiki/index.php/Math

Lutz

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

Post by HPW »

When testing 9.0.4 with my neobook demo app I noticed that my turtle-demo was broken.
Fortunatly it turns out to be a name conflict with the new (round ..) function, which I had used there.
Hans-Peter

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

Post by HPW »

I noticed that the newLISP files are dated on 01.12.2006 (so coming from the future!)
;-)

PS: The new functions are not documented yet, so no direct jump.
Hans-Peter

Locked