Re: Lush and Qt

Raymond Martin <[email protected]> Tue, 9 Sep 2008 07:19:41 -0400
Newsgroups gmane.lisp.lush.devel
Organization Rhythmous Systems
Message-ID <[email protected]>
On 8 September 2008 23:27:18 Ralf Juengling wrote:
> 
> Hm. There are two different ways goals here. One is having Lush
> be implemented atop a platform abstraction library to have less
> work with keeping it portable. There are a couple such libraries,
> some big ones like Qt and wxWidgets include an event system and
> a broad widget toolkit. The other goal is writing a binding to a
> widget toolkit for Lush. It sounds like Raymond has the first in
> mind and Yann the second.
> 
> I think writing a binding is the more realistic goal. Implementing
> Lush on Qt would basically mean rewriting most of it.

It may be more realistic, in that it might take less time or work, but I am
not sure about that and definitely will not be the best choice. If Lush is to
go on to a new generation, perhaps it is in need of a rewrite (to C++, on
top of a framework that provides a vast amount of functionality right out
of the box).

Think about the long term implications of a solid Qt based Lisp that will sit
alongside the ever increasing number of other Qt applications (Skype,
Photoshop, Opera, KDE, Maemo, Firefox). This is as much about increasing
interest in Lush as it is in providing great functionality. Aligning Lush with
Qt is a way to promote it. It is a novel approach that others are not doing
and that is the name of the game in FOSS, novelty. Pretty much anything
you can think of has already been coded, and there are many dozens of
Lisps out there. Try to find one that has the kind of framework that Qt
provides, is not completely bloated, works efficiently, is FOSS, etc. You
won't find any (besides what Lush has brought to date) and that is the novelty
that my idea of using Qt brings to make Lush stick out.

> 
> Thinking about widget toolkits, we would be nice to have a GUI
> builder. GUI builders are typically targeted to a particular
> programming language. So my guess is that QT Desginer produces
> GUI code and application logic template code in C++, which we
> could not flesh out with Lisp code.

No, Lush GUIs could be developed with QtDesigner and converted to
Lush code. This is done with Trolltech's own QtJambi for Java and with
Ruby in QtRuby (other languages also can do this).

> 
> I don't know how it would work with Gnome's Glade. The GTK+ folks
> designed their widget toolkit with foreign language bindings in
> mind, and there are tons of bindings for GTK+. My understanding
> is that Glade saves a GUI description as an XML file, and libglade
> parses it and builds the GUI at runtime. But I wonder how one then
> integrates with the custom application code written in another
> language...

Gtk+ is on the rocks when it comes to being relied on for future versions,
GNOME has even floated the idea of moving to Qt. Gtk+ just does not have
a plan for where it will go in the future. Trolltech is all about R&D with Qt,
especially now they have been bought by Nokia and this means it will end
up on millions of handheld devices.

Besides, using Qt is not all about the GUI stuff, that is only one factor of many.
It is about Qt as a cross-platform framework that provides a lot of functionality.
For instance, Qt has its own concurrency framework now. Thus, Lush can be
multi-threaded without having to worry about any of the bottom-level issues,
just code on top of their nice thread management API.

Did you check the list of features I made about Qt? There is a lot more to
it than just GUI!

I don't think you will get the full power and functionality in Lush that Qt provides by using
it in a plugin manner as an add-on feature. That has already been done that way in QtRuby,
PyQt and it just cannot provide 100% of what Qt has in that way. 

So let me be clear, Qt is about a (C++) framework, not just GUI stuff. It is about turning
Lush into a broader platform. It is already a platform to a degree and this is a serious
step that will take it to the next level.

Raymond

P.S. A bonus of using Qt could be to integrate code from DjView/djvulibre directly into Lush.






-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/