Hacker Newsnew | past | comments | ask | show | jobs | submit | Pannoniae's commentslogin

With /LTCG /GL I don't think it's possible to get matching (or at least it's a very tall order), the codegen is wayy too volatile for an exact match and since inlining and reg alloc work on heuristics with thresholds it really cascades. Even stuff like what order you declare your locals in or the exact frontend syntax can mess things up...

Most people are working on builds where debug information was either inadvertently or sometimes intentionally included (e.g. for beta releases sometimes debug builds with debug info would ship for sake of making things easier.) These builds usually don't have all of the normal release optimizations on. That makes it much more likely to get a match.

I haven't tried this, but I also suspect that once you have a lot of code fully matching, it might make it possible to ratchet your way up further into builds that you don't have debug information for, that may have more aggressive compilation options. I am not sure if you would manage to get /LTCG builds fully matching even with this advantage, but it's going to be the best shot at it. You're possibly 90% of the way there already.


Hey I'm not working in matching something with LTCG atm :) I'm just saying in general.

And yes if you have a pdb / an Od build then things are much easier, I was assuming arbitrary game i.e. release binaries.

The "knowledge laundering" approach you describe might help in reconstructing headers, class layouts and function names which is a godsend although I don't think it would be enough to get a match. Getting functionally equivalent code is muuuch easier (although there's the problem of "how do you verify that without running every function")


Yeah, this is probably true. I've done non-matching decompilations of modern software up to a few hundred kilobytes worth of code - it is challenging but doable. I have no idea how hard it would be to get to matching with LTCG no matter where you start from. If it was genuinely not practically possible for computational reasons I would be unsurprised.

AI is pretty powerful for decompilation, especially because you can also just have an LLM go and start reverse engineering bits of the linker and compiler if you want. (I suspect this decomp is AI assisted if the Clauded out README is any indication.) Maybe future models will be able to come up with clever and novel ways to reduce the number of possibilities and converge faster on possible matching source codes. Or maybe not; I think Astra is the best LLMs have ever been at decompilation and yet I find LLMs frustrating and prone to getting deeply stuck in local maxima in my experimentation.


Correct, this is just hacks for stuff you didn't manage to match exactly. Either that or your build environment isn't the same. Sadly, there are things which aren't really possible to reproduce in a byte-identical manner, things like exact file layout or variable declaration order, compilation order and that kinda stuff. And they might cause small but equivalent changes like different inlining/optimisation decisions, so it's really tricky to get it byte-exact.

Why wouldn't those be possible to reproduce?

"assign all these pointers to the correct types, a wrong guess leads to different COMDAT folding"

"get the order of local variables in this function right, otherwise the register allocation doesn't match. Oh and there's 150 local variables just in this function, good luck trying them all"

"Find out the translation unit boundaries exactly (assume there's no pdb otherwise this is trivial) and after doing so, figure out the order they were compiled in, otherwise it won't match"

"brute force the compilation flags for the project and if you're done, also bruteforce it for the CRT or any other middleware which usually came prebuilt so it doesn't match the main game"

Should I continue;)


Indeed it's a shitload of work. It's also possible and has been done. You don't have to only use global brute-force - you could also reverse engineer the compiler. The OOT/MM decomps achieved completeness without //COMPILERDIFF.

Correct me if I'm wrong (I'm not very well-versed in game decomp scenes) but aren't all those bytematched decomps from 90s or at the latest early 2000s games? They didn't have global optimisation (MSVC introduced it in VS .NET or 2003 I think and many games didn't use it until later)

So these are mostly problems with more advanced compilers yk


TL;DR: You got promoted or you wanted to get promoted. You decide you want to make a bigger project to show ambition, advance your career and whatnot. You embark on making some grand project, disappearing from view. This often leads to you getting stuck with something, falling behind and various negative effects like getting a PIP or becoming depressed.

His prescription to avoid this is to keep checking in and show some progress on something every day so you don't lose touch.

(My analysis: I don't think this is particularly a senior engineer problem, to me it just reads like ADHD-coded problems with time and interests)


In that case, wouldn't piracy shift to hacking the servers and exfiltrating the binaries/code?

You don't have a buffer overflow problem if you read it in a memory-safe way i.e. read it in chunks and realloc when you reach the size of your allocation.

What you will have is a potential denial-of-service attack - although this one isn't particularly great because there's zero amplification (they might as well just send garbage into your firewall)


DOS in what way? Can you clarify? Thx.

They can write any EULA they want but it's not like they will be able to enforce it in a meaningful way, to be fair. You can't legislate modding away, that's like legislating piracy away, which has famously failed. Music piracy wasn't killed by banning it, it has shrunk in importance because Spotify is fairly cheap and easy. Despite that, many people do still pirate music.

In the hypothetical GTA VI case, what can they do about it? Take just about any historical data leak, in pretty much zero cases anyone has been able to scrub all copies of it from the internet. There's plenty of lost media, the stuff no one cares about. But if enough people care about, it can't really be scrubbed away.


I'm so worried when the retort here is essentially "but nobody gets caught breaking the law". What have we become?

Sorry, I'm just being realistic. "Whenever there's a will there's a way" and so on. People have tried to legislate all sorts of various things, even stuff like "PI = 3" without much success because they weren't viable.

Don't be ridiculous. The fact that it's dumb to legislate mathematical falsehoods doesn't mean we can't successfully legislate things.

I said it's not possible to legislate some things away, i.e. unviable legislation. A hard ban on modding / AI reimplementation isn't viable, because you can't really keep data off the internet, evidenced by things like leaks, Anna's Archive etc. remaining online. People can always reupload the remade GTA or whatever onto noname fileshares, code forges, torrent and so on.

To be fair, you also don't restrict yourself to those texts either. You read news, you use other programs, you look at websites and so on. And while the norms vary per field, things aren't really reinvented from scratch. The standard FPS controls aren't reinvented for every shooter game. The standard website layouts aren't reinvented for every website. The standard command line behaviour isn't reinvented for every CLI program and so on.

Those were all included in "published literature relating to STEM".

Just skip the source code. Consider it an easier challenge than reinventing relativity from 19th century physics.


But software isn't like traditional academia. It might have grown from it but most advances aren't really published in the traditional sense, you've got blogposts, presentations and source code instead.

This would be like teaching cooking without looking at any recipes, just from physics and first principles. Or learning music without looking at the sheet music / listening to any existing songs, just generic musical theory and chords. I don't think humans can do it "zero-shot" either...


> advances aren't really published

https://dl.acm.org/


I don't see how this disproves my point. There's a vast divide between "theoretical" and "applied" software engineering. You don't usually see Google engineers publish their search optimisations in journals. And similarly, you don't see university professors making commercial libraries from their articles' ideas. This isn't the case in every field but in software, it very much is.

And this implies that training on the "theoretical" side of things doesn't give you much insight on the "practical" side. Stuff like cyclomatic complexity, UML diagrams and all that stuff might be well-represented in literature but way less so in real software, so training on the literature will produce completely different software than training on production software code.


Google patented their original algorithm, another form of publishing:

https://patentimages.storage.googleapis.com/db/8f/cb/dad63e9...

I'm going to stop arguing with you now.


It doesn't matter if they mind or not, the question is whether they can feasibly stop you. So far, the answer seems to be "not really".

It’s become pretty difficult in some areas due to cryptographic signatures that are either bound to the hardware or to online services.

Apple has feasibly stopped any modifications of iOS and their apps, for all practical purposes. These kinds of ecosystems will only continue to expand and to displace more open ones. We’re already at the point where arguably the most performant non-server hardware (Macs with the latest SoCs) is bound to a proprietary OS. Efforts like Asahi can easily be shut down by Apple with newer hardware.

LLMs are no help against proper cryptographic lockdown.


That's right, but other closed systems are kind of withering away (the two major consoles - Xbox and Playstation - are dying in favour of PC gaming).

We're at an inflection point because hardware progress has slowed down and while the mobile duopoly does benefit from network effects, in the long run those are outweighed by missteps by the incumbents. See how Windows has been a monopoly on the PC market for ages, then they've dropped the ball, Linux has grown then Microsoft got their shit together somewhat in order to catch up.

I don't think open / general-purpose computing is doomed in the future or anything like that, as long as there is demand for it, someone will supply it.

And LLMs can also help you design your own hardware in the worst case:)


> the two major consoles - Xbox and Playstation - are dying in favour of PC gaming

I’m pretty sure that it’s in favor of mobile gaming. The PC market is shrinking.

> And LLMs can also help you design your own hardware in the worst case:)

But not in manufacturing it. You’ll generally be even more disadvantaged in terms of hardware performance than open-weight models are compared to the proprietary frontier models.


>The PC market is shrinking.

You have very good points but I'd say this is somewhat of a fallacy. If you look at graphs for phone shipments and PC shipments, they're both somewhat declining between 2015-2025 (I'm focusing on this time period to exclude the current temporary component shortages). However, this doesn't mean they're becoming less popular in either usage or platform spending like buying apps, games and subscriptions. How can this circle be squared you might ask? Just about everyone has a phone or a laptop today. They're typically not first-time buyers, they'll be replacing their systems. Even if the number of devices shipped are decreasing today, doesn't mean the market itself has shrunk. Even if for some reason, all laptops became e-waste from next year January 1st, you'd see several hundred million sales next year for the replacement device, because the market is there.

For those consoles, that's not the case. (src: https://www.gamesindustry.biz/analyst-game-console-shipments...) Look at how Switch is the majority of shipments most of the time, and there are years where traditional consoles sell only a few million copies. Contrast that to the personal computer or the phone market where the numbers are in the tens of millions or hundreds each year. It's just not comparable.

>But not in manufacturing it.

LLMs won't build you a frontier fab that's for sure, but the point is that you don't necessarily need the latest'n'greatest with diminishing returns. An RTX 5090 is like ten times faster than a GTX 980 released 12 years ago. It doesn't run games which are ten times better. Similarly, something like the Galaxy S26 is ~7 times faster than an S6 around that time. Is it seven times better to use? Of course not :P

So the conclusion is that the performance the architecture you need to reach isn't an ever-racing frontier, you can make a new product (and in this hypothetical case, a product focused on openness) without having SOTA performance.

For a case of an "alternate" product like this, just see the Switch - much slower than "normal" consoles, good form factor, portable, and fairly cheap to produce. No one cares that it doesn't do 4K when undocked.


Macs are gaining on PCs in laptop/desktop market share. Only a small minority of those who didn’t already use PCs before are newly getting into PCs with Windows or Linux. This was different when Windows was still the respectable default, but the times are changing. Most of the PC market is business/office laptops/desktops, not personal home machines, and Macs are gaining both in personal and business use.

The Switch is popular despite its lowish performance, because of its ergonomics and ease of use, which is correlated with it being a walled-garden product, just like that’s the case for smartphones.


eh to a degree. It leveled off at about 50% in 2018-2020 or so. And it’s not reasonable to assume that every person doing mobile gaming would have otherwise gamed on consoles/PCs, so how much of that is growth in “the gamer” population matters a lot. Part of the draw mobile gaming is it’s very accessible. Usually simple controls and everyone already has the hardware in their pocket. So the total population went up, of which a lot was claimed by Mobile.

Now I’m very curious to look into this more in depth as I’m doing a fair bit of speculating. If I find any good info I’ll update this


Cheers, enjoy the rabbithole:)

A small pointer, it's hard to do interpret statistics because most people play on multiple platforms. Roughly 75% of gamers play on mobile, 45% on PC and 40% on console.

I'm not 100% sure about the numbers, just off the top of my head about looking at market research, updated numbers welcome


I don't think Office only runs on attested hardware. I'm not sure about Office 365, but the last office you could actually run on your own computer had no protection from modification and in fact, we modified it very extensively.

Sure, I was talking about the general trajectory, and that there are effective ways to prevent modification that vendors will put to use. Meaning that LLMs are not a panacea.

> Among the most important additions in the GNU General Public License version 3, in 2007, was to prohibit taking a GPLv3-covered program and distributing it under tivoization, because it denies users the freedom, in practice, to modify the program and then use the modified version. [1]

If I'm not mistaking Apple and other companies have avoided GPLv3 like the plague. And Microsoft won't sign your EFI boot loader if it's under a GPLv3 license.

[1]: https://www.gnu.org/philosophy/tivoization.en.html


Good point. The other corollary is: why would you want to, if you can solve your problem by more easily finding and reusing existing building blocks with a bit of glue code.

They can just change their EULA to make the act akin to old fashioned piracy. The free software movement eschews such instruments by definition, so we're fucked.

I mean, they can write anything in their EULA, I'm talking about enforcement. Sure, most free software advocates are squeamish about good old fashioned piracy today but I don't think that's an immutable fact of life.

The best anyone can do is send takedowns to GitHub / other websites hosting the code or downloads but it's trivial to upload them to random russian code forges or whatever.


I don't think it's dead if you have a market which values high-quality, artisanal products.

Sure, artisanal code in itself isn't something inherently sellable but if you pride your program on being a quality product then it's still valuable for others:) AI is basically the new JavaScript in a way.It won't create the next Linux or the next SQLite by itself.


That's separate from LLM usage though.

By this point, if you care about a quality product, you should learn how to leverage LLMs for that like running automated audits for correctness and performance opportunities.

There isn't a market for "yeah there's a memory leak but I wrote it by hand."


Yep! We run security reviews on our pull requests now and are shocked at how it stops a lot of vulnerabilities being shipped. We've had a couple of high score CVEs from the before-LLM times, and when the AI reviews the code that introduced the CVEs, it easily picks them up. We had 2 humans reviewing every PR, and both missed the issues. It's far too easy to miss security issues when you manually review them, but LLMs are exceptionally good at finding them. Unfortunately for me, I admit, I just can't get myself to push code anymore without an LLM checking my work (or writing much of it when I'm at work, I try to write code by hand in my own time to make sure I don't rust away, but at work there's no way to justify doing it the "slow" way anymore).

Fair enough, but as things stand now, the usual LLM-assisted piece of software is usually also partly or wholly LLM-designed too. Not just implemented on a function level or a file level. And LLM design is usually called "slop" because it's nothing spectacular unless you bring fresh ideas to it from a human perspective.

Hand-written memory leaks don't have a market but hand-designed software with hand-designed UX and a hand-designed vision does :)


I'm generally impressed with the code that Fable/Opus is writing for me these days; I would be proud to have had the same foresight had I implemented the solution myself.

And Fable's architectural design is pretty much always well-reasoned and a good place to start.

There's this idea that the best way to use LLMs is to be in the backseat constantly yelling out corrections, but that hasn't been true in my experience for quite some time, though I only use a few sota models.

I think something being slop this late in the game is mainly a reflection of the person using it. I can't really blame AI anymore when pretty much any lever you'd recommend to de-slop it is one prompt away.

I agree with your last bit, and that is the only thing left now that AI solved the technical part.


"We all have our own set of ethical and moral guidelines, which are also lost once having been absorbed into the colossus. While existing licenses and agreements are imperfect, they have been shown to be enforceable in a court of law allowing me, the creator, power over my own creation."

This touches on the tension between artistic integrity vs. open source and the creative commons. There's been a shift from releasing software to benefit the public domain or "for the lulz" towards treating software more like a piece of artwork you as a creator have exclusive control over, even if it does have an open-source licence.

Sadly or not sadly, the freedom 0 in the four freedoms (freedom for any use) prohibits stuff like "anti-AI" licences, and even if it didn't, the mainstream argument is that you don't need a copyright licence because training upon a work doesn't constitute copying. Of course not everyone agrees with that, but once this is socially acceptable to say, it's also more acceptable to "more directly" copy existing projects, such as by directing LLMs to read the existing code and reimplement it, sometimes overtly, sometimes under the fig leaf of a "cleanroom" implementation.

Fundamentally, AI doesn't change anything if you wanted to do things the previous way - you can still publish your software, others can still use it, you can still forbid AI contributions or AI usage while interacting with your work - but it does surface the hidden implications. Many people do open source for the clout, for their portfolio and for approval from others, and those are things AI threatens, because it devalues software from requiring a huge amount of mechanical engineering skills to create to knowing how to prompt for good results. (see "without respect or credit for those who did the real labour.")

I wouldn't be so pessimistic about the new state of affairs - if creating software is much easier without the existing gatekeepers, a lot more cool things will be created :) People usually create things on their own even when not directly incentivised to do it with the power of law. In a way, this fulfills Stallman's dream - if you can easily modify or create any kind of software then he could have fixed his printer driver.

I really don't see how this would decrease openness, copyright itself decreases openness, and if everyone starts disregarding it then the field of software reverts to belonging to the shared commons.


I don't see why freedom for any use could not be 'freedom for any use except AI ingestion'. Copyright rests on control of your work product, customizing the license is definitely an option.

I don't see it either, but this is the ubiquitous interpretation of the FSF freedom 0 :)

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: