Hi, Marc. In fact, I like Gambit very much, but I had a small problem with it. When I compile it in my machine, it does not work in my cloud computer. I think you remember this problem, we discussed it years ago. I even hired a cloud machine for you to check the problem. Do you remember? Then, let me rephrase my statement, Gambit generates executable code, but it does not work in my cloud computer.
In any case, I am interested in Gambit again, to generate WebAssembly that can run in browser. Could you tell me how to build Gambit for the emcc toolchain? Em qui., 14 de mai. de 2020 às 23:06, Marc Feeley <[email protected]> escreveu: > > > On May 14, 2020, at 3:10 PM, Eduardo Costa <[email protected]> wrote: > > > > Now, let us see the problem. It would be great if Bigloo could generate > WebAssembly through emsdk and emcc. As far as I know, Mark Feeley had no > difficulty in creating an emsdk version for gambit scheme. However, this > was not very useful since gambit does not generate executable code, > therefore one cannot send a scheme app to a browser. > > Can you explain what you mean? Gambit has the -exe option to create > executable programs: > > % cat eduardo.scm > (println (expt 2 200)) > % gsc -exe eduardo.scm > % ./eduardo > 1606938044258990275541962092341162602522202993782792835301376 > > You can also easily create, with the “-target js” option, JavaScript > programs that run with node or in the browser. Here is an example with the > JS code embedded in an .html page: > > % cat eduardo.scm > (define (alert msg) (##inline-host-statement "alert(g_scm2host(@1@));" > msg)) > (alert "hello!") > % gsc -target js -o eduardo.html -exe eduardo.scm > % open eduardo.html > > So emsdk is not needed. > > Marc > > >
