2015-09-07 6:08 GMT+02:00 Anton Vodonosov <avodono...@gmail.com>:
> As far as I understand the Racket design, Whalesong is enough to bootstrap > full Racket in a JS environment. It's a great opportunity. I would like > very much to have an interactive lisp development where I can develop both > server side and client side code, and to share code between client and > server. > Whalesong can not bootstrap Racket. Here is the short version of how Whalesong compiles a file foo.rkt 1. The Whalesong compiler (running on Racket VM) reads the file foo.rkt. 2. The standard expand is called. Expand parses and expands all constructs producing a program without macros. 3. The compiler now calls the standard compile functions which produces a sequence of bytecodes. 4. The Whalesong bytecode-to-JavaScript compilers is called and a JavaScript file is produced. [ 5. Any modules required by foo.rkt are also compiled ] The problem is that the functions expand and compile are implemented in C. This means that it is not possible to run the bytecode-to-JavaScript compiler on neither the expander nor the expanded-code-to-bytecode. Two essential components are therefore missing before it is possible to bootstrap Racket in Whalesong. The expander was recently reimplemented. Maybe there is hope for an expander written in Racket at some point. The "selfhost" folder in the Whalesong repository was an effort to get the Whalesong bytecode-to-JavaScript running in the browser. That's doable - but not enough to get a selfhosting Racket system. -- Jens Axel Søgaard -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.