Re: [Chicken-hackers] incorrect warning during compilation

2014-07-11 Thread Kristian Lein-Mathisen
We can't use the test egg in core. However, there are so many hand- rolled assertion/test-like macros that I've often wondered if it would benefit us to make a simple test library part of core. Core itself could benefit from an improved test suite library, and eggs wouldn't need an

Re: [Chicken-hackers] incorrect warning during compilation

2014-07-11 Thread Peter Bex
On Fri, Jul 11, 2014 at 10:32:23AM +0200, Kristian Lein-Mathisen wrote: I've tried to modify the way test works, too, I've concluded it's very messy. It's not very modular, so you have to copy-paste parts of the original and do your modifications there. It gave me the idea to write a new test

Re: [Chicken-hackers] incorrect warning during compilation

2014-07-11 Thread Michele La Monaca
On Fri, Jul 11, 2014 at 10:37 AM, Peter Bex peter@xs4all.nl wrote: On Fri, Jul 11, 2014 at 10:32:23AM +0200, Kristian Lein-Mathisen wrote: I've tried to modify the way test works, too, I've concluded it's very messy. It's not very modular, so you have to copy-paste parts of the original

Re: [Chicken-hackers] incorrect warning during compilation

2014-07-09 Thread Kristian Lein-Mathisen
, Felix Winkelmann wrote: From: Kristian Lein-Mathisen krist...@adellica.com Subject: Re: [Chicken-hackers] incorrect warning during compilation Date: Fri, 27 Jun 2014 17:13:21 +0200 Actually, that's really cool! A string-buffer type! I wouldn't mind seeing this in core. So how does

Re: [Chicken-hackers] incorrect warning during compilation

2014-07-09 Thread Peter Bex
On Fri, Jun 27, 2014 at 10:56:15PM +0200, Felix Winkelmann wrote: From: Kristian Lein-Mathisen krist...@adellica.com Subject: Re: [Chicken-hackers] incorrect warning during compilation Date: Fri, 27 Jun 2014 17:13:21 +0200 Actually, that's really cool! A string-buffer type! I wouldn't mind

Re: [Chicken-hackers] incorrect warning during compilation

2014-07-01 Thread Kristian Lein-Mathisen
...@bevuta.com wrote: From: Kristian Lein-Mathisen krist...@adellica.com Subject: Re: [Chicken-hackers] incorrect warning during compilation Date: Fri, 27 Jun 2014 17:13:21 +0200 Actually, that's really cool! A string-buffer type! I wouldn't mind seeing this in core. So how does this work, Felix, do we

Re: [Chicken-hackers] incorrect warning during compilation

2014-07-01 Thread Peter Bex
On Tue, Jul 01, 2014 at 12:07:35PM +0200, Kristian Lein-Mathisen wrote: I am watching these patches with great interest. They are surprisingly small, nice and comprehensible :) I'm happy and would love to see this committed somewhere :) I also like the patch. I haven't had time to look into

Re: [Chicken-hackers] incorrect warning during compilation

2014-06-27 Thread Kristian Lein-Mathisen
Thanks for you feedback Felix, I talked to Peter on #chicken and he wasn't happy about another foreign-type. I suppose I agree with him, there are quite a few already and maybe it'll just be confusing: having a c-string and a string foreign type would probably do more harm than gain. I decided

Re: [Chicken-hackers] incorrect warning during compilation

2014-06-27 Thread Felix Winkelmann
I talked to Peter on #chicken and he wasn't happy about another foreign-type. I suppose I agree with him, there are quite a few already and maybe it'll just be confusing: having a c-string and a string foreign type would probably do more harm than gain. Well, no problem. Attached a patch for

Re: [Chicken-hackers] incorrect warning during compilation

2014-06-27 Thread Kristian Lein-Mathisen
Actually, that's really cool! A string-buffer type! I wouldn't mind seeing this in core. So how does this work, Felix, do we vote and things? K. On Fri, Jun 27, 2014 at 4:43 PM, Felix Winkelmann felix.winkelm...@bevuta.com wrote: I talked to Peter on #chicken and he wasn't happy about

Re: [Chicken-hackers] incorrect warning during compilation

2014-06-27 Thread Moritz Heidkamp
Hi, Felix Winkelmann felix.winkelm...@bevuta.com writes: So, I can't think of a solution that answers all of your questions. I would go with the scheme-pointer. We could add another foreign type, that accepts strings but doesn't copy. I'll look into that. how about extending the

Re: [Chicken-hackers] incorrect warning during compilation

2014-06-27 Thread John Cowan
Kristian Lein-Mathisen scripsit: And I guess string-blob/shared isn't all that useful if no other Schemes support it and we have plenty of other workarounds. I never really got blobs anyway, when do you *not* just want to use a string instead? They print so much nicer than blobs, even with

Re: [Chicken-hackers] incorrect warning during compilation

2014-06-27 Thread Jörg F. Wittenberger
This one I'd like. Currently using the scheme-pointer plus type cast in C approach. Quite often actually. Am 27.06.2014 17:13, schrieb Kristian Lein-Mathisen: Actually, that's really cool! A string-buffer type! I wouldn't mind seeing this in core. So how does this work, Felix, do we vote

Re: [Chicken-hackers] incorrect warning during compilation

2014-06-27 Thread Felix Winkelmann
From: Kristian Lein-Mathisen krist...@adellica.com Subject: Re: [Chicken-hackers] incorrect warning during compilation Date: Fri, 27 Jun 2014 17:13:21 +0200 Actually, that's really cool! A string-buffer type! I wouldn't mind seeing this in core. So how does this work, Felix, do we vote

Re: [Chicken-hackers] incorrect warning during compilation

2014-06-25 Thread Felix Winkelmann
I think I may have found a tiny bug in core. So instead of going on IRC and crying to Peter, I though I'd try it myself this time. I have a file like this: (print ((foreign-lambda* c-string ((blob x)) x[0] = 65; return(x);) xBC)) When I run this, everything works: $ ./type-test ABC

Re: [Chicken-hackers] incorrect warning during compilation

2014-06-25 Thread Kristian Lein-Mathisen
Oh, I see. I though it was meant to be used interchangeably. I can't use string-blob, though, because that will copy the data and I need to modify it from C. What foreign type should I use for this sort of thing? - (c-pointer char) with (location string) works, but is a lot of typing -

[Chicken-hackers] incorrect warning during compilation

2014-06-24 Thread Kristian Lein-Mathisen
Hi folks, I think I may have found a tiny bug in core. So instead of going on IRC and crying to Peter, I though I'd try it myself this time. I have a file like this: (print ((foreign-lambda* c-string ((blob x)) x[0] = 65; return(x);) xBC)) When I run this, everything works: $ ./type-test ABC