flak rss random

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

good idea bad implementation crosstalk

Sometimes there’s a bad implementation of a good idea, which typically results in discussions turning into shouting matches between people who see only the bad implementation and people who see only the good idea. And sometimes seems more like always when it comes to smart devices, or the internet of things, aka ioshit.


Posted 27 May 2020 07:47 by tedu Updated: 30 May 2020 03:41
Tagged: software thoughts

reversing windows scroll wheel direction

Saving this here so it’s less trouble to find in the future. Ten years later and there’s still no generic means to accomplish this most simple of tasks without device specific junkware except via registry hackery.

Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 1 }

From superuser.

Posted 06 May 2020 21:13 by tedu Updated: 06 May 2020 21:13
Tagged: software windows

on the usability of editable software

I’m aware of two occasions on which Knuth advised editing existing code, as opposed to simply using it. One mention is in this interview, advocating for “re-editable” code instead of the fashionable reusable code, although it doesn’t amount to much more than that statement. In Coders at Work he describes a system of working that’s basically patch and diff. He writes a program, the master version that works for him, and ships it out. People receive and it and then modify it with change files so it works for them.


Posted 30 Apr 2020 16:48 by tedu Updated: 30 Apr 2020 17:40
Tagged: software thoughts

a month with the pixel slate

I was supposed to be spending the past month or so traveling. That didn’t go quite as planned, but I nevertheless spent some time preparing for the trip, and as part of that, set up a Google Pixel Slate to take along. Even though I didn’t actually complete the experiment, most of the effort was validating it could work, and I think it would have been fine.


Posted 09 Apr 2020 13:50 by tedu Updated: 09 Apr 2020 13:50
Tagged: computers software

virtualization in windows

My Windows desktop has a Threadripper CPU with a few cores. Maybe I could I get a bit more utilization out of it with virtualization. Or maybe, given the frequency with which attacks target Windows, I could use virtualization to increase security. Let’s see how that goes.


Posted 06 Apr 2020 07:45 by tedu Updated: 06 Apr 2020 07:45
Tagged: rants software


Sometimes I want to send some mail. Sometimes I want to receive some mail. (Much less often than it typically happens, as it were.) But mostly I want to not think too much about it.

Alas, the history of email is rife with people thinking about it, and inventing new problems for their solutions. My needs are much simpler than that. I want to have email that arrives at port 25 go in my maildir. I want email that I send to port 587 to go wherever it should go. That’s about it. I don’t need fancy filtering before it goes in the maildir; I can always do that later. I don’t need fine grained authentication to send; it’s my computer, if I want to send it I’m going to send it.

But nobody makes a mail server just for me. The self hosted email market is kinda small already, because Big Evil has decided that’s bad for you, but it’s also quite a chore just reading the documentation for even simple server setups. How about an smtp server that doesn’t require documentation because it doesn’t have any features? If it doesn’t do anything, it can’t do anything wrong.

Enter the reliverator. It receives email. It delivers email. It’s a deliverator, not written in D.

When an email is received, it goes in the user’s maildir. If there is no maildir, it doesn’t.

When an email is submitted, it goes in the database until it goes somewhere else. There’s no access control because it only listens on localhost and I’ve already got an ssh tunnel open from my laptop.

Mostly I just wanted to see how hard can it possibly be. And after some bludgeoning and tear soaked stackoverflow copy pasta, it kinda came together. There’s a fine mess of a little of everything. It’s about 25% unsafe, though that’s not the part that worries me most. I even used some tokio for bonus points, though it seems overkill for sending and receiving a single UDP packet, but I don’t pack the crates.

If I really wanted to write an smtp server, I’d have made some very different decisions.

Posted 01 Apr 2020 07:25 by tedu Updated: 01 Apr 2020 07:25
Tagged: project software

real world crypto talks

Real World Crypto 2020 was last week. It’s a conference I like because the talks are usually pretty interesting. The crypto talks have real world applications and the real world application talks have crypto. Afterwards, there’s usually not just something to be learned, but something to be done. I didn’t actually attend every talk, but here’s some notes.


Posted 14 Jan 2020 18:13 by tedu Updated: 15 Jan 2020 04:46
Tagged: event software thoughts