« first day (1054 days earlier)      last day (3885 days later) » 

12:12 AM
@R.MartinhoFernandes you there?
Wow Coliru is slow today.
 
@Rapptz Just got home, slightly drunk. Yes. Why?
Also, I won against UEFI.
 
think you can help me understand something silly?
 
@R.MartinhoFernandes gratz
 
12:14 AM
I'm sure you're not as dumb as that guy in the asylum.
@Rapptz What's wrong with it?
 
How come it's producing so many errors if I put the required struct on the template but not if I put it in the body?
Is that a weird GCCism
 
Well, I don't think you can avoid that :S If you look at it, error recovery on static assertions is quite easy: just continue as if the assertion passed. It's natural that compilers implement it.
 
meh :/
 
It can be a bit unhelpful, but it's one of those cases where people will always complain no matter the outcome.
 
Just annoying that I have to like, scroll all the way up to see my concept failures
 
12:19 AM
@CatPlusPlus Still pondering whether to reply to that dude.
I'm pretty sure it will be worthless.
 
I guess it's cleaner to put it in the body anyway :s
 
Yeah, that way it's in the "interface".
 
@R.MartinhoFernandes Sadly, I'm agreeing. The worst part is when he (out of ignorance?!) is misreprenting your statements so badly
@Rapptz Sorry, I was compiling my answer
 
@sehe Yeah, that's why I am pondering whether to reply. I will merely be repeating the same shit.
 
I don't know how that guy got variable templates from is_const still
boggling my mind tbh
You'd imagine that making a proposal about <type_traits> you'd at least know the contents of the header
 
12:23 AM
@R.MartinhoFernandes And he'll be repeating it back at you, but with a strangely inverted interpretation, all the while forgetting what he was actually arguing --> chat.stackoverflow.com/transcript/message/11592067#11592067
 
Maybe it's time to finally rip someone to shreds, as the Cat put it.
Or maybe I should only post there sober.
 
@Rapptz He's got a hazy knowledge of meta-programming. Period. He conflated lazy type functions with passing template template arguments. For no reason. He doesn't know the difference.
@R.MartinhoFernandes +1 (please, hover closely on this one)
night all
 
At my new job I was given carte blanche to fix any silly things I find in the codebase. $ grep -R "using\s+namespace\s+std;" . yields zero results. If it did yield anything, it would have not taken me 10 years to fix it.
 
12:39 AM
@Rapptz I hate to break this to you, but the audio is most likely made up. Security cameras don't record sound.
 
@Insilico I don't let reality get in the way of comedy.
 
(Although the audio is plausible, given the behavior of said customer. lol)
@Rapptz Don't get me wrong, it doesn't make it less funny. :-)
 
12:54 AM
Has a proposal for std::matrix<T> been made yet? I presume something like that would be suggested all the time and rejected for some reasons I am oblivious to.
 
Screw it, I posted a tutorial on reading comprehension.
I should go to sleep now.
 
@MohammadAliBaydoun Look at valarray, chances are they don't want to repeat that.
 
I'm sure I'll regret it in the morning.
 
@MohammadAliBaydoun Not that I have seen. I very much doubt that the Standard wants to get in on this space.
 
@MohammadAliBaydoun Look at Eigen.
 
12:57 AM
Everyone wants different things for something called std::matrix<T>. Not gonna happen, I think.
 
Matrix like C#'s [,] or?
 
Ooh, Eigen, I love that word ;_;
 
C#'s [,] are nasty.
 
It's so sexy and wonderful
 
Speaking of Eigen. We use that at work, and a coworker showed me their docs where they claim passing Eigen types by value is broken due to alignment and shit. How come?
 
12:58 AM
[,] is fucking weird
 
@R.MartinhoFernandes SSE types. Some compilers (I know VS is in this batch) bitch and whine when you use SSE types in some value contexts because the compiler can't cope with the extended alignment.
 
It is? I thought everybody here liked them.
 
I don't like them
 
Is "jagged arrays", as they seem to be called, really common? I don't recall ever having done that.
Especially not when I wanted a rectangular grid.
 
@DeadMG So (as I told my coworker) it's a compiler bug, then?
Meaning that if you put a member with extended alignment in a struct, the struct doesn't always get properly aligned?
 
1:02 AM
no, the compiler issues an error.
 
@DeadMG Yes, but I call that issuing of an error a bug.
 
but it's still a compiler limitation that they don't correctly handle SSE types in all contexts.
 
At least they will have to "fix" it for C++11 alignas.
 
lol have to, don't hold your breadth ;)
 
Anyway, that sucks balls.
 
1:05 AM
yes
 
0
Q: Why isn't my std::set sorted?

user2183336I have a class to store data that looks like this: class DataLine { public: std::string name; boost::posix_time::time_duration time; double x, y, z; DataLine(std::string _name, boost::posix_time::time_duration _time, double _x, double _y, double _z); //assign all these, ...

:|
 
edited the question to reflect what Mats mentioned — jev 2 mins ago
His changes basically removed the errors that caused the question in the first place... (he removed the ; after the if(/**/) and added brackets)
 
I should refrain from posting on std-proposals at all and stick to tweeting on @stdasylum. I get really pissed off when I have to read what I wrote back to the people that supposedly read it.
@Borgleader lol
Oooh nice, proposal for operator void().
Sad it's late for C++14.
 
Yeah, I want both.
 
1:13 AM
I would really like python modules in C++
 
We all do
 
If Modules and Concepts made it into C++11 that would have been one impressive change from C++98
 
@Rapptz Gonna mention operator auto in that thread.
 
I don't get the point of operator void()
 
@Rapptz Is that casting?
 
1:20 AM
no, it's about unused variables.
operator void(), if I recall correctly, would be used if you had a temporary of that type that was not used- e.g. passed to a function, whatever.
 
@Rapptz explicit operator void() would make foo(); as a statement ill-formed, but auto x = foo(); or bar(foo()) well-formed (for a foo that returns an appropriate type, of course)
 
Oh I see.
 
I like it.
 
I am indifferent. I don't see a case where I'd want to do that
 
@Rapptz Expression templates.
 
1:23 AM
I guess
 
@DeadMG Meh, not really. Discarding a template and discarding an evaluated template seems the same to me.
Except discarding an evaluated template incurs an extra cost.
The biggie with expression templates is auto x = blah + blah + blah; ending up holding refs to temps.
 
It forces you to use the return of a function?
 
btw robot
I am trying to figure out this whole polymorphic literals thing so I can drop implicit conversions in Wide.
but I just can't see how it's really so much different to implicit conversions.
 
You mean like in Haskell 5 is not Int?
 
well, I'd prefer to focus on None and Optional personally rather than integers
since those are user-defined
 
1:29 AM
Well, basically, you make any expression with None in it have a type like "template <typename T> Optional<T>" and deduce T later from the context.
 
right.
so any context where T cannot be deduced is immediately illegal?
 
Depends. Somethings it can be deduced to something like "the same as the function parameter a". In that case you make the function a template too. But yes, if that T in Optional<T> is completely contained within the function, make it an error.
 
right, but that's where things get kinda messy.
if I say "You can pass None to a function, and T can be deduced from the function body"
then what is the type of the argument?
 
FWIW, I'm not sure if this is as easy with overloads. Haskell gets it easy because of that.
 
it seems to me that either I say that not all expressions have well-defined types, OR, I'm implicitly converting from some none-type to Optional<T> and I'm back to implicit conversions.
 
1:32 AM
@DeadMG Example?
(Sorry, not in my full reasoning capabilities)
 
@R.MartinhoFernandes Imagine if I have f(x) { vec := std.vector(decltype(x))(); }.
 
@DeadMG The former is what Haskell does. Some expressions only have constrained types (unless you are in the interpreter, where it makes some assumptions for the sake of usability).
 
in C++ it's legal, even if not very sensible.
 
@DeadMG You can deduce it from the type of vec. Yeah, this won't work with C++ style deduction.
 
I mean
this functionality to me seems to be inherently related to the operator auto() stuff.
similar, but not exactly the same.
 
1:35 AM
@sehe You mean, not the people discussing new C++ TMP features in the Asylum ;)
@DeadMG The thing is, C++ deduces types "inside-out", but this won't work without "outside-in" deduction.
 
what exactly do you mean by outside-in?
 
If vec has a well-known type (say std.vector(int)) C++ would refuse compilation with a type mismatch.
However, a smarter type deduction would merely make the function take an int argument because that's the only valid type.
 
Never mind, your second sentence makes that make sense.
@R.MartinhoFernandes Yeah, that's definitely not going to fly when you have overloads.
 
@DeadMG For C++, the type of an expression depends only on the expression. You start from the inner subexpressions and deduce the types of the outer from there. This thing requires the types of subexpressions to be deduced also from their outer "superexpressions", IOW from the context where the expression is used.
 
I was thinking about trying to add something like that.
but that's not going to solve all the issues I see with None in that respect
I'm much more concerned about stuff like decltype(None).
 
1:41 AM
hehe
 
I could just make it illegal I guess.
obtw
how does Haskell's type system compare to C++'s in terms of things like Turing-Completeness?
because I'm also seeing that as going to be an issue.
 
If you go pure Haskell, it's not Turing-complete, but with some "normal" extensions it is. (Extensions in Haskell are not super shunned because there's pretty much only one mainstream compiler).
 
I already had to drop something like template<typename T> f(Optional(T)) because there's no way to infer T when Optional is an arbitrary function.
 
Hmm. That's sad.
 
well intuitively, it's a power/ease of use tradeoff.
the more flexible it is, the less you can infer what the user meant to do with it.
 
1:47 AM
Yeah.
 
I personally suspect that alias templates in C++ are already a similar problem.
 
Alias templates are sorta like macros.
 
Dumb question, declval<T&&>() is an r-value right? :s
 
for example, you couldn't have template<typename T> using iterator = typename std::vector<T>::iterator; template<typename T> void f(iterator<T> it);.
 
I.e. if their replacement would be deducible, they are. Otheriwse no.
 
1:49 AM
@Rapptz Not if T is something like U&.
 
@DeadMG Yeah, but typename std::vector<T>::iterator would not be deducible anyway.
 
yeah
 
@DeadMG I guess I'll remove reference first
 
But yeah, it's similar.
 
but since in Wide, I treated basically all such things uniformly- i.e., they're all the generalized version
 
1:49 AM
You don't have nested types in Haskell type classes.
 
intuitively, I'm not sure it's something I'd want in Wide.
 
(Well, there's an extension for it, but there's a reason it's not even considered for core)
 
but I'd need it for C++ compat
and I'm not sure I care enough to get rid of it
 
:P
 
1:50 AM
@Rapptz Yeah, that's the only way to be sure (and it's what std::move does)
 
I don't know if the whole None-is-polymorphic-literal thing is going to work in that kind of context.
 
I think it won't.
 
@R.MartinhoFernandes I suck at sharing ;_;
 
and I also need to consider exactly what I'm going to do with operator auto().
 
I don't find TMP scary :d
 
1:53 AM
@DeadMG You really gotta pick between the keeping cake or eating it :S
 
yeah.
 
Or change universes, because ours sucks.
 
I think that for the foreseeable future, I'm going to have to be keeping implicit conversions.
 
C#'s really strict with conversions
 
C#'s most advanced type feature is generics and those are very weak.
 
1:55 AM
either that or I suck, because I had to cast bool? to bool
which I kinda found silly but whatever
 
it is very strict.
 
@Rapptz ?? not usable?
Btw, have you guys ever turned on checked arithmetic in C#?
 
In WPF if a checkbox is checked it returns bool? so I have to do if((bool)mycheckbox.IsChecked).. at least that's what I remember.
 
Compiler goes nuts on your code if you do.
@Rapptz Ah, that's because they use bool? for silly tribool semantics :( (Checkboxes can be tristates)
 
yeah I know, just a little silly.
 
1:57 AM
At what time does Going Native start tomorrow? (and which timezone are they in?)
 
@R.MartinhoFernandes I was just about to say, how the fuck can a checkbox not be checked or unchecked?
 
@MohammadAliBaydoun Is that video worth watchin? (aside from the funny clip part) /cc @R.MartinhoFernandes
 
fuck I can't get win32-loader to work :<
 
I've never watched any of Scott Meyer's talks
or anyone's talks
 
@DeadMG It's when for example you have a box that has subitems: checked means all subitems are checked, unchecked means all are unchecked, and the middle (usually displayed as a square instead of a check mark) is when they are mixed. I think.
 
1:59 AM
it goes checked -> unchecked -> intermediate iirc
 
I'd really not call that a checkbox.
 
See "Peter".
 
@Borgleader Well, he mainly talks about the concept of constraints and how you can give functions constraints like "threadsafe" or "noexcept", so a caller can only call a callee if the constraints of the caller are a subset of the constraints of the callee (Also, I'm up to 20 minutes now :D)
 
just have two different classes.
they can share almost all the other stuff.
 
2:00 AM
Intellisense decided something was correct after thirty seconds. Interesting.
 
@Pawnguy7 Don't trust intellisense too much
it whacks out quite often
 
@Borgleader Oooh, tomorrow? It's in Redmond.
@Borgleader Dunno, I haven't even watched the funny part.
 
Learned that lesson after I looked for an imaginary problem :D usually, though, when it is off, it resolves itself after I do a build. In this case, it did it by itself - I didn't provide any input - after thirty seconds. Not sure why it would take that long... hm.
 
@R.MartinhoFernandes Alright, thanks :)
 
Starts at 09:00.
So, 09:00 PDT, 16:00 UTC.
Meaning 18:00 CEST.
Fuck it's 4AM.
Good night peeps.
 
2:06 AM
@R.MartinhoFernandes 'night
 
Is there a generic name for intellisense like stuff?
Not sure if autocomplete includes it, or is considered part of it.
 
I would call it "on-the-fly code analysis" or something.
Right, sleep.
 
What robot said
real-time/on the fly/continuous code analysis or something
 
Could also put "static" before "code".
Hello all.
 
sup
 
2:11 AM
Still waitin'. :)
 
too late to edit
 
What does "CD comment ballot" mean? In the C++ standardization, that is.
 
That reminds me. Wasn't there some lanaguage/IDE combo with that... what is it? Like, changing code as it runs?
 
@Pawnguy7 JIT or something?
 
@Pawnguy7 AFAIK you can live edit code in VS, cant remember if its for c++ or c# though never used the feature
 
2:15 AM
definitely not C++
but C# appears to have edit/continue
 
Or polymorphic code for malwares.
 
I know C# has edit and continue.
VS2013 Preview added it for 64-bit applications, too.
 
Do other languages have the same {} compiling issues as C++? Like, if you accidentally forget the end brace of a function, for example, you end up finding out... later.
 
VS screams at you when you change C++ code while debugging and expect to continue :<
 
@Pawnguy7 It's definitely not a C++-specific issue.
 
2:26 AM
IT SHOULD MENTION IT NICELY ;-;
 
@Pawnguy7 That's a language parsing issue afaik, so any language who uses {} would suffer from it
 
@Borgleader Same with BASIC-like begin/end keyword pairs.
 
Makes sense. Still, it seems - though, this isn't backed up by much experience - that the less complex the language (and thus simpler the parsing), the more friendly the error messages get.
 
What "less complex languages" are you referring to?
 
@Pawnguy7 The lazier the implementors, the stronger the error message encryption is.
6
 
2:30 AM
I think clang does a good job with error messages.
 
@Borgleader Not sure. I think I have heard it in comparisons of C++ vs C#, but again, I don't really have any sort of experience.
 
I don't see how C# is "less complex" than C++. It's higher level, and as the robot puts it, pushes you into the pit of success. But it's not "less complex" IMO.
 
Though that can't be applied to the VC++/VS team. They're lazy, though the error messages are a bit more tolerable than GCC's.
 
Why do template-template parameters require it to be class instead of typename?
 
I would think it would be easier to parse, but I don't well known the extent of its syntax features.
 
2:32 AM
e.g. template<typename T, template<typename...> typename... Args> is an error
 
@Rapptz Probably just nobody got around to fixing it.
 
Probably just some GCC bug.
 
@MarkGarcia Nope.
 
@Pawnguy7 Has happened with most languages I've dealt with, all the way back to Fortran 77. The only major exceptions have been pre-77 Fortran, and some versions of BASIC, which avoided it the same way: no block structure, so no chance leaving off a block-terminator. Believe me, that's a lot worse.
 
@DeadMG Oh. I mostly believe in "If it's not the standard's fault, then it's a GCC bug." I go more that the side of the standard to be less faulty in these situations. :)
 
2:36 AM
@JerryCoffin How does it work without blocks?
 
@Pawnguy7 Labels mostly, I think.
 
@Pawnguy7 In BASIC, you only had GOTOs. In Fortran you had...hell. The if statement went like if (expression) label1, label2, label3, in which it jumped to label1 if the expression was negative, label2 if it was 0, and label3 if it was positive.
 
@JerryCoffin Those are the good old times.
 
@JerryCoffin Fortran reminds me of Excel.
The cell formatting.
 
@Pawnguy7 Wide can recover from it in some places.
 
2:41 AM
@chris Hmmm...maybe that's why I hate Excel.
 
@JerryCoffin It's very possible. I was working to figure it out to format one specific thing for one specific piece of Accounting homework once.
 
@MarkGarcia There's a reason I do a lot less C++ bashing than most others here. While far from perfect, I've dealt with so much worse, it's not even funny...
 
hmm
I wonder how easy it would be to write my own parser generator, if I kept it to a specific purpose.
 
If you write a good one, tell me. I might end up using it in the not so near future
 
@JerryCoffin In how you say it, it looks like future C++ programmers wont have much fun at all ones they get the perfect C++ (auto auto auto..., I mean). :)
 
@Borgleader Downvoted it.
 
@Borgleader link dump
get rid of it
 
hell, I had to downvote every answer to that question.
 
there is no flag -> link dump. Low quality maybe?
 
@Mysticial but you are the one who dumped the most links here in this lounge
The pot calling the kettle black
 
2:49 AM
eh, I see no reason to flag it instead of nuking it
 
FredOverflow is in europe somewhere right?
 
@chris Although it's UB, nothing is stopping you from doing a general operator overload with some SFINAE/constraints.
 
@Borgleader German, I thought.
 
@DeadMG Ah ok, thanks. I'll know when to stalk the lounge then. I want to show him my Shellsort implementation even though it's slow as fuck compared to std::sort
 
@Rapptz I take the "although it's UB" part way too seriously :p
 
2:53 AM
It's not UB to do what I said.
I should have phrased it better
 
@Borgleader std::sort implementations are very sophisticated.
 
I meant Although it's UB [to do operator overloads for stuff in std]
 
@MarkGarcia I know, but I'm talking much much slower... not like 3-4 times slower more like 30-100 times slower xD
maybe more =.=;
 
Is your sort O(N^2)?
 
@Borgleader Maybe you're using a bad gap sequence.
 
2:55 AM
@Rapptz Oh, I was confused for a moment. I see what you mean, and it sounds like a workaround that shouldn't be there :p
 
@MarkGarcia Well according to the course lecture the one im using is ok. I haven't tried the better one because it's a bitch to compute.
 
@chris I do it myself. Definitely helpful.
You wouldn't want it to pollute the global namespace though, so I typically do namespace a { namespace operators { /* */ } }
 
Was BASIC compiled?
 
@Pawnguy7 In most, no. Most are interpreted.
 

« first day (1054 days earlier)      last day (3885 days later) »