« first day (1049 days earlier)      last day (3905 days later) » 

4:00 AM
0
A: How do I ensure a Class can call a method on another Class, but not other Classes can call that method?

Loren PechtelA really ugly answer would be to make it private and use reflection. Another ugly answer would be to make it throw an exception if the caller is wrong. Both of these are much slower to execute than a normal call also. I don't think there's a good answer. C# doesn't have friends.

> C# doesn't have friends.
^^ take it out of context :)
 
They have something similar (arguably worse, choose your poison)
 
That one is an incredibly poor answer.
It doesn't answer the question at all, and is essentially one big "RTFM".
 
@EtiennedeMartel Or "Waste your time RTFM".
 
Yeah.
Ha, the guy has 6k rep with 504 answers and 67 questions.
 
So I'm guessing ThePhD is gone forever?
 
4:05 AM
Wait what happened?
 
No idea.
He just left.
 
The fuck. He isn't in the users list.
 
If something happened, I wasn't online then.
 
@EtiennedeMartel That's all? That's a pretty shitty ration, I got more rep with 162 answers, 2 questions
 
How does C# do friend classes?
 
4:06 AM
@MarkGarcia He had his account deleted /cc @Mysticial
 
2 days ago, by Cat Plus Plus
I'm more interested in what's this about @ThePhD removing his account
@Borgleader No.
:(
 
@Rapptz They don't. We have to use internal. Or design a hack around it.
 
Oh that sucks. I actually like friend.
 
@Rapptz He was online on Steam 44 minutes ago
 
@MarkGarcia dafuq happened... I miss the guy.
 
4:08 AM
@DeadMG Oh he was. Last I checked he made his steam account private.
 
I don't know what that means.
 
@ThePhd Please come back! We'll not stop you from writing UB code anymore. Just... please come back...
 
but he did say often that his family was prone to catastrophes/calamities requiring his attention.
 
@Mysticial Me too. And I feel sad.
 
perhaps he was Hit By A Bus™
 
4:08 AM
@Mysticial Same
 
@Rapptz It's rarely an issue in practice.
 
 
@DeadMG But why delete his account?
 
@EtiennedeMartel I seem to use a bit.
 
@EtiennedeMartel Le Dunno.
 
Not sure what that says of my design
 
> 7 hours ago
He's still kicking!
 
3 mins ago, by DeadMG
@Rapptz He was online on Steam 44 minutes ago
 
Oh. And that.
 
but it seems to me like he certainly doesn't want to cut off all communications with us.
else he would not be participating on Lounge<Chat>
maybe an SO-specific issue.
 
4:12 AM
in Room for ThePhD and Ben Collins, Aug 26 at 18:56, by ThePhD
Ah, nevermind. I figured out account deletion. Sorry to bother. Buhbye!
 
man I love water
 
Sadly, yes :(
 
@DeadMG Yeah. Stack Overflow is becoming more and more toxic.
 
@Rapptz The man who invented water was a genius.
 
@EtiennedeMartel Seriously. It's like we can't live without it.
 
4:14 AM
@Borgleader Then we'll hope it's just Stack Overflow specific, and not the Lounge... Well, the Lounge would be factor... :(
 
@Mysticial What a strange coincidence.
 
@MarkGarcia I think it was a factor
 
@MarkGarcia I have to kinda agree.
 
@Mysticial For once I thought what @Rapptz meant by "water" is a game.
 
the primary problem is that virtually all of the "easy" questions have been asked and answered.
 
4:15 AM
No I meant actually drinking water.
 
most of the questions that come through now are "debug-my-code"
 
Feels refreshing.
 
@DeadMG That made me laugh. :)
 
I drink like 2L a day.
 
Aug 26 at 18:49, by ThePhD
If it's been too long.
 
4:16 AM
@Borgleader Shit. That's emotional.
And sad. :(
 
I feel like working on a project
 
0
A: What are some better ways to avoid the do-while(0); hack in C++?

Adrian ShumI am not particular into the way using break/return in such case. Given that normally when we are facing such situation, it is usually a comparatively long method. If we are having multiple exit point, it may cause difficulties when we want to know what will cause certain logic to be executed: ...

^^ Is that guy advocating single exit points?
 
@DeadMG That's why we like cutting-edge, standardese, questions. :)
 
lol
@Rapptz Try building Wide on Unix.
 
And geez... that question is a complete mess...
 
4:19 AM
@DeadMG I meant something enjoyable
 
oh god thats hideous
 
lol
 
all the answers are hideous
 
@Rapptz @ThePhd enjoyed building Wide.
 
the correct answer is "fix your f**king logic"
or "write a proper FSM"
 
4:21 AM
The only remotely sensible answers are the top two answers.
Everything else is just...
ugh...
 
I'm pretty sure return; is different than goto x ?_?
referring to this comment:
I don't think this is necessarily any cleaner or better than goto (other than for religious reasons), as it simply disguises goto as return (with additionally pushing/popping args on stack!) just like disguising it with break in the original code. Nevertheless +1 for a very creative way of using/abusing the language in a legitimate way. — Damon 12 hours ago
 
The 3rd answer is complicated and you eat a performance cost of checking all the cases even if you leave early.
 
sigh
a switch statement is often better if you need a simple FSM
refactoring your logic > *
 
The only thing I "abuse" switches for is checkpoint-restart.
Otherwise, I use it mostly for enum checking.
 
40
Q: Memory leak C++

Global WarriorI just wrote a code in C++ which does some string manipulation, but when I ran valgrind over, it shows some possible memory leaks. Debugging the code to granular level I wrote a simple C++ program looking like: #include<iostream> #include<cstdlib> using namespace std; int main() { std::s...

lol
 
4:24 AM
sigh
 
why does this have 40 upvotes
 
@Rapptz It probably went viral at one point.
 
@EtiennedeMartel Judging from the timeline, it looks like a multicollider question.
 
@Mysticial A what?
 
the bar with stackexchange on it
 
4:27 AM
multicollider™
 
@EtiennedeMartel It got on the multicollider - that's where the bulk of the views came from. Then it hit the Tuesday Newsletter.
 
I see.
People check that shit?
I thought it was only there to steal screen real estate.
 
I've had two answers there.
 
@EtiennedeMartel Which? Multicollider? or Newsletter?
or both
 
So I assume they obviously do..
 
4:28 AM
The thing that collides multiple times.
 
because I got a lot of votes from it
 
"here's a question that could be answered if people just bothered to read parashift or use google"
 
@MattD Well, TBH, I didn't bother reading parashift.
 
you should . its an awesome resource
 
It's good for C++03
looks cool
 
4:31 AM
paper zelda?
 
@MattD I think reading C++ FAQs here in Stack Overflow is better. They're more refined, and I like how the answers sometimes conflict with each other. Comments and discussions are really good too.
 
Fun fact: the French localizations of Zelda games rename the Master Sword to "Excalibur".
@Borgleader A Link Between Worlds.
 
idk I'm iffy on it.
The art style (of the game) looks ugly in my opinion. Certain aspects of the gameplay seem a bit lame (items all use magic meters, you don't unlock items but you buy them in the store and recharge them...). I guess I'll see :s
 
It's basically A Link to the Past, but with meshes instead of sprites.
 
A Link to the Past is over 20 years old and it looks way better
 
4:33 AM
i really really really hate it when people spend ages making a game that uses someone else's IP.
 
@Rapptz Is that nostalgia talking?
 
@MattD Huh?
@EtiennedeMartel No, I'm being serious.
You don't think LttP looks good even today?
 
like the fan made pokemon games. guy spends years of his life making a game he doesnt own the IP too.. why not you know. be creative and make your own IP?
 
I think the 3D art styles looked better.
 
so much wasted effort!
 
4:34 AM
The art style of the new game looks like ass.
 
i should prob ask rightfold, but anyone know a good server library in haskell? (kinda like twisted in python)
 
I prefer Link with that bishonen look.
@Rapptz It's the same as before!
But with more details due to technical reasons.
I really don't see the difference in art styles between ALTTP and ALBW.
 
Really?
 
Yeah.
Same fucking thing, but in 3D.
In fact, I'm fairly sure ALBW started off as an HD remake of ALTTP.
They even have the same overworlds and shit.
 
I think the one on the right looks better.
 
4:38 AM
@Rapptz I'm fairly sure the SNES version did not look that crisp and sharp.
 
a link between...
worlds?
 
@EtiennedeMartel It did, I played it a while ago.
 
I'm also fairly sure the screenshots used on the left have a lower resolution.
 
The reason why this feature doesn't exist is because Jon Skeet does not want to get 598,882 notifications every day. — Mysticial 1 min ago
 
So it's not a fair comparison, now, is it?
 
4:39 AM
@Rapptz Yes. It looks more "vectory".
 
Here it is in full resolution
 
is that an official nintendo thing?
 
Yes
 
Yep, looking pretty good. Although that crappy anti-aliasing is bugging me a bit.
@MattD Coming out soon on the 3DS.
 
@Mysticial lol. dat number of notifications.
 
4:40 AM
I think LttP is a really pretty game so.
 
I never really liked it.
 
In comparison I think it's pretty damn ugly.
 
Never got around to play for more than the first or second dungeons, and then Ocarina of Time blew my mind.
So, later on, when I tried playing it "for real this time", I wasn't impressed. At all.
Felt like an old game to me.
I thought the controls were hard as shit, but perhaps it's because I was used to the Z-targetting.
 
Yeah never had that issue. I liked LttP quite a bit.
 
Anyway. Majora's Mask is the best Zelda.
 
4:43 AM
I can look back at LttP and say it looks pretty and plays well but I can't say the same for OoT.
Which looks pretty shitty now a days since it's on the N64.
 
Never played Skyward Sword or the Oracle games, though.
@Rapptz That's the issue with early 3D games. They did not age well.
Look at FFVII or Silent Hill. Looks like ass.
 
yep but SNES games are timeless :v
 
Not sure I agree.
 
some scertianly are :)
 
The few SNES games that still hold up for me are mostly "story driven".
Like EarthBound or Chrono Trigger.
 
4:45 AM
Hey man. Chrono Trigger, LttP, etc still look pretty damn nice.
 
In short, I couldn't care less what they look like.
But I have to agree it's pretty cool.
Still, modern games are better.
 
Reading the history of video games makes me sad
I did that again yesterday for some odd reason and it made me sad
 
Hm?
IIRC, the history of video games is a big pile of bullshit in which a few gems glitter.
 
you guys probably never lived through the snes era did yo
or the c64 type era before it
 
@MattD I was born in 1989. I grew up with the SNES.
 
4:47 AM
i was born in 77 ;) i grew up with a bunch of stuff
 
@EtiennedeMartel You had Pong, then the crash of 1977 from too many Pong games, then the golden era of gaming due to arcade games which caused the biggest boom of genres, to the crash of video games of 1983, to the NES, then SNES, then N64/PS1, etc etc.
 
we used to hire snes games from the video store
 
@Rapptz Yeah, the N64 was shit.
 
i never owned a n64
 
Best console ever was the PS2.
Never owned one though. I was still fighting for Nintendo during that console war.
 
4:48 AM
The N64 had a lot of good games.
Don't know why you thought it was shit
 
It was crappy hardware backed by insane corporate bullshit.
 
thing is, when the n64 came out. the ps1 was already well established
 
The only few good games it had were first party exclusives.
 
and the saturn was pretty much dead
 
Everything else were shitty arcade ports.
Only good third party game I can remember is Turok 2.
Yeah, Rare was more of a second party.
 
4:50 AM
poor rare
 
I liked Spyro.
 
Nintendo was the majority shareholder, IIRC.
 
But that was on the PS1.
I heard Spyro's gone to shit now too
 
@Rapptz They were good back when they were made by Insomniac.
(Who now make Resistance, isn't history hilarious?)
@MattD They always were a bunch of douchebags who dragged deadlines like hell.
 
krome made the last spyro iirc, it was rubbish
 
4:52 AM
Anyway the end of the "History of Video Games" is a bunch of literally "casualization"
 
When Nintendo got fed with that, they shipped them to Microsoft, who tried to whip them into line.
 
the original Rare disbanded a long time ago
 
And then that all fucked because Rare isn't used to things like "professionalism".
Now it's just a brand.
 
neither is microsoft ;)
 
Whoever is at Rare now is not those who made good games for the N64 :x
 
4:53 AM
Their games were always a bit overrated by virtue of being exclusives, anyway.
 
Hey, I liked my Rareware.
 
Sure, DKC 1 through 3 were masterpieces.
 
fun fact. When working on a port for microsoft, some bright spark decided to use the rare "engine". which was circa gamecube. it was pretty hideous
 
Banjoooooo
 
Their N64 titles were surprisingly good considering the shitty SDK they had to put up with.
 
4:54 AM
who has now died thanks to Nuts and Bolts.
 
@Rapptz Repetitive collect-a-thons.
Well crafted, though.
 
I'm not falling for that bait!
 
If you constantly think I'm baiting, perhaps you should try to step back and think for a bit.
 
err, most important part of that sentance was missing, I was doing the port, and ended up having to understand how that thing worked
 
@ScottW Star Fox Adventures
And the only thing that held Conker's Bad Fur Day together was the dialogues.
DKC64 was an overly padded collectionfest.
 
4:56 AM
I don't have much hope for gaming anymore anyway.
 
I have lots.
 
Nintendo already killed a couple of my favourite franchises.
 
oh man. there's lots of REALLY amazing games coming out
they're just coming out from the indie guys not the big boys
 
I seriously think the games we make today are better than the games we made before.
And not just on the indie front.
 
there's still some amazing games coming from the big boys too. but not as many as you'd think
 
4:56 AM
and Western games are shifting to the whole cinematic thing.
 
They're not.
 
cinematic is hideously expensive
 
A few of them were for a time, but not it costs too much.
 
I know it's expensive
 
the last of us would've cost an absolute SHITLOAD
worth it though. that game was great :)
 
4:57 AM
The real issue is railroading, not cinematics.
 
totally 100% agree
 
Yeah turns out I'm the only one who doesn't like TLOU or Bioshock: Infinite
I don't count /v/'s opinion because they hate everything
 
Yeah, it seems you like to dislike things.
 
im too old to give a shit about 4chan ;)
 
On the other end, I like pretty much everything.
 
4:58 AM
but TLOU was just amazing.
mostly for its writing, rather than its gameplay
 
@EtiennedeMartel I forgot the last video game I played that I actually enjoyed
 
There might be a more serious issue there.
I mean, hell, games are supposed to be enjoyable, even if it's just stupid fun.
 
Hey I'm thinking, there must be something.
 
If you don't enjoy any of them, perhaps it's because you don't really want to.
 
0
Q: When would you want to return a reference to a local object?

OleksiyIt's common sense that returning a reference to a local (temporary) object is a bad idea. In C++ it produces undefined behavior. However, there is one case (AFAIK) where it's a good idea. I couldn't find any example of such operation on SO, so I would like to answer this question. Until now I th...

 
5:00 AM
I bought TLOU and Bioshock Infinite because people told me it was going to be amazingly fun
 
Seems to me like you're going in most modern games with a bit of prejudice.
 
i'm currently playing thomas was alone. thats fun. i just finished uncharted on the vita, that was quite a lot of fun. and i like sc2
 
@Feeds Can I remove the ?
Don't think this needs it.
 
I'm waiting for Rayman Legends to go on sale.
 
@EtiennedeMartel Nah, I actually want to like it but I end up not liking them.
 
5:01 AM
My friends recently got a game on steam called assault android cactus, that is pretty damn fun too
 
@Rapptz You should try to analyze the games you dislike. Find out what you don't like about them.
Put some words on those feelings.
 
I do, just not here.
 
@Rapptz The question doesn't yet have the popularity (upvotes and views), so having on it is premature.
 
Seems like you're also scared of being judged.
 
there should be a c++ license test. and to pass it, you must own both meyers books.
 
5:03 AM
@EtiennedeMartel Not really no.
@MarkGarcia Well I removed it.
 
I would like to open a File pointer to a file on another computer, but I'm sure it's not that easy in C++. What term should I be Googling?
Do I have to have a socket listener on the other machine?
 
@Seanny123 You're going to need help from the OS.
So, no standard way.
 
Yeah, I've got to cook up some server side code.
 
You could always make your own solution, or just use some network file system.
Are you on Windows?
 
5:18 AM
Linux
 
You mentioned Network File Systems, which I had never considered before. Would that make sharing (so no weird race conditions) this text file (that I want to written to from a remote source {client} and read from locally {server}) easier?
Okay, quick Google tells me no.
Yeah, I think I'm just going to write the server code in Ruby (because I know it better) and then let the C++ talk to the Ruby code via sockets.
Let me know if there's a better way to go about this.
Or if it's a really bad idea performance wise to use Ruby. I don't think it is, because I think the waits caused by I/O and network communication will the limiting factor here.
 
5:36 AM
@Seanny123 no, you cant do that (file pointer to another machine). you will need to write an application layer thing to do it, or use samba/ntfs/etc
@Seanny123 its also unlikely that you want to do that. and your problem can be solved in a simpler, much easier way
@Seanny123 so what problem are you trying to solve?
 
5:57 AM
@Karimkhan ok 1 & 2: you'll need to store counts of things separately. use a hash bucket or something. 3: no.
@Karimkhan also, looks a lot like homework, and we dont do homework ;)
this kind of thing is pretty trivial
you may want to look for a data structure called a trime, i think thats how its spelt
trie
In computer science, a trie, also called digital tree or sometimes radix tree or prefix tree (because we can search by prefixes), is an ordered tree data structure that is used to store a dynamic set or associative array where the keys are usually strings. Unlike a binary search tree, no node in the tree stores the key associated with that node; instead, its position in the tree defines the key with which it is associated. All the descendants of a node have a common prefix of the string associated with that node, and the root is associated with the empty string. Values are normally not ...
 
tata
 
nvm
 
0
A: How do I idiomatically convert a BOOL to a bool?

avoI use a macro: #define _bool(b) (!!(b)) IMO, makes my code more readable.

oh god
 
6:12 AM
Why not bool x = TRUE ?_?
Oh a warning, I see.
 
-1
Q: how to make money with stackoverflow.. is it possible?

Anasooya Kpi want to make money with stackoverflow... my friend told me that if we get higher reputation we would get much more money. is it true? is it possible to make money with stack overflow? please give me an advice /***code for dummy***// $('#all').click(function() { if($(this).is(':checked...

 
welp, guess who is reviewing the Allocators paper for the next Standard meeting.
 
rofl
 
lol at the cruddy benchmark
 
@MattD I am literally only trying to write to a text file that is located on a server with a C++ program.
 
6:22 AM
1. open socket/other to C++ program on server 2. send binary data across the internet 3. open file on server 4. serialise file to server
or
1. use samba/ntfs/etc to connect to file system of server. 2. open file on server over samba/ntfs 3. serialise data
 
Yeah, Samba seems like an unecessarily complicated second step, so I went with the first option. Just finished writing my Ruby server socket reader and now I'm trying to find a simple C++ TCP socket writer.
I think I need to lower my standards for "simple".
 
It's my sensitive time of the month again.
Almost in tears twice today already
my sensitive time of the month = 5th or 6th day after my period has first started
maybe I should avoid to be in the public at such times
could be embarrassing if I started crying in front of a bunch of strangers
 
@MattD
I was kind of hoping for a 4 line solution for connecting and writing to a socket like I have in Ruby, but that's just silly right?
Talked to my co-worker and he says I should use boost:asio to make my life easier.
 
6:42 AM
@Seanny123 Only if you have time figuring it out the scarce docs. You mostly learn through experience with Boost.Asio.
 
@Seanny123 boost::asio is awesome , but what you are talking about is pretty straight forward
@MarkGarcia its easy to jump in if all you want is good old blocking tcp
 
@A.H. I agree that the blocking operations are pretty easy to use, but you'll surely want to use async.
 
-16
Q: bullshit bullshit bullshit java programs

Anasooya Kpwhy java programs are bullshit... for example System.out.println(); why we use this for just printing.. i feel it is not good.. in c++ we can write it simply cout<< the why java use this long word for jus printing? another example: why we use class in java programs .. it is needless to u...

> put on hold as primarily opinion-based by Yuushi, AurA, Gregory Pakosz, devnull, Pshemo 51 secs ago
 
@Mysticial lol
They're afraid of the truth!
 
@Mysticial lol
 
6:46 AM
dammit, deleted already
-22
> viewed 42 times
 
well he did have a point, Java does suck
 
Damn. The page is way much cooler than the original doc: washingtonpost.com/wp-srv/special/national/black-budget
 
@Mysticial is your job at youtube to re-write it in order to prevent it working properly on windows phone?
or would that be the job of your colleagues
 

« first day (1049 days earlier)      last day (3905 days later) »