Need help to get goblins running

So I wanted to dip my feet into Goblins today.

I started with A Scheme Primer, read that to the halfway point where it said “that’s enough for understanding The Heart of Spritely”.

Then I continued with that, until Chapter 3.1 referred me to Appendix: Setting up Guile, Wisp, and Goblins. I looked at it and thought: no, I don’t want to just run make install on all these.

So I updated Guile from 3.0.7 to 3.0.10 using the build script included in my distro, and then spent several hours writing SlackBuilds for guile-fibers, guile-gcrypt, guile-gnutls and guile-goblins, effectively packaging them for Slackware. I think this work is done now, and I will publish those scripts when I’m convinced it’s really working.

I also installed geiser-guile, company, paredit and wisp-mode into Emacs. (I’m not really sure where I came upon instructions to do so, except for wisp-mode where I know I didn’t.)

But now I’m still stuck advancing through The Heart of Spritely. Chapter 3.2 has some code I’m supposed to put in a file, and some I’m supposed to input on the REPL. But I think I have to connect the code in the file to the REPL somehow, and I have no idea how. C-x C-e on the code in the file throws an error. What am I supposed to know or do?

Ok I give up for today. I got it working once, but I couldn’t replicate it.

These are the steps:?

  • open taste-of-goblins.w
  • start REPL with M-x geiser
  • activate Geiser mode in the source file buffer with geiser-mode

in REPL:

  1. (use-modules (goblins))
  2. ,L wisp

in source buffer
3. C-c C-a
4. somehow this doesn’t work, do it again, it works the second time
in REPL:

define a-vat

(press return twice afterwards)
6 . ,enter-vat a-vat
in source buffer:
7. C-c C-b
8. ^greeter is not defined

Firstly, thanks for packaging all that for Slackware! It’s awesome to hear there’ll be a bit more Guile goodness out there now :smiley:

I tried to reproduce this and couldn’t seem to do so – though I did have a different error. Running

define a-vat

did not expose a-vat in the environment. But, I entered the vat after loading in the source file. After tweaking things a few times, I realized that this is because ,enter-vat doesn’t work with Wisp – it assumes the language is Scheme. Anything you load in the context of ,enter-vat will need to be Scheme or it won’t work. I was able to get ^greeter and friends by loading them before entering a vat.

Though that doesn’t explain why defining a vat didn’t work the first time…

If you load things outside of a vat and then use call-with-vat and with-vat to actually run things in vats, do you run into similar issues?

1 Like