[Patch] Indentation in parser.yy
Greetings everybody, I'm currently fiddling with the parser on my local branch (I know adding things to the parser is a big no-no, but nevertheless I hope to come up with some interesting proposals after 2.14 is out). And while doing so, I figured I could make the indentation a little more consistent in parser.yy (right now there are a few inconsistencies, although it doesn't look so bad overall). It's not much, but since it does change quite a few lines (in a such critical source file, on top of that), there's no way I'm gonna try and push that myself :-) Cheers, Valentin 0001-Indentation-in-parser.yy.patch Description: Binary data ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [Patch] Indentation in parser.yy
On Tue, Sep 14, 2010 at 03:11:53PM +0200, Valentin Villenave wrote: It's not much, but since it does change quite a few lines (in a such critical source file, on top of that), there's no way I'm gonna try and push that myself :-) Rejected. Don't manually screw with indentation, especially in a critical source file. If this is part of work on 746, we can talk, although since I offically Started work on it... err... oops, I forgot to claim the issue. /me runs off and does that. Ok, basically, I'm preparing the background for our discussion about indentation, *after* 2.14 is out, and *after* I have enough information to lay out the positive and negative aspects. I don't see much potential for positive outcomes until that's done, so I urge you to withdraw the patch and everybody else to ignore this. Cheers, - Graham ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [Patch] Indentation in parser.yy
Graham Percival wrote Tuesday, September 14, 2010 2:24 PM On Tue, Sep 14, 2010 at 03:11:53PM +0200, Valentin Villenave wrote: It's not much, but since it does change quite a few lines (in a such critical source file, on top of that), there's no way I'm gonna try and push that myself :-) Rejected. Don't manually screw with indentation, especially in a critical source file. If this is part of work on 746, we can talk, although since I offically Started work on it... err... oops, I forgot to claim the issue. /me runs off and does that. Ok, basically, I'm preparing the background for our discussion about indentation, *after* 2.14 is out, and *after* I have enough information to lay out the positive and negative aspects. I don't see much potential for positive outcomes until that's done, so I urge you to withdraw the patch and everybody else to ignore this. You know, after rebuffs like this it's hardly surprising you don't get many people offering to help you. Seeing this, anyone thinking of offering will likely think again. Trevor ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [Patch] Indentation in parser.yy
On Tue, Sep 14, 2010 at 4:27 PM, Trevor Daniels t.dani...@treda.co.uk wrote: Graham Percival wrote Tuesday, September 14, 2010 2:24 PM On Tue, Sep 14, 2010 at 03:11:53PM +0200, Valentin Villenave wrote: It's not much, but since it does change quite a few lines (in a such critical source file, on top of that), there's no way I'm gonna try and push that myself :-) Rejected. Don't manually screw with indentation, especially in a critical source file. You know, after rebuffs like this it's hardly surprising you don't get many people offering to help you. Seeing this, anyone thinking of offering will likely think again. Valentin is a personal friend, and the grumpy/fluffy interplay has been a constant between us. I take much more liberties with him than I would anybody else. If I've taken too much liberty here, I apologize. (I'll follow up with him off-list) Look, we've had a few rounds of fruitless discussion about indentation, pretty much on a yearly basis. Each time, after 20 or 30 emails and goodness knows how many hours spent reading+writing (summed over all developers), nothing has changed. I'm trying to head off such a discussion so that people won't be (more) sick of the topic later on. - Graham ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [Patch] Indentation in parser.yy
On Tue, Sep 14, 2010 at 6:11 PM, Graham Percival gra...@percival-music.ca wrote: On Tue, Sep 14, 2010 at 4:27 PM, Trevor Daniels t.dani...@treda.co.uk wrote: You know, after rebuffs like this it's hardly surprising you don't get many people offering to help you. Seeing this, anyone thinking of offering will likely think again. Valentin is a personal friend, and the grumpy/fluffy interplay has been a constant between us. I take much more liberties with him than I would anybody else. If I've taken too much liberty here, I apologize. (I'll follow up with him off-list) Wow, I'm not sure what's the most touching here: Trevor stepping up very kindly (as always) or Graham referring to me as a friend... Either way, I feel compelled to say something now :) Whilst I do understand that such tactless rebuttals might look impressive and unappealing to newcomers, I hope everyone who subscribes to lily-devel understands that most people here actually have known each other for years, and that there may be a subtext implied in every such conversation. Having been involved (and in charge of) several communities, I must say that the quality of the LilyPond community is well above average, as has been reported by quite a lot of contributors or visitors over the years. Generally speaking, people here are friendly, intelligent, helpful and inconceivably respectful towards each other. This specific discussion makes my point: every time there might be some words considered to harsh, someone steps up to try and defuse any possible conflict (even in otherwise lost causes, as we've seen). Graham has been my mentor for nearly five years now, and he somehow still is, although I have consistently provided him with every reason to give up on me: even though I disagree with him on this one, I appreciate the fact that it took him less than 15 minutes to acknowledge my patch -- albeit in his own way :) Look, we've had a few rounds of fruitless discussion about indentation, pretty much on a yearly basis. Each time, after 20 or 30 emails and goodness knows how many hours spent reading+writing (summed over all developers), nothing has changed. I'm trying to head off such a discussion so that people won't be (more) sick of the topic later on. Well, maybe for once my approach is less ambitious than yours: from what I gathered of said discussions, our policy was do not push huge commits affecting lots of files, but feel free to correct indentation if you stumble upon inconsistencies in a source file you happen to be working on. Which is what I did in this specific case. Anyway, I certainly won't fight over this patch. Not being familiar with C++/yacc development, I can't tell exactly how obtrusive it is (and I suspect neither can you). All I know is that it feels good to do something you don't think you totally suck at[1], and correcting indentation did nicely fit in this category for me, at least compared to coding, bug-handling, writing documentation or newsletters :) Cheers, Valentin PS. BTW: many thanks to John for having taught me how to use emacs, which now makes me able to indent files The Only Right Way® :-) ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Help understanding how code works (or doesn't)
I'm trying to fix Issue 372, which has \partial 4 \grace f16 d4 | \repeat unfold 8 c8 fail to autobeam the 8th notes. In running through the debugger, the problem is caused because a grace part shows up in the measure position, so the autobeam never kicks in. I think that the reason for this is because the \partial command sets only the main part of the measure position. And in this case, because of the grace note, I think the grace part should be set as well. So in order to try this, I decided to modify the code for \partial, which IIUC appears in scm/ly-syntax-constructors.scm: (define-ly-syntax-simple (partial dur) Make a partial measure. (let ((mom (ly:moment-sub ZERO-MOMENT (ly:duration-length dur ;; We use `descend-to-context' here instead of `context-spec-music' to ;; ensure \partial still works if the Timing_translator is moved (descend-to-context (context-spec-music (make-property-set 'measurePosition mom) 'Timing) 'Score))) In order to get the grace part of the current moment, I think I need to use make-apply-context. So I wrote some code: (define-ly-syntax-simple (partial dur) Make a partial measure. (let ((mom (ly:moment-sub ZERO-MOMENT (ly:duration-length dur ;; We use `descend-to-context' here instead of `context-spec-music' to ;; ensure \partial still works if the Timing_translator is moved (descend-to-context (context-spec-music (make-apply-context (lambda (c) (let ((now (ly:context-current-moment c))) (display \nIn partial\n) (display now)(newline) (display mom)(newline) (make-property-set 'measurePosition mom 'Timing) 'Score))) When I used this code, the autobeaming worked, but the bar check in the above code failed. sorensen2:lilypond Carl$ lilypond test-372.ly GNU LilyPond 2.13.34 Processing `test-372.ly' Parsing... Interpreting music... In partial #Mom 0G-1/16 #Mom -1/4 test-372.ly:7:5: warning: barcheck failed at: 1/4 d4 | Preprocessing graphical objects... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `test-372.ps'... Converting to `./test-372.pdf'... success: Compilation successfully completed Note that at this point, I haven't changed the value to which I am setting 'measurePosition. So, can anybody help me see why this code doesn't work? Thanks, Carl ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel