Is Lua a decent fit for initial Ben NanoNote?

Xiangfu Liu xiangfu at
Fri Nov 6 02:40:13 EST 2009


I just finish port guile in qi-package. now there is a scheme interpreter
in Ben NanoNote. 
you can find the package at

I just test two code:
    (+ 1 1)
this give me 2
    (use-modules (ice-9 rdelim))

    (define (last-in-vector vec)
            (vector-ref vec (- (vector-length vec) 1)) )

    (define (hostname->ip hostname)
            (car (map inet-ntoa (last-in-vector (gethostbyname hostname)))) )

    (let ((s (socket PF_INET SOCK_STREAM 0)))
         (connect s AF_INET (inet-aton (hostname->ip "")) 80)
         (display "GET / HTTP/1.0\r\n\r\n" s)
         (do ((line (read-line s) (read-line s)))
             ((eof-object? line))
             (display line)
             (newline) ))
this give me :
HTTP/1.0 200 OK
Date: Fri, 06 Nov 2009 07:36:27 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Set-Cookie: PREF=ID=79493431acab394e:NW=1:TM=1257492987:LM=1257492987:S=1LvpeCmmhWdJD3Oh; expires=Sun, 06-Nov-2011 07:36:27 GMT; path=/;
...( a lot of output)

john wrote:
> For educational purposes a Scheme interpreter would be handy!
> John.

More information about the discussion mailing list