• Stars
    star
    215
  • Rank 178,060 (Top 4 %)
  • Language Cirru
  • License
    MIT License
  • Created almost 7 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Intuitive S-expressions editing for Clojure(Script).

Calcit Editor

Intuitive S-expressions editing for Clojure(Script).

  • Auto Layout: expressions in blocks and inline-blocks, styled with CSS
  • Tree Editing: intuitive way of structural editing as nested expressions
  • Call Stack Navigation: more fine-grained functions navigation
  • Collaboration: changes real-time synced among multiple clients via WebSockets

One function/definition in a screen, Command d to open called function at next tab, Command j Command k Command i to switch:

Expression editor

Based on DOM/CSS, easy for another theme:

Styling

Command p to search and jump inspired by Sublime Text :

Search panel

Browse namespaces and functions/variables:

Definitions browser

Usages

npm CLI of calcit-editor

Install CLI and start a local WebSocket server, it uses calcit.cirru as a snapshot file:

npm i -g calcit-editor
calcit-editor

UI of the editor is a webapp on http://calcit-editor.cirru.org/?port=6001

You may try with my project templates:

or even clone current repo for trying out.

Don't forget to check out keyboard shortcuts. My old introduction videos can be found on YouTube.

Options

CLI variables for compiling code directly from calcit.cirru:

op=compile calcit-editor

The web UI takes several query options:

http://calcit-editor.cirru.org/?host=localhost&port=6001
  • port, defaults to 6001
  • host, defaults to localhost, connects via WebSocket

By default, ClojureScript code is emitted in src/ by pressing Command s. When server is stopped with Control c, calcit.cirru is also updated.

There are also several options in :configs field in calcit.cirru:

  • port, defaults to 6001
  • output, defaults to src/
  • extension, defaults to .cljs

Editor UI is decoupled with WebSocket server, so it's okay to connect remote server from multiple pages with all expressions synced in real-time.

Also there's a local version of web editor to enable:

ui=local calcit-editor
# serving UI at http://localhost:6101

Compact output

It's now also splitted into https://github.com/calcit-lang/editor .

compact=true caclcit-editor

When :compact-output? true is specified in calcit.cirru, "Compact Mode" is activated. Clojure(Script) will no longer be emitted, instead two files will be emitted:

  • compact.cirru contains a compact version of data tree of the program.
  • .compact-inc.cirru contains diff information from latest modification of per definition.

It's not useful for Clojure but would can be used for other experiments in calcit-runner.

Workflow

Based on https://github.com/Cumulo/cumulo-workflow

License

MIT

More Repositories

1

stack-editor

[Deprecated, prefer calcit-editor]
Cirru
93
star
2

cirru-script

[Deprecated, prefer calcit-lang/calcit] Generated JavaScript from Cirru Syntax
CoffeeScript
54
star
3

parser.coffee

Parser of indentation grammar
CoffeeScript
41
star
4

respo-cirru-editor.cljs

Reimplement Cirru Editor in Respo.
Cirru
34
star
5

cirru-script-editor

[Deprecated] using respo-cirru-editor instead
Cirru
31
star
6

sepal.clj

Generate Clojure syntax from vectors
Cirru
28
star
7

jiuzhang-lang

九章编程
Cirru
23
star
8

hovenia-editor

Canvas based syntax tree editor
Cirru
20
star
9

text.cirru.org

Old home page for Cirru Project
Cirru
18
star
10

cirru-light-editor

Small editor wrapped on cirru-editor
CoffeeScript
13
star
11

cirru-html

[Deprecated, prefer Calcit] Convert Cirru to HTML
CoffeeScript
10
star
12

clouditor

An experiment of functions
Clojure
8
star
13

scirpus

Simple Lisp-like language that compiles to JavaScrip but with less brackets
Cirru
8
star
14

parser-combinators

Simple Parser Combinators solution in Clojure
Cirru
6
star
15

parser.go

Cirru parser in Go
Go
6
star
16

vertical-coding

Stupid prototyping for coding vertically
CoffeeScript
6
star
17

parser.rb

Cirru Parser in Ruby
Ruby
5
star
18

cirru-interpreter

Run Cirru in Node
CoffeeScript
5
star
19

goose

[Deprecated] Goose is a commend adds brackets for golang!
JavaScript
5
star
20

parser.clj

Cirru Parser in Clojure
Cirru
5
star
21

cirru-table

A prototype of Cirru's debugging
JavaScript
4
star
22

parser-combinator.clj

Cirru Parser learning from Parser Combinator.
Clojure
3
star
23

script.cirru.org

[Deprecated, prefer Calcit] An introduction to CirruScript
Cirru
3
star
24

cirru-json

Converter between Cirru and JSON.
CoffeeScript
3
star
25

stack-server

[Deprecated] use sepal.clj instead
Clojure
3
star
26

cirru-edn.rs

Cirru EDN implemented in Rust
Rust
3
star
27

cirru-script-loader

CirruScript Webpack loader
JavaScript
2
star
28

codemirror-cirru

Cirru mode for CodeMorror
CoffeeScript
2
star
29

parser.ts

Cirru parser in TypeScript
TypeScript
2
star
30

parser.purs

Parser for PureScript wraps parser.ts
PureScript
2
star
31

minifier.clj

Cirru code Minifer
Clojure
2
star
32

cirruparser-rkt

Cirru Parser in Racket
Racket
2
star
33

cirru-shell

Simple demo of Cirru Shell
CoffeeScript
2
star
34

parser.rs

Cirru Parser migrated to Rust
Rust
2
star
35

interpreter.go

Run Cirru in Go
Go
2
star
36

boot-cirru-sepal

[Deprecated] switching to stack-server
Clojure
2
star
37

CirruSepal.jl

Transform Cirru into Julia AST
Julia
2
star
38

vim-cirru

Cirru Syntax in Vim
Vim Script
1
star
39

unfolding-editor

Just a demo showing that Cirru folds code easily
Cirru
1
star
40

tree-updater

Core component for Cirru Editors
Cirru
1
star
41

CirruParser.jl

Cirru Parser in Julia
Julia
1
star
42

sublime-cirru

Sublime Text Syntax hightlight for Cirru
1
star
43

vectors-format

Subset of EDN to store Cirru source code
CoffeeScript
1
star
44

clir

[Deprecated]
Cirru
1
star
45

writer.clj

Format Cirru code with Clojure
Cirru
1
star
46

she

Add brackets for Scheme use CoffeeScript
JavaScript
1
star
47

cirrusepal-rkt

Try Racket in Cirru syntax
Racket
1
star
48

sepal-repl.clj

Simple REPL for Sepal.clj
Cirru
1
star
49

cirru-rainbow

Cirru syntax highlight in Rainbow
HTML
1
star
50

parser.nim

Cirru parser in Nim
Nim
1
star
51

flavored-edn

An EDN formatter for Cirru project.
Cirru
1
star
52

gulp-cirru-script

Gulp plugin of CirruScript
Cirru
1
star
53

cirru-edn.nim

Load Cirru EDN in Nim
Nim
1
star
54

respo-cirru-editor

Cirru Editor in calcit-js Respo
Cirru
1
star
55

cirru-edn

Parser/Writer for EDN data
Cirru
1
star
56

sexpr-wasm-json

WebAssembly S-Expression JSON kits
Cirru
1
star
57

cirru-from-html

Conver HTML to Cirru Grammar
CoffeeScript
1
star
58

code_blocks

handle nested lists with browser
CoffeeScript
1
star
59

parser.moon

Cirru Parser in MoonScript
Lua
1
star
60

writer.ts

Cirru Writer in TypeScript
TypeScript
1
star
61

writer.nim

Cirru writer in Nim
Nim
1
star
62

sepal

(Failed) comple Cirru to LLVM IR
Cirru
1
star
63

cirru-writer

Convert JSON representation to Cirru code
Cirru
1
star
64

lein-cirru-sepal

Leiningen pluin for compiling Cirru Sepal into Clojure
Clojure
1
star
65

script-console

Run CirruScirpt in Devtools
Cirru
1
star
66

language-cirru

Atom package for Cirru highlighting
CoffeeScript
1
star
67

brackets-cirru

Cirru Syntax Package for Brackets
JavaScript
1
star
68

cirru-candy-box

A colored redesign of Cirru Shell and something like that
CoffeeScript
1
star
69

vscode-cirru

Cirru text syntax highlight for VSCode
1
star