Re: [Chicken-users] 4.1.0rc1

2009-07-05 Thread Peter Bex
On Thu, Jul 02, 2009 at 03:03:09PM +0200, felix winkelmann wrote:
> Hi!
> 
> The release candidate for 4.1.0 is available now at
> 
> http://www.call-with-current-continuation.org/chicken-4.1.0rc1.tar.gz
> 
> If you have a few minutes, download it and give it a try.

Whew!  Found another tricky bug.  It appears that when you have an
extended lambda list (with DSSSL syntax) inside a module, the names
in the non-extended part of the argument list are renamed in the syntax
environment instead of the expansion environment.

Attached is a patch with regression test to fix this.  I hope this can
be included in 4.1.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
-- Donald Knuth
Index: tests/module-tests.scm
===
--- tests/module-tests.scm  (revision 15157)
+++ tests/module-tests.scm  (working copy)
@@ -145,4 +145,15 @@
  (begin0 1 2 3))
1)
 
+(module m14 (test-extlambda)
+  (import chicken scheme)
+  (define (test-extlambda string #!optional whatever)
+string))
+
+(import m14)
+
+(test-equal "extended lambda list uses expansion environment"
+"some text"
+(test-extlambda "some text"))
+
 (test-end "modules")
Index: expand.scm
===
--- expand.scm  (revision 15157)
+++ expand.scm  (working copy)
@@ -484,18 +484,18 @@
  (loop 3 req opt '() r)
  (err "`#!key' argument marker in wrong context") ) ]
 [else
- (cond [(symbol? x)
+ (cond [(symbol? var)
 (case mode
-  [(0) (loop 0 (cons x req) '() '() r)]
-  [(1) (loop 1 req (cons (list x #f) opt) '() r)]
+  [(0) (loop 0 (cons var req) '() '() r)]
+  [(1) (loop 1 req (cons (list var #f) opt) '() r)]
   [(2) (err "invalid lambda list syntax after 
`#!rest' marker")]
-  [else (loop 3 req opt (cons (list x) key) r)] ) ]
-   [(and (list? x) (eq? 2 (length x)))
+  [else (loop 3 req opt (cons (list var) key) r)] 
) ]
+   [(and (list? var) (eq? 2 (length var)))
 (case mode
   [(0) (err "invalid required argument syntax")]
-  [(1) (loop 1 req (cons x opt) '() r)]
+  [(1) (loop 1 req (cons var opt) '() r)]
   [(2) (err "invalid lambda list syntax after 
`#!rest' marker")]
-  [else (loop 3 req opt (cons x key) r)] ) ]
+  [else (loop 3 req opt (cons var key) r)] ) ]
[else (err "invalid lambda list syntax")] ) ] ) ) ] 
) ) ) ) ) )
 
 


pgpouwAWHi5Q5.pgp
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] 4.1.0rc1

2009-07-04 Thread Peter Bex
On Sat, Jul 04, 2009 at 02:55:16PM +0200, Peter Bex wrote:
> Felix, you still have an account on the amd64 machine, so if you want to
> run some tests there, feel free to log in.  I'm going to have a closer
> look as well and will report if I find anything.

Ah, I found the problem. Chicken tries to load scheme.import.so from
the egg dir under PREFIX.  That's why it worked on my laptop, there
I passed as PREFIX the nonstandard location where I already had a
version Chicken 4 installed.

How about adding "export CHICKEN_REPOSITORY=${TEST_DIR}/.." to
runtests.sh?  That fixed the problem for me.

After adding this fix, I ran the tests again and all tests succeeded.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
-- Donald Knuth


pgpyaF0UaPCaF.pgp
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] 4.1.0rc1

2009-07-04 Thread Peter Bex
On Thu, Jul 02, 2009 at 03:03:09PM +0200, felix winkelmann wrote:
> Hi!
> 
> The release candidate for 4.1.0 is available now at
> 
> http://www.call-with-current-continuation.org/chicken-4.1.0rc1.tar.gz
> 
> If you have a few minutes, download it and give it a try.

make spotless doesn't remove setup-download.c, setup-api.c and
chicken-boot (I assume chicken-boot should really be removed by
"make clean"?).

Shouldn't one of the cleaning processes also clean up the tests and
benchmarks directories?

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
-- Donald Knuth


pgpL9HWCBFtOj.pgp
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] 4.1.0rc1

2009-07-04 Thread Peter Bex
On Thu, Jul 02, 2009 at 03:03:09PM +0200, felix winkelmann wrote:
> Hi!
> 
> The release candidate for 4.1.0 is available now at
> 
> http://www.call-with-current-continuation.org/chicken-4.1.0rc1.tar.gz
> 
> If you have a few minutes, download it and give it a try.

I ran the full bootstrap process on a machine (amd64) that still has
Chicken 2 installed and it crapped out saying the "scheme" module did
not exist.  Looks like some part of the process is still using one of
the system-installed tools.  See the attached typescript.

I also tried it on another machine (ppc) with Chicken 3 and 4 installed.
Chicken 4 is in a nonstandard location and Chicken 3 in /usr/pkg, so
you'd think I would also get this error because it would use chicken 3's
libraries, but no; it managed to run more tests successfully.
I also used full bootstrap here, so that didn't differ.

I got a different error here:

 lolevel tests ...

Error: assertion failed: (= -1 (pointer-s8-ref some-chunk))

After adding (write (pointer-s8-ref some-chunk)) in there, I got the
contents to print: 255.  Turns out that on PowerPC (and on ARM, too!),
"char" is unsigned by default.  Chicken should either pass -fsigned-char
to the compiler (but this is less efficient for cases where signedness
doesn't matter), or the definition of pointer-s8-ref should be changed:

(define pointer-s8-ref
  (getter-with-setter
 (foreign-lambda* int ([c-pointer p]) "return(*((signed char *)p));")
   pointer-s8-set!) )

After making this change and recompiling, the test succeeds.  All other
tests succeed as well.

Felix, you still have an account on the amd64 machine, so if you want to
run some tests there, feel free to log in.  I'm going to have a closer
look as well and will report if I find anything.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
-- Donald Knuth
Script started on Sat Jul  4 13:04:25 2009

sjam...@frohike%  
branches/prerelease/testsssh runtests.sh 

 compiler tests ...
../chicken compiler-tests.scm -output-file a.c -include-path ..

Warning: global variable `foo#bar' is never used
gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -Os 
-fomit-frame-pointer -I.. -I/usr/local/include
rm a.c
gcc a.o -o a.out -L.. -L/usr/local/lib  -Wl,-R/usr/local/lib -lchicken -lm
rm a.o
#t
12
12
12
12
12
 compiler tests (2) ...
../chicken compiler-tests.scm -output-file a.c -include-path .. -lambda-lift

Warning: global variable `foo#bar' is never used
gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -Os 
-fomit-frame-pointer -I.. -I/usr/local/include
rm a.c
gcc a.o -o a.out -L.. -L/usr/local/lib  -Wl,-R/usr/local/lib -lchicken -lm
rm a.o
#t
12
12
12
12
12
 scrutiny tests ...
../chicken scrutiny-tests.scm -output-file a.c -include-path .. -scrutinize 
-analyze-only -ignore-repository -types ../types.db
 runtime tests ...
many arguments supported.
../chicken test-gc-hooks.scm -output-file a.c -include-path ..
gcc a.c -o a.o -c -fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -Os 
-fomit-frame-pointer -I.. -I/usr/local/include
rm a.c
gcc a.o -o a.out -L.. -L/usr/local/lib  -Wl,-R/usr/local/lib -lchicken -lm
rm a.o
major gc ...
> GC pre hook - mode=0, count=0
[GC] level  1   gcs(minor)  1   gcs(major)  1
[GC] stack  0x7f7be650  0xfffc2a70  0x7f7fe650
[GC]  from  0x54d0000x5781900x58a0900x2b190
[GC]to  0x50f0000x50f0000x54c090 
[GC] 0 locatives (from 32)
< GC post hook - mode=1, count=0, ms=2
minor gc ...
> GC pre hook - mode=0, count=0
< GC post hook - mode=0, count=0, ms=140187690208691
alloc ...
> GC pre hook - mode=0, count=0
[GC] level  1   gcs(minor)  1   gcs(major)  2
[GC] stack  0x7f7be650  0xd4d0  0x7f7fe650
[GC]  from  0x50f0000x53a1900x54c0900x2b190
[GC]to  0x54d0000x54d0000x58a090 
[GC] 0 locatives (from 32)
< GC post hook - mode=1, count=0, ms=1
> GC pre hook - mode=2, count=0
(old) fromspace:start=0050f000, limit=0054c090
(old) tospace:  start=0054d000, limit=0058a090
[GC] resized heap to 1108 bytes
(new) fromspace:start=005ba000, limit=00af8c64
(new) tospace:  start=00af9000, limit=01037c64
< GC post hook - mode=2, count=0, ms=0
> GC pre hook - mode=2, count=0
(old) fromspace:start=005ba000, limit=00af8c64
(old) tospace:  sta

Re: [Chicken-users] 4.1.0rc1

2009-07-03 Thread Sven Hartrumpf
Thu, 02 Jul 2009 15:45:56 +0200 (CEST), Sven.Hartrumpf wrote:
> ~/tmp/chicken-4.1.0rc1/tests > sh runtests.sh 
>  compiler tests ...
> ../chicken compiler-tests.scm -output-file a.c -include-path ..
> 
> Error: shell command terminated with non-zero exit status 11: ../chicken 
> compiler-tests.scm -output-file a.c -include-path .. 

This workaround solved the reported issue: I replaced the gcc option -O3 by -O2
(gcc 4.4.0, 32bit).

I should have known this pitfall ..., really.

Sven


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] 4.1.0rc1

2009-07-02 Thread Sven Hartrumpf
Hi Felix.

Thu, 2 Jul 2009 15:03:09 +0200, bunny351 wrote:

> The release candidate for 4.1.0 is available now at
> If you have a few minutes, download it and give it a try.

This version (and all svn versions after 2009-06-25 or so)
showed the following problem (Linux, gcc440, i686):

> cd tests/
~/tmp/chicken-4.1.0rc1/tests > sh runtests.sh 
 compiler tests ...
../chicken compiler-tests.scm -output-file a.c -include-path ..

Error: shell command terminated with non-zero exit status 11: ../chicken 
compiler-tests.scm -output-file a.c -include-path .. 


Sven


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] 4.1.0rc1

2009-07-02 Thread felix winkelmann
Hi!

The release candidate for 4.1.0 is available now at

http://www.call-with-current-continuation.org/chicken-4.1.0rc1.tar.gz

If you have a few minutes, download it and give it a try.


cheers,
felix


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users