1305
Brace Style (sh.itjust.works)
you are viewing a single comment's thread
view the rest of the comments
[-] TunaCowboy@lemmy.world 196 points 2 months ago* (last edited 2 months ago)

What if I prefer this?

#define CURLYOPENRIGHTCLOSEDLEFTBRACKET {
#define CURLYOPENLEFTCLOSEDRIGHTBRACKET }
#define CURVYOPENRIGHTCLOSEDLEFTBRACKET (
#define CURVYOPENLEFTCLOSEDRIGHTBRACKET )
#define PERIODWITHPERIODONTOP :
#define COMMAWITHPERIODONTOP ;

int main CURVYOPENRIGHTCLOSEDLEFTBRACKET CURVYOPENLEFTCLOSEDRIGHTBRACKET CURLYOPENRIGHTCLOSEDLEFTBRACKET
  if CURVYOPENRIGHTCLOSEDLEFTBRACKET 1 CURVYOPENLEFTCLOSEDRIGHTBRACKET CURLYOPENRIGHTCLOSEDLEFTBRACKET
    asm volatile CURVYOPENRIGHTCLOSEDLEFTBRACKET
      "mov $1, %%rax\n"
      "mov $1, %%rdi\n"
      "lea message(%%rip), %%rsi\n"
      "mov $4, %%edx\n"
      "syscall\n"
      PERIODWITHPERIODONTOP
      PERIODWITHPERIODONTOP
      PERIODWITHPERIODONTOP "%rax", "%rdi", "%rsi", "%rdx"
    CURVYOPENLEFTCLOSEDRIGHTBRACKET COMMAWITHPERIODONTOP
  CURLYOPENLEFTCLOSEDRIGHTBRACKET
  return 0 COMMAWITHPERIODONTOP
CURLYOPENLEFTCLOSEDRIGHTBRACKET

asm CURVYOPENRIGHTCLOSEDLEFTBRACKET ".section .data\n"
  "message: .ascii \"wut\\n\"\n"
  ".section .text\n" CURVYOPENLEFTCLOSEDRIGHTBRACKET COMMAWITHPERIODONTOP
[-] humbletightband@lemmy.dbzer0.com 92 points 2 months ago

You can't be helped, sorry. We will put you to an asylum for people like you

[-] milicent_bystandr@lemm.ee 28 points 2 months ago

Asylum? We have the electric chair for this.

[-] humbletightband@lemmy.dbzer0.com 12 points 2 months ago

Yeah, now I see why you want him dead. He used mov after lea

load more comments (9 replies)
this post was submitted on 28 Jul 2024
1305 points (99.0% liked)

Programmer Humor

19315 readers
4 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS