IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1825.50 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-07-22
[00:00]<vynvyv>and it runs all in in the order you do +=
[00:00]<gjrvcxnne>theshadowL did you enableraisingevents?
[00:00]<vxnsxrmjw>yea
[00:00]<vynvyv>so if you did += first; += last (excuse the pseudocode), it would do first, then last. Isn't that fifo?
[00:01]<gjrvcxnne>yes, your description at first was different though
[00:01]<vynvyv>yeah scrolling back i didn't even really answer your question
[00:01]<gjrvcxnne>(it will only return the value from the last delegate run though) that's what I based it on...
[00:02]<gjrvcxnne>the behavior you are observing is probably because you need to instance a delegate object first before any functions are assigned to it
[00:02]<vynvyv>well that's like saying, "it works that way because it does"
[00:02]<gjrvcxnne>I didn't realize that delegate objects (without the event) could have more than one function assigned
[00:02]<gjrvcxnne>no it's not
[00:03]<vynvyv>all i have to do is say Loop loop = null; and then i can do +=
[00:03]<gjrvcxnne>the object needs to be instanced before the += operator is called
[00:03]<vynvyv>that counts as instantiation?
[00:03]<gjrvcxnne>huh... good poiunt
[00:03]<gjrvcxnne>huh..
[00:03]<gjrvcxnne>uh...
[00:03]<gjrvcxnne>lol
[00:04]<vynvyv>yeah it doens't really matter, i was just curious
[00:04]<vynvyv>by your initial reaction it doesn't sound like it's normal to use multicast delegates anyway
[00:04]<gjrvcxnne>delegate syntax has changed from 1.0-2.0... so who knows
[00:04]<vynvyv>ahh maybe that's new
[00:04]<gjrvcxnne>tieTYT: right... except in events usually
[00:05]<vynvyv>nod, i've seen that used in the code vs generates for me for winforms
[00:05]<gjrvcxnne>a LOT of people say that using more than one function for a delegate is just plain stupid or pointless....
[00:05]<vynvyv>alright anyway thanks for the help
[00:05]<vynvyv>if you care about the return value it seems like it normally would be
[00:05]<gjrvcxnne>what little help i could give lol
[00:08]<rxrcr>tieTYT, Multicast delegates are used all over the platform, they're pretty common
[00:09]<vynvyv>chaka: oh.. you mean directly or indirectly by being defined as events?
[00:10]<rxrcr>correct. Some places use them directly, but I'd say they're pretty common
[00:10]<rxrcr>(sorry, jumped on late in the convo)
[00:11]<rxrcr>The guys that wrote IronPython use them directly for peices of their runtime implementation. They're not real events, perse, but it's essentially the same pattern
[00:12]<trc>what's the best way to check if a DateTime can be validly converted to a SqlDateTime?
[00:13]<rfnwn>Tak: rtfm
[00:13]<trc>tfm sucks
[00:13]<rfnwn>haha
[00:13]<rfnwn>dont talk like that about it
[00:13]<rfnwn>my papa wrote it
[00:13]<trc>yes, it might hear me
[00:14]<rfnwn>Tak: rtfm again
[00:14]<rfnwn>good day sir
[00:14]<rxrcr>tieTYT, From what I've read, you're trying to get a return value from a MulticastDelegate, and by design you'll only get the value from the last executed delegate
[00:14]<kjr>alexE: I didn't know bastards had fathers ;)
[00:14]<trc>it looks like the only "sane" way is to run SqlDateTime.Parse() inside a try/catch, but I'd really rather avoid that if somebody knows a trick
[00:15]<kjr>as long as your data is pretty clean, why not use a try/catch?
[00:15]<trc>I'm not all that sure this particular data is pretty clean
[00:15]<trc>I'll use a try/catch if I have to
[00:15]<rxrcr>Tak, I don't use sql much these days, but there's a common pattern used alot by framework objects: bool obj.TryParse(). Does that exist on your type?
[00:16]<kjr>I think most of the formatting stuff throws exceptions, seems to be par for course
[00:16]<trc>chaka: no, that would be ideal
[00:16]<rxrcr>ah, well then try/catch :)
[00:16]<kjr>chaka: wait, there's formatting stuff that uses a bool instead of exceptions?
[00:16]<trc>most of the common types have TryParse, which will return a bool
[00:17]<trc>nothing in System.Data.SqlTypes appears to do so, however
[00:17]<rxrcr>Kog, what Tak said. See Int32.TryParse() for example
[00:17]<kjr>Tak: weird... never noticed that
[00:17]<kjr>although, that probably catches an exception somewhere heh
[00:17]<kjr>deeper down the line
[00:18]<trc>actually I suspect it reimplements the Parse() code with inline error-checking
[00:18]<trc>there would be no point (IMO) if it was just wrapping a try/catch
[00:18]<kjr>I sure hope so
[00:18]<rxrcr>I've used DateTime.TryParse() extensively, there are no exceptions thrown inside of it
[00:18]<kjr>Tak: a lot of the stuff in .NET is convenience fluff... I wouldn't be surprised at all
[00:19]<kjr>chaka: you wouldn't know if it was catching something deeper down the line unless you saw the source
[00:19]<kjr>(of the method itself)
[00:19]<rxrcr>Kog ^^: I've reflected the method in question to check
[00:20]<kjr>Tak: I would hope mono does error checking instead of just wrapping another call
[00:21]<vynvyv>chaka: no actually i was just wondering why i have to say Del del = null; before i start using the operator += on it. I'm just experimenting with the language atm
[00:21]<rxrcr>Kog, wouldn't catching all First Chance Exceptions alert you to nested try/catch blocks?
[00:21]<rxrcr>tieTYT, ooh, interesting
[00:22]<rxrcr>tieTYT, no idea why that would be :)
[00:22]<vynvyv>heh ok
[00:22]<vynvyv>i'll just accept it
[00:25]<trc>http://svn.myrealbox.com/viewcvs/trunk/mcs/class/corlib/System/DateTime.cs?view=markup
[00:25]<trc>yeah, they're doing error checking
[00:27]<rxrcr>love the comments
[00:27]<trc>"it could be optimized, but will make little good."
[00:28]<rxrcr>/ LAMESPEC: This should be part of UTCpattern
[00:28]<trc>lol
[00:33]<rxrcr>nice: "Xbox 360 and PlayStation 2 both leak a massive 2W, or 17.52kWh each year"
[00:33]<kjr>chaka: I suppose so, but I'm not that familiar w/ FC exceptions
[00:33]<rxrcr>so the lesson is: turn your consoles along with your monitors off when not using them
[00:34]<kjr>was someone preaching the value of leaving consoles on?
[00:34]<kjr>that sounds pretty stupid to me
[00:34]<zj2-wzc>Thank god for margarita friday lunches
[00:34]<trc>plus the xbox360 will burn your house down
[00:35]<kjr>rob-wrk: can I work with you?
[00:35]<rxrcr>Kog, only reason I know about em is from debugging our background synchronization code.
[00:35]<gjrvcxnne>2W?!?!?!?!?!?
[00:35]<trc>I miss my margarita fridays :-(
[00:35]<gjrvcxnne>2 watts is NOTHING
[00:35]<rxrcr>Kog and no, but theres a story on /. about how appearantly alot of people do
[00:35]<kjr>GoatCheez: that's more heat than you know what to do with
[00:35]<zj2-wzc>Kog: not an official company policy, but we do it anyways, today was a coworker's last day. usually its just beer in Isla Vista to watch the college girls bike by. ;)
[00:35]<gjrvcxnne>Kog: huh?
[00:36]<rxrcr>rob-wrk, that's awesome
[00:36]<kjr>rob-wrk: where do you work again?
[00:36]<rxrcr>rob-wrk, the only thing I get to do on fridays at work is review code and wait for people's checkins to do a weekly build
[00:37]<kjr>the only thing I do at work on fridays... is the same shit I do every other day: whatever I get told to write







