Share !

I'm Tav, a 29yr old from London. I enjoy working on large-scale social, economic and technological systems.

Follow
Contact
Anyone Interested in Articles on Using PyPy to Create New Languages?

PyPy is famous as an alternative Python implementation. But it is also an impressive toolchain for creating your own programming languages — you get features like garbage collection, JIT and even WebKit integration for free.

Unfortunately, despite the toolchain being the bulk of the PyPy code, it's not given much love. So, in an effort to convince fellow hackers to use PyPy, I'll be giving a talk at the Emerging Languages Camp at OSCON — see below for the abstract.

I'd also like to help bring more understanding of the toolchain to the wider hacker world and am considering writing a series of tutorials on this blog. Unfortunately, I'm also a lazy bastard and don't want to waste time if no-one is interested ;p

So this is your chance — let me know in either the comments below or on HN/Reddit, if you'd be interested in such blog posts. Thanks!



Create Your Own Programming Language in 20 Minutes using PyPy

Creating your own dynamic language can be a messy, painful affair. Instead of focusing on the features that make your language unique, you have to waste a lot of time dealing with secondary issues like cross-platform support, garbage collection and just-in-time compilation.

The PyPy Translation Toolchain — which has already been successfully used to build alternative Python and Scheme interpreters — can save you from all of this hassle. This talk will show how easy it can be to create your own language by taking advantage of the benefits that PyPy offers:

  • JIT — thanks to the state-of-the-art just-in-time compilation, your language could be dynamic and still be competitive with lower-level languages in terms of speed.
  • Garbage collection — select from the half dozen already implemented and tested strategies for use by your language.
  • Sandboxing capability — secure your interpreter so that untrusted code can be safely run on all platforms, whether it be a browser or an App Engine like service.
  • Unicode — your language can be fully unicode-aware and you don't even have to know how case folding works in different locales.
  • Stackless transformation — easily add support for your language to be massively concurrent.
  • Cross-platform — have your interpreter run on a number of different backends, whether it be native or on top of the CLI (.NET/Mono) or the JVM (Java).
  • WebKit bridge — create browsers which can natively load scripts in your language via script tags and even access the DOM, just like JavaScript!