HNHacker News
TopNewBestAskShowJobs

Joker_vD

7,430 karma · joined December 26, 2019

submissionscomments
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.

Joker_vD··on Cloudflare OHTTP gateway
Of course it's not a CIA operation — that agency is foreign intelligence agency. The domestic intelligence agency is called NSA.
Joker_vD··on Why should I have to pay more for buses if I don't use a smartphone?
To give discounts for cash or for the payment processors to charge above 0% from the sellers?
Joker_vD··on Cloudflare OHTTP gateway
Hm. Interesting. I wonder how you would add "banning abusers by IP" functionality to it though — you first need to identify the abuse somehow and then link it to the originating IP (or any other kind of identifier)...
Joker_vD··on Various Projects Find Hidden SDR Capabilities in ESP32 Microcontrollers
And illegally entering Mexican immigrants too, yes. In practice, neither seems particularly effective.
Joker_vD··on Effective altruism is this century's biggest idea
The basic idea of EA is that if you want to spend money on improving something, you probably would want to spend it as efficiently as possible because your budget isn't infinite. "Getting the biggest bang for your buck", as the say. Spending millions on a specific way to solve a certain problem when it can be solved in a different way for mere thousands is plain silly. Of course, this idea isn't new at all.

The main problem with the charity from the ultra-wealthy, of course, is that they first materially worsen the world in order to get that wealth, and then they use part of that wealth to partially undo the damage (breaking things is easier than fixing them, after all). Like trying to help to alleviate Africa's problems with clean water when your own mining megacorporation is one of the major drivers of the pollution in the first place.

Joker_vD··on How to speed up the Rust compiler in September 2026
> the fact that the article talks about "speeding up" the rust compiler doesn't automatically mean that the compiler is "slow"

Well, if it weren't "slow" for some definition of "slow", nobody would bother speeding it up, would they?

Joker_vD··on Dear Software Makers
By observing their actual behaviour. It's notoriously different from what people claim their behaviour is.
Joker_vD··on Solving Factorio Quality
> Factorio feels less like a game and more like managing a complex software architecture.

There is literally a mod [0] for integrating Factorio with Grafana. Yep.

[0] https://github.com/remijouannet/graftorio2

Joker_vD··on Needed 1+1, built a functional programming language
> The thing is, all of our nodes are pointing to each other inside this memory block. When we realloc it with an increased size, it might get moved to a new memory address. Completely breaking all of our pointers and causing a segfault! How do we tackle this problem?

Store indices into the arena array? You could probably even use 4-byte indices and cut down the memory usage...

> Fib(40) literally took 12+ GIGABYTES before hitting an OOM and crashing. Why? Because it spawns approximately 1.3 Billion nodes.

Okay, maybe you can keep 8-byte indices.

> The mark-and-sweep garbage collector we just completed is a stop-the-world garbage collector. And the algorithm we’re running is inherently exponential.

How about a copying collector then? The recursive Fibonacci generates a lot of garbage but IIRC its live set is actually pretty small at any single point of time. If you need a benchmark for GC when your function actually has a huge live set, then something like

    def garbage(n):
        if n == 0:
            return None
        return (garbage(n-1), garbage(n-1))
should do the trick; if you don't have proper data structure you can simulate it with closures pretty trivially.

> And we can do something about how we’re evaluating fib itself

You mean "switch from recursively walking AST" or "write a non-exponential Fibonacci"?

Joker_vD··on Responsible Release of AI-Generated Mathematics
They literally are though.

> you might as well have tried to make a comparison between math and nude pictures of the President.

The latter is but a very large number, interpreted in a particular way. Have you heard of "illegal numbers"? Yeah, apparently they exist. That damn state, treading on literally everything that humans might do as if it's any of its business.

← PreviousPage 2 of 34Next →