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
4
votes
2 answers

macro expansion in guile scheme

In Guix there's a layer made of macros beautifying the creation and manipulation of srfi-9 records The code is in guix/records.scm The code is large and articulated I thought to expand those macros to see their input and their output in order to…
user1632812
  • 431
  • 3
  • 16
4
votes
1 answer

scheme format function missing from gambit

I attempted to run a gambit scheme script that was previously run with guile. I noticed that gambit fails because it is missing the "format" function. Is format not part of scheme? (format #t "example(~a)=<~a>\n" i (example i)) Instead I modified…
henninb
  • 133
  • 2
  • 11
4
votes
2 answers

How to use Lazy Evaluation in Guile scheme?

I have written a code which uses lazy evaluation to produce infinite data structure but there is an error. Here is the code: #!/usr/bin/guile \ -e main -s !# (define ints-f (lambda (n) (let ((n1 (delay (ints-f (+ n 1))))) (cons…
Tarun Maganti
  • 3,076
  • 2
  • 35
  • 64
4
votes
1 answer

What is the scheme syntax to import modules (guile especially)?

How to import modules in Scheme (guile especially)? How to create a module and import it in another script in scheme? How should I compile the script when I import a module, what are the command-line arguments that has to be passed? How to import…
Vasantha Ganesh
  • 4,570
  • 3
  • 25
  • 33
4
votes
0 answers

pkg-config: command not found during compile, but pkg-config installed

Update: I got it working, the problem has something to do with the fact that I was running it through emacs. I ran the makefile from the command line instead, and pkg-config ran. After adding the path to guile-2.0.pc with export…
eyests
  • 41
  • 1
  • 1
  • 4
4
votes
1 answer

Guile make https request

How do I make https requests using Guile? I make plain http requests using web client (http-get "http://example.com" #:streaming? #t) When I try to make https requests the same way, though, I get the 400 The plain HTTP request was sent to HTTPS…
Sergo Pasoevi
  • 2,833
  • 3
  • 27
  • 41
4
votes
3 answers

Implement yield and send in Scheme

I'm trying to port yield and yield from from Python to Scheme. Here is an implementation I've done: (define (coroutine routine) (let ((current routine) (status 'new)) (lambda* (#:optional value) (let ((continuation-and-value …
amirouche
  • 7,682
  • 6
  • 40
  • 94
4
votes
1 answer

Items disapear when `sort!`'ing a list in Guile

I seem to have a case of disappearing items after invoking sort! on a list of strings: (I have derived this code from Autogen template that I was working on.) (use-modules (ice-9 pretty-print)) (let ((files '("log4cplus/socketappender.h" …
wilx
  • 17,697
  • 6
  • 59
  • 114
4
votes
1 answer

Can't get guile-gnome to work

I'm trying to get guile-gnome working with the Guile installed on my machine. I've downloaded and built guile-gnome according to the instructions here, but no matter what prefix I give to it, I can never seem to get one of the sample GUI programs to…
Koz Ross
  • 3,040
  • 2
  • 24
  • 44
4
votes
1 answer

scheme r7rs-large interesting but... is it still in progress?

I am trying to take a look at the status of r7rs large but I cannot find any information in scheme reports page, etc, just a talk from 2013. I searched around with google without success as well. Is it still alive? Where can I find…
Germán Diago
  • 7,473
  • 1
  • 36
  • 59
4
votes
1 answer

Scheme - LALR parser generation- input from a string

We are trying to generate (in guile) a parser and a lexer that read characters from a string instead of stdin. We started modifying the calculator example included in the code…
3
votes
1 answer

scheme on guile: let-syntax invalid?

For a functional programming assignment, I am writing a scheme macro that translates scheme code to coffeescript code. I am using guile on Linux Mint 12, and have (use-syntax (ice-9 syncase)) active. Currently, I am trying to nest let-syntax in…
cali-spc
  • 47
  • 2
  • 9
3
votes
3 answers

Is it possible to just print the string that was passed into the Scheme macro?

I am working on a language translator in guile scheme, and need to handle the basic case, where you're trying to convert a single word. (define var 5) (translate var) This should return the string var and not the number 5. How do I do this using…
chustar
  • 12,225
  • 24
  • 81
  • 119
3
votes
4 answers

How can I use dynamic programming in Scheme to solve the Coin Change problem?

I'm trying to learn a Lisp language and have settled on Guile and am trying to solve this problem: You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money. Return…
Kyle Baldwin
  • 102
  • 8
3
votes
2 answers

How to build unit tests in Guile, which output to the TAP standard?

I would like to have a Guile script, which implements functions, which output test result messages according to the TAP protocol.
Omer Zak
  • 1,147
  • 2
  • 8
  • 25
1 2
3
17 18