Gleam is Pragmatic
Related
More from software is fun
Teacher: Hello class! Welcome to your first day of functional programming. Today, we’re going to be talking about how to write the classic “Hello, World!” program in Haskell. It’ll be slightly more involved as we’ll ask for the user’s name and then greet them. I’m sure many of you have heard scary things about Haskell, but I promise you it’ll be...
So you’ve learned some basic Haskell and you’re feeling really good about yourself. You sit down the write some code and you’re presented with a deeply nested JSON structure: { "foo": "Hello", "bar": 1, "baz": "More stuff", "people": [ { "name": "Drew", "hobbies": [ { "name": "bridge" }, { "name": "haskell"...
My favorite game is bridge. It’s an excellent test of cooperation and strategy. I’m in a discord chat devoted mostly to the game and folks often share interesting bridge hands with one another. I decided it would be fun to build a program that parsed a simply-formatted bridge hand and produced a plain text bridge diagram. Here’s a defensive...
I was recently building a Slack bot in Haskell. The core of the Slack integration was a never-ending loop that read messages from a web socket and performed actions based on the message. But how should I go about looping forever in Haskell? My first pass was to use the aptly-named forever function. My understanding of forever was that it ran a...
In the past two years I’ve become reasonably comfortable with both PureScript and Haskell. I’ve learned so many new things while diving into the pure functional programming ecosystem and many of these techniques can be applied to other paradigms. Unfortunately, the pure FP world can feel a bit like another dimension – where many programming...