RC W1D5 - Why I'm learning Haskell at RC

I had been wondering what to write about to recap Week 1 of RC. I came across a post by Cindy Wu sharing her RC application, which inspired me to review my own. My plan at RC has narrowed a fair bit. To the question "What would you like to work on at RC?”, I described two ideas.

The first is to work through the Haskell, Prolog and Idris sections of Seven Languages in Seven Weeks. I love seeing the trade-offs different languages make, and keen to extend functional programming best practices to imperative code. This would also be an extension of the SICP course I completed recently. A lingering wonder I have is how concepts like composition help frame abstractions for domain-specific software - what's the reason Cognitech joined Nubank and Jane St love OCaml?

The second is to build a toy ChatGPT clone. I've build [sic] machine learning and neural network models from scratch before (and presented on them at RC and at my workplace), but generative models are more recent and a lot more resource-intensive. My plan is to spend about two weeks to get a basic understanding how they work, and either build one from scratch or use an existing model and 'retrain' one to write in my writing style say.

Re: first idea, I had a quick look around Idris resources and my impression was I would get a lot more out of Idris if I had spent more time on Haskell (or at least, more than 1 week). I’m also thinking about functional programming and types as a focus; Prolog is logic programming so on hold for now.

Re: second idea, it's on hold. There’s a lot of interest in the fast.ai course (which is a lot more comprehensive), not so much just going through Andrej Karpathy videos. To the question "Are there things you would do differently if you came back?”, I feel focusing on the first idea also lets me do the following better:

I would be more deliberate in listening to what my batch mates are interested in, and use that to choose on things to work on based on what I can collaborate with and pair on.

Now circling back, why Haskell?

I had a manager once who enjoyed functional programming so much, he named his son Haskell (yes it’s an actual name, and on hearing this got me more excited about the company). My previous RC batch had an active study group on functional programming, so there’s also a bit of catching up on the fun I missed.

More recently, I did David Beazley’s course on SICP (details here, write up here). Learning the different trade-offs that different languages made definitely helped me feel more confident in my main language Python (which is imperative). I followed up the SICP course with compilers. Here Dave implemented a compiler in Python and Haskell, and described how the parser combinator he built for the latter blew his mind.

If someone with that level of Python mastery can learn something new from Haskell, maybe I can too (on mastery, here is Dave live-coding a WebAssembly interpreter on stage).

I admit the things I’ve been excited in has moved around a lot: machine learning, neural networks, build and deploy systems (Bazel, Docker, Kubernetes), WebAssembly, Go, now functional programming. I look at PhDs and resident expert at VCs and go “What will I be an expert in?”.

Maybe I won’t find one. Maybe I’ll continue cycling between consuming everything I can on a topic and burning out. Maybe what I learn doesn’t compound that much, or perhaps, as naturally.

Then again, maybe it’s better to have ups and downs rather than be passive. In the words of my significant other:

There's something lethargic at best and dangerous at worst about idleness.