[gambit-list] Going forward with JavaScript Backend (Was: Information about the Gambit-C Javascript Backend)
Amirouche Boubekki
amirouche.boubekki at gmail.com
Sat Jul 20 13:05:26 EDT 2019
I would like to work on the JavaScript Backend.
I started porting my work from JavaScript and other Schemes that rely on ReactJS
to Gambit:
https://github.com/scheme-live/scheme-fuss
This is the very basic and doesn't support calling the backend yet. I
am confident I can
achieve it (along all the things that are listed in the issues), but I
am hitting some problems.
In particular the following features are not available:
- quasiquote: this would allow to easily express html in s-expr (sxml)
- syntax-case: this would allow to adapt some of my previous work
involving R7RS libraries.
Also, I upgraded my demo application to implement an application of "counter".
It fails after the 10th click on increment button:
https://scheme-live.github.io/scheme-fuss/
tl;dr: Let me know what you think and how I can put my (plenty of)
time to good use?
Thanks for the great work!
---------- Forwarded message ---------
De : Marc Feeley <feeley at iro.umontreal.ca>
Date: ven. 19 juil. 2019 à 17:37
Subject: Re: [gambit-list] Information about the Gambit-C Javascript Backend
To: Amirouche Boubekki <amirouche.boubekki at gmail.com>
Cc: Paulo Silva Filho <paulosfilho at gmail.com>, gambit-list
<gambit-list at iro.umontreal.ca>
Like so:
% cd gambit
% cd lib
% make _gambit.js
../gsc/gsc -:~~bin=../bin,~~lib=../lib,~~include=../include -f -target
js -prelude "(define-cond-expand-feature|enable-type-checking|)(define-cond-expand-feature|disable-auto-forcing|)(define-cond-expand-feature|enable-sharp-dot|)(define-cond-expand-feature|enable-bignum|)(define-cond-expand-feature|enable-ratnum|)(define-cond-expand-feature|enable-cpxnum|)(define-cond-expand-feature|disable-smp|)(##include\"../lib/header.scm\")"
-o _gambit.js ../lib/_univlib.scm
% cd ..
% gsc/gsc -:=. -target js -exe app.scm
% ./app
1
256
65536
16777216
4294967296
1099511627776
281474976710656
72057594037927936
18446744073709551616
4722366482869645213696
1208925819614629174706176
309485009821345068724781056
79228162514264337593543950336
20282409603651670423947251286016
5192296858534827628530496329220096
1329227995784915872903807060280344576
340282366920938463463374607431768211456
87112285931760246646623899502532662132736
22300745198530623141535718272648361505980416
5708990770823839524233143877797980545530986496
% cat app.scm
(define n 20)
(for-each (lambda (i)
(println (object->string (expt 2 (* i 8)))))
(iota n))
(exit)
This should work for the other backends too. Note that there’s some
bit rot of lib/univlib.scm, so there are issues with some parts of the
Gambit library (for example write and pretty-print are broken, (exit)
is needed to avoid an exception on exit, etc). You can revert to
previous recent releases of Gambit to get these working correctly.
Sorry but lots of things are in flux right now…
Marc
> On Jul 19, 2019, at 11:08 AM, Amirouche Boubekki <amirouche.boubekki at gmail.com> wrote:
>
> Sorry for the multiple emails!
>
> Le ven. 19 juil. 2019 à 13:38, Marc Feeley <feeley at iro.umontreal.ca> a écrit :
> You should look at this recent thread: https://mailman.iro.umontreal.ca/pipermail/gambit-list/2019-July/009103.html
>
> In the above mail thread, it is described how to compile a scheme file into javascript WITHOUT "Gambit runtime".
>
> Q: How can I bundle the Gambit runtime into the compiled JavaScript file?
>
>
> Thanks in advance!
--
Amirouche ~ amz3 ~ https://hyper.dev
More information about the Gambit-list
mailing list