Skip to content

Instantly share code, notes, and snippets.

@drewc
Last active October 6, 2023 20:10
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drewc/5f260537b7914a2b999c8a539fb48098 to your computer and use it in GitHub Desktop.
Save drewc/5f260537b7914a2b999c8a539fb48098 to your computer and use it in GitHub Desktop.
gerbil-swank for wiki?
━━━━━━━━━━━━━━━━━━━━━━━━━
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?
@corpix
Copy link

corpix commented May 17, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment