[Top][All Lists]

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

Re: Work on Issue 1320

From: Thomas Morley
Subject: Re: Work on Issue 1320
Date: Sat, 7 Apr 2012 01:03:02 +0200

Am 6. April 2012 23:04 schrieb Carl Sorensen <address@hidden>:
> On 4/5/12 12:51 PM, "Marc Hohl" <address@hidden> wrote:
>>Does it make sense to replace the definitions in
>>with the scheme equivalents? If yes, I'd draw a patch and would include
>>one example for integrating user-defined bar lines with the new approach
>>as a snippet (once I get the dashed bar line right in place ...)
> It seems to me that it makes sense to put the stencil building functions
> in Guile instead of in c++.  No sense adding the extra interface layer for
> scheme calls from c++.
> I would suggest that you make custom-bar-print-alist and
> custom-bar-glyph-alist context properties, so they will be documented and
> available for modification.
> Whenever I see Scheme code that says something like
> (do ((
>    ...
>     (set!  foo bar)))
> I cringe a bit. This looks like a direct statement-by-statement
> translation from c++, rather than an implementation in native Scheme
> idioms.  set! creates a side effect for the procedure, and the Scheme
> gurus like to avoid side effects as much as possible (at least they did 25
> years ago ... am I really that old?).  I haven't looked carefully at your
> code to write an alternative, but it's likely that this code can be
> rewritten either as a recursive function or as a map, fold, or apply
> function, all of which are more native Scheme idioms.
> Anyway, overall this looks like great work, and I think we ought to get it
> into the code base.
> Thanks,
> Carl

I'm working on a very similiar stuff. But I didn' try to rewrite
lily/ etc.
I tried another approach, defining only drawing-functions for glyphs
of string-length = 1
Putting them together with a recursive function.

Please note:
This is work in progress. You may recognize many fragments of your and
Nicolas' work. Thanks to you both.
Currently there are a lot of inconsequences and small issues. And I
didn't work on the line-break and the span-bar so far.
That's on my todo-list. :)

Nevertheless, I'm able to print very curious custom-barlines.
Perhaps you may get some ideas for your own work.


Description: Binary data

Attachment: custom-bars-01.png
Description: PNG image

reply via email to

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