From: justinhj
Subject: clisp ffi
Date: 
Message-ID: <1133030402.270140.182370@g14g2000cwa.googlegroups.com>
I need some help getting started with clisp ffi.

I should be posting this on the clisp-list but the following message
was not allowed to be posted on the list for the odd reason below:

"Your message had a suspicious header. no mime, no html, not
attachments, english only"

Which doesn't quite make sense.

My original question:

I'm trying to get FFI working and followed this tutorial

http://www.niksula.cs.hut.fi/~tsiivola/clisp-ffi-howto.html

However I got stuck... I don't have clisp-link (I am using the cygwin
distribution of clisp)

So is there a way to get that program directly or do I need to grab
from cvs and build. I hope not because that doesn't seem to want to
build on my cygwin setup.

Specifically :

····@laptop ~/clisp
$ ./configure build-with-gcc
./configure: line 484: test: too many arguments
./configure: line 491: test: too many arguments
chmod: cannot access `user/clisp/build-with-gcc/configure': No such
file or directory

From: Surendra Singhi
Subject: Re: clisp ffi
Date: 
Message-ID: <7javro45.fsf@netscape.net>
"justinhj" <········@gmail.com> writes:

> I need some help getting started with clisp ffi.
>

The implementation notes of clisp has many examples on clisp ffi, it may be
pain to get started with them, but once you are able to run your first hello
from c example, things won't be that hard.

HTH.
-- 
Surendra Singhi
http://www.public.asu.edu/~sksinghi/index.html

,----
| WHY SHOULD WE SAVE TIGER?  	
| Ans: Saving the tiger means saving mankind..	
| 
| Help http://pudang.tripod.com/
| or https://secure.worldwildlife.org/forms/tiger_appeal_1.cfm
`----
From: Sam Steingold
Subject: Re: clisp ffi
Date: 
Message-ID: <uoe47vxp7.fsf@gnu.org>
> * justinhj <········@tznvy.pbz> [2005-11-26 10:40:02 -0800]:
>
> I should be posting this on the clisp-list but the following message
> was not allowed to be posted on the list for the odd reason below:
>
> "Your message had a suspicious header.
> no mime, no html, no attachments, english only"
>
> Which doesn't quite make sense.

you also received a URL in the same rejection message message:
http://clisp.cons.org/impnotes/faq.html#faq-rejected
which points to this:

===========================================================
Why is my mail to a mailing list rejected?

CLISP mailing lists get a lot of spam, so the maintainers have to take
care to protect the users. If you get a note that “your message is held
for moderator's approval”, you can safely assume that it went to
/dev/null and try again, noting the following:

<clisp-announce/at/lists.sourceforge.net>
    do not mail here without a prior discussion on
    <clisp-devel/at/lists.sourceforge.net>
<clisp-devel/at/lists.sourceforge.net>
    subscriber-only, you must post from a subscribed address, no
    exceptions (see above)
<clisp-list/at/lists.sourceforge.net>

    the only open list, so it is filtered it especially aggressively:

        * no MIME mail (no HTML formatting, no attachments)
        * the list address must be in CC or TO, not BCC.
        * do not mention “virgin”, “penis” or “viagra” in the Subject line.

If you do not like this policy, please volunteer to maintain the mailing
lists - you will be required to go through all the “held for moderator's
approval” mail and approve/discard as appropriate at least twice a day.
===========================================================

your message was an HTML message in MIME format.

what is unclear?


-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
http://www.palestinefacts.org/ http://www.dhimmi.com/ http://pmw.org.il/
http://www.iris.org.il http://www.memri.org/ http://www.savegushkatif.org
non-smoking section in a restaurant == non-peeing section in a swimming pool
From: justinhj
Subject: Re: clisp ffi
Date: 
Message-ID: <1133047876.972973.175180@f14g2000cwb.googlegroups.com>
Sam Steingold wrote:
> > * justinhj <········@tznvy.pbz> [2005-11-26 10:40:02 -0800]:
> >
> > I should be posting this on the clisp-list but the following message
> > was not allowed to be posted on the list for the odd reason below:
> >
> > "Your message had a suspicious header.
> > no mime, no html, no attachments, english only"
> >
> > Which doesn't quite make sense.
>
> you also received a URL in the same rejection message message:
> http://clisp.cons.org/impnotes/faq.html#faq-rejected
> which points to this:
>
> ===========================================================
> Why is my mail to a mailing list rejected?
>
> CLISP mailing lists get a lot of spam, so the maintainers have to take
> care to protect the users. If you get a note that "your message is held
> for moderator's approval", you can safely assume that it went to
> /dev/null and try again, noting the following:
>
> <clisp-announce/at/lists.sourceforge.net>
>     do not mail here without a prior discussion on
>     <clisp-devel/at/lists.sourceforge.net>
> <clisp-devel/at/lists.sourceforge.net>
>     subscriber-only, you must post from a subscribed address, no
>     exceptions (see above)
> <clisp-list/at/lists.sourceforge.net>
>
>     the only open list, so it is filtered it especially aggressively:
>
>         * no MIME mail (no HTML formatting, no attachments)
>         * the list address must be in CC or TO, not BCC.
>         * do not mention "virgin", "penis" or "viagra" in the Subject line.
>
> If you do not like this policy, please volunteer to maintain the mailing
> lists - you will be required to go through all the "held for moderator's
> approval" mail and approve/discard as appropriate at least twice a day.
> ===========================================================
>
> your message was an HTML message in MIME format.
>
> what is unclear?



Ah Thanks.

Thing is, I'm posting from gmail and I've no idea what it's doing with
the headers.
From: Sam Steingold
Subject: Re: clisp ffi
Date: 
Message-ID: <uacfqx6rn.fsf@gnu.org>
> * justinhj <········@tznvy.pbz> [2005-11-26 15:31:17 -0800]:
>
> Sam Steingold wrote:
>> > * justinhj <········@tznvy.pbz> [2005-11-26 10:40:02 -0800]:
>> >
>> > "Your message had a suspicious header.
>> > no mime, no html, no attachments, english only"
>> >
>> > Which doesn't quite make sense.
>>
>> you also received a URL in the same rejection message message:
>> http://clisp.cons.org/impnotes/faq.html#faq-rejected
>> which points to this:
>>
>> ===========================================================
>> Why is my mail to a mailing list rejected?
>>
>>         * no MIME mail (no HTML formatting, no attachments)
>>         * the list address must be in CC or TO, not BCC.
>>         * do not mention "virgin", "penis" or "viagra" in the Subject line.
>>
>> your message was an HTML message in MIME format.
>>
>> what is unclear?
>
> Ah Thanks.
>
> Thing is, I'm posting from gmail and I've no idea what it's doing with
> the headers.

I am sure you can tell gmail to send your messages in plain ASCII.

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
http://pmw.org.il/ http://www.palestinefacts.org/ http://www.camera.org
http://www.iris.org.il http://ffii.org/ http://www.mideasttruth.com/
A clear conscience is usually the sign of a bad memory.
From: Stephen Compall
Subject: Re: clisp ffi
Date: 
Message-ID: <pan.2005.11.26.20.55.05.149194@nocandysw.com>
On Sat, 26 Nov 2005 10:40:02 -0800, justinhj wrote:
> However I got stuck... I don't have clisp-link (I am using the
> cygwin distribution of clisp)

http://www.podval.org/~sds/clisp/impnotes/dffi.html#dffi-intro

Dynamic FFI (that is, without relinking lisp.run) has been in for a while,
but you had to infer its existence from some other text in the FFI section
of impnotes in 2.35 and before.  The above build of a recent CVS
(post-2.35, pre-2.36) impnotes introduces dynamic FFI explicitly.

If you are calling real C functions available as symbols, and Windows
supports it, you can use this.  It's easier to add new FFI callouts when
you don't have to relink and restart Lisp, eh?

-- 
Stephen Compall
Email: My username is s11.  My domain is member..org, but insert the
abbreviation for `Free Software Foundation' between the dots.
From: justinhj
Subject: Re: clisp ffi
Date: 
Message-ID: <1133047936.967321.79560@g49g2000cwa.googlegroups.com>
Stephen Compall wrote:
> On Sat, 26 Nov 2005 10:40:02 -0800, justinhj wrote:
> > However I got stuck... I don't have clisp-link (I am using the
> > cygwin distribution of clisp)
>
> http://www.podval.org/~sds/clisp/impnotes/dffi.html#dffi-intro
>
> Dynamic FFI (that is, without relinking lisp.run) has been in for a while,
> but you had to infer its existence from some other text in the FFI section
> of impnotes in 2.35 and before.  The above build of a recent CVS
> (post-2.35, pre-2.36) impnotes introduces dynamic FFI explicitly.
>
> If you are calling real C functions available as symbols, and Windows
> supports it, you can use this.  It's easier to add new FFI callouts when
> you don't have to relink and restart Lisp, eh?
>
> --
> Stephen Compall
> Email: My username is s11.  My domain is member..org, but insert the
> abbreviation for `Free Software Foundation' between the dots.

That sounds helpful thanks

Justin
From: justinhj
Subject: Re: clisp ffi
Date: 
Message-ID: <1133128430.340446.276980@g14g2000cwa.googlegroups.com>
Stephen Compall wrote:
> On Sat, 26 Nov 2005 10:40:02 -0800, justinhj wrote:
> > However I got stuck... I don't have clisp-link (I am using the
> > cygwin distribution of clisp)
>
> http://www.podval.org/~sds/clisp/impnotes/dffi.html#dffi-intro
>
> Dynamic FFI (that is, without relinking lisp.run) has been in for a while,
> but you had to infer its existence from some other text in the FFI section
> of impnotes in 2.35 and before.  The above build of a recent CVS
> (post-2.35, pre-2.36) impnotes introduces dynamic FFI explicitly.
>
> If you are calling real C functions available as symbols, and Windows
> supports it, you can use this.  It's easier to add new FFI callouts when
> you don't have to relink and restart Lisp, eh?
>
> --
> Stephen Compall
> Email: My username is s11.  My domain is member..org, but insert the
> abbreviation for `Free Software Foundation' between the dots.

Is dynamic FFI available in version

GNU CLISP 2.33.84 (2005-07-07)

?

Without building from source thats the only version I have available,
and if I do build then I will have clisp-link too.

Justin
From: Sam Steingold
Subject: Re: clisp ffi
Date: 
Message-ID: <uek51ra1o.fsf@gnu.org>
> * justinhj <········@tznvy.pbz> [2005-11-27 13:53:50 -0800]:
>
> Is dynamic FFI available in version
> GNU CLISP 2.33.84 (2005-07-07)

CLISP FFI has been available since 4 April 1995.
see the "development NEWS" link from the CLISP home page.


-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
http://www.palestinefacts.org/ http://www.savegushkatif.org
http://www.dhimmi.com/ http://www.mideasttruth.com/ http://www.camera.org
If you try to fail, and succeed, which have you done?
From: justinhj
Subject: Re: clisp ffi
Date: 
Message-ID: <1133144280.551396.44080@z14g2000cwz.googlegroups.com>
Sam Steingold wrote:
> > * justinhj <········@tznvy.pbz> [2005-11-27 13:53:50 -0800]:
> >
> > Is dynamic FFI available in version
> > GNU CLISP 2.33.84 (2005-07-07)
>
> CLISP FFI has been available since 4 April 1995.
> see the "development NEWS" link from the CLISP home page.
>
>
> --
> Sam Steingold (http://www.podval.org/~sds) running w2k
> http://www.palestinefacts.org/ http://www.savegushkatif.org
> http://www.dhimmi.com/ http://www.mideasttruth.com/ http://www.camera.org
> If you try to fail, and succeed, which have you done?

Yes but my question is about dynamic FFI. Do I need the function dlopen
as is suggested in the link in the post earlier? I can't find that
function at the repl. It's not in the default or FFI package afaikt.

Justin
From: Stephen Compall
Subject: Re: clisp ffi
Date: 
Message-ID: <pan.2005.11.28.02.29.02.233583@nocandysw.com>
On Sun, 27 Nov 2005 18:18:00 -0800, justinhj wrote:
> Yes but my question is about dynamic FFI. Do I need the function dlopen
> as is suggested in the link in the post earlier? I can't find that
> function at the repl. It's not in the default or FFI package afaikt.

From that link:

    To access this facility, pass the :LIBRARY option to
    FFI:DEF-CALL-OUT and FFI:DEF-C-VAR.

Having personally used this feature, I can assure you that that is all
there is to it.  dlopen/dlsym are implementation details, mentioned partly
(I suppose) in case you were thinking you could dynamically link in
objects from static library archives (.a).

-- 
Stephen Compall
Email: My username is s11.  My domain is member..org, but insert the
abbreviation for `Free Software Foundation' between the dots.
From: justinhj
Subject: Re: clisp ffi
Date: 
Message-ID: <1133147539.395632.125560@g44g2000cwa.googlegroups.com>
Stephen Compall wrote:
> On Sun, 27 Nov 2005 18:18:00 -0800, justinhj wrote:
> > Yes but my question is about dynamic FFI. Do I need the function dlopen
> > as is suggested in the link in the post earlier? I can't find that
> > function at the repl. It's not in the default or FFI package afaikt.
>
> From that link:
>
>     To access this facility, pass the :LIBRARY option to
>     FFI:DEF-CALL-OUT and FFI:DEF-C-VAR.
>
> Having personally used this feature, I can assure you that that is all
> there is to it.  dlopen/dlsym are implementation details, mentioned partly
> (I suppose) in case you were thinking you could dynamically link in
> objects from static library archives (.a).
>
> --
> Stephen Compall
> Email: My username is s11.  My domain is member..org, but insert the
> abbreviation for `Free Software Foundation' between the dots.

Sweet, thanks

Justin