« first day (703 days earlier)      last day (4246 days later) » 

12:02 AM
Hello all
What do you guys think of this?
0
A: Relation between Overloading and Object Orientation

Mohamed Ahmed NabilFunction overloading is related to one of the deepest ideas in object orientation: the idea that a data type dictates how a function or operator behaves. A related idea is that of operator overloading. An operator (such as + or -) can be applied to different data types, and the operator will do ...

no one replied. okay :(
 
I would say they are separate concepts.
Overloading is simply, as you say, data type dictating function.
 
@JonathanSeng No they arent seperate concepts actually. They can be considered so, but overloading has everything to do with OO
 
Object oriented programming is the organization of data and functions to represent partial or complete concepts.
 
@JonathanSeng In languages that dont support OO you cant overload functions
 
@MohamedAhmedNabil There you go. They are separate.
 
12:08 AM
@JonathanSeng How the hell are they seperate?
 
Sorry, misread your statement.
@MohamedAhmedNabil I'm not sure this statement is even true.
 
@JonathanSeng Function overloading is related to one of the deepest ideas in object orientation: the idea that a data type dictates how a function or operator behaves.
Its realated to an idea not the actuall thing
 
Well, you have successfully repeated your posting back to me.
 
@JonathanSeng You dont have to act like that, we a simply discussing something
 
12:12 AM
@MohamedAhmedNabil I am not acting like anything. You didn't add over what you posted.
But, we can let the community decide.
 
@JonathanSeng I was doing no more than quoting and explaining my opinion
 
@MohamedAhmedNabil I suspect the question will get close, anyway.
 
@JonathanSeng I got my answer straight from a book. Thats why im trying to look at it from every possible angle before i either accept that its true or acknowledge that it is false. So if you arent sure, please dont answer :)
 
@MohamedAhmedNabil I said I wasn't sure an assertion you made was correct. I am quite sure that they are separate concepts. If you are quoting a book as a self-answered question, I have to question why you posted this.
 
@JonathanSeng Depending on if the question will get negative votes or not, that will determine if the answer is correct or not
 
12:17 AM
Regardless, there is no need to get upset.
 
@JonathanSeng Im not :)
 
@MohamedAhmedNabil It sure sounded like it.
 
@JonathanSeng I may be agreeing with you but at the same time trying to prove you wrong just to make myself more convinced that your answer is correct
 
@MohamedAhmedNabil Ok, I'm just too tired to get past parsing that statement, never mind fully grasping it :-)
0
Q: Using stringstream to tokenize a string with different delimeters

cadavid4jHow can you use stringstream to tokenize a line that looks like this. [label] opcode [arg1] [,arg2] The label may not always be there but if it isn't, there will be a white space. The opcode is always there and there is a space or tab in between opcode and arg1. Then there is no whitespace in b...

The question grows deeper and broader.
@MohamedAhmedNabil FYI, I didn't downvote you either. I chose to provide my explanation for the community, instead.
 
@JonathanSeng Even if you did, no biggie
 
12:30 AM
@MohamedAhmedNabil Why am I hearing shakespeare about biting thumbs replaced with downvoting.
 
@JonathanSeng At my current state of mind, im in no way able to understand what you mean
 
search for the word thumb.
/me decided to edit that before it got starred 20 times.
 
@JonathanSeng :D oooh
 
 
2 hours later…
2:05 AM
2 hours since the last post?
 
3:00 AM
Yeah. Both chat and the main site are very slow at this time of the day.
 
3:38 AM
/me yawns back in.
 
@Mysticial Even on Fridays and Saturdays.
 
@Rapptz It's pretty random though. There are some Friday nights where it's very busy, and others where it's just dead.
I'm usually online playing TF2 on Friday nights. So you don't see me, but I'm still lurking on my side-monitors.
 
I haven't played TF2 in a while.
That Mann vs Machine update fucked up a lot of things so I stopped
 
That update was kinda weird.
 
I never played it. I just heard it was really annoying to set up and caused a lot of bugs.
 
3:42 AM
@Rapptz I dunno about bugs. It's been very bug free for me.
I played a bit of Mann vs Machine - but it's gets boring very fast with only 6 players.
If they allowed 32... then it's be a lot more interesting.
16 vs 16 on a small map with instant respawn is my favorite. Though those servers are hard to find.
 
I would play more but I'm really rusty.
 
I'm pretty rusty too. (I'm a lot better at L4D) There's only 4 classes that I can play. Only 3 I can play well.
 
I used to play engie, demo, spy, and sniper. I tried playing scout but was never too good at it.
Pyro is a bit too easy to play though, imo.
 
For me, I can do soldier, heavy, and engie. I can do demo, but I'm pretty rusty with it.
And I don't have the right items to do melee demo.
 
I always fail with melee demo lol
 
3:48 AM
I have both the shields for melee demo, but I don't have the special shoes.
 
@Mysticial these?
 
@Rapptz Yeah. There's another one that does the same thing. Either one will complete my demo melee set.
And I haven't been playing TF2 long enough to have enough dupe items to craft those.
I probably have enough right now, but it'd be a waste if I item dropped one later.
 
I tend to use this melee weapon. I'm not sure if it's why I'm bad at it, but I like it.
 
Woah, your account is tied to it. I thought it was just a reference site. I didn't know you could query your individual items.
 
Yeah I'm browsing my backpack.
 
3:53 AM
How does it work?
I kinda wanna see my own items (outside of TF2).
 
www.tf2items.com you can either type your ID or register to claim your backpack.
 
id is just your steam username?
 
yeah
 
> Error: Player not found. Make sure you are entering a SteamID, profile ID, Steam Community URL, or player name.
um...
 
o.o
What's your steam ID?
 
3:55 AM
same as here
and same avatar
 
lol just like me. Originally pretty low.
Well I found you on the Community
 
link?
I really haven't been into the steam community stuff.
I just play the games.
 
I meant to search to add as friend to see if it exists
 
I didn't know the backpack was public. lol
 
It's so it's easy to trade with others. When you go to trade servers you give them your ID and they search to see if they find anything interesting. You can claim it so no one can steal it.
 
3:59 AM
I moved all my dupes to the last page. So it looks like I don't have anything...
Clearly, I haven't gotten involved with any of that yet. lol
 
So many crates.
 
What's that "claim your backpack" thing?
Do I login with my steam username/password?
 
I forgot cause I did it a long time ago but I think so
 
didn't work
I guess they have a different account network
 
yeah just logged on.
Makes sense. Wouldn't make much sense to use your steam ID to log on, I guess.
Under account settings you can concentrate all pages into 1.
 
4:03 AM
and steam is lagging...
 
TIL I can give Nicknames to my friends.
 
claimed my backpack
 
I wonder why your profile looks weird. Yours uses Community ID but mine uses Steam ID.
 
I was wondering why I'd get random trade requests when I play. I didn't know the backpack was public. lol
I figure they were after my spare Huo-Long.
 
Some people just trade for getting rid of shit they don't want.
 
4:08 AM
That would be all my crates. :)
 
Now I feel like playing TF2 lol
 
lol
 
This nickname feature is so nice. One of my friends constantly changes his name/avatar that it's hard to keep track of.
 
Your pomson is not usable in crafting?
 
Oh. Because I bought it for $10.
 
4:13 AM
woah
You're obviously a lot more hardcore than me...
 
It's the only item I've bought because I didn't want to craft it and it never drops.
 
@Rapptz I got mine from a drop.
 
Yeah I meant for me :(
 
Hi.
 
4:15 AM
When passing arrays to functions, would you recommend i pass by refrence or by pointers?
 
Didn't we say not to pass by pointers unless you absolutely have to?
And not to use C arrays, but use std::vector?
I've only seen arrays passed by pointer or value though.
 
@Rapptz exactly, I was thinking of a way to pass by refrence
I didnt forget :)
 
@Mysticial I didn't know spending $10 made me hardcore :(
 
@Rapptz Didnt learn it yet
 
@Rapptz No, I meant that I got the Pomson in a drop. So it's definitely possible to get it in a drop.
 
4:17 AM
@MohamedAhmedNabil: it's not hard, just look at the docs
 
@Rapptz I've spent zero. :)
 
You replied to the wrong person.
 
Well... I got the game for $10. And that's just about it.
 
@netcoder Will do, btw what do you mean by docs xD. i just look at cpprefrence
 
lol
 
4:18 AM
@MohamedAhmedNabil: that'll do I guess
 
@Mysticial Yeah I was about to say, because you need to pay for premium account.
and you clearly have more than 50 backpack slots lol
 
@Rapptz Oh... you don't have a premium account?
 
I do.
 
At first I thought I didn't have a premium account because I never got any decorative item drops.
But I have that verified purchase hat...
 
I usually play CTF.
 
4:23 AM
CTF?
 
I cant seem to be able to understand what an iterator is. Im probably going to much forward at once. But its just curoisty. If anyone can simply say what an iterator does
 
Capture the Flag
It iterates :)
 
@Rapptz just iterates means repeates. There must be more
 
An iterator accesses the object you're iterating to.
When you want to know the object's element you use a deferencing operator, like *it. When you want to increment the operator you use ++it, etc.
When you modify the object you're iterating to, the iterator has to be reset.
 
yea, i kinda got it but its still not clear, still a long way for me
 
4:30 AM
@MohamedAhmedNabil here is an example in C++03 liveworkspace.org/code/a43db83ffdeb2b62635cbb4098a2609f
 
@Rapptz it took me enough time to understand by myself why there isnt ***p but there is **p... Im not that adavnced
 
good evening everyone :)
 
**p?
 
@Rapptz pointer to a pointer
 
I see.
 
4:32 AM
@Rapptz you didnt use that before :O ?
 
I don't use raw pointers.
@MohamedAhmedNabil In C++11, iterating is much easier. liveworkspace.org/code/d6ad3611f695a2fe15de016cda2ffd80
 
@Rapptz people keep talking about C++11 although no one uses it yet
 
What? A lot of people use it.
 
@Rapptz how do they use it if no "good" compiler has it fully implemented
 
GCC and Clang are good compilers. They support a good chunk of the language. It's easier to list the things they don't support.
 
4:36 AM
@Rapptz do they have IDE's?
 
No? An IDE isn't a compiler. Code::Blocks does support GCC as a compiler though.
 
@Rapptz isnt this C++0x?
 
C++0x is C++11. It was called C++0x because it was supposed to finish in 200x but it ended up finishing in 2011.
 
@Rapptz No way :O, my life is a lie
why does VC++ 2010 support C++11 then :O
 
It supports TR1, not C++11.
 
4:40 AM
@Rapptz can i get the GCC or Clang compiler with VC++?
 
no
 
How can i use C++11 either than getting Code::blocks
 
Code::Blocks is easy to use, lol.
 
@Rapptz i dont like it
 
I fixed the syntax highlighting and it isn't so bad.
 
4:42 AM
Any other IDE?
 
@MohamedAhmedNabil check out Geany? its multi-purpose
 
@Rapptz last time i saw code;;blocks it looked like an old windows 98 program
@ITNinja ill check it out
 
You could even use Sublime Text with GCC configured to run on it.
If you want I can give you my build file so you can configure it
 
@Rapptz Ill see my opions and come back. For now C++03 :/
 
4:49 AM
I can tell you how to install GCC pretty easily if you want. I know I had a hard time with it at first.
 
@Rapptz ill just be learning the basics now untill microsoft comes with a new VC++ version
 
lol.
There's VS2012, fyi. Though it doesn't support that much.
 
speaking of new things, i cant wait until python3 is supported more <3
 
@ITNinja I wish they would support parselmouth. Im amazing at it. Its kinda like python3
 
Googled it and got nothing.
 
4:55 AM
@MohamedAhmedNabil :) yeah, im just looking for something new to play around in :P
 
@ITNinja learn parselmouth, its amazing.
 
What's parselmouth
All I get is harry potter hits.
 
LOL
xD
 
I searched once out of interest, not a very good troll to be honest.
 
4:58 AM
@Rapptz when its only 2 people, maybe. But when an entire chat room falls for it. Its different
I did that on the python chat room. They all fell for it XD
 
It wouldn't be any different because that isn't a troll.
It's a prank, a very loose prank if anything, and a prank isn't a troll.
 
@Rapptz i cant find another meme to put in this situation
 
5:16 AM
void print(char x);
void print(int x);
i have this
so when i call print

print(49);
why does it go to int not char
although they both can take in numbers
 
because it's better suited as an int
 
@Rapptz Is that a formal thing ? "better suited" :)
 
I learned if it's ambiguous then it picks whichever is better suited.
 
ok thanks :)
 
I really don't know though now that I think about it. I could be wrong, but it's stupid to make ambiguous overloaded functions like that anyway.
 
5:27 AM
I was testing it out
 
5:49 AM
0
Q: Using heap to set value in stack

user1679299I was wondering if, Foo bar = *(new Foo()); is okay to do, or am I wasting memory because I cannot delete the the data from the heap after assigning the value to bar.

close votes
 
6:47 AM
@Rapptz It's not stupid, and it's not ambiguous. 49 is just an int literal. '1' would be the char literal for value 49 (in ASCII) and '\0x31' or char(49) say the same.
@MohamedAhmedNabil see liveworkspace.org/code/8ef8cb13945380d6c949afe5753f9ea7 for a demonstration. Note how std::ostream default operator<< overloads have the same overloads (showing a char as ... a char, not it's integral value)
 
sbi
7:04 AM
> Neighbors having really loud sex to "if you like it then you better put a ring on it" #OddChoiceOfMusicTerra Naomi
 
Right now I'm reinstalling Eclipse because its auto-update corrupted itself, and rebooting XCode because it requires such after every 2-3 builds.
0 for 2. Can we programmers really do no better?
 
Use a better IDE.
 
Really? Which?
 
I assume you're using Mac OS X?
 
7:14 AM
I need one IDE which will deploy iPhone apps, and one IDE which will build Tomcat websites, and one for Android apps.
 
Can't help on the former, as I know zero to nothing about Objective-C
 
Yep, OS X.
Hint: Apple doesn't allow you to build iPhone apps without XCode.
 
I know. Which is stupid anyway.
Can't you use NetBeans for Java?
 
For the sake of argument, let's ignore that. It's so unstable that I do the actual development in Eclipse, eventually I'll write a build script to get rid of the XCode GUI.
 
Netbeans is unstable? It works as wonders for me.
 
7:17 AM
He's using Eclipse.
 
Hmm, it supports Android too. Actually my company is very married to Eclipse so there's no switching period :P but I'll check it out.
Does NetBeans do C++ too? I suppose yes if it's well received here.
 
@Potatoswatter Yes it does. Though I never really tried to use it for anything serious.
 
Yeah but most don't use NetBeans for C++.
I use VS2012 for Window Apps.. and Code::Blocks for other stuff, then Sublime Text for basic programs.
 
My first "real" programming language that I learned beyond the basics of was Java. So Netbeans was the first IDE that I ever used.
Then I started teaching myself C and I used Netbeans for it.
That lasted about a summer before I "discovered" Visual Studio.
And that was that. I never turned back.
 
GNU debugger is so bad
 
7:21 AM
There was also a small moment in time where I used DevC++. (the old one)
 
Is there a way to just use Visual Studio's debugger?
 
@Rapptz AFAIK, ICC generates compatible debug info with Visual Studio's debugger.
But I dunno about MinGW/GCC.
 
I don't even know how to use GDB. :|
 
Neither do I. I've used it maybe once or twice. Too hard...
 
Data Display Debugger, or DDD, is a popular free software (under the GNU GPL) graphical user interface (using the Motif toolkit) for command-line debuggers such as GDB, DBX, JDB, [http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=29080f1bace021100f1bace02110275d6e10RCRD HP Wildebeest Debugger] (WDB), XDB, the Perl debugger, the Bash [http://bashdb.sf.net debugger], the Python [http://bashdb.sf.net/pydb debugger], and the GNU Make [http://bashdb.sf.net/remake debugger]. DDD is an entry in the GNU Project. DDD has GUI front-end features such as viewi...
lol
 
7:32 AM
cgdb helps to make GDB less painful.
 
yawn
 
good morning all
 
mawning
 
I have a terrible nightmare
9am Oracle guy calls, but the builders might also want my attention
 
builders?
 
7:43 AM
house is undergoing structural work
 
sbi
@R.MartinhoFernandes You like rain? Odd disease. But if that's really true, then I definitely hope you'll get that job in Berlin. Start working this year, and by March (latest) you'll be cured of it.
 
@DeadMG 'structural' work?
 
-5
Q: find if two vectors a[n] b[m] have values in common

blertaI have an exam now and please i need to solve this issue. There are two vectors a[n] b[m] and i need to display 1 if they don't have values in common and 0 if they do. Let's say the vectors are like this: a=[1,2,3...n] b=[1.2.3...m] I need a proper c language! i am helping this friend and ha...

^^ Love the comment trail on this...
 
7:45 AM
@sbi I like rain and I live in England
 
sbi
@DeadMG From the POV of comfort, I'd much rather have -10°C and snow, than the wet +5°C, which winter in Berlin usually sports.
 
@Mysticial Is he cheating?
 
@Rapptz beats me...
 
@Rapptz probably not him, but a girl
 
tecnically yes, or she will fail! — blerta 12 mins ago
 
7:46 AM
@sbi we tend to get the just below freezing and rain... which means plenty of car curling
 
I don't think you can type during an exam, much less be responsive to comments
cheaterzoned
 
same in Ireland from what I can see
 
If you want rain, you move to Seattle.
 
So he's helping someone cheat lol
Midwest gets rain and snow. 2 for 1.
 
7:47 AM
wait... I have a sneaky feeling that other countries have stolen the idea of rain :O
 
England has plenty of rain.
 
@Rapptz At least it doesn't rain (much) in the summers in the Midwest.
It rains almost all year round in Seattle.
 
sbi
@thecoshman Yeah, that's bad, too. We had something like that (snow melting, then -10°) the winter before last, for two weeks. Lots of vehicles and bone wrecked.
 
I don't mind rain or snow. I actually like it.
 
Snow I like. Rain I don't.
 
7:49 AM
@TonyTheLion but not to the point that it's anything special, we just tend to have it spread out through out the yeah, thus robbing it of any prolonged summer season
 
But I don't like when it gets down to -10F before windchill...
 
sbi
@Mysticial Welcome to the Seattle Rain Festival. Jan, 1st—Dec, 31st.
 
@sbi but in Germany, you are some what less surprised by the idea of ice, are you not?
 
@Mysticial Haha Illinois is getting more severe winters lately
 
sbi
7:50 AM
@thecoshman A few days are rather common, but two weeks of ice is a bit much for Berlin.
 
And I also don't like it when it gets up to 90F in the summers... not counting humidity.
 
@Mysticial The cold is part of the reason why I like winter. The warmth feels so much better when you're cold.
 
@Mysticial San Francisco get's some rain, no?
 
@sbi ah, seems the be much the same as UK/Ireland
 
@TonyTheLion Yes. Heavy in the winter. Mild in the fall and spring. Almost never in the summer.
 
7:51 AM
right.
 
sbi
@Mysticial When we were hiking in Redwood country in February, the natives told us: "This is the time when winter rain stops — and spring rain starts."
 
@sbi It's a little wetter towards north of California.
 
they differentiate between winter rain and spring rain, lol
 
sbi
@thecoshman I think on average it's noticeable colder here. Nobody would even consider having their water pipes outside the house without insulation. In fact, nobody would consider having their water pipes outside the house.
 
@sbi very apt for most of Europe I would think :P
 
7:54 AM
rain = rain. It's as wet in Winter as it is in Spring, or even Summer
 
In the midwest, I heard that you need to circulate your pipes in the winter, or they'll freeze and rupture.
 
@sbi well, we have the underground pipes of course, I don't think anyone has thought it a good idea to have over head water pipes. And most people have an outside tap, prime candidate for freezing
Though last year, the pipe from the well (GF parents house out in country a bit) that is few feet deep froze
 
sbi
@Mysticial Yeah, and the redwoods are always on the western mountain slopes, where all the humidity blowing in from the Pacific rains down. For a specific trip we hiked (and camped) two days out in the woods, and it constantly rained. We met one guy, and he turned out to be German, from the city my girlfriend came from. They knew the same people.
 
@sbi I don't think anybody here would do that either
 
Having to go out side to get water from a tap you have thaw out each time you wish to use it is not fun come winter
 
7:56 AM
@sbi That must have been an unexpected coincidence?
 
@DeadMG I'm sure some nut jobs thought it was a good idea
 
well sure, but they'd do anything and don't count
 
@DeadMG I wonder if the spell...?
 
sbi
@DeadMG Actually, that's one of the things I was so surprised to see when I was in England (in the mid-90s). Everybody ran their water pipes up on the outside of the house. You wouldn't do this in Germany, because they'd burst at least once every winter. /cc @thecosh
@Mysticial very unexpected, indeed.
 
@sbi Are you sure that's not just guttering?
 
7:58 AM
@sbi really? where was this?
 
England has had plenty of it's share of harsh winters in developed times
I've never, ever seen any house with external water pipes
 
yeah, our winters now days are actually rather good compared to say 50 or 100 years ago, where the Themes would freeze over
 
sbi
Um. We had been to the lake district, Scarborough, and the south east back then.
 
I know one thing about England, it's full of English people. :P
 
@sbi I want it noted that this is a bit of an exaggeration. When I was in the Air Force, I was stationed in Washington state. I saw Seattle have sunny days almost a dozen times in only 4 years!
 
7:59 AM
no, REALLY?
 
@TonyTheLion And non-English people :P
 
lol
@DeadMG yes really :P
 

« first day (703 days earlier)      last day (4246 days later) »