Re: [Doc] Patch: eq? and friends accepts more than two arguments

2022-11-06 Thread Thomas Morley
Am So., 6. Nov. 2022 um 15:58 Uhr schrieb Jean Abou Samra :
>
> Le 06/11/2022 à 15:47, Thomas Morley a écrit :
> > Hi,
> >
> > please find attached a doc-patch, clearifying eq?/eqv?/equal? are
> > working with more than two arguments.
>
>
> Well, but the signature
>
> eq? x y ...
>
> is still not correct, because (eq?) and (eq? x) are also valid.
> eq? takes *any* number of arguments.
>
> Probably better to do:
>
>
>
>  From 09177dab48dabee4b6b6ac5fe110cd56e3e6e261 Mon Sep 17 00:00:00 2001
> From: Jean Abou Samra 
> Date: Sun, 6 Nov 2022 15:55:24 +0100
> Subject: [PATCH] Doc: document that eq?, eqv? and equal? take any number of
>   arguments
>
> ---
>   doc/ref/api-utility.texi | 29 -
>   1 file changed, 16 insertions(+), 13 deletions(-)
>
> diff --git a/doc/ref/api-utility.texi b/doc/ref/api-utility.texi
> index cb7e32f2b..27c6b42f7 100644
> --- a/doc/ref/api-utility.texi
> +++ b/doc/ref/api-utility.texi
> @@ -55,11 +55,12 @@ made up of the same pairs.  Such lists look the same
> (when printed),
>   and @code{equal?} will consider them the same.
>
>   @sp 1
> -@deffn {Scheme Procedure} eq? x y
> +@deffn {Scheme Procedure} eq? @dots{}
>   @deffnx {C Function} scm_eq_p (x, y)
>   @rnindex eq?
> -Return @code{#t} if @var{x} and @var{y} are the same object, except
> -for numbers and characters.  For example,
> +The Scheme procedure returns @code{#t} if all of its arguments are the
> +same object, except for numbers and characters.  The C function does the
> +same but takes exactly two arguments.  For example,
>
>   @example
>   (define x (vector 1 2 3))
> @@ -109,18 +110,19 @@ The @code{==} operator should not be used on
> @code{SCM} values, an
>   @end deftypefn
>
>   @sp 1
> -@deffn {Scheme Procedure} eqv? x y
> +@deffn {Scheme Procedure} eqv? @dots{}
>   @deffnx {C Function} scm_eqv_p (x, y)
>   @rnindex eqv?
> -Return @code{#t} if @var{x} and @var{y} are the same object, or for
> -characters and numbers the same value.
> +The Scheme procedure returns @code{#t} if all of its arguments are the
> +same object, or for characters and numbers the same value.  The C function
> +is similar but takes exactly two arguments.
>
>   On objects except characters and numbers, @code{eqv?} is the same as
> -@code{eq?} above, it's true if @var{x} and @var{y} are the same
> -object.
> +@code{eq?} above.  @code{(eqv? x y)} is true if @var{x} and @var{y} are
> +the same object.
>
> -If @var{x} and @var{y} are numbers or characters, @code{eqv?} compares
> -their type and value.  An exact number is not @code{eqv?} to an
> +If @var{x} and @var{y} are numbers or characters, @code{(eqv? x y)}
> +compares their type and value.  An exact number is not @code{eqv?} to an
>   inexact number (even if their value is the same).
>
>   @example
> @@ -130,11 +132,12 @@ inexact number (even if their value is the same).
>   @end deffn
>
>   @sp 1
> -@deffn {Scheme Procedure} equal? x y
> +@deffn {Scheme Procedure} equal? @dots{}
>   @deffnx {C Function} scm_equal_p (x, y)
>   @rnindex equal?
> -Return @code{#t} if @var{x} and @var{y} are the same type, and their
> -contents or value are equal.
> +The Scheme procedure returns @code{#t} if all of its arguments are the
> +same type, and their contents or value are equal.  The C function is
> +similar, but takes exactly two arguments.
>
>   For a pair, string, vector, array or structure, @code{equal?} compares the
>   contents, and does so using the same @code{equal?} recursively,
> --
> 2.37.3
>
>

Agreed, far better.

Thanks,
  Harm



[Doc] Patch: eq? and friends accepts more than two arguments

2022-11-06 Thread Thomas Morley
Hi,

please find attached a doc-patch, clearifying eq?/eqv?/equal? are
working with more than two arguments.

Cheers,
  Harm
From 23691d4ec8485169cbed0cdf64fb4d36f7daf343 Mon Sep 17 00:00:00 2001
From: Thomas Morley 
Date: Sun, 6 Nov 2022 15:41:50 +0100
Subject: [PATCH] Document eq? and friends accepts more than two arguments

---
 doc/ref/api-utility.texi | 17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/doc/ref/api-utility.texi b/doc/ref/api-utility.texi
index cb7e32f2b..435fbddd2 100644
--- a/doc/ref/api-utility.texi
+++ b/doc/ref/api-utility.texi
@@ -55,7 +55,7 @@ made up of the same pairs.  Such lists look the same (when printed),
 and @code{equal?} will consider them the same.
 
 @sp 1
-@deffn {Scheme Procedure} eq? x y
+@deffn {Scheme Procedure} eq? x y ...
 @deffnx {C Function} scm_eq_p (x, y)
 @rnindex eq?
 Return @code{#t} if @var{x} and @var{y} are the same object, except
@@ -96,6 +96,13 @@ compared with @code{eq?},
 (define x (string->symbol "foo"))
 (eq? x 'foo) @result{} #t
 @end example
+
+@code{eq?} accepts more than two arguments:
+
+@example
+(eq? 'foo 'foo 'foo) @result{} #t
+(eq? 'foo 'bar 'buzz) @result{} #f
+@end example
 @end deffn
 
 @deftypefn {C Function} int scm_is_eq (SCM x, SCM y)
@@ -109,7 +116,7 @@ The @code{==} operator should not be used on @code{SCM} values, an
 @end deftypefn
 
 @sp 1
-@deffn {Scheme Procedure} eqv? x y
+@deffn {Scheme Procedure} eqv? x y ...
 @deffnx {C Function} scm_eqv_p (x, y)
 @rnindex eqv?
 Return @code{#t} if @var{x} and @var{y} are the same object, or for
@@ -127,10 +134,12 @@ inexact number (even if their value is the same).
 (eqv? 3 (+ 1 2)) @result{} #t
 (eqv? 1 1.0) @result{} #f
 @end example
+
+As @code{eq?}, @code{eqv?} accepts more than two arguments.
 @end deffn
 
 @sp 1
-@deffn {Scheme Procedure} equal? x y
+@deffn {Scheme Procedure} equal? x y ...
 @deffnx {C Function} scm_equal_p (x, y)
 @rnindex equal?
 Return @code{#t} if @var{x} and @var{y} are the same type, and their
@@ -155,6 +164,8 @@ even if their value is the same).
 (equal? 1 1.0) @result{} #f
 @end example
 
+As @code{eq?} and @code{eqv?}, @code{equal?} accepts more than two arguments.
+
 Hash tables are currently only compared as per @code{eq?}, so two
 different tables are not @code{equal?}, even if their contents are the
 same.
-- 
2.34.1



Re: string is read-only

2022-08-03 Thread Thomas Morley
Am Mi., 3. Aug. 2022 um 11:13 Uhr schrieb Damien Mattei
:
>
> GNU Guile 3.0.1
> Copyright (C) 1995-2020 Free Software Foundation, Inc.
>
> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> This program is free software, and you are welcome to redistribute it
> under certain conditions; type `,show c' for details.
>
> Enter `,help' for help.
> scheme@(guile-user)> (define str2 "hello")
> scheme@(guile-user)> (string-set! str2 4 #\a)
> ice-9/boot-9.scm:1669:16: In procedure raise-exception:
> string is read-only: "hello"
>
> Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
> scheme@(guile-user) [1]> ,q
> scheme@(guile-user)> (string? str2)
> #t
>
> is it a bug in Guile ? :-O
>
> i can only find reference to deprecated read-only string in old doc:
> https://www.gnu.org/software/guile/docs/docs-1.6/guile-ref/Read-Only-Strings.html#Read%20Only%20Strings
>
> Regards,
>
> Damien

Looks you need to do:

(define str2 (string-copy "hello"))
(string-set! str2 4 #\a)

Cheers,
  Harm



Re: Logo baseline

2020-01-18 Thread Thomas Morley
Am Sa., 18. Jan. 2020 um 15:14 Uhr schrieb Ludovic Courtès :
>
> Hello Guilers!
>
> The Guile logo has this “GNU extension language” baseline.  As Guile 3
> came out, this baseline felt odd to me, not quite corresponding to the
> way I see Guile.
>
> Clearly, Guile is still an extension language, with many great
> applications (Gnucash, Lepton-EDA, OpenCog, GDB, etc.), and I’m sure
> libguile is here to stay.

Well, you forgot LilyPond

> Yet, to me, “extension language” does not
> accurately capture what Guile today allows for and what people have been
> doing with it; since 2.0, it’s more than an extension language, even
> more so with the performance afforded by Guile 3.
>
> Thus, I’d propose changing the baseline.  Something that would describe
> what Guile is to me is:
>
>   GNU, fast, fun, functional
>
> What’s about you?  What’s Guile to you?  :-)
>
> Ludo’.

Well, for me, Guile's _the_ extension language for my LilyPond.

It may be more, it may have become more.
And yes, I used Guile for some other stuff as well.
Nevertheless, it remains the language to extend LilyPond.

It feels very strange dropping said phrase.


Cheers,
  Harm



Re: GNU Guile 2.9.7 Released [beta]

2019-12-14 Thread Thomas Morley
Am Fr., 13. Dez. 2019 um 14:50 Uhr schrieb Matt Wette :
>
>
> On 12/13/19 5:30 AM, Andy Wingo wrote:
> > We are pleased to announce GNU Guile release 2.9.7.  This is the seventh
> > and hopefully next-to-last pre-release of what will eventually become
> > the 3.0 release series.
> >
>
> mwette$ uname -a
> Linux halibut 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC
> 2019 x86_64 x86_64 x86_64 GNU/Linux
>
> mwette$ ./configure --prefix=/opt/local
> ...
>
> mwette$ make
> ...
> wrote `system/vm/frame.go'
>BOOTSTRAP GUILEC system/vm/linker.go
> /bin/bash: line 6:  7565 Segmentation fault  (core dumped)
> GUILE_AUTO_COMPILE=0 ../meta/build-env guild compile
> --target="x86_64-pc-linux-gnu" -O1 -Oresolve-primitives -L
> "/home/mwette/proj/guile/guile-2.9.7/module" -L
> "/home/mwette/proj/guile/guile-2.9.7/guile-readline" -o
> "system/vm/linker.go" "../module/system/vm/linker.scm"
> Makefile:1930: recipe for target 'system/vm/linker.go' failed
>
> Same happened on 2.9.5.  Also, check this:
>
> mwette$ cd bootstrap
>
> mwette$ GUILE_AUTO_COMPILE=0 ../meta/build-env guild compile
> --target="x86_64-pc-linux-gnu" -O1 -Oresolve-primitives -L
> "/home/mwette/proj/guile/guile-2.9.7/module" -L
> "/home/mwette/proj/guile/guile-2.9.7/guile-readline" -o
> "system/vm/linker.go" "../module/system/vm/linker.scm"
> Segmentation fault (core dumped)
>
> mwette$ GUILE_AUTO_COMPILE=0 ../meta/build-env guild compile
> --target="x86_64-pc-linux-gnu" -O1 -L
> "/home/mwette/proj/guile/guile-2.9.7/module" -L
> "/home/mwette/proj/guile/guile-2.9.7/guile-readline" -o
> "system/vm/linker.go" "../module/system/vm/linker.scm"
> wrote `system/vm/linker.go'
>
> In the second case I removed "-Oresolve-primitives".  I could not trace
> down further.
>
> Matt
>
>

FWIW,
I compiled successfully from current master, i.e.

~/guile-3.0 (master)$ git log
commit 4b34e1147693f5257720ae7545b001a400bbed91 (HEAD -> master, tag:
v2.9.7, origin/master, origin/HEAD)
Author: Andy Wingo 
Date:   Fri Dec 13 13:57:04 2019 +0100

GNU Guile 2.9.7.

* GUILE-VERSION (GUILE_MICRO_VERSION): Bump.
* NEWS: Update.

with most simple:

sh autogen.sh
./configure
make

on my machine:

$ uname -a
Linux kasten 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC
2019 x86_64 x86_64 x86_64 GNU/Linux

Though, I remember the same crashed at first attempt with 2.9.6
After doing

make clean

first, it worked finally.


Cheers,
  Harm



Re: GNU Guile 2.9.4 Released [beta]

2019-08-26 Thread Thomas Morley
Am Mo., 26. Aug. 2019 um 21:13 Uhr schrieb Mark H Weaver :
>
> Hi Thomas,
>
> Thomas Morley  writes:
>
> > Am Mo., 26. Aug. 2019 um 19:10 Uhr schrieb :
> >>
> >> Perhaps you have to add /usr/local/lib to /etc/ld.so.conf (or some
> >> file below /etc/ld.so.conf.d) and run ldconfig.
> >>
> >> HTH
> >> -- tomás
> >
> > Hi tomás,
> >
> > thanks for your hints.
> > I've got it work by running nothing else than
> > sudo ldconfig
> >
> > But I wonder, shouldn't it work out of the box with 'sudo make install' ?
>
> Running 'ldconfig' is not always appropriate, and therefore the vast
> majority of programs do *not* run 'ldconfig' in "make install".  Whether
> it is appropriate depends on several factors, including which OS and
> distro you're using, which prefix you're installing to, whether you're
> building a distro package that will actually be installed at a later
> time, and which of several available mechanisms you have chosen to use
> to allow programs to find their shared libraries.
>
> For example, it's *never* appropriate to run 'ldconfig' on NixOS or Guix
> systems, nor when building a Debian package or similar where the actual
> installation will happen later, nor when installing into a directory
> that's not listed in /etc/ld.so.conf (or /etc/ld.so.conf.d), nor when
> running "make install" as non-root.
>
> In theory we could try to make a guess, but there's no reliable way for
> the build system to know whether it is appropriate or not, and in
> practice it is usually done as a separate step in most modern systems.
>
>  Regards,
>Mark

Hi Mark,

many thanks for your explanations.
You may remember from here:
https://lists.gnu.org/archive/html/guile-user/2019-08/msg00016.html
that I'm used to switch guile-versions pretty frequently.

For every guile-version so far 'sudo make install' worked out of the
box (apart from the problem discussed in the linked thread), thus I
was surprised it didn't today.

Thanks,
  Harm



Re: GNU Guile 2.9.4 Released [beta]

2019-08-26 Thread Thomas Morley
Am Mo., 26. Aug. 2019 um 19:10 Uhr schrieb :
>
> On Mon, Aug 26, 2019 at 06:39:02PM +0200, Thomas Morley wrote:
> > Am So., 25. Aug. 2019 um 22:22 Uhr schrieb Andy Wingo :
> > >
> > > We are pleased to announce GNU Guile release 2.9.4.  This is the fourth
> > > pre-release of what will eventually become the 3.0 release series.
> >
> > > We encourage you to test this release and provide feedback to
> > > guile-devel@gnu.org, and to file bugs by sending mail to
> > > bug-gu...@gnu.org.
> >
> > Hi,
> >
> > I did in my guile-git-repository:
> >
> > git fetch
> > git pull -r
> > git checkout v2.9.4
> > git checkout -b guile-2.9.4
> > make clean
> > sh autogen.sh
> > ./configure
> > make
> > sudo make install
> >
> > All went well, but then doing:
> > ~$ guile
> > returns:
> > guile: error while loading shared libraries: libguile-3.0.so.0: cannot
> > open shared object file: No such file or directory
> >
> > But
> > ~$ locate libguile-3.0.so.0
> > returns:
> > /home/hermann/guile-3.0/libguile/.libs/libguile-3.0.so.0
> > /home/hermann/guile-3.0/libguile/.libs/libguile-3.0.so.0.0.0
>
> Hm. After having done "sudo make install" above, I'd expect libguile
> to land in /usr/local/lib somewhere: go look there.
>
>  - Are you starting the "right" guile? (probably)
>What does "which guile" say?
>  - What does "/usr/bin/ldd $(which guile) say?
>
> Perhaps you have to add /usr/local/lib to /etc/ld.so.conf (or some
> file below /etc/ld.so.conf.d) and run ldconfig.
>
> HTH
> -- tomás

Hi tomás,

thanks for your hints.
I've got it work by running nothing else than
sudo ldconfig

But I wonder, shouldn't it work out of the box with 'sudo make install' ?

Thanks,
  Harm



Re: GNU Guile 2.9.4 Released [beta]

2019-08-26 Thread Thomas Morley
Am So., 25. Aug. 2019 um 22:22 Uhr schrieb Andy Wingo :
>
> We are pleased to announce GNU Guile release 2.9.4.  This is the fourth
> pre-release of what will eventually become the 3.0 release series.

> We encourage you to test this release and provide feedback to
> guile-devel@gnu.org, and to file bugs by sending mail to
> bug-gu...@gnu.org.

Hi,

I did in my guile-git-repository:

git fetch
git pull -r
git checkout v2.9.4
git checkout -b guile-2.9.4
make clean
sh autogen.sh
./configure
make
sudo make install

All went well, but then doing:
~$ guile
returns:
guile: error while loading shared libraries: libguile-3.0.so.0: cannot
open shared object file: No such file or directory

But
~$ locate libguile-3.0.so.0
returns:
/home/hermann/guile-3.0/libguile/.libs/libguile-3.0.so.0
/home/hermann/guile-3.0/libguile/.libs/libguile-3.0.so.0.0.0

Am I doing something wrong?

Cheers,
  Harm



Re: Results of tests of guile-2.9

2018-11-13 Thread Thomas Morley
Am Di., 13. Nov. 2018 um 01:12 Uhr schrieb Mikael Djurfeldt
:
>
> It would be nice to have guile-1.8 in that list since some users stayed at 
> that version due to 2.0 being slower.

As does LilyPond...

> Maybe, in time, we can get everyone back to the most recent release. :-))

I wrote some own test-code.
To be absolutely clear, this code is silly and terrible and
accumulates expensive procedures done again and again..
If I would see something like that I'd usually shout: "Man, are you crazy??"

Nevertheless, I post it here (and the results) to expose the
string-problem, which LilyPond still fights with (among others).

(begin
  (use-modules (srfi srfi-1))

  (let ((ls '()))
(for-each
  (lambda (x)
(set! ls
  (cons
(string-append "'" (object->string (eval-string "'(a b c)")))
ls
)))
(iota 1))
(set! ls (delete-duplicates ls))
(write (version

Invoked with
$ time guile-whatever-version path/to/file

"1.8.8"
real0m0,471s
user0m0,446s
sys0m0,018s

"2.0.14"
real0m3,141s
user0m3,595s
sys0m0,111s

"2.2.4.9-71f536"
real0m1,406s
user0m1,633s
sys0m0,063s


"2.9.1"
real0m1,385s
user0m1,615s
sys0m0,033s


For this code guilev1 beats all others, although guile-2.9.1 is much
faster than 2.0.14

As said, it's a worse test, exposing a guilev2 weakness.
And ofcourse not the only problem LilyPond is facing with guilev2.
I do have a working guile-2.9.1/LilyPond-setup and results for
real-world ly-files are usually not that dramatically, but still big.


Otoh, I observe a steady improvement from 2.0.14 to 2.2.4 and the most
recent 2.9.1

So I'm eager to see how the final 3.0 will work.

Thanks,
  Harm



Re: GNU Guile 2.2.0 released

2017-03-18 Thread Thomas Morley
2017-03-18 21:50 GMT+01:00 Thomas Morley :

> ~$ guile
> guile: error while loading shared libraries: libguile-2.2.so.1: cannot
> open shared object file: No such file or directory

Strange. I can't reproduce it and 2.2.0.2-aa86f _is_ installed.

Sorry for the noise.

Cheers,,
  Harm



Re: GNU Guile 2.2.0 released

2017-03-18 Thread Thomas Morley
2017-03-18 12:20 GMT+01:00 Ludovic Courtès :
> Jean Louis  skribis:
>
>> There is mistake with the link 2.2.0:
>> https://www.gnu.org/software/guile/download/(string-append%20https://ftp.gnu.org/gnu/guile/guile-%20(latest-guile-version)%20.tar.gz)
>
> Fixed:
>
>   
> https://git.savannah.gnu.org/cgit/guile/guile-web.git/commit/?id=f46a5d7ebbad36d005c36aaf3bba288ac2386ce1
>
> Thanks!
> Ludo’.
>
>

>From the repo I've a successful make out of

commit aa86fcb7d92857ddbd9c0cde40f3d730d4606d62
Author: Ludovic Courtès 
Date:   Fri Mar 17 23:37:57 2017 +0100

web: Avoid deprecated '_IOFBF'.

* module/web/client.scm (open-socket-for-uri): Use 'block instead of
_IOFBF.



~/guile/meta (master)$ ./guile
GNU Guile 2.2.0.2-aa86f
[...]


make install
successful as well, i.e. no errors

But trying guile in a fresh terminal returns an error:

~$ guile
guile: error while loading shared libraries: libguile-2.2.so.1: cannot
open shared object file: No such file or directory


I'm on Ubuntu 16-bit 16.04

~$ uname -a
Linux kasten 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC
2017 x86_64 x86_64 x86_64 GNU/Linux


Cheers,
  Harm



Re: GNU Guile 2.1.7 released (beta)

2017-03-05 Thread Thomas Morley
Hi Andy,
sorry for the late reply.
My regular job eats too much time 

2017-02-28 9:31 GMT+01:00 Andy Wingo :
> On Tue 28 Feb 2017 00:00, Thomas Morley  writes:
>
>> The main problems/TODOs are listed here (same for guile-2.0.13 and 2.1.7):
>> https://ao2.it/tmp/lilypond-guile2/TODO
>> With no warranty for completeness.
>>
>> Let me pick some of them:
>> (1)
>> lilypond filename_名字.ly
>> returns
>> fatal error: failed files: "filename_??.ly"
>
> Interesting, I would have thought that there would be a difference
> between 2.0.13 and 2.1.7 due to GUILE_INSTALL_LOCALE; I assume you are
> in a UTF-8 locale and that file name is UTF-8?

~$ locale
LANG=en_US.UTF-8
LANGUAGE=en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=


>
>> (2)
>> Floating point numbers are different in some decimal digits.
>> Possible impact on spacing in a regression-test for utf-8.
>
> If you have more details on the floating-point issue, they are very
> welcome :)

Not really my topic.
Though first reported here:
http://lists.gnu.org/archive/html/lilypond-devel/2016-11/msg00156.html


>
>> (3)
>> Most imortant for users:
>> LilyPond slowed down dramatically. Today I tested a huge file:
>>
>> lilypond 2.19.52 with guile-1.8
>>
>> real9m8.229s
>> user6m41.156s
>> sys 0m11.940s
>>
>> lilypond 2.19.56 with guile-2.1.7
>>
>> real48m45.225s
>> user65m43.252s
>> sys 0m6.320s
>
> Do you have Guile 2.0 numbers as well?
>
> I understand that Lilypond uses the "local-eval" facility a lot for
> embedded Scheme.  This is a facility that was indeed faster in 1.8.  I
> would expect that 2.1.7 would be faster than 2.0, if that were the case,
> as 2.1.7's evaluator is faster.  Hard to say, though.  That interface
> does not get a lot of speed attention.  We could take a look and see
> what we can do.  I guess we need some profiling first.

Here some findings:

(1)
released lilypond-2.19.52 with guile-1.8.7

real8m16.191s
user6m39.864s
sys0m10.860s

(2)
lilypond with guile-2.0.14 build from guile-git-repository, branch
remotes/origin/stable-2.0

real34m11.762s
user45m11.316s
sys0m5.604s

(3)
lilypond with guile-2.1.7 build from guile-git-repository, branch master

real67m29.132s
user93m14.812s
sys0m7.332s

More info in my reply to Arne on the user-list:
http://lists.gnu.org/archive/html/guile-user/2017-03/msg00042.html

> Can you run lilypond under callgrind under 1.8 and 2.1.7 and attach the
> generated callgrind.out.PID for each run?  Run like this:
>
>   valgrind --tool=callgrind --num-callers=20 lilypond foo.ly

Running valgrind on the same .ly-file as for my tests above is insane,
I aborted it after several (far too many) hours.
Let me try to find some ly-code/file of medium size to do so.

Thanks,
  Harm
>
> Thanks,
>
> Andy



Re: GNU Guile 2.1.7 released (beta)

2017-02-27 Thread Thomas Morley
2017-02-26 18:57 GMT+01:00 Andy Wingo :
> On Fri 24 Feb 2017 18:46, Arne Babenhauserheide  writes:
>
>> The main strategical question I see for that is: Does anything make it
>> harder to complete or improve the lilypond transition to Guile 2?
>>
>> Is there something which would need to be done before 2.2 which could
>> make it easier for lilypond developers?
>
> I don't know of any concrete points here.  2.2 is not dissimilar to 2.0.
> If you someone like to try to determine exactly what specific bits of
> Guile 2.2 impact Lilypond (and indeed any big application using the C
> interface), that would be welcome :)  I guess I'd start with NEWS to see
> what's up.
>
> Andy
>

Hi,

I'm more a musician and LilyPond power-user. As a developer I'm
focused on creating new, directly usable functionality.
So I feel pretty much out of my league here...
Though, I hope a view from a LilyPond user may find some interest.


Due to bug-fixes guile-2.0.12 was the first version which could be
used to build LilyPond, afaik.
We have now LilyDev-5.1 for use in a VB (with guile-2.10.13), for
everyone who wants to work on guilev2 migration.

Meanwhile I have a LilyPond-build with guile-2.1.7 on my machine.
(With a brute-force fix, simply deleting all functionality related to
scm_protects.
Replacing it with scm_gc_protect_object as the IRC-log
https://gnunet.org/bot/log/guile/2017-01-05
seems to suggest didn't work)

The main problems/TODOs are listed here (same for guile-2.0.13 and 2.1.7):
https://ao2.it/tmp/lilypond-guile2/TODO
With no warranty for completeness.

Let me pick some of them:
(1)
lilypond filename_名字.ly
returns
fatal error: failed files: "filename_??.ly"

(2)
Floating point numbers are different in some decimal digits.
Possible impact on spacing in a regression-test for utf-8.

(3)
Most imortant for users:
LilyPond slowed down dramatically. Today I tested a huge file:

lilypond 2.19.52 with guile-1.8

real9m8.229s
user6m41.156s
sys 0m11.940s

lilypond 2.19.56 with guile-2.1.7

real48m45.225s
user65m43.252s
sys 0m6.320s



Investigating and fixing those is beyond my current knowledge.
Though, that's the current state, afaik.

Best,
  Harm



Re: guile 2.0.13 can't find file

2017-01-05 Thread Thomas Morley
2016-12-31 17:00 GMT+01:00 Matt Wette :
>
> On Dec 31, 2016, at 6:18 AM, Thomas Morley  wrote:
>
> Any hint on this or is it a bug?
>
>> Check this one: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22913
>

Thanks for the link.
I read there:
"Thus the above behaviour is fatal to any attempt to write in Guile
Scheme a program to operate on arbitrarily-named files."
Currently nobody objected.
A showstopper?

Other probably related issues:

environment mangled by locale
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20822

read-only setlocale has side effect
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22910

setlocale can't be localised
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24186

Cheers,
  Harm



guile 2.0.13 can't find file

2016-12-31 Thread Thomas Morley
Hi,

consider the attached file, containing nothing else then:

(newline)
(write (command-line))

(newline)
(write (map string->symbol (command-line)))


After navigating into the containing folder I get in terminal (with
guile 2.0.13):

$ guile filename_名字.scm
;;; Stat of /home/hermann/Desktop/filename_??.scm failed:
;;; ERROR: In procedure stat: No such file or directory:
"/home/hermann/Desktop/filename_\u540d\u5b57.scm"
Backtrace:
In ice-9/boot-9.scm:
 160: 8 [catch #t # ...]
In unknown file:
   ?: 7 [apply-smob/1 #]
In ice-9/boot-9.scm:
  66: 6 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 5 [eval # #]
In ice-9/boot-9.scm:
2404: 4 [save-module-excursion #]
4058: 3 [#]
1727: 2 [%start-stack load-stack ...]
1732: 1 [#]
In unknown file:
   ?: 0 [primitive-load "/home/hermann/Desktop/filename_\u540d\u5b57.scm"]

ERROR: In procedure primitive-load:
ERROR: In procedure open-file: No such file or directory:
"/home/hermann/Desktop/filename_\u540d\u5b57.scm"



Doing the same with guile-1.8:

$ guile-1.8 filename_名字.scm

("filename_�\x90\x8d字.scm")
(filename_名字.scm)



This is a follow up to this thread on guile-user:
http://lists.gnu.org/archive/html/guile-user/2016-11/msg00031.html
While the reply is surely correct in his analysis I don't get closer
to solve the issue.

Any hint on this or is it a bug?


Cheers,
  Harm
(newline)
(write (command-line))

(newline)
(write (map string->symbol (command-line)))