r/guile • • Aug 05 '18

How to suppress repetitive and unhelpful Guile messages?

1 Upvotes

When the repl starts a long message is displayed scrolling data off of the screen above:

GNU Guile 2.2.2
Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.

And every time you make a change to a script you see :

;;; note: source file /home/user/guile/./script
;;;       newer than compiled /home/user/.cache/guile/ccache/2.2-LE-8-3.A/home/user/guile/script.go
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/user/guile/./script
;;; compiled /home/user/.cache/guile/ccache/2.2-LE-8-3.A/home/user/guile/script.go

Guile seems to go out of its way to make it difficult to disable these messages. Maybe it's just my OCD, but will anyone else join me in a pitch fork attack on the castle over these small infractions? Or even better, tell me a better way to disable them other than hacking the Guile source?


r/guile • • Dec 31 '20

Sicp

4 Upvotes

Learning how to programing with sicp.

guix install sicp


r/guile • • Dec 31 '20

Sicp

0 Upvotes

Baixe o livro e aprenda a programar com scheme. Basta usar o comando abaixo e abrir o livro usando o info ou o GNU Emacs.

guix install sicp


r/guile • • Dec 16 '19

Help: renaming in macros

0 Upvotes
; Having this definition
(define-syntax alambda
  (lambda (stx)
    (syntax-case stx ()
      [(alambda lambda-list . body)
       (with-syntax ([name (datum->syntax #'alambda 'self)])
         #'(letrec ([name (lambda lambda-list . body)])
             name))])))

; I want to "compose" it with another macro
(define-syntax-rule [apply-alambda args argv . body]
  ((alambda args . body) . argv))

; But then it doesn't work (while alambda itself does)
((apply-alambda [x] [5] (if (= 0 x) 1 (* x (self (- x 1))))))
; => Unbound variable: self

; How to prevent apply-alambda from renaming that `self'?

r/guile • • Jul 25 '15

Here's some Guile t-shirt/sticker designs

Thumbnail
redbubble.com
0 Upvotes

r/guile • • Jun 13 '21

Issues with using Guile from C -- evaluationg scheme cod does not seem to work, guile symbols not recognized; v. 2.2

2 Upvotes

I dont know if this is right place to ask, but hopefully someone will know where I am making mistake. I would like to embedd guile in C application, ideally as a shared library. At first, I would like to learn how to evaluate a guile expression in C and how to load a scm file to C.

For that, I have this simple code of the shared librabry (not main app):

#include <stdio.h>
#include <libguile.h>

SCM hello_from_guile(int argc, char ** argv) {

    SCM guileHello;
    scm_init_guile();

    scm_eval((display "Hello from Guile! As simple function."), "");
    scm_eval((newline), "");

    scm_c_primitive_load("scripts/helloGuile.scm");

    scm_call_0(guileHello);

    return 0;
}

and helloGuile.scm "script":

(define guileHello
  lambda ()
    (display "Hello from Guile! As guile function loaded from script file.")
    (newline))

All this does is just printing messages to terminal, one from evaluating scheme code in C, other from loading scheme file in C. I tryed to follow guile reference, here: https://www.gnu.org/software/guile/manual/html_node/Fly-Evaluation.html and here: https://www.gnu.org/software/guile/manual/html_node/Loading.html

Sadly, this totally does not compile. What am I doing wrong? scm_eval seems to have wrong syntax, none of the scheme symbols are recognized, etc ...

I am using guile 2.2 ; sadly arch doesnt have guile 3.0. I am using pkg-config to get correct compilation flags, so that sould be OK.

EDIT:

This works:

#include <stdio.h>
#include <libguile.h>

SCM hello_from_guile(int argc, char ** argv) {

    SCM guileHello;
    scm_init_guile();

    char code[] = "(display \"Hello from Guile! As simple function.\")";
    char newline[] = "(newline)";

    char filename[] = "scripts/helloGuile.scm";

    scm_c_eval_string(code);
    scm_c_eval_string(newline);

    scm_c_primitive_load(filename);

    guileHello = scm_variable_ref(scm_c_lookup("guile-hello"));
    scm_call_0(guileHello);

    return 0;
}
(define guile-hello
  (lambda ()
  (display "Hello from Guile! As guile function loaded from script file.")
  (newline)))

Now for the important thing -- how come that it works??


r/guile • • May 05 '14

Guile Theme

Thumbnail
youtube.com
0 Upvotes

r/guile • • Mar 05 '21

LambdaChip v0.0.3 released!

Thumbnail
self.lambdachip
5 Upvotes

r/guile • • Feb 17 '21

Character sets - Guile Hacker Handbook

Thumbnail jeko.frama.io
5 Upvotes

r/guile • • Sep 17 '14

Emacs Lisp's future

Thumbnail lists.gnu.org
5 Upvotes

r/guile • • Feb 12 '21

GNU Artanis-0.5 released!

Thumbnail
artanis.dev
8 Upvotes

r/guile • • Nov 26 '21

what is the role of guile in Linux today?

8 Upvotes

What is the purpose of Guile in Linux today? It does not seem to be used much for creating standalone applications in Linux. It seems to be supposed to be used as an embedded scripting language for applications, something like what lua is used for. Other than the fact that all lisps and schemes attract me (especially elisp for practical reasons), is there any place in Linux where guile is still very actively used. Gimp comes to mind, but I am not much of a gimp user. I am a GNOME user and most applications that come under this gnome ecosystem. Is there a place for Guile here?

From what I see, Guix distro seems to be the only place where guile is very much used. But then again, I don't use Guix (even if I want to... due to its strict usage of FOSS software and drivers).

I guess what I am trying to ask is where can I apply guile in my gnome desktop. Software such as evince, nautilus, etc. does not seem to have any embedded guile being used to extend them.

It would so much easier to reason myself into learning guile if emacs was written in guile as I am a heavy user of emacs.


r/guile • • Feb 04 '23

Guile on WebAssembly project underway! -- Spritely Institute

Thumbnail
spritely.institute
25 Upvotes

r/guile • • Jan 18 '20

Developing Gnome / GTK applications with Guile

13 Upvotes

Hi, I'm interested in developing GTK applications with Guile. I know that some GTK applications use Guile as a extension language, but I'm wondering if Guile itself is a first class language to develop GTK applications?

I know there is guile-gnome but there seem to be little or no releases over the past years.

Any hints for a Guile beginner like me? Thanks :-)


r/guile • • Jul 24 '25

The Guile Hacker Handbook switched from mdbook to haunt

Thumbnail reddit.com
13 Upvotes

r/guile • • Feb 05 '23

#FOSDEM23: Andrew Whatson. "Introduction to Pre-Scheme"

Thumbnail self.scheme
11 Upvotes

r/guile • • Feb 06 '23

#FOSDEM23: Andy Wingo - Whippet: A new production embeddable garbage collector for Guile

11 Upvotes

More goodness from this year's FOSDEM. If you've been following Andy Wingo's blog in the past year or so, you'll know that he's been at work at an improved garbage collector for Guile. Here, he presents the development and current status of the project - called "Whippet" - and he also proposes some tentative plans for deployment in future releases of Guile.

Guile has a new garbage collector coming! The Whippet collector improve throughput and scalability of Guile programs, and is built in such a way that it can be swapped into most any language runtime that uses that BDW-GC. With minimal adaptations in user code, you get a collector that's competitive with the industry-standard Boehm-Demers-Weiser conservative collector, but which scales better for multiple allocation threads. As incremental changes are made in Guile to integrate Whippet, we will also gain the ability to compact the heap, even while keeping conservative scanning of the C stack. This talk presents the structure of whippet and some performance numbers for how it improves Guile program behavior.

The Whippet garbage collector provides an abstract interface that user programs (like Guile) can use to allocate memory, and also provides a number of collectors that implement that API. One of them is the BDW-GC collector: this will be the first step in Guile's switch to Whippet, to change to use the Whippet API but keep the same GC implementation. Compile-time flags choose the collector implementation, and in the next step, Guile will switch over to Whippet's main collector, an Immix-derived mark-region collector. This collector has a few modes, including a heap-conservative mode that mimics BDW-GC, as well as a stack-conservative mode that allows evacuation and compaction of objects that aren't referenced by conservative roots.

The talk will include a quick overview of Immix-style collectors, for context.

Whippet scales: it has been carefully designed to avoid contention during allocation, and avoid locking except during collection. Collection is optionally parallel and optionally generational. We'll examine the performance and practical impacts of these choices, in synthetic test harnesses and in real Guile programs.

Whippet is designed to be included into a user's C source code, as it needs compile-time configuration. The talk will show examples of the size of the collector and its memory efficiency when compared to BDW-GC and to a semispace collector.

Video and slides of the talk are here: https://fosdem.org/2023/schedule/event/whippet/

You might also want to leaf through the relevant posts on the Wingolog: https://wingolog.org/tags/gc


r/guile • • Mar 09 '23

Robin Templeton joins The Spritely Institute

19 Upvotes

More good news from Spritely.

Yesterday Robin Templeton joined The Spritely Institute. They are joining the team currently in charge of the very interesting Guile->WASM project.

If you've been any near the Emacs community for the past decade or so, you might be aware of the Guile Emacs project: Templeton was the main developer behind this project.

In the past few months, the Spritely Institute has hired David Thompson (of Sly, Haunt, and Chickadee fame, amongst many other projects), and Andy Wingo (from Igalia, and of Guile fame) to augment its dev team (which includes Jessica Tallon and CTO Christine Lemmer-Webber). With the incorporation of Robin Templeton, the amount of hack energy at Spritely is reaching very high levels indeed:

https://spritely.institute/news/robin-templeton-joins.html


r/guile • • Mar 11 '23

Guile Hacker Handbook - New chapters

42 Upvotes

🚀 New chapters added to the Guile Hacker Handbook ! 🚀

This is a book to learn Guile in a #TestDrivenLearning style 👽

⬇️ Check it out ⬇️

🇫🇷 🇬🇧 jeko.frama.io

  • The Guile app tutorial is making a new step forward.

  • How do you feel about the « Fix it! » experiment ?

Happy reading !


r/guile • • Nov 24 '21

Using modules installed with GUIX

3 Upvotes

This is more a guile/guix question than a problem with guile, but I understand that both programs are tightly coupled.

The following guile module has been installed using guix:

$ guix install guile-chickadee

The following package will be installed:

guile-chickadee 0.6.0

...

Now is it possible to use the module from my 'regular' guile install (i.e installed using apt) ?

My default guile install cannot find the module:

scheme@(guile-user) [2]> (use-modules (chickadee))

While compiling expression:

no code for module (chickadee)

Do I have to reinstall everything (guile, emacs, etc) using guix to use a module installed with guix?


r/guile • • Dec 28 '21

[ANN] GNU Artanis-0.5.1 (stable) released!

Thumbnail self.gnu
12 Upvotes

r/guile • • Dec 13 '21

Send an SMS with Guile and Twilio API

Thumbnail
write.as
11 Upvotes

r/guile • • Jan 01 '22

Why does append only see the first list from unzip2?

5 Upvotes

I might be missing something simple. Even though unzip2 returns 2 lists it seems like append only sees the first list, not both:

scheme@(guile-user)> (use-modules (srfi srfi-1))
scheme@(guile-user)> (unzip2 '((1 2) (3 4) (5 6)))
$1 = (1 3 5)
$2 = (2 4 6)
scheme@(guile-user)> (append (unzip2 '((1 2) (3 4) (5 6))))
$3 = (1 3 5)

I was expecting append to produce the list (1 3 5 2 4 6). Is there a way to fix this?


r/guile • • Jan 03 '22

Expected 2nd argument when formatting output?

3 Upvotes

Could anyone explain on Guile 3.0.7 why this code:

(format #t "~%~{~{~:[ ~;~9608c~]~}~%~}~%"
	'((#t #f #t) (#t #t #t) (#f #t #t)))

Generates the below warning?

;;; /home/phil/dev/aoc_2021/13/warning-test.scm:1:0: warning: "~%~{~{~:[ ~;~9608c~]~}~%~}~%": wrong number of `format' arguments: expected 2, got 1

If I add a second dummy argument the warning goes away, but makes no difference to the output? I don't see why a second argument is needed?


r/guile • • Dec 31 '21

GNU Orca 1.0.0 released!

36 Upvotes

I am very happy to announce the first release of Orca, a Guile (Scheme) library containing RPC routines for parallel computation on MPI systems.

MPI is one of the most used standards, in particular high-performance computing systems. However, MPI programmers are explicitly required to deal with many complexities that render MPI programming hard to reason about. I designed and implemented a set of new APIs to alleviate this complexity by taking advantage of the expressive power of Scheme language using remote evaluation techniques on MPI systems.

Orca library allows all worker processes with separate memory spaces to collectively apply the specified function to the given arguments which are either broadcasted or partitioned among the processes as shown below:

The source code of the library is made available on my gitweb page under LGPL version 3 or later.

The paper explaining the Orca library is published and presented at the Computing Conference 2021 in London, UK. The preprint version of the paper can be reached at my ResearchGate page.