Weeknotes 169
22nd September, 2024
“Text objects”
-
TIL that CockroachDB is Postgres compatible.
-
Marco Arment on Overcast’s episode deletion feature.
For instance, when evaluating an episode past the limit for deletion:
What if it’s an old episode that I went back and added?
What if I’ve partly listened to it?
What if I partly listened, but never finished it? (How long ago? How much is left?)
What if I’m currently listening to it?
What if I’m listening to it, but on a device that hasn’t been used in a while?
What if it’s downloaded to the Watch? (How recently has that watch been used for standalone playback?)Even features which sound simple are often not. Experienced developers know this so when you’re building a “simple” feature and someone says “just do x” and they look at you like an idiot point them at this list of “what ifs”.
-
Control Panel for Twitter [Via Harry again]
Make Twitter slightly less shit.
Still full o' grifters though.
-
I’ve been frustrated this week dealing with an endless list of unhelpful idiots.
-
Maybe this is elitist or something, but I like that Mastodon is never going to take off like Twitter did.
Back in 2007 when I joined Twitter is was full developers, programmers, designers, web types etc, and it was an interesting place. Then the rest of the world found it and it got worse and worse until we got to where it is now.
Mastodon is too difficult for the average person to join: What is an instance? Where do I “sign up”? etc so it won’t ever grow like Twitter. And the federated nature keeps it smaller whilst allowing, well, federation.
And I’m glad.
-
Rails World is next week, and predictably, I can’t be arsed. I’m sure the trip will be worth it in the end.
-
It was the third Ruby meetup I’ve been trying to organise this week. Back down to two of us this time. It was a little bit disappointing, but when the group is already small it only takes few dropouts to get here. I will try to get more organised for the next one and hopefully we can turn it into something more consistently attended.
-
Speaking of which, I created a website for said meetup. Still got it.
-
The Elixir ecosystem continues to impress.
ExUnit
just got a new flag to help with tracking down intermittent test failures:mix test --repeat-until-failure N
Via Elixir Streams.
-
Usual story; I’m not using Neovim to it’s fullest. This time, Text Objects. For example, if your cursor position was in the middle of a paragraph of text, you could type
vap
to visually select the whole paragraph. It’s very cool.However, sometimes some of the combinations are a bit tricky to type. Particularly when you want to involve your friend and mine, the curly brace –
{
and}
– or in fact any character that requires shift to reach it.Thankfully, I discovered that
mini.ai
extendsa
/i
textobjects to make this easier by addingaq
/iq
for quotes, andab
/ib
for brackets.“Quotes” includes
"
'
`
“Brackets” includes
(
)
{
}
[
]
<
>
This means that in the case of brackets, you can type
vab
and it will select any text within any of the matching “bracket” characters above. Much less typing and easier to use.But there’s more. I noticed whilst experimenting that
am
andim
also worked for Ruby methods, so if you wanted to visually select the contents of a Ruby method you could dovim
– nice.However, it wasn’t clear why this worked, but I found that these text objects are defined by the vim-ruby runtime files maintained by tpope. And it’s not only
am
andim
that work, you can also doaM
andiM
for Ruby classes!Pretty sure I’m going to be learning Vim forever.