« first day (1266 days earlier)      last day (3688 days later) » 

12:00 PM
@LightnessRacesinOrbit Yes!?!?!?!?!?!?!
 
has deadmg ever agreed with anyone ever?
 
(inb4 "at least I use the response button")
 
Xeo
@LightnessRacesinOrbit At least he uses the repy arrow!
 
@nightcracker Yes.
 
Xeo
12:00 PM
@LightnessRacesinOrbit Damn you! :P
 
user1804599
Let's sleep.
 
@FredOverflow heh it'd be hypocritical of me to complain about lazy dumbasses since I'm one myself, I meant computer networks
 
@DeadMG No you haven't
 
in fact
 
12:00 PM
deadmg is a good lad
 
@LightnessRacesinOrbit After all, how do you know that I respond to old messages in the first place
 
just a couple hours ago I was agreeing with robot about games.
 
@sehe god forbid someone be new here
 
@DeadMG No you weren't
 
@nightcracker Assuming DeadMG shaves in front of a mirror, probably yes.
 
12:00 PM
@DeadMG mother of god
 
user1804599
@sehe he doesn't sleep either.
 
he's not taking the bait, lads
 
sleep is for mortals
 
@JoshJahans Ooooh. God forbid someone else explain how it works. And, nooooooo let's not express how not using the proper facilities is annoying/confusing. No, instead, let's remain quiet about these things and let noobs stay noobs!
 
I never understood the argument that new people should be able to do whatever the fuck they want without being called out on it
 
user1804599
12:02 PM
Noobs are such noobs.
 
This is interesting: yeppp.info
 
@LightnessRacesinOrbit lol
 
Especially because of the Java support.
 
@LightnessRacesinOrbit But but
 
12:02 PM
@BartekBanachewicz i took a look at your quadtree already :)
My application is just to different i guess, and I think that trying to generalize yours to higher dimensions will result in the same problems im running in with mine.
 
Of course you'll get things wrong and that's fine. But don't claim you have some magic right to or that you shouldn't be actively seeking to learn from those mistakes
 
@sehe showing people the ropes is all good and well but there's no need to be a dick about it
 
@JoshJahans well, that's true
 
@VáclavZeman :( All low-level stuff.
 
Xeo
12:03 PM
@JoshJahans Feels like your continued ignorance of the reply button is a bit dickish, though.
 
who the fuck thought it was a good idea to name a library "Yeppp!"?
 
@R.MartinhoFernandes True. But I could not find anything else for Java. :(
 
@nightcracker Probably the author of that library.
 
@nightcracker Georgia Institute of Technology
 
user1804599
@VáclavZeman lol, they didn't spell "Bitbucket" correctly.
 
12:04 PM
@VáclavZeman It's Java. What were you expecting?
 
int x = INT_MIN;
whatever(-x);   // <-- undefined behavior?
 
user1804599
@FredOverflow Why would it be UB?
 
@rightfold int overflow
 
@VáclavZeman That's a good site
 
user1804599
Where?
 
12:05 PM
@Xeo I dunno what I was thinking, I thought it automatically referenced the last person to mention your username, woops.
 
@DeadMG Some built-in support for SIMD operations in Java 7, that is what I was expecting.
 
@JoshJahans Indeed. There's no such need. Which is why I don't.
 
@rightfold OH NOES
 
Dammit, too late.
 
12:05 PM
@FredOverflow could that throw? As in QoI: throw in debug mode. if it is UB it could do anything...
 
He learned now.
 
@rightfold -INT_MIN == INT_MAX + 1
 
@rightfold Is -x the same as 0-x? Because the latter definitely overflows.
 
@R.MartinhoFernandes Thanks anyway
 
@FredOverflow Implementation defined, IIRC.
 
user1804599
12:05 PM
OIC.
 
user1804599
Meh, integer overflow.
 
@JoshJahans That kinda makes no sense whatsoever seeing as it's emplaced on every message in the chat
 
@VáclavZeman It's Java. Your expectations were invalid.
 
@DeadMG :)
 
one boxed in all its glory
 
12:06 PM
Don't.
 
Jesus fuck so many bins now
 
oops
 
1 message moved to bin
 
I love Rainbow gifs.
 
12:06 PM
a
 
the
 
user1804599
I love rainbows.
 
@rightfold Sometimes I think double is a saner data type than int :)
 
The only gif you can onebox here is the sparkly Bjarne.
7
 
user1804599
12:07 PM
@FredOverflow capitalizing nouns like a real German.
 
I'll regret ever saying that.
 
@FredOverflow I have used game maker in the past
 
@rightfold It's an adjective.
 
DeadMG totally needs his room owner licence revoked
 
@FredOverflow I disagree strongly
 
Xeo
12:07 PM
2
Q: C++ template argument deduction with lamdas

aminI have the following template declaration template<typename T> void foo(function<void(T)> f){ // ... }; But when i call it like this foo([](string s){ }); // visual studio 13 error message => // Error: void foo(std::function<void(_Type)>)' : //could not deduce template argument for 's...

PAUGEPFGPA@
 
@nightcracker I'm sure he knows what he thinks better than you do. It's hard to disagree with someone's idea on what they think.
 
Xeo
someone remove std::function from the standard, kthx
 
@rightfold I probably did that because Rainbow sounds like it could be the name of a metal band.
 
@Xeo I identified that as a duplicate like half an hour ago
keep up
 
probably 80s hair metal :)
 
12:08 PM
@Xeo noooooo don't ...... vital for callback registries
 
user1804599
Rainbow (also known as Ritchie Blackmore's Rainbow or Blackmore's Rainbow) were a British rock band controlled by guitarist Ritchie Blackmore from 1975 to 1984 and 1994 to 1997. They were originally established with American rock band Elf's members, but Blackmore fired all the members except Ronnie James Dio who would leave in 1979. Three British musicians joined in 1979, singer Graham Bonnet, keyboardist Don Airey, former Deep Purple bassist Roger Glover, and this line-up gave the band their commercial breakthrough with the single "Since You Been Gone". Over the years Rainbow went th...
 
@Xeo wtf, why?
 
user1804599
Close enough!
 
Xeo
@nightcracker People are overusing and abusing it left, right and center :(
 
@nightcracker Why? Every int can be represented as a double, but not the other way around. You can negate negative doubles and the result is guaranteed to be positive. And you cannot get a negative number by adding too much to a positive number.
 
12:09 PM
What's the opposite of "exceptionality"?
 
And no, I'm not in love with JavaScript :)
 
Xeo
normality?
 
@R.MartinhoFernandes regularly? normally?
 
@Xeo Well the compiler rejected his program so I don't think you have to worry about it becoming mainstream abuse
lolwat lern2English
 
man english
 
12:09 PM
@R.MartinhoFernandes Normality, maybe
 
I want to emphasise the other end of the spectrum.
 
@FredOverflow instead you get infinities, nan, rounding errors, no commutativity and all other goodies!
 
"In the non-exceptional case, I assert the following to be true:"
 
If "normality" is 0 and "exceptionality" is 1, what's -1?
 
user1804599
ubiquity
 
12:10 PM
@Xeo all I use std::function for is storing callbacks - is that abusing?
 
@nightcracker Not as long as you stay in the realm of integral numbers :)
 
@R.MartinhoFernandes Always.
 
@nightcracker std::function is a container. Correct.
 
@R.MartinhoFernandes what rightfold said, context-dependent
 
Xeo
@nightcracker No, that's what it's for - storing function-like things for later
 
12:10 PM
@DeadMG Dammit, read carefully. It ends in "-ty", not "-ly"
 
you assume that such a word exists.
 
that's because it obviously does
 
I assert that it might well not and you might just have to suck up using another ending.
 
@DeadMG It doesn't need that ending. But your suggestions ignored it.
 
12:12 PM
@rightfold Deep Purple, Dio... yeah, I probably should know this band :)
 
I need "characteristic of something that is completely BANAL"
 
probably because exceptionality isn't really a word.
 
I FOUND IT
 
@R.MartinhoFernandes triviality?
 
@FredOverflow I remember deciding not to answer that one
 
12:12 PM
so how do people abuse std::function?
I'm curious
 
you can have an upvote anyway
@nightcracker There's an example right there in the question we're talking about
 
@nightcracker Using it as something other than a container, often as function arguments.
 
People use it for accepting function-like things as function arguments, when they have no intention of storing them
 
Xeo
@nightcracker having it as arguments in a function. The only time I accept that is if the function in question is virtual and you need an interface.
 
In the case where they want to use templates anyway, they should just template the WHOLE argument. template <typename Callable> void foo(Callable bar) { bar(1,2,3); }
 
12:13 PM
@Xeo but.. I use it in a function
like set_callback(std::function<blablabalbal>balablabla)
 
Xeo
yeah, you suck then
:P
 
that's okay ish if you're going to store the std::function anyway.
I mean, you have to package it at some point
 
@R.MartinhoFernandes What about if you can't use a template, e.g. virtual function?
 
In such a case I do that to avoid needing my set_callback to sit exposed in a header; that is, it does not need to be a template at all
 
72
A: Position of least significant bit that is set

Anton TykhyyBit Twiddling Hacks offers an excellent collection of, er, bit twiddling hacks, with performance/optimisation discussion attached. My favourite solution for your problem (from that site) is «multiply and lookup»: unsigned int v; // find the number of trailing zeros in 32-bit v int r; ...

Those numbers look like magic to me. I definitely need to learn about De Bruijn sequences.
 
12:15 PM
to be precise
void Networker::add_handle_packet_callback(std::function<void(udp::endpoint, std::string packet)> handle_packet_callback) {
    this->handle_packet_callbacks.push_back(handle_packet_callback);
}
 
user1804599
lol this->
 
@LightnessRacesinOrbit Because the question was unclear?
 
@DeadMG Fair enough, type erasure is acceptable too.
 
@rightfold often required inside class templates, but I can't remember the precise rules
 
user1804599
template<typename F>
void Networker::add_handle_packet_callback(F handle_packet_callback) {
    handle_packet_callbacks.emplace_back(std::move(handle_packet_callback));
}
 
12:16 PM
@rightfold I like using this-> when calling member functions from within another member function
 
@rightfold Assumption of non-virtuality.
 
@FredOverflow pretty much
also cba
 
also assumes the implementation in the header is otherwise valid.
 
@FredOverflow same
 
m_ is way better than this->
 
user1804599
12:17 PM
They both scuk.
 
what the fuck is m_
 
@Abyx m_ does not solve the class template problem
 
no it only you who suck
 
My current code at work uses typename, .template, and this-> all in the same file. :(
 
user1804599
A silly prefix for data member names.
 
12:17 PM
@nightcracker what @rightfold said
 
@DeadMG How so? You've heard of a C++ standard with virtual data members that I don't know about?
 
@FredOverflow yep it doesn't
 
@R.MartinhoFernandes Then your code is probably very generic.
 
@LightnessRacesinOrbit The function itself cannot be virtual if it is a template. Converting a function to a template function is only valid if the function is non-virtual.
 
@Abyx no no no no
 
12:18 PM
@nightcracker m_dataMember
@LightnessRacesinOrbit shut up you use tabs
 
@DeadMG Guess you were referring to a different aspect of that function than I thought, then.
 
fuck that
 
I'm growing used to .template. That's bad.
 
@Abyx Tabs and not using m_ prefixes make me an excellent programmer.
 
as if
 
user1804599
12:19 PM
@DeadMG the original code by nightcracker doesn't mention virtual nor override, so indeed.
 
@rightfold why would this be superior? (apart from the moving, that can be done with either)
 
@rightfold It also doesn't show the declaration, which is where those things would be.
 
@rightfold So indeed... it can be anything.
 
user1804599
Oh, right.
 
haphazard space indentation is for indians
 
12:19 PM
@R.MartinhoFernandes not really. I'm used to it. Rarely happens though
 
user1804599
Meh, non-inline definitions.
 
@rightfold are you serious?
 
what do you think?
 
when you have a declaration that reads this:
void add_handle_packet_callback(std::function<void(udp::endpoint, std::string packet)> handle_packet_callback);
 
that is not a declaration.
 
12:20 PM
it's instantly obvious what type of function it accepts
@DeadMG happy now?
 
I agree
The auto crowd won't, though.
They don't like the compiler being able to do type checks for you.
It's almost as if they're using the wrong language...
 
auto is absolutely safe and type checked.
5
 
haha
starred because you're out of your mind
 
auto&& is safe and auto is not.
 
@LightnessRacesinOrbit I disapprove of the accepted answer at the end of the dupe chain you linked :(
 
12:23 PM
6
Q: If I drop a leaf twice from the height of a tree in a completely controlled environment, will the trajectory in each case be the same?

RajaPutting my question in other words, can earth form again if a similar initial universe condition is given? The uncertainty principle says that we cannot tell with certainty the position of a particle if we know its velocity with greater surety, and vice versa. But I have always felt that this res...

 
Tell me, then, what type-checking does auto perform on initialisation?
@R.MartinhoFernandes didn't read it
 
I think physics is the most difficult science to understand and learn
 
@AlexM. dat title followed by dat first sentence. totes the same thing, bro
 
@LightnessRacesinOrbit All the checks that are needed.
 
@DeadMG it can slice things.
 
12:24 PM
@LightnessRacesinOrbit Ah, the central idea is explained after "What is going on?" in the paper. Very nice!
 
struct B : A {...}; B b; A& a = b; auto slicedA = a;
 
Slicing is good!
 
what the fuck is slicing
 
for bacon
 
I mean... I abused it for good once.
That's all.
 
Xeo
12:25 PM
@nightcracker are you serious?
 
@DeadMG All the checks that are needed (that is, none) by someone who is allergic to type checking.
 
@AlexM. Why would you climb a tree only to drop a leaf? That's just stupid.
 
@R.MartinhoFernandes uhm.. how?
 
@LightnessRacesinOrbit Variable initialization is not a place where I need type checks.
 
@Xeo in a C++ environment, yes
 
12:26 PM
@LightnessRacesinOrbit It uses decltype(&T::operator()) :(
 
@FredOverflow lol
 
@DeadMG It's not a place where you think you should have type checks*. (and you're wrong)
 
@Xeo AFAIK C++ has no slicing in the way Python has slicing
 
"If it quacks like a duck, and walks like a duck, then fucking initialise it as a duck you bastard"
 
@nightcracker yep it's other slicing
 
12:27 PM
@LightnessRacesinOrbit Waste of space.
 
@Abyx I don't remember all the details. And I actually didn't use it myself: I merely provided a solution to a problem @sbi had, so I don't even remember details of the problem.
 
And I've explained in detail on past occasions why that is.
 
yes, and you were wrong.
 
@R.MartinhoFernandes well yeah there are cases where it doesn't break any invariants
 
12:28 PM
so
 
what the fuck is slicing
 
@Abyx object slicing like in Base x = Derived(x);?
I don't know what slicing is either.
 
223
Q: What is the slicing problem in C++?

FrankomaniaSomeone mentioned it in the IRC, but google doesn't have a good answer.

 
@sehe sometimes i see some classes containing the word 'Impl' , i know it has something to do with the class job, but what does it really signify?
 
12:29 PM
@Jefffrey yep
 
How can you two not know what slicing is? Get out
7
 
user1804599
Take the definition of the word "slicing."
 
@Bilal Implementation
 
user1804599
Now you know what slicing is in C++!
 
@Bilal Usually, it means it the implementation of some abstract interface
 
12:29 PM
oh, then I can stay :)
 
@Abyx It was something about shedding non-PODness that could be later on simply be recovered via static_cast.
 
and auto causes slicing how?
 
user1804599
Base& x = *new Derived;
auto y = x; // auto deduces to static type, not to dynamic type
 
Kinda like struct pod_base_with_all_the_data { ... }; struct non_pod_without_additional_data : pod_base_with_all_the_data { ... };
 
12:31 PM
@rightfold y is not a reference, is it?
 
IIRC it was a workaround for lacking of move-awareness in C++03 containers.
 
user1804599
@FredOverflow no, hence copy ctor, hence slicing.
 
@LightnessRacesinOrbit of course it is :)
 
@rightfold of course...
 
if you guys could throw out all backwards compability and make a better C++, would you change the value semantics?
 
12:32 PM
nope.
slicing isn't a real problem.
 
@nightcracker C++ would not be C++ without the backwards compatibility. There are already more than enough "let's start from scratch" languages (D, Go, Rust, whatever).
 
@nightcracker nah
 
Wide > all of them
 
Robot's Law of Lambda Banality: if your design cares about lambdas, it's wrong. (Also phrased simply as "lambdas are not special") — R. Martinho Fernandes 7 secs ago
 
@nightcracker I'd give string literals std::string type, though (probably)
 
user1804599
12:33 PM
@FredOverflow Apart from its syntax, Go isn't very much derived from C, though.
 
@R.MartinhoFernandes Lambdas are special in that C++ got them before Java ;)
 
@rightfold That's why it's "start from scratch".
 
user1804599
C++ got classes before Java!
 
@rightfold Go is designed to be a replacement for C++, isn't it?
 
@FredOverflow I know, but I'm just wondering what the ideal value semantics would be
 
user1804599
12:34 PM
@FredOverflow No lol.
 
@rightfold Oh, I thought Google wanted a systems language that compiled faster then C++.
 
@nightcracker Why would I? What's the problem with C++ value semantics?
 
slicing
 
non-issue really
 
user1804599
Remove inheritance, no more slicing crap.
 
12:35 PM
Yeah, because who uses inheritance, anway?
@rightfold Our minds are of a kind.
 
Xeo
Haskell doesn't need inheritance, so it's obviously a useless concept!
 
You sound like a Java programmer.
 
user1804599
I am going to work on Styx this weekend.
 
user1804599
Gonna rewrite some analyzer shit.
 
user1804599
And remove currying completely.
 
12:36 PM
@R.MartinhoFernandes looks fishy but with static_asserts it probably can be used
 
@rightfold Where does your hate for FP come from? :)
 
user1804599
I don't have FP.
 
How is currying not FP?
 
user1804599
FP is broader than currying.
 
user1804599
You can perfectly do FP without currying.
 
12:37 PM
But you also said you were gonna remove other functional stuff yesterday.
 
user1804599
Like what?
 
user1804599
I've in an imperative mindset for almost ten years so I prefer imperative programming.
 
-1
Q: What is the difference between && and ||?

SinghI'm getting it difficult to understand how the following programs work, kindly help me in understanding. int x=2,y=0; (i) if(x++ && y++) cout<<x<<y; Output: (ii) if(y++ || x++) cout<<x<<" "<<y; Output: 3 1 (iii) if(x++||y++) cout<<x<<" "<<y; Output: 3 0 Kindly explain me how the...

 
in Java Sucks, 23 hours ago, by rightfold
I think I will not do currying, though.
 
sigh
 
12:38 PM
in Java Sucks, 23 hours ago, by rightfold
And no functional programming.
in Java Sucks, 23 hours ago, by rightfold
I like imperative programming.
 
user1804599
Well, there will be HOFs and FCFs. :F
 
And how are those not FP?!?
 
user1804599
Consider me drunk yesterday.
 
Xeo
Drunk on imperative programming?
 
12:40 PM
Sippin' the imp juice.
 
lol
 
user1804599
I mostly just want to experiment with multimethods and static type checking, so I want to keep everything else as simple as possible.
 
^ right now
 
12:42 PM
@R.MartinhoFernandes On what occasions are we allowed to post him?
 
im out
 
@Abyx Well, we were at the bottom of the barrel trying to remove redundant synchronisation that was killing the performance and the only alternatives were: rewrite std::vector with moves somehow, or wrap one std::vector<pod_base_with_all_the_data> and use this trick.
AFAIK only that wrapper ever touched the pod_base_with_all_the_data. Everything else dealt with the non-POD derived directly.
Probably used private inheritance + friending for extra safety (and if not, we should have)
 
Xeo
@FredOverflow Christmas only
 
@Xeo Pretty sure I've seen him posted here after Christmas.
 
@FredOverflow that's a good beer
 
12:46 PM
@FredOverflow These are not the Bjarnes you're looking for.
 
I cancelled my camping trip again for this weekend ... but will definitely going to the one after
 
anybody know of a definitive online reference describing the different grammars for std::regex?
 
lol recursive
 
12:54 PM
@R.MartinhoFernandes Well thanks, I opened that. You know I'm gonna have nightmares about that for days, right?
 
@MartinJames I don't know what's in it. GEMA blocks the video.
Gotta watch it at home with proxying.
 
@R.MartinhoFernandes LEAVE IT!
 
Oh. Saved by GEMA again?
hahahah "3 Hour Medley of Christmas Songs"
 
@R.MartinhoFernandes Indeed. How do I install GEMA?
 
user1804599
kek
 

« first day (1266 days earlier)      last day (3688 days later) »