« first day (1313 days earlier)      last day (3643 days later) » 

10:00 AM
and this is supposed to be the most amazing respectable person in the world such that you can't have pictures of him even and have to dump a bunch of crap after his name whenever you use it
 
user1804599
@LightnessRacesinOrbit I am most offended by you calling Him a coward.
 
awesome
@rightfold good
 
user1804599
You will be beheaded.
 
@rightfold alright
 
@LightnessRacesinOrbit Now now, finally the women get credited and are saving the day, and still people find fault...
 
Ven
10:01 AM
@sehe You're really crazy. Crazy good, yet crazy
 
Welcome to the lounge, I suppose
I'm a slow burner here.
 
@P0W The answer to the question is "no", but there's no need to be a dick about it. — Lightness Races in Orbit 13 secs ago
 
Huh. Is it conventional for people to initialize strings like std::string foo("bar")? I've always used std::string foo = "bar".
 
@Maxpm It's not particularly common but hardly unheard of.
 
10:02 AM
@Maxpm No consensus. TBH I don't think I even have a consensus within myself (though I remain consistent within a project)
@Maxpm My guess would be that std::string foo("bar") is the more common of the two.
 
also, real men do auto foo = std::string("bar");
 
Ven
"all my contructors must look the same" ?
 
> Yes. That's right. I want to be able to paste an expression [...]
:D
 
My old boss always wrote shit like int x(0) for the consistency reason. Hated it.
 
10:03 AM
Eugh, gross.
 
yeah, that's kinda... dumb.
 
Ven
the One Step Too Far (TM)
 
@LightnessRacesinOrbit it's a cyclop
 
I use std::string x = "stuff";
 
I use const std::string x = "stuff"; ;)
 
user1804599
10:04 AM
I use std::string x("stuff");.
 
at my job they do: if (p) { delete p; p = NULL; }
 
Ven
the = stuff is using the rule with single-param constructor, innit ?
 
user1804599
auto x = "stuff"s; :)
 
@LightnessRacesinOrbit He loves to skirt vexingness in orbit
 
I use std::string const x = "stuff";
 
10:04 AM
@rightfold This.
 
@WilliamAndrewMontgomery Kill them now.
 
@DeadMG Whenever you'd question its niceness, he'd launch into a tirade schooling you about how = there is initialisation not assignment and as such is confusing because people read = as assignment, ignoring pleas that I fucking already know how C++ works and I read = as "set equal to", not "assignment"
 
And occasionally drop const
 
user1804599
I use val x = "stuff".
 
@DeadMG I could send you so much awful code~
 
10:05 AM
@Rapptz std::string const x("stuff");
 
Ah, right, actually auto x = "stuff"; is better
 
Ven
I use let mutable x = ~"stuff" :]
 
@LightnessRacesinOrbit Yeah... should anybody who doesn't know this stuff be taking a C++ job?
 
@rightfold still no c++1y near me.
 
@Ven the what now
 
user1804599
10:05 AM
@sehe you can implement it in C++11.
 
@DeadMG Well. It was only him and I that did know it...
 
Ven
not quite c++; but does it matter :D
 
user1804599
@Ven s/mutable //
 
@rightfold not on all compilers (strictly, yes)
 
@rightfold I don't believe you can. IIRC all literals that don't start with an underscore were reserved for future Standards.
 
10:06 AM
Actually, is there any difference between std::string foo("bar") and std::string foo = "bar"?
 
@Maxpm Not really.
 
@DeadMG oh that too
 
Ven
@rightfold #define mutable /* nothing */ #define let auto
 
@DeadMG Not really or not at all?
 
user1804599
10:06 AM
@DeadMG oh right :v
 
Ven
Ooooh I'm gonna #define let auto, it'll be so cool
 
@Maxpm Well, technically, there is a difference, but it's not one you'll ever have to care about.
 
Xeo
@DeadMG And in fact, s is in C++1y
 
@Xeo C++14.
 
10:07 AM
@Xeo I know. Fucking morons.
 
Xeo
@DeadMG Why?
 
and `#define var let`
Polyglot brogramming
 
Xeo
It's hidden behind a namespace
 
> [C++11: 8.5/13]: The form of initialization (using parentheses or =) is generally insignificant, but does matter when the initializer or the entity being initialized has a class type; see below. [..]
 
Xeo
there are two operator""s actually
 
10:07 AM
@sehe brolyglot!
 
Xeo
one for seconds, one for strings
 
because LEWG clearly told them that they wanted to not do anything with s until the string_view stuff was done because there's a high probability it would be much preferred for s to be string_view.
 
@Xeo Because they made it string, not string_view.
 
@WilliamAndrewMontgomery holygott!
 
Xeo
well, of course it sucks that it's not for string_view, but well
 
10:07 AM
but no
totally fucking ignore them and put it in anyway.
 
user1804599
Beh string_view.
 
user1804599
GC and immutable string pl0x.
 
@Maxpm and then a bunch of unquotable crap you don't need to care about
 
@rightfold Beh GC.
Who needs GC when you have RAII.
 
Ven
@rightfold you don't need immutable strings, just drop all your & in your param lists :D
 
10:09 AM
@LightnessRacesinOrbit Is it just the difference between using the constructor or operator=?
 
@Maxpm No. There is no use of operator= there.
 
@sehe Can you post a version without using C++11 ?
 
@Maxpm No. Both use the constructor. An object can only be created using a constructor.
@DeadMG See? >.<
 
Ven
it's just the single-param constructor
 
yes.
 
Ven
10:09 AM
but it's quote confusing
 
i'm confused now
so should it be int x = 0;? so lame
 
user1804599
auto x = 0;
 
auto x = 0;
nubbins.
 
but I want an int not an auto
~~~~~~
 
...
You don't want an int.
You want a number.
 
10:11 AM
i already have a number
 
Ven
struct A { A(int) {} }; void f(A&) {}; int main(...) { auto x = 5; f(x); }; WHAT GIVES
 
i pay 2€ per month
 
You care about an interface, not about a concrete underlying type.
 
@Ven Compiler error, that's what. Still more compiler error.
 
@LightnessRacesinOrbit Not quite. PODs can be created just by being used.
 
Ven
10:12 AM
@DeadMG sry I'm bad :D.
 
@R.MartinhoFernandes eh
 
void* ptr = operator new(sizeof(int));
*static_cast<int*>(ptr) = 0; // C++ is graet
 
oh, that
stop it
 
@R.MartinhoFernandes it's "graet" not "great".
 
My thumb is grate.
 
10:13 AM
@Ven ...variadic main? Are you crazy.
 
You just ruined it.
 
Ven
@Griwes not literal ...
 
@Ven int main(...) {} is a C variadic function.
 
"My thumb is grate." -> funny, "My thumb is grate(d)." -> you just explained the joke.
 
Ven
but yeah, it does error out :P. whew
@Griwes I know it is. It doesn't matter
 
10:14 AM
 
you don't matter.
 
Ven
ok
 
do Americans really write G instead of K to mean "thousand"? I thought it was just gangster speak to say "i just stole fifty gees man". UConn professor accused of child abuse retires with $69G pension
 
your face is ok
 
10:16 AM
or maybe the correspondent is being a retard
 
Imperial system.
 
your face is sigh.
 
That's enough, pups.
 
@LightnessRacesinOrbit No. I've never seen that before in my life.
 
hmm
I don't feel any better, so are you sure it's enough?
 
10:17 AM
@LightnessRacesinOrbit it's either giga or grand; both horrible :P
 
right, onto FB it goes
 
@LightnessRacesinOrbit is it for "grands" maybe? but anyway don't try to look for too much sense into muricons
 
@NeelBasu Sure: coliru.stacked-crooked.com/a/8eebf0f43fcdd670 It's just a lot more tedious/less legible
45 mins ago, by sehe
@NeelBasu http://coliru.stacked-crooked.com/a/ef9cfe4be9b98ff4 now post it on SO
I'll be off getting the kids. Be busy whole afternoon. Will post answer when I come back :/
 
@ScarletAmaranth "UConn professor accused of child abuse retires with 69-gigadollar pension"?
 
10:20 AM
@Borgleader Yes, I know what "grand" means. I've never seen it used in journalism as a unit, though.
 
Fox News is journalism now? =/
 
@LightnessRacesinOrbit I first heard it in The Mentalist ^^
 
"sixty-nine grand" is properly written 69K
 
yargh
I opened the curtains and I was assailed by this bright thing in the sky
 
@ScarletAmaranth It's exceedingly common over here
 
10:21 AM
Dell? - NSFW
 
@Lightness still has faith in journalists. How gullible.
 
@DeadMG Lightness Races through your Window
3
@chmod711telkitty that's surprisingly unattractive
 
@LightnessRacesinOrbit Sounds just like her thing.
 
@R.MartinhoFernandes heh true enough
@LightnessRacesinOrbit sorry sir, I totally forgot the rules here — P0W 3 mins ago
AND LOOK AT THAT GUY'S PROFILE
JUST LOOK AT IT
 
Oh Christ.
 
10:22 AM
I'm not in his favourites.
Awesome.
 
@LightnessRacesinOrbit how about this one then? Also NSFW
 
You are not.
 
Wouldn't want my screen name butchered with train-case.
 
@chmod711telkitty same
r-.-martinho-fernandes
(wtf "train-case")
 
Ven
(everybody uses kebab-case nowadays)
 
10:23 AM
If I'm one of your "favourites" the least you can do is respectfully reproduce my moniker.
@LightnessRacesinOrbit Do you have a better name? (It's common in Lisps)
 
martinho sounds like hoe(whore) from Mars ... no offense ...
 
I'm watching "Disconnect". Holy fuck this is depressing.
 
> When each word is delimited by a hyphen instead of an underscore, the uppercased initial word character variant is known as Train-Case, and the all lowercased variant is popularly known by the following names: spinal-case, kebab-case, lisp-case [2][3] Screaming snake case is similar to snake_case, with letters written in UPPERCASE, as in: THIS_IS_AN_EXAMPLE.
 
human-centipede-case?
 
@LightnessRacesinOrbit Ah, thanks.
("kebab-case"?)
Though to be honest...
 
Ven
10:26 AM
yep.
 
@LightnessRacesinOrbit I laughed at SCREAMING_SNAKE_CASE.
 
Xeo
little-train-that-could-case
 
@Maxpm included it just for you :)
 
Ven
@Maxpm You laugh because you havn't encountered a screaming snake ... YET !
 
SelfDescribingCase, self_describing_case, Self_Describing_Case, selfDescribingCase, self-describing-case, Self-Describing-Case, SELF_DESCRIBING_CASE, Self_describing_case.
They're all the same!
 
user1804599
10:27 AM
@LightnessRacesinOrbit Ugly_case best case.
 
Xeo
Are you thinking about auto-/heterological again?
 
user1804599
I hate HttpCase. :<
 
Ven
you're missing SeLf-DeScRiBinG-CaSe.
 
user1804599
r.case is also horrible. :<
 
10:28 AM
@LightnessRacesinOrbit Not common.
 
Xeo
NOPE
 
Didn't some guy write a program once with every variable some variant of CHUCK_NORRIS, with variants in case?
 
probably
who cares?
 
user1804599
SQL CASE
 
10:29 AM
it's not like Chuck Norris jokes are funny
 
I care. :(
 
then go write it and you can be "some guy".
congratulations.
stick it on your CV.
 
I'm not sure if those are autological.
It's not the words that describe them, but the shapes.
 
Xeo
The words are the name for the shape though
 
3
Q: Change ServletRequest server name programatically

AkoElias Lopezlopezlopez LopezI need to change the serverName of the ServletRequest object in my Grails controller. I'm having trouble figuring out how to do this since the serverName is a read-only property. Any help would be appreciated.

 
10:31 AM
Oh, good point.
 
Look at this asker's name.
 
Also true for snake_case and so on.
 
AkoElias Lopezlopezlopez Lopez
That's fantastic.
 
But self_describing_case is clearly special, because you can change the shapes without changing the words and it's still self-describing.
It's a related but different idea.
 
user1804599
@Maxpm lol
 
Xeo
10:32 AM
Good, now your circuits are in a knot again. Have fun for the rest of the day!
 
@AndyProwl Found it!
"co-autological".
"autological" is pentasyllabic. "pentasyllabic" is autological because it is pentasyllabic. They are co-autological.
2
 
Cool
> Saul Schleimer points out that 'autological' is pentasyllabic.
This is actually the only thing that google gave me for "coautological"
 
Yeah. I like it.
 
10:42 AM
But yeah, really nice
 
not_self_describing_case
ARHRGDGHFH
3
STOP IT BRAIN
 
dumb corollary #1: every autological word is co-autological with itself
 
The wikipedia list of autological words seems to conflate the rendering with it.
"written" is autological when written but heterological when spoken.
 
Xeo
Robot's so not gonna get anything done today
 
contextually autological
 
10:46 AM
0
Q: Printing the name of a struct in C

VinkaIs it possible to print the struct name? say i have a struct: typedef struct someName{ uint16_t value; uint16_t field; } someName_t; someName_t test; printf("%" PRIu16 "\n", test; printf("%" PRIu16 "\n", test.value); Printing test.value is oke. Printing test gives me warning.. Is this th...

wat
 
Xeo
except twist his circuits a bit more
 
@Griwes I was just looking at this. I puked a little in my mouth.
 
-1
Q: Big O notation for a matrix algorithm

user3660090I have a simple algorithm that prints the two dimensional matrix (m*n, m and n are different numbers): for(i=0;i<m;i++) for(j=0;j<n;j++) Console.WriteLine("{0}",A[i,j]); I read that the big O notation for this algorithm is O(n^2); Could somebody explain me what is the "n^2" in that statement? ...

ITT people cannot read.
 
11:05 AM
I agree that in most situations vector is the right approach... but my answer addressed the actual question and that explicitly states resizing is not necessary. — mah 6 mins ago
Christ.
 
I think that answer should be deleted as fast as it's possible.
 
@Griwes are pointers truly that scary that they should "never ever" be used? — mah 24 secs ago
 
user1804599
@Jefffrey s/answer/all answers/
 
@rightfold s/answers/questions/
Let's just wipe SO.
 
11:20 AM
Don't use <stdio.h> use <cstdio>. The void in int main(void) is redundant in C++ (do you know why it's there in C?). return 0 is also redundant. Throwing a C-string is generally a bad idea. — Jefffrey 54 secs ago
Not so sure about this ^
 
Are you going after that guy or what?
It's a 2yo question.
 
I just thought of browsing some of his answers in the C++ tag. If someone recommends using new[], chances are he did it before.
 
whilst I'd call that a viable strategy, you'll probably get nobbled by the anti-serial-downvoting scripts.
 
posted on May 21, 2014 by Herb Sutter

Yesterday I posted three of my proposed talks for CppCon. These are the ones I’ve given publicly before, but they’re not retreads – all are fresh and up to date, with refreshed or new material. But I’ve also proposed two brand new talks – titles and abstracts are below. Note: The CppCon program committee will […]

 
> GC for C++, and C++ for GC: “Right” and “Wrong” Ways to Add Garbage Collection to C++ (1 to 2 hours)
lol
1 to 2 hours? Such a talk would take me a minute. :D
 
11:28 AM
go on
 
> Addressing C++’s #1 Problem: Defining a C++ ABI (1 hour)
Godspeed.
 
scope is my garbage collector
 
Profound.
 
lunch is my belly filler
bbl
 
both of those look like fun talks
 
11:40 AM
If you bother to read the question instead of looking for things to argue about, you'll find that it was "help! I'm throwing an exception and then my program terminates!". The poster did not realize that he had to catch it in order to avoid that. If you minimize the change you make to an OP's code in order to answer, you answer on terms you know they understand and will get value from. If instead you tell them "you're doing everything wrong, you must completely change it", there's a much higher likelihood that they don't understand you. Their question was not about what to throw. — mah 1 min ago
I like how he thinks. I'm sure @sehe loves it too.
 
user1804599
@Jefffrey nothing wrong with return 0;.
 
user1804599
It's a matter of style.
 
@Griwes Why is that a problem?
 
@rightfold I know. I might have been a little bit too harsh there.But the main point is that throwing C-strings might be a bad idea.
 
We already have C++ ABIs.
 
11:48 AM
@R.MartinhoFernandes The "s" is the problem :P
 
EXIT_SUCCESS :D
 
@mah: "help! I'm throwing an exception and then my program terminates!" is not a question. — Lightness Races in Orbit 17 secs ago
go go go
 
@Griwes I don't see why.
 
Interop!
 
I read both the question and your answer, and I'd love for you to stop this whole ad-hominem nonsense. Thanks. Now, you are missing the point. Often times the minimal change to OP code leads to code that is nowhere decent. You are advocating that we should let it slide and leave the OP in an erroneous state. This is toxic (as explained above). " there's a much higher likelihood that they don't understand you" -- Absolutely. That's what comments are there for. — Jefffrey 6 mins ago
 
11:50 AM
There was a talk at C++Now this year where a guy basically reinvented COM :D
 
^ oh for crying out loud. there were no ad hom arguments. stop it.
 
Meh, really.
 
@LightnessRacesinOrbit Oh come one. He is a nice guy. Put away that fork.
 
user1804599
Fork you!
 
@Griwes C++ makes it close to impossible to have a stable ABI without something like COM.
 
11:52 AM
@mah: This is not an attack on you. Quit being so defensive. When you give knowledge to language newcomers you should absolutely expect critical review of said knowledge; that's why Stack Overflow is good and taking programming advice from some newb down the pub is bad. At the very least, your answer must have a disclaimer on it pointing out the poor practices in the code. — Lightness Races in Orbit 23 secs ago
better?
 
@R.MartinhoFernandes Sure. I think (hope?) this is the point Sutter tries to make there.
 
I'm not even considering the various compilers, or even compiler updates.
 
@LightnessRacesinOrbit Slightly. I feel bad for the guy now.
 
Even if you stick to the same compiler version, a stable C++ ABI is not a thing unless COM or C.
 
user1804599
11:54 AM
Let's install clang 3.4.
 
Well, is there a need for any C++ ABI if you stick to the same compiler version?
 
so now that's encouraged you to write your nice comment, and everyone's happy again
@mah Just add a disclamer and I'll remove the downvote. — Jefffrey 45 secs ago
my work here is done
 
@AndyProwl Yes.
 
@LightnessRacesinOrbit I agree that a disclaimer is appropriate. — mah 30 secs ago
See? you obtain much more by being polite. ;)
 
And this is what annoys me whenever someone brings up the issue of the C++ ABI thing. The ABI is not for the language. It's for library writers.
 
11:56 AM
@mah: Then we're all in agreement and everybody's happy! :) My work here is done; have a nice day. — Lightness Races in Orbit 54 secs ago
 
@R.MartinhoFernandes I don't understand why that's the case
 
@Jefffrey don't you try to take the credit for this! I stepped in and put an end to your bickering
 
lol
 
If my library cannot have a stable ABI without extern "C", what use is sticking to the same compiler version?
@AndyProwl Things that should be opaque are not.
 
@Jefffrey You can upvote now
 
11:58 AM
my_type f(); makes the members of my_type part of the ABI, whether they're public or not.
Cue pimpl and so on.
 
oh for god's sake someone nuked the comments
 
so you mean, object layout etc.
 
so now my wondrous achievement is invisible
oh it was you
 
I've only deleted mine.
 
@R.MartinhoFernandes OK I see what you mean
 
11:59 AM
You need all sorts of tricks and restrictions to expose a stable ABI.
 
@Jefffrey some of his went too
 

« first day (1313 days earlier)      last day (3643 days later) »