« first day (635 days earlier)      last day (4311 days later) » 

4:00 PM
@JimNorton depends on what the associated functions are. Structs are structs...
 
0
Q: Constrain the lifetime of a data member to one method

FredOverflowI have encountered a slightly unusual problem. Consider the following code: class parser { lexer lex; public: node_ptr parse(const std::string& expression) { lex.init(expression.begin(), expression.end()); // ... // call some helper methods // re...

^ warning, wall of text
 
@JimNorton I see a char[] and I call a std::string, at least.
and I see an int[] and I call a std::array<int, 7>
 
@JimNorton Protip: ideone
 
@Drise Ok will use it...
 
Well, maybe I don't have any errors that need more handling than ending the program and printing a helpful error message.
I'm a simple guy. What can I say?
 
4:02 PM
So can I convert NumberImages[] into a vector where each item in the vector is a structure?
 
@JimNorton yes.
 
@rubenvb You know, you don't need to return bools for that. Let the exceptions go up the stack to main and do that there.
 
UGH!
 
You barely need to write anything.
 
@RMartinhoFernandes that's what I do. I use bools to signal failure for input or whatnot.
 
4:03 PM
(Hint: Boost.Exception)
 
@RMartinhoFernandes see for example this prime example
 
@JimNorton Protip: myVector.pushBack(myStruct);
 
next_token -> bool. errors -> exceptions.
 
@Drise ok, now what does that mean? :-)
 
@Drise wtf you need a move for?
 
4:05 PM
@JimNorton Adds your structure to the vector, but instead of copying it, it moves it.
@rubenvb Large structures? Maybe I overdid that.
 
@Drise 1. emplace_back 2. they need move constructors 3. premature optimization.
 
Xeo
@Drise If the structure is flat, you achieved nothing.
 
Xeo
@rubenvb emplace(_xxx) is not for move construction
 
@Drise Ah, so it's more efficient using move?
 
4:06 PM
@rubenvb What's different from push to emplace?
 
@rubenvb lol, you're using emplace_back to call the move ctor.
 
@Drise push has an l-value reference param, emplace an r-value reference, IIRC.
 
Xeo
@Drise emplace directly constructs the type with the provided arguments, aka new (dest) T(args...)
 
@JimNorton Correction: myVector.emplace_back(std::move(myOtherVector));
 
@RMartinhoFernandes is it guaranteed to be available for a POD struct?
 
Xeo
4:07 PM
@rubenvb push_back has an rvalue overload
 
It's a unique_ptr
targets.emplace_back(unique_ptr<target>(new target(m_subdirectory, {}, *project::configuration))); => targets.emplace_back(new target(m_subdirectory, {}, *project::configuration)); (github.com/rubenvb/Ambrosia/blob/master/libAmbrosia/Source/…)
 
@Xeo well hell. Now I don't know what the difference is.
 
@rubenvb Is that correct now?
 
@rubenvb I have a diagram!
 
Xeo
@rubenvb Emplace constructs the type anew from the given arguments, push_back just moves/copies the completed object into the vector
 
4:08 PM
@Xeo ah, OK. Thanks for clearing that up.
@RMartinhoFernandes will fix that. Seem to remember it not working though.
 
@RMartinhoFernandes Ah very useful... thank you...
 
Xeo
@RMartinhoFernandes I'd edit that to say "copy / move into the vector"
but that's nitpicking
 
OMG, lol
-3
Q: Sams Teach Yoursefl C++ in 24 hours good?

Magnus Possible Duplicate: The Definitive C++ Book Guide and List im starting learing C++ with the book "Sams Teach Yourself C++ in 24 hours" an i have a question this is a good book?

 
And I assume standard practice is to define classes in a separate .h file and the implementation in a .cpp file?
 
@Xeo I normally fill my vectors with stuff first. so is push_back better in my case?
@JimNorton Usually.
 
4:11 PM
I just put everything in .h but that's because I template everything :P
 
How are we going to update stackoverflow questions about C++ "heredocs" and equivalent? Currently there are a bunch of questions saying that c++ doesn't have raw literals (such as @"hello " world" in C#)

with c++11 we have R"(hello " world )", which should be updated on as many answers as possible..

any ideas?
 
@FredOverflow I'm finding the motivation behind much of your design difficult to infer. Maybe you could post more details on the parse and lex classes?
 
@Xeo I'll do.
@refp Run across one, update it/post an answer.
 
@refp Good luck with that Mr. IHaveEditPowers
 
Xeo
@refp Make a new question that explains them and close all old ones as a duplicate of that :P
 
4:12 PM
For what? Raw literals?
 
> You just hate PHP. But you did not say anything useful about why move from PHP to another platform.
 
Xeo
Over-the-top solution ^
 
@Xeo could work, I got a few hours to kill later.. but heck, that is going to be tedious and I can sure use some help
 
They are so stupid it's really just adorable.
 
@CatPlusPlus Yes, we know you hate PHP, and I read the link about why it's bad... And now I understand in technical terms why it's so bad.
@CatPlusPlus Was that a comment on your blog post?
 
4:15 PM
C++ is worse, it will take you so much experience to write anything nice in it.. it's one of the charms about it I guess. "the language which is impossible to master"
it's like perl, there is more than one way to do it.. except that in C++ the "more than the right way" doesn't even compile
 
I'm too lazy to fix Disqus derps. Whatever.
 
I sure hope Cat does NOT have me on an ignore list... :-)
 
@CatPlusPlus Where can I find your blog? Also, Jim wants to know if you have him on ignore.
 
On the Internet.
 
4:17 PM
Who?
 
Zing.
 
I can understand if I landed on Cat's ignore... I was rather rude yesterday... but I'd like to be able to make it up....
 
You made me write this horrible blog post.
 
My code can officially only be compiled by Clang 3.1 and GCC 4.7.
 
4:19 PM
> I work with PHP every day... and i must say... it really sucks!
 
And I'm glad about that.
I have to compilers to check the correctness!
 
@rubenvb :( mine can't compile on clang.
 
@DeadMG Can you factor your latest comment into your answer so I can upvote and accept? :)
 
@RMartinhoFernandes Thanks for the fix: github.com/rubenvb/Ambrosia/commit/…
 
Also:
So @fabpot just dismisses this http://piotrl.pl/2012/07/let-s-mock-php-users.html as "pathetic". He's either defending his business or antiprocessing http://en.wikipedia.org/wiki/Antiprocess
VICTORY.
 
4:21 PM
@FredOverflow indeedy
 
The best counter-argument the great PHP guru could produce.
 
Oh come on Cat! Are you ignoring me? Have you written me off as an idiot already? Please, I'm not really the person I was yesterday... I'm trying to learn from you all... we are all allowed to have a bad day yes?
 
I took you off, if you hadn't noticed. You still made me write this horrible blog post, you horrible person.
 
Fapbot again.
 
@CatPlusPlus No it was a good post.
 
4:23 PM
No, it's awful.
It's nothing but one more rant.
 
It's terrible.
But PHP users are more terrible, so I can sleep at night.
 
@CatPlusPlus Thank you! I read the link provided yesterday about why PHP is bad, and it changed my view... I know now technically why PHP is so bad... that is why I like this room... I can always learn something... even if at first a don't realize I'm wrong... I usually come around to a reasonable point of view.
 
@CatPlusPlus I'm finding it entertaining.
 
@CatPlusPlus But you expressed your point of view, in an entertaining way, everybody wins...
 
@JimNorton Just using the words fuck and you and cat all together were probably a bad idea. Note also: Include snobs.
 
4:26 PM
@Drise Yes, it was... that's why when I first came into this room this morning I apologized to everybody for my behaviour yesterday... I do feel bad about it...
 
@JimNorton the reasonable point of view being that of the regulars here? ;-)
 
@rubenvb Well at least the case made against PHP :-)
 
@CatPlusPlus Your blog, it has archive on the right, but it's ordered wrong!(and by wrong, I mean oldest to newest. And really, I'm just curious if that was intentional)
 
There is nothing if not a lot of strong wills around here
 
@JimNorton It's ok. We're quite unforgiving. Unless we aren't.
 
4:27 PM
@RMartinhoFernandes :-)
 
@CatPlusPlus PHP is not designed, it happens. Well stated.
 
@rubenvb And saying fuck you and calling everybody snobs here was not exactly reasonable...
I have a bit of Jeckyll / Hyde type personality that I try fight constantly, and sometimes it doesn't work.
 
@JimNorton sometimes it is. But you need to have a non-PHP reason.
@JimNorton the fighting or the personality?
 
You need to put more (mostly useless) code in your answer to beat him back, a typical novice mistake.. :) — Desmond Hume 2 mins ago
lol
 
@SamDeHaan I don't know. I'll fix it when it matters (so in 30 years or so).
 
4:31 PM
@rubenvb I fight against my bi-polar mood swings.... to be precise...
 
@CatPlusPlus Deal.
 
@JimNorton I expected an answer of "both" :)
 
How's that for being vulnerable..
 
> There's more than a third of the US population who is obese, so that must mean being obese is a good thing, right ?
 
@Drise since when is the US an example of "how things are supposed to be"?
 
4:32 PM
Or I'll fix it now and by the way get rid of "X comments" thing, because it doesn't work anyway.
 
@rubenvb Not falling into that trap anymore says the American citizen. :-)
 
@rubenvb WE GIVE YOU FREEDOMZ. TAKE NOWZ, or we will blow you up instead.
 
(It's a bandwagon)
 
@Drise It helps the construction industries evolve, and learn how to build stronger buildings that can support all of that weight while still remaining profitable.
 
4:33 PM
lol
 
I do wonder what the effect of people's weight is on tall buildings.
 
Question: Should every country have nuclear weapon capabilities?
 
@Drise You mean FREEDOMZâ„¢© (U.S patent #0)
2
 
@SamDeHaan I did indeed!
 
@JimNorton no country should. But then there'd be no nuclear power and we'd all be breathing through gas masks.
 
4:35 PM
Breathing is overrated.
 
@rubenvb gas masks?
 
@DeadMG Hm, tenfour has a much longer explanation... would you kill me if I accepted his answer? ;)
 
@RMartinhoFernandes Oxygen is toxic.
 
@SamDeHaan no nuclear power => oil and coal => pollution.
 
4:36 PM
@rubenvb War.
 
@rubenvb Ah, logic.
 
@rubenvb That's why I stated "nuclear weapon capabilities".
 
@JimNorton nuclear power => nuclear weapons.
 
Unless magic.
 
energy (expressed in joule) == power (expressed in ... hmm... SI doesn't have a unit for this, except maybe some currency)
 
4:38 PM
@rubenvb Robots.
 
@RMartinhoFernandes lol
 
Joule is an SI unit.
 
Also, power is expressed in watts.
As in "Power expressed in joule? Watt?"
 
right
stupid english terms
 
@rubenvb No not really.... weapon grade plutonium is not the same as power producing grade plutonium.. and what about the means to launch a nuclear missile...
 
4:40 PM
@JimNorton dirty bombs are also nuclear warfare IMHO.
and everybody has missiles.
just use a commercial plane if you must.
 
@rubenvb I have a missile in my pants.
 
@rubenvb Yes, but not everybody has ICBMs
 
And I think the CIA just dropped in on this discussion.
2
 
@rubenvb Fire ze missiles.
 
@rubenvb Lol... no doubt.
 
4:42 PM
Also, only madmen want to use nuclear weapons. Not countries.
 
Even if you have missiles, you need infrastructure to launch them. Mounting those things in your backyard is not very effective.
 
Just shoot all the madmen. Problem solved.
 
but who is mad and who is sane?
 
Is @Cicada considered a regular? How long has she been here?
 
4:42 PM
@Drise yes. Kind of. No. Maybe.
 
Those who want nuclear weapons and don't want nuclear power are mad.
 
@rubenvb Easy: wants to fire nuclear weapons => mad.
 
@RMartinhoFernandes News flash: people lie.
 
Flash lies too.
 
@rubenvb I wouldn't expect a regular to ask:
4 hours ago, by Cicada
How do you do tags.
 
4:43 PM
@rubenvb Omniscience beats that. So what.
Alternatively, shoot everyone but me.
 
@Drise why not? She's obviously trying to induce some sort of sexual connotation in that questionstatement.
 
@rubenvb Like always, naturally.
 
@RMartinhoFernandes you're not a man. Never had to worry :)
 
Getting shot at hurts anyway.
 
Can I initialize an iterator to some value I'd know it's not initialized?
 
4:45 PM
@Drise Chat profiles say Cicada has been in chat a year longer than you. Doesn't mean Lounge, but at least chat. And anyone who is in chat that is in Lounge was probably always in Lounge, after all.
 
wait
I don't need to.
nvm
 
Chat profile regdate is useless.
You just had to open chat once to get a profile.
 
@SamDeHaan I lurked for a long time. Also, there were about six months between me first entering chat and me actually chatting.
 
Probably most people who were around then did, when chat was announced.
 
@CatPlusPlus once is all it takes to become a Lounge procrastinator.
 
4:46 PM
@CatPlusPlus WTF is that?
 
I just started blurting nonsense. Much like I still do now.
 
@TonyTheLion Bananas.
 
@TonyTheLion Pigeons.
 
I don't remember what sucked me into here.
 
No, really, why is there a pigeon on my balcony.
 
4:47 PM
meh
 
@RMartinhoFernandes Probably about the same values for me.
 
because meh
 
@CatPlusPlus you're a cat. Chase it away. Do your job. Sheesh.
 
@TonyTheLion You know, chat profile, registration date. Sheesh.
 
Sheesh.
 
4:48 PM
Who what? Sheesh.
 
@SamDeHaan oh god, I read "redgate" for whatever reason.
meh
 
@TonyTheLion For the same reason I keep reading "fapbot" every time someone mentions that PHP guy.
 
@rubenvb he's too lazy for that
 
@RMartinhoFernandes You have a dirty RAM.
 
4:49 PM
@TonyTheLion Let me write this algorithm to chase it away... hang on.
 
this meme comes to mind, every time you say "fapbot"
 
Oh, I would never think that.
 
Keep it classy.
 
there's nothing wrong with a tshirt with a fap meme
it's not offensive, unless you get offended by the word "fap"
Ummmm.... any idea how to tell? — Wes Miller 7 mins ago
can anyone answer that?
 
4:55 PM
Bananas.
 
I don't know how to tell if you've linked to a library with GCC
 
Xeo
@TonyTheLion Your answer sounds more like a comment
 
@TonyTheLion CLOCK_MONOTONIC not being defined shouldn't have anything to do with linking
 
I want a stereotonic clock.
 
ok, deleted that
 
5:00 PM
Sounds like that library doesn't implement that particular clock.
 
@Prætorian It could be that CLOCK_MONOTONIC is declared as an extern and defined in the lib.
 
while(1){ malloc(1024); fork(); } <---- How to consume all memory and PID's
lol
 
@StackedCrooked Unless the OP summed up the error in his own words, linker errors I've seen always say something about some external variable not being found, not that it is not defined.
 
Pointless to argue about this without knowing the exact error message that the OP got.
 
5:05 PM
@StackedCrooked Ha! You beat me to asking him to post the exact error by 11 sec :)
 
Well, done with official work.
Evening everyonez!
Started to hack away at the Kyrouser page.
@DeadMG @CatPlusPlus Sexual enough?
 
because at work i hate when somebody stalks me and my boss is turned on some system that makes screenshots in 15 minutes for example — Fretwoak Dukov 8 hours ago
 
@DomagojPandža Cool.
 
My hotspot disconnects after 3 minutes of inactivity. I wonder if while true; do wget http://www.yahoo.com; sleep 60; done will prevent this. Testing it out right now.
Trying HTTP GET now since ping didn't prevent the disconnect.
You know if a son acts a little clownish then the mother will invariably find it funny.
 
@StackedCrooked could be the system behind your hotspot is doing activity check based on the rate you're sending at.
 
user1174868
5:17 PM
Hey gang
 
@Flexo Wow, screenshots in 15 minutes. That's fast.
 
@RMartinhoFernandes His boss is good, even though he's not a good boss.
I've recently started watching the anime series called Major. I did not anticipate that it would actually make me interested in baseball.
@KillianDS You mean I should randomize the sleep durations?
 
All the things.
 
Futile. They are.
 
Now, time to play some Star Wars: The Old Republic.
Dat Imperial Agent.
 
5:28 PM
Is this MMO very grindy?
 
It's an MMO, it has to be grindy.
 
Well, some are less grindy and more fun.
 
Steam Summer Sale is on.
 
Ohno.
 
They're going to take all my monies.
 
5:31 PM
@StackedCrooked That depends how the hotspot implements inactivity. could be anything going from any traffic to specific traffic (e.g. HTTP) and from threshold zero to checking a specific load. In the first case your solution should work, in the last case you just have to do enough wgets to get to that specific load.
 
Oh god, not the steam summer sale
 
> The Steam Store is experiencing some heavy load right now. Please try again later.
Haw.
 
I was already having trouble with the steepandcheap gear mania sale.
 
SO 404'ed on me a few minutes ago... go figure...
 
5:33 PM
@CatPlusPlus That's good, right.
 
I just want to take a loooook.
@SamDeHaan []()
 
@CatPlusPlus Was having a small brain fail.
 
Woo, I got in.
 
I'll count myself as one of the actual idiots.
 
Legend of Grimrock -60%.
 
5:36 PM
Wonder what I can hit on the mobile store
 
DXHR -75%.
Spacechem almost free -75%.
 
What's grimrock? Can't recall
 
3D dungeon crawling thing.
@StackedCrooked Nah, you're cool.
 
@CatPlusPlus Was like that two weeks ago, bought it.
 
My router is bursting in flames.
Stupid router.
 
5:39 PM
Skyrim -33%. Still 40$. May have to get it.
 
I can't buy Skyrim on Steam. :<
 
Why?
 
@CatPlusPlus Less grindy. More story. Still grindy, but less.
 
Dunno, regional retail agreements, or something.
 
Also, I can has starships.
 
5:40 PM
Ah, bummer
 
But I can't fly them, makes me sad.
 
There's also Indie Bundle I: Anomaly, Cave Story+, EDGE, Lone Survivor, The Baconing for -75%, if you care about those.
CS+ is nice.
@DomagojPandža Well, they made up-to-level-15 trial, so I might try it.
 
Yeah, CS+ was fun
 
user1174868
I hate steam sales
 
I loved playing Counter Strike.
Haven't played any video game in years though.
 
5:43 PM
Lol PLESK has a vulnerability that allows attackers to extract all usernames and passwords.
 
What's PLESK?
 
PLESK is horrible.... I much prefer cPanel.
 
It's one of those crappy web-based virtual admin packages.
 
haha
steam store page down
 
You can get in sometime.
I wouldn't try to buy anything right now, though.
 
5:47 PM
Is Counter Strike still popular enough to find servers with a good number of active players?
 
CS is best played with a group of friends. And drunk.
 
@JimNorton Yes.
 
@DeadMG Wow sweet... maybe I'll get back into playing it.
 
Playing on public CS servers is meh.
 
Does it still work with the last version of Half-Life? Or is it a separate package now?
 
5:49 PM
It's been stand-alone for ages.
 
So I have to buy it now... hmmm
 
It'll probably be on sale soon.
If not already.
 
It already is.
On the Valve pack.
 
@JimNorton Uh...
CSS has been a separate game since it was released, bro
 
Old CS wasn't.
 
5:50 PM
well, nobody sane would ever consider playing that shit
 
@DeadMG CS != CSS.
@DeadMG That's a lot of insane people.
 
right
I just haven't observed anybody playing the original in forever.
 
@CatPlusPlus Yeah I played it when it was first released, and it was a mod on top of Half-Life.
 
@JimNorton Well, news, bro, new stuff has happened since 1998. One of them is called "Source".
 
@DeadMG Yeah I heard of Source, but had already stopped playing the game.
 
5:52 PM
there's no gungame for CS
and the gameplay is terrible
 
I think there is.
 
There are still 1.6 players around, right?
 
But gungame is terrible anyway.
@RMartinhoFernandes Yes.
 
it's like CSS, except the accuracy mechanics are completely junk
 
I think they still play it competitively, too.
 
5:53 PM
@DeadMG I distinctly recall playing gungame on CS 1.6.
 
you can crouch with a bullpup and get a perfectly closed crosshair, and then not hit where the crosshair is when you shoot your first shot
 
Both CS and CSS have hilariously broken mechanics.
 
@CatPlusPlus That may be, but still fun...
 
CSS have texture problems, too. On cs_assault you can see shadows of people who are on the roof from inside, and legs of people in the pipe.
 
What's "gungame"'?
 
5:54 PM
I always sucked at CS, and that lead me to think that perhaps FPSs are not for me, until I tried CoD4, and then I realized that CS is just crap.
 
Sometimes guns clip through walls and doors.
 
@RMartinhoFernandes Basically, you get a simple arena-style map, and then everybody starts on the worst pistol in the game.
then every kill you get a better weapon
 
CoD has its own share of hilariously broken mechanics.
Like "knife is the best weapon in the game".
 
until you get to the end, when you have to kill with sniper rifles, grenade (CS grenades do shit for damage) and knife.
 
The noobtube as well.
 
5:55 PM
@DeadMG Ah. 1.6 had that. Kills earned you money to buy weapons next round.
 
killstreaks are also terrible mechanics
@RMartinhoFernandes No, that's very different.
 
@RMartinhoFernandes No, no, not that.
 
@RMartinhoFernandes Gungame is deathmatch-style.
You respawn continuously, instead of every round.
 
also, the levels are discrete, and you can't skip them
 
5:55 PM
Ah. Ok.
 
you must kill with every weapon
 
It doesn't fit in CS at all.
 
it's fun
 
Though the buying mechanic isn't that much better either.
 
agree
 
5:56 PM
@CatPlusPlus COD4 was good. Then they decided to turn everything up to eleven with MW2, and ended up going overboard.
 
After several rounds you have one team that's stacked with AWPs and the other that tries to push with pistols.
Almost every time.
But still, when you're drunk, you don't care.
 
AWPs should not even be in the game
 
And then it's fun.
 
scout is one thing, but awp is another
 
Scout is actually better.
 
5:57 PM
I don't know why FPS games even have snipers in them, all it does is degrade the quality for everyone else.
 
Doesn't have the power, but it's so quick you can get two shots in the timeframe of one AWP shot rather easily.
 
@CatPlusPlus Just make the winning team drink. Everything balances out in the end.
 
Killing snipers is fun.
Especially if they're terrible.
 
@DeadMG DICE seems to agree, and that's why they nerfed the Recon class in BF3 compared to what it was in BFBC2.
 
@EtiennedeMartel Yeah. It's a pity that Operation Metro's first objective is so sniper-friendly, though.
 
5:58 PM
Enemy Territory snipers were the best ever anyway.
 
before CQ Metro obj2,3,4 were the only decent non-vehicular close-quarters
 
@DeadMG Well, sniping is fun...
 
Fueldump. <3
 
@CatPlusPlus Dude, covert ops was the best ever.
and letting people in fueldump to the last objective was lolcakes squared
 
@CatPlusPlus Ha, I only played Field Ops on that.
 
5:59 PM
@JimNorton Great for you. What about the other 31 players on the server?
or you could hijack the big MG in the tower
 
I only not played Medic.
 
@DeadMG So, you play video games for the other players? That's silly.
 
Well, usually.
It was hilariously powerful when levelled to max.
 
@DeadMG What about them? I play for me... if they don't like it they can play a game that doesn't have snipers?
 

« first day (635 days earlier)      last day (4311 days later) »