Thoughts on continuing to use Twitter


In a previous post1, I mentioned how my experience of Twitter is actually quite nice and I don’t encounter any of the craziness that other people report.

Is that still true? Well, yes and no.

The problem: “political” content

There isn’t really any escaping (hmm, what should I call it) “unexpected content” on Twitter, as long as the entity being followed is a Person and not a Topic2.

I had earlier decided to be “casual” in my use of Twitter, which led to me randomly following and liking posts and people in my stream.

The problem is, the “information ecosystem” for all “political facts”3 is extremely polarized. There are competing narratives4 for each “event”, and being neutral as a matter of principle, I end up seeing both sides.

This isn’t bad per se, and is … at least informative, but it puts me at odds with the (hmm, what should I call them) “reductionists”, who want to neatly classify profiles (people) based on who they follow and what they like.

So there really isn’t any more “casual use” on the platform, and there is much more that could be said about why that is, why the incentives turned out this way, “what could have been“ and so on, but either way, there is a need for a more guarded interaction.

Give up on Twitter?

For better or worse, I have found, and keep finding, really interesting stuff on Twitter. There are people who share interesting images, or links, or articles. There are people who provide expert opinions on topics I like.

For me, this is a supplement to Reddit, except without strong subreddit boundaries.

Which is to say: there is real utility for me on Twitter, and I don’t want to lose that.

A task for myself: I should try to figure out what I’m really following on Twitter anyway. What are some themes in what I like, etc. Again, I don’t actually have time to do this thoroughly, so maybe just broad impressions.


What I’ve decided to do for now, slowly, gradually, is filter out any profiles where I judge most tweets are political.

I don’t have time to sit down and do this at one go5

So instead, each time I find myself scrolling through my feed, and I see too much political content6, I’ll ask myself if there is any topically interesting tweets at all from this profile, and if not, simply un-follow.

I’ve done this a bit already, and I expect it’ll be a few months before I’ll (probabilistically) get close to examining all my follows, but that’s the plan for now.

Digression: what is the best way to “thread” posts?

Retro-actively go back and apply a common tag? Create a linked list of posts? Lazy right now so will do neither.

There are a bunch of non-linear textual tools I use locally for this, but what’s the online equivalent? Again, lazy right now, will stick to WordPress, with its linear post timeline. But later … maybe one of TheBrain, Roam, or Notion.

Some other options

Just to brainstorm alternatives (for my future self, in case he has more time and interest)

  1. I could create multiple twitter accounts, for different “bundles of interest”, each me7, but a part of me.
  2. I could create a pseudonymous account and allow that one to be the one where I resume casually browsing stuff8.

  1. “Using Twitter the right way” ↩︎
  2. There are many possible ways a “topic” could be represented, I guess the spectrum runs from loosely-specified (think tags, hashtags, phrases) to strictly-specified (think subreddits) ↩︎
  3. So much of “putting words in quotes”, right? ↩︎
  4. Though well-visualized in Twitter’s new conversation view, so good on that. ↩︎
  5. The total number of profiles I’ve ended up following is surprisingly high, nearly 5000! It would take a couple hours, at least, to go through all of them. ↩︎
  6. Sometime later, I should mention how my news consumption patterns changed for the better in general. ↩︎
  7. Like namespaces within me, which is how I would really want profiles to be, dis-aggregated and reflecting our true sub-selves. ↩︎
  8. The right way for this would have been a single “read-only” view that everyone could have, of the entire graph of tweets. Imagine if we had the contract “you can either be authenticated and share/comment, or be pseudonymous and like/follow, but not comment.” ↩︎

Thoughts on blogging (changes)


Looking at my “online activity” for the past 5 years, I’ve been writing at:

  1. Twitter
  2. WordPress
  3. A Static Blog


  • Of these, (3) is basically dead, and is around merely as a a personal homepage for now
  • The use of WordPress consists of
    • Monthly curations
    • Periodic life updates
    • Occasional long-form “articles
    • Random one-offs
  • The use of Twitter consists of
    • Likes and re-tweets (duh)
    • Extracts (pics) from either books or online articles


  • The static blog remains in its “homepage purgatory”; I don’t have time to migrate that content over, and I don’t have any other plans for it
  • I’ve been bringing “my whole self” to Twitter, but I might reconsider that in the current … er … environment. I’m a self-described “centrist liberal” (I think?) which has been been an un-interesting position for as long as I can remember, but which in the context of current polarizing sentiment amounts to roadkill (so maybe a new pseudonymous account? we’ll see)
  • I’ll consider hiving off a separate WordPress blog that will basically be “my own Twitter”, the same way my current one is “my own Facebook” (wait, isn’t this what Tumblr was supposed to be? Lol, plus ça change …)
  • As mentioned earlier, I’ll try out Medium again, as a “duplicate” for any long-form content

My favorite year in movies- 2006

There are a bunch of movies I’ve liked, over the years, in different genres, from different times. But there is an unusually large cluster of them around a single year, 2006 (about fourteen years ago now).

The Fountain


Among Darren Aronofsky’s movies (I still haven’t seen Black Swan (trailer), but I remember the revelatory feeling of watching Pi (trailer) a long time ago), I like this one the most (perhaps The Wrestler (trailer) would be a close second).

The trailer isn’t as bad, but (with the explicit dates and sections) it gives an overly structured view of what is (or feels like) a layered, mixed up, overlapping, interwoven something.

I’m pretty sure I saw a poor-quality, poor-audio version all those years ago, but I’d recommend watching it at night with good headphones, alone1.

The Prestige


The trailer for this movie was terrible; it makes the movie sound very gimmicky, focussed on merely some inter-personal drama between magicians (why should anyone care about that?) And yet, of the movies in this list, it is my favorite, and the one I have re-watched the most.

It is not at all, in my opinion, about the particular details in the story (though Hugh Jackman, Christian Bale, and Michael Caine give a magical performance), but something more. Of Christopher Nolan’s movies, I like this more than Inception (trailer) — if the latter is “a movie like a dream”, this one is “a movie like a magic trick”.

Fun fact: the novel it is based on won the World Fantasy Award2.

It seems as though Borden (Bale) and Angier (Jackman) embody two different paths. I suppose part of the reason I like this movie is that I identified with one of them.

Kingdom of Heaven


This one is technically from 2005, but I watched it a few months late, so it gets to be in this bucket.

It was one of the first Blu-ray movies I watched3 on a then-new-and-exciting 1080p 50” TV, and it felt tailor-made for a giant screen.

Gorgeous visuals, a sense of history (that moment when Sibylla watching4 from the castle wall whispers, “Salah ad-Din!”), and a great soundtrack (I like all the instrumental pieces, but especially the song5 at the end.

The Illusionist


I think I like this for its “period feel” (Vienna, pre-WW1-ish) and high production quality more than the story itself. Also, I had first seen Paul Giamatti in The Lady in the Water earlier that year, which was a disappointment, and he was excellent in this.

(BTW if I had to drop a movie from this list, though, it’d be this one; not because it’s lacking anything, but because I like the others more)

Little Miss Sunshine


One of my all-time favorites, both for the movie and the soundtrack, I’ve tried to find “more like this” — as in literally trying to Google for “movies like Little Miss Sunshine” — but failed to find anything. It is a one-of-a-kind, sublime experience. It feels fresh every time I watch it.

This has the most accurate trailer of this list, in the sense that it conveys exactly what the movie is all about 🙂

Also, the first time I saw Paul Dano (my favorite: Being Flynn (trailer)) anywhere.

A Scanner Darkly


(I had missed this previously, updating this post now)

The movie is fifteen years ago, today, and the book it’s based on was published about forty-five years ago, but the themes of paranoid self-surveillance feel newly relevant.

That, and the style of the movie is quite unforgettable.


In those days I used to track movie reviews actively, and also watch movies immediately after release. These days, a year or more frequently elapses between release and viewing, and it’s very common for me to never watch and also never intend to watch the popular or critically acclaimed movies (or, tv shows) for a year.

It’s quite possible, then, that the reason these movies still appeal to me is simply because I was more engaged with movies at that time.

Still, it is my subjective list, and I do end up re-watching these, and re-listening to their soundtracks, so at the very least, I’m sure they are not bad movies.

  1. or not. I don’t actually know if it makes a difference; I think it does require some concentration ↩︎
  2. 1996 winners of science fiction and fantasy awards (scroll down to ”WFA”) ↩︎
  3. Rented from Blockbuster, back when they (a) were around, and (b) had the same rental rate for DVDs and Blu-Rays 🙂 ↩︎
  4. the meeting between Baldwin IV and Saladin ↩︎
  5. Light of Life” by Natacha Atlas; here is a version set to a montage of scenes from the movie ↩︎

My history with computers, Part 2- “Mid 90s


Picking up where I left off last time: we’d got a first, new computer, the first set of simple games, and a first operating system (ye olde DOS).


As I’ve mentioned, the only programming environment, programming interface, programming tool, programming editor I knew about or used, was the version of QBasic that came bundled with MS-DOS.

This might sound pathetic now, but felt very cool to me back then. I hadn’t experienced “programmable calculators”, so this was also the only “programmable thing”.

This beige box was the only thing that could compute at all. All this sounds redundant, because we have so many little computers all over the place now and they’re ubiquitous, but it’s hard to give an idea of how unique one of these was.

(Like this, except in black and white)

Everything was one giant file, with jumps all over the place. Incredibly messy, and IMO a terrible way to learn how to write anything (so much to unlearn later, sigh). But still, a great way to get started MAKING stuff.

Using it

Just to give an idea, here’s how a sample interaction might go (say I wanted to make some random patterns or drawing, in my “computer time” that day):

  • The computer is off, put it on (the idea of leaving it on all the time would have been crazy!)


  • It boots into the C:\> prompt, pretty quickly (no logins, single-user!)


  • I run QBASIC, see the screen above

  • I write some small fragment like

    SCREEN 1
    LINE (35, 50) - (100,150), , B
  • I hit run, and see a small rectangle (in the beginning, coming from LOGO, this is most of what I did)


  • I press a key, back in the editor, make some changes, repeat.

Game programming books

The installation of QBasic came bundled with an impressive game that gave the impression that a lot was possible (the code was very spaghetti-zed, but I supposed relatively okay).

(Like this, except in black and white)

At the time there were also a lot of books with games — by which I mean they had programs that you could type out and run (remember how I said everything is “just one large file”?)

I was fortunate my mother could bring these from the library of the school she worked at, and I learnt a lot (okay, questionable, but it definitely felt good) from reading through them.

I was also fortunate that my younger brother (with great patience!) would read aloud each line for me to type in, so we could play the game later.

One of these was a Star Trek game, the longest of the bunch, that we painstakingly typed in over several days, slowly making progress page by page (sounds ridiculous as I type this, but … yeah, you had to be there), and inevitably I must have made some small typo somewhere, that was then … impossible to track down, so we were quite dejected when it didn’t work.

However, the opening theme did play, with its signature tune, and that felt good. I should note that there were no speakers, so there was no sound, just a beeper with different frequencies.

I did try to read the source code, and it was essentially a “first RPG”, with an energy level that got depleted by actions, movement in a grid in space, ability to fire phasers and photon torpedoes, all that good stuff.

(I googled it, and … of course there’s a Youtube video for this:


I had seen Windows machines at school, when I finally got a chance to play with one of two computers that had a mouse. All I did was use MS Paint, because moving the cursor, pointing and clicking and seeing dots of color appear was such a novel experience!

Finally, one day, my dad brought a stack of floppies (because that’s how anything got installed) for Windows 3.11. It required baby-sitting the whole install experience, removing and inserting each floppy in the precise order in which they were labelled.


Now, after starting up the computer, at the c:\> prompt, it was possible to run win, and then see a brief splash screen.

(Like this, except in black and white)

After which there would be, well, windows on the screen.

(Again: this, except in black and white)

Things were getting exciting.

Remember though, still no mouse (that would come a few months later). So we got really good at keyboard shortcuts for selecting windows, moving, resizing, whatever.


A big boost came from getting (in another long bunch of floppies) Microsoft Office (!)

Each app took about a minute to load up, but we could now use (still one at a time) Word, Excel, Powerpoint, and Access!

I remember Access has a dialect called AccessBasic that I read the manual for, tried to use, and failed. I wanted to make a “home library system”, but spent all my time prettifying the frontend and never quite got the flow of entering books and looking them up to work properly.

I vaguely remember repeating this painful install process a couple times, and using Norton Disk Doctor and a bunch of other tools that simply have no analogue today.


Bundled games included Minesweeper and Solitaire, though I never quite liked them all that much.

At this time, windows was very much (until Windows 95, I think) a “shell within DOS”, so it was quite normal to play some games within Windows, and to exit Windows and play some games within DOS.

As far as I can remember (again, I wish I had written something down), there were better games in DOS, especially the ones my brother got from his friends.

One game stands out: Wolfenstein. Again, this was black-and-white without sound, but … it was the first-ever FPS. Let me repeat that: the first-ever first-person shooter (for me, at least). All I had seen were flat, 2-d games, maybe a few platforms, and … here was something totally different.

(Again, like this, except black-and-white, and no sound)

In today’s world of bloated “built on Electron” apps, it’s nearly impossible to appreciate the skill that went into creating an experience like this on a limited computing platform such as we had.

I do remember a visual Chess game on Windows, perhaps Chessmaster?


Time to stop again, so I can come back and write again later. Next time: an upgrade.

On “… the terrible beauty of maps”

This captures so well what I sometimes feel about visual note-taking (basic mind-mapping, as well as more flexible, powerful tools):


I’ve gotten to the point where I generally use outline as my default. The problem I have with maps is that they cue an aesthetic response that overrides other concerns, and I have trouble setting that response aside. A map is either beautiful and this creates a barrier to revision, or it is ugly and making it attractive becomes my priority. If I leave it ugly, then I find it hard to work in the file unless I stop using the map. Outlines short circuits this enormous weak spot in my mental make-up.

(Also, a nice phrase!)

On Narration, Tinderbox, and other things …

It’s hard to say what is so good about this video. It is many things.

It is a generally well-made ensemble, a slice of art criticism, a slice of philosophical questions and concerns, it is a demonstration of “thinking through a tool”, it is a demonstration of “showing through a tool“, it is a demonstration of one such tool (Tinderbox), an autobiographical account, and probably more …

Lunchtime WSJ book reviews

I started a paper subscription to WSJ right as the pandemic started, and as we eat family lunch, with no phones allowed, I quickly skim the paper.

I wish I had done this earlier, but also, I know I couldn’t have, because this “15-minute window” is the only way that that I could physically read it — mornings and evenings are too rushed, and night is for doing uninterrupted work that the fragmented daytime doesn’t permit.

Also, I’ve found the reviews are surprisingly useful, I definitely didn’t expect to be reading and learning about new stuff this way.

Here, as an example, a book review excerpt from today’s (well, yesterday’s, I have a one-day reading lag) paper.

A simple calculator in Scala

Here1 (credits to Ben Lynn2) is a simple calculator in Haskell.

I decided to try porting it over3 to Scala. The original example also makes this work in Javascript using Haste; I’ve left this out for now (though I might come back and get this to work under Scala.js later).

The underlying basis is the same, using the awesome fastparse library to stand-in for Parsec/Megaparsec from Haskell, and the code feels quite concise and readable to me4.

This is the entirety of the parsing code we need:

  def numParser[_: P] = P( ("-".? ~ CharIn("0-9").rep ~ ".".? ~ CharIn("0-9").rep).!.map(_.toDouble) )
  def parenParser[_: P]: P[Double] = P( "(" ~/ exprParser ~ ")"  )  // needs explicit type because it's recursive.
  def factorParser[_: P] = P( parenParser | numParser )
  def termParser[_: P] = P( factorParser ~ (CharIn("*/").! ~/ factorParser).rep ).map(eval)
  def exprParser[_: P] = P( termParser ~ (CharIn("+\\-").! ~/ termParser).rep ).map(eval)

… along with a tiny bit of evaluation:

  def eval(ast: (Double, Seq[(String, Double)])): Double = {
    val (base, ops) = ast
    ops.foldLeft(base) {
      case (n1, (op, n2)) =>
        op match {
        case "*" => n1 * n2
        case "/" => n1 / n2
        case "+" => n1 + n2
        case "-" => n1 - n2

That’s it.

That’s all you need to take in a String and convert it to a Double.

What Ben says about the evolution of parsing-as-it-used is true: it was completely normal to resort to lex/yacc and then flex/bison for these earlier, but Parser Combinators and PEGs take it to a whole other level, and once you’ve become comfortable with them, there’s no going back to the verbose old days.

Just to break down the parsing code a bit:

This parses a number: def numParser[_: P] = P( ("-".? ~ CharIn("0-9").rep ~ ".".? ~ CharIn("0-9").rep).!.map(_.toDouble) ). Or rather, it returns a function that can parse a number.

It’s possible to play5 with this within a repl; I use sbt console6 when something depends on a class/object within a project, but this is an independent enough chunk that you could use ammonite7 instead too.

agam-agam@ import fastparse._
import fastparse._
agam-agam@ import NoWhitespace._
import NoWhitespace._
agam-agam@ def numParser[_: P] = P( ("-".? ~ CharIn("0-9").rep ~ ".".? ~ CharIn("0-9").rep).!.map(_.toDouble) )
defined function numParser
agam-agam@ parse("45", numParser(_))
res263: Parsed[Double] = Success(45.0, 2)
agam-agam@ parse("4.5", numParser(_))
res264: Parsed[Double] = Success(4.5, 3)

Where it gets interesting is composing these parsing functions.

Given a function to parse a factor (a number, or sub-expression within parentheses), we can define a function to parse combinations of multiplying/dividing these as:

def termParser[_: P] = P( factorParser ~ (CharIn("*/").! ~/ factorParser).rep ).map(eval)

… which reads very “regex-like”, imo!

Anyway, I added a basic I/o driver around this, so it can be “run” as:

➜ sbt run
[info] Loading settings for project simplecalc-build from metals.sbt ...
[info] Loading project definition from /home/agam/code/simplecalc/project
[info] Loading settings for project simplecalc from build.sbt ...
[info] Set current project to hello-world (in build file:/home/agam/code/simplecalc/)
[info] Compiling 1 Scala source to /home/agam/code/simplecalc/target/scala-2.13/classes ...
[warn] there was one deprecation warning (since 2.11.0); re-run with -deprecation for details
[warn] one warning found
[info] running Main
Simple calculator
Enter an expression, or 'END' to quit: 5   6
Result: 11.0
Enter an expression, or 'END' to quit: 2 - 5.2 * 1.5
Result: -5.800000000000001
Enter an expression, or 'END' to quit: 1.8   2.3 / 4.5
Result: 2.311111111111111
Enter an expression, or 'END' to quit: 42   1 - 5
Result: 38.0
Enter an expression, or 'END' to quit: END
[success] Total time: 55 s, completed Aug 6, 2020, 11:36:47 PM

(Yeah, the weird decimal point behavior is just Double being a double; that is beyond the scope of this example 😐)

  1. ”Parser Combinators” ↩︎
  2. Indeed, Ben has a bunch of other awesome stuff like this, and I might just go Scala-ize more of them 🙂 ↩︎
  3. Repo (with this core code, as well as a Main driver and tests) is here ↩︎
  4. My subjective opinion is that Scala is a sweet spot between ↩︎
  5. I’ve taken a “shortcut” with my map(_.toDouble) bit there, so it doesn’t fail properly right now and you get java.lang.NumberFormatException: empty String, but normally you’d get a Parsed.Failure back ↩︎
  6. Console ↩︎
  7. Ammonite ↩︎