Remix.run Logo
staszewski 4 days ago

Skill issue then

0x000xca0xfe 4 days ago | parent | next [-]

I just asked Astra to bring an old Windows XP game to the browser. It objdump'ed the whole thing, built a fitting Win32-like wrapper that exposes required functionality like DirectDraw, DirectSound, SEH etc., then wrote an x86-32/x87 interpreter in WASM, benchmarked how the game runs, lifted the hotspots of the executable to WASM too and now it is playable!

I mean, I'm proud of my low-level skills too but this is some Fabrice Bellard level sorcery. Very, very few humans are able to do this without AI tools.

RHSeeger 4 days ago | parent | next [-]

But good code isn't just "does it work", it's also

- is it understandable

- is it maintainable

- how much work is adding new features

- is it written in a way that adding new features means rewriting a lot of it

- is it written in a consistent style

- and lots of other things

I use AI to write a lot of my code, but the only time it's clearly "better" than a competent human is for one-off things.

That being said - AI + human is, without any doubt in my mind, better than either one alone.

0x000xca0xfe 4 days ago | parent | next [-]

Absolutely, the Win32-WASM layer it wrote is some of the most evil looking code I have seen in my life. But realistically, why keep it maintainable for humans if you won't find anybody that can work on it without AI anyways?

If we humans are just doing code style checks, file organizing and doc cleanups I feel we have demoted ourselves to code janitors. This is neither fun nor going to last.

Personally I've always strived for minimalism, to find the smallest, fastest, simplest solution possible so I'm pretty jaded now, too...

pona-a 4 days ago | parent [-]

Code is a human formalism that is only incidentally made executable. The elegance of code represents understanding of the problem to its most minute detail. LLM code being recognizably terrible shows it still doesn't understand what it produces to the full extent, and just as with people, it will inevitably compound to it becoming unable to efficiently work on it. And if the human abdicates that responsibility too, then there is no code, only subtly broken software.

tomrod 4 days ago | parent | prev | next [-]

Aye. Some of these targets are far away, others perhaps closer.

Human+AI systems is a good match. Like Human+docs or Human+encyclopedia.

ModernMech 4 days ago | parent | prev [-]

- is it understandable

Yes you can ask the agent anything about it and interrogate it until you understand.

- is it maintainable

Yes it’s easy to ask the ai to add new features or to refactor it entirely.

- how much work is adding new features

Depends, it could just be one prompt, it’s usually many prompts. If the refactor is large it can take weeks. But before AI something g equivalent would take months.

- is it written in a way that adding new features means rewriting a lot of it

Usually no, but that depends on how well the agent is being directed and what the features are. If you come up with a feature that requires a new architecture, ai makes it doable rather than saying “would be nice but we’d also have to implement this whole new architecture and that’s a lot of work”

- is it written in a consistent style

Styles can be applied mechanically with linters and formatters, so as much as any codebase written by multiple people.

RHSeeger 4 days ago | parent | next [-]

I've seen AI be wrong about things often enough to know that none of what you said is particularly true. Rather, most of it holds true most of the time. But not enough.

> Styles can be applied mechanically with linters and formatters, so as much as any codebase written by multiple people.

I'm talking more of a higher level than this - more of coding/design patterns that are common for the team.

ModernMech 4 days ago | parent [-]

> Rather, most of it holds true most of the time. But not enough.

I see it be wrong about things all day every day. And yet, IME it's correct enough for it to be controllable. It doesn't have to hold up all of the time, it just has to respond to corrections when they're issued in a loop so that it converges to a correct solution. And it does, despite the mistakes.

In one of my other posts in this thread I detail some of the the ways it's confounded me, but those issues have caused me to harden validation mechanisms rather than say "this thing makes mistakes so I can't use it to write software".

> I'm talking more of a higher level than this - more of coding/design patterns that are common for the team.

Do you have a concrete example?

himata4113 4 days ago | parent | prev [-]

What people don't understand that programming is very much an art. You iteratively work on it ripping parts out, rewriting and rewriting and rewriting, while also rewriting and then rewriting every time a new feature, bug fix or scaling changes are needed.

walrus01 4 days ago | parent | prev | next [-]

As a bit of an observation on that specific project... By hand as a human you could spend six months of the equivalent of a full time job doing that. Even if you had extensive knowledge in all of its discrete pieces. One of the things coding focused LLM are great at is doing things that have no reasonable prospect of economic necessity to do (no for profit company is going to pay you a FTE salary for six months to do that task, because there's no possible revenue in it). But the LLM can be pointed at it and get it done in a day or two with some periodic architecture and decision making by the human, for probably under $50.

0x000xca0xfe 4 days ago | parent [-]

It took two days and 50% of my Codex Plus week limit, so around 3$. Finally I can play the game on multiplayer again next evening!

tuesdaynight 4 days ago | parent [-]

What is the game?

0x000xca0xfe 4 days ago | parent [-]

https://www.gog.com/en/game/the_settlers_4_gold_edition

It did not work properly on Wine nor Windows 10, that was the entire reason for trying it out.

InvisibleUp 4 days ago | parent [-]

fwiw, PCGamingWiki[1] has a link to a patch[2] that someone wrote to fix the compatibility issues. If you're playing from the CD edition, you might also need SafeDiscShim.[3]

[1]: https://www.pcgamingwiki.com/wiki/The_Settlers_IV

[2]: https://github.com/elishacloud/dxwrapper/wiki/The-Settlers-I...

[3]: https://github.com/RibShark/SafeDiscShim

erfgh 4 days ago | parent | prev [-]

If there are very few humans that can do this is because the market for such a task is very small and thus there is little incentive to learn how to do it or produce tools that can do it.

xandrius 4 days ago | parent | prev [-]

Only people disliking AI for coding are the gatekeepers who think they are magicians and the plebs shouldn't be able to code like them, unless they become gud.

beej71 4 days ago | parent | next [-]

This is a false generalization. Lots of AI dislikers do so for a wide variety of reasons. I dislike it and don't care how other people use it.

lirolero 4 days ago | parent | prev [-]

[dead]