Weeknotes 2024 W47: Memoized

November 18​–​24, 2024
1400 words

Quick bits:


Shower thoughts:


At long last, I published The intricacies of implementing memoization in Ruby. This article turned out a bit longer than anticipated (it’s well over 5000 words) but it is packed with good stuff. Give it a read!

Now I can move my focus and continue with my Writing an Interpreter in Ruby book, right?


The memoization article is the biggest piece of writing I’ve created so far, and it would have been much harder without Scrivener.

But the software isn’t perfect. One particular snag I hit in writing this article is that Scrivener’s Markdown dialect differs from the dialect of kramdown, the Markdown library that I use for my web site. I was able to work around the issues, but it is a problem that will pop up again in the future.

Another issue is that Scrivener character styles can’t be nested, and hyperlinks are character styles, so a code element in the middle of a hyperlink breaks up that link in three immediately adjacent links: 1) a link containing the text before the code, 2) a link containing the code element itself, and 3) a link containing the text after the code. I can work around this limitation by using pure Markdown rather than character styles, but that defeats then the point of styles.

The idea of creating a semantics-first, structured prose document editor is still on my mind. I’m avoiding the work on a prototype for that, because I predict it will be a lot of work for which I have neither the time nor the energy.


I read Juha-Matti Santala’s Search your notes first and realized that I wasn’t quite relying on my notes collection as much as I could. To help me out, I created a new Alfred workflow2 that helps me search through my Bear notes. Behold:3

A screenshot of Alfred. It shows the search term “b mastodon” and below it is a list of notes (search results) relating to the term “mastodon”.

Until this week, I was not aware of Alfred’s Script Filter Input workflow object. It’s very powerful, and essentially turns Alfred into a search engine. Very useful.


Over the last year or so, I’ve been restructuring my files, mostly following the convention that Johnny Decimal sets forth (though I’m by no means following it religiously). Here are the high-level areas of my life:

I’m using this approach not just for my Documents folder, but also my email organization. It works rather well — judging by the fact that I don’t nearly as often lose documents, and can find the important stuff usually very quickly.4

There is also area 0. This is the “system” or “meta” area and contains information about the structure of the system itself, as well as my inbox.5

Still, the whole system is in flux. It has a few problems:

There aren’t big problems. I’m evolving the system slowly to fit my needs. Besides, I would like to think I am more organized than 95% of the people out there.


Entertainment:


Links:

Politics links:

Tech links:


  1. I picture Meta as Evil Corp — I mean E-Corp — from Mr. Robot. ↩︎

  2. I forked my workflow from drgrib/alfred-bear to make it suit my needs a little more. ↩︎

  3. Yes, I do title all my as-yet-unnamed week­notes “XXX.” This placeholder makes it clear that the title is still missing, and makes the unfinished week­notes entry quick and easy to find. ↩︎

  4. The inbox is my escape hatch. It’s, uhh, not the prettiest. Hey, I’m not perfect! ↩︎

  5. Paris Is Burning, directed by Jennie Livingston (Art Matters Inc., BBC Television, Edelman Family Fund, 1990). ↩︎

  6. Mid90s, written and directed by Jonah Hill (A24, IAC Films, Illegal Civ, 2018). ↩︎

  7. Half Life 2 (Valve, 2004), published by Valve. ↩︎

  8. Shirley Jackson, We have always lived in the castle (London: Penguin, 2009). ↩︎

You can reply to this weeknotes entry by email. I’d love to hear your thoughts!
If you like what I write, stick your email address below and subscribe. I send out my weeknotes every Sunday morning. Alternatively, subscribe to the web feed.
Incoming links: Scrivener.