June 30, 2020 - Tagged as: en, haskell, ghc.
21 Jun 2020 was my last day at Well-Typed and as a GHC maintainer/developer. On 22nd I joined the programming language team at DFINITY to work on the Motoko programming language.
Here’s the summary of my 8 years writing Haskell pretty much non-stop:
In 2012 I wrote my first Haskell program, which was a chat server. I was reading “Real World Haskell” and “Learn You a Haskell for Great Good!” at the time and applying what I learned on this project.
In the same year I implemented my first programming language in Haskell. I don’t remember much about this project, I think it may be just a few extensions over the excellent Haskell tutorial “Write Yourself a Scheme in 48 hours”.
Also in 2012 I made a few commits to the programming language Fay. This was my first contribution to an open source compiler not written by me.
In 2013 I worked on four PL implementations, two of which were implemented from scratch in Haskell: A Prolog implementation and a K Lambda interpreter.
The other two projects were: A multi-stage ML-like language written in OCaml, and K Framework (in Java).
In 2014 I was accepted to Google Summer of Code to work on adding stack traces to GHCJS. The project was successful, and I made 88 commits to GHCJS during this period.
This was my first introduction to GHC. I made only one commit to GHC during this time, but I started reading the RTS and code generator to be able to implement cost-centre stacks in GHCJS, which taught me a lot.
Also in 2014, I briefly worked at a startup where I wrote Haskell.
In 2015 I joined Indiana University to do PhD in programming languages. In my first semester I worked on the paper “Efficient Communication and Collection with Compact Normal Forms” which was about a GHC extension. The paper was published the same year at ICFP.
In the same year I briefly worked on a torrent client in Haskell.
According to git logs, 2015 was the year where I started making some larger commits to GHC. I think I made a few dozen commits that year. What was happening in the background is that I was working on unboxed sums. At Haskell Implementors Workshop in 2015 my advisor gave a presentation on efficiency of data representation in Haskell. I don’t remember how the story developed, but I think we also talked to a few people at ICFP on how to improve the situation, and one of the idea that came up was unboxed sums. IIRC I started working on it soon after returning from ICFP.
The first somewhat working version was implemented as a plugin, using lots of unsafe coercions under the hood. It was good enough to run some examples.
(In 2015, I also studied various metaprogramming and partial evaluation ideas quite extensively. If you look at my blog posts published in 2015 you’ll see a lot of related blog posts. There are also a few related git repositories in my Github page. I also gave a related talk at HIW 2015.)
Early 2016, I don’t remember what I was doing in too much detail. I remember taking an advanced OS class around that time and enjoying it very much. This was also the time where I started to realize that the tools I’m using (mostly GHC) are full of bugs, and very inefficient. I kept studying program transformation ideas, with the goal of making Haskell “fast”. I also started using C more, partly for the OS class, but also in my hobby projects. For example, the first commit of tiny was made in January 2016 and the code was in C.
In mid-2016 I left Bloomington for Cambridge, UK, for an internship at Microsoft Research with SPJ. We mainly worked on implementing unboxed sums properly in the compiler (instead of as a hacky plugin), but I also did a lot of GHC maintenance work there with supervision of SPJ.
Unboxed sums was merged during my time at MSR.
In the rest of the internship I did a lot of reading, did GHC maintenance, and biked around Cambridge.
Most importantly, during my time at MSR I realized that I’m no longer interested in academic research. I don’t enjoy writing papers. I don’t feel like pushing a field forward while most of the tools I use every day are badly broken, inefficient, usually both. I started having job interviews while I was in the UK. I visited two companies for interviews, one in London, another one in Cambridge.
I also emailed my advisor, saying that I don’t want to come back to Bloomington.
Job interviews went badly, and I was back at Indiana University. Rest of 2016 was pretty horrible. I was depressed. I had no interest in research. I still helped publishing a paper, but I did not enjoy the process.
I still spent my last semester somewhat productively. I took enough classes this semester to leave IU with a masters degree, instead of empty handed (I was a PhD student, not masters). I also had some good job interviews and met good people from the Haskell community.
By the end of 2016 I accepted a job offer and left IU with masters degree to write Haskell for a startup.
In 2017 I worked for this startup for a year. I wrote lots of networking and concurrent code, and learned a lot about these topics and exception handling in Haskell. Until this my Haskell experience was mainly in the context of compilers, so this was quite educational for me.
I left the company at the end of that year to join Well-Typed to work on GHC full-time.
My time at Well-Typed was great, but also full of challenges, mainly related to working remotely.
I worked on GHC between 30 and 40 hours a week (some weeks as little as 24 hours, but no less than that). Few weeks after I joined I started working on a new garbage collector with a colleague. When I joined the project there were only type definitions in header files, and almost no code. I implemented the first sequential prototype of the new collector. After that we started collaborating more closely with my colleague while implementing the concurrent version. We found many bugs in both the design and implementation, and sorted out many edge cases during this time. I thoroughly enjoyed working on this project, even though it was clearly the most challenging project I ever worked on.
After the garbage collector I kept working as a maintainer until I left the company on a Sunday, Jun 21st, 2020. I made my last commit to a merge request that I was working on 21st.
On 22 Jun 2020 I joined DFINITY to work on the Motoko programming language, and this is where the story ends.
At the time of this writing I have 383 commits to GHC and I’m the 14th contributor with most commits. It feels bad to leave a project that I liked and contributed so much, but it’s also the right thing to do. After the GC was merged I started spending my time less and less productively, for many reasons, and I had lost my motivation to improve Haskell-the-language and GHC. Perhaps I can write more about these in another post.