Overview
What is Cirru?
Cirru's Logo
Parser
Parser in CoffeeScript
Parser in TypeScript
Parser in Nim
Parser in Go
Parser in Clojure
Parser Combinator in Clojure
Parser in Elixir
Parser in Haskell
Parser in Racket
Parser in Ruby
Parser in Julia
Parser in MoonScript
Parser in Python
CirruScript
CirruScirpt Home
CirruScript: emit JavaScript from Cirru
Gulp plugin of CirruScript
CirruScript Webpack loader
CirruScript Liftoff support
CirruScript Chrome Extension
Write JavaScript AST with Cirru
Cirru for WebAssembly
Cirru WASM AST(Staled)
Cirru WASM AST CLI(Staled)
Cirru WASM S-Expression JSON(Staled)
Cirru HTML
HTML templating in Cirru
Cirru HTML compiled to JavaScript
Convert HTML to Cirru Grammar
Gulp plugin for converting Cirru HTML
Convert Cirru to Mustache
Sepal (Cirru to AST or IR)
(Failed) Cirru to LLVM IR
Sepal in Clojure
Lein plugin for Sepal in Clojure
Sepal in Elixir
Sepal in Racket
Sepal in Ruby
Sepal in Julia
Sepal in MoonScript
Sepal in Python
Clir: compiles to C
Formatter
Convert JSON to Cirru
EDN data in Cirru format
Cirru writer in ClojureScript
Read Cirru as JSON and write into file
JSON loader written in Go
Cirru Writer written in Go
Cirru Minifier in Clojure
Cirru Diff/Patch in a tree
Evaluator
Evaluator in Nim
Evaluator in Go
Evaluator in CoffeeScript
Cirru Shell
Cirru Table: concept of debugging
(Failed) Table Redo: live coding
Cirru Candy Box: show values in scope
Toy project of mimicing Ancient Chinese programming.
Editor Support
Sublime Text Package
Cirru Editor (module)
Cirru Light Editor
Brackets Package
CodeMirror support
Ace Editor support
Atom Editor support
Vim support
Highlighting
Rainbow Plugin
Highlight.js fork with Cirru syntax
Pygments fork with Cirru syntax
Custom-made Syntax Highlighting
Concept
Demo of folding Cirru code
Vertical coding
Fractal editor
Rendered with: Cirru/text.cirru.org

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.

Workflow

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

License

MIT