On 2013-06-05 23:36, Felix wrote:
From: Dan Leslie d...@ironoxide.ca
[...]
Basically, use C_alloc to allocate the memory required to host both
the List structure and the data it is to contain, then use the C_list
macro to patch it all together.
Note that this code is not correct: C_alloc
On Thu, Jun 6, 2013 at 11:34 AM, Thomas Chust ch...@web.de wrote:
On 2013-06-05 23:36, Felix wrote:
From: Dan Leslie d...@ironoxide.ca
[...]
Basically, use C_alloc to allocate the memory required to host both
the List structure and the data it is to contain, then use the C_list
macro
On 2013-06-06 11:46, Kristian Lein-Mathisen wrote:
[...]
From what I understand, this is exactly what foreign-primitive does:
wraps C_return in a CPS, keeping the stack-allocation alive.
[...]
Hello,
well, kind of.
Since compiled CHICKEN code is fully CPS transformed you don't wrap
I did not read your question properly, sorry! Thanks for the clarification,
I didn't know foreign-lambda were the one that had to do the
CPS-conversion. Does that mean there is a small performance overhead when
using foreign-lambda as opposed to just foreign-primitive?
K.
On Thu, Jun 6, 2013 at
From: Thomas Chust ch...@web.de
Subject: Re: [Chicken-users] Chicken C interface
Date: Thu, 06 Jun 2013 11:34:40 +0200
On 2013-06-05 23:36, Felix wrote:
From: Dan Leslie d...@ironoxide.ca
[...]
Basically, use C_alloc to allocate the memory required to host both
the List structure and the
On 2013-06-06 12:13, Kristian Lein-Mathisen wrote:
[...]
I didn't know foreign-lambda were the one that had to do
the CPS-conversion. Does that mean there is a small performance overhead
when using foreign-lambda as opposed to just foreign-primitive?
[...]
Hello,
the overhead is roughly one
On 2013-06-06 12:19, Felix wrote:
From: Thomas Chust ch...@web.de
[...]
when I first saw that code I thought that this must be incorrect, too.
Then I checked the CHICKEN documentation for foreign-safe-lambda and read:
This is similar to foreign-lambda, but also allows the called
From: Thomas Chust ch...@web.de
Subject: Re: [Chicken-users] Chicken C interface
Date: Thu, 06 Jun 2013 12:29:01 +0200
On 2013-06-06 12:19, Felix wrote:
From: Thomas Chust ch...@web.de
[...]
when I first saw that code I thought that this must be incorrect, too.
Then I checked the CHICKEN
On 2013-06-06 12:34, Felix wrote:
From: Thomas Chust ch...@web.de
[...]
So what about allocating locally and not returning an object but passing
it to a Scheme callback from inside a foreign-safe-lambda? Is that ok or
can it happen that the callback stores this object away but never copies
Hello Aaron,
We're just started looking at your chicken-usb egg. The API is much more
intuitive than Python'shttp://pyusb.sourceforge.net/docs/1.0/tutorial.html!
Might it be a good idea to define a record printer for #usb-device
records to include the vendor and product ids, and perhaps
Hi all,
these days I ran (again as every once in a while) a case which made me
longing for a make(1) in Scheme. Gave the make egg a try and… decided I'd
need something else. Something powerful enough to make it easier to
maintain Chickens build and similar complex things.
So far I ended up
On 6/6/2013 2:59 AM, Thomas Chust wrote:
Therefore foreign-primitive can do allocation in the nursery, but
foreign-lambda can't. However, foreign-lambda could still allocate
directly in the second generation heap or transfer nursery-allocated
values directly into the heap upon return before
From: Dan Leslie d...@ironoxide.ca
Subject: Re: [Chicken-users] Chicken C interface
Date: Thu, 06 Jun 2013 09:54:41 -0700
On 6/6/2013 2:59 AM, Thomas Chust wrote:
Therefore foreign-primitive can do allocation in the nursery, but
foreign-lambda can't. However, foreign-lambda could still
13 matches
Mail list logo