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
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.
"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
These snippets are identical although folding in various ways:
set a (add (number 1) (numer 2))set a $ add (number 1) $ number 2set a $ add
number 1
number 2set a
add
number 1
number 2Also here's identical demos for , on unfolding:
print
+ 1 2
, 11print (+ 1 2) 11And multi-level indentations is OK for let syntax:
let
a 1
b 2
+ a blet ((a 1) (b 2)) (+ a b)Find more by exploring cirru-parser.
Workflow https://github.com/mvc-works/calcit-workflow
MIT