Kind of wish I can be more like Dave Winer and just write about what I’m working on without thinking too much about it. I spent the week moving posts about personal projects and questions are flowing through my head like, “should I be moving these posts? Would it better if they stayed here? Should I even be writing these posts at all?” I don’t know how this topic became such a source of doubt and indecision. I both want to write about it, and not want to write about it. I want readers to read it while also recognising that I’ll be the only one that would find any of this interesting. I want it to be a showcase of how I spent my days at the same time I want to burn it to the ground. In the grand scheme of things, this is small potatoes, yet it would be nice if I can come up with some answers to these questions.

Update at 21:25: I had a bit of a think, and a listen to Reconcilable Difference #254, and I think part of what was causing me to feel that this movement was wrong was that I was not making any forward motion. All that I was doing was cataloging the past. At this stage, I’m not sure that’s a good use of my time. So I’ve decided to not go ahead with moving all my project posts over there and continue to write about projects here. Sure it may make it more difficult to find them, but that’s okay. At least they’re documented somewhere.

Anyway, I’ve made some screenshots of what the site was to be. I do like the red colour.

Apple AI in Mail and What Could Be

Apple AI features in Mail currently do not help me. But they can, if Apple invited us to be more involved in what constitute an important email.

Lots of good things in Go 1.24, including weak pointers (finally) and a utility function for generating cryptographically secure random strings (good for IDs). This new os.Root, which acts a bit like chroot, looks interesting too.

🔗 Prefer Numbered Lists to Bullets

Good arguments for using numbered listed instead of bullets in chat communication. I don’t disagree with any of them. I will say that tend to preferred bulleted lists simply because the chat apps I use tend to make using numbered lists more difficult than it should be. Slack, for example, only starts a “real” numbered list when it detects you type 1.. And once you’ve started, there’s no way to skip ordinals within the same numbered list.

Auto-generated description: A chat message from Leon Mika lists items with different numbers and includes a section to jot something down.
Note that "1. This" the only "real" numbered list, and has a different appearance.

Even Obsidian’s implementation is not perfect. Despite making it easy to start a numbered list at an arbitrary ordinal, it’s still not possible to skip ordinals.

It’d be simpler if they didn’t try to automatically make “real” numbered lists at all.

Via: Jim Nielsen

The Rules dialog in MacOS’s Mail needs some serious love. Aside from the fact that it’s teeny tiny, it’s also buggy. I couldn’t get the “set background colour” action to work, and selecting the condition to choose mail based on content doesn’t allow me to enter a value. Not good.

Well, damn! I ate something with peanuts today. That’s going to knock me about for the next few hours.

Here’s today’s face egging: my boss asked me to check if a list of countries we have included Åland Islands. Assuming that this list was in sorted order, I took a quick look at the countries beginning with A — conveniently at the top of the list — and came to the conclusion that the country wasn’t listed. Only after I told my boss that did I actually try to search for Åland Islands to double check, and sure enough: there it was, at the bottom of the list, right below Zimbabwe. Turns out the countries were sorted in code-point order, where Å comes after Z.

Request for any open-source projects that want to put banner ads on their site: please consider hard-coding the height of your banner to prevent the ad from reflowing the page. Otherwise, it may have an impact on the experience of those reading your docs.

Oh, that’s nice. Looks like Obsidian allows you to set the starting ordinal for numbered lists.

This was something I wish vanilla Markdown had for a while, so it’s good to see at least one Markdown editor embracing this.

First Impressions of the Cursor Editor

Trying out the Cursor editor to build a tool to move Micro.blog posts.

Playing Around With MacOS Image Playground

Trying out MacOS Image Playground.

Was a little concerned that I was running out of time to meet my “get out more” goal for February, until someone I used to work with pointed me towards a day-long dev conference. Bought a ticket then and there. So should be able to check off the goal for this month (if the fates allow).

Ok, I admit that I probably should’ve looked through the settings menu before writing a post, because it looks like my new cooler does has a shutoff after N hours feature. It also allows you to set the fan speed. Why it’s on page 2 of the settings menu is beyond me, but it’s there and it works.

Auto-generated description: A Seeley International MagIQTOUCH control panel displays options for adjusting settings like standby brightness, status information, and shutdown timer. Auto-generated description: A MagIQtouch thermostat displays a shutdown timer set for 2 hours on its touchscreen.

🔗 We are destroying software

We are destroying software telling new programmers: “Don’t reinvent the wheel!”. But, reinventing the wheel is how you learn how things work, and is the first step to make new, different wheels.

Wheels are not the same. If I need a wheel for a wheelbarrow, I don’t want to use a wheel for a tractor just because it exists. The same is true for software. If all I want to do is minify some JS without all the transpiling crap that comes from using React or Typescript, why not eschew Webpack for my own handwritten build scripts?

Via: Simon Willison

I thought the need to use these isolators — which, when opened, will shut off power in the overhead line flowing from north to south — was the reason why the train replacement busses are where they are. Turns out I was wrong, as these isolators are still closed. Must be some other reason.

Auto-generated description: Power lines and electrical structures with closed isolator switches are set against a backdrop of trees and a clear blue sky.

So many people on bikes today. Have not seen this many cyclists in the park for a while. Guess the cool weather has brought people outside. 🚲

Moving all my project posts onto a separate blog… again. I tried writing them here, but I still feel like they belong elsewhere, where I have a bit more control over the layout and the design. Spent the morning configuring the theme, which was going to be orange but I had to change it to red as the orange didn’t provide a nice contrast for reading (you had to darken it almost to brown). I’m not sure if I’ll move the old posts over to it yet. Maybe the one’s on UCL.

Update on 14/2: No, changed my mind again. See this post.

UCL: Some Updates

Made a few minor changes to UCL. Well, actually, I made one large change. I’ve renamed the foreach builtin to for.

I was originally planning to have a for loop that worked much like other languages: you have a variable, a start value, and an end value, and you’d just iterate over the loop until you reach the end. I don’t know how this would’ve looked, but I imagined something like this:

for x 0 10 {
    echo $x
}
# numbers 0..9 would be printed.

But this became redundant after adding the seq builtin:

foreach (seq 10) { |x|
    echo $x
}

This was in addition to all the other useful things you could do with the foreach loop1, such as loop over lists and hashes, and consume values from iterators. It’s already a pretty versatile loop. So I elected to go the Python way and just made it so that the for loop is the loop to use to iterate over collections.

This left an opening for a loop that dealt with guards, so I also added the while loop. Again, much like most languages, this loop would iterate over a block until the guard becomes false:

set x 0
while (lt $x 5) {
    echo $x
    set x (add $x 1)
}
echo "done"

Unlike the for loop, this is unusable in a pipeline (well, unless it’s the first component). I was considering having the loop return the result of the guard when it terminates, but I realised that would be either false, nil, or anything else that was “falsy.” So I just have the loop return nil. That said, you can break from this loop, and if the break call had a value, that would be used as the result of the loop:

set x 0
while (lt $x 5) {
    set x (add $x 1)
    if (ge $x 3) {
        break "Ahh"
    }
} | echo " was the break"

The guard is optional, and if left out, the while loop will iterate for ever.

The Set! Builtin

Many of these changes come from using of UCL for my job, and one thing I found myself doing recently is writing a bunch of migration scripts. This needed to get data from a database, which may or may not be present. If it’s not, I want the script to fail immediately so I can check my assumptions. This usually results in constructs like the following:

set planID (ls-plans | first { |p| eq $p "Plan Name" } | index ID)
if (not $planID) {
    error "cannot find plan"
}

And yeah, adding the if block is fine — I do it all the time when writing Go — but it would be nice to assert this when you’re trying to set the variable, for no reason other than the fact that you’re thinking about nullability while writing the expression to fetch the data.

So one other change I made was add the set! builtin. This will basically set the variable only if the expression is not nil. Otherwise, it will raise an error.

set! planID (ls-plans | first { |p| eq $p "Missing Plan" } | index ID)
# refusing to set! `planID` to nil value

This does mean that ! and ? are now valid characters to appear in identifiers, just like Ruby. I haven’t decided whether I want to start following the Ruby convention of question marks indicating a predicate or bangs indicating a mutation. Not sure that’s going to work out now, given that the bang is being used here to assert non-nullability. In either case, could be useful in the future.


  1. And the seq builtin ↩︎

Enjoyed this week’s P&B with Lou Plummer. I enjoy reading linkage.lol and I know people I work with who also follow’s Lou’s work. His blog recommendations look interesting too.

Released a new plugin for Micro.blog: Sidebar for the Bayou theme (yes, another sidebar plugin). Thanks again to @Mtt for making changes to the theme to support adding the sidebar. Can be installed from the plugin directory (please ensure you have Bayou version 1.1.3 or later).