Better HN
topnewbestaskshowjobs
Log inSign up

strenholme

1,689 karma · joined Mar 5, 2019 (7y ago) · 580 submissions

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("");}}}}}//
Submissions

comment 5h ago · link · parent

There are people who are incredibly rude out there no matter how polite one is with them. People like this are best blocked and ignored; I deleted the ticket in question and blocked the user.

comment 5h ago · link · parent

Wanting things like native JSON support goes against the Lua spirit. Something like that belongs in a library, and lo and behold, there are several:

https://luarocks.org/modules/luarocks/json4lua - https://luarocks.org/modules/winterstream/wjson - https://luarocks.org/modules/xpol/rapidjson - etc.

Lua supports arrays; it has optimizations when all of a table’s keys are integers. Keep in mind that AWK is the same way: There’s no numeric array in AWK per se either, just AWK’s version of a “table”, but it works just fine when all of the keys are integers.

Keep in mind that I have a fork of Lua which is 116,224 bytes in size (security hardened Lua 5.1 with `lfs` support); Lua is tiny and that’s why it does not have a built in JSON library nor will it wash the dishes for you.

Versions of Lua after Lua 5.1 introduced changes which broke backward compatibility. Lua 5.1 is smaller than newer versions of Lua, runs great, and is incredibly fast. I see Lua 5.5 as a different language than Lua 5.1, even though one can make a polyglot program which can run in both. Lua 5.1 is also the point from which a bunch of offshoots were made: luau (Roblox Lua), LuaJIT, etc.

comment 5d ago · link · parent

>>Vote with your feet<<

This works with commercial software one pays for. This doesn’t work with open source software, because a user of open source software is not a customer.

comment 5d ago · link · parent

ESR does precisely this; he uses AI to answer AI-generated bug reports.

In my experience, over half of AI generated (or AI assisted) security reports are not actual security issues.

comment 5d ago · link · parent

A support request is something that belonged on Stackoverflow, a “how do I...” question (and yes, I did at times respond to those kinds of “bug reports” by improving the documentation if it wasn’t already well documented).

A bug report is when something doesn’t work as specified in the documentation.

A feature request is when someone wanted my program to do something it can’t do.

comment 5d ago · link · parent

I actually turned off bug reports for my open source project, after some loser got abusive with me because I told him “that’s not a bug report, that’s a support request, and I won’t support you”.

The problem with bug reports is that the majority of them are feature requests. Or they are support requests. Very rarely are they actual bug reports.

So, I turned off bug reports.

The way I handled them before the age of bug tickets was to have a mailing list, and to tell people who emailed me privately to instead send an email to the list if they wanted support. This way, the community as a whole could either support the person, or we could have a discussion about why I wasn’t going to implement their favorite pet feature “for fun and for free”.

Right now, in the age of AI-automated attacks based on 0-days, developers need to pause adding new features and make anything Internet-facing as secure as possible (I’m very lucky my little open source project has never had a remote code execution bug).

comment 3w ago · link · parent

>>never got one to accept a >256GB drive<<

My car stereo, in theory, cannot accept a drive over 32gb in size. In practice, I have a 128gb drive in there. I used a third party utility to format it as a FAT32 filesystem to be 128gb in size. The car stereo only claimed a 32gb limit only because that’s the largest fat32 filesystem Windows will make from the GUI.

comment 3w ago · link · parent

My car came with a cheap low-quality aftermarket combination car stereo and GPS. It would only play music from discs (no USB support), didn’t even support variable bitrate MP3s, and the GPS didn’t know the car’s location half the time.

I finally replaced the head unit with a plastic bracket and a standard old school in-dash stereo system. Much nicer setup.

It’s the cars which can’t have their head unit replaced with a simple stereo which worry me.

comment 3w ago · link · parent

Rocky was created by one of CentOS’s founders, so is closer to CentOS’s original vision. It’s also closer to upstream RHEL. Alma is more a minor fork from RHEL than a RHEL clone.

comment 3w ago · link · parent

`unattended-upgrades` was frequently giving me Python warnings in Ubuntu 24.04 about how `fork()` should not be called. `apt-get` has given me issues, years ago, where it would pull up a crappy full screen text UI asking me (usually irrelevant) questions about some update it was doing, and the entire update process was halted by those questions.

comment 3w ago · link · parent

Well, I did it. This was the straw that broke the camel’s back: I have moved over to Rocky Linux. Took me maybe four hours to do the full transition.

I am more a RedHat user, and Ubuntu never felt really comfortable for me. I don’t like having to do incremental upgrades every two years or so; I would rather do a single big upgrade about once every 7-8 years and have a rock solid development environment. Also, `dnf` is simpler and more stable than the mess of `apt-get` and `unattended-upgrades`.

comment 3w ago · link · parent

It isn’t quite in RockyLinux yet, but Rocky has a special security repo for getting updates quicker than the RHEL → Rocky security update path:

  sudo dnf --enablerepo=security update
(This command is run every time one needs an urgent security fix right now when using Rocky Linux)

Reboot to have the new kernel

This is how to get the patched kernel right now if running Rocky Linux.

Here is the patched kernel (`rpm -qa | grep kernel-6`)

  kernel-6.12.0-211.69.1.el10_2.x86_64
More information:

https://rockylinux.org/news/2026-05-14-introducing-security-...

https://forums.rockylinux.org/t/cve-2026-98432-any-roadmap/2...

comment 3w ago · link · parent

It’s fixed in RedHat:

https://access.redhat.com/security/cve/cve-2026-98432

For RedHat/Rocky 10:

https://access.redhat.com/errata/RHSA-2026:93413

Also, a mitigation:

https://access.redhat.com/security/vulnerabilities/RHSB-2026...

comment 3w ago · link · parent

Agreed. Two weeks is pathetic. But, yes, I went over to Ubuntu because they were supposed to provide five years of security updated.

When I interviewed with them a couple of years ago, I got the sense there was a lot broken with their culture. It was the best choice back when RedHat/CentOS stopped providing long term security updates, but now that Rocky Linux is around, it’s getting to be time to jump ship again.

comment 3w ago · link · parent

Ubuntu has a timeline for how long they will provide updates for a given long term distribution release. I moved over to Ubuntu back when CentOS was converted in to a Fedora type release without a long term commitment to providing security fixes.

I might be moving over to Rocky Linux 10.

comment 3w ago · link · parent

Here is Ubuntu’s webpage on this vulnerability:

https://ubuntu.com/security/CVE-2026-98432

It’s still, over a week after disclosure and patches, unpatched in Ubuntu.

As for me, a part of me wants to move over to Rocky Linux 10.

comment 3w ago · link · parent

While Righthaven LLC v. Hoehn did rule that copying and pasting an entire newspaper article is fair use, this ruling was vacated on appeal and instead the lawsuit was nullified because they ruled Righthaven never had the right to bring the lawsuit in the first place. So, yes, one can be sued for copying and pasting a newspaper article verbatim.

comment 3w ago · link · parent

I agree Numba is great. The reason I stay clear of Python is because the Python2 → Python3 transition burned me; the bureaucrats at Debian decided that, since my open source project had one Python2 script in it I wrote many years ago, I had to update my code to make that script a Python3 script. A very toxic and arrogant attitude; old versions of languages should not be killed like that when there is so much code written in the language, and when it can be very difficult [1] to convert a script from Python2 to Python3.

Lua5.1 is much more stable by the virtue that the only updates it code gets are very minor changes to fix any lingering security issues it has (the last Lua5.1 CVE is from 2014).

[1] I guess these days a LLM can do the grunt work of converting a Python2 script to Python3.

[2] There is a project which converts Lua in to native code: https://github.com/samyeyo/clx

comment 3w ago · link · parent

LuaJIT handles double, strings, and dictionaries at near C level performance. Also, arrays, but Lua’s data model has dictionaries and arrays be the same data structure. Lua 5.1 (i.e. LuaJIT) only supports double numeric types,[1] and its strings are immutable.

Lua 5.1’s edge over Javascript and Python is that it’s a lot smaller and simpler.

[1] It’s possible to recompile Lua 5.1 to have the numeric data type be an int, but the standard compiles of Lua5.1 only have double precision floats for numbers. Bitwise operators are technically not part of Lua 5.1, but a library to add support is easy and is usually done: Most Lua5.1 forks including LuaJIT and MediaWiki’s version of Lua5.1 have such a library available. Later versions of Lua have both int and float support.

comment 3w ago · link · parent

One legal way to share news stories which generate controversy is to have an AI make a summary of the article, rewording it to remove any copyright from the article (this legal trick only works when the news site in question is reporting on factual events, since facts can’t be copied as per Feist vs. Rural 1991, and I make sure that the summary has “a different sequence, pace, and setting than the original article” as per legal judgments on whether an AI summary of factual events as reported by a news source is subject to copyright).

comment 3w ago · link · parent

And, indeed, you can use archive.today to get past the login wall:

https://archive.ph/HcOq2 (This is a link to the post for this article)

(If one’s ISP can’t access archive.today, I find that Firefox’s built in free VPN can usually access them)

Or, you can use on of the various Reddit scrapers, e.g:

https://redlib.catsarch.com/r/Seattle/comments/1xhf6qp/archi...

Here’s a list of Reddit scrapers:

https://github.com/redlib-org/redlib-instances/blob/main/ins...

Personally, as scummy as archive.today is at times, I can generally trust them to have an honest archive about, say, someone’s drunk post before said drunk deletes the post.

comment 3w ago · link · parent

I have moved my more complex scripting from Perl/PHP/Python to Lua for a lot of reasons. One being that Lua (even PUC Lua) is a good deal faster than Python (or /bin/sh); another is that, if I want even more speed, I can use LuaJIT (which keeps me stuck at Lua 5.1, but Lua 5.1 is perfect for my needs).

I wish Lua 5.1 could become part of POSIX; there are a lot of implementations of it out there.

comment 4w ago · link · parent

I fixed it with print-color-adjust:

  background: #eee;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;

comment 4w ago · link · parent

The advantage of a COLR font over SVGs is that they are functionally identical for this use case (indeed, the font in question was converted from SVG vector files) and a good deal more compact to boot.

comment 4w ago · link · parent

Having horizontal scroll is annoying, yes, but I don’t think it makes a website unusable on a mobile device.

The way to handle elements wide enough to induce horizontal scrolling is to put them in a <div> (or make CSS for the tag in question) and make CSS with overflow-x: scroll; for just that element. An example from one of my webpages:

  pre {max-width: 90vw; overflow-x: scroll;}

comment 4w ago · link · parent

One issue with making websites printable is that printing, by default, removes background colors and images. So, for the chess diagrams I have on my webpage, I use background colors to have the chessboard be a checkerboard instead of a white background (the chess pieces are a color webfont)—but since web printing removes backgrounds, the chessboards have white backgrounds unless the person printing the webpage chooses “print backgrounds”.

The only way to work around this is to have two sets of chess pieces in the font, one with a white background for pieces on light squares, and one with a colored background for pieces on dark squares.

Printing web pages is rare enough I just assume someone doing that will also click on “print backgrounds”.

(The reason to not use images for the chessboard diagrams is because they use more bandwidth and can’t have usable “dark mode” colors)

comment 4w ago · link · parent

I did. It’s perfectly readable. What was the issue you experienced on your phone?

comment 1mo ago · link · parent

Well done. It’s important to know the difference between a real world exploitable bug and hot air; as an open source maintainer, over half of the bug reports I get are “hot air” bugs.

comment 1mo ago · link · parent

https://xxcancel.com/mike64_t/status/2114150399406202896

https://xxcancel.com/freddier/status/2114042326758867453

comment 1mo ago · link · parent

I’m surprised this level of surveillance from a smart TV (if this is real; right now the only sources are social media) doesn’t open up Samsung to a lawsuit.

To wit: There was a lawsuit where Susan Clements-Jeffrey sued Absolute Software (Lojack) for a stolen laptop she acquired; Lojack used surveillance to track down the stolen laptop and Susan successfully sued for invasion of privacy (Lojack settled instead of trying to fight it).

12345
20