Welcome to Haskell Weekly! Haskell is an advanced, purely functional programming language. This is a weekly summary of what’s going on in its community. You can subscribe to the email newsletter or the Atom feed.
Want to contribute to Haskell Weekly? Send us a message on Twitter or open an issue on GitHub.
News from the Haskell community
One year ago I published the first issue of Haskell Weekly, a free email newsletter about the Haskell programming language. For the first few months I ran it in stealth mode, making sure the idea made sense and ironing out all the kinks.
Haskell is a great programming language. It requires some effort at the beginning, but you get to learn a very different way of thinking about your problems. At the same time, the ecosystem matured significantly (hopefully signalling a trend) and the language can be great to work with.
One of these rule-based systems is Duckling, our open-sourced probabilistic parser to detect entities like dates and times, numbers, and durations. Due to our extensive growth, Duckling was not scaling as fast as we were. After considering several options, we decided to go with a rewrite in Haskell.
I’m going to introduce stutter, a command line tool for generating strings. I’ll first show some examples, then talk a bit about the performance and finally about the implementation (for the Haskell friendly reader).
While we cannot eliminate the instances entirely without somewhat dangerous techniques like overlapping instances, we can automatically derive them using features of modern GHC, eliminating the truly unnecessary boilerplate.
In Haskell, we have a mantra that if your code compiles it ought to work. This is might be more true in Haskell than in other languages. But it’s still a tongue-in-cheek comment that doesn’t quite pass muster.
In this article, I will share my thoughts on what made our group successful, where we went astray, and in particular on what a Haskell study group should not be as the pitfalls are many but advice for avoiding them, based on actual experience, scant.
Haskell is incredibly powerful, and incredibly complex. I see now why it has the reputation it does. There’s a huge barrier to entry, and it really is vastly different from the set of languages primarily taught and used today.
I’m hoping that examples like this will allow Rust users in the future to leverage the power Haskell has, such as infinite lists, in their code or vice versa and allowing Haskell to have a type safe fast language when speed truly is critical.
Package of the week
This week’s package of the week is Chart, a library for generating 2D charts and plots.
Send us a message on Twitter to nominate next week’s package!