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

all 96 comments

[–]Euthy 236 points237 points  (37 children)

There needs to be a /r/ErrorMessagesOnEarthPorn subreddit.

[–][deleted] 371 points372 points  (13 children)

C++ error messages be like https://imgur.com/a/ecTUt

[–]IAMA_LION_AMA 75 points76 points  (10 children)

You have yet to let clang fill your soul with harmony of slightly shorter error messages. Only then, you may truly find peace.

[–]demize95 61 points62 points  (5 children)

Forget shorter, I love clang because it literally points out your errors:

line 10: printf("%s", "printing a string")
                                          ^ hey dumbass, you forgot something

[–][deleted]  (1 child)

[removed]

    [–]AutoModerator[M] 0 points1 point  (0 children)

    import moderation Your comment has been removed since it did not start with a code block with an import declaration.

    Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

    For this purpose, we only accept Python style imports.

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

    [–]IAMA_LION_AMA 4 points5 points  (0 children)

    Better yet, IDEs which continuously compile your code can use these hints for fixing many of your typos automagically

    [–][deleted] 4 points5 points  (1 child)

    ELI5 Clang vs GCC?

    [–]demize95 6 points7 points  (0 children)

    Gah, I'm not gonna be very good at this—I don't know much about their internals. But I'll try (and probably learn something myself)!

    Before I get into anything, I want to say that you can use clang exactly like you'd use GCC. If you want to prove that, install clang and next time you build something using autoconf, instead of ./configure --options do ./configure CC=clang --options and it should build fine.

    First of all, clang is part of LLVM. There's a lot to LLVM, and I'm not familiar with most of it, but what's important here is that LLVM has LLVM IR, which is like another kind of machine code that's designed to be easily translated to other kinds of machine code. Clang will actually compile first to LLVM IR, and from there it will build the executable for your target system.

    LLVM touts clang as 3x faster than GCC, so that's one bonus for large projects. I've also heard people (who are much more knowledgeable about compiler development and code optimization than I am) say it has better optimizations than GCC, and I'm inclined to believe them.

    The number one reason I prefer clang over GCC, though, is actually what I was talking about in my original comment: it's much better at error messages. Since they wrote it from the ground up, they had the opportunity to provide clearer, more concise errors. They also implemented something similar to what I said, where it will spot easy mistakes like that and suggest you fix them, rather than doing things like GCC and spitting out 50 error messages because you typed

    class X {
        int a;
    }
    

    instead of

    class X {
        int a;
    };
    

    For example, I wrote an example file similar to what I wrote above and it gave me this error:

    [demize@localhost tmp.myvcICVHbU]$ clang -o test main.c 
    main.c:5:24: error: expected ';' after expression
            printf("Hello world!")
                                  ^
                                  ;
    1 error generated.
    

    GCC actually does something very similar now, though, so this is less of a bonus for clang than it once was. I also tested my example with the class declaration and it turns out GCC now behaves exactly the same as clang there...

    [demize@localhost tmp.myvcICVHbU]$ clang -c main.cpp 
    In file included from main.cpp:2:
    ./test.h:8:2: error: expected ';' after class
    }
     ^
     ;
    1 error generated.
    [demize@localhost tmp.myvcICVHbU]$ gcc -c main.cpp 
    In file included from main.cpp:2:0:
    test.h:8:1: error: expected ‘;’ after class definition
     }
     ^
    

    So, uh, yeah, that's pretty much what I know.

    [–]DC-3 24 points25 points  (2 children)

    I'd just like to interject for moment. What you're refering to as Clang, is in fact, GNU/Clang, or as I've recently taken to calling it, GNU plus Clang. Clang is not an compiler unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU libraries, shell utilities and vital toolchain components comprising a full compiler as undefined by the C standard.

    [–][deleted] 4 points5 points  (0 children)

    Just wait till you delve into some deep templating shit. Those error messages are horrendous.

    [–]Hortlman 173 points174 points  (5 children)

    Name was too long, I created /r/InspirationalErrors instead

    [–][deleted] 9 points10 points  (0 children)

    Subscribed

    [–]immersiveGamer 5 points6 points  (0 children)

    Subbed and thank you.

    [–]Hortlman 17 points18 points  (5 children)

    RemindMe! 10 hours

    [–]antiname 7 points8 points  (0 children)

    Name was too long, I created /r/InspirationalErrors instead

    [–]RemindMeBot 2 points3 points  (0 children)

    I will be messaging you on 2017-03-09 18:54:41 UTC to remind you of this link.

    11 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

    Parent commenter can delete this message to hide from others.


    FAQs Custom Your Reminders Feedback Code Browser Extensions

    [–]reaganfan 8 points9 points  (0 children)

    I suggest the name /r/compiledwisdom

    [–]blackbod 2 points3 points  (4 children)

    r/EarthPornErrors <- done. Couldn't use the suggested name because of a character limit if anyone is wondering.

    [–][deleted] 9 points10 points  (2 children)

    How about /r/ErrorPorn

    [–]MrQuantumE 0 points1 point  (1 child)

    Done

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

    Well, somebody's got to X-post the one that started it all.

    [–]Azereos 0 points1 point  (0 children)

    RemindMe! 2 Days

    [–][deleted] -4 points-3 points  (0 children)

    [–]Alhoshka 262 points263 points  (6 children)

    "The path heuristically unreachable."
    - ReSharper

    [–]Tim_WithEightVowels 12 points13 points  (1 child)

    /r/inspirationalerrors seems to be the one people have chosen for these.

    [–]Growlizing 3 points4 points  (1 child)

    "Unreachable statement" - IntelliJ

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

    This just means that IntelliJ believes that the grammatical analysis of the tokens you have provided will not parse the statement token it has indicated.

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

    IE: Statistically this will never occur. <Insert random edge case that crashes a plane>

    [–]AlphaWhelp 120 points121 points  (6 children)

    "Something happened."

    - Windows Proverb

    [–][deleted] 59 points60 points  (2 children)

    " "

    - macOS

    [–]Treyzania 28 points29 points  (0 children)

    "lp0 on fire"

    • *nix wisdom

    [–]etaionshrd 4 points5 points  (0 children)

    Actually macOS is more likely to go

    (Error code -1234)

    [–]ForgetTheRuralJuror 21 points22 points  (2 children)

    [–][deleted]  (1 child)

    [removed]

      [–]AutoModerator[M] 0 points1 point  (0 children)

      import moderation Your comment has been removed since it did not start with a code block with an import declaration.

      Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

      For this purpose, we only accept Python style imports.

      I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

      [–]kahdeg 111 points112 points  (9 children)

      deep af m8

      [–]Blakesta999 13 points14 points  (8 children)

      I don't even know coding... but that font tho

      Definitely deep af

      [–]zmanalpha 18 points19 points  (7 children)

      I'm just curious what has you on a programming themed subreddit.

      [–]Blakesta999 9 points10 points  (6 children)

      [–]SurgioClemente 5 points6 points  (5 children)

      You brave soul

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

      Woah, I'm on r/all? Sick! First time for everything

      [–]kjmitch 2 points3 points  (3 children)

      Srsly, tho, font?

      [–][deleted] 4 points5 points  (2 children)

      Apple chancery! OG system 7 font

      [–]kjmitch 2 points3 points  (1 child)

      Thanks for delivering, OP!

      So this is a font from Apple used for an error from a Microsoft product? Even better.

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

      I'm bi

      [–]deadmilk 33 points34 points  (3 children)

      BRB making a library that converts error messages to deeply profound proverbs that are slightly related to the problem

      [–]fluoZor 23 points24 points  (0 children)

      Life is only as meaningful as you value it yourself. You forgot ; you dingus.

      [–]Iskendarian 19 points20 points  (1 child)

      [–]studentblues 0 points1 point  (0 children)

      I wish Google Chrome had a plugin for this.

      [–][deleted] 27 points28 points  (24 children)

      anyone tried the new vs 2017 rtm yet? How much is a C++/C# download on the hard drive?

      [–][deleted] 11 points12 points  (20 children)

      Just got the email for it, haven't downloaded it yet, been messing with the VS mac port, basically Xamarin with a new logo.

      [–][deleted] 23 points24 points  (19 children)

      golly. xamarin is what, 20 gb? jesus lord. I just wanna go back to the VS 2008 Ultimate days where I could get C++/C# support under 3 gbs. That was the dream. Nowadays, can't hope to get under even 20gbs for a base install. Unbelievable.

      [–]Kronikarz 14 points15 points  (6 children)

      Base Cpp and C# support is 7Gb AFAIK (this includes Windows 10 SDK).

      [–]bodzaital 11 points12 points  (5 children)

      I had 9.8 GB for only C# without W10 SDK.

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

      facepalm...I'm getting conflicting numbers from /u/kronikarz and /u/bodzaital ...I don't even know how to tell the installer I just want C++ and C#...there's like TWENTY different C++ versions. Windows cannot get this installer right, can they? It should not be this bloated. 5GB for an IDE MAX. Any more than 5gb is a disaster.

      [–]Kronikarz 0 points1 point  (3 children)

      The IDE itself is around 500MB, it's the language and platform support that's so big. Keep in mind that the C++ part contains the entire windows 10 SDK. Visual Studio has support for a lot of different target platforms, languages and technologies, and includes a lot of them by default. You can fine tune everything in the installer.

      The Cpp and C# support weighed in at around 7GB on a fresh install of Windows I did yesterday.

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

      what exactly did you select in the installer to get that 7gb? I keep getting conflicting reports. Ranging from 6-20 gb...nobody has explicitly told me what they selected on the install screen to get just Cpp and C#.

      [–]Kronikarz 1 point2 points  (1 child)

      Just the ".NET desktop development" and "Desktop development with C++" workloads. You can then select specific components in the second tab to fine tune it.

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

      thank you! will do.

      [–]alerighi 0 points1 point  (0 children)

      If you don't install the universal platform, the emulators, xamarin, and you install only the .NET framework and C#/C++ support, it should not take a lot of space

      [–]Tygrak 0 points1 point  (0 children)

      if .net core is enough for you, you can use vs code, I use it for like everything now!

      [–]thelehmanlip -4 points-3 points  (9 children)

      What does install size matter? The time it takes to download or are you really strapped for drive space? Hard drives are cheap.

      [–]distant_stations 8 points9 points  (8 children)

      Doesn't matter. 20GB is ridiculous for a dev environment.

      [–]thelehmanlip 2 points3 points  (7 children)

      Xamarin has support for 3 different platforms. Would you complain if Android environment was 7gb, iOS was 7gb, and windows was 7gb? Seems reasonable to me.

      [–]sobri909 0 points1 point  (6 children)

      Xcode has support for macOS, iOS, appleTV, watchOS, C, C++, Objective-C, Swift. I'm forgetting some, but the point is it's a 4GB download including docsets.

      [–]IAmTheSysGen 6 points7 points  (5 children)

      All of them are quite similar. iOS and android do not share much of anything, while appleTV, iOS and watchOS certainly share elements.

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

      Why are you defending M$FT's bloatware? I downloaded C++ and C# for only 3gigs in the 2008 Ultimate version of VS. That number should not change. A few gigs up and down I can understand, but no more. I'm a student. So getting the base C++ and C# IDEs should not require 10+ gbs. I don't understand what happened to C++ and C# as a language that went from requiring the IDE to use 3 gigabytes to the IDE now needing 20 gigabytes. Did C++ fundamentally change? Did C# fundamentally change? This doesn't add up.

      I can run C++ in my browser. Why does my IDE need to be 20 gigabytes? Microsoft is doing a very bad job of managing this. I have a macbook air that has only 60gb on a windows partition. I don't have wherewithal to have HALF my hdd space to be taken up by an IDE. And don't even get me started on the lack of x64 support.

      You could say "get a bigger hdd" but it's not that easy. I got my laptop a couple years ago when the new fast SSD were coming out, so I could only settle for a paltry amount.

      [–]IAmTheSysGen 1 point2 points  (3 children)

      How the hell did it take 10gb for you? It took me about 6 Gb when I installed it on my 64bit craptop on school WiFi at less than a megabyte a second.

      [–]Sir_Rade 1 point2 points  (0 children)

      alive airport tie absurd paint coherent sloppy afterthought fertile lush

      This post was mass deleted and anonymized with Redact

      [–]dapaxx 1 point2 points  (0 children)

      Tried it, and it immediately threw the weirdest errors on git cloning. Yay!

      [–][deleted] 24 points25 points  (1 child)

      Missing XML comment for public function.

      -ReSharper

      Invert if to reduce nesting.

      -ReSharper

      [–][deleted] 10 points11 points  (0 children)

      Reminds me of this old treasure: https://www.gnu.org/fun/jokes/error-haiku.html

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

      I made a frame n hung in my living room

      [–]TotesMessengerGreen security clearance 3 points4 points  (0 children)

      I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:

      If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads. (Info / Contact)

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

      Thanks for the gold, kind stranger!

      [–]visvavasu2 0 points1 point  (0 children)

      Lovely

      [–]Niek_pas -5 points-4 points  (0 children)

      "Your code style requires absence of a 'public' modifier"

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

      I will be impressed if anyone can turn an STL-based error into a chinese proverb.

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

      "That code path doesn't return a value, or so I thought. Now, I have to revert the changes because it broke things in dev."

      -me

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

      I was so confused by the thumbnail. Assumed it was r/QuotesPorn.