Copilot high jinks

https://attnam.com/topics/Copilot-high-jinks-1

The Cathedral of Attnam > IVAN Development

#1 Mar 31, 2023, 5:51 am Hide

fejoa

This post is going to be a tiny bit spoily, but I thought I'd challenge GitHub Copilot's knowledge of IVAN a little bit. Since IVAN is GPL2, Copilot is not supposed to spit out IVAN's source word for word, but we can still make it produce something familiar looking...

The IVAN sources have a lot of unique code references which correspond to many in-game gags and peculiarities. Take Banana::zap() for instance:

https://github.com/Attnam/ivan/blob/5d28c1aa2988e8f8ffa20501...

Jumping into VSCode, I slapped in a bit of Banana::zap() and with a bit of coaxing got it to complete a little bit of authentic GPLed code:



Ok, so we backed Copilot into a bit of a corner there. It seems "disfunctional" is the only word that fits there right? Well that's because it is, since the correct spelling is "dysfunctional". Hah!

Next, let's see if it will spit out more IVAN code:



We have got a nice big chunk of fresh braiiinz Copilot code. It's not quite the rest of the banana::Zap() function, but it sure has some very IVANesque code in there, which I'm sure those familiar with the source's idiosyncrasies will agree.

Looking again, I know IVAN's bodypart system is detailed, but I'm not entirely convinced you can do neck damage. Is Copilot starting to hallucinate? Or is it something more sinister? Is it really a kind of self-sabotaging anti-GPL straight jacket? I don't think we will find out here, but we might find out over time.

With Copilot you can pick other suggestions, so we'll see what else gets suggested by this LLM:



Heh, this one got a genuine laugh from me. First Copilot wants to throw the goddam banana. ("Hey! I'm zappin' here!")
Next, if there are insufficient charges, Copilot wants to inform the player their banana has run out of juice!! Oh my, that had me giggling like a schoolgirl I swear.

Come on Copilot, give me more!



The LLM insists on throwing the banana, not bothering to test whether it hits its intended target it promptly wishes to dispose of the banana by calling SendToHell() -- in other words freeing the memory occupied by the banana. SendToHell() is highly idiomatic to the IVAN codebase, not to mention the banana::Zap() function itself. Using IVAN's code can potentially be a high acuity litmus test to check whether GPLed code comes out of an LLM such as Copilot. Not that any of this nonsense would compile. To be fair, when l learned Copilot was trained on IVAN's source I was like "are you sure you want to do that Bill?", and the results speak in large part for themselves. But all up, it's definitely entertaining at least. Neck damage... Maybe Copilot is onto something?
#2 Mar 31, 2023, 8:31 pm Hide

capristo

wow yeah that is suspiciously IVANesque especially the SendToHell bit

I vote we sue Github, collect a nice payment, and use that for fejoa to work on IVAN full time
#3 Mar 31, 2023, 8:35 pm Hide

capristo

"Been Caught Stealing" is suddenly stuck in my head
#4 Apr 1, 2023, 12:48 am Hide

chaostrom

Ahahaha, SendToHell is great.
#5 Apr 2, 2023, 3:32 pm Hide

red_kangaroo

Quote
ADD_MESSAGE("Your banana is out of juice!");

This is wonderful.