HNHacker News
TopNewBestAskShowJobs

ncruces

2,574 karma · joined May 25, 2023

https://github.com/ncruces
submissionscomments
ncruces··on I rewrote PostHog's SQL parser, 70x faster, while barely looking at the code
This is a good point.

If we don't care about inspecting the output, why don't we just replace the Rust compiler with something that generates assembly from Rust source, and then cross check the output with a few million random Rust programs?

ncruces··on I rewrote PostHog's SQL parser, 70x faster, while barely looking at the code
You have a grammar file in a formal language, and want to generate a faster parser in another formal language.

What's wrong with the source language that it's better to use a sufficiently smart random code generator for the target language, and then fuzz the hell out of the output of it until it behaves the same as the slow translated code, than to create a sufficiently smart compiler from the source to target languages?

I mean this sounds like if we replaced GCC with a really smart random assembly generator and a fuzzer for the output.

ncruces··on Open Source for IBM Z and LinuxONE
But as long as I'm on GitHub, it's much easier to just add this (and the RISE RISC-V runners, and a few QEMU targets) to CI.

PS: I do also test NetBSD in CI.

ncruces··on Open Source for IBM Z and LinuxONE
> So besides the bragging rights (I guess?) and discovering latent bugs exposed by the exotic architecture, what's in it for a project to deal with this extra architecture

I submitted the story, and I'm mentioned in it.

For me, it's about demonstrating my stuff runs everywhere Go does.

In particular, this makes s390x the only bigendian architecture I can test on "actual hardware" (vs. QEMU binfmt emulation).

ncruces··on Crypto in 2026: Oh, This Is the Bad Place
Possibly? Yes. But for every Argentina, there's 10 other countries where you'd loose (far more than) 40% to social security, taxes, and middleman that will handle all the paperwork for for you, particularly if we are talking about "real, productive swe jobs [that] earn enough to support not only themselves, but everyone around them as well making the place they live in a tiny bit better."

I basically have one such job, living in a stable but bottom of the table EU economy, and 40% is exactly the ballpark.

People love to rationalize tax evasion like that.

ncruces··on Steam Machine launches today
You've proposed that N times already.

Brands could do that - or an approximation of that by having an higher launch prize for the initial batch - yet they mostly don't.

Maybe the intent here is not keeping difference to themselves, and there's more brand value in not profiting from supply constraints, while being perceived as doing something about mass scalping.

Since most brands don't seem to agree with you, and if you just feel like you should be able to use your extra money to get lucky, you can still try to convince one of the lucky ones. I guess the few who might take it to eBay will charge even more for the privilege.

Not everything needs to be about efficient markets.

ncruces··on British Columbia, Time Zones, and Postgres
I encountered it when I was design the scheduling back-office for a LED video wall a few years ago when those became economical for a shop to own and run 24/7.

The customer probably never noticed if I even did it “correctly” or couldn't be bothered if I didn't, but I remember I was bothered by it: (1) ensuring continuity of programming during the gap when it jumps forward (2) solving the ambiguity when it went backwards.

Because obviously they wanted to think in local time.

ncruces··on British Columbia, Time Zones, and Postgres
This strategy fails for appointments during that hour where the clock goes back: they are ambiguous, can refer to two different moments in time.

That caveat aside: good.

ncruces··on British Columbia, Time Zones, and Postgres
The post is for the otherworldly magician who wrote your library then.
ncruces··on Is AI ruining our skills? Early results are in – and they're not good
I wish I could've one shoted this 200 LoC PR: https://github.com/ncruces/wasm2go/pull/42/changes#diff-5181...

I'd really like to know the prompt, because I did try and, this took me way too long to figure out.

ncruces··on Swiss parliament lifts ban on new nuclear power plants
German Greens have managed the feat of presiding over extending strip coal while closing nuclear power plants. But hey, they fought for it since the 70s, and finally won; we all lost.
ncruces··on AI demands more engineering discipline. Not less
I just spent a week reviewing this ~200 LoC PR: https://github.com/ncruces/wasm2go/pull/37

It was submitted by a seasoned user, who probably asked a frontier LLM. It still felt… wrong. I didn't understand it, and I wouldn't merge it without understanding it.

I also suspected it was wrong, in a way that would cause issues in the future.

So I reviewed it 4 different ways: (1) try to understand/improve it; (2) do it with better algorithms; (3) avoid it by fixing the issue upstream; (4) rewrite it from scratch probably just to match my brain.

I expected either (2) or (3) would be the answer. (2) didn't work, rather it's the correct answer but I need to redo the project from scratch to use it; (3) I wanted really bad to work, but didn't.

So I got to a blend of (1) and (4). I'm still not entirely convinced, but now I understand the issue/solution. I obviously think my approach is better.

Still, I still stripped both of comments, and asked my LLM to review.

The LLM came back and said the original one was clearly better. I explained why not, it then answered I was correct.

If I try it with comments, LLMs say the mine is better. Because I found a real issue (one that I pointed at in the original comment thread). But is it saying mine is better because I coerced it to say so?

ncruces··on Global density and biomass of arbuscular mycorrhizal fungal networks
Maps here: https://a-hidden-infrastructure.spun.earth/map
ncruces··on What it feels like to work with Mythos
You'll just shift complexity to the orchestration of the modular components.

Monoliths vs micro-services.

ncruces··on Ask HN: What are tools you have made for yourself since the advent of AI?
I built wasm2go, which I had meant to for some time but was a gargantuan task to get into a good enough shape to test if it was a good idea.

I think it was (a good idea), and AI made it easier for sure.

https://github.com/ncruces/wasm2go

ncruces··on How much do amd64 microarchitecture levels help in Go?
The last level is simply unused at this time.

https://go.dev/wiki/MinimumRequirements#:~:text=The%20Go%20t...

ncruces··on Confidential submission of draft S-1 to the SEC
> The OpenAI Foundation also exclusively appoints the board of the OpenAI Group PBC and can replace directors at any time.

Isn't it hard to write this with a straight face?

ncruces··on Dopamine Fracking
Also I'm not sure either is "bad for society" in the way that's implied.

Rentable scooters/bikes being dumped everywhere by idiots is an issue, but parked in city approved places they're a boon.

They can make transit incredibly more useful for thousands of people in slightly less dense places.

The nearest subway to me is 2km away. It's much nicer to be able to rent a scooter for 5min than having to take it with me for the whole ride, or have it locked to a pole with 100s others.

As for Waymo I dunno if a vehicle the size of a car just driverless is the answer to mobility issues, but anything that reduces the number of moving and parked cars in cities is a win in my book.

ncruces··on sqlite: A CGo-free port of SQLite/SQLite3
There's also my take on this [1], which does machine translation from C to Go via Wasm using [2].

It's a somewhat less faithful translation, since I manually ported the VFS (SQLite OS abstraction layer).

OTOH, each SQLite connection is sandboxed (can't access/corrupt Go memory, or other SQLite connections). And it should run everywhere Go runs.

1: https://github.com/ncruces/go-sqlite3

2: https://github.com/ncruces/wasm2go

ncruces··on S&P 500 rejects SpaceX, also blocking entry for OpenAI and Anthropic
So the funds will have to buy within 10 days of the IPO.

But I assume at least it's based on the free-float market cap?

ncruces··on S&P 500 rejects SpaceX, also blocking entry for OpenAI and Anthropic
Anyone knows what MSCI World will do?
ncruces··on Redis 8.8: New array data structure, rate limiter, performance improvements
Redka can be used embed, in Go: https://github.com/nalgeon/redka
ncruces··on Changing how we develop Ladybird
Precisely. In the case of OSS it makes no sense for maintainers to spend more time reviewing AI generated code than contributors spent prompt engineering it. That's just not helpful.
ncruces··on Mornings and nights no longer exist at 47C: A day in the hottest place in India
Writing about "the wealthy" on a site like HN is always interesting.

Who do you mean?

The vast majority of HN commenters are 10%ers and very many are 1%ers.

But there's always someone richer to complain about.

ncruces··on Every Byte Matters
Or, another name for the same thing columnar: storage vs. row storage.
ncruces··on Please Do Not Vibe Fuck Up This Software
Taken at face value, most commit descriptions mention adding - not skipping - tests and assertions.

So basically, we're all in our high horses, not reviewing code, scalding the unpaid maintainer for … not reviewing code.

Time for - whoever actually cares - to do better.

ncruces··on Domain expertise has always been the real moat
Knowing the correct answer to one million instances of a+b, and validating this, does not guarantee that an oracle will use the + operation that's correct over a domain billions of times larger, which you can't exhaustively check.

In the past few months, I've used agents to brute force and reverse engineer solutions to problems I would never have economically have figured out on my own. I did it by putting agents in loops, connected to hardware and the internet, reading technical documentation, and relentlessly trying.

The code was shit. But it's much better to start with working shit and make it correct than spend weeks frustrated that nothing works.

I get that being a domain expert and instantly knowing the output is shit is important, but even if the output looks great, the code can be shit, and it takes looking at the code and knowing something about it to figure that out.

The solution to shit output is not (always, sometimes it is) just another if statement.

Even in a very well specified OSS effort, where I have some expertise, and I carefully reviewed the AI's output every goddamn step of the way, bugs slip through that the agents confidently tell me can't happen, and when shown proof they… add just another if, instead of really questioning assumptions.

You either know what you're doing, or you don't.

ncruces··on Go: Support for Generic Methods
Do you understand the difference between generics and generic methods?

We already had generics when they wrote "we don't anticipate adding generic methods."

ncruces··on Go: Support for Generic Methods
I didn't see anything beyond "this doesn't prevent us from doing it" yet.

Did you?

ncruces··on Go: Support for Generic Methods
To be replaced by the surprise when you figure out these methods don't implement interfaces.

Still, in this case, half the feature is better than none at all, IMO.

← PreviousPage 5 of 34Next →