HNHacker News
TopNewBestAskShowJobs

kevingadd

15,333 karma · joined June 7, 2009

Working on .NET at Microsoft. Former member of original WebAssembly design team at Google. Developer on JSIL, Grim Fandango Remastered (PC/PS4/Vita), Escape Goat 2 (PC/PS4), Sully: A Serious RPG (Vita), Oh Deer (Vita), Mozilla Firefox, Escape Goat (Web), Soulcaster (Web), Guild Wars 2, IMVU, Guild Wars: Eye of the North, Guild Wars: Nightfall, Guild Wars: Factions, and others
submissionscomments
kevingadd··on By default, Signal doesn't recall
If you ever sign into a Microsoft account - i.e. when setting up your PC since it's nearly mandatory - Windows turns on OneDrive automatically even if you explicitly opt out of it during the setup wizard because apparently user consent doesn't mean anything. Happened to me a couple times.
kevingadd··on “ZLinq”, a Zero-Allocation LINQ Library for .NET
From looking at the blog post I suspect the explosion of generic instances could be a serious problem for code size and startup time, but that's probably solvable somehow. The performance certainly seems impressive.

The way LINQ currently works by default makes aggressive use of interfaces like IEnumerable to hide the actual types being iterated over. This has performance consequences (which is part of why ZLinq can beat it) but it has advantages - for example, the same implementation of Where<T>(seq) can be used for various T's instead of having to JIT or AOT-compile a unique body for every distinct class you iterate over.

From looking at ZLinq it seems like it would potentially have an explosion of unique generic struct types as your queries get more complex, since for it to work you potentially end up with types vaguely resembling Query3<Query2<Query1<T>>>>. But it might not actually be that bad in practice.

kevingadd··on “ZLinq”, a Zero-Allocation LINQ Library for .NET
I believe they're referring to the stack allocation improvements, which would ideally allow all the LINQ temporary objects to live on the stack. I'm not sure whether it does in practice though.
kevingadd··on The Windows Subsystem for Linux is now open source
If you're using DisplayPort, try switching to HDMI. (Really.) For me it made the freezes much shorter. It's a bug in their driver related to the connected monitor(s).
kevingadd··on The first year of free-threaded Python
This should not have been downvoted. It's true that the GIL does not make python code thread-safe implicitly, you have to either construct your code carefully to be atomic (based on knowledge of how the GIL works) or make use of mutexes, semaphores, etc. It's just memory-safe and can still have races etc.
kevingadd··on Air Traffic Control
When your hiring pipeline is so obliterated that you decide to fire about 400 of your employees. Makes sense.
kevingadd··on Fighting Unwanted Notifications with Machine Learning in Chrome
For web apps I can imagine good uses for notifications, like how I have a Google Calendar tab pinned and it's useful for it to be able to alert me that I have a meeting in 15 minutes.

But for websites? Can't think of anything.

kevingadd··on All four major web browsers are about to lose 80% of their funding
I'm quite certain Apple would have continued their browser engineering and security efforts with or without Google. In the first place, Chromium was a fork of WebKit (which itself is derived from the work of the KHTML team). Apple values the security of their iOS users a lot so they wouldn't have just sat around and watched them get exploited.

It's true that Google 'got there first' on a lot of stuff and that groups like Project Zero do incredible work but the idea that we'd be nowhere without Google is a bit silly.

kevingadd··on Fundamental flaws of SIMD ISAs (2021)
Optimal performance in a vector algorithm typically requires optimizing around things like the number of available registers, whether the registers in use are volatile (mandating stack spills when calling other functions like a comparer), and sizes of sequences.

If you know you're engineering for 16-byte vectors you can 'just' align all your data to 16 bytes. And if you know you have 8 vector registers where 4 of them are non-volatile you can design around that too. But without information like that you have to be defensive, like aligning all your data to 128 bytes instead Just In Case (heaven forbid native vectors get bigger than that), minimizing the number of registers you use to try and avoid stack spills, etc. (I mention this because WASM also doesn't expose any of this information.)

It's true that you could just design for a static size on a system with variable-length vectors. I suspect you'd see a lot of people do that, and potentially under-utilize the hardware's capabilities. Better than nothing, at least!

kevingadd··on You wouldn't steal a font
You should carefully check the license of each font on Google Fonts. They're not all under the same license. Yes, many of them are permissively licensed, but that doesn't mean you have the right to redistribute the ttf/otf file yourself as part of an application, since you need to comply with the terms of the license as it is written.
kevingadd··on Fundamental flaws of SIMD ISAs (2021)
Part of the motive behind variable width SIMD in WASM is that there's intentionally-ish no mechanism to do feature detection at runtime in WASM. The whole module has to be valid on your target, you can't include a handful of invalid functions and conditionally execute them if the target supports 256-wide or 512-wide SIMD. If you want to adapt you have to ship entire modules for each set of supported feature flags and select the correct module at startup after probing what the target supports.

So variable width SIMD solves this by making any module using it valid regardless of whether the target supports 512-bit vectors, and the VM 'just' has to solve the problem of generating good code.

Personally I think this is a terrible way to do things and there should have just been a feature detection system, but the horse fled the barn on that one like a decade ago.

kevingadd··on You wouldn't steal a font
The fonts loaded on one machine are typically not loaded reliably on all machines, so you need to distribute fonts with your application. Doing this is probably a violation of the license that all those "free fonts" were distributed under, so your only options are:

1. Public Domain Fonts

2. Fonts that cost money

The set of public domain fonts is pretty small and most of them are low quality - not all, thankfully - and out of the ones that don't suck a lot of them only support the latin character set.

As for fonts that cost money, just to give you one example, I recently asked a foundry what it would cost to license a font for my indie game. Their quote was $1100/yr with a ceiling of 300k copies sold (so I'd need to come back and pay them more on a yearly basis and the cost would go up if I was successful). This was only for 3 variants - regular, italic and medium - and only for the latin character set. For one typeface.

Certainly if I was throwing around millions of dollars I could pay that without blinking, but it's far out of reach for independent developers (and they know I'm independent)

Lots of games distribute "baked fonts", where the ttf/otf is statically rendered into a bunch of texture atlases and they ship the atlases instead of the font. Many font licenses I've seen don't permit this kind of use, so I suspect a lot of games are actually in violation of their font licenses, if they paid to license their fonts at all.

Hell, just the other day I prepared a PowerPoint presentation for work using one of the stock Office fonts and then I opened it in Office on another machine and the font was missing...

kevingadd··on Detecting if an expression is constant in C
If you're writing code that needs to behave deterministically and not have side effects, you could use this to make violations of determinism/side-effect-freeness fail fast, I guess?
kevingadd··on WebAssembly: How to Allocate Your Allocator
Though I'll note that (AFAIK) WASM environments don't expose access to uninitialized memory. When you grow your Memory object the new space is zeroed, and when you allocate it initially it's zeroed. This can actually show up in profilers when you examine application startup time.

loader_uninitialized would hopefully address the zeroes in the module at least...

kevingadd··on Abusing DuckDB-WASM by making SQL draw 3D graphics (Sort Of)
> But because tick() and render() involved async database calls, sometimes a new interval would fire before the previous one finished.

This is a tricky one when writing games using async APIs. The game I've been working on is written in C# but I occasionally hit the same issue when game code ends up needing async, where I have to carefully ensure that I don't kick off two asynchronous operations at once if they're going to interact with the same game state. In the old days all the APIs you're using would have been synchronous, but these days lots of libraries use async/await and/or promises and it kind of infects all the code around it.

It does depend on the sort of game you're building though. Some games end up naturally having a single 'main loop' you spend most of your time in, i.e. Doom where you spend all your time either navigating around the game world or looking at a pause/end-of-stage menu - in that case you can basically just have an is_menu_open bool in your update and draw routines, and if you load all your assets during your loading screen(s), nothing ever needs to be async.

Other games are more modal, and might have a dozen different menus/scenes (if not hundreds), i.e. something like Skyrim. And sometimes you have modals that can appear in multiple scenarios, like a settings menu, so you need to be able to start a modal loop in different contexts. You might have the player in a conversation with an NPC, and then during the conversation you show a popup menu asking them to choose what to say to the NPC, and they decide while the conversation menu is open they want to consult the conversation log, so you're opening a modal on top of a modal, and any modal might need to load some assets asynchronously before it appears...

In the old days you could solve a lot of this by starting a new main loop inside of the current one that would exit when the modal went away. Win32 modal dialogs work this way, for example (which can cause unpleasant re-entrant execution surprises if you trigger a modal in the wrong place). I'm still uncertain whether async/await is a good modern replacement for it.

kevingadd··on The Value of Differences: Jennifer Lindsay on Noticing Translation
I sincerely believe everyone should learn at least one other language. At least make the effort, you'll learn a lot in the process and it can be quite fun. It also enriches your understanding of your primary language once you've seen how other languages express particular concepts.
kevingadd··on The Value of Differences: Jennifer Lindsay on Noticing Translation
"I want the original language to punch through a bit and be celebrated especially with idioms." is asking for a compromised, incompletely translated work, no?
kevingadd··on Local LLM inference – impressive but too hard to work with
For a while basically any mobile or browser freemium game you tried would have progress timers for building things or upgrading things and they'd charge you Actual Money to skip the wait. That's kind of out of fashion now though some games still do it.
kevingadd··on The Value of Differences: Jennifer Lindsay on Noticing Translation
Don't you want to appreciate the book at its best, as it was appreciated by readers who read it in its original language? Why demand a compromised work? If you want to soak up untranslated idioms, you can just learn another language.
kevingadd··on Generate videos in Gemini and Whisk with Veo 2
I think the obstacles there are distribution and IP rights. I think we will see content like that find widespread appeal and success but actually turning it into $100m in revenue requires having the copyright (at present, not possible for AI-generated content) and being able to convince a distributor to invest in it. Those both seem like really tough things to solve.
kevingadd··on How a $2k 'Made in the USA' Phone Is Manufactured
Who pays for the tariffs if not the taxpayer?
kevingadd··on NIH freezes all research grants to Columbia University
There are many possible criticisms of Israel that don't have anything to do with Jewish self-determination, though... or is the idea that because it's the only Jewish state they get a free pass on all their conduct? I'm not following the logic.
kevingadd··on Gaussian Splatting Alternative: WebGL Implementation of Nvidia's SVRaster
There are plenty of graphics researchers not in NVIDIA's pocket cooking up stuff that doesn't require vendor-specific features, so I'm not worried that graphics research is being suppressed, if that's your theory.

Intel and AMD are both big players with a vested interest in promoting the capability of CPUs and promoting the capability of non-NVIDIA GPUs, since they sell both. They're big and well-capitalized, so if they wanted to they could be operating big graphics research teams (whether they are is unclear to me, and it's obviously not a 'snap your fingers and you have a big graphics research team' situation, but they have the resources)

In some cases if you see CUDA being used for a demo or a research project it's just because the alternative stacks kinda suck, not because only NVIDIA hardware is capable of doing the thing. Researchers aren't necessarily concerned with shipping on 99% of consumer machines, so they can reach for the most convenient approach even if it's vendor-locked.

I won't be surprised if we see some researchers start targeting Apple's platform-locked Metal API in the future since they have compelling unified memory offerings with capacities exceeding everybody else's.

kevingadd··on Why Companies Don't Fix Bugs
Sadly, I just accepted having worse productivity. I didn't really have a choice, their bugs were actively breaking my workflow, like causing builds to fail. It definitely made me more frustrated and less productive on a day-to-day basis.
kevingadd··on The End of Sierra as We Knew It, Part 1: The Acquisition
Business was good in those days if you had an audience and could distribute your game to your customers more or less direct. Retail was very expensive, but if you were selling shareware your distribution costs were really low and you weren't giving anybody 30-50% of your take. Titles may not have sold i.e. 10 million copies back then, but you could make good money off a single game, and it was cheaper & faster to develop a game. The 'if's I just listed are pretty significant, of course.

For one example, Ultima 1 was developed by a couple people, sold for ~$40 USD, and eventually sold over 1.5m copies according to https://www.newspapers.com/article/austin-american-statesman... and other sources. So that alone probably made everyone involved in the game's development millionaires, even if the publisher took a huge cut.

kevingadd··on A university president makes a case against cowardice
The current administration refers to inclusion of PoC and women as "DEI", so when they talk about ending DEI, that's what they mean.

See https://www.theguardian.com/us-news/2025/mar/17/defense-depa... for one example where it's particularly blatant.

kevingadd··on Are people bad at their jobs or are the jobs just bad?
The retail experience now is not necessarily the same as it was when you were a kid though, is it?
kevingadd··on Don’t let an LLM make decisions or execute business logic
That doesn't seem like a #2 scenario, unless you're okay with your centered divs not being centered some of the time.
kevingadd··on Utah becomes first US state to ban fluoride in its water
Yeah the lowest option on some point of sale systems now is 20.
kevingadd··on ByteCraft: Generating video games and animations through bytes
None of their examples seem close to game-like, but I assume the implication here is that since they can generate SWFs with some interactivity, being able to generate a functioning game is not that far off. Assuming the training set is full of robust SWF games (harvested from original Newgrounds and Kongregate, I assume?) that does make some amount of sense. I'm curious to see what kind of novelty is possible though at that level of complexity.
← PreviousPage 4 of 34Next →