lilypond-user
[Top][All Lists]
Advanced

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

Re: FreeBSD issues


From: David Kastrup
Subject: Re: FreeBSD issues
Date: Wed, 16 Sep 2015 15:26:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Levente <address@hidden> writes:

> Okay.
>
>
> I really don't want to offend, and be smart. I don't really know lilypond
> internals either, but a question is in my head.
>
> How does Lua compares to Guile?
>
> I used Lua a as extension language, and I find it pretty straight forward.

Its syntax is not functional (statements and expressions are different)
and not self-delimited (the end of any Scheme expression is
well-defined) and LilyPond uses Guile for a lot of expressions.

Lua does not offer the tools necessary to implement lexical closure
across language barriers.

LilyPond is rather thoroughly rooted in Scheme/GUILE: the integration
with the language is very thorough and cohesive.

If you take a look at LuaTeX for comparison, you cannot pass information
from TeX input to Lua without pulling it through a catcode regime, and
you cannot get info from Lua to TeX (short of poking around in its
internal arrays, and even then you are out of luck accessing the table
of equivalents, TeX's rudimentary idea of dynamically scoped data,
anywhere but at the top) other than printing TeX code into TeX's input
and then returning from a \directlua call.  And if anything goes wrong,
the error messages are cryptic and not related to error location.

Part of that is of course LuaTeX's fault.  But one actual problem for
integration indeed is that Lua cannot see input other than as full text
whereas Lisp/Scheme's representation of a program is basically the parse
tree before evaluation.  That allows layers of integration/manipulation
that are just not there with languages not having a natural structured
representation of their own programs.

I think that most applications using GUILE as an extension language are
not as tightly interwoven into their host application as LilyPond is.
You'd have to redesign a note typesetter from the ground up, including
its input language and most of the internals, to have something like Lua
work as an extension language.  And it would end up sufficiently
different from LilyPond that it would make no sense calling it
"LilyPond".

-- 
David Kastrup



reply via email to

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