Attending ZuriHac 2022 as A Haskell Beginner

ZuriHac is a 3-day Haskell hackathon organized by Zürich Friends of Haskell at the beautiful Rapperswil-Jona campus of OST (formerly HSR). On top of project hacking, it also offers keynotes, hands-on tracks, and most importantly meeting other Haskell enthusiasts!

I knew about this event from a friend. As I had been exposed to Elm and functional programming which I shared my story on Pipesicle, I excitedly signed up for ZuriHac 2020. Sadly as we know what happened next in 2020, they also had to cancel the in-person event. There was an online version both in 2020 and 2021 happening on Slack and Discord which is good to make new connections but I did not fully dedicate myself to it.

This year they finally announced that ZuriHac is back to a physical event. Despite still feeling anxious about covid, insecure about my limited haskell knowledge and terrified of having to socialize again, I decided to sign up and see what happens 🫣

I am now back in Germany and returning to my normal life. Here I want to share some of the fun I had at my first ZuriHac.

Day 1: Saturday

Hands-On: Beginner Track

There are two tracks you can follow at ZuriHac, beginner and advanced. I have a limited experience with Haskell, so I decided to join the beginner track. It started with a brief intro to functional programming and setting up Haskell on our computer by Farhad Mehta.

I had everything set up prior to the event. I use Windows which is suboptimal for Haskell but installing the essentials is easy thanks to ghcupWe used Programming in Haskell book to follow and teach ourselves as they could not find any guest speaker to direct the beginner track but there are enough experienced Haskellers who jumped in to help us. 

The book itself is easy to follow, but I have tried this style of learning before that builds bottom-up from the basics which I think doesn't suit me very well. I only skimmed through the topics I found interesting and did some of the exercises making Caesar Cipher and Hangman.

Talk: Accelerate Haskell for GPU and Multicores by Gabriele Keller 

Gabriele Keller on Stage with her slide titled "Haskell for GPU and Multicores"

Gabriele talked about why functional programming or Haskell specifically is often preferred because of its readability, laziness, and overall great for high-level abstraction but not necessarily for its performance. That is the motivation behind Accelerate, a Haskell library that enables programmers with little knowledge of parallel computing to write more performant programs. She showed some applications, benchmarks, and demonstrations on how to program in Accelerate.

Hands-On: Advanced Track

There were two sessions on the advanced track which I didn't fully attend, so I couldn't talk much about them. Both sessions are already available on Youtube:

Workshop: Haskell The Legend of DSL by Alejandro Serrano

Alejandro Serrano on Zurihac stage gives workshop with a slide showing one of the tasks

Alejandro gave us an Introduction to Domain Specific Language (DSL) and Property-based Testing. We then put both concepts into practice by writing a pokemon trading card game. Haskell is particularly great for modeling real-world problems with its Algebraic Data Type (ADT). It was pretty dense for the allocated time but definitely fun to do!

Day 2: Sunday

Talk: Into the Core Squeezing Haskell into Nine Constructors by Simon Peyton Jones

Simon Peyton Jones stands in front of the projector screen showing his presentation slide titled Into the core squeezing Haskell into nine constructors

One of the designers of Haskell, Simon Peyton Jones, brought us diving into the Core, an intermediate language that GHC (Haskell compiler) translates into. He explained some design decisions to optimize Core and demonstrated how they implemented it. From seeing the big Lambda for the first time to running the ghc commands for dumping the stages of compilation myself, it is pretty cool to know how Haskell compiler works under the hood. 

Talk: The text package finally with UTF-8 by Andrew Lelechenko

Andrew Lelechenko on the stage of Zurihac stands beside the screen projector that shows a presentation titled The text package finally with UTF-8

Andrew talked about how he finally succeeded to release text-2.0 with UTF-8. This effort has been tried 2 times beforehand.  What differentiated his successful attempt from his less-successful predecessors is investing in the feedback loop such as testing, CI, validation, and benchmarking. Besides that, I also like his explanations of the basics of text encodings and different String libraries.

Day 3: Monday

Workshop: Haskell Adventures in IO by Alejandro Serrano

Alejandro Serrano on Zurihac stage wearing blue shirt and long pants standing beside a screen projector that shows a slide presentation titled Haskell Adventures in IO

In this second workshop, Alejandro gave a demonstration of a practical use case IO monad. We practiced it by implementing a simple client server with Sockets using network-simple library. This was also a bit rushed but I really appreciate the creative exercises he made and the interactive session.

Project Hacking

Haskell code snippet

I did not plan any project prior to the event. I was thinking to join an existing project. But both the people I wanted to join sadly couldn't make it to Zürich. Besides going through the book on the beginner track, I tried to build a small project. I wanted to build a snake game as a desktop application running on Windows just like when I learned Rust the first time. So far, I have only managed to render one block of tile that is intended as the body of the snake.

There was a series of project presentations towards the end of day 3 but I had to leave early. Gladly, they also recorded this, and now available on youtube.

No comments:

Post a Comment