tag:blogger.com,1999:blog-21500237.post5324238822317790157..comments2023-04-29T04:08:32.247-04:00Comments on Praise, Curse, and Recurse: The Polar Game in Haskell, Day 6/12: Towards a GUI, ContinuedPaul R. Pottshttp://www.blogger.com/profile/04401509483200614806noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-21500237.post-30500844511841570632013-07-17T11:10:45.956-04:002013-07-17T11:10:45.956-04:00Just FYI, wxHaskell is working for me, at least fo...Just FYI, wxHaskell is working for me, at least for the most basic Hello World app. So maybe I'll have some more significant progress to report soon!Paul R. Pottshttps://www.blogger.com/profile/04401509483200614806noreply@blogger.comtag:blogger.com,1999:blog-21500237.post-78898155720011118862013-07-17T10:12:42.598-04:002013-07-17T10:12:42.598-04:00Thanks for reading, guys. I realize it turned out ...Thanks for reading, guys. I realize it turned out to be a pretty useless set of blog posts. I would have preferred if I'd been able to get something working and present a recipe for other people to follow rather than just a story of failure!<br /><br />I do have a quad-core Xeon Ubuntu box sitting here. I work on various platforms including Windows (when I have to). The main thing that keeps me from firing it up is that we are having a heat wave and my office is in a half-attic. The idea of firing up another computer in here fills me with dread. I fried one mobo last summer even with an air conditioner in here and I'm not eager to fry another. But I'm glad to hear it is maintained well enough to work pretty effortlessly on Linux. I'm not sure just what the issue is with the Mac libraries but it seems like it is affecting more than just this. It certainly could be because I have tinkered with this system quite a bit and built a lot of things from scratch. But judging from various comments on message boards out there, I suspect it is not.<br /><br />I will give wxWindows a shot and see how far I can get with that. I don't remember it fondly from attempting to write a cross-platform GUI a decade ago -- the code was pretty ugly then and I had to bail out and use Qt instead -- but most likely it has improved.Paul R. Pottshttps://www.blogger.com/profile/04401509483200614806noreply@blogger.comtag:blogger.com,1999:blog-21500237.post-58299243096889813962013-07-17T04:25:53.415-04:002013-07-17T04:25:53.415-04:00It's not really a Haskell problem, the problem...It's not really a Haskell problem, the problem is GTK on a Mac.<br /><br />May I suggest wxHaskell instead? It's based on wxWidgets which has an OS X backend, so should be a lot easier to install. There's also some interesting stuff going on around it, like the reactive-banana bindings for it that let you use FRP to wire up your Wx GUI's functionality.Matt Waltonhttps://www.blogger.com/profile/04683084278575333885noreply@blogger.comtag:blogger.com,1999:blog-21500237.post-29299560706092737302013-07-17T00:48:12.581-04:002013-07-17T00:48:12.581-04:00Hmm...
sudo apt-get install libghc-gtk-dev
cat &g...Hmm...<br /><br />sudo apt-get install libghc-gtk-dev<br />cat > test-gtk.hs<br />ghc test-gtk.hs<br />./test-gtk<br /><br />And there's a blank window on my screen.<br /><br />Sorry... but it's not often that a Linux fanboy gets to wag his finger at Apple for not getting something right, so we have to enjoy our moments of glory when we find them. :-)<br /><br />Seriously, a few options:<br /><br /> - Not Haskell-specific, but of the GUI toolkits I saw with Haskell stuff, something based on wxWidgets is likely your best bet. It will support native Mac OS X look-n-feel, and also port easily to Windows and Linux via GTK+. (And you can do GTK+ on Mac, but for some reason I don't suspect you're eager to try that option.)<br /><br /> - Qt would be a very close second. It's got a proven pedigree on Mac, too. The one drawback: things in the Qt world are in flux, which means that slightly older Qt code may require a little attention to get working with the latest shiny. wxWidgets is likely to have a slight edge in that department.<br /><br /> - After that, Tk has a very long reputation as a cross-platform GUI toolkit. The first GUI systems written for Python and Perl were based on Tk. That said, the link from the Haskell wiki to HTk seems dead, so maybe not.<br /><br /> - Something to consider: if you've got something like Parallels or VMWare or VirtualBox on your Mac, the path of least resistance might be to fire up an Ubuntu VM and do the tinkering in Linux. It probably could have saved you time today. OTOH, you could grow a big pain-point when it comes time to transfer your tinkerings back.<br />Jeff Licquiahttps://www.blogger.com/profile/02635921619274584156noreply@blogger.com