HNHacker News
TopNewBestAskShowJobs

hansvm

5,672 karma · joined December 22, 2019

submissionscomments
hansvm··on If AI writes your code, why use Python?
Except the presence of errors, mistakes, contradictions, and doubling-back causes LLMs to have substantially worse output, especially without dedicated sub-agents who have been instructed about that deficiency and know to process that kind of crap into better prompts to insert into a different LLM with pristine, error-free context. Without hard numbers we're both just pissing into the wind, but it's entirely plausible that the higher rate of errors matters more than the fact that those errors are more ergonomic. Anecdotally, my LLM work is a _lot_ more productive when I have it draft the thing in Python and translate it into Rust since it wastes so much time on the tiniest of syntactic mistakes.
hansvm··on Library for fast mapping of Java records to native memory
Ha, I wrote something like this ages ago when I had to interact with a Java application and really wanted/needed Python utilities. I created my own concurrent, type-safe DDL to shepherd that data.
hansvm··on Building a web server in aarch64 assembly to give my life (a lack of) meaning
Today's state of the art compilers can't even do vectorized integer division by a compile time known constant very well. They definitely can't map high-level constructs onto low-level patterns, and they don't carry anywhere near enough semantic information through the different optimization passes to be able to take even very safe, simple, sane shortcuts with zero possibility of UB or other issues. There's a lot of performance being left on the table.

Mind you, somebody who's sympathetic to the machine's needs can easily scrape most of that performance back by writing C/C++/Zig in a way that easily maps to the optimal assembly. The optimizer won't make your code drastically worse too often, so if you start with something nice then actually dropping down into assembly has limited use cases and usually limited benefits...if you know what you're doing and throw out every style guide as you do so.

As to this server in particular? At first blush it looks more like a learning exercise. You'll go a lot further with clever incremental routines and appropriately leveraging your OS's async API than you will by shaving a few instructions here and there.

As to servers in general? Your kernel is the real bottleneck. If you need all of its features then you don't have a lot of options, but if you're like most applications then you're leaving a ton of performance on the floor not going for kernel bypass (not that using your kernel for network is a _bad_ decision, but you are nevertheless incurring a 10x-50x performance hit as the cost). Assembly shenanigans literally don't matter in comparison.

hansvm··on Fake building: Claude wrote 3k lines instead of import pywikibot
On the other hand, I often want an LLM to write things from scratch instead of bringing in 10x the surface area in unnecessary dependencies, and I very, very rarely get better results when these things are let loose on a cesspool of a web. Given that real people have vastly different preferences, you either have to cater to a subset or else require everyone to be a bit more specific with their desires. It's not that surprising.
hansvm··on Production engineering when trading billions of dollars a day [video]
> so much more out of the same 24 hours

Do they? Are they doing more work, or is the set of things they've chosen to be good at more stereotypically impressive than the set of things you've chosen to be good at?

> all the worldly churn

Surely all of that adds up to <1hr/day (assuming exercise does double-duty with other intellectual activities and general unwinding)? You could work a pretty intense schedule and still have plenty of time for personal development with that level of overhead, so long as you actually stuck with it and got everything done.

> food prep and washing

I'd be curious to hear more about what this looks like for you. I might have ideas.

hansvm··on Mythical Man Month
I haven't yet seen anyone with a concrete example project (public ideally, but even describing private efforts in enough detail to enable potential criticism would be fine) making a claim as strong as 10x. Are you willing to break the mould and show us what we're all missing?
hansvm··on Google Cloud Fraud Defence is just WEI repackaged
Qutebrowser is my favorite daily driver, save for a few sites I can't boycott and which need Firefox or something.
hansvm··on Canvas online again as ShinyHunters threatens to leak schools’ data
Most jobs I've had didn't care about a transcript in the slightest. It matters for future education and a small selection of jobs, and even them a few pass/fail courses won't cause any issues. It's not great if important, major-specific coursework is pass/fail, but usually you're not allowed to do that, so when it does come up you'll just have somebody ask what absurd situation (like this canvas thing) caused it.
hansvm··on Agents can now create Cloudflare accounts, buy domains, and deploy
About goddamn time. The recent past consisted of discord blocking me because their telemetry was broken and exceeded their rate limit and target blocking me because two devices in a single household look really suspicious.
hansvm··on Three Inverse Laws of AI
I would've been in several fewer wrecks if humans properly stopped at lights.
hansvm··on Google Chrome silently installs a 4 GB AI model on your device without consent
That's timely. I had been thinking of trying Chrome out again, but it looks like it's in my interests to remain fully de-Googled.
hansvm··on What I'm Hearing About Cognitive Debt (So Far)
I'd bet a lot of money on AI at least having a substantial influence on the phrasing.
hansvm··on What I'm Hearing About Cognitive Debt (So Far)
It worked for bread. Why wouldn't it work for AI? I've been baking allen wrenches and screws into my sliced bread for ages, and no single living person has complained about it.
hansvm··on Copy Fail
Unless you're pushing a ton of extra work into a network-capable accelerator, that sounds exactly like what you'd want for, e.g., an encrypted S3 implementation. You have encryption, RS encoding, striped checksumming, sending fragments to multiple hosts, some sort of potentially interesting partial failure handling, etc.

You could push that all down to the accelerator, but if there are even a few such use cases you might want a dedicated DMA-capable implementation instead.

hansvm··on Securing a DoD contractor: Finding a multi-tenant authorization vulnerability
IME it's always lack of experience, at least at the level being described here. It's the same kind of person adding CORS handling to a pure backend service for "security" reasons. They just don't know any better and don't have a good enough mental model of how it all fits together to be able to recognize when they need to research more. The insecure patterns being chosen instead usually aren't even easier or faster to implement.

I don't have any concrete recommendations other than that one really good senior+ engineer is more important than a legion of juniors early on. Basic security doesn't require an extra hire; it requires somebody experienced enough to build your product right.

hansvm··on Newton's law of gravity passes its biggest test
The "it looks like there's stuff we didn't previously know about here" class of guesses has historically been fruitful, yielding, among other things, the discovery of several planets. Maybe dark matter isn't the answer, but it's not "no guess at all."
hansvm··on Talking to 35 Strangers at the Gym
It's one of the worst-named books, and it's definitely worth reading. I can't recommend it enough.
hansvm··on SFO Gate Explorer
With one class of exception (everyone with an early-morning flight piling in before the airport opens and creating a security backlog around Thanksgiving and Christmas), it's never once been more than 10min from walking in the front door to being at my gate, out of dozens of flights at all sorts of days and times.
hansvm··on Softmax, can you derive the Jacobian? And should you care?
That's equivalent to changing the temperature.

Also, so long as the function is non-negative for all inputs and positive for at least one you'll always get a valid probability distribution.

hansvm··on The Zig project's rationale for their anti-AI contribution policy
I did some kind of hard work, and the AI took away some other kind of hard work off my plate. For some problems, targeted brainstorming is still very valuable.
hansvm··on The Zig project's rationale for their anti-AI contribution policy
> The fact is, LLMs are incapable of invention and synthesizing new ideas.

I don't think it's fully appreciated how much of the hard work of "synthesizing a new idea" is just combining existing ideas. LLMs have given me brand new algorithmic ideas with precious little in the way of a spark on my end to make that happen, and not just a few times either.

Mind you, that workflow is arduous and involves a huge amount of experimentation, screening through interesting but ultimately wrong ideas, screening through outright bad ideas the LLM can't help but spew out as well, and manually massaging the results into something useful. It exists though.

hansvm··on Maryland becomes first state to ban surveillance pricing in grocery stores
IME there usually isn't much contention looking at the same section of shelf. If I'm looking at the cured meats, I'm the only person looking at any shelves within 6ft either direction. Other nearby people are walking past, looking at shelves on the opposite side of the aisle, waiting for me to finish before checking the meats, etc. The algorithm doesn't have to optimize for literally every person/sale to still have a lot of impact.
hansvm··on Regression: malware reminder on every read still causes subagent refusals
Been there, done that, and Windows feels the need to delete such files from _flash drives_ you dare to attach to the machine.
hansvm··on Ghostty is leaving GitHub
> It is honestly so shameful that we keep falling for this gambit.

I'm not sure who "we" is in this story, but the _most_ optimistic of my peers pointed to typical MS projects of that scale having a little proper investment in interesting features and also taking at least a couple years to fail. HN sentiment wasn't positive either. The 99th percentile in favor of MS were fine with it, but the 90th percentile recognized the M&A for what it was, especially as specific features started showing their colours.

Lest this come across as a drive-by insult, I'm actually very curious who "we" is. Humanity is a very, very broad spectrum, and my intuition often doesn't appropriately capture the divers backgrounds of real people, despite spending large amounts of time with (usually from working alongside) deck-hands, captains, sanitation workers, bankers, pilots, jackhammer operators, semi drivers, farmers, programmers, mathematicians, and a host of other people. The gap I'm seeing is likely in my understanding (rather than, e.g., the post being mal-formed), so I'd like to correct that.

hansvm··on How ChatGPT serves ads
Is there a library of good tools for LLMs to call? I have to imagine the bot-detection avoidance mechanisms are a major engineering effort and not likely to work out of the box with a simple harness and random local LLM.
hansvm··on Running local LLMs offline on a ten-hour flight
Maybe.

On the other hand, in economy on some planes I just literally don't fit in a forward direction because of femur length and cycling muscles, I don't fit in a sideways direction either because of broad shoulders and arm muscles, and I don't comfortably fit vertically on some planes with fixed-position headrests which push into the middle of my shoulder blades and have me hunched the whole flight.

I'm also not _that_ big. I'm 6'2" and have lived my life moderately actively. That's it. I'm biased, but I believe economy should be designed so that I can fit too.

If you agree with that premise, that'd leave plenty of space for most 250lb people too, and there'd be no reason to exclude them.

hansvm··on Tell HN: An app is silently installing itself on my iPhone every day
Health care companies are radioactively affected by mishandling healthcare data (give or take practical impact being very toothless, especially nowadays). The data itself is mostly not an issue though under any legal theories, and if Joe Schmo hedge fund digs up your colon photos that's not usually an issue.
hansvm··on There Will Be a Scientific Theory of Deep Learning
Interestingly, there exist problems which provably can't be learned via gradient descent for them.
hansvm··on There Will Be a Scientific Theory of Deep Learning
I'll use 1NN as the interpolation strategy instead since I think it illustrates the same point and saves a few characters.

Recap: 1NN says that given a query Q you choose any pair (X,Y) from your learned "model" (a finite set of (X,Y) pairs) M minimizing |Q-X|. Your output is Y.

The following kind of argument works for linear interpolation too (you can even view 1NN as 1-point interpolation), but it's ever so slightly messier since definitions vary a fair bit, you potentially need to talk about the existence of >1 discrete "nearest" or "enclosing" set of neighbors, and proving that you can get away with fewer points than 1NN or have lower error than 1NN is itself also messier.

Pick your favorite compact-domain, continuous function embedded in some Euclidean space. For any target error you'd like to hit, the uniform continuity of that function guarantees that if your samples cover the domain well enough (no point in the domain is greater than some fixed distance, needing smaller distances for lower errors, from some point in your model) then the maximum error from a 1NN strategy is bounded by the associated error given by uniform continuity (which, again, you can make as small as you'd like by increasing the sampling resolution). The compact domain means you can physically achieve those error bounds with finite sample sizes.

For a simple example, imagine fitting more and more, smaller and smaller, line segments to y=x^2 on [-1,1].

hansvm··on How to Implement an FPS Counter
For dynamic alpha, start by pretending the new incoming, windowed data doesn't exist. Look at your old data. How quickly do you want it to disappear? It'll have some formula like e^-(bt) for some constant b governing what proportion from 0 to 1 of that data still remains.

So...T seconds have elapsed since your last frame, and you have a new data point you'd like to incorporate into your EMA (and, for this problem, that data point is T itself). You keep e^-(bT) of the old data, 1 minus that of the new data, and you're done. Alpha is indeed 1-e^-(b * cur_spf) for some constant b, just like the AI said.

Which b do you choose though? I usually prefer to think of it in terms of half lives. Let H be your desired half life, and set 1-e^-(bH) equal to 1/2. You get b=log(2)/H. That's similar to the AI answer, but it rescales window_secs into a parameter you can actually start to reason about. The AI answer gives you a 1/e life instead, which is a less comfortable constant to mentally process.

That answer also naturally generalizes to other "time" axes or denominators. Suppose you want to EMA using discrete events rather than wall-clock time. Replace T in your dynamic alpha with the discrete count of events you haven't updated the EMA with yet (e.g., if something happens every time tick you would usually take T=1, but you can increase that based on a few skipped frames or whatever if you'd like).

As a fun fact, you can tailor this sort of stateless solution to have almost any decay property you'd like. Start with your favorite ODE satisfying a few properties, and this equation falls out as the step a discrete solver would take to approximate the ODE.

← PreviousPage 8 of 34Next →