News for hackers. Stuff that matters.
Re:The Grand C++ Error Explosion Competition by DoofusOfDeath on Sunday August 18, 2019 @11:59AM (#20730980)
One of my main complaints about C++ metaprogramming is that its evaluation can be as complex as the runtime behavior of a normal program, but AFAIK no compiler provides metaprogram debugging tools. E.g., execution tracing or single-step debugging of metaprogram execution.

Anyone know of good tools of this nature for gcc and/or clang?

Re:The Grand C++ Error Explosion Competition by dymk on Sunday August 18, 2019 @12:23PM (#20731135)
Re:The Grand C++ Error Explosion Competition by shakna on Sunday August 18, 2019 @06:12AM (#20729333)
> We also tested this with Clang, which detects correctly the missing semicolon, after which it anyway tries to evaluate the infinite template recursion and eventually segfaults

When you break the compiler with a list of errors, you've successfully hung the programmer out to dry.

Re:The Grand C++ Error Explosion Competition by rwmj on Sunday August 18, 2019 @05:54AM (#20729282)
I really hope the first thing Automattic do when they acquire Tumblr is to kill that ridiculous OAuth splash screen.
Re:The Grand C++ Error Explosion Competition by dgellow on Sunday August 18, 2019 @06:13AM (#20729338)
Just a detail: it is Oath (the company, https://www.oath.com), not OAuth (the open standard, https://en.wikipedia.org/wiki/OAuth).
Re:The Grand C++ Error Explosion Competition by Sharlin on Sunday August 18, 2019 @06:25AM (#20729381)
They're probably the current champions in how to make opting out of tracking cookies maximally inconvenient. Although to their credit they at least seem to remember my choices instead of sneakily reverting back to "accept everything" after a while.
Re:The Grand C++ Error Explosion Competition by abofh on Sunday August 18, 2019 @02:29PM (#20731940)
I can't find the opt out on mobile, so I just open incognito, accept and then close after reading. Truly garbage implementation.
Re:The Grand C++ Error Explosion Competition by froh42 on Sunday August 18, 2019 @07:09AM (#20729528)
So if it annoys you, why do you still surf their site? I shift my attenton to sites which treat me fairly (and so I do with them. tit for tat).
Re:The Grand C++ Error Explosion Competition by rwmj on Sunday August 18, 2019 @07:47AM (#20729648)
I don't - and it seems millions more people have turned away too, given the precipitous drop in their audience and valuation. It was just in this case I didn't notice the link was to tumblr before I clicked on it.
Re:The Grand C++ Error Explosion Competition by kipqi on Sunday August 18, 2019 @10:30AM (#20730316)
How else would I read this particular post?

Also it's not like Tumblr was like this when this post was, er, posted. It was pretty nice to browse.

Re:The Grand C++ Error Explosion Competition by rogual on Sunday August 18, 2019 @02:24PM (#20731907)
It's poorly implemented too -- even if you're requesting a blog's RSS feed, Tumblr sends you that Oath screen unless your user-agent is on their list of approved RSS readers.
Re:The Grand C++ Error Explosion Competition by jokoon on Sunday August 18, 2019 @06:26PM (#20733351)
Im in the EU and I NEVER accept those GDPR message things.

Luckily this time outline worked and allowed me to read the article.

Re:The Grand C++ Error Explosion Competition by ec109685 on Sunday August 18, 2019 @01:47PM (#20731657)
It’s for GDPR compliance.
Re:The Grand C++ Error Explosion Competition by Someone on Sunday August 18, 2019 @02:27PM (#20731922)
They may claim that, but I don’t think it makes them GDPR-compliant. IMO, it’s in conflict with https://gdpr-info.eu/recitals/no-32/:

”If the data subject’s consent is to be given following a request by electronic means, the request must be clear, concise and not unnecessarily disruptive to the use of the service for which it is provided.”

and https://gdpr-info.eu/issues/consent/:

”The withdrawal must be as easy as giving consent.”

Re:The Grand C++ Error Explosion Competition by ec109685 on Sunday August 18, 2019 @09:51PM (#20734279)
Well, it might not be compliant, but the splash screen is their attempt at compliance. It doesn’t show in the US.
Re:The Grand C++ Error Explosion Competition by trollied on Sunday August 18, 2019 @12:34PM (#20731216)
If you like this sort of thing, you'll probably enjoy The International Obfuscated C Code Contest. https://www.ioccc.org

Winning entries: https://www.ioccc.org/years.html

I quite like self-generating progs, eg: https://www.ioccc.org/1990/scjones.c https://www.ioccc.org/2000/dhyang.c

Re:The Grand C++ Error Explosion Competition by notacoward on Sunday August 18, 2019 @11:27AM (#20730742)
Worth noting that the preprocessor made this so easy that they had to create a separate division, and templates made it easy for most of the rest. Future language designers, take note.
Re:The Grand C++ Error Explosion Competition by ajross on Sunday August 18, 2019 @09:55AM (#20730141)
Sort of hilarious here, given the premise of the competition (that C++ has outrageously long error messages), that the winner is exploiting the preprocessor and not C++ at all.
Re:The Grand C++ Error Explosion Competition by martincmartin on Sunday August 18, 2019 @08:02AM (#20729687)
Extra credit for using Perl, which is the only language less readable than C++ templates.
Re:The Grand C++ Error Explosion Competition by Ballas on Monday August 19, 2019 @02:15AM (#20735323)
I almost burst into laughter reading that!
Re:The Grand C++ Error Explosion Competition by jedisct1 on Sunday August 18, 2019 @01:44PM (#20731643)
Rust Futures: hold my beer.
Re:The Grand C++ Error Explosion Competition by WesternStar on Sunday August 18, 2019 @10:20AM (#20730261)
I suppose the fact they stopped doing this 4 years ago says something good about current c++.
Re:The Grand C++ Error Explosion Competition by persistent on Sunday August 18, 2019 @03:01PM (#20732142)
Color template errors are the greatest leap in the history of computer science. No longer do I need to scan megabytes of output to find the unexpected |unsigned| in the fifth level of a template expansion.

https://clang.llvm.org/diagnostics.html

Re:The Grand C++ Error Explosion Competition by kazinator on Sunday August 18, 2019 @10:10AM (#20730212)
Creative Computing magazine had a competition like this in the 1970's: provoke the most compiler diagnostics with the least code type of thing.
Re:The Grand C++ Error Explosion Competition by watt on Sunday August 18, 2019 @02:51AM (#20728664)
(2014)

Fascinating stuff!

Re:The Grand C++ Error Explosion Competition by Ididntdothis on Sunday August 18, 2019 @11:51AM (#20730917)
When I did more C++ i found it weirdly satisfying to get a few hundred or thousands of errors during build and then fixing all of them with only a few changes.
Re:The Grand C++ Error Explosion Competition by noncoml on Sunday August 18, 2019 @02:29PM (#20731938)
When I was in college people would come to me to help them with their C++ compilation errors. My secret? Most of them would start trying to fix the reported errors bottom up. I would start top down and be done with probably one missing semicolon or something simple as that.
Re:The Grand C++ Error Explosion Competition by Ididntdothis on Sunday August 18, 2019 @03:40PM (#20732342)
Going top down seems to be the secret. I do mainly C# now but even there a lot of people get confused by looking at the last error on the screen. I always only look at the first error and deal with that before looking at anything else.
Re:The Grand C++ Error Explosion Competition by mikelward on Sunday August 18, 2019 @03:50PM (#20732398)
I wish tools defaulted to only showing the first error.
Re:The Grand C++ Error Explosion Competition by cmroanirgo on Monday August 19, 2019 @04:48AM (#20736046)
In my experience, having a list to work through is much faster to remedy than fixing one bug at a time, and then recompiling for the next bug. VB drove me nuts for this simple reason.
Re:The Grand C++ Error Explosion Competition by Ididntdothis on Monday August 19, 2019 @01:07PM (#20739544)
Agreed. Maybe errors should get displayed in reverse order so you can work your way up through the console window.
Re:The Grand C++ Error Explosion Competition by persistent on Sunday August 18, 2019 @02:59PM (#20732125)
If you have thousands of errors it is likely you simply misplaced a comma or semicolon. If you have just one error you are in deep trouble.