RSSAmplifier

Blog

AE1020: Lazy Notebook

Made with <3 by @niklasbuschmann

ae1020.github.ioRSS feed ↗10 posts

Latest posts

AI-Assisted Technical Writing: When To Stop

I had a comment in a C++ codebase explaining why a particular cast was written the way it was. The comment kept growing… and eventually it was longer than the code it was documenting. So I did what seems like the obvious modern move: I asked Claude.ai to turn it into a blog post I could link to instead, and pulled the explanation out of the code entirely. I’d have thought that would have been the…

Implicit Casts vs the (maybe `(void*)`) Waypoint Cast

This is my first piece of AI-assisted technical writing. Rather than talk here about giving credit to which-LLM-did-what (and date the C++ content itself to the AI boom of 202X) I put some thoughts in another article: https://ae1020.github.io/ai-writing-when-to-stop/ I found myself having to explain why I kept writing (T*)(void*)ptr in a C++ library. I was convinced the (void*) hop was a…

Code Completion With CAPS-LOCK (not Tab!)

The overloading of the Tab key to mean “indent” and “complete code” has always been pretty horrible. Now it’s intolerable: suggestions from AI come out of the blue at any moment, and can hijack what would have been an indent nanoseconds before. The Tab key becomes completely unreliable in function. This infuriated me enough to do something about it. I decided to turn Caps Lock into an actually…

Thoughts on Bash Style

I try to do as little shell scripting as I can get away with. But I thought I’d put a little set of notes together for my own reference. My bias here tends toward trying to minimize clutter, so I have a better shot at actually seeing what’s going on.

Pure C Solution for GNU/POSIX strerror_r

I’m not going to rehash the problem statement of strerror_r…because if you found this, you likely already know: The Strange strerror_r of Dr. POSIX and Mr. GNU But I will say it’s a rather disheartening sign about the state of software. Actual committees of programmers tried to fix strerror() by making TWO incompatible definitions. :-( // Definition from "The Open Group" // in the "X/Open System…

Parsing Huge Simulated Streams In Attoparsec

A particular aspect that I’ve been interested in about Haskell is its rich parsing combinators: “Parser Combinators: Parsing for Haskell Beginners” Building a parser up out of composable functions that act as “parser plug-ins” is far superior to RegEx. You have the freedom to name things clearly, and to re-use facilities from the language that you already know (e.g. looping and subfunctions). And…

How Blue and Green Eye Island Trolled the Internet

There’s a puzzle that became Internet-famous on xkcd and Terrence Tao’s blog. I’d heard of it, and vaguely recall that I looked at it and skimmed over the solution years ago. But I didn’t remember the details. Since I want to get better at math, and had forgotten what the big fuss was over this question, it crossed my mind to go look it up again. (I chose the less-violent xkcd formulation.) Feel…

Graphical Editing and Mouse Handling In Elm

I’m trying to make a commitment to learning and applying functional programming somewhere in my practice. So yesterday I decided that I would invest the time to try and “do something” in Elm…which I’d looked at, but never used. The goal I picked was to prototype an interface for editing an ordered set of points in 2-D space. After many hours of poking and head-scratching, I managed to get to a…

Make Clicking in Scroll Gutter in VSCode Move By Page

VS Code seems to work much better than I think anyone would have expected. I am trying to switch to it as my editor–any such transition involves some pain. One of the first things that bothered me was that if you click in the “gutter” region of scroll bars in VS code (the part that is not the “slider”), it jumps to an absolute position in the file corresponding to where you click. That is not how…

Is True Greater Than False? (an empirical study)

Haskell is known for being very strict in its type system. So I was a bit surprised when I saw the following: Prelude> True > False True Was this a mistake? Or was someone trying to sneak in evangelism of the metaphysical stance that truths are superior to falsehoods? If an answer on Stack Overflow is to be believed, it isn’t a design choice made on whim–or desire for appeasing C programmers.…