Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-09-04 Thread dak
On 2013/09/04 18:36:16, Keith wrote: https://codereview.appspot.com/12957047/diff/88001/lily/stencil-integral.cc File lily/stencil-integral.cc (right): https://codereview.appspot.com/12957047/diff/88001/lily/stencil-integral.cc#newcode917 lily/stencil-integral.cc:917: } My best guess for the

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-09-04 Thread k-ohara5a5a
https://codereview.appspot.com/12957047/diff/88001/lily/stencil-integral.cc File lily/stencil-integral.cc (right): https://codereview.appspot.com/12957047/diff/88001/lily/stencil-integral.cc#newcode917 lily/stencil-integral.cc:917: } My best guess for the cause of the extra memory, showing in th

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-28 Thread Mike Solomon
On 28 août 2013, at 09:47, "Keith OHara" wrote: > On Tue, 27 Aug 2013 23:30:32 -0700, Mike Solomon wrote: > >> On 28 août 2013, at 05:28, "Keith OHara" wrote: >> >>> Of course I think it would be better to allow box dimensions in the stencil >>> expression. Boxes are simple enough to enter

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-28 Thread Keith OHara
On Tue, 27 Aug 2013 23:30:32 -0700, Mike Solomon wrote: On 28 août 2013, at 05:28, "Keith OHara" wrote: Of course I think it would be better to allow box dimensions in the stencil expression. Boxes are simple enough to enter as coordinates in markup expressions like \pad-to-box, they are

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-27 Thread Mike Solomon
On 28 août 2013, at 05:28, "Keith OHara" wrote: > On Mon, 26 Aug 2013 23:57:58 -0700, Mike Solomon wrote: > >> On 27 août 2013, at 09:01, "Keith OHara" wrote: >> >>> On Mon, 26 Aug 2013 22:37:17 -0700, Mike Solomon >>> wrote: >>> I'd argue that (2) is better. >>> >>> What, then, is

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-27 Thread Keith OHara
On Mon, 26 Aug 2013 23:57:58 -0700, Mike Solomon wrote: On 27 août 2013, at 09:01, "Keith OHara" wrote: On Mon, 26 Aug 2013 22:37:17 -0700, Mike Solomon wrote: I'd argue that (2) is better. What, then, is your argument ? What I put below - namely, that it is consistent with the previo

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-27 Thread Mike Solomon
On 27 août 2013, at 11:09, d...@gnu.org wrote: > On 2013/08/27 06:58:05, mike7 wrote: >> On 27 août 2013, at 09:01, "Keith OHara" > wrote: > >> > How are skylines asked-for, and is it possible to know if they were > asked for >> while interpreting the markup ? >> > {

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-27 Thread dak
On 2013/08/27 06:58:05, mike7 wrote: On 27 août 2013, at 09:01, "Keith OHara" wrote: > How are skylines asked-for, and is it possible to know if they were asked for while interpreting the markup ? > {c4-\markup \whiteout \pad-to-box #(-0.5 . 9) #(-0.5 . 1.5) \con

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread Mike Solomon
On 27 août 2013, at 09:01, "Keith OHara" wrote: > On Mon, 26 Aug 2013 22:37:17 -0700, Mike Solomon wrote: > >> On 27 août 2013, at 07:18, "Keith OHara" wrote: >> >>> (1) At the moment, the stencil expressions are assembled first, when markup >>> is interpreted, and then stencil_traverser()

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread Keith OHara
On Mon, 26 Aug 2013 22:37:17 -0700, Mike Solomon wrote: On 27 août 2013, at 07:18, "Keith OHara" wrote: (1) At the moment, the stencil expressions are assembled first, when markup is interpreted, and then stencil_traverser() reads the stencil expression to figure the skylines. So long as

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread Mike Solomon
On 27 août 2013, at 07:18, "Keith OHara" wrote: > On Mon, 26 Aug 2013 02:11:28 -0700, Mike Solomon wrote: > >> >> I think that if we can devise a better system, the creation of a new stencil >> primitive is unnecessary. If we agree that we should implement a system >> where stencils are ca

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread Keith OHara
On Mon, 26 Aug 2013 02:11:28 -0700, Mike Solomon wrote: I think that if we can devise a better system, the creation of a new stencil primitive is unnecessary. If we agree that we should implement a system where stencils are carriers of their own skylines, then we should fix this bug using

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread dak
On 2013/08/26 16:32:24, mike7 wrote: On 26 août 2013, at 13:31, mailto:d...@gnu.org wrote: > _Anything_ is "publicly useable". If that's supposed to be a criterion, > we may not change LilyPond ever again. We try to support programming > interfaces as long as it is feasible. But the way

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread Mike Solomon
On 26 août 2013, at 13:31, d...@gnu.org wrote: > On 2013/08/26 10:18:04, mike7 wrote: > >> I think Harm is right that, irrespective of documentation, users use > what's >> available. > > If people meddle with internals instead of using provided API functions, > they deserve whatever they get. >

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread Werner LEMBERG
>> Even if it is public: Simply say in the stencil's documentation >> that users must not use it! Additionally, we already have >> `Internal Properties' sections in the `lilypond-internals' >> documentation which the user should ignore. > > Well, I do use 'Internal Properties' in several definit

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread dak
On 2013/08/26 10:18:04, mike7 wrote: I think Harm is right that, irrespective of documentation, users use what's available. If people meddle with internals instead of using provided API functions, they deserve whatever they get. If we're going to add something, we want to be sure that it h

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread Mike Solomon
On 26 août 2013, at 13:13, d...@gnu.org wrote: > On 2013/08/26 10:05:25, mike7 wrote: >> On 26 août 2013, at 13:00, mailto:d...@gnu.org wrote: > >> > That's bullshit since nobody assembles stencil expressions manually. > >> I assemble stencil expressions manually. > > If you meddle with interna

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread dak
On 2013/08/26 10:05:25, mike7 wrote: On 26 août 2013, at 13:00, mailto:d...@gnu.org wrote: > That's bullshit since nobody assembles stencil expressions manually. I assemble stencil expressions manually. If you meddle with internals, that's your own business. > This is done using opaque

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread Thomas Morley
2013/8/26 Werner LEMBERG : > >> What we don't want is for people to start using the stencil >> primitive if we know it's temporary. But if we can somehow prevent >> that (a sort of internal-only primitive) plus add a big TODO >> somewhere, that'd be OK and would save time. > > Even if it is public

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread Mike Solomon
On 26 août 2013, at 13:00, d...@gnu.org wrote: > That's bullshit since nobody assembles stencil expressions manually. I assemble stencil expressions manually. > This is done using opaque functions like ly:stencil-translate. ly:make-stencil is all over the place in the code and is a public func

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread dak
On 2013/08/26 09:42:46, mike7 wrote: In French there's a saying "Temporary solutions have a way of becoming permanent", which is why I'd like to avoid it if possible. Allow me to raise an eyebrow. What we don't want is for people to start using the stencil primitive if we know it's temporary

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread dak
On 2013/08/26 09:11:39, mike7 wrote: On 26 août 2013, at 11:41, mailto:d...@gnu.org wrote: > On 2013/08/26 06:42:38, mike7 wrote: >> On 26 août 2013, at 08:35, mailto:d...@gnu.org wrote: > >> > So why do you talk about that in the first place? > >> Because I'd rather spend more time implementi

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread Werner LEMBERG
> What we don't want is for people to start using the stencil > primitive if we know it's temporary. But if we can somehow prevent > that (a sort of internal-only primitive) plus add a big TODO > somewhere, that'd be OK and would save time. Even if it is public: Simply say in the stencil's docum

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread Mike Solomon
On 26 août 2013, at 12:39, Werner LEMBERG wrote: > >> To summarize: stencil expressions (expr_) currently do not contain >> information for how to place stencils with respect to others. They >> contain information passed to the backends on how to lay out >> stencils. If we adopt either Keith'

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread Werner LEMBERG
> To summarize: stencil expressions (expr_) currently do not contain > information for how to place stencils with respect to others. They > contain information passed to the backends on how to lay out > stencils. If we adopt either Keith's patch or my first one (which I > created before I though

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread Mike Solomon
On 26 août 2013, at 11:41, d...@gnu.org wrote: > On 2013/08/26 06:42:38, mike7 wrote: >> On 26 août 2013, at 08:35, mailto:d...@gnu.org wrote: > >> > So why do you talk about that in the first place? > >> Because I'd rather spend more time implementing a solid system than > less time >> impleme

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-26 Thread dak
On 2013/08/26 06:42:38, mike7 wrote: On 26 août 2013, at 08:35, mailto:d...@gnu.org wrote: > So why do you talk about that in the first place? Because I'd rather spend more time implementing a solid system than less time implementing a kludge. In the context of this issue, we are curren

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-25 Thread Mike Solomon
On 26 août 2013, at 08:35, d...@gnu.org wrote: > On 2013/08/26 05:25:42, mike7 wrote: >> On 26 août 2013, at 08:20, mailto:d...@gnu.org wrote: > >> > Indeed. Instead of calling stencil-integrate on a "surrogate > stencil" >> > or whatever for deriving a skyline, the respective stencil operation

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-25 Thread dak
On 2013/08/26 05:25:42, mike7 wrote: On 26 août 2013, at 08:20, mailto:d...@gnu.org wrote: > Indeed. Instead of calling stencil-integrate on a "surrogate stencil" > or whatever for deriving a skyline, the respective stencil operation in > stencil-integrate will just plug in a a "surrogate

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-25 Thread Mike Solomon
On 26 août 2013, at 08:20, d...@gnu.org wrote: > On 2013/08/26 04:51:50, mike7 wrote: >> On 26 août 2013, at 07:36, mailto:d...@gnu.org wrote: > >> > On 2013/08/26 04:08:17, mike7 wrote: >> >> On 25 août 2013, at 16:04, mailto:d...@gnu.org wrote: >> > >> >> > On 2013/08/25 08:22:01, mike7 wrote:

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-25 Thread dak
On 2013/08/26 04:51:50, mike7 wrote: On 26 août 2013, at 07:36, mailto:d...@gnu.org wrote: > On 2013/08/26 04:08:17, mike7 wrote: >> On 25 août 2013, at 16:04, mailto:d...@gnu.org wrote: > >> > On 2013/08/25 08:22:01, mike7 wrote: >> >> On 25 août 2013, at 09:15, mailto:k-ohara5...@oco.net wro

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-25 Thread Mike Solomon
On 26 août 2013, at 07:36, d...@gnu.org wrote: > On 2013/08/26 04:08:17, mike7 wrote: >> On 25 août 2013, at 16:04, mailto:d...@gnu.org wrote: > >> > On 2013/08/25 08:22:01, mike7 wrote: >> >> On 25 août 2013, at 09:15, mailto:k-ohara5...@oco.net wrote: >> > >> >> > A second stencil is not a ver

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-25 Thread dak
On 2013/08/26 04:08:17, mike7 wrote: On 25 août 2013, at 16:04, mailto:d...@gnu.org wrote: > On 2013/08/25 08:22:01, mike7 wrote: >> On 25 août 2013, at 09:15, mailto:k-ohara5...@oco.net wrote: > >> > A second stencil is not a very good data structure for reserving > space. >> > Skylines are b

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-25 Thread Mike Solomon
On 25 août 2013, at 16:04, d...@gnu.org wrote: > On 2013/08/25 08:22:01, mike7 wrote: >> On 25 août 2013, at 09:15, mailto:k-ohara5...@oco.net wrote: > >> > A second stencil is not a very good data structure for reserving > space. >> > Skylines are better at this, and we can \once\override 'paddi

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-25 Thread k-ohara5a5a
The cost-benefit balance shows extra memory use, against potential gain that we have trouble imagining, so no net gain. On 2013/08/25 08:22:01, mike7 wrote: The necessity that comes to mind for the more general solution is the work I did on line spanners, where we often want different skyline

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-25 Thread dak
On 2013/08/25 08:22:01, mike7 wrote: On 25 août 2013, at 09:15, mailto:k-ohara5...@oco.net wrote: > A second stencil is not a very good data structure for reserving space. > Skylines are better at this, and we can \once\override 'padding and > 'horizon-padding to get padding that follows the

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-25 Thread Mike Solomon
On 25 août 2013, at 09:15, k-ohara5...@oco.net wrote: > On 2013/08/24 16:33:39, MikeSol wrote: > >> On 2013/08/24 16:19:27, dak wrote: > >> > Stupid question: _iff_ you store a _whole_ replacement skyline > anyway, >> > shouldn't pad-around just shift the original left/right/up/down > skylines >

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-24 Thread k-ohara5a5a
On 2013/08/24 16:33:39, MikeSol wrote: On 2013/08/24 16:19:27, dak wrote: > Stupid question: _iff_ you store a _whole_ replacement skyline anyway, > shouldn't pad-around just shift the original left/right/up/down skylines > left/right/up/down by the given amount (don't ask me what to do

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-24 Thread mtsolo
https://codereview.appspot.com/12957047/diff/46001/lily/paper-system.cc File lily/paper-system.cc (right): https://codereview.appspot.com/12957047/diff/46001/lily/paper-system.cc#newcode55 lily/paper-system.cc:55: if (head == ly_symbol2scm ("skyline-stencil")) On 2013/08/24 16:19:27, dak wrote:

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-24 Thread Mike Solomon
On 24 août 2013, at 16:36, d...@gnu.org wrote: > On 2013/08/24 13:19:30, mike7 wrote: > >> The question I'm asking is "How can I allow the user to replace the > skyline of a >> stencil with another shape?" > > I got that. But what is the actual use case for that? Before skylines > became a th

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-24 Thread dak
https://codereview.appspot.com/12957047/diff/46001/lily/paper-system.cc File lily/paper-system.cc (right): https://codereview.appspot.com/12957047/diff/46001/lily/paper-system.cc#newcode55 lily/paper-system.cc:55: if (head == ly_symbol2scm ("skyline-stencil")) It seems awkward and error-prone to

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-24 Thread dak
On 2013/08/24 13:19:30, mike7 wrote: The question I'm asking is "How can I allow the user to replace the skyline of a stencil with another shape?" I got that. But what is the actual use case for that? Before skylines became a thing, you could override the X-extent or the Y-extent of grobs,

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-24 Thread Mike Solomon
On 24 août 2013, at 13:38, d...@gnu.org wrote: > On 2013/08/24 10:31:38, dak wrote: >> On 2013/08/24 10:05:17, mike7 wrote: >> > >> > The stencil command takes the skyline of stencil X and uses it as a >> replacement >> > for skyline Y. We could use replacement-skyline-stencil as the > command. >

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-24 Thread dak
On 2013/08/24 10:31:38, dak wrote: On 2013/08/24 10:05:17, mike7 wrote: > > The stencil command takes the skyline of stencil X and uses it as a replacement > for skyline Y. We could use replacement-skyline-stencil as the command. I'd just use skyline-stencil here. If specified, it is the sten

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-24 Thread dak
On 2013/08/24 10:05:17, mike7 wrote: The stencil command takes the skyline of stencil X and uses it as a replacement for skyline Y. We could use replacement-skyline-stencil as the command. I'd just use skyline-stencil here. If specified, it is the stencil used for skylines. https://coderev

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-24 Thread m...@mikesolomon.org
Sent from my iPhone On 24 août 2013, at 12:47, pkx1...@gmail.com wrote: > On 2013/08/24 08:25:14, dak wrote: >> On 2013/08/24 08:05:13, mike7 wrote: >> > On 24 août 2013, at 10:18, mailto:lemzw...@googlemail.com wrote: >> > >> > > LGTM, except of using `surrogate' in the name. Given that the >

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-24 Thread pkx166h
On 2013/08/24 08:25:14, dak wrote: On 2013/08/24 08:05:13, mike7 wrote: > On 24 août 2013, at 10:18, mailto:lemzw...@googlemail.com wrote: > > > LGTM, except of using `surrogate' in the name. Given that the stencil > > dimensions are actively overridden on request, I would like rather like >

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-24 Thread dak
On 2013/08/24 08:05:13, mike7 wrote: On 24 août 2013, at 10:18, mailto:lemzw...@googlemail.com wrote: > LGTM, except of using `surrogate' in the name. Given that the stencil > dimensions are actively overridden on request, I would like rather like > having `override'. For me, the word `s

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-24 Thread Mike Solomon
On 24 août 2013, at 10:18, lemzw...@googlemail.com wrote: > LGTM, except of using `surrogate' in the name. Given that the stencil > dimensions are actively overridden on request, I would like rather like > having `override'. For me, the word `surrogate' suggests something > passive. > > https:

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-24 Thread lemzwerg
LGTM, except of using `surrogate' in the name. Given that the stencil dimensions are actively overridden on request, I would like rather like having `override'. For me, the word `surrogate' suggests something passive. https://codereview.appspot.com/12957047/ ___

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-22 Thread mtsolo
It was easier to implement the delayed stuff than I expected, so I got it done. https://codereview.appspot.com/12957047/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-22 Thread mtsolo
I had time to implement everything but the delayed markup stuff. I'll try to get to that soon... https://codereview.appspot.com/12957047/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-22 Thread lemzwerg
This looks very promising! Thanks for the work on this. https://codereview.appspot.com/12957047/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel

Re: Adds dimension stencil command to correct with-dimension (issue 12957047)

2013-08-21 Thread k-ohara5a5a
There is also \pad-markup and \pad-to-box Also, the delayed stencils in \with-link and \page-ref could use this method to reserve the size of the place-holder text Also, harp-pedals.scm could use this method instead of the invisible box (which is not quite invisible in PNG output and maybe other