Muto/Hurd🌷 is a user on functional.cafe. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
Muto/Hurd🌷 @MutoShack

I can't figure out how to run any of the example programs in & it's making me feel dumb.

Examples are supposed to feel simple, cheesy & rewarding. 🧀

· Web · 0 · 1

@MutoShack

Guile maes me feel dumb all the time

It's frustrating, really

Which examples prrograms are you referring to, anyway ?

@catonano

Well, if I install the 'guile-sdl' package with Guix, then download the source package of guile-sdl & try running:
(load "image.scm")

I get something across the lines of:
'Unbound variable: datafile'
along with a black box.

datafile is defined in the 'common' file, but (load "common") doesn't work for me.

The slideshow application from the manual works just fine though.

@MutoShack

going to bed now

tomorrow I'll try to take a look at guile-sdl

@MutoShack

ok, so, here we are

I installed both guile and guile-sdl in my profile

(guix package -i guile guile-sdl)

Then launched guile and loaded a sdl provided package

scheme@(guile-user)> ,use (sdl mixer)

it works

@MutoShack

when using libraries, as far as I understand, you're not suupposed to load files directly

You are supposed to load namespaces and then use procedures provided by those namespaces

@MutoShack

you might be interested in this one too (I'm not sure qat the difference between sdl and sdl2 is)

dthompson.us/projects/guile-sd

@catonano @mutoshack Yeah, (use-modules), don't (load). Just look at your average guix.scm module, for example:

https://gitlab.com/guile-git/guile-git/blob/master/guix.scm

@catonano

Ahh that makes sense now! Thanks 😅