Search found 8 matches

by abbat
Sat Nov 07, 2009 7:46 pm
Forum: newLISP in the real world
Topic: Lazy lists
Replies: 2
Views: 2746

Lazy lists

I want work in newLISP with lazy data structures like that:

Code: Select all

(define fibs
    (lazy-cat '(0 1) (map + fibs (rest fibs))))
(fibs 10) ; ==> 55 
How to do this?
by abbat
Sat Nov 07, 2009 7:38 pm
Forum: newLISP and the O.S.
Topic: Calling newlisp from Javascript
Replies: 10
Views: 7644

Re: Calling newlisp from Javascript

This is suitable for me.
Many thanks!
by abbat
Sat Nov 07, 2009 5:19 pm
Forum: newLISP and the O.S.
Topic: Calling newlisp from Javascript
Replies: 10
Views: 7644

Re: Calling newlisp from Javascript

Sorry, misprint:
instead
"newLispEval("(+ 'x 4)");"
must be
"newLispEval("(+ x 4)");"
by abbat
Sat Nov 07, 2009 5:17 pm
Forum: newLISP and the O.S.
Topic: Calling newlisp from Javascript
Replies: 10
Views: 7644

Re: Calling newlisp from Javascript

Sorry for long silent. I create file "eval.cgi": #!/usr/bin/newlisp (define (url-translate str) (replace "%([0-9A-F][0-9A-F])" str (format "%c" (int (append "0x" $1))) 1)) (print "Content-type: text/html\r\n\r\n") (print (eval-string (url-translate (env "QUERY_STRING")))) (exit) # end of file and fi...
by abbat
Wed Nov 04, 2009 4:14 pm
Forum: newLISP and the O.S.
Topic: Calling newlisp from Javascript
Replies: 10
Views: 7644

Re: Calling newlisp from Javascript

Sorry again :)
newlisp.exe -c -d 8080
by abbat
Wed Nov 04, 2009 4:13 pm
Forum: newLISP and the O.S.
Topic: Calling newlisp from Javascript
Replies: 10
Views: 7644

Re: Calling newlisp from Javascript

Sorry, misprint:
I run newLISP with line:
newlisp.exe -c -d
by abbat
Wed Nov 04, 2009 4:12 pm
Forum: newLISP and the O.S.
Topic: Calling newlisp from Javascript
Replies: 10
Views: 7644

Re: Calling newlisp from Javascript

Thanks you for reply. I am beginner in newLisp and Javascritp. Please, give me an example. I try run newlisp: newlisp.exe. -c -d 8080 and open in browser this document: <html> <body> <h3>newLISP server and JS demo</h3> <script type="text/javascript" language="javascript"> if (window.XMLHttpRequest) ...
by abbat
Tue Nov 03, 2009 8:44 pm
Forum: newLISP and the O.S.
Topic: Calling newlisp from Javascript
Replies: 10
Views: 7644

Calling newlisp from Javascript

I use newLISP as local http server on Windows platform:
newlisp.exe -c -d 1235

It is possible send some string (like "(+ 2 3)") from Javascript to newLISP session
for evaluate and get back answer?