Hacker News with Generative AI: Haskell

Implementing Unsure Calculator in 100 lines of Haskell (alt-romes.github.io)
The recently trendy Unsure Calculator makes reasoning about numbers with some uncertainty just as easy as calculating with specific numbers.
Parcom: CL Parser Combinators (github.com/fosskers)
parcom is a consise Parser Combinator library in the style of Haskell’s parsec and Rust’s nom.
Hell: Shell Scripting Haskell Dialect (chrisdone.github.io)
This is a copy of the script that generates my blog.
Falsify: Hypothesis-Inspired Shrinking for Haskell (2023) (well-typed.com)
Consider this falsify property test that tries to verify the (obviously false) property that all elements of all lists of up to 10 binary digits are the same (we will explain the details below; hopefully the intent is clear):
Haskelling My Python (unnamed.website)
Reimplementing Haskell lazy infinite lists using Python generators
Test Spies in Haskell (jezenthomas.com)
When testing a web application, you often want to make sure that a certain email would be sent — without actually sending it. How do you test that?
Concurrency in Haskell: Fast, Simple, Correct (bitbashing.io)
After nearly a decade of building embedded systems in C, C++, and Rust, I’ve somehow ended up writing Haskell for a living.
Parser Combinators Beat Regexes (entropicthoughts.com)
Someone online was solving Advent of Code problems, and had a question about last years’ day 3. They had a working solution using regular expressions (regexes) on String values, but they wanted to use ByteString values instead for performance reasons. They were surprised, however, that there seems to be a lack of community cohesion around regex libraries in Haskell.
Hasochism: The pleasure and pain of dependently typed Haskell programming [pdf] (2013) (strath.ac.uk)
Functors: Identity, Composition, and fmap (codehakase.com)
In writing software, we often encounter scenarios where a value resides within a context, a container of sorts. Standard function application, so straightforward with simple values, presents a challenge in these situations. Consider the Maybe data type in Haskell, which encapsulates the possibility of a value’s absence. Applying functions to values wrapped in Maybe requires a different approach, as direct function application results in a type error.
Functors, Applicatives, and Monads (thecoder.cafe)
Hello! Today, we will explore functional programming with the concepts of functors, applicatives, and monads. We will discuss what they are and why they matter one step at a time. Note that all the examples will be in Haskell, but you’re not required to know Haskell to read this post.
Non-Obvious Haskell Idiom: Guard-Sequence (entropicthoughts.com)
Reading production Haskell code, we sometimes stumble over idioms that look confusing at first, but which show up frequently enough that they are worth learning. This is one of those examples, where we optionally return something with guard-sequence.
Making a multiplayer action game in Haskell (gitlab.com)
You are about to add 0 people to the discussion. Proceed with caution.
(Haskell in Haskell) 2. Lexing – Cronokirby (cronokirby.com)
This is the second post in the Haskell in Haskell series.
Show HN: Generating Random Art in Haskell (github.com/jamesma100)
Implementation of RandomArt based on the algorithm described in Hash Visualization: a New Technique to improve Real-World Security and Andrej Bauer's original program.
Understanding Yoneda (bartoszmilewski.com)
You don’t need to know anything about category theory to use Haskell as a programming language. But if you want to understand the theory behind Haskell or contribute to its development, some familiarity with category theory is a prerequisite.
Hyperbole: Haskell interactive serverside web framework inspired by Htmx, Elm (github.com/seanhess)
Create interactive HTML applications with type-safe serverside Haskell. Inspired by HTMX, Elm, and Phoenix LiveView
A Proper x86 Assembler in Haskell Using the Escardó-Oliva Functional (vmchale.com)
Writing an assembler turns out to be an interesting example: one needs to calculate distances between jumps and their target labels, and the target may appear after the label. It turns out that one can write a one-pass assembler using the tardis monad or in Curry, using logic programming.
Haskell: A Great Procedural Language (entropicthoughts.com)
There are many catchphrases about Haskell.
An "oh fuck" moment in time (ghuntley.com)
Then took my kids down to the local pool. When I got back, I had a fully functional Haskell library with autogenerated C bindings, FFI to CoreAudio and my jaw was on the ground. Literally an "oh fuck" moment in time... This wasn't something that existed, it wasn't regurgitating knowledge from Stackoverflow. It was inventing/creating something new.
GHC 9.12 and Cabal 3.14 releases (haskell.org)
To conclude the year 2024, the GHC and Cabal teams are happy to announce the releases of GHC 9.12 and cabal 3.14.
Overloading the lambda abstraction in Haskell (2022) (acatalepsie.fr)
Effectful – Build Fast and Reliable Haskell Applications (haskell-effectful.github.io)
Build Fast & Reliable Haskell Applications
Compiler Bootstrapping: Ben Lynn on "MacGyver's Haskell Compiler" [video] (youtube.com)
8 months of OCaml after 8 years of Haskell in production (2023) (chshersh.com)
I’ve been using Haskell in production for 8 years. I’ve been using OCaml in production for 8 months.
Eventually consistent plain text accounting (tylercipriani.com)
Over the past six months, I’ve tracked my money with hledger—a plain text double-entry accounting system written in Haskell. It’s been surprisingly painless.
Functors to Monads: A Story of Shapes (jle.im)
For many years now I’ve been using a mental model and intuition that has guided me well for understanding and teaching and using functors, applicatives, monads, and other related Haskell abstractions, as well as for approaching learning new ones.
Unix core utilities implemented in Haskell (github.com/Gandalf-)
Unix core utilities implemented in Haskell.
Namespaced De Bruijn Indices (haskellforall.com)
In this post I share a trick I use for dealing with bound variables in Dhall that I thought might be useful for other interpreted programming languages.
A dictionary of single-letter variable names (jackkelly.name)
Haskell’s expressive type system means that type signatures can carry a lot of information. Haskell’s polymorphism means that you sometime write a function that works across an enormous range of types, and are often left wondering “what do I actually call my variables?”. It is often the case that there’s nothing to say beyond “this variable is a Functor”, or “this variable is a monadic action”, and so a single-letter variable name is appropriate.