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: 1822.56 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-05-27
[00:56]<lnvnzxu>(gc types, not reference)(
[00:56]<kjr>hm, I'll have to check into c++/cli
[00:56]<wyfaj`>c++/cli rocks :)
[00:56]<kjr>peterhu: I decided I should learn old-style C++... Bjarn C++ heh
[00:56]<dyguw>Anyway, I'd better go to sleep, white appears red here =)
[00:57]<wyfaj`>on days when you have a use for it :)
[00:57]<kjr>minux: perhaps you should get tested for color-blindness? ;)
[00:57]<dyguw>You say C++/CLI, as in Command Line Interface? =)
[00:57]<dyguw>Kog: haha, I am just tired =)
[00:57]<lnvnzxu>knowing standard c++ is always good too
[00:57]<wyfaj`>common language infrastructure
[00:57]<lnvnzxu>CLI = Common Language Infrastructure
[00:57]<kjr>peterhu: well, my problem is I've run out of pedagogical tasks for myself to teach myself new languages
[00:57]<kjr>peterhu: I've learned too many languages too quickly :(
[00:57]<lnvnzxu>yeah, that's always hard
[00:57]<kjr>my lamo attempt now is a "todo" list
[00:57]<lnvnzxu>i've been meaning to pick up python, just i don't have the desire or need to
[00:58]<kjr>it's a simple PQueue, some serialization (perhaps a simple TSV/CSV)
[00:58]<kjr>and then I can wrap the app w/ wxWidgets
[00:58]<kjr>WIDGET!
[00:58]<kjr>minux: I hate C on win32... it's evil
[00:58]<kjr>minux: on Unix/Linux C is almost elegent in its simplicity
[00:58]<dyguw>Indeed
[00:59]<dyguw>Anyway, I need to sleep now. Got less than a week to finish this application.
[00:59]<kjr>adios
[00:59]<dyguw>I am feeling a bit stressed right now.
[01:00]<kjr>stress? pfft
[01:00]<wyfaj`>rely on the GC and stress will be a thing of the past
[01:00]<mupmvz>beer soon
[01:00]<wyfaj`>or.. something
[01:01]<kjr>wilco`: slick ;)
[01:01]<dyguw>Good night
[01:01]<dyguw>=)
[01:01]<dyguw>hehe
[01:01]<lnvnzxu>i don't get people that don't like the GC; sure there's a need for deterministic destruction, which can be solved with the IDisposable pattern, but worrying about using memory that wouldn't get used if you freed it anyway is pointless
[01:02]<lnvnzxu>plus, GC heap allocations can be nearly constant time, like a thread's stack
[01:02]<lnvnzxu>which i really why i think c++/cli got the thing right: destructors *and* finalizers
[01:02]<wyfaj`>nod
[01:03]<lnvnzxu>plus, i like the auto-storage semantics over the using statement
[01:03]<lnvnzxu>"MyDisposableType foo;" vs "using (MyDisposableType foo = ...) { } "
[01:04]<sjlx>me too
[01:04]<wyfaj`>huh?
[01:04]<lnvnzxu>former is c++/cli, latter is c#
[01:05]<wyfaj`>right, but at which point is the dispose invoked?
[01:05]<wyfaj`>in the former
[01:05]<lnvnzxu>when foo goes out of scope
[01:05]<lnvnzxu>like a standard c++ destructor
[01:05]<wyfaj`>i see
[01:05]<sjlx>in a pseudo finally block after the using block
[01:06]<wyfaj`>wouldnt exactly be trivial for say c# :)
[01:07]<lnvnzxu>ok, 6 pm, on friday before a long weekend
[01:07]<lnvnzxu>that means i'm a dork
[01:07]<lnvnzxu>(at work still, that is)
[01:07]<wyfaj`>soph: theres more to it than a pseudo finally block surely
[01:07]<lnvnzxu>time to head home
[01:07]<wyfaj`>cause what if a method allocates the object and returns it to the caller?
[01:08]<wyfaj`>theres more to out of scope than when the method in which it's created returns
[01:08]<sjlx>wilco`: that's what's written in the c# 2.0 lang spec. haven't done intense studies on that issue yet.
[01:08]<sxjaaajzn>frmSite add = new frmSite(); in frmSite can i access the frmMain variables?
[01:08]<wyfaj`>so i'd imagine theres something like reference counting going on to ensure that dispose is invoked right after its no longer reachable
[01:09]<lnrjy>something like that
[01:09]<wyfaj`>soph: i was talking about c++/cli
[01:09]<sjlx>wilco`: none of my biz, got u wrong.
[01:10]<wyfaj`>in the c# case it seems much more explicit - you know exactly when dispose is invoked
[01:10]<sjlx>so in c++/cli one doesn't know exactly? how come?
[01:11]<wyfaj`>because apparently its invoked "when it goes out of scope"
[01:11]<wyfaj`>perhaps they simply invoke dispose when you go out of the scope in which it was declared.... in which case it'd be fairly trivial indeed
[01:11]<sjlx>yep
[01:13]<sjlx>time for a sleep. antibiotics suck. nini
[01:13]<lnvnzxu>wilco, that's exactly what happens: Foo f; is essentially the same as Foo^ f = gcnew Foo; try { /* everything after statement */ } finally { f->Dispose(); }
[01:13]<wyfaj`>ok
[01:13]<kjr>soph: go get some zithromax... or azithromycin
[01:13]<kjr>soph: great stuff...
[01:13]<wyfaj`>what if you'd actually want to return an idisposable object to the caller though ?
[01:13]<sjlx>Kog: that's exactly what i got.
[01:14]<wyfaj`>ie. in cases where in C# you wouldnt use the using statement
[01:14]<kjr>soph: yeah, I had walking pneumonia or a lung infection
[01:14]<wyfaj`>and basically want the caller to deal with disposal?
[01:14]<wyfaj`>wouldnt that be problematic?
[01:14]<kjr>soph: crappier anitbiotics did nothing... zythromax killed that shit right quick ;)
[01:14]<kjr>plus, they're this nifty blue shade
[01:14]<mupmvz>using
[01:14]<wyfaj`>imagine something trivial like an abstract factory which returns instances of disposable objects... heh
[01:14]<lnvnzxu>Foo SomeMethod() { Foo f; return f; } ... Foo f = SomeMethod();?
[01:14]<kjr>wilco`: can I pm you for ~30 seconds?
[01:14]<sjlx>Kog: i got acute hearing loss and multiple inflammations round my head. it's more the total situation that makes me go mad.
[01:15]<sjlx>anyway, later.
[01:15]<wyfaj`>well didnt you just say Foo would be disposed in SomeMethod() if its disposable?
[01:15]<wyfaj`>Kog: go ahead
[01:15]<kjr>soph: zythromax to the rescuse ;) good luck
[01:15]<lnvnzxu>SomeMethod allocates a Foo on the gcheap, allocates a temp Foo on the GCHeap by calling a copy constructor, disposes the original, returns the temp
[01:16]<lnvnzxu>the callee gets a reference to the copy, and it is disposed in a similar fashion when it goes out of scope
[01:16]<wyfaj`>ok
[01:16]<lnvnzxu>it's no different in semantics with standard c++, except instead of being allocated on the stack, things get allocated on the GC heap
[01:16]<svzz_wjzc_>hm i have a strange behavior... i'm creating controls on the fly and bind them to rows of a dataview filtered by a value my form... and to not remove and add item constantly... when i apply a new filter, i don'T wanna delete the controls, just reassign the binding... but when i loop through all my bindings and do C.DataBindings.Add(B.PropertyName, m_DataView[I], B.BindingMemberInfo.BindingField); it resets my Main Dataset to reco
[01:16]<kjr>peterhu: can I pm you for a sec too?
[01:17]<lnvnzxu>sure, though i need to head out
[01:17]<kjr>it'll be real quick
[01:17]<lnvnzxu>no prob
[01:20]<lnvnzxu>have a good weekend folks, i'm heading home (this is my machine at home anyway, so i should almost never log out)







