Why Did You Code Your Personal Website in Haskell?

How it started

One day I was in the basement of Hayden Hall on campus and I was approached by a suspicious hooded figure who smelled like matcha powder. He came up to me ominously offering me a book of divine power: "Learn Haskell by building a blog generator" it was intriguing to say the least but I took it in stride and challenged myself to learn Haskell over winter break.

The Process

At first the extremely functional nature of Haskell took me aback, as somebody entrenched in low level and often times very verbose programming languages such as C++, it changed my perception of programming languages entirely.

A massive difference I found right away was how types worked in Haskell and how useful Type Classes are specifically with multiple input polymorphism. Another notable difference was the explicit nature of said inputs compared to a language like C++ where type conversions are largely implicit.I'm currently still getting used to implementing more Functors into my code and utilizing abstractions rather than mutation for not just Haskell but other languages I code in.

What I Learned

Through this project, I gained hands-on experience with:

• How to build DSLs in Haskell • Functional programming patterns • Static site generation • CSS generation • Haskell syntax and logic

-- Example of my Blog DSL
data BlogElement = 
    TextContent Text
  | HeaderContent Text
  | Image { path :: Text, alt :: Text }

What's next + Reveal of the Mysterious Figure

My next steps as of this date is to add a Markdown parser for better formatting, adding a few more styling tools to my CSS EDSL and generating a Projects page, maybe even add a Tetris block game to keep people's attention. Also the mysterious figure was my good friend Lucas, the link to his website will be somewhere on your screen. Please make sure to endorse him in "Rizz" when you have the opportunity.