Re: [Chicken-users] pointer-pointer-ref

2009-03-13 Thread Jim Ursetto
On Thu, Mar 12, 2009 at 8:25 PM, Eduardo Cavazos wayo.cava...@gmail.com wrote: extern Status XQueryTree(    Window**        /* children_return */, ); (c-function Status XQueryTree (... (c-pointer (c-pointer unsigned-long)) ...) I can allocate enough storage for a pointer via:    (define

Re: [Chicken-users] Re: FFI with XQueryTree

2009-03-13 Thread Jim Ursetto
You can use locations for your other vars as well -- in this case it should work even for 64-bit values. (let-location ((root unsigned-long) (parent unsigned-long) (children (c-pointer unsigned-long)) (nchildren unsigned-long)) (XQueryTree dpy win (location root)

Re: [Chicken-users] Re: FFI with XQueryTree

2009-03-13 Thread Jim Ursetto
On Fri, Mar 13, 2009 at 3:16 AM, Jim Ursetto zbignie...@gmail.com wrote: You can use locations for your other vars as well -- in this case it should work even for 64-bit values. Urgh. I read the header files. Window is typed as unsigned long on 32-bit systems and unsigned int on 64-bit systems

[Chicken-users] define-macro in Chicken 4.0

2009-03-13 Thread Eduardo Cavazos
Hello, Is there a way to define 'define-macro' in terms of the new explicit renaming macros of Chicken 4.0? Or is it offered somewhere and I just missed it? I know I know... 'define-macro' is bad. :-) But I have a bunch of code that I'd like to have just work in Chicken 4.0 and worry about

Re: [Chicken-users] define-macro in Chicken 4.0

2009-03-13 Thread John Cowan
Eduardo Cavazos scripsit: Is there a way to define 'define-macro' in terms of the new explicit renaming macros of Chicken 4.0? Or is it offered somewhere and I just missed it? Quick and dirty approach: For (define-macro name (lambda exp body ...)) read (define-syntax name (lambda (exp

Re: [Chicken-users] define-macro in Chicken 4.0

2009-03-13 Thread John Cowan
cowan scripsit: For (define-macro name (lambda exp body ...)) read (define-syntax name (lambda (exp junk-1 junk-2) body ...)) Ooopsie. Make that (define-syntax (er-macro-transformer (lambda ...))) -- John Cowanco...@ccil.org http://www.ccil.org/~cowan But no living man am I! You

[Chicken-users] cons-wm

2009-03-13 Thread Eduardo Cavazos
Hello, cons-wm is a window manager for the X Window System. Features: * Written in Scheme * Runs in Ypsilon, Larceny, and Chicken * Minimalist * Internals based on dwm 5.4.1 cons-wm aims to be a simple window manager which can serve as a starting point and example for aspiring window manager

Re: [Chicken-users] define-macro in Chicken 4.0

2009-03-13 Thread Tobia Conforto
Eduardo Cavazos wrote: Hello, Is there a way to define 'define-macro' in terms of the new explicit renaming macros of Chicken 4.0? Sure! (import-for-syntax matchable) (define-syntax define-macro (lambda (m . _) `(define-syntax ,(caadr m) (lambda (e . _) (match e