Samir Talwar - Smoke: rewriting a Ruby project in Haskell for fun and type safety - July 2020
Channel: Zürich Friends of Haskell
Date: 2020-08-09

Zurich Haskell meetup: https://www.meetup.com/HaskellerZ/events/272048166/
Slides: https://noodlesandwich.com/talks/smoke--rewriting-a-ruby-project-in-haskell/presentation.html
Smoke: https://github.com/SamirTalwar/smoke

Writing a test framework is so much fun I did it twice.

The first time, I punched something out as quickly as possible in Ruby. It took a few hours and did the job. But then the job got larger. Eventually, implementing one feature would break something else. (Fortunately, I usually caught it, because, well, I had tests.) This was supposed to be fun, so I needed to find a way to return to quick delivery.

After a while of tinkering, I settled on Haskell to implement the framework. It was an odd choice—it’s mostly I/O and exceptions—but the language really helped me work incrementally, with a very tight safety net.

I’d like to show you some of the lessons I learned in porting the project from Ruby to Haskell, the upsides, and the downsides too. We’ll explore the trade-offs together, and hopefully this will be useful to you in deciding how to implement your next side project.