Re: Simplification of live-elements-list, why not?

2010-11-16 Thread Neil Puttock
On 15 November 2010 07:07, Boris Shingarov b...@shingarov.com wrote: The reason I am asking, is because even after spending 10 minutes looking at the procedural-style code in the current live-elements-list, I am still not sure what the answer is to the question, what does this function do? 

Re: Simplification of live-elements-list, why not?

2010-11-16 Thread Neil Puttock
On 16 November 2010 00:37, Han-Wen Nienhuys hanw...@gmail.com wrote: I had a brief look, and it looks like 4b7d9566 by Neil is to blame. I'm not sure what I'm guilty of here; in the absence of an exported function which turns grob-arrays into lists (which I did contemplate adding at the time),

Re: Simplification of live-elements-list, why not?

2010-11-16 Thread Boris Shingarov
On 10-11-16 05:37 PM, Neil Puttock wrote: I'm not sure what I'm guilty of here; in the absence of an exported function which turns grob-arrays into lists (which I did contemplate adding at the time), the code I added seems unobjectionable. That's it: you are basically saying it's perfect

Re: Simplification of live-elements-list, why not?

2010-11-15 Thread Han-Wen Nienhuys
On Mon, Nov 15, 2010 at 5:07 AM, Boris Shingarov b...@shingarov.com wrote: where grob-array-list is a function which I just made. The reason I am asking, is because even after spending 10 minutes looking at the procedural-style code in the current live-elements-list, I am still not sure what

Simplification of live-elements-list, why not?

2010-11-14 Thread Boris Shingarov
In scm/output-lib.scm, the (internally used) function live-elements-list is defined like this: (define (live-elements-list me) (let* ((elements (ly:grob-object me 'elements)) (elts-length (ly:grob-array-length elements)) (live-elements '())) (let get-live ((len

Re: Simplification of live-elements-list, why not?

2010-11-14 Thread Joe Neeman
On Sun, Nov 14, 2010 at 5:19 PM, Boris Shingarov b...@shingarov.com wrote: In scm/output-lib.scm, the (internally used) function live-elements-listis defined like this: (define (live-elements-list me) (let* ((elements (ly:grob-object me 'elements)) (elts-length

Re: Simplification of live-elements-list, why not?

2010-11-14 Thread Boris Shingarov
On 10-11-14 11:59 PM, Joe Neeman wrote: Any specific reason why not just filter on the is-live? predicate? Doesn't filter just work on plain scheme lists? elements is a grob-array object. Of course, if filter doesn't work on such objects it might be better to write a version of filter