Skip to content

Commit 6bb5b3c

Browse files
committed
updates and corrections in content
1 parent 44923d3 commit 6bb5b3c

File tree

4 files changed

+65
-55
lines changed

4 files changed

+65
-55
lines changed

content/intro.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,56 @@ Calcit is an interpreter built with Rust, and also a JavaScript code emitter. It
33

44
## Install & Try
55

6-
You can [try Calcit WASM build online](http://repo.calcit-lang.org/calcit-wasm-play/) for simple snippets.
7-
8-
To install at local, build from source via `cargo install --path=./`. Ubuntu 20.04 binaries can be found on [bin.calcit-lang.org](http://bin.calcit-lang.org/linux/). Try command line:
6+
You can [try Calcit WASM build online](http://repo.calcit-lang.org/calcit-wasm-play/) for simple snippets. An also install Calcit locally with Cargo:
97

8+
```bash
9+
cargo install calcit
1010
```
11-
cr -e '
1211

13-
println "|a demo"
12+
Command line called `cr` is avaliable, which stands for "Calcit Runner". Eval snippets via:
13+
14+
```
15+
cr -e 'println "|a demo"'
16+
```
1417

18+
```
19+
cr -e '
1520
->
1621
range 100
1722
map $ fn (x)
1823
* x x
1924
foldl 0 &+
2025
println
26+
'
27+
```
2128

29+
```
30+
cr -e '
2231
println $ {}
2332
:a 100
2433
:b $ {}
2534
:c 200
2635
:d $ [] 1 2 3 4
27-
2836
'
2937
```
3038

31-
It's hot-swapping friendly when you use [calcit-editor](https://github.com/calcit-lang/editor). Install it and run `ct` to launch editor server, which writes `compact.cirru` and `.compact-inc.cirru` on saving. Try launching example by cloning [Calcit Workflow](https://github.com/calcit-lang/calcit-workflow).
39+
Ubuntu 20.04 binaries can be found on [bin.calcit-lang.org](http://bin.calcit-lang.org/linux/) for running in CI environments.
40+
41+
Read more in [Minimal Calcit](https://github.com/calcit-lang/minimal-calcit/blob/main/README.md) to learn how to code Calcit with a **plain text editor**. You will need another command `bundle_calcit` for bundling individual files.
3242

33-
Read more in [Minimal Calcit](https://github.com/calcit-lang/minimal-calcit/blob/main/README.md) to learn how to code Calcit with a **plain text editor**.
43+
It's hot-swapping friendly when you use [calcit-editor](https://github.com/calcit-lang/editor). Install it and run `ct` to launch editor server, which writes `compact.cirru` and `.compact-inc.cirru` on saving. Try launching example by cloning [Calcit Workflow](https://github.com/calcit-lang/calcit-workflow).
3444

3545
## Features
3646

3747
* Immutable Data
3848

39-
Values and states are represented in different data structures, which is the semantics from functional programming. Internally it's [im](https://crates.io/crates/im) in Rust and a custom [finger tree](https://github.com/calcit-lang/ternary-tree.ts) in JavaScript.
49+
Values and states are represented in different data structures, which is the semantics from functional programming. Internally it's [rpds](https://docs.rs/rpds/) in Rust and a custom [2-3 tree](https://github.com/calcit-lang/ternary-tree.ts) in JavaScript.
4050

4151
* Lisp(Code is Data)
4252

4353
Calcit-js was designed based on experiences from ClojureScript, with a bunch of builtin macros. It offers similar experiences to ClojureScript. So Calcit offers much power via macros, while keeping its core simple.
4454

45-
* Indentations
55+
* Indentations-based Syntax
4656

4757
With `bundle_calcit` command, Calcit code can be written as an indentation-based language. So you don't have to match parentheses like in Clojure. It also means now you need to handle indentations very carefully.
4858

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"dependencies": {
3-
"@calcit/procs": "^0.5.18-a1",
3+
"@calcit/procs": "^0.5.18",
44
"cirru-color": "^0.2.1-a1"
55
},
66
"devDependencies": {
77
"bottom-tip": "^0.1.3",
8-
"vite": "^2.8.4"
8+
"vite": "^2.8.5"
99
},
1010
"version": "0.0.1"
1111
}

yarn

Whitespace-only changes.

yarn.lock

Lines changed: 43 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)