lilypond-devel
[Top][All Lists]
Advanced

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

Re: LilyPond and Guile rationals?


From: David Kastrup
Subject: Re: LilyPond and Guile rationals?
Date: Thu, 26 Jul 2012 00:07:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Han-Wen Nienhuys <address@hidden> writes:

> On Wed, Jul 25, 2012 at 6:31 AM, David Kastrup <address@hidden> wrote:
>>
>> Hi,
>>
>> I am getting increasingly annoyed at the abuse of pairs and Moment for
>> denoting rational numbers, and the Rational C++ type has no interfaces
>> of its own to Scheme.
>>
>> Does LilyPond have a history where Guile did not support rational
>> numbers?
>
> Yes. Rational numbers in GUILE are a "recent" addition, IIRC think
> from GUILE 1.8.

Hm.  ly_rational2scm apparently has appeared in 2006 when alterations
were turned into rationals.

>> I am currently trying to do some cleanup in the area of rational number
>> "interfaces" (there have been a few issues in the past week), and there
>> is actually quite a bit of actually non-working code due to trying to
>> manually simulate rational arithmetic and getting it wrong.

Ok, so this is likely going to need some ironing out.  Sigh.  The really
annoying thing is the abuse of Moment for a pseudo-Rational like with
ly:duration-length and ly:moment-mul and similar abominations.  Whether
or not Guile has had rational arithmetic at some point of time, the
resulting mess, particularly with regard to finding useful semantics for
grace timing, seems less than convincing.

Straightening this out with reasonable upwards compatibility will not
necessarily be fun.

-- 
David Kastrup



reply via email to

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