How To Create Your Own Programming Language (Using Ruby and/or Java)

By Peter Cooper / September 19, 2009

Create Your Own Programming Language is a interesting new information product and community by Marc-André Cournoyer (of Thin fame) that promises to teach you how to create a simple programming language. The official site is well worth checking out, even if you don’t want to buy it, as it’s a great example of how to sell a product like this. Create Your Own Programming Language costs $39.99 and has a two month money back guarantee.

What You Get – 2 Different Approaches

The package includes a 53 page PDF (only 44 pages in the earlier copy I received), a pile of source code (for two different types of bootstrapped languages), and a screencast, along with access to a community of other users. Out of the box, you can create your own “programming language” (of sorts) with a single shell script.

Two different types of approach are provided. The first is a pure Ruby lexer, parser, and interpreter that lets you build your programming language using mostly Ruby. This is what the PDF covers. The second is a JVM (Java Virtual Machine) based language that provides a bootstrap and execution environment upon which you can build a higher performance language; this is what the screencast covers. In both cases, the default languages are ultra-bare Ruby variants of sorts.

Quick Results Rather Than Detail

The PDF is short but well produced. It leads you through building a new Ruby-like language called “Awesome” upon the Ruby powered lexer, parser, and interpreter supplied in the package. It lacks detail but covers the broad concepts well with a focus on quick results rather than detail or inane computer science.

Likewise, the screencast video isn’t a “everything from start to finish” production in the PeepCode manner. It’s only 11 minutes long and moves incredibly quickly. The screencast covers adding a “while” construct to the JVM-backed language, as well as a “substring” string method and “eval”. The video is good to get a “high level” view of what’s involved (and is probably worth watching before opening the book, just to get a feel) but to get the most out of it you need to be either familiar with the terminology and concepts being covered (partially covered in the PDF) or ready to hit the pause button a lot.

It Whets The Appetite; Great For Dabblers

Create Your Own Programming Language is suitably titled but potentially misleading, since although it does let you create your “own” programming language, the resulting language is within a small gamut of what could be considered to be a “programming language.” No, CYOPL isn’t going to meet lofty technical expectations but it provides a great way to dip your toes into the waters of creating a language, and I wouldn’t hesitate to recommend it to those who want to have a dabble and learn a few things.



Leave a Reply