Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
QuarkJets
Sep 8, 2008

Presto posted:

We have this already. Long story short, I was seeing a gastroenterologist for a while, and to try to see what was wrong with me, I swallowed a capsule with a camera and an LED flash that transmitted pictures to a capture device I wore for a day until the capsule... exited.

We don't really have it in the widespread trendy way that I meant.

I guess you can start calling yourself an influencer once people start twitch streaming their colon

Adbot
ADBOT LOVES YOU

Adhemar
Jan 21, 2004

Kellner, da ist ein scheussliches Biest in meiner Suppe.

Absurd Alhazred posted:

Gastrointestinal system any% speedrun

I always screw it up at the end on the frame-perfect loaf pinch.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
Someone at work was looking into what would be involved in moving our legacy C++ projects to C++20 and warned that this does something different now:

code:
A a(B(x))
To me that declares an A called "a" and initializes it with the result of calling B(x). In the newest C++ I am told it is equivalent to

code:
A a(B x)
i.e. it declares a function named "a" instead?! That's a big breaking change.

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...

Hammerite posted:

Someone at work was looking into what would be involved in moving our legacy C++ projects to C++20 and warned that this does something different now:

code:
A a(B(x))
To me that declares an A called "a" and initializes it with the result of calling B(x). In the newest C++ I am told it is equivalent to

code:
A a(B x)
i.e. it declares a function named "a" instead?! That's a big breaking change.

That looks like the "most vexing parse", and I don't think C++20 changes anything in this regard. I'd ask them where this information comes from.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
Then I might have misunderstood what my colleague said. They were describing something else that changed regarding changes to variable declarations and implicit conversions, and said something like "you might be tempted to write code like this, but don't".

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

Hammerite posted:

Then I might have misunderstood what my colleague said. They were describing something else that changed regarding changes to variable declarations and implicit conversions, and said something like "you might be tempted to write code like this, but don't".

the most vexing parse stuff was addressed in c++11 by adding a new language feature uniform type initialization, so it's not that the old code wouldn't work, it's that you should generally be using uniform initialization when applicable to avoid the problem and old style would be frowned upon. problems are generally addressed by adding new features in C++, and breaking changes are avoided (there usually are documented breaking changes, but can't remember one that wasn't in esoteric functionality.)

Hargrimm
Sep 22, 2011

W A R R E N
While trying to replace a foreach (for no evident reason), this dude stumbled upon just the most broken possible way to try and use an enumerator:

code:
var enumerator = list?.GetEnumerator();

do
{
    var thing = enumerator?.Current;
    // do stuff
} while (enumerator?.MoveNext() != null);
This was committed in January and remained unnoticed until now. Guess it's good no one was actually using this feature.

Tei
Feb 19, 2011
Probation
Can't post for 4 days!

Hammerite posted:

Someone at work was looking into what would be involved in moving our legacy C++ projects to C++20 and warned that this does something different now:

code:
A a(B(x))
To me that declares an A called "a" and initializes it with the result of calling B(x). In the newest C++ I am told it is equivalent to

code:
A a(B x)
i.e. it declares a function named "a" instead?! That's a big breaking change.

I wanted to go back to C++ someday, but if It dropped the C syntax core beliefs this much maybe will be a hard pass. What a ugly re-interpretation of ( and ).

more falafel please
Feb 26, 2005

forums poster

Tei posted:

I wanted to go back to C++ someday, but if It dropped the C syntax core beliefs this much maybe will be a hard pass. What a ugly re-interpretation of ( and ).

This has always been the case in C++, it is not a C++11/14/17/20 phenomenon. The name "most vexing parse" was coined by Scott Myers in Effective C++ 20 years ago: https://en.wikipedia.org/wiki/Most_vexing_parse

Tei
Feb 19, 2011
Probation
Can't post for 4 days!

more falafel please posted:

This has always been the case in C++, it is not a C++11/14/17/20 phenomenon. The name "most vexing parse" was coined by Scott Myers in Effective C++ 20 years ago: https://en.wikipedia.org/wiki/Most_vexing_parse

My editor/compiler was Borlands C++ and sometimes compiling for watcom. So probably more than 20 years ago. Anyway I never used the most exoteric features. Only OOP and general syntax for human beings.


QuarkJets
Sep 8, 2008

Tei posted:

I wanted to go back to C++ someday, but if It dropped the C syntax core beliefs this much maybe will be a hard pass. What a ugly re-interpretation of ( and ).

:eng101: This is a problem that occurs in C as well, it's just rarer that it comes up. It's rooted in an ambiguity in C syntax, and C++ helps to resolve the ambiguity by adding alternatives, not by dropping C syntax core beliefs

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
Right. The thing that’s vexing about it is that it’s grammatically ambiguous and so has to be parsed as a function declaration for C compatibility. So if you’re upset that it gets parsed as a function declaration, you should be mad at C, not C++.

Kazinsal
Dec 13, 2011
I'm more upset that people would intentionally write code that ambiguous in a situation that has been known for decades to be one of the ultimate possible ambiguities in C/C++ syntax.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Be mad at C.

QuarkJets
Sep 8, 2008

ultrafilter posted:

Be mad at C.

Thread title?

Doom Mathematic
Sep 2, 2008
No, you don't get it, the beauty of C is that it's a simple language [adds two numbers together, potentially invoking undefined behaviour]

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Doom Mathematic posted:

No, you don't get it, the beauty of C is that it's a simple language [adds two numbers together, potentially invoking undefined behaviour]

Username / Post combo

Soricidus
Oct 21, 2010
freedom-hating statist shill

rjmccall posted:

Right. The thing that’s vexing about it is that it’s grammatically ambiguous and so has to be parsed as a function declaration for C compatibility. So if you’re upset that it gets parsed as a function declaration, you should be mad at C, not C++.

Nah I’m gonna be mad at C++, how the hell is it C’s fault that C++ insists on preserving compatibility in the weirdest edge cases when it’s happily broken compatibility on a bunch of very common things.

Kazinsal
Dec 13, 2011
C doesn't have function style initializer syntax and doesn't have functional casting, so you can't cause the most vexing parse through those means. Ambiguity caused by those are explicitly a C++ problem.

Foxfire_
Nov 8, 2010

"Text that could be a declaration or a variable definition should be treated as a declaration" (C)
+
"You may omit names when declaring a function/function pointer e.g. typedef int (*typeAlias)(float,float)" (C)
+
"You can define and construct objects with parenthesis e.g. Foo a(1,2,3)" (C++)

combine to do a stupid that nobody realized until it was baked in

xtal
Jan 9, 2011

by Fluffdaddy
The third one seems pretty stupid on the face of it

Foxfire_
Nov 8, 2010

I think it comes from C with Classes (that would later become C++) originally being a text preprocessor that took C+some extra magic words and spat out plain C code.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Kazinsal posted:

I'm more upset that people would intentionally write code that ambiguous in a situation that has been known for decades to be one of the ultimate possible ambiguities in C/C++ syntax.

I'm a C# programmer who has to occasionally, very grudgingly, write code in C++ for our legacy applications. If your language has "ultimate ambiguities" for decades then it can eat my rear end!!! :blastu:

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

xtal posted:

The third one seems pretty stupid on the face of it

With the benefit of thirty years of hindsight the second one is stupid as well. Modern languages use a placeholder for "I don't have a name to provide for this thing", typically _, and it's concise, legible, and unambiguous.

The first one, IDK honestly. Like, I have no idea what kind of ancient C code would break if the rule were reversed or (my gut instinct) if the ambiguity were required to be a compile-time error.

Qwertycoatl
Dec 31, 2008

I'm probably being dense but I can't think of a (C) example of a statement that the first one covers.

e: And related but not quite the same, it's stupid that
code:
foo * bar;
is ambiguous unless you know whether foo is a type or a variable

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

NihilCredo posted:

Like, I have no idea what kind of ancient C code would break
Probably things like OpenSSL

feedmegin
Jul 30, 2008


We still get that message in the UK despite being neither EU nor EEA members any more. Brexit meant nothing :negative:

Absurd Alhazred
Mar 27, 2010

by Athanatos

Hammerite posted:

I'm a C# programmer who has to occasionally, very grudgingly, write code in C++ for our legacy applications. If your language has "ultimate ambiguities" for decades then it can eat my rear end!!! :blastu:

UB could do that, yes. :grin:

Xarn
Jun 26, 2015

Bruegels Fuckbooks posted:

the most vexing parse stuff was addressed in c++11 by adding a new language feature uniform type initialization, so it's not that the old code wouldn't work, it's that you should generally be using uniform initialization when applicable to avoid the problem and old style would be frowned upon. problems are generally addressed by adding new features in C++, and breaking changes are avoided (there usually are documented breaking changes, but can't remember one that wasn't in esoteric functionality.)

Except uniform initialization is also terribly broken, and we want back to parentheses instead. :v:

QuarkJets
Sep 8, 2008

When I write C# it feels like my lips have been sewn around someone else's rear end in a top hat, and while my mouth hasn't been filled with poo poo yet I know it's inevitable so I exist in a constant state of fear and anticipation

Space Gopher
Jul 31, 2006

BLITHERING IDIOT AND HARDCORE DURIAN APOLOGIST. LET ME TELL YOU WHY THIS SHIT DON'T STINK EVEN THOUGH WE ALL KNOW IT DOES BECAUSE I'M SUPER CULTURED.

QuarkJets posted:

When I write C# it feels like my lips have been sewn around someone else's rear end in a top hat, and while my mouth hasn't been filled with poo poo yet I know it's inevitable so I exist in a constant state of fear and anticipation

That's one hell of a metaphor.

What has you so afraid of C#? It's always seemed like the PB&J or Toyota Camry of software development: there's nothing remotely interesting or sexy about it, but it's good at suiting simple needs, and most of the time that's all people really need anyway.

Foxfire_
Nov 8, 2010

In my opinion C# is the most pleasantly designed of modern major languages, largely because it has a big paid development team and is allowed to have breaking changes in the language from older versions. What don't you like about it?

Kazinsal
Dec 13, 2011

Foxfire_ posted:

In my opinion C# is the most pleasantly designed of modern major languages, largely because it has a big paid development team and is allowed to have breaking changes in the language from older versions. What don't you like about it?

Many people simply don't want to admit that Microsoft can design a really good language by paying developers large sums of money.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Kazinsal posted:

Many people simply don't want to admit that Microsoft can design a really good language by paying developers large sums of money.

Is it because google couldn't?

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Kazinsal posted:

Many people simply don't want to admit that Microsoft can design a really good language by paying developers large sums of money.

There's also a lot of lingering distrust of Microsoft given the shenanigans that they pulled in the 90s and 00s. It's taught a lot of people making the decisions to be wary.

Kazinsal
Dec 13, 2011

Volmarias posted:

There's also a lot of lingering distrust of Microsoft given the shenanigans that they pulled in the 90s and 00s. It's taught a lot of people making the decisions to be wary.

My favourite example of them turning their act around is GitHub free accounts having way more features available after being bought by Microsoft than before. Don’t need to milk ten dollars a month out of individual devs when you have big daddy Redmond bucks behind you.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Kazinsal posted:

My favourite example of them turning their act around is GitHub free accounts having way more features available after being bought by Microsoft than before. Don’t need to milk ten dollars a month out of individual devs when you have big daddy Redmond bucks behind you.

GitHub rakes in cash with the corporate appliance

xtal
Jan 9, 2011

by Fluffdaddy

Volmarias posted:

There's also a lot of lingering distrust of Microsoft given the shenanigans that they pulled in the 90s and 00s. It's taught a lot of people making the decisions to be wary.

They're still pulling the same stuff like this year.

redleader
Aug 18, 2005

Engage according to operational parameters

Space Gopher posted:

That's one hell of a metaphor.

What has you so afraid of C#? It's always seemed like the PB&J or Toyota Camry of software development: there's nothing remotely interesting or sexy about it, but it's good at suiting simple needs, and most of the time that's all people really need anyway.

it's also good for various complicated needs too

Adbot
ADBOT LOVES YOU

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

xtal posted:

They're still pulling the same stuff like this year.

What'd they do?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply