It looks like this comment contains a code block delimited with triple backticks. Unfortunately reddit does not have universal support for this syntax and your comment will not render correctly on old reddit and most mobile apps.
For the benefit of people on old reddit, this link will take you to a correct rendering of the comment.
/u/HaroldTheSenpai, it would be appreciated, but not required, if you could edit your comment to use the more compatible four space indention format. For single lines or inline code you can use single backticks.
In addition, to my knowledge python is the only language (other than whitespace, which was created as a joke) in which code can be written with a standard QWERTY keyboard (with no numberpad) that is visibly identical to differently functioning code.
Brainfuck is an esoteric programming language created in 1993 by Urban MΓΌller. Notable for its extreme minimalism, the language consists of only eight simple commands, a data pointer and an instruction pointer. While it is fully Turing complete, it is not intended for practical use, but to challenge and amuse programmers. Brainfuck simply requires one to break commands into microscopic steps.
Right, how could I forget about esoteric languages like brainfuck, whitespace, and Half Broken Car in Heavy Traffic, none of which use brackets or line-end characters.
232
u/MkemCZ Aug 12 '21
You truly captured the butterfly-pigeon meme using emoji and text. The code is awful; I love it!
64
u/silverweaver Aug 12 '21
I think chaining ternary operators in one line as much as possible became my new favourite unreadable code thing.
28
u/PyroneusUltrin Aug 12 '21
why would you do
+ "zz"instead of just putting zz after the }17
u/noobzilla Aug 12 '21
I'm a fan of this myself:
Enumerable.Repeat(new[] { "","","","","Buzz"}, 20).SelectMany(x => x).Zip(Enumerable.Repeat(new[] { "","","Fizz" }, 34).SelectMany(x => x), (a,b) => b + a).Select((x,i) => string.IsNullOrWhiteSpace(x) ? (i+1).ToString() : x).Any(x => { Console.WriteLine(x); return false; });12
u/Lost4468 Aug 12 '21
Nice, I also wrote a clean version in C# years ago:
I know reddit likes to mess about with line formatting for code blocks, so here's a picture.
11
u/MaatjeBroccoli Aug 12 '21
I know you're joking but on the off-chance you're not: NO
6
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Aug 12 '21 edited Aug 12 '21
Image Transcription: Code
I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!
2
u/thygrrr Sep 02 '21
Huh, I actually like it.
The boolean terms look a tad contrived.
85
u/Ytrog Aug 12 '21
Reminds me of the ray tracer written in one LINQ statement.
Can't find the original blog post, but here is the code: https://github.com/lukehoban/LINQ-raytracer
53
u/BarqsDew Aug 12 '21
No, fails to follow DRY principle, I see two "z" characters right next to eachother, c'mon man.
14
u/ulysses_black Aug 12 '21
It is less than three lines of code, so YES!
8
u/misterrandom1 Aug 12 '21
I love this so much. I'm now motivated to create a masterpiece. Maybe do a fibonacci thing with Roman numerals.
4
u/stahkh Aug 12 '21
It looks like someone treated this line like a rug. Just swept all of the stuff under it...
4
u/NuBRandsta Aug 12 '21
Hmm i think the pythoneer forget that you shouldn't do a one liner like this
4
u/[deleted] Aug 12 '21
I'm pretty sure I can hear my compiler cry in the background
1
u/Not_Sugden Aug 12 '21
no
1
u/jens3302 Aug 12 '21
You're hired
7
u/[deleted] Aug 12 '21
You should see this:
2
u/Lothrazar Aug 12 '21
I would not hire this person
2
u/inventord Aug 12 '21
If it works, it works. Save the revision for tomorrow...
Or the next day...
Or maybe a couple weeks
Or after the next project you start...
2
u/karisigurd4444 Aug 12 '21
Fuck no. You do enumerable range, then to list.
2
u/[deleted] Aug 12 '21
this code nearly gave me a seizure. good work
1
u/Chris90483 Aug 12 '21
Ew, side effects
1
u/VirdiPravum Aug 12 '21
When you are trying to do oneliner in shell it looks like this
1
u/Anonymous3355 Aug 13 '21
Ah yes, Code Golf
1
u/ososalsosal Aug 13 '21
Well at least they saved a few repeated characters by using string manipulation to create the output string.
What a nightmare.
1
u/Gladamas Aug 13 '21
Obviously compactness is much more important than readability. /s
1
u/purbub Aug 13 '21
I think you need to fix your Enter key
1
u/iamafraazhussain Aug 13 '21
The code is so clean, It'd commit suicide if it could...
-23
u/incoralium Aug 12 '21 edited Aug 13 '21
Clean code don't apply to languages using brackets and semicolon. You need a clean language to do clean code.
/s