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: 1813.48 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-07-28
[00:15]<-- svgvsdyzgjvr_ xrs>/dev/null")
[00:22]<ymuggjt0nt>so apparently you can have a __nogc struct inside a __gc class as a public member
[00:22]<ymuggjt0nt>but of course when you try to call any methods on that struct it gives you a compilation error
[00:38]<azyfffn_>why is client.BeginDisconnect(false, new AsyncCallback(DisconnectCallback), client)); throwing an exception? it says Invalid argument. false isn't invalid, neither is callback. and I tried changing client to various things yet I still get exception
[00:49]<gwaglvyjg>Hehe.. I still want to have a look at Vista technologies but I have no time :) . WPF, WWF, WCF.. I wonder if next version of windows is going to be called WTF :)
[00:52]<gwaglvyjg>It's too quiet here :) I better go sleep
[00:53]<vynvyv>i think i'll call it that regardless
[00:57]<mgglslrrgrgv>hi, i have a tabcontrol with a few tabs and i attached a context menu onto each tab so someone can right click and close the tab, but how do i figure out which tab the user is right clicking on to close? it may not be the active tab
[00:57]<mgglslrrgrgv>actually the contextmenu is attached to the tabcontrol not the tab
[01:28]<22vnax_>If I set a variable to null will it get garbage collected?
[01:29]<vynvyv>yes
[01:29]<vynvyv>and hopefully, even if you don't
[01:29]<y-gz>he is gone
[01:30]<22vnax_>I'm here
[01:30]<vynvyv>no the name with an _ is gone
[01:30]<22vnax_>:D
[01:31]<22vnax_>This is minor but is there a way I can do variable.Remove() or something?
[01:31]<y-gz>remove?
[01:31]<22vnax_>So that it gets marked for the next garbage collection?
[01:32]<y-gz>if (variable is IDisposable) { variable.Dispose (); } variable = null;
[01:32]<y-gz>that's all you can do
[01:32]<22vnax_>ok, thanks :)
[01:32]<vynvyv>in java you can set it to null and it may make a difference
[01:32]<sdscr>Hi, in asp.net 2.0 there are the sitemap file. I have bound it to a Menu, but how can I have multiple root elements... ? So I can have a flat menu with multiple links Horz with submenus underneath?
[01:36]<mracn>tieTYT: It may make a difference in c# as well. If the only reference to your object is foo, then setting foo to null will make that object's reference count go down to 0, thereby making it availible for collection
[01:36]<mracn>however, as long as there is a reference availible, the object may not be collected
[01:38]<vufvuzn>Macke: not entirely true - ref counting collection isn't sufficient
[01:38]<sdscr>The problem is that Web.sitemap can only have one root nodeMapPath element, is there any way to get over this? or to make asp:Menu controls jump over the first element?
[01:38]<vufvuzn>class Foo { Foo f; } ... Foo a = new Foo(); Foo b = new Foo(); a.f = b; b.f = a; a = null; b = null;
[01:38]<vufvuzn>both objects have a non-zero ref count, but they are still eligible for GC
[01:41]<mracn>vulture: But those references cannot be reached, and that's why it's availible for collection, no?
[01:41]<vynvyv>yes but it's not because of ref counting
[01:41]<mracn>which is really what I meant about a reference being availible, sorry for the poor wording
[01:41]<vufvuzn>right - reachability, not ref count
[01:41]<vynvyv>but anyway, he originally said it may make a difference
[01:41]<vynvyv>which logically seems true
[01:41]<mracn>indeed
[01:42]<vynvyv>still i've never done it
[01:42]<vynvyv>code would look like shit if i set everything to null at the end
[01:42]<mracn>well, you won't need to if the reference runs out of scope, right?
[01:43]<vynvyv>i believe you're right
[01:43]<vynvyv>what i can't remember is if that gets GC'd right away in that case
[01:45]<mracn>I don't think you can ever trust anything to be collected right away
[01:45]<vufvuzn>nothing gets collected "right away" in most collectors
[01:45]<mracn>hopefully, probably, bot not garuanteed
[01:45]<vufvuzn>there are some algorithms that give you some guarantees, but that's usually sacraficing general performance
[01:45]<mracn>but even
[02:03]<ymuggjt0nt>How do you serialize a hash table? I can't find a serialize method
[02:03]<ymuggjt0nt>Why does C# make it so damn hard to use hash tables as opposed to something like ruby
[02:03]<rgmznrs_>you can't
[02:04]<ymuggjt0nt>why not? its so bloody trivial, you serialize the key, serialize the value in a foreach loop
[02:04]<rgmznrs_>I agree
[02:05]<rgmznrs_>I felt the same way you do a year ago or so
[02:05]<ymuggjt0nt>and now?
[02:05]<rgmznrs_>I wrote a custom hashtable implementation that can be serialized to xml
[02:05]<rgmznrs_>http://fiskedagbok.xjws.net/trunk/Comlib/States/Settings.cs
[02:05]<rgmznrs_>it's crude and ugly
[02:05]<rgmznrs_>but it works and performs ok
[02:06]<ymuggjt0nt>why isn't there a hashtable which take a params of 2-element arrays :-\
[02:06]<ymuggjt0nt>hash table constructor*
[02:08]<ymuggjt0nt>Is there an easy way to print out the contents of a hash table (key char, value int) in debug mode ?
[02:10]<rgmznrs_>don't think so
[02:10]<ymuggjt0nt>bleh :-\
[02:11]<rgmznrs_>if you're coming from languages like ruby and python I can understand your pain
[02:11]<ymuggjt0nt>its not a language limitation, the library is just underdone
[02:11]<rgmznrs_>yes
[02:12]<rgmznrs_>needs better ToString()
[02:12]<ymuggjt0nt>I dont see why the Hashtable doesn't have a smarter ToString which calls the key/value ToStrings recursively like python/ruby
[02:14]<ymuggjt0nt>I wouldnt be surprised if people abandon C# in droves once languages like Boo or Ruby.NET are solidified
[02:15]<rgmznrs_>I tried Boo, didn't feel quite so comfy with it. I wrote a webcam image uploader with it
[02:16]<y-gz>there will be absolutly no point in that
[02:16]<y-gz>the pure logic tells that you must get a keyvaluepaircollection
[02:16]<y-gz>and foreach() { print}
[02:17]<rgmznrs_>yes and
[02:17]<y-gz>and what?
[02:17]<y-gz>well
[02:18]<y-gz>the ToString you want is to customized for a specific need
[02:18]<y-gz>i may want the ToString to print only values ?
[02:18]<y-gz>or may be something else...
[02:18]<y-gz>anyway i have to sleep
[02:18]<y-gz>good night
[02:19]<rgmznrs_>most languages I know print the contents of common data structures in readable format
[02:19]<rgmznrs_>exceptions include java, c#, c, c++, and the like
[02:20]<rgmznrs_>in the case of java and c#, it's a matter of commodity
[02:20]<rgmznrs_>printing actual contents of a variable instead of a completely irrelevant memory address or whatever, doesn't stand out as a "specific need" or uncommon at all
[02:21]<rxrcr>both java and C# make it easy to implement text serialization if thats what you want
[02:21]<sljjcn>something really strange
[02:22]<sljjcn>ado .net 2.0 and vs 2005
[02:22]<sljjcn>sql db and a typed dataset
[02:22]<rgmznrs_>kill yourself
[02:22]<sljjcn>only for one table that i drag and drop from the server explorer
[02:22]<sljjcn>it do not create the delete and update command in the tableadapter!!!!!!!!!!!
[02:23]<rgmznrs_>^^
[02:23]<sljjcn>somone had already the same problme?
[02:23]<sljjcn>*problem?
[02:25]<sljjcn>no one knows what happening?
[02:31]<rrpygay>alguien que sepa Visual Web developer ?
[02:32]<rrpygay>Visual Web developer ?







