Re: [Chicken-users] chicken-setup quoting problem on CMake MinGW

2006-08-31 Thread felix winkelmann

On 8/31/06, Brandon J. Van Every [EMAIL PROTECTED] wrote:


E:\devel\mingwls
[...]


I don't understand this. csc is called twice in the above logs,
and once it is quotewrapped and once it isn't. Is the installation
ok? Can you run the chicken-setup invocations separately, with locally
saved eggs and without the download?


cheers,
felix


--
http://galinha.ucpel.tche.br:8081/blog/blog.ssp


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


Re: [Chicken-users] distributing configure.in and Makefile.am

2006-08-31 Thread felix winkelmann

On 8/31/06, Brandon J. Van Every [EMAIL PROTECTED] wrote:

Am I correct in thinking that configure.in and Makefile.am do not need
to be distributed in a tarball?  What an enduser actually needs is
configure and Makefile.in.  I'm thinking if the user needs to run the
Autotools again for some reason, then he should be downloading a full
source tree from Darcs.  Please inform if I've misunderstood Autoconf's
expected mode of operation.


I would leave them in. It should be possible for someone who downloaded
a source tarball to modify the Makefiles (without wading through automake
generated stuff).


cheers,
felix

--
http://galinha.ucpel.tche.br:8081/blog/blog.ssp


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


[Chicken-users] Cleaning up floating-point-specific operators

2006-08-31 Thread Will M Farr

Hello all,

Due to the discussion of floating-point performance on this list  
initiated by Carlos Pita, I've been writing some toy benchmarks which  
use the fp+, fp-, etc operators.  The situation with these operators  
is a *mess*:


1. The binary arithmetic operators fp+, fp-, fp*, fp/ check their  
arguments for flonum-ness even in unsafe mode.
2. The binary operators fp=, fp=, etc, do not check their arguments  
for flonum-ness even in safe mode.
3. fp/ throws an error on division by zero instead of returning nan  
(when (fp/ 0.0 0.0)) or +/- inf (when (fp/ x 0.0)).


#1 directly contradicts the manual (which states that these operators  
do not check their arguments ever); #2 is very unsafe (though in  
keeping with the warning in the manual); #3 is an exceedingly bad  
idea in numerical algorithms---these often depend on getting infinite  
results for some calculations---and will shock the expectations of  
anyone who comes to Chicken from a numerical analysis background  
(i.e. me).


The attached patches to runtime.c and library.scm should fix these  
issues.  Here is what they do:


1. Add a (flonum? x) predicate to the library.
2. Implement the following type-checking rules for all fpXXX operators:
	a. In safe mode, check that arguments are flonums and throw an error  
if not

b. In unsafe mode, check no arguments
3. Modify fp/ to return +/- inf (or nan if (fp/ 0.0 0.0)) when  
dividing by zero.  Trust me---if you're using floating point code,  
this is what you want.  In fact, many numerical codes depend on this  
behavior.


I feel like #1 and #3 should be uncontroversial (if you're suspicious  
of #3, I would recommend consulting the nearest person who writes  
numerical codes for a living).  #2 reflects my preference, but two  
consistent alternate behaviors could be:


2'. fpXXX operators do not ever check their arguments for flonum- 
ness.  (This is the current claim of the manual.)

2''. fxXXX operators always check their arguments for flonum-ness.

I would argue against 2' with two points: 1) it's annoying to  
accidentally crash the interpreter when testing code with (fp+ 1 1.0)  
in it and 2) the fpXXX operators are around for efficiency reasons,  
and people who want speed out of Chicken will probably be compiling  
in unsafe mode anyway.  I would argue against 2'' because it makes  
the fpXXX operators only barely faster than the standard arithmetic  
operators even when the user has explicitly asked to live dangerously  
by declaring (unsafe).


However, if the consensus opinion is for 2' or 2'' I would be happy  
to modify the patches to account for this in the interests of  
sensible behavior.  Assuming these patches are acceptable to felix  
(and whomever else who needs to approve), I am also happy to modify  
the manual to reflect the changes.


Thanks,
Will



library.patch
Description: Binary data


runtime.patch
Description: Binary data

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


[Chicken-users] fixnum-specific math operators patch

2006-08-31 Thread Will M Farr

Hello all,

In the spirit of my last post about flonum-specific math operators,  
attached is a patch which implements the following behavior for  
Chicken's fxXXX math operators:


In safe mode: all fxXXX operators check that their arguments are  
really fixnums and throw an error if they are not.

In unsafe mode: all fxXXX operations check no argument types.

In both cases the fxXXX operators do not check for overflow (i.e. you  
can think of them as operating mod 2^n with n dependent on the system  
word size).  Right now all fxXXX operations are unsafe (in the sense  
that you can perform them on non-fixnums and get nonsense---but  
fixnum---results, not in the sense that they crash the system).


This patch would slow down code compiled in safe mode which uses the  
fxXXX operators because of the extra two checks per operation, but  
would detect stupid errors such as:


#;1 (fx+ 10 1.0)
230436

in safe mode.  In unsafe mode the operation would not change at all.   
I suspect this is a much more controversial change than my last  
patch, but if felix and the community think it's OK, I'd be happy to  
edit the manual to reflect the new behavior.


Will



library.patch
Description: Binary data
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users