HNHacker News
TopNewBestAskShowJobs

strenholme

1,682 karma · joined March 5, 2019

Single parent. Electronic musician. Lua and open source developer. https://samboy.github.io/ — https://github.com/samboy

  #include<stdio.h>//RadioGatun
  #include<stdint.h>/*32-bit\*/
  #define b(z) for(c=0;c<z;c++)
  uint32_t c,e[42],f[42],g=19,h
  =13,n[45],i,j,k;void m(){j=0;
  b(12)f[c+c%3*h]^=e[c+1];b(g){
  i=c*7%g;k=e[i++];k^=e[i%g]|~e
  [(i+1)%g];j=j+c;n[c]=n[c+g]=k
  >>j%32|k<<-j%32;}for(i=39;i--
  ;f[i+1]=f[i])e[i]=n[i]^n[i+1]
  ^n[i+4];b(3)e[c+h]^=f[c*h]=f[
  c*h+h];*e^=1;}int main(int c,
  char**v){char*q=v[--c];for(;;
  m()){b(3){for(j=0;j<4;){f[c*h
  ]^=k=(*q?255&*q:1)<<8*j++;e[c
  +16]^=k;if(!*q++){b(18)m();b(
  8){j=c;b(4)printf("%02x",(e[1
  +j%2]>>8*c)&255);c=j;if(c%2)m
  ();}return 0&puts("");}}}}}//
submissionscomments
strenholme··on Your intellectual fly is open when you use an LLM to author a post (2025)
Actually, it’s because, as per Feist Publications, Inc. v. Rural Telephone Service Co., facts cannot be copyrighted.

This legal trick only works for rewriting an article reporting on a factual event—since the events are uncopyrightable facts, the only part of the article which can be copyrighted is the stylistic writing.

Let me quote from a recent legal opinion on AI summaries (The New York Times Company v. Microsoft Corporation et al 2025):

>>> Exhibit 11 to the CIR complaint provides website links to articles that CIR alleges were unlawfully abridged by defendants in their ChatGPT and Copilot outputs. (CIR, FAC Ex. 11.) Examining the similarities between those outputs and the corresponding CIR articles, including the “total concept and feel, theme . . . sequence, pace, and setting,” Williams v. Crichton, 84 F.3d 581, 588 (2d Cir. 1996), the Court concludes that the “abridgments” contained in Exhibit 11 are not substantially similar to CIR’s copyrighted works as a matter of law.

The alleged abridgments are detailed summaries, usually in bullet point form, of the facts contained in CIR’s articles. Those summaries—which differ in style, tone, length, and sentence structure from CIR’s articles—are not “substantially similar” to CIR’s copyrighted works. They present the “facts in a different arrangement”—bullet point lists or short summary paragraphs—“with a different sentence structure and different phrasing.” Nihon, 166 F.3d at 71. In short, the abridgments in Exhibit 11 are not substantially similar, qualitatively or quantitatively, to the original CIR articles as a matter of law. The Court therefore grants OpenAI’s motion to dismiss CIR’s claim of direct infringement under 17 U.S.C. § 501 insofar as it relates to the “abridgments” contained in Exhibit 11.<<<

strenholme··on Your intellectual fly is open when you use an LLM to author a post (2025)
The only place where I use AI for writing is to summarize press articles; this allows me to legally have a mirror of a press article I am commenting about in my blog (whenever I use AI, I make a disclaimer that the prose is AI-generated; EDIT: I also link to the original article, and an archived copy if available). Now that archive.org doesn’t mirror many press articles, and now that archive.today is having a lot of reliability problems (right now its CAPTCHA is down because it has gone beyond Google’s limit for CAPTCHA use), an AI summary of a news article (along with a link to the real article) is the only way to guarantee the reader will get this gist of the article I’m commenting on.

I also use AI to colorize old black and white pictures when discussing historical events in my blog, as well as the occasional AI enhancement of an old grainy and/or blurry photo.

strenholme··on Music Theory for Programmers
For people with the mind of a programmer, explaining the mathematical basis of equal temperament and then the major scale (the article doesn’t explain the major scale well, but simply says “it sounds better than a chromatic scale”) allows a programmer to understand not just the how but the why for the basics of western music.

For people that just want the how, one would start with “here is a pentatonic scale” followed by “here is a major chord”.

strenholme··on Music Theory for Programmers
“Change it to 300 and run it again. You get a different pitch and nothing breaks, because at this level there are no notes yet, just a number.”

What the article is trying to explain here is that A=440 is just a convention. This is probably where the article should have had a discussion about perfect pitch vs. relative pitch. I would have written it like this:

“Since this note is 440 hertz, in Western music, because of convention, we call this note ‘A’. Now, let’s play a note that is 400hz. For most people, given enough time after hearing the 440hz note, this second note will sound like the first note. There is a minority of people with a talent called perfect pitch who would be able to tell that the 440hz note is in tune, while, with conventional Western music, 400hz is out of tune, because they are able to tell the absolute pitch of notes. Most people (including the famous composer Wagner) cannot do this: One pitch by itself sounds like another pitch by itself.”

strenholme··on Music Theory for Programmers
It was a really good article up and until it explained the octave, the perfect fifth, and the equal tempered scale. It didn’t do a full explanation of equal temperament—we use it because, with it, it’s easy to change keys.

Once it jumps from the chromatic scale to the diatonic scale, it doesn’t explain the theoretical basis for the major scale. To understand the major scale, we need to first explain the major third then the major chord. From the major chord, perfect fourth, and perfect fifth, we can build up the major scale.

There’s also no discussion of time signature and rhythm.

strenholme··on Music Theory for Programmers
I don’t think it’s unreasonable to say 2/1, 3/2, 4/3, 5/4, and 6/5 are intervals which sound pleasant to the human ear. [1]

Once that is established, as per the linked article, 12-tone equal temperament makes a lot of sense (but isn’t universal, obviously) because it’s resulting tuning gives us a really close 3/2 and 4/3, and having a simple 12-tone scale reasonably in tune everyone can agree on makes sense.

We can then explain that 5/4 and 6/5 are a bit off in 12-tone, but are “good enough” that we tolerate them being slightly out of tune when using equal temperament. Once we accept that 12-tone has imperfect thirds, we can then look at the I IV V chord progression (I IV V comes from 3/2, 5/4, and 4/3 sounding pleasant to the human ear), and explain why that chord progression is so common in western popular music.

These aren’t universal truths—12-tone equal temperament is a compromise, but, as per the linked article, a reasonable one. Just intonation is, of course, another possible compromise.

[1] 2/1: Octave; 3/2: Perfect fifth; 4/3: Perfect fourth; 5/4: Major third; 6/5: Minor third

strenholme··on Music Theory for Programmers
Yes, he could have approached it differently.

It’s really good at explaining the octave, the fifth, it shows the mathematical basis for why just intonation has “wolf notes”, and why we use 12-tone equal temperament.

Once it hits the 12-tone scale, and explains why we generally avoid the tritone, it doesn’t explain very well why we generally use diatonic instead of chromatic scales (well, OK, great music can use chromatic scales, but there’s a reason “Entrance of the Gladiators” sounds like a clown show).

I would had, after explaining how 12-tone gives us an almost perfect fifth and fourth, explained that a major third is 5/4, and a minor third is 6/5, and that the thirds are noticeably but tolerably out of tune in 12-tone equal temperament.

Once we have the fifth and the major third, we then explain the major chord (Base note, 3/2, and roughly 5/4). Next, we explain the perfect fourth. From there, we can show the I IV V chord progression. And once we have I IV V we can then demonstrate the major scale. (The linked article shows us a major scale but doesn’t explain why the major scale is tone-tone-semitone-tone-tone-tone-semitone—it’s that way because if we take all of the notes that exist in a I IV V chord progression, we get the seven notes of a major scale)

After I IV V, I would then look at a basic 4/4 rhythm, quarter notes, eight notes, the kick drum, the snare drum, and the closed hi hat.

I IV V, the major scale, and a simple 4/4 rhythm is enough music theory to write a good number of rock and pop songs.

I IV V and the major scale is roughly equivalent to understanding variables and variable assignment. Adding the structure of a 4/4 rhythm, with kick, snare, and high hat is equivalent to if-then-else and while.

From there, if I were to continue, I would next explain the minor third (6/5) and minor scale, the pentatonic scales (minor pentatonic gives us a large number of rock guitar solos), and probably show the I V vi IV chord progression.

Obviously, this is very basic, but things like ABRSM Grade 5 are the music equivalent of Forth-like and Lisp-like languages: They can be useful, but just as the majority of programs aren’t written in Forth or a Lisp dialect, the majority of music doesn’t use, say, an irregular time signature.

strenholme··on Actively exploited sandbox RCE in all Chromium versions
It looks like more of Firefox has been ported over to Rust since then:

https://www.wilderssecurity.com/threads/security-chromium-ve...

The reason why I support Gecko and Ladybird’s engine is because I am opposed to monoculture, however. Even if Gecko (Firefox) is less secure than Chromium (Chrome, Edge, etc.), by not having a monoculture, a Chrome exploit will only take down the subset of people using the Chromium ecosystem, and not affect Gecko users. Alas, most people are in the Chromium ecosystem right now so that means malicious hackers only need to target one codebase.

It’s the same reason I wrote MaraDNS back in 2001—back then, there was only one open source DNS server[1,2] so I wrote another one.[3]

[1] Djbdns was around back then but wasn’t open source, which limited its adoption.

[2] https://lwn.net/2001/0208/

[2] MaraDNS was and is optimized for running at most a few dozen domains on a system running a bunch of other services, where one does not want the DNS server causing security problems for the server, and where the DNS server needs to be lightweight as possible.

strenholme··on Actively exploited sandbox RCE in all Chromium versions
There’s a reason I use Firefox (Gecko). Also, Ladybird—another completely different web engine—is really promising. I spent five hours building it from source, having it take about 8 gigabytes of space, and it perfectly renders my own webpages and blogs.

I have a feeling someone’s going to make an open source browser using Ladybird’s engine before Ladybird has official binaries.

strenholme··on .name Termination
I’m amazed beach.santa-cruz.ca.us is still around. I’ve given it some SSL certs and have reclaimed it:

https://beach.santa-cruz.ca.us/

Thanks for checking the zone files of the parent domain to verify it’s still there.

strenholme··on .name Termination
The way it worked is that someone nominally representing the CA State Government had* ca.us, and they in turn gave* san-jose to someone who nominally represented San Jose, los-angeles to someone who nominally represented Los Angeles, santa-cruz to someone who nominally represented Santa Cruz, and so on. city-name.ca.us domains were still free (and charging for .com and .org domains was a new thing at the time); you would look in the zone file to see who owned* a given domain, email them with your nameserver names and IP, and they would add it to their zone.

This isn’t how things are done these days; names visible to the public are pretty much always in the form {domain}.{tld} or sometimes {name}.{domain}.{tld} (e.g. my own https://samboy.github.io). Registration is now done by bots and companies that spam you to death to try and get more money from you (the Internet wasn’t like that in the beach.santa-cruz.ca.us days). Domain names with multiple levels of delegation aren’t around they way they used to be.

* rented/leased/had control over/whatever

strenholme··on .name Termination
I agree.

As a DNS implementer, the action plan is unnecessary. There are, what, only 22,000 or so .name domains. One can write code to do two lookups for firstname.lastname.name: If firstname.lastname.name is found, return the NS delegation. Otherwise, if lastname.name is found, return that NS delegation. Finally, if neither is found, return NXDOMAIN.

One argument is that this is hard to implement in the real world (it’s about one day, at most one week for a skilled DNS developer to pull off; probably half a day to be honest, and yes I have written code like this), so then yeah if that’s a real concern let’s have a closed auction. I’m opposed to the auction, based on my experience that this isn’t hard to implement.

If it’s an issue, just stop all new firstname.lastname.name registrations, and only allow lastname.name new registrations. Then we only need to deal with this corner case for about 22,000 domains, which we can keep in a special hash and would take about four megs to store.

strenholme··on .name Termination
The .name mess is not in the public suffix list.

https://github.com/publicsuffix/list/issues/2306 for more discussion.

strenholme··on .name Termination
I remember I had beach.santa-cruz.ca.us at one point registered to me. I owned beach.santa-cruz.ca.us, someone else owned santa-cruz.ca.us, yet someone else owned ca.us, and I believe Network Solutions took care of .us at the time.
strenholme··on .name Termination
The correct way to handle this mess is to simply keep things messy. BGP tables are a big mess, for example, because a lot of companies keep their IPs when going from ISP to ISP.

But, assuming that Verisign can’t keep third level domains (as a DNS implementer, I don’t think third level domains is a huge deal; see thread below):

* Third level names where only one person has the second level domain should be transferred to whoever owns that single third level name.

* Third level names where multiple people have the same second level domain should be put up for closed bidding: Only current owners of .name domains with a given second level domain name (e.g. last name) will be able to bid for the second-level domain. So, if one has john.smith.name and joe.smith.name, Joe Smith and John Smith will be in a bidding war for smith.name.

If the issue of .name not being in public suffix is a real issue, Verisign can handle that by disabling new third-level .name registrations, and provide Public Suffix with a list of those registrations (just send all the owners a privacy notice, making it clear that the existence of the name will be made public for security reasons). More reading: https://github.com/publicsuffix/list/issues/2306 (There seems to be issues with this list being too long to keep in the Public Suffix because there’s too much software out there which can’t handle it. That seems strange to me: Even here in 2026 where RAM costs far too much, Deadwood can store a list of 240,000 blacklisted entries in under 10 megs; there are about 22,000 three-level .name domains and I could store that list in a way that could be very quickly looked up in about a meg of memory)

Now, personally, I think Verisign can keep these messy third level names, and are doing things this way so that Neil Fraser has to compete with every single 2-bit cybersquatter out there for the rights to fraser.name.

As an aside, it’s trivial to have DNS servers handle multi-level domains without having to have a zone file for every level; e.g. https://this.is.a.long.name.maradns.org works, and there’s no zone file for name.maradns.org, long.name.maradns.org, a.long.name.maradns.org, and so on.

Also, since people have brought up the “org fuckery” without providing details: https://bluecatnetworks.com/press/the-org-domain-sale-explai...

You know dang well if .org was owned by an investment entity, they would had jacked up the prices as much as they could get away with.

strenholme··on Hang on to Your Firefox
There’s a reason why this culture doesn’t exist: Internet Explorer 6

As recently as 2012, web developers had to make sure their websites ran on IE6, a browser from 2001, and were very frustrated that had to support this 11-year-old browser instead of being able to implement new features available with Chrome/Firefox/Opera and even newer versions of Internet Explorer.

There was a lot of resentment caused by this situation, resulting in web developers just not wanting to hold back their website so that it will render correctly in some random ancient browser.

strenholme··on Hang on to Your Firefox
Once people start saying things like “his own privileges as a cisgender white guy”, that’s a red flag in my book—someone who writes like that, in my experience, doesn’t have real empathy for others, and uses “privilege” as an excuse to not have empathy or caring towards someone because of their gender or the color of their skin.
strenholme··on Hang on to Your Firefox
I think it would had been better for Andreas Kling to simply stay “our style guidelines use the masculine form when describing an unspecified person, even though the person may be masculine, feminine, or non-binary”. But I also understand his frustration: Someone who prefers using an indefinite male is not someone who, as per the now-dead slanderous parent post, “a white replacement theory type”.

Nor is someone who prefers the indefinite masculine grammatical form someone who, as per another dead post, “is completely blinded by his own privileges as a cisgender white guy”.

This kind of hyperbolic overreaction is something Kasparov, someone whose Chess playing and politics I greatly respect, recently described as “Woke 1”:

https://www.thenextmove.org/p/2020-accountability-is-mia - https://archive.ph/20260827172149/https://www.thenextmove.or...

strenholme··on Hang on to Your Firefox
I will believe it when I see it. Still no public release.
strenholme··on CobaltC – The Successor to C?
To clarify: C3 has fixed sized ints. Maybe the parent poster doesn’t like their names, but they are fixed sized, as follows:

  Name    Size    Signed
  bool    1       no
  ichar   8       yes
  char    8       no
  short   16      yes
  ushort  16      no
  int     32      yes
  uint    32      no
  long    64      yes
  ulong   64      no
  int128  128     yes
  uint128 128     no
Source: https://c3-lang.org/language-overview/types/#integer-types
strenholme··on U.S. State Department pauses immigrant visa applications
Talking to myself, doing some research inspired by my reply above, I came across this:

https://decreechronicles.com/guardians-of-the-decree-the-hid...

I mention fertility rates remained constant in the 1980s. Now I know why fertility rates didn’t go down back in that era.

In the year 1984, Romania took a page from Orwell’s 1984: All medical units were put under surveillance to minimize the number of illegal abortions. There was now a secret “Thought Police” in 1984 monitoring all doctors and nurses to make sure no abortions slipped through the cracks. The number of abortion related convictions in 1986 doubled compared to 1985. Just like 1984, not only did a hidden thought police find these people doing illegal abortions, but people would report on their neighbors.

Romania was able to stop the 1970s fertility decline (which, again, was a good deal less steep than the fertility decline when abortions were legal) in the 1980s by going full Orwell and clamping down the screws.

strenholme··on U.S. State Department pauses immigrant visa applications
You have a different definition of “work” than I do.

For people in the peanut gallery, here is the chart we’re looking at: https://commons.wikimedia.org/wiki/File:Birth-death_RO.svg Unfortunately, the data for this chart is not sourced.

As one can see, births were at or above pre-decree levels after Decree 770 was passed, and only went below pre-decree levels when the decree was dismantled in 1989. The 1970s downward slope is much less steep than the 1960s pre-decree downward slope. In the 1980s, there was no downward slope whatsoever. Fertility stayed at roughly pre-decree levels before plummeting once the decree was ended. At no point while Decree 770 was in effect did we have a birthrate that “very clearly returned to it's [sic] previous trajectory”.

Now, let’s go back to what I was replying to when I brought up Decree 770. “Our birthrate has been below replacement” said one poster, and in a reply “You're assuming the birthrate can be "fixed"”. Decree 770 fixed the issue I was replying to: Birthrate being below replacement. Pre-decree, Romania’s birthrate was on a downward path, and would had been below death rates by the early 1970s. Because of the decree, the birth rate stayed above replacement rates until it was repealed in 1989.

Decree 770 increased fertility. It kept fertility above death rates. I have already posted elsewhere why Decree 770 was a very bad idea.

This will be my final reply to @mrguyorama. They do not come off as someone willing to admit when they are wrong about something.

strenholme··on Saving 100 terabytes of memory by optimizing 1.1.1.1's DNS cache
Twitter has become a cesspool, and there’s a lot of reasons why people are leaving it in droves.

My personal issue is the misogynists who have created a hateful completely false narrative that 80% of the women sleep with 20% of the men (including the very demeaning and hurtful notion that all women are sexually promiscuous, but only if you’re one of the 20% of supposedly “Alpha” men) [1] Twitter is also full of—let’s call a spade a spade—racists who constantly post some video from years before showing some random Black person doing a criminal act, and then a bunch of racists comment that that’s how all Black people are and it’s the “evil left wing media” suppressing this supposed “truth”.

Just as Twitter has become a right-wing cesspool, Reddit has become a leftist cesspool, so I also avoid Reddit, which, like Twitter, is also becoming a closed walled garden—they just this month started clamping down on people reading old.reddit.com anonymously, so now you have to log in to have a usable interface with Reddit. Excuse me, no.

[1] This annoyed me to the point I researched the claims to verify it’s a bunch of bullshit. https://samboy.github.io/blog/80-20-myth.html

strenholme··on U.S. State Department pauses immigrant visa applications
Here is what they said: “You can definitely fix it. You might not like what it takes but others don't like their culture being replaced either.”

I think he’s implying he has some pretty, shall we say, interesting views on the matter. As someone who has been in an interracial marriage and multiple interracial relationships, I probably don’t agree with those particular views.

It would be nice to know what he’s advocating for, but he’s gotten pretty mum after I pointed out it could be done, but only with Orwellian levels of suppression.

strenholme··on U.S. State Department pauses immigrant visa applications
Talking to myself: I enjoyed the novelette at https://www.uncannymagazine.com/article/rabbit-test/

It’s probably a bad prediction of the future, but having an exaggerated dystopian view of the future is a classic trick used in golden age science fiction (e.g. Decision at Doona from 1969 had a grossly overpopulated Earth) so one I was able to accept while reading the story.

It definitely has a bias; it doesn’t mention the stories of women regretting abortions at all, except (minor spoiler) mentioning that Asenath Smith didn’t want an abortion. As someone who has had multiple women confide their abortion stories to me, it’s quite common for women to deeply regret having them. I understand why a story as political as this one doesn’t want to get in to the nuance of the trauma abortion can cause, because it’s written in the same year Roe vs. Wade was overturn, so it’s a story of how much women need access to pregnancy tests and to abortion. [1]

[1] I personally believe in the right to an abortion, for the simple reason that, when a woman has a miscarriage or a baby which just isn’t viable, the medical treatment she gets should be a decision doctors make, not a decision people with guns and cages make.

strenholme··on U.S. State Department pauses immigrant visa applications
You’ll have to ask @account42, but I will bet you it’s the same answer I came up with: Take away people’s freedoms and have a hard, strongly enforced (i.e. Orwellian levels of enforcement) ban on contraception and abortions.

Both @account42 and myself agree this isn’t a particularly good solution, and I’m not worried about the fertility collapse myself: It is an issue which will last for only one generation.

strenholme··on U.S. State Department pauses immigrant visa applications
Depends on what you mean by “work”.

It worked: The birth rate exceeded the rate of deaths until Nicolae Ceausescu was overthrown in 1989. There was some level of circumvention in the 1970s and 1980s, but birth rates continued to outpace death rates up until the day Ceausescu was overthrown and Decree 770 was made null and void. (If you have a different definition of “work” than “it increased fertility”, please let me know what that definition is)

Mind you, as I said before, there were a lot of undesirable, shall we say, side effects because of this decree, but it did solve the fertility problem.

{Snark tag: Obviously, I do not endorse doing something as Orwellian as having a government like the Romania of the 1960s and 1970s, and the unwanted kids caused a huge amount of intergenerational trauma. To get back to the issue of fertility collapse, fertility collapse is an issue which will last only one generation: The people who have kids will have worldviews which encourage having more children}

strenholme··on U.S. State Department pauses immigrant visa applications
The “proposed solutions” are very misogynistic. They include repealing the 19th amendment (not letting women vote), repealing sex discrimination laws, and enforcing “patriarchy”. See, for example https://archive.ph/20260624060135/https://nitter.net/Schtal2... for the kind of nonsense these kinds of people are proposing, based on lies and fabrications.
strenholme··on Saving 100 terabytes of memory by optimizing 1.1.1.1's DNS cache
With my own MaraDNS, I aggressively optimized the memory usage of blacklist entries by having a single really big malloc() to allocate the memory for the entries, then traversing that memory block for potentially blacklisted entries.

When I was using one malloc() per entry, a large blacklist took up 237 megabytes of memory. The same blacklist, once optimized to be loaded with a single malloc() call, only took up 9.5 megabytes of memory.

https://samboy.github.io/blog/entries/MaraDNS.html#BlogEntry...

strenholme··on U.S. State Department pauses immigrant visa applications
Very few. 0.5% to 0.7% of all births.

https://www.bbc.com/news/articles/cn9nz5qwl8jo

← PreviousPage 4 of 20Next →