« first day (924 days earlier)      last day (4030 days later) » 

12:00 AM
No shit
 
Xeo
@Morwenn Robot actually wanted to delete his answer there after it got +100, but I accepted it, so he can't. :3
 
Ell
I use gedit + terminal + flake
 
Xeo
Anyways, time for some sleep. G'night.
 
Ell
Ides aren't worth the bother imho
 
I don't understand why everything is templated.
 
Ell
12:04 AM
Goodnight
 
@Pawnguy7 If it wasnt you'd have to write the same boilerplate code for every type
waste of time much?
or lie to the compiler and tell it your type is some other type
 
I get it for uses like that - say, collections - but... I must not get the use cases here, because they look like they could be achieved using other methods.
 
@Pawnguy7 For example?
 
@Pawnguy7 Like what?
 
Templates are coooooooooooooool.
 
12:08 AM
@Xeo Niiight.
 
Not sure. How about tuple's get?
 
@Rapptz Are they really?
 
@Pawnguy7 What
 
As I said, I am sure they are good uses, I just don't get them yet.
 
@ThePhD Yes
 
12:08 AM
@Rapptz How sooo?
 
Because I don't have to include a million headers to do things.
 
Okay, so
I have accurately determined that it's not my code that's double-throwing this exception.
 
lol if I press "youtube" then tab it makes me search en.cppreference.com
what gives Chrome :(
 
@Pawnguy7 No it couldn't because the return type of the get depends on the type of element at the index you give it. Therefore it has to be a template
 
@Borgleader wut
 
12:11 AM
@Borgleader that is std::get?
 
@Rapptz doesnt std::get return type depend on whatever is stored in the tuple?
 
This is super weird.
 
user142019
More like No logic Saturday since it isn't Friday at all.
 
@rightfold changed your name again ?
 
user142019
YES :D
 
Ell
12:13 AM
@rapptz its stopping you from procrastinating!
 
First the pony, now this... tsk.
 
user142019
A unicorn named after a Decapodian is silly.
 
user142019
@Borgleader yes it does.
 
user142019
The return type of std::get<N>(tuple) is the type of the (N + 1)th element in tuple.
 
so yeah, std::get has to be a template.
 
12:14 AM
But why the get<int>?
 
user142019
Uh, because what else?
 
is the int an index?
 
user142019
(And it's std::size_t, not int, by the way.)
 
user142019
Yes.
 
yes its the index
 
12:15 AM
Couldn't it be get(int index)?
 
user142019
No.
 
user142019
No. Of course not.
 
@Borgleader I mean, nothing stops you from doing this
 
i just told you the return type varies depending on the element inside the tuple
 
12:16 AM
@rightfold I am getting mixed messages from you...
 
@Pawnguy7 It's templated because it has to be a compile time expression
 
user142019
@Rapptz that's not a reason something has to be templated.
 
@rightfold Yes it is.
 
user142019
Applying constexprs can also be compile-time expressions.
 
Not required by the standard.
 
user142019
12:17 AM
> can
 
I mean, take a vector. Its return type depends on what is it it. But you access it via an index - and that is not a template.
 
But not required
Big difference.
 
@Rapptz how is this "others means" than a template?
 
user142019
Also, 42 is a compile-time expression! No template!
 
@Pawnguy7 vector elements are all the same type
 
12:17 AM
i see a big template<typename Tuple>
 
I think I get it now.
 
@Borgleader The template is for the tuple.
 
-1
Q: The 23 upvotes to my question on Meta have turned into downvotes!

Hamacher GalvinI had asked an average question on Meta some hours back.Here's the link What does a 1000 StackOverflow reputation,in 2 months, due to Q&A over a single major language tell about me? I didn't expect so much of response to it or so much voting on it.It's not very often that I see 23 upvotes ,and ...

^^ ROFL
 
yeah... Pawnguy was asking why everything had to be templated and you just said "you could do this instead" but its still a template...
 
user142019
@Pawnguy7 imagine you had this function:
template<typename... Ts>
????? get(std::tuple<Ts...>& tuple, std::size_t i);
 
user142019
12:19 AM
What would be the return type?
 
user142019
You can't have the type depend on a runtime value. It has to be known at compile-time.
 
I see pentagraph
 
Is there a way I can view the implementation of get?
 
yes but why
 
I can kind of picture this, but I feel unsure, and I want to be sure.
 
user142019
 
If you were using VS you can just right-click get and "Go to definition"
 
Okay
What teh shit
int main ( int argc, char* argv[] ) {

	throw 1;

};
^ This throws just one exception, right?
First-chance exception at 0x74EFC41F in Scratch.exe: Microsoft C++ exception: int at memory location 0x001EFAD8.
First-chance exception at 0x74EFC41F in Scratch.exe: Microsoft C++ exception: int at memory location 0x001EFAD8.
Unhandled exception at at 0x74EFC41F in Scratch.exe: Microsoft C++ exception: int at memory location 0x001EFAD8.
^ THREE messages!
 
@Pawnguy7 The implementation will drive you nuts
 
Two first-chance exception, and the unhandled one is a debug mesage
But what the fuck are two exceptions being thrown for?!
 
  template<std::size_t __i, typename _Head, typename... _Tail>
    constexpr typename __add_ref<_Head>::type
    __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
    { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); }

  template<std::size_t __i, typename _Head, typename... _Tail>
    constexpr typename __add_c_ref<_Head>::type
    __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
    { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); }

  // Return a reference (const reference, rvalue reference) to the ith element
 
12:23 AM
@Rapptz I think you are right.
 
user142019
It depends on how std::tuple is implemented.
 
user142019
You can implement it in many different ways.
 
I get why you would need the index as a template - so it works as compile time and can get a correct return type, but I am confused how it can get the return type from the tuple.
 
magic
 
is not friendship
 
12:24 AM
@ThePhD Exception: uncaught Exception? :D
 
If you think get<N> is magic then wait until you see tuple_cat
I know it's not magic but it feels like magic to me
 
cat :3
 
@melak47 But why does it throw twice ?
 
user142019
@Pawnguy7 using template metaprogramming.
 
It's not even my code that's throwing the two exceptions.
It's this garbage:
 
12:25 AM
@Rapptz Indices!
 
RaiseException( ThisException.ExceptionCode,
                        ThisException.ExceptionFlags,
                        ThisException.NumberParameters,
                        (PULONG_PTR)&ThisException.params );
^ This function alone is chucking 2 exceptions at me.
(I don't have access to it, it's MS code)
 
@ThePhD a function that raises exceptions throws exceptions? I wonder why.. :p
 
@melak47 Butttt whhyyy twowwowowowooo
Oh whatever I give up. :c Fuck MSVC.
 
@ThePhD because it failed to raise your exception. idk!?
 
@rightfold Well, yes. But... wait, can you use parameters like that in template things as well, or is it as if it is constructed and then passed?
 
user142019
EA got 1000+ people laid FTFY.
 
Sim-Pinkslip
 
@Borgleader maybe they fired everyone who went along with the microtransactions crap? :3
or, more likely...everyone who didn't :/
 
@Pawnguy7 C++ templates are Turing-complete.
 
@melak47 And that's on top of the 300+ they layed off in the last month, what the hell are they up to
 
12:29 AM
@Borgleader maybe they figured "we suck at this, we should stop :D"
 
You can't continue to justify epically huge costs for developing video games.
But rather than fire the amount of crufty management who's getting paid hefty sums, they would instead chop the heads off many studios that they bought out.
Not that it matters: everyone who got bought out is sitting aside smugly with large piles of money (more management), while the engineers who made the company run are now out of jobs. :3c
 
@ThePhD slaves are cheap
 
Are all namespaces in the global namespace?
 
No: namespace A { namespace B {}}
^ namespace B is not in the global namespace
 
Is namespace A?
 
12:37 AM
Yes.
 
I was wondering about this syntax:
    using namespace::boost::asio;
The first :: is... interchangable with nothing, right?
 
you mean: using namespace boost::asio;
 
13
Q: Boost Asio serial_port - need help with io

Brian PadenSo I've been trying to learn the boost::asio stuff to communicate to a serial device using RS232. The documementation is sparse and the examples are non-existent. Can't figure out exactly how to communicate with the device. The device can't send data so all I need to do is write, but other pro...

I thought that was how you do it.
Then I saw it and I was confused.
 
What you wrote is the same as: using namespace ::boost::asio;
It's explicitly qualifying boost in the global namespace.
 
Is it the same as using namespace boost::asio?
 
user142019
12:41 AM
Depends.
 
On what?
 
user142019
If you're a moron and define your own namespace boost in a narrower (?) scope.
 
And if not?
 
user142019
Then it's the same.
 
but writing it as namespace::boost::asio is silly.
 
12:42 AM
namespace A
{
  namespace boost { namespace asio {} }
  using namespace boost::asio; // uses A::boost::asio
  using namespace ::boost::asio; // uses ::boost::asio
};
@melak47 And misleading.
 
user142019
Boost uses ::boost::… in its macros.
 
MACROS
 
@rightfold That's good practice imo.
But only in macros.
Otherwise it's verbose.
 
@Mysticial you around?
have some news
 
12:46 AM
but it's non-public
 
user142019
Man.
 
This chat is safe for private conversation. Go ahead!
 
user142019
Auto-commit is silly and shouldn't exist.
 
@StephenLin non public?
 
ehh, sort of
 
user142019
12:47 AM
Non-pubic FTFY.
 
give me a sec
 
He wants to know a good approximation of pi.
 
nm i'll e-mail you
 
This room is as private as a C++ class field to a friend function.
 
I know 3.1415926... that is about it.
 
12:47 AM
:)
i found it
 
Why is it private? lol
-1
Q: How to help visitors on Meta to distinguish more clearly Meta Reputation and StackOverflow reputation?

Hamacher GalvinOne gets easily confused seeing many people on Meta with 30k,40k or 45k reputation.For a while one may think they must be really smart,brainy and experienced.Until he checks out their StackOverflow reputation which could be peanuts compared to that!!It's only then that onegets the real idea about...

^^ That guys REALLY wants to get q-banned on meta.SO.
 
user1357851
@StephenLin let's discuss about the blue eyed dwarf after I get my coffee? Be back in 10
 
@Pawnguy7 I know 70 digits. I was bored on vacation ~6 years ago :p
 
It might be time to take a break from Meta. — blahdiblah 12 secs ago
loll
 
@melak47 I am bored, but not that bored.
 
12:50 AM
@Telkitty well, you really should read the xkcd forum and terence tao blog pages I linked to
@Telkitty I don't know what else to say to convince you :D
 
user142019
I know 3.14 and that's it.
 
seriously, it's terence tao!
 
user1357851
@StephenLin I did read it I wasn't convinced
 
tenured math prof at like, 20 or something
 
Got your email.
 
user142019
12:51 AM
Who needs more than two decimals for π anyway.
 
@telkitty le sigh
 
damn...
 
I am sure some people do. I am just not one of them.
 
0
Q: What is an inline array in C ? Please place some helpful code?

user1720241I have a question regarding an inline array in C++. Can someone please explain what it is in terms of C++.

^^ inline array?
 
I cannot explain what that is in terms of anything.
 
12:52 AM
@Telkitty at 24, to be precise
@Telkitty it's an argument from authority, deal with it :)
@Mysticial was that re: terence tao?
 
Who's Terence Tao?
 
Terence "Terry" Chi-Shen Tao FRS () (born 17 July 1975, Adelaide), is an Australian mathematician working in harmonic analysis, partial differential equations, additive combinatorics, ergodic Ramsey theory, random matrix theory, and analytic number theory. He currently holds the James and Carol Collins chair in mathematics at the University of California, Los Angeles. He was one of the recipients of the 2006 Fields Medal. Personal life Tao was a child prodigy, one of the subjects in the longitudinal research on exceptionally gifted children by education researcher Miraca Gross. His f...
 
user1357851
@StephenLin lol so? I am from a family full of professors
 
user1357851
and also have quite a few ceos
 
user1357851
like that's going to strength any arguments
 
12:55 AM
@Telkitty well, it's basically everybody with any authority
@Telkitty i really give up, sorry
@Telkitty i don't know how else to explain it better than what they've written up
 
@LightnessRacesinOrbit You either approve of homosexuality or you have a mental disease (phobia).
 
That's not true.
 
I find that to be false.
 
I'm being sarcastic.
 
lol
 
1:01 AM
I don't like the term homophobia.
 
I thought so but wasn't sure
Yeah same here. No one's actually scared of gay people.
At most they don't find the thought of it appealing and use that to base their judgement.
 
user1357851
sometimes they are too girly
 
user1357851
I don't like when people get too sensitive
 
user1357851
I mean I wish them well, but heck, stay away from me if you are going to cry when I accidentally touch you
 
@Telkitty o.O
 
1:03 AM
You ...touch people?
 
user1357851
not for a while, are you volunteering?
 
Not with a 10-foot pole.
 
The internet has done terrible things :\
 
Just kidding.
 
user1357851
@Mysticial did not offer that to you ... I have standard
 
1:05 AM
@Telkitty What do you mean? People get offended if you accidentally touch them? In what kind of context?
 
user1357851
@StackedCrooked metaphor, sensitive people get offended at small things you are not even aware of, some of my friend are like that
 
You can't really help that. People have their oddities.
But I agree that it's silly.
You should launch a counter offensive and start getting all upset about things they do.
 
user142019
People who get offended should be offended.
 
user1357851
couldn't be bothered, I just stay away
 
user142019
They must be punished for giving too many fucks.
 
user1357851
1:08 AM
only seeing them once per few months is okay
 
user1357851
I have quite a few friends I see only monthly lolz
 
No offense,but why should I take your answer your seriously?You reputation on Meta is not so good, and the reputation you've on StackExchange I'll cross that in a month!!So shouldn't the Canuck get off the high horse and salute the dollar? — Hamacher Galvin 8 mins ago
 
You should start crying and apologizing repeatedly every time they complain. Make a scene that lasts at least 30 minutes. Then they'll hesitate before they say something next time.
 
user1357851
works well, we are all happier that way, lolz
 
^^ This guy is an interesting troll.
 
user1357851
1:09 AM
@StackedCrooked but they won't say anything that's the issue
 
user1357851
you don't even find out until later on
 
@DeadMG I guess I should start reading a book about compilers. Where's that dragon book again.
 
do they talk about how you offended them behind your back? :D
 
user142019
ap3 :: Applicative a => (t -> a u) -> t -> t -> t -> a (u, u, u)
ap3 f a b c = (,,) <$> f a <*> f b <*> f c
 
user142019
Why I love Haskell.
 
1:11 AM
That reminds me of linq.
Well, it did, before it changed.
 
@StackedCrooked I've always wondered why they called it the "dragon book"...
 
user142019
@Pawnguy7 I pasted the wrong code. :P
 
user142019
But why did it remind you of LINQ?
 
Jul 15 '11 at 22:47, by Luc Danton
I'm disappointed nobody asked why it's called the Dragon book.
 
user142019
It had SQL in… a string literal. :|
 
user142019
1:12 AM
@Mysticial because of the dragon on the front cover.
 
@Mysticial Have you seen the cover?
Principles of Compiler Design, by Alfred Aho and Jeffrey D. Ullman, is a classic textbook on compilers for computer programming languages. It is often called the "dragon book" and its cover depicts a knight and a dragon in battle; the dragon is green, and labelled "Complexity of Compiler Construction", while the knight wields a lance labeled "LALR parser generator". The book may be called the "green dragon book" to distinguish it from its successor, Aho, Sethi & Ullman's ', which is the "red dragon book". The second edition of ' added a fourth author, Monica S. Lam, and the dragon beca...
 
user142019
> It is often called the "dragon book" and its cover depicts a knight and a dragon in battle; the dragon is green, and labelled "Complexity of Compiler Construction", while the knight wields a lance labeled "LALR parser generator".
 
@StackedCrooked aint nobody got time for that
 
but still...
I could write a book with the digits of Pi and call it the "Apple Book".
And then get sued by Apple.
 
@Mysticial How does it end?
 
1:14 AM
@LucDanton fuck...
 
user142019
Oh fuck.
 
user1357851
I should troll on meta not SO main site
 
It's an open ending.
 
user1357851
no one gets question banned there
 
user142019
1:14 AM
Google Code Jam round 1A started 14 minutes and 40 seconds ago.
 
@Telkitty This guy is q-banned on meta.SO:
At least that's what I've heard. Not 100% sure though.
 
user1357851
doesn't look that he's
 
user1357851
he was active this month
 
He hasn't asked a question in over 2 years.
 
user1357851
easy to troll in comment
 
user1357851
1:18 AM
a bit to hard disguise a troll as a legitiment question, takes some effort
 
user142019
BOO
 
^ This was a great anime :)
 
This video contains content from Funimation Entertainment, who has blocked it in your country on copyright grounds.
 
Does Boost Asio have a library (Binary) to link with? I don't see it.
 
@Borgleader Sorry bout that.
 
1:31 AM
@Borgleader you mean, there is stuff on youtube that's blocked in places, but not in Germany ? whoa. I had no idea :p
 
@Mysticial i have him plonked lol (i know im not supposed to advertise my plonk list but wtv hes not here)
 
I only remember him coming in here once. It didn't take long before he got booted.
 
This video contains content from Funimation Entertainment, who has blocked it in your country on copyright grounds.
This is America damn it ;_;
 
no
 
1:37 AM
@StackedCrooked this makes the video unavailable to me. lol
 
AHHH!!! Don't use new as a variable name in C. You'll confuse everybody who's ever touched any C++. — Mysticial 1 min ago
 
lmao
 
@Mysticial You should be fine then... which makes the comment quite ironic :P
 
new = malloc(sizeof(struct node));
 
@Borgleader shhhhhhhhhh
:)
 
1:39 AM
Aw. Boost finally linked, and it threw an exception :\
 
And 20 applications later, one job replies...
 
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> > at memory location 0x0042ED7C.
Can anybody read this?
 
I've asked five people today if they play Reversi and they all said "I don't know what that is"
._.
 
What's "Reversi "?
 
@Rapptz I don't know what that is
 
1:43 AM
God damn it you guys are retarded.
2
:(
 
I think it is also called Orthello.
 
Yeah it's called Othello too
When I mentioned that they were still confused
 
I know how to play. I really suck though.
 
@Rapptz I'm still confused
 
@Borgleader boooooooooooooo
Well, I guess TIL no one knows many board games outside of Chess, Go, and Checkers.
 
1:45 AM
@Rapptz Should obviously be new = malloc(sizeof *new);.
 
@LucDanton That's what new is, a node*
 
The canonical version is future-proof and easier to review.
 
Well I didn't write it, I got it from this question
 
Can I make an accept my own answer to a question?
 
yes
 
1:48 AM
Do you get rep for accepting your own answer?
 
The answer was good advice, but did not solve the problem. A week later, I found the problem. Ok, less than a week, but still.
Do I refer to myself in the third person? Feels odd.
Thanks, SO...
 

« first day (924 days earlier)      last day (4030 days later) »