7 ms·
Ask HN: What single line of code would you put on a programming shirt?
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
- codetrotter 2y ago20 GOTO 10
- gabrielsroka 2y agoOr 10 PRINT CHR$(205.5+RND(1)); : GOTO 10
- Doctor-R 2y agoSystem.out.println("Hello World");
- geophph 2y ago// what the fuck?
- talldayo 2y ago// evil floating point bit level hacking
- ahazred8ta 2y agoThe export-restricted perl munition t-shirt text: http://www.cypherspace.org/adam/rsa/ http://www.cypherspace.org/adam/rsa/ #!/bin/perl -sp0777i<X+dlMLa^lN%0]dsXx++lMlN/dsM0<j]dsj
- al_borland 2y agoreturn videotapes;
- deleted 2y ago[deleted]
- rzzzwilson 2y agoIf 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_Operating_System https://en.m.wikipedia.org/wiki/A_Commentary_on_the_UNIX_Ope... .
- rcfox 2y ago:(){ :|:& };: Though, now that I think about it, I'm pretty sure I've already seen that as a t-shirt.
- wruza 2y agoIs that a shell script? Doesn’t seem to do anything on my linux server.
- trealira 2y agoIt's a fork bomb in shell script. It's more human readable like this: bomb() { bomb | bomb & }; bomb Apparently this trick doesn't work nowadays due to cgroups: https://unix.stackexchange.com/questions/469950/why-cant-i-crash-my-system-with-a-fork-bomb https://unix.stackexchange.com/questions/469950/why-cant-i-c...
- wruza 2y agoJust kidding :) First thing you learn in unix is to not paste gibberish in terminal.
- drstewart 2y ago// TODO: Fix me
- smarm52 2y ago// DON'T TRY TO FIX THIS, IF REMOVED BREAKS PRODUCTION
- 120bits 2y agoFast inverse square root 0x5f3759df - ( i >> 1 ); https://github.com/scienceetonnante/Fast-Inverse-Square-Root/blob/main/part1.c#L15 https://github.com/scienceetonnante/Fast-Inverse-Square-Root...
- fuzzfactor 2y agoHaven't seen this in a while; There are 10 kinds of people in the world, those who understand binary and those who do not.
- codegladiator 2y agoand those who mistake it for binary.
- defrost 2y agothat's why it works better with 11
- wruza 2y agoI’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.
- t1mmen 2y ago/* WIP */
- deleted 2y ago[deleted]
- ChrisGranger 2y agobody { display: none !important; }
- neontomo 2y agovar let const input = variableConstant(true) - 100
- fuzzfactor 2y agoIf the footwear was appropriate, you could say something like: >BOOT DEVICE NOT FOUND; >FALLING BACK TO SNEAKERNET . . .
- AA-BA-94-2A-56 2y agodef sleep(): return sleep()
- gaoryrt 2y agoconst y = f => (x => f(x(x))) (x => f((...y) => x(x)(...y)))
- p0d 2y agoprint("Nike")
- meiraleal 2y agoThe only good one
- lotsoweiners 2y agoNot really programming or one line but: 01010011 01101000 01101111 01110111 00100000 01101101 01100101 00100000 01111001 01101111 01110101 01110010 00100000 01110100 01101001 01110100 01110011
- simonblack 2y agoI used to say that to my girlfriend. She did.
- gabrielsroka 2y agoNSFW JavaScript:String.fromCharCode(...'01010011 01101000 01101111 01110111 00100000 01101101 01100101 00100000 01111001 01101111 01110101 01110010 00100000 01110100 01101001 01110100 01110011'.split(' ').map(i => parseInt(i, 2)))
- langcss 2y agoconst char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
- callamdelaney 2y agoimport pdb; pdb.set_trace() Or as one of these 'modern' 'linters' like to 'fix' it to: import pdb pdb.set_trace()
- maest 2y agoI second your annoyance with linters doing that. You can add #noqa at the end of the line to avoid the linter rewrite.
- 082349872349872 2y ago⊢>+⌿÷≢ (seen at https://www.bonfire.com/store/arcfide/ https://www.bonfire.com/store/arcfide/ ) ────┬──── ┬─┬ ┼─┬─┬ └─┤ │ ├─┘ │ ├─┘ └─┘ (I don't think Tromp has merch)
- afitnerd 2y agoBash fork bomb. In fact, I have the tshirt. :(){ :|:& };: Good explanation here: https://www.cyberciti.biz/faq/understanding-bash-fork-bomb/ https://www.cyberciti.biz/faq/understanding-bash-fork-bomb/
- avinassh 2y agofsync();
- throwaway211 2y agoI'm not sure exactly, but I'd probably write it in Whitespace.
- Jeremy1026 2y agoI have a shirt from WWDC 2014 that I find humorous: func yTown() { print("San Francisco WWDC 2014") }
- petargyurov 2y ago# noqa
- gaws 2y agofor (;;) { printf("%s\n", "I'm in danger!"); };
- ksherlock 2y agolife ← {⊃1 ⍵ ∨.∧ 3 4 = +/ +⌿ ¯1 0 1 ∘.⊖ ¯1 0 1 ⌽¨ ⊂⍵}