| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
<lordpil> the hell <lordpil> we have a JeffK now? <cons_> how would i convert <JeffK> ye, you got a JeffK now <JeffK> waht does it mean to yuo? <cons_> a struct called sockaddr_in to const sockaddr? <noam_> cons_: la illaha illa la <many> sa ftw <noam_> etc <Cowmoo> kthx <cons_> la illaha illa la? <cons_> wtf <Cowmoo> is it amateur hour or something <JeffK> i do proffesional c++ stuff, currently im working out how to do a for...next llop in cplusplus <JeffK> really hard sutff <JeffK> stuff i mean, sorry im drunk <cons_> lol <JeffK> for(int yuck=0;yuck<>100;yuck+=1) ****it waths wrongo? <cons_> yuck ++? <JeffK> dont you name your vars this way? <ZorbaTHut> jeff, what's <>? <JeffK> oh, got it, != <xdank--> != lol <ZorbaTHut> there ya go. :) <JeffK> hmm (searching for excuse) <ZorbaTHut> there is no excuse <ZorbaTHut> only Zuul <JeffK> oh, eh, its the beer, all is the beers fault <facehuggr> And the smell of newbs in the morning <JeffK> hmm, how do newboos smell? <JeffK> like i do? then they stink like my running shoes <vamecum> I've got a on exit, crash bug, something gets deleted that causes things to breake. anyone got hints on what I should be looking for? <binrapt> Which cl***es should offer a virtual destructor? All the ones that have virtual/pure virtual methods? <JeffK> vamecon should look for a debugger <JeffK> hmm, binrapt wat does virtual mean in context of native c++? <many> gdb is ur friend <JeffK> like overridable in .net? <binrapt> Uhm something like that I suppose <JeffK> virtual sounds so confusing to me <JeffK> hmm, i guess yuo should have a virtual desctrucotr if you inherit a cl*** and add some custom child objects to that inherited cl*** that need to be ***kicked when the object is killed <vamecum> JeffK:It proves a bit hard to debug. heisenbug-like <JeffK> vamecum tell a butt more about your program <JeffK> yuo guess its an object not properly freed or something in your messageloop, or ... what? <upb> if you run it under linux, try valgrind <upb> its ****ty but manybe it detects you problem <vamecum> JeffK:well I blame a cl*** called BKMesh , it's basicly std::vector of things like Vector3d to store mesh data. <JeffK> if os=windumb then i would use mickysofts visualstudio <vamecum> JeffK:does the std::vector and likes clean themself up in their respective destructors? <JeffK> vamecum, sorry thats outta my scope <JeffK> i never used the std namespace objects <binrapt> Yes, they clean everything up. <many> vamecum yah they do <binrapt> Except your mistakes <JeffK> coz boss always sez, ***hole, tomorrow is deadline for project xy,i am forced to use .net to get a working program as quick as possible <vamecum> binrapt:clever. <JeffK> boss sez native c++ is evil, and if i say 'no', he sez: youre fired <JeffK> anmd then he starts yelling i shall make a doom3 clone with c# that runs 10x fast as in native code <binrapt> Likely <james-_> virtual means choose the function to call based on the dynamic type of the object it's being called for. std::vector's destructor does the right thing, i.e., releases resources owned by the vector. Beer is good, wine is fantastic. <[eloi]> james-_: beer is fantastic if you find the right beer :) <james-_> eloi: fair point. I'm busy testing Belgian beers this year, mostly. <JeffK> all the day? <JeffK> ever tested german beer? <james-_> Certainly. <james-_> Had a bad German one recently. St Pauli Girl or something. <JeffK> i guess german beer is the bbest <JeffK> hehehe st pauli girl, funny <james-_> Normally the Germans do a decent job. I'm biased to think British beer is better. <JeffK> ***** beer from hamburg <JeffK> the british ones are more bitter i think <JeffK> i currently drink the worst beer ever <JeffK> 3.5 euro per gallon <james-_> sounds nasty. <JeffK> rite, it is <JeffK> but i helps me fallin asleep after a a hard day of doing for(;;) loops <JeffK> boss sez, why isnt yuor for(;;){printf("ble");} loop ever end, and where is the counter variable, i say, its hidden in some code, that, eh, oh, the fone rings, i needto answaer this call...(i have no ****in clue why the lop never ends) <[eloi]> james-_: fridge is loaded with belgian atm :0 <[eloi]> er, :) <james-_> The fridge is in good health. <khaladan> how do you guys usually name your accessor methods? <james-_> khladan: sparingly. Member functions should normally tell objects to do things... "tell, don't ask". <james-_> khladan: but I avoid silly prefixes like "get". <oxix> same here <binrapt> German beer is ok <JeffK> istn get_Ble() common for accessors? <JeffK> or getBle() <JeffK> or waht? <oxix> i prefer just ble() <james-_> ble(). <upb> i heard g_E_t_B_l_e() is <binrapt> Czech beer! <james-_> getFoo() often indicates that someone is thinking in terms of blobs of data, not objects. <khaladan> so you call the data something other than blee? <JeffK> hmm, sounds commmon to the discussion of nameing private member variables <JeffK> m_Ble, _ble ... <james-_> Czech beer is good. Budweiser and Pilsner Urquell are faves. <oxix> I like ble_ <JeffK> hmm, budweiser is good <james-_> m_ble or ble_ are reasonable, IMO. _ble is less so. Too close to being invalid C++. <oxix> not big on the m_ble and really don't like _ble <james-_> Not the US stuff :) <khaladan> i need added behavior for getting and setting, so, that's why i have accessors <oxix> i like ble_ since I read from left to right and the pollution is at the end <binrapt> Budweiser Budvar <JeffK> i recently read some microsoft paper where they said m_Ble would be obsolete, we shall use _ble, hmm, maybe its a brainwash action thing, im confused <james-_> khaladan: are you really "setting" then? Are you not telling the object to do something? In which case, wouldn't a function name that says what you're telling it to do be better? <binrapt> Czechvar <JeffK> if i start using _ble, im going to buy ms-booze, ms-diapers and billy-gl***es n stuff <upb> the best is to make a structure named members in each cl*** and put the member variables inside it <oxix> could do: ble_m <oxix> that's new <oxix> and it's stylish <james-_> Czechvar, branded to look like Budvar. <khaladan> james, so, should i call my function something like "set foo and then notify all subscribers that foo changed"? setFooAndNotify? <oxix> and it supports my left-to-right pollution at the end preference <khaladan> i'd really rather not <james-_> khaladan: updateFoo might be better than setFoo there. <oxix> ble_m; ble2_m; foo_m; <JeffK> but the best is i got a coworker that mixes german and english language to build the names of member variables <oxix> int size() {return size_m; } <oxix> err int size() const <JeffK> oh, sorry, ex coworker, i told boss to fire him <oxix> actually I think I can warm up to that <oxix> _m suffix <oxix> I find it more attractive than m_ <oxix> unsigned size() const {return m_size; } vs unsigned size() const {return size_m; } <JeffK> uhm, correction, i told boss to fire my second coworker coz he's too slow, goes to the doctor ever tuesday 3pm and does make these annoying yawn noises allday, wich i dont like <khaladan> and i prefer getters since something might be a calcuated value <ZorbaTHut> jeffk, your namesake is funnier than you. <JeffK> and last but not least: he drinks his orange juice VERY LOUD <oxix> I think if I glance at one of these for 10 milliseconds, I would more likely recognize the 'size' part in size_m over m_size <JeffK> ZorbaTHut, im not the JeffK you think, im Jeff Klotzki from germany <oxix> and that's the important part, I think.. for the logical meaning <binrapt> ZorbaTHut, ditto <binrapt> i meen dito lol!!1 <JeffK> yoyo, i got it, IM NOT FUNNY <JeffK> but that not my intention <oxix_m> m_size.. you gotta read past the m_ first to even get to the size part <JeffK> i just wanto release some pressure <oxix_m> and if you see a whole row of variables declared with m_ - that m_ part just pops out a whole lot <JeffK> maybe yuo know similar ****: i did approx. 60 hours per week the last 8 weeks to get our stuff ready for the 'systems 05', my ****n coworker did exactly 40 hours a week, despite of knowing his project had to be finished last monday, now i have to fix his **** until friday so boss can show it on the mess, coz my collegue is too dumb <JeffK> im so ****n pissed about that <oxix_m> you just want to keep looking at it like a naked lady and then you forget what the variables are even supposed to stand for since you are just thinking m_ m_ m_ <james-_> So get off IRC, get it done, and then take a break. <JeffK> nex week he can drink his damn orangejuice at home again <oxix_m> like with oxix_m.. the oxix is the part that pops out - the _m is just an afterthought <binrapt> Hmm I do not really see the point of all those member prefix/suffix stuff <binrapt> s/those/that/ <james-_> binrapt: I don't always use them, but storing to a member variable is a bigger deal than writing to a local -- it persists after the function ends, obviously. It can just make things easier to read.
Return to c++ or Go to some related
logs:
undernet ipv6"
"licota" +bilde show derss xorg faster rendering chatzone
|
|