HNHacker News
TopNewBestAskShowJobs

dundarious

3,133 karma · joined April 12, 2020

submissionscomments
dundarious··on Gathering Linux Syscall Numbers in a C Table
There's nothing strange in this domain about relying on people to read the C header. On a running system `man syscall` points you to sys/syscall.h. Read /usr/include/sys/syscall.h which says it gets the actual numbers from kernel header asm/unistd.h. Read that and it redirects in simple if-else fashion to the specific header, e.g., asm/unistd_64.h. That file is clear as day:

    #ifndef _ASM_UNISTD_64_H
    #define _ASM_UNISTD_64_H

    #define __NR_read 0
    #define __NR_write 1
    #define __NR_open 2
    ...
    #endif /* _ASM_UNISTD_64_H */
That was all on my x86-64 machine. Same again on an aarch64:

    #define __NR_io_setup 0                                                                                                               
    #define __NR_io_destroy 1                                                                                                             
    #define __NR_io_submit 2 
    ...
I'm not saying that wanting a table on the web or a spreadsheet or whatever is bad or wrong, but it is not a difficult or obtuse task. I think people who write code that does such things are generally familiar with just reading some C headers, or if they're already using C they just `#include <sys/syscall.h>` and call it a day.

Then on the calling convention, etc., the nolibc project (in the kernel tree) is great for learning or smaller projects (but of course Agner Fog's docs are the "canon" there).

dundarious··on Understanding C++ Ownership System
I disagree, as group lifetimes are conceptually and architecturally often easier and simpler than having lots of individual lifetimes managed by smart pointers. And sure, you can often slap shared_ptr around the place, or hopefully a less lazy smart ptr choice, but it makes the code harder to understand by obscuring ownership rather than eliminating it as a concern.
dundarious··on Understanding C++ Ownership System
copy-paste error given the next example uses a smart ptr type that has a .get() to get the actual pointer.
dundarious··on West Midlands police chief quits over AI hallucination
The background level of hooliganism is AFAIK a lot lower now than in the 80s/90s when I casually recall it being commonplace and less under control, yes, but that doesn't mean that Maccabi deserve to be treated as if they themselves rarely act as hooligans or racists, etc.

I have read quite a lot on the topic of what transpired in Amsterdam, what generally transpires at Maccabi games in Israel (in terms of genocidal chants, calling Israeli "left wing" club supporters "the whores of Arabs", etc., because they are in my view less racist against Palestinians or "Israeli Arabs"), the level of analysis done by the Birmingham police (a poor document, but to me there is clearly a reasonable argument in there, struggling to be expressed, but mired in unforced errors), etc. I think the standard of discourse by UK parliamentary commissions and debate in parliament, etc., has been very low, and not a sufficient basis to understand the relevant facts, even for a casual overview, never mind for detailed insight.

However, none of that is part of my original point, which is only to say, that banning away fans from a club like Maccabi is not notable, and on the surface level, anyone arguing that it smacks of discrimination is either ignorant or disingenuous. If one admits that there was plausible justification to prohibit Maccabi away fans, but in the particulars it was not justified, then fine, I disagree, but I don't wish to pursue the argument on HN.

dundarious··on West Midlands police chief quits over AI hallucination
> But why would there be particular reason to assume that there would be unrest at a match between fans from Tel Aviv and Birmingham who have no particular relation to each other?

Emphasis mine, but you said both in a connected statement, so I don't see the point in disputing anything about my quotation.

Edit: I see now have you've removed the dispute of my quotation as being inaccurate where you argued you said "particular relation" and not "particular reason" -- no worries, I've made similar mistakes before, so while I'll leave my above words, they don't matter anymore.

As for why Birmingham in particular, I don't see it as some kind of gotcha to say because there is a resident population in Birmingham that would be a likely target of racial/religious abuse by Maccabi fans, i.e., Muslim people, or even just "Arab" appearing people, or people showing Palestine solidarity. Amsterdam and Birmingham are similar in this regard (I lived in Amsterdam for years), in ways other cities may not be. I'm not clued into Stuttgart or the cities hosting other games, so I can't say if populations there are similar or not. Expecting a uniform approach from all cities would be ludicrous -- why mandate ignoring particularities?

I don't think this is a form of intolerance towards Maccabi fans, because the logic is identical to that of the Tel Aviv derby prohibition -- it's about preventing reasonably predictable confrontations that exceed some tolerance level.

dundarious··on West Midlands police chief quits over AI hallucination
My recollection is the Tel Aviv derby took place after this Aston Villa ban was announced or raised publicly as a possibility (my meaning of "the furore"), but before the eventual match (another valid definition). Regardless, the sequence of these events is immaterial.

As for a "particular reason"... the Amsterdam match! The report is a poor document, but it contains some valid reasoning, despite the outrageous AI hallucination and some legal linguistics errors (mistakenly saying "communities" themselves were targeted, instead of individuals from said communities).

Subsequently, after a Maccabi game in Stuttgart, UEFA gave Maccabi a (suspended) away fans ban. Is it really still in question whether it's plausible for a police force to say there are security concerns? https://archive.is/20251218110350/https://www.nytimes.com/at...

dundarious··on West Midlands police chief quits over AI hallucination
The Tel Aviv police did see fit to call off a Maccabi game about 2 weeks after this furore. Admittedly, because of violence on the morning of the game, not because of concerns well in advance, but I think it's quite reasonable to say that such a prohibition is not some kind of outrageous outlier.

My general point is, if you think the surface level details of this case are indication of some outrageous singling out of Maccabi fans, then I think that's mostly due to ignorance (in the non-derogatory sense of lack of familiarity).

If you want to debate the details, that's a fine thing to do, and I'm aware of lots of those details too and would still generally find it quite plausible to desire an away fans ban for Maccabi in that case, but that's not the point I'm trying to make on HN right now.

dundarious··on West Midlands police chief quits over AI hallucination
https://www.thescottishsun.co.uk/sport/15326456/rangers-shoc...

It happens often enough in European football. Search "away fans ban uefa -maccabi" online. You can also look at official UEFA sites, but they often list partial bans (e.g., ban from a particular section of the stadium) in a way that I can't distinguish from complete bans.

https://www.uefa.com/running-competitions/disciplinary/stadi...

dundarious··on West Midlands police chief quits over AI hallucination
Yes, that's the precise type of treatment I'm talking about: prevented from attending a football game due to security concerns or penalty for poor behavior.
dundarious··on West Midlands police chief quits over AI hallucination
> when no other sets of fans are given the same treatment

This treatment is often doled out to clubs' fans. Even in Tel Aviv.

dundarious··on psc: The ps utility, with an eBPF twist and container context
I like this tool. I just replaced a multi-step script to find running processes with deleted files open (e.g., updated shared library or binary) that used to be as follows:

- grep /proc/*/maps for " (deleted)" (needs root)

- exclude irrelevancies like paths starting with "/memfd:" (I have lots of other similar exclusions) with grep -v

- extract the pid from the filename part of grep's output with sed

- for each pid, generate readable output from /proc/$pid/cmdline (which is NUL separated) with tr, xargs, bash printf

- show the pid, cmdline, file path

Yes, this is what needs-restarting does too.

With this tool, this pipe chain is now just:

    doas psc -o "process.pid,process.cmdline,file.path" \
      'file.path.endsWith(" (deleted)") && !file.path.startsWith("/memfd:") && !...' \
      | sed 1d
dundarious··on psc: The ps utility, with an eBPF twist and container context
It has process.cmdline as well as .name
dundarious··on I hate GitHub Actions with passion
Of course avoid Actions if you expect tasks to complete promptly or ever. Have we forgotten safe_sleep.sh? I don't think it was unique.
dundarious··on Kernel bugs hide for 2 years on average. Some hide for 20
If you include all the drivers too (which surely makes the comparison more accurate), is that still the case?
dundarious··on Finland detains ship and its crew after critical undersea cable damaged
If you make a confident claim with no evidence, in a discussion that is rooted in everyone wanting to believe something, then the rational response is to doubt harder.
dundarious··on Finland detains ship and its crew after critical undersea cable damaged
Is there a real drone issue at all? https://www.dronewatch.eu/61-european-drone-sightings-analys...
dundarious··on Finland detains ship and its crew after critical undersea cable damaged
The court of public opinion is a really shitty court to apply to potentially criminal damage that occurred well outside the area of interest and knowledge for 99.99% of said public. The standards are shit, the outcomes are shit (bad idea when the ramifications are huge).

It clearly worked very poorly in the case of the recent "Russian drone interference" panic, many of which turned out to not even be drones, never mind Russian ones. https://www.dronewatch.eu/61-european-drone-sightings-analys...

Or the "UFOs" over Pennsylvania.

dundarious··on 2026: The Year of Java in the Terminal?
I had no idea what brief was until I read the env var api key docs in the subdirectory. I think you should not lead with "it's a tui4j app!" and "it's terminal chat!". It's a terminal OpenAI ChatGPT interface. Screenshot wouldn't hurt either, given it's an advertisement for the presentation library.
dundarious··on 2025 was a disaster for Windows 11
filepilot is a very snappy and feature-rich alternative to the native file explorer.

I wish there was a runner alternative. I love tofi on linux where a tiny bit of config makes it show up with dynamic yet deterministic results in a couple frames (at 60Hz).

dundarious··on GOG is getting acquired by its original co-founder
Yeah I was wrong and admitted it and explained the genesis and nuances of it. "And yet somehow"... why say "somehow" as if it's a mystery now? "outright opened" is a very poor construction as well. "direct" in "direct falsehood" is not doing much there either. Please work a little harder at your scolding and condescension, the quality is somewhat low. Better yet, engage thoughtfully and charitably instead.
dundarious··on No strcpy either
Yes, these were also common in several wire formats I had to use for market data/entry.

You would think char symbol[20] would be inefficient for such performance sensitive software, but for the vast majority of exchanges, their technical competencies were not there to properly replace these readable symbol/IDs with a compact/opaque integer ID like a u32. Several exchanges tried and they had numerous issues with IDs not being "properly" unique across symbol types, or time (restarts intra-day or shortly before the open were a common nightmare), etc. A char symbol[20] and strncpy was a dream by comparison.

dundarious··on GOG is getting acquired by its original co-founder
I just installed a GOG Windows game in Heroic, and the Settings state "This game does not support Cloud Saves" even though my account has cloud saves clearly visible for that same game on the GOG website.

Given I'm using Heroic from AUR on a supported OS, and installed with default settings, I consider this cloud save support to be less than stellar, but that's a separate matter, I'm not trying to turn this thread into a support issue.

dundarious··on GOG is getting acquired by its original co-founder
I was mixing up the fact that "Linux native games do not support GOG's Cloud Saves feature" (direct quote from the app itself), with a general lack of support. Given it says "Use the Windows version instead", I am quite wrong, it clearly does support them for Windows games.

If you think that's a "lie", consult a dictionary.

As for whether my general point stands, I think it's a reasonable inference that if GOG Galaxy supported Linux, it would support Linux games and cloud saves for those games, and only then would Heroic and the like be able to implement such a feature. I could be wrong, as it depends on details I don't know, and I'm just making an educated guess.

dundarious··on GOG is getting acquired by its original co-founder
Heroic works perfectly, in a manner identical to Lutris (from a user perspective). I tested both several years ago and have been a happy Heroic user since.

However, neither support 2 key features of GOG Galaxy:

1. cloud saves

2. achievements

These are 2 of the most significant features of competitors like Steam, IMO, so missing them for GOG on Linux is unfortunate.

dundarious··on GOG is getting acquired by its original co-founder
This is true, but there are pros and cons.

Pro 1: reduced lockin

Pro 2: open source options

Con 1: not all options are all that easy to use or feature complete, making the "choice" a mandatory QA/research task, rather than a way to exercise personal taste/freedom

Con 2: no galaxy-only features like achievements and save file cloud sync

(My personal testing led to choosing Heroic)

dundarious··on An exploration of playing three generations of windows games on macOS
The final 3 point list is strange to me, because modulo exact APIs, 2 out of 3 are also done on Linux Steam Deck machines, which is the point of comparison. Only the x86/x64->aarch64 translation is novel.
dundarious··on Rob Pike got spammed with an AI slop "act of kindness"
I don't think you necessarily disagree with that I'm saying.

1. git commits record an author name and email

2. github/gitlab offer an email relay so you can choose to configure your git client (and any browser-based commits you generate) to record that as the email address

3. github/gitlab do not rewrite your pushed commits to "sanitize" any "private" email addresses

4. the .patch suffix "trick" just shows what was recorded in the commit

When I said

> If you want, use a specific public address for those purposes.

that includes using the github/gitlab relay address -- but make sure to actually change your gitconfig, you can't just configure it on the web and be done.

dundarious··on Rob Pike got spammed with an AI slop "act of kindness"
Run git show on any commit object, or look at the default output of git log, and you'll see the same. Your author name and email are always public. If you want, use a specific public address for those purposes.
dundarious··on Ultra-Low-Latency Trading System
Not really, often you can pre compute your model and just do some kind of interpolation on price change and get it done sub 1us wire-to-wire.
dundarious··on map::operator[] should be nodiscard
There is no need to compromise in order to support pre-C++17, you don't need `try_emplace` when the value is like bool and hence doesn't benefit from move semantics -- plain old `insert` is exactly equivalent, and has existed since std::map's inception.
← PreviousPage 4 of 34Next →