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
1 answer

In guile scheme, how to share syntax between outer macro and inner macro?

In Guile scheme, I have a macro which calls another macro, and I want the call to the inner macro to reference a symbol used in the inner macro. Here is a simple example to illustrate the kind of thing I'm trying to acheive: (define-syntax macro1 …
Ben
  • 251
  • 1
  • 7
0
votes
2 answers

How to change content of quoted value in Guile

I have an symbol that evaluates to (quote ("all")). I would like to append "tests" to the end of the list, and get (quote ("all" "tests")) but I didn't find how to : (define make-flags ''("all")) (append make-flags '("tests")) ; Resolves to (quote…
Hugal31
  • 1,610
  • 1
  • 14
  • 27
0
votes
1 answer

Does Guile relax restriction on variable name convention by allowing variable names beginning with number?

For example, It seems that 1+2 can be used in Guile as a variable name: (define 1+2 4) 1+2 ;==>4
Youjun Hu
  • 991
  • 6
  • 18
0
votes
1 answer

Return #nil in a Guile extension

I know that there are a couple of singletons around that can be used to quickly return "common" values from Guile C extension functions, like: SCM_UNSPECIFIED SCM_BOOL_F and others. I would expect that returning #nil from a C function would be just…
Rick77
  • 3,121
  • 25
  • 43
0
votes
1 answer

How do you get the response data as string using (web client) in guile?

I'm trying to get the response data as a string using the docs found here https://www.gnu.org/software/guile/manual/html_node/Web-Client.html. The document mentions that http-request: Returns two values: the response read from the server, and the…
aqui8
  • 511
  • 3
  • 11
0
votes
1 answer

How to do an intersection with sxpath

What is the best way to do an intersection with sxpath? For example with the following XML: some text foo bar baz some other text x y
Antoine
  • 1,782
  • 1
  • 14
  • 32
0
votes
1 answer

How to use ice-9 atomic boxes with hash-table

I have a simple function that I use to cache values. I use a hash table as a cache. The cache will be accessed from different threads and I want to use atomic boxes for controlling the access from different threads. So far I have this code ; Define…
xabush
  • 849
  • 1
  • 13
  • 29
0
votes
1 answer

Filtering an expression output with regexp

The bad code of main is (string-match "module" (help uri-path)) that returns an error scheme@(guile-user) [5]> (string-match "module" (help uri-path)) `uri-path' is an object in the (web uri) module. - Special Form: uri-path While compiling…
trzczy
  • 1,325
  • 2
  • 18
  • 43
0
votes
2 answers

PEG grammar turns computer into hot-plate and never finishes

I'm trying to write a grammar so I can parse a specific type of input file. I've started with the most basic grammar possible, but guile just about melts my computer when trying to match a pattern with this grammar. I'm wondering if there is…
dylanjm
  • 2,011
  • 9
  • 21
0
votes
1 answer

Evaluating code which refers to function parameters

Update: The original version of this question did not fully describe the constraints of my situation. It now includes an example with some hand-waving for the sake of simplicity as well as a testable minimum example. I am trying to pass a snippet of…
0
votes
2 answers

Dotted lists in Guile Scheme

How can I specifically check for dotted-lists in the form (a . b) Guile? The dotted-list of srfi-1 strangely returns #t also for e.g. Numbers (since when are numbers Lists too?…
Student
  • 708
  • 4
  • 11
0
votes
1 answer

Guile scheme system* with pdflatex -jobname

I'm trying to call pdflatex from a guile scheme file. This is the Guile command I'm using: (system* "cat" "foo.txt" "|" "pdflatex" "-jobname" "\"bar\"") This is the error I get back after running the file: cat: invalid option -- 'j' Try 'cat…
9716278
  • 2,044
  • 2
  • 14
  • 30
0
votes
1 answer

How do I turn # into a number in guile scheme

I'm trying to get the hang of recursion in scheme. I put together a Fibinachi function and it keeps returning unspecified instead of a number. How do I make this function return a number and to unspecified? (define (F n) (if (= n 0) 0) …
9716278
  • 2,044
  • 2
  • 14
  • 30
0
votes
1 answer

How can I compile with Guile 2.0 on Homebrew?

I am trying to compile a project with Homebrew on Mac OSX 10.14 Mojave. I have guile 2.2.x: guile --version guile (GNU Guile) 2.2.6 but the project does not support guile 2.2, only 2.0. How can I install guile 2.0 with Homebrew, and how can I…
Dribbler
  • 4,343
  • 10
  • 33
  • 53
0
votes
0 answers

Compiling GNUTLS gives config.status:error: cannot find input file: 'guile/pre-inst-guile.in'

I'm trying to compile GNUTLS through a VirtualBox debian VM. I've installed all dependencies yet I still get config.status:error: cannot find input file: 'guile/pre-inst-guile.in' I've already performed sudo apt-get install guile-2.0-dev and…
Shuryu
  • 5
  • 1
  • 5