Cirru Sepal Project

JiyinYiyong
Cirru Project
Published in
2 min readJun 22, 2015

Here’s some details on my project compiling Cirru into AST or language VM that may be considered a solid backend of a language. So far I’m not skilled to start all the interesting exploration, so I’ll just note down my ideas that maybe there’re chances in the future. The whole project is called Cirru Sepal.

AST basd

A lot languages are parsed into AST before running or interpreting. So there’s a big chance I can transform Cirru AST into that and then run Cirru with them. So far I made prototypes for several of them:

  • JavaScript
  • Julia
  • Racket
  • Ruby
  • Elixir
  • MoonScript

Some of these languages use Lisp-like AST internally, and most of them manipulate AST in metaprogramming.

There’re also some languages I’m interested but may not be easy to be played with:

  • Go: its AST is typed and complicated
  • Nim: also typed, it operates on AST during compilation
  • Clojure: like Lisp but a lot different, no sure how AST is represented
  • Python: has AST but clumsy

Currently it’s fun to explore various kinds of languages.

Language VM based

By transforming to Julia, LLVM code is generated. By transforming to Elixir, BeamVM code is generated, which is also known as Erlang VM. The bad part is it’s always another language with features from that language.

Cirru needs to create its own language, and go beyond interpreting for performance issues. Probably I will do it years later. There are several features I want to explore with Cirru, like immutable data, streams, interfaces(like Go).

There are several language VMs I’m interested in:

  • LLVM
  • Parrot VM
  • LuaJIT
  • WebAssembly

But currently I know quite less about them.

Goal

It’s fun to explore kinds of languages and dreaming about create one on my own. Also I can show Cirru to people who are playing around with other languages and see what might be inspired.

Hopefully there’s some chance Cirru’s indentation-based syntax, its idea of programming on the AST, will interest others.

--

--