@# 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



Comments:

<0> http://www.noidea128.org/sourcefiles/15986.html <-- Is there any way to scale this for functions that take any number of arguments? I guess copy-paste is the only way to do it?
<1> i so find the "science consultant" credit humorous
<1> do
<2> DrkMatter, you mean variable numbers of template arguments?
<3> look at template lists
<3> or however those were called
<1> pfft, p*** a void* which points to an array of things, that's the good way to do it
<2> heh i wanted to say that but feared Retribution from C++ purists..
<1> i fear no man
<1> i do fear my wife though
<2> heh
<2> so.. 'zit snowing badly where you chaps are?
<1> sunny and warm for march, nope
<2> dmmit
<2> we got like 50,000 feet of snow here in the northeaast
<2> drive home should be fun



<1> we've only had half an inch since that m***ive storm
<1> and we "only" got 11 inches
<2> where you at mr hu?
<1> virginia
<2> oh
<2> that's right
<2> outside dc
<0> Hm... The main problem lies with the type of the function pointer... Guess I could incorporate the template argumentin there... but then I wouldn't know how to declare it if I had a variable number of template parameters...
<2> why use templates at all?
<0> Because I have to do it for a lot of different functions.
<2> oh
<0> Who all use the same recursive try/catch pattern.
<2> i wouldn't really call that a pattern
<2> perhaps an idiom
<0> ...
<0> Pattern as in, way of arrnaging thing. Not in the academical sense of the term.
<0> *arranging
<2> ah
<2> i of course am too lazy to think about your problem
<2> thus i am coming up with ways to talk around it
<0> On the other hand, I wonder if I could get around p***ing the member function as a function argument, but jsut as a template argument...
<0> That seems possible.
<2> it does, doesn't it?
<2> DrkMatter, you realize that notifierUn<>() will eventually break the stack if you keep getting exceptions, right?
<2> also, i find your using french in your code a bit offensive ;)
<0> Well, any recursive function can break the stack if it's not well-written.
<2> ok
<2> the french throws me off completely
<2> not sure what the point of this code is
<0> m_maitreJeu->echecJoueur(e.quelJoueur()); takes care of making sure exceptions do not cascade.
<0> I've got an object (Player) who needs to get notified of various events. But since that object might be an adapter toward a client, the connection might break, and it might throw an exception to indicate it's inconsistent state. That's when I need to call the m_maitreJeu (Game master) hook to "fix" that player, so that the game might go on.
<0> Adn the whole template is jsut a way to prevent myself from rewriting the exception handling routine for each different function of the Player interface.
<4> got a question
<5> ?
<4> how do you say "I was very happy to hear", can you say, "it was to my great content" ?
<4> nah
<4> hmm
<4> come on
<4> give me ideas
<6> I was delighted
<4> thats it
<6> It gives me great delight
<7> active voice is better than p***ive
<7> if you want to sound 'merican I'm delighted to hear.....
<4> got a grant application deadline tomorrow
<4> stress
<8> Hey
<1> people want to give you money?
<1> is that wise?
<8> I need to step through a list and output each item, then a new line and each item again but converted to something else. Can I use something as a buffer so that I don't have to step through it twice?
<9> vawjrwrk, you give out grants?
<9> *give
<7> no, I was helping my friends write their grant proposals
<9> oh
<9> yeah
<9> those are bitches
<7> ****, just proofing what bad enough
<10> mabaa: "converted to something else" ?
<9> i get paid by a few grants :)
<10> and are you talking about an std::list



<8> Yeh I'm being vague because its irrelevent to my question
<8> no its my own list
<8> sorry to be confusing heh
<7> you want a total of two lines?
<8> yeh, i want to store th second line in a buffer and then output it once the loop is done
<7> and why would you care particularly about going through the list twice
<7> normally iterating a list is fairly reasonable cost....compared to allocating a buffer
<8> efficiency
<8> oh really
<8> he
<8> hehe
<10> there's no reason why you should traverse twice
<8> thats what I was thinking
<8> so what would you do cow?
<7> no, he could format each and output to a stringstream, then output the buffer
<10> hm perhaps I'm misunderstanding what he wants to do
<7> well, he things the details make it irrelevant
<7> s/things/thinks
<8> well
<8> I didnt want to get into it
<8> was trying to just focus on the abstract problem
<7> he hasn't even said if it would be reasonable to convert "on the fly" and use std::copy
<10> right
<8> but the list is of DNA codons, and so it outputs each codone, new line, and then the amino acid that each one is translated to
<7> but then he probably has NO ****ing idea what std::copy is
<7> or about output_iterators<>
<10> does each node contain a codon and amino acid?
<8> each codon translates to a different amino acid but i need to output it raw first and then outputted
<10> I mean, is all this information in each list node?
<8> no each node contains a codone
<8> i have a static table that does the conversion
<10> where's the amino acid stuff
<7> so you don't have an accessor for your node that returns the amino acid stuff, eh?
<8> no of course I do
<10> ok, I still don't see why you can't iterate through, then at each iteration output the codon + table lookup result?
<8> because they need to be on seperate lines
<7> Cowmoo they belong on two different "lines" of output
<10> s/iteration/node
<8> output each codon raw, new line, output each codon converted
<7> you have an accessor for the raw codons also?
<10> vawjrwrk: I'm still not getting it...at the basic level why isn't something like std::cout << *iter << '\n' << table_lookup(*iter) << '\n' valid?
<7> because he wants all of the raw codes on a single line
<11> can i add gmail user in my msn messenger?
<10> oh oh!
<10> okok, I see now
<8> yeh
<8> exactly
<7> javaq_ what the **** does that have to do with C++?
<11> just asking man
<8> vaw, for the raw codon I overloaded <<
<11> be nice
<7> well, std::copy(l.begin(), l.end(), ouput_iterator<node>(cout, " "); // that will output all the raw codes separated by a space on a single line
<7> l being your "list"
<7> presuming you made it STL compatible
<8> no, heh
<7> silly boy
<7> no begin() and end() ?
<10> yea I don't see a way better than iterating twice
<7> yeah, you'd have to write your own loop
<7> and IF you've written a conversion operator to give the aminoacids, you might even get away with:
<7> std::copy(l.begin(), l.end(), ouput_iterator<aminoacid>(cout, " ");
<7> for the 2nd line
<7> ***uming that aminoacid has a operator <<
<8> i have a head and tail for the list if thats what you mean
<8> no...I have a function that returns the amino acid as a string
<7> have you looked at the standard library at all? or is this ***ignment having you fly blind
<8> We arent allowed to use the standard library except for th string cl***
<7> really? no streams???
<7> how very peculiar
<8> no we can use ostreams if thats what you mean
<7> I suspect that either you've mis-understood your teacher
<8> thats not what I meant to say you are right
<7> ostream is part of the standard library
<8> we arent allowed to use STL datastructures


Name:

Comments:

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






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

#skype
#ubuntu
#chatzone
ONCAT(SUBSTRING_INDEX
#windows
#london
SLM MILLET significa
#skype
#chatzone
#AllNiteCafe



Home  |  disclaimer  |  contact  |  submit quotes