From: Kenny Tilton
Subject: Any way to make a pointer for CLisp FLI ?
Date: 
Message-ID: <CFEXe.13397$x43.2755054@twister.nyc.rr.com>
Lispworks has, for an arbitrary integer n:

  (fli:make-pointer :address n :pointer-type  '(:pointer :void))

ACL has similar. And it seems CLisp likewise wants pointers passed thru 
its FLI to be somehow wrapped, because when I try to pass zero as a 
pointer it complains loudly. This is what Lispworks did until I wrapped 
it via make-pointer.

But I could not find anything in the FLI doc that seems to do the same.

btw, I am doing this because the Glut library does something weird in 
font functions on win32: it expects enums to be passed in a pointer 
argument (on X11 a true pointer is passed).

-- 
Kenny

Why Lisp? http://wiki.alu.org/RtL_Highlight_Film

"I've wrestled with reality for 35 years, Doctor, and I'm happy to state 
I finally won out over it."
     Elwood P. Dowd, "Harvey", 1950

From: Sam Steingold
Subject: Re: Any way to make a pointer for CLisp FLI ?
Date: 
Message-ID: <uu0ggyfy3.fsf@gnu.org>
> * Kenny Tilton <·······@alp.ee.pbz> [2005-09-19 19:52:02 +0000]:
>
> Lispworks has, for an arbitrary integer n:
>
>   (fli:make-pointer :address n :pointer-type  '(:pointer :void))
>
> ACL has similar. And it seems CLisp likewise wants pointers passed thru
> its FLI to be somehow wrapped, because when I try to pass zero as a
> pointer it complains loudly. This is what Lispworks did until I wrapped
> it via make-pointer.
>
> But I could not find anything in the FLI doc that seems to do the same.

<http://clisp.cons.org/impnotes/dffi.html#faddr-u>

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.honestreporting.com> <http://www.mideasttruth.com/>
<http://pmw.org.il/> <http://www.dhimmi.com/> <http://www.iris.org.il>
If you think big enough, you'll never have to do it.
From: Kenny Tilton
Subject: Frickin' awesome [was Re: Any way to make a pointer for CLisp FLI ?]
Date: 
Message-ID: <432F2924.20304@nyc.rr.com>
[Thx for the speedy response, Sam. ffi:unsigned-foreign-address did the 
trick.]

Look out, kiddies, Cello may soon be up on #+(and :clisp :windows), thx 
to the new FFI and CFFI. We'll need to teach CFFI about this issue, but...

The cl-opengl demo (just some rotating text (Glut font) and the classic 
teapot) not runs on AllegroCL, Lispworks, and CLisp on win32. I 
anticipate easy (re)ports to OpenMCL and various Lisps on Linux.

Aside: last I heard (quite a while ago) the killer CLisp FFI was not 
available on OS X.

What's my point: CFFI looks good. :) Thanks to all the c.l.l denizens 
who pitched in to test it on *nix. Since it takes about five minutes to 
execute the test instructions I provided, it is a testament to this 
community that all zero of you found the time.
PWUAUAHHAHAHAHAHHAAHAAA.

Looking forward to your requests for support for my Open Source code. 
PWUAUAAAHHAHAHAHAAHHA.

:)

-- 
Kenny

Why Lisp? http://wiki.alu.org/RtL_Highlight_Film

"I've wrestled with reality for 35 years, Doctor, and I'm happy to state I finally won out over it."
    Elwood P. Dowd, "Harvey", 1950
From: Tyler Eaves
Subject: Re: Frickin' awesome [was Re: Any way to make a pointer for CLisp FLI ?]
Date: 
Message-ID: <op.sxdezjhv05glvk@localhost>
On Mon, 19 Sep 2005 15:59:37 -0500, Kenny Tilton <·······@nyc.rr.com>  
wrote:

> What's my point: CFFI looks good. :) Thanks to all the c.l.l denizens  
> who pitched in to test it on *nix. Since it takes about five minutes to  
> execute the test instructions I provided, it is a testament to this  
> community that all zero of you found the time.

Hey, Kenny, shoot me a mail with instructions (I'm a newb, but I can  
follow directions ;), and I'll be happy to test it for you on the lisps  
available to me (SBCL 0.9.4 on x86 linux, and OpenMCL 0.14.3 on my mac.
-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
From: Sam Steingold
Subject: Re: Frickin' awesome [was Re: Any way to make a pointer for CLisp FLI ?]
Date: 
Message-ID: <uoe6oycb0.fsf@gnu.org>
> * Kenny Tilton <·······@alp.ee.pbz> [2005-09-19 20:59:37 +0000]:
>
> Look out, kiddies, Cello may soon be up on #+(and :clisp :windows),

CLISP has :win32, not :windows.
also, CLISP has the same FFI on all platforms, so if it works on
windows, it should work everywhere else too.

> Aside: last I heard (quite a while ago) the killer CLisp FFI was not
> available on OS X.

works as on other platforms.

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.honestreporting.com> <http://www.openvotingconsortium.org/>
<http://pmw.org.il/> <http://truepeace.org> <http://www.iris.org.il>
Live Lisp and prosper.
From: Kenny Tilton
Subject: Re: Frickin' awesome [was Re: Any way to make a pointer for CLisp FLI ?]
Date: 
Message-ID: <zCHXe.13401$x43.2768291@twister.nyc.rr.com>
Sam Steingold wrote:

>>Aside: last I heard (quite a while ago) the killer CLisp FFI was not
>>available on OS X.
> 
> 
> works as on other platforms.
> 

Brilliant. I'll try my opengl demo on OS X next.

-- 
Kenny

Why Lisp? http://wiki.alu.org/RtL_Highlight_Film

"I've wrestled with reality for 35 years, Doctor, and I'm happy to state 
I finally won out over it."
     Elwood P. Dowd, "Harvey", 1950
From: Kenny Tilton
Subject: Re: Frickin' awesome [was Re: Any way to make a pointer for CLisp FLI ?]
Date: 
Message-ID: <EMFXe.13399$x43.2758815@twister.nyc.rr.com>
Kenny Tilton wrote:
> [Thx for the speedy response, Sam. ffi:unsigned-foreign-address did the 
> trick.]
> 
> Look out, kiddies, Cello may soon be up on #+(and :clisp :windows), thx 
> to the new FFI and CFFI. We'll need to teach CFFI about this issue, but...
> 
> The cl-opengl demo (just some rotating text (Glut font) and the classic 
> teapot) not runs on AllegroCL, Lispworks, and CLisp on win32. I 

minor correction <g>: s/b "now runs on ...."


-- 
Kenny

Why Lisp? http://wiki.alu.org/RtL_Highlight_Film

"I've wrestled with reality for 35 years, Doctor, and I'm happy to state 
I finally won out over it."
     Elwood P. Dowd, "Harvey", 1950
From: Pascal Costanza
Subject: Re: Frickin' awesome [was Re: Any way to make a pointer for CLisp FLI   ?]
Date: 
Message-ID: <3p8v0nF8i18jU1@individual.net>
Kenny Tilton wrote:
> Since it takes about five minutes to 
> execute the test instructions I provided, it is a testament to this 
> community that all zero of you found the time.

I tried to, but the stuff didn't even compile, so I couldn't run the 
test suites. I have tried several of the implementations that were 
listed on the page you have linked to.

If you were interested in the compilation errors, I can try to compile 
it again and send you the output.


Pascal

-- 
OOPSLA'05 tutorial on generic functions & the CLOS Metaobject Protocol
++++ see http://p-cos.net/oopsla05-tutorial.html for more details ++++
From: Luis Oliveira
Subject: Re: Frickin' awesome [was Re: Any way to make a pointer for CLisp FLI   ?]
Date: 
Message-ID: <m2vf0wtqox.fsf@pomajxego.local>
Pascal Costanza <··@p-cos.net> writes:
> I tried to, but the stuff didn't even compile, so I couldn't run the
> test suites. I have tried several of the implementations that were
> listed on the page you have linked to.

That's very odd.


> If you were interested in the compilation errors, I can try to compile
> it again and send you the output.

Please do send them to cffi-devel (or if you don't want to subscribe to
that, send them to my e-mail below).

-- 
Luis Oliveira
luismbo (@) gmail (.) com
Equipa Portuguesa do Translation Project
http://www.iro.umontreal.ca/translation/registry.cgi?team=pt
From: Pascal Costanza
Subject: Re: Frickin' awesome [was Re: Any way to make a pointer for CLisp FLI   ?]
Date: 
Message-ID: <3pb52pF9hnetU1@individual.net>
Luis Oliveira wrote:
> Pascal Costanza <··@p-cos.net> writes:
> 
>>I tried to, but the stuff didn't even compile, so I couldn't run the
>>test suites. I have tried several of the implementations that were
>>listed on the page you have linked to.
> 
> That's very odd.
> 

OK, my mistake. I have a method defined on one of the ASDF functions so 
that the output for different CL implementations gets separated. 
Apparently, this confuses CFFI.

If I remove that method, CFFI compiles. I am going to send you the results.

Pascal

-- 
OOPSLA'05 tutorial on generic functions & the CLOS Metaobject Protocol
++++ see http://p-cos.net/oopsla05-tutorial.html for more details ++++