4 ms·
On a related note: The article (quite reasonably) avoids discussion of the graphics library, but I want to know more about that side of things. I wish graphics
by jarrett 12y ago
On a related note: The article (quite reasonably) avoids discussion of the graphics library, but I want to know more about that side of things. I wish graphics got more attention in the Haskell ecosystem in general.
The options right now are pretty dismal. There is quite literally not a single Haskell graphics or GUI package that I've been able to install on OS X. I'd love to use Haskell to build games or desktop GUI apps, but without a library for OpenGL, windowing, etc., it's not practical.
This isn't just whining, though. I bring this up to ask: What can I, as a relatively green Haskell developer, do to improve the situation? Is there a realistic path for a new Haskell user to get involved in the package ecosystem?
I'd be willing to bet that a great many developers like me wanted to try Haskell, but gave up when they found out how many Cabal packages don't compile. I think fixing that would do a lot for Haskell's mainstream acceptance.
- sgerrand 12y agoHave you looked at the Haskell QML bindings? They generally work for cross platform requirements. http://hackage.haskell.org/package/hsqml-0.1.1/docs/Graphics-QML.html http://hackage.haskell.org/package/hsqml-0.1.1/docs/Graphics...
- jarrett 12y agoYes. It does not compile on my Mavericks machine. Same with every graphics package I've tried.
- dllthomas 12y agoGet in touch with the developers and work with them to get it building. Often times they don't have access to your platform, so just being that helps. Anything you can do on top of that is gravy.
- jarrett 12y agoSometimes I do. Often, if a Haskell package doesn't have a Github repo, I don't know how to contact the developers or submit a bug report. Is there a standard place on Hackage or in ghc-pkg where one can find that info?
- dllthomas 12y ago"Is there a standard place on Hackage or in ghc-pkg where one can find that info?" Both! It's in the ghc-pkg dump output, though there's doubtless a better way at getting at that. As for Hackage, if you just pare the above link back to https://hackage.haskell.org/package/hsqml https://hackage.haskell.org/package/hsqml you'll find package meta-info which includes: Author Robin KAY Maintainer komadori@gekkou.co.uk Home page http://www.gekkou.co.uk/software/hsqml/ Source repository head: darcs get http://hub.darcs.net/komadori/HsQML/
- VMG 12y agoWhile what you suggest is reasonable and the right thing to do, it just highlights the original point. The state of UI bindings is pretty bad.
- dllthomas 12y agoI wasn't making any point. Fwiw, I have been able to meet my own (quite limited) gui needs in Haskell with gtk... Edit: On reflection, I find your assertion a little strange here. Anecdotal failure to build on one particular setup doesn't seem like a particular highlighting of bad bindings.
- mokus 12y agoI can add another anecdote. In almost 10 years now of using Haskell on Mac, Linux and Windows, I've never once had any success building any GUI binding for Mac OS, despite trying every one I could find (gtkhs included) at least once a year on many different OS/hardware combinations. (unless you count HOC, but I never actually got it working as-was - I brought it back from bit-rot on a couple occasions, adding ObjC 2 support and rewriting a fair chunk of the low-level stuff, but never did find the time to update the fragile header-parsing stuff for the actual Cocoa-binding generator)
- dllthomas 12y agoHuh. It is sounding like there's an issue with Mac GUIs, then. Maybe the Mac/Haskell overlap is just too small? Both are small-to-niche... It would probably make sense to get a group oriented around getting that fixed up. For myself, I'm meeting my needs - and both 1) more GUI apps and 2) more Mac support are almost entirely orthogonal to them, so I'm not likely to participate.
- jarrett 12y ago> Maybe the Mac/Haskell overlap is just too small? Probably so. Though I would suggest that the neither one is a small niche in itself. Mac especially--it's the favored platform for every developer I know except one. Yes, it's less popular outside tech circles (probably due in part to the price). Imagine this scenario: There are tons of Mac users who want to learn Haskell. They try it, but can't install libraries. The Haskell community never hears from them; one could say the system failed silently. Meanwhile, Linux works fine, and the Haskell-Linux community keeps growing. So perhaps there's a self-reinforcing Linux-centric bias in the developer population.
- codygman 12y agoI'll try installing QML on mavericks tomorrow and debugging it. Feel free to list anymore that failed to compile for you and I'll try to do the same for those.
- creichert 12y agoHave you tried using cabal sandboxes to work around your build issues?
- komadori 12y agoI do try and make sure that HsQML works on Windows and MacOS in addition to Linux. Although, I admit I haven't tried MacOS 10.9 as my Mac is still running 10.8. I don't think I've ever been contacted concerning issues with Windows or MacOS, which is probably indictative of the size of the user base combined with probability of any one person deciding to go to the effort. On the other hand, I have fixed genuine build failures for Linux users because the platform is diverse enough that it "worked on my system" but not theirs. In any case, my contact details are on the HsQML Hackage page. If you'd like to send me the error message you're seeing, I'd be happy to try and help you get it working.
- creichert 12y agoThe QML bindings are great! They are still fairly new and lacking some features but it seems as though Qt5 support was just added.
- tree_of_item 12y agoAs a fellow green Haskell developer, I get the sense that the best option is going to be GHCJS[0]. The browser is far and away the best environment for graphics programming because of its ubiquity and easy to use APIs. Sure, someone could step up to the plate and write a nice, idiomatic wrapper for SDL and OpenGL and whatever, but a good Haskell library that targets the browser would spread like wildfire in comparison. [0] https://github.com/ghcjs/ghcjs https://github.com/ghcjs/ghcjs
- jarrett 12y agoI hear that, and I hope that project works out. But I'm still interested in developing native apps. There's a reason so many professional applications (games, intensive apps like Photoshop and Blender, etc) are still native. You may have seen The Birth and Death of JavaScript: https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript https://www.destroyallsoftware.com/talks/the-birth-and-death... I don't know whether that prediction will come true. But obviously it hasn't thus far. For now, if I need native performance, I need native code. Sadly, that means C, C++, or Java until such time as Haskell libraries compile reliably.
- tieTYT 12y agoIt's not just OSX, it's a problem (in general) on windows, too. I was trying to create my first haskell project as a web crawler. Every direction I turned I had issues installing libraries to the point where I decided it's a deal breaker because I can't write code on my preferred OS. Even if they eventually make these transitive dependencies OS agnostic, the libraries that already exist will depend on the versions that aren't. > I'd be willing to bet that a great many developers like me wanted to try Haskell, but gave up when they found out how many Cabal packages don't compile. I think fixing that would do a lot for Haskell's mainstream acceptance. Exactly what happened to me.
- qubitcoder 12y agoLikewise. The more I learn about Haskell, the more I've blown away by it's power and elegance. It's been a deeply rewarding experience. But spending days fixing dependencies to update the compiler on OSX and linux, followed by Cabal packages failing to compile is no fun. Hopefully the increased attention Haskell is receiving nowadays will help resolve these growing pains.
- jarrett 12y agoTo make this discussion more concrete, here are some problems I've thus far found on the Mac: - GHC ships with the wrong compiler path for (some version s of?) OS X, causing various C-related stuff to fail. https://gist.github.com/cartazio/7131371 https://gist.github.com/cartazio/7131371 - ghc-pkg gets itself into an error state pretty quickly after installing a fresh Haskell Platform, and ghc-pkg recache must be run. - You must manually request the latest version of cabal-install. cabal install cabal-install by default gives you a version without sandboxes. These are just a few of the issues that come to mind; I've run into quite a few more in my Haskell explorations. You can imagine how this state of affairs would cause a lot of developers to give up. I'm not at all blaming anyone in the truly wonderful Haskell community. Everything about Haskell is done volunteers, and I'm grateful for their work. I'm just offering a theory as to why Haskell hasn't been embraced as warmly as, say, Node or Go.
- dllthomas 12y ago"- You must manually request the latest version of cabal-install. cabal install cabal-install by default gives you a version without sandboxes." So far as I'm aware, doing a cabal update cabal install cabal-install should always get you the latest version of cabal-install. One thing people encounter frequently, that may be confused for this, is that cabal doesn't install things system-wide, and so you have to 1) make sure that the place cabal is installing things is in your path, and 2) possibly make sure your shell hasn't cashed the location of the old system-wide version of cabal. It's totally possible that there's a bug that's more specifically as you describe that I just haven't heard of, of course - just trying to help if I'm able.