lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guile REPL Server


From: David Kastrup
Subject: Re: Guile REPL Server
Date: Tue, 17 May 2022 23:28:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Jonas Hahnfeld via LilyPond user discussion <lilypond-user@gnu.org>
writes:

> On Tue, 2022-05-17 at 09:57 +0200, Jean Abou Samra wrote:
>> Le 17/05/2022 à 00:29, Hendursaga a écrit :
>> > I'm trying to start a REPL server[1] inside LilyPond's Guile
>> interpreter, but I can't get it to even load readline support.
>> 
>> Readline support is an optional feature in Guile. It looks like
>> out new infrastructure for building binaries compiles Guile without
>> it. We may or may not want to do it (Readline is an extra dependency);
>> CCing Jonas on this matter.
>
> Right, this is intentional. I don't find it convincing that the
> official binaries should be bigger for everybody to enable an optional
> feature (readline support) in a dependency (Guile) that only a very
> tiny fraction might ever try to use...

Personally, I'd rather have it.  The tiny fraction that will want
readline support will want it for running scheme-sandbox or other forms
of REPL.  It greatly increases the friendliness of playing around with
Scheme stuff in the manner the manual suggests, and the people playing
around with Scheme stuff are the most likely candidates for becoming
future contributors.

We don't make the "Extending LilyPond" guide optional for a reason, and
it starts off right away with

    1.1.1 Scheme sandbox
    --------------------

    The LilyPond installation includes the Guile implementation of Scheme.
    On most systems you can experiment in a Scheme sandbox by opening a
    terminal window and typing ‘guile’.  On some systems, notably Windows,
    you may need to set the environment variable ‘GUILE_LOAD_PATH’ to the
    directory ‘../usr/share/guile/1.8’ in the LilyPond installation.  For
    the full path to this directory see *note (lilypond-learning)Other
    sources of information::.  Alternatively, Windows users may simply
    choose ‘Run’ from the Start menu and enter ‘guile’.

       However, a hands-on Scheme sandbox with all of LilyPond loaded is
    available with this command line:
         lilypond scheme-sandbox

    Once the sandbox is running, you will receive a guile prompt:

         guile>

       You can enter Scheme expressions at this prompt to experiment with
    Scheme.  If you want to be able to use the GNU readline library for
    nicer editing of the Scheme command line, check the file
    ‘ly/scheme-sandbox.ly’ for more information.  If you already have
    enabled the readline library for your interactive Guile sessions outside
    of LilyPond, this should work in the sandbox as well.

I don't think we should put a roadblock here, in particular since it is
close to impossible to fudge a version of readline into the precompiled
binaries after the fact.

Yes, it is an additional nuisance for building.  I think the strategic
value of it would offset that.

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]