@calcit/procs 0.5.8 → 0.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -13
- package/docs/symbol-spec.md +15 -0
- package/lib/calcit.procs.js +1 -1
- package/lib/js-list.js +3 -0
- package/package.json +4 -4
- package/ts-src/calcit.procs.ts +1 -1
- package/ts-src/js-list.ts +3 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
### Calcit Scripting Language
|
|
2
2
|
|
|
3
|
-
> Lisp compiling to JavaScript ES Modules. (Similar to ClojureScript, but in very different syntax.)
|
|
3
|
+
> Lisp compiling to JavaScript ES Modules. Runs in Rust(Similar to ClojureScript, but in very different syntax.).
|
|
4
4
|
|
|
5
5
|
- Home http://calcit-lang.org/
|
|
6
6
|
- API Doc(heavily influenced by ClojureScript) http://apis.calcit-lang.org/
|
|
@@ -27,17 +27,7 @@ For Ubuntu 20.04, try binaries from http://bin.calcit-lang.org/linux/ , which ar
|
|
|
27
27
|
|
|
28
28
|
### Usage
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
cr compact.cirru --1 # run only once
|
|
34
|
-
|
|
35
|
-
cr compact.cirru # watch mode enabled by default
|
|
36
|
-
|
|
37
|
-
cr compact.cirru --init-fn='app.main/main!' # specifying init-fn
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Inline evaling:
|
|
30
|
+
Snippets evaling:
|
|
41
31
|
|
|
42
32
|
```bash
|
|
43
33
|
cr -e 'range 100'
|
|
@@ -56,6 +46,16 @@ println "|a demo"
|
|
|
56
46
|
'
|
|
57
47
|
```
|
|
58
48
|
|
|
49
|
+
Run with a [compact.cirru](https://github.com/calcit-lang/lilac/blob/master/compact.cirru):
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
cr compact.cirru --1 # run only once
|
|
53
|
+
|
|
54
|
+
cr compact.cirru # watch mode enabled by default
|
|
55
|
+
|
|
56
|
+
cr compact.cirru --init-fn='app.main/main!' # specifying init-fn
|
|
57
|
+
```
|
|
58
|
+
|
|
59
59
|
Emitting code:
|
|
60
60
|
|
|
61
61
|
```bash
|
|
@@ -68,7 +68,7 @@ cr compact.cirru --emit-ir # compiles intermediate representation into program-i
|
|
|
68
68
|
### Calcit Editor & Bundler
|
|
69
69
|
|
|
70
70
|
Install [Calcit Editor](https://github.com/calcit-lang/editor) and run `ct` to launch editor server,
|
|
71
|
-
which writes `compact.cirru` and `.compact-inc.cirru` on saving. Try launching example by
|
|
71
|
+
which writes `compact.cirru` and `.compact-inc.cirru` on saving. Try launching example by cloning [Calcit Workflow](https://github.com/calcit-lang/calcit-workflow).
|
|
72
72
|
|
|
73
73
|
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.
|
|
74
74
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
> some notes about evaluating symbols
|
|
2
|
+
|
|
3
|
+
There several kinds of symbols:
|
|
4
|
+
|
|
5
|
+
- raw syntax symbols, `&` `?` `~` `~@`...
|
|
6
|
+
- data symbol, probably created via `turn-symbol`
|
|
7
|
+
- local variables
|
|
8
|
+
- local definitions
|
|
9
|
+
- imported variables
|
|
10
|
+
- namespaced imported symbols
|
|
11
|
+
- imported default variables
|
|
12
|
+
- imported host variables
|
|
13
|
+
|
|
14
|
+
Currently they are share the structure `Calcit::Symbol{..}`, which is buggy
|
|
15
|
+
and requires refactor in future.
|
package/lib/calcit.procs.js
CHANGED
package/lib/js-list.js
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@calcit/procs",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.13",
|
|
4
4
|
"main": "./lib/calcit.procs.js",
|
|
5
5
|
"devDependencies": {
|
|
6
|
-
"@types/node": "^16.11.
|
|
7
|
-
"esbuild": "^0.
|
|
8
|
-
"typescript": "^4.
|
|
6
|
+
"@types/node": "^16.11.11",
|
|
7
|
+
"esbuild": "^0.14.2",
|
|
8
|
+
"typescript": "^4.5.2"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"compile": "rm -rfv lib/* && tsc",
|
package/ts-src/calcit.procs.ts
CHANGED