News for hackers. Stuff that matters.
Re:Making a GTK Video Player with Haskell by CyberDildonics on Sunday September 03, 2017 @08:44AM (#15161151)
Is there any fully formed application made with Haskell out there?
Re:Making a GTK Video Player with Haskell by mrkgnao on Sunday September 03, 2017 @08:52AM (#15161182)
Pandoc, the "universal document converter", is a good example of a large, feature-complete Haskell project in wide use.

https://pandoc.org/

Most people who use it aren't aware it's written in Haskell!

Re:Making a GTK Video Player with Haskell by HugoDaniel on Sunday September 03, 2017 @09:35AM (#15161334)
Re:Making a GTK Video Player with Haskell by CyberDildonics on Monday September 04, 2017 @12:43PM (#15169316)
Those are languages
Re:Making a GTK Video Player with Haskell by clample on Monday September 04, 2017 @03:02PM (#15170207)
The Elm and Purescript compilers are written in Haskell though.
Re:Making a GTK Video Player with Haskell by progman on Sunday September 03, 2017 @09:55AM (#15161414)
The examples mentioned in the other posts confirm my impression that Haskell is a good language for text processing and server applications but a pain for writing rich desktop applications.

One of the things I miss in Haskell is a way to compile to C, and a convenient declarative GUI which also compiles to C so that all code can be linked together, and distributed as a single binary. The GUI doesn't need to be native. Lisp has its own GUI (McCLIM), Smalltalk has one (Squeak), Rust has one (Conrod), why not Haskell?

Re:Making a GTK Video Player with Haskell by mrkgnao on Sunday September 03, 2017 @01:08PM (#15162533)
I'm currently playing with Reflex, a wonderful functional reactive programming library that lets you compile the same code into into webapps with GHCJS (a JavaScript backend for GHC) or into standalone desktop apps (using WebKitGTK).

It's wonderfully expressive and doesn't feel like you're painfully imitating C++ in Haskell. On the contrary, it's very idiomatic.

https://github.com/reflex-frp/reflex

However, FRP is ... unusual, and takes a bit of time to get the hang of.

Here's a stripped-down todo app "tutorial" in Reflex:

https://gist.github.com/mrkgnao/1a5c06cc1e188f2238c8c11cb74e...

And this is a full-featured TodoMVC in Reflex:

https://github.com/reflex-frp/reflex-todomvc

--

FLTK is a GUI toolkit that has Haskell bindings. It's a very C++-like API, but the library is in heavy development.

https://github.com/deech/fltkhs

The developer is also quite friendly, and I believe there are good docs. Here are a few demos:

https://github.com/deech/fltkhs-demos

Also, GHC does have a C backend, afaik, although it's deprecated nowadays and only available if you build it yourself in "unregisterised mode", which people do when porting GHC to a new architecture.

Re:Making a GTK Video Player with Haskell by nickpsecurity on Sunday September 03, 2017 @01:02PM (#15162503)
Red uses DSL's to make it pretty easy. It's a REBOL-like language that's easy to parse and macro kind of like LISP. Here's an early demo of how that looks with examples:

http://www.red-lang.org/2016/03/060-red-gui-system.html

I don't know Haskell but I know Galois does DSL's like Ivory language with it. So, I imagine doing something like Red's GUI in Haskell would be worth exploring. Alternatively, building such a clean abstraction on top of a cross-platform library with messy stuff generated automatically from DSL version.

Re:Making a GTK Video Player with Haskell by willtim on Sunday September 03, 2017 @01:25PM (#15162621)
Most rich desktop APIs are very imperative and the Haskell bindings are often just a thin veneer on top. For an example of a really nice Haskell UI API, see threepenny-gui:

https://github.com/HeinrichApfelmus/threepenny-gui/blob/mast...

Re:Making a GTK Video Player with Haskell by orbifold on Sunday September 03, 2017 @10:09AM (#15161479)
I think pretty much any Language is a pain to write GUIs in, a single property dialogue in photoshop is ~6k loc in C++...
Re:Making a GTK Video Player with Haskell by progman on Sunday September 03, 2017 @10:22AM (#15161540)
Pascal (Delphi, Lazarus) and Visual Basic are exact counter examples. They demonstrate how easy and convenient GUI development can be.
Re:Making a GTK Video Player with Haskell by tentaTherapist on Sunday September 03, 2017 @03:24PM (#15163323)
I really hope I'm wrong, but if you're talking about VB.NET, then my personal experience with it has been the exact opposite of easy and convenient.

Edit: Okay, good, VB.NET is probably not the Visual Basic you were talking about. Thanks for the history lesson!

Re:Making a GTK Video Player with Haskell by CyberDildonics on Monday September 04, 2017 @12:46PM (#15169335)
Why would some ridiculous plug in API mean that every language is a pain to write GUIs in?
Re:Making a GTK Video Player with Haskell by taeric on Sunday September 03, 2017 @01:08PM (#15162534)
To be fair. Good desktop applications pretty much require teams and are more about user acceptance than metrics you can capture in the type system. Or tests.
Re:Making a GTK Video Player with Haskell by psibi on Sunday September 03, 2017 @09:10AM (#15161244)
Besides the example stated here, there is also shellcheck: https://www.shellcheck.net/
Re:Making a GTK Video Player with Haskell by arnon on Sunday September 03, 2017 @10:02AM (#15161446)
GPU Database SQream DB's (http://www.sqream.com) main component is Haskell based, in two parts:

1. The open source SQL parser - HsSqlPpp https://github.com/jakewheat/hssqlppp, 35700 LOC + 3900 LOC of tests

2. The compiler and optimizer (proprietary) is roughly 55,000 Haskell LOC

Edit: And we use Pandoc and Quickcheck internally for a bunch of different things

Re:Making a GTK Video Player with Haskell by phaer on Sunday September 03, 2017 @08:58AM (#15161207)
Besides pandoc: xmonad, hledger, git annex, gitit, hakyll and probably quite a few more ;)
Re:Making a GTK Video Player with Haskell by wyager on Sunday September 03, 2017 @10:31AM (#15161586)
People have mentioned a few here, but I'd say that Haskell's current ecosystem is much more directed towards building infrastructure than user-facing apps. Indeed, most popular Haskell programs are command-line utilities rather than "applications" in the modern sense. Most companies that use Haskell also use it to make robust infrastructure rather than, say, user-facing apps or webpages.

I think it's hard to find many modern applications (I.e. some software package with a UI) made in anything outside of a few choice languages like JS, C++, C#, or Swift.

Re:Making a GTK Video Player with Haskell by __s on Sunday September 03, 2017 @09:26AM (#15161298)
https://www.quora.com/What-is-the-largest-commercial-program...

I implemented a fractal zoomer, but it might be too simple to meet your vague "fully formed": https://github.com/serprex/Fractaler

Re:Making a GTK Video Player with Haskell by dom0 on Sunday September 03, 2017 @11:27AM (#15161899)
llpp, depending on your definition of "fully formed".

And there is/was a tiling window manager, but everyone I know who used it at some point migrated away because the configuration was Haskell as well.

Re:Making a GTK Video Player with Haskell by SuperPaintMan on Sunday September 03, 2017 @11:35AM (#15161951)
Xmonad!

Still use it with gnome and it's the only reason I can half read Haskell!

Re:Making a GTK Video Player with Haskell by feanaro on Sunday September 03, 2017 @12:48PM (#15162432)
llpp is (mostly) written in OCaml.
Re:Making a GTK Video Player with Haskell by zem on Sunday September 03, 2017 @02:44PM (#15163074)
still using it. only tiling wm I've found that plays well with desktop environments.
Re:Making a GTK Video Player with Haskell by swiley on Sunday September 03, 2017 @08:50AM (#15161170)
Pandoc, I use that heavily for homework.
Re:Making a GTK Video Player with Haskell by zeckalpha on Sunday September 03, 2017 @12:16PM (#15162201)