lilypond-devel
[Top][All Lists]
Advanced

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

Re: Nested contexts - fix


From: Rune Zedeler
Subject: Re: Nested contexts - fix
Date: Mon, 29 Oct 2007 18:42:05 +0100
User-agent: Thunderbird 1.5.0.14pre (X11/20071022)

Jan Nieuwenhuizen skrev:

In software there's no such thing as a temporary solution.

Quoting the changelog:

1.3.142.rz1
===========

* Added "hacky" drum notation/midi. See input/tricks/drums.ly and
  ly/drumpitch.ly. Moved midi-instruments to scm.

* Added temporary nested staffgroups/choirstaffs support
  use Context InnerStaffGroup / InnerChoirStaff.

Forgive my ignorance but is testing for A->B->A cycles not easily
possible?

Yes.
But then A-B-C-A loops will still not be detected. Testing for A-B-C-A-loops is also easy, but then A-B-C-D-A-loops will not be detected. Etc.

We must not have an easy infinite loop attack?

If this is official policy then it was a really bad move to include a turing complete language (scheme) in lilypond :-)

%%% BEGIN coredump.ly %%%
#(define (inflist) (cons 42 (inflist)))
#(inflist)
{
  c d e f
}
%%% END coredump.ly %%%

If we detect a loop, should there not be a warning or something?
Should this patch not include the removal of Inner*, including
convert rules?

Yep.
As I said I have git problems and just included the patch here because I was unable to commit. I am in the middle of doing pitches, so doing another non-minor restructuring, such as removing a context, is not something I want to do at the same time. I posted the patch here in the hope that somebody would do some testing to see whether it works and do not lead to infinite loops or other errors. No need to "polish it" before we have verified that it works. Of course convert-ly-rules should be added, and the superfluous contexts should be removed. And I admit that also testing for level-2-loops is a good idea, so that staffgroups and choirstaves can accept each other.

In all cases I think that this should wait till 2.15.
I can imagine that introducing cycles in the context hierarchy could introduce some hard-to-find random-segfault-bugs - and it would therefore be a bad idea to apply it just before a new stable release.

-Rune




reply via email to

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