This blog post is the first in a planned series I’m calling “Rust quickies.” In my training sessions, we often come up with quick examples to demonstrate some point. Instead of forgetting about them, I want to put short blog posts together focusing on these examples. Hopefully these will be helpful, enjoy! FP Complete is […]
Rust is a systems programming language following fairly standard imperative approaches and a C-style syntax. Haskell is a purely functional programming language, innovating in areas such as type theory and effect management. Viewed that way, these languages are polar opposites. And yet, these two languages attract many of the same people, including the engineering team […]
This semi-surprising corner case came up in some recent Rust training I was giving. I figured a short write-up may help some others in the future. Rust’s language design focuses on ergonomics. The goal is to make common patterns easy to write on a regular basis. This overall works out very well. But occasionally, you […]
I first started writing Haskell about 15 years ago. My learning curve for the language was haphazard at best. In many cases, I learnt concepts by osmosis, and only later learned the proper terminology and details around them. One of the prime examples of this is pattern matching. Using a case expression in Haskell, or […]
This blog post will use mostly Rust and Haskell code snippets to demonstrate its points. But I don’t believe the core point is language-specific at all. Here’s a bit of Rust code to read the contents of input.txt and print it to stdout. What’s wrong with it? fn main() { let s = std::fs::read_to_string(“input.txt”).unwrap(); println!(“{}”, […]
Most of the web services I’ve written in Rust have used actix-web. Recently, I needed to write something that will provide some reverse proxy functionality. I’m more familiar with the hyper-powered HTTP client libraries (reqwest in particular). I decided this would be a good time to experiment again with hyper on the server side as […]
A few years back, we published a blog post about deploying a Rust application using Docker and Kubernetes. That application was a Telegram bot. We’re going to do something similar today, but with a few meaningful differences: We’re going to be deploying a web app. Don’t get too excited: this will be an incredibly simply […]
There’s a running joke in the functional programming community. Any Scala program can be written by combining the traverse function the correct number of times. This blog post is dedicated to that joke. In Rust, the Iterator trait defines a stream of values of a specific type. Many common types provide an Iterator interface. And […]
I recently joined Matt Moore on LambdaShow. We spent some time discussing Rust, and one point I made was that, in my experience with Rust, ergonomics go something like this: Beginner: oh cool, that worked, no problem Advanced beginner: wait… why exactly did that work 99 other times? Why is it failing this time? I’m […]