Recent submissions

Comment · 2 months ago
Don’t let perfect be the enemy of good. As you said, Ireland might comply, which would’ve solved this particular issue.
Comment · 2 months ago
If they put an ID on a sanction list, there’s a possibility to verify it. They could verify that it actually belongs to the person they want to sanction before putting it on the list. Failing that, the actual person can prove that they don’t belong on the list by verifying their identity.

Verifying identity is a much simpler problem than establishing identity.

Comment · 2 months ago
You’re talking about different things. Sweden has personal identity numbers and they’re public information. It protects you from being mixed up with someone with the same name. Not from identity theft though.
Comment · 4 months ago
I assume that’s why Altman wants the government as a co-owner.
Comment · 4 months ago
I’ve only used Opus in GitHub copilot and was hugely underwhelmed. It was barely usable. Are you saying it’s better with the official Anthropic tools?
Comment · 4 months ago
Sure, from a theoretical perspective, but in practice there’s got to be some sort of order at some point even when storing timespans.
Comment · 4 months ago
You could also make the price column nullable and just insert a row with price null and the date from which there should be no price.
Comment · 4 months ago
Why are they storing a time period (start and end date) in the first example? Why not just store the date when the price comes into effect? That would make both overlaps and time travel impossible without using any constraints.
Comment · 5 months ago
By that logic VPNs and many other technical solutions are also not solving technical problems, since it is theoretically possible to achieve the same results by other means.
Comment · 5 months ago
Just use array_values() and suddenly you can use int indicies again.
Comment · 5 months ago
Yeah, at the moment we use arrays as anonymous objects and phpdoc+phpstan to verify the types, but I want it in the language. PHP already supports intersection and union types, it really feels like just skipping the naming part and going all in on structural typing is not that far fetched by now.
Comment · 5 months ago
I've been writing PHP for 20 years now. It's my bread and butter.

The one thing I really wish PHP would add is structurally typed objects. I really miss it when moving back and forth between PHP and TypeScript.

They could call them anonymous objects if they want to (that would be a more culturally correct analogue to anonymous classes).

Like, I wish it was possible to do

  {
    string $mystring = $myvar,
  }
and have it be equivalent to

  new class($myvar) {
    public function __construct(
      readonly public string $mystring,
    ) {}
  }
and then be able to typehint it like

  function ({ string $mystring } $myobj) {
    echo $myobj->mystring;
  }
and honestly, why not go all the way and allow type definitions/aliases, something like

  type myobj_type = { string $mystring };
That'd be great.
Comment · 5 months ago
I don’t think AI demand is driven by consumers.
Comment · 6 months ago
What a great blog post! I have wanted to do rootless docker with subuids, but putting it all together like you have is not easy. Thank you for writing it down!
Comment · 6 months ago
My comment was a bit tongue in cheek. Obviously it is a hard problem. But in a profession where we work with machines that literally were made to crunch numbers, and where abstraction is something we deal with daily, why can’t we have a performant abstraction for doing arbitrary calculations? The answer is that to be performant it must be solved in hardware, which would cost more than the hardware we have.

So in fact it is not just telling me it’s a hard problem, it’s telling me that the cost-benefit is still not there. It’s like it’s just not a very important problem (in an economic sense). And that is what surprises me, given that computers were made to do arbitrary calculations.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton