One of Haskell’s features I really liked was list comprehensions. I created a comparison between Haskell and Julia list comprehensions almost exactly a year ago. It appears that Python list comprehensions are as nice as either Haskell’s or Julia’s! Although, having to use Python’s lambda form to simulate the more concise Haskell/Julia function definition is less than ideal.
I’ve been using wkhtmltopdf in Rails projects for years. After upgrading to Rails 6 and Ruby 2.6, PDF creation started failing for me. This post documents what I did to get it to work again.
Some Racketeers mentioned the Advent of Code 2020, and I thought it would be fun to give it a shot this year. I’ll be discussing my solution to Day 1 Part 2, so if you haven’t completed it yet, you may want to hold off on reading further.
I occasionally compile some statistics on programming language popularity by running a bunch of Google searches to rank programming languages according to the number of results. I wouldn’t read too much into these stats, but they are not without value.
In September, 2008, I translated Peter Norvig’s spelling corrector into Ruby. My current favorite language is Racket, so I thought it would be a good exercise to port it to Racket. After some helpful tips by Vincent St-Amour and Sam Tobin-Hochstadt in the #racket IRC channel, I came up with the following. I’ll show it two different ways, the first minimizes the line count (without sacrificing too much stylistically) to 27 lines, and the second is closer to how I’d normally format it: