@@ -16,37 +16,39 @@ This installs the dialect _(very quickly!)_ and adds its command directory to
1616You can then run the command by name.
1717
1818``` bash
19- $ source <( curl -sL clojure .cc/get ) bb && which bb && bb --version
20- /tmp/clojure-cc-cmd /bin/bb
19+ $ source <( curl -sL in-1 .cc) bb && which bb && bb --version
20+ /tmp/in-1/local /bin/bb
2121babashka v1.13.219
2222```
2323
24- The [ ` get ` script] ( https://github.com/clojurestar/clojure-cc/blob/main/docs/get )
25- delegates installation to the
26- [ ` cmd.mk ` Makefile] ( https://github.com/clojurestar/clojure-cc/blob/main/docs/cmd.mk ) .
27- It uses [ Makes] ( https://github.com/makeplus/makes ) to auto-install both the
28- dialect * and* its host language (Java, Go, Python, PHP, etc.) into a local cache
29- directory.
24+ The command is [ in-1] ( https://in-1.cc ) , which uses
25+ [ Makes] ( https://github.com/makeplus/makes ) to auto-install both the dialect
26+ * and* its host language (Java, Go, Python, PHP, etc.) into a local directory.
3027Your system stays clean.
3128
32- By default, everything is installed under ` $TMPDIR/clojure-cc-cmd / ` (normally
33- ` /tmp/clojure-cc-cmd/ ` ). Set ` PREFIX ` to choose a different self-contained
34- location:
29+ By default, everything lives under ` $TMPDIR/in-1 / ` (normally ` /tmp/in-1/ ` ),
30+ with the commands in ` /tmp/in-1/local/bin/ ` .
31+ Set ` PREFIX ` to choose a different self-contained location:
3532
3633``` bash
37- $ source <( curl -sL clojure .cc/get ) jolt JOLT-VERSION=0.7.1 PREFIX=/tmp/foobar && which jolt && jolt --version
34+ $ source <( curl -sL in-1 .cc) jolt JOLT-VERSION=0.7.1 PREFIX=/tmp/foobar && which jolt && jolt --version
3835/tmp/foobar/bin/jolt
3936jolt v0.7.1
4037```
4138
4239This installs the public command as ` /tmp/foobar/bin/jolt ` and keeps the
43- versioned Jolt installation, Makes checkout, dependencies, and caches under
44- ` /tmp/foobar/share/ ` . If ` PREFIX ` ends in ` /bin ` or ` /bin/ ` , the launcher strips
45- that component and reports the adjusted prefix on standard error.
40+ versioned Jolt installation and its dependencies under
41+ ` /tmp/foobar/share/jolt/0.7.1/ ` .
42+
43+ You can ask for several dialects at once:
44+
45+ ``` bash
46+ source <( curl -sL in-1.cc) bb clj glj
47+ ```
4648
4749> ** Note:** For the Fish shell, use:
4850> ``` fish
49- > curl -sL clojure .cc/get | source - bb; and bb
51+ > curl -sL in-1 .cc | source - bb; and bb
5052> ```
5153
5254
@@ -58,26 +60,29 @@ program with it.
5860
5961| Name | Dialect | Host | REPL Command |
6062|:-----|:--------|:-----|---------|
61- | **`bb`** | [Babashka](https://book.babashka.org/) | GraalVM | **`source <(curl -sL clojure .cc/get ) bb && bb`** |
62- | **`clj`** | [Clojure](https://clojure.org/) | Java | **`source <(curl -sL clojure .cc/get ) clj && clj`** |
63- | **`cljgo`** | [cljgo](https://muthuishere.github.io/cljgo/) | Go | **`source <(curl -sL clojure .cc/get ) cljgo && cljgo repl`** |
64- | **`glj`** | [Glojure](https://github.com/glojurelang/glojure) | Go | **`source <(curl -sL clojure .cc/get ) glj && glj`** |
65- | **`gloat`** | [Gloat](https://gloathub.org/) | Go | **`source <(curl -sL clojure .cc/get ) gloat && gloat --repl`** |
66- | **`gobb`** | [Gobb](https://gobb.site/) | Go | **`source <(curl -sL clojure .cc/get ) gobb && gobb`** |
67- | **`hy`** | [Hy](https://hylang.org/) | Python | **`source <(curl -sL clojure .cc/get ) hy && hy`** |
68- | **`janet`** | [Janet](https://janet-lang.org/) | C | **`source <(curl -sL clojure .cc/get ) janet && janet`** |
69- | **`joker`** | [Joker](https://github.com/candid82/joker) | Go | **`source <(curl -sL clojure .cc/get ) joker && joker`** |
70- | **`jolt`** | [Jolt](https://github.com/jolt-lang/jolt) | Chez Scheme | **`source <(curl -sL clojure .cc/get ) jolt && jolt`** |
71- | **`lein`** | [Leiningen](https://leiningen.org/) | Java | **`source <(curl -sL clojure .cc/get ) lein && lein repl`** |
72- | **`lg`** | [let-go](https://github.com/nooga/let-go) | Go | **`source <(curl -sL clojure .cc/get ) lg && lg`** |
73- | **`phel`** | [Phel](https://phel-lang.org/) | PHP | **`source <(curl -sL clojure .cc/get ) phel && phel`** |
63+ | **`bb`** | [Babashka](https://book.babashka.org/) | GraalVM | **`source <(curl -sL in-1 .cc) bb && bb`** |
64+ | **`clj`** | [Clojure](https://clojure.org/) | Java | **`source <(curl -sL in-1 .cc) clj && clj`** |
65+ | **`cljgo`** | [cljgo](https://muthuishere.github.io/cljgo/) | Go | **`source <(curl -sL in-1 .cc) cljgo && cljgo repl`** |
66+ | **`glj`** | [Glojure](https://github.com/glojurelang/glojure) | Go | **`source <(curl -sL in-1 .cc) glj && glj`** |
67+ | **`gloat`** | [Gloat](https://gloathub.org/) | Go | **`source <(curl -sL in-1 .cc) gloat && gloat --repl`** |
68+ | **`gobb`** | [Gobb](https://gobb.site/) | Go | **`source <(curl -sL in-1 .cc) gobb && gobb`** |
69+ | **`hy`** | [Hy](https://hylang.org/) | Python | **`source <(curl -sL in-1 .cc) hy && hy`** |
70+ | **`janet`** | [Janet](https://janet-lang.org/) | C | **`source <(curl -sL in-1 .cc) janet && janet`** |
71+ | **`joker`** | [Joker](https://github.com/candid82/joker) | Go | **`source <(curl -sL in-1 .cc) joker && joker`** |
72+ | **`jolt`** | [Jolt](https://github.com/jolt-lang/jolt) | Chez Scheme | **`source <(curl -sL in-1 .cc) jolt && jolt`** |
73+ | **`lein`** | [Leiningen](https://leiningen.org/) | Java | **`source <(curl -sL in-1 .cc) lein && lein repl`** |
74+ | **`lg`** | [let-go](https://github.com/nooga/let-go) | Go | **`source <(curl -sL in-1 .cc) lg && lg`** |
75+ | **`phel`** | [Phel](https://phel-lang.org/) | PHP | **`source <(curl -sL in-1 .cc) phel && phel`** |
7476
7577Plus:
7678
7779| Command | Purpose |
7880|:--------|---------|
79- | **`make -f <(curl -sL clojure.cc/cmd.mk) shell`** | Start a shell with all of the above installed |
80- | **`make -f <(curl -sL clojure.cc/cmd.mk) help`** | Print the help text |
81+ | **`source <(curl -sL in-1.cc) -U bb`** | Update in-1 and Makes first, then install |
82+ | **`in-1 --local bb`** | Keep a dialect for good, under `~/.local` |
83+
84+ The second one needs the `in-1` command installed; see
85+ <https://in-1.cc/install/>.
8186
8287
8388## Gloat REPL Client
@@ -96,29 +101,29 @@ See <https://gloathub.org/doc/gloat-repl/> for full details.
96101
97102| Server | Command |
98103|:-------|:--------|
99- | Babashka | **`source <(curl -sL clojure .cc/get ) gloat && gloat --repl=+bb`** |
100- | Jolt | **`source <(curl -sL clojure .cc/get ) gloat && gloat --repl=+jolt`** |
101- | let-go | **`source <(curl -sL clojure .cc/get ) gloat && gloat --repl=+lg`** |
104+ | Babashka | **`source <(curl -sL in-1 .cc) gloat && gloat --repl=+bb`** |
105+ | Jolt | **`source <(curl -sL in-1 .cc) gloat && gloat --repl=+jolt`** |
106+ | let-go | **`source <(curl -sL in-1 .cc) gloat && gloat --repl=+lg`** |
102107
103108
104109## Examples
105110
106111Launch a Glojure REPL:
107112
108113```bash
109- source <(curl -sL clojure .cc/get ) glj && glj
114+ source <(curl -sL in-1 .cc) glj && glj
110115```
111116
112117Evaluate a let-go expression:
113118
114119``` bash
115- source <( curl -sL clojure .cc/get ) lg && lg ' (+ 1 2 3)'
120+ source <( curl -sL in-1 .cc) lg && lg -e ' (+ 1 2 3)'
116121```
117122
118123Pin a Babashka version:
119124
120125``` bash
121- source <( curl -sL clojure .cc/get ) bb BABASHKA-VERSION=1.12.218 &&
126+ source <( curl -sL in-1 .cc) bb BABASHKA-VERSION=1.12.218 &&
122127 bb -e ' babashka.fs/glob'
123128```
124129
@@ -128,7 +133,7 @@ Or simplify with a shell function:
128133ccc () {
129134 local dialect=$1
130135 shift
131- source <( curl -sL clojure .cc/get ) " $dialect " && " $dialect " " $@ "
136+ source <( curl -sL in-1 .cc) " $dialect " && " $dialect " " $@ "
132137}
133138
134139ccc clj
@@ -138,27 +143,31 @@ ccc bb -e '(+ 1 2 3)'
138143
139144## How it works
140145
141- The sourced launcher delegates to a small Makefile that :
146+ The sourced script is [ in-1 ] ( https://in-1.cc ) , which :
142147
143- 1 . Shallow-clones [ makeplus/makes ] ( https://github.com/makeplus/makes ) into
144- ` $PREFIX/share/ makes/ ` .
145- 2 . Loads the language-specific module for the requested dialect.
148+ 1 . Clones itself into ` /tmp/in-1/ ` and shallow-clones
149+ [ makeplus/ makes] ( https://github.com/makeplus/makes ) into it .
150+ 2 . Loads the Makes module for the requested dialect.
1461513 . Downloads the host language toolchain (Java, Go, Python...).
147- 4 . Downloads and installs the dialect.
148- 5 . Creates a command wrapper in ` $PREFIX/bin/ ` containing the complete runtime
149- environment.
152+ 4 . Downloads and installs the dialect under
153+ ` /tmp/in-1/local/share/<dialect>/<version>/ ` .
154+ 5 . Creates a command wrapper in ` /tmp/in-1/local/bin/ ` containing the
155+ complete runtime environment.
156+ Clojure and Leiningen keep their ` .clojure ` and ` .m2 ` directories inside
157+ the installation, and Jolt and Phel start their REPL under ` rlwrap ` when
158+ it is available.
159+ 6 . Adds the wrapper directory to ` PATH ` in your current shell.
150160
151- The ` get ` script adds the wrapper directory to ` PATH ` . The original Makefile
152- form prints the wrapper's absolute path without changing the calling shell's
153- environment. Everything lives under the selected prefix; remove that directory
154- manually when you no longer need the installation.
161+ Everything lives under the selected prefix; remove that directory manually
162+ when you no longer need the installation.
155163
156- See [ makeplus/makes] ( https://github.com/makeplus/makes ) for the
157- implementation details.
164+ See [ in-1] ( https://in-1.cc/doc/design/ ) and
165+ [ makeplus/makes] ( https://github.com/makeplus/makes ) for the implementation
166+ details.
158167
159168
160169## Want more dialects?
161170
162- The launcher currently ships with the dialects listed above.
171+ in-1 currently ships with the dialects listed above.
163172If you'd like to see another Clojure dialect supported here, please open an
164173issue on [ GitHub] ( https://github.com/clojurestar/clojure-cc/issues ) .
0 commit comments