
Software projects written in Haskell - lelf
https://serokell.io/blog/top-software-written-in-haskell
======
rkrzr
At Channable, we have had a great experience introducing Haskell for our
infrastructure projects. We have written a few blog posts about this which you
can find on our tech blog[1].

\- Jobmachine, an advanced job-scheduling system with dynamic dependency
resolution[2]

\- Vaultenv, a small open-source tool to get secrets from Hashicorp
vault[3][4]

\- alfred-margaret, a blazingly-fast Aho-Corasick implementation written in
Haskell[5][6]

\- Sharkmachine, our in-house replacement for Apache Spark[7]

[1]: [https://tech.channable.com/](https://tech.channable.com/)

[2]: [https://tech.channable.com/posts/2017-02-24-how-we-
secretly-...](https://tech.channable.com/posts/2017-02-24-how-we-secretly-
introduced-haskell-and-got-away-with-it.html)

[3]: [https://tech.channable.com/posts/2017-07-06-introducing-
vaul...](https://tech.channable.com/posts/2017-07-06-introducing-vaultenv-
keeping-your-secrets-safe-with-vault-and-haskell.html)

[4]:
[https://github.com/channable/vaultenv](https://github.com/channable/vaultenv)

[5]: [https://tech.channable.com/posts/2019-03-13-how-we-made-
hask...](https://tech.channable.com/posts/2019-03-13-how-we-made-haskell-
search-strings-as-fast-as-rust.html)

[6]: [https://github.com/channable/alfred-
margaret](https://github.com/channable/alfred-margaret)

[7]: [https://tech.channable.com/posts/2019-10-04-why-we-
decided-t...](https://tech.channable.com/posts/2019-10-04-why-we-decided-to-
go-for-the-big-rewrite.html)

~~~
silvester23
I could not find jobmachine on your GitHub page, am I correct in assuming it's
not open source?

We are currently in the process of building something similar and it would
have been interesting to see your approach in more detail.

~~~
rkrzr
Yes, you are correct. We have not open-sourced Jobmachine yet, since it is
still pretty specific for our workload, but I hope we can generalize and open-
source it in the future.

~~~
snagglegaggle
Don't wait to fix it. If you want to release it ask for it to be released.
Doing anything else is being fake-open-source; the real reason you don't want
to release it is because of some value you think it has, not that it would
actively hurt other people through its design (how...?).

------
RcouF1uZ4gsC
This leaves out my favorite project written in Haskell: Pandoc.

[https://pandoc.org/](https://pandoc.org/)

Pandoc is an amazing piece of software that can convert between all kinds of
document formats.

~~~
meerita
It's amazing it's done in Haskell. I never knew this. I used it couple of
times to convert docs. I also installed it many times with the gem bundler
system for my rails, middleman app projects.

~~~
jle
when you think about it, not toooo surprising. Haskell's undeniable killer app
is parsing and compilation, so pandoc was pretty much a project destined for
Haskell if I ever saw one :)

------
dcl
This is my experience with haskell:

I work for a small data science consulting company whose major components of a
machine learning pipeline were written in haskell. The company got bought by a
large corporate and shortly after, all the haskell developers left, leaving a
handful of people (including myself) who didn't know how to use or maintain
the major components of a multi million dollar acquisition. It is in the
process of being scrapped and replaced with a more typical software stack.

Hilarious times.

~~~
baot
They can't afford a few thousand for training, so spend more thousands
rewriting? The original Haskell devs had to learn, too.

~~~
empath75
You can’t just train any software developer to code in Haskell. It’s not an
easy language to learn and a lot of programmers don’t want to learn it. And
even if they managed to train up the current staff, they will either have to
continuously hire Haskell programmers or continuously hire people who don’t
know Haskell and hope they’re able to learn it.

~~~
the_af
> _[Haskell is] not an easy language to learn_

To be fair, purportedly "easy" languages such as Java aren't actually easy.
True, a lot of people can write (or copy paste from online articles) crappy
Java code full of bugs and performance issues and nobody will notice since
this low quality seems to be some kind of industry standard. But there aren't
that many _good_ Java developers either.

A similar argument used to be made about PHP: anyone can use it. To write poor
software, that is.

As for Haskell: it's different enough to Java-like and C-like languages that
it's difficult to wrap your mind about it if you come from those languages.
But if you start fresh, it's not that hard. Some years ago someone here on HN
posted pretty good results when teaching Haskell _to kids_. Young kids pick it
up surprisingly fast. It's not _inherently_ difficult, and in fact some of its
concepts may be easier to grasp than traditional imperative languages. (And
no, you don't need to understand category theory at all in order to program
with Haskell).

~~~
Silhouette
_As for Haskell ... if you start fresh, it 's not that hard._

I'm going to respectfully disagree with that.

I do understand the point you're making. In fact, my own experience of having
taught beginners without preconceptions to program is consistent with that
point.

However, the "scale" of a language (including all the strange edge cases) is
very relevant for production use and particularly maintenance. Even if you
stick to a core of widely understood language features and libraries yourself,
you might still have to maintain code written _by someone else_ that uses more
obscure features or complicated interactions between features.

For Haskell, that "scale" is usually determined in practice by GHC plus
whatever language extensions anyone has turned on plus whatever libraries
they've found from Hackage or elsewhere. Those language extensions are
numerous, and they can not only add new language features but also change
existing code to behave in different and potentially unexpected ways. As a
platform for research and development of programming language concepts, that
is a benefit. As a practical programming language for production use, it is a
_huge_ liability.

~~~
lostcolony
The scale of Java is also insane. The standard library is huge. The commonly
leveraged frameworks, also huge. And the abstraction...my God, the unnecessary
abstraction.

How many people, offhand, know the difference between a Runnable, Callable,
Function, Consumer, and Supplier? I include all of them because literally the
only meaningful difference between them is whether they take an argument or
not (Function and Consumer do), and whether they return an argument or not
(Callable, Function, and Supplier do).

How many people know the difference between a Future, a CompletableFuture, a
RunnableFuture, a ScheduledFuture, a ScheduledRunnableFuture, and a
FutureTask? I've done async code in Java; I still can't keep them straight.

~~~
orclev
I'll give a shot at the last one:

Future is something that will eventually produce a value.

CompletableFuture is a Future that you can register a callback on for when it
completes.

RunnableFuture I'm not completely sure on, but I'd guess it's a Future that
will complete but won't produce a value (basically a Future<Void>).

ScheduledFuture is a Future that you can specify when it should run in the
future.

ScheduleRunnableFuture is a RunnableFuture that has a defined time it should
start running.

FutureTask is a RunnableFuture you can cancel. OK, so I cheated on this one, I
didn't actually know what it was and had to look it up.

Edit: I looked up RunnableFuture and I was half right. It's something that's
both a Runnable and a Future, so it has a run() method that causes the future
to be evaluated but doesn't return its result at that time. It actually seems
pretty niche and probably only useful if you already have some API that's
expecting a Runnable, otherwise it's exactly equivalent to calling get() on a
Future then ignoring the returned value.

~~~
lostcolony
Cool; next question - you have a library that returns Futures. You have
another library that takes CompletableFutures. How do you feed the output of
the first into the input of the second?

Also, as a note, FutureTask is the only implemented class out of those; the
others are all interfaces.

------
Dowwie
There is a growing number of stories in the wild of companies who were burned
for using Haskell. Common patterns of struggle are emerging. You aren't
reading about them because people aren't eager to share their failures with
the world, just yet. Proceed with caution, especially in the startup realm.

~~~
seddona
As a counterpoint - at CircuitHub, we migrated from NodeJS / Angular to
Haskell / Elm and couldn't be happier.

I think a core reason for our success is that we built our team from
experienced developers that had built large applications in other languages.
Then arrived at Haskell as a better solution.

I have heard some negative experiences that I would attribute to a few
different factors.

1\. Lack of Haskell experience in the early team. 2\. Lack of experience
building large real-world applications (too academic) 3\. The startup/group
didn't achieve product-market fit, and Haskell was scapegoated.

None of these problems are Haskell specific, just run of the mill team issues.

~~~
sokoloff
How common is it for the same person to have both strong Haskell experience
_and_ experience building large real-world applications?

I’ve tried to find a way to use Haskell (lacking strong experience there, but
with lots of large app experience), and I’ve not managed to find a situation
where pulling the trigger makes sense because of the risk of getting “stuck”
with a poor path out.

~~~
FpUser
In tech world languages are like a religion. Their choice does not really have
to make sense. Hence unless it is 100% total proven failure the affiliates
will try any means to protect/advocate/spread whatever language they like.

~~~
Koshkin
This is an inconvenient truth.

------
unhammer
While we're at it:

\- [https://postgrest.org/](https://postgrest.org/)

\- [https://www.shellcheck.net/](https://www.shellcheck.net/)

\- [https://xmonad.org/](https://xmonad.org/)

\- [https://www.costarastrology.com/](https://www.costarastrology.com/)

------
devxpy
[https://hasura.io](https://hasura.io)

~~~
markhalonen
I considered Hasura but went with postgraphile
([https://github.com/graphile/postgraphile](https://github.com/graphile/postgraphile))
because it's written in JavaScript with a plugin architecture, meaning I can
easily add my own plugins into the system down the road. Creating a JavaScript
plugin sounds much less daunting that looking into a mature Haskell codebase.

~~~
devxpy
Thanks, that looks great. Was recently struggling to add custom graphql
functions to hassura (preferably in python). But I guess js is a fair trade.

~~~
tirumaraiselvan
Hey, have you seen the preview docs of hasura actions? It has a small example
of integrating python (or for that matter, any language) for custom mutations.

~~~
devxpy
Hi! Thanks for following up.

I can't find anything specifically called "hasura actions". Found this[1], but
that has nothing to do with language integration.

[1] [https://docs.hasura.io/1.0/graphql/manual/guides/auditing-
ta...](https://docs.hasura.io/1.0/graphql/manual/guides/auditing-
tables.html#auditing-actions-on-tables-in-postgres)

~~~
tirumaraiselvan
Sorry, it is actually in preview and not officially released yet. You can get
the preview image, docs, etc in the PR: [https://github.com/hasura/graphql-
engine/pull/3042](https://github.com/hasura/graphql-engine/pull/3042)

------
gridlockd
For me, one of the biggest non-starters is a slow compiler, or rather a
compiler that doesn't scale well. When people talk about how smart their type
system or their compiler is, it immediately rings alarm bells for me.

This is one of the things that you may only learn the hard way, as your
project grows in complexity. Nobody advertises how slow their compiler is.

So, my question is, how does GHC fare these days? How does it treat people
that switched from a dynamic language, who are used to quick iteration?

~~~
mic47
For quick iterations, you have ghci. You just edit your files, type :r and it
will recompile only necessary files, which is really quick (and I miss it in
most other REPLs). Similar with incremental compilation. But if you need to
compile huge project always from scratch, of course, you will suffer.

There have been work on making haskell to have deterministic build to speed up
compile time, and compare to scala, I find it way faster (in my current
company, we use scala). But note that if you start using stuff like template
haskell, your compilation will slow down.

~~~
gridlockd
Can you define "really quick" a bit better? Less than a second?

~~~
taylorfausak
To give you a single data point, our Haskell code base at ITProTV is about
50,000 lines of code. Reloading the project after a change in GHCi takes
slightly less than one second. We haven't spent any significant effort on
speeding up compile speeds, for what it's worth. It's fast enough.

------
ar7hur
Also:
[https://github.com/facebook/duckling](https://github.com/facebook/duckling)

------
jraph
> Haskell is like that smart, funny but shy girl totally outshined by her more
> popular classmates - Python and Java

Come on. Why picking a girl specifically?

------
samtechie
While there are benefits of learning Haskell as a developer. I am curious
about the professional benefits versus the time and effort required to master
the language to the extent that you are employable and command a good salary
compared to just focusing on mainstream languages where you probably have a
lot more competition but also a lot more opportunities.

~~~
misja
I have been looking around for Haskell jobs for a while because I would love
to program in Haskell professionally, and what I've noticed that there are
very few opportunities and the salaries are quite low. You can expect to make
much more as a Scala programmer, for instance.

The effort of learning Scala vs Haskell as at a professional level would be
more or less equal.

------
_pmf_
Interesting: as soon as you look into real SW instead of academic examples,
Haskell is just as messy as any other language.

~~~
UserIsUnused
IMO, only when trying to get loads of performance. It's just messing with the
compiler...

------
KibbutzDalia
Imagine being able to list all the software projects written in C, C++, Java,
or C# on one short blog post!

~~~
ardfard
To be fair, most asked questions about Haskell that people always have is if
Haskell is so good and not just purely for academics then where is Haskell
used in industry? Or is there really huge and complex software projects
written in Haskell?

------
clSTophEjUdRanu
What is the fixation with Haskell?

~~~
marcosdumay
People that learn it tend to not want to use most other mainstream languages
anymore, and thus want very badly it to grow.

~~~
galaxyLogic
Could it be because learning Haskell was such a major effort for them that
they now don't want that to go to waste?

Learning Haskell (well) is a big investment. If you make that investment, of
course you are going to argue that now we should reap the benefits of that
investment.

It makes sense from the point of someone who has already made the investment
of learning Haskell. But, choosing Haskell for a project means that other
current and future programmers must make that same investment in leaning
Haskell too, rather than learning something else perhaps. Or using what they
already know well.

~~~
rajinl
As someone who has hired many developers at a large Investment bank, I always
found that people that knew Haskell or some other functional programming
language tended to be far more productive in standard OO languages. I know of
many other technical leads and hiring managers that look at Haskell as a
market signal. As someone who does code in F# and Haskell in my spare time, I
don't expect to get job using either of these languages, but knowing these
languages got me a foot in the door to do some of the most interesting work I
have ever had (many years ago). From those in the Haskell community that I do
interact with, most people do not expect to code in Haskell for their day
jobs, and most of them would continue writing Haskell code outside of work
regardless of whether Haskell becomes a commercial success or not. For me,
Haskell is one of those languages that is just worth knowing, simply because
it gives you a different perspective on the world and a new set of mental
tools. If you haven't as yet played with a strict functional language, then
you really should give it a try.Not because you expect to use it at work,
rather because learning new things is fun and it will make you better at your
job anyway as a side effect. If the logic you used in your argument holds,
then we should really be coding in assembler.

~~~
twic
I've found the exact opposite. People i've worked with who are keen on Haskell
have tended to be keen on building castles of unnecessary abstraction. People
i've worked with who are not keen on Haskell are less so.

(Giuseppe, if you're reading this, you're the one exception!)

