~ober/jerboa-gerbil
Imported from ~/mine/jerboa-gerbil
about
# jerboa-gerbil
Tooling to port [`jerboa-emacs`](https://git.sr.ht/~lisp) features to
[`gerbil-emacs`](https://git.cons.io/ober/), written in Gerbil Scheme.
The two editors are forks of one ancestor and share the same Gerbil surface
syntax, so porting a feature is mostly **renaming import module paths** and
pointing Jerboa's "chez-powers" stdlib surface at [`jerboa-compat`](../jerboa-compat).
## convert.ss
Rewrites a jerboa-emacs `.ss` source's imports to gerbil-emacs, textually
(comments/formatting preserved), and warns about residual `:jerboa-*` refs that
need a human:
```bash
gxi convert.ss INPUT.ss [-o OUTPUT.ss] # default: stdout
```
Rename rules (specific before generic):
| from | to |
|---|---|
| `:jerboa-emacs/chez-powers` | `:jerboa-compat/powers` |
| `:jerboa-emacs/atom` | `:jerboa-compat/atom` |
| `:jerboa-scintilla/…` | `:gerbil-scintilla/…` |
| `:jerboa-qt/…` | `:gerbil-qt/…` |
| `:jerboa-aws/…` | `:gerbil-aws/…` (no Gerbil lib yet — flagged) |
| `:jerboa-emacs/…` | `:gemacs/…` |
Library use: `(import :jerboa-gerbil/convert)` → `(convert-string text)` returns
`(values new-text report residual-count)`.
## Testing Gerbil from this session
`gerbil-mcp` can't be registered as an MCP server here (the jerboa-mcp loader
occupies that slot), so drive it over stdio with the bundled client:
```bash
cd ~/mine/gerbil-mcp
node gmcp.mjs list
node gmcp.mjs gerbil_compile_check '{"file_path":"…","loadpath":["/Users/user/mine"]}'
node gmcp.mjs gerbil_eval '{"imports":[":jerboa-compat/powers"],"loadpath":["/Users/user/mine"],"expression":"…"}'
```
It pins `GERBIL_MCP_GXI_PATH=/opt/gerbil/bin/gxi`.
## Status
Foundation complete: `jerboa-compat` (atom, lru-cache, stm, engine, powers) and
this converter, both built and tested on Gerbil. End-to-end proof in
`../proof-port`. Remaining: port the ~484 `cmd-*` features that exist in
jerboa-emacs but not gerbil-emacs (git/forge, org, editing, games, …).
recent commits
- Document local mine repository authority bfe25f4 Jaime Fournier
- docs: remove jerboa-emacs restriction 691269c Jaime Fournier
- Remove GitHub workflow metadata e909340 Jaime Fournier
- update AGENTS.md 88711f2 Jaime Fournier
- fix: segment source so import-path renames skip string literals and comments (#31) f08cd07 Jaime Fournier
- Build with JERBOA_NATIVE_FEATURES=tls (smaller, avoids OOM) aa9d3a0 Jaime Fournier
- Add 4GB swap + limit cargo to 1 job (avoid OOM on 2GB sr.ht VMs) 405f682 Jaime Fournier
- Install Rust before make jerboa (native-bundle needs cargo) 92162dc Jaime Fournier
- Disable X11 in Chez CI bootstrap (no libx11-dev available) 29da92f Jaime Fournier
- Add sr.ht CI bd46a86 Jaime Fournier