Old home page for Cirru Project
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
html
src
style
.gitignore
README.md
gulpfile.cirru
package.json
template.cirru
webpack.config.cirru
webpack.min.cirru

README.md

Cirru.org

IPA: /ˈsɪɹə/

Writing code in syntax tree

Why Cirru?

Cirru Project helps people code in syntax tree. It offers a tree editor and a text syntax.

Cirru prefers indentations. Symbols simplify parsing, indentations improves readability.

What is Cirru?

"Cirru" came from cirrus cloud, and reads like cirrus(but without s).

The core of Cirru's text form is a indentation-based syntax:

  • prefix syntax, see Lisp
  • () to create expressions inside each line
  • indentation with 2 spaces
  • represent token with optional "" and \, see Bash
  • $ as a function to fold code, see Haskell
  • , as a function to unfold code, see CoffeeScript

Cirru adopted Lisp's notions to keep minimalistic:

  • Syntax represents AST
  • Code is data

Examples

These snippets are identical although folding in various ways:

set a (add (number 1) (numer 2))
set a $ add (number 1) $ number 2
set a $ add
  number 1
  number 2
set a
  add
    number 1
    number 2

Also here's identical demos for , on unfolding:

print
  + 1 2
  , 11
print (+ 1 2) 11

And multi-level indentations is OK for let syntax:

let
    a 1
    b 2
  + a b
let ((a 1) (b 2)) (+ a b)

Find more by exploring cirru-parser.