On 2013-09-09, at 9:33 AM, Mikael <
mikael.rcv@gmail.com> wrote:
> Awesome.
>
> For reference, is the implementation of Gambit2JS available anywhere?
>
Yes. It is in the standard release of Gambit. You need to use the option "-target js" to gsc. For example:
% cat fib.scm
(declare
(standard-bindings)
(extended-bindings)
(not safe)
(fixnum)
(block)
)
(define (fib n)
(define (fib n)
(if (< n 2)
n
(+ (fib (- n 1))
(fib (- n 2)))))
(fib
n))
(define start (real-time-milliseconds))
(println (fib 30))
(define end (real-time-milliseconds))
(println (- end start))
% gsc -c -target js fib.scm
% js fib.js
832040
2035
Marc
_______________________________________________
Gambit-list mailing list
Gambit-list@iro.umontreal.cahttps://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list