
| on my side). In hintsight this was a very negative | development as it encouraged people to follow their own | convictions and implement their ideas in the hope that their | approach is adopted by the masses. I don't think that the recent work on GUI implementation is a negative development at all. Its great! It gives new information about what works and what doesn't, and it adds to the raw material from which something common can be forged. However, I want to articulate once more what I think we are trying to achieve. * I am Joe Programmer. * I want to write a Haskell program with a GUI. * What do I do? Fact: A GUI interface is big, so it's hard to change my program from one GUI library to another. Therefore: my absolutely top priority is to use a library that I believe will continue to exist, and be supported, at least on the platforms I care about. Next priorities are: - readily available to people who want to modify my source code - available for more than one Haskell implementation Bottom of the list is: - functionality - native look and feel Priority 1 advises strongly against a GUI library supported by one person alone, no matter how talented. As Joe Programmer, I'm very, very keen to use a library that is cherished, developed, and supported by many people. They may each do different tasks, but multi-party buy-in gives me confidence that it's not going to go away when (say) Daan or Krasimir gets hired by a Wall Street finance house. Priority 1 also argues in favour of a Haskell GUI library that is, in turn, built on top of a non-Haskell GUI library which is itself multi-platform, being actively developed, and likely to persist. We don't have enough effort to re-implement this stuff! (As I understand it, this is one of the attractions of the Wx approach.) An internal goal (irrelevant to Joe Programmer) is that the Haskell-GUI-library design should be high-level enough that it can be implemented on top of more than one underlying non-Haskell GUI library. That is a worthy goal, but the discussion I have seen has made me conclude that it is simply too difficult to meet. Let's abandon it! Joe doesn't care. I think it'd be fine to pick *one* library (Wx, Motif, X11, Tk, whatever) and allow that to influence the design of what gets exposed to the Haskell programmer. Apart from anything else, it makes life easier by taking a lot of design decisions (for better or worse) out of our hands. Once an underlying library is chosen, many things get fixed. I'm not against sexy, interesting designs built by one person -- far from it -- but I desperately want One Thing that is multiply supported, even if the One Thing is not very sexy. So I beg the members of the GUI task force to put aside considerations of doing the Best Thing, and concentrate your *joint* efforts on doing One Thing. That entails compromise (e.g. picking one non-Haskell library to build on), but it needn't conflict with parallel individual efforts. What I fear, though, is that the key players become so committed to their particular approach that we never get One Thing. Instead we get Many Things, each supported by one person. And that is just no good for Joe Programmer. (The pre-Haskell situation was many languages each supported by one group, and that was no good either; hence Haskell.) This is a big issue: it's really holding up Haskell. Simon

On Thursday, 2003-07-24, 10:23, CEST, Simon Peyton-Jones wrote:
[...]
Bottom of the list is: - functionality - native look and feel
Did native look-and-feel really have such a low priority?
[...]
I think it'd be fine to pick *one* library (Wx, Motif, X11, Tk, whatever) and allow that to influence the design of what gets exposed to the Haskell programmer. Apart from anything else, it makes life easier by taking a lot of design decisions (for better or worse) out of our hands. Once an underlying library is chosen, many things get fixed.
I'm not against sexy, interesting designs built by one person -- far from it -- but I desperately want One Thing that is multiply supported, even if the One Thing is not very sexy.
Well, people probably won't use the interesting alternative libraries because they have a standard platform. The problem I see is that we get a not so well designed standard interface and better approaches just don't have a chance to get widely used.
[...]
Simon
Wolfgang

Bottom of the list is: - functionality - native look and feel
What's "native look and feel" doing at the bottom of the list? IMHO "native look and feel" is a prerequisite for any Macintosh App that is going to be accepted by Joe Mac User. So if Joe Programmer wants Joe Mac User as one of his customers, he'd better go for native look and feel.
An internal goal (irrelevant to Joe Programmer) is that the Haskell-GUI-library design should be high-level enough that it can be implemented on top of more than one underlying non-Haskell GUI library. That is a worthy goal, but the discussion I have seen has made me conclude that it is simply too difficult to meet. Let's abandon it!
I didn't reach that conclusion from the discussion. I still believe it's possible, I only reached the conclusion that a mailing list discussion doesn't work too well. The issues at hand are much simpler than the discussion about them.
Joe doesn't care. I think it'd be fine to pick *one* library (Wx, Motif, X11, Tk, whatever)
Wx at least tries to provide native look and feel (with limited success on Mac OS so far); we might just choose Wx and hope that the Wx folks will one day fix the deficiencies. A Haskell GUI lib based on any of the others would be next to irrelevant for Mac OS development (no native L&F, perhaps even a separate X11 installation required). So I'm still in favour of platform-specific backends; but I wouldn't protest too much if we opted for the Wx option after some more discussion. Cheers, Wolfgang

--- Wolfgang Thaller
So I'm still in favour of platform-specific backends; but I wouldn't protest too much if we opted for the Wx option after some more discussion.
I continue to think that a library which supports platform-specific backends will be much more flexible. The HToolkit is designed from high-level to low-level. First I deside which functionality I like to have at high-level and after that I deside which primitive operations are required at low-level. After that all low-level primitives can be implemented for each backend. We can use wxWindows as backend for our first prototype. The main advantage of wxWindows is that it is well designed and have good portability. Anyhow if we deside to support low-level platform independent API then this will allow for someone to write other backends. One of things which I like in the HToolkit is that it is very thin layer over the platform specific GUI. The wxWindows contains many classes which are not intended for GUI: - generic classes - wxArray, wxArrayString, wxHashMap wxHashTable, wxScopedArray, wxScopedPtr, wxString - threads - wxThread, wxMutex, wxSemaphore, wxMutexLocker ... - database management - wxDb, wxDbTable, wxDbColDef ... - about 10 classes - wxInputStream, wxOutputStream, wxFile ... - about 20 classes - other We already have useful and functional replacements for these features. The corresponding classes will remain unused. Probably this is true also for Eiffel, Python and many other languages which uses wxWindows (except C++). The wxHaskell project uses only GUI part of wxWindows. The binding is made with wrapper functions written in C. The wrapper plays the same role as low-level C API in the HToolkit. My proposal is to get agreement on this API. The common API will allow to merge low-level parts of HToolkit and wxHaskell and then we can support both Windows, GTK/GNOME and wxWindows. Cheers Krasimir __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com

Simon Peyton-Jones wrote:
Next priorities are: - readily available to people who want to modify my source code
Mostly Joe Programmer wants someone who will fix the bugs he reports, he doesn't have the time or the inclination to modify the GUI library.
- available for more than one Haskell implementation
Joe Programmer probably doesn't care about this, because he only uses one. So long as it's available for the one he uses, he's happy. Of course, Joe Programmer and Jim Programmer use different compilers, so this remains a problem for the GUI library developer. But I think it's not really Joe's concern.
Bottom of the list is: - functionality - native look and feel
Without both of these, the thing won't be used at all... Joe Programmer will have a hard enough time convincing his boss to let him use Haskell already, without having to explain why the GUI "looks all weird".
Priority 1 advises strongly against a GUI library supported by one person alone, no matter how talented. As Joe Programmer, I'm very, very keen to use a library that is cherished, developed, and supported by many people. They may each do different tasks, but multi-party buy-in gives me confidence that it's not going to go away when (say) Daan or Krasimir gets hired by a Wall Street finance house.
Yes.
Priority 1 also argues in favour of a Haskell GUI library that is, in turn, built on top of a non-Haskell GUI library which is itself multi-platform, being actively developed, and likely to persist. We don't have enough effort to re-implement this stuff! (As I understand it, this is one of the attractions of the Wx approach.)
Yes. It also means you can retrain people more easily. For instance, I've used wxPython before, so when I use wxHaskell I at least understand what widgets are available, how they work, how wxWindows does layout and sizing and so on, even though the API is a bit different.
An internal goal (irrelevant to Joe Programmer) is that the Haskell-GUI-library design should be high-level enough that it can be implemented on top of more than one underlying non-Haskell GUI library. That is a worthy goal, but the discussion I have seen has made me conclude that it is simply too difficult to meet. Let's abandon it! Joe doesn't care. I think it'd be fine to pick *one* library (Wx, Motif, X11, Tk, whatever) and allow that to influence the design of what gets exposed to the Haskell programmer. Apart from anything else, it makes life easier by taking a lot of design decisions (for better or worse) out of our hands. Once an underlying library is chosen, many things get fixed.
Speaking as someone who has built a GUI library for Python that runs on both the C++ library Qt and Java's Swing (with Jython), I agree completely! Accommodating multiple underlying GUI toolkits is difficult work, and is best attempted only when you have a significant number of people willing to (actively) help.
This is a big issue: it's really holding up Haskell.
I couldn't agree more. Btw, I understand both wxHaskell and HToolkit are early in development, but I should mention that Joe Programmer needs grid and tree controls! This is off topic for the gui list, but I feel I should mention that two other things that hold me back from trying to convince someone at work to let me use Haskell are lack of SQL drivers for MSSQL and Oracle, and the fact that sockets don't seem to work right in GHC on Windows, especially with threads. Bryn

On Thu, Jul 24, 2003 at 09:23:42AM +0100, Simon Peyton-Jones wrote:
| on my side). In hintsight this was a very negative | development as it encouraged people to follow their own | convictions and implement their ideas in the hope that their | approach is adopted by the masses.
I don't think that the recent work on GUI implementation is a negative development at all. Its great! It gives new information about what works and what doesn't, and it adds to the raw material from which something common can be forged.
The more material (aka backends) there are, the more difficult it is to join them. The main concern about wxWindows was that it doesn't give native look-and-feel on every platform - in fact people came to the conclusion that this is impossible. Hence the following idea (sorry for the repitition): - create a "Common API" that captures common aspects of major platforms (Win, Mac, Gtk) without violating native look-and-feel. - give the user the possiblity to use platform specific functions for everything that is not captured by the Common API in a non-portable way. You could adapt other backends (like wxWindows) exposing this Common API, but where is the point when you have native backends? You could use HToolkit which is a Common API for Win and Gtk but will fail to be portable to Mac, so do you live with that and run the Gtk version in the Xfree server for Mac? Most people will be very frustrated once the community settles for one approach. We are wasting tons of man-hours here which would better be invested in other libraries. That's why I think it is a bad development.
Therefore: my absolutely top priority is to use a library [..the consensus was to cut to:] that provides - native look and feel
If we are giving up on this, lets bin gtk2hs, HToolkit and all the other toolkits out there and use wxWindows. If not, we will have write a binding for Apple Carbon, use the Win32 library in GHC and (hopefully) gtk2hs to cover the three major platforms. In the latter case, bin the rest. Of course we can still have them around, but who would maintain them if there is no need for them. Your
Priority 1 advises strongly against a GUI library supported by one person alone, no matter how talented. As soon as one approach is taken, people will use it and thus it would be supported. The problem of fragile and out-of-date GUI libraries lies in the fact that nobody uses them and there is hence no incentive to support them.
Priority 1 also argues in favour of a Haskell GUI library that is, in turn, built on top of a non-Haskell GUI library which is itself multi-platform, being actively developed, and likely to persist. We don't have enough effort to re-implement this stuff! (As I understand it, this is one of the attractions of the Wx approach.)
wxWindows doesn't allow the use of native functions for bits of your program to make it really look native. That's the criticisim. If the community can live with that, we can use wxWindows right away. In this case there is no need for another layer to which other libraries can bind since there is no need for other libraries.
An internal goal (irrelevant to Joe Programmer) is that the Haskell-GUI-library design should be high-level enough that it can be implemented on top of more than one underlying non-Haskell GUI library. That is a worthy goal, but the discussion I have seen has made me conclude that it is simply too difficult to meet. Let's abandon it!
I agree with Wolfgang that the process (email list) is not very suitable. I think it's not too hard to find a subset which meets the two goals of the Common GUI API mentioned above. Once it is in place, other libraries can still exhibit it but I doubt that there is an incentive to write bindings to other libraries. To me the only sensible routes are: Either a Common GUI API as defined above or wxWindows.
This is a big issue: it's really holding up Haskell.
Sigh, Axel.

Axel Simon wrote:
- create a "Common API" that captures common aspects of major platforms (Win, Mac, Gtk) without violating native look-and-feel.
- give the user the possiblity to use platform specific functions for everything that is not captured by the Common API in a non-portable way.
[...] we will have write a binding for Apple Carbon, use the Win32 library in GHC and (hopefully) gtk2hs to cover the three major platforms.
We couldn't agree more. I think I should start writing a Carbon<->Haskell binding (CarbonatedHaskell? CurriedCarbon?).
If we are giving up on this, lets bin gtk2hs, HToolkit and all the other toolkits out there and use wxWindows.
Let's just not bin wxHaskell for now, but keep it around in case the Common API effort (as you defined it above) fails. (It has not failed yet).
I think it's not too hard to find a subset which meets the two goals of the Common GUI API mentioned above.
The only hard part IMHO is to accommodate MacOS-style menu bars without sacrificing functionality on other platforms. This is the area where other cross-platform toolkits fail because they didn't even try. Swing, wxWindows, Qt, etc. have all been designed without the Mac in mind and have only been ported later. We should be sure to discuss this issue at the Haskell Implementors Meeting. Cheers, Wolfgang

On Thursday, 2003-07-24, 23:26, CEST, Wolfgang Thaller wrote:
[...]
I think I should start writing a Carbon<->Haskell binding (CarbonatedHaskell? CurriedCarbon?).
Why not just write an implementation (in C) of Krasimir's Port interface for the Mac?
[...]
Cheers,
Wolfgang
Ciao, the other Wolfgang ;-)

--- Axel Simon
HToolkit which is a Common API for Win and Gtk but will fail to be portable to Mac, so do you live with that and run the Gtk version in the Xfree server for Mac?
I am not agree that HToolkit will fail to be portable to Mac. The HToolkit is developed with MacOS specific things in mind and I am sure that it can be ported successfuly to MacOS. There is still missing high level abstraction for menubar but currently I work on specification based on both Aqua, Gnome and Windows Human Interface Guides. I deside this time to start from the formal specifications insted of from library API. Krasimir __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com

On Thu, Jul 24, 2003 at 02:48:38PM -0700, Krasimir Angelov wrote:
--- Axel Simon
wrote: HToolkit which is a Common API for Win and Gtk but will fail to be portable to Mac, so do you live with that and run the Gtk version in the Xfree server for Mac?
I am not agree that HToolkit will fail to be portable to Mac. The HToolkit is developed with MacOS specific things in mind and I am sure that it can be ported successfuly to MacOS. There is still missing high level abstraction for menubar but currently I work on specification based on both Aqua, Gnome and Windows Human Interface Guides. I deside this time to start from the formal specifications insted of from library API.
Krasimir, Would you be able to come to Uppsala/Stockholm? I guess we could profit from your experience. Axel.

--- Axel Simon
Krasimir,
Would you be able to come to Uppsala/Stockholm? I guess we could profit from your experience.
I really want to come to HIM but unfortunately this is impossible for me. I will try to summarize my ideas before HIM and will send the paper to gui@haskell.org. I hope that if you guys takes a concrete decision then the decision will be published at gui@haskell.org. Krasimir __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
participants (6)
-
Axel Simon
-
Bryn Keller
-
Krasimir Angelov
-
Simon Peyton-Jones
-
Wolfgang Jeltsch
-
Wolfgang Thaller