« first day (1620 days earlier)      last day (3311 days later) » 

user1804599
6:00 PM
> We use cookies to ensure you have the best experience and full functionality of our website.
 
user1804599
Wrong. You use cookies to read my mind and to steal my credit card details. :tinfoil:
 
is it possible to mark a lambda as noreturn ?
if so, how?
 
user1804599
@StackedCrooked bread exploded
 
@райтфолд Not exactly "wrong", just "best for us" rather than "best for you". :-)
 
@райтфолд kinda
 
user1804599
6:03 PM
Miami Vice President
 
user1804599
Vieze president.
 
"Your money is safe... in our pockets."
2
 
@gnzlbg oh god no please no
also lol at asking again
I'm working on an answer, below, and have an improvement shown already, but what is the 'string' type such that you can use it like both an array c[i] to get a value, and a struct x.method()? — 1s and 0s 4 mins ago
oh brother
 
user1804599
What issue shall I work on?
 
context: c is an std::string and the code uses c[i] and c.size()
 
user1804599
6:11 PM
Documentation may be a good one.
 
is there a way to check at compile time if a common type exists?
 
'Germanwings plane 4U 9525 crashes in French Alps - no survivors' :(((
 
nvm got it
 
Xeo
@LightnessRacesinOrbit I'm... not sure I want to see an "improvement answer" from somebody that doesn't understand the basic code.
... oh boy, sprintf.
 
@MartinJames :(
 
Xeo
6:25 PM
1) Post your answer when you are actually done. 2) Don't answer questions where you don't know anything about the language (knowledge of C does not confer knowledge of C++) - as a prime example here, your code is extremely unidiomatic C++ code. — Xeo 28 secs ago
 
@LightnessRacesinOrbit Whay has Vlad not answered that yet?
 
> I am still working on it, haven't tested it yet, but I'm thinking more along these lines:
 
@AndyProwl Hmm.. it seems like the aircraft was serviced yesterday...
 
I know quite a few of this kind
@MartinJames Yes. I won't be able tell myself "oh come on, it doesn't happen here" next time I'm nervous on a plane
 
Xeo
.@SkyNews beware "Aviation Experts" http://t.co/WzDcKJKr1L
 
6:29 PM
@MartinJames Oddly enough, no S.O.S. was dispatched by the crew, although the plane was reported to be losing height at a steady rate for 8 minutes
@Xeo I don't think flying is safer than walking. Unfortunately, it is often necessary.
 
@AndyProwl ..and the few pics of the crash site show lots of little pieces, (unsurprising), but no fire/smoke, (surprising, since it should have been full of fuel, having just taken off).
 
@MartinJames I've only seen a few pics, maybe they haven't shown everything
 
@AndyProwl True.
 
Something may have happened inside the cabin, the pilots may have lost consciousness and failed to dispatch the distress signal
 
user1804599
Does Boost.MultiIndex allow dynamically added indices?
 
Xeo
6:33 PM
@AndyProwl IIRC, statistically it is safer.
 
@Xeo is this enough C++ for that answer?
 
@Xeo Than walking? I mean, I understand it's safer than driving or biking or whatever, but... how many people die because of walking?
 
Xeo
@AndyProwl As a pedestrian, you're the prime victim of crashes involving pedestrians :P
 
@Xeo Hm, that's true
But I don't think it's statistically safer
 
6:35 PM
> It's generally a dead end
ouch
that's cold
 
I mean, if you consider the ratio between the number of people who get killed while walking and the people who walk, it must be really small
 
heading home
 
Xeo
@AndyProwl And for flights, it's even smaller
 
@Xeo How do you know? It's hard to know how many people walk, for how long, how often, etc.
 
user1804599
Lounge<ABAP>
 
6:37 PM
and Vlad answers...
 
Xeo
@AndyProwl Statistics. I mean, sure, walking around in a rural village without any cars is prolly safer than flying, but in New York...
 
@bluefog lol, called it :)
 
@Xeo Yeah, could be, but my impression is that if we take the number of accidents per number of hours walked/flown overall by the population, walking should turn out to be safer
It's just an impression, though
 
Xeo
beautifully idiomatic. Makes me want to try to write some c++ code. — 1s and 0s 49 secs ago
aaaaaaaa
it's not idiomatic
 
He's inviting the wrath
 
6:40 PM
At least I should be able to get served tonight; A320 has no RR engine option. When there is a RR 'incident', the Bells and Highland Park take a severe beating and have been known to run out.
 
what's RR?
 
@AndyProwl Rolls-Royce, (lots of RR engineers get in the club).
 
I hope they will at least figure out what happened
May help making flying safer in the future
 
@AndyProwl Pretty sure they will. One recorder has already been recovered.
 
@MartinJames Yeah, I read that. That's something
Now I'm thinking back at that Malaysian airliner that disappeared last year
 
user1804599
6:46 PM
Bool is my favourite doubleton in Haskell.
 
They still know nothing
 
user1804599
And () is my favourite singleton.
 
Is bottom a legitimate value for Bool?
if so, it would make it a tripleton
 
@AndyProwl There are some few extra pics. Debris, white snow, green trees, no fire..
 
user1804599
@AndyProwl Bottom is a type of which there are no values.
 
6:47 PM
Ah, right
I should re-learn that stuff
 
user1804599
It's a subtype of Bool, though.
 
user1804599
(It's a subtype of all types.)
 
user1804599
Conceptually, in Haskell, since Haskell lacks a bottom type.
 
user1804599
forall a. a is used instead.
 
@MartinJames Well it's hard to believe it exploded on air
 
Xeo
6:49 PM
@райтфолд There is also the bottom value
 
It wouldn't have kept transmitting its altitute would it
 
user1804599
C++ has an ugly hack called [[noreturn]].
 
@Xeo undefined?
 
user1804599
@Xeo Tell me how to acquire it.
 
Xeo
@AndyProwl Would be Haskell's, ye
 
6:50 PM
@Xeo It's sarcastic
 
user1804599
undefined isn't a value.
 
Xeo
> OK I got dinged for not being a c++ expert and being too enthusiastic overzealous and idiopathic for the mod, so I'm not going to bother to test this.
lol
 
user1804599
Evaluating it results in an exception, not in a value.
 
user1804599
You can leave it unevaluated.
 
user1804599
I don't like default lazy evaluation.
 
user1804599
6:55 PM
If you go that way, make it so that it's purely an implementation detail, like in languages where all functions are pure and total.
 
This is great. I'd love to see something that an idiom like me could learn some c++ from. But all the vertical space in the code. All the scrolling... Think of the children — 1s and 0s 1 min ago
 
user1804599
 
do you guys think this is idiomatic enough? ideone.com/HinR4W
 
user1804599
@Veritas No.
 
user1804599
You're using array types other than std::array<T, N> and std::vector<T>.
 
7:00 PM
@AndyProwl It depends on what you count as "safer".
 
not sure if serious
 
@AndyProwl What about distance? Planes usually beat any other mode of transportation on whatever-unit-of-danger/km.
 
appending a char to a std::string is O(n)?
 
@R.MartinhoFernandes Lower number of casualties per overall hours of transportation, I guess
@R.MartinhoFernandes Good point
I know flying is inevitable if you want to cover certain distances in reasonable time and with reasonable safety
 
typedef decay_t<decltype(true ? declval<T>() : declval<U>())> type;
 
7:03 PM
@bluefog std::string has all performance characteristics like std::vector
 
Hmm
 
@bluefog I don't remember there being a guarantee on its complexity.
 
user1804599
@milleniumbug Wrong.
 
@AndyProwl The important point is that "safer" is a weasel word.
 
Another plane came down or disappeared?
 
7:04 PM
If it doesn't, it's useless.
 
@Jefffrey Came down
 
Shot down?
 
Not known
 
user1804599
@milleniumbug It does SSO.
 
user1804599
It also has to keep a NUL at the end.
 
7:05 PM
The airline is a partner of Lufthansa or something
 
I am generally in favour of the idea behind that "handbook", but using weasel words is not very good.
 
@райтфолд So fucking what?
Constants are irrelevant.
 
A group of wolves is a pack. A group of crows is a murder. What do you call a group of pedants?
 
user1804599
You said "performance characteristics," not "algorithmic complexity."
 
@R.MartinhoFernandes Well, yes, but I'm assuming the question one asks himself in these moments is not "should I fly to New York or go to the grocery store?" - it's rather, how much am I risking my life flying around rather than staying here?
Clearly walking to New York would be much less safe than flying there
(unless you live in NY)
@R.MartinhoFernandes a Lounge
 
7:09 PM
@LightnessRacesinOrbit nightmares? I'll find this useful when writing macros, way better than do { ... } while(...)
 
I like Wil Wheaton's take on it: pack of wolves, murder of crows, actually of pedants.
 
@AndyProwl Nah--drowning in the Atlantic is safer than being in New York.
 
I'm trying to get a string literal for the function name to concatenate it like:
"some stuff.... " __PRETTY_FUNCTION__ " more stuff..."
is something like this possible with clang?
 
@JerryCoffin haha, I'll take your word for it
 
7:10 PM
@райтфолд Which is the only performance "characteristic" described by C++ standard about operations on containers.
 
@gnzlbg __func__?
(since C++11, I think)
It doesn't behave like __PRETTY_FUNCTION__ though
 
Xeo
Not a string literal
 
@gnzlbg If __PRETTY_FUNCTION__ is a macro, stringize it with #
 
@Xeo I think it should be fine for what he wants to do
 
it seems like __func__ and friends are static const char ... = "...."; so when you try to use them you don't get "concatenation"
 
7:12 PM
oh
I get it
 
it doesn't seem to be a way
crap
 
Pantoona's "nice" deflation keeps going; more at 11.
 
__FUNCTION__?
Not sure if that's a thing
Surely not standard
 
Xeo
1 min ago, by Xeo
Not a string literal
 
user1804599
My colleague was beaten by automatic concatenation of string literals today.
 
7:13 PM
they are all defined the same __func__, __FUNCTION__, __PRETTY_FUNCTION__, __LINE__, __FILE__
 
user1804599
He had this:
 
crap
 
user1804599
'datetime'
'user_id',
 
user1804599
He got errors about datetime field not existing.
 
user1804599
Using repr printed datetimeuser_id lol.
 
7:13 PM
@gnzlbg Can't you just concatenate those as std::strings?
 
The problem was that he was using python.
 
@райтфолд I don't like that feature. I'll ban it in my future language.
 
@AndyProwl i actually profiling a release build with assertions enabled, and the std::string constructor is taking 80% of the time of one build (too many assertions)
 
user1804599
@milleniumbug It's a retarded feature.
 
Indeed it is.
 
7:15 PM
@gnzlbg Hmm
 
user1804599
> This mushroom is so raw, it told me the princess is in another castle!
 
user1804599
lol
 
Too easy to make trivial silent syntax mistakes, which can go unnoticed for a long time.
 
@AndyProwl A falsehood, of course, but we have a couple of New Yorkers I thought might be lurking... :-)
 
we have our own assertion macro with an error message, and it uses a stringstream, but for the location we used:

#define NS_AT_ \
(std::string(" at function ") + __PRETTY_FUNCTION__ + " in file " \
+ __FILE__ + " at line " + std::to_string(__LINE__))

and these are always constructed at "call-site of the macro"
 
7:20 PM
@gnzlbg Wait where's the stringstream?
I'm wondering whether sprintf() or something would do better
 
Well, fuck - __PRETTY_FUNCTION__ is not a string literal.
 
@AndyProwl im moving to cppformat and testing the two assertions responsible
the stringstream is not there, is only constructed if the assertion fails, so it is not a problem
@milleniumbug fuck indeed
 
Fuck flagger's around
@gnzlbg You can save yourself some string construction though, e.g. for __LINE__
 
found the bottelneck
 
SourceTree is so bad
 
7:26 PM
And you can then do stuff like STRING_LINE "Hello"
 
some moron rewrote an assertion macro into a function, and calling it was causing all the string constructions
ill put it back into a macro and see what happens
 
@gnzlbg Anyway in case you want to get rid of a few extra string constructions: coliru.stacked-crooked.com/a/d3bb3221e0f63aa2
 
@AndyProwl ...just doesn't work for __PRETTY_FUNCTION__ (or its relatives like __func__ and __FUNCTION__) because they're variables, not literals. Given the file and line, however, adding the name of the function may be unnecessary.
 
@JerryCoffin Yep, I figured that
 
class MM{};

int main(){
	SquareMatrix m;
	MM m;
	m.show();
}
This doesn't work.
 
7:37 PM
lol I doubt
 
MM declared before SquareMatrix type.
 
So, YouTube is suggesting me K-Pop. Fucking hell.
 
@DonLarynx What did you expect?
You can't have two local variables with the same name
 
Every time I remember that loungecpp.net is powered by rubby I laugh so hard. I have no idea why.
 
@Jefffrey Gets shit done.
 
7:38 PM
@AndyProwl That's true
 
user1804599
@Jefffrey Because you are a moron.
 
user1804599
You even intentionally misspelled "Ruby" like some other morons do.
 
Lounge<Morons>
 
> - Variables with static storage (such as global variables) that are not explicitly initialized are automatically initialized to zeroes.
 
Lounge<Morons> for president.
 
7:42 PM
@райтфолд What? rubby is actually spelt 'Ruby'?
 
class Z { public: Z();
protected: X x_; Y y_;
};
Z::Z() throw()
: y_() , x_(y_)
↑↑ // Bad: should have listed x_ before y_
{ }
wat
 
It's a warning
It reminds you that data members are initialized in the order in which they are declared
and not in the order in which they appear in the constructor's initializer list
 
o snap
so x_(y_) gets called 1st anyway?
 
Yes
 
that makes sense
 
7:49 PM
i have a linker error in c++ program while using wininet
 
user1804599
You deserve it.
 
In Fallout, the two main factions (the New California Republic and Caesar's Legion) use a bear and a bull as their respective emblems. I just realized it's a reference to a blood sport popular in Spanish California.
 
@Axeem link ws2_32.lib. Better still, add #pragma comment(lib, "ws2_32.lib") to one of your source files to automate linking to it.
 
error is still here
I am using dev c++
 
8:02 PM
@Axeem use clang++
 
can any one tell me how can I solve this
?
what is clang++
?
 
@Axeem IRTA whinynet
@Axeem It's an awesome compiler
!
 
@Axeem You wrote almost no detail about your problem
How can we possibly help?
 
@Axeem I think I have the solution, are you willing to try it with me?
 
ok
 
8:04 PM
"Houston, we have a problem"
"This is Houston. What's the problem?"
"We're having it. We need to solve it"
 
@Axeem I don't feel like repeating myself, so follow me carefully step by step, ok?
 
inb4 walks away from the chatroom
 
It's important that if you are sitting down, you stand up.
 
ok
 
@Jefffrey lol, come on
 
8:05 PM
I know it seems unnecessary, but please actually stand up.
@Axeem You standing up?
 
Now it's really important that you sneeze
 
user1804599
@Axeem no
 
user1804599
SSCCE.
 
Pretty please don't quote the movie.
 
@R.MartinhoFernandes Fascinating
Did I write something bad?
Like, unintentionally quoted something the wrong way?
 
8:08 PM
You quoted the movie.
The movie copied several lines verbatim from the mission transcript but for some reason got that one line wrong.
 
Oh, that was unintentional
I haven't seen the movie
 
@AndyProwl Well, it's what everyone quotes, anyway.
 
Lost connection with Axeem I guess.
 
@Jefffrey He's busy trying to sneeze
 
@R.MartinhoFernandes You mean that you should say "Houston, we've had a problem" instead of "Houston, we have a problem"?
 
8:27 PM
This could be a fun party game github.com/jsomers/git-game
 
@Jefffrey Depends whether you want to quote the mission or the movie.
 
This is still a static link library coliru.stacked-crooked.com/a/bf3652a9b0d69452
 
Also fuck, I'm stuck reading the Apollo transcripts again.
 
user1804599
They must've been a fan of Roger.
 
8:46 PM
So I click on the Vostok 1 transcripts.
And it turns out it's all in Russian.
 
Word with "m" and "z" please
 
I should have expected this.
 
@Jefffrey zoom
maze
 
user1804599
@Jefffrey MH Zeventeen.
 
mozerfucker
 
8:47 PM
lol, thanks
 
I would have said "motherfuckerz".
 
@sehe Does the education in the USA have no enforceable standards?
 
@AndyProwl Mozzafucker.
 
ARGH this is so overengineered.
I really need to get more active reviewing other people's code.
Also, I should probably go home.
 
You're still at work?
 
8:59 PM
Or the pub. It's pub day.
 

« first day (1620 days earlier)      last day (3311 days later) »