lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Understanding Lilypond


From: Urs Liska
Subject: Re: Understanding Lilypond
Date: Sat, 17 Jan 2015 13:37:58 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0


Am 17.01.2015 um 13:09 schrieb Peter Gentry:
Thanks for your reply Kieran - I'm not sure that my response is suitable for 
the list but will post it there anyway. Please feel
free to critisize scorn or otherwise flame.

Yes, this is suitable for the list.


1. This is difficult. My background is chiefly in Fortran and Visual Basic 
although I have dabbled with machine code. These codes
have well defined structures variables are defined there are multi dimensional 
arrays and subroutines are similarly well defined as
far as parameters and scopes are concerned.

When I look through the Lilypond source code I see

(a) at least three different languages being used C++, Scheme, and Python. It 
is not clear how these are integrated or why they are
needed.

C++ and Scheme are the languages that are used for LilyPond itself.
I can't fully comment on that but at least I can tell you that Scheme is a fundamental part of GUILE, the GNU framework or application environment. One advantage of using Scheme as opposed to a plain C++ program is that very much can be done by users, without needing to recompile the program. The more of LilyPond's own working can be done with Scheme the more fundamental extensions can be created in the user space.

If I'm not completely mistaken Python is only used for separate scripts like convert-ly or lilypond-book, but also for the build system.

(b) the syntax and scope of variables is hard to follow through the various 
procedures probably mainly due to a lack of
understanding of the way scheme objects are stored in memory.
I have started to learn these codes but often find various definitions and 
example scripts only work in one variety of the code.

(c) As with most learning tasks it is important to start out with correct 
descriptions and definitions. The tyro can be led astray
by ill founded assumptions as to how the code elements work and fit together. 
In short you can see difficulties that don't exist or
try to implement unnecessary coding. A simple example being lists and 
regression in scheme the use and philosophy is different from
say Fortran and similar languages where the basic principles allow you to 
"guess" how to use unfamiliar procedures rather as you
would use paper and pencil. You can often read code and see at a glance the 
gist of what is going on.
  (d) summing up when looking at the source code there is a dazzling array of 
procedures but how and when they are called is not
clear - nor how they relate to each other. I would be looking for a main 
programme and branches to various sub programmes or
routines I.E. a flow diagram!

In short I'd say you're still struggling with the fundamental principles of Scheme. Which is more than natural - I think the number of people having mastered this is only a small fraction here (and I definitely don't counte me to that fraction).
So the question would boil down to the question: why Scheme?
As said above it's the official extension language of the framework, so there's not much of a choice here. But I start to comprehend that Scheme is quite "generic". This is what makes it so hard to learn but this also makes it extremely versatile and fundamental.


2.
(a) The philosophy is outlined but is short on detailed explanation in terms of 
code. The ideas of engravers, grobs etc is
understood but the details of their parameters and how they are altered in ly 
scripts is hard to find in a systematic way.

There are excellent aids to get one writing ly scripts and producing quite 
complex scores but not to make those individual tweaks.
Looking at the various tweaks published on the list can be bewildering the 
common first impression is why? how? Where was that in
the documentation?

Maybe I'm just to long in the tooth for grasping new concepts. More experienced 
programmers will rightly say we are not spoon
feeding and you should put in the hard graft yourself. I agree with that but 
would love some signposts to reduce the feeling of
being lost in a sea of hieroglyphs.

This is exactly what we have been discussing about more than once (and actually currently in a private discussion). I fully agree with you that there should be much more documentation material giving users help with the challenge to walk over that step. The problem is simply that there are too few people who are able to create that kind of documentaion, and those who are there are probably too busy doing other work.

Concretely I see the problem in a sequence of related issues:

- Scheme itself *is* difficult to get into
- There are so many Scheme dialects, and it is confusing to find out which information would actually apply to the Scheme in LilyPond
- The way to interact with LilyPond through Scheme is quite obscure
  (and that's where better documentation would be needed most IMO)

Urs


-----Original Message-----
From: Kieren MacMillan [mailto:address@hidden
Sent: Friday, January 16, 2015 9:40 PM
To: Peter Gentry
Cc: Lilypond-User Mailing List
Subject: Re: Understanding Lilypond

Hi Peter,

many of us have struggled for many months to get to grips
with the structure and philosophy of Lilypond.

1. Regarding the structure, what are you struggling with exactly?

2. Regarding the philosophy, what are you struggling with exactly?

Hope I can help!
Kieren.


_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user




reply via email to

[Prev in Thread] Current Thread [Next in Thread]