Skip to content
题叶 edited this page Dec 2, 2013 · 3 revisions

Early attempts

Lispy

Ancestor of Cirru is Peter Norvig's little lispy interpreter, Cirru is not an real interpreter though. (How to Write a (Lisp) Interpreter (in Python)) There is a difference, lispy enbraces parentheses, while Cirru gets gid of most of them.

And videos of Intentional Programming by Charles Simonyi inspired me too.

Cirru Editor

Early ideas of Cirru can be traced to a Graphical editor I made in April 2012, which was inspired by @yinwang0

I named it Cirru, it was supposed to be a graphical editor that runs interpreter on JavaScript. That editor is still available for playing, in blue boxes.

I rewrote it once and made it clickable, but it appears quite bad:

She

Also I started small projects to add brackets to Scheme, making it an indentation-based language. Well, I gave up after some weeks.

Cirru Grammer

As I can see, brackets and symbols are for machines, while humans may hate those things. I was trying to make a graphical code editor based on Lisp-like AST tree. People will edit and debug code on top of GUI, and that would be cool. Later I found myself not experenced, that project failed, and I turned to one which is based on text and indentations.

By now Cirru is mainly a grammer based on indetations, $s, and ()s. Most of the code is implemeted in CoffeeScript, the central project is the cirru-parser.

Here's a small example(forget about the words..), notice that:

  • $ is from Haskell
  • ""s markup tokens but not strings
define a (read cd)
  if (> a cd)
    print "demo"
    print "not demo"

say $ print a
  save $ b
    x $ c 8

See the repo to find more:

Projects around Cirru, there are Syntax highlighting, interpreter, and others

I posted some screenshot on Ruby China, fortunately many people like it. And I wrote some of my intentions of V2EX.

The purpose of Cirru is mainly to help me learn things of computers. And I wish people are more interested in futuristic techniques that evolving programming languages quickly, and people use Cirru Grammer as their tools of building small languages.

Future plans

  • logo and fontface customized for Cirru
  • partialy reloading code environment, Smalltalk like coding environment
  • parser and VM in golang so I can play with more details
  • follow Bret Victor's ideas to expose internals of running code to developer
Clone this wiki locally