When talking of someone who is really into a thing, especially aspects of
it that are often thought to be off-putting such as jank in old video
games or the hassle of maintaining a trash-picked bicycle, a term I've been
using more and more recently is "pervert" or, if in company who are not
familiar with the usage, "pervert (positive)".
I am not entirely sure where I picked it up.
I would want to say I remember Kayin using it, but
I'm not entirely sure.
I did pick it up within the last couple years, so Cohost is a pretty
reasonable guess for where I picked it up from.
I'm interested in hearing about others' usage of the term with same or
similar meaning, so send me an e-mail (see my home
page for my address) if you've encountered it.
My partner pointed out installing the
oldnewthing-link-unfucker to be a bit annoyingly manual.
I had not really thought about it, but that is true.
They looked into it, and it appears Greasemonkey will prompt for
installation
if the filename being served ends with ".user.js".
I have applied that change, so if you use Greasemonkey, you should now be
able to install
oldnewthing-link-unfucker
by navigating to the raw file on Forgejo.
The Old New Thing is a
long-running blog by Raymond Chen that contains a treasure-trove of
information on old Windows (among others).
Over the years the blog's moved around different domains and backends,
which have had the effect of breaking many of the internal links.
You can often find your way to the intended post with some URL hackery, but
it would be nice not to have to do that, you know?
So because of that I wrote
oldnewthing-link-unfucker,
which automates most of the work.
If it recognizes a link pointing to an old url it'll rewrite it to point to
the modern URL for the post, or failing that, the day it was posted.
Any URL thus modified will get a 𝌡 (the Taixuanjing tetragram for 'change')
after it to mark it's been changed.
It's a userscript, so to use it paste it to any userscript manager you
like.
I use
GreaseMonkey.
I was reading the SDL Shader Language
Quickstart,
which (at the moment) mostly consists of explanations about how the
language differs from C.
One difference listed caught my eye: variable initialization can't
reference itself.
To quote,
Why does C even allow this?
int x = x + 1;
In C, x is in scope as soon as the parser sees int x, but this allows you to reference a variable that is definitely not initialized during its own initializer! Doing so is always a bug, so we just don't allow it.
I would consider myself fairly knowledgeable about the weird corners of C,
but I had never come across this "feature"!
As stated, using the uninitialized value of the variable is going to
be undefined behaviour in C.
However, I did not immediately see why taking a pointer to the variable
would be.
So, as long as we only use the pointer of the value in its definition, that
ought to be fine?
Normally, doing
type x = &x;
is going to fail because the types type and type* are not compatible.
However, in C (but not C++!) you can implicitly cast between void* and
any other pointer type, including void**.
This means we should be able to do
void *x = &x;
To test this, I made the following test program
#include <stdio.h>
int main(void) {
void *x = &x;
// We need an explicit cast for &x here, since printf is a
// varargs function.
printf("x = %p, &x = %p\n", x, (void*)&x);
}
And with GCC 14.2.0, this does indeed work, with zero warnings with the
flags -std=c23 -Wall -Wextra -pedantic!
This is meant to be a microblog in the style of zunzuncito, a microblog run by my partner.
The posts here are going to be lower-effort than what you'd see over either on zunzuncito or my writeups – I hope to have this be a replacement for social media for me.
At the moment the site is extremely bare-bones, but I hope to add support for h-entry based embeddings and a comment section (maybe using Cusdis?).
In the meantime, if you want to comment on anything here, send me an e-mail.