Re: Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c'

2011-05-27 Thread lilypond


Comment #2 on issue 1670 by carl.d.s...@gmail.com: Allow numbers in  
variable names: violin1mvt2 = c'

http://code.google.com/p/lilypond/issues/detail?id=1670

Personally, I prefer the current behavior.  violinOne is no harder than  
violin1 to read or type, and it keeps the syntax cleaner.


LilyPond is confusing enough as it is; I think requiring quotes around  
variable definitions in order to allow numbers would be a mistake.




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


Re: Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c'

2011-05-28 Thread lilypond


Comment #3 on issue 1670 by percival.music.ca: Allow numbers in variable  
names: violin1mvt2 = c'

http://code.google.com/p/lilypond/issues/detail?id=1670

I agree with Carl.  I'm glad that Keith looked into it and clarified the  
issue, but given the choices he laid out, I think the status quo is better.


If somebody has an alternate solution, then by all means we can discuss  
this again.



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


Re: Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c'

2011-05-28 Thread lilypond


Comment #4 on issue 1670 by tdaniels...@googlemail.com: Allow numbers in  
variable names: violin1mvt2 = c'

http://code.google.com/p/lilypond/issues/detail?id=1670

I agree with Carl too.

Trevor


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


Re: Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c'

2011-05-28 Thread lilypond


Comment #5 on issue 1670 by k-ohara5...@oco.net: Allow numbers in variable  
names: violin1mvt2 = c'

http://code.google.com/p/lilypond/issues/detail?id=1670

I think requiring quotes around variable definitions in order to allow  
numbers would be a mistake.


Just to be clear, only definitions of those variables with numbers need  
quotes:


timpani =  \relative c, { ...
"motif254" = { ...
"violin1" = \relative c'' { ... \motif254
\score {<< \violin1 \timpani >>}



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


Re: Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c'

2011-05-28 Thread David Kastrup
lilyp...@googlecode.com writes:

> Comment #5 on issue 1670 by k-ohara5...@oco.net: Allow numbers in
> variable names: violin1mvt2 = c'
> http://code.google.com/p/lilypond/issues/detail?id=1670
>
>> I think requiring quotes around variable definitions in order to
>> allow numbers would be a mistake.
>
> Just to be clear, only definitions of those variables with numbers
> need quotes:
>
> timpani =  \relative c, { ...
> "motif254" = { ...
> "violin1" = \relative c'' { ... \motif254
> \score {<< \violin1 \timpani >>}

The language should strive to be simple enough to be understandable to
simple local parsers, or you can forget about teaching it to smart
editors (syntax highlighting, indentation etc).

-- 
David Kastrup


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


Re: Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c'

2011-05-29 Thread lilypond


Comment #6 on issue 1670 by carl.d.s...@gmail.com: Allow numbers in  
variable names: violin1mvt2 = c'

http://code.google.com/p/lilypond/issues/detail?id=1670

I understand.  But that gives one more special case:  "You don't normally  
need to put quotes around the variable name in a variable definition.  But  
if you want to include a number, you do need to put quotes."


I don't like the special case.  And we try (in our examples) to avoid  
having the user need to understand special cases.  So we'd probably need to  
make a rule for documentation that said "Variables being defined should be  
surrounded by quotes".  And then every variable definition in our manuals  
would have quotes around it.  And it wouldn't be a simple convert-ly rule  
to write.


All for a minor benefit.  Our language has a well-defined rule for  
variables: letters only.  It works just fine, as far as I can see.



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


Re: Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c'

2011-05-29 Thread Keith OHara
> Comment #6 on issue 1670 by carl.d.s...@gmail.com: Allow numbers in  
> variable names: violin1mvt2 = c'
>
> Our language has a well-defined rule for variables: letters only.

Just to be pedantic:
  letters only, and not a note-name in the current input language.

Actually, you can use a note-name, like dis, if you put quotes around it in its 
definition: "dis" = {...}.  (Accented characters are also accepted, but that's 
not documented an probably not a good idea either.)


David Kastrup  gnu.org> writes:

> The language should strive to be simple enough to be understandable to
> simple local parsers, 

Yep, but LilyPond is not simple.
The vi syntax highlighter does an impressive job:
  \violin = \afterGrace a b h = c
correctly has the h highlighted as a variable, presumably by look-ahead to the 
'=', without vi knowing if I speak German.

The LilyPond parser interprets \afterGrace to learn what arguments it needs, so 
it can parse them.  Maybe the parser it could tell the lexer that it is ready 
for another top-level expression before reading the 'h', but I could not make 
it do so early enough.  

In hindsight, the simpler language would require braces around a music 
expression.  That is, do not allow
  \transpose c d e1
but require 
  \transpose c d { e1 }



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


Re: Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c'

2011-05-29 Thread Werner LEMBERG

> (Accented characters are also accepted, but that's not documented an
> probably not a good idea either.)

Why not?  Since lilypond accepts UTF-8 only, I don't see any problem,
except unveiling potential guile bugs.


Werner

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


Re: Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c'

2011-05-29 Thread lilypond


Comment #7 on issue 1670 by percival.music.ca: Allow numbers in variable  
names: violin1mvt2 = c'

http://code.google.com/p/lilypond/issues/detail?id=1670

there are some interesting ideas here.  I've added them to the GLISS list,  
and we will discuss them in due course.



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


Re: Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c'

2011-05-29 Thread Keith OHara
Werner LEMBERG  gnu.org> writes:

> > (Accented characters are also accepted, but that's not documented an
> > probably not a good idea either.)
> 
> Why not?  Since lilypond accepts UTF-8 only, I don't see any problem,
> except unveiling potential guile bugs.
> 

Why not?  Only because the capability is un-documented;
those mean old programmers might take it away in the next release.



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


Re: Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c'

2011-06-01 Thread lilypond


Comment #8 on issue 1670 by j...@sente.ch: Allow numbers in variable names:  
violin1mvt2 = c'

http://code.google.com/p/lilypond/issues/detail?id=1670

To state a user opinion (I'm in jazz). It would be very very helpful to  
have numbers in variables. I've been missing that since I use lilypond


Not just for section but also for bar numbers.  
ThemeFromBarsThirtyTwoToSixtyFour versus theme32-64. Numbers are easier to  
grasp with the eye than words.




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


Re: Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c'

2011-06-02 Thread David Kastrup
lilyp...@googlecode.com writes:

> Comment #8 on issue 1670 by j...@sente.ch: Allow numbers in variable
> names: violin1mvt2 = c'
> http://code.google.com/p/lilypond/issues/detail?id=1670
>
> To state a user opinion (I'm in jazz). It would be very very helpful
> to have numbers in variables. I've been missing that since I use
> lilypond
>
> Not just for section but also for bar
> numbers. ThemeFromBarsThirtyTwoToSixtyFour versus theme32-64. Numbers
> are easier to grasp with the eye than words.

And so you silently demand dashes in variable names as well...

Try themeXXXIItoLXIV.

-- 
David Kastrup


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


Re: Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c'

2011-06-02 Thread Werner LEMBERG

>> Not just for section but also for bar numbers.
>> ThemeFromBarsThirtyTwoToSixtyFour versus theme32-64.  Numbers are
>> easier to grasp with the eye than words.
> 
> And so you silently demand dashes in variable names as well...

Assuming that we allow Unicode characters in variable names in the
future also, then dashes like `–' are OK, but the ASCII hyphen-minus
character `-' is not.  To take another step forward, by using
Mathematical Alphanumeric Symbols (which start at Unicode U+1D400), it
is currently possible to write

  themeπŸ‘πŸβ€“πŸ”πŸ’

but I doubt whether this is a good idea since it is both error prone
(due to the possible mix-up with normal digits) and difficult to type.

> Try themeXXXIItoLXIV.

We definitely need TeX's \csname command:-)


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


Re: Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c'

2011-06-02 Thread David Kastrup
Werner LEMBERG  writes:

>>> Not just for section but also for bar numbers.
>>> ThemeFromBarsThirtyTwoToSixtyFour versus theme32-64.  Numbers are
>>> easier to grasp with the eye than words.
>> 
>> And so you silently demand dashes in variable names as well...
>
> Assuming that we allow Unicode characters in variable names in the
> future also, then dashes like `–' are OK, but the ASCII hyphen-minus
> character `-' is not.  To take another step forward, by using
> Mathematical Alphanumeric Symbols (which start at Unicode U+1D400), it
> is currently possible to write
>
>   themeπŸ‘πŸβ€“πŸ”πŸ’
>
> but I doubt whether this is a good idea since it is both error prone
> (due to the possible mix-up with normal digits) and difficult to type.
>
>> Try themeXXXIItoLXIV.
>
> We definitely need TeX's \csname command:-)

One could go via

"theme32-64" = { ... }

{ \"theme32-64" ... }

That gives a certain symmetry.  However, you are right with your \csname
remark in that the next demand will be for computed identifiers.

-- 
David Kastrup

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


Re: Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c'

2011-10-27 Thread lilypond


Comment #9 on issue 1670 by k-ohara5...@oco.net: Allow numbers in variable  
names: violin1mvt2 = c'

http://code.google.com/p/lilypond/issues/detail?id=1670

Accidentally, this leaked into in the draft 2.15.16 user manual:
  The previous example could also be written as follows:
 "custom-tuning" = \stringTuning 

It came from automatic conversion of what was formerly Scheme code.  The  
quotes allow the otherwise forbidden hyphen '-' into the variable name.


I make the following modest proposal: Scheme variables used in LilyPond  
should conform to the rules for LilyPond variables.  customHtuning is no  
harder than custom-tuning to read or type, and it keeps the syntax cleaner.



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


Re: Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c'

2011-10-27 Thread lilypond


Comment #10 on issue 1670 by d...@gnu.org: Allow numbers in variable names:  
violin1mvt2 = c'

http://code.google.com/p/lilypond/issues/detail?id=1670

Fine modest proposal.  But customHtuning is harder to read/type.  I'd have  
chosen a different name, but to be fair: this variable is only used in the  
context of specifying a _Scheme_ expression not otherwise useful to  
Lilypond, namely as #custom-tuning.  There _is_ a notable difference  
between #xxx and \xxx right now: if xxx is a music function, #xxx names it,  
but \xxx _calls_ it.  And one needs the difference even when I continue on  
my quest of autoexporting Scheme expressions in every conceivable context:

zap=#somemusicfunction
zap=\somemusicfunction
need to stay different in meaning.

As another example of identifiers not generally useful as Scheme variables,  
take a look at scm/define-music-properties.scm.  I don't particularly like  
the various different identifier syntaxes, though.



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


Re: Issue 1670 in lilypond: Allow numbers in variable names: violin1mvt2 = c'

2011-11-10 Thread lilypond


Comment #11 on issue 1670 by d...@gnu.org: Allow numbers in variable names:  
violin1mvt2 = c'

http://code.google.com/p/lilypond/issues/detail?id=1670

And now for a somewhat hilarious side-effect of Issue 2024:

$identifier-in-Scheme-syntax

is pretty much equivalent to what you would want here for calling your  
variables with strange characters in their name.  I would not recommend it,  
but it should work.



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