A community for technology geeks in Lebanon.

You are not logged in.

#1 October 15 2015


Javascript Transpilers

This is interesting, this will give you an idea of what is happening in JavaScript.

https://github.com/jashkenas/coffeescri … pile-to-js

("transpile" would be a more fitting word than "compile" here, BTW).
For those who have been busy with something else during the last year or two, one thing that happened is asm.js, which uses a subset of javascript to make it possible to run instructions which were compiled from another language (eg: C++). So you can write in C++ and have it compiled to JavaScript and run in the browser. Some folk(s?) even used that to port the Quake engine and have it run in the browser, using this JavaScript technique.


There also was a port of a linux kernel to javascript - running in your browser with a terminal and all.
In practice it needs some work - but surely less than rewriting everything in JavaScript :)

They are just some examples. Asm.js is just one option among many (supported by Firefox, but also compatible with other browsers). Chrome also have something they call NaCl (Native client) but I think it's Chrome only. The list in the link above is more exhaustive.


#2 February 2 2016


Re: Javascript Transpilers

Hey, I randomly came across this old post. A slight nitpick:

There also was a port of a linux kernel to javascript - running in your browser with a terminal and all.

Here are the only examples I've seen running linux in a browser:

And it's interesting to note that in both cases, it's not the linux kernel ported to javascript. Instead, it's the hardware virtualization layer that has been ported.
In other words, that's a hypervizor running in javascript and not Linux.

Other than that the post is spot on. W3C hasn't ruled out that JavaScript could become the universal compi/transpilation target.
We're still pretty far from something practical, but if this could help me run some Android apps on Firefox OS...


#3 February 3 2016


Re: Javascript Transpilers

This is making me realize i've been outside of the tech world buried under tons of work. Thanks rolf for the post.

Let me know once you do any real case implementation.


Board footer