[Chicken-users] catch read & load errors?

2005-08-03 Thread Michael Benfield
Hi - I'm pretty new to Scheme in general and Chicken in particular. Both are awesome. I'm wondering, though, is it possible to catch the errors generated by functions like read or load when they encounter bad syntax? I'd like to be able to use read to parse things or load to load files from

Re: [Chicken-users] Meroon superclasses

2005-08-03 Thread felix winkelmann
On 8/2/05, Ash <[EMAIL PROTECTED]> wrote: > > If I have a superclass defined in one file, what's the preferred way to > make its definition available in another file at compile-time? I can > (include ...) the file, but I'm not sure that makes sense. What if I > need the superclass definition in

Re: [Chicken-users] Some notes on simple-macros extension

2005-08-03 Thread felix winkelmann
Thanks, I will apply the fixes ASAP. cheers, felix On 8/3/05, Dale Jordan <[EMAIL PROTECTED]> wrote: > I have found a couple of problems with the simple-macros extension: > > - The definitions of "include" and "define-macro" in > chicken-macros-module.scm need to have their argument changed fr

Re: [Chicken-users] FFI string with embedded nulls

2005-08-03 Thread Zbigniew
Toby, Here are two examples. In one I create the string on the heap and return it as a scheme-object from the C code. In the other I write directly into a scheme string, using a locative as the pointer. Neither probably works with UTF-8. You didn't specify how the to-len was computed, so I ass

Re: [Chicken-users] FFI string with embedded nulls

2005-08-03 Thread Zbigniew
Thought I got rid of all those invisible embedded control chars. Let's try again. Toby, Here are two examples. In one I create the string on the heap and return it as a scheme-object from the C code. In the other I write directly into a scheme string, using a locative as the pointer. Neither

[Chicken-users] External representation of strings with non-printable characters

2005-08-03 Thread Thomas Chust
Hello, I just came across this slightly strange behaviour of CHICKEN on a terminal: $ csi __ __ ____ | | |--.|__|..| |--.-.-. | ---| || || __||<| -__| | |__|__|__||__||||__|__|_|__|__| Version 2, Build 101 - macosx-unix-gnu-ppc - [

Re: [Chicken-users] FFI string with embedded nulls

2005-08-03 Thread Thomas Chust
Toby Butzon wrote: [...] I'm stumped. How do I get the string to turn into a Scheme string without truncating it at the first embedded null? [...] Hello, as far as I know, there is no way to tell the FFI to do this properly, so you will have to do it by hand. Try something like this: (defin

Re: [Chicken-users] Re: Better algorithm for growing hash tables

2005-08-03 Thread Alejandro Forero Cuervo
> Is there a paper or book that offers a convincing, empirical argument > for this? I've read and heard this exhortation before but the > justification in the presence well designed hash and rehash functions > has always been "just to be safe." Well, I don't know of any papers or books, but

[Chicken-users] Re: the (##sys#call-host) FFI trick

2005-08-03 Thread felix winkelmann
Thanks, I've applied your change. It really makes much more sense to use "C_externexport". cheers, felix On 8/1/05, Ashley Bone <[EMAIL PROTECTED]> wrote: > I've now managed to port about half our bigloo libraries > to chicken using define-external combined with ##sys#call-host > to provide the