The title is highly misleading.
105 karma · joined January 12, 2011
The title is highly misleading.
But it turns out many languages do have "Some Language -> WASM" now. WebAssembly brings portability to the table.
The main benefit of generating C over LLVM IR is portability: C is supported by far more systems than LLVM can target.
For example, it enables porting Rust applications to Mac OS 9 (https://twitter.com/turbolent/status/1617231570573873152), or porting Python to all sorts of operating systems and CPUs (https://twitter.com/turbolent/status/1621992945745547264).
The main "goal" of w2c2 so far has been allowing to port applications and libraries to as many systems as possible. For more information, see the README of w2c2.
I'd love to see a cleanup of OMeta/JS and combining it with CodeMirror.
The current one is single-inheritance, because it uses the prototype chain. It's a compromise between speed and usefulness. I'd prefer having multimethods (and maybe also multiple inheritance), but speed is a bit more important, as JavaScript is already quite slow.
So far I'm quite pleased with the single-inheritance and single dispatch solution, which basically works like that: https://gist.github.com/866506
As I needed a name, I just chose "Ralph" as that was the original code-name of Dylan (see http://en.wikipedia.org/wiki/History_of_the_Dylan_programmin...). I'm currently implementing a web-based IDE for the OpenDylan compiler (http://www.opendylan.org/), called "Hula" (original code-name of Apple's IDE, see http://wiki.opendylan.org/wiki/view.dsp?title=AppleDylanScre...). The work-in-progress is at https://github.com/turbolent/hula.
If you're interested in a demo, let me know.
It compiles a major subset of Apple's Dylan (http://lispm.dyndns.org/documentation/prefix-dylan/book.anno...) to JavaScript, both for use on a CommonJS implementation and in the browser. A bootstrapping compiler is implemented in JS, but the same compiler is also available in Ralph itself and features define-macro (Cl-like). The whole runtime is defined in Ralph as well and provides a single-inheritance object system (including next-method): https://github.com/turbolent/ralph/blob/master/src/runtime/c...
Almost all of the features are shown in https://github.com/turbolent/ralph/blob/master/src/tests/run... and I'm using it a project now. To build HTML5 apps, there's a small toolbox: https://github.com/turbolent/toolbox
Maybe it's useful to someone else. Cheers