šŸ’¾ Archived View for gemini.circumlunar.space ā€ŗ users ā€ŗ adiabatic ā€ŗ scrawlspace ā€ŗ 2021 captured on 2022-03-01 at 15:15:31. Gemini links have been rewritten to link to archived content

View Raw

More Information

āž”ļø Next capture (2022-06-03)

-=-=-=-=-=-=-

Scrawlspace from 2021

This is scrawlspace. I scrawled elsewhere and then moved it into this space. Do not expect coherence or permanence here, either.

2021-12-29, and not one day before: If long partially-changed lines bother you when diffing, consider getting a better differ

If you havenā€™t grumbled about the limitations of gemtext, you probably havenā€™t used it very much at all.

One of the gripes going around is that, in gemtext, you canā€™t have logical lines that are separate from paragraphs. In HTML, for example, you can have something like this:

<p>
    I like traffic lights.
    But only when they are green.
</p>

This would render as, window width permitting:

 I like traffic lights. But only when they are green.

Meanwhile, if you wanted to change ā€œthey areā€ to ā€œtheyā€™reā€, youā€™d get a diff that would change only one line in many, making it easier to see what changed.

Iā€™ve noticed that if you have a long prose line and only change a little bit of it, GitHubā€™s own views of diffs will highlight the little tiny bit that changed inside of the changed-line highlight. However, not everyone wants to use a website, much less GitHubā€™s, to view diffs.

Enter diff-so-fancy:

diff-so-fancy on GitHub

diff-so-fancy will highlight the changed bits inside lines, saving you from having to squint and count to find out exactly what changed in that long paragraph you wrote.

Hopefully this knowledge will save someone the hassle of inserting a build step in a capsule-publishing workflow somewhere. AFAICT, using a fancier diff program beats writing and using line paster programs to turn manually-broken lines into proper gemtext prose.

Thereā€™s also delta, which also works with git and without:

delta on GitHub

2019-02-15, but never actually published anywhere until 2021-12-29: Homebrew is the new freshmeat

Back in the late 90s and early 2000s, freshmeat.net was _the_ place to go to see whatā€™s new in open-source software. As time went on, though, traffic dwindled and the site stopped being updated in 2014.

A while back I noticed that Homebrew was filling that need for me. Iā€™ve discovered a bunch of interesting, if not useful, utilities just by looking at the output of `brew update`. I went through the output of `brew list` and noticed these packages that I never would have discovered if I hadnā€™t been looking at the ā€œNew Formulaeā€ and ā€œUpdated Formulaeā€ sections:

asciinema, a terminal-session recorder

bat, a cat(1) clone

diff-so-fancy, quite literally a fancier diff

exa, a better ls(1)

fd, a more-ergonomic find(1)

fx, a command-line JSON processing tool

glances, a top(1) clone

lsd, a better ls(1) that depends on fonts I donā€™t have

prettier, the code formatter

tag, a thing to fiddle with macOS tags

(c)webp, the lossless image format (compressor) with a submediocre lossy mode

yamllint, a YAML linter

youtube-dl, the downloader succeeded by yt-dlp

yq, a command-line YAML-file processor

While I only use about half of these even somewhat regularly, Iā€™m happy I have them around in case I do.

Background reading:

Wikipedia on Freecode nƩ Freshmeat

Homebrew, the macOS package manager

2021-12-16: Pervasive dark-mode support causes weird problems

Youā€™ve heard of konpeito.media, right? Itā€™s a site that has chill music.

After a few evenings of keeping the .mp3 files out of my iTunes (now Music) collection by playing it in QuickTime Player, I decided to properly load up the files in Music. This ended up being:

ā€¦and then I started playing one of the tracks, and the mostly-white album art was positively blinding.

So now I have this in the bottom-right corner of my screen:

ā•­ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā•®
ā”‚o o o          ā™« Side A               ā”‚
ā”‚ 14:38 ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā•‹ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā” 29:30 ā”‚
ā”‚               ā—‚ā—‚ ā–Œā– ā–øā–ø               ā”‚
ā”‚   ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā”ā—  ā”‚
ā•°ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā•Æ

gemini://konpeito.media/

2021-12-06: Reentry options

Sometimes you want to do things that Gemini canā€™t.

I stumbled over md2blog and I think it might be my go-to option for when I want a superlatively simple web log and canā€™t be bothered to set up Hugo.

Oddly enough, not only does md2blog support dark mode, but itā€™s dark-mode-only.

As an aside, I wonder if Deno means that weā€™ll start seeing single-file nicely-contained programs written in JavaScript or TypeScript. thatā€™d be nice ā€” itā€™s kind of a shame that Go and Rust have been the only new languages to do this kind of thing.

md2blog, a zero-config static site generator for dev blogs written in Deno

Hugo, a featureful static-site generator written in Go

2021-12-04: An idea on conveying things in text

Emoji are Lojban attitudinals for normal people.

one of many pages that explain what attitudinals in Lojban are

2021-11-30: November isnā€™t November, according to CAPCOM

As I write this, itā€™s November 30th. The last day in November.

CAPCOM hasnā€™t shown my posts all month.

Now my posts that I made all during this past month are showing up.

If you want to see fresh posts, you might want to skim through all the posts listed on CAPCOM. Not just the ones made since December 1.

That ā€œCAPCOMā€ thing Iā€™ve been talking about:

CAPCOM

2021-11-29: Snip

Currently, my Atom feed is 20 KB. This page is 86 KB.

Maybe one day Iā€™ll put in logic to cut the Atom feed to the last so many entries.

I donā€™t assume feed polling is something that people wait on. The worst imaginable internet speed I can think of is 2 KB/s which is what I got back in the late 90s. 10 seconds in the background seems fine to me, and 40 seconds to load a full page (when the stuff you want is probably at the top anyway) seems fine to me also.

Then again, when I think of bad modern Internet, I think of connections with loads of packet loss. Sure, 2 KB/s was super duper slow, but generally it was rock-solid stable.

2021-11-25, and still in the very same comfortable chair: Being weird, but with a philosophy behind it

On August 25 of this year, I wrote a post titled ā€œBeing weirder with lessā€. In it, I discussed the things I do differently on this capsule and its gemlog compared to what Iā€™d do on a website with a blog. After getting into the swing of gemtext and seeing the way other people handle their capsules, Iā€™ve been pondering how different my gemtext style is from my Markdown style, much less my raw-HTML style.

The thing that sets my raw-HTML style apart from the other two is this: I donā€™t use super-nested section-and-headings constructs in either Markdown or gemtext.

But even compared to Markdown, my gemtext style is fairly different:

At any rate, I added a new old thing to my capsule:

Howard Roark on the Parthenon

Itā€™s something I think about when I do a thing differently given a different set of materials and tools.

2021-11-25: Pick a speed, any speed

Iā€™ve got a new laptop. Well, it still feels new to me, at any rate. Seems like thereā€™s new things to learn about it and its ecosystem.

USB-C charging is still new to me. Generally, laptops have a brick, and you plug your laptop into that brick, and the laptop charges at that brickā€™s speed.

Now, you can basically pick your brick. There are lots of bricks. Some are weird shapes. Some are largely up to the task of charging a laptop, while others can only charge the laptop while itā€™s asleep and can only slow the drain otherwise.

I tried plugging my laptop into a bunch of things and this what kinds of wattage I can get:

If you want to get wattages like mine, do this:

The app is still called System Information, but set that asideā€¦

Also, if you want to check a bunch of different chargersā€™ speeds, press āŒ˜R to refresh the page.

ā‚

System Information says ā€œCharging: noā€ for the 15W and under charging speeds. My hunch is that if Iā€™m letting the computer sit idle with the monitor on, 15W might be enough to charge the battery super slowly, but not if Iā€™m watching 1080p@60 video streams. In that case, I might want to use the 18W charger if I actually want to charge while watching fast streams.

At any rate (sorry), the 2W trickle charge is enough to charge the battery by 1% per hour when the machine is asleep. Since Iā€™m trying to keep the battery under 60% unless Iā€™m going somewhere, Iā€™ll probably use just that unless Iā€™m trying to recover the battery from a monster Netflix session.

Stuff mentioned in this post:

on Switch chargers, and why Switches are kind of picky

UPS

surge protector

data blocker

2021-11-16: Gemini isnā€™t a complete replacement for everything that can be made with HTML over HTTP, and thatā€™s OK

Background:

Drew DeVault, ā€œReframing the philosophy of Geminiā€

Hereā€™s his formulation of what Gemini is:

Gemini is a read-only protocol for hyperlinked content distribution.

I endorse this.

One of the ways in which the near-total dominance of the Web has warped minds is that, these days, people expect a suite of interrelated protocols (or only one protocol+tool combination) to handle all aspects of publishing.

For example, most people raised in the Blogger/WordPress era to be able to edit and publish a website byā€¦going to that website, or possibly a slightly-different controlling website. It seems like thereā€™s a dash to recreate this sort of workflow with add-on protocols.

For some reason, FTP uploads (or reasonable spiritual successors like SFTP or rsync-over-ssh) are being ignored, possibly because (choose one or more)

The odd bit is that preexisting SFTP clients are probably way better fit for purpose than anything that anyone could cajole a Gemini client developer into making. Transmit, my SFTP client of choice, dates back to 1998. The overwhelming majority of not-super-technical users would be better served by using a file-managing client thatā€™s fit for purpose instead of using some newfangled baked-in Gemini-client thing that only works on one or two clients.

Or everyone in the Gemini community could get over his reflexive HTML-over-HTTPS avoidance, and make a service or three that bake in a nice editor/previewer. Assuming Sourcehut has some kind of ā€œmodify files in a repository without even cloning them to a computerā€ functionality like GitHub does, that would be a fine way to leverage the power of modern web apps to generate user-friendly write-once-run-anywhere ways to publish gemtext.

2021-11-12: Itā€™s hippie to be square

Background reading:

http://solarprotocol.net/

Solar Protocol (linked above) is pretty neat:

This website is hosted across a network of solar powered servers and is sent to you from wherever there is the most sunshine.

ā€œThe work is performed wherever energy is the most availableā€ sounds like a boring enterprise optimization problem to be handled by senior AWS architects and cryptocurrency mining pool network operators, but this kind of thing makes it sound cool.

Iā€™m not sure how much power the load balancer takes up compared to the servers, but the whole thing is a neat art project. Probably the most interesting thing about it is that the sites will serve a low-power version of the site if their batteries get too low. As Iā€™m writing this, Iā€™m getting served from a server called ā€œCaddie in Controlā€, in Coal City, with battery levels at 100%. Previously, I got roughly the same page, but the battery levels were at 70%.

ā‚

And yet, I canā€™t help wonder what more they could do to be power-efficient in fantastically boring ways.

Itā€™s being sent with a gzip transfer encoding. I can only wonder if theyā€™re serving pre-compressed content (see the Apache docs link below). However, neither the HTML nor the CSS is minified. Thereā€™s not just a bunch of extra whitespace, but also commented-out code that could be yanked before sending.

Then there are the dithered black-and-white photos of the servers. I like the aesthetic (I have BitCam on my phone, even though I donā€™t use it much), but the files themselves actually leave quite a bit to be desired.

Hereā€™s what theyā€™re like for the one Iā€™ve seen of the serverprofile.gif of Caddie in Control:

Sounds like the winning play is to run oxipng on all the pixelated .gif files and then make WebP versions, and serve them up in a <picture> element with the WebP versions as special sources.

clock.png is another matter entirely since itā€™s way bigger and generated periodically (maybe every 15 minutes or so).

That said, running oxipng -Z -o max on clock.png took up 251 seconds of wall-clock time and almost 23Ā½ minutes of CPU time. cwebp -z 9 was much more efficient at 6ā…• seconds of CPU time, and so it might actually be worth running as an optimization.

The CSS for the site uses variables, er, custom properties extensively, so they can probably get away with not many people hitting the uncompressed PNG.

I wonder how much extra power itā€™d take to get TLS up and running on these machines with a Letā€™s Encrypt cronjob running once daily and actually getting a new certificate at the 60-day mark, as one does.

References:

Apache documentation for mod_deflate: ā€œServing pre-compressed contentā€

BitCam

2021-11-09: Rainy Day Women ā™Æ12 & 35: evitable tagline

Iā€™ve got a shiny new laptop.

Itā€™s got one of those ARM-based chips.

A handful of programs that are important to me are still Intel-only. Everything Iā€™ve built from Homebrew is ARM-based, but there are a few things that throw up the ā€œdo you want to install Rosetta?ā€ prompt.

In no particular order:

Some of these are simple enough to go without. Steam, I can simply refuse to run. Iā€™m not sure when Iā€™ll notice the downloadable version is a universal app, but eh. Even if I am able to run Steam natively, itā€™s not as if I expect any games to have been compiled for Apple Silicon unless theyā€™re Apple Arcade games.

Dropbox, Iā€™ve replaced with Maestral. It works fine since I, like just about everyone else on the planet, just want a folder that syncs.

VoodooPad is still under development, but the new owners are taking their sweet time (years) coming out with a new version. Iā€™m worried that Obsidian will be a better choice, or worse, already is. Obsidian has the benefit of being an Electron app, so they can sell to more people than just Mac nerds who want a Mac-assed Mac app.

Discord runs in a browser tolerably enough if youā€™re not voice chatting with people and dependent on a system-wide push-to-talk key.

Work stuffā€¦can wait. While Iā€™d like to be able to use this laptop as a work machine for everything I do, I kind of like how itā€™s a calm personal machine, suitable for using right before bed. At any rate, I have a fair bit of work tasks that do come up that can be done entirely in the browser, so itā€™s not like Iā€™m incapable of working when Iā€™m on my laptop. I just canā€™t work on arbitrary tasks when all I have is the new laptop.

2021-11-06, but basically at the same time: More California

[A composite image with a left half and a right half. On the left half is the Big Sur wallpaper: a magnificient off-the-coast aerial shot of the rugged California coast with a bridge visible in the middle. Superimposed over it is ā€œSOULā€ in white text with a black outline typeset in Impact. On the right half is the Monterey default wallpaper, an abstract canyon-ish wallpaper in reds, purples, and blues. Its caption is ā€œSOULLESSā€.]

While the new standard shortcut for the emoji picker is šŸŒļøŽE, āŒƒāŒ˜ā£ still works fine. On the other hand, Full Screen seems to be šŸŒļøŽF, and the keyboard shortcut for that wasnā€™t always consistent between apps. Most of them had something bound to āŒ˜F, or āŒ„āŒ˜F, or ā‡§āŒ˜F, and so the Johnny-come-lately Full Screen command had to take the best available keyboard combo.

Iā€™d like it if the key with the microphone on it told whatever videoconferencing app to mute input, similarly to how the rewind, play/pause, and fast-forward keys talk to whatever app is currently playing music or a video. This would also nicely sidestep privacy issues that arise when, say, Discord asks for permission to see every single keystroke you type so it can monitor for its hotkey sequences.

ā‚

Letā€™s talk about the menu bar and everything in it.

First, the notch. Itā€™s there, but itā€™s not the most interesting thing around, so you pay attention to other things instead. Whatā€™s weird is how the menu-bar icons have variable inter-icon spacing: sometimes theyā€™re spaced far apart, other times theyā€™re scrunched up together. So far, I havenā€™t had them march all the way to the notch, but I havenā€™t installed everything I might possibly need, like Postgres.app and a couple other things Iā€™ve forgotten.

The menu bar is also taller now. On one hand, it seems a little bit weird. On the other hand, all that height comes at the expense ofā€¦nothing. The rest of the screen is still 16:10, so itā€™s basically like free space at the top.

Whatā€™s interesting is what happens when you full-screen an app or two. Usually, when you full-screen an app, the app takes up the entire screenā€¦and the menu bar gets shoved out of the way, and pops down if you move your mouse cursor to the top of the screen, shoving any kind of toolbar or whatever down. Very distracting. When I had Visual Studio Code right next to Safari, though, the apps took up the entire screen in the 16:10 safe space, and everything in the notch zone was just left black. When I threw the mouse pointer up to the top of the screen, the menu bar items appearedā€¦and the toolbars and things on the two displayed apps didnā€™t need to move at all. Honestly, this makes full-screen mode more useful than it was before.

ā‚

Shortcuts is an unfunny joke. It should have been held back until macOS 13 (whatever comes after Monterey). I tried migrating some of my Automator workflows and theyā€™re broken in stupid ways. Iā€™m not upgrading my main machine until these get fixed. Might be a long wait. Like, a year. Iā€™m worried that theyā€™ll have to keep current behavior the way it is for backwards-compatibility reasons. Fortunately, Feedback Assistant is built into the OS (and not just beta versions), so Iā€™ll be able to flood Apple with feedback if I feel like shouting into the void.

The AirPlay receiver thing is better than AirFoil Satellite by Rogue Amoeba. Way less latency, and it doesnā€™t stutter even when Iā€™m streaming from my first-generation iPhone SE. Shame they picked a common web-dev port like 5000 to listen on instead of something utterly forgettable. Itā€™s not like AirFoil Satellite was any better, though ā€” it listens on port 3000, which is also pretty popular.

Being able to run iOS apps on a real computer with real speakers is pretty neat. I can run Headspace and have it play Focus music right on my normal machine without kludges likeā€¦AirFoil Satellite. Unfortunately, the manifestly better speakers makes it glaringly obvious that Hans Zimmerā€™s focus music is delivered as a horribly-compressed MP3 or AAC file, whereas this sort of thing deserves high-bitrate AAC at the very least. One final wrinkle: iOS apps tend to ā€” without actually doing anything ā€” get the Using Significant Energy badge of shame. Headspace will play a calming animation while itā€™s playing music (or silence in the case of actual meditation) and so the energy usage isnā€™t too surprising, but Overcast will also show up in the naughty list when itā€™s just sitting doing nothing.

Something like `sudo shutdown -s +65` might be nice to run before running Headspace and having it do a 60-minute wind-down, but youā€™d have to quit all Terminal windows beforehand. Otherwise, youā€™d hear the GET READY FOR SYSTEM SHUTDOWN warning bells, or boops, or submarine noises, or whatever your \a is configured to generate.

Maybe I should try something like this with Shortcuts. At least if Iā€™m using the Shortcuts app, Iā€™m not going to have to type in my login password right before bed.

2021-11-06: I get something cool in the mail

Background reading:

Marco Arment, ā€œThe best laptop ever madeā€

Iā€™m upgrading directly from a 15ā€³ (lovingly described above) to a 16ā€³. While the two laptops take up about the same amount of space (for example, the new laptop fits into my padded sleeve just fine), there are interesting differences:

I can see why people talk about the G4 PowerBook. I wasnā€™t a Mac guy back then, but I remember laptops shaped like this.

It seems heavier than my old laptop. The Apple Silicon hype made me think that a laptop based on it would be generally lighter than an Intel-chip-based one, but the maximum allowed battery that can be taken on a plane hasnā€™t changed, and so I guess thatā€™s where most of the weight is.

The screen is noticeably bigger. More is more. The menu-bar-and-notch area is a height extension to a 16:10 screen, which is good. Height is harder to come by these days unless youā€™re rotating a monitor 90Ā°.

I used my old laptop for years before I noticed the side air-intake vents. On this laptop, however, they tend to dig into your hands while you carry it around like a lunch tray. One saving grace is that if the laptopā€™s screen is open, the center of gravity is far enough forward that youā€™re not supporting it with the parts of your hands that are underneath sharp-edged air-intake vents, so itā€™s not quite so bad as you might think.

Touch ID is fantastic. Saves me a ton of typing when setting things up. Normally when Iā€™m doing a fresh install of things Iā€™m typing my login password over and over and over and over again. This time? Not so much.

On the other hand, having room for only three fingers isā€¦disappointing. Right thumb and index fingers are a given, but Iā€™d like to be able to use both my right pinky or a finger on my left hand.

Yup, it has a notch. I donā€™t have a whole lot of menu-bar junk yet, so itā€™s not something Iā€™m fussing about. More about how the OS copes with it later.

The touchpad is huge. I seem to get about as many accidental touches on it as I did with my old one, so Iā€™m not sure itā€™s too big. Generally, I compensate by throwing the mouse pointer into the top middle of the menu bar so accidental taps (clicks) donā€™t do anything. I never had trouble doing four-finger gestures on the old touchpad, so Iā€™m not sure what theyā€™re trying to do by making it bigger. Maybe itā€™s so people can draw Chinese characters they donā€™t know the pronunciation for?

The keyboard is fantastic. It has very little travel, and doesnā€™t require much force. While I can certainly appreciate clicky Cherry MX keyswitches, I like this, too.

The Escape key is bigger, but Iā€™ve used vim only once on this new laptop.

The fn key now has a globe on it. More on globe-key shortcuts later.

Spotlight, Dictation, and Do Not Disturb now have dedicated function keys. More later.

I notice the 120Hz animations where they exist (moving between Spaces, ExposĆ©) but theyā€™re not nearly as big a leap as Retina displays are.

I miss the backlit Apple logo. Itā€™s darn useful when youā€™re trying to touch buttons in the dark and need a teeny bit of light around you. Itā€™s also nice to partially illuminate your way around a dark house when youā€™re carrying it around.

ā‚

The charging situation is kind of bananas. Iā€™m used to laptops having one charger that theyā€™re tied to for the life of the machine. This machine, on the other hand, ships with:

Of course, you can plug the USB-C-to-MagSafe cable into pretty much anything. Also, because the machineā€™s power needs are so light, you can get by with power delivery designed for phones and still be OK if youā€™re not in a rush.

Since I try to hypermile my batteries by charging them as slowly as possible and keeping them under 60%, having a host of trickle-charging options is fantastic.

2021-10-09: Vroom

Iā€™m at the gym.

Thereā€™s an elliptical trainer in front of me. Leaning against its screen is a piece of paper that says

9/26
	
    SPEED
     CONTROL
       BROKEN


My initial thought was ā€œTHIS ELLIPTICAL HAS NO BRAKESā€ like a runaway train or a large vehicle in a Speed movie.

2021-10-02: Minding the mindless consumerism

A thought that crossed my mind earlier today, and crosses my mind sometimes:

Man, itā€™d sure be nice to get something cool in the mail.

Usually the smart thing to do is wait for the impulse to pass as opposed to buying a [checks list] tungsten sphere and suitable desk stand, but still. The impulse does pass through.

Background:

Amazon.com: 2.175ā€³-diameter, 1.5 kg tungsten sphere for $325

2021-09-30, but like 30 minutes later: Computers keep getting more awesome

In response to:

Bjƶrn WƤrmedal, ā€œWhen Did Personal Computers Stop Improving?ā€

As far as I can tell, they didnā€™t stop improving. a 27ā€³ 5K (5120Ɨ2880, or 2560Ɨ1440@2x) monitor with an essentially-silent computer smeared on the back of it is _way_ better than, say, a 17ā€³ 1024Ɨ768 tube monitor, especially when ClearType hadnā€™t been invented yet. I remember when Internet Explorerā€™s size settings for Verdana were:

I think itā€™s great that modern computers can handle all these pixels just for running a text editor. Having clear, crisp type at any size makes computing fantastically more pleasant. And having lots more screen space per monitor means I have to scroll less and alt-tab less, which is nice.

2021-09-30: I like them and approve, but that doesnā€™t mean I want to join in

Background reading:

Derek Siversā€™ page explaining what Now pages are

Wes Bosā€™ /uses pages that also explains and demonstrates what /uses pages are

I think /now pages are cool but I can never bring myself to be that open in public. Sure, I could just tell lies on the Internet, but Iā€™d rather have the entire capsule be a cohesive set of lies instead of just the /now page.

I also think /uses pages are useful, but I can see why some people look at them and sneer. Personally, I think buying things and telling others whatā€™s worth buying (or otherwise investing in) is a public service.

/uses pages would look pretty awful in Gemtext, though. When I write here, I keep explanatory links to a minimum because they canā€™t just sneak in inline like HTML <a> elements. Wes Bosā€™ page is chock-full of inline links and in order to have all these links, Iā€™d need to intersperse link lines with one-sentence paragraphs explaining things. Either that, or have an entire page where most of the body text is in link lines. Ew.

Update, a few days later: nytpu has a /uses page in all but name, and it looks fine.

nytpu.com, ā€œsoftware i use dailyā€

2021-09-28: Giant Lagrange update

Lagrange 1.7 changelog

Bookmarks now have folders, so you can file things properly. I took the opportunity to clean up my bookmarks files (one per computer) and sync them with each other.

Never thought Iā€™d use cp (over AFP or whatever macOS uses) to transfer changes in one direction and Universal Clipboard (clipboard sync over Bluetooth) to transfer URLs in the other direction, but here we are. Having a well-organized bookmarks folder feels utterly fantastic.

Less importantly, the WebP tracking pixel at the bottom of this capsuleā€™s pages is now recognized as an honest-to-goodness image, so you can view a 1Ɨ1 transparent tracking pixel in Lagrange without having to use an external application.

Background:

Apple KB explaining Universal Clipboard

2021-09-25: Thereā€™s gotta be a better way to do this

People like SNES-era video-game music.

Music from that time not infrequently has a start-up section, then loops forever (not from the beginning).

Assuming that audio emulation on SNES emulators is good enough, why not have a barely-legal website that distributes savestates of games where each tune is played? Youā€™ll be expected to supply the video-game ROM from your own collection, where youā€™ve ripped your very own still-working cartridge.

2021-09-23, but at the very end of the day: The rise of the blog helped kill the ā€œunder constructionā€ website meme

Background viewing:

https://duckduckgo.com/?q=under+construction+gif&ia=images&iax=images

Remember the Internet in the late 90s? (not that old? nod politely and play along.) Lots of websites had ā€œunder constructionā€ (animated) GIFs. Nowadays, almost no sites do.

What changed?

Blogs.

Once most websites were blogs, everything new automatically gets placed where it should be. Thereā€™s no more rearranging of directory structure; thereā€™s just the list of posts. Occasionally, a post might have tags added or removed to/from it, but thatā€™s the extent of any same-site reorganization.

2021-09-23: Both 9ā€³ and 10ā€³ pie tins exist

Inspiration:

John Scalziā€™s recipe for schadenfreude pie, with filling sized for a 10ā€³ pie tin

If you write a recipe that involves a pie tin, please make note of how big the pie tin is. At least here in the States, most pie tins are either 9ā€³ or 10ā€³. While 9ā€³ tins are the most common, 10ā€³ tins also exist. If you have a 10ā€³ tin, you will tend to find othersā€™ fillings not filling up your crust. If you write recipes assuming others have 10ā€³ tins, youā€™ll have them wondering what to do with all the extra pie filling.

2021-09-21, but slightly later: Effinā€™ keys

On iPadOS 15, if you pair your iPad with an Apple hardware keyboard that has an fn key, then itā€™s used as the globe key by default, even if you donā€™t change from the default of having fn work as fn.

I should note that you have the option of binding the Caps Lock key to Control in Settings ā†’ General ā†’ Hardware Keyboard ā†’ Modifier Keys. Really, if you want to look stupid on the Internet, there are much better ways to do so than to devote an entire key on your keyboard for this function.

Of course, the fn key had a use before it was pressed into service as a globe key. Mostly, it turns the arrow keys into Page Up, Page Down, Home, and End. šŸŒļøŽā†‘ now opens the app switcher, so if you want to do Page Up, youā€™ll need to press āŒƒā†‘ instead.

This is precisely backwards from macOS. On macOS, āŒƒā† and āŒƒā†’ switch between Spaces/full-screen apps, and fn ā†/fn ā†’ are for moving the text insertion point. Expect fun times ahead if youā€™re a keyboard nerd who uses both OSs.

2021-09-21: Making your life noisier, but not all the time

iOS and iPadOS 15 add built-in background sounds. If you want to play around with it, itā€™s buried in Settings ā†’ Accessibility ā†’ Audio & Visual ā†’ Background Sounds.

If you pick any of them, youā€™ll automatically download your selection. The Noises (balanced, bright, and dark) are all just under 2 MB apiece, but Ocean, Rain, and Stream are all 62ā€“72 MB apiece. You can delete ones you donā€™t like if youā€™re pressed for space.

The UI here is a little wonky, so if you think that Balanced Noise and Dark Noise and Stream all sound the same, just back out to Background Sounds and go back in.

Suppose you want to use this as a noise generator, but really, diving this far into a corner of the Accessibility settings is not something you want to do often. ā€œHey Siri, open Background Sounds settingsā€ will only take you to Settings ā†’ Sounds.

Probably the most obvious easy way is by adding a button to Control Center. Youā€™ll want to add ā€œHearingā€, and then when you tap on that button in Control Center youā€™ll be able to turn on/off noise, pick your noise, and also adjust its volume.

I suppose itā€™s interesting that this is one of the few places where iOS exposes a separate volume control from the system volume. Evidently they canā€™t always pretend that one volume slider is enough to rule them all. Well, two if you have ā€œChange with Buttonsā€ turned off for the ringer-and-alerts slider in Settings ā†’ Sounds.

Additionally, in Shortcuts, you can set things up to munge Background Sounds settings. I typed ā€œBackgroundā€ into Shortcutsā€™ search box and got options for ā€œChange Background Soundā€, ā€œSet Background Soundsā€ (you can use this to turn on, turn off, or toggle on-ness), and ā€œSet Background Sounds Volumeā€.

A one-item toggle shortcut might be the sort of thing you might want to bind to the Back Tap option in Settings ā†’ Accessibility ā†’ Touch. In addition to a bunch of system things like ā€œShakeā€ and ā€œScroll Downā€, you can have the system run any of your shortcuts.

You can also have Shortcuts in a widget if you want really fast access to these features, or just like big buttons.

While Shortcuts with complex, multi-step, branching workflows seem to get all the press in nerd circles, I seem to get a lot of use out of one-action Shortcuts. They certainly seemed dumb to me initially, as it wasnā€™t obvious to me why Iā€™d want to surface a button for an action that would just take a couple more taps to handle normally. Now that Iā€™ve gone from the four-Shortcuts widget to the eight-shortcuts widget on my iPad, though, I can see how really, itā€™s just a matter of accreting uses for this sort of simple automation gizmo.

2021-09-19, but like ten seconds later: A scale for rating foods

Most five-star rating prompts donā€™t tell you what each rating should mean. Goodreads is a pleasant exception to this, as is Apple Books. What about for food?

Maybe I should try a seven-point scale. If I actually throw it out before finishing it all instead of begrudgingly finishing the rest of it, that should count as worse than something I try to use up. It takes a lot for me to think something is so bad I throw it out without finishing it.

Also, I donā€™t really like my fifth point on this five-point scale. The mochi cake mix mentioned below is definitely interesting and moderately mind-expanding (I had no idea what one could do with mochi-style cake batter), but itā€™s just not good.

2021-09-19: Barely worth the calories

I got Trader Joeā€™s chocolate mochi cake mix with peanut-butter frosting.

The texture is interesting and novel, but it doesnā€™t taste very good or chocolatey and the peanut-butter frosting isnā€™t anything to write home about, either.

I havenā€™t thought up a good scale for foods, but my inclination is to rate this ā˜…ā˜…ā˜†ā˜†ā˜†.

2021-09-11, 2021-09-14, and also 2021-09-15: Pretending to pray

This upcoming Tuesday, at 10 AM Pacific, is an Apple Event, entitled ā€œCalifornia Streaminā€™ā€.

My predictions, with results added in after I saw the thing:

Iā€™d certainly like to be tempted to part with my money, but I donā€™t foresee it happening. Iā€™m in no rush to upgrade my iMac and while Iā€™d like them to announce 16ā€³ laptops, I donā€™t see them taking thunder away from an iPhone-centric event just to do that.

Update: All they did was iPads, Apple Watch, and iPhones, and Apple Fitness+ doesnā€™t count.

2021-09-07: Resisting browser-specific behaviors via checkbox unchecking

Background:

ā€œisoraqathedhā€: Some article formatting standards for gemtext

The important bit:

The [first line of text that isnā€™t a heading] is the introduction of the article. It should both be able to stand alone to act as the summary, and also flow naturally with the rest of the text. This is fairly easy to do and it helps with some readability. There is no need to add any additional markers like ā€œtl;drā€ which is common in other parts of the internet.
[ā€¦]
But why?
The main reason is actually because Lagrange renders things like that. In particular, it has an option to make the first paragraph slightly larger. This encourages me to write things like that.

I thought that particular option was ā€” pretending Iā€™m typing this on my phone for a moment ā€”Ā ducking annoying, and I turned it off fairly soon after finding the option to do so.

I will now proceed to pat myself on the back for not being tempted to shift my capsuleā€™s pages to conform to what one particular browser does by default.

[checks his own capsuleā€™s home page]

[sees that the bolded paragraph would read ā€œThis is a Gemini capsule.ā€]

[giggles]

Maybe this would look less silly if I had a proper-ish introductory paragraph on the home page, but I canā€™t think of a better replacement than what I have there now.

On the other hand, this page has nearly an excellent description-cum-disclaimer that would be possibly fantastic in a slightly larger point size and a different color.

2021-08-26: Building my brand

While I like how a lot of Gemini capsules are only weakly flavored, Iā€™ve kind of grumbled at how mine, titled ā€œYet another Gemini capsuleā€, is more weakly-flavored than most.

Well, today, while looking at the names of lots of other capsules and grumbling about my capsuleā€™s name, a halfway-decent idea came to me. Iā€™ve updated the capsule root to it, although Iā€™m not sure if I really have anyplace to really work the theme in to the rest of the capsule.

I briefly considered designating an official abbreviation of ā€œĀ½2Mā€, but that made me gag.

2021-08-25: Being weirder with less

Every so often, the Gemini mailing list gets someone on who asks ā€œhow do you publish your capsule? Whatā€™s your workflow?ā€

I figure that this place is probably the best place to answer. If I ever get a mind to, I might end up giving this explanation a page of its own instead of letting it get buried in the other posts I write.

Normally, my publishing workflow involves the following:

This capsule is somewhat different. While I donā€™t have ssh/rsync access, I do have sftp access (thanks, Solderpunk!). The big difference here is that big files will be uploaded over and over again every time I update my capsule. Because of this, donā€™t expect me to upload pictures anytime soon, much less 4K@60 video ā€” not that I really have any plans to, anyway. That said, I still use Makefiles with targets named like `up`, and I still make commits to the master branch whenever. I might have had alternate branches for experimental layout changes, but theyā€™re all merged into master or abandoned and deleted now.

At any rate, I wondered what I would do to build this capsule. Here were my thoughts:

In general, my opinion towards features in Gemini pages and capsules is ā€œIf I wanted it to handle all these corner cases and have all these niceties, I would have generated an HTML page and served it over HTTPSā€.

So what do I get from this radical simplification?

What costs do I bear from this radical simplification?

I briefly considered running a capsule on Heroku, but $84/year is too much for a lightweight hobby like this and Heroku is an 80/443-only shop. It doesnā€™t support non-web apps. If Heroku handled all this, then it could keep an eye on the Git repository this thing is in and automatically build and post every time I commit to the master branch.

Background reading:

yj, a YAML/TOML/JSON/HCL converter

yamllint, a YAML linter

TextExpander, a utility that turns a little bit of text into a lot of text

2021-08-23: Results not typical

Iā€™ve been fasting again. Usually, this is what I can expect for a three-day (72 hours, give or take) fast:

This was my experience maybe 2ā€“5 years ago. However, things have been _very_ different for this past weekend and the weekend before that:

I thought painless fasting was only for men who waddle like Angus Barbieri, but apparently I was wrong about that. The only obvious differences between then and now are:

The difference that seems most likely to explain most of why itā€™s way easier now is probably the increases in potassium and magnesium. However, that only seems to explain the lack of headaches and the lack of wooziness when I stand up too quickly. It doesnā€™t seem to explain why Iā€™m not feeling hungry except weakly and briefly, as opposed to the old normal of strongly and not-infrequently.

2021-08-05: Photo management for gaming

Todayā€™s wind-down exercise was taking all my photos and videos off my Switch and copying them into final resting places. This involves:

Generally, Switch files have filenames and paths like

2019/07/03/2019073021343000-57B4628D2267231D57E0FC1078C0596D.jpg

where the first part encodes the date and time and the last half seems to encode the application. This particular screenshot is of the settings screen.

For some reason, Iā€™m generally against renaming these files (many years later, I might want to know when this was taken), so I generally put these files into folders with a descriptive name. Frequently enough, Iā€™ll group multiple screenshots into one folder if theyā€™re part of an exchange between a couple of characters or a sequence of events.

iPad screenshots, by contrast, are way easier to manage: just AirDrop them to a real computer and then organize them. For parityā€™s sake I might want to rename them based on their file metadata, but oddly enough I donā€™t care enough to preserve that sort of thing, at least not yet.

You might wonder why Iā€™m not just plugging in my Switch into a real computer and using it as a fancy camera device. There are two reasons why:

I kind of wish the iPad could take 30-second videos, but Iā€™m pretty sure thereā€™s a reason that sort of thing is unsupported when the Switch isnā€™t plugged into power.

2021-07-16: Itā€™s broken for the normal people, too

For as long as Iā€™ve tried to get work done on an iPad, Iā€™ve been frustrated that C-e doesnā€™t go to the end of the logical line ā€” it only goes to the end of the visual line. Iā€™ve reported bugs about this, but Radar is a black hole.

Today, I decided to try and work around the problem by pressing the Mac-native equivalent, command-right.

It still only went to the end of the visual line.

Itā€™s moderately comforting that the OS is broken even for the moderately normal people and not just the turbo-nerds.

2021-07-09: All wind-up, no performance

Background reading:

Boop

I tried Boop. Itā€™s neat. I made a script for it. Because my short-term memory isnā€™t great, I decided to start by writing out the typesā€¦

/**
  {
    "api":1,
    "name":"Prettier HTML",
    "description":"Makes your HTML prettier",
    "icon":"HTML",
    "tags":"html,prettier,format"
  }


/**
 * @callback InsertFunction
 * @param {string} what - String to insert at the caret. If there is text already selected, the selected text is replaced.
 */

/**
 * @callback PostFunction
 * @param {string} message - What message to show to the user.
 */

/**
 * @typedef ScriptExecution
 * @type {object}
 * @property {string} text
 * @property {string} fullText
 * @property {string} selection
 * @property {InsertFunction} insert
 * @property {PostFunction} postInfo
 * @property {PostFunction} postError
 */

 const prettier = require("prettier");

 /**
  * @param {ScriptExecution} state
  */
 function main(state) {
   const result = prettier.format(state.text, { parser: "babel" });
 
   state.text = result;
 }

ā€¦only to find out that, evidently, requiring external code isnā€™t something thatā€™s currently possible with Boop. Drat.

2021-06-27: One addendum to Sarah K. Peckā€™s monthly-review questions: backing away slowly

Background reading:

How To Do a Monthly Review ā€” Sarah K. Peck

I do this monthly. Itā€™s been somewhat helpful for me, although I donā€™t have quite the same problems that she has. Being a type-A personality seems nice, if only for the novelty factor.

One thing I found useful to add to my question template, though, is this. It goes right at the end of ā€œPeople and Communityā€:

Whom should I see less of?

Oftentimes this prompt isnā€™t responded to, which, quite honestly, is normal. However, itā€™s occasionally worth considering whom one surrounds himself with, and whether doing so is all that good of an idea. More than a few times, Iā€™ve stuck around a group out of sheer inertia and/or lack of options even though the group is a decidedly mixed bag or even a net negative.

While realizing that one should back away slowly from a particular group wonā€™t tell you what to do with the freed-up time, sometimes itā€™s worth asking whether your association with a group is a net positive, net negative, or just not nearly as positive as it used to be. In this latter case, itā€™s worth considering whether other affiliations might be more worth your time.

2021-06-26: Scientists fail to watch their language

on arxiv.org: ā€œHow Developers Choose Namesā€

One aspect of variable naming that the researchers didnā€™t seem to address was how different languages encourage slightly different names. Standard Go style generally prefers short method names like `.At()`, while Objective-C is ā€” or was ā€” perfectly fine with having method calls like `[things objectAtIndex:5]` for an operation that would look like `things[5]` or `arr[5]` in most other languages.

Still, neat paper.

2021-06-07: WWDC 2021 first-day wrap-up

So:

Not bad. I wonder how buggy it will all be on release. This isnā€™t a No New Featuresā„¢ release, but one can hope everyone spent 20% more time cooped up in their houses fixing bugs instead of just adding new things.

2021-06-02: WWDC 2021 predictions

Hereā€™s what I expect to see next week:

Hereā€™s what I expect to NOT see next week:

There are a few formulae in Homebrew that still lack ARM ports that I use. I wonder if the release of proper large-size MacBooks Pro will noticeably speed up the conversion of the remaining programs.

2021-05-27: Recreating YouTube attention-grabbing dynamics

Some fraction of visitors to this capsule do so through CAPCOM, a Geminispace aggregator (something that reads a bunch of feeds and combines them into one list). I have no idea what fraction this is, but itā€™s got to be some fraction of the total.

One of CAPCOMā€™s recent-ish changes is that it wonā€™t show updates from literally everything submitted to it and approved: it only picks 100 feeds out of its list per month and displays them. It also says this:

If youā€™re enjoying content from one feed, you should subscribe to it yourself in some way, because that feed is not guaranteed to be one of the 100 feeds chosen next month!

This is not visually distinct text, and at any rate it gets lost in the noise after youā€™ve visited a couple of times because really, you want to get to the links. Gemini doesnā€™t have blink tags, after all.

However, given that our capsules arenā€™t guaranteed to be part of next monthā€™s rotation, we authors do have an incentive to close out the month with a request to, well, thereā€™s no built-in Like function in Geminispace, but there are subscriptions in most clients.

we didnā€™t start the fire
it was always burning
since the worldā€™s been turning

2021-05-09: I like space

In response to:

benk on formatting Gemini documents

Yeah, basically that. I used to double-space above headers in Markdown but some autoformatter I was using nagged me if I had any more newlines in between elements for any reason, so I got broken of that habit. It was also kind of difficult to apply consistently (Iā€™d forget a newline or two), so I stopped.

For posts like this, the in-response-to link line seems like it shouldnā€™t be equidistant from its mini-header above it and the body text below it, but Iā€™m not quite sure I want to bunch it all up right next to the ā€œIn response to:ā€ line.

2021-05-07, another short while later: Deno really is still in flux

I finally got a chance to get back to my Deno-based Gemini server. It uses Deno.Conn.

When I last worked on this, Deno.Conn was a generic type. I used Deno.Conn<Deno.NetAddr> (as opposed to Deno.UnixAddr, I guess).

Now, the remoteAddr of a Deno.Conn is either a NetAddr or a UnixAddr, and the best way to tell them apart seems to be to ensure that its transport is TCP (or UDP, or whatever).

So now, before getting back to any new real work, I made this change:

diff --git a/mod.ts b/mod.ts
index 3e7499f..c3febf4 100644
--- a/mod.ts
+++ b/mod.ts
@@ -65,7 +65,7 @@ enum ResponseCode {
 }
 
 class Bag {
-  constructor(conn: Deno.Conn<Deno.NetAddr>) {
+  constructor(conn: Deno.Conn) {
     this.conn = conn;
     this.startTime = Date.now();
   }
@@ -78,11 +78,19 @@ class Bag {
         ret[k] = v;
       }
     }
+
+    if (this.conn.remoteAddr.transport !== "tcp") {
+      throw new Error(
+        `Assertion failed: connection transport not TCP: ${this.conn}`,
+      );
+    }
+
     ret.from = this.conn.remoteAddr.hostname;
+
     return ret;
   }
 
-  conn: Deno.Conn<Deno.NetAddr>;
+  conn: Deno.Conn;
   startTime: number; // milliseconds since midnight 1/1/1970, UTC
   request?: string; // e.g. ā€œgemini://localhost/foo/\r\nā€
   host?: string; // e.g. ā€œlocalhostā€

This seems like a pretty deep-reaching change to be made at a point when Deno seems almost mature. Iā€™m not complaining, but I am surprised.

Personally, Iā€™ll like not having to type angle brackets, but Iā€™m not sure I (or anyone else) will enjoy having a five-line type assertion just to use constructs like conn.remoteAddr.hostname.

2021-05-07, a short while later: Service lives of old computers vs. how much electricity it takes to run them

Since Iā€™m back in the CAPCOM rotation this month, I figured the soapbox Iā€™m standing on is a little taller than normal.

I have a question for the floor.

In some corners of Geminispace, there are people who are interested in Gemini because it doesnā€™t take much computing oomph to either serve or consume. As long as your server can manage to serve up everything over TLS 1.2 or (ideally) 1.3, you should be fine. Unlike on the Web, console Gemini clients are generally no less full-featured than desktop ones.

Because of all this, Iā€™ve seen some people be quite glad to serve up things over Gemini on quite old computers, often with a stated goal of trying to reduce computer waste as a political statement.

Still, I have to wonder. Old computers, generally speaking, use more power to get the same amount of computation done. I can see why someone might prefer running an old Pentium 4 or a BeBox or Sun workstation or whatever instead of buying a new Raspberry Pi to serve up Gemtext, but if this sort of thing describes you, how much extra would you have to spend in energy costs to keep the old computer running before you give up, recycle the old computer, and buy a new computer that runs at least as fast for a fraction of the electricity use?

2021-05-07: OK fine then, I wonā€™t

A while back I sketched out a two-column layout for my main site. The main benefit of having space on the side is that you can stuff ā€œextraā€ info in it ā€” publish/update dates, tags, statuses, notes, and even a tl;dr if itā€™s long enough to warrant one.

Most of what I write isnā€™t long enough or branched enough for that sort of thing, so I decided against moving to a two-column layout.

Since multicolumn layouts arenā€™t even an option in Gemtext, Iā€™ve been even less interested in surfacing metadata in metadata places. Sure, these Scrawlspace entries have dates in their headers, but thatā€™s about it for metadata.

I kind of miss having metadata blocks in my source files. At this point, Iā€™ve gotten used to having YAML documents where I can stuff all sorts of never-to-be-shown notes at the top of Markdown files. That said, the radical simplification of Gemtext is nice, even though there are all sorts of things I miss from my Markdown-to-HTML-via-Hugo workflow. By keeping a handful of features out of my capsuleā€™s feature set, Iā€™ve managed to keep it so Iā€™m not even tempted to complicate my workflow with a separate build step with a static-site generator.

Sure, I still have to manually add an Atom-feed entry, but somehow that seems like smaller potatoes than picking/generating a filename, typing a post, and then adding that post to a page full of links to posts. Maybe itā€™s because the bookkeeping work is optional and at the end of the writing, as opposed to some of it being mandatory and at the beginning.

2021-05-06: OK fine then, I contain multitudes

As nice as it is to not have to worry about fonts and layout as a document author in Geminispace, Iā€™ve been enjoying tinkering with Inter, a sans-serif font that seems somewhere in the Helvetica/San Francisco space. That is, itā€™s the right kind of boring typeface for things I might want to do over port 443.

Inter

2021-04-29: Darndest file Iā€™ve ever seen

root:~ # exa -l
.rw-r--r-- 6.1k root 19 Feb 16:44 shutdown -r now

Yes, thatā€™s the only non-dotfile in rootā€™s home directory. No, I donā€™t create much as root on a FreeBSD machine.

2021-04-28: Seeing posts disappear and reappear here is not evidence that you are going crazy

I made a post and pushed it to my capsule.

Later, on another computer, I made another post and pushed it to my capsule.

However, on the second computer, I forgot to pull in my changes from the Git repo this site is stored in, so I ended up overwriting the initial post.

Now that Iā€™m back on the first computer, Iā€™ve managed to pull the new posts, exhume the old post, and put them all up on the capsule.

This is not the first time all this has happened.

2021-04-27: All I want from you isā€¦your VOICE (choice)

iOS 14.5 dropped today. Apple now has four voices in an American accent, not just two. The other English accents (Australian, British, Indian, Irish, and South African) still have only two apiece, one male and one female.

I picked through the new ones and was generally unimpressed, although itā€™s kind of hard to get a really good feel for a new voice just on the strength of how it says ā€œHi. Iā€™m Siri. Choose the voice youā€™d like me to use.ā€

I then flipped through the different other English voices and settled on South African (Voice 1) (male).

Iā€™m not too pleased by how my iOS devices all share this voice preference. I thought itā€™d be neat for each gizmo to have its own voice settings, but I guess thatā€™s not in the cards. I half-expect the foreign voices to butcher Spanish names, which is something of a liability when youā€™re driving in Southern California and following driving instructions from a phone thatā€™s speaking to you.

2021-04-26: I discover chalk(1)

Old: Reinventing emacs

Bold: Reinventing vim

Behold: Reinventing ed

2021-04-25: Dipping your toe into the delta

Background:

dandavision/delta on GitHub

I wanted to try delta instead of diff for Git (and others), but I wasnā€™t sure I wanted to commit to it. All of the examples in the README show you how to completely replace Gitā€™s diff with delta, but I wasnā€™t sure I wanted to completely throw out the old thing in favor of the new.

Git aliases to the rescue.

Hereā€™s what I put in my ~/.config/git/config:

# ā€¦
[delta]
    keep-plus-minus-markers = true
    line-numbers = true
    side-by-side = true
[alias]
    delta = "-c core.pager=delta diff"  

Now, I can type `git diff` when I want the old thing, and `git delta` when I want the new thing.

2021-04-24: Not all emoji have a text presentation

Evidently the only emoji with text presentations are the ones that were carried over from Wingdings, the old Windows font. I wanted to have a text-presentation yawning emoji in the title of yesterdayā€™s post, but evidently it doesnā€™t exist unless all your emoji have text presentation, like in Lagrange.

2021-04-23: Apple released things

I wanted to be tempted by something, but everything I have, however old, is still just fine. Never once have I thought ā€œI wish my iPad were fasterā€. When I think about my iPadā€™s deficiencies, I think of how option-shift-down does nothing in Discord and how I need to force-quit OmniOutliner sometimes because the built-in file picker gets wedged.

And as for things that run macOS, Iā€™m still waiting for a decent 15ā€³ (or larger) laptop that doesnā€™t have a discrete GPU. Also, Iā€™m in no rush to switch to the new thing if I still have to run Terminal in Rosetta. Ideally, Iā€™ll be able to entirely bypass that phase of the transition.

Then again, some of the projects I run rely on positively ancient dependencies. For these, I wonder if Iā€™ll be able to get off Rosetta before Iā€™m actively forced off. Worst case, Iā€™ll have to keep an Intel-based Mac around for development because current versions of macOS wonā€™t support ancient databases anymore. Iā€™m not looking forward to that future, as I canā€™t really spare the desk space.

2021-04-14: A Gemini server in 21 lines of Deno

After writing yesterdayā€™s entry, I thought I might try my hand at writing a Gemini server. After all, it canā€™t be as hard as HTTP/1, can it?

Turns out, it was much, much easier than I figured.

I figured my first problem would be generating a self-signed certificate. I searched for ā€œgemini generate self-signed certificateā€ and found gemcert, a small Go program that generates certificates for Gemini. Unfortunately, I needed to generate a go.mod file, but that wasnā€™t too difficult since I trusted myself to make up a decent module name:

module tildegit.org/solderpunk/gemcert

go 1.16

I then generated a cert for localhost:

go build
./gemcert --server --domain localhost

This gave me localhost.crt and localhost.key.

I copied these files to a suitable project directory and added a mod.ts file.

After searching the Deno docs for ā€œlistenā€ (I found Deno.listenTls) and DuckDuckGo for ā€œdeno string to uint8arrayā€ (I found an article by a Dan Vega), I wrote the following mod.ts with one eye on the Gemini spec:

const port = 1965;
const certFile = "./localhost.crt";
const keyFile = "./localhost.key";

const listener = Deno.listenTls({ port, certFile, keyFile });
for await (const conn of listener) {
  const msg = new TextEncoder().encode(
    "20 text/gemini; charset=UTF-8; lang=en-US\r\n# Hello, world!\r\nThis is a Gemini server."
  );

  try {
    await conn.write(msg);
  } catch (e) {
    console.warn(
      `Attempted to write a message of length ${msg.byteLength} but couldnā€™t:`,
      e
    );
  }

  conn.close();
}

I then ran it in the usual one-off way:

deno run --allow-net --allow-read mod.ts

Finally, I opened up Lagrange (itā€™s handy and permissive) and pointed it at localhost and saw my hello-world page.

Boom. 21 lines of code.

OK, my first version lacked a call to conn.close() so Lagrange never finished working the first time. And I forgot --allow-read in deno run. And I thought conn.write() migh resolve to a number other than the length of the message. Still. 21 lines of code, and it didnā€™t even take a full hour to finish writing.

Background:

gemcert

the Gemini spec

Deno docs

Dan Vega: Working with Standard Input and Output in Deno

2021-04-13: A reminder of why Geminiā€™s telos is different from HTTPā€™s

I read the Deno 1.9 release notes today. Theyā€™ve got a new HTTP/2-capable web server built in now.

This passage, however, stood out to me:

The current HTTP server in Deno, std/http, is implemented in pure TypeScript on top of TCP sockets. It has [surprisingly] good tail latency despite using a scripted HTTP server. But std/httpā€™s major down side is that it is HTTP/1.1 only - with no easy path forward towards HTTP/2.
Ultimately we donā€™t want to be in the business of writing HTTP servers. HTTP is increasingly non-trivial and there are already well-implemented HTTP servers in native code.

ā€œHTTP is increasingly non-trivialā€.

I want people to be able to write good, useful servers easily. From scratch, whatever that might mean in their languages of choice. Even if that means that Gemini users donā€™t get the performance and features theyā€™d be able to get from a reasonably well-configured HTTP/2 server.

Background:

Deno 1.9 release notes: Native HTTP/2 web server

2021-04-09: Keeping your $PATH short with conditional prepending (and using this technique for other shell variables)

Background:

Fish, the shell I prefer

If youā€™re like me, you have a shell configuration that you like.

If youā€™re more like me than even most nerds, you have a shell configuration that you want to keep roughly similar, even between different underlying operating systems.

If youā€™re like me about as much as normal nerds are, then you donā€™t want your $PATH to get cluttered full of paths that arenā€™t on that particular computer.

So, in order to keep my paths short, I do this:

function conditional_path_prepend -a where
    if test -d      $where
        set -x PATH $where $PATH
    end
end

I also have a function called conditional_path_append, but so far I havenā€™t needed to use it.

I then go hog wild with all the paths that I might need to add:

conditional_path_prepend $HOME/bin
conditional_path_prepend $HOME/.local/bin

conditional_path_prepend /Applications/Postgres.app/Contents/Versions/latest/bin

conditional_path_prepend "/Applications/Visual Studio Code.app/Contents/Resources/app/bin"

conditional_path_prepend $HOME/Library/Python/3.7/bin
conditional_path_prepend $HOME/Library/Python/3.8/bin
conditional_path_prepend $HOME/Library/Python/3.9/bin

set -x GOPATH $HOME/Projects/Go
conditional_path_prepend $HOME/.local/opt/go/bin
conditional_path_prepend $GOPATH/bin

And when all thatā€™s done, my $PATH only has 13 items in it. Nothing on Big Sur seems to put Python things in $HOME/Library, so all of that would-be clutter just doesnā€™t show up.

I also have a bunch of other ā€œif you have the program, add the relevant variablesā€ bits:

set -x DENO_INSTALL $HOME/.deno
if test -f                   $DENO_INSTALL/bin/deno
    conditional_path_prepend $DENO_INSTALL/bin
end

if command -sq deno # https://deno.land/
    # deno installs its stuff here
    set -x    DENO_INSTALL_ROOT $HOME/.local/opt/deno
    mkdir -p $DENO_INSTALL_ROOT
    conditional_path_prepend  $DENO_INSTALL_ROOT/bin
end

if command -sq ansible
    set -x ANSIBLE_NOCOWS 1
end

if command -sq bat # https://github.com/sharkdp/bat
    set -x BAT_STYLE plain
end

# in case of Ubuntu
if test -f        /usr/bin/vim
    set -x EDITOR /usr/bin/vim
end

# Use fd for fzfā€¦but only if itā€™s installed
if command -sq fd # https://github.com/sharkdp/fd
    set -x FZF_DEFAULT_COMMAND 'fd --type f'
end

This keeps things nice and light on my machines that donā€™t have ansible, deno, bat, fd, and/or fzf.

2021-04-02: On personal wikis

Prior reading:

Alex Schroeder, ā€œThe Bliki Spiritā€

A question for people that have been running their own personal wikis for a few years: do you publish it?

No, because publishing a wiki full of home-improvement information and events and interactions with (potential) contractors never seemed like a good idea.

That said, a personal wiki with this sort of information in it is stupendously handy for answering questions like ā€œWhen did I lastā€¦?ā€ and I recommend that everyone have a personal wiki.

2021-04-01: Donā€™t believe anything you read on the Internet today

Instead, why not treat yourself to a full viewing of ā€œNever Gonna Give You Upā€ by Rick Astley? Itā€™s a good song, worth enjoying in its entirety.

https://www.youtube.com/watch?v=dQw4w9WgXcQ

2021-03-19: deno.exe growth

Unlike on macOS, where my deno binaries get updated with Homebrew, the deno.exe binary on my Windows machine gets updated whenever I get around to it. Thankfully, itā€™s as simple as running `deno upgrade` and waiting a few seconds.

This is what the old version looks like:

> deno.old --version
deno 1.7.0 (release, x86_64-pc-windows-msvc)
v8 8.9.255.3
typescript 4.1.3

And the new version:

> deno --version
deno 1.8.1 (release, x86_64-pc-windows-msvc)
v8 9.0.257.3
typescript 4.2.2

More amusing, though is the size difference. The old version is 33.5 MB, while the current version is 50.6 MB ā€” about a 50% increase.

Iā€™m not against large software (my editor of choice is VS Code) and the increase is likely due to at least one useful feature (maybe the ability to (cross-)compile standalone applications?), but a jump like that deserves at least some snickering.

2021-03-18: TextExpander doesnā€™t know how much time it saves me

Every month, I get an e-mail from TextExpander saying how much time itā€™s/theyā€™ve saved me. It usually says itā€™s saved me some dinky amount of time, like 22 minutes. I delete these e-mails, but I also got a 2020 end-of-year review e-mail that I kept, and it said I saved three hours that year.

What itā€™s not taking into account is how long itā€™d take me to write out a lot of what I have it expand. My second-most-used snippet is ā€œ;dateā€, which currently expands to ā€œ2021-03-18ā€. This saves me the trouble of:

I use ISO-style dates for a lot of things (this page has a bunch), but I tend to name an awful lot of files with ISO-style dates as prefixes so that no matter what happens to the file metadata, they sort chronologically.

I also use TextExpander to give me picker-free access to a handful of emoji, but fast access to the thinking-face emoji is less impressive (and less frequent) than having a computer handle dates way faster than you can.

Background:

TextExpander

2021-03-17: I missed a cool date

> date -r 1000000000
Sat Sep  8 18:46:40 PDT 2001

I donā€™t remember anyone talking about this day passing, although

At any rate, 1,000,000,000 seconds after midnight on 1/1/1970 ended up being on September 8, 2001 here. 100,000,000 was in March of 1973; 10,000,000,000 will be inā€¦2286.

> date '+%s'
1616055107

Maybe there are cool numbers between 1,616,055,107 and 10,000,000,000 that I can use to make up excuses to throw a party. Ideally, theyā€™re closer to the smaller number than the larger.

2021-03-16: Man, my Gemini bookmarks are a mess and fixing the mess would create even more mess

I have bookmarks and subscriptions set up in a bunch of places.

amforaā€™s bookmarks format is a TOML file where the keys are base64 (or thereabouts) bundles of URL and heaven knows what else. The values are the bookmarkā€™s description, like ā€œIntroduction to sysadminningā€.

Lagrangeā€™s bookmarks.txt allocates three lines per bookmark entry:

I can only guess what Elahoā€™s bookmark structure is like, or how to get it out to a real computer.

I canā€™t say Iā€™d want all these programs to connect to some centralized sync service, and I canā€™t also say that Iā€™d want a general expectation of Gemini browsers to use some common bookmarks file format, but my life would be way nicer if they all stored bookmarks in sorted YAML or something.

Hereā€™s what the file might look like for maybe a maximal entry:

---
url: gemini://gemini.circumlunar.space/capcom/
description: CAPCOM
last visited: 1616058364 # ā‰ˆ1.6Ā·10ā¹ seconds since epoch; max safe JS int is ā‰ˆ9.0Ā·10Ā¹āµ
tags and positions:
- {tag: discovery, position: 0}
- {tag: Bookmarks Bar/Aggregators, position: 1}
subscription: true
subscription style: look at new headers # or: "look for new date links" ā€” Lagrange has an option like this
---
# ā€¦

A good Gemini bookmarks.yaml editor would keep all entries sorted by URL to make diffing easier.

Why tags and positions? Because tags seem popular (as opposed to requiring every bookmark to occur in only one folder). Whatā€™s more, tags seem at least as popular in the clients Iā€™ve tried compared to old-school folders.

Of course, if one particular client has a special kind of tag, like one for a bookmarks bar, then that would be kind of weird in other clients.

Tag positions can be important for people whose clients allow them to sort items in a label. That said, neither amfora nor Lagrange seem to allow this.

Having a bunch of different Gemini browsers try to write to a YAML file or whatever in a stable format sounds like a huge mess. Iā€™m beginning to wonder if a shared SQLite database might be better, or maybe some kind of language-server protocol where one program manages the database in whatever format and Gemini browsers send updates and query requests to it.

Of course, if I were writing a client, I would _not_ want to bother with all this. Iā€™m a huge fan of keeping Gemini browsers easy to implement just about anywhere, so Iā€™m more than wishy-washy on whether this is a good idea or not.

2021-03-11: Weighted blankets: More fun than youā€™d think, even when youā€™re awake

I got a weighted blanket today.

Like most blankets, it came with a duvet cover.

Unlike most blankets, itā€™s tied into the inside of the duvet cover. The duvet cover has pairs of short strings (think of very wide shoelaces) and the blanket proper has little loops that the string pairs get knotted around.

Taking the blanket out of the box and hauling it onto a work surface (a large chair) was a minor upper-body workout.

Putting the duvet cover back on the thing after washing the cover was an exercise in both (1) forearm strength and topology. When I took the cover off the blanket I noticed how it was slowly coming inside out. I tried to recreate that sort of process, but it seems like I only recreated it by accident. Putting the thing back together again took about 20 minutes, which is way longer than most recoverings.

I can only hope itā€™s at least as fun when Iā€™m underneath it.

Update, a day later: I got a good nightā€™s sleep, but nothing special.

2021-02-26 (and not just technically): Modern challenges in desktop-wallpaper design

I upgraded to Big Sur recently. On my main monitor, Iā€™m using the ā€œBig Surā€ dynamic photograph that changes with the time of day. The picture is of the California coast, looking down from a northward-pointing camera. As Iā€™m writing this in the afternoon, the sun is beyond the left end of the wallpaper. Since I face northward when Iā€™m sitting down at my computer, everything seems right and proper.

On my secondary monitor, Iā€™m using the ā€œCatalinaā€ dynamic photograph. that particular photo mustā€™ve been taken on the north side of the island because the sun goes from left to right.

Just now I briefly considered moving my secondary monitor to a place behind my chair to keep the sun in the right place all the time.

2021-02-26: People donā€™t like the Node ecosystem

In reply to:

gemini://perplexing.space/2021/whining-about-software.gmi

Money quote:

The entire software ecosystem surrounding NodeJS is bad and I wish I didnā€™t have to use it.

I wonder what the author thinks of the Deno ecosystem.

Then again, the Deno ecosystem seems about as natural as a bunch of freshly-planted, tastefully-chosen juvenile bushes that nonetheless look like theyā€™re all too far apart from each other. Itā€™s certainly there, but I donā€™t think Dahlā€™s ideas on how to import things from where and what to call them have been demonstrated to be a good idea or not.

Deno

2021-02-25: Goodbye, favicon.txt

I nuked my favicon.txt. It was the hunk-of-meat emoji.

Of course, you probably didnā€™t see it anyway since my site isnā€™t at the root of anything.

2021-01-21: Toward a baroque Gemini log format

Iā€™d go with newline-delimited JSON or a sequence of mappings in YAML (basically NDJSON with ā€œ- ā€ prefixed to every line). I like easy-to-have-someone-else-parse-it-for-me formats.

Not that Iā€™m planning on writing a geminid anytime soon, but hereā€™s what Iā€™d put in it (written out as YAML for ease of reading)

ip:          "127.0.0.1"
redacted ip: "127.0.x.x"  # what would this look like for an IPv6 address?
when:        "1611306826" # seconds since the epoch
time:        "21/Jan/2021:00:57:24 -0500"
url:         "gemini://localhost/blah.gmi"
status code: "20"
mime type:   "text/gemini"
length:      "475"
old-school:  '127.0.0.1 [21/Jan/2021:00:56:39 -0500] "gemini://localhost/blah.gmi" 20 text/gemini 475'

Zeroth, spaces in dictionary keys are fun.

First, everythingā€™s a string because I donā€™t want to have to think about whether any number will come close to 2āµĀ³āˆ’1, the maximum safe integer in JavaScript.

Itā€™d be silly to log both an IP address and a partially-redacted IP address, but a server might default to logging only a heavily-redacted IP address and only let its administrator enable logging the full IP address after turning some option on. What would a similarly-redacted IPv6 address look like, though?

I think itā€™d be nice to have a monotonic clock so logging systems donā€™t get confused by what happens during daylight savings time changeovers. I also think itā€™s nice to be able to look at your logs and immediately know when something happened without having to translate from some weird format like ā€œseconds since midnight 1/1/1970, in UTCā€. The names need work.

I probably should be pickier about the distinction between URLs and URIs, but that can be tackled after the spec decides on how much non-ASCII gets handled by whom.

Thereā€™s probably at least one good reason why Jetforce logs MIME type and length, even though I canā€™t figure out what any might be. That said, thereā€™s lots of room for logging since no client is wasting bytes claiming to be ā€œlike Geckoā€.

Caddy has the functionality of ā€œold-schoolā€ in its JSON-based log format, but that sort of thing might be of zero use in the Gemini world if thereā€™s no preexisting Common Log Format.

Background:

NDJSON

YAML

Caddy

Caddyā€™s log format

2021-01-19: Writing as a before-bed wind-down

Iā€™m writing a thing. Thereā€™s barely any creation to it, just recollection. It seems to be pretty effective as a slow, semi- (quasi-?)productive before-bed wind-down.

This might stop being useful as a before-bed wind-down once all my preexisting ideas get written down already, but one crisis at a time.

2021-01-13: I discover onefetch(1)

I ran onefetch on my capsule:

             :::::::::::::                 Project: gemini-capsule (1 branch)
           ::::::::::::::::::              HEAD: c2ede08 (master, origin/master)
          :::   ::::::::::::::             Created: 4 months ago
          ::::::::::::::::::::             Language: Python (100.0 %) 
                    ::::::::::             Last change: 4 days ago
    :::::::::::::::::::::::::: ______      Commits: 115
  :::::::::::::::::::::::::::: ________    Lines of code: 145
 ::::::::::::::::::::::::::::: _________   Size: 48.98 KiB (24 files)
::::::::::::::::::::::::::::: __________
:::::::::::::::::::::::::::: ___________
::::::::::: ____________________________
:::::::::: _____________________________
::::::::: _____________________________ 
 :::::::: ____________________________  
   :::::: __________________________    
          __________                    
          ____________________          
          ______________   ___          
           __________________           
              _____________             

Do we have anyone in Geminispace who has some decent ASCII-art skills who could supply a better logo? Not for Python, I mean. For a Git repo full of .gmi files.

onefetch on GitHub

2021-01-09: Quite possibly doing it wrong: When at an art gallery, make your own scavenger hunt

In high school, our entire graduating class went to a museum. Some of us were given a scavenger-hunt list of things to look for. Some of us werenā€™t. I can definitely think of arguments both for and against giving high-school students a list of things to search for.

At any rate, if you donā€™t know what to look for at an art gallery, thereā€™s a good chance you wonā€™t get much out of it. Me, I struggle to appreciate art sometimes, and a list of things to look for in all the exhibits might stimulateā€¦something.

Of course, thereā€™s nothing keeping you from looking at pieces and trying to come up with your own questions. If youā€™re looking for some sort of stimulus, looking at pieces and trying to come up with a question about it might be the sort of thing you need to get your brain active when youā€™re walking around an art gallery.

2021-01-02: A manā€™s gotta know his limitations

A manā€™s gotta know his limitations. This can be made more difficult if his limitations fluctuate.

My ability to like/appreciate/tolerate 72% chocolate ebbs and flows. Right now my low-sugar tolerance must be at an ebb end, because apparently I currently actively dislike 72% chocolate, even in baked goods.

Trader Joeā€™s sells Pound Plus (500g) bars of chocolate in three nutless strengths:

I try to stick with the darkest chocolate I can tolerate because it has the least sugar in it. The snag, though, is that too-dark chocolate has a medicinal taste. While this can be overcome somewhat by not eating pure chocolate all by itself and instead putting the chocolate into something sweeter (like cookie batter), this technique doesnā€™t work for everyone all of the time.

After two or three sub-mediocre batches of cookies made with 72% chocolate, I decided to buy a half-kilo of merely dark chocolate. Apparently this was the winning move, because my most recent batch actually tastes good.

Iā€™ll probably re-acclimate to 72% again (Iā€™ve done it two or three times now), but right now, thatā€™s not what my taste buds are up for.

My (well, Kenjiā€™s) go-to chocolate-chip cookie recipe

Even More

If you want to keep reading even older entries, hereā€™s the page for the previous year:

../2020/

āš

Home

Hi! Iā€™m a one-pixel invisible tracking image! View me to let my webmaster know youā€™ve scrolled through the entire page!