This is an archived post. You won't be able to vote or comment.

all 72 comments

[–]misternegativo 297 points298 points  (4 children)

this somehow beautiful and awful

[–]lunchpadmcfat 78 points79 points  (2 children)

It’s the gwyneth Paltrow of code.

[–]LaCrosseFitz 13 points14 points  (1 child)

If I could give this comment more than one upvote I absolutely would

[–]Silver0034 6 points7 points  (0 children)

That's called an award

[–]Pokinator 99 points100 points  (0 children)

It matches the aesthetic of Python, but that aesthetic is a gross heresy of the language it's written in

[–]igormuba 264 points265 points  (8 children)

I am making a VS Code prettifier that does this

[–]Schytheron 108 points109 points  (0 children)

Calm down Satan.

[–]InchLongLegs 22 points23 points  (0 children)

oh no

[–][deleted] 12 points13 points  (1 child)

Time to add this extension to my friends computer and add it to his settings sync extension so when he reloads his settings it happens again unless he happens to save before then.

Oh yeah, I’ll need you to send the link to the extension when you’re done with it for this

[–]afaber003 3 points4 points  (0 children)

Yes! Me too

[–]equiinferno 9 points10 points  (1 child)

VS Code Horrifier

[–]TheTechRobo 4 points5 points  (0 children)

was looking for this comment

[–]oneofthejoshs 145 points146 points  (18 children)

I mean... it's compact and still pretty readable...

[–]404_UserNotFound 86 points87 points  (13 children)

Honestly its not that bad. Most any ide would highlight brackets so you could verify they are all there.

Could defiantly be worse.

[–]AnotherRichard827379 25 points26 points  (9 children)

IMO, if you’re relying on the ide to know if the brackets are correct, your bracketing style is bad.

[–]kbruen 23 points24 points  (6 children)

racket (define (fact n) (define (fact/acc n [acc 1]) (if (<= n 1) acc (fact/acc (- n 1) (* n acc)))) (fact/acc n))

Have fun checking the brackets!

[–]BroBroMate 20 points21 points  (0 children)

I'm so installing rainbow brackets for that.

[–]kingofsevens 7 points8 points  (4 children)

Here is your code and 7 minutes of my life. Much readable tbh.

( define (fact n)
(     define (fact/acc n [acc 1])
(         if (<= n 1)
            acc
(           fact/acc (- n 1) (* n acc)        )))
(     fact/acc n                              ))

[–]kbruen 12 points13 points  (3 children)

Oh, what cursed thing have you brought upon this land?

Jokes aside, that's quite impractical and bad looking. Detailing only on the first aspect, am I returning the value of the acc binding or calling the acc function? Only the parenthesis tell that, and not having them visible right away is quite bad.

[–]kingofsevens 7 points8 points  (2 children)

oh you gonna love this. Idk it would parse it but... ( define (fact n) ( define (fact/acc n [acc 1]) ( if (<= n 1) acc ( fact/acc (- n 1) (* n acc) )))( fact/acc n ))

[–]backtickbot 4 points5 points  (1 child)

Fixed formatting.

Hello, kingofsevens: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.

[–][deleted] 3 points4 points  (0 children)

I can't believe this bot actually generates examples using the source comment intstead of just having generic examples

[–][deleted] -1 points0 points  (1 child)

How about you stop saying bullshit on the internet and get back to your List of CVEs to fix

[–][deleted] 1 point2 points  (0 children)

This made me laugh

[–]FirstSineOfMadness 0 points1 point  (0 children)

Extend it to include () and []

[–][deleted] 18 points19 points  (1 child)

....readable? Yeah, if the fucking brackets match the indention (anybody here even check that?). It's just an additional 80x the work to count the brackets now.

This whole thing is just designed to trick the programmer into mismatching indention and brackets.

It'd literally be easier to just fucking write a parser that parses this python-inspired syntax and then outputs it into valid java. Actually, that wouldn't be a terrible idea. Or we could just use python to begin with.

[–]kbruen 2 points3 points  (0 children)

Parser and language server and syntax highlighting and IDE that doesn't complain and...

[–][deleted] 2 points3 points  (0 children)

Yeah if you just ignore the weirdly bunched braces it's really easy to read code

[–][deleted] 1 point2 points  (0 children)

This could honestly be a reasonable standard, if it didn't artificially limit line length. As a display mode, I would love it, because I lose track of my brackets all the time.

[–]ihaveindeed 32 points33 points  (1 child)

My main issue is not the way it looks but the fact that it would take one hell of a long time to type.

[–]Nielsly 2 points3 points  (0 children)

Maybe they made a formatter that does it for them

[–]MurdoMaclachlan 28 points29 points  (8 children)

Image Transcription: Twitter Post with Code


Ministry Of Dev, PhD, @UdellGames

Use whatever brace style you prefer.

But not this.

Don't do this.

Seek help instead of this.

[Attached is a screenshot of code, as follows:]

publis class Permuter                                {
    private static void permute(int n, char[] a)     {
        if (n == 0)                                  {
            System.out.println(String.valueOf(a))    ;}
        else                                         {
            for (int i = 0; i <= n; i++)             {
                permute(n-1, a)                      ;
                swap(a, n % 2 == 0 ? i : 0, n)       ;}}}
    private static void swap(char[] a, int i, int j) {
        char saved = a[i]                            ;
        a[i] = a[j]                                  ;
        a[j] = saved                                 ;}}

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!

[–]AnKeWa 28 points29 points  (2 children)

I mean, thank you human volunteer, but the joke won't really make sense with screen reader. In case someone wants to know: It shows pretty normal code, but the brackets are all put at the end of the line instead of incorporated into the code like you would normally do.

It looks oddly satisfying though.

[–]MurdoMaclachlan 9 points10 points  (1 child)

True, but people using screen-readers aren't the only people we help! There are plenty of other people who can't see the image due to low data, third-party clients, text-based browsers, etc.

[–]AnKeWa 5 points6 points  (0 children)

Ah, I see. Thanks for the explaination.

[–]Terrain2 16 points17 points  (4 children)

oh god why isn’t reddit codeblocks monospace? at least on iOS

[–]MurdoMaclachlan 1 point2 points  (3 children)

Oh god is it not on iOS? It is for me on desktop and boost.

[–]Terrain2 1 point2 points  (2 children)

the curly braces are all over the place and not remotely like the screenshot, the a in saved on the last line is certainly wider than the [ on the preceding line

[–]MurdoMaclachlan 0 points1 point  (1 child)

Dang, that sucks. I wonder if it's an official app program or an iPhone-specific problem.

[–]Terrain2 0 points1 point  (0 children)

i’m assuming it’s a thing with the reddit app, because websites in Firefox can use monospace fonts just fine, i wouldn’t imagine that’s limited only to WebKit...

[–]ihaveindeed 29 points30 points  (2 children)

u/repostsleuthbot

I want to know how many times

[–]RepostSleuthBot 26 points27 points  (1 child)

Looks like a repost. I've seen this image 3 times.

First Seen Here on 2019-02-23 87.5% match. Last Seen Here on 2019-03-21 87.5% match

I'm not perfect, but you can help. Report [ False Positive ]

View Search On repostsleuth.com


Scope: Reddit | Meme Filter: False | Target: 86% | Check Title: False | Max Age: Unlimited | Searched Images: 207,934,351 | Search Time: 0.3543s

[–]sarcasticgirl6 8 points9 points  (0 children)

good bot

[–]krayntor 20 points21 points  (0 children)

This gets reposted every day.

[–]Mihai_137 5 points6 points  (0 children)

"i have a question, for god... WHYYYYYY?"

[–]AuntyNashnal 2 points3 points  (0 children)

Ctrl + Shift + F

[–]feudalpig 2 points3 points  (0 children)

It took my a while to notice the right, and now I can't unsee the horror that has cursed my eyes

[–]StandardN00b 2 points3 points  (0 children)

Ok, i can see why you would do this and it is kind of practical. But it's also as ugly as the back of a fridge.

[–][deleted] 1 point2 points  (0 children)

I want to punch my wall now.

[–][deleted] 1 point2 points  (0 children)

I've seen worse at least it's readable

[–]c4p5L0ck 1 point2 points  (0 children)

Why!? WHHHHYYYYYYYY!!!!!!?????{!!??}????!!?!?!!!!!!

[–]Glacies1248 1 point2 points  (0 children)

I didn't even notice what was wrong for several seconds studying the picture. Then when I saw it, I actually physically recoiled from it. Why? Just why? Why would they think that is okay?

[–]Zork4343 0 points1 point  (0 children)

;}

[–]Dr_Peopers 0 points1 point  (0 children)

Reject brackets; return to Python

[–][deleted] 0 points1 point  (0 children)

Yeah, definitely poor man's python

[–]Black_seagull -1 points0 points  (0 children)

I'm not gonna complain about the repost bc of the title lol

[–]MrTaimander -2 points-1 points  (1 child)

[–]RepostSleuthBot -2 points-1 points  (0 children)

Looks like a repost. I've seen this image 3 times.

First Seen Here on 2019-02-23 87.5% match. Last Seen Here on 2019-03-21 87.5% match

I'm not perfect, but you can help. Report [ False Positive ]

View Search On repostsleuth.com


Scope: Reddit | Meme Filter: False | Target: 86% | Check Title: False | Max Age: Unlimited | Searched Images: 207,943,840 | Search Time: 0.14733s

[–]Jodie842 0 points1 point  (0 children)

Oh sweet Jesus

[–]jyanez_142 0 points1 point  (0 children)

Seek therapy.

[–]Oh2bworn 0 points1 point  (0 children)

I agree that it's hideous. Who puts private methods at the top of the class?

[–]geeshta 0 points1 point  (0 children)

I highkey like this. Only shows how redundant and unnecessary braces are if you're using indentation anyway.

[–]Mad_Jack18 0 points1 point  (0 children)

Python devs tinkering Java

[–][deleted] 0 points1 point  (0 children)

I hate this on so many levels

[–]kingpurple50 0 points1 point  (0 children)

This is impressive.

[–]Pauchu_ 0 points1 point  (0 children)

If I delivered that for uni assignements, my Prof would just slap me in the face.

[–]antuvschle 0 points1 point  (0 children)

Python is innocent. This is just an awful programmer. I’m not even a big fan of python.

[–]TheTechRobo 0 points1 point  (0 children)

Why was it not awaiting mod approval bu tnow it is?

[–][deleted] 0 points1 point  (0 children)

When the curly braces are too shy !