For a change of pace, I’ve been learning Rust, which requires one to think about mechanical details like pointers and memory. I never studied computer science in college, and these topics have always intimidated me — but Rust’s tooling, documentation, and community have been spectacular.
My favorite method of learning is by trying to build something, so I’ve been learning Rust by tackling a long-standing pet peeve of mine: Mousing around the “desktop”.
More specifically, I’ve been building an interface that unifies all of my computer “things” — browser tabs, OS X windows, Emacs buffers, etc. — in a keyboard-driven, searchable UI.
It might be best explained via a short demo video:
One constraint I’ve given myself is that all user interactions must be processed and re-render within 16ms (i.e., 60 frames/sec). This constraint has forced some interesting design tradeoffs:
What data structures let you regex search 500,000 filenames that quickly?
How can you do async searches without having results change out from under you, an instant before you select one?
What’s the fastest way to give Chrome a bitmap to draw, anyway?
That said, it’s been an awesome, tangible constraint that helps me keep the design focused — not to mention it’s quite satisfying to use software that that feels instant.
Given that most processors are measured in GHz — billions of times a second — it makes you wonder why we’re so often waiting for our computers at all. Turns out this is a wicked complex question, and it’s related to the gazillion layers of abstraction we programmers make for ourselves. Peep these rad articles/talks on the topic:
Anyway, for those of you around Melbourne, I’ll be speaking about this project on Feb 22 at the local Rust meetup: https://www.meetup.com/Rust-Melbourne/events/246977264/
Finally, if you want to help with beta testing, have questions/suggestions, or have an idea for a proper name and logo, just reply to this email!