Week of 27 April, 2020

  • Started a new contract on Monday. It’s been fun, but I’m spending far too much time dealing with layout issues. I thought we were done fighting with CSS in 2020, but that’s clearly not the case.
  • Ramda is pretty damn amazing. So is Tailwind. Working with these libraries over the past week has been a total blast.
  • Quitting social media and the news has made my anxiety a lot better. It has given my brain the space and energy to think about things beyond COVID-19 and Modi’s violent politics. While I’m still reading the news on weekends, I don’t plan on engaging with it on weekdays. I believe this arrangement will let me keep my sanity while also staying informed about what’s going on in the world.
  • Social media is basically cigarettes for your brain. It’s as addictive as them, and does as much damage to your brain as cigarettes do to your lungs.
  • The new Roomba is making me feel like I’m living in the future. I mean, I can tell him to clean the kitchen from my phone and he just wakes up and does it?!!
  • I’ve been working my way slowly through Amrita Pritam’s ਮਿੱਟੀ ਦੀ ਜ਼ਾਤ (Mitti Di Zaat, roughly The Caste of the Soil). My Punjabi vocabulary is tiny so it’s tough going, but the language hits me in a place that English can’t quite reach.

India is No Longer India

Aatish Taseer writes:

By the time I was an adult, the urban elites and the “heart of the nation” had lost the means to communicate. The elites lived in a state of gated comfort, oblivious to the hard realities of Indian life—poverty and unemployment, of course, but also urban ruin and environmental degradation. The schools their children went to set them at a great remove from India, on the levels of language, religion, and culture. Every feature of their life was designed, to quote Robert Byron on the English in India, to blunt their “natural interest in the country and sympathy with its people.” Their life was, culturally speaking, an adjunct to Western Europe and America; their values were a hybrid, in which India was served nominally while the West was reduced to a source of permissiveness and materialism. They thought they lived in a world where the “idea of India” reigned supreme—but all the while, the constituency for this idea was being steadily eroded. It was Bharat that was ascendant. India’s leaders today speak with contempt of the principles on which this young nation was founded. They look back instead to the timeless glories of the Hindu past. They scorn the “Khan Market gang”—a reference to a fashionable market near where I grew up that has become a metonym for the Indian elite. Hindu nationalists trace a direct line between the foreign occupiers who destroyed the Hindu past—first Muslims, then the British—and India’s Westernized elite (and India’s Muslims), whom they see as heirs to foreign occupation, still enjoying the privileges of plunder.

https://www.theatlantic.com/magazine/archive/2020/05/exile-in-the-age-of-modi/609073/

Fire and Ice

This is a flame graph:

Source: https://blog.codecentric.de/en/2017/09/jvm-fire-using-flame-graphs-analyse-performance/

Turn it upside down, and you get an icicle graph:

Source: https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/reference

This means the flame graph view in the Firefox and Chrome profilers is actually an icicle graph view. Who knew?

I learned this tidbit of trivia when I was trying to figure out whether it’s practical to implement a flame graph in the browser using SVG.

Turns out SVG gets too slow if you have a few thousand elements on the screen. You probably want to use <canvas> if you need to visualize a ton of data at once. For this reason, both Firefox and Chrome use <canvas> for their flame graph views. Here is Firefox’s implementation, and here is Chrome’s.

Week of 20 April, 2020

  • Anxiety was bad this week. I was up until 3AM on Tuesday night because I couldn’t turn off my brain, no matter how much I tried. I don’t know what triggered it, but getting off social media and news websites seems to have fixed it.
  • I’ve started spending a bit of time each morning reading short stories in Punjabi. I no longer struggle with the grammar or the script — I’ve already been reading the news in Punjabi for a few months — but a lot of the words are new to me. Having to constantly look up words slows me down, but I’m building a lot of vocabulary very fast.
  • I’ve given in and ordered a Roomba for the house.
  • Our girl kitten turned out to be a boy kitten, which explains the constant fights. The older cat doesn’t like this new roommate at all.
  • Not much progress with Crafting Interpreters this week, but I did add a way to convert an AST into a Graphviz diagram. Very proud of this one.

Week of 13 April, 2020

  • The cats have stopped fighting! Minor squabbles still break out once or twice a day, but for the most part they’ve settled into an uneasy truce.
  • Found a contract for the next six weeks. It’s not a Rust gig as I had hoped, but it involves some heavyweight data visualization in the browser that will call for a lot of cleverness. I expect to enjoy this thoroughly.
  • Eating a lot of cheese this week. No regrets.
  • Working through Crafting Interpreters at a decent pace, though I could probably be going faster. Instead of just translating the Java code in the book, I’m trying to write idiomatic Rust as far as possible. This takes longer and makes my design totally different from what’s in the book, but I’m learning far more this way. I’ve also added a few additional features to my implementation, like proper line editing in the REPL using rustyline.
  • My fitness trainer now has an online lesson plan, so I’m back to working out. Feels good to be doing something with this bag of meat.
  • Still irritated at how much pointless detail that Gandhi book has. But I’m going to get through this thing one way or another.
  • Still playing Radiant Historia and Into the Breach, still loving the hell out of both games.
  • Album highlight of the week is Cha Cha Palace by Angelica Garcia.