flak rss random

terminal smooth scrolling

I didn’t realize I needed this until I implemented it, and now, oh wow, can’t imagine life without it.


Posted 28 Dec 2023 14:21 by tedu Updated: 28 Dec 2023 14:21
Tagged: software

from worst terminal to merely mediocre

Another month of poking around trying to make an almost useful terminal emulator.


Posted 09 Dec 2023 18:30 by tedu Updated: 05 Jan 2024 20:14
Tagged: project software


I wrote my own terminal and you won’t believe what happened next. I called it vertigo.


Posted 15 Nov 2023 07:50 by tedu Updated: 15 Nov 2023 07:50
Tagged: project software

experiment with texture healing (monospace kerning)

The monaspace fonts introduced the idea of texture healing. I think of it as a sort of kerning for monospace fonts, though there’s probably some reason that’s technically incorrect. The basic idea is that some letters want more space, while others want less space, but this is hard to achieve in a monospace grid. And so they made a special font that includes alternative glyphs for letter pairs, so that i can donate some space to m.


Posted 11 Nov 2023 22:02 by tedu Updated: 11 Nov 2023 22:02
Tagged: software

write your own terminal

What’s next after you write your own text editor and mail client? How about a terminal? In fact, as a practice exercise or to learn some new skills, I’d say a terminal emulator makes for a much better target. It’s composed of many parts, but at an approachable level, making it easy to make tangible progress. In this way, I think it makes for a good introductory project. At the same time, there’s a very long tail of features that can be added to keep things interesting.


Posted 10 Nov 2023 07:44 by tedu Updated: 11 Nov 2023 18:42
Tagged: programming software

pasted bracket escapes escape bracketed paste

There’s a feature called bracketed paste supported by some “modern” terminals and editors, etc. When text is pasted from the clipboard, the terminal brackets it in special markers so that the receiving program knows it came from the clipboard and not the keyboard, and thus might turn off autoindent, etc.

It’s also supported by some shells, and I’ve lost count of how many times I’ve seen people claim that this is a security measure. Yeah, sure, it’s totally safe to paste commands from a website into the shell, because bracketed paste will let you review them before executing.

Does it work? The brackets delimiting the pasted text are just bytes as well, in band. A website can put the end paste sequence into the clipboard as easily as any other text.

Here are two buttons for testing. One runs ls. The second tries a little harder.

In testing, xterm turns the escape into a space, and nothing happens but a little gibberish spray. Other terminals appear to be not so lucky.

Posted 07 Nov 2023 19:47 by tedu Updated: 07 Nov 2023 19:47
Tagged: software web

two hackers one keyboard two ways

There’s an amazing and famous scene of two hackers sharing a keyboard on NCIS, but it gets a lot of derision on the internet. What people don’t realize is that their mockery only reveals their own lack of skill. As everyone knows, a true hacker has mastered the art of dual wielding, and a keyboard that can be dual wielded by one might also be used by two hackers in tandem.


Posted 31 Oct 2023 04:13 by tedu Updated: 31 Oct 2023 04:13
Tagged: programming software x11

where's all the code?

I already had a pretty good idea where all the code in the OpenBSD kernel was hiding but for the sake of comparison I wanted precise numbers. This would be easy enough to get using some scripts and builtin tools like wc and du, but I wanted a tool that would give me something like this.

. 6.93M lines 383.41M bytes
├──dev 5.69M lines 348.84M bytes
│  ├──pci 4.46M lines 308.00M bytes
│  │  ├──drm 3.99M lines 293.86M bytes
│  │  │  ├──amd 3.33M lines 273.93M bytes (6)
│  │  │  ├──i915 326.03k lines 9.21M bytes (5)
│  │  │  ├──radeon 201.19k lines 6.71M bytes (1)
│  │  │  ├──include 48.94k lines 1.56M bytes (9)
│  │  │  ├──ttm 5.46k lines 142.03k bytes
│  │  │  └──scheduler 1.86k lines 51.73k bytes
│  │  └──bktr 8.53k lines 265.29k bytes
│  ├──usb 187.58k lines 5.09M bytes (1)
│  └──(other) 1.02M lines 35.11M bytes (33)
├──arch 729.42k lines 20.46M bytes
│  ├──amd64 133.43k lines 3.98M bytes (7)
│  └──(other) 595.99k lines 16.48M bytes (20)
├──kern 83.80k lines 2.05M bytes
├──uvm 29.39k lines 816.41k bytes
└──(other) 395.30k lines 11.23M bytes (19)

Easy to see everything, without too much clutter. Importantly, let me group things my way, and toss the less interesting parts off to the side. There’s 100 du but better tools on github, but it would take as long to find one that does exactly this as it did to just write one.

And thus watc.

Another take.

Posted 04 May 2022 17:57 by tedu Updated: 23 May 2022 21:47
Tagged: software

skyrim vs the wild

This post never made it into words when planned, so the references are a bit dated, but I think it’s still mostly relevant. (For those who are familiar with the references.) Some time ago, I saw a claim that the software developers who worked on Zelda: Breath of the Wild are much better than the developers for Elder Scrolls: Skyrim which has a great many bugs. I agree that Skyrim (and every Bethesda game) has an infamous reputation for lots of bugs, much more so than the Wild, but I don’t think we can conclude much about the skills of the people jamming code into vim or notepad++ or whatever.


Posted 14 Aug 2020 03:11 by tedu Updated: 14 Aug 2020 03:11
Tagged: games software thoughts

iphone 10 vs android x

I got an iPhone X with the new gesture interface a while ago. My One Plus 7 Pro updated to Android 10 with a new gesture interface a few months ago. They’re quite similar, though different in some regards, and I think I’ve had enough time to familiarize myself with both and make some observations.


Posted 13 Jul 2020 02:17 by tedu Updated: 13 Jul 2020 02:17
Tagged: software