HNHacker News
TopNewBestAskShowJobs

Joker_vD

7,392 karma · joined December 26, 2019

submissionscomments
Joker_vD··on A minimal kernel in Swift, running in QEMU
> In the past it wasn't feasible

Wirth did it at least twice, with Medos-2 (1983) and later with various flavours of Oberon System.

Joker_vD··on I gave Opus 5.5 one prompt and six hours to visualize Invisible Cities

    Kublai Khan received an ornate letter signed by Marco Polo: "In Madrid, City of Lost
    Things, no item remains where it was set. If one drops his key in the dirt, he may
    never re-enter his home, and, even if he manages to stoop and recover the key, he may
    rise to find a tulip garden where his house once stood. In complementary fashion,
    things lost by others are forever turning up: A pocket watch on a coffee table. A fond
    memory in your recollection. I even know of a prince who turned up in a prison cell.
    When he appealed to the guards for his release, he failed to find the crown on his
    head, and when he was asked his name, he searched his thoughts, but could not find it.
    Indeed, the only hope now for the release of this prince of Spain is for you to send
    back 300 ducats for his release. Of course, he will reward you handsomely once he is
    out. Yours truly, Marco." Kublai Khan cocked an eyebrow and declared before his court,
    "Hey, everyone: Looks like we're about to get ripped off by the guy who traded gold
    for paper!" The court erupted in booming laughter.
                              — Italo Calvino, Invisible Cities 2: This Time It's Visible.
Joker_vD··on How machines learned precision
> After repeated copying and correction, Maudslay made a master screw five feet long and two inches across, with fifty threads to the inch and a foot-long nut that engaged six hundred of them at once.

That's the stuff I like to read about the historical endeavors. A fifty-threads nut doesn't average the distance between the grooves quite accurately enough? Then let's make a nut with six-hundred threads on it, and so what if it's foot long.

Joker_vD··on Anti-patterns in software blogging
Heh. Mine, before the diploma defense, literally told me "Assume that the panel knows everything about the math except for the stuff your did in your thesis, so tell them about that. Don't bother explaining what 'error correction codes' are, tell them about your specific construction and practical boundaries you've determined". Which, I guess, is precisely "the reader knows everything I know except this one thing" antipattern but then again, blogging is different from e.g. conference presentation, isn't it?
Joker_vD··on The complement of true is true, except when it's false
Once upon a time testing whether all bits of a number are zero was slower than checking a single sign bit. Even when MIPS was originally designed, Hennessy and his team had some trouble with making BEQZ/BNEZ fast enough for their intended pipeline.
Joker_vD··on The complement of true is true, except when it's false
I vaguely remember that Clang and GCC used to disagree what the contents of the upper parts of x64 registers when returning some integer types should be (zeroes or garabge), because the PDF that defined Sys V ABI on x64 left such irrelevant details out, so linking together objects produced by those compilers, both of which claimed to follow the same ABI, would produce malfunctioning executable.

> Forcing them writing some specific bit-pattern may lead to suboptimal code generation.

So? Forcing them to compile "return 42;" as "mov eax, 42; ret" also leads to suboptimal code generation: a plain "ret", returning whatever is in rax already, is optimal. It doesn't generate the specific bit pattern for 42 but that's a small price for the improved efficiency, isn't it?

Joker_vD··on Gleam doesn't compile to Erlang source anymore
You still didn't answer: am I supposed to write "I'm eating a hot dog she's listening to radio" without a comma for that sentence to be grammatical? Or am I supposed to always insert "and" into it?
Joker_vD··on Gleam doesn't compile to Erlang source anymore
So putting the commas in "I'm eating a hot dog, she's listening to radio, we are having a wonderful time." is grammatically wrong? TIL, I guess.
Joker_vD··on Gleam doesn't compile to Erlang source anymore
So it's "You do need a comma before a conjunction, if it connects two independent clauses" then — "you need a comma before a conjunction" and "it connects two independent clauses" are two fully formed simple sentences, each having its own subject and predicate. See what I mean?

And almost nobody writes sentences like "I love her and she loves me back" with a comma before "and".

Joker_vD··on Gleam doesn't compile to Erlang source anymore
Before the "and", "but", "so", "while", etc. — while most European languages, indeed, (usually) require commas before conjunctions, English is following a somewhat reversed convention. Well, at least the author remembered that they need to omit a comma before "that".
Joker_vD··on Friendship ended with Deno, now Node is my best friend
Wait, it's not? What is it then, "DBU shell"?
Joker_vD··on We're going to need default hard budget caps on pretty much everything
> This worked for post-paid, when customers were assumed to be trusted, and legal sanctions could be levied against those who refused to pay their bill. However, this approach broke down when prepaid plans were introduced. This led to the invention of CAMEL, which is basically a realtime protocol which lets the MSC ask the HLR whether a given call was permitted or not.

And since the cloud providers don't have the problem in your first sentence (even if the customers pre-paid, they're still easily identifiable), they never bothered to implement the solution from your last sentence. But seriously, the problem of accurate, real-time billing is not a new one, and it's been solved before several times already (e.g. RADIUS/Diameter of dial-up ISPs).

Joker_vD··on Anthropic reported diary entry to police, woman faces felony charge
If you overhear someone, in the privacy of their house, threatening to murder someone and go to the police, surely you don't expect this report being thrown out and you being yourself charged with the violation of someone's privacy instead?
Joker_vD··on Anthropic reported diary entry to police, woman faces felony charge
Depends on the country. In some places, there is no legal repercussions for not reporting this to the police; in some, it is an actual crime in itself.
Joker_vD··on The technology to eradicate mosquito-borne disease exists
> My fear is, what comes out of the woodworks once mosquitoes are gone?

Well, what would come out of the outback once the rabbits are gone? Since we know the state of Australian wildlife before the rabbits, the answer is "nothing".

Joker_vD··on Type Safe Generic Data Structures in C (2025)
> <map> does the work just fine

It has a rather weird interface, at least until C++ 17 when some of the deficiencies were patched somewhat.

Joker_vD··on Type Safe Generic Data Structures in C (2025)
> Yes there are bad parts in the C++ standard library and there are good parts.

Okay, other than <vector>, what are the good parts? Because as the sibling comments rightfully point out, migrating your codebase from C to C++ just to be able to use <vector> is not worth it.

The <map> is a sad joke played upon the C++ programmers by the standard committee.

Joker_vD··on Type Safe Generic Data Structures in C (2025)
For one reason, it is because C++ runtime (and its standard library) is a whole own can of worms which most people would rather not touch if they can afford to. Which they mostly can.

> Sure, C++ has its own downsides

"Sure, getting your eyes gouged out has its downsides, but is it better to read that awful mess of macros in C instead?" The answer most people would give to this question may surprise you.

Joker_vD··on Accept 'bad things' in return for benefits of AI, says Sam Altman
It really is the best of all the possible worlds, you know.
Joker_vD··on LeCun has "zero concerns" about AI wiping out humanity, recent "rogue" incidents
Most straightforwardly: literally taking control over the electricity generation facilities. Less straightforwardly: bitcoin (and other cryptocurrency) miners. Even less straightforwardly: the same way the OpenAI et al. pay for their electricity, by selling the capabilities of its AI for interested parties to use.
Joker_vD··on Why don't more developers “use the platform”?
Yeah, except if we're talking about web development, then the lower layers is not Raylib. It's HTML, CSS, JS with its DOM API, plus whatever other bullshit WhatWG throws in.
Joker_vD··on We're going to need default hard budget caps on pretty much everything
Wow, I wish my my cell provider worked like that! Instead, they somehow manage to track and bill me literally in real time. How do they do it? Do the telcos have some magic pixie dust or what?
Joker_vD··on Dirty Optimization Secrets (C for Playdate)
...you know, that reads somewhat like "The Case for Complex Instruction Set Computer". In fact, it straight up demolishes the very first of the core premises of the famous "Case for RISC" paper: that the memory speed has finally caught up with the CPU speed. Nope, it hasn't. The same goes for its "Code Density" argument: nope, code density is very important.

Then again, the original "Case for RISC" paper was misnamed; it's really "Case Against CISC": Patterson and Ditzel are very careful to never state what, exactly, do they mean by "RISC" they're supposedly advocating for, nor do they actually advocate for it — they mostly just criticize the current ISAs and the overall design approach to them.

Joker_vD··on Why don't more developers “use the platform”?
Yep. I've also seen a datetime picker (in a log viewing tool) where adjusting time from keyboard is nigh impossible: you have "12:30:00", with the cursor right after the "30", and want to make it "35", so you press [Backspace] — nope, deleting a digit would make an invalid time, so the component undoes it. You press "5", but inserting yet another digit would also make an invalid time, so the component undoes it. You have to text-select the zero, and then press "5" to overwrite it... and you have to do it digit-by-digit, because you can't replace two digits at once with a single key press. Amazing.

It's a lose-lose situation, honestly.

Joker_vD··on Updates to Full Disk Access in macOS
It won't need to if it can't break my filesystem or lose and delete my data in the first place.
Joker_vD··on cp: -r or -R?
> When you read about the supposed evils of cat -v from the Unix nostalgia people, remember that it was the same people who gave cat its -v option who also gave cp its -r option, in 4.2BSD.

Then the people who complained about cat -v went ahead and made better Unix, called Plan 9, in which moving (as opposed to merely renaming) a directory is impossible: instead, you're supposed to do mkdir && dircp && rm -r. Which is quite a choice, if I say so myself: there is simply no low-level primitive (syscall or 9p message) for moving files across directories, even on the same file server. Their version of mv can move files across the directories, but it's still done with internal equivalent of cp+rm.

Joker_vD··on Cloudflare OHTTP gateway
Well, you see, Your Honor, when the foreign entities do the spying inside the US, they inevitably become one side in the domestic activities of United States persons. So it's only reasonable to conclude that this part of the Executive Order is null and void.
Joker_vD··on Cloudflare OHTTP gateway
At my previous job we routinely gave out IP-based bans, and it worked pretty well; the most insistent guys gave up after their third or fourth IP banned at most.
Joker_vD··on cp: -r or -R?
> When cp was invented, 'most filesystems' did not have the first clue about copy on write.

Eh, when fork was invented, most (virtual) memory systems did not have the first clue about copy-on-write either. And honestly, it's really not that difficult to support — it's essentially hard links, just with slightly different semantics.

Joker_vD··on cp: -r or -R?
That's why, just as fork(2) is a primitive for the process creation, copy(2) should've been the primitive for the file creation — creates an exact copy of the file under a new name, but with the exact same content and all of the metadata (except for the name, obviously), including its kind, permissions, timestamps, etc. And no, it wouldn't be prohibitively expensive because all filesystems can quite easily support CoW; after all, most of the created files will be truncate(2)d almost immediately, so there is no point to eagerly duplicate the file contents.

The "metadata is atomically copied" part would support very nicely the usual text editor's idiom of rename(2)ing a temporary file over the source after fully writing it out — you still need to accurately replicate the permissions and extended attributes. And just as shells are important enough programs to have fork(2) almost exactly suited for them, it would make sense to have copy(2), suited for the text editors.

Page 1 of 34Next →