Hi,
I am a newbie to chicken.Can i get some aid as to how to start
coding through chicken. I was recently learning racket and also have
know-how of Python-2.6.
Please guide a little.
regards,
Nehal Singhal.
___
Chicken-users mailing list
From: Bryan Vicknair bryanv...@gmail.com
Subject: [Chicken-users] set! atomic?
Date: Tue, 4 Jun 2013 19:15:52 -0700
SRFI-18 states:
Read and write operations on the store (such as reading and writing a
variable, an element of a vector or a string) are not required to be atomic.
It is
Hi, Nehal--
Have you seen the Chicken for Python programmers tutorial?
http://wiki.call-cc.org/chicken-for-python-programmers
That would be a good place to start. Then if you are still unsure how
to proceed, you will probably get more help if you ask more specific
questions.
Best of luck with
Hi,
On Wed, 5 Jun 2013 16:07:56 +0200 nehal singhal nehalsingha...@gmail.com
wrote:
I am a newbie to chicken.Can i get some aid as to how to start
coding through chicken. I was recently learning racket and also have
know-how of Python-2.6.
Please guide a little.
Welcome.
There's the
Hello everybody,
I was planning to use Chicken Scheme in a fashion more similar to Guile and
Lua. i.e. passing Scheme Data Objects from Chicken to C and back using the
C interface.
I am a little confused though as how to have a C function return a Scheme
List that is seen by the garbage
Feel free to ask questions in the IRC channel, #chicken on irc.freenode.net
-Dan
On 6/5/2013 7:07 AM, nehal singhal wrote:
Hi,
I am a newbie to chicken.Can i get some aid as to how to start
coding through chicken. I was recently learning racket and also have
know-how of Python-2.6.
I do this a fair bit in the Allegro egg.
Here's an example:
https://github.com/dleslie/allegro-egg/blob/985ca2ceef0f5b4028af3f97729f13cba2976fe5/color.scm
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
Hey Dan,
What's the preferred method to ask? I didn't know about the IRC channel and
now I am dubious what would be better if asking over there or using the
email list...
Cheers,
Pedro.
On Wed, Jun 5, 2013 at 11:44 AM, Dan Leslie d...@ironoxide.ca wrote:
Feel free to ask questions in the
On Wed, Jun 05, 2013 at 08:47:45AM -0700, Dan Leslie wrote:
I do this a fair bit in the Allegro egg.
Here's an example:
https://github.com/dleslie/allegro-egg/blob/985ca2ceef0f5b4028af3f97729f13cba2976fe5/color.scm
Basically, use C_alloc to allocate the memory required to host both the
On 2013-06-05 19:50, Peter Bex wrote:
[...]
There is no C_listp predicate because you can't directly check an
object for being a list; you must check whether it's
C_SCHEME_END_OF_LIST (then it is a list). Otherwise, if it's a pair
you take its cdr and loop. If it's something else, it's not
On Wed, Jun 05, 2013 at 07:57:49PM +0200, Thomas Chust wrote:
Hello,
but it's trivial to detect cyclic lists during the traversal using
either a set of seen elements or just two iteration pointers travelling
at different speeds.
In C that's rather painful. Note that the OP was asking
On 2013-06-05 20:11, Peter Bex wrote:
On Wed, Jun 05, 2013 at 07:57:49PM +0200, Thomas Chust wrote:
but it's trivial to detect cyclic lists during the traversal using
either a set of seen elements or just two iteration pointers travelling
at different speeds.
In C that's rather painful.
this should work for basic list test
(import foreign)
#
C_word C_listp(C_word p)
{
if (p == C_SCHEME_END_OF_LIST)
{
return C_SCHEME_TRUE;
}
// check for non-immidiate object and pair?
if (!C_immediatep(p) C_pairp(p) ==
C_SCHEME_TRUE)
{
return
C_listp(C_u_i_cdr(p));
}
return
On Wed, Jun 05, 2013 at 08:19:15PM +0200, Thomas Chust wrote:
On 2013-06-05 20:11, Peter Bex wrote:
On Wed, Jun 05, 2013 at 07:57:49PM +0200, Thomas Chust wrote:
but it's trivial to detect cyclic lists during the traversal using
either a set of seen elements or just two iteration pointers
From: Dan Leslie d...@ironoxide.ca
Subject: Re: [Chicken-users] Chicken C interface
Date: Wed, 05 Jun 2013 08:47:45 -0700
I do this a fair bit in the Allegro egg.
Here's an example:
https://github.com/dleslie/allegro-egg/blob/985ca2ceef0f5b4028af3f97729f13cba2976fe5/color.scm
Basically,
From: pluijzer . pluij...@gmail.com
Subject: [Chicken-users] Chicken C interface
Date: Wed, 5 Jun 2013 17:10:41 +0200
Hello everybody,
I was planning to use Chicken Scheme in a fashion more similar to Guile and
Lua. i.e. passing Scheme Data Objects from Chicken to C and back using the
C
Oh dear!
Well, it works and I haven't had problems. What's the correct way to go
about this?
-Dan
On 6/5/2013 2:36 PM, Felix wrote:
From: Dan Leslie d...@ironoxide.ca
Subject: Re: [Chicken-users] Chicken C interface
Date: Wed, 05 Jun 2013 08:47:45 -0700
I do this a fair bit in the Allegro
Thanks, I'll get on updating my broken eggs soon.
obvious humpty dumpty joke notwithstanding
-Dan
On 6/5/2013 2:39 PM, Felix wrote:
From: pluijzer . pluij...@gmail.com
Subject: [Chicken-users] Chicken C interface
Date: Wed, 5 Jun 2013 17:10:41 +0200
Hello everybody,
I was planning to use
I just though I'd mention srfi-4 http://api.call-cc.org/doc/srfi-4 as
well, which are much easier to interface with from C. If all your elements
are integers, for example, you might want to check out u32vector. Srfi-4
vectors use plain C float/int arrays and are possible as argument-types
from
The correct way is to not let C manage memory at all ;-P
In the mpi egg, I used foreign-primitive and C_alloc as follows:
;; Returns the current MPI time as a floating-point number
(define MPI:wtime
(foreign-primitive scheme-object ()
#EOF
C_word result;
C_word *ptr;
ptr = C_alloc
20 matches
Mail list logo