A

Alon Zakai

syntensity.com · Personal blog · on HN since 2010

Alon Zakai, creator of Emscripten, writes about compiling C and C++ projects to JavaScript, including Python, eSpeak, and a game engine.

What HN saysHN links it for working demos of Emscripten, such as CPython running in the browser and eSpeak text-to-speech compiled to JavaScript.
18HN people shared it
12linked it in comments
7stories submitted
173story points
14 years agolast shared
2010people per year2026

Most-shared posts

  1. 1
    CPython to LLVM to Javascript - Python in the browser
    8 people · 73 points · first shared 2010 · 15 comments on HN
  2. 2
    Text-To-Speech engine in JS using eSpeak
    6 people · 34 points · first shared 2011 · 17 comments on HN
  3. 3
    SQL.js: SQLite in JavaScript
    2 people · 8 points · first shared 2012 · discussion on HN
  4. 4
  5. 5
    Client 6
    1 people · first shared 2012
  6. 6
    Raytrace
    1 people · first shared 2012
  7. 7
    Homepage
    1 people · first shared 2010
  8. 8
    Bullet
    1 people · first shared 2011
  9. 9
    Python.js
    1 people · first shared 2011
  10. 10
    Client
    1 people · first shared 2012
  11. 11
    Intensityengine
    1 people · first shared 2010

What HN people wrote when they linked it

azakai · 2012-05-13
> An interesting post on the state of the port of Sauerbraten to WebGL (from C++/OpenGL) by Alon Zakai — no new demos, but worth reading if you’re interested in what you can do with Emscripten. There is a new demo there since last week, http://www.syntensity.com/static/bb/client_6.html is the latest (includes models with bumpmapping, FPS arms, some other stuff).
pufuwozu · 2010-08-30
It looks like this project is part of a goal similar to that. According to a blog post, Emscripten is an attempt to port a 3D game engine to the web: http://syntensity.blogspot.com/2010/08/emscripten.html The game engine's website is here: http://www.syntensity.com/ Hopefully this experiment works out - both of these projects looks very interesting!
pcwalton · 2013-01-29
NaCl is not needed for that. Embedding CPython into the browser has been done for some time now with Emscripten. Here's a demo: http://syntensity.com/static/python.html This has the advantage over NaCl that it works in all browsers, not just Chrome. It's also portable.
zever · 2012-12-15
Just for reference, there's an example of CPython compiled to JavaScript using Emscripten running in the browser at http://syntensity.com/static/python.html
po84 · 2012-11-11
http://syntensity.com/static/espeak.html If you're looking for a client side solution, here's espeak compiled to JS using emscripten.
rorrr · 2012-07-04
Here are the actual links instead of the shitty blog spam: Demo: http://syntensity.com/static/espeak.html Code: https://github.com/kripken/speak.js
albertzeyer · 2012-06-01
There isn't really so much functionality added over the grounded work http://syntensity.com/static/espeak.html , is there? (Except some nicer web interface.)
pornel · 2012-03-15
We do have that VM. It just happens that this VM's "bytecode" looks like JavaScript. Here is Python running in the browser: http://syntensity.com/static/python.html
megrimlock · 2011-01-25
It's kind of fascinating to peruse the generated js, if you are at all familiar with the CPython code: http://syntensity.com/static/python.js Also geeky fun to try to recognize what constants like 4294967295 correspond to -- it's all over the place! And lots of literal char* strings encoded as integer sequences: >>> s = [111,98,106,101,99,116,46,95,95,102,111,114,109,97,116,95,95,32,119,105,116,104,32,97,32,110,111,110,45,101,109,112,116,121,32,102,111,114,109,97,116,32,115,116,114,105,110,103,32,105,115,32,100,101,112,114,101,99,97,116,101,100,0] >>> ''.join(map(chr,s)) 'object.__format__ with a non-empty format string is deprecated\x00'
stephenjudkins · 2011-06-18
I think JavaScript will stick around for quite awhile. However, the viability and popularity of languages that compile to JavaScript will probably continue to increase. Besides CoffeeScript, which mostly only offers syntactic improvements to JavaScript, there are several projects which compile very different languages to JS, including: * Emscripten (http://emscripten.org/) compiles arbitrary LLVM bitcode to JavaScript. Since clang and GCC can both target LLVM, a whole lot can be compiled to JavaScript. The Python interpreter (http://syntensity.com/static/python.html) and the Bullet physics engine (http://www.syntensity.com/static/bullet.html) are both particularly impressive. * Google Web Toolkit (http://code.google.com/webtoolkit/) compiles Java to JavaScript. It's used in many real projects. Scala+GWT (http://scalagwt.gogoego.com/) aims to use this toolchain to compile Scala code, though it's not yet production-ready. * The reductio ad absurdum of this approach is http://bellard.org/jslinux/, a x86 PC emulator written in JavaScript. You can run almost any language in the web browser with that! See https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that… for a (possibly exhaustive) list of languages like this. Whether these approaches can deliver passable performance for legacy browsers is an open question. However, for newer browsers it's safe to assume this general approach holds a lot of promise.

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close