Last active
October 6, 2023 20:10
-
-
Save drewc/5f260537b7914a2b999c8a539fb48098 to your computer and use it in GitHub Desktop.
gerbil-swank for wiki?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
━━━━━━━━━━━━━━━━━━━━━━━━━ | |
I LOVE A SLIME'Y SWANK! | |
Drew Crampsie | |
━━━━━━━━━━━━━━━━━━━━━━━━━ | |
Table of Contents | |
───────────────── | |
1 Installing the gxpkg package | |
2 Running the listener | |
3 Connecting and REPL'ing from emacs | |
I'd been using Common Lisp, full-time, since 2004. The user interfaces | |
to CL implementations, on the free and multi-platform side, were almost | |
all emacs related. Due to ILISP and then SLIME, Emacs ended up becoming | |
my primary editor, as it has for many, due only to lisp interaction. | |
So, like a lot of Common Lispniks, I found SLIME and the features it | |
offered valuable. Even if not used for editing files, SLIME it makes a | |
wonderful REPL that works across lisps and schemes. It also may work on | |
frauds, swindles, and rackets. | |
Beyond that, it interacts with gerbil on a level that allows us (read: | |
me) to see more about how gerbil works compared to CL. | |
1 Installing the gxpkg package | |
══════════════════════════════ | |
It is quite simple to get up and running. In the shell, type: | |
┌──── | |
│ gxpkg install github.com/ecraven/r7rs-swank | |
└──── | |
┌──── | |
│ ... install github.com/ecraven/r7rs-swank | |
│ ... build github.com/ecraven/r7rs-swank | |
│ ... compile gerbil-swank | |
│ ... tagging packages | |
└──── | |
2 Running the listener | |
══════════════════════ | |
Now, start a `gxi' (or `M-x run-scheme' for emacs), and start a swank | |
server. Note that it takes over the REPL, as it is single | |
threaded. `C-c' will get you out of it. | |
┌──── | |
│ drewc@aine ~/src $ gxi | |
│ Gerbil v0.12-DEV-1232-gacb1af1 on Gambit v4.8.8 | |
└──── | |
┌──── | |
│ > (import :ecraven/gerbil-swank) | |
│ > (start-swank 4205) | |
└──── | |
┌──── | |
│ swank listening on 4205 | |
└──── | |
3 Connecting and REPL'ing from emacs | |
════════════════════════════════════ | |
Make sure that you're using the slime-repl. | |
┌──── | |
│ ; This is emacs-lisp | |
└──── | |
`M-x slime-connect' is all that's needed to connect. We started it on | |
port 4205, and emacs will ask for the port number. At which point, we | |
have a prompt! | |
┌──── | |
│ ; SLIME 2.20 | |
│ (user)> | |
└──── | |
It has `(user)>' as the prompt. CL has packages, but gerbil does not, | |
/per se/, so what does user refer to? |
Auto-complete, but no introspection & docs at the moment
…On May 14, 2021 8:28:16 PM GMT+03:00, NightMachinary ***@***.***> wrote:
I, too, get an error:
```
❯ gxpkg install github.com/ecraven/r7rs-swank
... install github.com/ecraven/r7rs-swank
... build github.com/ecraven/r7rs-swank
*** ERROR IN #<procedure #23>, ***@***.*** -- No such file or directory
(call-with-input-file "gerbil-build-deps" '#<procedure #24 read>)
Process exited with non-zero status
17920
(path: "/Users/evar/.gerbil/pkg/github.com/ecraven/r7rs-swank/gerbil-build.ss" arguments: ("compile") envir...
❯ gxpkg build all
... build github.com/danielsz/gerbil-gumbo
... build github.com/fare/gerbil-utils
*** ERROR IN gx#core-expand-ref% -- Syntax Error
*** ERROR IN ***@***.***
--- Syntax Error: Reference to unbound identifier
... form: (%#ref hash-ref/default)
... detail: hash-ref/default at ***@***.***
Process exited with non-zero status
17920
(path: "/Users/evar/.gerbil/pkg/github.com/fare/gerbil-utils/build.ss" arguments: ("compile") environment: ...
```
BTW, what does a successful setup give us? Only the REPL? No introspection, docs, auto-complete, etc?
-- >
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://gist.github.com/5f260537b7914a2b999c8a539fb48098#gistcomment-3743006
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I, too, get an error:
BTW, what does a successful setup give us? Only the REPL? No introspection, docs, auto-complete, etc?