[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Work on Issue 1320
Re: Work on Issue 1320
Sat, 07 Apr 2012 16:06:30 +0200
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:18.104.22.168) Gecko/20120313 Thunderbird/3.1.20
Am 07.04.2012 01:03, schrieb Thomas Morley:
Hey, looks good! The idea of building the bar lines by parsing the
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 bar-line.cc/span-bar.cc
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
(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.
I'm working on a very similiar stuff. But I didn' try to rewrite
I tried another approach, defining only drawing-functions for glyphs
of string-length = 1
Putting them together with a recursive function.
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.
is very clever!
How shall we proceed? I am short of time now (I have to move with my
another house by the end of april, perhaps even one or two weeks
earlier), but ...
do you think we can work together on this issue? Perhaps we both could
stuff in a shape suitable for being included in lilys code base.