Re: [Chicken-users] Using fmt and numbers eggs together
John Cowan wrote: > Since the fmt egg is compiled without the numbers egg, it only recognizes > native Chicken numbers, i.e. fixnums and flonums. The way to fix that > is to fetch the fmt egg, introduce "(use numbers)" into the appropriate > places, and rebuild the egg locally. Thanks to the above suggestion, as well as the earlier message from Peter Bex, I seem to have gotten the fmt and numbers eggs to work properly together. At least, the earlier errors are gone. In the process, I have probably inserted '(use numbers)' in a few unnecessary places in my copy of the fmt source files. At first I thought I should be able to manage by editing only the compiler flags in fmt.setup (-prelude, etc.), but that didn't work. Regards, and thanks for the help, -chaw ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Using fmt and numbers eggs together
Sudarshan S Chawathe scripsit: > When not using the numbers egg, fmt's behavior seems to be as expected > (given Chicken's implementation of numbers without the 'numbers' egg). Since the fmt egg is compiled without the numbers egg, it only recognizes native Chicken numbers, i.e. fixnums and flonums. The way to fix that is to fetch the fmt egg, introduce "(use numbers)" into the appropriate places, and rebuild the egg locally. > Is this a known limitation of fmt with 'numbers'? It's a limitation of the numbers egg: programs (other than csi itself) have to be compiled with it to work with it. Chicken 5 will make this go away, fortunately. -- John Cowan http://www.ccil.org/~cowanco...@ccil.org Let's face it: software is crap. Feature-laden and bloated, written under tremendous time-pressure, often by incapable coders, using dangerous languages and inadequate tools, trying to connect to heaps of broken or obsolete protocols, implemented equally insufficiently, running on unpredictable hardware -- we are all more than used to brokenness. --Felix Winkelmann ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Happy New Haircut!
Hi Chickens! Happy New Year! I hope you're all having a wonderful 2016 already. I hope this slightly off-topic message finds you well and that you don't mind me bothering you with it; after all, my hair has been a talking point at many Chicken meetup and conference! :-) As some of you know, I have lovely long hair and have been growing it for many years. It's finally time to cut it off for charity so I'm going to be donating the hair itself to The Little Princess Trust who will make it into a wig for a child who loses their own hair whilst fighting cancer. I'm also raising money for Cancer Research UK as many of my friends and family have suffered with various different types of cancer over the years. I hope you'll take a minute to have a look at my fund-raising page and maybe make a donation: http://jpb.li/haircut Thanks for all your help and support. Happy New Year and see you (without my hair) soon! Regards, @ndy -- andy...@ashurst.eu.org http://www.ashurst.eu.org/ 0290 DA75 E982 7D99 A51F E46A 387A 7695 7EBA 75FF ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Using fmt and numbers eggs together
On Sat, Jan 02, 2016 at 11:40:47AM -0500, Sudarshan S Chawathe wrote: > I seem to get incorrect output and errors in some cases when using the > fmt and numbers eggs together. A brief transcript illustrating the > problem is included below. In brief: > > * (fix 30 2/3) doesn't behave as indicated in the docs. > > * Some large numbers cause errors. > > When not using the numbers egg, fmt's behavior seems to be as expected > (given Chicken's implementation of numbers without the 'numbers' egg). > > Is this a known limitation of fmt with 'numbers'? I'm afraid so. As far as I know the only way to fix this is to add a hard dependency on numbers to fmt. This may not be desirable depending on what you're using fmt for. This is a result of the second class treatment that extended numbers get, and will be fixed in CHICKEN 5, due to integration of the full numeric tower into core. Cheers, Peter signature.asc Description: Digital signature ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Using fmt and numbers eggs together
I seem to get incorrect output and errors in some cases when using the fmt and numbers eggs together. A brief transcript illustrating the problem is included below. In brief: * (fix 30 2/3) doesn't behave as indicated in the docs. * Some large numbers cause errors. When not using the numbers egg, fmt's behavior seems to be as expected (given Chicken's implementation of numbers without the 'numbers' egg). Is this a known limitation of fmt with 'numbers'? Regards, -chaw $ csi -n CHICKEN (c) 2008-2014, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.9.0.1 (stability/4.9.0) (rev 8b3189b) linux-unix-gnu-x86 [ manyargs dload ptables ] bootstrapped 2014-06-07 #;1> (use fmt) ; loading /home/chaw/local/lib/chicken/7/fmt.import.so ... ; loading /home/chaw/local/lib/chicken/7/chicken.import.so ... ; loading /home/chaw/local/lib/chicken/7/ports.import.so ... ; loading /home/chaw/local/lib/chicken/7/srfi-1.import.so ... ; loading /home/chaw/local/lib/chicken/7/srfi-69.import.so ... ; loading /home/chaw/local/lib/chicken/7/foreign.import.so ... ; loading /home/chaw/local/lib/chicken/7/srfi-13.import.so ... ; loading /home/chaw/local/lib/chicken/7/extras.import.so ... ; loading /home/chaw/local/lib/chicken/7/data-structures.import.so ... ; loading /home/chaw/local/lib/chicken/7/fmt.so ... #;2> (fmt #f (fix 30 2/3)) "0.00" #;3> (fmt #f (num (- (expt 10 10 "-100.0" #;4> (use numbers) ; loading /home/chaw/local/lib/chicken/7/numbers.import.so ... ; loading /home/chaw/local/lib/chicken/7/numbers.so ... #;5> (fmt #f (fix 30 2/3)) "2/3" #;6> (fmt #f (num (- (expt 10 10 Error: (imag-part) bad argument type - not a number: -100 Call history: numbers.scm:1288: arithmetic-shift numbers.scm:1413: g1762 numbers.scm:1288: lp numbers.scm:1288: arithmetic-shift numbers.scm:1413: g1762 numbers.scm:1288: lp numbers.scm:1290: %* numbers.scm:1290: %- numbers.scm:1290: lp numbers.scm:1248: %* numbers.scm:1288: %* numbers.scm:1248: %* numbers.scm:1288: %* numbers.scm:1248: %* numbers.scm:1288: %* numbers.scm:327: g283 <-- #;6> ,q $ ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users