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

user1804599
18:00
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
18:03
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
18:11
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
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
Xeo
18:25
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
Xeo
.@SkyNews beware "Aviation Experts" http://t.co/WzDcKJKr1L
18:29
@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
Xeo
18:33
@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
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
18:35
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
Xeo
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>
18:37
and Vlad answers...
Xeo
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
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
18:40
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
18:46
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.
18:47
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
Xeo
18:49
@райтфолд 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
Xeo
@AndyProwl Would be Haskell's, ye
18:50
@Xeo It's sarcastic
user1804599
undefined isn't a value.
Xeo
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
18:55
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
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>.
19:00
@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;
19:03
@bluefog std::string has all performance characteristics like std::vector
@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?
19:04
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.
19:05
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
19:09
@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
19:10
@райтфолд 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
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"
19:12
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
Xeo
1 min ago, by Xeo
Not a string literal
user1804599
My colleague was beaten by automatic concatenation of string literals today.
19:13
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.
19:13
@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.
19:15
@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"
19:20
@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
19:26
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.
19:37
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.
19:38
@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.
19:42
@райтфолд 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?
that makes sense
19:49
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++
20:02
@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
20:04
"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
20:05
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.
@R.MartinhoFernandes Fascinating
Did I write something bad?
Like, unintentionally quoted something the wrong way?
20:08
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"?
20:27
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.
20:46
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
20:47
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?
20:59
Or the pub. It's pub day.

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