r/badcode • • Apr 11 '21

python Polyglot

Post image
1.2k Upvotes

116 comments sorted by

View all comments

235

u/Square789 int mystery=*((int*)rand()) Apr 11 '21

in C, -1 % 16 is -1; thus the return value for is_even would be in front of the lookup array and undefinedTM.

Also a polyglot is source code that is valid in different programming languages, this is more of a... very enthusiastic jit compiler?

139

u/deprilula28 Apr 11 '21

my man is jit compiling c, ahead of his time