--- Log opened Sat Jul 31 00:00:05 2010 00:04 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts 00:14 -!- tvw [~tv@e176004174.adsl.alicedsl.de] has joined #go-nuts 00:14 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 260 seconds] 00:20 -!- gastal [~jokerwww@187.106.16.17] has joined #go-nuts 00:28 -!- nomo [~nomo@mobile-166-137-137-108.mycingular.net] has quit [Quit: Colloquy for iPhone - http://colloquy.mobi] 00:33 -!- tvw [~tv@e176004174.adsl.alicedsl.de] has quit [Read error: Connection reset by peer] 00:34 -!- ronnyy [~quassel@p4FF1D7A4.dip.t-dialin.net] has quit [Remote host closed the connection] 00:36 -!- photron [~photron@port-92-201-235-163.dynamic.qsc.de] has quit [Ping timeout: 248 seconds] 00:42 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Remote host closed the connection] 00:46 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has quit [Quit: carllerche] 00:49 -!- Byron [~Byron@cpe-98-155-138-202.hawaii.res.rr.com] has joined #go-nuts 00:51 -!- Byron [~Byron@cpe-98-155-138-202.hawaii.res.rr.com] has left #go-nuts [] 01:01 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 276 seconds] 01:02 -!- gnuvince [~vince@70.35.161.32] has quit [Remote host closed the connection] 01:02 -!- gnuvince [~vince@72.0.216.190] has joined #go-nuts 01:08 -!- gnuvince [~vince@72.0.216.190] has quit [Quit: Via SOAP! VIA SOAP!!] 01:08 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has quit [Quit: derferman] 01:15 -!- allengeorge [~allengeor@74.12.150.7] has joined #go-nuts 01:16 -!- dionysiac [~dionysiac@S01060013102db8c7.cg.shawcable.net] has joined #go-nuts 01:20 -!- dionysiac [~dionysiac@S01060013102db8c7.cg.shawcable.net] has quit [Client Quit] 01:22 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts 01:26 -!- Dionysiac_ [~dionysiac@S01060013102db8c7.cg.shawcable.net] has joined #go-nuts 01:27 < araujo> type assertions work even with user defined types right? 01:28 -!- Bombe [~droden@weltgehirnmaschine.de] has quit [Excess Flood] 01:28 -!- Bombe [~droden@weltgehirnmaschine.de] has joined #go-nuts 01:28 < allengeorge> Yes 01:29 < allengeorge> I use them to figure out what concrete message type I'm passed 01:29 < cbeck> Have you tried that over a netchan? I was just about to code up something to test it. 01:30 < allengeorge> Nope - haven't tried it over a netchan 01:31 -!- yihuang [~yihuang@72.52.94.230] has joined #go-nuts 01:38 -!- yihuang [~yihuang@72.52.94.230] has quit [Quit: leaving] 01:39 -!- yihuang [~yihuang@72.52.94.230] has joined #go-nuts 01:43 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 01:43 -!- gnuvince [~vince@70.35.166.150] has joined #go-nuts 01:46 -!- dacc [~dan@D-128-95-10-226.dhcp4.washington.edu] has joined #go-nuts 01:46 -!- Dionysiac_ [~dionysiac@S01060013102db8c7.cg.shawcable.net] has quit [Ping timeout: 276 seconds] 01:56 < allengeorge> Hmm...I'm having some trouble trying to unmarshal a JSON representation of an object into a specific message type 01:58 -!- Dionysiac_ [~dionysiac@209.91.107.249] has joined #go-nuts 01:59 -!- dionysiac [~dionysiac@S01060013102db8c7.cg.shawcable.net] has joined #go-nuts 02:13 -!- Dionysiac_ [~dionysiac@209.91.107.249] has quit [Quit: Colloquy for iPad - http://colloquy.mobi] 02:28 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the connection] 02:28 -!- aho [~nya@fuld-4d00d239.pool.mediaWays.net] has quit [Quit: EXEC_over.METHOD_SUBLIMATION] 02:28 -!- dacc [~dan@D-128-95-10-226.dhcp4.washington.edu] has quit [Quit: dacc] 02:29 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 02:32 -!- wrtp [~rog@92.17.51.177] has quit [Quit: wrtp] 02:39 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined #go-nuts 02:41 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 240 seconds] 02:45 -!- bjarneh [~bjarneh@135.80-203-19.nextgentel.com] has joined #go-nuts 02:51 -!- dionysiac [~dionysiac@S01060013102db8c7.cg.shawcable.net] has quit [Quit: dionysiac] 02:55 -!- gastal [~jokerwww@187.106.16.17] has quit [Ping timeout: 240 seconds] 02:57 -!- Dionysiac [~dionysiac@S01060013102db8c7.cg.shawcable.net] has joined #go-nuts 02:57 -!- Dionysiac [~dionysiac@S01060013102db8c7.cg.shawcable.net] has quit [Client Quit] 03:00 -!- dionysiac [~dionysiac@S01060013102db8c7.cg.shawcable.net] has joined #go-nuts 03:03 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds] 03:09 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Ping timeout: 258 seconds] 03:17 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts 03:38 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 03:43 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Ping timeout: 240 seconds] 03:45 -!- yihuang [~yihuang@72.52.94.230] has quit [Quit: leaving] 03:47 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote host closed the connection] 03:57 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts 03:58 -!- lukew_cn [~lukew_cn@222.128.154.85] has joined #go-nuts 03:58 -!- lukew_cn [~lukew_cn@222.128.154.85] has quit [Excess Flood] 04:14 -!- lukew_cn [~lukew_cn@222.128.154.85] has joined #go-nuts 04:14 -!- allengeorge [~allengeor@74.12.150.7] has quit [Quit: allengeorge] 04:15 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Ping timeout: 276 seconds] 04:36 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 04:46 -!- uriel [~uriel@li43-28.members.linode.com] has joined #go-nuts 04:47 -!- Netsplit *.net <-> *.split quits: scm, SecretAgent, segy, drhodes, inittab, 45PAAVR9K, smcq__, chewbranca, DJCapelis, bjarneh, (+127 more, use /NETSPLIT to show all of them) 04:54 -!- ath [~ath@193.167.161.3] has joined #go-nuts 04:54 -!- clip9 [~tj@12.81-166-62.customer.lyse.net] has joined #go-nuts 04:54 -!- homa_rano [~erice@hmsvelociraptor.csail.mit.edu] has joined #go-nuts 04:54 -!- exch [~exch@h144170.upc-h.chello.nl] has joined #go-nuts 04:54 -!- Wasabeh [~wasabi@213.131.131.142] has joined #go-nuts 04:54 -!- tensorpu1ding [~michael@99.56.175.166] has joined #go-nuts 04:54 -!- tabo` [~tabot@camelot.tabo.pe] has joined #go-nuts 04:54 -!- ShadowIce` [pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 04:54 -!- Netsplit over, joins: soul9, __20h___, i__, Fish-Work, maht, lukew_cn, napsy, angasule, bjarneh, Adys (+127 more) 04:54 -!- dionysiac [~dionysiac@S01060013102db8c7.cg.shawcable.net] has joined #go-nuts 05:03 -!- tensorpu1ding [~michael@99.56.175.166] has left #go-nuts [] 05:04 -!- tensorpudding [~michael@99.56.175.166] has joined #go-nuts 05:04 -!- scm [justme@d071175.adsl.hansenet.de] has quit [Ping timeout: 265 seconds] 05:05 -!- scm [justme@d056164.adsl.hansenet.de] has joined #go-nuts 05:42 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 240 seconds] 05:45 -!- roop [~roop@122.167.121.193] has joined #go-nuts 05:55 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout: 615 seconds] 05:58 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts 06:02 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts 06:13 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche] 06:16 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined #go-nuts 06:36 -!- ronnyy [~quassel@p4FF1DC5C.dip.t-dialin.net] has joined #go-nuts 06:39 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 06:40 -!- lukew_cn [~lukew_cn@222.128.154.85] has quit [Quit: Bye~~] 07:11 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the connection] 07:11 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts 07:12 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 07:20 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Remote host closed the connection] 07:26 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts 07:26 -!- kris928 [~kris928@c-69-181-219-84.hsd1.ca.comcast.net] has joined #go-nuts 07:30 -!- raylu [raylu@c-98-234-85-38.hsd1.ca.comcast.net] has quit [Read error: Connection reset by peer] 07:30 -!- kris928 [~kris928@c-69-181-219-84.hsd1.ca.comcast.net] has quit [Read error: Connection reset by peer] 07:31 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has quit [Quit: derferman] 07:31 -!- Sacho [~sacho@213.91.244.15] has joined #go-nuts 07:31 -!- Sacho [~sacho@213.91.244.15] has quit [Client Quit] 07:31 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2] 07:32 -!- kris928 [~kris928@c-69-181-219-84.hsd1.ca.comcast.net] has joined #go-nuts 07:32 -!- Sacho [~sacho@90-154-149-17.btc-net.bg] has joined #go-nuts 07:33 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Read error: No route to host] 07:36 -!- kris928 [~kris928@c-69-181-219-84.hsd1.ca.comcast.net] has quit [Read error: Connection reset by peer] 07:37 -!- kanru [~kanru@61-228-151-164.dynamic.hinet.net] has joined #go-nuts 07:37 -!- kris928 [~kris928@c-69-181-219-84.hsd1.ca.comcast.net] has joined #go-nuts 07:37 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts 07:39 -!- kris928 [~kris928@c-69-181-219-84.hsd1.ca.comcast.net] has quit [Read error: Connection reset by peer] 07:40 -!- kris928 [~kris928@c-69-181-219-84.hsd1.ca.comcast.net] has joined #go-nuts 07:42 -!- kris928 [~kris928@c-69-181-219-84.hsd1.ca.comcast.net] has quit [Read error: Connection reset by peer] 07:42 -!- tvw [~tv@e176004107.adsl.alicedsl.de] has joined #go-nuts 07:43 -!- kris928 [~kris928@c-69-181-219-84.hsd1.ca.comcast.net] has joined #go-nuts 07:45 -!- knight_ [~knight@c-76-28-90-0.hsd1.ct.comcast.net] has joined #go-nuts 07:45 -!- kris928 [~kris928@c-69-181-219-84.hsd1.ca.comcast.net] has quit [Read error: Connection reset by peer] 07:46 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 07:46 -!- knight_ [~knight@c-76-28-90-0.hsd1.ct.comcast.net] has quit [Client Quit] 07:47 -!- smw [~smw@c-76-28-90-0.hsd1.ct.comcast.net] has joined #go-nuts 07:49 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Ping timeout: 276 seconds] 07:56 -!- ronnyy [~quassel@p4FF1DC5C.dip.t-dialin.net] has quit [Remote host closed the connection] 07:59 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts 08:02 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit: slashus2] 08:02 -!- k-bal [~Marius@dslb-084-063-027-061.pools.arcor-ip.net] has joined #go-nuts 08:04 -!- roop [~roop@122.167.121.193] has quit [Ping timeout: 252 seconds] 08:05 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined #go-nuts 08:08 < araujo> can I dynamically allocate space for an array? 08:08 < araujo> something like: var d [len(t)]int ? 08:09 < rsaarelm> Yeah, use make. 08:11 < araujo> ooh right, thanks rsaarelm 08:16 -!- dacc [~dan@c-67-171-32-251.hsd1.wa.comcast.net] has joined #go-nuts 08:18 < dacc> how does casting work in go? 08:18 < dacc> can't seem to find any docs 08:18 < KirkMcDonald> dacc: Go doesn't have casts as such. 08:18 < KirkMcDonald> It has type conversions. 08:19 < dacc> e.g. i have a byte i read from a binary file that's a uint8 08:19 < dacc> ah ok 08:19 < KirkMcDonald> dacc: And what do you want to do with it? 08:19 < araujo> type T struct {}; t := new(T); v, ok := t.(*T) // is this a valid type assertion? 08:19 < dacc> KirkMcDonald: i'm writing a parser for a binary file format 08:20 < KirkMcDonald> araujo: You're asserting that something is already its static type? 08:20 < dacc> KirkMcDonald: so i'd just like to get the byte value interpreted as a uint8 08:20 < KirkMcDonald> araujo: And, I think the answer is no. 't' would have to be of an interface type. 08:20 < araujo> KirkMcDonald, that only makes sense to do with for example.. interfaces right? 08:20 < araujo> aha 08:20 < KirkMcDonald> dacc: byte and uint8 are actually the same type. 08:21 < KirkMcDonald> dacc: But if they weren't, it would look like: byte(x) 08:22 < KirkMcDonald> dacc: Er, uint8(x). Whatever. 08:22 < dacc> KirkMcDonald: ah ok, cool 08:22 < araujo> type T struct{}; type Any interface{}; t := new(T); v, ok := t.(Any) 08:22 < araujo> what about that one? 08:22 < KirkMcDonald> dacc: http://golang.org/doc/go_spec.html#Conversions 08:22 < dacc> feels like python =) 08:22 < dacc> KirkMcDonald: thanks much 08:22 < KirkMcDonald> dacc: It is, in fact, very much like Python, given that Python doesn't have type casting, either, but conversions. 08:23 < KirkMcDonald> araujo: Also no, since t is still not of an interface type. 08:24 < KirkMcDonald> var t Any = new(T); v, ok := t.(*T) 08:27 < araujo> KirkMcDonald, even though the Any is the empty interface? 08:27 < KirkMcDonald> Why would that make a difference? 08:28 < araujo> well, because t implements the empty interface too?, so the type assertion is true? 08:29 < KirkMcDonald> Type assertions on non-interface types are known to fail or not at compile-time. 08:29 < KirkMcDonald> They are pointless. 08:29 < KirkMcDonald> And they are disallowed. 08:30 < araujo> mm I see 08:31 < KirkMcDonald> If you merely want to get an Any which refers to t, you can just say: Any(t) 08:31 < araujo> I see now, thanks :) 08:36 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 08:37 -!- gid [~gid@220-253-150-39.VIC.netspace.net.au] has quit [Ping timeout: 265 seconds] 08:38 -!- k-bal [~Marius@dslb-084-063-027-061.pools.arcor-ip.net] has left #go-nuts [] 08:39 -!- photron [~photron@port-92-201-79-39.dynamic.qsc.de] has joined #go-nuts 08:43 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 245 seconds] 08:48 -!- a2800276_ [~tbe@xdsl-78-35-70-237.netcologne.de] has quit [Ping timeout: 276 seconds] 09:10 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 09:12 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Ping timeout: 265 seconds] 09:25 -!- gid [~gid@220-253-29-69.VIC.netspace.net.au] has joined #go-nuts 09:35 -!- ikaros [~ikaros@drms-4d0147c2.pool.mediaWays.net] has joined #go-nuts 09:37 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts 09:44 -!- dacc [~dan@c-67-171-32-251.hsd1.wa.comcast.net] has quit [Quit: dacc] 09:51 -!- Fish [~Fish@9fans.fr] has joined #go-nuts 09:59 -!- gid [~gid@220-253-29-69.VIC.netspace.net.au] has quit [Ping timeout: 245 seconds] 10:02 -!- gid [~gid@220-253-29-69.VIC.netspace.net.au] has joined #go-nuts 10:04 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 10:14 -!- marsu [~marsu@93.12.53.143] has joined #go-nuts 10:15 -!- ikaros [~ikaros@drms-4d0147c2.pool.mediaWays.net] has quit [Quit: Leave the magic to Houdini] 10:16 -!- gid [~gid@220-253-29-69.VIC.netspace.net.au] has quit [Quit: Leaving.] 10:17 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection] 10:19 -!- anticw [~anticw@c-67-169-41-113.hsd1.ca.comcast.net] has quit [Ping timeout: 276 seconds] 10:19 -!- Maxdamantus [~m@203-97-238-106.cable.telstraclear.net] has quit [Ping timeout: 276 seconds] 10:19 -!- anticw [~anticw@c-67-169-41-113.hsd1.ca.comcast.net] has joined #go-nuts 10:19 -!- wrtp_ [~rog@92.17.51.177] has joined #go-nuts 10:19 -!- Maxdamantus [~m@203-97-238-106.cable.telstraclear.net] has joined #go-nuts 10:20 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has quit [Quit: derferman] 10:22 -!- bjarneh [~bjarneh@135.80-203-19.nextgentel.com] has quit [Remote host closed the connection] 10:23 -!- bjarneh [~bjarneh@135.80-203-19.nextgentel.com] has joined #go-nuts 10:23 -!- wrtp [~rog@92.17.51.177] has quit [Ping timeout: 258 seconds] 10:26 -!- a2800276 [~tbe@xdsl-78-34-179-197.netcologne.de] has joined #go-nuts 10:31 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 10:32 -!- gid [~gid@220-253-29-69.VIC.netspace.net.au] has joined #go-nuts 10:34 -!- marsu [~marsu@93.12.53.143] has quit [Quit: Leaving] 10:40 -!- bjarneh [~bjarneh@135.80-203-19.nextgentel.com] has quit [Quit: bjarneh] 10:42 -!- temoto [~temoto@93-80-118-12.broadband.corbina.ru] has joined #go-nuts 10:43 -!- peterdn [~peterdn@cpc1-oxfd18-2-0-cust512.4-3.cable.virginmedia.com] has joined #go-nuts 10:43 < temoto> Hello. What would be space-efficient serialization of few key-value pairs, where one value has 10s to 100s kilobytes of unicode text? JSON with its \uxxxx is far from great. 10:45 < temoto> (and even if i encode unicode to utf-8, \x.. is 4 times larger) 10:53 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts 11:01 -!- saschpe [~saschpe@mgdb-4d0cfe9f.pool.mediaWays.net] has joined #go-nuts 11:03 -!- temoto [~temoto@93-80-118-12.broadband.corbina.ru] has left #go-nuts ["Leaving"] 11:13 -!- crashR [~crasher@85.125.227.158] has joined #go-nuts 11:15 -!- napsy [~luka@212.235.174.112] has quit [Read error: Operation timed out] 11:16 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 11:17 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed the connection] 11:23 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 240 seconds] 11:39 -!- wrtp [~rog@92.17.51.177] has quit [Quit: wrtp] 11:42 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 11:52 -!- wrtp [~rog@92.17.51.177] has quit [Quit: wrtp] 11:53 -!- marsu [~marsu@93.12.53.143] has joined #go-nuts 12:11 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 12:21 -!- saschpe [~saschpe@mgdb-4d0cfe9f.pool.mediaWays.net] has quit [Remote host closed the connection] 12:22 -!- saschpe [~saschpe@mgdb-4d0cfe9f.pool.mediaWays.net] has joined #go-nuts 12:25 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2] 12:28 -!- peterdn [~peterdn@cpc1-oxfd18-2-0-cust512.4-3.cable.virginmedia.com] has quit [Ping timeout: 252 seconds] 12:48 -!- MariusKarthaus [~quassel@s5593c029.adsl.wanadoo.nl] has joined #go-nuts 12:51 -!- gastal [~jokerwww@187.106.16.17] has joined #go-nuts 12:52 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 12:59 -!- wrtp [~rog@92.17.51.177] has quit [Quit: wrtp] 13:00 -!- Byron [~Byron@cpe-98-155-138-202.hawaii.res.rr.com] has joined #go-nuts 13:03 -!- Fish [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has joined #go-nuts 13:11 -!- lmoura [~lauromour@200.184.118.136] has quit [Ping timeout: 240 seconds] 13:14 -!- ronnyy [~quassel@p4FF1DC5C.dip.t-dialin.net] has joined #go-nuts 13:15 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 248 seconds] 13:21 -!- crashR [~crasher@85.125.227.158] has quit [Ping timeout: 248 seconds] 13:23 -!- gastal [~jokerwww@187.106.16.17] has left #go-nuts ["Konversation terminated!"] 13:35 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 13:49 -!- erika_ [~erika@AStDenis-107-1-27-63.w90-43.abo.wanadoo.fr] has joined #go-nuts 13:52 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined #go-nuts 13:52 -!- erika_ [~erika@AStDenis-107-1-27-63.w90-43.abo.wanadoo.fr] has quit [Client Quit] 13:53 -!- ShadowIce [pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 13:57 -!- ShadowIce` [pyoro@unaffiliated/shadowice-x841044] has quit [Ping timeout: 258 seconds] 14:18 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout: 619 seconds] 14:20 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the connection] 14:21 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 14:24 -!- Tiger_ [~chatzilla@118.126.12.53] has joined #go-nuts 14:25 -!- sladegen [~nemo@unaffiliated/sladegen] has quit [Ping timeout: 245 seconds] 14:26 -!- sladegen [~nemo@unaffiliated/sladegen] has joined #go-nuts 14:27 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts 14:30 -!- angasule [c80571ea@gateway/web/freenode/ip.200.5.113.234] has joined #go-nuts 14:36 -!- marsu [~marsu@93.12.53.143] has quit [Quit: Leaving] 14:43 -!- kw-- [~user@d86-32-213-87.cust.tele2.at] has joined #go-nuts 14:49 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 14:54 -!- macroron [~macroron@c-98-242-168-49.hsd1.fl.comcast.net] has joined #go-nuts 14:54 -!- smw [~smw@c-76-28-90-0.hsd1.ct.comcast.net] has quit [Remote host closed the connection] 15:02 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the connection] 15:03 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 15:11 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote host closed the connection] 15:16 -!- Tiger_ [~chatzilla@118.126.12.53] has quit [Remote host closed the connection] 15:18 -!- allengeorge [~allengeor@74.12.150.7] has joined #go-nuts 15:19 < allengeorge> I don't understand what's wrong with this statement var keys [...]string{"name", "clientid", "msgid"} 15:21 < allengeorge> I keep getting "syntax error: unexpected {, expecting )" (BTW this is inside a var ( ... ) block) 15:22 < exch> the 'var foo []string' defines the variable. it's not supposed to do initialization, unless you follow it with '= []string{"foo", "bar"}' 15:23 < allengeorge> Oh...thanks. For some reason I keep forgetting and getting hit by this 15:24 < allengeorge> I usually do the :=, and often the var <var_name> <type> for simple types 15:24 < allengeorge> But for some reason the arrays & maps always trip me up 15:24 < allengeorge> Thanks exch 15:24 < exch> heh it's not very intuitive having so many different ways to declare/initialize stuff 15:28 < allengeorge> Yes, it can be confusing. It'd be nice if the language were pared down a bit wrt. initialization 15:28 < jessta> 2 ways to declare stuff and 3 ways to initialise it 15:28 < exch> Rob Pike acknowledged that in a recent ML thread. it seems they are open to improvements on that part 15:30 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts 15:30 < allengeorge> Actually, aren't there 3 ways to declare stuff? The := does declaration/initialization, you can do var <var_name> <type_name> = <init_statement>, or var <var_name> = <init_statement> 15:30 < allengeorge> Of course, if you do var <var_name> <type_name> you can omit the <init_statement> there 15:31 < jessta> you can't do the third one, it needs a type 15:31 < jessta> oh, you can 15:31 -!- visof [~visof@unaffiliated/visof] has quit [Read error: Connection reset by peer] 15:31 < jessta> I didn't notice 15:32 -!- snearch [~snearch@f053003043.adsl.alicedsl.de] has joined #go-nuts 15:32 < jessta> I guess you could drop, var <var_name> <type_name> 15:33 < taruti> := seems hard to get right when combined with multiple assignment and scopes 15:33 < taruti> personally I tend to avoid it in many places 15:34 < allengeorge> Although the := with multiple scopes has hit me, I don't find that so annoying - I can easily see and address the problem 15:34 -!- saschpe [~saschpe@mgdb-4d0cfe9f.pool.mediaWays.net] has quit [Remote host closed the connection] 15:34 < exch> That's not been a problem for me personally. I had to condition myself to pay attention to it though 15:34 < allengeorge> I like the := the most since I don't have to keep re-typing-out :) the type 15:35 < allengeorge> Yes, you do have to pay attention 15:36 < allengeorge> I think the var <var_name> = <init_statement> should be dropped. I like var <var_name> <type_name> because I can declare a var ahead of type and assign it later 15:36 < allengeorge> (If dropping one of the initialization is going to happen) 15:36 < jessta> allengeorge: yeah, good point 15:36 < taruti> so how should global variables be defined? 15:37 < allengeorge> taruti: I don't see the problem? 15:38 < taruti> allengeorge: they typically are of the form "var foo = bar" and "foo := bar" is not allowed for them 15:39 < allengeorge> Hmm. That's true - and annoying. I remember typing := in the global scope and being surprised that it didn't work 15:39 < bartbes> that is weird 15:39 < bartbes> wait 15:39 < bartbes> can you execute functions in global scope? 15:39 < bartbes> as in, running stuff, instead of declaring stuff 15:40 -!- Sacho [~sacho@90-154-149-17.btc-net.bg] has quit [Remote host closed the connection] 15:41 < allengeorge> I don't know. I know you can run functions in the package init() 15:41 < allengeorge> Which is run in package dependency order 15:42 < allengeorge> I vaguely recall that you can assign the results of a func call to a const 15:42 < exch> var foo int = calcFoo() in global scope works 15:43 < allengeorge> Ah...interesting 15:43 < allengeorge> BTW, is there a way to pass a type around? 15:44 < allengeorge> I have an unmarshaled JSON object and I'd like to write a generic function to convert an interface{} into the type I specify 15:45 < allengeorge> The func specification would be something like getFIeld(jsonMap map[string]interface{}, fieldName string, fieldType ???) (fieldVal ???, err os.Error) 15:45 < allengeorge> I'm guessing that's not possible without generics 15:47 < exch> You can do it with the reflect package. the ??? bits wuold except something like reflect.IntValue or reflect.StructValue 15:47 < exch> It'll require a fair bit of typeswitching and assertions to get convert your interface{} to the right type though 15:48 < exch> This may be what you are looking for. My script thingy uses something similar to resolve struct fields and get/set their values. http://github.com/jteeuwen/Tinyscript/blob/master/tinyscript/util.go#L35 15:48 < exch> there's a setStructField() and getStructField() function there 15:49 < allengeorge> Thanks exch - I'll take a look at it 15:49 < allengeorge> Yeah, the typeswitching and converting from interface{} to a concrete type and figuring out what's in an interface{} is not my favourite part of Go 15:50 < allengeorge> I'm not a fan of that although I haven't worked enough with Go to see a better alternative 15:51 < exch> It works, but it's a lot of work, if there are a lot of different possible types it can hold. They did greatly simplify the reflect package recently though. There used to be a reflect.xxxValue for every type explicitely. Which made for a very lenghty switch statement :p 15:52 -!- tabo` [~tabot@camelot.tabo.pe] has left #go-nuts [] 15:52 < exch> int8, int16, int32, int64, uint8, int16, etc etc. ow it's just IntValue and UintValue 15:52 < exch> *Now 15:53 -!- ronnyy [~quassel@p4FF1DC5C.dip.t-dialin.net] has quit [Remote host closed the connection] 15:54 < allengeorge> Doesn't that create problems when you want to convert into a concrete type though? 15:55 < exch> I haven't gone through all the changes in the reflect packages, but I believe there's now a Type field somewhere in there that holds an integer constant telling you exactly what you are dealing wit.. int8, int16, etc. You can use that to further finetune the type assertion 15:55 < taruti> reflect.Typeof(foobar) -> Type 15:55 < allengeorge> Ah, ok. 15:56 < exch> Which basically requires even more typing cos now you have to deal with nested switch statements, but I guess there was a reason for that :p 15:56 < allengeorge> Yeah :) 15:56 < allengeorge> See, in my case I'm writing a state machine that has to deal with multiple message types that share a common interface 15:56 < exch> That would mean a typeswitch then.. with a case for each possible message type 15:57 < allengeorge> Yeah. 15:57 < allengeorge> Now that I say it, a better approach might be the "Command Pattern" (!) 15:57 < allengeorge> Each message has a handle func that does the appropriate dirty work, but then each message would have to know about the data inside my state machine 15:58 < allengeorge> I'm also doing JSON marshaling and unmarshaling, and I don't want to use the stock unmarshal/marshal representation 15:58 -!- ronnyy [~quassel@p4FF1DC5C.dip.t-dialin.net] has joined #go-nuts 15:58 < allengeorge> And that makes things ... fun 16:00 < allengeorge> I don't know, when I write the code I get the strange feeling that there should be a better way to do things, but it's not obvious right now 16:00 < exch> puzzles keep you sharp! :) 16:02 < allengeorge> That they do :) 16:05 -!- allengeorge [~allengeor@74.12.150.7] has quit [Quit: allengeorge] 16:06 < araujo> is there a way to know if a variable is of a specific type? 16:06 < exch> if v, ok := myvar.(int); ok { yayItsInt(v) } 16:14 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts 16:16 -!- Sacho [~sacho@95-42-108-60.btc-net.bg] has joined #go-nuts 16:18 * araujo guesses exch's answer is directed to him 16:19 < exch> ya 16:19 < araujo> thanks exch , get it :) 16:19 * araujo was already checking the reflect package 16:23 -!- Adys [~Adys@unaffiliated/adys] has quit [Quit: I ♥ Unicode] 16:30 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2] 16:30 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 16:38 -!- kris928 [~kris928@c-69-181-219-84.hsd1.ca.comcast.net] has joined #go-nuts 16:41 -!- kris928 [~kris928@c-69-181-219-84.hsd1.ca.comcast.net] has quit [Remote host closed the connection] 16:50 -!- snearch [~snearch@f053003043.adsl.alicedsl.de] has quit [Quit: Verlassend] 16:53 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts 16:55 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 16:56 -!- djm [~djm@paludis/slacker/djm] has quit [Ping timeout: 276 seconds] 17:07 -!- boscop_ [~boscop@f055016052.adsl.alicedsl.de] has joined #go-nuts 17:09 -!- boscop [~boscop@f055203021.adsl.alicedsl.de] has quit [Ping timeout: 264 seconds] 17:15 -!- djm [~djm@paludis/slacker/djm] has joined #go-nuts 17:23 -!- temoto [~temoto@93-80-118-12.broadband.corbina.ru] has joined #go-nuts 17:24 < temoto> Hello. How to write a big, multi line string? Like in Python i would just s = """foo<next line>bar<next line>zar""" 17:25 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 260 seconds] 17:26 < bartbes> oh.. I should now that 17:26 < bartbes> ehm.. 17:26 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 248 seconds] 17:26 < bartbes> ` 17:26 < bartbes> I think 17:26 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 17:27 < exch> bartbes is right. Use ` as the string delimiter 17:28 < temoto> Thanks. 17:28 < bartbes> finally I'm right 17:29 -!- jhh [~jhh@f049175013.adsl.alicedsl.de] has joined #go-nuts 17:31 -!- allengeorge [~allengeor@74.12.150.7] has joined #go-nuts 17:36 < jhh> if i want to fix a bug from the bugtracker concerning a package, should i also add a test for that bug? 17:36 -!- allengeorge [~allengeor@74.12.150.7] has quit [Quit: allengeorge] 17:43 -!- sinisa [~sinisa@93-138-121-36.adsl.net.t-com.hr] has joined #go-nuts 17:45 -!- ExtraSpice [~XtraSpice@88.118.32.225] has joined #go-nuts 17:50 -!- ronnyy [~quassel@p4FF1DC5C.dip.t-dialin.net] has quit [Remote host closed the connection] 18:11 -!- boscop_ [~boscop@f055016052.adsl.alicedsl.de] has left #go-nuts [] 18:13 -!- boscop [~boscop@f055016052.adsl.alicedsl.de] has joined #go-nuts 18:13 -!- boscop [~boscop@f055016052.adsl.alicedsl.de] has left #go-nuts [] 18:13 -!- boscop [~boscop@f055016052.adsl.alicedsl.de] has joined #go-nuts 18:15 < araujo> exch, there? 18:16 < exch> yes 18:17 < araujo> exch, I have a variable of type interface{} , but seems that the type assertion is not working with it 18:18 < exch> is there a prticular error you are getting? 18:18 < araujo> it is actually a value returned from the (p *Vector) Pop() interface{} , method 18:18 < araujo> nothing at all, just the "ok" clause is not executed 18:18 < araujo> ... 18:19 < araujo> oh, and the var contains a pointer type of a user defined type 18:20 < exch> You need to cast it to a pointer type. if v, ok := myvar.(*MyType); ok { } 18:20 < exch> MyType and *MyType are 2 distinctly different types 18:22 < araujo> correct, correct 18:22 < araujo> mm... 18:22 < exch> http://go.pastebin.com/xMa1xTEM 18:22 < araujo> it is what i doing here... 18:23 < temoto> When two goroutines access same int variable, like go func() { shared += 1 } ; go func() { shared -= 1 } is that uhm.. safe? 18:23 < exch> araujo: it's still not working? 18:23 < araujo> exch, yeah :( 18:25 < exch> hmm. it should really. Can you put something like 'fmt.Printf("%T\n", val)' in there somewhere? it'll print the actual type, so you can make sure you are trying to cast to the correct one.. Just for debugging that is 18:26 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined #go-nuts 18:30 -!- napsy [~luka@212.235.174.112] has quit [Read error: Operation timed out] 18:30 < exch> temoto: not entirely sure, but i'd say that is not safe. Go uses channels for synchronized access to data between goroutines. You can also do manual synchronisation by using a sync.Mutex 18:31 < jhh> not even "foo = bar" is safe if they are larger than one 32 bit i think 18:37 < temoto> exch, the thing here is that i don't need synchronization (as in someone waits another), i need atomic increment/decrement. 18:37 < KirkMcDonald> temoto: In what sense are these different? 18:40 < temoto> KirkMcDonald, well, i don't care on operations order to the line that parallel is fine, as long as i observe correct (not garbage) value at any point in time. 18:40 < KirkMcDonald> The purpose of a mutex is to ensure that an operation is atomic. 18:40 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 18:41 < temoto> KirkMcDonald, like if those were translated to assembler inc/dec, that doesn't require mutex, right? 18:41 < KirkMcDonald> temoto: Go does not necessarily guarantee this. 18:42 < temoto> KirkMcDonald, okay, thanks. 18:42 < temoto> I wonder shouldn't compiler issue a warning about it, then. 18:43 < KirkMcDonald> You want the compiler to detect when multiple goroutines access the same memory? 18:44 -!- allengeorge [~allengeor@74.12.150.7] has joined #go-nuts 18:46 < temoto> Well at least same name would be helpful. 18:47 < temoto> Doing it for same memory is hard, i guess. 18:49 < KirkMcDonald> I think that the "multiple goroutine" part is hard, too. 18:50 < KirkMcDonald> for { go foo(); if rand.Intn(2) { break; } } 18:54 < temoto> If compiler can prove that foo is only used with 'go', then anything in it is "in different goroutine from any other code". 18:55 < temoto> And for this warning, it only needs one 'go'. 19:08 -!- gnuvince [~vince@70.35.166.150] has quit [Ping timeout: 246 seconds] 19:09 -!- gnuvince [~vince@64.235.207.216] has joined #go-nuts 19:14 < temoto> Even reading shared variables (int type) must be surrounded with mutexes? 19:14 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 19:17 < KirkMcDonald> Just reading? No, I wouldn't expect so. 19:19 < allengeorge> ? 19:20 < allengeorge> I would expect all shared memory access to be locked 19:20 < allengeorge> Anyways, I'm having some interesting issues with scoping and := 19:20 < allengeorge> Maybe (probably) there's something I'm not understanding 19:21 < temoto> allengeorge, like a, err := foo(); b, err := bar() ? 19:21 < allengeorge> temoto: Yeah. I have an example here: http://gist.github.com/502514 19:21 < allengeorge> The err returned back to the main function is nil, even though an actual err is returned by getUint64MessageField 19:21 < temoto> allengeorge, you can't declare (:= is implicit declaration and definition) a variable twice. 19:22 < allengeorge> Well heartbeatVal wasn't declared before 19:22 < allengeorge> I thought that you can do multiple left-hand vals and only the ones that have _not_ been declared before will be declared 19:22 < temoto> allengeorge, ah that, you have different issue. It's related to named function return values. 19:22 < exch> allengeorge: that rule does not apply when you are inside a new scope 19:23 < allengeorge> Seriously?! 19:23 < exch> the switch case is considered a new scope in this case. Which means it's perfectly valid to redeclare err 19:23 < exch> Not sure what the logic in that is, but it's been covered a few times before 19:23 < allengeorge> Ouch 19:23 < allengeorge> I totally didn't expect that 19:24 < allengeorge> I'll search the ml for this, but IMO that's really surprising 19:24 < exch> same goes if you do this: if v, ok := foo(); ok {} where ok or v has been defined before.. the if statement constitutes a new scope level 19:24 < temoto> allengeorge, your case is funny because for correct work you should expect error at , err := 19:25 < allengeorge> Yeah - maybe a warning like "redefining function return variable" would be useful 19:25 < temoto> allengeorge, so to fix it, you could declare first value and use foo, err = get...() 19:25 < allengeorge> exch: I didn't think about that 19:26 < temoto> allengeorge, or foo, err1 := ... 19:26 < allengeorge> temoto: Yeah. Hmm. I'll have to be more careful about my use of := now 19:26 < exch> what temoto says should work. I always declare any such vars either in the return value of the func, or at the top of the func as var err os.Error.. And then only use = instead of := in function calls 19:27 < exch> Granted though, this is not very intuitive behaviour and I'm hoping it'll get addressed at some point.. or at least yield compiler warnings 19:27 < allengeorge> exch: I did that, except one of my variables on the left hand side wasn't declared in advance, so I assumed that only it would be affected by the := 19:27 < exch> Yea, outside a new scope level that would be true 19:27 < exch> Which is what makes this confusing :p 19:28 < allengeorge> Which, as I'm finding out now is not the case :) 19:28 < temoto> goinstall code.google.com/p/goconc what's wrong with it (hg repo)? 19:28 < temoto> says unknown repository 19:29 < exch> allengeorge: in the immortal words of General ackbar: It's a Trap! 19:30 < allengeorge> exch: ! That explains where I got that idea from; when I wrote some early code I got a warning saying (I'm paraphrasing) that "at least one variable to left of := must be new" 19:30 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 252 seconds] 19:31 < allengeorge> temoto: it's working for me (a straight hg pull) 19:31 < allengeorge> I mean, clone 19:32 < allengeorge> exch: Yeah - a pretty scary trap. I realize it's tough when designing a language, but this seems like a serious issue 19:32 < temoto> allengeorge, i'm trying to use goinstall from the point where they told me it can handle clone/make/install boilerplate for any url. 19:33 -!- gnuvince [~vince@64.235.207.216] has quit [Quit: Via SOAP! VIA SOAP!!] 19:33 -!- gnuvince [~vince@70.35.168.119] has joined #go-nuts 19:34 < allengeorge> temoto: it works if I do goinstall goconc.googlecode.com/hg/ 19:35 < allengeorge> Or at least it appears to work; puts the objs etc. in $GOROOT/src/pkg/goconc.googlecode.com/hg/ 19:35 < allengeorge> I don't really use goinstall; haven't been using a lot of 3rd party libs yet - I'll have to do that soon though 19:35 < temoto> allengeorge, thanks. 19:37 < allengeorge> np 19:37 < exch> goinstall still needs some work imho. it doesn't use makefiles that come with the project. It makes most of my own packages useless in a goinstall context 19:37 < allengeorge> Hmm. That sounds broken 19:37 < exch> yes 19:38 < exch> It builds it's own makefile by scanning all .go files in the projects base directory. That doesn't really work for my stuff 19:39 < exch> It also makes the usage of goinstall for cgo projects a bit of a pain. They usually have extra stuff defined in the makefile required for proper linking of c libs 19:39 < allengeorge> Yeah - what happens if you have subdirectories, and the files in the main dir have dependencies on those in the subdirectories? 19:39 < exch> allengeorge: the build fails 19:40 < exch> you'll have to go into the project dir and run make anually 19:40 < allengeorge> Again, doesn't seem like expected behaviour; I guess it's only for simple packages, which is fair 19:46 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 19:47 -!- macroron [~macroron@c-98-242-168-49.hsd1.fl.comcast.net] has quit [Quit: Leaving] 19:49 -!- kris928 [~kris928@64.134.220.138] has joined #go-nuts 19:52 -!- dacc [~dan@c-67-171-32-251.hsd1.wa.comcast.net] has joined #go-nuts 19:53 -!- dacc [~dan@c-67-171-32-251.hsd1.wa.comcast.net] has quit [Client Quit] 19:55 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 20:03 -!- kris928 [~kris928@64.134.220.138] has quit [Remote host closed the connection] 20:16 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 240 seconds] 20:17 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 20:21 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 20:22 -!- jhh [~jhh@f049175013.adsl.alicedsl.de] has quit [Quit: jhh] 20:35 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote host closed the connection] 20:36 -!- sinisa [~sinisa@93-138-121-36.adsl.net.t-com.hr] has quit [Quit: leaving] 20:42 -!- ExtraSpice [~XtraSpice@88.118.32.225] has quit [Ping timeout: 240 seconds] 20:47 < exch> The scoping behaviour with := seems to have an additional oddity. Pay attention to the definition of v in the if-statement at line 18. v should go out of scope when exiting the if blocks, yet it's used without problem at line 23. http://github.com/kless/freecrypto/blob/master/twofish/math.go#L18 20:48 -!- angasule [c80571ea@gateway/web/freenode/ip.200.5.113.234] has quit [Quit: Page closed] 20:48 < exch> This seems to contradict the behaviour of (re)definition inside a new scope level 20:51 -!- allengeorge [~allengeor@74.12.150.7] has quit [Quit: allengeorge] 20:54 -!- allengeorge [~allengeor@74.12.150.7] has joined #go-nuts 20:55 < allengeorge> exch: Yeah - you're right 20:55 < allengeorge> This seems really confusing to me. It's almost like a weird mix of C/Ruby scoping rules 20:55 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 276 seconds] 20:56 < allengeorge> In Ruby AFAIK there are no if-block scopes etc. - I think the smallest you can go is method level and then {...} level 20:58 < exch> I don't mind of Go is very particular about it's scoping, but if it considers if blocks a new scope, the bahaviour in the file above should not be allowed 21:00 -!- MariusKarthaus [~quassel@s5593c029.adsl.wanadoo.nl] has quit [Remote host closed the connection] 21:01 < KirkMcDonald> exch: D addressed this problem by defining blocks that introduce a new scope and blocks which do not as separate productions in the grammar. 21:03 < exch> It seems go blocks are now behaving as both simultaneously 21:03 < exch> Schrodinginer would be proud 21:04 < exch> *Schrodinger 21:05 -!- a2800276_ [~tbe@xdsl-87-78-60-115.netcologne.de] has joined #go-nuts 21:06 -!- a2800276 [~tbe@xdsl-78-34-179-197.netcologne.de] has quit [Ping timeout: 258 seconds] 21:07 < allengeorge> As long as the behaviour is consistent I'm OK with whatever the language designers pick, be it Ruby or Go or whatever 21:08 < exch> exactly 21:08 < allengeorge> But I think these weird corner cases introduce subtle bugs and detract from the overall feel of the language 21:11 -!- wobsite [~wobsite@pool-96-237-162-24.bstnma.fios.verizon.net] has joined #go-nuts 21:16 < exch> ha! As it turns out, the code in that particular github repo will not compile. 21:17 < exch> for exactly the reason we expect it to fail. the v definitions are considered independant of the toplevel scope and this the usage of v after the if blocks is invalid. 21:17 < exch> That's a relief really. Turns out Go is consistent afterall 21:18 < allengeorge> My world makes sense ;) 21:18 < exch> yay :) 21:18 < exch> Shame though. i was about to post a mailinglist thread on it with a beautiful analogy to schrodinger's cat :( 21:19 < allengeorge> I'm sure there will be plenty of opportunities; Go is still young 21:20 < exch> perhaps I should just try to run any questionable code next time, before I start writing rants about it :p 21:20 < exch> true 21:20 < allengeorge> Well, it's tough - I generally assume that code on a public repo is compilable 21:21 < allengeorge> With git, I have private local branches that aren't, but I don't push anything to origin/master unless it compiles 21:22 < exch> I try to make it usable, but with go's rapid development that can be a challenge. You have to keep updating existing repos with any API or language changes. But I guess that's the price we pay for using something that isn't finished yet :) 21:22 < exch> I also don't have access to private repos, so anything I put on their for personal use is available to everyone 21:23 < allengeorge> You can have a private branch on your local machine 21:24 < allengeorge> So you may be developing a lot locally but only push to the master when it's compilable 21:24 < exch> true, but I switch computers regularly. I use github as a remote harddrive :p 21:24 < allengeorge> Ah - I understand. I usually just add my other computer as a remote in git 21:25 < allengeorge> As long as the machine is up I fetch from the remote (aka the machine I was working on) and continue developing 21:26 < exch> hmm haven't considered that yet. I do have a server running at home. I could try configuring that as the repository for private stuff 21:27 < allengeorge> Yeah. It's very simple. You don't even have to set up a server per-say. If it's a linux box and the dir with the git repo is shareable you could do git remote add <box_name>:/<path_to_repo> 21:27 < exch> nice 21:27 < allengeorge> As long as it's ssh accessible you're good to go 21:27 < exch> it is 21:28 < temoto> erflhtvktn 21:28 < allengeorge> Cool - then you should give it a try some time 21:28 < temoto> sorry 21:29 -!- allengeorge [~allengeor@74.12.150.7] has quit [Quit: allengeorge] 21:29 < jesusaur> question about cgo: 21:30 < jesusaur> how can i specify an include path 21:30 < jesusaur> similar to -I/some/path for gcc 21:32 < exch> a Makefile for a cgo project has some additional vars you can use: CGO_CFLAGS and CGO_LDFLAGS 21:32 < exch> here's an example http://github.com/banthar/Go-SDL/blob/master/sdl/Makefile 21:39 < exch> http://it.slashdot.org/story/10/07/28/2121259/Oracles-Java-Company-Change-Breaks-Eclipse lol 21:39 -!- cjyar [~cjyar@chris.static.mt.net] has joined #go-nuts 21:48 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts 21:48 < jesusaur> exch: when i do similar i get the error: flag provided but not defined: -I/u/jesusaur/include 21:48 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts 21:49 < exch> hmm 21:50 < exch> I've never need to use the include bit with cgo.. Have no experience with it 21:51 -!- scm [justme@d056164.adsl.hansenet.de] has quit [Read error: Connection reset by peer] 21:52 < jesusaur> i guess i'll just keep digging 21:54 < exch> if I specify CGO_CFLAGS = -I"/usr/foobar/" in the makefile, it works 21:54 < exch> as in, that flag + path gets passed to the gcc invocation 21:54 < exch> gcc -m64 -fPIC -O2 -o events.cgo2.o -c -I"/usr/foobar/" events.cgo2.c 21:55 < jesusaur> weird... 21:55 < jesusaur> its been a couple weeks, i'll update go 21:56 -!- scm [justme@d134117.adsl.hansenet.de] has joined #go-nuts 21:57 -!- wobsite [~wobsite@pool-96-237-162-24.bstnma.fios.verizon.net] has left #go-nuts [] 21:59 < temoto> In case someone is interested: goconc.For is very nice (almost like haskell psequence_), ForChunk will start all worker goroutines right away. 22:01 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 240 seconds] 22:03 -!- aho [~nya@fuld-4d00d3e7.pool.mediaWays.net] has joined #go-nuts 22:05 -!- temoto [~temoto@93-80-118-12.broadband.corbina.ru] has left #go-nuts ["Leaving"] 22:10 -!- scm [justme@d134117.adsl.hansenet.de] has quit [Ping timeout: 265 seconds] 22:10 -!- scm [justme@d018142.adsl.hansenet.de] has joined #go-nuts 22:15 -!- kw-- [~user@d86-32-213-87.cust.tele2.at] has quit [Ping timeout: 248 seconds] 22:15 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 22:18 -!- scm_ [justme@d070008.adsl.hansenet.de] has joined #go-nuts 22:18 < jesusaur> that did the trick 22:18 -!- Byron [~Byron@cpe-98-155-138-202.hawaii.res.rr.com] has left #go-nuts [] 22:18 < jesusaur> silly updates... 22:18 -!- scm [justme@d018142.adsl.hansenet.de] has quit [Ping timeout: 264 seconds] 22:20 -!- kanru [~kanru@61-228-151-164.dynamic.hinet.net] has quit [Ping timeout: 240 seconds] 22:21 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the connection] 22:24 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 22:24 -!- Fish [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has quit [Remote host closed the connection] 22:25 -!- scm [justme@d070008.adsl.hansenet.de] has quit [Ping timeout: 276 seconds] 22:26 -!- scm [justme@d057073.adsl.hansenet.de] has joined #go-nuts 22:30 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 264 seconds] 22:33 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 22:39 -!- a2800276_ [~tbe@xdsl-87-78-60-115.netcologne.de] has quit [Quit: a2800276_] 22:45 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 265 seconds] 22:48 -!- ShadowIce [pyoro@unaffiliated/shadowice-x841044] has quit [Ping timeout: 265 seconds] 22:59 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the connection] 23:00 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 23:25 -!- carllerche_ [~carllerch@208.87.61.203] has joined #go-nuts 23:25 -!- carllerche [~carllerch@208.87.61.203] has quit [Ping timeout: 265 seconds] 23:36 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 23:40 -!- scm [justme@d057073.adsl.hansenet.de] has quit [Ping timeout: 246 seconds] 23:45 -!- allengeorge [~allengeor@74.12.150.7] has joined #go-nuts 23:48 -!- tvw [~tv@e176004107.adsl.alicedsl.de] has quit [Ping timeout: 245 seconds] 23:48 -!- napsy [~luka@212.235.174.112] has quit [Quit: Lost terminal] 23:49 -!- chaosclown [~whitenois@unaffiliated/chaosclown] has joined #go-nuts 23:49 < chaosclown> hey all 23:49 < chaosclown> is it possible to do winapi code in GO? 23:56 < exch> chaosclown: yes. Have a look at http://groups.google.com/group/golang-nuts/msg/6cdfc3d16c8c6c6e 23:57 < chaosclown> thanks 23:57 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 23:58 < chaosclown> exch: and thats possible without sending the runtime with it, eh? it could be a standalone executable doing the dll calls? 23:59 < exch> The go runtime is embedded in the binary itself. At least it is on the unix variants. If the windows version is a direct port, it would apply there as well. 23:59 < exch> I don't use windows so, so I can't say for sure --- Log closed Sun Aug 01 00:00:05 2010