From: Kenny Tilton
Subject: wxCL?
Date: 
Message-ID: <3C583FD3.AF26A874@nyc.rr.com>
I have had a couple of people mention wxWindows as a candidate substrate
atop which to develop a Common Lisp GUI, at least to get rolling. Two
questions:

1) Yes or no? Good substrate?

2) Newbie follow-up: If yes, how ugly would it be to interface to
wxWindows which is in C++? I mean, is it just a lot of tedious grunt
work creating first the C DLL to talk to wxWindows and then the CLOS
classes to map to the C++ classes?

I say newbie because I just do Lisp, never did any FFI/DLL/COM stuff.

-- 

 kenny tilton
 clinisys, inc
 ----------------------------------
 "Catch a wave."
      - Brian Wilson

From: Thomas F. Burdick
Subject: Re: wxCL?
Date: 
Message-ID: <xcvd6zrr6mm.fsf@apocalypse.OCF.Berkeley.EDU>
Kenny Tilton <·······@nyc.rr.com> writes:

> I have had a couple of people mention wxWindows as a candidate substrate
> atop which to develop a Common Lisp GUI, at least to get rolling. Two
> questions:
> 
> 1) Yes or no? Good substrate?

I didn't like wxWindows when I tried it in C++, but that was (a) in
C++, (b) years ago, and (c) the opinion of someone who wanted a
toolkit, with portability being a nice perk; if I'd been very
interested in portability, maybe I would've liked it.

> 2) Newbie follow-up: If yes, how ugly would it be to interface to
> wxWindows which is in C++? I mean, is it just a lot of tedious grunt
> work creating first the C DLL to talk to wxWindows and then the CLOS
> classes to map to the C++ classes?

Yes, I think it would be quite tedious.  However, I think the Semantic
Bovinator <http://cedet.sf.net/> parses C++, so you could probably use
Emacs to mostly automate the process.  In fact, it might not be
tedious at all, if Semantic can do a good job with the wxWindows
header files -- you could emit the C and the FFI bindings to the C
wrappers all automatically.  I've never tried this, but I imagine you
could come up with a reasonable CLOS binding this way, because you
won't have lost any information along the way if you do it all in the
same elisp program.

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Dr. Edmund Weitz
Subject: Re: wxCL?
Date: 
Message-ID: <m3bsfb4on0.fsf@bird.agharta.de>
···@apocalypse.OCF.Berkeley.EDU (Thomas F. Burdick) writes:

> Kenny Tilton <·······@nyc.rr.com> writes:
> 
> > I have had a couple of people mention wxWindows as a candidate
> > substrate atop which to develop a Common Lisp GUI, at least to get
> > rolling. Two questions:
> > 
> > 1) Yes or no? Good substrate?
> 
> I didn't like wxWindows when I tried it in C++, but that was (a) in
> C++, (b) years ago, and (c) the opinion of someone who wanted a
> toolkit, with portability being a nice perk; if I'd been very
> interested in portability, maybe I would've liked it.
> 
> > 2) Newbie follow-up: If yes, how ugly would it be to interface to
> > wxWindows which is in C++? I mean, is it just a lot of tedious
> > grunt work creating first the C DLL to talk to wxWindows and then
> > the CLOS classes to map to the C++ classes?
> 
> Yes, I think it would be quite tedious.  However, I think the
> Semantic Bovinator <http://cedet.sf.net/> parses C++, so you could
> probably use Emacs to mostly automate the process.  In fact, it
> might not be tedious at all, if Semantic can do a good job with the
> wxWindows header files -- you could emit the C and the FFI bindings
> to the C wrappers all automatically.  I've never tried this, but I
> imagine you could come up with a reasonable CLOS binding this way,
> because you won't have lost any information along the way if you do
> it all in the same elisp program.

Clueless question: As far as I understand it, with toolkits like GTK+,
Qt, or wxWindows, you basically set up your environment and then
completely hand over control to the toolkit's main event loop by
calling gtk_main() or something similar. If that's right, wouldn't
this result in a behaviour completely different from, say, Garnet or
CAPI where you can build and test your GUI step by step and
interactively while you're still in the listener and have full
control?

Am I missing something?

Edi.
From: Kenny Tilton
Subject: Re: wxCL?
Date: 
Message-ID: <3C584EF6.AB75AD16@nyc.rr.com>
"Dr. Edmund Weitz" wrote:
> 
> Clueless question: As far as I understand it, with toolkits like GTK+,
> Qt, or wxWindows, you basically set up your environment and then
> completely hand over control 

oh yeah, that was my third question. playing with the OpenGL bindings I
found recently has definitely felt like a step backward. once i run, if
i close the OpenGL window it takes down ACL altogether. :( It /is/ set
up so if I hit escape it throws me into a backtrace, then I can make
changes and continue from the backtrace, but that is less than ideal.

 kenny tilton
 clinisys, inc
 ----------------------------------
 "Catch a wave."
      - Brian Wilson
From: Jochen Schmidt
Subject: Re: wxCL?
Date: 
Message-ID: <3C586E2A.5080108@dataheaven.de>
Kenny Tilton wrote:
> 
> "Dr. Edmund Weitz" wrote:
> 
>>Clueless question: As far as I understand it, with toolkits like GTK+,
>>Qt, or wxWindows, you basically set up your environment and then
>>completely hand over control 
>>
> 
> oh yeah, that was my third question. playing with the OpenGL bindings I
> found recently has definitely felt like a step backward. once i run, if
> i close the OpenGL window it takes down ACL altogether. :( It /is/ set
> up so if I hit escape it throws me into a backtrace, then I can make
> changes and continue from the backtrace, but that is less than ideal.


LispWorks OpenGL binding (it comes with LispWorks and works for Windows, 
  Linux and Unix) is integrated as a CAPI pane. The complete source of 
the bindings comes with LispWorks in the examples directory.

ciao,
Jochen
From: Kenny Tilton
Subject: Re: wxCL?
Date: 
Message-ID: <3C58687D.F70C8661@nyc.rr.com>
Jochen Schmidt wrote:
> 
> LispWorks OpenGL binding (it comes with LispWorks and works for Windows,
>   Linux and Unix) is integrated as a CAPI pane. The complete source of
> the bindings comes with LispWorks in the examples directory.
> 

woo-hoo! thx, I'll check it out.

-- 

 kenny tilton
 clinisys, inc
 ---------------------------------------------------------------
 "I don't think the heavy stuff is gonna come down for a while."
                                             - Carl, Caddy Shack
From: Christophe Rhodes
Subject: Re: wxCL?
Date: 
Message-ID: <sqvgdj8qgw.fsf@cam.ac.uk>
···@agharta.de (Dr. Edmund Weitz) writes:

> Clueless question: As far as I understand it, with toolkits like GTK+,
> Qt, or wxWindows, you basically set up your environment and then
> completely hand over control to the toolkit's main event loop by
> calling gtk_main() or something similar. If that's right, wouldn't
> this result in a behaviour completely different from, say, Garnet or
> CAPI where you can build and test your GUI step by step and
> interactively while you're still in the listener and have full
> control?
> 
> Am I missing something?

Well, I don't pretend to understand anything, but I believe that there
are several ways round this -- talking down a pipe to a daemon being
the most obvious, perhaps, but there must be others, because clg (in
development at http://sourceforge.net/projects/clg) at least allows
you to play at the repl. Don't ask me how it does it, though -- I'm
too far from my source tree at the moment :).

Cheers,

Christophe
-- 
Jesus College, Cambridge, CB5 8BL                           +44 1223 510 299
http://www-jcsu.jesus.cam.ac.uk/~csr21/                  (defun pling-dollar 
(str schar arg) (first (last +))) (make-dispatch-macro-character #\! t)
(set-dispatch-macro-character #\! #\$ #'pling-dollar)
From: Thomas F. Burdick
Subject: Re: wxCL?
Date: 
Message-ID: <xcvit9js70f.fsf@famine.OCF.Berkeley.EDU>
Christophe Rhodes <·····@cam.ac.uk> writes:

> ···@agharta.de (Dr. Edmund Weitz) writes:
> 
> > Clueless question: As far as I understand it, with toolkits like GTK+,
> > Qt, or wxWindows, you basically set up your environment and then
> > completely hand over control to the toolkit's main event loop by
> > calling gtk_main() or something similar. If that's right, wouldn't
> > this result in a behaviour completely different from, say, Garnet or
> > CAPI where you can build and test your GUI step by step and
> > interactively while you're still in the listener and have full
> > control?
> > 
> > Am I missing something?
> 
> Well, I don't pretend to understand anything, but I believe that there
> are several ways round this -- talking down a pipe to a daemon being
> the most obvious, perhaps, but there must be others, because clg (in
> development at http://sourceforge.net/projects/clg) at least allows
> you to play at the repl. Don't ask me how it does it, though -- I'm
> too far from my source tree at the moment :).

Hmm, I don't remember if this is how clg does it, but I've seen
*something* that used a C library that wanted to own the main loop,
that let the library own the main loop of one thread.  I imagine that
would work for a lot of things.

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Dr. Edmund Weitz
Subject: Re: wxCL?
Date: 
Message-ID: <m3n0yvwlo4.fsf@bird.agharta.de>
Christophe Rhodes <·····@cam.ac.uk> writes:

> Well, I don't pretend to understand anything, but I believe that
> there are several ways round this -- talking down a pipe to a daemon
> being the most obvious, perhaps, but there must be others, because
> clg (in development at http://sourceforge.net/projects/clg) at least
> allows you to play at the repl. Don't ask me how it does it, though
> -- I'm too far from my source tree at the moment :).

Yep, you're right. I should train my memory a bit 'cause I actually
tried clg myself a couple of months ago... :)

Anyone knows how this is accomplished? Or maybe the author himself is
reading this?

Edi.
From: Michael Livshin
Subject: Re: wxCL?
Date: 
Message-ID: <s3aduv7b3r.fsf@yahoo.com.cmm>
···@agharta.de (Dr. Edmund Weitz) writes:

> Christophe Rhodes <·····@cam.ac.uk> writes:
> 
> > Well, I don't pretend to understand anything, but I believe that
> > there are several ways round this -- talking down a pipe to a daemon
> > being the most obvious, perhaps, but there must be others, because
> > clg (in development at http://sourceforge.net/projects/clg) at least
> > allows you to play at the repl. Don't ask me how it does it, though
> > -- I'm too far from my source tree at the moment :).
> 
> Yep, you're right. I should train my memory a bit 'cause I actually
> tried clg myself a couple of months ago... :)
> 
> Anyone knows how this is accomplished? Or maybe the author himself is
> reading this?

I'm not the author, but GTK+ is considerably easier to write bindings
for than most other toolkits.

IIRC they have an extremely hairy main loop setup, plus there is the
ability to ask/wait for events explicitly.

-- 
Debugging? Klingons do not debug. Our software does not coddle the
weak.
                                        -- Klingon Programmer
From: Marco Antoniotti
Subject: Re: wxCL?
Date: 
Message-ID: <y6c1yg0ucvj.fsf@octagon.mrl.nyu.edu>
···@agharta.de (Dr. Edmund Weitz) writes:

> ···@apocalypse.OCF.Berkeley.EDU (Thomas F. Burdick) writes:
> 
> > Kenny Tilton <·······@nyc.rr.com> writes:
> > 
> > > I have had a couple of people mention wxWindows as a candidate
> > > substrate atop which to develop a Common Lisp GUI, at least to get
> > > rolling. Two questions:
> > > 
> > > 1) Yes or no? Good substrate?
> > 
> > I didn't like wxWindows when I tried it in C++, but that was (a) in
> > C++, (b) years ago, and (c) the opinion of someone who wanted a
> > toolkit, with portability being a nice perk; if I'd been very
> > interested in portability, maybe I would've liked it.
> > 
> > > 2) Newbie follow-up: If yes, how ugly would it be to interface to
> > > wxWindows which is in C++? I mean, is it just a lot of tedious
> > > grunt work creating first the C DLL to talk to wxWindows and then
> > > the CLOS classes to map to the C++ classes?
> > 
> > Yes, I think it would be quite tedious.  However, I think the
> > Semantic Bovinator <http://cedet.sf.net/> parses C++, so you could
> > probably use Emacs to mostly automate the process.  In fact, it
> > might not be tedious at all, if Semantic can do a good job with the
> > wxWindows header files -- you could emit the C and the FFI bindings
> > to the C wrappers all automatically.  I've never tried this, but I
> > imagine you could come up with a reasonable CLOS binding this way,
> > because you won't have lost any information along the way if you do
> > it all in the same elisp program.
> 
> Clueless question: As far as I understand it, with toolkits like GTK+,
> Qt, or wxWindows, you basically set up your environment and then
> completely hand over control to the toolkit's main event loop by
> calling gtk_main() or something similar. If that's right, wouldn't
> this result in a behaviour completely different from, say, Garnet or
> CAPI where you can build and test your GUI step by step and
> interactively while you're still in the listener and have full
> control?
> 
> Am I missing something?

AFAIK, there are versions (the latest?) of CL-GTK which DTRT on CMUCL
(via SYSTEM:SERVE-EVENT).

There was a huge problem in the old GTK versions, where you did not
have access to the X display, hence you could not really get away from
handling over the control.

Cheers

-- 
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group        tel. +1 - 212 - 998 3488
719 Broadway 12th Floor                 fax  +1 - 212 - 995 4122
New York, NY 10003, USA                 http://bioinformatics.cat.nyu.edu
                    "Hello New York! We'll do what we can!"
                           Bill Murray in `Ghostbusters'.
From: Thaddeus L Olczyk
Subject: Re: wxCL?
Date: 
Message-ID: <3c584320.265577203@nntp.interaccess.com>
On Wed, 30 Jan 2002 18:46:15 GMT, Kenny Tilton <·······@nyc.rr.com>
wrote:

>I have had a couple of people mention wxWindows as a candidate substrate
>atop which to develop a Common Lisp GUI, at least to get rolling. Two
>questions:
>
>1) Yes or no? Good substrate?
I'm suprised that something for wxWindows is not already available.
The other I would expect is GTK, but the 2.0 version is due out soon,
and 2.0 should have much better windows support than 1.2(?).

Qt might be good to, but for some reason I don't like Qt
( maybe its the mop ).
From: Johannes =?iso-8859-15?q?Gr=F8dem?=
Subject: Re: wxCL?
Date: 
Message-ID: <lzhep2aoou.fsf@bzzzt.fix.no>
* Kenny Tilton <·······@nyc.rr.com>:

> I have had a couple of people mention wxWindows as a candidate substrate
> atop which to develop a Common Lisp GUI, at least to get rolling. Two
> questions:
> 1) Yes or no? Good substrate?

I didn't like it.  Mostly because it was so incredibly bloated and
slow.  (I tested it on an Athlon 900 with 256MB RAM.)

I'd go for Gtk instead, which works fine (as far as I can tell) in
Windows as well as various Unix-flavors and is written in C.  (It's
also intended to be easy to write bindings for, and there are probably
like 10-20 foreign language bindings for it.)

It's just Gnome-stuff that doesn't (yet?) work in Windows.

(There is by the way already two bindings for cmucl/gtk.  See Cliki.)

-- 
johs
From: Paolo Amoroso
Subject: Re: wxCL?
Date: 
Message-ID: <DoFZPCaQ2Nt+jAxZI=7nPgZgtHf7@4ax.com>
On Wed, 30 Jan 2002 18:46:15 GMT, Kenny Tilton <·······@nyc.rr.com> wrote:

> I have had a couple of people mention wxWindows as a candidate substrate
> atop which to develop a Common Lisp GUI, at least to get rolling. Two
[...]
> 2) Newbie follow-up: If yes, how ugly would it be to interface to
> wxWindows which is in C++? I mean, is it just a lot of tedious grunt

You might check DrScheme, which is based on wxWindows:

  http://www.plt-scheme.org


Paolo
-- 
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://web.mclink.it/amoroso/ency/README
[http://cvs2.cons.org:8000/cmucl/doc/EncyCMUCLopedia/]
From: Milan Zamazal
Subject: Re: wxCL?
Date: 
Message-ID: <871yg4tegf.fsf@blackbird.zamazal.org>
>>>>> "KT" == Kenny Tilton <·······@nyc.rr.com> writes:

    KT> I have had a couple of people mention wxWindows as a candidate
    KT> substrate atop which to develop a Common Lisp GUI, at least to
    KT> get rolling. Two questions:

    KT> 1) Yes or no? Good substrate?

I have been working on a small project using wxPython for some time and
I wouldn't recommend using wxWindows as a CL GUI substrate for the
following reasons:

* wxWindows itself:

  - The wxWindows documentation is quite incomplete and in many places
    even outdated.

  - There are many small, but unpleasant, strange bugs/problems.  Some
    of them may actually be caused by GTK or misunderstanding the
    documentation, but this doesn't matter when one is faced with the
    problems.  I spent about one third of my wx development time with
    detecting, solving, and overcoming such problems (not being always
    successful with the final result).  OTOH I've been told the support
    on the mailing list is quite good.

* The idea of using C/C++ in a high level language like Lisp or Python:

  - You are exposed to segmentation faults (real experience with
    wxPython!), inability to debug many GUI problems and maybe profiling
    difficulties.  You can't investigate and fix any GUI problems
    yourself unless you're ready to cope with gdb in your favorite
    high-level language.

  - In other words, using C/C++ significantly reduces some advantages of
    the overlaying high-level language.

  - I'd recommend to invest resources into developing a native CL GUI
    toolkit instead, e.g. contributing to McCLIM.

If you need a rich set of widgets with a typical C/C++ GUI API design
and you don't care much about bugs, then wxWindows is probably a good
choice.  But I'd wonder why you use CL then.  It's much better to use
e.g. Python in such a case and not to bother with CL bindings.

Milan Zamazal

-- 
Wasting somebody else's time strikes me as the height of rudeness.
						      Bill Gates