[IDEA] Gtk2.0 and Squeak in the 'real boring world'

Aaron reic0024 at d.umn.edu
Thu Jun 20 16:36:44 UTC 2002


On Wed, 19 Jun 2002, Nahuel Greco wrote:

> Hi, I want share an idea of how to make Squeak more "real world" friendly.

I couldn't agree more.  I love Squeak, probably a little irrationally at
times.  I switched to Linux from OS X lately (may go back, Squeak runs
slower!), and have wanted the same thing.  To create "standard" (no such
thing on Linux, :P) apps. And I've been considering this problem, thinking
about either creating a GTK+ plug-in or bridge or learning another system
for creating apps that I want to look 'natural' in their environments
(have considered Haskell/GTK+, rep, guile).

A while back, I started working on a Tk interface for Squeak.  I did this
in a most inefficient manner- by creating a socket connection between STk
(http://kaolin.unice.fr/STk/) and Squeak.  Didn't get terribly far, my
interested wandered.  The only widgets I had working were the toplevel
window and a button.  The button's Smalltalk callback worked, however.

Why did I choose STk over straight up Tcl/Tk? a) I know Scheme, but not
Tcl (especially enough to create a socket server) and b) it was dreadfully
easy to generate the STk code from Smalltalk requests.  TkButton named:
'b' -> (make 'button).

As I see it, here are our options:

1. Plug-in/FFI: While creating a Plug-in would be the most efficient way.
FFI doesn't have callbacks, unfortunately.  With FFI, perhaps, we could
poll for callback requests (symbols), which is basically what I did with
the socket-to-STk (rocket to russia) server.

2. Socket: We could open up a similar socket connection to one of the
Schemes with GTK+ bindings.  Or perhaps to lua, which is tiny (300k?) and
pretty fast.

3. DO: Yet another approach would be using a DO-system like CORBA, SOAP or
XML-RPC.  I've read something about using Common Lisp being used to write
GNOME apps by using CLorb and CORBA.  One of the Steve's (which one!) in
#squeak said that he got pretty good performance with Squeak's SOAP, good
enough to use for building UIs. There is no CORBA bindings for Squeak,
unfortunately, and GNOME is using it still.  Again, a simple server
(written in C, Ruby, Scheme, whatever) could be built to handle Squeak's
SOAP requests to GTK+.

4. Wait for SmallScript: We could always wait a year or two until
SmallScript runs on GNU Mono (.NET clone), and then get to their GTK+
bindings from there. :P

It's unfortunate there are no (currently) Scheme or Lisp with wxWindows
bindings.  Personally, I'd vote for wx if it were practical.  However,
being written in C++, it could pose a much larger pain.

Just some of the ideas I've been considering during the past week or so...

</inarticulate-ramble>
Aaron




More information about the Squeak-dev mailing list