GNU Shepherd 0.10.4 released

2024-03-31 Thread Ludovic Courtès
We are pleased to announce the GNU Shepherd version 0.10.4, a bug-fix
release of the new 0.10.x series, representing 7 commits over 3 months.

The 0.10.x series is a major overhaul towards 1.0, addressing shortcomings
and providing new features that help comprehend system state.


• About

  The GNU Shepherd is a service manager written in Guile that looks
  after the herd of daemons running on the system.  It can be used as an
  “init” system (PID 1) and also by unprivileged users to manage
  per-user daemons—e.g., tor, privoxy, mcron.  It supports several
  daemon startup mechanisms, including inetd and systemd-style socket
  activation.  The GNU Shepherd is configured in Guile Scheme and can be
  extended in the same language.  It builds on a simple memory-safe and
  callback-free programming model.

  The GNU Shepherd is developed jointly with the GNU Guix project; it is
  used as the init system of Guix, GNU’s advanced GNU/Linux distribution.

  https://www.gnu.org/software/shepherd/


• Download

  For a summary of changes and contributors, see:
https://git.sv.gnu.org/gitweb/?p=shepherd.git;a=shortlog;h=v0.10.4
  or run this command from a git-cloned shepherd directory:
git shortlog v0.10.3..v0.10.4

  Here are the compressed sources and a GPG detached signature:
https://ftp.gnu.org/gnu/shepherd/shepherd-0.10.4.tar.gz
https://ftp.gnu.org/gnu/shepherd/shepherd-0.10.4.tar.gz.sig

  Use a mirror for higher download bandwidth:
https://ftpmirror.gnu.org/shepherd/shepherd-0.10.4.tar.gz
https://ftpmirror.gnu.org/shepherd/shepherd-0.10.4.tar.gz.sig

  Here are the SHA1 and SHA256 checksums:

1a547efd9416b492b89d010cb10cfd1b5cd35945  shepherd-0.10.4.tar.gz
fiLRTcdckD42Ng5I5VAPj+GQT6E04tA+VBKTkKjIBgg=  shepherd-0.10.4.tar.gz

  Verify the base64 SHA256 checksum with cksum -a sha256 --check
  from coreutils-9.2 or OpenBSD's cksum since 2007.

  Use a .sig file to verify that the corresponding file (without the
  .sig suffix) is intact.  First, be sure to download both the .sig file
  and the corresponding tarball.  Then, run a command like this:

gpg --verify shepherd-0.10.4.tar.gz.sig

  sh: line 1: gpg: command not found
  If that command fails because you don't have the required public key,
  or that public key has expired, try the following commands to retrieve
  or refresh it, and then rerun the 'gpg --verify' command.

gpg --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

  As a last resort to find the key, you can try the official GNU
  keyring:

wget -q https://ftp.gnu.org/gnu/gnu-keyring.gpg
gpg --keyring gnu-keyring.gpg --verify shepherd-0.10.4.tar.gz.sig

  This release was bootstrapped with the following tools:
Autoconf 2.71
Automake 1.16.5
Gettext 0.21
Makeinfo 7.1


• Changes since version 0.10.3 (excerpt from the NEWS file)

  ** ‘herd unload root all’ stops services before unregistering them

  Previously, since version 0.10.0, ‘herd unload root all’ would unregister all
  services without first stopping them, leaving the system in a bogus state.

  ** ‘shepherd’ no longer bails out when reboot(2) returns ENOSYS

  In runc environments (among others), reboot(RB_DISABLE_CAD) returns ENOSYS,
  which would lead shepherd to fail to start.  This would prevent the use of
  shepherd in some containerized environments such as those of GitLab-CI.

  ** REPL service no longer attempts to enter debugger upon error

  The REPL service would spawn a regular REPL that enters a debugger (or
  “recursive prompt”) by default.  While this is a great feature, it could
  easily render the shepherd REPL unusable because the continuation of the
  debugger prompt could not always be suspended—see the thread at
  https://lists.gnu.org/archive/html/guix-devel/2024-01/msg00064.html.  To avoid
  that, the REPL now simply displays a backtrace upon error.


Please report bugs to bug-g...@gnu.org.
Join guix-de...@gnu.org for discussions.

Ludovic, on behalf of the Shepherd herd.


signature.asc
Description: PGP signature


Guile-Git 0.6.0 released; looking for maintainers!

2024-02-27 Thread Ludovic Courtès
Hello!

I’m glad to announce that Guile-Git 0.6.0 has been released, fixing
longstanding issues and adding support for newer libgit2 versions!

  https://gitlab.com/guile-git/guile-git/

See ‘NEWS’ file excerpt below.

Incidentally, Guile-Git needs your help!  The initial driving force
behind the project is no longer around to help (and I’d like to thank in
particular Erik Edrosa for all their work shepherding the project).  We
need new volunteers to help, and new maintainers.  If you rely on the
project and/or would like to help, let’s get in touch!

One of the things to look into going further is ABI compatibility.
We’re playing whack-a-mole with ABI/API changes introduced as new
libgit2 versions come out; the ‘check-abi’ target contributed by Sören
Tempel helps in finding glaring ABI mismatches with structs, but it’s
not completely bulletproof either (due to SysV alignment rules, missing
fields etc. are not always uncovered, especially on 64-bit platforms).
An idea might be to look into using nyacc’s ffi-helper to generate
struct definitions.

Happy version control!

Ludo’.

* Changes in 0.6.0 (since 0.5.2)

** Updated requirements

Guile-Git now requires libgit2 >= 1.3.0.

** New functionality

*** Support libgit2 up to 1.7.x

*** Support for checkout options

Checkout options can be created with ~make-checkout-options~ and passed
to ~checkout-head~, ~checkout-index~, etc.

*** New ~remote-connect/detached~ procedure

Lets you connect to a detached remote.

*** New ~(git ignore)~ module and ~ignored-file?~  procedure

The ~ignored-file?~ returns true when a file is ignored according to the
ignore rules.

*** New ~owner-validation?~ and ~set-owner-validation!~ procedures

These procedures let you query and set repository directory ownership
validation, which raises an error when attempting to access a repository
not owned by the current user.

*** New ~describe-checkout~ procedure

The procedure returns a pretty description of a checkout, similar to
the ~git describe~ command.

** Bug fixes

*** Always use native endianness when interpreting ~size_t~ pointers
   ()

*** Add missing argument to C call made by ~repository-index~

*** Clone-over-SSH tests now ignores =~/.ssh/known_hosts= validation
   ()

*** Fix various binary interface incompatibility issues

Running ~make check-abi~ now flags application binary interface (ABI)
issues.



signature.asc
Description: PGP signature


GNU Shepherd 0.10.3 released

2024-01-07 Thread Ludovic Courtès
We are pleased to announce the GNU Shepherd version 0.10.3, a bug-fix
release of the new 0.10.x series, representing 51 commits over 6 months.

The 0.10.x series is a major overhaul towards 1.0, addressing shortcomings
and providing new features that help comprehend system state.


• About

  The GNU Shepherd is a service manager written in Guile that looks
  after the herd of daemons running on the system.  It can be used as an
  “init” system (PID 1) and also by unprivileged users to manage
  per-user daemons—e.g., tor, privoxy, mcron.  It supports several
  daemon startup mechanisms, including inetd and systemd-style socket
  activation.  The GNU Shepherd is configured in Guile Scheme and can be
  extended in the same language.  It builds on a simple memory-safe and
  callback-free programming model.

  The GNU Shepherd is developed jointly with the GNU Guix project; it is
  used as the init system of Guix, GNU’s advanced GNU/Linux distribution.

  https://www.gnu.org/software/shepherd/


• Download

  Here are the compressed sources and a GPG detached signature:
https://ftp.gnu.org/gnu/shepherd/shepherd-0.10.3.tar.gz
https://ftp.gnu.org/gnu/shepherd/shepherd-0.10.3.tar.gz.sig

  Use a mirror for higher download bandwidth:
https://ftpmirror.gnu.org/shepherd/shepherd-0.10.3.tar.gz
https://ftpmirror.gnu.org/shepherd/shepherd-0.10.3.tar.gz.sig

  Here are the SHA1 and SHA256 checksums:

  aac0f3f11245fca5b13119dc8e25d366fc53df23  shepherd-0.10.3.tar.gz
  jsb+vrAwu1LoTGI/ECnKccLCElFRVhxZFF2qbjuFr+8  shepherd-0.10.3.tar.gz

  The SHA256 checksum is base64 encoded, instead of the
  hexadecimal encoding that most checksum tools default to.

  Use a .sig file to verify that the corresponding file (without the
  .sig suffix) is intact.  First, be sure to download both the .sig file
  and the corresponding tarball.  Then, run a command like this:

gpg --verify shepherd-0.10.3.tar.gz.sig

  The signature should match the fingerprint of the following key:

pub   rsa4096 2014-08-11 [SC]
  3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
uid   [ unknown] Ludovic Courtès 
uid   [ unknown] Ludovic Courtès 
uid   [ unknown] Ludovic Courtès (Inria) 

  If that command fails because you don't have the required public key,
  or that public key has expired, try the following commands to retrieve
  or refresh it, and then rerun the 'gpg --verify' command.

gpg --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

  As a last resort to find the key, you can try the official GNU
  keyring:

wget -q https://ftp.gnu.org/gnu/gnu-keyring.gpg
gpg --keyring gnu-keyring.gpg --verify shepherd-0.10.3.tar.gz.sig


  This release was bootstrapped with the following tools:
Autoconf 2.71
Automake 1.16.5
Makeinfo 7.0.3
Help2man 1.49.2


• Changes since version 0.10.2 (excerpt from the NEWS file)

  ** Fix a bug that could lead shepherd to hang after loading replacements
 (<https://issues.guix.gnu.org/67839>)

  After loading replacements with ‘herd load’ or ‘guix system reconfigure’,
  shepherd could eventually hang.  Specifically, the replaced service would no
  longer respond to messages, so it would be impossible to start it, to stop it,
  or to unload it.  This is now fixed.

  ** Fix ownership and permissions on Unix-domain sockets
 (<https://issues.guix.gnu.org/67867>)

  When using an AF_UNIX endpoint with systemd- and inetd-style services, the
  socket file itself would remain owned by root (when shepherd is running as
  root) with permissions 755.  This is now fixed, with ownership set according
  to #:socket-owner and #:socket-group of the endpoint, and permissions on the
  socket set to 666.

  Likewise, #:socket-directory-permissions was previously ignored when the
  socket’s directory already existed prior to creating the endpoint, potentially
  leading to unexpectedly wide access to the socket.  This is now fixed.

  ** New #:respawn-delay parameter to ‘service’
 (<https://issues.guix.gnu.org/64665>)

  This specifies a delay before a service is respawned.  Its default value is
  given by ‘default-respawn-delay’ and defaults to 100ms.  Until now, services
  were respawned immediately.

  ** Non-blocking ‘sleep’ replacement provided

  Until now, user code could call (@ (guile) sleep), the core Guile binding for
  ‘sleep’, instead of ‘sleep’ as provided by (fibers).  The former would have
  caused ‘shepherd’ to actually sleep for that time, instead of performing other
  on-going tasks.  ‘sleep’ is now replaced by (@ (fibers) sleep) to avoid that.

  ** Ensure termination of services that failed to produce a PID file

  When a service started with the #:pid-file argument of
  ‘make-forkexec-constructor’ or similar would fail to produce its PID file, the
  process that was spawned would be sent SIGTERM.  Now, it is additionally sent
  SIGKILL after ‘default-process-termination-grace-period’ has expired

GNU Shepherd 0.10.2 released

2023-07-17 Thread Ludovic Courtès
We are pleased to announce the GNU Shepherd version 0.10.2, a bug-fix
release of the new 0.10.x series, representing 28 commits over 7 weeks.

The 0.10.x series is a major overhaul towards 1.0, addressing shortcomings
and providing new features that help comprehend system state.


• About

  The GNU Shepherd is a service manager written in Guile that looks
  after the herd of daemons running on the system.  It can be used as an
  “init” system (PID 1) and also by unprivileged users to manage
  per-user daemons—e.g., tor, privoxy, mcron.  It supports several
  daemon startup mechanisms, including inetd and systemd-style socket
  activation.  The GNU Shepherd is configured in Guile Scheme and can be
  extended in the same language.  It builds on a simple memory-safe and
  callback-free programming model.

  The GNU Shepherd is developed jointly with the GNU Guix project; it is
  used as the init system of Guix, GNU’s advanced GNU/Linux distribution.

  https://www.gnu.org/software/shepherd/


• Download

  Here are the compressed sources and a GPG detached signature:
https://ftp.gnu.org/gnu/shepherd/shepherd-0.10.2.tar.gz
https://ftp.gnu.org/gnu/shepherd/shepherd-0.10.2.tar.gz.sig

  Use a mirror for higher download bandwidth:
https://ftpmirror.gnu.org/shepherd/shepherd-0.10.2.tar.gz
https://ftpmirror.gnu.org/shepherd/shepherd-0.10.2.tar.gz.sig

  Here are the SHA1 and SHA256 checksums:

  d0ea3e212eb62b98f6ea9567be66069571747d41  shepherd-0.10.2.tar.gz
  knKDrUjHjs8YAWB6Ex9IGUegum5zOYCG8uU2vF5qNG0  shepherd-0.10.2.tar.gz

  The SHA256 checksum is base64 encoded, instead of the
  hexadecimal encoding that most checksum tools default to.

  Use a .sig file to verify that the corresponding file (without the
  .sig suffix) is intact.  First, be sure to download both the .sig file
  and the corresponding tarball.  Then, run a command like this:

gpg --verify shepherd-0.10.2.tar.gz.sig

  The signature should match the fingerprint of the following key:

pub   rsa4096 2014-08-11 [SC]
  3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
uid   [  full  ] Ludovic Courtès 
uid   [  full  ] Ludovic Courtès 
uid   [  full  ] Ludovic Courtès (Inria) 

  If that command fails because you don't have the required public key,
  or that public key has expired, try the following commands to retrieve
  or refresh it, and then rerun the 'gpg --verify' command.

gpg --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

  As a last resort to find the key, you can try the official GNU
  keyring:

wget -q https://ftp.gnu.org/gnu/gnu-keyring.gpg
gpg --keyring gnu-keyring.gpg --verify shepherd-0.10.2.tar.gz.sig


  This release was bootstrapped with the following tools:
Autoconf 2.71
Automake 1.16.5
Makeinfo 7.0.3
Help2man 1.49.2


• Changes since version 0.10.1 (excerpt from the NEWS file)

  ** ‘shepherd’ loads configuration file asynchronously

  Up to 0.10.1, ‘shepherd’ would load the user-provided configuration file
  synchronously: it would write its PID file and start listening for incoming
  connections only after the configuration file has been loaded.  The
  configuration file is now loaded in the background, letting users interact
  with shepherd (using the ‘herd’ command) early on.

  ** ‘shepherd’ keeps going upon configuration file errors
 (<https://issues.guix.gnu.org/63982>)

  Up to 0.10.1, ‘shepherd’ would abruptly exit when an error would occur while
  loading the configuration file—service startup failure, uncaught exception,
  etc.  It now reports the error but keeps going, again letting users fix any
  problems dynamically.

  ** New #:respawn-limit parameter to ‘service’

  The ‘service’ form supports a new #:respawn-limit parameter to specify
  per-service respawn limits.

  ** Disabled services are truly disabled
 (<https://issues.guix.gnu.org/64008>)

  Previously, manually running ‘herd disable SERVICE’ would not prevent SERVICE
  from being respawned or even from being started.  This is now fixed.

  ** Disabled flag is preserved when replacing a service
 (<https://issues.guix.gnu.org/63869>)

  When replacing a service, for instance by running ‘herd load root conf.scm’ or
  by running ‘guix system reconfigure’, the service replacement starts as
  disabled if the original service was disabled.

  ** Signals are properly handled after ‘daemonize’
 (<https://issues.guix.gnu.org/63982>)

  Starting with version 0.9.0, calling the ‘daemonize’ action on the ‘root’
  service would cause shepherd to miss signals; in particular, it would miss
  SIGCHLD signals, making it hardly usable.  This is now fixed.

  ** New ‘unregister-services’ procedure
 (<https://issues.guix.gnu.org/64365>)

  The (shepherd service) module now exports ‘unregister-services’.

  ** New Bash completion

  A Bash completion file is now installed, providing tab completion for the
  ‘herd’ command.

GNU Shepherd 0.10.1 released

2023-05-29 Thread Ludovic Courtès
We are pleased to announce the GNU Shepherd version 0.10.1, a bug-fix
release of the new 0.10.x series, representing 14 commits over 16 days.

The 0.10.x series is a major overhaul towards 1.0, addressing shortcomings
and providing new features that help comprehend system state.


• About

  The GNU Shepherd is a service manager written in Guile that looks
  after the herd of daemons running on the system.  It can be used as an
  “init” system (PID 1) and also by unprivileged users to manage
  per-user daemons—e.g., tor, privoxy, mcron.  It supports several
  daemon startup mechanisms, including inetd and systemd-style socket
  activation.  The GNU Shepherd is configured in Guile Scheme and can be
  extended in the same language.  It builds on a simple memory-safe and
  callback-free programming model.

  The GNU Shepherd is developed jointly with the GNU Guix project; it is
  used as the init system of Guix, GNU’s advanced GNU/Linux distribution.

  https://www.gnu.org/software/shepherd/


• Download

  Here are the compressed sources and a GPG detached signature:
https://ftp.gnu.org/gnu/shepherd/shepherd-0.10.1.tar.gz
https://ftp.gnu.org/gnu/shepherd/shepherd-0.10.1.tar.gz.sig

  Use a mirror for higher download bandwidth:
https://ftpmirror.gnu.org/shepherd/shepherd-0.10.1.tar.gz
https://ftpmirror.gnu.org/shepherd/shepherd-0.10.1.tar.gz.sig

  Here are the SHA1 and SHA256 checksums:

  b0bdd9eda7a44f14d9ef4502263e4a7a2b8d4725  shepherd-0.10.1.tar.gz
  3CfSFEodr7TJJvxa3uOgUJo5WB7yg00I/5c8yNxnQJw  shepherd-0.10.1.tar.gz

  The SHA256 checksum is base64 encoded, instead of the
  hexadecimal encoding that most checksum tools default to.

  Use a .sig file to verify that the corresponding file (without the
  .sig suffix) is intact.  First, be sure to download both the .sig file
  and the corresponding tarball.  Then, run a command like this:

gpg --verify shepherd-0.10.1.tar.gz.sig

  The signature should match the fingerprint of the following key:

pub   rsa4096 2014-08-11 [SC]
  3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
uid   [  full  ] Ludovic Courtès 
uid   [  full  ] Ludovic Courtès 
uid   [  full  ] Ludovic Courtès (Inria) 

  If that command fails because you don't have the required public key,
  or that public key has expired, try the following commands to retrieve
  or refresh it, and then rerun the 'gpg --verify' command.

gpg --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

  As a last resort to find the key, you can try the official GNU
  keyring:

wget -q https://ftp.gnu.org/gnu/gnu-keyring.gpg
gpg --keyring gnu-keyring.gpg --verify shepherd-0.10.1.tar.gz.sig


  This release was bootstrapped with the following tools:
Autoconf 2.71
Automake 1.16.5
Makeinfo 7.0.3
Help2man 1.49.2


• Changes since version 0.10.0 (excerpt from the NEWS file)

  ** Configurable number of ‘bind’ attempts for endpoints

  The ‘endpoint’ procedure takes a new ‘#:bind-attempts’ parameter.  Its default
  value is (default-bind-attempts), itself a new SRFI-39 parameter.

  ** New ‘default-respawn-limit’ parameter

  This SRFI-39 parameter lets users configure the respawn limit for respawnable
  services.  See “Service De- and Constructors” in the manual.

  ** ‘herd restart SERVICE’ starts the replacement, not the original service
 <https://issues.guix.gnu.org/63717>

  In 0.10.0, when a service had received a replacement (for instance via ‘guix
  system reconfigure’), using ‘herd restart’ would invoke the ‘start’ method of
  the original service while installing its replacement in the registry.

  This would lead to an inconsistency where the registry would show the new
  service (typically failing to start) while the original service would still be
  running “in the shadows” (responding to SIGCHLD or to incoming connections,
  and so on).

  ** ‘herd restart SERVICE’ does not restart transient services

  In 0.10.0, ‘herd restart’ could end up attempt to restart transient services,
  which is bound to fail and could even lead to a deadlock since the service has
  been terminated.


Please report bugs to bug-g...@gnu.org.
Join guix-de...@gnu.org for discussions.

Ludovic, on behalf of the Shepherd herd.


signature.asc
Description: PGP signature


GNU Shepherd 0.10.0 released

2023-05-13 Thread Ludovic Courtès
We are pleased to announce the GNU Shepherd version 0.10.1.  This
release represents 132 commits by two people.  It is a major overhaul of
shepherd internals, addressing shortcomings and providing new features
that help comprehend system state.


• About

  The GNU Shepherd is a service manager written in Guile that looks
  after the herd of daemons running on the system.  It can be used as an
  “init” system (PID 1) and also by unprivileged users to manage
  per-user daemons—e.g., tor, privoxy, mcron.  It supports several
  daemon startup mechanisms, including inetd and systemd-style socket
  activation.  The GNU Shepherd is configured in Guile Scheme and can be
  extended in the same language.  It builds on a simple memory-safe and
  callback-free programming model.

  The GNU Shepherd is developed jointly with the GNU Guix project; it is
  used as the init system of Guix, GNU’s advanced GNU/Linux distribution.

  https://www.gnu.org/software/shepherd/


• Download

  Here are the compressed sources and a GPG detached signature:
https://ftp.gnu.org/gnu/shepherd/shepherd-0.10.0.tar.gz
https://ftp.gnu.org/gnu/shepherd/shepherd-0.10.0.tar.gz.sig

  Use a mirror for higher download bandwidth:
https://ftpmirror.gnu.org/shepherd/shepherd-0.10.0.tar.gz
https://ftpmirror.gnu.org/shepherd/shepherd-0.10.0.tar.gz.sig

  Here are the SHA1 and SHA256 checksums:

  1b0895fa5a0709ae612be50d5a486c137d862168  shepherd-0.10.0.tar.gz
  Dl7kcFFihN35TBunXnj8aPvYImPlGPZlGtthKAlm6zY  shepherd-0.10.0.tar.gz

  The SHA256 checksum is base64 encoded, instead of the
  hexadecimal encoding that most checksum tools default to.

  Use a .sig file to verify that the corresponding file (without the
  .sig suffix) is intact.  First, be sure to download both the .sig file
  and the corresponding tarball.  Then, run a command like this:

gpg --verify shepherd-0.10.0.tar.gz.sig

  The signature should match the fingerprint of the following key:

pub   rsa4096 2014-08-11 [SC]
  3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
uid   [  full  ] Ludovic Courtès 
uid   [  full  ] Ludovic Courtès 
uid   [  full  ] Ludovic Courtès (Inria) 

  If that command fails because you don't have the required public key,
  or that public key has expired, try the following commands to retrieve
  or refresh it, and then rerun the 'gpg --verify' command.

gpg --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

  As a last resort to find the key, you can try the official GNU
  keyring:

wget -q https://ftp.gnu.org/gnu/gnu-keyring.gpg
gpg --keyring gnu-keyring.gpg --verify shepherd-0.10.0.tar.gz.sig


  This release was bootstrapped with the following tools:
Autoconf 2.71
Automake 1.16.5
Makeinfo 7.0.3
Help2man 1.49.2


• Changes since version 0.9.3 (excerpt from the NEWS file)

  ** Distinguish ‘starting’ and ‘stopping’ intermediate service statuses

  In previous version, a service would be either “running” or “stopped”.  The
  intermediate states “starting” and “stopping” are now properly captured and
  you can see them when running ‘herd status’.

  ** ‘start’ and ‘stop’ block when service is already being started/stopped
<https://issues.guix.gnu.org/54786#4>

  With previous version, a client running ‘herd start SERVICE’ while SERVICE is
  already being started would cause shepherd to attempt to start a second
  instance of that service, ultimately resulting in confusion, disappointment,
  and frustration.

  This is no longer the case: when a service is already being started/stopped,
  additional invocation of ‘herd start’ or ‘herd stop’ now block until the
  service is running/stopped.

  ** ‘shepherd’ starts services in parallel

  Services started with ‘start-in-the-background’ and more generally service
  dependencies get started in parallel.  This can reduce startup times in case
  of a “wide” service dependency graph with some services that take a while to
  start.

  ** ‘shepherd’ keeps track of failures and status change times

  For each service, shepherd maintains an event log including the time of recent
  status changes as well as the time of startup failures, if any.  The ‘herd
  status SERVICE’ command now shows the time when the service entered its
  current status and whether it failed to start; ‘herd status’ also prominently
  lists services that failed to start.

  ** New ‘herd log’ command

  Related to the previous item, the new ‘herd log’ command displays an aggregate
  of the service event logs, showing the time at which each service changed
  statuses.

  ** New ‘herd graph’ command

  The new ‘herd graph’ command emits a Graphviz/Dot representation of the
  service dependency graph, which can be viewed for example with ‘xdot’:

herd graph | xdot -

  Guix System users get similar information with ‘guix system shepherd-graph’
  (and likewise for Guix Home).  The difference here is that this reflects the
  current 

GNU Guile 3.0.9 released

2023-01-25 Thread Ludovic Courtès
We are pleased to announce GNU Guile release 3.0.9, the latest in the
3.0 stable release series, corresponding to 138 commits by 27 people
since 3.0.8.

This release provides many bug fixes as well as new functionality,
including new bindings to POSIX interfaces.  See the ‘NEWS’ excerpt
below for details.

Compared to the previous stable series (2.2.x), Guile 3.0 adds support
for just-in-time native code generation, speeding up all Guile programs.


Guile is an implementation of the Scheme programming language, packaged
for use in a wide variety of environments.  In addition to implementing
the R5RS, R6RS, and R7RS Scheme standards, Guile includes full access to
POSIX system calls, networking support, multiple threads, dynamic
linking, a foreign function call interface, powerful string processing,
and HTTP client and server implementations.

Guile can run interactively, as a script interpreter, and as a Scheme
compiler to VM bytecode.  It is also packaged as a library so that
applications can easily incorporate a complete Scheme interpreter/VM.
An application can use Guile as an extension language, a clean and
powerful configuration language, or as multi-purpose "glue" to connect
primitives provided by the application.  It is easy to call Scheme code
from C code and vice versa.  Applications can add new functions, data
types, control structures, and even syntax to Guile, to create a
domain-specific language tailored to the task at hand.

Check out the web page for more info and resources:

  https://gnu.org/software/guile

Guile 3.0.9 can be installed in parallel with Guile 2.2.x; see
http://www.gnu.org/software/guile/manual/html_node/Parallel-Installations.html.

Here are the compressed sources:
  https://ftp.gnu.org/gnu/guile/guile-3.0.9.tar.gz   (9.3MB)
  https://ftp.gnu.org/gnu/guile/guile-3.0.9.tar.lz   (5.2MB)
  https://ftp.gnu.org/gnu/guile/guile-3.0.9.tar.xz   (5.5MB)

Here are the GPG detached signatures:
  https://ftp.gnu.org/gnu/guile/guile-3.0.9.tar.gz.sig
  https://ftp.gnu.org/gnu/guile/guile-3.0.9.tar.lz.sig
  https://ftp.gnu.org/gnu/guile/guile-3.0.9.tar.xz.sig

Use a mirror for higher download bandwidth:
  https://www.gnu.org/order/ftp.html

Here are the SHA1 and SHA256 checksums:

6ce38ec3fefc19aa08d4662e9b054f7018a72004  guile-3.0.9.tar.gz
GFJQea0poNRtFcdlgbXZHIcCMBv9ghZm0uHRNyYWKBE  guile-3.0.9.tar.gz
bcc02997587cdd03a831ee8d7153cad92629dc3f  guile-3.0.9.tar.lz
vA7go2D7E5GcFOtuJFMxmt8eyZgojJk4KbzxePtIzJo  guile-3.0.9.tar.lz
bf6af1aac320a56233d4d8c0fbeb2c0dca474eab  guile-3.0.9.tar.xz
GiYlrHKyNm6VeS8/51j9Lfd1tARKkKSpeHMm5mwNdQ0  guile-3.0.9.tar.xz

The SHA256 checksum is base64 encoded, instead of the
hexadecimal encoding that most checksum tools default to.

Use a .sig file to verify that the corresponding file (without the
.sig suffix) is intact.  First, be sure to download both the .sig file
and the corresponding tarball.  Then, run a command like this:

  gpg --verify guile-3.0.9.tar.gz.sig

The signature should match the fingerprint of the following key:

  pub   rsa4096 2014-08-11 [SC]
3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
  uid   [ unknown] Ludovic Courtès 
  uid   [ unknown] Ludovic Courtès 
  uid   [ unknown] Ludovic Courtès (Inria) 

If that command fails because you don't have the required public key,
or that public key has expired, try the following commands to retrieve
or refresh it, and then rerun the 'gpg --verify' command.

  gpg --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

As a last resort to find the key, you can try the official GNU
keyring:

  wget -q https://ftp.gnu.org/gnu/gnu-keyring.gpg
  gpg --keyring gnu-keyring.gpg --verify guile-3.0.9.tar.gz.sig


This release was bootstrapped with the following tools:
  Autoconf 2.71
  Automake 1.16.5
  Libtool 2.4.7
  Gnulib v0.1-5703-g356a414e8c
  Makeinfo 7.0.1


Changes in 3.0.9 (since 3.0.8)

* Notable changes

* New interfaces and functionality

** New `spawn' procedure to spawn child processes

The new `spawn' procedure creates a child processes executing the given
program.  It lets you control the environment variables of that process
and redirect its standard input, standard output, and standard error
streams.

Being implemented in terms of `posix_spawn', it is more portable, more
robust, and more efficient than the combination of `primitive-fork' and
`execl'.  See "Processes" in the manual for details, and see the 2019
paper entitled "A fork() in the road" (Andrew Baumann et al.) for
background information.

`system*', as well as the `open-pipe' and `pipeline' procedures of
(ice-9 popen) are now implemented in terms of `posix_spawn' as well,
which fixes bugs such as redirects: <https://bugs.gnu.org/52835>.

** `open-file' now supports an "e" flag for O_CLOEXEC

Until now, the high-level `open-file' facility did not provide a way to
pass O_CLOEXEC to the underlying `open' call.  It can now be done by
appending "

GNU Guile 3.0.9 released

2023-01-25 Thread Ludovic Courtès
We are pleased to announce GNU Guile release 3.0.9, the latest in the
3.0 stable release series, corresponding to 138 commits by 27 people
since 3.0.8.

This release provides many bug fixes as well as new functionality,
including new bindings to POSIX interfaces.  See the ‘NEWS’ excerpt
below for details.

Compared to the previous stable series (2.2.x), Guile 3.0 adds support
for just-in-time native code generation, speeding up all Guile programs.


Guile is an implementation of the Scheme programming language, packaged
for use in a wide variety of environments.  In addition to implementing
the R5RS, R6RS, and R7RS Scheme standards, Guile includes full access to
POSIX system calls, networking support, multiple threads, dynamic
linking, a foreign function call interface, powerful string processing,
and HTTP client and server implementations.

Guile can run interactively, as a script interpreter, and as a Scheme
compiler to VM bytecode.  It is also packaged as a library so that
applications can easily incorporate a complete Scheme interpreter/VM.
An application can use Guile as an extension language, a clean and
powerful configuration language, or as multi-purpose "glue" to connect
primitives provided by the application.  It is easy to call Scheme code
from C code and vice versa.  Applications can add new functions, data
types, control structures, and even syntax to Guile, to create a
domain-specific language tailored to the task at hand.

Check out the web page for more info and resources:

  https://gnu.org/software/guile

Guile 3.0.9 can be installed in parallel with Guile 2.2.x; see
http://www.gnu.org/software/guile/manual/html_node/Parallel-Installations.html.

Here are the compressed sources:
  https://ftp.gnu.org/gnu/guile/guile-3.0.9.tar.gz   (9.3MB)
  https://ftp.gnu.org/gnu/guile/guile-3.0.9.tar.lz   (5.2MB)
  https://ftp.gnu.org/gnu/guile/guile-3.0.9.tar.xz   (5.5MB)

Here are the GPG detached signatures:
  https://ftp.gnu.org/gnu/guile/guile-3.0.9.tar.gz.sig
  https://ftp.gnu.org/gnu/guile/guile-3.0.9.tar.lz.sig
  https://ftp.gnu.org/gnu/guile/guile-3.0.9.tar.xz.sig

Use a mirror for higher download bandwidth:
  https://www.gnu.org/order/ftp.html

Here are the SHA1 and SHA256 checksums:

6ce38ec3fefc19aa08d4662e9b054f7018a72004  guile-3.0.9.tar.gz
GFJQea0poNRtFcdlgbXZHIcCMBv9ghZm0uHRNyYWKBE  guile-3.0.9.tar.gz
bcc02997587cdd03a831ee8d7153cad92629dc3f  guile-3.0.9.tar.lz
vA7go2D7E5GcFOtuJFMxmt8eyZgojJk4KbzxePtIzJo  guile-3.0.9.tar.lz
bf6af1aac320a56233d4d8c0fbeb2c0dca474eab  guile-3.0.9.tar.xz
GiYlrHKyNm6VeS8/51j9Lfd1tARKkKSpeHMm5mwNdQ0  guile-3.0.9.tar.xz

The SHA256 checksum is base64 encoded, instead of the
hexadecimal encoding that most checksum tools default to.

Use a .sig file to verify that the corresponding file (without the
.sig suffix) is intact.  First, be sure to download both the .sig file
and the corresponding tarball.  Then, run a command like this:

  gpg --verify guile-3.0.9.tar.gz.sig

The signature should match the fingerprint of the following key:

  pub   rsa4096 2014-08-11 [SC]
3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
  uid   [ unknown] Ludovic Courtès 
  uid   [ unknown] Ludovic Courtès 
  uid   [ unknown] Ludovic Courtès (Inria) 

If that command fails because you don't have the required public key,
or that public key has expired, try the following commands to retrieve
or refresh it, and then rerun the 'gpg --verify' command.

  gpg --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

As a last resort to find the key, you can try the official GNU
keyring:

  wget -q https://ftp.gnu.org/gnu/gnu-keyring.gpg
  gpg --keyring gnu-keyring.gpg --verify guile-3.0.9.tar.gz.sig


This release was bootstrapped with the following tools:
  Autoconf 2.71
  Automake 1.16.5
  Libtool 2.4.7
  Gnulib v0.1-5703-g356a414e8c
  Makeinfo 7.0.1


Changes in 3.0.9 (since 3.0.8)

* Notable changes

* New interfaces and functionality

** New `spawn' procedure to spawn child processes

The new `spawn' procedure creates a child processes executing the given
program.  It lets you control the environment variables of that process
and redirect its standard input, standard output, and standard error
streams.

Being implemented in terms of `posix_spawn', it is more portable, more
robust, and more efficient than the combination of `primitive-fork' and
`execl'.  See "Processes" in the manual for details, and see the 2019
paper entitled "A fork() in the road" (Andrew Baumann et al.) for
background information.

`system*', as well as the `open-pipe' and `pipeline' procedures of
(ice-9 popen) are now implemented in terms of `posix_spawn' as well,
which fixes bugs such as redirects: <https://bugs.gnu.org/52835>.

** `open-file' now supports an "e" flag for O_CLOEXEC

Until now, the high-level `open-file' facility did not provide a way to
pass O_CLOEXEC to the underlying `open' call.  It can now be done by
appending "

Guile-Gcrypt 0.4.0 released

2022-12-01 Thread Ludovic Courtès
I’m pleased to announce Guile-Gcrypt version 0.4.0:

  git clone https://notabug.org/cwebber/guile-gcrypt.git
  cd guile-gcrypt
  git checkout v0.4.0  # or 425554d4327eeeb60c39e3d4a1b7bc5e36b63953
  git tag -v v0.4.0

The ‘git tag -v’ command checks the authenticity of your checkout.
You may need to retrieve the signing key first:

  gpg --keyserver pool.sks-keyservers.net \
  --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

Guile-Gcrypt provides Guile 3.0/2.x bindings to the GNU Libgcrypt
cryptography library.  It provides modules for cryptographic hash
functions, message authentication codes (MAC), public-key cryptography,
strong randomness, and more.

Excerpt from the ‘NEWS’ file:

  * Changes in 0.4.0 (since 0.3.0)
  ** ‘base64-encode’ and ‘base64-decode’ now let you optionally control padding
  ** New supported algorithms added to (gcrypt hash)
  ** New supported algorithms added to (gcrypt mac)
  ** Improvements and fixes to the manual

Guile-Gcrypt does not currently wrap all the Libgcrypt API.  Your help
in improving it is very welcome!  For bug reports and patches, see:

  https://notabug.org/cwebber/guile-gcrypt

Plain email to Chris or myself or guile-user would also work fine.  :-)

Ludo’.


signature.asc
Description: PGP signature


GNU Shepherd 0.9.3 released

2022-11-17 Thread Ludovic Courtès
We are pleased to announce the GNU Shepherd version 0.9.3.  This is a
bug-fix release, representing 16 commits by 1 person over 2 months.


• About

  The GNU Daemon Shepherd or GNU Shepherd is a service manager written
  in Guile that looks after the herd of system services.  It provides
  dependency-based management for system services: daemons such as
  ‘sshd’, programs such as Xorg, as well as user-provided actions.  The
  GNU Shepherd may also be used by unprivileged users to manage per-user
  daemons—e.g., tor, privoxy, mcron, etc.  It is written in Guile
  Scheme, and is configured and extended using Guile.

  The GNU Shepherd is developed jointly with the GNU Guix project; it is
  used as the init system of Guix, GNU’s advanced GNU/Linux distribution.

  https://www.gnu.org/software/shepherd/


• Download

  Here are the compressed sources and a GPG detached signature[*]:
https://ftp.gnu.org/gnu/shepherd/shepherd-0.9.3.tar.gz
https://ftp.gnu.org/gnu/shepherd/shepherd-0.9.3.tar.gz.sig

  Use a mirror for higher download bandwidth:
https://ftpmirror.gnu.org/shepherd/shepherd-0.9.3.tar.gz
https://ftpmirror.gnu.org/shepherd/shepherd-0.9.3.tar.gz.sig

  Here are the SHA1 and SHA256 checksums:

  bb6694367f5f0a620c4999050133dad6d3754ecf  shepherd-0.9.3.tar.gz
  62b0e5637c11178cb3523e04614a67b137f8627ee7d358ac2ac0c13e02f6c263  
shepherd-0.9.3.tar.gz

  [*] Use a .sig file to verify that the corresponding file (without the
  .sig suffix) is intact.  First, be sure to download both the .sig file
  and the corresponding tarball.  Then, run a command like this:

gpg --verify shepherd-0.9.3.tar.gz.sig

  If that command fails because you don't have the required public key,
  then run this command to import it:

gpg --keyserver keys.openpgp.org \
--recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

  and rerun the 'gpg --verify' command.

  This release was bootstrapped with the following tools:
Autoconf 2.71
Automake 1.16.5
Makeinfo 7.0
Help2man 1.48.5


• Changes since version 0.9.2 (excerpt from the NEWS file)

  ** Service ‘stop’ is now synchronous
 

  Previously, ‘herd stop SERVICE’ would send SIGTERM to the service’s process
  and immediately move on without waiting for the process to actually terminate.
  This could cause problems for example when running ‘herd restart SERVICE’:
  there was a possibility that a new instance of the service would be spawned
  before the previous one had terminated.

  This is now fixed: ‘stop’ only returns once the process has actually
  terminated.  Furthermore, the destructor returned by ‘make-kill-destructor’
  sends SIGKILL after some grace period has expired if the process is still
  around; this is configurable with #:grace-period and
  ‘default-process-termination-grace-period’.

  ** Non-blocking replacement for ‘system*’
 .

  Service code can now call ‘system*’ lightheartedly: shepherd installs a
  cooperative, non-blocking replacement for Guile’s ‘system*’ procedure.
  Concretely, it means that it’s OK to use ‘system*’, say, in the ‘start’ method
  of a service: it won’t block shepherd, one can still interact with it with
  ‘herd’.

  ** Fewer continuation barriers

  The ‘stop’ method of services, and ‘eval’ and ‘load’ actions of the ‘root’
  service, and a few other points acted as “continuation barriers”, meaning that
  user code would not be allowed to suspend the current fiber for example by
  calling the ‘sleep’ procedure from (fiber).  These limitations have been
  lifted.

  ** Reduced memory consumption while logging

  Service output logging allocates less memory than before.

  ** Updated translations: ro, sr


Please report bugs to bug-g...@gnu.org.
Join guix-de...@gnu.org for discussions.

Ludovic, on behalf of the Shepherd herd.


signature.asc
Description: PGP signature


Heap profiler

2022-11-07 Thread Ludovic Courtès
Hello Guilers,

While desperately chasing <https://issues.guix.gnu.org/59021> and
related memory leak issues, I came up with the attached rudimentary heap
profiler.  You can load it and invoking it in a running process:

--8<---cut here---start->8---
scheme@(guile-user)> (profile-heap)
  %   type   selfavg obj size
 19.7 pair  720,86416.0
 16.3 unknown   594,832   600.8
 14.7 struct536,78448.2
 12.6 bytevector461,824  1110.2
  7.7 stringbuf 281,136   117.8
  6.8 pointer   248,68816.0
  5.5 vector202,81535.4
  4.1 symbol148,64032.0
  3.1 program   113,82440.0
  1.6 heap-number59,68031.8
  1.5 string 54,96032.0
  1.4 smob   52,73638.0
  1.3 variable   49,32822.6
  0.8 weak-table 30,14430.4
  0.8 atomic-box 28,52832.1
  0.8 vm-continuation27,68032.0
  0.7 hash-table 26,73632.1
  0.2 syntax  6,14448.0
  0.1 dynamic-state   4,208  1052.0
  0.1 primitive   2,88016.0
  0.1 weak-vector 1,98418.0
  0.0 keyword   75216.7
  0.0 bitvector 67235.4
  0.0 frame 62439.0
  0.0 primitive-generic 60832.0
  0.0 continuation  576   576.0
  0.0 fluid 20829.7
  0.0 array  9648.0
  0.0 weak-set   9648.0
  0.0 port   6432.0
sampled heap: 3.48865 MiB (heap size: 12.78906 MiB)
$5 = #t
--8<---cut here---end--->8---

It samples the GC-managed heap and counts the number and size of objects
of each type.  The “unknown” bit is anything that lacks a type tag, such
as stacks allocated for delimited continuations by ‘capture_stack’ in
libguile.

It gives a rough idea of what’s going on but of course it’s intrusive:
the profiling process itself allocates memory.  The next step will be to
run it from GDB so that it’s non-intrusive.

I’d be curious to know if people have developed similar tools in this
area.

Ludo’.

;;; Copyright © 2022 Ludovic Courtès 
;;;
;;; Distributed under the GNU Lesser General Public License, version 3 or (at
;;; your option) any later version.

(use-modules (system foreign)
 (system base types internal)
 ;; ((system base types) #:select (scm->object))
 (srfi srfi-1)
 (srfi srfi-9 gnu)
 (ice-9 match)
 (ice-9 control)
 (ice-9 format)
 (ice-9 rdelim)
 (ice-9 regex))

(define-immutable-record-type 
  (memory-mapping start end permissions name)
  memory-mapping?
  (start   memory-mapping-start)
  (end memory-mapping-end)
  (permissions memory-mapping-permissions)
  (namememory-mapping-name))

(define (memory-mappings pid)  ;based on Guile's 'gc-profile.scm'
  "Return an list of alists, each of which contains information about a memory
mapping of process @var{pid}.  This information is obtained by reading
@file{/proc/PID/maps} on Linux.  See `procs(5)' for details."

  (define mapping-line-rx
;; As of Linux 2.6.32.28, an `maps' line looks like this:
;; "0040-0041d000 r--p  fd:00 7926441  /bin/cat".
(make-regexp
 "^([[:xdigit:]]+)-([[:xdigit:]]+) ([rwx-]{3}[ps]) ([[:xdigit:]]+) 
(fd|[[:xdigit:]]{2}):[[:xdigit:]]{2} [0-9]+[[:blank:]]+(.*)$"))

  (call-with-input-file (format #f "/proc/~a/maps" pid)
(lambda (port)
  (let loop ((result '()))
(match (read-line port)
  ((? eof-object?)
   (reverse result))
  (line
   (cond ((regexp-exec mapping-line-rx line)
  =>
  (lambda (match)
(let ((start (string->number (match:substring match 1)
 16))
  (end   (string->number (match:substring match 2)
 16))
  (perms (match:substring match 3))
  (name  (match:substring match 6)))
  (loop (cons (memory-mapping

GNU Shepherd 0.9.2 released

2022-09-10 Thread Ludovic Courtès
We are pleased to announce the GNU Shepherd version 0.9.2.  This is a
bug-fix release, representing 27 commits by 2 people over 4 months.


• About

  The GNU Daemon Shepherd or GNU Shepherd is a service manager written
  in Guile that looks after the herd of system services.  It provides
  dependency-based management for system services: daemons such as
  ‘sshd’, programs such as Xorg, as well as user-provided actions.  The
  GNU Shepherd may also be used by unprivileged users to manage per-user
  daemons—e.g., tor, privoxy, mcron, etc.  It is written in Guile
  Scheme, and is configured and extended using Guile.

  The GNU Shepherd is developed jointly with the GNU Guix project; it is
  used as the init system of Guix, GNU’s advanced GNU/Linux distribution.

  https://www.gnu.org/software/shepherd/


• Download

  Here are the compressed sources and a GPG detached signature[*]:
https://ftp.gnu.org/gnu/shepherd/shepherd-0.9.2.tar.gz
https://ftp.gnu.org/gnu/shepherd/shepherd-0.9.2.tar.gz.sig

  Use a mirror for higher download bandwidth:
https://ftpmirror.gnu.org/shepherd/shepherd-0.9.2.tar.gz
https://ftpmirror.gnu.org/shepherd/shepherd-0.9.2.tar.gz.sig

  Here are the SHA1 and SHA256 checksums:

  b8861f58596f0938375d1a13ab4142f6dca50340  shepherd-0.9.2.tar.gz
  e192bbaac3d38e3a1fcb5624c0a925758abfd0b43bac4c88b6770df8fcf08b55  
shepherd-0.9.2.tar.gz

  [*] Use a .sig file to verify that the corresponding file (without the
  .sig suffix) is intact.  First, be sure to download both the .sig file
  and the corresponding tarball.  Then, run a command like this:

gpg --verify shepherd-0.9.2.tar.gz.sig

  If that command fails because you don't have the required public key,
  then run this command to import it:

gpg --keyserver keys.openpgp.org \
--recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

  and rerun the 'gpg --verify' command.

  This release was bootstrapped with the following tools:
Autoconf 2.71
Automake 1.16.5
Makeinfo 6.7
Help2man 1.48.5


• Changes since version 0.9.1 (excerpt from the NEWS file)

  ** File descriptors used internally are now all marked as close-on-exec

  Previously, services started indirectly with ‘exec-command’ (which is usually
  the case) would not inherit any file descriptor from shepherd because
  ‘exec-command’ would explicitly close all of them.  However, services started
  with ‘make-system-constructor’ and processes created by some other means, such
  as calling ‘system*’, would inherit some of those descriptors, giving them
  more authority than intended.

  The change here consists in marking all internally-used file descriptors as
  “close-on-exec” (O_CLOEXEC), a feature that’s been available on GNU/Linux and
  GNU/Hurd for years but that so far wasn’t used consistently in shepherd.  This
  is now fixed.  As a side-effect, the file-descriptor-closing loop in
  ‘exec-command’ is now gone.

  ** Client connections with ‘herd’ are non-blocking

  Previously, a misbehaving client could send an incomplete command
  (s-expression), causing shepherd to hang while waiting for completion.  (Note
  that said client is required to run with the same UID as shepherd, so this was
  not a security issue.)

  ** Directory of log file is created if it doesn’t exist

  When a service constructor is passed ‘#:log-file "/var/log/foo/bar.log"’,
  shepherd now created /var/log/foo if it doesn’t exist; previously it would
  fail gracelessly.


Please report bugs to bug-g...@gnu.org.
Join guix-de...@gnu.org for discussions.

Ludovic, on behalf of the Shepherd herd.

[[End of PGP Signed Part]]


signature.asc
Description: PGP signature


Re: mmap for guile

2022-07-21 Thread Ludovic Courtès
Hi,

Maxime Devos  skribis:

> Ludovic Courtès schreef op ma 04-07-2022 om 12:09 [+0200]:
>> I don’t think the optimizer makes any such assumption, except for
>> literal bytevectors.
>
> It _does_ assume that bytevector lengths don't change:

[...]

> As can be seen in the above output, it first determines
> the length of the bytevector and then compares it again the index
> (for the index check) and then actually reads th byte
> so it assumes that the length doesn't change in-between -- it's not an
> atomic operation!

Oh right.

> Even if it didn't, being able to assume bytevector lengths don't change
> is important for optimising code like (begin (bytevector-ref bv 9000) 
> (bytevector-ref 8999) ...)),
> to optimise out many range checks, though I don't know if Guile currently
> does that.

Indeed.

Ludo’.



Re: mmap for guile

2022-07-04 Thread Ludovic Courtès
Hi,

Greg Troxel  skribis:

> Ludovic Courtès  writes:
>
>> Besides what Maxime points out, some more superficial issues:
>>
>>   • In documentation, please refer to the relevant glibc section instead
>> of “See man page” (info "(libc) Memory-mapped I/O").
>>
>>   • Please update doc/ref with a section on memory-mapped I/O.
>>
>>   • Make sure to follow the GNU coding in C: space before opening paren,
>> braces on a line of their own, etc.
>
> I have been meaning to try to build this under NetBSD, to check
> portability. I think the mmap code should by default rely only on what
> POSIX guarantees:
>   https://pubs.opengroup.org/onlinepubs/9699919799/functions/mmap.html

Agreed.

> As for referring to glibc, that reference only resolves on GNU/Linux
> systems, whereas any POSIX system ought to have an mmap man page, so it
> would be nice not to drop the man page ref, esp. as it grounds the
> implementation as being about the POSIX interface.

The manual can mention the man page too, sure, but note that the manual
already refers to glibc’s for all things libc.

Ludo’.



Re: mmap for guile

2022-07-04 Thread Ludovic Courtès
Hello,

Having ‘mmap’ bindings would be much welcome.

Maxime Devos  skribis:

> +SCM_DEFINE (scm_mmap_search, "mmap/search", 2, 4, 0, 
> +(SCM addr, SCM len, SCM prot, SCM flags, SCM fd, SCM
> offset),
> + "See the unix man page for mmap.  Returns a bytevector.\n"
> + "Note that the region allocated will be searched by the
> garbage\n"
> + "collector for pointers.  Defaults:\n"
>
> I think it would be a good idea to document it will be automatically
> unmapped during GC, as this is a rather low-leel interface

Agreed.

I was wondering about offering an explicit ‘munmap’ interface: it would
be useful for fine-grain OS resource management, just like ‘close-fdes’.

Doing that naively would mean that one can trivially get a pure Scheme
program to segfault, which is contrary to what we do.

But we could provide special semantics: the bytevector would become
zero-length (possible, but weird, as Maxime points out), or it would be
turned into a /dev/zero mapping (weird as well).

Thoughts?

> Also, what if you mmap a region, use bytevector->pointer and pass it to
> some C thing, which saves the pointer somewhere where boehm-gc can find
> it and boehm-gc considers it to be live, is there something that
> prevents boehm-gc from improperly calling the finalizer & unmapping the
> region, causing a dangling pointer?

There’s a risk, but I don’t think it’s specific to mmap.

> Also, WDYT of using ports instead of raw fds in the API?  That would
> play nicer with move->fdes etc.

Agreed.

>>+  /* Invalidate further work on this bytevector. */
>>+  SCM_BYTEVECTOR_SET_LENGTH (bvec, 0);
>>+  SCM_BYTEVECTOR_SET_CONTENTS (bvec, NULL);
>
> Possibly Guile's optimiser assumes that bytevectors never change in
> length (needs to be checked).  So unless the relevant optimiser code is
> changed, and it is documented that bytevectors can change in length, I
> think it would be safer to not have an unmapping procedure in Scheme
> (though a procedure for remapping it as /dev/zero should be safe).

I don’t think the optimizer makes any such assumption, except for
literal bytevectors.

Besides what Maxime points out, some more superficial issues:

  • In documentation, please refer to the relevant glibc section instead
of “See man page” (info "(libc) Memory-mapped I/O").

  • Please update doc/ref with a section on memory-mapped I/O.

  • Make sure to follow the GNU coding in C: space before opening paren,
braces on a line of their own, etc.

Since you already have a copyright assignment on file, there won’t be
administrative delays, which is a good thing.  :-)

I hope we can have those ‘mmap’ bindings soonish!

Thanks,
Ludo’.




GNU Shepherd 0.9.1 released

2022-05-22 Thread Ludovic Courtès
We are pleased to announce the GNU Shepherd version 0.9.1.  This is a
bug-fix release, including a backward-compatible interface change,
representing 18 commits by 2 people over 6 weeks.


• About

  The GNU Daemon Shepherd or GNU Shepherd is a service manager written
  in Guile that looks after the herd of system services.  It provides a
  replacement for the service-managing capabilities of SysV-init (or any
  other init) with a dependency-based system with a convenient
  interface.  The GNU Shepherd may also be used by unprivileged users to
  manage per-user daemons (e.g., tor, privoxy, mcron, etc.)  It is
  written in Guile Scheme, and is configured and extended using Guile.

  The GNU Shepherd is developed jointly with the GNU Guix project; it is
  used as the init system of Guix, GNU’s advanced GNU/Linux distribution.

  https://www.gnu.org/software/shepherd/


• Download

  Here are the compressed sources and a GPG detached signature[*]:
https://ftp.gnu.org/gnu/shepherd/shepherd-0.9.1.tar.gz
https://ftp.gnu.org/gnu/shepherd/shepherd-0.9.1.tar.gz.sig

  Use a mirror for higher download bandwidth:
https://ftpmirror.gnu.org/shepherd/shepherd-0.9.1.tar.gz
https://ftpmirror.gnu.org/shepherd/shepherd-0.9.1.tar.gz.sig

  Here are the SHA1 and SHA256 checksums:

  52bcd330ba7b4c77d4183d58d0a8d1b798761ff6  shepherd-0.9.1.tar.gz
  66b447fbfeed6b0b96f7efc671b146b686bde9f5b6c39b6647887bfd8ccd4a50  
shepherd-0.9.1.tar.gz

  [*] Use a .sig file to verify that the corresponding file (without the
  .sig suffix) is intact.  First, be sure to download both the .sig file
  and the corresponding tarball.  Then, run a command like this:

gpg --verify shepherd-0.9.1.tar.gz.sig

  If that command fails because you don't have the required public key,
  then run this command to import it:

gpg --keyserver keys.openpgp.org \
--recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

  and rerun the 'gpg --verify' command.

  This release was bootstrapped with the following tools:
Autoconf 2.71
Automake 1.16.5
Makeinfo 6.7
Help2man 1.48.5


• Changes since version 0.9.0 (excerpt from the NEWS file)

  ** ‘make-inetd-constructor’ now accepts a list of endpoints

  In 0.9.0, ‘make-inetd-constructor’ would take a single address as returned by
  ‘make-socket-address’.  This was insufficiently flexible since it didn’t let
  you have an inetd service with multiple endpoints.  ‘make-inetd-constructor’
  now takes a list of endpoints, similar to what ‘make-systemd-constructor’
  already did.

  For compatibility with 0.9.0, if the second argument to
  ‘make-systemd-constructor’ is an address, it is automatically converted to a
  list of endpoints.  This behavior will be preserved for at least the whole
  0.9.x series.

  ** ‘AF_INET6’ endpoints are now interpreted as IPv6-only

  In 0.9.0, using an ‘AF_INET6’ endpoint for ‘make-systemd-constructor’ would
  usually have the effect of making the service available on both IPv6 and IPv4.
  This is due to the default behavior of Linux, which is to bind IPv6 addresses
  as IPv4 as well (the default behavior can be changed by running
  ‘sysctl net.ipv6.bindv6only 1’).

  ‘AF_INET6’ endpoints are now interpreted as IPv6-only.  Thus, if a service is
  to be made available both as IPv6 and IPv4, two endpoints must be used.

  ** ‘shepherd’ reports whether a service is transient
  ** ‘herd status’ shows whether a service is transient
  ** Fix possible file descriptor leak in ‘make-inetd-constructor’
 ()
  ** Fix value of ‘LISTEN_FDNAMES’ variable set by ‘make-systemd-constructor’
  ** Fix crash when logging IPv6 addresses
  ** ‘start-in-the-background’ returns *unspecified* instead of zero values

Please report bugs to bug-g...@gnu.org.
Join guix-de...@gnu.org for discussions.

Ludovic, on behalf of the Shepherd herd.


signature.asc
Description: PGP signature


GNU Shepherd 0.9.0 released

2022-04-06 Thread Ludovic Courtès
We are pleased to announce the GNU Shepherd version 0.8.1.  This release
represents 49 commits by 3 people, bringing a new concurrent,
event-driven core, improved logging, and on-demand service startup.


• About

  The GNU Daemon Shepherd or GNU Shepherd is a service manager written
  in Guile that looks after the herd of system services.  It provides a
  replacement for the service-managing capabilities of SysV-init (or any
  other init) with a dependency-based system with a convenient
  interface.  The GNU Shepherd may also be used by unprivileged users to
  manage per-user daemons (e.g., tor, privoxy, mcron, etc.)  It is
  written in Guile Scheme, and is configured and extended using Guile.

  The GNU Shepherd is developed jointly with the GNU Guix project; it is
  used as the init system of Guix, GNU’s advanced GNU/Linux distribution.

  https://www.gnu.org/software/shepherd/


• Download

  Here are the compressed sources and a GPG detached signature[*]:
https://ftp.gnu.org/gnu/shepherd/shepherd-0.9.0.tar.gz
https://ftp.gnu.org/gnu/shepherd/shepherd-0.9.0.tar.gz.sig

  Use a mirror for higher download bandwidth:
https://ftpmirror.gnu.org/shepherd/shepherd-0.9.0.tar.gz
https://ftpmirror.gnu.org/shepherd/shepherd-0.9.0.tar.gz.sig

  Here are the SHA1 and SHA256 checksums:

  df84c15e21b00e6237af1c243ff77dfee2373626  shepherd-0.9.0.tar.gz
  c180778397694fccc051606d97ab646c8cb07e9d65712e21f154e8155986bce5  
shepherd-0.9.0.tar.gz

  [*] Use a .sig file to verify that the corresponding file (without the
  .sig suffix) is intact.  First, be sure to download both the .sig file
  and the corresponding tarball.  Then, run a command like this:

gpg --verify shepherd-0.9.0.tar.gz.sig

  If that command fails because you don't have the required public key,
  then run this command to import it:

gpg --keyserver keys.openpgp.org \
--recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

  and rerun the 'gpg --verify' command.

  This release was bootstrapped with the following tools:
Autoconf 2.71
Automake 1.16.5
Makeinfo 6.7
Help2man 1.48.5


• Changes since version 0.8.1 (excerpt from the NEWS file)

  ** The Shepherd now depends on Fibers 1.1.0 or later
  ** ‘shepherd’ no longer blocks when waiting for PID files, etc.
  ** Services without #:log-file have their output written to syslog
  ** Services with #:log-file have their output timestamped
  ** New ‘make-inetd-constructor’ procedure for inetd-style services
  ** New ‘make-systemd-constructor’ for systemd-style “socket activation”
  ** New ‘start-in-the-background’ procedure
  ** Services can now be “transient” (see the manual for details)
  ** New #:supplementary-groups parameter for ‘make-forkexec-constructor’
  ** New #:create-session? parameter for ‘make-forkexec-constructor’
  ** New #:resource-limits parameter for ‘make-forkexec-constructor’
  ** Log file of unprivileged ‘shepherd’ is now under $XDG_DATA_DIR
  ** Do not reboot upon ‘quit’ when running as root but not PID 1
  ** Improved documentation and examples
  ** The Shepherd can no longer be built with Guile 2.0
  ** Work around Guile 3.0.[5-7] compiler bug
 ()
  ** Updated translations: da, de, sv, uk

Please report bugs to bug-g...@gnu.org.
Join guix-de...@gnu.org for discussions.

Ludovic, on behalf of the Shepherd herd.


signature.asc
Description: PGP signature


Re: Syntax locations are ambiguous: can we track source 'offset' and 'length'?

2021-08-04 Thread Ludovic Courtès
Hi,

Vivien Kraus  skribis:

> Ludovic Courtès writes:
>>> I am trying to use the guile reader to read scheme comments, in
>>> addition to the syntax elements. I know with syntax-source where a
>>> syntax object starts, and I can know where it ends by using a spying
>>> soft port and re-reading it. However, the #\return ambiguity makes all
>>> my efforts pointless.
>>
>> As you know, ‘read-syntax’ appeared in 3.0.7, so it’s brand new and we
>> could certainly extend (ice-9 read) with more features, including
>> reading comments.
> I did not know that, to be honest.
>
>> In the meantime, I needed the ability to read comments in Guix,
>> including with Guile < 3.0.7, so I hacked up this thing:
>>
>>   
>> https://git.savannah.gnu.org/cgit/guix.git/tree/guix/scripts/style.scm?h=core-updates=8419221620191d2988c22f6e7811d9ce1e0837bf#n50
>>
>> It can read and write while preserving comments.
> I was tempted not to use the guile reader and go and implement a new
> reader like you did, but I was too afraid to miss one important thing in
> the syntax.

This hack is layered on top of the real ‘read’, so it cannot miss
things.

> I’m happy to see this pretty-print-with-comments function. I want guile
> to have a tool that can automatically reformat scheme code, to avoid
> indentation problems with code reviews and pointless discussions about
> style. We could even tweak text editors to convert between different
> styles for viewing the source and for git commits. I’m sure wisp people
> would like it. I hope to see "guix style" one day :)

It *is* ‘guix style’.  :-)

Currently the command is focusing on one very specific style issue, but
we could certainly expand it for more general formatting.

Ludo’.



Re: Syntax locations are ambiguous: can we track source 'offset' and 'length'?

2021-08-04 Thread Ludovic Courtès
Hi Vivien,

Vivien Kraus via General Guile related discussions 
skribis:

> I am trying to use the guile reader to read scheme comments, in
> addition to the syntax elements. I know with syntax-source where a
> syntax object starts, and I can know where it ends by using a spying
> soft port and re-reading it. However, the #\return ambiguity makes all
> my efforts pointless.

As you know, ‘read-syntax’ appeared in 3.0.7, so it’s brand new and we
could certainly extend (ice-9 read) with more features, including
reading comments.

In the meantime, I needed the ability to read comments in Guix,
including with Guile < 3.0.7, so I hacked up this thing:

  
https://git.savannah.gnu.org/cgit/guix.git/tree/guix/scripts/style.scm?h=core-updates=8419221620191d2988c22f6e7811d9ce1e0837bf#n50

It can read and write while preserving comments.

Again, we could/should probably integrate that functionality in (ice-9
read) eventually, it shouldn’t be too hard.

Thanks,
Ludo’.




Re: Meaning of <=> in the context of procedures

2021-08-04 Thread Ludovic Courtès
Hi Mortimer,

Mortimer Cladwell  skribis:

> What does <=> mean/do?
> It can be found in guile-json in the (json record) module, line 33:
>
> 33 #:export (<=> define-json-mapping define-json-type))
>
> Not mentioned in the entire Guile manual. Happens to be defined on line 36
> of the module:
>
> 36  (define <=> '<=>)

I’m very late, but in short, ‘<=>’ is used a “syntactic keyword” in the
‘define-json-type’ macro (IOW, it’s among the “literals” of
‘syntax-rules’).

“Good practice” these days is that syntactic keywords should be bound.
This ‘define’ does just that: binding ‘<=>’.  Its actual value doesn’t
matter.

The advantage of that is that you can renaming bindings (with #:prefix
for instance), you can see when two syntactic bindings clash, and so on.

Quoth the manual (info "(guile) Syntax Rules"):

 A literal matches an input expression if the input expression is an
  identifier with the same name as the literal, and both are unbound(1).

 Although literals can be unbound, usually they are bound to allow
  them to be imported, exported, and renamed.  *Note Modules::, for more
  information on imports and exports.  In Guile there are a few standard
  auxiliary syntax definitions, as specified by R6RS and R7RS:

   -- Scheme Syntax: =>
   -- Scheme Syntax: _
   -- Scheme Syntax: ...
   Auxiliary syntax definitions.

   These are defined as if with a macro that never matches, e.g.:

(define-syntax else (syntax-rules ()))

HTH!

Ludo’.




Re: excpetion printing

2021-05-04 Thread Ludovic Courtès
Hi Matt,

Matt Wette  skribis:

> Is there any error I can throw in Guile that I don't catch myself
> but will result in a user-friendly error message at the top?  Not this:
>
> Throw to key `misc' with args `("read-yaml-file" "file not found: ~S"
> ("demo1x.yml") #f)'.

You can call ‘print-exception’ like so:

  (print-exception (current-error-port) frame key args)

This is using the pre-3.0 key+args exception style.

HTH,
Ludo’.




Guile-Git 0.5.1 released

2021-04-20 Thread Ludovic Courtès
Hi!

I’m pleased to announce Guile-Git 0.5.1!  Guile-Git is a GNU Guile
library to interact with Git repositories using libgit2.

Latest release:
  https://gitlab.com/guile-git/guile-git/-/tags/v0.5.1

Latest release tarball and OpenPGP detached signature:
  
https://gitlab.com/guile-git/guile-git/uploads/30be542d90619ca844dd3a3ed2e13808/guile-git-0.5.1.tar.gz
  
https://gitlab.com/guile-git/guile-git/uploads/87ca0d2e30d87b99308aa7eaa5fa755b/guile-git-0.5.1.tar.gz.sig

Repository:
  https://gitlab.com/guile-git/guile-git

Reporting issues:
  https://gitlab.com/guile-git/guile-git/issues

The ‘v0.5.1’ Git tag and the source code tarball above are signed.
Run ‘git tag -v v0.5.1’ to check the authenticity of your checkout.  To
check the authenticity of the tarball, download both the tarball and the
‘.sig’ file and run:

  gpg -v guile-git-0.5.1.tar.gz.sig

You may need to retrieve the signing key first:

  gpg --keyserver pool.sks-keyservers.net \
  --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5


* Changes in 0.5.1 (since 0.5.0)

** Bug fix

*** Fix crash when using ‘config-foreach’ or ‘config-fold’

This bug was reported at .  It could
lead to segmentation faults in ~tests/config.scm~ while running ~make
check~.


Enjoy!

Ludo’.


signature.asc
Description: PGP signature


Guile-Git 0.5.0 released

2021-04-13 Thread Ludovic Courtès
Hi!

I’m pleased to announce Guile-Git 0.5.0!  Guile-Git is a GNU Guile
library to interact with Git repositories using libgit2.

Latest release:
  https://gitlab.com/guile-git/guile-git/-/tags/v0.5.0

Latest release tarball and OpenPGP detached signature:
  
https://gitlab.com/guile-git/guile-git/uploads/30be542d90619ca844dd3a3ed2e13808/guile-git-0.5.0.tar.gz
  
https://gitlab.com/guile-git/guile-git/uploads/87ca0d2e30d87b99308aa7eaa5fa755b/guile-git-0.5.0.tar.gz.sig

Repository:
  https://gitlab.com/guile-git/guile-git

Reporting issues:
  https://gitlab.com/guile-git/guile-git/issues

The ‘v0.5.0’ Git tag and the source code tarball above are signed.
Run ‘git tag -v v0.5.0’ to check the authenticity of your checkout.  To
check the authenticity of the tarball, download both the tarball and the
‘.sig’ file and run:

  gpg -v guile-git-0.5.0.tar.gz.sig

You may need to retrieve the signing key first:

  gpg --keyserver pool.sks-keyservers.net \
  --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

Enjoy!

Ludo’.


signature.asc
Description: PGP signature


Re: [bootstrappable] Re: Can Guile be bootstrapped from source without psyntax-pp.scm?

2021-03-17 Thread Ludovic Courtès
Hi Michael,

Michael Schierl  skribis:

> Am 15.03.2021 um 18:09 schrieb Ludovic Courtès:
>> Woow, this is great news!  I think it would be great towards importing
>> it in Guile proper.
>>
>> To do that, I think we should first get Andy’s opinion on the approach.
>
> I don't think upstream is very interested in having psyntax-pp.scm
> bootstrappable. In Guile 3.0.3 they broke even the `make
> ice-9/psyntax-pp.scm.gen` target, and did not repair it even in Guile
> 3.0.5, that's why I used 3.0.2 for the bootstrap. But I included a patch
> to repair it in 3.0.5 in case you really want to bootstrap that version
> (psyntax-pp.scm has not changed there). OTOH, from the git log it seems
> like psyntax is currently being overhauled for the next release, so
> probably my code would need some updates for the next version.

Andy made it clear that it was a bug.  There’s an interest in providing
a good bootstrapping story for Guile; that’s why there’s an interpreter
written in C, for example.  I’m sure we’d be happy to address psyntax
bootstrapping as well!

> Also, in the last 15 years I avoided directly contributing to "GNU
> projects" (with FSF as copyright holder in the license headers), reasons
> below. But if anyone else takes my code and upstreams it, I won't object.

Sure, we can discuss the details of how to integrate your code.  (Guile
incorporates code not initially written for Guile, such as sxml or
(ice-9 match), and the policy is to not require copyright assignment for
such code.)

> Regardless, even when not part of Guile, I believe this code is very
> useful for both the live-bootstrap project and Guix to get their Guile
> bootstrapped. And even if nobody ever updates it for 3.0.6+, you can
> always bootstrap the later versions from an earlier Guile. And maybe a
> variation of it lands in GNU Mes, too.

Yes, that would be great.  We’ll have to take a closer look, but I’m
under the impression that a fruitful approach for Guile would be to have
it maintained in-tree; that would immediately benefit all distros.

Thanks!

Ludo’.

PS: Not all GNU packages require copyright assignment.  Guix doesn’t,
for instance, and we’d be happy to get your contributions.  :-)



Re: Guile-zlib 0.1.0 released

2021-03-15 Thread Ludovic Courtès
Hi Bengt,

Bengt Richter  skribis:

> [08:59 ~/wb/guile-zlib]$ gpg --keyserver pool.sks-keyservers.net \
>>   --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5
>
> gpg: key 090B11993D9AEBB5: 4 duplicate signatures removed
> gpg: key 090B11993D9AEBB5: 122 signatures not checked due to missing keys
> gpg: key 090B11993D9AEBB5: 4 signatures reordered
> gpg: key 090B11993D9AEBB5: "Ludovic Courtès " not changed
> gpg: Total number processed: 1
> gpg:  unchanged: 1
> [09:01 ~/wb/guile-zlib]$ 
> [09:01 ~/wb/guile-zlib]$ git tag -v v0.1.0
> object 429b3c65ee8946d7ced2353efb8710047fd29c57
> type commit
> tag v0.1.0
> tagger Ludovic Courtès  161317 +0100
>
> Guile-zlib 0.1.0.
> gpg: Signature made Fri 12 Mar 2021 02:21:57 PM CET
> gpg:using RSA key 3CE464558A84FDC69DB40CFB090B11993D9AEBB5
> gpg: Good signature from "Ludovic Courtès " [expired]
> gpg:     aka "Ludovic Courtès " [expired]
> gpg: aka "Ludovic Courtès (Inria) " 
> [expired]
> gpg: Note: This key has expired!
> Primary key fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5

Thanks for reporting it.

I’ve re-uploaded the key to pool.sks-keyservers.net.  Alternatively, one
can get it from keys.openpgp.org (though without user IDs) or from
<https://sv.gnu.org/people/viewgpg.php?user_id=15145>.

Ludo’.




Re: [bootstrappable] Re: Can Guile be bootstrapped from source without psyntax-pp.scm?

2021-03-15 Thread Ludovic Courtès
Hi Michael,

Michael Schierl  skribis:

> For the record, I have written a psyntax implementation that can be used
> by Guile (3.0.2) and does not require an expanded version of itself. It
> is not ideal (not fully hygienic and does not support with-ellipsis),
> but it works well enough to bootstrap a slightly patched version of
> psyntax.scm, which then can be used to bootstrap "the real thing" and
> then regenerate psyntax-pp.scm (resulting in a bit-for-bit identical
> version if you run the bootstrap on 64-bit Linux).
>
> The project is at
> .
>
> It may still contain some unnecessary code, and the patch for the
> patched vesion is definitely not minimal, but for now I'm glad that it
> works.

Woow, this is great news!  I think it would be great towards importing
it in Guile proper.

To do that, I think we should first get Andy’s opinion on the approach.
Then you could try to integrate the files into the Guile repo and adjust
the makefile machinery so that it uses this code to generate the initial
psyntax-pp.scm.

There may be additional things to look at, such as performance when
building from scratch.  We could still include the generated
psyntax-pp.scm in the tarball, like we do for some .go files, for those
who want a faster Guile build and are willing to make this tradeoff.

Thanks!

Ludo’.



Guile-zlib 0.1.0 released

2021-03-12 Thread Ludovic Courtès
Hi!

I’m pleased to announce the second release of Guile-zlib:

  git clone https://notabug.org/guile-zlib/guile-zlib
  cd guile-zlib
  git checkout v0.1.0  # or 429b3c65ee8946d7ced2353efb8710047fd29c57
  git tag -v v0.1.0

The ‘git tag -v’ command checks the authenticity of your checkout.
You may need to retrieve the signing key first:

  gpg --keyserver pool.sks-keyservers.net \
  --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

Guile-zlib provides Guile 3.0/2.x bindings to the zlib compression
library.

Changes since the previous release (excerpt from the ‘NEWS’ file):

  ** New procedures: ‘make-zlib-input-port’, ‘make-zlib-output-port’

 These procedures and the companion ‘call-with-zlib-*’ procedures
 provide an alternative to the ‘make-gzip-*’ and ‘call-with-gzip-*’
 procedures; unlike those, they operate on all types of ports, not
 just file ports.

 These procedures also support multiple formats: raw “deflate”,
 “zlib”, and “gzip”.

  ** New ‘compress’ and ‘uncompress’ procedures

 These procedures support compression/decompression of individual
 bytevectors.

You can report bugs and send patches to  or on the
web site:

  https://notabug.org/guile-zlib/guile-zlib

If you like Guile-zlib, you may also like these:

  https://notabug.org/guile-lzlib/guile-lzlib
  https://notabug.org/guile-zstd/guile-zstd

:-)

Ludo’.


signature.asc
Description: PGP signature


Re: Extensible effects in Guile

2021-03-08 Thread Ludovic Courtès
Hi,

Walter Lewis  skribis:

> After some sober editing and resolution of tech issues, I published
> the blog post:
>
> https://wklew.srht.site/posts/genshou/

I found it to be a super clear and inspiring read, nicely demystifying
this topic.  Thanks!

Ludo’.




Re: Guile Potluck 2021: QuickCheck

2021-03-08 Thread Ludovic Courtès
Hi Timothy,

Timothy Sample  skribis:

> For the potluck this year, I would like to present to you
> Guile-QuickCheck, which is a property-based testing library.  You can
> download it and see a brief example at
>
>   https://ngyro.com/software/guile-quickcheck.html

Yay, nice dish that you bring, thanks!  :-)

Ludo’.




Re: Seeking Advice on syntax/macros in separate files

2021-03-02 Thread Ludovic Courtès
Hi Andrew,

Andrew Burgess  skribis:

> My concerns are based on this page of the guile manual:
>
>   
> https://www.gnu.org/software/guile/manual/html_node/Compilation.html#Compilation
>
> specifically this:
>
>   "... Guile does not yet do proper dependency tracking, so that if
>   file a.scm uses macros from b.scm, and b.scm changes, a.scm would
>   not be automatically recompiled."

Yes.  Concretely, that means you can either use Makefiles or similar
(like with most other languages) or turn off auto-compilation (with
‘--no-auto-compile’ or with ‘GUILE_AUTO_COMPILE=0’).

> So, my current thinking is to wrap the invocation of the guile script
> in a shell script, which _always_ forces recompilation.  But, if I'm
> doing that, I may as well just disable compilation completely.  But
> this doesn't seem right.
>
> So, I'm sure I must be missing something here.  How do others deal
> with this situation?

Common practice is to have makefiles or similar as part of your
software.  When you run “make”, it runs ‘guild compile’ to compile all
your Scheme source; upon “make install”, both .scm and .go files are
installed.

Here’s an example that does that using the GNU autotools:

  https://notabug.org/cwebber/guile-gcrypt

For a pure Guile project, Guile Hall helps get started:

  https://gitlab.com/a-sassmannshausen/guile-hall

> - Am I missing an obvious solution for working with syntax/macros and
>   multiple files?
>
> - Am I wrong to think that syntax/macros are such a big part of the
>   language?  Should I be limiting syntax/macro usage to small scopes,
>   i.e. within a single file, and only true defines should be exposed
>   outside of a file?

Macros are very useful and a salient point of Scheme, but there are many
other things in the language.  :-)

> - Maybe Guile just isn't designed for writing large, multi-file
>   projects?

There are large projects written in Guile, such as Guix.

> - Maybe Guile projects are only ever shipped to users who are happy
>   managing the compile cache themselves, e.g. more power users, and
>   not really for general users?

Like I wrote, non-trivial projects often install .go files alongside
.scm files such that things never go through ~/.cache/guile.

HTH!

Ludo’.



Re: [ANN] (potato make) - makefiles in scheme

2021-02-26 Thread Ludovic Courtès
Hi Mike,

Mike Gran  skribis:

> I wrote a pure scheme Guile library (potato make) that lets one write
> makefiles in scheme.  The code lives at
> https://github.com/spk121/potato-make.
>
> If you are familiar with the cryptic makefile syntax, and with scheme
> syntax, you may be able to decipher this makefile written in potato
> make.  Here ':=' is variable assignment, ':' is a target rule and '->'
> is a suffix rule.  The '~' syntax is a lazy concatenation operator
> that passes its output as a string to the system() procedure.
>
>   #!/usr/bin/env sh
>   exec guile -s "$0" "$@"
>   !#
>
>   (use-modules (potato make))
>   (initialize)
>
>   (:= CC "gcc")
>   (:= CFLAGS "-g -O2")
>
>   (: "all" '("foo"))
>   (: "foo" '("foo.o" "bar.o")
> (~ ($ CC) "-o" $@ $^))
>   (-> ".c" ".o"
> (~ ($ CC) "-c" $<))
>
>   (execute)

Nice!

As you may know, Guix is reducing its “binary seeds” (pre-built binaries
used to bootstrap the whole distribution) so that everything can be
built from source.

Part of the strategy revolves around doing more things in Scheme on top
of Guile or Mes, and that’s why people wrote Gash (POSIX shell + core
utilities).  With a makefile parser, (potato make) could be a useful
addition!

Also, we could imagine adding a Guix backend to (potato make), such that
each target is built as a Guix “derivation”.

Food for thought…

Ludo’.




Re: Guix records

2021-02-26 Thread Ludovic Courtès
Hi,

Olivier Dion via General Guile related discussions 
skribis:

> In the module (guix records), there's some very nice syntax rule
> `define-record-type*` that allows very powerfull declarative style of
> records.  For example:
> --
> (employee
>   (age  30)
>   (name "Foo")
>   (profession "Teacher"))
> -- 
>
> I would like to use this feature in my software.  However, I don't want
> to have Guix as a dependency only for that.  For now, I've copied the
> content of (guix records) into (my-software records).  But this put
> burden of maitenance into my hands.

I think it’s a reasonable maintenance burden though, since it’s fairly
independent, it rarely changes, and you can always copy updated versions
from Guix when you want to.

That said, I agree it’s not ideal, and we should look towards making it
a standalone library.  I’m a bit reluctant to doing that just yet
because it’s convenient in Guix to be able to adjust it when we need it.

Thanks,
Ludo’.




Re: rfc: next guile 1.8.x release

2021-02-01 Thread Ludovic Courtès
Hi Massimiliano,

Thanks for the needs of TeXmacs this clearly.  A few comments below…

Massimiliano Gubinelli  skribis:

> all these three features point to weakness of various possible solutions
>
> 1) we do not need a Scheme with a lot of OS interfaces, this duplicate 
> functionalities in QT and in our own code. For example all the OS interaction 
> is dealt with internal functions (also because TeXmacs has its own virtual 
> filesystem). We do not need threads, GMP, etc... all these additional parts 
> add bloat without providing real useful functionalities.

Threads and bignums (GMP) were already in 1.8 though, and overall
libguile exposes about as much functionality today than in 1.8.  But I
can see that Qt and Guile are “competing” feature-wise.

> 2) it is better for us to have a Scheme which is not picky wrt. encodings. 

You can use binary output for when you just want to write bytes (info
"(guile) Binary I/O").

> 3) compiled schemes or schemes without first-class modules are more difficult 
> to adapt to our own flavour of scheme coding.

I don’t think this is necessarily the case.  Probably you’ll want a
.scm -> .go rule in your makefiles, but that’s about it.

> Currently I'm trying three different routes:
>
> - embed S7 (which is fast, dynamic and minimal and works everywhere)
> - go for Guile 3 (I've still problems with phasing of macro expansion and 
> bootstrap of our codebase. Will it work on Windows? Do we really need to 
> carry on all the code we do not use?)
> - go for Chez Scheme (like for Guile 3 problems with compilation phases and 
> bootstrap of our codebase. I'm more confident it will work on Windows and on 
> new architecture, it is more compact than Guile, essentially only the 
> compiler, I've still problems with the garbage collector at the level of C++ 
> interface).

It’s much easier to port from Guile to Guile than from Guile to
something else.  :-)

The extra “code you don’t use” in Guile can be seen as a weight, but
longer-term, it could also change the way you approach problems in
TeXmacs and the way you structure it.

Guile 3 can be embedded just like Guile 1, but it supports a much
broader range of applications by being faster and providing more tools.

Ludo’.



Re: rfc: next guile 1.8.x release

2021-01-29 Thread Ludovic Courtès
Hi!

Thien-Thi Nguyen  skribis:

> I would like to work (on the weekends, so as not to intefere w/
> ) on preparation and release of Guile 1.8.9, targeted
> for the ides of April (more or less).
>
> Guile 1.8.x users: What changes do you want to see in 1.8.9?
>
> Guile maintainers: Any tips (process, content, interop, etc)
> most welcome!

Guile 1.8 has been unmaintained for years and I wonder about the message
we’d be sending by publishing a bug-fix release 11 years and 3 major
versions later.

I know it still has two important users (LilyPond and TeXmacs), but it
doesn’t seem viable to me to go this route.

Ludo’.




Re: Guile-zstd 0.1.1 released

2021-01-04 Thread Ludovic Courtès
Hi,

"Dr. Arne Babenhauserheide"  skribis:

> Looking at the readme I get the feeling that two little helpers could be
> useful:
>
>(call-with-zstd-output-file "compressed.zstd"
>   (lambda (port)
> (define data
>   ;; Read the input file in memory.
>   (call-with-input-file "input-file.txt"
> get-bytevector-all))
>
> ;; Write data to PORT.
> (put-bytevector port data)))
>
>   (call-with-zstd-input-file "compressed.zst"
>   (lambda (port)
> ;; Read decompressed data from PORT.
> ...))
>
> Potentially with streaming added (if that’s possible from the library):
>
>(call-with-zstd-output-file "compressed.zstd"
>   (lambda (outport)
>   (call-with-input-file "input-file.txt"
>   (lambda (inport)
>   (let loop ((data (get-bytevector-some inport)))
> (when (not (eof-object? data))
>   (put-bytevector outport data)
>   (loop (get-bytevector-some inport

Yeah I kept it minimal; it’s actually the same interface as in
Guile-zlib and Guile-lzlib, which is pretty convenient.

Thanks,
Ludo’.




Guile-zstd 0.1.1 released

2020-12-27 Thread Ludovic Courtès
Ludovic Courtès  skribis:

> I’m pleased to announce the first release of Guile-zstd:

Oops, a file was missing from the repo, so here’s a brand new release!

  git clone https://notabug.org/guile-zstd/guile-zstd
  cd guile-zstd
  git checkout v0.1.1  # or f853c8eb81088f8fbf33d38e62cddea9a4984180
  git tag -v v0.1.1

Ludo’.


signature.asc
Description: PGP signature


Guile-zstd 0.1.0 released

2020-12-27 Thread Ludovic Courtès
Hi!

I’m pleased to announce the first release of Guile-zstd:

  git clone https://notabug.org/guile-zstd/guile-zstd
  cd guile-zstd
  git checkout v0.1.0  # or 0d830f53e2a2bb71799aeda4be7101a09d060f99
  git tag -v v0.1.0

The ‘git tag -v’ command checks the authenticity of your checkout.
You may need to retrieve the signing key first:

  gpg --keyserver pool.sks-keyservers.net \
  --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

Guile-zstd provides Guile 3.0/2.x bindings to the zstd (or “zstandard”)
compression library.

You can report bugs and send patches to  or on the
web site:

  https://notabug.org/guile-zstd/guile-zstd

If you like Guile-zstd, you may also like these:

  https://notabug.org/guile-lzlib/guile-lzlib
  https://notabug.org/guile-zlib/guile-zlib

:-)

Ludo’.


signature.asc
Description: PGP signature


Re: Unbound variable warning/exception

2020-12-20 Thread Ludovic Courtès
Hi,

Aleix Conchillo Flaqué  skribis:

> On Fri, Dec 18, 2020 at 5:26 PM Christopher Lam
>  wrote:
>>
>> Hi guilers, I saw in guix the incredibly useful unbound-variable exception
>> printer written by Ludovic. I've adapted for use in gnucash as
>> https://github.com/Gnucash/gnucash/commit/6f951784 -- there are now in
>> guile 3.0.4 many more unbound-var warnings than in 3.0.2 -- wouldn't it be
>> a useful hint to add to the warning in core guile as well?
>
> Wow, this is great!
>
> This should definitely be added to guile by default.

In Guix, the hint is displayed by an 'unbound-variable exception
handler, not by the 'unbound-variable printer; I think doing it in the
printer could be confusing.

Perhaps what could be done is export an 'unbound-variable handler that
does all this, and have the REPL use it?

Thanks,
Ludo’.




Re: Cross-compiling Guile 3.0.4

2020-12-15 Thread Ludovic Courtès
Hi Ivan,

Ivan Sokolov  skribis:

>   GUILEC language/elisp/boot.go
> Backtrace:
> In ice-9/boot-9.scm:
>   1736:10 17 (with-exception-handler _ _ #:unwind? _ # _)
> In unknown file:
>   16 (apply-smob/0 #)
> In ice-9/boot-9.scm:
> 718:2 15 (call-with-prompt _ _ #)
> In ice-9/eval.scm:
> 619:8 14 (_ #(#(#)))
> 155:9 13 (_ #(#(# ("comp?" ?)) #))
> In scripts/compile.scm:
> 258:4 12 (compile . _)
> In system/base/compile.scm:
>  84:6 11 (compute-compiler elisp bytecode 2 1 (#:warnings (#)))
> In system/base/language.scm:
> 63:11 10 (lookup-language elisp)
> In ice-9/threads.scm:
> 390:8  9 (_ _)
> In ice-9/boot-9.scm:
>   3223:13  8 (_)
> In ice-9/threads.scm:
> 390:8  7 (_ _)
> In ice-9/boot-9.scm:
>   3507:20  6 (_)
>2806:4  5 (save-module-excursion #)
>   3527:26  4 (_)
> In unknown file:
>3 (primitive-load-path "language/elisp/spec" #)
> In system/base/target.scm:
>  71:4  2 (with-native-target _)
> In system/base/compile.scm:
>206:22  1 (compile-and-load #f #:from _ #:to _ #:env _ # _ # _ # _ ?)
> In unknown file:
>0 (open-file #f "r" #:encoding #f #:guess-encoding #f)
>
> ERROR: In procedure open-file:
> Wrong type (expecting string): #f
> make[2]: *** [Makefile:2287: language/elisp/boot.go] Error 1
> make[2]: Leaving directory '/builddir/guile-3.0.4/module'

This corresponds to these lines in ‘modules/language/elisp/spec.scm’:

--8<---cut here---start->8---
(with-native-target
  (lambda ()
(compile-and-load (%search-load-path "language/elisp/boot.el")
  #:from 'elisp)))
--8<---cut here---end--->8---

The #f passed to ‘compile-and-load’ suggests that ‘boot.el’ was not
found in the search path.  Could it be that it’s been stripped from your
source?

(FWIW Guile 3.0.4 cross-builds fine on Guix.)

HTH,
Ludo’.




Re: ptobs for Guile 2.2+

2020-12-13 Thread Ludovic Courtès
Hi ttn,

Thien-Thi Nguyen  skribis:

> I'm trying to upgrade Guile-PG for Guile 2.2 (and possibly 3.0).
> It currently uses ptobs for the large object ("lobj") support in
> libpq, mostly for buffering and buffer synchronization.  I see
> in libguile/ports.h (Guile 2.0.13), however:
>
>  /* Hey you!  Yes you, reading the header file!  We're going to
> deprecate scm_ptobs in 2.2, so please don't write any new
> code that uses it.  Thanks.  */
>
> So, what do people do for "old" code that currently uses ptobs
> (i.e., for Guile 2.0 and earlier)?  Is there a recommended
> migration path (besides "give up" :-D)?  What am i missing?

Giving up sounds like a reasonable strategy to me at this point in
time.  :-)

If you want to do it anyway, I know GDB and GnuTLS have port code that
deals with both 2.0 and 2.2/3.0, perhaps that can help.

HTH,
Ludo’.




Re: Encoding for Robust Immutable Storage (ERIS) and Guile

2020-12-11 Thread Ludovic Courtès
Hello pukkamustard!

pukkamustard  skribis:

> I looked into block boundaries with a "sliding hash" (re-compute a
> short
> hash for every byte read and choose boundaries when hash is
> zero). This
> would allow a higher degree of de-duplication, but I found this to be
> a
> bit "finicky" (and myself too impatient to tune and tweak this :).
>
> I settled on fixed block sizes, making the encoding faster and
> preventing
> information leaks based on block size.

Yeah, sounds reasonable.  (I evaluated the benefits of this and other
approaches years ago, FWIW: .)

> An other idea to increase de-duplication: When encoding a directory,
> align files to the ERIS block size. This would allows de-duplication
> of
> files across encoded images/directories.

I guess that’d work, indeed.

>> Do I get it right that the encoder currently keeps blocks in memory?
>
> By default when using `(eris-encode content)`, yes. The blocks are
> stored into an alist.
>
> But the encoder is implemented as an SRFI-171 transducer that eagerly
> emits (reduces) encoded blocks. So one could do this:
>
> (eris-encode content #:block-reducer my-backend)
>
> Where `my-backend` is a SRFI-171 reducer that takes care of the blocks
> as soon as they are ready. The IPFS example implements a reducer that
> stores blocks to IPFS. By default `eris-encode` just uses `rcons` from
> `(srfi srfi-171)`.

Ah, I see, that’s great!  I’m not familiar with the transducer API so I
always have to think twice (or more) about what’s going on; the
flexibility it gives here is really nice.

> The encoding transducer is state-full. But it only keeps references to
> blocks in memory and at most log(n) at any moment, where n is the
> number of blocks to encode.
>
> The decoding interface currently looks likes this:
>
> (eris-decode->bytevector eris-urn
>  (lambda (ref) (get-block-from-my-backend ref)))

OK.

>> Do you have plans to provide an interface to the storage backend so
>> one
>> can easily switch between in-memory, Datashards, IPFS, etc.?
>
> Currently the interface is a bit "low-level" - provide a SRFI-171
> reducer. This can definitely be improved and I'd be happy for ideas on
> how to make this more ergonomic.

Maybe that’s all we need after all.  Maybe what would be nice is a
couple of examples, like a high-level procedure or CLI that can insert
or fetch from either (say) a local GDBM database or IPFS.  That would
illustrate integration with backends as well as the high-level API.

Thanks!

Ludo’.



Re: Encoding for Robust Immutable Storage (ERIS) and Guile

2020-12-09 Thread Ludovic Courtès
Hi!

pukkamustard  skribis:

> I'm happy to announce guile-eris 0.2.0. This is a Guile implementation
> of "Encoding for Robust Immutable Storage (ERIS)" [1].

Yay, congrats!

> ERIS defines how an arbirtary sequence of bytes can be encoded into a
> set
> of uniformly sized blocks and an identifier (read capability). The
> blocks are encrypted such that the original content can only be
> decoded
> given the read capability. ERIS is a scheme for content-addressing in
> the sense that the read capability is deterministically computed from
> the content itself.
>
> This is done by splitting content into blocks, encrypting them and
> collecting references to blocks in a higher-level node (i.e. building
> a
> Merkle Tree). See the specification [1] for a detailed description of
> the encoding.

AIUI, this is exclusively convergent encryption, which is probably the
right choice for most applications anyway.

Block size is fixed; did you consider content-defined block boundaries
and such?  Perhaps it doesn’t bring much though.

> Encodings like ERIS are common in protocols such as Bittorrent,
> GNUNet,
> IPFS, et. al. ERIS decouples the encoding from any particular protocol
> or application, allowing content to be referenced regardless of
> storage
> and transport layer. For example ERIS encoded content can be stored
> and
> transported over IPFS [2], but also over HTTP or via an USB stick.

The IPFS example is nice!  There are bindings to the IPFS HTTP interface
floating around for Guix; would be nice to converge on these bits.

> ERIS is still "experimental". This release is intended to initiate
> discussion and collect feedback from a wider circle. In particular I'd
> be interested in your thoughts on applications and the Guile API.

Do I get it right that the encoder currently keeps blocks in memory?

Do you have plans to provide an interface to the storage backend so one
can easily switch between in-memory, Datashards, IPFS, etc.?

Thanks for the great work!

Ludo’.




GNU Guix 1.2.0 released

2020-11-23 Thread Ludovic Courtès
We are pleased to announce the release of GNU Guix 1.2.0, which also
marks the eighth anniversary of Guix today.

This release corresponds to 10,248 commits over 6.5 months by 201 people.
It includes many new features, user interface and performance
improvements, as well as many bug fixes—see below for a list of changes.

Read more about today’s announcement at:

  https://guix.gnu.org/en/blog/2020/gnu-guix-1.2.0-released

• About

  GNU Guix is a transactional package manager and an advanced
  distribution of the GNU system that respects user freedom.  Guix can
  be used on top of any system running the Hurd or the Linux kernel, or
  it can be used as a standalone operating system distribution for i686,
  x86_64, ARMv7, and AArch64 machines.

  In addition to standard package management features, Guix supports
  transactional upgrades and roll-backs, unprivileged package
  management, per-user profiles, and garbage collection.  When used as a
  standalone GNU/Linux distribution, Guix offers a declarative,
  stateless approach to operating system configuration management.  Guix
  is highly customizable and hackable through Guile programming
  interfaces and extensions to the Scheme language.

  https://guix.gnu.org

• Download

  Here are the compressed sources and a GPG detached signature[*]:
https://ftp.gnu.org/gnu/guix/guix-1.2.0.tar.gz
https://ftp.gnu.org/gnu/guix/guix-1.2.0.tar.gz.sig

  Here are the bootable USB installation images and their signatures[*]:
https://ftp.gnu.org/gnu/guix/guix-system-install-1.2.0.i686-linux.iso.xz
https://ftp.gnu.org/gnu/guix/guix-system-install-1.2.0.i686-linux.iso.xz.sig
https://ftp.gnu.org/gnu/guix/guix-system-install-1.2.0.x86_64-linux.iso.xz

https://ftp.gnu.org/gnu/guix/guix-system-install-1.2.0.x86_64-linux.iso.xz.sig

  Here is the QCOW2 virtual machine (VM) image and its signature[*]:
https://ftp.gnu.org/gnu/guix/guix-system-vm-image-1.2.0.x86_64-linux.xz
https://ftp.gnu.org/gnu/guix/guix-system-vm-image-1.2.0.x86_64-linux.xz.sig

  Here are the binary tarballs and their signatures[*]:
https://ftp.gnu.org/gnu/guix/guix-binary-1.2.0.i686-linux.tar.xz
https://ftp.gnu.org/gnu/guix/guix-binary-1.2.0.i686-linux.tar.xz.sig
https://ftp.gnu.org/gnu/guix/guix-binary-1.2.0.x86_64-linux.tar.xz
https://ftp.gnu.org/gnu/guix/guix-binary-1.2.0.x86_64-linux.tar.xz.sig
https://ftp.gnu.org/gnu/guix/guix-binary-1.2.0.armhf-linux.tar.xz
https://ftp.gnu.org/gnu/guix/guix-binary-1.2.0.armhf-linux.tar.xz.sig
https://ftp.gnu.org/gnu/guix/guix-binary-1.2.0.aarch64-linux.tar.xz
https://ftp.gnu.org/gnu/guix/guix-binary-1.2.0.aarch64-linux.tar.xz.sig

  Use a mirror for higher download bandwidth:
https://www.gnu.org/order/ftp.html
  
  Here are the SHA256 checksums:

  5ecdf7ced25b1fb0ca7c57e794b7b60c8a7adcb15261dec2af37925c838c6d74  
guix-1.2.0.tar.gz
  639cd9f4d55d59819a96eda966794be191378347cd857d2a47cbab6087a4b759  
guix-binary-1.2.0.aarch64-linux.tar.xz
  101fe55a68217ba213d68b53cf1935fe7119406d5652243b3d651beb3cb43f62  
guix-binary-1.2.0.armhf-linux.tar.xz
  4ab083925be76cd4887e44de0a3bd37aa6c89b09a9cbc9d897d0f701dbb0ddf6  
guix-binary-1.2.0.i686-linux.tar.xz
  58fecdbaa8bec3795930879fad4cf7c31d3291c363b6cced18e4f7008d7e0282  
guix-binary-1.2.0.x86_64-linux.tar.xz
  230a5662a78741629775c97564418836242d094d4f8db866c9e395e982298ef4  
guix-system-install-1.2.0.i686-linux.iso.xz
  a6ecc45084e6f3f93c1ed5fc5c6d2b8b3338f3c1875ed6d89e996df62aa40455  
guix-system-install-1.2.0.x86_64-linux.iso.xz
  468ddc396ad42a2fee60ccd9d249b760ac498109deea8b1c6b5d0be9c16f2f82  
guix-system-vm-image-1.2.0.x86_64-linux.xz

  [*] Use a .sig file to verify that the corresponding file (without the
  .sig suffix) is intact.  First, be sure to download both the .sig file
  and the corresponding tarball.  Then, run a command like this:
  
gpg --verify guix-1.2.0.tar.gz.sig
  
  If that command fails because you don't have the required public key,
  then run this command to import it:

gpg --keyserver keys.openpgp.org \
--recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5
  
  and rerun the 'gpg --verify' command.

  To install the standalone Guix system, please see “System
  Installation” in the manual.  To install Guix on a running system, see
  “Installation” in the manual.

• Changes since version 1.1.0 (excerpt from the NEWS file)

  ** Package management
  *** ‘guix pull’ now crytographically authenticates channels
  *** ‘guix describe -f channels’ now shows “channel introductions”
  *** ‘guix describe -f channels-sans-intro’ omits channel introductions
  *** New ‘guix git authenticate’ command, to authenticate Git checkouts
  *** ‘guix pull’ and ‘guix system reconfigure’ detect attempts to downgrade
  *** New ‘--allow-downgrades’ option for ‘guix pull’ and ‘guix system’
  *** Guix build time reduced thanks to Guile 3.0.4’s “baseline compiler”
  *** New ‘--with-debug-info’ package transformation option
  *** New 

Skribilo 0.9.5 released

2020-11-01 Thread Ludovic Courtès
I am pleased to announce version 0.9.5 of Skribilo, a schemey document
authoring system.

  https://dl.sv.nongnu.org/releases/skribilo/skribilo-0.9.5.tar.gz
  https://dl.sv.nongnu.org/releases/skribilo/skribilo-0.9.5.tar.gz.sig

The SHA256 hashes for these two files are:

  00826a21c4634fb0b410ee89eb48068c445d800825874654e3d53d5ca3f0bf09  
skribilo-0.9.5.tar.gz
  e5ded90be7d06a7239e662c3d42588cde973b7e8bfb8c8c65d5a2e1566c608f6  
skribilo-0.9.5.tar.gz.sig

Documentation is available at:

  https://www.nongnu.org/skribilo/

Skribilo is a free document production tool that takes a structured
document representation as its input and renders that document in a
variety of output formats: HTML and Info for on-line browsing, and Lout,
LaTeX or ConTeXt for high-quality hard copies.

The input document can use Skribilo’s markup language to provide
information about the document’s structure, which is similar to HTML or
LaTeX and does not require expertise.  Alternatively, it can use a
simpler, “markup-less” format that borrows from Emacs’ outline mode and
from other conventions used in emails, Usenet, and text.

Skribilo can be thought of as a document programming framework for the
Scheme programming language that may be used to automate a variety of
document generation tasks.  It uses GNU Guile 3.0 or 2.x as the
underlying Scheme implementation.

Skribilo is a follow-up to Manuel Serrano’s and Érick Gallesio’s Skribe
(thank you!).  It is based on Skribe 1.2d but differs in important ways.

Excerpt from the ‘NEWS’ file:

  * New in Skribilo 0.9.5

  ** Skribilo now runs on Guile 3.0 (in addition to 2.x)
  ** Guile 1.8 is no longer supported

  ** ‘document’ markup supports :info-dir-category and :info-dir-entry

  These are honored by the Info engine, which uses them as the category
  and entry that show up in the Info “dir” file.

  ** Info engine: number sections and chapters
  ** Lout engine: recognize and replace more Unicode characters in the input

Thanks,
Ludovic.


signature.asc
Description: PGP signature


Re: guile-squee could probably use another maintainer

2020-10-13 Thread Ludovic Courtès
Hi,

Christopher Lemmer Webber  skribis:

> Well, cbaines now has commit access!
>
> So maybe that helps. :)

Nice, thanks Chris & Chris for the continued maintenance!

Ludo’.




Re: No Guile on Windows?

2020-08-29 Thread Ludovic Courtès
Linus Björnstam  skribis:

> TIL that guile 1.6 had 2.5% pascal code!

I don’t think so.  :-)  Probably a mistake of the tool that tries to
identify languages.  For
,
sloccount says:

--8<---cut here---start->8---
Totals grouped by language (dominant language first):
ansic:61318 (75.07%)
lisp: 15803 (19.35%)
sh:2796 (3.42%)
asm:   1514 (1.85%)
awk:199 (0.24%)
csh: 50 (0.06%)
--8<---cut here---end--->8---

Ludo’.




Re: No Guile on Windows?

2020-07-24 Thread Ludovic Courtès
Hi!

Eli Zaretskii  skribis:

> 
> Sadly, Guile seems to care only about one OS: GNU/Linux, and more or

Guile is software so it’s doesn’t care one way or the other ;-), but
it’s true that the maintainers and probably most contributors are
primarily concerned with GNU/Linux.

However, my understanding is that Windows Subsystem for Linux (WSL) has
the potential to make all of us happy.  For example, here’s info from
someone who got Guix to run on Windows/WSL2:

  https://gist.github.com/giuliano108/49ec5bd0a9339db98535bc793ceb5ab4

Running Guile alone should be easier.  Notably, I would expect a bundle
created with ‘guix pack guile’ to Just Work on Windows.

Does anyone have experience with that?

Thanks,
Ludo’.




Re: guile-json 4.2.0 released

2020-07-04 Thread Ludovic Courtès
Hi,

Aleix Conchillo Flaqué  skribis:

> On Thu, Jul 2, 2020 at 6:08 AM Ludovic Courtès  wrote:

[...]

>> There’s a bidirectional version here, but it’s slightly incompatible:
>>
>>
>> https://gitlab.inria.fr/guix-hpc/guix-kernel/-/blob/master/jupyter/json.scm
>>
>> It relies on (guix records), which is not great for Guile-JSON.
>>
>
> Nice! And thank you! I actually released guile-json 4.3.0 making [<=>
> RECORD->JSON] optional as in the code you linked. If guix moves to
> guile-json 4.3.0 I guess you could now remove guix/json.scm, unless you are
> planning to use guix records there.

Awesome, thank you!  We’ll probably move to Guile-JSON, at least in Guix
proper.

Ludo’.



Re: guile-json 4.2.0 released

2020-07-02 Thread Ludovic Courtès
Hi,

Aleix Conchillo Flaqué  skribis:

> * Changes since 4.1.0
>
> https://github.com/aconchillo/guile-json/blob/master/NEWS

--8<---cut here---start->8---
 - Introduce (define-json-mapping) which allows converting a JSON object into
a record type and vice versa. The initial code for this feature was copied
from the GNU Guix project.
--8<---cut here---end--->8---

Nice!  :-)

There’s a bidirectional version here, but it’s slightly incompatible:

  https://gitlab.inria.fr/guix-hpc/guix-kernel/-/blob/master/jupyter/json.scm

It relies on (guix records), which is not great for Guile-JSON.

Ludo’.




GNU Guile 3.0.4 released

2020-06-24 Thread Ludovic Courtès
We are pleased but also embarrassed to announce GNU Guile release 3.0.4.
This release fixes the SONAME of libguile-3.0.so, which was wrongfully
bumped in 3.0.3.  Distributions should use 3.0.4.  Apologies!

 *  *  *

The Guile web page is located at http://gnu.org/software/guile/, and
among other things, it contains a copy of the Guile manual and pointers
to more resources.

Guile is an implementation of the Scheme programming language, packaged
for use in a wide variety of environments.  In addition to implementing
the R5RS, R6RS, and R7RS Scheme standards, Guile includes full access to
POSIX system calls, networking support, multiple threads, dynamic
linking, a foreign function call interface, powerful string processing,
and HTTP client and server implementations.

Guile can run interactively, as a script interpreter, and as a Scheme
compiler to VM bytecode.  It is also packaged as a library so that
applications can easily incorporate a complete Scheme interpreter/VM.
An application can use Guile as an extension language, a clean and
powerful configuration language, or as multi-purpose "glue" to connect
primitives provided by the application.  It is easy to call Scheme code
from C code and vice versa.  Applications can add new functions, data
types, control structures, and even syntax to Guile, to create a
domain-specific language tailored to the task at hand.

Guile 3.0 can be installed in parallel with Guile 2.2.x; see
http://www.gnu.org/software/guile/manual/html_node/Parallel-Installations.html.

 *  *  *

Changes in 3.0.4 (since 3.0.3)

This release fixes the SONAME of libguile-3.0.so, which was erroneously
bumped in 3.0.3 compared to 3.0.2.  Distributions are strongly
encouraged to use 3.0.4 instead of 3.0.3.

Thanks to Chris Vine for reporting the issue.


 *  *  *

Here are the compressed sources:
  https://ftp.gnu.org/gnu/guile/guile-3.0.4.tar.gz   (21MB)
  https://ftp.gnu.org/gnu/guile/guile-3.0.4.tar.lz   (11MB)
  https://ftp.gnu.org/gnu/guile/guile-3.0.4.tar.xz   (13MB)

Here are the GPG detached signatures[*]:
  https://ftp.gnu.org/gnu/guile/guile-3.0.4.tar.gz.sig
  https://ftp.gnu.org/gnu/guile/guile-3.0.4.tar.lz.sig
  https://ftp.gnu.org/gnu/guile/guile-3.0.4.tar.xz.sig

Use a mirror for higher download bandwidth:
  https://www.gnu.org/order/ftp.html

Here are the SHA256 checksums:

  13f2f61a665469d330e651c8e9f7faecbb87fe474767f9532f2e821701730957  
guile-3.0.4.tar.gz
  f2b0b66fd72bc24df76856e1549bf327c025b8a5d5fa3cb1696327c5941c89c4  
guile-3.0.4.tar.lz
  6b7947dc2e3d115983846a268b8f5753c12fd5547e42fbf2b97d75a3b79f0d31  
guile-3.0.4.tar.xz

[*] Use a .sig file to verify that the corresponding file (without the
.sig suffix) is intact.  First, be sure to download both the .sig file
and the corresponding tarball.  Then, run a command like this:

  gpg --verify guile-3.0.4.tar.gz.sig

If that command fails because you don't have the required public key,
then run this command to import it:

  gpg --keyserver pool.sks-keyservers.net \
  --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

and rerun the 'gpg --verify' command.

This release was bootstrapped with the following tools:
  Autoconf 2.69
  Automake 1.16.2
  Libtool 2.4.6
  Makeinfo 6.7
  Gnulib v0.1-1157-gb03f418

Happy hacking with Guile!

Ludovic Courtès and Andy Wingo.


signature.asc
Description: PGP signature


Re: GNU Guile 3.0.3 released

2020-06-23 Thread Ludovic Courtès
Hi,

"Dr. Arne Babenhauserheide"  skribis:

>> "Dr. Arne Babenhauserheide"  skribis:
>>
>>> Are there already results about the difference in build-time from the 
>>> git-repo?
>>
>> Andy wrote a nice post that includes performance comparisons:
>>
>>   https://wingolog.org/archives/2020/06/03/a-baseline-compiler-for-guile
>
> That post is why I ask. Would it be possible to get rid of the binaries
> in the tarballs with this change? Maybe by first compiling in O1 and
> recompiling after the basic modules are there?

The Guix package for Guile has always been built by first removing the
prebuilt/ directory.  It’s always been an option, it just takes more
time to build.  In 3.0.3, it takes a “reasonable” amount of time for
modern x86 machines (around 20mn with “make -j8” + tests).

Thanks,
Ludo’.



Re: GNU Guile 3.0.3 released

2020-06-23 Thread Ludovic Courtès
Hi Chris,

Chris Vine  skribis:

> On Sun, 21 Jun 2020 23:04:03 +0200
> Ludovic Courtès  wrote:
>> We are delighted to announce GNU Guile release 3.0.3, the third bug-fix
>> release of the new 3.0 stable series.  This release represents 170
>> commits by 17 people since version 3.0.2.  See the NEWS excerpt that
>> follows for full details.
> [snip]
>
> This has a libguile so ABI jump from libguile-3.0.so.1 to
> libguile-3.0.so.3, which breaks my binaries linked to libguile.  Is that
> normal for a micro update in the stable release series and if so can
> there be some warning in the announcement?

Yes, it means you need to relink those binaries.

I was hesitant about the SONAME: the ABI jump was unnecessary unless in
‘--disable-deprecated’ builds.  I erred on the side of cautiousness:

  
https://git.savannah.gnu.org/cgit/guile.git/commit/?id=5d052c87bd8f0fd894e67f0bebd4fa6f6160d83c

Ludo’.




Re: GNU Guile 3.0.3 released

2020-06-23 Thread Ludovic Courtès
Hi,

(Stripping Cc: list.)

"Dr. Arne Babenhauserheide"  skribis:

> Are there already results about the difference in build-time from the 
> git-repo?

Andy wrote a nice post that includes performance comparisons:

  https://wingolog.org/archives/2020/06/03/a-baseline-compiler-for-guile

For Guix package modules, here are the figures I got:

  https://lists.gnu.org/archive/html/guix-devel/2020-06/msg00038.html

Since yesterday ‘guix pull’ uses Guile 3.0.3.  \o/

Ludo’.



GNU Guile 3.0.3 released

2020-06-21 Thread Ludovic Courtès
ve been fixed
   (<https://bugs.gnu.org/40737>,
<https://gitlab.com/wingo/lightening/-/issues/12>)

** 'http-get', 'http-post', etc. now honor #:verify-certificates?
   (<https://bugs.gnu.org/40486>)

** web: Accept URI host names consisting only of hex digits
   (<https://bugs.gnu.org/40582>)

** (web http) parser recognizes the CONNECT and PATCH methods

** Initial revealed count of file ports is now zero
   (<https://bugs.gnu.org/41204>)

* New deprecations

** Old bitvector interfaces deprecated

See "Bit Vectors" in the manual, for details on all of these
replacements.

*** bit-count, bit-position

Use bitvector-count or bitvector-position instead.  

*** bitvector-ref

Use 'bitvector-bit-set?' or 'bitvector-bit-clear?' instead.

*** bitvector-set!

Use 'bitvector-set-bit!' or 'bitvector-clear-bit!' instead.

*** bitvector-fill!

Use 'bitvector-set-all-bits!' or 'bitvector-clear-all-bits!' instead.

*** bit-invert!

Use 'bitvector-flip-all-bits! instead.

*** bit-set*!

Use 'bitvector-set-bits!' or 'bitvector-clear-bits!' instead.

*** bit-count*

Use 'bitvector-count-bits' instead, subtracting from 'bitvector-count'
on the mask bitvector if you are counting unset bits.

*** Accessing generic arrays using the bitvector procedures

For the same efficiency reasons that use of 'vector-ref' on generic
arrays was deprecated in Guile 2.0.10, using 'bitvector->list' and
similar procedures on 1-dimensional boolean-typed arrays is now
deprecated.  Use 'array-ref' and similar procedures on arrays.

*** scm_istr2bve

This C-only procedure to parse a bitvector from a string should be
replaced by calling `read' on a string port instead, if needed.

 *  *  *

Here are the compressed sources:
  https://ftp.gnu.org/gnu/guile/guile-3.0.3.tar.gz   (21MB)
  https://ftp.gnu.org/gnu/guile/guile-3.0.3.tar.lz   (11MB)
  https://ftp.gnu.org/gnu/guile/guile-3.0.3.tar.xz   (13MB)

Here are the GPG detached signatures[*]:
  https://ftp.gnu.org/gnu/guile/guile-3.0.3.tar.gz.sig
  https://ftp.gnu.org/gnu/guile/guile-3.0.3.tar.lz.sig
  https://ftp.gnu.org/gnu/guile/guile-3.0.3.tar.xz.sig

Use a mirror for higher download bandwidth:
  https://www.gnu.org/order/ftp.html

Here are the SHA256 checksums:

  fb75d95d8f4aa2efd1d3a09643dc125698e8cf7497ecc9fdca27ad85e937  
guile-3.0.3.tar.gz
  eabb399928ef465d4dc2cf1107a2d410f32fcde3b6263edd0fbb0d521b778159  
guile-3.0.3.tar.lz
  b3242d61c5583560cbc9adadf1c8b4333139d9ad129d4481b5c6aa7cfa73e63b  
guile-3.0.3.tar.xz

[*] Use a .sig file to verify that the corresponding file (without the
.sig suffix) is intact.  First, be sure to download both the .sig file
and the corresponding tarball.  Then, run a command like this:

  gpg --verify guile-3.0.3.tar.gz.sig

If that command fails because you don't have the required public key,
then run this command to import it:

  gpg --keyserver pool.sks-keyservers.net \
  --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

and rerun the 'gpg --verify' command.

This release was bootstrapped with the following tools:
  Autoconf 2.69
  Automake 1.16.2
  Libtool 2.4.6
  Makeinfo 6.7
  Gnulib v0.1-1157-gb03f418

Thanks to everyone who helped make this release:

 1  Alex Sassmannshausen
 1  Andrew Gierth
   112  Andy Wingo
 4  Arun Isaac
 1  Christopher Baines
 1  Dale P. Smith
 2  Daniel Llorens
 1  Eric Bavier
11  Icecream95
 1  Jan (janneke) Nieuwenhuizen
 1  Jan Synacek
 1  Linus Björnstam
28  Ludovic Courtès
 1  Mathieu Lirzin
 2  Matt Wette
 1  Ricardo G. Herdt
 1  Rutger van Beusekom

Happy hacking with Guile!

Ludovic Courtès and Andy Wingo.


signature.asc
Description: PGP signature


Re: guile-hall error on probably every command

2020-06-14 Thread Ludovic Courtès
Hi,

Zelphir Kaltstahl  skribis:

> That would be "MATE Terminal 1.12.1".

Thanks, hopefully it was fixed in the meantime:

  https://issues.guix.gnu.org/41811

Ludo’.



Re: guile-hall error on probably every command

2020-06-12 Thread Ludovic Courtès
Hi Zelphir,

Zelphir Kaltstahl  skribis:

> xiaolong@xlx200:~/dev/Guile/guile-hall-example-project$ guix search guile-hall
> guile: warning: failed to install locale
> name: guile-hall
> version: 0.3.1
> outputs: out
> systems: x86_64-linux i686-linux
> dependencies: autoconf@2.69 automake@1.16.2 guile-config@0.4.1 guile@3.0.2 
> pkg-config@0.29.2
> + texinfo@6.7
> location: 
> ]8;;file://xlx200/gnu/store/xcyarhvbxz5m3l6yvarryx5wm10j9j4k-guix-module-union/share/guile/site/3.0/gnu/packages/guile-xyz.scmgnu/packages/guile-xyz.scm:1441:2]8;;
> homepage: https://gitlab.com/a-sassmannshausen/guile-hall
> license: ]8;;https://www.gnu.org/licenses/gpl.htmlGPL 3+]8;;

Not related to Hall, but what terminal gave you the above result?
(Terminals are supposed to ignore escapes that they can’t interpret.)

Ludo’.




Re: Blog post about Hall

2020-06-12 Thread Ludovic Courtès
Hi,

Jérémy Korwin-Zmijowski  skribis:

> https://jeko.writeas.com/hall-a-project-manager-for-the-guile-programming-language

Nice post!

Ludo’.




Re: string-for-each vs. for-each+string->list performance

2020-06-12 Thread Ludovic Courtès
Hi,

Linus Björnstam  skribis:

> You can cut another 15-ish % from that loop by making an inline loop, btw
>
> (let loop ((pos 0))
>   (when (< pos (string-length str))
> ...
> (loop (1+ pos)))
>
> I have been looking at the disassembly, even for simpler cases, but I haven't 
> been able to understand enough of it. 
>
> BTW: string-for-each is in the default environment, and is probably the same 
> as the srfi-13 C implementation.

‘string-for-each’ in C (the default) is slower than its Scheme counterpart:

--8<---cut here---start->8---
scheme@(guile-user)> (define (sfe proc str)
   (define len (string-length str))
   (let loop ((i 0))
 (unless (= i len)
   (proc (string-ref str i))
   (loop (+ 1 i)
scheme@(guile-user)> (define str (make-string 1500))
scheme@(guile-user)> ,t (sfe identity str)
;; 0.263725s real time, 0.263722s run time.  0.00s spent in GC.
scheme@(guile-user)> ,t (sfe identity str)
;; 0.259538s real time, 0.259529s run time.  0.00s spent in GC.
scheme@(guile-user)> ,t (string-for-each identity str)
;; 0.841632s real time, 0.841624s run time.  0.00s spent in GC.
scheme@(guile-user)> (version)
$2 = "3.0.2"
--8<---cut here---end--->8---

In general we seem to pay a high price for leaving (calling a subr) and
re-entering (via ‘scm_call_n’) the VM.  This is especially acute here
because there’s almost nothing happening in C, so we keep bouncing
between Scheme and C.

That’s another reason to start rewriting such primitives in Scheme and
have the C functions just call out to Scheme.

If we do:

  perf record guile -c '(string-for-each identity (make-string 1500))'

we get this profile:

--8<---cut here---start->8---
Overhead  Command  Shared Object  Symbol
  31.10%  guilelibguile-3.0.so.1.1.1  [.] vm_regular_engine
  27.48%  guilelibguile-3.0.so.1.1.1  [.] scm_call_n
  14.34%  guilelibguile-3.0.so.1.1.1  [.] scm_jit_enter_mcode
   3.55%  guilelibguile-3.0.so.1.1.1  [.] scm_i_string_ref
   3.37%  guilelibguile-3.0.so.1.1.1  [.] get_callee_vcode
   2.34%  guilelibguile-3.0.so.1.1.1  [.] scm_call_1
   2.31%  guilelibguile-3.0.so.1.1.1  [.] scm_string_for_each
--8<---cut here---end--->8---

Indeed, we get better performance when turning off JIT:

--8<---cut here---start->8---
$ GUILE_JIT_THRESHOLD=-1 time guile -c '(string-for-each identity (make-string 
1500))'
0.47user 0.00system 0:00.47elapsed 100%CPU (0avgtext+0avgdata 26396maxresident)k
0inputs+0outputs (0major+1583minor)pagefaults 0swaps
$ GUILE_JIT_THRESHOLD=100 time guile -c '(string-for-each identity (make-string 
1500))'
0.83user 0.00system 0:00.83elapsed 100%CPU (0avgtext+0avgdata 26948maxresident)k
0inputs+0outputs (0major+1748minor)pagefaults 0swaps
$ GUILE_JIT_THRESHOLD=0 time guile -c '(string-for-each identity (make-string 
1500))'
0.84user 0.00system 0:00.85elapsed 100%CPU (0avgtext+0avgdata 27324maxresident)k
0inputs+0outputs (0major+2548minor)pagefaults 0swaps
--8<---cut here---end--->8---

So it seems that we just keep firing the JIT machinery on every
‘scm_call_n’ for no benefit.

That’s probably also the reason why ‘%after-gc-hunk’, ‘reap-pipes’, &
co. always show high in statprof:

  https://lists.gnu.org/archive/html/guile-devel/2020-05/msg00019.html  

Thanks,
Ludo’.




GNU Shepherd 0.8.1 released

2020-06-03 Thread Ludovic Courtès
We are pleased to announce the GNU Shepherd version 0.8.1.  This release
represents 16 commits by 4 people, bringing an important bug fix and
improvements to the code.


• About

  The GNU Daemon Shepherd or GNU Shepherd is a service manager written
  in Guile that looks after the herd of system services.  It provides a
  replacement for the service-managing capabilities of SysV-init (or any
  other init) with a dependency-based system with a convenient
  interface.  The GNU Shepherd may also be used by unprivileged users to
  manage per-user daemons (e.g., tor, privoxy, mcron, etc.)  It is
  written in Guile Scheme, and is configured and extended using Guile.

  The GNU Shepherd is developed jointly with the GNU Guix project; it is
  used as the init system of Guix, GNU’s advanced GNU/Linux distribution.

  https://www.gnu.org/software/shepherd/


• Download

  Here are the compressed sources and a GPG detached signature[*]:
https://ftp.gnu.org/gnu/shepherd/shepherd-0.8.1.tar.gz
https://ftp.gnu.org/gnu/shepherd/shepherd-0.8.1.tar.gz.sig

  Use a mirror for higher download bandwidth:
https://ftpmirror.gnu.org/shepherd/shepherd-0.8.1.tar.gz
https://ftpmirror.gnu.org/shepherd/shepherd-0.8.1.tar.gz.sig

  Here are the SHA1 and SHA256 checksums:

  2964502388aa74207e6761c2ff77df69369738b0  shepherd-0.8.1.tar.gz
  d32fe58694bb5350b5fc7285cf0ca0d9c7d24221aa5969d6c464ee3e3ac83f75  
shepherd-0.8.1.tar.gz

  [*] Use a .sig file to verify that the corresponding file (without the
  .sig suffix) is intact.  First, be sure to download both the .sig file
  and the corresponding tarball.  Then, run a command like this:

gpg --verify shepherd-0.8.1.tar.gz.sig

  If that command fails because you don't have the required public key,
  then run this command to import it:

gpg --keyserver keys.openpgp.org \
--recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

  and rerun the 'gpg --verify' command.

  This release was bootstrapped with the following tools:
Autoconf 2.69
Automake 1.16.2
Makeinfo 6.7
Help2man 1.47.13


• Changes since version 0.8.0 (excerpt from the NEWS file)

  ** Fix race condition that could lead shepherd to stop itself
 ()
  ** Use ‘signalfd’ on GNU/Linux to improve efficiency and simplify code
  ** Outdated bits have been removed from the manual
  ** Updated translation: sv

Please report bugs to bug-g...@gnu.org.
Join guix-de...@gnu.org and gnu-system-disc...@gnu.org for discussions.

Ludovic, on behalf of the Shepherd herd.


signature.asc
Description: PGP signature


Re: Running guile single-threaded?

2020-05-30 Thread Ludovic Courtès
Hi,

Matt Wette  skribis:

> On 5/17/20 8:27 AM, Caleb Ristvedt wrote:
>> I'm trying to use unshare() with the CLONE_NEWUSER flag, but this
>> requires that the process be single-threaded (otherwise I always get
>> EINVAL). /proc//task has 6 entries when I launch guile, 5
>> after disabling automatic finalization. I can't seem to find a way to
>> get that down to 1. Is this feasible?
>>
>> - reepca
>>
>
> I don't this is possible without building guile using --without-threads
> argument to configure.  Otherwise, the mutl-threaded gc is included.

Yeah, there’s the GC marker threads, the finalization thread, and the
signal thread (started on the first call to the ‘sigaction’ procedure).
It’s crowded there.

It wonder if Guile should offer a documented way to stop the
finalization thread (as with ‘scm_set_automatic_finalization_enabled’,
but from Scheme) and the signal thread.

Ludo’.




Re: [ANN] Guile Hall 0.3.0 released

2020-05-29 Thread Ludovic Courtès
Hi Catonano,

Catonano  skribis:

> Il giorno gio 28 mag 2020 alle ore 17:54 Ludovic Courtès  ha
> scritto:
>
>> Hi,
>>
>> Catonano  skribis:
>>
>> >> What do you think should be added or reworded?  I’m happy to fix it.
>> >>
>> >
>> > It's here !
>> > https://lists.gnu.org/archive/html/guile-devel/2020-05/msg00026.html
>>
>> Thank you.  It’s more concise than what I committed.
>>
>> What’s your suggestion exactly?  Do you think the version in master is
>> too verbose?
>>
>
> I explained my reasons to Alex and he agreed with them
>
> You can read my reasons here
> https://lists.gnu.org/archive/html/guile-user/2020-05/msg00094.html
>
> As for what I'm suggesting: I'm suggesting to create a new commit in which
> you scrap the current text and you paste our version

I’m sorry, I won’t do that.  The arguments in the message you reference
above are not compelling to me; I fail to see what’s wrong with the
current text.

Apologies for not following the discussion closely enough.  I’m
personally willing to move on now, but really, I think the outcome is good.

Thanks again for pushing this change!

Ludo’.



Re: [ANN] Guile Hall 0.3.0 released

2020-05-28 Thread Ludovic Courtès
Hi,

Catonano  skribis:

>> What do you think should be added or reworded?  I’m happy to fix it.
>>
>
> It's here !
> https://lists.gnu.org/archive/html/guile-devel/2020-05/msg00026.html

Thank you.  It’s more concise than what I committed.

What’s your suggestion exactly?  Do you think the version in master is
too verbose?

Ludo’.



Re: [ANN] Guile Hall 0.3.0 released

2020-05-28 Thread Ludovic Courtès
Hi,

Catonano  skribis:

> Thank you Ludo !!
>
> May I ask you why you preferred this version ?
>
> Alex and I had agreed on a different bersion

This was a long thread, so perhaps I picked the wrong one, sorry!

What do you think should be added or reworded?  I’m happy to fix it.

Thanks,
Ludo’.



Re: [ANN] Guile Hall 0.3.0 released

2020-05-27 Thread Ludovic Courtès
Hello!

Alex Sassmannshausen  skribis:

> From 3f8c9fca63e3ddeb6f051d9d16e0c21b8cce8a30 Mon Sep 17 00:00:00 2001
> From: Alex Sassmannshausen 
> Date: Sun, 24 May 2020 23:18:32 +0200
> Subject: [PATCH] Added a reference to Guile Hall in the manual.
>
> * doc/ref/scheme-using.texi: Add a section on Hall.

I finally pushed a slightly modified variant of this patch:

  
https://git.savannah.gnu.org/cgit/guile.git/commit/?id=f55740f0cd31e125dfd267a5be36373b14365793

Thank you Alex & Catonano!

Ludo’.



Guile-Gcrypt 0.3.0 released

2020-05-23 Thread Ludovic Courtès
I’m pleased to announce Guile-Gcrypt version 0.3.0:

  git clone https://notabug.org/cwebber/guile-gcrypt.git
  cd guile-gcrypt
  git checkout v0.3.0  # or 99381361c5ec081fa691a536e8687ffd89897119
  git tag -v v0.3.0

The ‘git tag -v’ command checks the authenticity of your checkout.
You may need to retrieve the signing key first:

  gpg --keyserver pool.sks-keyservers.net \
  --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

Guile-Gcrypt provides Guile 3.0/2.x bindings to the GNU Libgcrypt
cryptography library.  It provides modules for cryptographic hash
functions, message authentication codes (MAC), public-key cryptography,
strong randomness, and more.

Excerpt from the ‘NEWS’ file:

  * Changes in 0.3.0 (since 0.2.1)

  ** ‘sexp->canonical-sexp->sexp’ now accepts integers
  ** (gcrypt common) exports ‘error/’ constants and error handling procedures
  ** ‘verify’ now throws upon errors other than ‘error/bad-signature’
  ** (gcrypt hmac) and (gcrypt hash) export bindings for their syntax literals
  ** New ‘hash-algorithm-name’ and ‘mac-algorithm-name’ procedures

Guile-Gcrypt does not currently wrap all the Libgcrypt API.  Your help
in improving it is very welcome!  For bug reports and patches, see:

  https://notabug.org/cwebber/guile-gcrypt

Plain email to Chris or myself or guile-user would also work fine.  :-)

Ludo’.


signature.asc
Description: PGP signature


Re: guild compile unknown character name ??

2020-05-16 Thread Ludovic Courtès
Hi,

Kovacsics Róbert  skribis:

> I have an odd error, which is (while compiling
> https://gitlab.com/kavalogic-inc/inspekt3d/)
>
> # compile-env sets
> # 
> GUILE_LOAD_PATH=/build/sourceRoot:/nix/store/nn2981g1l78gw55w6994qcliv4877p5h-guile-opengl-0.1.0/share/guile/site/2.2:/nix/store/drd0g592qs11nzh9vfqd8vg6ijq6vdnz-libfive-unstable-2020-02-15/share/guile/site:/nix/store/nn2981g1l78gw55w6994qcliv4877p5h-guile-opengl-0.1.0/share/guile/site/2.2:/nix/store/drd0g592qs11nzh9vfqd8vg6ijq6vdnz-libfive-unstable-2020-02-15/share/guile/site
> # 
> GUILE_LOAD_COMPILED_PATH=/build/sourceRoot:/build/sourceRoot:/nix/store/nn2981g1l78gw55w6994qcliv4877p5h-guile-opengl-0.1.0/share/guile/site/2.2:/nix/store/drd0g592qs11nzh9vfqd8vg6ijq6vdnz-libfive-unstable-2020-02-15/share/guile/site:/nix/store/nn2981g1l78gw55w6994qcliv4877p5h-guile-opengl-0.1.0/share/guile/site/2.2:/nix/store/drd0g592qs11nzh9vfqd8vg6ijq6vdnz-libfive-unstable-2020-02-15/share/guile/site
>
> ./compile-env 
> /nix/store/6vazrblhsyafnn13iwj6mc9gg6cf8pjv-guile-2.2.7/bin/guild
> compile -Wunbound-variable -Warity-mismatch -Wformat -o
> "inspekt3d/library.go" "inspekt3d/library.scm"
> ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
> ;;;   or pass the --no-auto-compile argument to disable.
> ;;; compiling 
> /nix/store/6vazrblhsyafnn13iwj6mc9gg6cf8pjv-guile-2.2.7/bin/guild
> ;;; WARNING: compilation of
> /nix/store/6vazrblhsyafnn13iwj6mc9gg6cf8pjv-guile-2.2.7/bin/guild
> failed:
> ;;; failed to create path for auto-compiled file
> "/nix/store/6vazrblhsyafnn13iwj6mc9gg6cf8pjv-guile-2.2.7/bin/guild"
> ice-9/boot-9.scm:752:25: In procedure dispatch-exception:
> In procedure scm_lreadr: #:410:18: unknown character name ??
> make: *** [Makefile:763: inspekt3d/library.go] Error 1

Could you check what’s in inspekt3d/library.scm, line 410, column 18?

This error happens in a character literal with an invalid name, for
example:

  #\abc

Perhaps say name is a Unicode character (say λ) but the ‘guild’ process
is not running under an appropriate locale.

HTH,
Ludo’.




Re: Functional hashtables

2020-05-16 Thread Ludovic Courtès
Hi there!

Christopher Lemmer Webber  skribis:

> There's no separate package of guile-fash available anywhere, but it
> would be easy enough to do if we're just using it with Guix.  It's
> desirable to not have to keep copy-pasta'ing fash.scm around at least.
>
> My time in Racket has convinced me that it's an extremely good idea to
> have a well supported functional hashmap type in the language... extra
> points if it's "first class" in syntax (my code has improved
> considerably because of it; no more using alists where they'll bite you
> later just because it "looks prettier").

I’ve never used fash, but I’m all for getting it in Guile proper if Andy
is fine with it.  In general, I agree that having more functional data
structures in Guile is desirable.

Would someone be willing to turn it into a proper Guile module with a
section in the manual and some tests?

> Nice to be back in Guile land!

Heh, good to see you back here!  :-)

Ludo’.




Re: Guile's time execution issues

2020-05-04 Thread Ludovic Courtès
Hi,

Linus Björnstam  skribis:

> On Mon, 4 May 2020, at 11:36, Ludovic Courtès wrote:
>  
>> > One thing I found is that `match` is slow. The code looked nicer but had 
>> > to change it back to lets and conds as the performance
>> > increase was ~2 seconds.
>> 
>> Oh, in which case exactly?  And are you sure your hand-written code is
>> equivalent to the ‘match’ code (it’s common for hand-written code to be
>> more lax than ‘match’)?
>> 
>> One thing to pay attention to is the use of ‘list?’, which is O(N), and
>> is implied by ellipses in ‘match’.  If you want to use ‘match’ in a way
>> that avoids ‘list?’, write patterns such as (a . b) instead of (a b ...).
>> It doesn’t have the same meaning, but often the end result is the same,
>> for instance because you’ll later match on ‘b’ anyway.
>> 
>> (I wish we can one day have a proper list type disjoint from pairs…)
>
> The change is here: he is only matching against chars and predicates: 
> https://github.com/aconchillo/guile-json/commit/ad4b06d86e4822466983d00f55474c8f664b538d

It would be nice if you could pinpoint which one of these changes causes
a difference, because:

--8<---cut here---start->8---
scheme@(guile-user)> ,optimize (match (peek-char port) ((? eof-object?) x) ((? 
whitespace?) w) (_ e))
$84 = (let ((v (peek-char port)))
  (cond ((eof-object? v) x)
((whitespace? v) w)
(else e)))
--8<---cut here---end--->8---

What might make a difference is the code bloat when using ‘or’:

--8<---cut here---start->8---
scheme@(guile-user)> ,optimize (match (peek-char port) ((or #\a #\b #\c #\d) x))
$86 = (let ((v (peek-char port)))
  (cond ((equal? v #\a) x)
((equal? v #\b) x)
((equal? v #\c) x)
((equal? v #\d) x)
(else
 ((@@ (ice-9 match) error)
  'match
  "no matching pattern"
  v)
 #f)))
--8<---cut here---end--->8---

but even that sounds unlikely.

You’re compiling with -O2, right?

Thanks,
Ludo’.



Re: Guile's time execution issues

2020-05-04 Thread Ludovic Courtès
Hey!

Aleix Conchillo Flaqué  skribis:

> So weird I'm getting different numbers on 2.2.7. Not sure how I'm getting 
> those initial ~20s and you are getting consistent ~ 45s. It
> shouldn't have nothing to do with it, but could it be I'm running it on macOS?

Did you add this ‘->bool’ call to ensure the resulting alist is not kept
in memory?

>  Now, it would be good to profile ‘json->scm’ to see if there’s anything
>  that could be improved on the Guile side, or if it’s just a normal
>  profile for GC-intensive code.
>
> Good news is that I have been working on performance improvements and 
> json->scm is going down from my ~19 seconds to ~3
> seconds on the same sample file. Linus Björnstam was the one to bring up 
> performance issues so we've been back and forth trying to
> make it fast.

Nice!

> One thing I found is that `match` is slow. The code looked nicer but had to 
> change it back to lets and conds as the performance
> increase was ~2 seconds.

Oh, in which case exactly?  And are you sure your hand-written code is
equivalent to the ‘match’ code (it’s common for hand-written code to be
more lax than ‘match’)?

One thing to pay attention to is the use of ‘list?’, which is O(N), and
is implied by ellipses in ‘match’.  If you want to use ‘match’ in a way
that avoids ‘list?’, write patterns such as (a . b) instead of (a b ...).
It doesn’t have the same meaning, but often the end result is the same,
for instance because you’ll later match on ‘b’ anyway.

(I wish we can one day have a proper list type disjoint from pairs…)

Thanks,
Ludo’.



Re: Loading multiple versions of a Module

2020-05-04 Thread Ludovic Courtès
Hi,

Martin Becze  skribis:

> Would this be something that is open to change? Would there be an objections 
> to changing this behavior? I think this problem will hurt modularity and 
> growth of the guile ecosystem in the future. From a cursory look at the code 
> I don't see any technical reason for this. 

Currently, there’s a single module name space and version numbers are
not part of the module name (the R6RS module system arrived a decade or
two after Guile’s).

I think it would be interesting to allow for multiple versions of a
module to coexist (although a single application using several versions
of the same library may be problematic from an engineering viewpoint).
However, as always with this kind of change to the core, compatibility
considerations may make that endeavor very challenging.

Thanks,
Ludo’.



Re: Loading multiple versions of a Module

2020-05-03 Thread Ludovic Courtès
Hi Martin,

Martin Becze  skribis:

> Guile currently doesn't allow loading multiple versions of a Module. For
> example this will not work.
>
> --- start.scm
> (import (a) (b (2)))
> (helloA)
> (helloB)
>
> --- a/a.scm
> (library (a)
>   (export helloA)
>   (import (rnrs) (b (1)))
>   (define helloA (lambda ()
> (display "hello from A1\n")
> (helloB
>
> --- b1/b.scm
> (library (b (1))
>  (export helloB)
>  (import (rnrs)))
>
> (define helloB (lambda ()
>(display "hello from B1\n")))
>
> --- b2/b.scm
> (library (b (2))
>  (export helloB)
>  (import (rnrs))
>  (define helloB (lambda () (display "hello from B2\n"
>
> Is there are away to get around this? What is the reason for this
> behavior? Is it part of r6rs or something?

I’m not sure what R6RS says, but Guile supports only one instance of a
module with a given name at run time.

The only way around it would be to give the two modules different names.

HTH,
Ludo’.




Re: database library, siilar to guile-dbi, for Guile 3 ?

2020-05-02 Thread Ludovic Courtès
Hi,

Jeronimo Pellegrini via General Guile related discussions
 skribis:

> I am looking for a database library that would abstract away the underlying 
> db engine. I see that guile-dbi is listed as "Guile 2.2" only on the list of
> libraries on the Guile website, and the link is broken anyway.

 is generated from Guix
packages so it’s necessarily accurate, modulo broken links.

‘guile-dbi’ is defined like this:

  
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/guile-xyz.scm#n1184

> Is there something similar to Guile 3?

There’s guile-sqlite3:

  https://notabug.org/guile-sqlite3/guile-sqlite3/

and guile-squee:

  https://notabug.org/cwebber/guile-squee

HTH!

Ludo’.




Re: Guile's time execution issues

2020-05-02 Thread Ludovic Courtès
Hola!

Aleix Conchillo Flaqué  skribis:

> On guile-json 3.5.0 (still using (string-append)) the first execution time
> goes from 19 seconds to 42 seconds. Then, the times keep increasing as in
> version 2.2.7 but numbers are much bigger:

With Guile 3.0.2 and Guile-JSON 3.5.0, I get:

--8<---cut here---start->8---
$ guile
GNU Guile 3.0.2
Copyright (C) 1995-2020 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.
scheme@(guile-user)> ,use(json)
scheme@(guile-user)> ,t (->bool (call-with-input-file "/tmp/large-file.json" 
json->scm))
$1 = #t
;; 55.142128s real time, 79.806656s run time.  65.418070s spent in GC.
scheme@(guile-user)> ,t (->bool (call-with-input-file "/tmp/large-file.json" 
json->scm))
$2 = #t
;; 47.416645s real time, 75.274219s run time.  62.421108s spent in GC.
scheme@(guile-user)> ,t (->bool (call-with-input-file "/tmp/large-file.json" 
json->scm))
$3 = #t
;; 41.292368s real time, 79.053120s run time.  67.266710s spent in GC.
--8<---cut here---end--->8---

So I think the time increase was just due to the fact that previous
parse results were kept around, somehow.

2.2.7 performs comparably for me:

--8<---cut here---start->8---
$ guix environment -C --ad-hoc guile-json guile@2.2 --share=/tmp -- guile 
guix environment: warning: plursenca pak-specifigo 'guile@2.2'
guix environment: warning: choosing guile@2.2.7 from 
gnu/packages/guile.scm:256:2
GNU Guile 2.2.7
Copyright (C) 1995-2019 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.
scheme@(guile-user)> ,use(json)
scheme@(guile-user)> ,t (->bool (call-with-input-file "/tmp/large-file.json" 
json->scm))
$1 = #t
;; 44.963180s real time, 90.606198s run time.  71.529811s spent in GC.
scheme@(guile-user)> ,t (->bool (call-with-input-file "/tmp/large-file.json" 
json->scm))
$2 = #t
;; 44.147740s real time, 87.796937s run time.  69.818018s spent in GC.
scheme@(guile-user)> ,t (->bool (call-with-input-file "/tmp/large-file.json" 
json->scm))
$3 = #t
;; 45.057761s real time, 89.689930s run time.  71.370764s spent in GC.
--8<---cut here---end--->8---

So to me, Guile is behaving correctly here.

Now, it would be good to profile ‘json->scm’ to see if there’s anything
that could be improved on the Guile side, or if it’s just a normal
profile for GC-intensive code.

Thanks,
Ludo’.



Re: [ANN] nyacc-next.scm Guix package spec

2020-04-26 Thread Ludovic Courtès
Howdy,

Matt Wette  skribis:

> I wanted to let you know the Guix pacakge spec for
> the latest NYACC release is available from
>
>   https://download.savannah.gnu.org/releases/nyacc/nyacc-next.scm

Nice!

Note that this should also work:

  guix install nyacc \
--with-source=mirror://savannah/nyacc/nyacc-1.02.1.tar.gz

… with the caveat that the signature on the tarball is not checked.

Ludo’.




Re: Guile's time execution issues

2020-04-26 Thread Ludovic Courtès
Bon dia!

Aleix Conchillo Flaqué  skribis:

> I was trying to get some guile-json performance times loading large JSON
> file. However, I'm getting increasing numbers at each run, so I'm wondering
> if I'm doing something wrong. Below you can see how the first run took
> 19.95s and then running the same command kept increasing.
>
> I'm running Guile 2.2.7 on macOS Catalina 10.15.3.
>
> scheme@(guile-user)> (use-modules (json))
> scheme@(guile-user)> ,t (define a (call-with-input-file
> "/Users/aleix/Downloads/large-file.json" (lambda (port) (json->scm port
> ;; 19.956429s real time, 87.100982s run time.  75.270202s spent in GC.
> ;; 26.173179s real time, 143.645265s run time.  131.022631s spent in GC.
> ;; 28.193926s real time, 154.758375s run time.  141.697236s spent in GC.
> ;; 29.044218s real time, 160.745984s run time.  147.449073s spent in GC.
> ;; 30.480873s real time, 170.855527s run time.  157.332793s spent in GC.
> ;; 30.555700s real time, 172.938278s run time.  159.468737s spent in GC.
> ;; 32.190478s real time, 172.807551s run time.  158.905645s spent in GC.

Could this have to do with ?

Could you check if that happens with 3.0.2?  (Or suggest a
‘large-file.json’ to use.  :-))

Thanks in advance!

Ludo’.



Re: guile-json 3.5.0 released

2020-04-26 Thread Ludovic Courtès
Hi Aleix,

Aleix Conchillo Flaqué  skribis:

> I am happy to announce guile-json 3.5.0. This release includes a
> significant cleanup thanks to using pattern matching (idea taken from
> Chickadee's JSON reader, thanks!). This version also handles invalid JSON
> better, see NEWS file for details.
>
> https://github.com/aconchillo/guile-json

Yay, thank you!

I noticed that the release tarball on Savannah lacks an OpenPGP
signature.  Could you add one, as for previous tarballs?

Thanks,
Ludo’, who’s testing the upgrade for Guix.



GNU Shepherd 0.8.0 released

2020-04-21 Thread Ludovic Courtès
We are pleased to announce the GNU Shepherd version 0.8.0.  This release
represents 31 commits by 7 people, primarily bug fixes and small
additions to the programming interface.

• About

  The GNU Daemon Shepherd or GNU Shepherd is a service manager written
  in Guile that looks after the herd of system services.  It provides a
  replacement for the service-managing capabilities of SysV-init (or any
  other init) with a dependency-based system with a convenient
  interface.  The GNU Shepherd may also be used by unprivileged users to
  manage per-user daemons (e.g., tor, privoxy, mcron, etc.)  It is
  written in Guile Scheme, and is configured and extended using Guile.

  The GNU Shepherd is developed jointly with the GNU Guix project; it is
  used as the init system of Guix, GNU’s advanced GNU/Linux distribution.

  https://www.gnu.org/software/shepherd/


• Download

  Here are the compressed sources and a GPG detached signature[*]:
https://ftp.gnu.org/gnu/shepherd/shepherd-0.8.0.tar.gz
https://ftp.gnu.org/gnu/shepherd/shepherd-0.8.0.tar.gz.sig

  Use a mirror for higher download bandwidth:
https://ftpmirror.gnu.org/shepherd/shepherd-0.8.0.tar.gz
https://ftpmirror.gnu.org/shepherd/shepherd-0.8.0.tar.gz.sig

  Here are the SHA1 and SHA256 checksums:

  1b1cea9c1271ef21611e8b717e9fd37c3c165bdc  shepherd-0.8.0.tar.gz
  940eb3e8a6f2ee710925b35ace3ee003cc8a38ff017a121d471bb5573e628b0a  
shepherd-0.8.0.tar.gz

  [*] Use a .sig file to verify that the corresponding file (without the
  .sig suffix) is intact.  First, be sure to download both the .sig file
  and the corresponding tarball.  Then, run a command like this:

gpg --verify shepherd-0.8.0.tar.gz.sig

  If that command fails because you don't have the required public key,
  then run this command to import it:

gpg --keyserver keys.openpgp.org \
--recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

  and rerun the 'gpg --verify' command.

  This release was bootstrapped with the following tools:
Autoconf 2.69
Automake 1.16.2
Makeinfo 6.7
Help2man 1.47.13


• Changes since version 0.7.0 (excerpt from the NEWS file)

  ** Kill the whole process group when the PID file doesn’t show up
 ()
  ** ‘make-kill-destructor’ kills the process group
  ** New ‘default-pid-file-timeout’ SRFI-39 parameter
  ** New #:file-creation-mask parameter for ‘make-forkexec-constructor’
  ** ‘make-forkexec-constructor’ creates log files as #o640
 ()
  ** Improve documentation and examples
  ** Ensure man pages are up to date
 ()
  ** Fix compilation on systems without ‘prctl’ such as GNU/Hurd
  ** Remove kludge that would send SIGALRM every second
  ** Address “error in finalization thread” warning
  ** ‘make-forkexec-constructor’ no longer supports old calling convention

  The first argument must be a list of strings.  Passing several strings has
  been deprecated since 0.1.

Please report bugs to bug-g...@gnu.org.
Join guix-de...@gnu.org and gnu-system-disc...@gnu.org for discussions.

Ludovic, on behalf of the Shepherd herd.


signature.asc
Description: PGP signature


GNU Guix 1.1.0 released

2020-04-15 Thread Ludovic Courtès
We are pleased to announce the release of GNU Guix 1.1.0.

This release corresponds to 14,078 commits over 11 months by 201 people.
It includes many new features, user interface and performance
improvements, as well as many bug fixes—see below for a list of changes.

Read more about today’s announcement at:

  https://guix.gnu.org/blog/2020/gnu-guix-1.1.0-released

• About

  GNU Guix is a transactional package manager and an advanced
  distribution of the GNU system that respects user freedom.  Guix can
  be used on top of any system running the kernel Linux, or it can be
  used as a standalone operating system distribution for i686, x86_64,
  ARMv7, and AArch64 machines.

  In addition to standard package management features, Guix supports
  transactional upgrades and roll-backs, unprivileged package
  management, per-user profiles, and garbage collection.  When used as a
  standalone GNU/Linux distribution, Guix offers a declarative,
  stateless approach to operating system configuration management.  Guix
  is highly customizable and hackable through Guile programming
  interfaces and extensions to the Scheme language.

  https://guix.gnu.org

• Download

  Here are the compressed sources and a GPG detached signature[*]:
https://ftp.gnu.org/gnu/guix/guix-1.1.0.tar.gz
https://ftp.gnu.org/gnu/guix/guix-1.1.0.tar.gz.sig

  Here are the bootable USB installation images and their signatures[*]:
https://ftp.gnu.org/gnu/guix/guix-system-install-1.1.0.i686-linux.iso.xz
https://ftp.gnu.org/gnu/guix/guix-system-install-1.1.0.i686-linux.iso.xz.sig
https://ftp.gnu.org/gnu/guix/guix-system-install-1.1.0.x86_64-linux.iso.xz

https://ftp.gnu.org/gnu/guix/guix-system-install-1.1.0.x86_64-linux.iso.xz.sig

  Here is the QCOW2 virtual machine (VM) image and its signature[*]:
https://ftp.gnu.org/gnu/guix/guix-system-vm-image-1.1.0.x86_64-linux.xz
https://ftp.gnu.org/gnu/guix/guix-system-vm-image-1.1.0.x86_64-linux.xz.sig

  Here are the binary tarballs and their signatures[*]:
https://ftp.gnu.org/gnu/guix/guix-binary-1.1.0.i686-linux.tar.xz
https://ftp.gnu.org/gnu/guix/guix-binary-1.1.0.i686-linux.tar.xz.sig
https://ftp.gnu.org/gnu/guix/guix-binary-1.1.0.x86_64-linux.tar.xz
https://ftp.gnu.org/gnu/guix/guix-binary-1.1.0.x86_64-linux.tar.xz.sig
https://ftp.gnu.org/gnu/guix/guix-binary-1.1.0.armhf-linux.tar.xz
https://ftp.gnu.org/gnu/guix/guix-binary-1.1.0.armhf-linux.tar.xz.sig
https://ftp.gnu.org/gnu/guix/guix-binary-1.1.0.aarch64-linux.tar.xz
https://ftp.gnu.org/gnu/guix/guix-binary-1.1.0.aarch64-linux.tar.xz.sig

  Use a mirror for higher download bandwidth:
https://www.gnu.org/order/ftp.html
  
  Here are the SHA256 checksums:

  5c59106ff4ac497c6097686834b0c914109cf5e44eb6b94ebce818923043640f  
guix-1.1.0.tar.gz
  f81b529c4a94d0ab2cfc6df9819af3d7e2ccfcf17ef7f901e1d2df0a63516ab6  
guix-binary-1.1.0.aarch64-linux.tar.xz
  4d08782979383c2848ca1c0ca9478cbfb4f9181d94370f4226398fbb51fd1d24  
guix-binary-1.1.0.armhf-linux.tar.xz
  33472a26cdf515ba496f770602ead6369ee6dc3dc6b679c279e1f5c4d8cd63fa  
guix-binary-1.1.0.i686-linux.tar.xz
  eae0b8b4ee8ba97e7505dbb85d61ab2ce7f0195b824d3a660076248d96cdaece  
guix-binary-1.1.0.x86_64-linux.tar.xz
  848c9a6a73cf4cf6fe4e7d5815342a9c40ec01fd93c23b5d4e12d41b18b16bb5  
guix-system-install-1.1.0.i686-linux.iso.xz
  ff2d74f64d8e1545271ab0f46ee0e11ae96fbb09cb105c3d929c9e123ad00ce2  
guix-system-install-1.1.0.x86_64-linux.iso.xz
  519d93fb27d33a97db568225bfa4e84f0cfc95bd173f5bf8277cb4098ae46b43  
guix-system-vm-image-1.1.0.x86_64-linux.xz

  [*] Use a .sig file to verify that the corresponding file (without the
  .sig suffix) is intact.  First, be sure to download both the .sig file
  and the corresponding tarball.  Then, run a command like this:
  
gpg --verify guix-1.1.0.tar.gz.sig
  
  If that command fails because you don't have the required public key,
  then run this command to import it:

gpg --keyserver keys.openpgp.org \
--recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5
  
  and rerun the 'gpg --verify' command.

  To install the standalone Guix system, please see “System
  Installation” in the manual.  To install Guix on a running system, see
  “Installation” in the manual.

• Changes since version 1.0.1 (excerpt from the NEWS file)

  ** Package management
  *** New ‘guix deploy’ command to deploy several machines at once
  *** Channels can now provide news, viewed with ‘guix pull --news’
  *** ‘guix system reconfigure’ saves provenance data
  *** New ‘guix system describe’ command to view system provenance info
  *** New /run/current-system/{channels,configuration}.scm files
  *** New ‘guix time-machine’ command
  *** ‘guix pack’ has a new ‘--entry-point’ option
  *** ‘guix pack’ saves environment variables for ‘docker’ and ‘singularity’
  *** ‘guix pack’ provides a meaningful repository name for ‘docker’
  *** New ‘--target’ option for ‘guix system’
  *** ‘--no-build-hook’ was renamed to 

Re: syntax taste: use of unquote in macros

2020-03-31 Thread Ludovic Courtès
Hi Matt,

Matt Wette  skribis:

> I'm not sure if you know about this, but there is a discrepancy in the
> way some folks define macros to use unquote (aka ,).   For example,
>
>> (use-modules (system base pmatch))
>> (pmatch '(foo "bar")  ((foo ,val)  (write val) (newline)))
> => "bar"
>
>> (use-modules (ice-9 match))
>> (match '(foo "bar")  (`(foo ,val)  (write val) (newline)))
> => "bar"
>
> Note the difference in the use of quasiquote (aka `) in the pattern
> for (foo ,val): match syntax uses it, pmatch does not.
> In Scheme, quasiquote and unquote always come together.
>
> Is pmatch syntax in bad taste?  I'm looking for opinions.

It really depends on what you’re going to use the pattern matcher for.
For ‘sxml-match’, it’s more convenient to have literals be the default
because there are usually more literals than variables, as in:

   (sxml-match x
 ((album (@ (title ,t)) (catalog (num ,n) (fmt ,f)) ...)
  `(ul (li ,t)
   (li (b ,n) (i ,f)) ...)))

In more general cases, I prefer the (ice-9 match) style because patterns
typically have more variables than literals.

In one case, I found myself implementing pmatch-style quoting on top of
(ice-9 match) so I would have the best of both worlds:

  https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/installer/tests.scm#n84

:-)

Ludo’.




GNU Guile 3.0.2 released

2020-03-27 Thread Ludovic Courtès
have the required public key,
then run this command to import it:

  gpg --keyserver pool.sks-keyservers.net \
  --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

and rerun the 'gpg --verify' command.

This release was bootstrapped with the following tools:
  Autoconf 2.69
  Automake 1.16.2
  Libtool 2.4.6
  Makeinfo 6.7
  Gnulib v0.1-1157-gb03f418


Happy hacking with Guile!

Ludovic Courtès and Andy Wingo.


signature.asc
Description: PGP signature


Re: emacs lisp compatible names

2020-03-12 Thread Ludovic Courtès
Hi!

Sam Halliday  skribis:

> I read in the Guile manual's section on the Emacs lisp frontend that
> there is special falsey treatment for nil and empty lists, etc etc.
>
> But I was left wondering if all the other language constructs of emacs
> lisp are implemented, e.g. optional parameters, its lisp-2 nature.
>
> Also, now that Emacs lisp has opt-in lexical scoping, is that something
> that can be used from the Guile emulation?
>
> Additionally, what about the stdlib functions? Are there aliases so that
> I don't need to remember the Guile names for mapcar and progn? :-D

Emacs Lisp support in Guile needs love.  But! You can give it a try from
the REPL:

--8<---cut here---start->8---
scheme@(guile-user)> ,L elisp
Happy hacking with Emacs Lisp!  To switch back, type `,L scheme'.
elisp@(guile-user)> (progn t)
$1 = #t
elisp@(guile-user)> (mapcar (lambda (x) (+ 1 x)) '(1 2 3))
$2 = (2 3 4)
--8<---cut here---end--->8---

The bad news is that one has to remember the elisp names for ‘map’ and
‘begin’.  :-)

Ludo’.




Re: Incomplete backtrace

2020-03-12 Thread Ludovic Courtès
Hi,

Jan Synacek  skribis:

> On Wed, Mar 11, 2020 at 7:07 PM Jan Synacek  wrote:

[...]

>> $ guile -s test.scm
>> Backtrace:
>> In ice-9/boot-9.scm:
>>   1736:10  8 (with-exception-handler _ _ #:unwind? _ # _)
>> In unknown file:
>>7 (apply-smob/0 #)
>> In ice-9/boot-9.scm:
>> 718:2  6 (call-with-prompt _ _ #)
>> In ice-9/eval.scm:
>> 619:8  5 (_ #(#(#)))
>> In ice-9/boot-9.scm:
>>2806:4  4 (save-module-excursion _)
>>   4351:12  3 (_)
>> In ice-9/ports.scm:
>> 550:4  2 (call-with-output-string _)
>> In ice-9/boot-9.scm:
>>260:13  1 (for-each # …)
>> In ice-9/regex.scm:
>>  64:2  0 (_ _)
>>
>
> I forgot one line in the backtrace output:
>
> ice-9/regex.scm:64:2: In procedure vector-ref: Wrong type argument in
> position 1 (expecting vector): #f
>
> Which sort of gives a hint, but not really...

Line 62, column 2 of ice-9/regexp.scm is:

  (define (match:string match)
(vector-ref match 0))
^

So it suggests there’s no match, leading to the crash.

(Which is not to say that the backtrace can’t be improved…)

Ludo’.




GNU Guile 3.0.1 released

2020-03-08 Thread Ludovic Courtès
u/guile/guile-3.0.1.tar.xz.sig

Use a mirror for higher download bandwidth:
  https://www.gnu.org/order/ftp.html

Here are the SHA256 checksums:

  c83659e515c97270c0647b34470092a109a3609124c9e86dbef53db7f7d1d7ec  
guile-3.0.1.tar.gz
  756279560e1d634a1ff1cb368379f2aa14206b65841a0323514b71d1269aaa94  
guile-3.0.1.tar.lz
  d696ead0fd138cc7ef883b50cc6b4be2898d18ff64bd1e9379081e1186be53c9  
guile-3.0.1.tar.xz

[*] Use a .sig file to verify that the corresponding file (without the
.sig suffix) is intact.  First, be sure to download both the .sig file
and the corresponding tarball.  Then, run a command like this:

  gpg --verify guile-3.0.1.tar.gz.sig

If that command fails because you don't have the required public key,
then run this command to import it:

  gpg --keyserver pool.sks-keyservers.net \
  --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

and rerun the 'gpg --verify' command.

This release was bootstrapped with the following tools:
  Autoconf 2.69
  Automake 1.16.1
  Libtool 2.4.6
  Makeinfo 6.7
  Gnulib v0.1-1157-gb03f418


Happy hacking with Guile!

Ludovic Courtès and Andy Wingo.


signature.asc
Description: PGP signature


Re: How to correctly load modules from runtime defineable locations?

2020-03-08 Thread Ludovic Courtès
Hello,

Михаил Бахтерев  skribis:

> (let* ((fn (current-filename))   
>(dir (if (string? fn) (dirname fn) "."))  
>(lib (if (string? fn) (string-append (dirname dir) "/lib") "../lib")))
>   (add-to-load-path lib)
>   (add-to-load-path dir))

I think the crux is that you’d like this code to run both at
macro-expansion time and at run time.  To do that, you need to enclose
it in ‘eval-when’ (info "(guile) Eval When"):

  (eval-when (expand load eval)
(let …
  (add-to-load-path …)
  …))

(Note that ‘add-to-load-path’ actually does this, but only if the
argument is a literal string.)

HTH!

Ludo’.




GNU Guile 2.2.7 released

2020-03-07 Thread Ludovic Courtès
We are delighted to announce GNU Guile release 2.2.7, the seventh
bug-fix release of the “legacy” 2.2 series (the current stable series is
3.0).  See the NEWS excerpt that follows for full details.

 *  *  *

Guile is an implementation of the Scheme programming language.

The Guile web page is located at https://gnu.org/software/guile/, and
among other things, it contains a copy of the Guile manual and pointers
to more resources.

Guile can run interactively, as a script interpreter, and as a Scheme
compiler to VM bytecode.  It is also packaged as a library so that
applications can easily incorporate a complete Scheme interpreter/VM.
An application can use Guile as an extension language, a clean and
powerful configuration language, or as multi-purpose "glue" to connect
primitives provided by the application.  It is easy to call Scheme code
from C code and vice versa.  Applications can add new functions, data
types, control structures, and even syntax to Guile, to create a
domain-specific language tailored to the task at hand.

Guile implements many common Scheme standards, including R5RS, R6RS, and
a number of SRFIs.  In addition, Guile includes its own module system,
full access to POSIX system calls, networking support, multiple threads,
dynamic linking, a foreign function call interface, and powerful string
processing.

Guile 2.2.7 can be installed in parallel with Guile 3.0.x; see
https://www.gnu.org/software/guile/manual/html_node/Parallel-Installations.html.

 *  *  *

Changes in 2.2.7 (since 2.2.6)

* New interfaces and functionality

** (texinfo plain-text) now exports '*line-width*' fluid

The new '*line-width*' fluid allows users to specify the width of a line
for the purposes of line wrapping.  See "texinfo plain-text" in the
manual.

* Bug fixes

** Reduce GC pressure when using bignums

Guile no longer installs a finalizer on each bignum (large integer) it
creates.  This significantly improves speed and memory usage on
applications that make heavy use of bignums, such as the compiler
itself.

** Fix peval bug that ignored excess arguments

In an expression like:

  ((lambda ()
 (define (add1 n)(+ 1 n))
 (add1 1 2)))

the compiler (specifically 'peval') would silently ignore the excess
argument to 'add1'.

** Respect thread local fluid defaults

Previously (fluid-ref (make-thread-local-fluid #t)) would return #f.
This is now fixed.

** Fix non-deterministic crash in 'finalization_thread_proc'
   (<https://bugs.gnu.org/37757>)

** texinfo properly renders @acronym in plain text
   (<https://bugs.gnu.org/37846>)

** 'scm_port_poll' honors "w" flags
   (<https://bugs.gnu.org/36709>)

** Do not record LDFLAGS in .pc file
   (<https://bugs.gnu.org/36339>)

** Fix Readline configure check for the sake of libedit

This fixes builds on macOS against the system-provided libedit.

** Fix build on platforms where the stack grows upwards

 *  *  *

Here are the compressed sources:
  https://ftp.gnu.org/gnu/guile/guile-2.2.7.tar.gz   (18MB)
  https://ftp.gnu.org/gnu/guile/guile-2.2.7.tar.lz   (9MB)
  https://ftp.gnu.org/gnu/guile/guile-2.2.7.tar.xz   (11MB)

Here are the GPG detached signatures[*]:
  https://ftp.gnu.org/gnu/guile/guile-2.2.7.tar.gz.sig
  https://ftp.gnu.org/gnu/guile/guile-2.2.7.tar.lz.sig
  https://ftp.gnu.org/gnu/guile/guile-2.2.7.tar.xz.sig

Use a mirror for higher download bandwidth:
  https://www.gnu.org/order/ftp.html

Here are the SHA256 checksums:

44b4c5fbbe257ccdebea18420212c9b3e90c3c86a54920d8554039fc6769a007  
guile-2.2.7.tar.gz
5de7c4d28fa25c232512a4d1e76e6152a721dde568a6b1310971e1ea49e18c46  
guile-2.2.7.tar.lz
cdf776ea5f29430b1258209630555beea6d2be5481f9da4d64986b077ff37504  
guile-2.2.7.tar.xz

[*] Use a .sig file to verify that the corresponding file (without the
.sig suffix) is intact.  First, be sure to download both the .sig file
and the corresponding tarball.  Then, run a command like this:

  gpg --verify guile-2.2.7.tar.gz.sig

If that command fails because you don't have the required public key,
then run this command to import it:

  gpg --keyserver pool.sks-keyservers.net \
  --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

and rerun the 'gpg --verify' command.

This release was bootstrapped with the following tools:
  Autoconf 2.69
  Automake 1.16.1
  Libtool 2.4.6
  Makeinfo 6.7
  Gnulib v0.1-1157-gb03f418


Happy hacking with Guile!

Ludovic Courtès and Andy Wingo.


signature.asc
Description: PGP signature


Re: resolving anonymous procedures in statprof

2020-03-05 Thread Ludovic Courtès
Hi Christopher,

Christopher Howard  skribis:

> Hi, Guile's statprof utility is very helpful, but a lot of my output
> lines point to anonymous procedures like "anon #x1db7d38". Is there a
> way to figure out which specific lambdas those are referring to? In
> principle it seems like I should be able to figure that out by running
> the dissembler (,x) on the code I am profiling with statprof, but the
> addresses given by the dissassembler do not match the ones given by
> statprof.

I had the very same question not long ago actually.  :-)

I fiddled a bit to see how it could be that Guile couldn’t figure out
debugging info for a code snippet, to no avail (on Guile 3).  For
instance, the attached snippet didn’t seem to have any effect.

Any ideas, Andy?

Thanks,
Ludo’.

diff --git a/module/statprof.scm b/module/statprof.scm
index 33eac4468..dc057eb20 100644
--- a/module/statprof.scm
+++ b/module/statprof.scm
@@ -388,8 +388,13 @@ always collects full stacks.)"
   data
 
 (define (addr->printable addr pdi)
-  (or (and=> (and=> pdi program-debug-info-name) symbol->string)
-  (string-append "anon #x" (number->string addr 16
+  (or (and=> pdi program-debug-info-name)
+  (let ((base (string-append "anon #x"
+ (number->string addr 16)))
+(loc  (find-source-for-addr addr)))
+(if loc
+(string-append base ":" (source->string loc))
+base
 
 (define (inc-call-data-cum-sample-count! cd)
   (set-call-data-cum-sample-count! cd (1+ (call-data-cum-sample-count cd


Re: Unsafe Conversions and Inlining

2020-02-23 Thread Ludovic Courtès
Hi Christopher,

Christopher Howard  skribis:

> Hi, I'm doing a project with SDR involving a lot of number crunching,
> as SDR usually does, with Guile 3.0 embedded in a C application. Of
> course,  the idea is to have the C functions handle the low-level
> number crunching. But it some places it is difficult to get around
> performance hits from required scheme conversions, e.g.: scheme
> bytevector -> scheme pointer -> C pointer. Of course, working on
> reducing those, but wondering...
>
> (1) Do I have any options for unsafe conversions, e.g., some guile
> library out there which would convert bytevector to C pointer without
> typechecking?

Nope.  Unfortunately, ‘bytevector->pointer’ is currently relatively
expensive because it allocates memory:

  https://lists.gnu.org/archive/html/guile-devel/2019-11/msg00019.html

Now, you could write a C function that takes a bytevector and then uses
‘SCM_BYTEVECTOR_CONTENTS’ on it.  That’d allow you to sidestep
‘bytevector->pointer’ altogether.

> (2) Is there anything I can do as far as inlining those core conversion
> functions that might be useful?

I don’t think so.

However, note that Guile 3.0 should be good at number crunching: it can
unbox floats and integers, and there’s whole-module inlining too, so all
in all, it should work well and allow crossing the C/Scheme border.
Worth a try!

Ludo’.



Re: Lenses in Guile?

2020-02-23 Thread Ludovic Courtès
Hello!

Alex Sassmannshausen  skribis:

> Zelphir Kaltstahl  writes:
>
>> Hi!
>>
>> This reminds me of something: Is there something like
>> https://docs.racket-lang.org/lens/index.html for Guile? Or perhaps an
>> easy to understand tutorial on implementing it?
>
> Check out https://gitlab.com/a-sassmannshausen/guile-lens

Neat!  It’d be nice to make it so that Guile can inline
focus/put/etc. when possible.

Ludo’, who’s seen lots of really cool hacks in this thread!



Re: configuring apps for guile

2020-02-17 Thread Ludovic Courtès
Hi,

Matt Wette  skribis:

> On 2/16/20 9:57 AM, Ludovic Courtès wrote:
>> Hi,
>>
>> Matt Wette  skribis:
>>
>>> What if you have a system that gives this (e.g., Ubuntu 18.04):
>>>
>>> mwette$ /usr/bin/guile -c "(display (assq-ref %guile-build-info
>>> 'prefix)) (newline)"
>>> /usr
>>>
>>> mwette$ /usr/bin/guile -c "(display (%site-ccache-dir)) (newline)"
>>> /usr/lib/x86_64-linux-gnu/guile/2.2/site-ccache
>>>
>>> I'm not sure that guile will find .go files installed in
>>> /usr/lib/guile/2.2/site-ccache.
>> I guess you would run:
>>
>>./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
>>
>> in that case.
>>
>> Does that make sense?
>>
>> Ludo’.
> Yes, but some naive person (like me, for example) would never guess
> that is what is required.  (I ran into this installing bytestructures,
> IIRC).
> And the info is in pkgconfig/guile-2.2.pc, but still requires chasing down
> that resource.   Still thinking about it ...

Perhaps what ‘configure.ac’ could do is provide a hint when there’s a
mismatch.

In some packages I have:

  GUILE_SITE_DIR

  pkgdatadir="$datadir/$PACKAGE_NAME"
  if test "x$guilemoduledir" = "x"; then
guilemoduledir="${datarootdir}/guile/site/$GUILE_EFFECTIVE_VERSION"
guileobjectdir="${libdir}/guile/$GUILE_EFFECTIVE_VERSION/site-ccache"
  else
guileobjectdir="$guilemoduledir"
  fi
  AC_SUBST([guilemoduledir])
  AC_SUBST([guileobjectdir])

  if test "$guilemoduledir" != "$GUILE_SITE"; then
 # Guile won't be able to locate the module "out of the box", so
 # warn the user.
 AC_MSG_WARN([`guilemoduledir' ($guilemoduledir) is different from 
`GUILE_SITE' ($GUILE_SITE).])
 AC_MSG_WARN([Make sure to adjust the `GUILE_LOAD_PATH' environment 
variable accordingly,])
 AC_MSG_WARN([or re-run `configure' with 
`--with-guilemoduledir=$GUILE_SITE'.])
  fi

The bottom line is that ‘configure’ can’t guess what the user wants.

Ludo’.



Re: Happy birthday, Guile!

2020-02-17 Thread Ludovic Courtès
Hi!

Ricardo Wurmus  skribis:

> What do you think about adding these things to
> https://notabug.org/cwebber/guile-webutils/ ?  This was once intended to
> be a collection of useful tools that come in handy when writing web
> applications.

I didn’t know about guile-webutils but consolidating Web tools in this
package sounds like a great idea!

Ludo’.



GNU Shepherd 0.7.0 released

2020-02-16 Thread Ludovic Courtès
We are pleased to announce the GNU Shepherd version 0.7.0, a bug-fix
release.

• About

  The GNU Daemon Shepherd or GNU Shepherd is a service manager written
  in Guile that looks after the herd of system services.  It provides a
  replacement for the service-managing capabilities of SysV-init (or any
  other init) with a dependency-based system with a convenient
  interface.  The GNU Shepherd may also be used by unprivileged users to
  manage per-user daemons (e.g., tor, privoxy, mcron, etc.)  It is
  written in Guile Scheme, and is configured and extended using Guile.

  The GNU Shepherd is developed jointly with the GNU Guix project; it is
  used as the init system of Guix, GNU’s advanced GNU/Linux distribution.

  https://www.gnu.org/software/shepherd/


• Download

  Here are the compressed sources and a GPG detached signature[*]:
https://ftp.gnu.org/gnu/shepherd/shepherd-0.7.0.tar.gz
https://ftp.gnu.org/gnu/shepherd/shepherd-0.7.0.tar.gz.sig

  Use a mirror for higher download bandwidth:
https://ftpmirror.gnu.org/shepherd/shepherd-0.7.0.tar.gz
https://ftpmirror.gnu.org/shepherd/shepherd-0.7.0.tar.gz.sig

  Here are the SHA1 and SHA256 checksums:

  43806f67e15e23d44b992367a0952da581ebfb74  shepherd-0.7.0.tar.gz
  fdbbacdd014313de463d566ba94b6d34b8e8325440f2bcb8154b7de441db431e  
shepherd-0.7.0.tar.gz

  [*] Use a .sig file to verify that the corresponding file (without the
  .sig suffix) is intact.  First, be sure to download both the .sig file
  and the corresponding tarball.  Then, run a command like this:

gpg --verify shepherd-0.7.0.tar.gz.sig

  If that command fails because you don't have the required public key,
  then run this command to import it:

gpg --keyserver pool.sks-keyservers.net \
--recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

  and rerun the 'gpg --verify' command.

  This release was bootstrapped with the following tools:
Autoconf 2.69
Automake 1.16.1
Makeinfo 6.7
Help2man 1.47.12


• Changes since version 0.6.1 (excerpt from the NEWS file)

  ** New crash handler allows shepherd as PID 1 to dump core on GNU/Linux
  ** (shepherd service) now exports ‘default-environment-variables’
  ** ‘make-forkexec-constructor’ no longer removes log file
  ** Disable reboot on ctrl-alt-del before loading the config file
 ()
  ** Exception handling adjusted for Guile 3.0.0

Please report bugs to bug-g...@gnu.org.
Join guix-de...@gnu.org and gnu-system-disc...@gnu.org for discussions.

Ludovic, on behalf of the Shepherd herd.


signature.asc
Description: PGP signature


Re: configuring apps for guile

2020-02-16 Thread Ludovic Courtès
Hi,

Matt Wette  skribis:

> What if you have a system that gives this (e.g., Ubuntu 18.04):
>
> mwette$ /usr/bin/guile -c "(display (assq-ref %guile-build-info
> 'prefix)) (newline)"
> /usr
>
> mwette$ /usr/bin/guile -c "(display (%site-ccache-dir)) (newline)"
> /usr/lib/x86_64-linux-gnu/guile/2.2/site-ccache
>
> I'm not sure that guile will find .go files installed in
> /usr/lib/guile/2.2/site-ccache.

I guess you would run:

  ./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu

in that case.

Does that make sense?

Ludo’.



Happy birthday, Guile!

2020-02-16 Thread Ludovic Courtès
Hello Guilers!

Today, it’s been 9 years since Guile 2.0 came out!

  https://lists.gnu.org/archive/html/guile-devel/2011-02/msg00173.html

It’s impressive how much has been accomplished since 2.0, and how what
seemed like a pipe dream back then came into reality with 3.0.  I think
Guile 2.0 started a renaissance of Guile, and it’s in bloom now.  :-)

We used to have a “Guile potluck” for the anniversary, where people
would bring their own hacks and virtually join for a party.  We missed
it this year, but if there’s a nice hack that you’d like to share, now
is a good time!

Happy hacking with Guile!

Ludo’.


signature.asc
Description: PGP signature


Re: configuring apps for guile

2020-02-16 Thread Ludovic Courtès
Hello Matt,

Matt Wette  skribis:

> From configure.ac:
>
> guile_build_prefix=`$GUILE -c "(display (assq-ref %guile-build-info
> 'prefix))"`
>
> if test "$guile_build_prefix" == "$prefix"; then
>   echo "using paths for installed guile"
>   GUILE_SITE_DIR
>   GUILE_SITE_GO_DIR
>   GUILE_DATA_DIR
> else
>   echo "using default paths for guile"
>   GUILE_SITE=$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION
> GUILE_SITE_GO=$prefix/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache
>   GUILE_DATA=$prefix/share
>   AC_SUBST([GUILE_SITE])
>   AC_SUBST([GUILE_SITE_GO])
>   AC_SUBST([GUILE_DATA])
> fi

I would recommend not even bothering with the first part of the ‘if’,
and instead always default to install files under $prefix (more
precisely: under $datadir and $libdir).

The bits I’ve been using are:

configure.ac:

  dnl We require guile.m4, from Guile.  Make sure it's available.
  m4_pattern_forbid([^GUILE_P])
  m4_pattern_allow([^GUILE_PKG_ERRORS])

  GUILE_PKG([3.0 2.2 2.0])
  GUILE_PROGS

Makefile.am:

  moddir = $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)
  godir  = $(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache

  SOURCES = a.scm b.scm c.scm
  GOBJECTS = $(SOURCES:%.scm=%.go)
  nobase_mod_DATA = $(SOURCES)
  nobase_go_DATA = $(GOBJECTS)

I believe Hall¹ does the right thing, making it easier to get started
with all this!

Thanks,
Ludo’.

¹ https://gitlab.com/a-sassmannshausen/guile-hall



Re: Logo proposal

2020-01-28 Thread Ludovic Courtès
Hi sirgazil,

sirgazil  skribis:

> It's been a while since I designed the current Guile logo. This logo has what 
> I called retracted and expanded forms. The former is the G in parenthesis, 
> and the latter is the one in the website header bar.
>
> I'm fine with the retracted form, I actually like it, but everytime I see the 
> expanded form, the overlapping of shapes bothers me. So I would like to 
> propose two alternative designs:
>
> https://multimedialib.files.wordpress.com/2020/01/guile-logo-proposal-2020-01-24.png

I like the proposals… but I prefer the current one.  :-)

The way I see it, λ is all too common among functional programming
languages and tools.  So it’s both a rallying symbol and one that makes
your project indistinguishable from others in the same domain.

Thanks,
Ludo’.



Re: [ANN] Guile-Git 0.3.0 released

2020-01-21 Thread Ludovic Courtès
Hello,

Erik Edrosa  skribis:

> The release of Guile-Git version 0.3.0 is now out.
>
> Guile-Git is a GNU Guile library providing an API for interacting with
> git repositories using libgit2.

Woohoo, thank you!

> Guile-Guile is free software, licensed under the GPLv3 or later.

It’s even free-free software.  ;-)

Ludo’.



Re: [ANN] Gash 0.2.0 released

2019-12-19 Thread Ludovic Courtès
Hi Timothy,

Timothy Sample  skribis:

> I am very pleased to announce that Gash version 0.2.0 has been released.
> It represents 58 commits from two authors over the course of about six
> months.

Yay, congrats!

> The big news for this release is that Gash can now replace Bash in
> building all of the packages used in Guix’s “Reduced Binary Seed
> Bootstrap” .
> Whereas the previous release could build Bash itself, this release can
> build everything from Mes to GCC and then build Bash.

Woohoo, that’s quite an achievement.

Thanks for all the work!

Ludo’.



Guile-Gcrypt 0.2.1 released

2019-12-15 Thread Ludovic Courtès
I’m pleased to announce Guile-Gcrypt version 0.2.1:

  git clone https://notabug.org/cwebber/guile-gcrypt.git
  cd guile-gcrypt
  git checkout v0.2.1  # or d7b3aab53d6efd62c7a5990b291ca91ca9637d46
  git tag -v v0.2.1

The ‘git tag -v’ command checks the authenticity of your checkout.
You may need to retrieve the signing key first:

  gpg --keyserver pool.sks-keyservers.net \
  --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

Guile-Gcrypt provides Guile 2.x/3.0 bindings to the GNU Libgcrypt
cryptography library.  It provides modules for cryptographic hash
functions, message authentication codes (MAC), public-key cryptography,
strong randomness, and more.

Excerpt from the ‘NEWS’ file:

  * Changes in 0.2.1 (since 0.2.0)

  ** libgcrypt is now always properly initialized (https://bugs.gnu.org/37616)
  ** (gcrypt base64) no longer imports (rnrs)

Guile-Gcrypt does not currently wrap all the Libgcrypt API.  Your help
in improving it is very welcome!  For bug reports and patches, see:

  https://notabug.org/cwebber/guile-gcrypt

Plain email to Chris or myself or guile-user would also work fine.  :-)

Ludo’.


signature.asc
Description: PGP signature


Guile-Gcrypt 0.2.0 released

2019-09-11 Thread Ludovic Courtès
I’m pleased to announce Guile-Gcrypt version 0.2.0:

  git clone https://notabug.org/cwebber/guile-gcrypt.git
  cd guile-gcrypt
  git checkout v0.2.0  # or 17b1225b2b65acf7038753277e95fd95fbede1a3
  git tag -v v0.2.0

The ‘git tag -v’ command checks the authenticity of your checkout.
You may need to retrieve the signing key first:

  gpg --keyserver pool.sks-keyservers.net \
  --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5

Guile-Gcrypt provides Guile 2.x/3.0 bindings to the GNU Libgcrypt
cryptography library.  It provides modules for cryptographic hash
functions, message authentication codes (MAC), public-key cryptography,
strong randomness, and more.

Excerpt from the ‘NEWS’ file:

  * Changes in 0.2.0 (since 0.1.0)

  ** (gcrypt hash) now exposes all the algorithms supported by Libgcrypt
  ** (guix mac) now exposes all the MAC algorithms, not just HMAC
  ** (guix hmac) is deprecated in favor of (guix mac)
  ** Guile-Gcrypt can now be compiled with Guile 2.9 (future 3.0)
  ** Guile-Gcrypt can now be cross-compiled

Guile-Gcrypt does not currently wrap all the Libgcrypt API.  Your help
in improving it is very welcome!  For bug reports and patches, see:

  https://notabug.org/cwebber/guile-gcrypt

Plain email to Chris or myself or guile-user would also work fine.  :-)

Ludo’.


signature.asc
Description: PGP signature


GNU Guile 2.2.6 released

2019-06-30 Thread Ludovic Courtès
We are delighted to announce GNU Guile release 2.2.6, the sixth bug-fix
release in the 2.2 stable release series.  See the NEWS excerpt that
follows for full details.

 *  *  *

Guile is an implementation of the Scheme programming language.

The Guile web page is located at https://gnu.org/software/guile/, and
among other things, it contains a copy of the Guile manual and pointers
to more resources.

Guile can run interactively, as a script interpreter, and as a Scheme
compiler to VM bytecode.  It is also packaged as a library so that
applications can easily incorporate a complete Scheme interpreter/VM.
An application can use Guile as an extension language, a clean and
powerful configuration language, or as multi-purpose "glue" to connect
primitives provided by the application.  It is easy to call Scheme code
from C code and vice versa.  Applications can add new functions, data
types, control structures, and even syntax to Guile, to create a
domain-specific language tailored to the task at hand.

Guile implements many common Scheme standards, including R5RS, R6RS, and
a number of SRFIs.  In addition, Guile includes its own module system,
full access to POSIX system calls, networking support, multiple threads,
dynamic linking, a foreign function call interface, and powerful string
processing.

Guile 2.2.6 can be installed in parallel with Guile 2.0.x; see
https://www.gnu.org/software/guile/manual/html_node/Parallel-Installations.html.

 *  *  *

Changes in 2.2.6 (since 2.2.5)

* Bug fixes

** Fix regression introduced in 2.2.5 that would break HTTP servers

Guile 2.2.5 introduced a bug that would break the built-in HTTP server
provided by the (web server) module.  Specifically, HTTP servers would
hang while reading requests.  See <https://bugs.gnu.org/36350>.

** 'strftime' and 'strptime' honor the current locale encoding

Until now these procedures would wrongfully assume that the locale
encoding is always UTF-8.  See <https://bugs.gnu.org/35920>.

** Re-export 'current-load-port'

This procedure was erroneously removed in the 2.2 series but was still
documented.

** Minor documentation mistakes were fixed


 *  *  *

Here are the compressed sources:
  https://ftp.gnu.org/gnu/guile/guile-2.2.6.tar.gz   (18MB)
  https://ftp.gnu.org/gnu/guile/guile-2.2.6.tar.lz   (9MB)
  https://ftp.gnu.org/gnu/guile/guile-2.2.6.tar.xz   (11MB)

Here are the GPG detached signatures[*]:
  https://ftp.gnu.org/gnu/guile/guile-2.2.6.tar.gz.sig
  https://ftp.gnu.org/gnu/guile/guile-2.2.6.tar.lz.sig
  https://ftp.gnu.org/gnu/guile/guile-2.2.6.tar.xz.sig

Use a mirror for higher download bandwidth:
  https://www.gnu.org/order/ftp.html

Here are the SHA256 checksums:

08c0e748740b61cdd97949b69e8a5e2997d8c2fe6c7e175819eb18444506  
guile-2.2.6.tar.gz
1a71fd3d37f97423a402b2e38b1be9d80387dafa5c66fc3e5967307d85624aa5  
guile-2.2.6.tar.lz
b33576331465a60b003573541bf3b1c205936a16c407bc69f8419a527bf5c988  
guile-2.2.6.tar.xz

[*] Use a .sig file to verify that the corresponding file (without the
.sig suffix) is intact.  First, be sure to download both the .sig file
and the corresponding tarball.  Then, run a command like this:

  gpg --verify guile-2.2.6.tar.gz.sig

If that command fails because you don't have the required public key,
then run this command to import it:

  gpg --keyserver keys.gnupg.net --recv-keys 
3CE464558A84FDC69DB40CFB090B11993D9AEBB5

and rerun the 'gpg --verify' command.

This release was bootstrapped with the following tools:
  Autoconf 2.69
  Automake 1.16.1
  Libtool 2.4.6
  Makeinfo 6.5
  Gnulib v0.1-1157-gb03f418


Happy hacking with Guile!

Ludovic Courtès, Mark H Weaver, and Andy Wingo.


signature.asc
Description: PGP signature


  1   2   3   4   5   6   7   8   9   10   >