Questions tagged [guile]

GNU Guile is the GNU project's official plugin infrastructure. Guile typically refers to the Scheme front-end which Guile provides.

GNU Guile is the GNU project's official plugin infrastructure. It is intended to be plugged into applications through libguile, but can also be run as a standalone Scheme interpreter.

Guile has a few front-end languages:

  • Scheme, supporting R5RS fully and some of R6RS (the default)
  • EmacsLisp
  • ECMAScript, which has some implementation, but is not completed
  • Lua, which is planned but as of yet nonexistant

Guile has support for modules outside of the core system, which allow for things that are either at SRFI status, or not implemented in Guile's core. See the list of included modules for exactly what the bundled modules do.

Guile has extensive documentation which is hosted here. It contains details on both embedding Guile into applications as well as its features at the language level.

There is also a tutorial that explains step-by-step how to use guile in a straightforward Logo-like ("turtle graphics") application.

261 questions
7
votes
3 answers

How to abbreviate 'note with the same note an octave higher, parenthesized' in Lilypond?

Currently I write lilypond code that looks like this: \version "2.14.2" P = #parenthesize \relative c, { \clef bass 2 4 2 } where I repeatedly mean 'this note, together with the…
6
votes
2 answers

Why is tail recursive Collatz conjecture causing stack overflow in Scheme?

I've written Collatz conjecture in Scheme: (define C (lambda (n) (cond ((eq? n 1) 1) ((even? n) (C (/ n 2))) (else (C (+ (* n 3) 1)))))) This is a tail recursive call, yet I get stack overflow when I call (C 121): guile> (trace…
Jan Stolarek
  • 1,409
  • 1
  • 11
  • 21
6
votes
1 answer

In guile scheme, how can I iterate a list of key-value pairs (i.e. a Hash map)?

I'm playing around with guile to try and get familiar with pure functional programming concepts. Before I can do anything useful with any language, I need to understand some basic data structures and how to manipulate them effectively... in…
d11wtq
  • 34,788
  • 19
  • 120
  • 195
6
votes
1 answer

Tracing in Guile - How to trace in Guile Scheme

What are the equivalents in Guile Scheme of the (trace procedure) and (trace-let (bindings) body) tracing facilities from Chez Scheme. I've reviewed the documentation at https://www.gnu.org/software/guile/manual/html_node/Tracing-Traps.html, but I…
6
votes
2 answers

LilyPond: Extracting pitch names from music

I use LilyPond to create practice scores and etudes. I've figured out how to allow note entry in Moveable Do solfege notation and have a template (see below) that supports displaying the solfege symbols as lyrics beneath the notes. At present, I…
Mike Ellis
  • 1,120
  • 1
  • 12
  • 27
6
votes
2 answers

Saving program image in guile

I've heard that most lisps support saving image of running program into file. Does guile support this?
podcherkLIfe
  • 192
  • 5
6
votes
3 answers

Cannot work out how to run .scm (using guile or scm) files

I have created a abc.scm file and tried to compile it to a binary (or whatever guile scheme compiles to) using "guild compile", "scm" and "guile" commands in terminal in Ubuntu. For "guild compile abc.scm", I get the output "wrote…
Tarun Maganti
  • 3,076
  • 2
  • 35
  • 64
6
votes
3 answers

Guile Scheme and CGI?

I recently discovered that CGI scripts can be written in pretty much any language that can print to stdout. I've written a small guile cgi script that works on my local apache install, but not on my shared host: #!/usr/local/bin/guile -s…
jcw
  • 493
  • 4
  • 11
6
votes
2 answers

How to Prevent Guile from Starting a Debugger for Every Error?

I am using Guile in conjunction with Geiser under Emacs while learning how to program in Scheme. I find it actually a hindrance that Guile drops into a debugger each time I make a typo or enter a wrong piece of code. How can I make Guile more…
haziz
  • 12,994
  • 16
  • 54
  • 75
5
votes
1 answer

what's wrong with this define-syntax macro in scheme?

I'm working though SICP and wanted to try out some of the examples in guile. I'm trying the stream examples and wanted an implementation for cons-stream, which I got from this StackOverflow question. However when I type this into guile I get: guile>…
Tom Carver
  • 962
  • 7
  • 17
5
votes
3 answers

Lexing and Parsing Utilities

I'm looking for lexical analysis and parser-generating utilities that are not Flex or Bison. Requirements: Parser is specified using a context-free LL(*) or GLR grammar. I would also consider PEGs. Integrates tightly with a programming language…
5
votes
3 answers

Does guile have a package manager?

I'd like to discover the guile ecosystem. I looked at how to install a library and I didn't find a package manager, like python's pip. Does such a thing exist for guile ?
Ehvince
  • 17,274
  • 7
  • 58
  • 79
5
votes
3 answers

How do I evaluate a symbol returned from a function in Scheme?

I'm refamiliarizing myself with Scheme and I've hit a problem that is probably reflecting a fundamental misunderstanding on my part. Say I do the following in Scheme (using Guile in this case but it's the same in Chicken): > (define x 5) > x 5 >…
user626998
4
votes
3 answers

Guile scheme - quoted period?

What does the following Guile scheme code do? (eq? y '.) (cons x '.) The code is not valid in MzScheme, is there a portable equivalent across scheme implementations? I am trying to port this code written by someone else. Guile seems to respond to…
Ali
  • 1,014
  • 2
  • 12
  • 17
4
votes
0 answers

Guile Scheme scripting tutorial loading scripts

I am trying to learn a bit Guile Scheme and I am looking at the tutorial at gnu: Scriping Examples Currently I have the following code: modules.scm: #!/usr/bin/env sh exec guile -l fact.scm -e '(@ (my-module) main)' -s "$0" "$@" !# ;;…
Zelphir Kaltstahl
  • 5,722
  • 10
  • 57
  • 86
1
2
3
17 18