text.cirru.org icon indicating copy to clipboard operation
text.cirru.org copied to clipboard

Old home page for Cirru Project

Cirru.org

IPA: /ˈsɪɹə/

Writing code in syntax tree

  • Home page http://cirru.org
  • GitHub https://github.com/Cirru
  • Twitter https://twitter.com/cirrulang
  • Medium https://medium.com/cirru-project
  • SegmentFault http://segmentfault.com/t/cirru/blogs
  • Gitter https://gitter.im/Cirru/cirru.org

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.

Workflow

Workflow https://github.com/mvc-works/calcit-workflow

License

MIT