Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-03-04 Thread Mike Solomon
On Mar 4, 2011, at 5:02 PM, mts...@gmail.com wrote: > Thank you very much, Han Wen, for your comments. It optimizes several > sluggish parts of the algorithm and makes for more maintainable & > readable code. > > I feel that, when you read over my comments below, you'll see that the > stuff in t

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-03-04 Thread mtsolo
Thank you very much, Han Wen, for your comments. It optimizes several sluggish parts of the algorithm and makes for more maintainable & readable code. I feel that, when you read over my comments below, you'll see that the stuff in the balloon engraver is necessary to get correctly working annota

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-03-04 Thread hanwenn
Hi mike, wow , you have a penchant for attacking difficult problems! A lot of comments below; overall my impression is that you try to do everything at the same time. It would be easier (also for reviewers) if you feed them your ideas bit by bit. I think that the whole balloon hack and position

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-03-03 Thread Mike Solomon
On Mar 2, 2011, at 6:39 PM, Joe Neeman wrote: > On Thu, Mar 3, 2011 at 3:08 AM, Mike Solomon wrote: > On Mar 2, 2011, at 8:05 AM, Mike Solomon wrote: > > > On Mar 2, 2011, at 7:23 AM, joenee...@gmail.com wrote: > > > >> I haven't had time to look at this carefully, but I'll have closer look > >>

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-03-02 Thread Joe Neeman
On Thu, Mar 3, 2011 at 3:08 AM, Mike Solomon wrote: > On Mar 2, 2011, at 8:05 AM, Mike Solomon wrote: > > > On Mar 2, 2011, at 7:23 AM, joenee...@gmail.com wrote: > > > >> I haven't had time to look at this carefully, but I'll have closer look > >> later. What I don't understand, though, is why t

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-03-02 Thread Mike Solomon
On Mar 2, 2011, at 8:05 AM, Mike Solomon wrote: > On Mar 2, 2011, at 7:23 AM, joenee...@gmail.com wrote: > >> I haven't had time to look at this carefully, but I'll have closer look >> later. What I don't understand, though, is why this problem needs such >> extensive changes. If it's just a matt

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-03-02 Thread Mike Solomon
On Mar 2, 2011, at 7:23 AM, joenee...@gmail.com wrote: > I haven't had time to look at this carefully, but I'll have closer look > later. What I don't understand, though, is why this problem needs such > extensive changes. If it's just a matter of preventing repeated > footnotes at the beginning/e

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-03-02 Thread joeneeman
I haven't had time to look at this carefully, but I'll have closer look later. What I don't understand, though, is why this problem needs such extensive changes. If it's just a matter of preventing repeated footnotes at the beginning/end of a line, it should be enough to examine footnote->get_colu

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-03-02 Thread Mike Solomon
On Mar 1, 2011, at 10:19 PM, pnor...@gmail.com wrote: > Hi Mike, > > I have a quick comment for you below. > > Thanks, > Patrick > > > http://codereview.appspot.com/4213042/diff/24035/scm/define-stencil-commands.scm > File scm/define-stencil-commands.scm (right): > > http://codereview.appspot

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-03-01 Thread pnorcks
Hi Mike, I have a quick comment for you below. Thanks, Patrick http://codereview.appspot.com/4213042/diff/24035/scm/define-stencil-commands.scm File scm/define-stencil-commands.scm (right): http://codereview.appspot.com/4213042/diff/24035/scm/define-stencil-commands.scm#newcode37 scm/define-s

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-03-01 Thread mtsolo
Hey all, I'm having a lot of difficulty with the problem Neil pointed out. If anyone has any suggestions on how to solve it, please let me know! I believe that this problem will rear its ugly head for all grobs at a line break with a break-visibility setting. Thank you very much Neil for your

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-03-01 Thread Mike Solomon
On Mar 1, 2011, at 4:36 PM, Neil Puttock wrote: > On 28 February 2011 23:02, Mike Solomon wrote: > >> I can use either (cross-staff . #t) , (Y-extent . #f) , or both depending on >> what floats people's boats. > > (Y-extent . #f) is less hackish. Done. > >> Sorry - I've since fixed it in lin

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-03-01 Thread n . puttock
http://codereview.appspot.com/4213042/diff/24025/lily/balloon-engraver.cc File lily/balloon-engraver.cc (right): http://codereview.appspot.com/4213042/diff/24025/lily/balloon-engraver.cc#newcode65 lily/balloon-engraver.cc:65: Pointer_group_interface::add_grob (g, ly_symbol2scm ("annotations"), b

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-03-01 Thread Neil Puttock
On 28 February 2011 23:02, Mike Solomon wrote: > I can use either (cross-staff . #t) , (Y-extent . #f) , or both depending on > what floats people's boats. (Y-extent . #f) is less hackish. > Sorry - I've since fixed it in line 65-66 of balloon.cc .  Sometimes, > parent-spanner is not set (this

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-28 Thread mtsolo
http://codereview.appspot.com/4213042/diff/35006/lily/footnote-engraver.cc File lily/footnote-engraver.cc (right): http://codereview.appspot.com/4213042/diff/35006/lily/footnote-engraver.cc#newcode67 lily/footnote-engraver.cc:67: b->set_property ("footnote-text", event->get_property ("footnote-t

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-28 Thread n . puttock
http://codereview.appspot.com/4213042/diff/35006/lily/footnote-engraver.cc File lily/footnote-engraver.cc (right): http://codereview.appspot.com/4213042/diff/35006/lily/footnote-engraver.cc#newcode67 lily/footnote-engraver.cc:67: b->set_property ("footnote-text", event->get_property ("footnote-t

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-28 Thread mtsolo
http://codereview.appspot.com/4213042/diff/44001/lily/balloon.cc File lily/balloon.cc (right): http://codereview.appspot.com/4213042/diff/44001/lily/balloon.cc#newcode77 lily/balloon.cc:77: Grob *commonx = bounds[LEFT]->common_refpoint (bounds[RIGHT], X_AXIS); On 2011/02/28 23:04:21, Neil Puttoc

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-28 Thread n . puttock
http://codereview.appspot.com/4213042/diff/44001/lily/balloon.cc File lily/balloon.cc (right): http://codereview.appspot.com/4213042/diff/44001/lily/balloon.cc#newcode77 lily/balloon.cc:77: Grob *commonx = bounds[LEFT]->common_refpoint (bounds[RIGHT], X_AXIS); You might as well say Grob *common

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-28 Thread Mike Solomon
On Feb 28, 2011, at 5:42 PM, Neil Puttock wrote: > On 28 February 2011 00:32, wrote: > >> For now, I'm just gonna remove this kludge and leave it as is. It means >> that certain spanners may budge when annotations are attached to them, >> but I'll need more time to figure out a sustainable way

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-28 Thread Neil Puttock
On 28 February 2011 00:32, wrote: > For now, I'm just gonna remove this kludge and leave it as is.  It means > that certain spanners may budge when annotations are attached to them, > but I'll need more time to figure out a sustainable way to get the axis > engraver to ignore the height of these

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-28 Thread Neil Puttock
On 28 February 2011 21:06, m...@apollinemike.com wrote: > I found a problem w/ my footnote work.  Check out the 2nd example in bad.ly > and bad.pdf .  Why do you think the annotation is placed so far to the left > here but not in other cases? You're setting the spanner bounds to a NonMusicalPa

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-27 Thread Mike Solomon
On Feb 27, 2011, at 8:07 PM, Han-Wen Nienhuys wrote: > On Sun, Feb 27, 2011 at 1:25 PM, Mike Solomon wrote: >> Should be fixed... > > Can you dedicate a commit to documenting/commenting how the engraver > deals with beams? I couldn't work out reading how the engraver deals > with (auto)beams, a

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-27 Thread Han-Wen Nienhuys
On Sun, Feb 27, 2011 at 1:25 PM, Mike Solomon wrote: > Should be fixed... Can you dedicate a commit to documenting/commenting how the engraver deals with beams? I couldn't work out reading how the engraver deals with (auto)beams, and more importantly, I couldn't understand why your fix solves a

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-27 Thread mtsolo
Thanks Neil! Just a couple questions below - everything else was pretty automatic. http://codereview.appspot.com/4213042/diff/34032/input/regression/footnotes.ly File input/regression/footnotes.ly (right): http://codereview.appspot.com/4213042/diff/34032/input/regression/footnotes.ly#newcode7

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-27 Thread n . puttock
http://codereview.appspot.com/4213042/diff/34032/input/regression/footnotes.ly File input/regression/footnotes.ly (right): http://codereview.appspot.com/4213042/diff/34032/input/regression/footnotes.ly#newcode7 input/regression/footnotes.ly:7: \book { } Sorry, I meant wrap all the music inside a

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-27 Thread Mike Solomon
On Feb 27, 2011, at 4:24 PM, n.putt...@gmail.com wrote: > On 2011/02/27 04:11:56, MikeSol wrote: > > > http://codereview.appspot.com/4213042/diff/40001/lily/footnote-engraver.cc >> File lily/footnote-engraver.cc (right): > > > http://codereview.appspot.com/4213042/diff/40001/lily/footnote-engr

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-27 Thread n . puttock
On 2011/02/27 04:11:56, MikeSol wrote: http://codereview.appspot.com/4213042/diff/40001/lily/footnote-engraver.cc File lily/footnote-engraver.cc (right): http://codereview.appspot.com/4213042/diff/40001/lily/footnote-engraver.cc#newcode60 lily/footnote-engraver.cc:60: Grob * b = make_item (

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-26 Thread Neil Puttock
On 25 February 2011 22:53, wrote: > On 2011/02/25 20:37:37, Neil Puttock wrote: >> >> This reinvents the wheel a bit. :) > >> (define-markup-command (draw-hline layout props) >>   () >>   #:category graphic >>   #:properties ((draw-line-markup) >>                 (line-width)) >>   (interpret-ma

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-23 Thread Mike Solomon
On Feb 23, 2011, at 11:18 PM, Mike Solomon wrote: > On Feb 23, 2011, at 11:16 PM, Joe Neeman wrote: > >> On Thu, Feb 24, 2011 at 2:49 PM, Han-Wen Nienhuys wrote: >> On Wed, Feb 23, 2011 at 11:11 PM, Joe Neeman wrote: >> >> > - SCM footnotes_ to Stencil, >> > - scm_gc_mark (footnotes_) to Ste

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-23 Thread Mike Solomon
On Feb 23, 2011, at 11:16 PM, Joe Neeman wrote: > On Thu, Feb 24, 2011 at 2:49 PM, Han-Wen Nienhuys wrote: > On Wed, Feb 23, 2011 at 11:11 PM, Joe Neeman wrote: > > > - SCM footnotes_ to Stencil, > > - scm_gc_mark (footnotes_) to Stencil::mark_smob (for SCM garbage > > collection) > > - footno

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-23 Thread Joe Neeman
On Thu, Feb 24, 2011 at 2:49 PM, Han-Wen Nienhuys wrote: > On Wed, Feb 23, 2011 at 11:11 PM, Joe Neeman wrote: > > > - SCM footnotes_ to Stencil, > > - scm_gc_mark (footnotes_) to Stencil::mark_smob (for SCM garbage > > collection) > > - footnotes_ = scm_append (footnotes_, s.footnotes_) > >

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-23 Thread Han-Wen Nienhuys
On Wed, Feb 23, 2011 at 11:11 PM, Joe Neeman wrote: > -  SCM footnotes_ to Stencil, > - scm_gc_mark (footnotes_) to Stencil::mark_smob (for SCM garbage > collection) > - footnotes_ = scm_append (footnotes_, s.footnotes_) >   to Stencil::add_stencil > - a scheme function ly:stencil::make-footnote

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)

2011-02-23 Thread Joe Neeman
On Thu, Feb 24, 2011 at 12:31 PM, Mike Solomon wrote: > On Feb 23, 2011, at 5:14 PM, joenee...@gmail.com wrote: > > > > > > http://codereview.appspot.com/4213042/diff/2001/lily/constrained-breaking.cc > > File lily/constrained-breaking.cc (right): > > > > > http://codereview.appspot.com/4213042/d