Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Programming Language Composition (air.mozilla.org)
8 points by thristian on Aug 9, 2014 | hide | past | favorite | 1 comment


For people who don't have time to watch the entire talk, the highlights:

- An editor which allows near-arbitrary nesting of languages (for example, SQL in Python in HTML, then exporting the whole thing as Python code to generate a web-page from a database query)

- A "bridge" interpreter implemented in RPython that allows communication between the PyPy (Python) and HippyVM (PHP) runtimes.

- As an example, they had a 'hello world' script where "hello" was a global variable in PHP, "world" was a local variable in a Python function, and the string concatenation was done by a PHP lambda defined inside the Python function, and then invoked by Python. Note that PHP doesn't support dynamic scoping, so that was added by their glue code.

- The combined VM, after being processed by RPython into a tracing JIT, could process monolingual PHP code about as fast as HippyVM (still many times faster than ZEND PHP).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: