« first day (971 days earlier)      last day (3992 days later) » 

8:00 AM
 
Needs moar constexpr.
 
Nice.
 
@thecoshman I got the book from the suggestions here :P
 
And noexcept?
 
A wrapper-worker setup could save some more moves/copies.
 
8:02 AM
@user2442335 oh ok then. Still, I wouldn't suggest C++ as a starting language, unless you knew that you wanted to use it
 
anyone here have Animal Crossing :D
 
@R.MartinhoFernandes I don't understand..
 
Well I'm pretty sure, I heard all them fancy game engine are written in c++
 
Actually, std::min is a bad idea.
 
is adding noexcept something like adding const? as in something you want to try to do as much as make sense to?
 
8:03 AM
It's as broken as your original 1-arg overload.
@thecoshman I just don't fucking care. I only noexcept my swaps.
 
@thecoshman According to Scott Myers it is something you should use whenever possible.
 
@R.MartinhoFernandes lol, hung over?
 
@thecoshman Yes, but unrelated.
noexcept is fucking annoying.
 
@StackedCrooked now I just need to learn when I need/can use it :P
... I'm just going to look something up... sit tight
wait, it's an operator too?
 
@R.MartinhoFernandes Why?
 
8:05 AM
Jun 4 at 23:31, by R. Martinho Fernandes
result_of::f<T> f(T&& t) noexcept(noexcept_of::f<T>()) this gets tedious quickly. Fuck noexcept.
 
I like smashing my keyboard when making examples at 4 in the morning.
 
@Rapptz @StackedCrooked's is much shorter. :P
 
auto f(T&& t) noexcept(noexcept(g(t)) -> decltype(g(t)) {
    return g(t);
}
// WTF how many times do you want me to write g(t)?
 
Yeah his is using std::min
 
It feels like Java, with the differences that 1) at least it is optional and 2) it's even more boilerplate-y.
 
Xeo
8:07 AM
decltype(auto)! :D
 
@R.MartinhoFernandes Lesser when we finally have those deduced from return feature.
 
@MarkGarcia There's no such thing for noexcept so fuck it.
 
@Rapptz Oh.
 
@MarkGarcia Which highlights another problem: no one gives a fuck about noexcept.
 
Having to repeat typename std::common_type<Head, Args...>::type is also tedious.
 
8:08 AM
I'd just use aliases.
 
@R.MartinhoFernandes And exceptions come and go on every function we call.
 
Unfortunately I have to use gcc 4.5 which doesn't support aliases yet.
 
Aliases are the best.
 
@StackedCrooked template<typename Head, typename ...Args, typename Common = typename std::common_type<Head, Args...>::type> constexpr Common ... std::min<Common>...
 
I didn't think much of type aliases but I've grown to love them quite a bit.
 
8:11 AM
@R.MartinhoFernandes I have done that in the past, but I thought it's bad practice..
 
@Rapptz haha, btdt
 
@Rapptz I do like them.
It's like type currying, or something.
 
noexcept(noexcept(int())) is that setting the value of noexcept for the function, to value of the call to noexcept that checks if int() is noexcept or not?
 
@StackedCrooked I do it all over the place. I find repeating the computation is worse.
 
user142019
Boo.
 
8:11 AM
@thecoshman Yes.
 
user142019
noexcept(__LINE__ % 2)
 
@rightfold noexcept(__COUNTER__ % 2)
That's less predictable :)
 
user142019
void yo_momma::eat() noexcept { // Loves ALL food! No exceptions!

}
 
Xeo
You guys be violating the ODR with that. :3
Well, very likely, anyways.
 
@rightfold What if she throw up;?
:P
 
8:14 AM
@StackedCrooked noexcept(__TIME__[7] % 2)
 
user142019
@MarkGarcia termination.
 
@R.MartinhoFernandes lol
 
user142019
I want static for.
 
Meh, loops.
 
Just do the good ol' recursion.
 
user142019
8:16 AM
Meh, so much typing.
 
lol static for
 
user142019
Also, void foo(int... xs).
 
Yeah that's something I want too
 
user142019
std::initializer_list is fugly. :3
 
¬_¬ I love it when you have some questions about a design, and the response is simply restating the original design
 
user142019
8:17 AM
When people ask me things and I don't know the answer, I just say something that's kinda related to it.
 
user142019
They always do that at presentations too.
 
And if you have a partner, do: "And hey, do you remember that conversation of ours... blah blah".
And they will all think you two are geniuses.
 
user142019
 
user142019
Sometimes I don't understand how somebody can be that retarded.
 
user142019
8:23 AM
It's unbelievable.
 
What kind of school is that?
 
user142019
A terrible one!
 
user142019
And if doing such a thing isn't illegal by law, the country sucks too.
 
> Grace University is a premier Midwest Christian college located in Omaha, Nebraska.
 
user142019
Cool Go 1.1.1.
 
8:26 AM
noexcept double sqrt_abs( double x ) {
  noexcept {
    return sqrt(abs(x));
} } // ಠ_ಠ
 
user142019
Is that a noexcept statement?
 
@thecoshman How did you create that slider?!!
 
@MarkGarcia I did?
 
@thecoshman Yeah. My browser's showing a slider.
 
8:27 AM
reading this but it might be a bit out of date
@MarkGarcia well, normally it would only do that for a long message... you got a tiny penis screen?
 
oh, that code was one of the ideas for noexcept, not how they were actually done
@MarkGarcia odd... you have the entire message there
 
NVM. It's just... weird.
 
refresh, see if it still generates it
 
@thecoshman Oh fuck. It's still there.
 
8:31 AM
@MarkGarcia run! before it blows up
 
Probably my script doing something...
 
Xeo
FWIW, I also have the scroll bar
 
queue Big Lewbowski meme :P
 
OK. It's an entirely new StackExchangeâ„¢ WeirdScrollBarâ„¢ feature.
 
@Luc Ah, so your combinators accept ranges, but the ranges store traversables, right?
 
8:33 AM
BTW, what is int&& iref = 1234; actually referring to?
 
Oooops, fucked up that plink.
 
A temporary (int(1234))?
 
@MarkGarcia Temporary with extended lifetime.
 
@R.MartinhoFernandes OK. That answers it. Thanks.
 
@R.MartinhoFernandes extended in what way?
 
8:35 AM
@thecoshman Extended to be the same as the reference's lifetime.
 
oh... wouldn't it be like that anyway? like int& ref = 1234 or does that not work?
oh oh oh
it will not work, because '1234' is an R value... as it is a constant thingy... and you can't take a ref of those... unless you use &&
o_0 maybe?
 
You can only bind it to int&& or int const&.
Well, or int const&&, but that's esoteric.
 
is my reasoning correct?
 
Except for the "constant" bit.
 
Hm. The first two are UB right? But the third is valid.
 
8:40 AM
First one definitely is.
 
But the second and third one seems to behave the same.
 
defiantly
 
I like to try the second one in a non C++0x compiler to see the difference.
 
> error: function returning a function
Oops.
 
user784668
23 hours ago, by DeadMG
@Fanael If she didn't make more money for us than she cost, she would be out on her ear.
 
user784668
8:44 AM
@R.MartinhoFernandes and why is this even an error?
 
Because returning functions is not allowed?
 
@R.MartinhoFernandes o_0 ooh
 
user784668
@R.MartinhoFernandes lol@the-language then
 
well, yeah
if the function can't return a function the language is seriously flawed
 
8:47 AM
because it's a basic concept which is quite useful
 
Runtime code generation is not that basic.
 
std::function<...> getFoo() { return []{...}; } would work, no?
 
Note that returning function pointers is perfectly fine.
 
C style function pointers are kinda limited.
 
How?
 
8:49 AM
They're just ugly.
 
they're C.
 
?_?
Anyway on that note I'm going to go.
Good night.
 
@Rapptz Good night.
 
@BartekBanachewicz ...
 
well okay I was thinking about functors and whatnot
if you code in pure C, they are probably enough
though it's pain in the ass to make stateful functors with them
 
8:53 AM
The search now actually makes sense.
 
9:09 AM
@BartekBanachewicz I still have no idea how that relates to the ability to return function types.
 
@MarkGarcia google.com.ph?
That's fishy.
 
user142019
@StackedCrooked Philippines.
 
@StackedCrooked Oh. Haven't noticed that. It seems to automatically redirect to .ph when I type google.com.
 
user142019
I don't understand .com.xx and .co.xx. Why not just .xx?
 
Same with other countries, I think.
@rightfold Yes.
 
9:13 AM
@rightfold If I own com.be then I can make google.com.be and people would think it's the official google.
 
@StackedCrooked Yes. And Google would pay a high price for that. :)
 
I could use it as a proxy to google but replace their ads with mine.
And other evil stuff :P
But I suspect Google has mechanisms to detect such things.
 
@StackedCrooked Google is a master of detection. ;)
 
user142019
Google is NSA.
 
All they need to do is ban the IP of com.be.
 
9:18 AM
@StackedCrooked .be probably won't let you register com.be
 
user142019
Haha.
 
user142019
Somebody in the train shat their pants.
 
user142019
Better move to another compartment.
 
9:23 AM
@rightfold how do you know?
 
user142019
The sudden smell!
 
Are you joking?
 
user142019
I moved to another compartment and smell was gone.
 
@rightfold So the smell was local to one compartment. That's probably where the culprit is then.
 
Xeo
9:24 AM
@R.MartinhoFernandes Where's that from?
 
user142019
Star Trek
 
@Xeo The ISS.
 
user142019
I wonder whether Sphinx supports variadic templates.
 
user142019
Or C++ at all. IIRC it does support C.
 
Meh. Those generic doc things are crap to start with and terribly unsuitable for C++ on top.
And I am not talking about the parsing.
 
9:38 AM
quiz
void f() { return 0; }
with at most 5 tokens. fix this example to compile. don't change the return type of "f", don't use comments, don't use string literals, don't use the preprocessor
there are two different ways at least. show both!
 
no.
 
@DeadMG then you won't become famous. sorry :(
 
So @o2de accidentally cancelled my DSL account early (getting a new one from them tomorrow), and "what was disabled can't be reactivated".
lolwut
"accidentally"
"Hey, WTF happened to my Internets?" "Oh, we are very sorry. One of our interns fell asleep on the Delete key."
 
ok chaps
I need good articles demonstrating why it is better to send a rest DELETE request with json for the list of objects to delete rather then POST a list then call a DELETE on that list. Sadly, I can't cite here
 
Erm, just find anything about statelessness?
 
9:51 AM
@R.MartinhoFernandes: Not sure I understand your comment. Or rather, I think I understand it, but I'm missing the point
 
Which one?
 
apparently most of the stuff out there suggests the two request approach is better
 
Types are not their names. — R. Martinho Fernandes 3 mins ago
 
Oh, that's just a short summary of your answer and the comments.
 
Xeo
A type can has many names.
 
9:52 AM
Oh, all right. I thought there was something wrong with the answer
 
Xeo
But it still is only one type.
 
@AndyProwl I edited to make its summary nature clearer.
 
OK, thanks :)
 
@Xeo s/has/have/
 
@Xeo Yes. the OP was concerned with the sentence "the type of 42 is foo" when you have a typedef int foo. They were claiming that the type of 42 is int, not foo, and foo is just a name.
 
9:54 AM
@thecoshman s/have/haz/
 
Xeo
@thecoshman That was totally on purpose.
 
@AndyProwl Yeah, but int is just a name as well :S
 
@R.MartinhoFernandes s/haz/fuck off/
@Xeo right so
 
@R.MartinhoFernandes Exactly
 
> A type can fuck of many names
Interesting.
 
9:56 AM
let's be wrong correctly :P
 
It's like saying 0 is the number of Saturn Vs I own, but "zero" isn't, because it's just a name for that number.
 
@R.MartinhoFernandes ¬_¬ did you really have to pick a rocket name that could by mistaken for you saying "foo vs bar"
 
What is the difference between native _Bool and bool from stdbool.h?
 
Why do I keep finding this lack of "entity-representation dichotomy" among programmers?
I think it's such a basic idea that any programmer that cannot grasp it is in the wrong field, yet it keeps popping up :(
 
I have no idea what that is.
 
(although I usually find for most things you name, it's what I already know under a different name)
 
@DeadMG I just made up the name, hence the quotes. I wonder if there is one. And I am not too happy with what I got.
 
Also Alice in Wonderland soundtrack is on spotify
 
@R.MartinhoFernandes Okay... So I went through MinGW include directory... I didn't find any stdbool.h . So does the compiler do typedef _Bool bool when I include stdbool.h?
 
@DeadMG It's more or less the ability to reason keeping a number distinct from the numeral that represents it, or in this particular instance a type from its "canonical" name.
 
10:06 AM
well obviously two things are equivalent if they are the same thing under two different names.
 
Jun 3 at 13:58, by R. Martinho Fernandes
Though helicopter is a vehicle; "helicopter" is a word. lern2quasiquote :P
Kinda like this.
 
@R.MartinhoFernandes Can I take that for "Yes"?
 
No, you should take for "Possibly Maybe".
What?
 
Nothing
 
I mean it. It's a possibility. It may or may not be like that.
I believe it is by far the most common approach though.
 
10:13 AM
@R.MartinhoFernandes "it is by far the most common approach" - What does "it" refer to?
 
I refers to using typedef _Bool bool in stdbool.h
 
it makes me wanna cringe
I had way too much contact with custom C dialects at uni already
we used like 4 or 5 of them
 
Wait, is it required to be a macro? WTF.
 
@ShuklaSannidhya it's horrible
 
10:18 AM
It's standard.
 
that's what I said.
 
user142019
@JohannesSchaub-litb void f();
 
alright
yay for Wide's substantially improved lexer
 
static_assert(is_true_sequence<flatten_sequence<std::pair<std::pair<char*, char*>*, std::pair<char*, char*>*>>>(), "flatten_sequence must be a true sequence");
What a fucking mess.
 
hurr concepts durr
 
10:21 AM
AFAIK concepts lite lacks archtypes, so it does nothing to help here.
 
what's an archtype in this context?
 
Those idiots think that removing all the interesting features from concepts is good because it makes it easier to add concepts to the language...
 
I already agreed with you on that, remember?
 
@BartekBanachewicz is_true_sequence<flatten_sequence<fake_sequence<fake_sequence>>>()
 
@R.MartinhoFernandes I am afraid I don't get it
 
10:23 AM
I am using std::pair<char*, char*> as a drop-in sequence for testing: it fulfills the concept.
I need something that fulfills the concept to pass as argument to flatten_sequence otherwise I can't test it, for obvious reasons.
That's called an archetype.
Just a dummy type that fulfills the concept, but has no other use whatsoever.
A decent concepts proposal would have automatic generation of archetypes so you could do something like is_true_sequence<flatten_sequence<Sequence<Sequence>>>() without any hassle.
I.e. I want to test whether flatten_sequence is a sequence when passed "some sequence of sequences". Archetype generation gives me the ability to express "some sequence of sequences" without having to actually write a sequence of sequences myself.
 
@R.MartinhoFernandes You'd probably have to have Sequence<Sequence<char>> there or something.
 
@DeadMG Oh right, yeah.
 
although ideally
if you have a Sequence<T> concept, then Sequence should be for any T.
 
user142019
Haha.
 
user142019
} catch (Throwable everything) {
    throw (RuntimeException)everything;
}
 
user142019
10:36 AM
This is in our code base.
 
Sounds like a checked exceptions silencer.
 
what's "your" codebase?
 
A bad one.
 
user142019
If the cast fails, you get a bad cast exception.
 
@R.MartinhoFernandes aaaaah.
and it was so hard to implement properly?
 
10:38 AM
What?
 
16 mins ago, by R. Martinho Fernandes
Those idiots think that removing all the interesting features from concepts is good because it makes it easier to add concepts to the language...
 
Less features, less interactions.
It's hard to spec features in C++ because there's lots of crap to consider.
 
you accidentally a crap, but I get it.
Well, but concepts won't happen in C++14 right?
 
No. And they probably will never happen, it seems.
 
...
I mean I will probably move to Terra by 2017, but still :/
 
10:43 AM
0
Q: Lua Vs C++: Which is better?

Alexander StopherI have cancelled a recent programming project due to the project having too many bugs, and am starting a new one instead. I need to use Lua for most of it, but for some stuff I have the option to use C++ or Lua. My question is, which is better to use? The application is question is a gameserver ...

Just for you.
 
wow
 
I like the "due to having too many bugs" part.
hehe
 
I wanted to comment "due to many bugs: maybe youre just a bad programmer"
 
@R.MartinhoFernandes damn 5 seconds more and I would manage to post.
it goes into comment then.
lol wat
hehehe "THIS LANGUAGE HAS AN ANNOYING SYNTAX"
 
@R.MartinhoFernandes I wonder if the person understands why the question was closed.
 
10:48 AM
@BartekBanachewicz Clicked on a link on that, realised the stupid fucking site decided to hijack browser functionality, closed tab, made mental note to treat that site as a piece of shit hostile to the user.
 
@R.MartinhoFernandes what? It did nothing to me
 
@BartekBanachewicz Can you do "Back", which is probably one of the most basic browser actions?
 
@R.MartinhoFernandes I opened it in the new tab, so it has no back button.
 
@BartekBanachewicz Click on a link and try going back.
 
@R.MartinhoFernandes no problems whatsoever
it looked rather legit :S
 
10:51 AM
Hm, it's not even consistent. Sometimes I can go back.
If I open that link you gave, then click on the top left to go to the home page, it works.
But if I try any of the items evaluated, nope, no going back.
 
maybe they just fucked something up.
when I click on any item, I can go back normally
 
@BartekBanachewicz Well, this isn't something you fuck up accidentally. You have to be messing with core browser functionality like the history thingy.
 
@R.MartinhoFernandes care to share your opinion
 
It's ok to use that for good like GitHub does.
 
As I can't reproduce, I can't really tell in this example
anyway, basing on this site, C++ has less in common with Lua than any other language :)
 
10:56 AM
it's got way less in common with Prolog
 
@BartekBanachewicz which site?
 
o_0 who would use C++ to script with in C++?
 
aah, goddamn
C# logic: "Private members are inaccessible from a lambda inside a member function."
 
those are rather odd questions
 
10:59 AM
fuck you C#
7
 

« first day (971 days earlier)      last day (3992 days later) »