Better HN
topnewbestaskshowjobs
Log inSign up

larsnystrom

763 karma · joined Jun 1, 2016 (10y ago) · 152 submissions

Submissions

comment 2w ago · link · parent

Why haven’t they asked an AI agent to fix all their bugs yet? /s

comment 3mo ago · link · parent

Don’t let perfect be the enemy of good. As you said, Ireland might comply, which would’ve solved this particular issue.

comment 3mo ago · link · parent

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 3mo ago · link · parent

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 4mo ago · link · parent

I assume that’s why Altman wants the government as a co-owner.

comment 5mo ago · link · parent

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 5mo ago · link · parent

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 5mo ago · link · parent

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 5mo ago · link · parent

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 5mo ago · link · parent

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 6mo ago · link · parent

Just use array_values() and suddenly you can use int indicies again.

comment 6mo ago · link · parent

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 6mo ago · link · parent

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 6mo ago · link · parent

I don’t think AI demand is driven by consumers.

comment 6mo ago · link · parent

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 6mo ago · link · parent

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.

comment 6mo ago · link · parent

I don’t understand how dealing with numbers correctly is not a solved problem in computer engineering by now.

comment 7mo ago · link · parent

I remember now what the problem was. I was instantiating a new ArrayList in a loop. The solution to the performance issue was to use a Vector instead. I was used to just writing PHP arrays when I wanted a list of something, and since they’re dynamically sized I thought the analogue in Java was ArrayList, which is also dynamically sized. But somehow that was extremely unperformant in Java.

comment 8mo ago · link · parent

I remember writing Java for our introductory programming course at university around 2010. I was already familiar with object oriented programming in PHP at the time, so I just wrote the Java code like I would write PHP. I was absolutely astounded at the poor performance of the Java app. I asked one of our tutors and I can still remember him looking at the code and saying something along the lines of ”oh, you’re instantiating objects in a loop, that’s obviously going to be slow”. Like, what? If I can do this performantly in freakin PHP, how can Java, the flagship of OOP, not have fast instantiation of objects? I’m still shaking my head thinking about it.

comment 8mo ago · link · parent

Maybe I’m just dense, but it says the fs module is fully supported, so what happens when I try to read a file from disk if the app is fully sandboxed?

comment 8mo ago · link · parent

I can really relate to this. At the same time I’m not convinced cycle time always trumps throughput. Context switching is bad, and one solution to it is time boxing, which basically means there will be some wait time until the next box of time where the work is picked up. Doing time boxing properly lowers context switching, increases throughput but also increases latency (cycle time). It’s a trade-off. But of course maybe time boxing isn’t the best solution to the problem of context switching, maybe it’s possible to figure out a way to have the cookie and eat it. And maybe different circumstances require a different balance between latency and throughput.

comment 8mo ago · link · parent

WASM is kind of like Java bytecode, right? A compilation target which requires a runtime? But better sandboxed?

comment 9mo ago · link · parent

It’s still possible to order new and original parts for SAAB models, almost 20 years after they went under. The spare parts are made by a separate company which is still going.

comment 9mo ago · link · parent

Human eyes are much better than cameras at dealing with dynamic range. They’re also attached to a super-computer which has been continuously trained for many years to determine distances and classify objects.

comment 9mo ago · link · parent

There seems to be a huge business opportunity in Europe right now, to sell support and customization of open source software to government players. Has anyone heard about a European company that’s been successful in this area?

comment 1y ago · link · parent

On the other hand, many things attributed to chance are actually the aggregate effect of other people's choices. If we make choices based on not just what's best for ourselves but what's best for all of us, we will all suddenly become more "lucky". And vice versa, if we only think about ourselves that luck will diminish.

comment 1y ago · link · parent

And AFAIK there is still no upload progress with fetch.

comment 1y ago · link · parent

Nice to only have to push the layers that changed. For me it's been enough to just do "docker save my-image | ssh host 'docker load'" but I don't push images very often so for me it's fine to push all layers every time.

comment 1y ago · link · parent

Yes, it is because of NATO. They've been thinking about it for some time, but NATO tipped the scales.

comment 1y ago · link · parent

Please do share some links to these events, because this is the first I hear of it.
123456