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

2:00 PM
Also const T& get_const_it() { return get_it(); }
@Abyx Sooooo. Synchronize it.
 
I prefer singleton<Foo>::const_instance() and singleton<Foo>::mutable_instance()
 
@Abyx I prefer to fire people who make singletons.
 
Against const_instance<Foo>()?
 
hypothetically
 
@DeadMG indeed!
 
2:01 PM
@DeadMG It's a global variable.
 
@Abyx You can have it.
 
No one is massacring ctors.
 
@RMartinhoFernandes For which I would equally fire them.
 
@RMartinhoFernandes I'd fire those who use them too
 
God this WCF Dataservice is annoying. Let's see... I'm returning a value from this SP, why isn't it returning? ...dig,dig,dig... "//return value is ignored, returns rows affected instead." >.<
 
2:02 PM
although note that I do make a fair distinction between a true global and caches/memoization/etc.
 
@RMartinhoFernandes yes, because that class can be non-lazy thread-safe
 
@thecoshman Fire yourself. Singletons are unavoidable due to third party/OS libs
 
@sehe Make and use are two different things.
 
@Abyx What does the class gain against a free function since it's all static methods?
 
@DeadMG We expect no less. Of course, every distinction the puppy makes is, by definition, fair
 
2:02 PM
@SamDeHaan oh lord, some one needs a slap :P
 
of course, if you want to use OGRE, you have to use the singletons they have.
 
1 min ago, by thecoshman
@RMartinhoFernandes I'd fire those who use them too
@DeadMG Is my point
 
@DeadMG which is why you don't use OGRE
 
@RMartinhoFernandes class can have private static members
 
1 hour ago, by sehe
somehow, I often doubt that :P
 
2:03 PM
@thecoshman Well, if they work at Microsoft they've probably earned more than just one.
 
@Abyx To do what?
Also, you can still provide the interface as a function.
 
@RMartinhoFernandes to initialize singleton before main() called, thus it becomes thread-safe and not lazy
 
@thecoshman The best part, is it's returning a -1 as it is. Somehow it thinks that the rows affected is -1. /raaaaaaage
 
@Abyx That's a global.
A naked one, without any crap around.
blah x; // initialized before main, thread-safe, not lazy
int main() {}
 
@RMartinhoFernandes sort of, but global can't be header-only
 
2:05 PM
/cue IOF
 
and we should have extern T x; everywhere we use it
 
@sehe It's not like you can solve that by throwing in a template.
 
@RMartinhoFernandes True, I meant /cue as 'inb4'
All: just accept the limitations of the language. Don't use your knowledge it to do pissing contests on what approach is best. Just do as you please since you all know full well what to avoid.
I'm with the robot for his method advocates simplicity. Everything else is distraction. If you want stuff initialized 'before main', well - initialize it from main. There is no gain. Main is your entry point, live with it
 
@Abyx I'm not sure if that's a feature. If you put all globals in the same TU you can control initialization order. If you leave it to template instantiation it's every man for himself.
 
@RMartinhoFernandes ah... btw, globals aren't constructed-on-demand, we can ordering issues when one global depends on another
 
2:09 PM
@Abyx There, I predicted it
 
lol
3 mins ago, by R. Martinho Fernandes
@sehe It's not like you can solve that by throwing in a template.
 
Also, on-demand initialization still possibly breaks on cycles.
 
@sehe sure, but it helps in other cases
 
@Abyx also, lol at "we can order issues" :)
3 mins ago, by sehe
All: just accept the limitations of the language. Don't use your knowledge it to do pissing contests on what approach is best. Just do as you please since you all know full well what to avoid.
 
hm.. yep... "ordering"?
 
2:11 PM
Yeah, and use singletons.
 
singletons are :foreveralone:
 
anyway I like my singleton<T> whatever animals, robots and other things say
 
I like making singletons in Adobe Flex.
No private constructors
So I just make constructor throw exception.
 
Robots are best.
 
/durr
 
2:13 PM
@SamDeHaan EWewtjrlkhy qklwkltçhwej waght?
Aha! Remembered what I was going to do!
I'm awesome.
 
@RMartinhoFernandes That's srsly the popular way to make singletons in Flex. It makes me want to cry. if singleton == null, singleton = this; else, throw...
 
@RMartinhoFernandes Is it your pet typing? Cute
 
@Abyx If one global depends on another, it's seriously time to shoot whoever designed your system.
2
 
@DeadMG why?
 
@Abyx Because having one global is stupidity. Having one that depends on another is instant unsalvagable spaghetti.
 
2:16 PM
@RMartinhoFernandes That said, there are other options (stackoverflow.com/questions/1312318/singleton-class-in-flex). They're still not perfect, though.
 
@DeadMG it's not stupidity it's real life.
 
Not mutually exclusive. Sadly :(
 
@Abyx No, "real life" is "I'm going to be stuck maintaining this thing for a decade, so I'd better make my own life easy in the future and not use a global like an idiot."
 
@DeadMG Aha, my favourite problem solving technique is catching on.
 
@thecoshman Too chunky.
 
2:20 PM
@DeadMG yep, maintaining, often you don't write new code - you get existing one with globals and other crap. Then you refactor it by replacing some globals with singletons, etc - that what the real life is (or may be)
 
@Abyx You don't get an existing one with globals and crap if nobody makes globals in the first place.
hence the policy about firing anyone who makes one
 
@Cicada I'm just dropping barely related links tvtropes.org/pmwiki/pmwiki.php/Main/ChunkySalsaRule. Sorry, cannot resist.
 
and secondly, replacing a global with a singleton is not a real refactoring. A real refactoring prevents global data dependencies.
 
@DeadMG say that when you'll be hired to maintain 100K LOC code base after they fired a developer who wrote that.
 
@Abyx If he's fired promptly after the global is introduced, it won't infect that much code.
 
2:23 PM
@RMartinhoFernandes Hellsing's Alucard is an exception to that rule.
 
you'd think by now that microsoft would have thought of the possibility of adding a timeout to a button press or mouse over event that lasts 10 minutes
 
@StackedCrooked No, it's not, because the rule is about games.
 
*le sigh*
 
Unless that manga has hit points in-universe.
 
@RMartinhoFernandes I feel like i haven't seen a trope in weeks.
 
2:26 PM
Speaking of games, my gaming group is back. Fuck yeah.
 
back from where?
 
@Cicada I'll just turn that into a cock joke :D
 
@jalf Back together :)
 
Cool. So what is it going to game?
 
@RMartinhoFernandes what sort of gaming?
 
2:29 PM
@jalf Some tabletop RPG. We're not sure what yet.
 
Okay, so. How's it going peeps?
 
@RMartinhoFernandes My group really enjoys Scion if you are looking for some suggestions.
 
Thanks, I'll look it up.
 
I should find a good tabletop group.
I've only actually played with one in college, and they were awful.
 
@SamDeHaan Yeah the people in the group can make or break it even more than the DM.
 
SF.
2:34 PM
Hello. A quickie to small for a question. Will ptr = new bool [size];initialize the array with false while creating it?
 
I'd beg to join the robot's, but I feel that portugal is a bit of a commute.
@Collecter Had this reeeeally annoying kid that wasted the majority of our time trying to break whatever it was the DM had planned for every single NPC.
 
@RMartinhoFernandes Cool. We're just playing board games :)
 
Jun 29 at 10:37, by thecoshman
If you are new here, please read the newbie hints and keep the acronym list under your pillow. Thank you.
 
yahoo password leak now apparently
 
@SamDeHaan Yeah, that isn't good. What system were you using? Some RPGs it is ok to do that, most it is not.
 
2:36 PM
@Collecter D&D, I think it was 3.5
 
@SamDeHaan Ha, sounds like typical Xbox Live-class jerkassery to me.
 
@SamDeHaan I see. That guy was bad then.
 
@jalf We used to play Settlers of Catan.
 
@RMartinhoFernandes ugh
 
I love settlers!
 
2:37 PM
I'm sorry for you ;)
 
@RMartinhoFernandes There is a settlers box approximately seven feet from where I am sitting.
 
@jalf I like it. :P
 
@jalf By the way I tried robo rally, i believe you suggested it to me a long time ago. It was fun.
 
I guess it's better than Ludo or Monopoly, but not by much :D
@Collecter Oh yeah, that sounds plausible
 
It's been a while since we've all been together and someone stepped up for GMing something, so we're probably not going to have time for any board games.
 
2:38 PM
recently, we've discovered Galaxy Trucker. That.. game... is.. brilliant
 
@jalf Oh? We also bought Twilight Imperium. The game is alright, but man does it take forever sometimes....
 
@jalf the game is made by the people who play it, not by the gameplay. It's all about the monopolies, trade embargoes, etc.
 
@RMartinhoFernandes it's ok in a family game kind of way, but just not very interesting game mechanics
@SamDeHaan The actual game has something to say too
 
I think the only tabletop game I ever played was a Star Wars roleplaying game.
 
Yes, playing Settlers with people who are fun to play with is a lot better than playing Settlers with someone who aren't. But I'd still rather play a better game with someone who are fun to play with
 
2:40 PM
@jalf What do you have against the mechanics?
 
@Collecter heh, I've been curious about that, but yeah, the "foreverness" just means I doubt we'd ever play it
 
@EtiennedeMartel We tried that once, but I wasn't available back then, so I didn't play.
 
@EtiennedeMartel you are missing out on a world of awesome then
@SamDeHaan indeed, nothing beats 'Mayfair insurance'
 
@SamDeHaan Well, it's not so much that I have anything specific against them. More than they're just not particularly outstanding. If you've played it a couple of times, it starts to get monotonous.. There's a lot of luck, and not really a lot to do as a player, that you didn't also do last turn, or last game, or the game before that
It's not a bad game, I just think it's dull
 
@jalf I am not sure if it is my group or what. They like building up huge armies and then trying to take each other over, and when you choose turn order you also get a bonus for the round. Well last place gets "victory points" (i forgot the word) and a new goal for the game, for people to get points. I am the only one who will go last to generate goals and get points....
 
2:42 PM
@Collecter In Settlers?
 
@jalf In Twilight Imperium
 
I visited local board game meetups a few times. It was fun.
 
@RMartinhoFernandes It was fun. We were all noobs, except for the GM who was a RP veteran.
 
@Collecter only played it once, don't think it got a proper chance
 
@Collecter Oh. Well, it matches what I've heard about it (It's an all-day game)
 
2:43 PM
 
@EtiennedeMartel The best RPG for noobs is Paranoia!
 
@jalf I can understand that. I don't tend to get bored by the mechanics, as I just see the mechanics as a system to support what i see as the actual game, and that (the trading relationships) changes every time.
 
and our group is fairly slow too. :D
 
@EtiennedeMartel ಠ_ಠ
 
The players are forbidden from knowing any rules, so it matches noobs perfectly.
 
2:44 PM
@RMartinhoFernandes in what game?
 
@jalf Yeah it pretty much is sadly. Our group can be fast, just not in Twilight Imperium xD. I also need to pick up dominion expansions
 
43 secs ago, by R. Martinho Fernandes
@EtiennedeMartel The best RPG for noobs is Paranoia!
 
@RMartinhoFernandes ahh
 
@SamDeHaan But why not have those trade relationships in a better game then?
 
@jalf Any examples?
 
2:45 PM
@SamDeHaan Of what? A better game? Or a better Settlers?
 
@jalf settlers replacement, with similar trading systems, or at least a trading system with similar capabilities for conflict
 
Paranoia actually sounds pretty fun. Anyone have a preference for editions?
 
@Collecter There is only one!
 
Perfect!
 
All the others are uneditions (that's a 1984 reference).
More seriously, we played the 25th Anniversary edition.
It was loads of fun.
 
2:48 PM
I will have to find a PDF of it to take a look before I drop the money for the book. It sounds like something my friends could like, all the back stabbing and suspicion.
 
And I still don't know the rules.
@Collecter Yeah, that's really encouraged.
 
Only problem is if I DM I cannot stab anyone!
 
But you know everything!
(I don't know if that's good)
Also, if you DM you can terminate PCs on a whim.
 
@SamDeHaan I don't think I've played any other games with similar trading systems. I'm sure they exist, but I can't think of any I've played. There are plenty which have lots of negotiation and conflict and shifting alliances, though
 
A fun game to play with lots of alcohol is Munchkin.
 
2:52 PM
@EtiennedeMartel Munchkin is fun even with out alcohol
 
Muchkin is fun. We combine normal with super hero and zombie munchkin
 
@jalf If you've got any examples, I'd love to check em out.
Also: Anyone who's done C# WCF: Is there anywhere I can put a breakpoint that will let me examine all incoming requests? Or any other way? Trying to figure out why one request is not going to the right method.
 
Isn't there a logging facility or something?
 
Cosmic Encounter might be a good match. I've never got around to playing it (half the people I play with are crazy with it, and suggest we play it, and then somehow we always end up playing soemthing else instead) :(
But I know it's awesome, and it the player interaction is very freeform, so you make deals with other players, form temporary alliances, backstab them a moment later, and so on
 
@RMartinhoFernandes Yeah, probably. Juuust need to find it.
 
2:55 PM
@jalf Cosmic + all expansions is one of my groups favorite games. We have one girl who is pretty obsessed with it.... Her priorities are Cosmic > School > boyfriend > everything else.
 
How long of a game is it?
 
For inter-player conflict, with lots of suspicion, mistrust and backstabbing, Battlestar Galactica is also great.
 
@SamDeHaan Depends on the amount of people present and the alien powers, but between 30 and 90 minutes
 
Good, that's just about right for the group I play with.
 
Some alien powers help drag out the game, others make it go fast.
 
2:57 PM
I played Agricola for the first time a week or two ago, and was really surprised at how fun it was. But player interaction is a lot more indirect. You're constantly competing for, and blocking each others access to, resources, but you can't directly trade with each others
And Galaxy Trucker is just an all-round fun game that everyone should play :D
I dare anyone to dislike it
 
user image
4
@jalf I don't like it.
What are you talking about, btw?
 
@jalf I take you up on that dare. Now buy me a copy so i can find out.
 
@RMartinhoFernandes You're wrong then. Your statement makes no sense, and can be ignored ;)
 
We have played Killer Bunnies a few times. It is alright, but I would normally prefer other games, such as Dominion.
 
also, Shut Up and Sit Down is really great for inspiration if you're looking for new games
Is how I found Galaxy Trucker
 
3:01 PM
@SamDeHaan Try fiddler? Or is it binary remoting?
 
@jalf I would be looking for new games if I could afford to buy them often.
 
@Collecter Yeah, Dominion is lovely
 
@sehe looks like it could work
 
@jalf I love using King's Court on Montebank. I believe those are the cards, it has been a few months.
 
flump
 
3:05 PM
@jalf I refuse to like it in order to spite you.
 
@DeadMG flubbleshlubble
 
anyway, I'm heading home. have fun!
 
b
 
"Nice". This happened near me recently (too):
 
I've heard that it's more than feasible to do that
 
3:13 PM
@DeadMG Yeah, but the thing is, attacker actually taking the effort of targeting companies with that method is pretty new. It has long been advisable to format USB sticks gotten on international conference (say, in China) before use
 
@sehe Thanks, fiddler helped. Now I just need to actually fix the issue. Uuuuuurgh
 
@SamDeHaan FWIW: fiddler can record/replay the response that triggers an error. Huge timesaver :)
G2g get the kids, cya
 
See ya
 
user784668
lol
 
I fiddler'd your kids
 
3:17 PM
:O
 
-1
A: How to flatten iterators of nested containers?

R. Martinho FernandesI'll quickly outline a solution: Write a is_container trait that detects begin() and end() members, or possibly some more complex rules; Write a all_flattening_iterator<T> template that is just a flattening_iterator<all_flattening_iterator<typename T::value_type>>; Write a spe...

WTF got downvoted.
 
for some reason, I find it infinitely tempting to downvote you again
 
@RMartinhoFernandes Does not compute. How can robot get downvoted?
 
user784668
@DeadMG +1
 
but I'll upboat you instead
 
3:18 PM
@RMartinhoFernandes what! not every one thinks the speak the word of god? how can this be?
 
@RMartinhoFernandes !downvoted.
 
@RMartinhoFernandes I like how his downvote reasoning starts with "I was dreaming of a way..."
 
@thecoshman I never get downvoted!
 
@SamDeHaan That's not his DV reasoning. I don't think he DVed.#
 
@DeadMG Ah, gotcha
 
3:22 PM
@SamDeHaan You're jumping to conclusions.
 
@RMartinhoFernandes No, I only leap to conclusions.
 
It's annoying when you comment something on an answer and someone else downvotes and you look like the downvoter.
 
@RMartinhoFernandes deal with it
 
@RMartinhoFernandes But correlation proves causation, amirite?
 
@SamDeHaan causality. And I don't think that's true, but I'm fuzzy on the details.
 
3:24 PM
wtf, you got DVed again
 
Nope, still -1
 
@RMartinhoFernandes I got that yesterday with someone who edited "why the downvotes" into the question itself. I suggested reasons why people might have downvoted (having not downvoted it myself) to be helpful and they basically ended up having a go at me
 
@RMartinhoFernandes why is Amazon the "nice guy" in that?
 
@Flexo Yeah, one tries to be helpful and gets trounced by point fights.
 
@rubenvb Perhaps the higgs boson can clear this up.
 
3:26 PM
@rubenvb The nice guy is MS: they have the guns.
 
@SamDeHaan I highly doubt the boson is capable of intelligent behavior.
@RMartinhoFernandes I see. Google has colors at least.
 
@rubenvb I thought It was omniscient.
 
@rubenvb But it's the god particle, you mean to say that god is not capable of intellig-- ohhh.
 
@SamDeHaan grabs rifle
@RMartinhoFernandes air is also all around us. I never heard it speak a decent word.
 
@rubenvb omniscient != omnipresent
 
user784668
3:28 PM
@rubenvb I've heard it speak "fuck". Not a decent word, yeah.
 
look at the loneliness:
1
Q: Replacing the standard Android H264 software encoder with an ffmpeg based one

rubenvbIn Android ICS and later, a new OpenMax IL API version is in use, making old binary blobs useless/unused. This leads to older devices that otherwise run ICS just fine and dandy to have broken video playback (YouTube HQ and IMBD, for example) because Androids fallback software decoder sucks when c...

@SamDeHaan ah yes. I'm not high on religio-babble
@Fanael My point exactly.
 
@rubenvb ...do you weight the same as a duck?
 
@SamDeHaan is that a trick question?
 
@rubenvb That depends entirely on your answer, like any good trick question.
 
@SamDeHaan Then I'll go with: yes.
 
3:31 PM
@rubenvb It's language.
 
@rubenvb She's a witch! Burn her!
 
@SamDeHaan damn. I should have gotten that one sooner XD
 
What? Someone didn't get a Holy Grail reference? He truly deserves to be burned.
 
noooooooo
yes or no: TCHAR is silly?
 
Perhaps maybe sometimes.
 
3:38 PM
damn, he wants to discuss this stuff in chat
here I go
 
I used the TEXT and TCHAR macros when writing Windows code. They worked as expected. At that time I didn't bother asking myself whether or not it was silly.
 
@RMartinhoFernandes damn you stalking me around SO.
 
my mother's returned
she is not le happy about my results
 
L("string") is sillier. oh microsoft..
 
@DeadMG How surprising.
 
3:39 PM
eh
 
Haha oh wow new rant about CUDA 5. And the forums are still down so I can't spill my hatred.
 
my father was reminding me about how he failed a bunch of his exams and stuff
but my mother seems a bit less understanding
 
oh, mothers.
 
ah, I don't think they'd be that stupid
 
3:41 PM
@DeadMG It was mostly a joke designed to drop a link to tropes.
 
the only thing they've ever achieved from negative feedback to me was making me feel bad
 
@DeadMG Unless HIV negative.
 
fortunately
I am trucking off back to my university pad tomorrow
so she has a small time window in which to be nasty to me
I simply expect that time window to be full of nasty
 
In what way can she be continuously nasty? Once she said what she wanted to say..
 
3:44 PM
She'll say it again!
 
Xeo
Gnaaah, and I found yet another game that's not xcopy deployable...
 
@StackedCrooked you clearly have a very simple (in a good sense) mother.
 
I guess.
 
mostly because she makes it clear how she feels every single time she looks at you or speaks to you
 
Skyrim is a really cool game, but true to Bethesda's heritage, I got a VC++ pure virtual function call error.
 
3:46 PM
@DeadMG She painted her face with ashes or something?
 
little more subtle
but just as effective
 
She shaved off her eyebrows?
 
lol
 
Dammit, I won't have Internet this weekend.
 
Hello everybody. Let me right off say that I apologize for my behaviour yesterday... I will try not to be such a whiny little punk today. :-)
 
3:48 PM
I moved to a different apartment and apparently there's no phone connection there.
 
@JimNorton Don't worry, we have a replacement whiner.
 
@JimNorton GET OUT!
@JimNorton I mean, fine.
 
@RMartinhoFernandes Oh yeah?
@StackedCrooked lol
 
Replacement wiener?
 
Do I want to know what that means?
 
3:49 PM
I just thought it sounded funny. I'm a simple person.
 
So I'm trying to motivate myself to convert a C application into C++ and design a proper Class / Object model... Ugh... where to start...
 
Don't immediately go the OO route.
 
@JimNorton C++ does not imply OOP.
 
So just use classes where they make sense and not worry too much about Class / Object model?
 
@JimNorton Templates! (You knew I was going to say that, right?)
 
3:52 PM
@JimNorton Exactly. Just use the more modern features, like automatic containers and such, especially strings. Don't use char* anymore lol.
 
The discussion with the tchar dude isn't going well.
 
wtf is a class/object model?
 
SFINAE the shit out of it.
 
@DeadMG OOP hype crap talk.
 
@DeadMG I want to know too.
 
3:52 PM
@DeadMG A model with classes and objects. IOW, something.
 
@JimNorton You can start by replacing dynamic arrays with string, vector, etc...
@RMartinhoFernandes Entity relationships perhaps.
 
@DeadMG Maybe I'm using the wrong terminology.. but I'm trying to convey the "proper" design and use of Classes for an application... OO design...
 
@JimNorton The best start is to convert your error and resource handling from return codes and malloc to exceptions and std::vector
 
^that
 
@DeadMG Well stated. +5 internets.
 
3:54 PM
lol
 
I'm doing this as a means to help me learn C++.. so maybe just start small and incrementally add more and more C++ features...??
 
@JimNorton Yep.
 
start with the resource handling
 
@JimNorton but start with vector, string, and exceptions.
 
then the error handling
 
3:55 PM
but don't do all the error handling with exceptions.
I find that's often too verbose
 
Blasphemy!
@rubenvb Erm, what non-verbose alternative is there?
 
Ok got it, I'll have some code to post later today... I'll show the C code and then what I've done in the conversion to C++ and ask for critique if that's ok...
 
@RMartinhoFernandes return bool
 
@JimNorton I'm game.
 
That's less verbose, huh.
 
3:56 PM
I've not had the need for much more really.
 
nah
 
less verbose than try catch, handling, perhaps rethrowing, and a bunch of associated braces.
 
invalid conversion
 
I wonder how you thread those error codes all the way back to the handlers, with less verbosity.
 
you have to explicitly check each and every return code at every site
that's DRY violation, bad, at the very least.
 
3:57 PM
@rubenvb return (myinputstream.eof() && !myinputstream.bad()) ... Wait, hold on.
 
@rubenvb If you have that many try-catches it sound slike you're doing something wrong.
 
whether that return code is bool or HRESULT.
 
@RMartinhoFernandes I only have one try-catch wrapping my main.
@Drise what @RMartinhoFernandes said.
 
@rubenvb And how the heck is that more verbose than manually threading error codes.
 
3:58 PM
@RMartinhoFernandes I don't have error codes. And what's "threading error codes"?
 
@rubenvb Propagating them up the call stack.
 
@RMartinhoFernandes I want to return filestream is broken, but not at the end of the file. How would you do that then?
 
Propagating them through call-stack.
 
Returning a bool is returning an error code.
 
@RMartinhoFernandes I've only had to go one step with the bool stuff.
that's the point. I generate and handle the error where it matters.
 
3:59 PM
Wut.
You generate the error where it happens. There's no other option that makes sense.
 
So for example, my rather small C application has the following data structures... any hints on what C++ types to replace that with?
http://pastebin.com/3z0ft1bh
 
I generate errors where they will happen.
 

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