18 ms·
I don't know how to ask this without it sounding offensive, and I don't intend it that way. But do these "hardcore" haskellers enjoy writing programs at all?
by TheCondor 10y ago
I don't know how to ask this without it sounding offensive, and I don't intend it that way. But do these "hardcore" haskellers enjoy writing programs at all? Like are there any well known open source apps that people actually use written in Haskell? There are tons of hobbiests and it has a following but what are the examples of its greatness?
I ask as an old SML guy, I like the math theory, I like the promise of better, more accurate and reliable software, I think you can do some beautiful things with algebraic types but I've been dumbfounded by the lack of great examples out there. Ada suffered/suffers the same fate, it has this "academic" pedigree for robustness but not many examples that you can get your hands on. so much expressiveness that doesn't seem to result in much expression.
- unscaled 10y agoI think Pandoc can count as an example here - it may be a niche product, but it's well known in its niche, and it's arguably the most powerful document markup format converter out there. And it's all Haskell.
- shmageggy 10y agoOff the top of my head, Pandoc, a tool for converting between different markup/down flavors, and xmonad, a tiling window manager for linux. Both are well known and popular.
- theoh 10y agoIs there anything actually interesting about what they do, though? Converting markup is not a complex task.
- davesque 10y agoPandoc actually converts between a wide range of document formats.
- steveklabnik 10y agoParsing is something that's very pleasant in Haskell. Other languages can use parser combinators too, of course. It's good at it though.
- theoh 10y agoYeah, fair point. That'll be a function of the fact that Haskell has tended to prioritize the concerns and problems of writing the compiler. Complex transformations of data structures are part of the compilation activity too, but they're more difficult to spot in the wild of applications.
- dukerutledge 10y agoI'd disagree. Most business logic is just transformation of data structures in disguise. Once you have a sufficiently rich set of data structures this becomes abundantly clear.
- anistas 10y agoC-to-Rust converter is written ... in Haskell https://github.com/jameysharp/corrode https://github.com/jameysharp/corrode
- steveklabnik 10y agoYup! There was already a great, ready to use C parser in Haskell, and we don't have one in Rust yet.
- TheCondor 10y agoGreat example!
- recursive 10y agoMoving goalposts detected.
- theoh 10y agoI didn't ask the original question.
- munchhausen 10y agoGrandparent sold pandoc short. It is actually a really nifty utility capable of converting a plethora of formats from/to each other. It is a godsend for situations when you have to create MS Office-compatible documents, and want to avoid the inevitable muscle cramps you'd get if you were to actually use Word. You can create your own document templates, and tweak the resulting output in a million ways. At my job, I have to create a lot of documentation, often in PDF or docx, and Pandoc has become an integral part of my workflow. I can create documents within the comfortable environment of Emacs, and use Pandoc to produce output in any old format that $pointy_haired_boss may desire.
- deleted 10y ago[deleted]
- CJefferson 10y agoI'm not sure I'll call xmonad popular. Also I know quite a lot of people who hate it -- because it's configuration language is "write some Haskell and recompile", so it tends to be very fragile (people who use Haskell love it) Also found it crashed a lot, which I would have hoped would be one of the things Haskell would solve (the problems revolved it having to integrate into C code for linking to X, but that's part of living in the real world).
- willtim 10y agoI enjoy it so much I quit mainstream tech to do Haskell professionally 5 years ago.
- jwdunne 10y agoThat's really cool. What sort of problems do you work on? How did you manage to start working with it professionally?
- seagreen 10y agoIn addition to the others mentioned, PostgREST: https://github.com/begriffs/postgrest https://github.com/begriffs/postgrest
- peatmoss 10y agoAny high-profile users of this that I might have heard of? Because on first look, PostgREST looks kind of... amazing.
- ruslan_talpa 10y agoDepends on what you mean by high profile. I would not say there are high profile projects but that's only because it's quite a new project. The latest version which imo is the first one to be a truly powerful one is only a month old. But there are people using in production for close to a year now. Oh, and i've seen someone on HN saying it's used in something like the upcoming Kosovo land property tax system or something like that but i am not directly aware of that.
- ruslan_talpa 10y agoAnd since GraphQL is all the rage now, I'm using PostgREST here https://graphqlapi.com/ https://graphqlapi.com/ so i would say Haskell is picking up steam in terms of user facing products
- nileshtrivedi 10y agoYou can apparently get a web-based UI too by simply using ng-admin: https://github.com/marmelab/ng-admin-postgrest https://github.com/marmelab/ng-admin-postgrest
- j2kun 10y agoI wrote a small javascript compiler in Haskell and it was great fun.
- ruslan_talpa 10y agoHaskell community does tend to produce extremely powerfull libraries but not so may user facing tools (maybe it's just an impression). However, compilers for Elm and PureScript are written in Haskell :) and you probably know the FB spam filter core is also in Haskell
- crimsonalucard 10y agoHaskell is actually less expressive. It is a functional abstraction on top of what is essentially a procedural machine and with all abstractions placed on top of lower layers you can only lose functionality as you go up rather than gain. You could say assembly language is the most expressive language out there. The great thing about Haskell and other functional programming languages is that the functional style forces the program to be created in a form that is modular and elegant. Programs become modular and composable and re-composable in the functional world because the programmer has No Choice but to build his programs in an elegant way. It's hard to explain this to a typical programmer who hasn't dived deep into functional programming but code reuse, modularity and elegance are significantly higher in functional programming languages than in procedural. This elegance, beauty and forced organization comes at a high cost though. And the cost is thinking in a way that is outside the normal paradigm of what humans are use to. I know a lot of haskellers think that humans can be taught to think in both ways equally, I disagree with them and believe that it is far Easier for a human to think about an algorithm procedurally than it is for him to think about it functionally. If you have several tasks to execute, what is your first thought on how to plan out those tasks? A task list (aka list of functions) or a series of composed tasks placed in a single sentence (aka expression)? The answer is obvious: humans think about the list first because procedural programming comes more naturally. This I believe is the main reason why Haskell or lisps haven't taken over the programming world. Functional programming is just HARDER. It takes me 10 times longer to hack out a simple program in haskell than it does in python because haskell doesn't allow you to 'hack' together a program. In haskell the application has to be an elegant diamond or the thing won't even compile! Python allows me to hack something together quickly which is both a good and a bad thing because as we all know hacking together software is quick but easily leads to unmaintainable software.
- platz 10y ago> In haskell the application has to be an elegant diamond or the thing won't even compile! Nonsense - You only have to make things as hard/elegant as you want them to be (and fore sure, some people do play that game for better/worse). But, Haskell will happily allow you throw everything in to IO; you can side-step creating a perfect model and just hack together a list of imperative IO statements. (unless you're referring to the difference between a dynlang and a static lang; that's a difference of another category altogether)
- wollstonecraft 10y agohttps://code.google.com/p/ganeti/ https://code.google.com/p/ganeti/
- theoh 10y agoThe Functional Pearls series, of which you are probably aware, seems to be full of idiomatic and brilliant Haskell techniques. It's not an application but it's a flowering of expression, of a sort... https://wiki.haskell.org/Research_papers/Functional_pearls https://wiki.haskell.org/Research_papers/Functional_pearls
- SwellJoe 10y agoI've been thinking a lot lately about why Go, a quite minimalist language by modern standards, has been so incredibly successful in such a short time. It's about a decade old, and is already among the top 5 languages for people starting new OSS projects (at least in my area, which is systems management). Green field development is being done in Go at a rate unprecedented for such a new language, I think. Node/JS might be precedent if we say that Node is a whole new thing, even though it uses JS as its syntax, using it as a server language is pretty new (ignoring Netscape's failed attempts at it in the 90s). I'm tempted to compare it to PHP, which exploded in popularity despite (unarguably, IMHO) better languages existing all around it at the time. Go doesn't seem like a bad language in the way that PHP was a bad language for its first 4~5 major versions, but it does find itself surrounded by many more powerful/expressive languages, and is seemingly getting much faster adoption. I've been learning Go myself, and while I miss some of the features of my normal primary languages (Perl, lately, but also Ruby and Python), I like that I can read other people's Go code without having to look anything up, even though Go is very new to me and I have years experience reading/writing Perl/Ruby/Python. Of course, Perl/Python/Ruby aren't a major paradigm shift away from Go as Haskell is...but, it's still a question of whether it's better to write ten simplistic LOC or two maybe opaque LOC. I tend to prefer concision over verbosity (and thus hate reading Java; I get lost in the trees before I can find the forest). Maybe Go is a sweet spot for a lot of developers. Rob Pike did a talk called Simplicity is Complicated, about this very subject...I found it a pretty convincing argument. https://www.youtube.com/watch?v=rFejpH_tAHM https://www.youtube.com/watch?v=rFejpH_tAHM
- notjack 10y agoGo has one of the largest tech companies on earth actively pushing it and pouring countless programmer hours into developing tooling and support for it. That pretty much trumps all of its misfeatures in terms of gaining adoption.
- SwellJoe 10y agoSo, it's previous analogs are Java and C#? That doesn't feel quite right, either, in that Google makes no money from Go; Java and C# are both direct moneymakers for their respective stewards. I haven't really seen Google pushing Go that hard; it feels like a skunkworks project that just happened to catch everybody's eye (including the company it came out of), rather than a grand plan to conquer the world of programming.
- wyager 10y agoOthers have mentioned excellent software like pandoc and xmonad. There are also projects with a smaller target audience, but that are insanely impressive compared to what you could plausibly do in basically any other language. In particular, I've used Clash and Lambda-CCC, which let you compile Haskell code to VHDL or Verilog and put it on an FPGA. I think the number of useful tools is pretty closely correlated to popularity, and obviously Haskell has a relatively small user base. It's not like Haskell gives you super-powers and makes you 10x more productive; it mostly lets you write better software, not necessarily more software. I do feel more productive with Haskell, but it's on the order of 50-100% (depending on the task), not enough to let Haskellers match the open-source output of a very popular language like C.
- stewbrew 10y agoWhile I think you're doing injustice to the haskell community, I think it's quite interesting that I personally quite frequently stumble over relevant tools that are written in go -- e.g. syncthing. The only haskell-based app I use is pandoc (which is old) after my ruby-based (and even older) converter of choice got abandoned.
- zumu 10y agoNot OSS, but I know Galois use a lot of haskell in their work for largely government agencies (NASA, DoD, etc.) Perhaps the type of problems Haskell is apt to solve (those requiring strict correctness, etc.) are not typically open source software projects.
- Ar-Curunir 10y agoMaybe not Haskell, but a lot of ideas from Haskell and Haskell-like languages such as typeclasses, Option types, type inference, etc. have found their way to Rust, and it makes programming in Rust an absolute pleasure. Rust, I'd argue, is the correct choice for many OSS projects. In fact, for security-focused projects, it should be the only choice. C-like performance without C-like vulnerabilities? It makes no sense to choose C or C++ any more.
- seagreen 10y agoReplying again since I can't edit my comment: Idris, Elm and PureScript.
- ocharles 10y agoI have been writing Haskell professionally for about 4 years now, and I absolutely love it. I'm constantly finding myself having to answer questions of "So, what do you mean?" or "what is this" so early on in development. Never before have I had a language that is so directly tied to my understanding of problems. On the practical side, I love having types that let me refactor so mercilessly, along with a very mature compiler with a decent suite of warnings.
- seddona 10y agohttps://github.com/begriffs/postgrest https://github.com/begriffs/postgrest - 8k stars
- smichel17 10y agoSnowdrift.coop is written in Haskell/Yesod.