from Hacker News

Ask HN: What single line of code would you put on a programming shirt?

by codingclaws on 6/16/24, 11:32 PM with 41 comments

If you were going to make a programming shirt with one line of code or one expression on the front of the shirt right in the middle what would it be? Examples:

(+ 1 2)

or

++i;

or

x ? x : y

  • by rzzzwilson on 6/17/24, 12:41 AM

    If it has to be one line, the comment:

        You are not expected to understand this.
    
    from https://en.m.wikipedia.org/wiki/A_Commentary_on_the_UNIX_Ope... .
  • by rcfox on 6/17/24, 12:47 AM

    :(){ :|:& };:

    Though, now that I think about it, I'm pretty sure I've already seen that as a t-shirt.

  • by smarm52 on 6/17/24, 1:01 AM

    // DON'T TRY TO FIX THIS, IF REMOVED BREAKS PRODUCTION
  • by fuzzfactor on 6/17/24, 2:45 AM

    If the footwear was appropriate, you could say something like:

    >BOOT DEVICE NOT FOUND;

    >FALLING BACK TO SNEAKERNET . . .

  • by afitnerd on 6/17/24, 10:15 AM

    Bash fork bomb. In fact, I have the tshirt.

    :(){ :|:& };:

    Good explanation here: https://www.cyberciti.biz/faq/understanding-bash-fork-bomb/

  • by ahazred8ta on 6/17/24, 12:00 AM

    The export-restricted perl munition t-shirt text:

    http://www.cypherspace.org/adam/rsa/

    #!/bin/perl -sp0777i<X+dlMLa^lN%0]dsXx++lMlN/dsM0<j]dsj

  • by drstewart on 6/17/24, 12:49 AM

    // TODO: Fix me
  • by fuzzfactor on 6/17/24, 1:24 AM

    Haven't seen this in a while;

    There are 10 kinds of people in the world, those who understand binary and those who do not.

  • by 082349872349872 on 6/17/24, 8:57 AM

      ⊢>+⌿÷≢
    
    (seen at https://www.bonfire.com/store/arcfide/ )

      ────┬────
      ┬─┬ ┼─┬─┬
      └─┤ │ ├─┘
      │ ├─┘
      └─┘
    
    (I don't think Tromp has merch)
  • by 120bits on 6/17/24, 1:06 AM

    Fast inverse square root

    0x5f3759df - ( i >> 1 );

    https://github.com/scienceetonnante/Fast-Inverse-Square-Root...

  • by callamdelaney on 6/17/24, 8:49 AM

        import pdb; pdb.set_trace()
    
    Or as one of these 'modern' 'linters' like to 'fix' it to:

        import pdb
        
        
        pdb.set_trace()
  • by wruza on 6/17/24, 1:44 AM

    I’d put $year: ERR_REQUIRE_ESM require of ES module strip-ansi not supported, cause people should know that it’s 202x and we are still practically almost already there.
  • by langcss on 6/17/24, 8:39 AM

        const char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
  • by AA-BA-94-2A-56 on 6/17/24, 4:27 AM

        def sleep():
            return sleep()
  • by Jeremy1026 on 6/17/24, 12:44 PM

    I have a shirt from WWDC 2014 that I find humorous:

    func yTown() { print("San Francisco WWDC 2014") }

  • by ChrisGranger on 6/17/24, 2:25 AM

    body { display: none !important; }
  • by throwaway211 on 6/17/24, 11:12 AM

    I'm not sure exactly, but I'd probably write it in Whitespace.
  • by codetrotter on 6/16/24, 11:37 PM

    20 GOTO 10
  • by Doctor-R on 6/16/24, 11:47 PM

    System.out.println("Hello World");
  • by gaoryrt on 6/17/24, 6:00 AM

    const y = f => (x => f(x(x))) (x => f((...y) => x(x)(...y)))
  • by gaws on 6/17/24, 5:00 PM

    for (;;) { printf("%s\n", "I'm in danger!"); };
  • by ksherlock on 6/17/24, 5:14 PM

    life ← {⊃1 ⍵ ∨.∧ 3 4 = +/ +⌿ ¯1 0 1 ∘.⊖ ¯1 0 1 ⌽¨ ⊂⍵}
  • by t1mmen on 6/17/24, 1:56 AM

    /* WIP */
  • by neontomo on 6/17/24, 2:37 AM

    var let const input = variableConstant(true) - 100
  • by al_borland on 6/17/24, 12:25 AM

    return videotapes;
  • by lotsoweiners on 6/17/24, 6:46 AM

    Not really programming or one line but: 01010011 01101000 01101111 01110111 00100000 01101101 01100101 00100000 01111001 01101111 01110101 01110010 00100000 01110100 01101001 01110100 01110011
  • by petargyurov on 6/17/24, 12:48 PM

    # noqa
  • by p0d on 6/17/24, 6:25 AM

    print("Nike")
  • by geophph on 6/17/24, 12:00 AM

    // what the fuck?
  • by avinassh on 6/17/24, 10:18 AM

    fsync();