« first day (1244 days earlier)      last day (3929 days later) » 

22:00
@Mysticial not sure the question would fit code golf that well; still, this made me lol
user image
4
> To upgrade, run: cabal install cabal-install
how do you convert an Earth into a hard drive?
i did and its still at the same version, wtf D:
Don't do that on Windows
@AlexM. How about this one:
22:03
:laffo: that stupid second comment
@CatPlusPlus So I just download a new version of haskell and install that?
@Mysticial Solid gold.
@CatPlusPlus: Please add me to the lounge-cpp Steam group.
Steam ID
@CatPlusPlus "wilx", I think.
22:04
0
Q: How am I supposed to pack and unpack this 64-bit integer?

Lightness Races in OrbitI am interacting with hardware that gives me various kinds of data packed away inside arrays of uint32_t. Unfortunately, I've forgotten how to interpret one of those as a uint64_t. #include <iostream> #include <cstdint> int main() { const uint64_t x = 123456789123456789ULL; // Pack into ...

what is the syntax for operator delete with user-defined-args? delete (arg) ptr; doesn't work..
@StackedCrooked I think you have to actually call the function
I'm talking about items (11) and (12) here.
@delnan: I can't take you seriously. You sound like a troll. — Cheers and hth. - Alf 17 secs ago
22:06
Guessing operator delete(ptr, arg2);?
Hahahahahaha. He's so easy to piss off.
@LightnessRacesinOrbit Thanks!
@StackedCrooked Don't do that.
Xeo
Xeo
hm, where the fuck is my pizza. It should've been here ages ago :|
22:09
just trying it out (not sure how to use it correctly..)
Placement-delete is weird.
It doesn't get called for normal deletes.
@delnan: sorry, i didn't consider that you had bad eyesight (or other reading difficulty) — Cheers and hth. - Alf 1 min ago
I'm gonna say this: I dislike Alf.
Only in case of construction failure.
@R.MartinhoFernandes normal deletes are a compiler error actually
22:10
He looks like a toxic kind of fellow.
@StackedCrooked ?
> main.cpp:88:12: error: no suitable 'operator delete' for 'Packet'
Yeah, no.
That's not how it works.
FTR
Dammit, I knew it.
22:11
I actually do have bad eyesight.
it's one reason why I'm increasingly disliking shooters.
You used placement new, not operator new.
@R.MartinhoFernandes ow
@DeadMG Get glasses.
the more advanced camouflage mechanics they involve, the more I feel discriminated against.
half the time, I simply can't see what the other players can.
hey! where's that tech support guy gone? YT is acting the maggot again!
22:12
So you're not matching this properly.
@R.MartinhoFernandes Actually, I don't think that's placement new. I'm not passing a pointer there. pool is not a pointer.
It is placement new.
@DeadMG Get glasses.
@Borgleader kdirstat/k4dirstat (and several others, less pretty/functional)
@DeadMG the other being they are not really games, or do we count moving the mouse and clicking as real gameplay?
22:14
@EtiennedeMartel don't paint it all over the guy; he's in a bad mood. That's not pretty, but hey. He /did/ try help. I'm just ignoring
That operator delete is only meant to be called if the corresponding operator new succeeds, but the subsequent construction fails.
@sehe He's always in a bad mood.
every time I even try to have a real discussion about that, all the other Loungers go apeshit, it's kinda like suggesting that Linux isn't the most perfect thing in the history of the world except that complaining about it doesn't make me feel marginally better about how terrible it is.
Id est it is meant to be used implicitly by placement-new.
Yes, it's weird.
22:15
@thecoshman It's much more involving than that and you know it, you silly troll.
@EtiennedeMartel I don't see it this way. It's just, when he is, he can be extremely curt. And unnuanced. But it's just not true that's he's always 'tough'.
Sweet. So now the mouse doesn't do anything anymore in chat. Why ....
@Stacked what you are looking for is an allocator.
@sehe I just don't like his "if you disagree with me then you are an idiot/a troll" attitude.
The placement-new feature is just not built for this.
22:16
He doesn't seem to realize how insulting he can get.
@EtiennedeMartel Okay. Duly noted.
@EtiennedeMartel oh sure, you press keys to navigate a maze, but solving mazes are not games.
@EtiennedeMartel He's Vlad
@thecoshman If you reduce any video game to a series of button presses, then they'll feel all quite dumb.
@EtiennedeMartel Are you seriously taking him seriously?
22:20
@EtiennedeMartel (hint: I was mocking)
@EtiennedeMartel I don't really mind. Even if it were directly involving me, by now I'd soon realize that it's his loss. And he's entitled to being abrasive. Whatever floats his boat. in a way (I'm pretty sure it doesn't, and he'll know this. Maybe another day...)
@R.MartinhoFernandes No. Hence my "you silly troll".
@R.MartinhoFernandes what are the use cases for overriding operator new then?
@StackedCrooked Job security
@StackedCrooked Pretty much only things that don't influence how the memory can be deallocated.
It's a terribly designed mechanism.
@StackedCrooked Though, note that what you did was not overriding it. You just defined a placement overload.
blog wars!
(And for clarity, my reply was about the use cases for defining placement overloads, not the use cases of overriding. The use case for overriding it is pretty much changing how the memory is allocated/deallocated.)
posted on March 13, 2014 by Scott Meyers

The Rule of Zero, coined, as far as I know, by R. Martinho Fernandes in this blog post, is: Classes that have custom destructors, copy/move constructors or copy/move assignment operators should deal exclusively with ownership. Other classes should not have custom destructors, copy/move constructors or copy/move assignment operators. By "not have," Martinho really means "not declare", because al

Xeo
Xeo
Hm. Java 8's optional type is basically tri-state. Just / Nothing / null
Poor Feeds.
@Xeo They did that?
facepalm
Xeo
Xeo
22:26
apparently
Every reference type is nullable
@R.MartinhoFernandes I see that's it's called "placement overload". But I think my code is different from the typical placement new which only provides a target buffer. What does "overriding" new do then?
They'd have to redo the type system to avoid that
22:26
@StackedCrooked Override the "real thing", i.e. new T;.
Doesn't my code do it "real" enough?
I'm kinda sleep deprived, so I'm probably daft..
Do you realise you don't destroy any objects?
btw, who defines a destructor for debugging?
Ah, I forgot to call ~Packet.
new(...) T; calls a constructor. operator delete(...) doesn't call a destructor.
22:28
@R.MartinhoFernandes ok.
wait... hold the pigging phone... what do you Americans think the short form of Patrick is?
And I didn't do construction and destruction. So I'm doing that part right..?
You did construction.
@Cheersandhth.-Alf Lol. You know, it would be a good troll if they left a comment there saying "The answer should demonstrate and prove the solution" :/ ... — sehe 32 secs ago
o ho
new(...) T does that.
pool.make<Packet>() sounds better.
22:30
I do construction outside of the operator: ` new (pool) Packet(pool);` coliru.stacked-crooked.com/a/24d3900528997972
With unique_ptr<Packet, pool_deleter> make() or something.
@Xeo there's not a lot of difference with C++'s move semantics for optional<T>, IYAM
@sehe Er, what?
@CatPlusPlus: Thank you.
Xeo
Xeo
@sehe Huh? There's a world of differences. Moved optional is simply empty, the equivalent of none.
22:31
@R.MartinhoFernandes Normally, I'd do look in that direction. Just wanted to figure out what the possibilities are with operator new/delete.
@StackedCrooked Well, very few.
wait... isn't Scott's article more or less saying the rule of zero is good, but when you are not using defaults... you should define everything else as defaults... so should define them all as defaults anyway :S
We wanted to make use of that in our code but gave up because it only brings hurt.
Xeo
Xeo
'Rule of the Five defaults' just doesn't sound as cool as 'Rule of Zero'
Meh, adding a dtor without anything else violates the r3.
You reap what you sow.
Xeo
Xeo
22:33
also, WHERE IS MY PIZZA RARGH
I don't get what Scott is advocating lol
The 'conundrum' whether optional<T> x = foo(); optional<T> y = std::move(x); should leave x an empty slot, or a "occupied" optional that happens to contain a moved-from object (I'm a firm believer in the second option, but it's tenuously related to the Java "design choice").
Who the hell adds a dtor without thinking about the r3?
@Xeo better than "Rule of Zero, except when we do need to define something, so define the rest as compiler generated"
Of course System.Nullable<T> is vastly superior
22:34
@sehe It's not related to it at all.
@Xeo Would you like mine? I bought a 12" Hawaiian as well as a large doner kebab, which was really stupid.
he wants to add a temporary destructor for a very specific use case to redefine a general tip?
:s
plus 'Rule of Five Defauts' does abbreviate to RoFD
@R.MartinhoFernandes boost pointer containers seem useful
Xeo
Xeo
I ordered mine over an hour ago :( if it ever gets here, it will probably be cold and/or soaked with fat
22:34
and you know we need hard to say abbreviations
@Xeo They forgot about your order.
Maybe they're eating your pizza.
@R.MartinhoFernandes Well. Once again my feeble mind conflates concepts. I guess what I wanted to say is that even in C++ optional is not always as pure as we'd like. Or, at least, almost ended up conflating move semantics with resetting the optional
Xeo
Xeo
Also can't call because they closed a while ago
and to make it worse, I paid online. :|
I feel robbed
You'll get it tomorrow
Xeo
Xeo
...
22:36
Better late than never!â„¢
@Xeo lol. Sadly this is often what we end up doing
@R.MartinhoFernandes there is no reason whatsoever to add a destructor for debugging
if one of your class members gives bugs/performance trouble, debug that class member, not its encompassing class
almost 4 hours in, still can't buy shit on Steam
@TemplateRex That's a self-contradicting claim. Even if the value of debugging dtors is questionable, if that's the goal, then clearly that's "a reason whatsoever"
how can Valve NOT afford to keep their servers running fine
I just don't get it
22:37
I smell entitlement
you don't see ebay or amazon doing this
right
@sehe yes, if and when you do debugging for whatever contrived reason, just add the whole damn lot of five
but not as a general rule, puhlease
Nobody is allowed to make mistakes if it convenes Alex M. It's just no acceptable
they make weekly mistakes
as a paying customer, I have the right to complain
Xeo
Xeo
22:38
damn I'm hungry
@TemplateRex Okay, that's a different matter. But the overriding point is basically that defaulting members are deceptively convenient: it's easy to miss the implicits
You sure you're getting your pizza?
Wiki accounts confirmed (:lol: litb actually filled biography)
Like did you get a confirmation from the local store or something?
@AlexM. Yes. I bet they have a support channel for this
22:39
I've never ordered pizza online so I don't know how it works
Yes, you get confirmation
@CatPlusPlus Copy paste
@sehe easy schmeasy, it's damn convenient not to type the implicits ;-)
@sehe eh? I get less than generic replies here
yours stands as proof
I mean I'm sure I can just anticipate some answer like "we're working on it, be back soon" and not bother contacting them
@Rapptz you order pizza, pizza comes.
22:43
Cool
@AlexM. Oh. I'm happy my "we don't really care - you're talking to the wrong counter" satisfied you. That's worth something
Xeo
Xeo
@thecoshman ... or not, apparently
and even if it comes now...
gah, I should order somewhere else. But almost everything is closed now. Except subway :|
this sucks
@sehe I admit, there nothing to care about my complaint
but you managed to sort of meta-care about it
that's definitely worth something
Xeo
Xeo
eh, damn, I should've checked the reviews for this one. Seems I'm not the only one with that problem
22:46
@CatPlusPlus I created my user page as well.
Xeo
Xeo
and I highly doubt the pizza will arrive after 1.5h
My dad used to own a subway
Now I'm hungry.
Me too
fuck you guys
IOW you're just here to get attention :/ Well. That clarified things rapidly :)
Cheers
22:48
The supermarket closes in ten-ish minutes.
Dammit.
@Rapptz An ex-co-worker of mine now owns one
quick
super robot legs can make it
I take subway often.
@Xeo if you really think you did order it, call them up. Maybe get a free pizza or two
@sehe aight buddy
Xeo
Xeo
22:48
@thecoshman already closed for the day
@Xeo what sort of shuddy pizza place closes at this time?
@Rapptz Meh, I'm going to the Späti.
@R.MartinhoFernandes translate plz
I've ordered pizza at 2 AM before
Xeo
Xeo
@thecoshman basically every single one close to me
even subway closes at 12 :s
22:50
Stupid Germans, don't they no how to capitalize on dunks?
JBL
JBL
@sehe Wat ? That's like the first time I say that I think, and... a bit ironically (notice the ":>"). Then, I thought the fact people entered and behaved quite like the opposite of what's in the rules usually pinned was somehow kind of a (though not a complete) proof. But there are stars, so of course this is read. :)
Xeo
Xeo
@ScottW I've eaten two buns today
@thecoshman Abbreviation of Spätkauf, which literally means like "late shopping". It's sorta like a 24/7.
@Xeo giggidy
@JBL what ever you said, I'm sure it wasn't ironic.
JBL
JBL
@thecoshman Is it ironic!?
:)
22:52
Ok, getting me some cookies, since I seem to have ran out of cereal.
Xeo
Xeo
@ScottW Meh, fuck it, I'm super hungry and I don't expect that pizza to come. Subway it is. :(
@JBL not sure, what did you say?
JBL
JBL
@thecoshman Hehe. Basically "nobody reads the starboard".
@JBL not ironic.
JBL
JBL
Whatever.
22:54
I've had regulars asking me wtf I was talking about when I was talking about pins that had been there for days, so...
A MOTD feature would be nice.
Xeo
Xeo
5 mins ago, by Xeo
@thecoshman already closed for the day
@ScottW FFS he just told about forty times that they're closed.
Xeo
Xeo
Also, it seems that other had the same problem
@R.MartinhoFernandes it's out of the way
Xeo
Xeo
And if the Sub also doesn't come, I'll just go and cry myself to sleep.
22:56
@thecoshman It's just above the links to the funny pictures :<
@R.MartinhoFernandes I mean the whole star thing is out of the way.
Not for looking at funny pictures.
Though I've also seen people reposting the top starred thing.
So :S
-3
Q: C++ Pointer Errors - More than 34?

macsj200How can do with wifi and LLVM with Hard Drive ram over 8 nanohertz. I need Wednesday or pizza never boot FreeBSD. Also C++ pointers sharp with at least 17. Much help. Very yes!

wat
Xeo needs pizza too, but Thursday.
@FredOverflow nice
22:58
ergh... Much Meme, very delete. — thecoshman 11 secs ago
@FredOverflow I flagged as abusive, lets see if it gets disputed
it's spam
@Borgleader Erm, why?
@R.MartinhoFernandes Because apparently thats what were supposed to do.
can someone give me the monty python vid
22:58
Delete vote in; my job is done.
@Borgleader it's spam. This is abuse you fucking inbred shit fart
0
A: C++ Pointer Errors - More than 34?

Kerrek SBPointers sharp are very null. Construct dynamic much object, array shift. Disk seek on Monday is segmentation fail. Functions. Arrays. Struct programming! He comes.

^^ lol
@thecoshman Last time there was a question like this, it went to meta and shog said: its abuse. so im doing just that
@Borgleader @shog you nipple.

« first day (1244 days earlier)      last day (3929 days later) »