LSR snippets for contributors and Frogs

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

LSR snippets for contributors and Frogs

Valentin Villenave
Administrator
> 2009/7/24 Mark Polesky <[hidden email]>:
>> Sometimes I wish
>> there was something like an LSRD (for developers). You know, snippets
>> showing how to trace grob-parents, how to sort objects by specific
>> properties, how to know when to use #'(0 . 1) and when to use
>> #'(-0.5 . 0.5). These sorts of things.
>>
>> What's sorely lacking in my opinion is a good reference documentation
>> for stuff like music-map, how to get a context from within a music-
>> function, the difference between ly:font-design-size and
>> ly:font-magnification, stuff like that. I'm learning all this stuff on
>> my own but it's like swimming through JELL-O. In the dark. And I think
>> there are a lot of useful functions that are totally undocumented (like
>> make-sequential-music and its kin). Sometimes I'll find stuff totally
>> accidentally, like lily-library.scm.
>
>> I think
>> there should be a "Snippets List for Developers" node on the
>> Developers resources page.

Hi everybody,

as Mark suggested, I have taken the liberty to add a new "devel" tag
to the LSR. I can rename it to "frog" or "contributors" or whatever,
but devel came to my mind first.

Although most average LilyPonders may have to copy-paste, sometimes, a
Scheme hack or something a bit complicated, I can imagine a need for
snippets that aren't useful to users at all, but could be of help to
contributors, developers or bugfixers. If you stumble upon such a
snippet, you may know tag it as "devel", and it should not be too
hard, in the future, to gather all devel-tagged snippets on a page,
for example on the developer's documentation index page, or as an
appendix to the CG?

Either way, tagging the snippets is only a first step, and does not
determine what we'll do with these snippets. So, I added the tag
already, and in the meantime we'll discuss what to do from here.

(now I'll just wait for Graham's "this is a crappy idea" reply... :-)

Regards,
Valentin

---

----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

Graham Percival
On Fri, Jul 24, 2009 at 12:42:41PM +0200, Valentin Villenave wrote:

> > 2009/7/24 Mark Polesky <[hidden email]>:
> >> Sometimes I wish
> >> there was something like an LSRD (for developers). You know, snippets
> >> showing how to trace grob-parents, how to sort objects by specific
> >> properties, how to know when to use #'(0 . 1) and when to use
> >> #'(-0.5 . 0.5). These sorts of things.
> >>
> >> What's sorely lacking in my opinion is a good reference documentation
> >> for stuff like music-map, how to get a context from within a music-
> >> function, the difference between ly:font-design-size and
> >> ly:font-magnification, stuff like that. I'm learning all this stuff on
> >> my own but it's like swimming through JELL-O. In the dark. And I think
> >> there are a lot of useful functions that are totally undocumented (like
> >> make-sequential-music and its kin). Sometimes I'll find stuff totally
> >> accidentally, like lily-library.scm.

Advanced scheme stuff, huh?

> as Mark suggested, I have taken the liberty to add a new "devel" tag
> to the LSR. I can rename it to "frog" or "contributors" or whatever,
> but devel came to my mind first.

Really?  "Advanced scheme" comes to _my_ mind first -- 3 or 4
years ago, when I made the very first list of categories (in the
pre-tag days).  Now, I'm not certain if that tag still exists, but
whatever tag corresponds to NR 6 should be used for these scheme
things.

> (now I'll just wait for Graham's "this is a crappy idea" reply... :-)

This is a crappy idea.

Cheers,
- Graham

---

----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

Trevor D-2
In reply to this post by Valentin Villenave

Valentin Villenave wrote Friday, July 24, 2009 11:42 AM

> Although most average LilyPonders may have to copy-paste,
> sometimes, a
> Scheme hack or something a bit complicated, I can imagine a need
> for
> snippets that aren't useful to users at all, but could be of help
> to
> contributors, developers or bugfixers. If you stumble upon such a
> snippet, you may know tag it as "devel", and it should not be too
> hard, in the future, to gather all devel-tagged snippets on a
> page,
> for example on the developer's documentation index page, or as an
> appendix to the CG?
>
> Either way, tagging the snippets is only a first step, and does
> not
> determine what we'll do with these snippets. So, I added the tag
> already, and in the meantime we'll discuss what to do from here.
>
> (now I'll just wait for Graham's "this is a crappy idea" reply...
> :-)

Well. I think it's an excellent idea.  (If I'd been online earlier
that's
exactly what I would have suggested :)

... and thanks, Mark, for all the work you're doing to lead the way.

Trevor


---

----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

Mark Polesky

Trevor Daniels wrote:

> Well. I think it's an excellent idea.  (If I'd been online earlier that's
> exactly what I would have suggested :)
>
> ... and thanks, Mark, for all the work you're doing to lead the way.

Sure thing.

Here's one: http://lsr.dsi.unimi.it/LSR/Item?u=1&id=621

By the way, how to I restrict my search to the "devel" tag?
- Mark



     

---

----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

Valentin Villenave
Administrator
In reply to this post by Graham Percival
2009/7/24 Graham Percival <[hidden email]>:
> Really?  "Advanced scheme" comes to _my_ mind first -- 3 or 4
> years ago, when I made the very first list of categories (in the
> pre-tag days).  Now, I'm not certain if that tag still exists, but
> whatever tag corresponds to NR 6 should be used for these scheme
> things.

No. The tag is named "Scheme language", and is meant -- as is NR 6 --
to demonstrates how the Scheme interface to Lily works, not to
demonstrate how to get intimate with the way Lily processes grobs etc.
More precisely, NR6 is about Scheme stuff that can help you engraving
your scores. You certainly won't find stuff like Mark's snippet
anywhere in NR6 (nor anywhere else, as Mark pointed out).

Besides, we have the ability (as I've done) to tag the snippet with
*both* Sheme_language and devel. Isn't life nice? :-)

> This is a crappy idea.

Thanks for allowing me to paste the reply I had prepared in advance :)

Graham, I'd like to friendly invite you to go through your mailbox
archive and search for what you answered me when, on April 17, 2007, I
suggested that we should have tagging ability in the LSR. "This is a
crappy idea". Yet, a few weeks later we did have tags and today we use
them on a daily basis.

On August 15, 2008, I told you: "we should think about making a second
Manual, for advanced users and developers (which might allow us to
make the actual User Manual lighter, by the way). It would be a
companion for the internal Reference, helping people to browse source
files and to understand how things work, etc." What did you have to
say? "This is a crappy idea".
Yet, several months later, hey, guess what? It was *you* who initiated
the CG, which was roughly what I had in mind.

And I won't even mention how pissed you were on March 10, 2008, when I
launched the first beta LilyReport...

So, Graham, please let me, once again, wholeheartedly thank you for
enlightening my path to Wisdom and Relevance :-)

Regards,
Valentin

---

----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

Valentin Villenave
Administrator
In reply to this post by Mark Polesky
2009/7/24 Mark Polesky <[hidden email]>:
> Here's one: http://lsr.dsi.unimi.it/LSR/Item?u=1&id=621

Thanks, approved.

> By the way, how to I restrict my search to the "devel" tag?

Huh, the dumb way:
http://lsr.dsi.unimi.it/LSR/Search?q=devel

Regards,
Valentin

---

----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

Neil Puttock
In reply to this post by Valentin Villenave
2009/7/24 Valentin Villenave <[hidden email]>:

> as Mark suggested, I have taken the liberty to add a new "devel" tag
> to the LSR. I can rename it to "frog" or "contributors" or whatever,
> but devel came to my mind first.

Ah, I assumed we had to ask Seba to do this kind of thing. :)

How about another new tag for inspirational headwords (as Graham
suggested a while ago)?

Regards,
Neil

---

----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

Valentin Villenave
Administrator
2009/7/24 Neil Puttock <[hidden email]>:
> How about another new tag for inspirational headwords (as Graham
> suggested a while ago)?

There you go. (It didn't make much sense when we were still running 2.10)

By the way, another "crappy idea" of mine was the version-specific
tag; now that the LSR is up-to-date we can look for no-longer-relevant
snippets and delete them (e.g.  snippet #400).

Regards,
Valentin

---

----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

Neil Puttock
2009/7/24 Valentin Villenave <[hidden email]>:
> 2009/7/24 Neil Puttock <[hidden email]>:
>> How about another new tag for inspirational headwords (as Graham
>> suggested a while ago)?
>
> There you go. (It didn't make much sense when we were still running 2.10)

Have you added the tag to makelsr.py too? ;)

> By the way, another "crappy idea" of mine was the version-specific
> tag; now that the LSR is up-to-date we can look for no-longer-relevant
> snippets and delete them (e.g.  snippet #400).

How come it's still there then? :)

I removed a similar one (forget the name) a few days ago which showed
how to get chords above volte (which, of course, has been the default
behaviour since voltaOnThisStaff was removed over two years ago).

Regards,
Neil

---

----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

Mark Polesky
In reply to this post by Neil Puttock

Werner LEMBERG wrote:

> No problem here.  See the attached file for what I get if I process
> the LSR snippet and redirect stdout to a file (and I get exactly the
> same on the console).  Note that I still use git lilypond from June
> 1st.

Ugh. That's not how it looks for me. That's a little frustrating.
Maybe I'll look into it tomorrow. Although, I still can't modify
my own snippets in the LSR. My e-mail client is also not to be
trusted with CR/LF stuff, so just to make sure, you can confirm
that what you get differs from the output here?

http://lsr.dsi.unimi.it/LSR/Item?u=1&id=622

Thanks.
- Mark



     

---

----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

Patrick McCarty
In reply to this post by Neil Puttock
On Fri, Jul 24, 2009 at 08:02:38PM -0700, Mark Polesky wrote:

> 2) Why are my messages not showing up in lilynet.net/frogs?

The "subscribe" form is on the bottom of

  http://frogs.lilynet.net/

-Patrick

---

----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

Trevor D-2
In reply to this post by Mark Polesky

Mark Polesky wrote Saturday, July 25, 2009 6:53 AM

>
> Werner LEMBERG wrote:
>
>> No problem here.  See the attached file for what I get if I
>> process
>> the LSR snippet and redirect stdout to a file (and I get exactly
>> the
>> same on the console).  Note that I still use git lilypond from
>> June
>> 1st.
>
> Ugh. That's not how it looks for me. That's a little frustrating.
> Maybe I'll look into it tomorrow. Although, I still can't modify
> my own snippets in the LSR. My e-mail client is also not to be
> trusted with CR/LF stuff, so just to make sure, you can confirm
> that what you get differs from the output here?
>
> http://lsr.dsi.unimi.it/LSR/Item?u=1&id=622

Under Vista, but using the ConTEXT editor, which
captures the console output, to compile the ly,
I get blank lines after every "X/Y: ".

Removing the "\n" on line 32 produces the same
output as the snippet.

Trevor


---

----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

Trevor D-2
In reply to this post by Neil Puttock

Mark Polesky wrote Saturday, July 25, 2009 4:02 AM

> 1) Included below is a revised version of an old idea.
>
> (http://lists.gnu.org/archive/html/lilypond-devel/2009-05/msg00397.html)
>   But it's not a snippet at all. It's a small collection of useful
>   functions (2 total), both with extensive docstrings. A while
> back,
>   Neil suggested lily-library.scm as a good location, and Graham
>   suggested referring to them in NR 6. I'm starting to think that
>   Graham was right. Let's say we keep putting more and more ideas
>   like this into NR 6, and let's say one day it gets huge. Is that
>   such a bad thing? The two snippets I wrote...
>
>      http://lsr.dsi.unimi.it/LSR/Item?u=1&id=621
>      http://lsr.dsi.unimi.it/LSR/Item?u=1&id=622
>
>   ...could easily be re-done in texinfo and would fit nicely in NR
>   6.6. The two docstrings below could easily end up in NR 6.2.
>   I think NR 6 is the answer, it's just unfinished.
>   What do you guys think?

I think section 8 Programming work of the CG would
be more appropriate than the NR.  Perhaps a new
subsection - Useful functions or similar.  I'd like
NR 6 to be restricted to material of direct use to
composers and engravers, not developers.  Scheme is
confusing enough for users of LilyPond and we need
to make NR 6 as easy for them as possible.

> 2) Why are my messages not showing up in lilynet.net/frogs?

Are you subscribed?

> 3) I can't modify my own snippets in the snippet database. Known
>   issue or do I need to e-mail Seba?

Did you login first?  You need to.

Trevor


---

----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

wl-3
In reply to this post by Mark Polesky
> [...] so just to make sure, you can confirm that what you get
> differs from the output here?
>
> http://lsr.dsi.unimi.it/LSR/Item?u=1&id=622

Yes.  What I get contains much more empty lines.


    Werner

---

----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

Mark Polesky
Werner LEMBERG wrote:
> > [...] so just to make sure, you can confirm that what you get
> > differs from the output here?
> >
> > http://lsr.dsi.unimi.it/LSR/Item?u=1&id=622
>
> Yes.  What I get contains much more empty lines.

Werner,

I think I figured it out. I tweaked a bunch of newlines with
(format #f "~&"). This was very confusing if you can imagine.
Anyway, it's a tiny bit different from my original conception,
but I think it's better anyway. If you don't mind, please
compare your output with the example output I included at the
top of the attached file.

Hopefully it should look exactly the same.

Thanks.
- Mark


     

display-ancestry.ly (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

Carl Sorensen



On 7/25/09 2:46 PM, "Mark Polesky" <[hidden email]> wrote:

> Werner LEMBERG wrote:
>>> [...] so just to make sure, you can confirm that what you get
>>> differs from the output here?
>>>
>>> http://lsr.dsi.unimi.it/LSR/Item?u=1=622
>>> <http://lsr.dsi.unimi.it/LSR/Item?u=1&id=622>
>>
>> Yes.  What I get contains much more empty lines.
>
> Werner,
>
> I think I figured it out. I tweaked a bunch of newlines with
> (format #f "~&"). This was very confusing if you can imagine.
> Anyway, it's a tiny bit different from my original conception,
> but I think it's better anyway. If you don't mind, please
> compare your output with the example output I included at the
> top of the attached file.
>
> Hopefully it should look exactly the same.

It worked for me.  Way cool!  This is a very useful tool.

I do have one *very* minor nit -- I think I'd prefer X,Y or X&Y to X/Y when
an object has the same parent for both X and Y.  I found the X/Y notation to
be not quite intuitive.

Great work!

Carl


---

----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

Mark Polesky
In reply to this post by Trevor D-2

Trevor Daniels wrote:

> > 3) I can't modify my own snippets in the snippet database.
> >     Known issue or do I need to e-mail Seba?
>
> Did you login first?  You need to.

Yes.

- Mark



     

---

----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

Valentin Villenave
Administrator
2009/7/26 Mark Polesky <[hidden email]>:
>> > 3) I can't modify my own snippets in the snippet database.
>> >     Known issue or do I need to e-mail Seba?

This is bevause as soon as Neil or I mark a snippet as Approved, we
need to edit it and therefore become the new snippet's author. If you
have something to change after the snippet has been approved, all you
can do is contact Neil or me, or add it as a new snippet and add
"[correction]" to the title.

Regards,
Valentin

---

----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

Graham Percival
On Mon, Jul 27, 2009 at 12:08:47AM +0200, Valentin Villenave wrote:
> 2009/7/26 Mark Polesky <[hidden email]>:
> >> > 3) I can't modify my own snippets in the snippet database.
> >> >     Known issue or do I need to e-mail Seba?
>
> This is bevause as soon as Neil or I mark a snippet as Approved, we
> need to edit it and therefore become the new snippet's author. If you
> have something to change after the snippet has been approved, all you
> can do is contact Neil or me, or add it as a new snippet and add
> "[correction]" to the title.

BTW, this is a feature, not a bug.  Otherwise, I could get an
innocent snippet approved, then change it to include my favorite
security flaw.

Now, I'm not saying that I wouldn't trust Mark with LSR admin
status if he wanted.  But as a general rule for non-admins, this
is definitely a good feature.

Cheers,
- Graham

---

----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|

Re: LSR snippets for contributors and Frogs

Mark Polesky

Graham Percival wrote:

> > This is because as soon as Neil or I mark a snippet as Approved, we
> > need to edit it and therefore become the new snippet's author. If you
> > have something to change after the snippet has been approved, all you
> > can do is contact Neil or me, or add it as a new snippet and add
> > "[correction]" to the title.
>
> BTW, this is a feature, not a bug.  Otherwise, I could get an
> innocent snippet approved, then change it to include my favorite
> security flaw.

Oh, I see. That makes good sense. In the future, I'll spend more
time refining the snippet so I won't need to bother you guys with
modifications. When I get some time, I will be modifying at least
one of the two that I posted.

Thanks.
- Mark



     

---

----
Join the Frogs!

12