← Back to context

Comment by hias

7 hours ago

how do you think they made this wine port lol?

Looks to me like it was made without AI assistance. https://github.com/NethIafin/wine/tree/openbsd-master

  • Afaik I think I saw the author say on reddit he used AI to prototype and then rewrote it.

    https://www.reddit.com/r/openbsd/s/k0dz2WrkCo

    In that thread I suggested he submit it to the ports tree, I'm not sure if he took my advice or came up with the idea on his own. At any rate this is cool.

    • I never hid the fact that I iterated with AI. It's pretty hard to commit to an approach if you don't even know if it will succeed. And boy oh boy this was a shot in the dark.

      I also respect Wine and OpenBSD and their rules to not have any LLM code in the repo/ports. So my approach was to iterate over solutions, find approach that works, ask AI to "just see if my idea even works", learn what/how/why of that approach, generate some supporting manuals for myself (for example how to decode %gs instructions and how to reencode them) and then write my own code based just on decoding tables (and not LLM code).

      I did not know how to work with REX/SIB/ModRM, how to detect prefixes, how to parse every single instruction that contains %gs, how offsets work, how to encode jmp rels, why I want to use JMP *0(%RIP) instead of JMP 32rel on return, why I want to leave stub on SIGUSR (or any other signal). But I do know now.

      I was incredibly lucky that patching just these %gs instructions were enough to launch Factorio and play, with broken sound, but anyways! Holy molly this was and is so much FUN!

      The approach still feels like cheating, and if it feels the same for you, I perfectly understand.

      3 replies →

    • Yes, he said the same on the mailing list[0] when he asking about a related thing 3 weeks ago:

      > I had some success in porting Wine to amd64.OpenBSD. Was able to run a few = games. But that required in memory patching of %gs commands (LLM's suggesti= on and 1st implementation, then I re-did it from scratch - I'm not that sma= rt with amd64 assembly code)

      Also, it's not a single author. Other people contributed significantly and their contributions don't seem written by AI: https://github.com/NethIafin/wine/commits/openbsd-master/

      [0]: https://marc.info/?l=openbsd-tech&m=179070255546118&w=2

      1 reply →

Soon like with Speedrun submissions, we will have to show ourselves livestream coding to avoid any AI usage suspicions

Do you have any evidence to support this claim?

  • at this point in the timeline you need evidence to the contrary, safe to assume most code is AI generated or AI assisted at the very least

    • If "slopcode" means code where the author consulted AI at all, yeah. But it's pretty easy to tell if the author AI-spammed without even reviewing all of it, or even if they did review it but didn't hand-type it. The email says "you did not write them, you said an AI did," so the author did admit to using AI at the same time they claimed copyright over the code.