Re: Why no numbers allowed in variables?

2018-10-02 Thread Maarten Deen

On 2018-10-02 18:31, Kieren MacMillan wrote:

Hi Maarten,


Why are there no numbers allowed in variable names?


\version "2.18.2"

"part1" = { c''4 4 4 4 }

\score {
  \new Staff \"part1"
}

As for why you need the quotes… well, I’ll leave the explanation up to
more knowledgeable people than I.


Thanks, that works (well, "part1" = { c''4 c c c } does ;) ).
This does not work in 2.16.2 though, that version can not cope with 
quoted variables.


Regards,
Maarten

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread Maarten Deen

On 2018-10-02 22:56, David Kastrup wrote:

Kieren MacMillan  writes:


Hi Harm,


val = "foo"
<<
 \new Staff \repeat unfold 4 c'4
 \new Lyrics \lyricmode { \val4 \val2 \val4 }
 \new Lyrics \lyricmode { \val4 \val4 \val2 }




Your proposal would make it impossible.


Thanks for the examples. Obviously I'm not such a hard core user to see 
all the problems that are associated with my lament.



It's not like we don't have this discussion pretty much every year.


But the solution offered by Kieren did not work in 2.16.2 (didn't test 
other versions). No idea if the possibility to use quoted variables was 
added consciously but I also can't find a reference to this in the 
documentation (while instrumentOne and instrumentTwo are used as 
examples).
Maybe this needs to be documented. And if it is a happy side effect of 
some other change, it might be good to realise it's there and users 
probably like it (hate to see this disappear in a next version).


Regards,
Maarten

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: #vspace not working after text?

2018-10-02 Thread David Kastrup
Tom Campbell  writes:

> I want vertical space to occur after a heading. But it seems that the
> following still puts the space before it, or am I going insane?
>
> #(define-markup-command (headerThree layout props text)
> (markup?)
>   "Create a level 3 header"
>   (interpret-markup layout props
> #{
> \markup {
> \fontsize #1
> \line \bold \sans { #text }
> \vspace #4
> }
> #}))

It's not as much a matter of before or behind.  It's in the same line
(the contents of a \markup are wrapped in an implicit \line).  You may
want to wrap your combined markup in a \column or other inherently
vertical construct rather than the default horizontal \line.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: #vspace not working after text?

2018-10-02 Thread Robin Bannister

Tom Campbell wrote:

I want vertical space to occur after a heading. But it seems that the
following still puts the space before it, or am I going insane?



See also
http://lists.gnu.org/archive/html/lilypond-user/2010-04/msg00057.html


Cheers,
Robin

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Including a score fragment in LaTeX document

2018-10-02 Thread Francesco Napoleoni
Hi list,

I’m fiddling with lilypond-book and XeLaTeX for the first time and have a 
little problem with a fragment that I want to include. I have a little 
Lilypond file like this

\version "2.19.80"

\score {
  \new Staff {
\clef treble
\key c \major
\time 12/8

% excerpt from Grieg Piano sonata op. 7
\relative c'' {
% 16
  4.->\ff -> -> ->\> | % note the decrescendo 
here

% 17
  s1.\! | % I had to add this measure to get the hairpin printed
}
  }
}

Now the (newbie) question: how can I include this code in a LaTeX document 
(using \lilypondfile) without the last empty measure? I have tried clip-
regions in the \layout block with no success.

Thanks in advance
Francesco Napoleoni




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Including a score fragment in LaTeX document

2018-10-02 Thread Urs Liska



Am 02.10.2018 um 11:42 schrieb Francesco Napoleoni:

Hi list,

I’m fiddling with lilypond-book and XeLaTeX for the first time and have a
little problem with a fragment that I want to include. I have a little
Lilypond file like this

\version "2.19.80"

\score {
   \new Staff {
 \clef treble
 \key c \major
 \time 12/8

% excerpt from Grieg Piano sonata op. 7
 \relative c'' {
% 16
   4.->\ff -> -> ->\> | % note the decrescendo
here

% 17
   s1.\! | % I had to add this measure to get the hairpin printed
 }
   }
}

Now the (newbie) question: how can I include this code in a LaTeX document
(using \lilypondfile) without the last empty measure? I have tried clip-
regions in the \layout block with no success.


You can do that by making the last spacer rest use no time by writing
   s1*0\!

But please note that this isn't at all related to the question of 
including the score in the LaTeX document.


Urs



Thanks in advance
Francesco Napoleoni




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Including a score fragment in LaTeX document

2018-10-02 Thread Orm Finnendahl
Hi Francesco


try this:

\version "2.19.80"

\score {
  \new Staff {
\clef treble
\key c \major
\time 12/8

% excerpt from Grieg Piano sonata op. 7
\relative c'' {
% 16
  4.->\ff -> -> ->\> | 

% 17
  s1.*0\! | % I had to add this measure to get the hairpin printed
}
  }
}

You can multiply any rhythmic value with a number. Using 0 ensures the
endpoint of the crescendo is found without extending the music.

--
Orm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Frescobaldi Log Error -1073741819 on Windows10

2018-10-02 Thread David Wright
On Sun 30 Sep 2018 at 16:49:13 (+0100), peter.gen...@sunscales.myzen.co.uk 
wrote:
> Date: Thu, 27 Sep 2018 15:10:25 -0700
> From: Aaron Hill mailto:lilyp...@hillvisions.com>
> > 
> > An Access Violation has nothing to do with permissions as was stated
> > earlier.  This error code is specific to virtual memory management.  
> > 
> > Most often, this points to an error in programming logic such as a NULL
> > pointer access but it could be any attempt to read from and or write to a
> > virtual memory address that is invalid for the running process.
> > 
> > Based on threads earlier in the year, it would seem the Windows build of
> > LilyPond is known to have some gnarly and difficult to source issues with
> > memory management.  While it can often run without error, certain constructs
> > in input will result in an AV.  In fact, it is one of the reasons why I
> > stopped using the Windows build in favor of running the Linux version
> > through the Windows Subsystem for Linux (WSL).  Also, it would seem there
> > are very few and/or constrained resources for debugging this sort of thing,
> > as the principal developers for LilyPond would seem to be mostly
> > Linux-based.
> > 
> > Setting aside all that for a moment, Peter mentioned possible issues
> > manifesting in other software, and also that the input file in question has
> > worked before.  So the underlying issue most likely is caused by a recent
> > change to the system.  The fact that closing other running apps helped once
> > would make me think that there is an issue with excessive memory
> > consumption.  Programs that do not handle out-of-memory conditions well can
> > often run afoul of an AV.
> > 
> > @Peter: Would you kindly verify a few things?
> > - Does LilyPond work at all?  That is, are you only noticing issues with
> > particular input files or does it fail the same way even for simple inputs?
> > Also, is this issue occurring when building through Frescobaldi, or does it
> > also occur if you just launch LilyPond manually?
> > - Can you reproduce these issues when running LilyPond after a clean reboot
> > of the machine while running as little else as possible?
> > - Since this issue seems to impact two devices, have you installed anything
> > recently on both machines?  Also, have you made any configuration changes
> > that would have applied to both devices?
> 
> Sorry to be so long - I have been tangled up in Windows10.
> 
> First I have no issues with Lilypond or Frescobaldi. Clean reboots have
> removed MOST of the issues still one thing caught me out see below.
> 
> No configuration or download issues. But as usual file sharing on the local
> ethernet was spannered after the restores and continues to be here today and
> gone tomorrow.
> 
> The desktop needed a Windows10 style destructive restore losing my Outlook
> data files and all the Outlook pop and smtp data ( grrr) as well as a raft
> of other software. Who is it that relies only on Windows Store Apps!?.
> 
> I take your point and was coming to a similar conclusion.  I suspect the
> root of the problem may lie in the structure of the file index in Windows.
> There are two different observations.
> 
> a.Somehow unbeknown to me I have got both onedrive and dropbox lurking
> about in the file index. This can lead to a file pointer effectively
> pointing to an empty folder (null) which can produce the above error
> message. I ended up with duplicate folder trees in and out of onedrive and
> one set of folders appears empty of files.
> b.Secondly and possibly related some files were not accessible
> (permissions) and it was impossible to alter the permissions.
> c.Could both a and b be the result of a corrupt file index?
> d.The above is based on observation since I am ignorant of how the
> file index is created and where it is stored and how onedrive or dropbox
> interact with it.

It sounds to me as if you're grasping at straws here. I also find it
difficult to follow your terminology. How would you know where file
pointers are pointing, why an empty folder should appear as "null",
and why programs handling empty folders should throw access violation
errors or error -1073741819.

Point a. Switch off file sharing and networking: you should be able to
produce scores without requiring either.
Point b. Any system should have files that are inaccessible to users
without becoming root/superuser (appropriate to the system). Without
knowing which files and where they're located, this observation is
not helpful.
Points c and d. If you're worried about the state of the filesystem
"structure" (as opposed to the files' contents), you should run the
windows filesystem-checking tools as appropriate.

(I'm assuming that your applications are actually installed on your
computers and that you are only using facilities like onedrive and
dropbox for storing/sharing data files.)

Cheers,
David.

___
lilypond-user mailing list
lilypond-us

Why no numbers allowed in variables?

2018-10-02 Thread Maarten Deen
Why are there no numbers allowed in variable names? I like to have some 
kind of descriptive name for parts of the scores that I make in 
Lilypond, and not having the possibility to use numbers in a snippet 
name is a bit awkward. I make do with Roman numerals to get partI, 
partII, partIII, partIV etc, but now I have Haydn's 104th symphony, 
making SCVI-partI etc.


Regards,
Maarten

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread Kieren MacMillan
Hi Maarten,

> Why are there no numbers allowed in variable names?

\version "2.18.2"

"part1" = { c''4 4 4 4 }

\score {
  \new Staff \"part1"
}

As for why you need the quotes… well, I’ll leave the explanation up to more 
knowledgeable people than I.

Hope that helps!
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread immanuel litzroth
I also miss numbers in variables and some kind of scoping for variables.
Immanuel


On Tue, Oct 2, 2018 at 5:45 PM Maarten Deen  wrote:

> Why are there no numbers allowed in variable names? I like to have some
> kind of descriptive name for parts of the scores that I make in
> Lilypond, and not having the possibility to use numbers in a snippet
> name is a bit awkward. I make do with Roman numerals to get partI,
> partII, partIII, partIV etc, but now I have Haydn's 104th symphony,
> making SCVI-partI etc.
>
> Regards,
> Maarten
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: How to hide fingering in the output

2018-10-02 Thread csmcd
When I try to hide the fingering using either of these methods, I get a core
dump. It appears to be related to tuplets.

\version "2.18.2"

\score {
  \tuplet 3/2 4 {
c'8 d'^1 c'
  }

  \layout {
% Assertion failure if either of the two lines below is uncommented:
  
% Drawing systems...lilypond: ../flower/include/interval.hh:226: T  
  
% Interval_t::center() const [with T = double]: Assertion `!is_empty
()' failed.   

%\override Fingering.stencil = ##f  
  
%\context { \Voice \omit Fingering }
  
  }
}




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread David Kastrup
Kieren MacMillan  writes:

> Hi Maarten,
>
>> Why are there no numbers allowed in variable names?
>
> \version "2.18.2"
>
> "part1" = { c''4 4 4 4 }
>
> \score {
>   \new Staff \"part1"
> }
>
> As for why you need the quotes… well, I’ll leave the explanation up to
> more knowledgeable people than I.

Is c4 a note or a variable name?  Is \part2 the variable "part" followed
by a half note, or is it the variable "part2"?

It's easy to tell the developers "make it so".  But before you can tell
a compiler to "make it so", you need to have a logically coherent
proposal.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: How to hide fingering in the output

2018-10-02 Thread Noeck



Am 02.10.2018 um 19:34 schrieb csmcd:
> When I try to hide the fingering using either of these methods, I get a core
> dump.

Both versions compile fine and hide the fingering number here.
LilyPond 2.18.2 on Ubuntu (Linux).

Joram

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread Kieren MacMillan
Hi David,

> It's easy to tell the developers "make it so".  But before you can tell
> a compiler to "make it so", you need to have a logically coherent
> proposal.

I wasn’t trying to tell anybody to "make it so" — I was just avoiding offering 
my limited (and almost certainly flawed) understanding of Lily’s underpinnings 
when others (such as yourself) might give a detailed, useful, and accurate 
answer instead.

However, I’m always happy to have a discussion towards a logically coherent 
proposal that would allow a compiler to "make it so" for some given 
feature/request such as this one.

So here are my first offerings:

> Is c4 a note or a variable name?

If I saw

   c4 = something

then I would think it’s a variable. If I saw

  c4 something

(i.e., without an assignment operator) I would think it’s a note. Is that a 
rule that can be made logically coherent for a compiler?

>  Is \part2 the variable "part" followed
> by a half note, or is it the variable "part2"?

If I were developing Lilypond code, I simply wouldn’t allow a note value to be 
post-fixed to a variable, so

   \part2

would have only one interpretation (i.e., as the variable "part2"). But that’s 
only because I can’t see a good use case for the alternative. Can anyone 
suggest a reason to allow

   part = { c4 8 8 }
   \part2

where the latter is intended to do something… um… coherent?

Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread Kieren MacMillan
Hi David,

Thanks for the examples and explanations.

> You'd probably also think that
> 
> { c = -3 }
> 
> is an assignment.  It isn't.  It is a note c with a relative octave
> check and a fingering of 3 .

Fair enough. So there would, at the very least, be some sort of new assignment 
syntax for variables with numbers in them. Ugh.

> It isn't "post-fixed".  It is a note of its own.
> partI = { tambourine 4. 8 4 4 }
> \drums { \rhythm 2 r2 }

Can the compiler not be instructed on how to tell the difference between

   \rhythm2

and

  \rhythm 2

? (Honest question: I don’t know the parser / lexer / compiler limitations.)

Thanks,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread David Kastrup
Kieren MacMillan  writes:

> Hi David,
>
>> It's easy to tell the developers "make it so".  But before you can tell
>> a compiler to "make it so", you need to have a logically coherent
>> proposal.
>
> I wasn’t trying to tell anybody to "make it so" — I was just avoiding
> offering my limited (and almost certainly flawed) understanding of
> Lily’s underpinnings when others (such as yourself) might give a
> detailed, useful, and accurate answer instead.
>
> However, I’m always happy to have a discussion towards a logically
> coherent proposal that would allow a compiler to "make it so" for some
> given feature/request such as this one.
>
> So here are my first offerings:
>
>> Is c4 a note or a variable name?
>
> If I saw
>
>c4 = something
>
> then I would think it’s a variable. If I saw
>
>   c4 something
>
> (i.e., without an assignment operator) I would think it’s a note. Is
> that a rule that can be made logically coherent for a compiler?

No.  You'd probably also think that

{ c = -3 }

is an assignment.  It isn't.  It is a note c with a relative octave
check and a fingering of 3 .  I am not enthusiastic about all of the
inherited design decisions but there are a lot of scores and score
writers relying on them.

>>  Is \part2 the variable "part" followed
>> by a half note, or is it the variable "part2"?
>
> If I were developing Lilypond code, I simply wouldn’t allow a note
> value to be post-fixed to a variable, so
>
>\part2

It isn't "post-fixed".  It is a note of its own.

partI = { tambourine 4. 8 4 4 }

\drums { \rhythm 2 r2 }

is valid LilyPond input.

> would have only one interpretation (i.e., as the variable
> "part2"). But that’s only because I can’t see a good use case for the
> alternative. Can anyone suggest a reason to allow
>
>part = { c4 8 8 }
>\part2
>
> where the latter is intended to do something… um… coherent?

See above.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread Thomas Morley
Am Di., 2. Okt. 2018 um 21:57 Uhr schrieb Kieren MacMillan
:

> If I were developing Lilypond code, I simply wouldn’t allow a note value to 
> be post-fixed to a variable, so
>
>\part2
>
> would have only one interpretation (i.e., as the variable "part2"). But 
> that’s only because I can’t see a good use case for the alternative.

Well, below is valid code

val = "foo"

<<
  \new Staff \repeat unfold 4 c'4
  \new Lyrics \lyricmode { \val4 \val2 \val4 }
  \new Lyrics \lyricmode { \val4 \val4 \val2 }
>>

Your proposal would make it impossible.

Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread Kieren MacMillan
Hi Harm,

> val = "foo"
> <<
>  \new Staff \repeat unfold 4 c'4
>  \new Lyrics \lyricmode { \val4 \val2 \val4 }
>  \new Lyrics \lyricmode { \val4 \val4 \val2 }
>>> 
> 
> Your proposal would make it impossible.

Another good example — thanks. That being said, putting a syllable in a 
variable and then adding durations to it seems to me — as someone who engraves 
a *huge* amount of vocal music, from a wide variety of styles, genres, and eras 
— like a *much* "fringe-i-er" case than the number of cases that would benefit 
from restricting \variableName2 to count as a variable name.

Regardless, it doesn’t seem like there’s much enthusiasm to pick up the feature 
request.

Thanks!
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread Thomas Morley
Am Di., 2. Okt. 2018 um 22:37 Uhr schrieb Kieren MacMillan
:
>
> Hi Harm,
>
> > val = "foo"
> > <<
> >  \new Staff \repeat unfold 4 c'4
> >  \new Lyrics \lyricmode { \val4 \val2 \val4 }
> >  \new Lyrics \lyricmode { \val4 \val4 \val2 }
> >>>
> >
> > Your proposal would make it impossible.
>
> Another good example — thanks. That being said, putting a syllable in a 
> variable and then adding durations to it seems to me — as someone who 
> engraves a *huge* amount of vocal music, from a wide variety of styles, 
> genres, and eras — like a *much* "fringe-i-er" case than the number of cases 
> that would benefit from restricting \variableName2 to count as a variable 
> name.
>
> Regardless, it doesn’t seem like there’s much enthusiasm to pick up the 
> feature request.

Not so hasty ;)
Though, I second David. We would need a logical coherent method.
Without having to much drawbacks.
Honestly, I don't have such a proposal and even if I would have one,
I'm not able to implement something like that.

Otoh, counting use-cases is not a bad argument either.

Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread Kieren MacMillan
Hi David,

> I can understand newcomers coming up with this proposal: LilyPond is
> different to how most languages bar TeX treat numbers.  But it does
> puzzle me to have the old hands cheer them on.

Only because I’ve needed/wanted numbered variables literally thousands of times 
in the past 15 years of using Lilypond, whereas I’ve not even once ever 
needed/wanted

   var = "foo"
   \lyricmode { \var2 \var4 \var2 }

So I’m cheering on the newbie-feature-requesters because this feature, if 
implemented, would markedly improve my life as an engraver, whereas the 
limitations that might be introduced would (as far as I can tell) have zero 
effect either way on my engraving needs.

Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread David Kastrup
Kieren MacMillan  writes:

> Hi Harm,
>
>> val = "foo"
>> <<
>>  \new Staff \repeat unfold 4 c'4
>>  \new Lyrics \lyricmode { \val4 \val2 \val4 }
>>  \new Lyrics \lyricmode { \val4 \val4 \val2 }
 
>> 
>> Your proposal would make it impossible.
>
> Another good example — thanks. That being said, putting a syllable in
> a variable and then adding durations to it seems to me — as someone
> who engraves a *huge* amount of vocal music, from a wide variety of
> styles, genres, and eras — like a *much* "fringe-i-er" case than the
> number of cases that would benefit from restricting \variableName2 to
> count as a variable name.
>
> Regardless, it doesn’t seem like there’s much enthusiasm to pick up
> the feature request.

It's not like we don't have this discussion pretty much every year.
I can understand newcomers coming up with this proposal: LilyPond is
different to how most languages bar TeX treat numbers.  But it does
puzzle me to have the old hands cheer them on.

It's basically a consequence of durations not requiring to be separated
by spaces from note names and consequently not from other letters
either.  The = syntax for relative octave checks does not exactly help
squeezing some exceptions in either.

It's a bit dissatisfactory to go the "why don't you believe me" route on
this but there is a reason that the picture of the original "Principles
of Compiler Design" book by Aho&Ullman featured a dragon.  "Why don't
you change the compiler yourself" is for one thing a cheap shot, and for
another it is also quite likely to actually lead to superficially
working results of the "well, I saw the parser generator warnings but
the results worked fine" kind where it takes considerable effort to
figure out just what kind of input will get broken by the changes.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread David Kastrup
Kieren MacMillan  writes:

> Hi David,
>
> Thanks for the examples and explanations.
>
>> You'd probably also think that
>> 
>> { c = -3 }
>> 
>> is an assignment.  It isn't.  It is a note c with a relative octave
>> check and a fingering of 3 .
>
> Fair enough. So there would, at the very least, be some sort of new
> assignment syntax for variables with numbers in them. Ugh.
>
>> It isn't "post-fixed".  It is a note of its own.
>> partI = { tambourine 4. 8 4 4 }
>> \drums { \rhythm 2 r2 }
>
> Can the compiler not be instructed on how to tell the difference between
>
>\rhythm2
>
> and
>
>   \rhythm 2
>
> ? (Honest question: I don’t know the parser / lexer / compiler limitations.)

So spaces before numbers and following letters are to be interpreted
differently when the preceding letters happen to be a pitch name?  And
when assigning a pitch to a variable, I need to separate the use of the
variable from the following duration?  Also if the duration is something
like \breve ?

At any rate, spaces are _separators_ of some lexical entities but do not
become a lexical entity themselves.  Trying to let them interact with
some semantical differences here is really nightmarish stuff.  It would
be close to impossible to write coherent reliable manuals describing
that kind of handwaving even if you managed to fudge something meeting
more naive expectations than breaking currently more-or-less consistent
behavior.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread David Kastrup
Thomas Morley  writes:

> Am Di., 2. Okt. 2018 um 22:37 Uhr schrieb Kieren MacMillan
> :
>>
>> Hi Harm,
>>
>> > val = "foo"
>> > <<
>> >  \new Staff \repeat unfold 4 c'4
>> >  \new Lyrics \lyricmode { \val4 \val2 \val4 }
>> >  \new Lyrics \lyricmode { \val4 \val4 \val2 }
>> >>>
>> >
>> > Your proposal would make it impossible.
>>
>> Another good example — thanks. That being said, putting a syllable
>> in a variable and then adding durations to it seems to me — as
>> someone who engraves a *huge* amount of vocal music, from a wide
>> variety of styles, genres, and eras — like a *much* "fringe-i-er"
>> case than the number of cases that would benefit from restricting
>> \variableName2 to count as a variable name.
>>
>> Regardless, it doesn’t seem like there’s much enthusiasm to pick up
>> the feature request.
>
> Not so hasty ;)
> Though, I second David. We would need a logical coherent method.
> Without having to much drawbacks.
> Honestly, I don't have such a proposal and even if I would have one,
> I'm not able to implement something like that.

I've had a few cases of convincing myself that "this should be doable"
where the parser generator disagreed with me and I had to fire up some
scripts of mine that constructed examples based on the parser's analysis
that were ambiguous.

Of course it's just anecdotal handwaving to bring this up in relation to
a specific proposal.

> Otoh, counting use-cases is not a bad argument either.

This particular use case can be handled by using quotation marks for
both definition and use, using
"violins1" = ...
and calling with \"violins1"

And of course, with somewhat restricted generality,

violins.1 = { e' e' e' e' }
violins.2 = { c' c' c' c' }

\new Staff << \violins.1 \\ \violins.2 >>

will also work.  Not for everything, but at least for most music
expressions.

So it's not like "use cases" for people rejecting Roman numberals on
principle are not doable.  Stuff just looks uglier.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread David Kastrup
Kieren MacMillan  writes:

> Hi David,
>
>> I can understand newcomers coming up with this proposal: LilyPond is
>> different to how most languages bar TeX treat numbers.  But it does
>> puzzle me to have the old hands cheer them on.
>
> Only because I’ve needed/wanted numbered variables literally thousands
> of times in the past 15 years of using Lilypond, whereas I’ve not even
> once ever needed/wanted
>
>var = "foo"
>\lyricmode { \var2 \var4 \var2 }
>
> So I’m cheering on the newbie-feature-requesters because this feature,
> if implemented, would markedly improve my life as an engraver, whereas
> the limitations that might be introduced would (as far as I can tell)
> have zero effect either way on my engraving needs.

So what is wrong with using \"var2" or \var.2 ?

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread David Kastrup
Kieren MacMillan  writes:

> Hi David,
>
>> I can understand newcomers coming up with this proposal: LilyPond is
>> different to how most languages bar TeX treat numbers.  But it does
>> puzzle me to have the old hands cheer them on.
>
> Only because I’ve needed/wanted numbered variables literally thousands
> of times in the past 15 years of using Lilypond, whereas I’ve not even
> once ever needed/wanted
>
>var = "foo"
>\lyricmode { \var2 \var4 \var2 }
>
> So I’m cheering on the newbie-feature-requesters because this feature,
> if implemented, would markedly improve my life as an engraver, whereas
> the limitations that might be introduced would (as far as I can tell)
> have zero effect either way on my engraving needs.

The logic does not change every time you cheer, and you know the
perfectly viable alternatives.  So I don't really see the point in
setting up the newbies for disappointment.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread Kieren MacMillan
Hi David,

> So what is wrong with using \"var2"

That’s what I generally use — it requires extra typing, looks less attractive, 
looks (and is often colourized) different from variables without numbers, etc.

> or \var.2 ?

I was under the impression that mechanism has limitations?
In any case, the drawbacks listed above hold here as well.

I guess I’ll just stick with my standard workarounds.  =)

Thanks!
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: How to hide fingering in the output

2018-10-02 Thread Torsten Hämmerle
csmcd wrote
> When I try to hide the fingering using either of these methods, I get a
> core
> dump.

It even works in my Windows 7 (32bit) and Windows 10 (64 bit) environments,
tested with a variety of LilyPond versions.

What's your operating system and is there any useful error message?








--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread Thomas Morley
Am Di., 2. Okt. 2018 um 23:17 Uhr schrieb David Kastrup :

> So what is wrong with using \"var2" or \var.2 ?

Ah, I forgot about var.1 etc

Ofcourse below is a bit ugly I'd say:

val.1 = "foo"
<<
  \new Staff \repeat unfold 4 c'4
  \new Lyrics \lyricmode { \val.1 4 \val.1 2 \val.1 4 }
>>

Another possibility is to use superscript like
val² = ...
Ofcourse it's soso...
It works not because it's supported but because it's not disallowed.
Which may change in the future.


Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: #vspace not working after text?

2018-10-02 Thread Tom Campbell
Thanks, all. The solution I arrived at thanks to your input looked like the
following:

#(define-markup-command (headerThree layout props text)
  (markup?)
   "Create a level 3 header"
   (interpret-markup layout props
  #{
  \markup {
  \column { \vspace #.5 \bold \sans { #text } \vspace #2 }
  }
  #}
  )
)
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread David Kastrup
Kieren MacMillan  writes:

> Hi David,
>
>> So what is wrong with using \"var2"
>
> That’s what I generally use — it requires extra typing, looks less
> attractive, looks (and is often colourized)

Well, that would warrant improving your LilyPond code colorifier.

> different from variables without numbers, etc.

Oh, you can just use quotes for all of them, then.  There is, of course,
also \var₂ .

>
>> or \var.2 ?
>
> I was under the impression that mechanism has limitations?

Yes.  For music it should usually work (or be easy to provide a
syntactic context where it will).  Not for every other type of variable.

> In any case, the drawbacks listed above hold here as well.
>
> I guess I’ll just stick with my standard workarounds.  =)

I'll assume that as a composer you'll usually have to accept the
constraints of your musicians' instruments as well.  And showing off a
proof-of-concept recorder where you have drilled an additional hole
yourself is unlikely to convince your soloist to have a go at his own
instrument.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread David Kastrup
Thomas Morley  writes:

> Am Di., 2. Okt. 2018 um 23:17 Uhr schrieb David Kastrup :
>
>> So what is wrong with using \"var2" or \var.2 ?
>
> Ah, I forgot about var.1 etc
>
> Ofcourse below is a bit ugly I'd say:
>
> val.1 = "foo"
> <<
>   \new Staff \repeat unfold 4 c'4
>   \new Lyrics \lyricmode { \val.1 4 \val.1 2 \val.1 4 }
>>>
>
> Another possibility is to use superscript like
> val² = ...
> Ofcourse it's soso...
> It works not because it's supported but because it's not disallowed.
> Which may change in the future.

It would be pretty unusual to make non-syntactical characters gain
additional meaning.

We did get some puzzlement from people (notably Valentin) when stuff
like c_° became a valid identifier (it previously was equivalent to
c_"°" ).  But that was not as much a matter of special-treating ° as it
was of new rules for _ in the formation of identifiers.

It's conceivable that there would be some unicode unification at some
point of time (like some operating systems have for file names) so that
an umlaut written as a letter of its own or formed using a diacritical
combining character would be treated identically.  But I don't think we
should go much beyond that.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread Kieren MacMillan
Hi David,

> The logic does not change every time you cheer

That’s demonstrably false: there have been features which were requested years 
ago which were too difficult to implement at the time, but which became easier 
to implement later because of other code improvements (many your own doing).

Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Including a score fragment in LaTeX document

2018-10-02 Thread Francesco Napoleoni
> > Now the (newbie) question: how can I include this code in a LaTeX document
> > (using \lilypondfile) without the last empty measure? I have tried clip-
> > regions in the \layout block with no success.
> 
> You can do that by making the last spacer rest use no time by writing
> s1*0\!
> 
> But please note that this isn't at all related to the question of
> including the score in the LaTeX document.

Many thanks to you and Orm for the answer. Your suggestion does exactly what I 
was looking for; I just thought that the clipping could be done by means of 
some obscure option in \lilypondfile, that’s why I mentioned LaTeX/lilypond-
book, so never mind.

cheers
Francesco Napoleoni




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread Kieren MacMillan
Hi all,

I guess all that’s left is to reiterate my observation that there appears to be 
little enthusiasm for pursuing this possible feature.

Thanks for the discussion,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread David Kastrup
Kieren MacMillan  writes:

> Hi David,
>
>> The logic does not change every time you cheer
>
> That’s demonstrably false: there have been features which were
> requested years ago which were too difficult to implement at the time,
> but which became easier to implement later because of other code
> improvements (many your own doing).

This one is rather fundamentally a consequence of quite engrained syntax
decisions.  Which may have some roots in the TeX-centric syntax designed
for the MPP (?) music preprocessor for MusicTeX: Han-Wen and Jan
certainly had a strong TeX background.

Once you can no longer write c4 but have to write c 4 instead, it will
be easy to make that change.  Good luck campaigning for that.

The kind of logic that has more of a chance to change is that the like
of \violin.2 (which has no problems being written as \violin.#(+ 1 1) by
the way) is likely to work in more circumstances than it does now.
That's something where gradual improvements are reasonable to be
expected.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread J Martin Rushton
This discussion is strangely familiar.  As one who learnt on FORTRAN IV
many years ago, I'm used to seeing that:

READ INPUT TAPE 5, 501, IA, IB, IC
and
READINPUTTAPE5,501,IA,IB,IC
or even
RE ADIN PUTTA PE5,5 01,I A,I B,I C

are the same.  I'm sure there were those back in the late '50s arguing
over the use of spaces and numbers within variables.

(OT) I've even seen code which intentionally mangled FORTRAN source to
make it unreadable, like the third example above.

On 02/10/18 22:27, Thomas Morley wrote:
> Am Di., 2. Okt. 2018 um 23:17 Uhr schrieb David Kastrup :
> 
>> So what is wrong with using \"var2" or \var.2 ?
> 
> Ah, I forgot about var.1 etc
> 
> Ofcourse below is a bit ugly I'd say:
> 
> val.1 = "foo"
> <<
>   \new Staff \repeat unfold 4 c'4
>   \new Lyrics \lyricmode { \val.1 4 \val.1 2 \val.1 4 }
>>>
> 
> Another possibility is to use superscript like
> val² = ...
> Ofcourse it's soso...
> It works not because it's supported but because it's not disallowed.
> Which may change in the future.
> 
> 
> Cheers,
>   Harm
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 

-- 
J Martin Rushton MBCS



signature.asc
Description: OpenPGP digital signature
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: How to hide fingering in the output

2018-10-02 Thread csmcd
Strange, it's 100% reproducible on my system and I was able to narrow it down
to the tiny segment above. My system is i686 Ubuntu 16.04.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 16.04.4 LTS
Release:16.04
Codename:   xenial

$ uname -srmvo
Linux 4.4.0-128-generic #154-Ubuntu SMP Fri May 25 14:14:58 UTC 2018 i686
GNU/Linux

$ dpkg -l | grep lilypond
ii  lilypond   2.18.2-4.1   
  
i386 program for typesetting sheet music
ii  lilypond-data  2.18.2-4.1   
  
all  LilyPond music typesetter (data files)
ii  lilypond-doc   2.18.2-4.1   
  
all  LilyPond Documentation in info format (and meta package)
ii  lilypond-doc-html  2.18.2-4.1   
  
all  LilyPond HTML Documentation
ii  lilypond-doc-pdf   2.18.2-4.1   
  
all  LilyPond PDF Documentation

$ dpkg -l | grep guile
ii  guile-1.8  1.8.8+1-10ubuntu1
  
i386 GNU extension language and Scheme interpreter
ii  guile-1.8-dev  1.8.8+1-10ubuntu1
  
i386 Development files for Guile 1.8
ii  guile-1.8-doc  1.8.8+1-10ubuntu1
  
all  Documentation for Guile 1.8
ii  guile-1.8-libs 1.8.8+1-10ubuntu1
  
i386 Core Guile libraries
ii  guile-2.0-libs:i3862.0.11+1-10  
  
i386 Core Guile libraries

$ lilypond bug.ly
GNU LilyPond 2.18.2
Processing `bug.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...lilypond: ../flower/include/interval.hh:226: T
Interval_t::center() const [with T = double]: Assertion `!is_empty ()'
failed.
Abort (core dumped)

$ gdb /usr/bin/lilypond core
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/lilypond...(no debugging symbols
found)...done.
[New LWP 23048]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Core was generated by `lilypond bug.ly'.
Program terminated with signal SIGABRT, Aborted.
#0  0xb770fc31 in __kernel_vsyscall ()
(gdb) bt 20
#0  0xb770fc31 in __kernel_vsyscall ()
#1  0xb6f54ea9 in __GI_raise (sig=6) at
../sysdeps/unix/sysv/linux/raise.c:54
#2  0xb6f56407 in __GI_abort () at abort.c:89
#3  0xb6f4dd07 in __assert_fail_base (
fmt=0xb7088284 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
assertion=0x82e0ac1 "!is_empty ()", file=0x82e0aa3
"../flower/include/interval.hh", 
line=226, function=0x8301e80 "T Interval_t::center() const [with T =
double]")
at assert.c:92
#4  0xb6f4dd8b in __GI___assert_fail (assertion=0x82e0ac1 "!is_empty ()", 
file=0x82e0aa3 "../flower/include/interval.hh", line=226, 
function=0x8301e80 "T Interval_t::center() const [with T = double]")
at assert.c:101
#5  0x081ea629 in ?? ()
#6  0x081ea6b6 in ?? ()
#7  0xb760bf8f in scm_dapply () from /usr/lib/libguile.so.17
#8  0xb761286b in scm_apply () from /usr/lib/libguile.so.17
#9  0xb76130d5 in scm_call_1 () from /usr/lib/libguile.so.17
#10 0x080ca736 in ?? ()
#11 0x080ca9e6 in ?? ()
#12 0x081e6dd5 in ?? ()
#13 0xb760bf8f in scm_dapply () from /usr/lib/libguile.so.17
#14 0xb761286b in scm_apply () from /usr/lib/libguile.so.17
#15 0xb76130d5 in scm_call_1 () from /usr/lib/libguile.so.17
#16 0x080ca736 in ?? ()
#17 0x080ca9e6 in ?? ()
#18 0x08145f32 in ?? ()
#19 0xb760bf8f in scm_dapply () from /usr/lib/libguile.so.17
(More stack frames follow...)




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Including a score fragment in LaTeX document

2018-10-02 Thread Urs Liska



Am 02.10.2018 um 23:49 schrieb Francesco Napoleoni:

Now the (newbie) question: how can I include this code in a LaTeX document
(using \lilypondfile) without the last empty measure? I have tried clip-
regions in the \layout block with no success.

You can do that by making the last spacer rest use no time by writing
 s1*0\!

But please note that this isn't at all related to the question of
including the score in the LaTeX document.

Many thanks to you and Orm for the answer. Your suggestion does exactly what I
was looking for; I just thought that the clipping could be done by means of
some obscure option in \lilypondfile, that’s why I mentioned LaTeX/lilypond-
book, so never mind.


It's just that such a misrepresentation makes it much less likely for 
you to get useful answers because only people interested in the LaTeX 
part would probably even look into your post. Well, ok, in this case you 
*did* get two replies immediately...


However, I would suggest you have a look at the lyluatex package 
(https://ctan.org/pkg/lyluatex). Apart from depending on the use of 
LuaLaTeX (as opposed to XeLaTeX) it does the same (and by now more) as 
lilypond-book, with the major improvement that you can directly compile 
the .tex document without going through the intermediate files.


Best
Urs



cheers
Francesco Napoleoni




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread David Kastrup
Kieren MacMillan  writes:

> Hi all,
>
> I guess all that’s left is to reiterate my observation that there
> appears to be little enthusiasm for pursuing this possible feature.

This reminds me a bit of a talk in a "Fuzzy Logic" conference where some
speakers basically stated that their approach already managed to reach a
quarter of the theoretical maximum performance so they just needed to
get a lot more research funding in order to surpass the theoretical
maximum.

It doesn't really matter how much enthusiasm you manage to drum up here
short of managing to convince people that this is worth having to
separate _every_ duration with a space from any preceding letter: that
would indeed be a game changer.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread Thomas Morley
Am Di., 2. Okt. 2018 um 23:17 Uhr schrieb David Kastrup :

> So what is wrong with using \"var2" or \var.2 ?

As a side note.

I wasn't aware a comma works as well
qwerty,2 = "bar"
Although, while calling it, you _must_ use the dot
\new Lyrics \lyricmode { \qwerty.2 }

Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread csmcd
I run into this regularly as well, and have been resigned to using

rhPartOne, rhPartTwo, rhPartThree

or

rhPartA, rhPartB, rhPartC

I appreciate hearing about "rh1" and \"rh1". That seems reasonable, albeit
ugly. Thanks for that.

rh.1 would be preferable, but does not work as of 2.18.2.



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread David Kastrup
J Martin Rushton  writes:

> This discussion is strangely familiar.  As one who learnt on FORTRAN IV
> many years ago, I'm used to seeing that:
>
> READ INPUT TAPE 5, 501, IA, IB, IC
> and
> READINPUTTAPE5,501,IA,IB,IC
> or even
> RE ADIN PUTTA PE5,5 01,I A,I B,I C
>
> are the same.  I'm sure there were those back in the late '50s arguing
> over the use of spaces and numbers within variables.
>
> (OT) I've even seen code which intentionally mangled FORTRAN source to
> make it unreadable, like the third example above.

That's more like making spaces not have any lexical meaning, ever.
Basically, if it cannot be part of an identifier, it also cannot
separate them.  Also you have to be aware that a fresh punch card is
both empty and contains 80 spaces.  Basically spaces are not even
recognizable characters in the original typical Fortran input medium.

For TeX it was more the decision to be able to write things like

\count5=7

and LilyPond input is very very loosely modeled after that (via MusicTeX
and MPP).

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread J Martin Rushton


On 02/10/18 23:25, David Kastrup wrote:
> J Martin Rushton  writes:
> 
>> This discussion is strangely familiar.  As one who learnt on FORTRAN IV
>> many years ago, I'm used to seeing that:
>>
>> READ INPUT TAPE 5, 501, IA, IB, IC
>> and
>> READINPUTTAPE5,501,IA,IB,IC
>> or even
>> RE ADIN PUTTA PE5,5 01,I A,I B,I C
>>
>> are the same.  I'm sure there were those back in the late '50s arguing
>> over the use of spaces and numbers within variables.
>>
>> (OT) I've even seen code which intentionally mangled FORTRAN source to
>> make it unreadable, like the third example above.
> 
> That's more like making spaces not have any lexical meaning, ever.
> Basically, if it cannot be part of an identifier, it also cannot
> separate them.  Also you have to be aware that a fresh punch card is
> both empty and contains 80 spaces.  Basically spaces are not even
> recognizable characters in the original typical Fortran input medium.
> 
> For TeX it was more the decision to be able to write things like
> 
> \count5=7
> 
> and LilyPond input is very very loosely modeled after that (via MusicTeX
> and MPP).
> 
Quite correct.  Early FORTRAN compilers eliminated all spaces (other
than those in Hollerith strings) and then parsed the resultant mess.
-- 
J Martin Rushton MBCS



signature.asc
Description: OpenPGP digital signature
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread David Kastrup
Thomas Morley  writes:

> Am Di., 2. Okt. 2018 um 23:17 Uhr schrieb David Kastrup :
>
>> So what is wrong with using \"var2" or \var.2 ?
>
> As a side note.
>
> I wasn't aware a comma works as well
> qwerty,2 = "bar"

That's likely a side effect of comma-separated lists having been made
identical to dot-separated ones in most respects so that you can write
stuff like

\keepWithTag violI,violII ...

where a dot looks awkward.  Feels like "don't go there" syntax, really.

> Although, while calling it, you _must_ use the dot
> \new Lyrics \lyricmode { \qwerty.2 }

That's sort of ugly, indeed.  Probably because , can be an octave
marker, so if the identifier is a pitch...  But of course a similar
reasoning would hold when the identifier is a duration followed by a
dot.

And admittedly, with the _current_ grammar, treating '.' and ',' equal
in that context does not trigger a warning.  However, here clearly the
"hierarchical" interpretation is given rather than the "list of equals"
and so I am queasy about fudging this option into the grammar when I
don't have a good feeling about what price may be to pay for it in
future and I don't see a real use case where that grammar would be the
preferred one.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread Thomas Morley
Am Mi., 3. Okt. 2018 um 00:38 Uhr schrieb David Kastrup :
>
> Thomas Morley  writes:
>
> > Am Di., 2. Okt. 2018 um 23:17 Uhr schrieb David Kastrup :
> >
> >> So what is wrong with using \"var2" or \var.2 ?
> >
> > As a side note.
> >
> > I wasn't aware a comma works as well
> > qwerty,2 = "bar"
>
> That's likely a side effect of comma-separated lists having been made
> identical to dot-separated ones in most respects so that you can write
> stuff like
>
> \keepWithTag violI,violII ...
>
> where a dot looks awkward.  Feels like "don't go there" syntax, really.
>
> > Although, while calling it, you _must_ use the dot
> > \new Lyrics \lyricmode { \qwerty.2 }
>
> That's sort of ugly, indeed.  Probably because , can be an octave
> marker, so if the identifier is a pitch...  But of course a similar
> reasoning would hold when the identifier is a duration followed by a
> dot.
>
> And admittedly, with the _current_ grammar, treating '.' and ',' equal
> in that context does not trigger a warning.  However, here clearly the
> "hierarchical" interpretation is given rather than the "list of equals"
> and so I am queasy about fudging this option into the grammar when I
> don't have a good feeling about what price may be to pay for it in
> future and I don't see a real use case where that grammar would be the
> preferred one.
>
> --
> David Kastrup

It was an observation, not a proposal.
Speaking only for myself, I can perfectly life without the
comma-syntax in definitions and their calls.
The dot feels more natural for me anyway.
But again, that's only me.

Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread David Kastrup
Thomas Morley  writes:

> It was an observation, not a proposal.
> Speaking only for myself, I can perfectly life without the
> comma-syntax in definitions and their calls.

It feels weird in definitions.  Don't remember whether there was some
original rationale for it (like consistency, possibly connected with
convenience in reusing parser rules).

> The dot feels more natural for me anyway.

Yup.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Why no numbers allowed in variables?

2018-10-02 Thread David Kastrup
David Kastrup  writes:

> Thomas Morley  writes:
>
>> It was an observation, not a proposal.
>> Speaking only for myself, I can perfectly life without the
>> comma-syntax in definitions and their calls.
>
> It feels weird in definitions.  Don't remember whether there was some
> original rationale for it (like consistency, possibly connected with
> convenience in reusing parser rules).

Ah, the way "property_path" is defined via "symbol_list_rev" and symbol
lists also in function arguments are defined as being able to contain
either '.' or ',' means that even if one forces the first separator to
be a '.', the following separators are hard to avoid being also
permissable as ','.

So navigating around that inconsistency is pretty ugly: it will
sometimes work and sometimes not.  But maybe definition and call of
those kind of separated variables should at least be identical and
consequently require a first dot even if for technical reasons the
following separators may happen to admit commata.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user