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

How to use the POSIX package of Guile 2.2?

Context: I am currently coding the generate-ninja-build.scm script in git commit cb7530e3ff10 of my GPLv3+ project bismon (funded by H2020 research projects). This is contractually some Linux free software project supposed to run on Debian. That…
Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547
0
votes
1 answer

Should I define separate module for every file in my Guile project?

Let me explain my problem by comparison. In Common Lisp I could split package definitions to several files, it was enough to declare in each of them that it's in-package and load them. However in Guile Scheme it looks like I should define-module,…
rsm
  • 2,530
  • 4
  • 26
  • 33
0
votes
1 answer

Circular lists in guile

I was testing this code in guile: > (define xxx (let ((x '(1 2 3))) (set-cdr! (cddr x) x) x)) > xxx it display (1 2 3) but this: (define x '(1 2 3)) (set-cdr! (cddr x) x) x => (1 2 3 . #-2#) creates circular list Why first code don't work in…
jcubic
  • 61,973
  • 54
  • 229
  • 402
0
votes
0 answers

What's the difference between define and defmacro-public

I try to decipher libctl. In base/io-vars.scm, defmacro-public appears. 58(defmacro-public define-input-var 59 (name init-val var-type-name . var-constraints) 60 `(begin 61 (define-param ,name ,init-val) 62 (input-var! (lambda () ,name)…
Koreyuki
  • 75
  • 7
0
votes
1 answer

How can i check if a URL exists via Guile Scheme?

I tried to google my question before but i didn't found anything about how to check if a URL http status code is 404 or not by using scheme, so forgive me if my question can sound a little bit foreseen.
0
votes
0 answers

In procedure scm_lreadr: #:1:42: end of file in string constant

I am writing test code using guile/scheme and i tried to extract each line of a text file as a string and used (eval-string str) to evaluate the expresion in the string. But, i get In procedure scm_lreadr: #:1:42: end of file in string…
Kira KE
  • 1
  • 1
0
votes
1 answer

Error building Guile-2.2.2 on cluster

I am trying to install Guile-2.2.2 locally on a cluster. I installed (locally) all the prerequisites for guile as mentioned in the README file. When I run configure using the command below, I do not get any errors. ./configure…
0
votes
1 answer

Where to install "guile-git" on Ubuntu 14?

I got stuck installing "git clone https://gitlab.com/guile-git/guile-git.git". In which directory is this supposed to be cloned and installed?
0
votes
1 answer

Do I need a lock to access an immutable datastructure in multithreading context?

I have an immutable datastructure that is a functional hashmap (see fash.scm) that is shared among several threads. Imagine a thread wants to change the global hashmap to a new version. Do I need a lock to change the value? If that's is the case, I…
amirouche
  • 7,682
  • 6
  • 40
  • 94
0
votes
0 answers

E: Unable to locate package guile-2.2 linux mint

I needed to install guile-2.2 on my machine (with linuxMint). but when I type command (sudo apt-get install guile-2.2). it gives me the following error. E: Unable to locate package guile-2.2 can someone help, please!
0
votes
0 answers

How to debug procedures in Scheme

For example lets say I have the following procedure (define (delete-adjacent-duplicates lst) (fold-right (lambda (elem ret) (if (equal? elem (first ret)) ret (cons elem ret))) …
xabush
  • 849
  • 1
  • 13
  • 29
0
votes
0 answers

Using lookbehind in scheme regex

I have a regular expression that matches < preceded by another < This is I am using (?<=<)< and it works properly. However, when I use the string-match function to search for the pattern in a string, it throws an error. Here is the code I am…
xabush
  • 849
  • 1
  • 13
  • 29
0
votes
0 answers

Unbound Variable of unknown character #{�}#

I'm experiencing a weird error of an unbound variable when I run a Scheme script for GNU Guile. For me it's not clear where the error occurs which is why I haven't posted a short reproducible code. I probably need to know first what I have to search…
kluonk
  • 87
  • 2
  • 7
0
votes
1 answer

Where are ffi symbols defined?

I am trying to link a file, "lib guile_2.0_la-foreign.o" in order to build guile-2.0.11 on macOS Sierra. The ld command from the make file returns more than a dozen errors similar to "_ffi_type_float", referenced from: _fill_ffi_type in lib…
John
  • 31
  • 3
0
votes
1 answer

Unexplained behaviour of Guile's make-c-struct of (system foreign)

Guile accepts the following code: (use-modules (system foreign)) (define ptr (make-c-struct (list int int) '(300 43))) However, it throws an error when the second line is replaced by: (define ptr (make-c-struct '(int int) '(300 43))) Is someone be…
Sven Williamson
  • 1,094
  • 1
  • 10
  • 19