Commit6192fd62Recorded31 Mar 2026Repositorysigil-web-repl

Rename playground references to web-repl

Message

Rename module from (sigil playground) to (sigil web-repl), rename exported functions playground-start/playground-version to repl-start/repl-version, update build output names from sigil-playground to sigil-web-repl, and clean up descriptions throughout README and package.sgl.

Changed
 README.md                                  |  8 ++++----
 assets/index.html                          |  2 +-
 package.sgl                                | 14 +++++++-------
 src/main.sgl                               |  6 +++---
 src/sigil/{playground.sgl => web-repl.sgl} | 20 ++++++++++----------
 5 files changed, 25 insertions(+), 25 deletions(-)
Diff
README.mdmodified
@@ -1,12 +1,12 @@
1
# sigil-web-repl
2
3
A web-based REPL and playground for trying [Sigil](https://codeberg.org/sigil/sigil) in the browser. Uses `sigil-web-run` as the WebAssembly runtime and delimited continuations for interactive input/output between JavaScript and Sigil.
+3
A web-based REPL for trying [Sigil](https://codeberg.org/sigil/sigil) in the browser. Uses `sigil-web-run` as the WebAssembly runtime and delimited continuations for interactive input/output between JavaScript and Sigil.
4
5
## How it works
6
7
The playground runs a Sigil REPL compiled to WebAssembly via Emscripten. It uses delimited continuations (prompts) to yield control back to JavaScript when waiting for user input:
+7
The REPL runs Sigil compiled to WebAssembly via Emscripten. It uses delimited continuations (prompts) to yield control back to JavaScript when waiting for user input:
8
9
1. `playground-start` begins the REPL and yields waiting for input
+9
1. `repl-start` begins the REPL and yields waiting for input
10
2. JavaScript collects input from the user
11
3. JavaScript calls back into WASM with `web-input-resume`
12
4. The saved continuation is invoked with the input
@@ -45,7 +45,7 @@ Or run the build directly:
45
./scripts/emsdk-shell sigil build --redirects dev-redirects.sgl
46
```
47
48
This compiles the Sigil modules, links them into a web application (`sigil-playground.js` and `sigil-playground.wasm`), and copies the HTML assets to the output directory.
+48
This compiles the Sigil modules, links them into a web application (`sigil-web-repl.js` and `sigil-web-repl.wasm`), and copies the HTML assets to the output directory.
49
50
## Usage
51
assets/index.htmlmodified
@@ -1216,6 +1216,6 @@
1216
}
1217
});
1218
</script>
1219
<script async src="sigil-playground.js"></script>
+1219
<script async src="sigil-web-repl.js"></script>
1220
</body>
1221
</html>
package.sglmodified
@@ -1,4 +1,4 @@
1
;;; sigil-web-repl - Interactive Sigil playground for the web
+1
;;; sigil-web-repl - Interactive Sigil REPL for the web
2
;;;
3
;;; A web-based REPL and code editor for trying Sigil in the browser.
4
;;; Uses sigil-web-run as the runtime and delimited continuations for
@@ -9,11 +9,11 @@
9
(package
10
name: "sigil-web-repl"
11
version: "0.7.0"
12
description: "Interactive Sigil web REPL and playground"
+12
description: "Interactive Sigil web REPL"
13
url: "https://codeberg.org/sigil/sigil-web-repl"
14
license: "BSD-3-Clause"
15
authors: (list "David Wilson <[email protected]>")
16
entry: "(sigil playground)"
+16
entry: "(sigil web-repl)"
17
18
configs: (list
19
(config
@@ -40,17 +40,17 @@
40
tasks: (list
41
(task
42
name: 'build
43
description: "Build the playground web application"
+43
description: "Build the web REPL application"
44
steps: (list
45
;; Compile Sigil modules (the playground's own code)
+45
;; Compile Sigil modules
46
(compile-sigil-modules
47
sources: "src/**/*.sgl")
48
49
;; Link the web application
50
;; This creates sigil-playground.js and sigil-playground.wasm
+50
;; This creates sigil-web-repl.js and sigil-web-repl.wasm
51
;; with all modules embedded
52
(link-web-application
53
name: "sigil-playground")
+53
name: "sigil-web-repl")
54
55
;; Copy assets (index.html, etc.) to output directory
56
(copy-assets
src/main.sglmodified
@@ -1,9 +1,9 @@
1
;;; Sigil Playground - Main entrypoint
+1
;;; Sigil Web REPL - Main entrypoint
2
;;;
3
;;; This is loaded by sigil-web-run at startup.
4
;;; It imports and starts the web REPL.
5
6
(import (sigil playground))
+6
(import (sigil web-repl))
7
8
;; Start the REPL - this will yield waiting for input
9
(playground-start)
+9
(repl-start)
src/sigil/playground.sgl → src/sigil/web-repl.sglrenamed
@@ -1,29 +1,29 @@
1
;;; (sigil playground) - Web playground REPL
+1
;;; (sigil web-repl) - Web REPL
2
;;;
3
;;; Provides an interactive REPL that yields to JavaScript for input.
4
;;; Uses delimited continuations for the yield/resume pattern.
5
;;;
6
;;; The flow is:
7
;;; 1. playground-start begins the REPL and yields waiting for input
+7
;;; 1. repl-start begins the REPL and yields waiting for input
8
;;; 2. JavaScript collects input from the user
9
;;; 3. JavaScript calls C, which calls (web-input-resume input)
10
;;; 4. The continuation is invoked with the input
11
;;; 5. REPL continues from where it left off
12
13
(define-library (sigil playground)
+13
(define-library (sigil web-repl)
14
(import (sigil io)
15
(sigil ansi)
16
(sigil string)
17
(sigil meta)
18
(sigil repl commands))
19
(export main
20
playground-start
21
playground-version
+20
repl-start
+21
repl-version
22
web-input-resume)
23
24
(begin
25
;; Use the version baked into the binary via SIGIL_VERSION
26
(define playground-version (sigil-version))
+26
(define repl-version (sigil-version))
27
28
;; The prompt tag used for yielding to JavaScript for input
29
(define web-input-prompt-tag (make-prompt-tag))
@@ -173,9 +173,9 @@
173
(newline))))
174
(repl-loop ""))))))))
175
176
;; Start the playground REPL - returns 'waiting-for-input or 'exit
177
(define (playground-start)
178
(display (format "~a ~a - Practical Symbolic Power\n" (a:yellow "sigil") playground-version))
+176
;; Start the web REPL - returns 'waiting-for-input or 'exit
+177
(define (repl-start)
+178
(display (format "~a ~a - Practical Symbolic Power\n" (a:yellow "sigil") repl-version))
179
(display "Type ,help for commands or ,exit to quit.\n\n")
180
181
;; Set up the prompt handler that captures continuations
@@ -212,4 +212,4 @@
212
213
;; Entry point for web runtime
214
(define (main)
215
(playground-start))))
+215
(repl-start))))