Qt and Lisp...a great opportunity?

Whatever is on your mind, whether Lisp related or not.

Qt and Lisp...a great opportunity?

Postby August » Thu Mar 05, 2009 10:37 pm

For folks that don't know, Nokia has decided to change to an LGPL license starting with Qt 4.5 in order to broaden usage of the toolkit. It's great news for those of us writing, or wanting to write, commercial applications using it. My company is currently using Qt and and we like it a lot...and we certainly won't miss paying for the commercial version :-)

I am currently learning Lisp and am very hopeful that its combination of features and performance will let us move away from C++ for at least some of our future projects (we write graphics tools). Having a complete Lisp binding to Qt would be awesome as well as comforting in the sense that the toolkit would not be tied to a specific Lisp vendor. Qt really is very good and I am wondering if a high quality Lisp binding would be a big help in getting more people on board with the language. I know that it would be a significant factor for us.

As soon as I collect enough Lisp skills, I would certainly be willing to help in the effort.
---------
DarklingX, LLC
http://www.darklingx.com
August
 
Posts: 17
Joined: Fri Oct 03, 2008 1:41 pm
Location: Los Alamos, New Mexico USA

Re: Qt and Lisp...a great opportunity?

Postby qbg » Fri Mar 06, 2009 9:11 pm

There have been various stabs in the past to make a Qt binding for CL.

Writing a Qt binding is likely going to be more difficult than writing a GTK binding; Qt is C++, so that can add some complications. There is also the MOC you may want to deal with. Having the wrapper be lispy would be nice too...
qbg
 
Posts: 64
Joined: Mon Jun 30, 2008 1:05 pm
Location: Minnesota

Re: Qt and Lisp...a great opportunity?

Postby dmitry_vk » Fri Mar 06, 2009 10:27 pm

There were several efforts to produce Qt binding (e.g., http://uint32t.blogspot.com/2008/07/qtl ... dback.html). But binding to Qt is hard, because it uses C++ (not evene plain C++, but modified C++). There seems to be some introspection mechanism in Qt (QMetaObject), it might be possible to use it to create bindings.
Producing a Gtk+ binding is easier. It uses plain C and has its own metaobject system (GObject). Actually, there are several project to create bindings to Gtk+ (gtk-cffi, clg, and I have an unpublished good but not yet complete binding).
dmitry_vk
 
Posts: 96
Joined: Sat Jun 28, 2008 8:01 am
Location: Russia, Kazan

Re: Qt and Lisp...a great opportunity?

Postby August » Fri Mar 06, 2009 11:32 pm

There's no doubt that it would be a significant project for a number of reasons (C++, the Qt meta object compiler, etc.) I have seen the guy doing some work on a Qt binding already and he looks a bit lonely. From the perspective of a company creating commercial software, the look of Gtk is a bit of a turn-off as it doesn't seem to match the native look well. That judgment is mostly from working with GIMP and a few other Gtk based applications, and not working with the toolkit itself so it may not be a valid one.

Anyway, I do know that Qt is an excellent toolkit across platforms and a Lisp binding would grant one of my lispy wishes :-)
---------
DarklingX, LLC
http://www.darklingx.com
August
 
Posts: 17
Joined: Fri Oct 03, 2008 1:41 pm
Location: Los Alamos, New Mexico USA

Re: Qt and Lisp...a great opportunity?

Postby dmitry_vk » Sat Mar 07, 2009 12:20 am

August wrote:There's no doubt that it would be a significant project for a number of reasons (C++, the Qt meta object compiler, etc.) I have seen the guy doing some work on a Qt binding already and he looks a bit lonely. From the perspective of a company creating commercial software, the look of Gtk is a bit of a turn-off as it doesn't seem to match the native look well. That judgment is mostly from working with GIMP and a few other Gtk based applications, and not working with the toolkit itself so it may not be a valid one.

Anyway, I do know that Qt is an excellent toolkit across platforms and a Lisp binding would grant one of my lispy wishes :-)

Qt moc seems to actually be a great help in the task of writing the binding. Because it allows to automatically gather information about classes and it provides general method of invoking methods and properties of objects.

I guess the main reason for absence of a complete Qt binding (and many other large libraries) is the lack of requrement for it. E.g., a single hacker starts the project for its fun, it gets semi-complete and then abandoned because at the time, noone needed it and the hacker's motivation is depleted. On the other, I think that it is possible for one man to create a complete Qt binding in the time of month or two.

For me, Gtk+ looks good, both on windows and linux.But that's just my opinion.
dmitry_vk
 
Posts: 96
Joined: Sat Jun 28, 2008 8:01 am
Location: Russia, Kazan

Re: Qt and Lisp...a great opportunity?

Postby TheGZeus » Sat Mar 07, 2009 5:30 am

Clojure has full Qt/KDE bindings via Java, so that might be... something... ummm...
TheGZeus
 
Posts: 79
Joined: Mon Jun 30, 2008 10:46 am

Re: Qt and Lisp...a great opportunity?

Postby nuntius » Sat Mar 07, 2009 11:30 am

TheGZeus wrote:Clojure has full Qt/KDE bindings via Java, so that might be... something... ummm...


Not for long.?. QtJambi is now "community supported" -- Trolltech/Nokia are dropping official development.

On the plus side, this should mean they are opening the sources for the QtJambi toolset; these could be leveraged to generate a proper Lisp binding.

- Daniel
User avatar
nuntius
 
Posts: 498
Joined: Sat Aug 09, 2008 10:44 am
Location: Burlington, MA

Re: Qt and Lisp...a great opportunity?

Postby August » Sat Mar 07, 2009 2:59 pm

dmitry_vk wrote:Qt moc seems to actually be a great help in the task of writing the binding. Because it allows to automatically gather information about classes and it provides general method of invoking methods and properties of objects.

I guess the main reason for absence of a complete Qt binding (and many other large libraries) is the lack of requrement for it. E.g., a single hacker starts the project for its fun, it gets semi-complete and then abandoned because at the time, noone needed it and the hacker's motivation is depleted. On the other, I think that it is possible for one man to create a complete Qt binding in the time of month or two.

For me, Gtk+ looks good, both on windows and linux.But that's just my opinion.


Interesting, I hadn't considered that the Qt MOC would be a help in creating a Lisp binding. With Qt's change in licensing, I imagine that use of the toolkit will increase fairly dramatically so maybe there will be more interest in a complete and supported binding. I'm curious, do you folks know of many Lisp applications with a high quality GUI out there. There's InspireData which uses the Lispworks GUI, but I haven't run across much else.

Gtk+ does look good, it just misses on a few consistency points. The most glaring ones are the standard load/save dialogs. Is it easy to embed an OpenGL viewport in Gtk+? I will go have a closer look at the API.

As for Clojure, it looks good but is probably a no-go in my specific case for performance reasons. Yeah, I know about premature optimization, but there are some things in 3D graphics that just -have- to be fast (vector and matrix math, iterating over image data, etc). My understanding is that Common Lisp will let me put in type declarations, turn off safety, and so on in order to optimize specific sections of code. Being able program at a high level in general but retain the ability to really tune specific code paths would be a huge benefit to us.
---------
DarklingX, LLC
http://www.darklingx.com
August
 
Posts: 17
Joined: Fri Oct 03, 2008 1:41 pm
Location: Los Alamos, New Mexico USA

Re: Qt and Lisp...a great opportunity?

Postby gugamilare » Sat Mar 07, 2009 7:24 pm

Now that is something I would like - to be able to use Qt with CL. It looks really great - it has nice visual effects even for Windows 98 - and it must be very flexible - not that I ever really used it, though.

It is hard to see some CL aplication look good. There are a few programs that use McCLIM, but my experience with McCLIM was frustrating - don't know if I did something wrong or if McCLIM just didn't like me. It takes too long to load (I wouldn't like to have to wait that long to open firefox), and, specially the GTK interface, has bugs. The examples also where slow on my machine (and my machine is a dual-core, which should be enough).

What I really would like to see is an usefull and nice looking application written using Common Lisp - not entirely, it can use foreign libraries, but at least the main part. And, please, not an application known only among CL developers. Up to now, as far as I am concerned, only maxima is a well-known open-source application written using common-lisp. The only one I know at least, I can be wrong.

I can help, I have some experience with C and CFFI, but not C++. Unfortunatelly I don't think I have enough experience or patience to do such a complex wrapper like this one by myself, and I still don't know someone else who can help. I wouldn't mind about the opengl, dbus and other stuff that Qt supports, these will be much better as separated libraries (e.g. cl-opengl and cl-dbus), but I definitely would be happy to see bindings for the graphical toolkit. Perhaps even a parser for the XML file that the Qt Designer produces - I guess this way it would be possible to use Qt Designer to create interface for Lisp programs (How cool is that?).
gugamilare
 
Posts: 406
Joined: Sat Mar 07, 2009 6:17 pm
Location: Brazil

Re: Qt and Lisp...a great opportunity?

Postby Jasper » Sat Mar 07, 2009 7:53 pm

I have thought about markup like html, latex, and i have thought about gui's then i tend to think more generally and more generally. I think the best gui that can in principle exist can also do markup and vice-versa. If the code is restricted so some behaviors it should be able to convert to html-like stuff, javascript/other if not restricted, on the other hand, it should also be able to convert to gui systems like gtk, qt etc. If lisp could do that, it might be a 'killer app'.
Haven't figured out how to do it exactly; is it better to have a markup side and let code interact with that, or to have the markup side be just code, that can be analyzed to produce html/documents and such. Due to what i learned making a loop-like macro(i'll probably start thread about that later), i suspect it is the latter. Edit: of course, 'the best markup in principle' is maybe a little bit of a too lofty goal.

As for qt itself, i don't really know much about it..
Jasper
 
Posts: 209
Joined: Fri Oct 10, 2008 8:22 am
Location: Eindhoven, The Netherlands

Next

Return to The Lounge

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron