@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15



Comments:

<0> i need examples for cl***es, structures and overloading operators
<1> well ... it's hard to explain unless i talk about the concrete problem i am solving
<2> ImHungry
<2> do
<1> ok, there is this piece of hardware called an Olfactometer
<2> addChild( TypeA ) addChild( typeB)
<2> ?
<1> it contains within it various pieces of hardware that can be configured together in various ways, each piece of hardware contains subdevices, etc.. so components contain components
<3> n0xious your textbook doesn't have any?
<2> ImHungry
<2> why not do it with the way I told you?
<1> the configuration of this hardware is pretty dynamic.. it can vary greatly.. so it is useful for a device to keep a count of how many children of a certain stype (a specific subdevice type) it has..
<2> stop giving the concrete example
<1> Quantum``, well i know how to do this in an awkward fashion.. was just wondering if there is some elegant design pattern i am unaware of..
<2> well you dont have to compare types then
<2> its dont by the type system



<2> its pretty elegant
<1> i am not sure i understand what you are suggestin Quantum``
<2> addChild( SubTypeA& a ) addChild( SubTypeB& b)
<2> these are overloaded functions
<2> the C++ typesystem will choose which one
<2> you understand?
<1> yes, but what you say will not work. at the time when addChild is called (in base cl*** c'tor), *everything* is just a Component and does not yet have a more concrete subcl*** type
<2> right I see what you mean
<1> s/subcl***/derived cl***/
<3> ImHungry if you don't know what the **** your constructing, how do you construct it?
<1> i could just always call addChild() in every calss c'tor but that's awkward
<2> I agree with vawjr
<2> :)
<3> and WHY is it awkward to call addChild() in every cl***?
<1> i guess it isn't..
<1> fair enough
<3> gotta head to the work
<4> Off to office
<2> liekwise
<2> ciao
<1> vawjr, why must you always be polemic/abusive towards me?
<1> anyhow.. later
<5> is there any way to have global variables in a shared library without runtime errors and warnings?
<6> huh?
<5> i always get things like *** glibc detected ***
<5> double free or corruption (fasttop): 0x09fd4288 ***
<7> fatal error C1061: compiler limit : blocks nested too deeply
<7> what the hell is this:)
<6> you know that C++ doesn't say anything about "shared" anythings
<7> ih
<6> siege sorry, I didn't see that you were a different person
<7> :)
<7> np
<6> I'd say you probably have a recursive macro trying to run
<2> vawjr: you tried aspects yet?
<6> apsects what?
<2> as in "aspect ortiented programming"
<6> no, I haven't, nor have I seen a good example of how it might be used
<2> the best way to explain them is with an example
<2> you know how sometimes code is flooded with logs
<2> printfs to say I got into function Foo()
<2> and at the end
<2> exiting Foo...
<2> whatever
<6> yes
<6> when debuggers won't do their job
<2> right
<2> aspects are a way to manipulate the code to automatically modify it for things like these
<2> I can do
<2> aspect Logger{ if you see: * *(*): print Enter Functioname }
<2> whatever, it uses the function signature
<2> as a point to insert code
<2> and its also typesafe
<2> you can also use predicates like, if function returns enter other code
<2> problem is of course to debug these aspects, as they change the original code
<8> Now, the special killer sentence
<8> Quantum``: can you show another example not involving logs/debug?
<2> hahaha
<2> ok
<2> for example
<2> ehm, Database authentication



<8> Yes?
<2> ok, so before you run a stored proc for example
<8> Hmyes?
<2> actually probably not such a good example :)
<8> Of course it's not, otherwise it wouldn't be a killer sentence
<2> ok IMAGINE you are a bad inefficient programmer
<8> AOP is overrated, like OOP
<2> and you reconnect each time to the database
<8> Not difficult to imagine
<8> I can imagine I'm you
<8> :D
<2> but you arent funny
<2> so its too hard too imagine
<2> to
<2> ****
<2> cant write
<8> So I reconnect each time to the database
<6> maybe your imagination is failing
<8> (not sure why)
<2> well... ok
<2> you know what bad example
<2> :)
<2> ok
<2> Timing
<2> for performance
<2> instead of Timer.begin()
<8> Profiling, debugging, all the same
<2> right right...
<8> There are tools that do it without changing code
<2> no its nothing to do with reflection really... but I can see how to make the comparison
<8> vawjrwrk: they're trying to sell it, difficult without good uses :D
<2> ok ok
<2> lets try this
<2> imagine I want to manipulate the code, if function fails... try the following code. but just as a test, you will probably want to remove it later
<2> also kinda debuggish
<2> ...
<2> you know what, I dont care
<2> its just a nice way to write macros :0
<2> ah welcome back
<8> So Quantum``, prepare dinner, I'll be there in half an hour
<2> lol no
<2> I cant walk
<8> Get your girlfriend to prepare it then
<2> ill ask extasygirl
<2> Ashe, shes in bordeaux
<8> Weird destination
<8> I'm going to Arcachon in July though, so..
<8> Maybe it's not that weird
<2> :)
<2> she went there with her parents
<2> ugh
<2> and left me all alone
<2> crippled
<2> in the dark
<2> oiteck you used to be more shekxy
<8> I could bring you a pizza, bu
<8> +t
<8> You'd have to give me 500
<9> alright
<9> cab should be here in about an hour
<9> closing shop ;p
<8> Where are you going to again?
<9> redmond
<9> /seattle
<8> You'll get MS radiations
<8> Ah
<9> yeah :/
<9> heh
<9> see you in another timezone
<2> ciao ciao
<2> soooommmeeewhhhhheeeeerrreeee
<2> overrr the raiiiiinboooowww
<10> lol MS radiation


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #c++
or
Go to some related logs:

karawetta
#linuxhelp
encraption c++
#skype
#java
#c++
#php
php5apache2.dll into server:
12What nationality is a Sicilian ?
#AllNiteCafe



Home  |  disclaimer  |  contact  |  submit quotes