--- Log opened Sat Aug 07 00:00:05 2010 00:04 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Quit: Reconnecting] 00:04 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts 00:09 -!- ghiu [~gu@93-32-144-8.ip33.fastwebnet.it] has joined #go-nuts 00:10 < plexdev> http://is.gd/e6HPj by [Kai Backman] in 4 subdirs of go/ -- arm: bugfixes and syscall 00:10 < plexdev> http://is.gd/e6HPn by [Rob Pike] in go/src/pkg/fmt/ -- fmt.Scan: empty strings are errors 00:11 < ghiu> hi, i have two types: type A map[string]interface{} || type B struct { A }. i'm trying to serialize b.A with json.Marshal, but it complains that A is not a pointer 00:12 < ghiu> how can i pass it in the correct way to json.Marshal? thanks 00:13 < MaybeSo> Not sure of your context, but are you perhaps passing something b.A when you mean to be passing &b.A ? 00:16 < ghiu> hmmm, thanks for the input, but &b.A gives me the same error: json: Unmarshal(non-pointer A) 00:18 -!- rbraley [~rbraley@ip72-222-128-78.ph.ph.cox.net] has joined #go-nuts 00:22 < MaybeSo> So you've got a snippet of code something like this: json.Unmarshal([]byte(msg), &b.A) ? 00:24 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has quit [Quit: derferman] 00:28 < MaybeSo> well, good luck. I need to go catch a shuttle 00:29 -!- carllerche [~carllerch@99.13.242.166] has quit [Quit: carllerche] 00:31 < ghiu> &A worked in the end 00:31 < ghiu> i was simply applying it in the wrong place 00:32 < ghiu> thank you :) 00:33 < Namegduf> I find myself making a disturbing amount of use of "reading a non-existent entry returns the zero value" with maps in my code. 00:34 < Namegduf> I hadn't appreciated how convenient that was when the zero value is illegal, and you're providing a lookup method. 00:38 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts 00:39 < nickaugust> ive got a field like this in the json file im trying to unmarshal "phone": [{"office": "(402) 887-0000"}, {"office": "(402) 750-0000", "fax": "402-522-0000}] 00:40 < nickaugust> any idea what type that could unmarshal to? array of maps? 00:42 < plexdev> http://is.gd/e6JRb by [Russ Cox] in 3 subdirs of go/src/pkg/ -- net/textproto: new package, with example net/dict 00:44 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 00:45 < Namegduf> What would people use for a configuration format for a Go program, at present? 00:45 < Namegduf> I see a JSON parser; does it support comments as an extension, or no? 00:49 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection reset by peer] 00:50 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 00:53 < Namegduf> Hmm, goconf. 00:53 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 00:54 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection reset by peer] 00:56 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 00:59 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Excess Flood] 01:00 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 01:07 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection reset by peer] 01:08 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 01:17 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection reset by peer] 01:18 -!- TR2N [email@89-180-152-111.net.novis.pt] has joined #go-nuts 01:38 -!- photron [~photron@port-92-201-73-163.dynamic.qsc.de] has quit [Ping timeout: 258 seconds] 01:52 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts 01:52 -!- boscop_ [~boscop@g226252192.adsl.alicedsl.de] has joined #go-nuts 01:54 -!- Makoryu [~vt920@pool-71-174-191-10.bstnma.fios.verizon.net] has quit [Read error: Connection reset by peer] 01:54 -!- Makoryu [~vt920@pool-71-174-191-10.bstnma.fios.verizon.net] has joined #go-nuts 01:55 -!- boscop [~boscop@g226248236.adsl.alicedsl.de] has quit [Ping timeout: 265 seconds] 01:56 -!- boscop_ [~boscop@g226252192.adsl.alicedsl.de] has left #go-nuts [] 01:56 -!- boscop [~boscop@g226252192.adsl.alicedsl.de] has joined #go-nuts 02:14 -!- kanru [~kanru@61-228-156-150.dynamic.hinet.net] has quit [Ping timeout: 260 seconds] 02:17 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche] 02:19 -!- kanru [~kanru@61-228-156-150.dynamic.hinet.net] has joined #go-nuts 02:34 < smw> Namegduf, goconf needs a little work after a recent update to the error system. I believe it still compiles and works. 02:35 < smw> Namegduf, I promise I will fix it :-P 02:35 < Namegduf> Ah, thanks. What issues are likely in using it? 02:35 < smw> not sure. There should not be any. 02:35 < smw> the tests are still functional 02:36 < smw> not sure what happens with errors though 02:37 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Ping timeout: 265 seconds] 02:37 < smw> Namegduf, also, I believe the builtin godoc info is better than the stuff on the webpage 02:37 < smw> I need to sync them 02:38 < Namegduf> Okay. 02:41 < smw> Namegduf, truthfully, I keep thinking I should rewrite the whole thing and remove all the goconfig code 02:47 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has quit [Ping timeout: 276 seconds] 02:48 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts 03:07 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts 03:20 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche] 03:43 -!- yashi [~yashi@210.191.215.173] has joined #go-nuts 03:52 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts 03:53 -!- carllerche [~carllerch@208.87.61.203] has quit [Client Quit] 04:12 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts 04:25 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has joined #go-nuts 04:26 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has left #go-nuts [] 04:56 -!- saracen [~saracen@81-5-140-201.dsl.eclipse.net.uk] has quit [Ping timeout: 246 seconds] 04:58 -!- saracen [~saracen@81-5-140-201.dsl.eclipse.net.uk] has joined #go-nuts 05:03 -!- scm [justme@d056096.adsl.hansenet.de] has quit [Ping timeout: 258 seconds] 05:35 -!- dju [dju@fsf/member/dju] has quit [Quit: Quitte] 05:36 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 05:36 -!- kingfishr [~kingfishr@c-24-130-147-77.hsd1.ca.comcast.net] has quit [Remote host closed the connection] 05:52 -!- tvw [~tv@e176011006.adsl.alicedsl.de] has joined #go-nuts 06:00 -!- nikofyodo [~hugh4life@client-208-124-113-235.consolidated.net] has joined #go-nuts 06:00 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Ping timeout: 258 seconds] 06:04 -!- Tiger_ [~chatzilla@118.126.12.53] has quit [Ping timeout: 240 seconds] 06:05 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Remote host closed the connection] 06:09 -!- ExtraSpice [~XtraSpice@88.118.32.225] has joined #go-nuts 06:11 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts 06:14 -!- MizardX [~MizardX@unaffiliated/mizardx] has joined #go-nuts 06:20 -!- Makoryu [~vt920@pool-71-174-191-10.bstnma.fios.verizon.net] has quit [] 06:22 -!- ExtraSpice [~XtraSpice@88.118.32.225] has quit [Ping timeout: 240 seconds] 06:23 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts 06:24 -!- scm [justme@d056009.adsl.hansenet.de] has joined #go-nuts 06:25 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping timeout: 245 seconds] 06:26 -!- aho [~nya@fuld-4d00d6f8.pool.mediaWays.net] has joined #go-nuts 06:26 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined #go-nuts 06:35 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche] 06:35 -!- snearch [~snearch@f053009202.adsl.alicedsl.de] has joined #go-nuts 06:42 -!- tvw [~tv@e176011006.adsl.alicedsl.de] has quit [Ping timeout: 265 seconds] 06:46 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping timeout: 264 seconds] 06:52 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts 06:52 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined #go-nuts 06:54 -!- carllerche [~carllerch@208.87.61.203] has quit [Client Quit] 06:57 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts 07:05 -!- ExtraSpice [~XtraSpice@88.118.32.225] has joined #go-nuts 07:07 -!- ronnyy [~quassel@p4FF1DE46.dip.t-dialin.net] has joined #go-nuts 07:12 < Namegduf> What's the simplest way to check if a unicode string is valid? 07:12 < Namegduf> strings.IndexAny(str, unicode.ReplacementChar)? 07:13 < Namegduf> *IndexRune 07:14 < Namegduf> Also, what's the simplest way of normalising strings? 07:18 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 07:30 < KirkMcDonald> I don't think Go has a Unicode normalization package. 07:34 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Ping timeout: 276 seconds] 07:37 < Namegduf> Hmm, pity. 07:48 -!- awidegreen [~quassel@62.176.237.78] has joined #go-nuts 07:50 -!- derferman [~derferman@184.52.17.29] has joined #go-nuts 07:50 -!- derferman [~derferman@184.52.17.29] has quit [Client Quit] 07:52 -!- Ivatar [~graham@tu055.demon.co.uk] has joined #go-nuts 07:58 < KirkMcDonald> Write one! :-) 08:01 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche] 08:01 < Namegduf> I'm not Unicode literate. I just hit funny keys on my keyboard and characters come out. 08:02 < Namegduf> XD 08:02 < Namegduf> Well, not to that level, anyway. 08:02 < manveru> Namegduf: there's a unicode package in stdlib 08:03 < manveru> maybe that helps 08:03 < Namegduf> Yeah, but it doesn't do normalization. 08:03 < manveru> ah, no 08:03 < manveru> there is none yet, afaik 08:05 < KirkMcDonald> Namegduf: This sounds like an excellent way to learn more about Unicode. 08:07 -!- ikaros [~ikaros@188.107.214.192] has joined #go-nuts 08:07 < Namegduf> Well, yes, but it's in the middle of another project, so it'll have to wait, unfortunately. 08:11 < manveru> Namegduf: http://billposer.org/Linguistics/Computation/UnicodeNormalization.html 08:12 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-180-250.clienti.tiscali.it] has joined #go-nuts 08:16 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts 08:19 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts 08:21 -!- ronnyy [~quassel@p4FF1DE46.dip.t-dialin.net] has quit [Remote host closed the connection] 08:21 -!- aho [~nya@fuld-4d00d6f8.pool.mediaWays.net] has quit [Ping timeout: 265 seconds] 08:24 -!- kingfishr [~kingfishr@c-24-130-147-77.hsd1.ca.comcast.net] has joined #go-nuts 08:24 -!- visof [~visof@unaffiliated/visof] has quit [Quit: Leaving] 08:27 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout: 624 seconds] 08:36 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts 08:42 -!- aho [~nya@fuld-4d00d5c9.pool.mediaWays.net] has joined #go-nuts 08:43 -!- ako [~nya@fuld-4d00d5da.pool.mediaWays.net] has joined #go-nuts 08:47 -!- aho [~nya@fuld-4d00d5c9.pool.mediaWays.net] has quit [Ping timeout: 245 seconds] 08:49 -!- jesusaurus [jesusaur@firefly.cat.pdx.edu] has quit [Read error: Connection reset by peer] 08:50 -!- jesusaurus [jesusaur@firefly.cat.pdx.edu] has joined #go-nuts 09:01 -!- Adys_ [~Adys@unaffiliated/adys] has joined #go-nuts 09:02 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 240 seconds] 09:05 -!- mahemoff [~mahemoff@87-194-3-205.bethere.co.uk] has joined #go-nuts 09:07 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 09:10 -!- photron [~photron@port-92-201-58-166.dynamic.qsc.de] has joined #go-nuts 09:16 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping timeout: 248 seconds] 09:21 -!- Adys_ [~Adys@unaffiliated/adys] has quit [Ping timeout: 252 seconds] 09:24 -!- Adys_ [~Adys@unaffiliated/adys] has joined #go-nuts 09:27 -!- mahemoff [~mahemoff@87-194-3-205.bethere.co.uk] has quit [Quit: mahemoff] 09:40 < ghiu> hi, i have a have a map[string]interface{} that i serialize with json.Marshal. i save the output in a file. when retrieved int values are converted to float64, how can i force the conversion to the appropriate time? 09:40 < ghiu> i 09:40 < ghiu> i cannot know beforehand what interface{} is 09:40 < ghiu> so i have to use a dynamic structure 09:47 -!- Adys_ [~Adys@unaffiliated/adys] has quit [Ping timeout: 265 seconds] 09:52 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2] 09:56 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 09:57 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts 09:59 -!- Adys [~Adys@unaffiliated/adys] has quit [Client Quit] 10:06 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 10:06 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the connection] 10:07 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit: slashus2] 10:09 < MaybeSo> just glancing at the documentation it looks to me like all JSON numbers are treated at float64; if that's accurate that indicates you'd have to post-process your data to cast the floats to ints using int64(...) 10:10 < MaybeSo> does the map contain more than one data type for value? 10:11 -!- Kylarr [Kyle@122-148-63-115.static.dsl.dodo.com.au] has joined #go-nuts 10:12 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 10:13 -!- __20h___ [~some_one@r-36.net] has quit [Quit: leaving] 10:14 -!- tvw [~tv@e176011006.adsl.alicedsl.de] has joined #go-nuts 10:18 < MaybeSo> anyway, I think you can use the technique of checking the base type of the data when doing the conversion, e.g., for k,v := range map { switch t := v.(type) { case float64: .... } } 10:18 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined #go-nuts 10:18 < MaybeSo> but I've never tried that, so I'm not positive 10:22 -!- General13372 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit [Ping timeout: 276 seconds] 10:26 < ghiu> thank for the input MaybeSo. the problem is that the base type is interface as well 10:28 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined #go-nuts 10:29 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection reset by peer] 10:29 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 10:36 < MaybeSo> so v.(type) tells you interface{} ??? 10:41 < MaybeSo> well, sorry I can't help then. :( 10:45 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Quit: Leaving] 10:49 -!- Tiger_ [~chatzilla@118.126.12.53] has joined #go-nuts 11:00 -!- g0bl1n [~anonymous@a213-22-18-58.cpe.netcabo.pt] has joined #go-nuts 11:01 -!- Tiger_ [~chatzilla@118.126.12.53] has quit [Ping timeout: 240 seconds] 11:08 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts 11:09 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Client Quit] 11:25 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection reset by peer] 11:26 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 11:26 -!- forgey [brook@seahawk.ript.net] has quit [Read error: Operation timed out] 11:27 -!- Tiger_ [~chatzilla@118.126.12.53] has joined #go-nuts 11:29 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 11:30 -!- forgey [brook@seahawk.ript.net] has joined #go-nuts 11:32 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection reset by peer] 11:33 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 11:35 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 11:36 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Client Quit] 11:37 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection reset by peer] 11:37 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 11:38 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 11:50 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Read error: Connection reset by peer] 11:50 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts 11:52 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection reset by peer] 11:53 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 11:55 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping timeout: 264 seconds] 12:09 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts 12:09 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Ping timeout: 240 seconds] 12:10 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has joined #go-nuts 12:10 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined #go-nuts 12:11 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 240 seconds] 12:11 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts 12:18 -!- eml [eml@irk.bob.fi] has joined #go-nuts 12:22 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts 12:32 -!- snearch [~snearch@f053009202.adsl.alicedsl.de] has quit [Quit: Verlassend] 12:34 < araujo> hello 12:34 < smw> hi 12:34 < araujo> :) 12:36 < ghiu> hi 12:37 -!- saschpe [~saschpe@mgdb-4d0cf1bb.pool.mediaWays.net] has joined #go-nuts 12:39 < ghiu> hi, do you know if i can get the value casted by variable.(type) and convert it to a string, so that, for example, int is "int" ecc? 12:40 < smw> like 94 -> "94" ? 12:40 < bartbes> I think he means type names 12:40 < smw> look in the strconv package 12:40 < ghiu> no no, the value type itself 12:40 < bartbes> isn't there %T for the printf family? 12:40 < ghiu> yes, bartbes 12:41 < ghiu> is it? 12:41 < ghiu> lemme check 12:41 < smw> ghiu, the strconv pkg has stuff for int to string conversion. I think that is what you were asking about 12:42 < araujo> ghiu, use a type switch and the strconv functions? 12:43 < bartbes> smw, araujo: he wants the type *name* 12:43 < smw> ah 12:43 < ghiu> &T would work 12:43 < ghiu> thank you very much :) 12:43 < smw> x.(type) doesn't do it? 12:46 < araujo> ghiu, use reflect.Kind() ? 12:46 < ghiu> typeAsString := fmt.Sprintf("%T", value.(type)) 12:46 < ghiu> works 12:47 < Namegduf> Hmm. 12:48 < Namegduf> Is it remarkable news for a Go process to increase in size continuously as strings are created and destroyed, or should I dig deeper? 12:48 < Namegduf> By "constantly" I mean from 200MB to 400MB with no reason for any permanent change in state. 12:48 < ghiu> o.o 12:49 < Namegduf> This is under quite painfully heavy use. 12:49 < bartbes> well looking at the numbers you're copying/recreating/replacing everything and then make it collect the old data 12:49 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit: slashus2] 12:50 < Namegduf> Yes, that will happen. 12:50 < bartbes> well doesn't that explain it then? 12:50 < Namegduf> Not really 12:50 < Namegduf> Not unless it's expected for the collection not to happen. 12:50 < bartbes> why? 12:50 < bartbes> it just collects 12:50 < bartbes> but not directly 12:51 < bartbes> afaik that's how all gcs work 12:51 < bartbes> ehm not true 12:51 < bartbes> heh 12:51 < bartbes> but a lot 12:51 < Namegduf> I'm not an expert on GCs, but I assumed "collects" generally means "frees at some point" 12:51 < bartbes> yes 12:51 < bartbes> it does that, doesn't it? 12:51 < bartbes> just not the instant you replace it 12:51 < Namegduf> Or at least, has it available for future allocations, causing it to rise to a static size and stay there, even if lots of allocations and releases are happening internally. 12:51 < Namegduf> No, it doesn't. 12:52 < bartbes> that is not how I imagine GCs working 12:52 < bartbes> it just frees memory it sees is no longer in use 12:52 < Namegduf> I believe Go's is lazy about actually releasing it back to the OS 12:52 < Namegduf> Similar to Java 12:52 < bartbes> I guess we need someone who knows this specific implementation 12:52 < Namegduf> I could be wrong, though. 12:53 < Namegduf> What I'm wondering is whether, say, 200 thousand strings being created and destroyed would be expected to cause that kind of increase in memory use, or whether I should be trying to figure out whether somehow pointers to it are being kept somewhere. 12:54 < exch> you should see the .NET runtime in it's standard configuration. It always 'reserves' a sizable chunk of all avaialble system memory, even if the app doesn't actually use it. Only when the operating system explicitely requests more memory, will it release it. 12:54 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 12:54 < bartbes> .NET? 12:55 < Namegduf> The runtime for C# and its MS-based friends. 12:55 < bartbes> yes I know 12:55 < exch> yes. Mono does it to, but to a lesser degree. The amount of pre-reserved mem is configurable through a config file. mono sets it to a lower amount 12:55 < bartbes> but what does that have to do with Go? 12:55 < Namegduf> Nothing in particular aside as an example of a runtime doing stupid things, I assume. 12:56 < exch> It's just to indicate that Go isn't a special case when it comes to dealing with memory :) 12:56 < Namegduf> I guess no one here can say whether the GC has known weaknesses in that area or not, or whether I should try to figure out if it is somehow my code. 12:57 -!- ronnyy [~quassel@p4FF1DE46.dip.t-dialin.net] has joined #go-nuts 12:57 < Namegduf> I'll work on something else for the time being. 12:59 -!- sacho [~sacho@95-42-108-60.btc-net.bg] has joined #go-nuts 12:59 < vrtical> Namegduf: I don't know anywhere enough to really answer your question, but the behaviour in question isn't necessarily stupid. Think of classic UNIX malloc, which would grab a load of memory with a system call then allocate it to the program without further sbrk() calls. 13:00 < vrtical> Likewise when you free() a bunch of memory, it isn't necessarily returned to the system, but kept on the program's free list. 13:00 < Namegduf> ... 13:00 < Namegduf> That would *not cause a continual, gradual increase in RAM usage over time*. 13:00 < vrtical> So what I'm saying in a Go context is that the memory may be *collected*, available to the Go program, but not returned to the system. 13:01 < Namegduf> It would increase for a while, then stop increasing as it satisfied things from the free list. 13:01 < Namegduf> And what I'm saying is that if it was available to the Go program, the memory usage would not continue to increase 13:02 < exch> Unless the stuff isn't collected because there is some reference still remaining somewhere, causing any new allocations to use up fresh memory 13:02 < Namegduf> Right. 13:02 < Namegduf> Or the Go GC is really, really lazy about collecting it. 13:03 -!- artefon [~thiago@189.107.227.111] has joined #go-nuts 13:03 < Namegduf> (Or just "lazy", made bad by high volume) 13:03 < Namegduf> Thus my question about whether the GC was in fact known to do that, or I should go searching for references somehow. 13:05 -!- g0bl1n [~anonymous@a213-22-18-58.cpe.netcabo.pt] has quit [Quit: g0bl1n] 13:05 < exch> Do you have a simple example of what causes the 'leak'? I'm curious to see how it behaves on my machine 13:05 -!- kw- [~user@d86-33-191-122.cust.tele2.at] has joined #go-nuts 13:06 < Namegduf> Not a simple example, no. 13:06 < exch> ok, np 13:06 < Namegduf> I might try parring it down to get one. 13:17 < vrtical> Namegduf: apologies if my reply was pointless or seemed patronising. I suppose my answer was assuming that your memory usage *was* peaking and you just thought it was more than it should be. 13:17 < vrtical> Hope you get it sorted - the Go guys are probably very keen to get info to help them improve the GC, if it turns out to be a bug in the collector rather than the program :-) 13:22 -!- saracen [~saracen@81-5-140-201.dsl.eclipse.net.uk] has quit [Quit: leaving] 13:23 -!- ronnyy [~quassel@p4FF1DE46.dip.t-dialin.net] has quit [Remote host closed the connection] 13:25 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 13:25 -!- tvw [~tv@e176011006.adsl.alicedsl.de] has quit [Ping timeout: 245 seconds] 13:26 -!- tvw [~tv@e176011006.adsl.alicedsl.de] has joined #go-nuts 13:26 < nsf> Go's GC is very simple 13:26 < nsf> it eats memory yes :) 13:26 < nsf> but almost all GCs do that to some extent 13:27 -!- fluf^arr [~camelid@s.pl0rt.org] has joined #go-nuts 13:27 -!- fluf^arr [~camelid@s.pl0rt.org] has quit [Client Quit] 13:27 < bartbes> om nom nom nom 13:31 -!- atsampson [~ats@212.183.140.18] has joined #go-nuts 13:33 -!- g0bl1n [~anonymous@a213-22-18-58.cpe.netcabo.pt] has joined #go-nuts 13:42 -!- g0bl1n [~anonymous@a213-22-18-58.cpe.netcabo.pt] has quit [Quit: g0bl1n] 13:49 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 246 seconds] 13:59 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2] 14:10 -!- ghiu [~gu@93-32-144-8.ip33.fastwebnet.it] has quit [Quit: ghiu] 14:10 -!- ExtraSpice [~XtraSpice@88.118.32.225] has quit [Quit: Leaving] 14:28 -!- tvw [~tv@e176011006.adsl.alicedsl.de] has quit [Remote host closed the connection] 14:28 -!- tvw [~tv@e176011006.adsl.alicedsl.de] has joined #go-nuts 14:29 -!- artefon [~thiago@189.107.227.111] has quit [Quit: bye] 14:31 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has quit [Quit: Leaving] 14:55 -!- saschpe_ [~saschpe@mgdb-4d0cf53b.pool.mediaWays.net] has joined #go-nuts 14:55 -!- saschpe [~saschpe@mgdb-4d0cf1bb.pool.mediaWays.net] has quit [Ping timeout: 276 seconds] 14:56 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 260 seconds] 14:57 -!- ikaros [~ikaros@188.107.214.192] has quit [Quit: Leave the magic to Houdini] 15:02 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Remote host closed the connection] 15:05 -!- chickamade [~chickamad@115.74.121.130] has joined #go-nuts 15:11 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 15:12 -!- g0bl1n [~anonymous@a213-22-18-58.cpe.netcabo.pt] has joined #go-nuts 15:12 < araujo> :) 15:16 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has joined #go-nuts 15:16 -!- kw- [~user@d86-33-191-122.cust.tele2.at] has quit [Ping timeout: 245 seconds] 15:29 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 15:33 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 15:39 -!- chickamade [~chickamad@115.74.121.130] has quit [Quit: Leaving] 15:39 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 15:46 -!- gnuvince [~vince@70.35.170.41] has quit [Ping timeout: 240 seconds] 15:47 -!- gnuvince [~vince@70.35.173.172] has joined #go-nuts 15:49 -!- saschpe_ [~saschpe@mgdb-4d0cf53b.pool.mediaWays.net] has quit [Remote host closed the connection] 15:53 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 240 seconds] 15:54 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 15:55 -!- g0bl1n [~anonymous@a213-22-18-58.cpe.netcabo.pt] has quit [Quit: g0bl1n] 16:02 < araujo> func(a, b interface{}) .... // This function should be able to accept any type? 16:03 -!- navigator [~navigator@p5489428D.dip.t-dialin.net] has joined #go-nuts 16:04 < exch> yes, 2 of them 16:08 < araujo> type mismatch: interface { } != *reflect.FloatValue 16:08 -!- sladegen [~nemo@unaffiliated/sladegen] has joined #go-nuts 16:09 < araujo> exch, I get that when I try to call DeepEqual with 2 *reflect.FloatValue 16:09 < araujo> func DeepEqual(a1, a2 interface{}) bool 16:09 < exch> you can't compare an interface{} to any other type without an explicit type assertion 16:11 < exch> if you want to test if the interface value is equal to something (say an int), you need to turn val into an int: val.(int) != 1234 16:11 < exch> Of course that will fail if val is not an int 16:11 -!- sladegen_ [~nemo@unaffiliated/sladegen] has quit [Ping timeout: 240 seconds] 16:11 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has quit [Excess Flood] 16:11 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has joined #go-nuts 16:13 < araujo> sometimes I don't understand how such a type mismatch happens, considering interface{} is the container for all available objects in the system .... 16:14 < exch> that's exactly it. it's a container, not the actual value. consider interface{} as a box holding the original type.You can't treat the box as the value that's in it 16:15 < araujo> other thing is .. this happens during execution .. not compilation .. 16:17 < exch> the compiler can't tell what value you pass to DeepEqual(). All it sees is that the function accepts an interface{}, which is satisfied by everything 16:19 -!- allengeorge [~allengeor@74.12.150.7] has joined #go-nuts 16:24 < araujo> exch, well, but, shouldn't the function at least be called??? 16:24 < araujo> I mean, the func(a, b interface{}) 16:24 < araujo> passing the *reflect.FloatValue 16:25 < exch> I dont know.. Not sure exactly what you are trying to do 16:26 < araujo> and yeah, I knew about that I need a type assertion for the actual comparison ... just that my function is not even be called... 16:26 -!- Ginto8 [~joe@pool-173-61-45-40.cmdnnj.fios.verizon.net] has quit [Ping timeout: 265 seconds] 16:26 -!- Adys_ [~Adys@unaffiliated/adys] has joined #go-nuts 16:29 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 248 seconds] 16:55 -!- ghiu [~gu@93-32-144-8.ip33.fastwebnet.it] has joined #go-nuts 16:57 -!- anon412315 [debian-tor@gateway/tor-sasl/digitalwatches] has joined #go-nuts 17:00 -!- mat__ [~mat@mx3.absolight.net] has joined #go-nuts 17:00 -!- mat_ [~mat@mx3.absolight.net] has quit [Read error: Connection reset by peer] 17:01 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts 17:06 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche] 17:15 -!- napsy_ [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts 17:17 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Ping timeout: 265 seconds] 17:24 < ghiu> if interfaces can't have fields, how can i make sure that every type implementing it has such a field? 17:25 -!- Guest65335 [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Ping timeout: 252 seconds] 17:25 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts 17:25 < ghiu> and again on interfaces, if i want all the implementing types to share the very same implementarion of a method, how can i do it? 17:25 < ghiu> thanks 17:26 < cbeck> ghiu: As to the second question: you can't 17:26 < cbeck> To the first, you cannot specify fields, but you can specify a method which returns some specific type by pointer and get almost the same effect 17:27 < ghiu> ok 17:27 < ghiu> thanks 17:29 < KirkMcDonald> ghiu: You can define a type which implements the method, and other types can compose that type. 17:29 < ghiu> hmm, such as? 17:30 < KirkMcDonald> type A struct {} type B struct { A } 17:30 < KirkMcDonald> Type B composes type A. 17:30 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Ping timeout: 240 seconds] 17:31 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts 17:31 < KirkMcDonald> And so the method set of type B includes the method set of type A. 17:32 * nsf always gets confuse by those method sets merging rules 17:32 < nsf> confused* 17:36 < ghiu> what's the sytax for composition? 17:36 < ghiu> i missed that part... 17:36 < KirkMcDonald> ghiu: An anonymous field. 17:36 < ghiu> can you point me to the right documentation session? 17:36 < KirkMcDonald> http://golang.org/doc/go_spec.html#Struct_types 17:36 < KirkMcDonald> The stuff about anonymous fields. 17:37 < ghiu> thanks 17:40 -!- Ivatar [~graham@tu055.demon.co.uk] has quit [Ping timeout: 258 seconds] 17:41 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Ping timeout: 248 seconds] 17:42 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts 17:44 * araujo thinks we could get a "Go Interfaces in a Nutshell" book in the future 17:45 < nsf> an article maybe 17:45 < nsf> there is not so much to say for a book 17:45 < KirkMcDonald> I could write a thing. 17:46 -!- Ivatar [~graham@tu055.demon.co.uk] has joined #go-nuts 17:47 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined #go-nuts 17:50 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Ping timeout: 245 seconds] 17:51 -!- DigitalWatches [debian-tor@gateway/tor-sasl/digitalwatches] has quit [Quit: leaving] 17:51 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts 17:53 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 18:01 -!- carter [~carter@cpe-69-201-181-224.nyc.res.rr.com] has joined #go-nuts 18:03 -!- atsampson [~ats@212.183.140.18] has quit [Ping timeout: 240 seconds] 18:18 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Remote host closed the connection] 18:21 < vrtical> ghiu: the 'Go Course' pdf files in the doc directory are pretty hot on anonymous fields of structs - most of the examples seem to use them. 18:21 < ghiu> i'll read it, thank you 18:27 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 18:31 -!- gnuvince [~vince@70.35.173.172] has quit [Quit: Via SOAP! VIA SOAP!!] 18:32 -!- gnuvince [~vince@70.35.173.29] has joined #go-nuts 18:34 -!- Fish [~Fish@ARennes-752-1-12-179.w90-12.abo.wanadoo.fr] has joined #go-nuts 18:42 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts 18:44 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts 18:45 -!- Ivatar [~graham@tu055.demon.co.uk] has quit [Remote host closed the connection] 18:45 -!- tvw [~tv@e176011006.adsl.alicedsl.de] has quit [Read error: Connection reset by peer] 18:45 -!- tvw [~tv@e176011006.adsl.alicedsl.de] has joined #go-nuts 18:59 -!- atsampson [~ats@212.183.140.18] has joined #go-nuts 19:01 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit: slashus2] 19:04 < araujo> evaluation failed: type mismatch: interface { } != float 19:04 < araujo> :( 19:12 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts 19:13 < KirkMcDonald> araujo: What are you trying to do? 19:13 < nsf> araujo: it's not python 19:13 < nsf> you can't just use interface{} as any other type 19:13 < nsf> you need to type assert 19:16 < nsf> also I strongly advise forbidding usage of interface{} unless you really have to 19:17 < araujo> KirkMcDonald, using (*FuncValue) Call() ... to call a function with values func(a, b interface{}) 19:25 -!- jessta_ [~jessta@124-168-53-96.dyn.iinet.net.au] has joined #go-nuts 19:26 -!- jessta_ [~jessta@124-168-53-96.dyn.iinet.net.au] has quit [Client Quit] 19:26 -!- jessta [~jessta@124-168-53-96.dyn.iinet.net.au] has joined #go-nuts 19:39 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts 19:43 -!- navigator [~navigator@p5489428D.dip.t-dialin.net] has quit [Ping timeout: 240 seconds] 19:53 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche] 19:57 -!- carter_ [~carter@cpe-69-201-181-224.nyc.res.rr.com] has joined #go-nuts 19:57 -!- mduft [~mduft@gentoo/developer/mduft] has quit [Ping timeout: 248 seconds] 19:58 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2] 19:59 -!- carter [~carter@cpe-69-201-181-224.nyc.res.rr.com] has quit [Ping timeout: 264 seconds] 20:10 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: Leaving] 20:11 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 20:19 -!- Null-A [~Null-A@c-71-202-165-64.hsd1.ca.comcast.net] has joined #go-nuts 20:20 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has quit [Quit: Morten. Desu~] 20:22 -!- sinisa [~sinisa@93-136-39-179.adsl.net.t-com.hr] has joined #go-nuts 20:24 -!- sinisa [~sinisa@93-136-39-179.adsl.net.t-com.hr] has quit [Client Quit] 20:25 < araujo> there exist a literal value that could "represent" the empty interface? 20:36 -!- carter [~carter@cpe-69-201-181-224.nyc.res.rr.com] has left #go-nuts ["Leaving..."] 20:38 -!- Makoryu [~vt920@pool-71-174-191-10.bstnma.fios.verizon.net] has joined #go-nuts 21:06 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Ping timeout: 258 seconds] 21:11 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Remote host closed the connection] 21:14 -!- gnuvince [~vince@70.35.173.29] has quit [Quit: Via SOAP! VIA SOAP!!] 21:17 -!- nettok [~quassel@200.119.172.253] has joined #go-nuts 21:18 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Quit: Leaving...] 21:18 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 21:18 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts 21:22 -!- Null-A [~Null-A@c-71-202-165-64.hsd1.ca.comcast.net] has quit [Quit: Null-A] 21:27 -!- dju [dju@fsf/member/dju] has joined #go-nuts 21:30 -!- dju [dju@fsf/member/dju] has quit [Max SendQ exceeded] 21:31 -!- dju [dju@fsf/member/dju] has joined #go-nuts 21:34 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Read error: Connection reset by peer] 21:35 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts 21:38 -!- ghiu [~gu@93-32-144-8.ip33.fastwebnet.it] has quit [Quit: ghiu] 21:43 < araujo> guys 21:43 < araujo> what is the proper way to create a "*reflect.InterfaceValue" ? 21:44 < araujo> I am using new(reflect.Interface) ... but it doesn't seem to work .. seems I need to use reflect.NewValue(), but I don't know which value to pass to it to get such a value type 21:47 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit: Verlassend] 21:51 < KirkMcDonald> NewValue will give a Value whose associated Type is the concrete type of the thing passed to it. 21:51 < exch> new(reflect.InterfaceType) works for me 21:52 < KirkMcDonald> I would not expect new(reflect.InterfaceValue) to be meaningful. 21:52 < exch> v := reflect.NewValue(new(reflect.InterfaceType)) fmt.Printf("%T %v\n", v, v) yields '*reflect.PtrValue &{{*reflect.InterfaceType 0x2b0a8dcdd0e8 true}}' 21:52 < KirkMcDonald> I mean, it gives you a thing, but you can't do anything useful with it, I would think. 21:53 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has quit [Ping timeout: 276 seconds] 21:54 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts 21:54 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts 22:02 < araujo> exch, but I was looking for a *reflect.InterfaceValue 22:02 < araujo> KirkMcDonald, yeah, that is the issue, seems I cannot do much with it 22:04 < exch> *reflect.InterfaceValue is a pointer to reflect.InterfaceValue. turning that into a reflect.Value gives a PtrValue 22:05 < exch> if you dereference that, you'll get reflect.InterfaceValue 22:05 < nictuku> has anybody ran into "out of fixed registers" errors when cross-compiling code to arm? 22:05 < nictuku> not sure if I should open a bug, because I can't strip the package to reproduce it 22:06 < nictuku> actually I can ;-) 22:07 < nictuku> just make a big section of s + "text" + "text" + x + y + "text" 22:09 -!- gnuvince [~vince@70.35.167.165] has joined #go-nuts 22:10 < araujo> exch, correct, and I dereference with reflect.Indirect() ... but then gives me a reflect.InterfaceValue and I can't use the (*reflect.InterfaceValue) Set() method 22:15 < araujo> exch, in other words, I am trying to use the following the method: func (v *InterfaceValue) Set(x Value) 22:15 < exch> yea I get it.. hmm 22:16 < exch> seems you'll have to do something funky like: v := reflect.Indirect(ptrval); vp := &v; vp.Set(something) 22:18 -!- General13372 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined #go-nuts 22:20 < araujo> exch, yeah, tried that, keep getting: 22:20 < araujo> vp.Set undefined (type reflect.Value has no field Set) 22:20 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-180-250.clienti.tiscali.it] has quit [Quit: E se abbasso questa leva che succ...] 22:21 < araujo> exch, here, the "vp := &v" , cast the v to *reflect.Value , instead of *reflect.InterfaceValue 22:21 < exch> oh right. Indirect() returns a Value, not the InterfaceValue. Try: v := reflect.Indirect(ptrval).(reflect.InterfaceValue) 22:21 < araujo> :P 22:22 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit [Ping timeout: 240 seconds] 22:25 -!- mahemoff [~mahemoff@87-194-3-205.bethere.co.uk] has joined #go-nuts 22:26 -!- mahemoff_ [~mahemoff@74.125.121.49] has joined #go-nuts 22:27 -!- quag [~quag@121-98-81-61.bitstream.orcon.net.nz] has quit [Ping timeout: 252 seconds] 22:27 -!- quag [~quag@121-98-81-61.bitstream.orcon.net.nz] has joined #go-nuts 22:28 < araujo> impossible type assertion: reflect.Indirect(ival) (type reflect.Value) cannot have dynamic type reflect.InterfaceValue (missing Addr method) 22:29 -!- mahemoff [~mahemoff@87-194-3-205.bethere.co.uk] has quit [Ping timeout: 240 seconds] 22:30 < exch> well then i'm fresh out of ideas :p 22:35 < araujo> i am lost here too :( 22:35 < araujo> my assumption is that if such a method exist for that type, is that it actually can be used hehehehe 22:37 < nictuku> is there an alternative to using map[string]interface{} when I want different types of values within a map? 22:38 < exch> not really 22:39 < jessta> nictuku: yeah, you can use an interface that matches the types you want to put in there 22:39 < nictuku> ah of course :-) 22:39 < exch> that's what interface{} does, but I suppose you can have some interface that's at lesat a 'closer' match.. whatever that may mean in your context 22:40 < exch> You'll still be left with type assertions if you need the actual real types 22:40 < vrtical> a struct, with a 'type' field, and a field for each type you might want to store? (non-serious suggestion) 22:41 -!- mafs [~maikeru@unaffiliated/maikeru/x-7708887] has quit [Quit: Changing server] 22:42 -!- mafs [~maikeru@unaffiliated/maikeru/x-7708887] has joined #go-nuts 22:45 < nictuku> problem solved beautifully. just created a "static" struct that suited the interface exactly, and it worked 22:45 < nictuku> exch: thank you :-) 22:45 < nictuku> http://github.com/jackpal/Taipei-Torrent/issues#issue/2 solved! 22:47 < nictuku> I knew that using interface{} was very wrong in the first place 22:48 < nictuku> I mean, as a client trying to suit to a library interface 22:49 < exch> not sure what I did, but yw :p 23:08 -!- Fish [~Fish@ARennes-752-1-12-179.w90-12.abo.wanadoo.fr] has quit [Remote host closed the connection] 23:09 -!- Tiger__ [~chatzilla@118.126.12.53] has joined #go-nuts 23:12 -!- Tiger_ [~chatzilla@118.126.12.53] has quit [Ping timeout: 240 seconds] 23:22 -!- awidegreen [~quassel@62.176.237.78] has quit [Remote host closed the connection] 23:24 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Quit: Leaving] 23:34 < nictuku> exch: you inspired me in the right direction :-) 23:36 < exch> ah fair enough :) 23:36 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org] 23:41 < gent00r> Hi, for a map. How do i test if it has a particular key? 23:42 < exch> if val, ok := mymap[key]; ok { yay(val) } 23:42 -!- mahemoff [~mahemoff@74.125.121.49] has quit [Ping timeout: 276 seconds] 23:45 -!- nettok [~quassel@200.119.172.253] has quit [Ping timeout: 252 seconds] 23:49 < gent00r> exch, thanks :) 23:50 -!- photron [~photron@port-92-201-58-166.dynamic.qsc.de] has quit [Read error: Operation timed out] 23:57 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts --- Log closed Sun Aug 08 00:00:05 2010