Re: [Haskell-cafe] Re: Haskellers hate GUIs!!
(3) conceptually rich DSL is your best friend as human-computer interface. I agree that a well-designed DSL is *my* best friend but I suspect it would be my grandma's worst enemy. And a badly-designed DSL is also everybody's worst enemy. Also a traditional GUI is discoverable without a user-manual. I can open up MS Word for the first time and get around - Emacs, while vastly more powerful, is also vastly more opaque. -deech ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskellers hate GUIs!!
DSL shold be user-specific knoledge discovery (bidirectionally)though transferable as skill. This is interesting. I am always looking for new ideas in GUI design. Could you elaborate on this? Do you have examples of where this has been successful? -deech ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskellers hate GUIs!!
Never been a fan of GTK myself, but that's because I was a KDE developer I guess :-). Having said that, are there any plans to make it really easy to get gtk2hs working on Mac OS X? Dave On Fri, Apr 2, 2010 at 6:34 AM, Andy Stewart lazycat.mana...@gmail.comwrote: Hi Jürgen, For GHC-6.12, just darcs version support. So please download darcs version. Axel has working on that make gtk2hs build on cabal. And i'm working on update All gtk2hs API to Gtk+ 2.18.3 (have finish 99%), i can finish all APIs in later days. Axel have finish some sub-modules on http://www2.in.tum.de/~simona/ (Note, above cabal packages not include patches i push recently) After we finsh work, we can merge gtk2hs into Haskell Platform. Because gtk2hs just interface code for low-level C library, so it's stable enough. As recently so much new code push in gtk2hs, perhaps have bug. So please report any problem on gtk2hs mail-list, we can fix it as soon as we can. -- Haskller GUI lover Jürgen Nicklisch-Franken j...@arcor.de writes: I am in the damned position to have tried to develop a GUI app in Haskell. I'm building on top of gtk2hs, now we have a new compiler version a new Platform release and no gtk2hs release, so I cite from a mail from a potential user/contributor for my GUI app. What shall I say, how should he install gtk2hs? Is their a way to get a stable version from a changing darcs repo? If not all Haskellers were such GUI haters, we would have GUI libs with the platform. Jürgen ... Each gtk2hs package (like glib-0.10.1) installed in that non-standard location by Ubuntu apt-get does at least have a package.conf file, like glib.package.conf. However, on inspection, the id fields are missing, and the depends fields look more like .cabal file depends fields (no ABI ID). I tried an experiment on my glib.package.conf, used ghc --abi-hash to generate an ID, so eventually creating a new line something like id: glib-0.10.1-d41d8cd98f00b204e9800998ecf8427e and then set up the depends properly by getting the real dependencies using ghc-pkg -v list. After doing this then ghc-pkg register glib.package.conf worked just fine, and I see it in my global DB. It's cool that this works but it seems highly roundabout. :-) Building gtk2hs from source is broken. Not sure why - I did it OK with ghc-6.10.3. I can run ./configure no problem with ./configure --with-hcflags=-O0 --disable-split-objs --with-ghc=/usr/local/lib/ghc-6.12.1 and it claims that it will build: * The following packages will be built: * * glib : yes * gtk: yes * gio: yes * glade : yes * cairo : yes * svgcairo : yes * gtkglext : no * gconf : yes * sourceview : no * gtksourceview2 : yes * mozembed : no * soegtk : yes * gnomevfs : no * gstreamer : yes * documentation : no But make fails horribly...can't find any packages like base that configure had no problems finding, so I have no idea what the problem is there. Which is why I'd rather figure out a way to make ghc-6.12.1 recognize the gtk2hs packages that I have in that non-standard location. It works but it's awkward. :-) Each gtk2hs package (like glib-0.10.1) installed in that non-standard location by Ubuntu apt-get does at least have a package.conf file, like glib.package.conf. However, on inspection, the id fields are missing, and the depends fields look more like .cabal file depends fields (no ABI ID). I tried an experiment on my glib.package.conf, used ghc --abi-hash to generate an ID, so eventually creating a new line something like id: glib-0.10.1-d41d8cd98f00b204e9800998ecf8427e and then set up the depends properly by getting the real dependencies using ghc-pkg -v list. After doing this then ghc-pkg register glib.package.conf worked just fine, and I see it in my global DB. It's cool that this works but it seems highly roundabout. :-) I think I'll pack it in for the evening. The procedure I described works well in theory, but apparently if the depends field in the package conf files says something like foo-2.0.1.0, it's not OK to use
Re: [Haskell-cafe] Re: Haskellers hate GUIs!!
On Fri, Apr 02, 2010 at 07:41:38AM -0700, David Leimbach wrote: Having said that, are there any plans to make it really easy to get gtk2hs working on Mac OS X? I think this is an important issue in developing run-of-the-mill GUI apps in Haskell. I recently wrote a small application using gtk2hs, but found it nearly impossible to deploy. I developed it on Linux (where installing all the infrastructure is not too hard, or at least people are used to doing so), but the work required to get it to run on MacOS X seemed extreme. I ended up rewriting it in another language (due to time pressure) and I'm a little wary of attempting to use Haskell again for developing such an application. I didn't even try getting it to work on Windows; maybe that's easier. On the plus side, I found developing with gtk2hs to be straightforward. Is there a general strategy for deploying Haskell apps, graphical or no, to MacOS X and/or Windows? I'm especially interested in cases where the application uses some heavyweight libraries like OpenGL. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskellers hate GUIs!!
On 2 April 2010 17:53, Dominic Espinosa dces...@fastmail.fm wrote: [SNIP] I ended up rewriting it in another language (due to time pressure) and I'm a little wary of attempting to use Haskell again for developing such an application. Hi Dominic Out of curiosity what language did you choose instead? Each time a thread comes up on the Cafe documenting GUI woes, I always wonder if Python or other languages[*] have such problems and if not why not. [*] Obviously Java and C# have benefited from a large industrial investment so have solved their GUI problems by dollars. Best wishes Stephen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskellers hate GUIs!!
On Fri, Apr 2, 2010 at 12:53 PM, Dominic Espinosa dces...@fastmail.fm wrote: Is there a general strategy for deploying Haskell apps, graphical or no, to MacOS X and/or Windows? I'm especially interested in cases where the application uses some heavyweight libraries like OpenGL. I have a GUI app that I deploy on Mac and Linux that uses OpenGL and wxHaskell. It has been a pretty good experience, but getting wx set up on every development machine is hairier than cabal install. The good news is that it was easy to set up a pure GLUT front end as well as a wx one that both use the same OpenGL code for rendering graphically intensive bits. I just have two build targets to switch between the two. For general cross-platform GUI apps that I need in a pinch, I turn to PLT Scheme. They have a really excellent system in this regard. Anthony ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskellers hate GUIs!!
Stephen Tetley stephen.tet...@gmail.com disse: On 2 April 2010 17:53, Dominic Espinosa dces...@fastmail.fm wrote: [SNIP] I ended up rewriting it in another language (due to time pressure) and I'm a little wary of attempting to use Haskell again for developing such an application. Hi Dominic Out of curiosity what language did you choose instead? Each time a thread comes up on the Cafe documenting GUI woes, I always wonder if Python or other languages[*] have such problems and if not why not. For better or worse python interpreter comes with Tk. So, if you develop your application to use Tk, as ugly as it may look, it will work in every platform supported by the python interpreter. However, if you want to use pygtk, you still have to install gtk runtime. When using haskell, can't you just make a static binary on MacOS and Windows, though? Why wouldn't that work? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskellers hate GUIs!!
On Apr 2, 2010, at 10:41 , David Leimbach wrote: Having said that, are there any plans to make it really easy to get gtk2hs working on Mac OS X? It's in MacPorts. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon universityKF8NH PGP.sig Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskellers hate GUIs!!
On 2 April 2010 20:15, Brandon S. Allbery KF8NH allb...@ece.cmu.edu wrote: On Apr 2, 2010, at 10:41 , David Leimbach wrote: Having said that, are there any plans to make it really easy to get gtk2hs working on Mac OS X? It's in MacPorts. But that's the variant using X11, no? There now is a Gtk+ framework, which worked well but was missing some common extensions last time I checked (e.g., sourceview). Unfortunately, the website hosting it has been down for a while now (http://www.gtk-osx.org) and I don't know whether it's available somewhere else. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Push the envelope. Watch it bend. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskellers hate GUIs!!
On Apr 2, 2010, at 15:21 , Thomas Schilling wrote: On 2 April 2010 20:15, Brandon S. Allbery KF8NH allb...@ece.cmu.edu wrote: On Apr 2, 2010, at 10:41 , David Leimbach wrote: Having said that, are there any plans to make it really easy to get gtk2hs working on Mac OS X? It's in MacPorts. But that's the variant using X11, no? There now is a Gtk+ framework, port variants gtk2hs reports a +no_x11 option, which for Gtk+ stuff in MacPorts means it uses one of the native Gtk+ frameworks (there were two last I checked, one not being developed any more). Both of them are missing various things, sadly. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon universityKF8NH PGP.sig Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskellers hate GUIs!!
On Fri, Apr 2, 2010 at 10:31 AM, Anthony Cowley acow...@seas.upenn.eduwrote: On Fri, Apr 2, 2010 at 12:53 PM, Dominic Espinosa dces...@fastmail.fm wrote: Is there a general strategy for deploying Haskell apps, graphical or no, to MacOS X and/or Windows? I'm especially interested in cases where the application uses some heavyweight libraries like OpenGL. I have a GUI app that I deploy on Mac and Linux that uses OpenGL and wxHaskell. It has been a pretty good experience, but getting wx set up on every development machine is hairier than cabal install. The good news is that it was easy to set up a pure GLUT front end as well as a wx one that both use the same OpenGL code for rendering graphically intensive bits. I just have two build targets to switch between the two. For general cross-platform GUI apps that I need in a pinch, I turn to PLT Scheme. They have a really excellent system in this regard. Yeah PLT is pretty awesome... But I think they're calling it Racket now. :-) http://www.plt-racket.org/new-name.html Anthony ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskellers hate GUIs!!
On Apr 2, 2010, at 15:21 , Thomas Schilling wrote: On 2 April 2010 20:15, Brandon S. Allbery KF8NH allb...@ece.cmu.edu wrote: On Apr 2, 2010, at 10:41 , David Leimbach wrote: Having said that, are there any plans to make it really easy to get gtk2hs working on Mac OS X? It's in MacPorts. But that's the variant using X11, no? There now is a Gtk+ framework, BTW, native Cocoa support is now part of the standard Gtk+ distribution. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon universityKF8NH PGP.sig Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskellers hate GUIs!!
On 2 Apr 2010, at 21:01, Brandon S. Allbery KF8NH wrote: On Apr 2, 2010, at 15:21 , Thomas Schilling wrote: On 2 April 2010 20:15, Brandon S. Allbery KF8NH allb...@ece.cmu.edu wrote: On Apr 2, 2010, at 10:41 , David Leimbach wrote: Having said that, are there any plans to make it really easy to get gtk2hs working on Mac OS X? It's in MacPorts. But that's the variant using X11, no? There now is a Gtk+ framework, BTW, native Cocoa support is now part of the standard Gtk+ distribution. Unfortunately, it still doesn't behave anything like a Cocoa application.___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskellers hate GUIs!!
On Fri, Apr 02, 2010 at 06:11:52PM +0100, Stephen Tetley wrote: On 2 April 2010 17:53, Dominic Espinosa dces...@fastmail.fm wrote: [SNIP] I ended up rewriting it in another language (due to time pressure) and I'm a little wary of attempting to use Haskell again for developing such an application. Out of curiosity what language did you choose instead? Some algol-like language purporting to have cross-platform GUI support, widely used by others in our department. I think the name started with J. I did not enjoy the rewrite. The Haskell code was a lot nicer (and shorter). However, the application had to be deployed to arbitrary MacBook users, and the process of installing the Haskell infrastructure plus MacPorts plus the MacPort of gtk2hs (which had a lot of dependencies, if I remember correctly) seemed too arduous to expect all Mac-based users of my application to go through, especially when battling the what is this 'Haskell' business? why didn't you use blub, like a normal person? sentiment. Is there an easier way? The process of using cabal-install on Linux is similar, but the 'distribution culture' there is a lot different. I fully expect to install packages and their dependencies with a package manager, or at least download and compile a tarball, and tend to be suspicious of binary-only releases. But they are the norm on those two other platforms. It would be nice if there were a quick way of generating such packages. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskellers hate GUIs!!
This may not be helpful for you, but when I did GUI stuff with haskell I wrote the GUI part in c++ with fltk, exposed a medium-level api specific to that gui, and then call that api through the FFI. This is sort of like the web browser + backend thing, except switch c++ and fltk for javascript and the browser, and you are making synchronous FFI function calls instead of sending asynchronous JSON messages. It has worked well for me so far, but my GUIs are all simple with well defined interaction with the backend (i.e. backend says add these 15 items and GUI says user selected this item). If you have complicated interaction between backend and GUI you may get tired implementing a large API and lots of marshal/unmarshal. Of course you could still pass data via JSON or protobufs or something, and there are various tools to automate wrapping large numbers of C calls. In terms of distribution, you get a single binary and fltk is designed for static linking. You can run on X, mac, and windows, though it doesn't look like a native app on any. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe