Re: pure simple-closures

2006-10-22 Thread Joe Neeman
On Sat, 2006-10-21 at 17:29 +0200, Han-Wen Nienhuys wrote:
 Joe Neeman schreef:
  On Sat, 2006-10-21 at 12:15 +0200, Han-Wen Nienhuys wrote:
  Joe Neeman schreef:
 
  Mostly because at the time that I wrote it, I couldn't figure out how to
  handle arbitrary length argument lists in scheme (the only way I
  currently know is to build the list of arguments, cons in the function
  I think you're looking for the apply function,
 
 (apply func arg-list)
  
  Ah yes, that's much better. So did you want me to put call_pure_function
  in scheme?
 
 yes, I think so. The most important thing is that subsystems should not 
 cross the C++/Scheme divide all too often. Since most of the func-pure 
   -func code is in Scheme, I think it's best we keep improvements there.

How's this one? I also changed from using SCM_UNDEFINED to
SCM_UNSPECIFIED so I could restore grob-closure.cc and added
pure-outside-slur-callback.
Index: lily/grob-closure.cc
===
RCS file: /sources/lilypond/lilypond/lily/grob-closure.cc,v
retrieving revision 1.6
diff -u -r1.6 grob-closure.cc
--- lily/grob-closure.cc	3 Oct 2006 12:00:18 -	1.6
+++ lily/grob-closure.cc	22 Oct 2006 07:37:33 -
@@ -80,7 +80,7 @@
   Data may be nonnumber. In that case, it is assumed to be
   undefined.
 */
-
+
 data = SCM_UNDEFINED;
 
   SCM expr = scm_list_2 (proc, data);
Index: lily/grob-property.cc
===
RCS file: /sources/lilypond/lilypond/lily/grob-property.cc,v
retrieving revision 1.55
diff -u -r1.55 grob-property.cc
--- lily/grob-property.cc	23 Sep 2006 22:51:56 -	1.55
+++ lily/grob-property.cc	22 Oct 2006 07:37:33 -
@@ -171,7 +171,8 @@
   else if (is_simple_closure (proc))
 {
   value = evaluate_with_simple_closure (self_scm (),
-	simple_closure_expression (proc));
+	simple_closure_expression (proc),
+	false, 0, 0);
 }
 #ifndef NDEBUG
   if (debug_property_callbacks)
@@ -229,9 +230,17 @@
   return scm_is_pair (immutable_property_alist_);
 }
 
-
 bool
 Grob::internal_has_interface (SCM k)
 {
   return scm_c_memq (k, interfaces_) != SCM_BOOL_F;
 }
+
+SCM
+call_pure_function (SCM unpure, SCM args, int start, int end)
+{
+  SCM scm_call_pure_function = ly_lily_module_constant (call-pure-function);
+
+  return scm_apply_0 (scm_call_pure_function,
+		  scm_list_4 (unpure, args, scm_from_int (start), scm_from_int (end)));
+}
Index: lily/grob.cc
===
RCS file: /sources/lilypond/lilypond/lily/grob.cc,v
retrieving revision 1.179
diff -u -r1.179 grob.cc
--- lily/grob.cc	10 Oct 2006 08:32:59 -	1.179
+++ lily/grob.cc	22 Oct 2006 07:37:34 -
@@ -287,17 +287,19 @@
   if (refp == this)
 return 0.0;
 
-  SCM pure_off = ly_lily_module_constant (pure-Y-offset);
   Real off = 0;
 
   if (dim_cache_[Y_AXIS].offset_)
 off = *dim_cache_[Y_AXIS].offset_;
-  else if (ly_is_procedure (pure_off))
+  else
 {
+  SCM proc = get_property_data (ly_symbol2scm (Y-offset));
+
   dim_cache_[Y_AXIS].offset_ = new Real (0.0);
-  off = scm_to_double (scm_apply_3 (pure_off, self_scm (),
-	scm_from_int (start), scm_from_int (end),
-	SCM_EOL));
+  off = robust_scm2double (call_pure_function (proc,
+		   scm_list_1 (self_scm ()),
+		   start, end),
+			   0.0);
   delete dim_cache_[Y_AXIS].offset_;
   dim_cache_[Y_AXIS].offset_ = 0;
 }
@@ -404,6 +406,7 @@
   SCM min_ext = internal_get_property (min_ext_sym);
   if (is_number_pair (min_ext))
 	real_ext.unite (ly_scm2interval (min_ext));
+
   ((Grob*)this)-dim_cache_[a].extent_ = new Interval (real_ext);  
 }
   
@@ -415,13 +418,11 @@
 Interval
 Grob::pure_height (Grob *refp, int start, int end)
 {
-  SCM pure_height = ly_lily_module_constant (pure-Y-extent);
-  Interval iv (0, 0);
-
-  if (ly_is_procedure (pure_height))
-iv = ly_scm2interval (scm_apply_3 (pure_height, self_scm (),
-   scm_from_int (start), scm_from_int (end),
-   SCM_EOL));
+  SCM proc = get_property_data ( ly_symbol2scm (Y-extent));
+  Interval iv = robust_scm2interval (call_pure_function (proc,
+			 scm_list_1 (self_scm ()),
+			 start, end),
+ Interval (0, 0));
   Real offset = pure_relative_y_coordinate (refp, start, end);
 
   SCM min_ext = get_property (minimum-Y-extent);
Index: lily/side-position-interface.cc
===
RCS file: /sources/lilypond/lilypond/lily/side-position-interface.cc,v
retrieving revision 1.126
diff -u -r1.126 side-position-interface.cc
--- lily/side-position-interface.cc	3 Oct 2006 12:00:18 -	1.126
+++ lily/side-position-interface.cc	22 Oct 2006 07:37:34 -
@@ -190,11 +190,14 @@
   return axis_aligned_side_helper (smob, Y_AXIS, false, 0, 0, current_off);
 }
 
-MAKE_SCHEME_CALLBACK (Side_position_interface, 

Re: Patch proposal: DocBook support for lilypond-book

2006-10-22 Thread lilypondtool
 Should I create a patch? Against which version? Any suggestions?

 Can you also add a relevant section to the manual? Thanks!

I've updated the lilypond-book.itely. Attached.
Sorry I have not created a patch, I don't have access now to any computer
with diff utils.

lilypond-book-docbook.itely
Description: Binary data
___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: pure simple-closures

2006-10-22 Thread Han-Wen Nienhuys

Joe Neeman escreveu:

On Sat, 2006-10-21 at 17:29 +0200, Han-Wen Nienhuys wrote:

Joe Neeman schreef:

On Sat, 2006-10-21 at 12:15 +0200, Han-Wen Nienhuys wrote:

Joe Neeman schreef:


Mostly because at the time that I wrote it, I couldn't figure out how to
handle arbitrary length argument lists in scheme (the only way I
currently know is to build the list of arguments, cons in the function

I think you're looking for the apply function,

   (apply func arg-list)

Ah yes, that's much better. So did you want me to put call_pure_function
in scheme?
yes, I think so. The most important thing is that subsystems should not 
cross the C++/Scheme divide all too often. Since most of the func-pure 
  -func code is in Scheme, I think it's best we keep improvements there.


How's this one? I also changed from using SCM_UNDEFINED to
SCM_UNSPECIFIED so I could restore grob-closure.cc and added
pure-outside-slur-callback.


as a completely unrelated remark: I just realized that simple-closure is 
probably an incorrect name. How about simple-curry?


--

Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: pure simple-closures

2006-10-22 Thread Han-Wen Nienhuys

Joe Neeman escreveu:

On Sat, 2006-10-21 at 17:29 +0200, Han-Wen Nienhuys wrote:

Joe Neeman schreef:

On Sat, 2006-10-21 at 12:15 +0200, Han-Wen Nienhuys wrote:

Joe Neeman schreef:


Mostly because at the time that I wrote it, I couldn't figure out how to
handle arbitrary length argument lists in scheme (the only way I
currently know is to build the list of arguments, cons in the function

I think you're looking for the apply function,

   (apply func arg-list)

Ah yes, that's much better. So did you want me to put call_pure_function
in scheme?
yes, I think so. The most important thing is that subsystems should not 
cross the C++/Scheme divide all too often. Since most of the func-pure 
  -func code is in Scheme, I think it's best we keep improvements there.


How's this one? I also changed from using SCM_UNDEFINED to
SCM_UNSPECIFIED so I could restore grob-closure.cc and added
pure-outside-slur-callback.



Looks good please apply if output-distance agrees.

--

Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: newweb ChangeLog site/news.ihtml site/about/pub...

2006-10-22 Thread Joe Neeman

 +dtbMusic streams thess available/b - emOctober 21, 2006/em
thess? ^^

 +
 +dd
 +The last months, Erik Sandberg has been overhauling the internals of
 +Lily. This change introduces a new intermediate format, Music Streams,
 +which will make it easier get music data out of LilyPond. A copy of
 +the thesis is now avalaible from lilypond.org (a
 +href=@[EMAIL PROTECTED]download PDF 750k/a thesis
 +
 +/dd
 +
 +
 +
  dtbLilyPond 2.9.26 available/b - emOctober 20, 2006/em

Yours,
The typo police



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: newweb ChangeLog site/news.ihtml site/about/pub...

2006-10-22 Thread Han-Wen Nienhuys

Joe Neeman escreveu:

+dtbMusic streams thess available/b - emOctober 21, 2006/em

thess? ^^





Yours,
The typo police


fixed.

The typo police is welcome to become the typo correctional facility, btw.

--

Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Git repository, was Re: doc branching

2006-10-22 Thread Johannes Schindelin
Hi,

On Mon, 23 Oct 2006, Han-Wen Nienhuys wrote:

 Interested parties can get the darcs repo at  
   http://lilypond.org/~hanwen/gub-git/

Well, I cannot. As I stated earlier, I gave up on darcs.

 however, I seem to have some trouble with importing the CVS repo into 
 Git. My attempt is at
 
   http://lilypond.org/~hanwen/lilypond.git/

Right now getting it.

 Unfortunately, it seems to be missing some files. Did I botch up the import,
 or is something wrong with git-cvsimport?

I found that at least one particular version of git-cvsimport forgot 
files, but I had the impression that it was because of --no-rlog. 
Anyway, I will investigate. (This could take a week or so, as I am 
travelling.)

It might well be a bug in cvsps, or git-cvsimport, or both. Hopefully I 
can fix it.

 the CVS repository is available at
 
  http://lilypond.org/~hanwen/lilypond.cvsrepo.tar.bz2

I have it.

Ciao,
Dscho



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: lilypond on FreeBSD?

2006-10-22 Thread Ian Stirling
On Saturday 21 October 2006 03:55, you wrote:
 Ian Stirling [EMAIL PROTECTED] writes:
 
I haven't managed to make Lilypond work on my
  FreeBSD 6.1 system.  The precompiled version gives
  a runtime error looking for a non existent library.
 
 What library is that?

/usr/libexec/ld-elf.so.1: Shared object libm.so.2 not found, required by 
lilypond
/usr/libexec/ld-elf.so.1: Shared object libc.so.4 not found, required by 
lilypond

 By using quick and dirty symbolic links pointing to the
current libraries, libm.so.4 and libc.so.6, the FreeBSD
Lilypond 2.9.26 build from the site works, at least as far
as issuing the help message when invoked with no arguments.

 We base the FreeBSD binaries on 4.10-RELEASE-p2.  Would it make
 sense to support 6.x as well?  If so, we need a binary of
 the c library to bootstrap the build

  I'd certainly like you to support FreeBSD 6.x.
The version of Lilypond in the FreeBSD ports is the ancient 2.2.2.

   tar -C / --exclude=zlib.h --exclude=zconf.h --exclude=gmp.h -czf 
 public_html/freebsd-runtime-$(uname -r).tar.gz 
 /usr/lib/{lib{c,c_r,m}{.a,.so{,.*}},crt{i,n,1}.o} /usr/include

  I have added /lib through that filter to the tar file because
libc.so.* and libm.so.* are there.  I'll send you a private email
with a link to the file on a private page on my web site.

No answers from anyone so far about where to find that
  VeraBd.pfd. Am I reaching the list?
 
 Yes.  I do not have that file either.  It is not required to build
 LilyPond.  I do have a ttf version, however

I get the following error installing 2.9.22 and 2.9.24.

Cannot open /usr/X11R6/lib/X11/fonts/bitstream-vera/VeraBd.pfb
The requested file, VeraBd.pfb, does not exist
Open: Failed to open: /usr/X11R6/lib/X11/fonts/bitstream-vera/VeraBd.pfb
Called from...
 ../buildscripts/pfx2ttf.fontforge: line 3
gmake[1]: *** [out/CenturySchL-Ital.otf] Error 1

Compiling 2.9.26 fails with the following..

cc1plus: warnings being treated as errors
polynomial.cc: In member function 'void Polynomial::check_sol(Real) const':
polynomial.cc:170: warning: empty body in an if-statement
gmake[1]: *** [out/polynomial.o] Error 1
gmake[1]: Leaving directory `/usr/home/ians/.build/lilypond-2.9.26/flower'
gmake: *** [all] Error 2

Ian
--


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: doc branching

2006-10-22 Thread Han-Wen Nienhuys

Johannes Schindelin escreveu:


I am tracking the current lilypond repository with git. I could donate 
this git repository (it is ca. 60MB at the moment).


I prefer git over the other alternatives: it is blazingly fast, *very* 
portable (I gave up on porting darcs after a fruitless day), and 
branching/merging is an easy operation.


I have just updated the GUB builder to work with GIT repository for 
LilyPond, as an experiment.


The goal is that I can work on packaging LilyPond without having to 
ping-ponging all my changes from my CVS dir via the savannah server to 
my GUB dir.


Interested parties can get the darcs repo at

  http://lilypond.org/~hanwen/gub-git/

however, I seem to have some trouble with importing the CVS repo into 
Git. My attempt is at


  http://lilypond.org/~hanwen/lilypond.git/

This is an rsync of a git repo that is fed by a cvsimport cron job on my 
home machine.


Unfortunately, it seems to be missing some files. Did I botch up the 
import, or is something wrong with git-cvsimport?


$ mkdir y
$ cd y
$ git --git-dir /home/lilydev/vc/lilypond.git/.git/ log --max-count=1 | 
grep commit

commit 4098351f3fd294eb547b5a044730cfb8a7d5bd7a
$ git --git-dir /home/lilydev/vc/lilypond.git/.git/ read-tree 
4098351f3fd294eb547b5a044730cfb8a7d5bd7a

$ ls
$ git --git-dir /home/lilydev/vc/lilypond.git/.git/ checkout-index -a
$ ls flower/include/GNUmakefile
ls: flower/include/GNUmakefile: No such file or directory
$ find -type f | wc -l
1797
$ find ~/vc/gub/downloads/lilypond-HEAD/ -type f | grep -v '\./CVS' | wc -l
2001
$

the CVS repository is available at

 http://lilypond.org/~hanwen/lilypond.cvsrepo.tar.bz2

--

Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: [Bug?] Dotting notes by music function

2006-10-22 Thread Juergen Reuter
FYI: After looking once more through a couple of files in the scm 
directory, I finally found the shift-duration-log function that exactly 
does what I wanted.  For the moment, I take this one.


Thanks again,
Juergen

On Wed, 18 Oct 2006, Juergen Reuter wrote:


On Sun, 15 Oct 2006, Nicolas Sceaux wrote:


Juergen Reuter [EMAIL PROTECTED] writes:


By the way, do we have a generic substitution function that you can
pass an event type and some replacement expression to?  Maybe
something like

(replace-for-all-matches
  #(define-matching-expression (any-music-event-of-type 'NoteEvent))
  Music
  #(define-replacement-expression
(original-match) (... an expression in terms of original-match that
is used as replacement for original-match ...))),


There is some kind of music pattern matcher in scm/display-lily.scm: the
with-music-match macro, which is not exported from this module however.

nicolas



Thanks, I will look into it!

Greetings,
Juergen




___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Small doc updates

2006-10-22 Thread Juergen Reuter

Hi, Graham!

I had to make small updates to some of the ancient notation examples in 
the docs to make them better reflect the current implementation. 
Accordingly, I also updated tiny parts of the text refering to these 
examples.  I hope, that's ok?  Of course, feel free to change my changes!


Greetings,
Juergen


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: lilypond on FreeBSD?

2006-10-22 Thread Han-Wen Nienhuys

Ian Stirling escreveu:


Compiling 2.9.26 fails with the following..

cc1plus: warnings being treated as errors
polynomial.cc: In member function 'void Polynomial::check_sol(Real) const':
polynomial.cc:170: warning: empty body in an if-statement


thanks, fixed.

--

Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: Git repository, was Re: doc branching

2006-10-22 Thread Han-Wen Nienhuys

Johannes Schindelin escreveu:

Hi,

On Mon, 23 Oct 2006, Han-Wen Nienhuys wrote:


Interested parties can get the darcs repo at
  http://lilypond.org/~hanwen/gub-git/


Well, I cannot. As I stated earlier, I gave up on darcs.


You can simply wget the directory, which will give you a runnable copy 
of gub.


I found that at least one particular version of git-cvsimport forgot 
files, but I had the impression that it was because of --no-rlog. 
Anyway, I will investigate. (This could take a week or so, as I am 
travelling.)


It might well be a bug in cvsps, or git-cvsimport, or both. Hopefully I 
can fix it.


I have some more clues now; some of the time stamps in the CVS repo are 
messed up; eg revision 1.2 of flower/include/GNUmakefile lists 2002  as 
the year which is clearly wrong.


--

Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: Git repository, was Re: doc branching

2006-10-22 Thread Han-Wen Nienhuys

Johannes Schindelin escreveu:

Hi,

On Mon, 23 Oct 2006, Han-Wen Nienhuys wrote:

I have some more clues now; some of the time stamps in the CVS repo are 
messed up; eg revision 1.2 of flower/include/GNUmakefile lists 2002 as 
the year which is clearly wrong.


Most definitely this would trigger a bug in cvsps. I say bug, because 
really, there are no changesets in CVS, and cvsps just tries to guess 
which revisions belong together by looking at the timestamp and the commit 
message.


That date is definitely wrong (since the next file revision, 1.3 is in the 
year 1998 again). It is not only misleading cvsps, but it actually makes 
the repository less useful. I wonder how you can make that happen, though. 
It is not like I can edit the date of a file revision with CVS (unless I 
edit the ,v file).


We started using CVS with version 1.5.24, end of 2001. The earlier 
history has been recreated artificially by importing tarballs with a 
script. Something went wrong during this process, apparently.


--

Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel