2011/4/10 Shriram Krishnamurthi <s...@cs.brown.edu>: > Why would it be better to first retarget Racket to the LLVM than to > just use the current Racket bytecode->JavaScript compiler?
Does the current bytecode to JavaScript compiler cover the whole language? A direct Racket bytecode to JavaScript compiler ought to be faster/smaller/better etc. One advantage with the LLVM solution is that one is sure that the semantics of the parts of Racket that are implemented in C will be preserved. I am thinking such things as the numerical tower, whose C implementation contains quite a few functions that are non-trivial to implement directly in JavaScript. Another plus is that the effort of using Emscripten is small compared to the effort of implementing a Scheme runtime in JavaScript. Here is a Python in a browser demo: http://syntensity.com/static/python.html And here is Lua: http://syntensity.com/static/lua.html -- Jens Axel Søgaard 2011/4/10 Shriram Krishnamurthi <s...@cs.brown.edu>: > Why would it be better to first retarget Racket to the LLVM than to > just use the current Racket bytecode->JavaScript compiler? > > On Sun, Apr 10, 2011 at 12:18 PM, Jens Axel Søgaard > <jensa...@soegaard.net> wrote: >> Hi All, >> >> An interesting LLVM to JavaScript compiler called Emscripten has just >> been released. >> >> http://syntensity.blogspot.com/2011/04/emscripten-10.html >> >> Maybe this could be used to make Racket-in-browser? >> >> Is it feasible to compile the non-jit version of Racket with >> Emscripten or is there >> some obvious obstacles? >> >> If not the idea is would make a nice Racket project for someone. >> Say, Project Bracket (=BrowserRacket). >> >> It goes without saying, that the solution won't be fast, but it might be >> fast enough. At least the demo (a pdf-renderer in JavaScript works >> reasonable fast). >> >> -- >> Jens Axel Søgaard >> >> _________________________________________________ >> For list-related administrative tasks: >> http://lists.racket-lang.org/listinfo/users > > _________________________________________________ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/users > -- -- Jens Axel Søgaard _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users