14 ms·
Software projects written in Haskell
- gridlockd 7y agoFor 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?
- galaxyLogic 7y agoQuick iteration means quick feedback and that is a major success-factor for software projects I believe. The purpose of compiler is to give you feedback about what you're doing wrong, but if that feedback is slow then it loses much of its value. Goal is to guide the programmer, not stop them.
- the_af 7y agoI think quick iteration and feedback is one of Haskell's strong points :) It has been argued before, in a fascinating but admittedly flawed experiment for the Naval Surface Warfare Center (US Navy) [1], that Haskell is a great prototyping language. This experiment is flawed for multiple reasons which the authors readily admit (e.g. the results from all contestants were self-reported, the requirements were vague [2], no code was actually run by the panel of judges, etc), but it's still tremendously interesting. It's also amusing that the judges couldn't believe the Haskell program was a working and complete implementation of the system, and thought it was either pseudocode or "too clever" for its own good (because of the use of higher-order functions)! [1] http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.368.1058&rep=rep1&type=pdf http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.368... [2] though one could argue vague requirements are actually another point in favor of Haskell as a rapid prototyping language. It's often argued -- mistakenly -- that languages with static typing are not good for exploratory coding, which this experiment tends to show not to be true.
- mic47 7y agoFor 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 7y agoCan you define "really quick" a bit better? Less than a second?
- taylorfausak 7y agoTo 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.
- flowless 7y agoIt doesn't feel slow to me (compared to for example C++ compilation) and you can iterate quickly using cabal repl (:r) or ghcid[1] which both support partial recompilation of changed files. [1] https://github.com/ndmitchell/ghcid https://github.com/ndmitchell/ghcid
- gridlockd 7y agoComparing to C++ is a very low bar, that is why I was looking for comparisons with dynamic languages. What is the turnaround time with these interpreters, then?
- RcouF1uZ4gsC 7y agoThis 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 7y agoIt'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 7y agowhen 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 :)
- devxpy 7y agohttps://hasura.io https://hasura.io
- aidos 7y agoI also came to comment on Hasura. Without having looked into the code I can’t really comment on the quality, but certainly from the outside it’s rock solid.
- Ezku 7y agoWow, looks interesting. Will have to investigate. Looks more solid than any other ”instant graphql” solution I’ve seen.
- seddona 7y agoI have not used directly but this does look like a very impressive project.
- markhalonen 7y agoI 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 7y agoThanks, 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 7y agoHey, 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.
- Dowwie 7y agoThere 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.
- padraic7a 7y agoThat's an intruiging comment. I can understand why you can't name specific companies but it would be interesteing to hear something about these common patterns of struggle.
- goto11 7y agoWhat are the common patterns of struggle?
- martincmartin 7y agoI've heard lazy evaluation makes performance problems a nightmare to track down: some seemingly innocent piece of code turns out to trigger evaluation. In other words, the lines of code in the diff that introduces the performance regression, can be very far from the lines that do the heavy lifting, and both can be far from the line that actually needs to be changed to fix the problem.
- mokus 7y agoOne flip side of this is when undefined behavior in one library invalidates critical assumptions underlying the correctness of another, and tracking it down is a nightmare. I’d much rather, in general, get predictable and understandable semantics and have to struggle for performance than get predictable and understandable performance and struggle for semantics. Even more so, I’d rather use software that faced that profile of challenges. You can see when the program is slow at runtime, but you often can’t see when it’s wrong at runtime.
- misja 7y agoCould you lift some of veil of the mystery and perhaps give a hint which those burned companies are?
- rkrzr 7y agoAt 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-introduced-haskell-and-got-away-with-it.html https://tech.channable.com/posts/2017-02-24-how-we-secretly-... [3]: https://tech.channable.com/posts/2017-07-06-introducing-vaultenv-keeping-your-secrets-safe-with-vault-and-haskell.html https://tech.channable.com/posts/2017-07-06-introducing-vaul... [4]: https://github.com/channable/vaultenv https://github.com/channable/vaultenv [5]: https://tech.channable.com/posts/2019-03-13-how-we-made-haskell-search-strings-as-fast-as-rust.html https://tech.channable.com/posts/2019-03-13-how-we-made-hask... [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-to-go-for-the-big-rewrite.html https://tech.channable.com/posts/2019-10-04-why-we-decided-t...
- silvester23 7y agoI 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.
- pwm 7y agoNot OP, but here are 2 slightly different links that might be of interest: https://github.com/tweag/funflow https://github.com/tweag/funflow - A library for running computational workflows https://skillsmatter.com/skillscasts/14417-build-systems-a-la-carte https://skillsmatter.com/skillscasts/14417-build-systems-a-l... - a recent Haskell eXchange talk about build systems (corresponding paper: https://www.microsoft.com/en-us/research/uploads/prod/2018/03/build-systems-final.pdf https://www.microsoft.com/en-us/research/uploads/prod/2018/0...)
- 7y ago
- ar7hur 7y agoAlso: https://github.com/facebook/duckling https://github.com/facebook/duckling
- _pmf_ 7y agoInteresting: as soon as you look into real SW instead of academic examples, Haskell is just as messy as any other language.
- UserIsUnused 7y agoIMO, only when trying to get loads of performance. It's just messing with the compiler...
- unhammer 7y agoWhile 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/
- atc 7y agohttps://bitbucket.org/athc/havoc/ https://bitbucket.org/athc/havoc/
- clSTophEjUdRanu 7y agoWhat is the fixation with Haskell?
- gridlockd 7y agoI suspect it makes people feel better about their work, because Haskell isn't so obviously flawed like most mainstream languages.
- marcosdumay 7y agoPeople that learn it tend to not want to use most other mainstream languages anymore, and thus want very badly it to grow.
- galaxyLogic 7y agoCould 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.
- the_af 7y agoThis is true of every technology. Surely it must also be because Haskell is a pleasure to work with?
- harperlee 7y agoI don’t know Haskell so this is an abstract comment, but: effort put in is only a multiplier. If you put a lot of effort into something you despise, or that does not do the job, you will not be advocating it. Thus, even if it is the case that it requires major effort, but people love its power, your word of caution is not really undermining the argument that it is a useful/powerful/enjoyable tool.
- dcl 7y agoThis 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 7y agoThey can't afford a few thousand for training, so spend more thousands rewriting? The original Haskell devs had to learn, too.
- dcl 7y agoThe new ownership probably had no idea what they actually bought. I think to be fair, whilst it may have been cheaper to hire new devs than rewrite everything, it would have taken a while to learn and become proficient enough to use and properly maintain the existing codebase properly.
- empath75 7y agoYou 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.
- seddona 7y agoI think this is an important point actually. Programming languages (at least in the context being discussed) are just a means to model a problem domain. Some people find it easier to model domains in strongly typed functional languages but at a much larger percentage do not. Let's for argument's sake say it's 1% of all programmers. That is still a huge number of people though.
- jraph 7y ago> 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 7y agoWhile 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 7y agoI 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.
- KibbutzDalia 7y agoImagine being able to list all the software projects written in C, C++, Java, or C# on one short blog post!
- ardfard 7y agoTo 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?