This week: a multi-armed bandit and a opinion dynamics model, both written in Julia by chance. That sparked a rabbit hole of reading about the language.
Author: Sebastian Callh
This long post motivates, introduces, and implements multi-armed bandits for the problem of deciding which of three fish to feed three species of penguins. I’ve read a little bit about multi-armed bandits, but this was a simple but concrete application that I learned a lot from.
One of the things I appreciated about this post is that it was written in Julia. This made me less able to follow the code than if it were written in Python, but I was exposed to non-trivial Julia code for the first time. I would love to try out the language some time.
Author: Unchitta Kanjanasaratool
This long, technical blog post describes the process of implementing an “opinion dynamics model” (about how two agents will influence each others opinions) in Julia. The author comes from a Python background herself, so I particularly appreciated her callouts of Julia-isms like:
- multiple dispatch, which means classes don’t have methods (?)
- where you need types (not everywhere?)
- what is or isn’t mutable (a struct might be immutable, but its members could still be mutable)
- putting a
!after functions to note that they have side ffects
- and what their decorator-like constructs do (
@inboundscan skip checking for an array out of bounds if you know it will always be in bounds)
This was really good! It’s clear that this post was written for people with backgrounds similar to me. I felt like the code examples and explanations were at the right level of not being too boring or introductory but not being totally overwhelming, either.
Sidenote: it’s pure chance that I came across two Julia posts in one week, but I’m here for it. It seems like a great language! I do think I should read some tutorials before diving into these nontrivial examples, though. Oops!
Some other Julia articles:
- The quickest introduction to Julia for Pythonistas
- How to learn Julia when you already know Python
- Is multiple dispatch the same as function overloading?
- Some thoughts on generic programming in Julia
Articles on Roam Research, which I’m considering adopting:
- Roam Research by Drew Coffman
- Thread of threads from the co-founder Conor White-Sullivan
- Another Twitter thread by Adam Keesling
- Roam: Why I Love It and How I Use It by Nat Eliason
And articles on PhD programs:
- Helpful resources for applying to computer science PhD programs from Brown CS
- HOWTO: Get into grad school for science, engineering, math, and computer science from Matt Might
- The Good, the Bad, and the Bye Bye: Why I Left My Tenured Academic Job by Yanick Fratantonio