numbers

2023-12-27 Thread Werner LEMBERG


This works:

```
{ \ottava -1 c }
```

while this fails:

```
{ \ottava +1 c'' }
```

Is there a technical reason for it?


Werner



Re: numbers

2023-12-27 Thread David Kastrup
Werner LEMBERG  writes:

> This works:
>
> ```
> { \ottava -1 c }
> ```
>
> while this fails:
>
> ```
> { \ottava +1 c'' }
> ```
>
> Is there a technical reason for it?

As far as LilyPond is concerned, `+` is not a part of numbers.  Is there
a compelling argument for wasting syntactic elements on doing nothing?

-- 
David Kastrup



Re: numbers

2023-12-27 Thread Werner LEMBERG


>> This works:
>>
>> ```
>> { \ottava -1 c }
>> ```
>>
>> while this fails:
>>
>> ```
>> { \ottava +1 c'' }
>> ```
>>
>> Is there a technical reason for it?
>
> As far as LilyPond is concerned, `+` is not a part of numbers.  Is
> there a compelling argument for wasting syntactic elements on doing
> nothing?

I think that 'wasting' is too harsh a statement.  In comparison to
other syntactical elements (together with the interpretation of Scheme
code), a change to support `+` has no significant impact, AFAICS.

Can you imagine any other use for `+` right before numbers?  Otherwise
I suggest to make it work, to provide the least surprise for users.


Werner



Re: numbers

2023-12-27 Thread David Kastrup
Werner LEMBERG  writes:

>>> This works:
>>>
>>> ```
>>> { \ottava -1 c }
>>> ```
>>>
>>> while this fails:
>>>
>>> ```
>>> { \ottava +1 c'' }
>>> ```
>>>
>>> Is there a technical reason for it?
>>
>> As far as LilyPond is concerned, `+` is not a part of numbers.  Is
>> there a compelling argument for wasting syntactic elements on doing
>> nothing?
>
> I think that 'wasting' is too harsh a statement.  In comparison to
> other syntactical elements (together with the interpretation of Scheme
> code), a change to support `+` has no significant impact, AFAICS.

It makes + inelegible for other purposes.  + as a sign does nothing, so
the language does not gain anything at all.

You could potentially require its use for disambiguating durations from
numbers, but I don't think requiring people to type + all the time is
going to be a crowd pleaser.

`-` is used within chords.  So is `+`.  `-` is specially lexed in chords
because of syntactic conflicts.  That comes with its own bunch of
problems.  `+` isn't.  Yet.

`-` can become a part of numerical tokens in certain syntax modes, so it
isn't just the parser that is involved here but also the lexer.

> Can you imagine any other use for `+` right before numbers?  Otherwise
> I suggest to make it work, to provide the least surprise for users.

Do we say anywhere that `+` is a sign in LilyPond syntax?  Where does
the surprise come from?

-- 
David Kastrup



Re: numbers

2023-12-27 Thread Werner LEMBERG


>> Can you imagine any other use for `+` right before numbers?
>> Otherwise I suggest to make it work, to provide the least surprise
>> for users.
> 
> Do we say anywhere that `+` is a sign in LilyPond syntax?  Where
> does the surprise come from?

Well, both `#+3` and `#-3` work, so it might be tempting to assume
that `+3` and `-3` also work (outside of `\markup`).


Werner



Re: numbers

2023-12-27 Thread David Kastrup
Werner LEMBERG  writes:

>>> Can you imagine any other use for `+` right before numbers?
>>> Otherwise I suggest to make it work, to provide the least surprise
>>> for users.
>> 
>> Do we say anywhere that `+` is a sign in LilyPond syntax?  Where
>> does the surprise come from?
>
> Well, both `#+3` and `#-3` work, so it might be tempting to assume
> that `+3` and `-3` also work (outside of `\markup`).

So does ##e+3.0 and so does #3/1 so should we be supporting those as well?

-- 
David Kastrup



PATCHES - Countdown to December 29

2023-12-27 Thread Colin Campbell

Here is the current countdown report.
The next countdown will begin on 2023-12-29
A list of all merge requests can be found here:
https://gitlab.com/lilypond/lilypond/-/merge_requests?sort=label_priority

 Push:
!2206 Fix horizontal position of volta brackets not starting at a bar 
line - Werner Lemberg

    https://gitlab.com/lilypond/lilypond/-/merge_requests/2206
!2203 Improve documentation of `script-priority` property - Werner Lemberg
    https://gitlab.com/lilypond/lilypond/-/merge_requests/2203

 Countdown:
!2208 Let Ferneyhough hairpins support al niente circles - Thomas Morley
    https://gitlab.com/lilypond/lilypond/-/merge_requests/2208
!2207 print-gittxt.sh: Produce narrower output - Werner Lemberg
    https://gitlab.com/lilypond/lilypond/-/merge_requests/2207

 Review:
!2210 documentation of `details` subproperties - Werner Lemberg
    https://gitlab.com/lilypond/lilypond/-/merge_requests/2210
!2209 Improve documentation of `break-align-orders` - Werner Lemberg
    https://gitlab.com/lilypond/lilypond/-/merge_requests/2209

 New:
!2211 Match thickness of slurs and ties - Werner Lemberg
    https://gitlab.com/lilypond/lilypond/-/merge_requests/2211

 Waiting:
No patches in Waiting at this time.


Cheers,
Colin





Re: numbers

2023-12-27 Thread Werner LEMBERG


>> Well, both `#+3` and `#-3` work, so it might be tempting to assume
>> that `+3` and `-3` also work (outside of `\markup`).
> 
> So does ##e+3.0 and so does #3/1 so should we be supporting those as
> well?

The former?  Rather not.  The latter, maybe.  I can imagine that
people would like to say

```
\magnifyStaff 2/3
```

However, given that this representation no longer looks like a 'normal
number' for most people, I think it is fully sufficient to use the
already working

```
\magnifyStaff #2/3
```

instead.


Werner



Re: numbers

2023-12-27 Thread Aaron Hill via Discussions on LilyPond development

On 2023-12-27 10:51 pm, Werner LEMBERG wrote:

Well, both `#+3` and `#-3` work, so it might be tempting to assume
that `+3` and `-3` also work (outside of `\markup`).


So does ##e+3.0 and so does #3/1 so should we be supporting those as
well?


The former?  Rather not.  The latter, maybe.  I can imagine that
people would like to say

```
\magnifyStaff 2/3
```

However, given that this representation no longer looks like a 'normal
number' for most people, I think it is fully sufficient to use the
already working

```
\magnifyStaff #2/3
```

instead.


Would it make sense for `\magnifyStaff` to accept `scale?` as its 
parameter?  I think that would permit `2/3` due to the `fraction?` 
predicate.



-- Aaron Hill