Nick Geoghegan

Professional Yak Shaver

Category: Programming


Programmers have a very precise understanding of truth. You can’t lie to a compiler. Try it sometime. Garbage in, garbage out. Booleans, the ones and zeros, trues and falses, make up the world programmers live in. That’s all there is! I think programming is deep, it teaches us about the non-cyber universe we live in. […]

Read More

C can be crazy

C can be crazy some times. #include void(*swap)() = (void(*)()) “\x8b\x44\x24\x04\x8b\x5c\x24\x08\x8b\x00\x8b\x1b\x31\xc3\x31\xd8\x31\xc3\x8b\x4c\x24\x04\x89\x01\x8b\x4c\x24\x08\x89\x19\xc3” “Oh, there you are Mr. Insanity…”; int main(){ // works on GCC 3+4 int a = 37, b = 13; swap(&a, &b); printf(“%d%d”,a,b); } So, what the fuckĀ is going on? This code, basically, takes a block of raw instructions, stick it into the memory, […]

Read More