From: jonathon
Subject: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <1124213035.185051.78800@o13g2000cwo.googlegroups.com>
I am new to Lisp, and I have to say I love it.  I'm looking forward to
using it for some pet projects of mine.  But most of what I've done on
Lisp so far has been console or web based.

Correct me where I am wrong here:

>From what I have read, the new FFI being worked on (Summer of Code??)
is supposed to make it easier for all Lisps to access C and C++
libraries on various OSes, correct?  Aren't this difficulty and
complexity some of the things that currently make it difficult to get
CL to play nice with native libraries on different platforms?

For example, I'd like to use SBCL on FreeBSD for plotting spectral data
acquired from a lab instrument we manufacture.  I was able to get lgtk
working with CMUCL, but I've settled on SBCL instead since then.  It
seems I would have to jump through hoops to get decent graphing tools
to work.  I'm not even sure where to begin.  It seems like I'd have to
add some 'alien' package to get gtk callbacks to work.

Kenny Tilton got me thinking about OpenGL with SBCL, but it seems I
would have to do a lot of work to get this running on FreeBSD.  I'm not
averse to a lot of work, but it would be nice if there are tools that
could help automate this and smooth the bumps between CL and these
libraries.  Writing graphical plotting code that would run on FreeBSD
and also run on Win32 seems like a huge undertaking.

I started out asking if FFI was going to make all of this easier, but
perhaps I've gotten off track.  Is there *anything* that can make SBCL
and FreeBSD a bit easier to use to design an app with a nice
graph-based plotting GUI, and that might even work on Win32 as well?

From: Christopher C. Stacy
Subject: Re: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <uiry5n4th.fsf@news.dtpq.com>
"jonathon" <···········@bigfoot.com> writes:

> I started out asking if FFI was going to make all of this easier, but
> perhaps I've gotten off track.  Is there *anything* that can make SBCL
> and FreeBSD a bit easier to use to design an app with a nice
> graph-based plotting GUI, and that might even work on Win32 as well?

How much is your time worth?
Why not just spend about $1,000 for a complete solution
that works out of the box and is portable across all
the operating systems?
From: jonathon
Subject: Re: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <1124217450.506829.251010@g49g2000cwa.googlegroups.com>
Christopher C. Stacy wrote:
> How much is your time worth?
> Why not just spend about $1,000 for a complete solution
> that works out of the box and is portable across all
> the operating systems?

Are you suggesting one of the commercial versions?  If so, I was hoping
to stay in the realm of free implementations.  Most of this will be for
proof-of-concepts rather than production use.
From: Kenny Tilton
Subject: Re: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <7srMe.2351$ZG2.977291@twister.nyc.rr.com>
jonathon wrote:
> I am new to Lisp, and I have to say I love it.  I'm looking forward to
> using it for some pet projects of mine.  But most of what I've done on
> Lisp so far has been console or web based.
> 
> Correct me where I am wrong here:
> 
>>From what I have read, the new FFI being worked on (Summer of Code??)
> is supposed to make it easier for all Lisps to access C and C++
> libraries on various OSes, correct?  Aren't this difficulty and
> complexity some of the things that currently make it difficult to get
> CL to play nice with native libraries on different platforms?

Correct.

> 
> For example, I'd like to use SBCL on FreeBSD for plotting spectral data
> acquired from a lab instrument we manufacture.  I was able to get lgtk
> working with CMUCL, but I've settled on SBCL instead since then.  It
> seems I would have to jump through hoops to get decent graphing tools
> to work.  I'm not even sure where to begin.  It seems like I'd have to
> add some 'alien' package to get gtk callbacks to work.

Cells-gtk is in pretty good shape and actually makes Gtk easier. Or so I 
hear.

> 
> Kenny Tilton got me thinking about OpenGL with SBCL, but it seems I
> would have to do a lot of work to get this running on FreeBSD.

Not recommended for the faint of heart.

   I'm not
> averse to a lot of work, but it would be nice if there are tools that
> could help automate this and smooth the bumps between CL and these
> libraries.  Writing graphical plotting code that would run on FreeBSD
> and also run on Win32 seems like a huge undertaking.
> 
> I started out asking if FFI was going to make all of this easier, but
> perhaps I've gotten off track.

Yes and no. Until I get Cello Ready For Prime Time you are looking at 
Lispworks CAPI or FFI-ing into some C/C++ lib. So it is an FFI question. 
But...

   Is there *anything* that can make SBCL
> and FreeBSD a bit easier to use to design an app with a nice
> graph-based plotting GUI, and that might even work on Win32 as well?
> 

Not sure exactly where it has been ported, but you should check out 
Cells-GTk (poke around on common-lisp.net), possibly even Vasilis's 
original CLisp-only version.

And how about the recent wxWidgets announcement? Does that apply here?


-- 
Kenny

Why Lisp? http://lisp.tech.coop/RtL%20Highlight%20Film

"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: jonathon
Subject: Re: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <1124245332.985379.180820@g49g2000cwa.googlegroups.com>
Kenny Tilton wrote:
> Cells-gtk is in pretty good shape and actually makes Gtk easier. Or so I
> hear.

I'll take a look and see how hard it is to do plotting.

> > Kenny Tilton got me thinking about OpenGL with SBCL, but it seems I
> > would have to do a lot of work to get this running on FreeBSD.
>
> Not recommended for the faint of heart.

But this is what you are doing, correct?

> Yes and no. Until I get Cello Ready For Prime Time you are looking at

Any idea how long that will be?  I just read the project page again,
and it really looks like an exciting step forward for Lisp.  Is that
what you are working on now that CliniSys is nearly ready for
primetime?

> Lispworks CAPI or FFI-ing into some C/C++ lib. So it is an FFI question.

CAPI... is that the LispWorks version of CommonGraphics?

> And how about the recent wxWidgets announcement? Does that apply here?

Too many layers, IMHO.  And I like the idea of OpenGL better.
From: Edi Weitz
Subject: Re: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <uek8tcg3u.fsf@agharta.de>
On 16 Aug 2005 19:22:13 -0700, "jonathon" <···········@bigfoot.com> wrote:

> CAPI... is that the LispWorks version of CommonGraphics?

Not really.  CommonGraphics is Windows-only while CAPI is a
cross-platform GUI toolkit that works with Windows, Mac OS X, Linux
and a couple of Unixen.  I haven't worked with CG but CAPI is usually
a pleasure to deal with.

  <http://www.lispworks.com/products/capi.html>

Get the LispWorks trial version and see for yourself - there are a lot
of things to try in the "examples" folder.

Some CAPI apps to check:

  <http://www.rocketdownload.com/ details/Self/6724.htm>
  <http://www.netfonds.no/pt.php>
  <http://weitz.de/regex-coach/> 

Cheers,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Kenny Tilton
Subject: Re: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <0nBMe.3620$ZG2.999736@twister.nyc.rr.com>
Edi Weitz wrote:
> On 16 Aug 2005 19:22:13 -0700, "jonathon" <···········@bigfoot.com> wrote:
> 
> 
>>CAPI... is that the LispWorks version of CommonGraphics?
> 
> 
> Not really.  CommonGraphics is Windows-only while CAPI is a
> cross-platform...

You just flunked the Miller Analogy test. From their web sites:

> Common Graphics
> 
> Common Graphics is a library of functions for writing windowized GUIs.
> 
>     * Standard window hierarchies, graphics and event handling
>     * High-level support for pixmaps, menus, icons, timers, tooltips, rubber-banding, hotspots, and custom mouse cursors
>     * A variety of ready-to-use widgets and utility dialogs

> CAPI Features
> 
>     * Conceptually simple, CLOS-based model.
>     * Standard set of elements including menus, buttons, toolbars, text panes, lists, graphs, scroll bars, tabs, dividers and so on.
>     * Window-system specifics hidden from the programmer.
>     * User-defined elements and interface classes.
>     * Integrated with Graphics Ports drawing API.
>     * Multiple-document interface (MDI) and docking supported on Windows.
>     * Comprehensive documentation.

CAPI has the great /advantage/ of its portability, but that does not 
mean CAPI and CG do not play the same roles in development.

> I haven't worked with CG but  CAPI is usually
> a pleasure to deal with.

Same with CG. How would you compare Gtk interfaces (and Cells-Gtk 
pleasure to deal with) with CAPI's? Or haven't ypu worked with those? 
One blogger said the nice thing about Cells-Gtk is that one does not 
really have to do much Gtk. He meant that Vasilis's Celtic-derived 
approach hides (ie, handles for you) most of the Gtk wiring.

Portability is great for those who need it (folks attempting a portable 
app or package). But you can get it with Ltk or Cells-Gtk or wxCL or 
Cello (ha!). Both CG and CAPI marry you to one vendor and, in the case 
of Lispworks, a weaker IDE (IMO). Hmmm. I forgot the OP's OS. If it is 
not Windows or Linux, he will not get the groovy ACL IDE. Anyway. A free 
Lisp forces an even weaker IDE (Slime/Emacs) on you, but the OP wants a 
free Lisp. If he develops a budget he should go for ACL if on win32 or 
Linux but use a free GUI such as Cells-GTk or Ltk or wxCL so he can ship 
with a free (at runtime) environment.

-- 
Kenny

Why Lisp? http://lisp.tech.coop/RtL%20Highlight%20Film

"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: Edi Weitz
Subject: Re: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <uacjg9xxu.fsf@agharta.de>
On Wed, 17 Aug 2005 07:07:40 GMT, Kenny Tilton <·······@nyc.rr.com> wrote:

> How would you compare Gtk interfaces (and Cells-Gtk pleasure to deal
> with) with CAPI's? Or haven't ypu worked with those?

Not yet.  Has it gotten documentation in the meantime?  Not having to
guess what things are supposed to do is part of the pleasure for me.

> Both CG and CAPI marry you to one vendor and, in the case of
> Lispworks, a weaker IDE (IMO).

Not in mine.  Unless you're willing to share some of the Franz
marketing dollars you seem to get, of course... :)

Cheers,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Kenny Tilton
Subject: Re: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <fnMMe.13496$%w.13278@twister.nyc.rr.com>
Edi Weitz wrote:

> On Wed, 17 Aug 2005 07:07:40 GMT, Kenny Tilton <·······@nyc.rr.com> wrote:
> 
> 
>>How would you compare Gtk interfaces (and Cells-Gtk pleasure to deal
>>with) with CAPI's? Or haven't ypu worked with those?
> 
> 
> Not yet.  Has it gotten documentation in the meantime?  Not having to
> guess what things are supposed to do is part of the pleasure for me.

Having a crapload of working examples to rip off instead of 
documentation to read floats my boat, and cells-gtk has working examples 
out the wazoo.

> 
> 
>>Both CG and CAPI marry you to one vendor and, in the case of
>>Lispworks, a weaker IDE (IMO).
> 
> 
> Not in mine.  Unless you're willing to share some of the Franz
> marketing dollars you seem to get, of course... :)

Typical yob Usenet behavior. Duck the IDE issue and instead make a 
desperate attack on my objectivity by casting fanciful aspersions on the 
integrity of both Franz and myself.

Well, having used both IDEs, I can see why you want to change the subject.

The smiley does not excuse you, btw.

:)

-- 
Kenny

Why Lisp? http://lisp.tech.coop/RtL%20Highlight%20Film

"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: Jamie Border
Subject: Re: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <de1r9p$aq4$1@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com>
"Kenny Tilton" <·······@nyc.rr.com>

>>>How would you compare Gtk interfaces (and Cells-Gtk pleasure to deal
>>>with) with CAPI's? Or haven't ypu worked with those?
>>
>>
EW>> Not yet.  Has it gotten documentation in the meantime?  Not having to
EW>> guess what things are supposed to do is part of the pleasure for me.
>
> Having a crapload of working examples to rip off instead of documentation 
> to read floats my boat, and cells-gtk has working examples out the wazoo.

Worked for me.

>
>>
>>
>>>Both CG and CAPI marry you to one vendor and, in the case of
>>>Lispworks, a weaker IDE (IMO).

Vendor lock-in avoidance was why I chose Cells-Gtk (and why I wait with 
anticipation for Cello).

I have never liked building GUI apps.  Never.  But Cells-Gtk at least stops 
me foaming at the mouth.

>>
>>
>> Not in mine.  Unless you're willing to share some of the Franz
>> marketing dollars you seem to get, of course... :)
>
> Typical yob Usenet behavior. Duck the IDE issue and instead make a 
> desperate attack on my objectivity by casting fanciful aspersions on the 
> integrity of both Franz and myself.
>
> Well, having used both IDEs, I can see why you want to change the subject.
>
> The smiley does not excuse you, btw.
>
> :)

I tried sending the following message to an old Managing Director of mine, 
who was ex-Special Forces.

"Hey, Tony.  I can't make the deadline you agreed with the clients.  Perhaps 
if you'd asked me first we woudn't be so fucked. :-)"

I can tell you that the ":-)" did not reduce the size of the bruise...

>
> -- 
> Kenny
>
> Why Lisp? http://lisp.tech.coop/RtL%20Highlight%20Film
>
> "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: Paolo Amoroso
Subject: Re: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <87wtmkrer2.fsf@plato.moon.paoloamoroso.it>
"jonathon" <···········@bigfoot.com> writes:

> Kenny Tilton wrote:
>> Cells-gtk is in pretty good shape and actually makes Gtk easier. Or so I
>> hear.
>
> I'll take a look and see how hard it is to do plotting.

I seem to understand that cells-gtk doesn't currently support any
canvas widget or drawable area.


Paolo
-- 
Why Lisp? http://lisp.tech.coop/RtL%20Highlight%20Film
Recommended Common Lisp libraries/tools:
- ASDF/ASDF-INSTALL: system building/installation
- CL-PPCRE: regular expressions
- UFFI: Foreign Function Interface
From: Kenny Tilton
Subject: Re: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <pyGMe.13468$%w.5985@twister.nyc.rr.com>
Paolo Amoroso wrote:
> "jonathon" <···········@bigfoot.com> writes:
> 
> 
>>Kenny Tilton wrote:
>>
>>>Cells-gtk is in pretty good shape and actually makes Gtk easier. Or so I
>>>hear.
>>
>>I'll take a look and see how hard it is to do plotting.
> 
> 
> I seem to understand that cells-gtk doesn't currently support any
> canvas widget or drawable area.

I do not know. It may be that the OP will need to extend Cells-Gtk. I 
know others have done so when it fell short in some area. (Some C glue 
was necessary for one such extension, IIRC.) I recommend:

    http://common-lisp.net/project/cells-gtk/

Hmm. I wonder if anyone is going to do wxCells?

:)

-- 
Kenny

Why Lisp? http://lisp.tech.coop/RtL%20Highlight%20Film

"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: jonathon
Subject: Re: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <1124284377.606088.241270@f14g2000cwb.googlegroups.com>
So what is the status of Cello?  I think I might like to wait for it.
From: Kenny Tilton
Subject: Re: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <qqIMe.13480$%w.5392@twister.nyc.rr.com>
jonathon wrote:
> So what is the status of Cello?  I think I might like to wait for it.
> 

I am starting development of a commercial app for windows and the Mac 
which will be based on Cello, so it should be resuming forward motion 
shortly. Well, it has already...

Currently a so-called GL-PDF package is being developed for Cello by 
Yusuke Shinyama. GL-PDF is effectively a 'display PDF' via OpenGL 
emulation of PDF. GL-PDF can thus render to screen or a PDF file for 
wysiwyg hardcopy just by switching output stream type.

Yusuke also did a port of the C++ library FTGL to Lisp, but if 
Verrazano/CFFI succeeds I will be able to talk to FTGL without the pesky 
C glue, at which point I do not think a Lisp FTGL offers added value.

Not sure when Cello will be easy to install, tho. Needs lotsa libraries. 
And I only worry about win32 and the Mac, so *nix folk are on their own.

I also cannot afford to do anything more in re supporting anyone else, 
other than make the source available via CVS. A recent LispNYK speaker 
drove home what I had already noticed. He called the rule of threes. 
Sharing code with one person, then more than one person, then as open 
source each slows development by a factor of three. Ouch, but accurate. 
And I may have left out a three or two, such as cross-platform and 
cross-lisp. So you would really be on your own.

-- 
Kenny

Why Lisp? http://lisp.tech.coop/RtL%20Highlight%20Film

"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: jonathon
Subject: Re: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <1124299342.710802.18610@g14g2000cwa.googlegroups.com>
Kenny Tilton wrote:
> jonathon wrote:
> > So what is the status of Cello?  I think I might like to wait for it.
> Not sure when Cello will be easy to install, tho. Needs lotsa libraries.
> And I only worry about win32 and the Mac, so *nix folk are on their own.
>
> I also cannot afford to do anything more in re supporting anyone else,

I'd be willing to try it on Win32, then.  CLisp compatible, right?

What I *really* should do is break down and buy that iBook I've been
wanting.
From: Kenny Tilton
Subject: Re: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <5xLMe.13493$%w.6205@twister.nyc.rr.com>
jonathon wrote:
> Kenny Tilton wrote:
> 
>>jonathon wrote:
>>
>>>So what is the status of Cello?  I think I might like to wait for it.
>>
>>Not sure when Cello will be easy to install, tho. Needs lotsa libraries.
>>And I only worry about win32 and the Mac, so *nix folk are on their own.
>>
>>I also cannot afford to do anything more in re supporting anyone else,
> 
> 
> I'd be willing to try it on Win32, then.  CLisp compatible, right?

Well, the drift of the "rule of three" remark is that CLisp 
compatibility happens only if I switch to CLisp. Right now I am on 
AllegroCL. But...

Back in the day when I tried the Clisp port, CLisp's FFI was not ready 
for prime time. Now it is. So a Cello port should be possible. But ya 
never know. CLisp also did something weird with 
defstruct/:include/:conc-name. I believe Cells still includes the 
workaround for that, but who knows what other evil lurks in CLisp. Try 
it and see, I guess.


-- 
Kenny

Why Lisp? http://lisp.tech.coop/RtL%20Highlight%20Film

"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: Pupeno
Subject: Re: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <ddu7ib$n8s$1@domitilla.aioe.org>
jonathon wrote:

>>From what I have read, the new FFI being worked on (Summer of Code??)
> is supposed to make it easier for all Lisps to access C and C++
> libraries on various OSes, correct?

C++ ? That would be interesting (to me), url ?
-- 
Pupeno <······@pupeno.com> (http://pupeno.com)
Reading ? Science Fiction ? http://sfreaders.com.ar
From: Brad Anderson
Subject: Re: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <XayMe.3048$hF1.1517@newssvr30.news.prodigy.com>
Pupeno wrote:
> jonathon wrote:
> 
> 
>>>From what I have read, the new FFI being worked on (Summer of Code??)
>>is supposed to make it easier for all Lisps to access C and C++
>>libraries on various OSes, correct?
> 
> 
> C++ ? That would be interesting (to me), url ?

Verrazano

http://common-lisp.net/project/fetter/

BA
From: Pupeno
Subject: Re: Will the new FFI work help advance and unify CL by leaps and bounds?
Date: 
Message-ID: <de4plh$q1m$1@domitilla.aioe.org>
Brad Anderson wrote:
> Verrazano
> 
> http://common-lisp.net/project/fetter/

Thanks, I've tried to download it from CVS but since there are no
instructions "here", I extrapolated from other projects at common-lisp.net,
doing this:

$ export ··························@common-lisp.net:/project/fetter/cvsroot/
$ cvs login
Logging in to ··················@common-lisp.net:2401/project/fetter/cvsroot
CVS password:
Fatal error, aborting.
anonymous: no such user

Maybe they dissabled anonymous for this project ?
-- 
Pupeno <······@pupeno.com> (http://pupeno.com)
Reading ? Science Fiction ? http://sfreaders.com.ar