On Apr 21, 2013, at 7:34 PM, Jason Yeo wrote:

> On Mon, Apr 22, 2013 at 9:26 AM, manu d <th3ra...@gmail.com> wrote:
>> I am trying to port TryClojure (https://github.com/Raynes/tryclojure), a
>> web-based REPL, to Racket.
> 
> Has anyone tried compiling Racket to JavaScript using emscripten?
> (https://github.com/kripken/emscripten)
> 
> This way, we don't need a server to evaluate the racket code.

This is a nifty idea, and I think that a bunch of people have given it at least 
30 seconds of thought. Indeed, the author of Emscripten is at a desk about 3 
meters from mine.

To the best of my knowledge, though, no one has spent serious time working on 
it.

I think this would get Very Interesting(™) in and around the JIT. IIRC, Racket 
uses GNU Lightning. Emscripten goes through LLVM. It would seem that turning 
the JIT off would be the best choice, but it would probably be terrible for 
performance. Also, I believe that all of the library interfaces would need to 
be paid attention to.

I think that Whalesong is probably a better focus for these efforts. In case 
you're not already familiar with it, it's a Racket-to-JS compiler written by 
Danny Yoo:

http://hashcollision.org/whalesong/

John



____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to