MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/wdlvla/printhello_world/iik9554
r/ProgrammerHumor • u/a-slice-of-toast • Aug 01 '22
5.7k comments sorted by
View all comments
Show parent comments
539
Here's a perfectly valid line of C++
[](){}();
662 u/Aureo_Speedwagon Aug 01 '22 Here's a perfectly valid line of javascript(![]+[])[+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]][([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(!![]+[])[+!![]]](((!![]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(![]+[])[+!![]]))()([][[]]))[+!![]+[]+(+!![])]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+!![]]+(![]+[])[+[]]+(!![]+[])[!![]+!![]+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(![]+[])[!![]+!![]]+([][([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(!![]+[])[+!![]]]+[])[+!![]+[]+(!![]+!![]+!![])]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+[]+(+!![])]+(![]+[])[+!![]]+(![]+[])[!![]+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+([][[]]+[])[!![]+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+(![]+[])[!![]+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+([][[]]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(![]+[])[+[]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]+!![]]+(![]+[])[+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+[]+(+!![])]+(![]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]][([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(!![]+[])[+!![]]](((!![]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(![]+[])[+!![]]))()([][[]]))[+!![]+[]+(+!![])]+(!![]+[])[+[]] 394 u/MakionGarvinus Aug 02 '22 So, when you find this code, do you go back to the programmer and just start beating them? 167 u/Aureo_Speedwagon Aug 02 '22 I wrote it myself, so... 140 u/[deleted] Aug 02 '22 [removed] — view removed comment 8 u/AverageComet250 Aug 02 '22 I’ll come with you just dm the address → More replies (1) 3 u/[deleted] Aug 02 '22 [removed] — view removed comment → More replies (1) 3 u/MISTERDIEABETIC Aug 02 '22 So if he beats himself afterwords..... Is this programming fourplay? → More replies (2) 8 u/wombat_kombat Aug 02 '22 Time to get out the ole’ hwhippin stick boy /s 4 u/kasajizocat Aug 02 '22 Did you beat yourself? → More replies (5) 4 u/A-le-Couvre Aug 02 '22 A colleague of my dad was so proud to get an entire program running in 2 lines of code.But then someone changed the requirements and everything broke. → More replies (3) 43 u/CaliBounded Aug 02 '22 I just made such an ugly face 14 u/stillnxgxldteeth Aug 02 '22 jAvAsCrIpT iS wAy MoRe EfFicIeNt 10 u/Aureo_Speedwagon Aug 02 '22 Super efficient! It only takes 6 distinct characters to write anything! 6 u/stillnxgxldteeth Aug 02 '22 A JavaScript dev once told me, His Rubber Duck commited suicide, when he tried to explain his code 8 u/seaworthy-sieve Aug 02 '22 01110100 01101000 01100001 01101110 01101011 01110011 00100000 01101001 00100000 01101000 01100001 01110100 01100101 00100000 01101001 01110100 00100000 4 u/[deleted] Aug 02 '22 Can confirm → More replies (1) 6 u/edrivah Aug 02 '22 Jsfuck for the win! 4 u/WhoMovedMyFudge Aug 02 '22 Just because you can, doesn't mean you should. Holy crap 3 u/DarkRehan Aug 02 '22 Ah excuse me wtf 2 u/[deleted] Aug 02 '22 so this is mind fuck language 2 u/absolutefuckingbitch Aug 02 '22 AAAAHHHHH MY EYES HURT → More replies (21) 11 u/ApproximateArmadillo Aug 02 '22 edited Aug 02 '22 [](){}();May I introduce the same expression using digraphs?<::>()<%%>();Or even trigraphs (removed in C++17):??(??)()??<??>(); 4 u/CanadaPlus101 Aug 02 '22 Can someone break down how this works for me? I expect this shit from javascript, but not C++. 11 u/Alphard428 Aug 02 '22 It's defining an empty lambda and calling it. Captures nothing (the square braces), takes no arguments (first parentheses), has an empty body (curly braces), and is invoked (second parentheses). → More replies (1) → More replies (1)
662
Here's a perfectly valid line of javascript
(![]+[])[+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]][([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(!![]+[])[+!![]]](((!![]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(![]+[])[+!![]]))()([][[]]))[+!![]+[]+(+!![])]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+!![]]+(![]+[])[+[]]+(!![]+[])[!![]+!![]+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(![]+[])[!![]+!![]]+([][([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(!![]+[])[+!![]]]+[])[+!![]+[]+(!![]+!![]+!![])]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+[]+(+!![])]+(![]+[])[+!![]]+(![]+[])[!![]+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+([][[]]+[])[!![]+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+(![]+[])[!![]+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+([][[]]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(![]+[])[+[]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]+!![]]+(![]+[])[+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+[]+(+!![])]+(![]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]][([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([][(![]+[])[+!![]]+(!![]+[])[+[]]]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(!![]+[])[+!![]]](((!![]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+(+[][[]]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+!![])]+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+(![]+[]+[][[]])[+!![]+[]+(+[])]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+!![]]+(!![]+[])[+[]]])[+!![]+[]+(+[])]+(![]+[])[+!![]]))()([][[]]))[+!![]+[]+(+!![])]+(!![]+[])[+[]]
394 u/MakionGarvinus Aug 02 '22 So, when you find this code, do you go back to the programmer and just start beating them? 167 u/Aureo_Speedwagon Aug 02 '22 I wrote it myself, so... 140 u/[deleted] Aug 02 '22 [removed] — view removed comment 8 u/AverageComet250 Aug 02 '22 I’ll come with you just dm the address → More replies (1) 3 u/[deleted] Aug 02 '22 [removed] — view removed comment → More replies (1) 3 u/MISTERDIEABETIC Aug 02 '22 So if he beats himself afterwords..... Is this programming fourplay? → More replies (2) 8 u/wombat_kombat Aug 02 '22 Time to get out the ole’ hwhippin stick boy /s 4 u/kasajizocat Aug 02 '22 Did you beat yourself? → More replies (5) 4 u/A-le-Couvre Aug 02 '22 A colleague of my dad was so proud to get an entire program running in 2 lines of code.But then someone changed the requirements and everything broke. → More replies (3) 43 u/CaliBounded Aug 02 '22 I just made such an ugly face 14 u/stillnxgxldteeth Aug 02 '22 jAvAsCrIpT iS wAy MoRe EfFicIeNt 10 u/Aureo_Speedwagon Aug 02 '22 Super efficient! It only takes 6 distinct characters to write anything! 6 u/stillnxgxldteeth Aug 02 '22 A JavaScript dev once told me, His Rubber Duck commited suicide, when he tried to explain his code 8 u/seaworthy-sieve Aug 02 '22 01110100 01101000 01100001 01101110 01101011 01110011 00100000 01101001 00100000 01101000 01100001 01110100 01100101 00100000 01101001 01110100 00100000 4 u/[deleted] Aug 02 '22 Can confirm → More replies (1) 6 u/edrivah Aug 02 '22 Jsfuck for the win! 4 u/WhoMovedMyFudge Aug 02 '22 Just because you can, doesn't mean you should. Holy crap 3 u/DarkRehan Aug 02 '22 Ah excuse me wtf 2 u/[deleted] Aug 02 '22 so this is mind fuck language 2 u/absolutefuckingbitch Aug 02 '22 AAAAHHHHH MY EYES HURT → More replies (21)
394
So, when you find this code, do you go back to the programmer and just start beating them?
167 u/Aureo_Speedwagon Aug 02 '22 I wrote it myself, so... 140 u/[deleted] Aug 02 '22 [removed] — view removed comment 8 u/AverageComet250 Aug 02 '22 I’ll come with you just dm the address → More replies (1) 3 u/[deleted] Aug 02 '22 [removed] — view removed comment → More replies (1) 3 u/MISTERDIEABETIC Aug 02 '22 So if he beats himself afterwords..... Is this programming fourplay? → More replies (2) 8 u/wombat_kombat Aug 02 '22 Time to get out the ole’ hwhippin stick boy /s 4 u/kasajizocat Aug 02 '22 Did you beat yourself? → More replies (5) 4 u/A-le-Couvre Aug 02 '22 A colleague of my dad was so proud to get an entire program running in 2 lines of code.But then someone changed the requirements and everything broke. → More replies (3)
167
I wrote it myself, so...
140 u/[deleted] Aug 02 '22 [removed] — view removed comment 8 u/AverageComet250 Aug 02 '22 I’ll come with you just dm the address → More replies (1) 3 u/[deleted] Aug 02 '22 [removed] — view removed comment → More replies (1) 3 u/MISTERDIEABETIC Aug 02 '22 So if he beats himself afterwords..... Is this programming fourplay? → More replies (2) 8 u/wombat_kombat Aug 02 '22 Time to get out the ole’ hwhippin stick boy /s 4 u/kasajizocat Aug 02 '22 Did you beat yourself? → More replies (5)
140
[removed] — view removed comment
8 u/AverageComet250 Aug 02 '22 I’ll come with you just dm the address → More replies (1) 3 u/[deleted] Aug 02 '22 [removed] — view removed comment → More replies (1) 3 u/MISTERDIEABETIC Aug 02 '22 So if he beats himself afterwords..... Is this programming fourplay? → More replies (2)
8
I’ll come with you just dm the address
→ More replies (1)
3
So if he beats himself afterwords..... Is this programming fourplay?
Time to get out the ole’ hwhippin stick boy /s
4
Did you beat yourself?
A colleague of my dad was so proud to get an entire program running in 2 lines of code.
But then someone changed the requirements and everything broke.
43
I just made such an ugly face
14
jAvAsCrIpT iS wAy MoRe EfFicIeNt
10 u/Aureo_Speedwagon Aug 02 '22 Super efficient! It only takes 6 distinct characters to write anything! 6 u/stillnxgxldteeth Aug 02 '22 A JavaScript dev once told me, His Rubber Duck commited suicide, when he tried to explain his code
10
Super efficient! It only takes 6 distinct characters to write anything!
6 u/stillnxgxldteeth Aug 02 '22 A JavaScript dev once told me, His Rubber Duck commited suicide, when he tried to explain his code
6
A JavaScript dev once told me, His Rubber Duck commited suicide, when he tried to explain his code
01110100 01101000 01100001 01101110 01101011 01110011 00100000 01101001 00100000 01101000 01100001 01110100 01100101 00100000 01101001 01110100 00100000
4 u/[deleted] Aug 02 '22 Can confirm → More replies (1)
Can confirm
Jsfuck for the win!
Just because you can, doesn't mean you should. Holy crap
Ah excuse me wtf
2
so this is mind fuck language
AAAAHHHHH MY EYES HURT
11
May I introduce the same expression using digraphs?
<::>()<%%>();
Or even trigraphs (removed in C++17):
??(??)()??<??>();
Can someone break down how this works for me? I expect this shit from javascript, but not C++.
11 u/Alphard428 Aug 02 '22 It's defining an empty lambda and calling it. Captures nothing (the square braces), takes no arguments (first parentheses), has an empty body (curly braces), and is invoked (second parentheses). → More replies (1)
It's defining an empty lambda and calling it. Captures nothing (the square braces), takes no arguments (first parentheses), has an empty body (curly braces), and is invoked (second parentheses).
539
u/LordofNarwhals Aug 01 '22
Here's a perfectly valid line of C++