HNHacker News
TopNewBestAskShowJobs

ayende

896 karma · joined July 12, 2016

submissionscomments
ayende··on Designing APIs for Agents
> Defaults are bad. Agents can be expected to read the documentation, register what good starting values are, and fill them all in, in place.

That is pretty bad, when you now need to look at this code, and you have 95% of the output being craft, but sometimes it isn't, and you need to understand the difference between each.

A great example of that is:

    int fd = open("log.txt", O_RDONLY);

Versus:

    // 1. Manually build and initialize the Security Attributes structure
    SECURITY_ATTRIBUTES sa;
    sa.nLength = sizeof(SECURITY_ATTRIBUTES);
    sa.lpSecurityDescriptor = NULL; // Explicitly no custom security descriptor (inherits default)
    sa.bInheritHandle = FALSE;       // Explicitly state this handle cannot be inherited by child processes

    // 2. We need a handle for the template file parameter. 
    // Win32 requires this to be an active file handle opened with GENERIC_READ, or explicitly INVALID_HANDLE_VALUE.
    HANDLE hTemplateFile = INVALID_HANDLE_VALUE; 

    // 3. Now we call CreateFile with every single parameter fully populated
    HANDLE hFile = CreateFile(
        "log.txt",                 // 1. lpFileName: The file we want to open
        GENERIC_READ,              // 2. dwDesiredAccess: Read-only access
        FILE_SHARE_READ,           // 3. dwShareMode: Prevents any other process from writing to it
        &sa,                       // 4. lpSecurityAttributes: Pointer to our explicitly defined struct
        OPEN_EXISTING,             // 5. dwCreationDisposition: Only open if it already exists
        FILE_ATTRIBUTE_NORMAL,     // 6. dwFlagsAndAttributes: Normal file, no special caching or async flags
        hTemplateFile              // 7. hTemplateFile: Passing our explicit invalid handle instead of NULL
    );
An agent can output the second just as well, sure. However... which one do you think is better to read or understand?

Did you catch the fact that this is blocking concurrent writers? Or that we expected the file to exist?

Or what about:

    HFONT hFont = CreateFont(
        12, 0, 0, 0, FW_NORMAL, TRUE, FALSE, FALSE, 
        DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, 
        DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial"
    );
Versus:

    const char* fontPath = "/usr/share/fonts/truetype/msttcorefonts/arial.ttf";
    FT_New_Face(library, fontPath, 0, &face);
    FT_Set_Pixel_Sizes(face, 0,16  );
Same thing, but actually understanding what is going on is orders of magnitude different.
ayende··on Anthropic is expanding to Colossus2. Will use GB200
Nevertheless, you are still talking about 15B / year - when the initial investment was < 30B. That investment also probably covers things like power, salaries, etc.

So you are still covering all of that.

ayende··on What Does a Database for SSDs Look Like?
All financial systems don't care about time.

Prety much all financial transactions are settled with a given date, not instantly. Go sell some stocks, it takes 2 days to actually settle. (May be hidden by your provider, but that how it works).

For that matter, the ultimate in BASE for financial transactions is the humble check.

That is a great example of "money out" that will only be settled at some time in the future.

There is a reason there is this notion of a "business day" and re-processing transactions that arrived out of order.

ayende··on What Does a Database for SSDs Look Like?
Committing to NVMe drive properly is really costly. I'm talking using O_DIRECT | OSYNC or fsync here. Can be in the order of whole milliseconds, easily. And it is much worse if you are using cloud systems.
ayende··on Rust GCC backend: Why and how
Isn't that very much intentional on the part of GCC?
ayende··on Indexing 100M vectors in 20 minutes on PostgreSQL with 12GB RAM
That suffer from a serious issue

You must have the data upfront, you cannot build this in an incremental fashion

There is also bo mention on how this would handle updates, and from the description, even if updates are possible, this will degrade over time, requiring new indexing batch

ayende··on Why is Zig so cool?
Not this is explicitly marked as Not Planned
ayende··on The Case Against PGVector
> maintenance_work_mem

That kills the indexing process, you cannot let it run with limited amount of memory.

> How do you think a B+tree gets updated?

In a B+Tree, you need to touch log H of the pages. In HNSW graph - you need to touch literally thousands of vectors once your graph gets big enough.

ayende··on Linux VM without VM software – User Mode Linux
Probably avoid zero write optimizations. This force actual allocation of disk space for the data, instead of pretending to do so.
ayende··on AWS Service Availability Updates
Amazon Glacier on the list is a pretty big surprise to me.
ayende··on The email they shouldn't have read
That isn't spying. That is called doing code review on a shared depenendcy
ayende··on Improved Gemini 2.5 Flash and Flash-Lite
OpenAI, Ollama, DeepSeek all do that.

And wanting to programmatically work with the result + allow tool calls is super common.

ayende··on Rails on SQLite: new ways to cause outages
Even with very small number of requests - what happens when you have two concurrent ones?
ayende··on io_uring is faster than mmap
This is wrong, because your mmap code is being stalled for page faults (including soft page faults that you have when the data is in memory, but not mapped to your process).

The io_uring code looks like it is doing all the fetch work in the background (with 6 threads), then just handing the completed buffers to the counter.

Do the same with 6 threads that would first read the first byte on each page and then hand that page section to the counter, you'll find similar performance.

And you can use both madvice / huge pages to control the mmap behavior

ayende··on How many HTTP requests/second can a single machine handle? (2024)
Another way to do that is to look at the tech empower benchmarks. It tests on big machines, but you can get > 1 M req/sec across a wide variety of environments.
ayende··on AI models need a virtual machine
That is the wrong abstraction to think at. The problem is not _which_ tools you give the LLM, the problem is what action it can do.

For example, in the book-a-ticket scenario - I want it to be able to check a few websites to compare prices, and I want it to be able to pay for me.

I don't want it to decide to send me to a 37 hour trip with three stops because it is 3$ cheaper.

Alternatively, I want to be able to lookup my benefits status, but the LLM should physically not be able to provide me any details about the benefits status of my coworkers.

That is the _same_ tool cool, but in a different scope.

For that matter, if I'm in HR - I _should_ be able to look at the benefits status of employees that I am responsible for, of course, but that creates an audit log, etc.

In other words, it isn't the action that matters, but what is the intent.

LLM should be placed in the same box as the user it is acting on-behalf-of.

ayende··on Buypass discontinues issuance of TLS/SSL certificates
FWIW, I once got a cease and desist letter because "company-xyz" found that we were using a subdomain "company-xyz.customers.our-service.com".

They discovered that because they were monitoring the CT logs. And they were concerned about trademark issues. It ended up being one of the teams in "company-xyz" that had opened an account (under the company name, of course).

But that is just a small note that people _are_ monitoring those.

ayende··on Buypass discontinues issuance of TLS/SSL certificates
If you are checking the cert logs, it is a very tiny bit to validate the key as well. If you aren't checking... well, that isn't a concern anyway, now is it?

And the whole _point_ of the cert transparency log is that it only take _one_ such instance to ruin the credibility of a CA.

The fact that you do that in the public, and that it is _forever_, make it very hard to do in the shadows.

ayende··on Buypass discontinues issuance of TLS/SSL certificates
Sure you can, you know what your public key _should_ look like
ayende··on Lessons learned from implementing SIMD-accelerated algorithms in pure Rust
One thing that is ignored here is that for crypto, there are additional concerns

For example, are the instructions cost depend on the data? If so, you have a timing leak and a hole in your system

One of the reasons to use assembly is specifically to avoid timing dependency and the compiler being "smart" about things and thus leading to timing attacks

ayende··on AccountingBench: Evaluating LLMs on real long-horizon business tasks
Human accountants also have a very important property: liability.

If a certified accountant told me to do X, I'm covered (at least to the point they would assist in recovering, or I can get compensation through their insurance). If LLM tells me, I'm in a bigger problem.

ayende··on Why English doesn't use accents
French was the lingua franca for a very long time (pun intended)
ayende··on AI Saved My Company from a 2-Year Litigation Nightmare
The interesting question - if the AI is provided via my lawyer's office - is there privilege in this case?
ayende··on Why I no longer have an old-school cert on my HTTPS site
Too likely that this would not work because silent conversion to number along the way
ayende··on Problems with the heap
In most scenarios, you are no longer running with multiple users on the same machine. Either this is a server, which has an admin team, or a client machine, which _usually_ have a single user.

That isn't 100% true, and local privilege escalation matters, but it is a far cry from remote code execution or remote privilege escalation.

ayende··on The Defer Technical Specification: It Is Time
That is a well structure system, yes Both cleanup for error and allocation happens in the same place

That means you won't forget to call it, and the success flag is an obvious way to ha dle it

ayende··on Ask HN: Alternatives to Vector DB?
Starting in v7.0, ravendb has ve tor search and ai integration Run on windows , linux and mac
ayende··on Why Go?
C# has both of those capabilities and more The answer doesn't make sense
ayende··on Chrome Returns 206 when the Server Returns 403
Chrome gives you what data it has, and you are expected to issue the next request to get the rest of the data.

Consider a read() call in Linux if you ask to read 16kb and the cache has 4kb page ready, it may give you that.

You'll need another call to get the rest, and if there is a bad disk sector, that first read() may bot notice that

ayende··on Why HNSW is not the answer and disk-based alternatives might be more practical
The problem with IVF is that you need to find the right centroids. And that doesn't work well if your data grow and mutate over time.

Splitting a centroid is a pretty complex issue.

As are clustering in an area. For example, let's assume that you hold StackOverflow questions & answers. Now you have a massive amount of additional data (> 25% of the existing dataset) that talks about Rust.

You either need to re-calculate the centroids globally, or find a good way to split.

The posting list are easy to use, but if you are unbalanced, it gets really bad.

Page 1 of 6Next →