« first day (998 days earlier)      last day (4176 days later) » 

08:00
@jalf You really think I would know that?
@Mysticial Uh you need [] around uint32_t
@Rapptz So like this? std::unique_ptr<uint32_t[]>(new uint32_t[10])
@ScottW auto i;
Yea.
08:01
thx
@jalf (I think) re: git log --graph ooooh, perrrrty
I figured there was something wrong. Since there's no way unique_ptr would know which delete to call.
There's a partial template specialisation for array types.
I should really RTFM for git... especially the pages after 'this is how to do the most trivial of things'
Yeah
Let's all sit down and RTFM together
With seductive voices. In French.
08:03
@Mysticial Also, you could theoretically provide your own deleter in the second template parameter. It isn't needed there though obviously.
@ScottW Yea. (I'm talking out of my ass here)
@Magtheridon96 yeah... yeah... I wouldn't mine learning French
Xeo
Xeo
"I would not recommend this approach" -- I would. It is the correct way to use std::begin and std::end, everything else is completely useless in generic code as free begin and end functions will not be found otherwise, and as such containers without member begin/end will not work with your code. — Xeo 19 secs ago
I'm bored
@TonyTheLion fap bake a cake!
(and fap into it) :O
08:12
sorry for ruinning your fap fantasy ...
@thecoshman I'm at work
damnit
1 message moved to bin
JBL
JBL
Masturbin'.
sorry for destory this all gay environment with a pic of two women
08:14
@TonyTheLion all the more reason, people love cake :D
@Telkitty猫咪咪 picture not found Q_Q
@Xeo This makes me really sad.
08:15
@Telkitty猫咪咪 It said "image not found" and the title was "grandma" something. Enough things to bin
Many thought the coins were enemies and tried to avoid them - ಠ_ಠ
@Xeo "Many thought the coins were enemies and tried to avoid them" Who the fuck are they testing this on?
@TheForestAndtheTrees keep up
08:17
U:
@TonyTheLion it is safe for work ... yes a super fit grandma
@Xeo Dude, all my "fucking casual" jokes were supposed to be jokes. Not reality ;_;
Okay. It's satire.
Praise the God I don't believe it.
I used to do what with my best friend at the time when I was 12 (playing a mario marathon)
I've never played mario. :|
@ScottW A friend and I once played through episode 1 of Doom with no working keyboard. :)
just mouse
probably my proudest/most ridiculous gaming moment
no, move the mouse forward
08:23
I used to play age of empire II online with one of the guys I used to date
Me too
we were playing on my friend's dad's pc, and he had some weird fancy optical mouse. This was waaaay before optical mouse were common, and the driver had some quirks, such as "when playing Doom it would disable the keyboard after 10-15 seconds"
I used to build my own maps too
Couldn't save, couldn't switch weapons
(no mouse wheel in those days)
which basically meant we had to avoid ever picking up the rocket launcher, because being unable to switch away from it made it a bit impractical in close quarters :p
oh, and the reason why we played on his computer instead of mine: on his, we could run the game at high res!
Who needs a keyboard then?
Totally worthwhile sacrifice :p
Xeo
Xeo
haha
yep
640x480
2
@ScottW Of course. Not that much, actually, but yes, I've played it
Was never a huge fan of it
Is std::find_end meant to be used as some sort of std::find_last_of?
Or would it be better if I call std::reverse followed by std::find_first_of :v
Searches for the last subsequence of elements [s_first, s_last) in the range [first, last).
Xeo
Xeo
Note that find_end looks for a subrange
not one of the elements of the subrange
second solution it is
0
A: Do you use NULL or 0 (zero) for pointers in C++?

Jan PWell I argue for not using 0 or NULL pointers at all whenever possible. Using them will sooner or later lead to segmentation faults in your code. In my experience this, and pointers in gereral is one of the biggest source of bugs in C++ also, it leads to "if-not-null" statements all over your c...

08:36
null_ptr
The answer under that one states that = 0 is the idiotic way to make a pure virtual function. What's the non idiotic one D:
There is no other way
so pure virtual functions are idiotic?
no
they are needed for runtime polymorphism
user142019
Excellent morning.
08:41
@ScottW too long to tweet
NUMBER_OF_GOOD_JAVA_PROGRAMS is more well defined than NULL
@Magtheridon96 it doesn't exist
using NULL for pure virtuals is like using NUMBER_OF_GOOD_JAVA_PROGRAMS.
?
Complaining about us NOW, after voting us in is like complaining you caught aids while trying to infect everyone else. So sad, too bad.
ahahahaha
using NULL for pure virtuals is like using NUMBER_OF_GOOD_JAVA_PROGRAMS.
You'll start thinking about lunch around 11:30, so you'll talk to people about where you want to go and who to go with. Then you'll drive there, wait in line, sit down to eat, pay for it, and drive back. So maybe by 1:15 or 1:30 you're back at work. So a one hour lunch becomes two hours and stress.
By providing lunch, you just get up from your desk, wait in line in the office, sit with coworkers and can talk about work stuff the whole time. And because it's the whole company you get to talk to people in other departments which helps with company culture and creates the opportunity for sha
(see full text)
Best argument for company providing lunch that I've seen
Oh wait. Stupid brain
I could've just done this:
auto elem = std::find_if(states.rbegin(), states.rend(), [](State& state) -> bool { return state.is_root(); });
08:52
yea me too
since I've been doing that, I've had more productive days
not taking into account the last few days
or the days before that
¬_¬ I got banned
what the fuck was wrong with that?
was it cocks?
was it arse?
was it cocks up arses?
the combination man
post on meta, see the wrath unfold
It was Tony
@TonyTheLion who wrote that? sounds like spolsky :-)
08:53
@ArneMertz someone on reddit
@TonyTheLion to what end?
it really fucks me of that twats can just dive into any random room and start flagging shit. You should have to have been in the room when the post was first made to be able to flag it.
@ScottW the arse-party ;-)
@Magtheridon96 or this; auto elem = std::find_if (states.rbegin (), states.rend (), std::bind (&State::is_root, std::placeholders::_1));
it's a matter of personal preference though, I guess.
@refp I've been attempting to find excuses to use std::bind for 3 days now ;_;
@Magtheridon96 can't be that hard to come up with a problem solvable by std::bind ...
09:01
Well, to be honest, I wasn't productive on the C++ side. I've been helping a friend of mine with a Lua interface (There's a forced layer of C with classes :V)
@ScottW lol
First funny Java joke in a while.
@refp definitely. I consider std::bind ugly, especially with placeholders. I use them only for generic functors until generic lambdas are available with C++14
How many Java programmers does it take to screw in a light bulb? None, but at least they can get and set it
Ba dum tssss?
I just added my $0.019999999552965164 over at spirit-generalsehe 10 secs ago
It was appropriate :)
Nope. It just struck me. In fact, my first reply said "$0.05". Only in my followup did I realize the opportunity :)
The asylum produced another jewel: virtual void baz() = &bar
09:14
@AndyProwl yup. makes oodles of sense. Not.
It strikes me that a lot of asylum 'proposals' seem to 'tend' towards first class function variables, suggesting syntax taken from python and/or scala, lately
"this is a capability gap in C++"
Somehow, it appears that people have unwittingly signalled "please, dream up your every unfounded fantasy about C++" to the general public
@AndyProwl Nah. It's a convenience gap, not capability. And it's not mendable without crippling the syntax further.
@sehe Yeah, I was just mocking his words
Why would you?
09:21
@ScottW why not write one? :D
Why not write one in Brainfuck?
@LightnessRacesinOrbit It's not needed. His motivation is that virtual void baz() { return bar(); } is inefficient
Oh geez, that's sad.
@AndyProwl No, his motivation is that virtual void baz() = 0; /* ... */ void foo::baz() { return bar(); } is inefficient, wasteful and ugly
Xeo
Xeo
09:27
That JS-on-mobile article is a really good read.
Lying here, staring into the dark living room, I can actually convince myself that it's another house that I'm very familiar with's living room.
However, his proposal loses the =0 pure specifier in a manner that makes his code very unclear
Xeo
Xeo
Some very interesting insights.
@ScottW going out
@LightnessRacesinOrbit But why writing that? He needs a default implementation for baz(): why not virtual void baz() { return bar(); }? His answer is "In the absence of this feature, the workarounds are either code duplication (same implementation for bar and baz) or an additional function call (baz calls bar)."
09:28
@Xeo That's just not right!
So he's rejecting virtual void baz() { return bar(); } because "an additional function call"
@chris Good. Now, code that recursively!
Xeo
Xeo
@AndyProwl The base-class is not abstract anymore, if bar is not pure-virtual
@Xeo Okay. So what is the loss?
09:30
@sehe That's terrifying to think about.
Xeo
Xeo
@LightnessRacesinOrbit It's basically all over twitter. But here: sealedabstract.com/rants/why-mobile-web-apps-are-slow
Warning: It's long
sigh countless hours of debugging -.-
@Xeo It's the same with PC games. Prince of Persia was hard.
@Xeo Well, if the class only has bar() as a function, then yes. But on the other hand, if this is the case, that means "this class has an implementation for all its member functions, yet it is abstract". At this point I'd rather introduce an abstract specifier or something.
@Xeo ho boy. well, thanks. I'll give a read a little later on.
C# room flagwanking again. Dickwads
@AndyProwl You can already do that without a new keyword.
09:38
@LightnessRacesinOrbit True. So I don't really see a rationale for = &bar
@AndyProwl To avoid the second function definition and call...
@LightnessRacesinOrbit I just don't find virtual void baz() { return bar(); } so bothersome to write. It's like 4-5 characters more than = &bar
And not at all the same thing, as I already said.
13 mins ago, by Lightness Races in Orbit
@AndyProwl No, his motivation is that virtual void baz() = 0; /* ... */ void foo::baz() { return bar(); } is inefficient, wasteful and ugly
Your version makes baz non-pure in foo
@StackedCrooked Replied to wrong message, lol.
Also the extra function call. But this has all already been stated
09:41
@LightnessRacesinOrbit That's the same as = &bar does in that respect. It provides a default definition
@LightnessRacesinOrbit Which is 1 pointer indirection. The call is virtual so the compiler won't inline it anyway
@AndyProwl Your version makes baz non-pure in foo. Providing an out-of-line function definition for a pure function, on the other hand, does not make the function non-pure.
@AndyProwl Right, and he does not want that extra indirection. What is not clear?
hey everyone
@LightnessRacesinOrbit What is not clear is why he bothers about the extra indirection which the compiler may even eliminate. It's an optimization thing
At Trent Bridge, England have won the toss and have elected to bat. Some think that test cricket matches are boring/demoralising because they last five days, but there is worse - I checked out 'multithreading' questions earlier :(((
09:43
@LightnessRacesinOrbit What's the point of foo() being pure yet having a default implementation?
Technically, it's the same as making it non-pure
Xeo
Xeo
No it's not
The class is still abstract
@Xeo protected: X() = default;
Xeo
Xeo
If anything, make the destructor protected
And that should already be done anyways for polymorphic bases
@AndyProwl Nonsense
Whatever. My point is that the class can be made abstract anyway
09:45
@AndyProwl You're right about that
@LightnessRacesinOrbit Elaborate please
I don't agree with the guy's proposal, but I do see his rationale.
Xeo
Xeo
Abstract != constructible from anything but derived-class.
@AndyProwl What's there to elaborate about? You assert that providing a default impl for a pure mem fn is "technically the same as making it non-pure" and this is simply false
Does anyone have experience with D's Uniform Function Call Syntax? Would it make sense for C++? E.g. with non-member begin/end type of functionality
Xeo
Xeo
09:46
@TemplateRex Way too late for that for C++ in any case.
It might break a shitton of code by accident
sure, but now we are seeing proposals for non-member cbegin/cend, size and whatnot
Xeo
Xeo
Even breaking a minimal amount of code is normally a no-go
where does it end? all of the container members as non-member functions? :-)
Xeo
Xeo
I'd like it to end at Concepts and Concept Maps, of which we likely won't see the latter :|
That syntax would be nice tbh. That's why it's D and not C++. D doesn't have all the worries C++ does now.
09:50
can you give an example that breaks something?
It would definitely coincide with that one operator. thingy I was watching from C++ Now I think it was :p
with break I mean: what used to run, now runs something else or not at all, but what didn't run, now runs
@LightnessRacesinOrbit Because my solution will not make the class abstract and the proposed one will, you mean?
Xeo
Xeo
@TemplateRex Wait, the Uniform Call Syntax only applies when the call with the original syntax would error, right?
@crhris oh yes, operator. is a nice proposal. One problem though is that many dots are implicit
09:51
@TemplateRex It could mess with some SFINAE techniques I guess.
Xeo
Xeo
Oh gawd no, don't even think about overloading operator.
@Xeo yes
@Xeo operator. would solve the proxy reference problems
@Xeo There was a presentation about that at Boost Con
Xeo
Xeo
@TemplateRex Well, that might just work then. Not sure if I really like it, though. Again, I'd rather have concept maps :(
@TemplateRex I rather liked what he was getting at, as I've always hated the proxy problem, but there were a few too many workarounds imo.
Then again, adding almost anything to C++ requires how many workarounds now.
09:54
@chris Stroustrup has a long sectoin in D&E why he didn't overload operator.
Xeo
Xeo
@TemplateRex How would it work? Like operator->, but instead of a pointer, you get a reference?
@Xeo Much more convoluted
@Xeo Consider watching the BoostCon thing.
The overloaded operator . would get a name in input
Xeo
Xeo
Ew. That doesn't sound like something I'd like.
@AndyProwl OH GAWD
09:55
Xeo
Xeo
I rather like how operator-> overloading is handled
@Xeo I don't like it either. But I can imagine other ways of doing it
Xeo
Xeo
With the actual access being handled by the compiler
There's a problem, however: How do you actually access any members now?
And I also mean inside of the member functions of the proxy
@TemplateRex So I've seen. The presentation aimed to solve the problems he had with it.
Xeo
Xeo
09:56
Since member_foo is transformed to this->member_foo which is transformed to (*this).member_foo, which calls operator.
So you need a way to say "I really mean to access this object, and not invoke any potential operator."
So screw that, gimme Functor/Applicative :P
@Xeo He made it only happen in certain cases.
Xeo
Xeo
So, special-casing?
More things I don't like about it! But maybe I should watch the talk before going on
Anyways, lunch time
I found the slide for option one of escaping.
Hold off on the boos until the end; the first one's pretty...umm...
j..to_string()
(&j)->to_string()
this->to_string()
to_string()
j.*(&className::to_string)()
10:01
In pure C you need to write typedef vector<struct ex> ex_cache;
I may be a Lion, but I'm harmless really.
__escape(j).to_string()
(adding the struct)
That's the last one. I think it's what he wanted.
That's at 1:01:09, by the way.
@chris re: SFINAE and interference with UFCS, you are right that might change working code because lookup comes before argument deduction
Xeo
Xeo
10:04
@chris That and the above are transformed to (*this/&j).to_string()
@LightnessRacesinOrbit o_O
@Xeo I'm sure he said something about it, I was just taking from the slide.
Xeo
Xeo
@chris Oh gawd, involving member function pointers
Of all of those, the __escape one looks the clea[nr]est for it, but the first seems like you'd thank them more for not having to type that out every time. But it looks ridiculous tbh.
Xeo
Xeo
I actually rather like the first one, but it reminds me too much of [1..10]
Yay, time for some salad and Cube World
I can come to love weird syntax like that pretty easily. It looks ridiculous, but I'd have no problem using it.
10:15
I'm glad to hear our Java devs are sharing buzzwords.
@jalf Tell that to @DeadMG!
Xeo
Xeo
Dammit, using Cube World saves over Dropbox doesn't work very well - or atleast, it produces a shitton of revisions in a very short amount of time.
Dropbox sucks.
Software sucks
soooooo moar bugfixes coming my way
moar bugfixes = less bugs!
10:26
sometimes more
Xeo
Xeo
Also, dammit, seems my PC at home didn't really sync my latest CubeWorld saves :(
sbi
sbi
@TonyTheLion So that is you on Twitter, Tony?
@sbi It is indeed
sbi
sbi
@TonyTheLion But that's a new account, no?
@sbi Yes, I made a new account.
It's my only account
10:28
@R.MartinhoFernandes woof
Hmm, I violated the rule of three :(
3
Am ashamed.
Xeo
Xeo
lol, you suck
So you should be :)
Well, not quite, but kind of.
@sbi I hope it can serve as a source of entertainment.
sbi
sbi
10:29
I had one employer doing that. Now he feeds a robot. Damn, I must have done something wrong.
sbi
sbi
Anyway, everybody's leaving for lunch, so I better join them.
So, now that I fixed the bug, I have a class with a copy ctors, a move ctor, copy-assignment, move-assignment, but default-generated destructor.
Feels weird.
morning
10:31
morning
sbi
sbi
Oh, before I leave: Have you all seen the article James linked to on twitter yesterday? The one that cites that GC performs like native memory management when it has 6 times as much memory as the same native app would need? And is 70% slower when it only has twice as much memory?
Go hunt for it. It's a great thing to quote from.
@sbi Yes, I have. Herb linked to it on Sutter's Mill, and Feeds dumped it here.
@sbi Feeds linked it here long time before.
it's a great article
oh, I should read that
10:33
@Xeo Hey, in my defense, it's totally not like what you think.
It's just fucking weird.
If you have a class with a reference to a member, there is no reason to implement a destructor, but you have all the reasons to implement the ctors and assignments.
We should get together and play beer pong.
Feeds is the most plonked entity on Stackoverflow chats
A coworker left yesterday, and since he sat next to me, I have a unique opportunity to cannibalize his monitors before anyone else can get to them <3
4
@jalf I'm jealous... I need to get a new monitor
cannibalize?
are you a monitor?
10:45
You eat monitors?
ITT Jalf is secretly a monitor
Your coworker left parts of him on the monitor?
@FlorisVelleman Ew
sometimes people touch monitors after blew their noses without clean their hands
@sbi reading through it now actually, this one I believe you mean.
10:47
@sbi yuppe, it's great
Xeo
Xeo
@R.MartinhoFernandes Where's your building block for self-referencing references? :P
@jalf When we should've gotten a new colleague, and the sysadmin prepared his workplace, his monitors were "stolen" before he even started working here.
Now his PC is cannibalized too, since he... never showed up, and had some "excuse" that he won't be able to show up for the next 8 weeks
Komodo dragon?
10:53
Ah, so good
new monitor setup
@ScottW shrug I guess it didn't happen then
but I got two 16:10 monitors instead of an unholy mix of a crappy 16:9 and an ancient 4:3
oh you lucky bastard
10:56
@jalf I feel happy for you
if you saw the monitors I have to deal with, you'd probably go cry in a corner
that's nothing to do with luck. It's a matter of reaction time!
I still want a 3rd one though :S
have to be the first person there when there's hardware to loot
10:56
edit: not mine ... but can not find a pic with 2 tiny monitors :x
fucking Java noob got nicer monitors than me
well apparently you aren't valued as much as java coders
@jalf colleagues departing, vultures circling ....
@jalf Oh man, that reminds me of an RPGing episode when a fight broke out between the PCs' party and some goblinoids in said goblinoids' dormitories: the first three players took some sort of fighting action, but the fourth one just burt out "while they fight, I'll loot the chests".

« first day (998 days earlier)      last day (4176 days later) »