Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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?
@tjroth

This comment has been minimized.

Copy link

tjroth commented Aug 11, 2018

Thank you for publishing this guide to installing swank for Gerbil scheme. I'm getting an error when installing the gerbil-swank package...

remote: Repository not found.
fatal: repository 'https://github.com/ecraven/r7r.git/' not found
Process exited with non-zero status
32768
(path: "git" arguments: ("clone" "-q" "https://github.com/ecraven/r7r.git") environment: #f directory: "~/.gerbil/pkg/github.com/ecra...

@drewc

This comment has been minimized.

Copy link
Owner Author

drewc commented Aug 30, 2018

tjroth, looks like it was a typo. Try now: gxpkg install github.com/ecraven/r7rs-swank

@dleslie

This comment has been minimized.

Copy link

dleslie commented Oct 1, 2018

#> gxpkg install github.com/ecraven/r7rs-swank
... install github.com/ecraven/r7rs-swank
... build github.com/ecraven/r7rs-swank
*** ERROR IN gx#core-expand-ref% -- Syntax Error
*** ERROR IN "common/handlers.scm"@354.23
--- Syntax Error: Reference to unbound identifier
... form:   (%#ref $macroexpand-all)
... detail: $macroexpand-all at "common/handlers.scm"@354.23
Process exited with non-zero status
17920

Looks like it broke since Aug29.

@dleslie

This comment has been minimized.

Copy link

dleslie commented Oct 1, 2018

#> gsc -v
v4.9.0 20180930122740 x86_64-unknown-linux-gnu "./configure '--prefix=/home/dleslie/.local' '--enable-single-host'"

And gerbil is from a546f8cd

@jboynyc

This comment has been minimized.

Copy link

jboynyc commented Mar 4, 2019

Fails for me, too:

$ gxpkg install github.com/ecraven/r7rs-swank
... install github.com/ecraven/r7rs-swank
... build github.com/ecraven/r7rs-swank
... compile gerbil-swank
*** ERROR IN gxc#gsc-compile-file -- No such file or directory
(open-process '(path: "gsc" arguments: ("-debug-environments" "-debug-source" "~/.gerbil/lib/ecraven/gerbil-swank__0.scm") stdout-redirection: #f))
Process exited with non-zero status
17920
$ gxi
Gerbil v0.12 on Gambit v4.8.9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.