--- Log opened Sun Mar 21 00:00:24 2010 --- Day changed Sun Mar 21 2010 00:00 < megaboz> i see, thanks for the clarification 00:00 < megaboz> sleep would work 00:00 < KirkMcDonald> Aren't there concerns when doing signal handling in a multithreaded program? 00:02 < anticw> yeah 00:02 < anticw> but rough edges aside you can make it work 00:14 < megaboz> there seems to be an issue with cgo and GOARCH=amd64 in regard to signal handling 00:15 < megaboz> if i use 386, curses handles the signals just fine, otherwise i'm getting segmentation faults 00:16 < anticw> amd64 works for me here 00:16 < anticw> can you share some more details 00:17 < megaboz> i'm trying to use http://github.com/jabb/gocurse/ 00:17 < uriel> KirkMcDonald: really, signals and threading (which Go uses to implement goroutines) don't mix well, it can be done, but it is always asking for pain and missery 00:18 < megaboz> if i compile with GOARCH=amd64 and resize the screen, i get a segfault, instead of curses handling the SIGWINCH 00:19 < anticw> do you get any details on the segfault? 00:19 < megaboz> nothing, no stack trace at all 00:19 < uriel> "Threads [and] signals [are] a platform-dependant trail of misery, despair, horror and madness. 00:19 < uriel> — Anthony Baxter 00:19 < uriel> (I knew I had this quote somewhere: http://quotes.cat-v.org/programming/ ) 00:20 < KirkMcDonald> Yes, this sounds accurate. 00:21 < anticw> for linux, threads + signals mostly work 00:21 < anticw> as much as threads suck, they are _necessary_ sometimes 00:21 < anticw> consider SIGWINCH 00:21 < megaboz> not using signals is not an option, since curses abuses them extensively 00:21 < uriel> anticw: ugh! 00:22 -!- souffledev [~soufflede@110-174-144-249.static.tpgi.com.au] has joined #go-nuts 00:22 < uriel> that signals are used for something like SIGWINCH is... well, stomach turning 00:22 < anticw> there are actually ways to avoid signals for some of this, linux specific anyhow 00:22 < anticw> probably freebsd has something as well 00:23 < uriel> it is all about desining sane interfaces 00:23 < uriel> notifications can be sent via pipes, files, whatever 00:23 < uriel> I think there is another quote by Dennis Ritchie that says basically: "Signals are only to signal you want to kill a process" 00:24 < uriel> or something to that effect 00:24 -!- b00m_chef__ [~watr@128.189.90.175] has quit [Ping timeout: 264 seconds] 00:25 < megaboz> anyway, i was just pointing out that there might be something broken when you mix cgo on 64bit systems and libraries using signals 00:25 < anticw> http://www.kernel.org/doc/man-pages/online/pages/man2/signalfd.2.html 00:25 < megaboz> i'll just use another backend and forget this curses bullshit 00:25 < anticw> megaboz: it might be a problem, ive not tried w/ cgo 00:26 < anticw> i *might* tweak os/signal to use signalfs if available, something else to put on the bottom of the list 00:27 < uriel> anticw: nice, I didn't know about that, it doesn't get rid of signals, but certainly is a step in the right direction 00:29 < uriel> anticw: any clue if other systems implement signalfd? 00:29 < anticw> my guess is freebsd probably does or will 00:29 < anticw> they're really good about that sort of stuff 00:37 -!- mat_ [~mat@prod2.absolight.net] has quit [Read error: Connection reset by peer] 00:38 -!- lux` [lucs@151.95.169.212] has quit [Read error: Connection reset by peer] 00:38 -!- mat_ [~mat@prod2.absolight.net] has joined #go-nuts 00:38 -!- hircus [~michel@ip-109-84-119-27.web.vodafone.de] has quit [Quit: Leaving.] 00:42 -!- skelterjohn [~jasmuth@c-76-124-23-95.hsd1.nj.comcast.net] has joined #go-nuts 00:43 -!- b00m_chef__ [~watr@128.189.67.191] has joined #go-nuts 00:48 -!- b00m_chef__ [~watr@128.189.67.191] has quit [Ping timeout: 258 seconds] 00:49 -!- jophish [~jophish@hermi.gotadsl.co.uk] has quit [Remote host closed the connection] 00:50 -!- megaboz [~megaboz@unaffiliated/megaboz] has quit [Quit: leaving] 00:51 -!- megaboz [~megaboz@unaffiliated/megaboz] has joined #go-nuts 00:51 -!- no_mind [~orion@122.161.212.73] has quit [Ping timeout: 256 seconds] 00:56 -!- Gussi [~gussi@ftth-236-70.hive.is] has quit [Ping timeout: 252 seconds] 00:57 -!- Gussi [~gussi@ftth-236-70.hive.is] has joined #go-nuts 01:02 -!- kanru [~kanru@61-228-158-15.dynamic.hinet.net] has quit [Quit: WeeChat 0.3.1.1] 01:04 -!- no_mind [~orion@122.173.237.129] has joined #go-nuts 01:11 -!- hstimer [~hstimer@70.90.170.37] has quit [Quit: hstimer] 01:13 -!- alus [~gah@64.13.131.178] has joined #go-nuts 01:14 -!- perdix [~perdix@sxemacs/devel/perdix] has quit [Read error: Connection reset by peer] 01:16 -!- perdix [~perdix@sxemacs/devel/perdix] has joined #go-nuts 01:18 -!- millertimek1a2m3 [~adam@r74-192-243-70.tyrdcmta02.tylrtx.tl.dh.suddenlink.net] has joined #go-nuts 01:19 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 01:21 -!- skelterjohn [~jasmuth@c-76-124-23-95.hsd1.nj.comcast.net] has quit [Ping timeout: 240 seconds] 01:28 -!- fuzzybyte [~fuzzybyte@a47.org] has quit [Ping timeout: 276 seconds] 01:28 -!- suurMyy [~suurMyy@xdsl-83-150-84-113.nebulazone.fi] has quit [Ping timeout: 246 seconds] 01:28 -!- fuzzybyte [~fuzzybyte@a47.org] has joined #go-nuts 01:30 -!- suurMyy [~suurMyy@xdsl-83-150-84-113.nebulazone.fi] has joined #go-nuts 01:32 -!- hstimer [~hstimer@2002:62ea:197d:0:226:bbff:fe05:dd9b] has joined #go-nuts 01:44 -!- smw [~stephen@pool-96-232-88-231.nycmny.fios.verizon.net] has joined #go-nuts 01:48 -!- hstimer [~hstimer@2002:62ea:197d:0:226:bbff:fe05:dd9b] has quit [Quit: hstimer] 01:49 < plexdev> http://is.gd/aQT42 by [Ken Thompson] in 4 subdirs of go/src/cmd/ -- issue 682 02:00 -!- brx [~brx@p5796F8B2.dip.t-dialin.net] has quit [Ping timeout: 248 seconds] 02:11 -!- hstimer [~hstimer@c-98-234-25-125.hsd1.ca.comcast.net] has joined #go-nuts 02:17 -!- g0bl1n [~anonymous@a213-22-18-86.cpe.netcabo.pt] has quit [Quit: g0bl1n] 02:19 -!- mstetson [~mstetson@rhema.stetsonnet.org] has quit [Quit: mstetson] 02:19 -!- tor5 [~tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has quit [Ping timeout: 264 seconds] 02:21 -!- amacleod [amacleod@c-75-69-45-62.hsd1.ma.comcast.net] has joined #go-nuts 02:38 -!- jiing_ [~jiing@59-120-12-62.HINET-IP.hinet.net] has quit [Ping timeout: 245 seconds] 02:43 -!- skelterjohn [~jasmuth@c-76-124-23-95.hsd1.nj.comcast.net] has joined #go-nuts 02:47 -!- no_mind [~orion@122.173.237.129] has quit [Ping timeout: 245 seconds] 02:54 -!- tor5 [~tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has joined #go-nuts 02:55 -!- skelterjohn [~jasmuth@c-76-124-23-95.hsd1.nj.comcast.net] has quit [Quit: skelterjohn] 03:00 -!- no_mind [~orion@122.173.199.245] has joined #go-nuts 03:03 -!- yashi [~yashi@dns1.atmark-techno.com] has quit [Ping timeout: 276 seconds] 03:04 -!- skelterjohn [~jasmuth@c-76-124-23-95.hsd1.nj.comcast.net] has joined #go-nuts 03:10 -!- skelterjohn [~jasmuth@c-76-124-23-95.hsd1.nj.comcast.net] has quit [Quit: skelterjohn] 03:11 -!- tor5 [~tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has quit [Quit: tor5] 03:12 -!- mertimor [~mertimor@p4FE75D8C.dip.t-dialin.net] has quit [Quit: mertimor] 03:21 -!- millertimek1a2m3 [~adam@r74-192-243-70.tyrdcmta02.tylrtx.tl.dh.suddenlink.net] has quit [Ping timeout: 276 seconds] 03:28 -!- gufetto [~Marvin@dynamic-adsl-94-36-176-214.clienti.tiscali.it] has quit [Quit: E se abbasso questa leva che succ...] 03:53 -!- X-Scale [email@89-180-209-48.net.novis.pt] has quit [Ping timeout: 246 seconds] 03:54 -!- amacleod [amacleod@c-75-69-45-62.hsd1.ma.comcast.net] has quit [Quit: Bye Bye] 03:55 -!- danklesman [~dankles@adsl-074-166-063-180.sip.asm.bellsouth.net] has joined #go-nuts 04:00 -!- skelterjohn [~jasmuth@c-76-124-23-95.hsd1.nj.comcast.net] has joined #go-nuts 04:01 -!- X-Scale [email@89.180.218.89] has joined #go-nuts 04:03 -!- warthurton [~warthurto@pdpc/supporter/active/warthurton] has quit [Quit: warthurton] 04:05 -!- warthurton [~warthurto@cpe-67-246-229-53.rochester.res.rr.com] has joined #go-nuts 04:05 -!- warthurton [~warthurto@cpe-67-246-229-53.rochester.res.rr.com] has quit [Changing host] 04:05 -!- warthurton [~warthurto@pdpc/supporter/active/warthurton] has joined #go-nuts 04:07 -!- skelterjohn [~jasmuth@c-76-124-23-95.hsd1.nj.comcast.net] has quit [Quit: skelterjohn] 04:18 -!- millertimek1a2m3 [~adam@r74-192-243-70.tyrdcmta02.tylrtx.tl.dh.suddenlink.net] has joined #go-nuts 04:28 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 04:32 -!- rhelmer [~rhelmer@adsl-69-107-95-216.dsl.pltn13.pacbell.net] has quit [Quit: rhelmer] 04:32 -!- no_mind [~orion@122.173.199.245] has quit [Read error: Connection reset by peer] 04:34 -!- rhelmer [~rhelmer@adsl-69-107-95-216.dsl.pltn13.pacbell.net] has joined #go-nuts 04:35 -!- souffledev [~soufflede@110-174-144-249.static.tpgi.com.au] has quit [Quit: <>] 04:36 -!- nettok [~netto@200.119.150.48] has joined #go-nuts 04:41 -!- nettok_ [~netto@200.119.150.48] has joined #go-nuts 04:44 -!- rhelmer [~rhelmer@adsl-69-107-95-216.dsl.pltn13.pacbell.net] has quit [Ping timeout: 245 seconds] 04:45 -!- nettok [~netto@200.119.150.48] has quit [Ping timeout: 248 seconds] 04:48 -!- no_mind [~orion@122.161.210.175] has joined #go-nuts 04:49 -!- nettok_ [~netto@200.119.150.48] has quit [Ping timeout: 246 seconds] 04:56 -!- yatoo [~marcus@host86-156-158-64.range86-156.btcentralplus.com] has quit [Ping timeout: 265 seconds] 04:58 -!- yashi [~yashi@dns1.atmark-techno.com] has joined #go-nuts 05:08 -!- nettok_ [~netto@200.119.150.48] has joined #go-nuts 05:13 -!- nettok__ [~netto@200.119.150.48] has joined #go-nuts 05:17 -!- nettok_ [~netto@200.119.150.48] has quit [Ping timeout: 276 seconds] 05:27 -!- nettok_ [~netto@200.119.150.48] has joined #go-nuts 05:30 -!- nettok__ [~netto@200.119.150.48] has quit [Ping timeout: 248 seconds] 05:32 -!- illya77 [~illya77@193-156-178-94.pool.ukrtel.net] has joined #go-nuts 05:36 -!- nettok_ [~netto@200.119.150.48] has quit [Ping timeout: 246 seconds] 05:37 < plexdev> http://is.gd/aR5Qu by [Russ Cox] in go/src/libmach/ -- libmach: more info when memory reads fail on Darwin 05:37 < plexdev> http://is.gd/aR5Qw by [Russ Cox] in go/ -- A+C: add Kyle Consalus (individual CLA) 05:37 < plexdev> http://is.gd/aR5QC by [Russ Cox] in go/src/cmd/goinstall/ -- goinstall: let git/hg/svn create the final directory element 05:38 -!- Xera^ [~brit@87-194-208-246.bethere.co.uk] has quit [Quit: ( www.nnscript.com :: NoNameScript 4.21 :: www.esnation.com )] 05:53 < megaboz> any way to get around named enums in cgo? 05:53 -!- TMKCodes [~toni@bbwirelessgw2-fee1dc00-62.dhcp.inet.fi] has quit [Ping timeout: 276 seconds] 05:54 -!- jshipley [~jshipley@174-23-125-69.slkc.qwest.net] has quit [Quit: It's night] 05:54 -!- lloyda2 [~adam@lloyda2.stu.rpi.edu] has joined #go-nuts 06:05 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 06:06 -!- TMKCodes [~toni@bbwirelessgw2-fee1dc00-62.dhcp.inet.fi] has joined #go-nuts 06:12 < anticw> megaboz: get around? 06:12 < anticw> oh, you mean they're not working? 06:12 -!- nf [~nf@124-171-2-62.dyn.iinet.net.au] has quit [Remote host closed the connection] 06:12 -!- nf [~nf@203-214-148-143.perm.iinet.net.au] has joined #go-nuts 06:20 -!- m1ndwarp [~m1ndwarp@xdsl-78-35-155-92.netcologne.de] has joined #go-nuts 06:39 < anticw> akrill: fwiw, the first public protobuf implementation supporting Go got committed 06:41 -!- souffledev [~soufflede@110-174-144-249.static.tpgi.com.au] has joined #go-nuts 06:42 -!- pdusen [~pdusen@crob4-55.flint.umich.edu] has quit [Read error: Connection reset by peer] 06:42 -!- pdusen [~pdusen@crob4-55.flint.umich.edu] has joined #go-nuts 06:42 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 06:46 -!- illya77 [~illya77@193-156-178-94.pool.ukrtel.net] has quit [Read error: Connection reset by peer] 06:49 -!- dilenger [~dilenger@124-171-12-229.dyn.iinet.net.au] has quit [Remote host closed the connection] 06:56 -!- i3d [~i3d@unaffiliated/i3dmaster] has quit [Quit: i3d] 07:08 -!- rsaarelm [~rsaarelm@cs181128175.pp.htv.fi] has quit [Ping timeout: 245 seconds] 07:10 -!- rsaarelm [~rsaarelm@cs181128175.pp.htv.fi] has joined #go-nuts 07:14 -!- cbeck_ [~cbeck@c-67-170-181-181.hsd1.or.comcast.net] has left #go-nuts [] 07:15 -!- cbeck [~cbeck@c-67-170-181-181.hsd1.or.comcast.net] has joined #go-nuts 07:17 -!- tumdum [~tumdum@unaffiliated/tumdum] has joined #go-nuts 07:17 -!- tumdum [~tumdum@unaffiliated/tumdum] has quit [Client Quit] 07:39 -!- millertimek1a2m3 [~adam@r74-192-243-70.tyrdcmta02.tylrtx.tl.dh.suddenlink.net] has quit [Ping timeout: 260 seconds] 07:41 < megaboz> doh! i'm using cgo on a library that has a bool typedef. 07:41 < megaboz> C.bool() gets overriden right? 07:46 -!- nf [~nf@203-214-148-143.perm.iinet.net.au] has quit [Ping timeout: 240 seconds] 07:48 -!- nf [~nf@124-171-44-25.dyn.iinet.net.au] has joined #go-nuts 07:54 < anticw> it might not 07:54 < anticw> you'd have to check 08:04 -!- kanru [~kanru@61-228-158-15.dynamic.hinet.net] has joined #go-nuts 08:04 -!- nanoo [~nano@95-89-189-46-dynip.superkabel.de] has joined #go-nuts 08:07 -!- path[l] [UPP@120.138.102.34] has quit [Quit: path[l]] 08:10 -!- Gracenotes [~person@wikipedia/Gracenotes] has quit [Ping timeout: 260 seconds] 08:15 -!- nf [~nf@124-171-44-25.dyn.iinet.net.au] has quit [Ping timeout: 258 seconds] 08:15 -!- nf [~nf@124-171-15-21.dyn.iinet.net.au] has joined #go-nuts 08:20 -!- nf [~nf@124-171-15-21.dyn.iinet.net.au] has quit [Ping timeout: 246 seconds] 08:22 -!- nf [~nf@124-168-133-218.dyn.iinet.net.au] has joined #go-nuts 08:23 -!- Gracenotes [~person@wikipedia/Gracenotes] has joined #go-nuts 08:25 -!- General13372 [~support@71-84-246-14.dhcp.gldl.ca.charter.com] has joined #go-nuts 08:28 -!- General1337 [~support@71-84-246-14.dhcp.gldl.ca.charter.com] has quit [Ping timeout: 260 seconds] 08:38 -!- kashia_ [~Kashia@p4FEB4BD6.dip.t-dialin.net] has left #go-nuts [] 08:38 -!- Kashia [~Kashia@p4FEB4BD6.dip.t-dialin.net] has joined #go-nuts 08:43 -!- fusion44 [~quassel@p5B286649.dip.t-dialin.net] has joined #go-nuts 08:48 -!- m1ndwarp [~m1ndwarp@xdsl-78-35-155-92.netcologne.de] has quit [Quit: m1ndwarp] 08:48 -!- OpenSpace [~ja@91.150.111.116] has joined #go-nuts 08:51 -!- path[l] [UPP@120.138.102.34] has joined #go-nuts 08:53 -!- BlackBook [~sjs@kernel-panic/member/TiBook] has joined #go-nuts 09:00 -!- kssreeram_ [~kssreeram@122.174.129.183] has joined #go-nuts 09:01 -!- kssreeram [~kssreeram@122.174.65.111] has quit [Ping timeout: 246 seconds] 09:11 -!- pvandusen [~pdusen@crob4-55.flint.umich.edu] has joined #go-nuts 09:12 -!- pdusen [~pdusen@crob4-55.flint.umich.edu] has quit [Read error: Connection reset by peer] 09:13 -!- gr1b [~gr1b@c-98-235-184-236.hsd1.pa.comcast.net] has quit [Ping timeout: 265 seconds] 09:13 -!- gr1b [~gr1b@c-98-235-184-236.hsd1.pa.comcast.net] has joined #go-nuts 09:28 -!- BlackBook [~sjs@kernel-panic/member/TiBook] has quit [Quit: This computer has gone to sleep] 09:33 -!- dju_ [dju@89-158-203-183.rev.dartybox.com] has quit [Ping timeout: 246 seconds] 09:35 -!- akrill [~akrill@dynamic-216-231-57-80.sea0.krillr.com] has quit [Quit: akrill] 09:35 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined #go-nuts 09:35 -!- souffledev [~soufflede@110-174-144-249.static.tpgi.com.au] has quit [Ping timeout: 252 seconds] 09:36 -!- dju [dju@89-158-252-87.rev.dartybox.com] has joined #go-nuts 09:39 -!- souffledev [~soufflede@110-174-144-249.static.tpgi.com.au] has joined #go-nuts 09:54 -!- fusion44 [~quassel@p5B286649.dip.t-dialin.net] has quit [Remote host closed the connection] 10:00 -!- jophish [~jophish@hermi.gotadsl.co.uk] has joined #go-nuts 10:11 -!- General13372 [~support@71-84-246-14.dhcp.gldl.ca.charter.com] has quit [Read error: Connection reset by peer] 10:11 -!- ikaros [~ikaros@f050227254.adsl.alicedsl.de] has joined #go-nuts 10:11 -!- General1337 [~support@71-84-246-14.dhcp.gldl.ca.charter.com] has joined #go-nuts 10:12 -!- chrome [chrome@mars.stupendous.net] has quit [Ping timeout: 268 seconds] 10:16 -!- chrome [chrome@mars.stupendous.net] has joined #go-nuts 10:24 -!- wrtp [~rog@89.241.218.64] has joined #go-nuts 10:27 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-176-214.clienti.tiscali.it] has joined #go-nuts 10:36 -!- nanooo [~nano@95-89-189-46-dynip.superkabel.de] has joined #go-nuts 10:38 -!- nanoo [~nano@95-89-189-46-dynip.superkabel.de] has quit [Ping timeout: 260 seconds] 10:50 -!- pvanduse [~pdusen@crob4-55.flint.umich.edu] has joined #go-nuts 10:50 -!- no_mind [~orion@122.161.210.175] has quit [Ping timeout: 245 seconds] 10:51 -!- pvandusen [~pdusen@crob4-55.flint.umich.edu] has quit [Read error: Connection reset by peer] 10:51 -!- no_mind [~orion@122.161.210.175] has joined #go-nuts 10:57 -!- pvanduse [~pdusen@crob4-55.flint.umich.edu] has quit [Read error: Connection reset by peer] 10:57 -!- pvanduse [~pdusen@crob4-55.flint.umich.edu] has joined #go-nuts 11:00 -!- suurMyy [~suurMyy@xdsl-83-150-84-113.nebulazone.fi] has quit [Remote host closed the connection] 11:13 -!- jophish [~jophish@hermi.gotadsl.co.uk] has quit [Remote host closed the connection] 11:17 -!- KnightMage [~jon@cpc1-nmal11-0-0-cust468.croy.cable.virginmedia.com] has joined #go-nuts 11:20 -!- jophish [~jophish@hermi.gotadsl.co.uk] has joined #go-nuts 11:23 -!- jophish [~jophish@hermi.gotadsl.co.uk] has quit [Read error: Connection reset by peer] 11:26 -!- jophish [~jophish@hermi.gotadsl.co.uk] has joined #go-nuts 11:46 -!- hstimer_ [~hstimer@2002:62ea:197d:0:226:bbff:fe05:dd9b] has joined #go-nuts 11:46 -!- hstimer [~hstimer@c-98-234-25-125.hsd1.ca.comcast.net] has quit [Read error: Connection reset by peer] 11:49 -!- hstimer [~hstimer@2002:62ea:197d:0:226:bbff:fe05:dd9b] has quit [Remote host closed the connection] 11:50 -!- hstimer [~hstimer@c-98-234-25-125.hsd1.ca.comcast.net] has joined #go-nuts 11:54 -!- yatoo [~marcus@host86-156-158-64.range86-156.btcentralplus.com] has joined #go-nuts 12:06 -!- m1ndwarp [~m1ndwarp@xdsl-78-35-155-92.netcologne.de] has joined #go-nuts 12:06 -!- brx [~brx@p5796FD6D.dip.t-dialin.net] has joined #go-nuts 12:18 -!- exch [~nuada@h144170.upc-h.chello.nl] has quit [Ping timeout: 268 seconds] 12:19 -!- exch [~nuada@h144170.upc-h.chello.nl] has joined #go-nuts 12:24 -!- no_mind [~orion@122.161.210.175] has quit [Ping timeout: 246 seconds] 12:39 -!- tor5 [~tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has joined #go-nuts 12:44 -!- illya77 [~illya77@52-186-95-178.pool.ukrtel.net] has joined #go-nuts 13:02 -!- no_mind [~orion@122.161.210.175] has joined #go-nuts 13:14 -!- amacleod [amacleod@c-75-69-45-62.hsd1.ma.comcast.net] has joined #go-nuts 13:16 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 13:20 -!- pvandusen [~pdusen@crob4-55.flint.umich.edu] has joined #go-nuts 13:23 -!- pvanduse [~pdusen@crob4-55.flint.umich.edu] has quit [Ping timeout: 246 seconds] 13:27 -!- skelterjohn [~jasmuth@c-76-124-23-95.hsd1.nj.comcast.net] has joined #go-nuts 13:33 -!- illya77 [~illya77@52-186-95-178.pool.ukrtel.net] has quit [Read error: Connection reset by peer] 13:34 -!- nocturnal [~nocturnal@95.209.169.221] has joined #go-nuts 13:35 < nocturnal> is there a package with a function to convert between []byte and string? 13:35 < Kashia_> just cast 13:35 < Kashia_> []byte("somestring") 13:36 < nocturnal> oh that's how you do it, thanks 13:36 < Kashia_> you're welcome 13:38 < kmeyer> the opposite works too, yes? 13:38 < kmeyer> string([]byte{1,2,3}) 13:39 < kmeyer> (and IIRC anything that isn't a valid utf8 glyph becomes the unicode glyph 'invalid') 13:40 < KnightMage> is there a way to do dynamically linked libraries using the 6g compiler? I mean, all done in Go, so a Go library that is a .so file that another go program can link to? 13:41 < kmeyer> not with the gc compilers yet, I don't think 13:41 < KnightMage> Will that be added at some point? 13:42 < kmeyer> Presumably 13:44 < KnightMage> cool. can't wait for that feature. :) 13:44 < kmeyer> me either ;) 13:45 < KnightMage> glad I'm not the only one. :P 13:45 -!- nocturnal [~nocturnal@95.209.169.221] has left #go-nuts [] 13:49 -!- souffledev [~soufflede@110-174-144-249.static.tpgi.com.au] has quit [Quit: <>] 13:53 < KnightMage> Currently, the Go tool chain is written in C. Will it be converted to a pure Go code in the future? 13:55 < dagle> KnightMage: It might happen. 13:56 < KnightMage> That would be cool if it did, then there would be no outside dependencies. :) 13:56 -!- fusion44 [~quassel@p5B286649.dip.t-dialin.net] has joined #go-nuts 13:59 -!- megaboz [~megaboz@unaffiliated/megaboz] has quit [Ping timeout: 248 seconds] 13:59 -!- megaboz [~megaboz@189.115.33.111] has joined #go-nuts 14:06 -!- mikedee [~quassel@91.111.5.225] has quit [Remote host closed the connection] 14:06 -!- awidegreen [~quassel@p5B060775.dip.t-dialin.net] has joined #go-nuts 14:07 < dagle> KnightMage: Go doesn't depend on it's own C toolchain atm. :) 14:07 < dagle> KnightMage: Go depend on it's own C toolchain atm. :) 14:07 < dagle> * 14:08 < KnightMage> ah 14:10 -!- wrtp [~rog@89.241.218.64] has quit [Quit: wrtp] 14:16 -!- X-Scale [email@89.180.218.89] has quit [Ping timeout: 260 seconds] 14:20 -!- skelterjohn [~jasmuth@c-76-124-23-95.hsd1.nj.comcast.net] has quit [Ping timeout: 246 seconds] 14:21 -!- skelterjohn [~jasmuth@c-76-124-23-95.hsd1.nj.comcast.net] has joined #go-nuts 14:22 -!- skelterjohn [~jasmuth@c-76-124-23-95.hsd1.nj.comcast.net] has quit [Client Quit] 14:22 -!- mikedee [~quassel@91.111.5.225] has joined #go-nuts 14:28 -!- mtl [mtl@shell.pox.fi] has joined #go-nuts 14:30 -!- kssreeram [~kssreeram@122.174.129.183] has quit [Read error: Connection reset by peer] 14:31 -!- kssreeram [~kssreeram@122.174.129.183] has joined #go-nuts 14:35 -!- no_mind [~orion@122.161.210.175] has quit [Ping timeout: 245 seconds] 14:36 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has joined #go-nuts 14:37 -!- hevalbaranov [~hevalbara@88.244.42.98] has joined #go-nuts 14:38 -!- tor5 [~tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has left #go-nuts [] 14:42 -!- hstimer [~hstimer@c-98-234-25-125.hsd1.ca.comcast.net] has quit [Quit: hstimer] 14:49 -!- illya77 [~illya77@243-194-95-178.pool.ukrtel.net] has joined #go-nuts 14:49 -!- no_mind [~orion@122.161.32.14] has joined #go-nuts 14:58 -!- no_mind [~orion@122.161.32.14] has quit [Ping timeout: 240 seconds] 14:58 -!- dju [dju@89-158-252-87.rev.dartybox.com] has quit [Quit: Quitte] 15:02 -!- KnightMage [~jon@cpc1-nmal11-0-0-cust468.croy.cable.virginmedia.com] has quit [Quit: Konversation terminated!] 15:10 -!- sudi [~chatzilla@dslb-084-056-030-097.pools.arcor-ip.net] has joined #go-nuts 15:10 -!- dju [dju@89-158-252-87.rev.dartybox.com] has joined #go-nuts 15:10 -!- riomare1 [~riomare1@93-103-94-70.dynamic.dsl.t-2.net] has joined #go-nuts 15:11 -!- riomare1 [~riomare1@93-103-94-70.dynamic.dsl.t-2.net] has quit [Client Quit] 15:11 -!- no_mind [~orion@122.162.118.80] has joined #go-nuts 15:11 -!- awidegreen [~quassel@p5B060775.dip.t-dialin.net] has quit [Remote host closed the connection] 15:13 -!- awidegreen [~quassel@p5B060775.dip.t-dialin.net] has joined #go-nuts 15:16 -!- dju [dju@89-158-252-87.rev.dartybox.com] has quit [Ping timeout: 258 seconds] 15:33 -!- dju [~dju@89-158-252-87.rev.dartybox.com] has joined #go-nuts 15:34 -!- skelterjohn [~jasmuth@c-76-124-23-95.hsd1.nj.comcast.net] has joined #go-nuts 15:47 -!- Surma [~surma@95-88-88-128-dynip.superkabel.de] has joined #go-nuts 15:47 < Surma> hey guys. is there a particular reason why channels can't be receivers? 15:48 < Kashia_> could you explain in more detail? 15:49 -!- illya77 [~illya77@243-194-95-178.pool.ukrtel.net] has quit [Ping timeout: 240 seconds] 15:53 -!- hevalbaranov [~hevalbara@88.244.42.98] has quit [Quit: WeeChat 0.2.6.3] 15:59 -!- guutlee [~gordon@host-2-148-3-96.midco.net] has joined #go-nuts 16:00 < guutlee> \q 16:00 -!- guutlee [~gordon@host-2-148-3-96.midco.net] has quit [Client Quit] 16:01 -!- kanru [~kanru@61-228-158-15.dynamic.hinet.net] has quit [Quit: WeeChat 0.3.1.1] 16:12 < Surma> Kashia_: Well, the compiler complains about me defining a function func (c *char byte) ... or func (c char byte)... it says "invalid receiver type" 16:13 < Kashia_> char? or chan 16:13 < Surma> chan 16:13 < Surma> sorry 16:17 < Kashia_> could you paste the code? 16:17 < Kashia_> as a simple `func f(c chan byte) {}` in itself does not produce that error 16:18 -!- fusion44 [~quassel@p5B286649.dip.t-dialin.net] has quit [Remote host closed the connection] 16:19 < Kashia_> http://pastie.org/879752 as a reference on what I understood that you did 16:19 -!- fusion44 [~quassel@p5B286649.dip.t-dialin.net] has joined #go-nuts 16:24 < Surma> Kashia_: I mean chan int as a receiver type: http://pastie.org/879760 16:25 < Kashia_> you mean a pointer to a channel? 16:25 < Surma> for example - yeah. I thought receiver-declaration have to be pointers 16:26 < Kashia_> then you have to go all the way http://pastie.org/879762 16:26 < Surma> Kashia_: Would you mind looking at my paste? I wanted to somehow define c.do() not do(c) 16:27 < Kashia_> ah sorry, it confused me :) 16:29 < Kashia_> http://pastie.org/879766 16:29 < Kashia_> as you can't add methods to core types, only your own 16:29 < Surma> oh really? I didn't know that. thanks :) 16:30 < Kashia_> you're welcome 16:30 < Surma> Is there a particular reason for that? I mean, what's the point in forcing you to typedef a channel with your own in order to make it implement io.Reader or whatever 16:31 < Kashia_> type safety is a reason 16:31 < Kashia_> if you know Ruby (especially Ruby on Rails) you will know why 16:32 < Kashia_> extending the core with functionality will confuse users 16:32 < Surma> hm... makes sense. one line typedef is probably a fair tradeoff for clean design 16:32 < Surma> thanks :) 16:32 -!- Surma [~surma@95-88-88-128-dynip.superkabel.de] has left #go-nuts [] 16:40 -!- meanburrito920_ [~john@unaffiliated/meanburrito920] has quit [Ping timeout: 260 seconds] 16:41 -!- meanburrito920_ [~john@unaffiliated/meanburrito920] has joined #go-nuts 16:46 -!- kssreeram [~kssreeram@122.174.129.183] has quit [Quit: kssreeram] 16:47 -!- kssreeram [~kssreeram@122.174.129.183] has joined #go-nuts 16:49 -!- TMKCodes [~toni@bbwirelessgw2-fee1dc00-62.dhcp.inet.fi] has quit [Ping timeout: 240 seconds] 16:50 -!- TMKCodes [~toni@bbwirelessgw2-fee1dc00-62.dhcp.inet.fi] has joined #go-nuts 16:56 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-176-214.clienti.tiscali.it] has quit [Ping timeout: 240 seconds] 16:58 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 17:05 -!- TMKCodes [~toni@bbwirelessgw2-fee1dc00-62.dhcp.inet.fi] has quit [Ping timeout: 240 seconds] 17:06 -!- skelterjohn_ [~jasmuth@c-76-124-23-95.hsd1.nj.comcast.net] has joined #go-nuts 17:09 -!- reiddraper [~reiddrape@209-6-43-251.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #go-nuts 17:11 -!- reiddraper [~reiddrape@209-6-43-251.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has quit [Client Quit] 17:12 -!- reiddraper [~reiddrape@209-6-43-251.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #go-nuts 17:13 -!- reiddraper [~reiddrape@209-6-43-251.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has left #go-nuts [] 17:13 -!- reiddraper [~reiddrape@209-6-43-251.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #go-nuts 17:15 -!- reiddraper [~reiddrape@209-6-43-251.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has left #go-nuts [] 17:16 -!- Xera^ [~brit@87-194-208-246.bethere.co.uk] has joined #go-nuts 17:16 -!- reiddraper [~reiddrape@209-6-43-251.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #go-nuts 17:18 -!- TMKCodes [~toni@bbwirelessgw2-fee1dc00-62.dhcp.inet.fi] has joined #go-nuts 17:19 -!- nettok [~netto@200.119.154.45] has joined #go-nuts 17:22 < reiddraper> anyone played around with net.TCPConn or net.netFD? 17:26 < anticw> tangentially 17:28 -!- hstimer [~hstimer@c-98-234-25-125.hsd1.ca.comcast.net] has joined #go-nuts 17:28 < reiddraper> i'm trying to use epoll via fd_linux.go, and i need to actual int fd called sysfd in the net.netFD struct 17:28 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts 17:28 < reiddraper> but, unless i'm missing something (entirely possible), it's not exposed in any way in the TCPConn or netFD struct 17:29 < anticw> nope, i have a similar issue in general with net/* 17:31 < reiddraper> alright, thanks 17:32 < anticw> i dont entirely like the way net works right now, a lot of the complexity seems to be for timeouts 17:32 < anticw> which most modern IP stacks can do on a per-socket basis anyhow 17:32 < reiddraper> right 17:33 < reiddraper> perhaps this is just a good excuse now for me to get my hands dirtier with go / lower-level socket stuff 17:33 < reiddraper> there's relatively little source in fd.go anywa 17:35 < anticw> low-level socket stuff ends up ugly, there does need to be a layer over that 17:36 < reiddraper> can you think of any particular reason it would be bad to have a getter for netFD.sysfd? 17:36 < anticw> but im not sure i like what there is now 17:36 < reiddraper> for me now, that's all i really think i need 17:36 < anticw> there are no idomatic uses for touching the low-level fd 17:37 < reiddraper> well, registering events with epoll 17:38 < reiddraper> that is, unless you changed fd_linux to take in a netFD struct instead of just a fd 17:38 < anticw> i dont disagree with you at all, i have had similar needs 17:39 < reiddraper> you working on anything particular? 17:40 < anticw> random things, the first time this bit me was doing a STOMP broker 17:41 < anticw> last night i added raw ip socket & icmp/ping support 17:41 < anticw> i 17:41 < anticw> ill submit that later after some cleanups 17:42 < anticw> (ipv6 isn't work as-is, need to fix) 17:44 < reiddraper> great 17:47 < anticw> anyhow, the frustration there was i couldn't do a ping module w/o adding raw support to net, w/ basic socket access i could have 17:47 -!- rahcola [jprahkol@melkki.cs.helsinki.fi] has joined #go-nuts 17:49 < anticw> anyhow, kids birthday, bbl 17:49 < reiddraper> thanks for the help 17:54 -!- Surma [~surma@95-88-88-128-dynip.superkabel.de] has joined #go-nuts 17:56 < Surma> Hey. I just saw this in the source code of the fmt package: p, ok := <-ppFree, where ppFree is a chan *pp. Is this a way to use channel "non-blocking"? 17:57 < Surma> And if yes, isn't this worth putting into the Lang Spec? 17:58 -!- mtl [mtl@shell.pox.fi] has left #go-nuts [] 17:58 < reiddraper> how was ppFree defined? as a buffered or synchronous channel? 17:59 < Surma> I guess buffered: ppFree := make(chan *pp, 100) 17:59 < Surma> I didn't even know there were two types of channels 17:59 < Surma> is this in the docs somewhere? 18:00 < Surma> oh just found it 18:00 < Surma> thanks 18:00 < reiddraper> http://golang.org/doc/effective_go.html#channels 18:00 < reiddraper> no prob 18:01 < Surma> May I suggest to somewhat update the lang spec? it's really confusing that some stuff is only in "effective go" and not in the specs (i'd assume to find *everything* in there) 18:02 -!- meanburrito920_ [~john@unaffiliated/meanburrito920] has quit [Ping timeout: 276 seconds] 18:03 -!- nf [~nf@124-168-133-218.dyn.iinet.net.au] has quit [Ping timeout: 240 seconds] 18:04 -!- millertimek1a2m3 [~adam@r74-192-243-70.tyrdcmta02.tylrtx.tl.dh.suddenlink.net] has joined #go-nuts 18:07 < reiddraper> what extra information is in effective go that isn't here? http://golang.org/doc/go_spec.html#Channel_types 18:07 < reiddraper> though i agree that effective go does a much better job explaining the difference between a buffered and a synchronous channel 18:12 -!- wrtp [~rog@89.241.218.64] has joined #go-nuts 18:14 -!- carllerche [~carllerch@208.87.61.146] has joined #go-nuts 18:14 -!- millertimek1a2m3 [~adam@r74-192-243-70.tyrdcmta02.tylrtx.tl.dh.suddenlink.net] has quit [Remote host closed the connection] 18:15 -!- nf [~nf@203-158-54-141.dyn.iinet.net.au] has joined #go-nuts 18:18 < Surma> reiddraper: well, you are right. It seems like everything is there, the buffered channels are also there, but a little easy to oversee (in my opinion). What seems to be missing in both, is how you check whether a buffered channel is empty. It might be logical to assume that comma-ok is the way to go. But I would much rather see it explicitly documented 18:19 -!- cw_ [~cw@parsec.stupidest.org] has quit [Ping timeout: 245 seconds] 18:19 -!- cw [~cw@parsec.stupidest.org] has joined #go-nuts 18:20 < reiddraper> can you ask for the length of a channel? 18:20 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-176-214.clienti.tiscali.it] has joined #go-nuts 18:21 < Surma> i guess, I don't really know cap()? 18:21 -!- kashia__ [~Kashia@p4FEB387F.dip.t-dialin.net] has joined #go-nuts 18:22 < KirkMcDonald> reiddraper: No. In fact, it may not even have one. 18:23 < reiddraper> just out of curiosity, what is the use case for wanting to know the whether a buffered channel is empty or not? 18:24 -!- Kashia_ [~Kashia@p4FEB4BD6.dip.t-dialin.net] has quit [Ping timeout: 256 seconds] 18:25 < Surma> reiddraper: buffered channels are non-blocking, so it's rather crucial to know whether you just got useful data or still got the one from the last iteration (or whatever) 18:26 < reiddraper> Surma: sorry, I'm not quite following, can you distinguish between "useful data" and "one from the last iteration"? 18:27 < Surma> if you call " for { i <- someChannel; doSomethingWithi() }", and someChannel is buffered, the read from the channel will be non-blocking 18:28 < Surma> so if the channel is empty, i won't be changed (i assume) 18:28 < reiddraper> right, it will block until someone puts something into someChannel 18:28 < Surma> so you really do need a way to check wether i just received a new (not necessarily distinguishable) value 18:29 < Surma> reiddraper: as far as I understood the documentation, they don't block - that's what's the difference between buffered and unbuffered channe;s 18:30 < reiddraper> perhaps my understanding of "blocking" is different 18:30 < skelterjohn> buffered channels will block if there is nothing in the buffer 18:30 < reiddraper> i understand blocking to mean, if the channel is unbuffered, you can put one thing into the channel, and you will wait until that one thing is received on the other end 18:31 < skelterjohn> oh sorry 18:31 < skelterjohn> they will block on read if there is nothing in the channel 18:31 < reiddraper> correct 18:31 < skelterjohn> they will block on write if the buffer is full 18:31 < reiddraper> yep 18:32 < reiddraper> when you say that an unbuffered (or synchronous) channel is "blocking", it just means that you must wait till the other end receives what you just put in 18:32 < Surma> skelterjohn: oh really? than what *IS* the point of the comma-ok in the fmt package? see http://golang.org/src/pkg/fmt/print.go#L155 18:32 < reiddraper> buffered or not, you always have to wait for a value to come out 18:33 < reiddraper> ppFree returns two values 18:33 < skelterjohn> val, ok <- chan will never block 18:34 < skelterjohn> if it would have blocked with just "val <- chan" 18:34 < skelterjohn> it will not block, val will be zero, and ok will be false 18:34 < Surma> ah okay, so my first assumption was correct. thanks for the clarification 18:34 < Surma> and I think *THATS* something that belongs somewhere in the specs, doesn't it? 18:34 < skelterjohn> it's in there 18:35 < Surma> it is?! i couldn't find it under channels. neither in effective go nor in the lang specs 18:35 < skelterjohn> http://golang.org/doc/go_spec.html#Communication_operators 18:36 < skelterjohn> "If a receive expression is used in an assignment or initialization of the form <snip> the receive operation becomes non-blocking." 18:36 < skelterjohn> where <snip> shows an example of val, ok <- ch 18:36 < Surma> oh okay, well shame on me then :-/ 18:37 < skelterjohn> might be easier to search if everything having to do with chans were in a single place, instead of having one sections be their declarations, and another being their uses 18:37 < reiddraper> yeah, i had missed that too 18:38 < reiddraper> Surma: I now see your frustration 18:38 -!- Xurix [~Luixsia@AToulouse-254-1-7-95.w83-203.abo.wanadoo.fr] has quit [Ping timeout: 246 seconds] 18:38 < Surma> haha, thanks ^^ but I guess it's a rather difficult and tedious task to get a nicely organized documentation for a language 18:39 < Surma> And now for something completely different: Is there a way to check whether a net.Conn is still open? I have the problem that when I start to write to a net.Conn (which the client has already closed) my program just exits. No error, no nothing. Am I missing something? 18:39 -!- carllerche [~carllerch@208.87.61.146] has quit [Quit: carllerche] 18:41 < Surma> (a net.TCPConn to be specific) 18:41 -!- boscop_ [~boscop@f050133169.adsl.alicedsl.de] has joined #go-nuts 18:43 < reiddraper> i haven't seen anything, i've run into a few stopgaps with the net package 18:43 -!- boscop [~boscop@f050131251.adsl.alicedsl.de] has quit [Ping timeout: 246 seconds] 18:45 < Surma> damn 18:45 -!- Xurix [~Luixsia@AToulouse-254-1-34-60.w81-250.abo.wanadoo.fr] has joined #go-nuts 18:46 -!- meanburrito920_ [~john@unaffiliated/meanburrito920] has joined #go-nuts 18:46 < reiddraper> seems to be no way of getting at int file descriptors either 18:58 -!- m1ndwarp [~m1ndwarp@xdsl-78-35-155-92.netcologne.de] has quit [Ping timeout: 246 seconds] 18:59 -!- sudi [~chatzilla@dslb-084-056-030-097.pools.arcor-ip.net] has quit [Remote host closed the connection] 19:05 -!- m1ndwarp [~m1ndwarp@xdsl-78-35-138-121.netcologne.de] has joined #go-nuts 19:11 -!- KillerX [~anant@145.116.234.40] has joined #go-nuts 19:11 -!- KillerX [~anant@145.116.234.40] has quit [Changing host] 19:11 -!- KillerX [~anant@gentoo/developer/KillerX] has joined #go-nuts 19:16 -!- m1ndwarp [~m1ndwarp@xdsl-78-35-138-121.netcologne.de] has quit [Quit: m1ndwarp] 19:19 -!- nettok [~netto@200.119.154.45] has quit [Ping timeout: 246 seconds] 19:21 -!- mikedee [~quassel@91.111.5.225] has quit [Remote host closed the connection] 19:22 -!- kashia__ [~Kashia@p4FEB387F.dip.t-dialin.net] has quit [Quit: This computer has gone to sleep] 19:24 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 19:27 -!- mikedee [~quassel@91.111.5.225] has joined #go-nuts 19:29 -!- TMKCodes [~toni@bbwirelessgw2-fee1dc00-62.dhcp.inet.fi] has quit [Ping timeout: 246 seconds] 19:33 -!- nettok [~netto@200.119.154.45] has joined #go-nuts 19:34 -!- gnuvince [~vince@72.0.219.6] has quit [Ping timeout: 256 seconds] 19:35 -!- gnuvince [~vince@72.0.219.6] has joined #go-nuts 19:39 -!- KillerX [~anant@gentoo/developer/KillerX] has quit [Quit: Leaving.] 19:41 -!- TMKCodes [~toni@bbwirelessgw2-fee1dc00-62.dhcp.inet.fi] has joined #go-nuts 19:48 < ni|> is there a conversion library? 19:52 -!- reiddraper [~reiddrape@209-6-43-251.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has quit [Quit: reiddraper] 19:52 -!- digi9 [none@csplan9.rit.edu] has joined #go-nuts 19:53 -!- qrush [~qrush@129.21.81.118] has joined #go-nuts 19:53 < exch> if by conversion you mean convert fron int to string and such, try the strconv package 19:53 < ni|> i'm looking for binary to ascii like stuff 19:53 < ni|> just a project to play with 19:54 < digi9> Hello, I have a question regarding arrays. If I have, say, a function "f" and an array of functions "funcs", is there a simple/built-in way to get an array of functions that is basically "funcs" with "f" as the first element? 19:55 -!- nettok_ [~netto@200.119.154.45] has joined #go-nuts 19:58 < ni|> digi9: arrays or slices 19:58 < ni|> often people mean slices for go 19:58 < digi9> well 19:59 < digi9> sure 19:59 -!- nettok [~netto@200.119.154.45] has quit [Ping timeout: 265 seconds] 19:59 < Surma> ni|: Use a simple string-cast on a byte-slice 20:00 < ni|> Surma: i finished it already 20:00 < Surma> oh k 20:00 < ni|> thx, i did something like that 20:01 -!- nettok__ [~netto@200.119.154.45] has joined #go-nuts 20:01 < smw> digi9: you could easily make a function to do that. Most languages call it unshift. 20:02 < digi9> ok, I think it should be pretty straightforward 20:02 -!- jesusaurus [jesusaur@firefly.cat.pdx.edu] has left #go-nuts [] 20:02 < smw> digi9: just move every element over one starting at the end. (no there is not a more efficent way) 20:02 < smw> yeah 20:03 < smw> and if anyone knows if go has unshift, let me know :-) 20:04 -!- nettok_ [~netto@200.119.154.45] has quit [Ping timeout: 256 seconds] 20:05 -!- Amaranth [~travis@ubuntu/member/Amaranth] has quit [Quit: Ex-Chat] 20:05 -!- Amaranth [~travis@ubuntu/member/Amaranth] has joined #go-nuts 20:08 -!- nanooo [~nano@95-89-189-46-dynip.superkabel.de] has quit [Quit: Leaving] 20:17 < exch> is there a reason why the strings package still has no Replace() function? Or is it hidden elsewhere? 20:19 -!- nettok__ [~netto@200.119.154.45] has quit [Ping timeout: 260 seconds] 20:21 -!- reiddraper [~reiddrape@static-71-243-120-39.bstnma.east.verizon.net] has joined #go-nuts 20:21 -!- fusion44 [~quassel@p5B286649.dip.t-dialin.net] has quit [Remote host closed the connection] 20:25 -!- General13372 [~support@71-84-246-14.dhcp.gldl.ca.charter.com] has joined #go-nuts 20:29 -!- General1337 [~support@71-84-246-14.dhcp.gldl.ca.charter.com] has quit [Ping timeout: 248 seconds] 20:31 < ni|> Surma: ping 20:31 < Surma> ni|: pong 20:33 -!- nettok__ [~netto@200.119.154.45] has joined #go-nuts 20:34 < Surma> Guys, what's the more idiomatic way? I create a bufio.Reader with bufio.NewReader and get a pointer. Should I pass the pointer around to my functions or "dereference" the pointer and pass "the value"? 20:34 < ni|> Surma: sorry i gg do this stupid thing 20:34 < ni|> i'll be back later 20:34 < ni|> meetings 20:35 < exch> I pass pointers around as much as I can 20:36 < exch> not sure if it's 'idiomatic', it's just a habit I suppose 20:38 < Surma> I was just wondering :) 20:44 -!- alexbobp [~alex@66.112.249.238] has joined #go-nuts 20:44 < alexbobp> oh, hey tcoppi 20:45 < tcoppi> hi 20:45 < alexbobp> so does this language use type inferrence? 20:45 < alexbobp> it looked like it from the code examples 20:46 -!- dju [~dju@89-158-252-87.rev.dartybox.com] has quit [Quit: Quitte] 20:47 -!- nettok_ [~netto@200.119.154.45] has joined #go-nuts 20:47 < tcoppi> when declaring variables you get inference, but it won't automatically convert between types 20:49 < alexbobp> good, because a language *shouldn't* do that :P 20:49 * alexbobp mumbles some obscenities about dynamic typing 20:51 -!- nettok__ [~netto@200.119.154.45] has quit [Ping timeout: 256 seconds] 21:01 < Surma> Who does one debug a go program nowadays? My program keeps panicking and throws an unreadable string - I have no idea anymore where it might come from 21:01 -!- nettok__ [~netto@200.119.154.45] has joined #go-nuts 21:02 < Surma> Who=How* 21:03 < exch> Not sure what the status is of the Go debugger (Ogle), but last I checked, it wasn't really very useful yet 21:03 < exch> I just go by the panic message it throws. There's usually something in there that helps 21:03 < exch> If not, I just start commenting out the things I added most recently 21:04 < Surma> as I said, mines unreadable, seems like random characters (a memery region?) 21:04 < Surma> and it's not really reproducable 21:04 < Surma> i just start it over and over, and from time to time it crashed. race conditions are hard to comment out :-/ 21:05 < exch> hmm that's a problem 21:05 -!- nettok_ [~netto@200.119.154.45] has quit [Ping timeout: 264 seconds] 21:05 -!- rahcola [jprahkol@melkki.cs.helsinki.fi] has left #go-nuts [] 21:07 -!- nettok_ [~netto@200.119.154.45] has joined #go-nuts 21:09 -!- boscop_ [~boscop@f050133169.adsl.alicedsl.de] has left #go-nuts [] 21:09 -!- boscop [~boscop@f050133169.adsl.alicedsl.de] has joined #go-nuts 21:09 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has quit [Ping timeout: 276 seconds] 21:10 < Surma> How do I get ogle? It's not in my go source tree and I have no clue when it comes to hg 21:10 -!- nettok__ [~netto@200.119.154.45] has quit [Ping timeout: 276 seconds] 21:11 < Surma> sorry 21:11 < Surma> I take that back 21:11 < Surma> grep is not what it used to be :-/ 21:11 < ThunderChicken> wouldn't "find" be more useful? 21:12 -!- nettok__ [~netto@200.119.154.45] has joined #go-nuts 21:13 -!- gr1b [~gr1b@c-98-235-184-236.hsd1.pa.comcast.net] has quit [Ping timeout: 252 seconds] 21:15 -!- Kashia [~Kashia@port-92-200-151-144.dynamic.qsc.de] has joined #go-nuts 21:16 -!- nettok_ [~netto@200.119.154.45] has quit [Ping timeout: 256 seconds] 21:17 -!- nettok_ [~netto@200.119.154.45] has joined #go-nuts 21:18 -!- qrush [~qrush@129.21.81.118] has quit [Quit: qrush] 21:19 < Surma> ThunderChicken: Yeah, but grep's parameters are so much easier to write... look how that worked out :-/ 21:21 -!- gr1b [~gr1b@c-98-235-184-236.hsd1.pa.comcast.net] has joined #go-nuts 21:21 < dagle> Surma: find $GOROOT -name ogle 21:21 < dagle> Not that hard. :P 21:22 -!- nettok__ [~netto@200.119.154.45] has quit [Ping timeout: 276 seconds] 21:23 < ThunderChicken> Surma, I have to look up grep's treewalking capabilities every time I want to use 'em. I don't find 'find' all that difficult. 21:23 < Surma> well, I just remember "rhino" vor grep ;) ``grep -RHino <term> .'' 21:24 < Surma> Okay, Task #2: "Understanding how ogle works" 21:24 < ThunderChicken> Heh. 21:25 < ThunderChicken> I should spin up the laptop and see if ogle can help me debug the OS X network problem. 21:25 -!- rhelmer [~rhelmer@adsl-69-107-95-216.dsl.pltn13.pacbell.net] has joined #go-nuts 21:25 < Surma> is there any (useful) documentation for ogle? 21:25 < Surma> I can't seem to figure out anything execpt executing standard go-commands. No --help, -h or anything 21:28 < dagle> Surma: Read cmd.go 21:28 < Surma> k thx 21:29 -!- skelterjohn [~jasmuth@c-76-124-23-95.hsd1.nj.comcast.net] has quit [Ping timeout: 240 seconds] 21:35 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit: hcatlin] 21:35 -!- meanburrito920_ [~john@unaffiliated/meanburrito920] has quit [Ping timeout: 258 seconds] 21:40 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined #go-nuts 21:41 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 21:44 < anticw> exch: you could make Replace from Split + Join 21:45 < exch> I already have my own. Was just wondering why it's not in the package. Seems like a fairly trivial, but often used function 21:46 < anticw> well, I proposed SplitLast and some others, but it was deemed not useful for now 21:47 < anticw> keeping things minimal isn't that bad for now 21:48 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit: hcatlin] 21:48 -!- amacleod [amacleod@c-75-69-45-62.hsd1.ma.comcast.net] has quit [Quit: Bye Bye] 21:48 < Surma> anticw: I sure is not. I have never had the courage to look into main-APIs code. But with go it's really not that bad mainly because of the minimality 21:49 < anticw> was it somewhere here who wanted a ping implemantion? 21:49 -!- nettok__ [~netto@200.119.154.45] has joined #go-nuts 21:49 < anticw> Surma: i don't understand what you're saying sorry 21:50 -!- meanburrito920_ [~john@unaffiliated/meanburrito920] has joined #go-nuts 21:50 < Surma> anticw: well, I'm just saying, because the stdlib is that small (still very usable tho) I don't feel afraid of looking at the code 21:51 < Surma> (which I still haven't done in C, C++ or anything for that matter) 21:51 < Surma> and I consider that a good thing. I believe I never had a understanding that deep for a language 21:52 -!- nettok_ [~netto@200.119.154.45] has quit [Ping timeout: 252 seconds] 21:53 < KirkMcDonald> The source of any given implementation of the C++ STL is... not a happy read. 21:53 < anticw> oh, the code (esp. outside of the runtime) is pretty nice, frequently i smile at some of the things the main authors spit out and smile in admiration 21:54 < anticw> STL started out much better than what you get to read now 21:54 -!- Amaranth [~travis@ubuntu/member/Amaranth] has quit [Quit: Ex-Chat] 21:54 < KirkMcDonald> I can believe this. 21:54 < KirkMcDonald> But the point remains. :-) 21:54 < anticw> i agree what most people have to debug/eyeball at this stage though isn't pretty 21:54 < anticw> that's also true for glibc internals 21:54 < anticw> klibc is a nice clean read, glibc much less so ... but apples & oranges you can argue 21:57 < Surma> I was thinking about taking a look at dietlibc or something, maybe *that* can cheer me up ;) 21:57 < anticw> look at klibc, hpa has done a wonderful job of that IMO 21:57 -!- nettok__ [~netto@200.119.154.45] has quit [Ping timeout: 246 seconds] 21:58 -!- Surma [~surma@95-88-88-128-dynip.superkabel.de] has quit [Quit: Leaving.] 22:02 -!- wrtp [~rog@89.241.218.64] has quit [Quit: wrtp] 22:02 -!- TR2N [email@89-180-180-247.net.novis.pt] has joined #go-nuts 22:12 -!- nf [~nf@203-158-54-141.dyn.iinet.net.au] has quit [Ping timeout: 258 seconds] 22:15 -!- nettok__ [~netto@200.119.154.45] has joined #go-nuts 22:16 -!- Amaranth [~travis@ubuntu/member/Amaranth] has joined #go-nuts 22:16 -!- nf [~nf@124-168-159-235.dyn.iinet.net.au] has joined #go-nuts 22:18 -!- meanburrito920_ [~john@unaffiliated/meanburrito920] has quit [Ping timeout: 264 seconds] 22:23 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-176-214.clienti.tiscali.it] has quit [Quit: E se abbasso questa leva che succ...] 22:24 -!- scm [justme@c162006.adsl.hansenet.de] has quit [Read error: Operation timed out] 22:26 -!- l00t [~i-i3id3r_@189.105.67.216] has joined #go-nuts 22:26 < l00t> hi peoples 22:26 < Kashia> anticw, I would be very happy if you could up that icmp implementation somewhere public 22:26 < reiddraper> hi l00t 22:27 < anticw> Kashia: ones the tests are all clean for ipv4/ipv6 and some other weirdness is sorted ill push it out 22:27 < Kashia> aight, fair enough :) 22:28 < Kashia> just so you know, there is 'demand' :P 22:28 < l00t> first, my english is not very good, so sorry some errors 22:28 < anticw> ipv4 works fine, ipv6 seems to work but the headers i get back from the kernel aren't what i expected 22:28 -!- scm [justme@c209005.adsl.hansenet.de] has joined #go-nuts 22:28 < l00t> i'm a brazilian students and i'm doing a research about go 22:29 < anticw> welcome 22:29 < Kashia> anticw, I had a look at implementing that too, but after looking at the involved systems calls and considering the evil go network implementation, I left that for another time :P 22:30 < anticw> Kashia: oh, it's not that bad ... i just had to add raw socket support, with that you can craft the ICMP packets as needed 22:30 < anticw> i've done this more than once before, it was just a little annoying to have to get into the middle of net/* rather than sit on top of it 22:31 < l00t> if someone can help me with somethings i have doubt, i thank 22:31 < reiddraper> l00t: please ask, 22:31 < Kashia> well, I'm glad someone did the work for me :P 22:32 < Kashia> l00t, just ask, don't ask if you can ask :P 22:32 < l00t> :D 22:32 < l00t> ok 22:34 < l00t> how is done the binding of the an address the a variable? 22:34 -!- Netsplit *.net <-> *.split quits: lmoura 22:35 -!- Netsplit over, joins: lmoura 22:36 < Kashia> could you rephrase that? 22:36 < l00t> irsrsrsrs 22:37 < l00t> ohh... my english is terrible 22:38 < Kashia> just try again? :) 22:38 < reiddraper> l00t: maybe you are asking about pointers? 22:38 -!- nettok_ [~netto@200.119.154.45] has joined #go-nuts 22:38 < l00t> reiddraper, not 22:39 < l00t> again 22:39 < l00t> how is the binding of a memory address to a variable? 22:39 < KirkMcDonald> l00t: Can you be more specific? 22:39 < KirkMcDonald> l00t: Give an example? 22:40 < Kashia> is that question about the implementation of go? or is it about the usage of go? 22:40 < l00t> about implementation 22:41 < KirkMcDonald> l00t: Are you asking how Go decides where local variables live? 22:41 < l00t> KirkMcDonald, yes 22:41 -!- nettok__ [~netto@200.119.154.45] has quit [Ping timeout: 240 seconds] 22:41 < KirkMcDonald> l00t: On the call stack, same as in C. 22:41 < anticw> local variables are stack allocated until you take the address of them 22:41 < anticw> in which case they are heap allocated 22:41 < KirkMcDonald> Unless they're part of a closure. 22:41 < KirkMcDonald> Yes, that, too. 22:42 < anticw> a closure is a specific case of taking the address of a variable (though that's arguably an implementation detail) 22:43 < KirkMcDonald> The point being that it doesn't *look* like taking the address of the variable. :-) 22:43 < l00t> e for scope, how works? 22:43 < l00t> same C too? 22:44 < KirkMcDonald> I believe that any statement with a block defines a new scope. 22:44 < KirkMcDonald> http://golang.org/doc/go_spec.html#Declarations_and_scope 22:45 < l00t> great 22:45 < reiddraper> anticw: would you recommend creating sockets from net/sock.go or net/ipsock.go? 22:47 < l00t> i'll continue to reading the docs 22:47 < l00t> thanks 22:48 < anticw> reiddraper: to do what? 22:48 < reiddraper> anticw: creating a simple http server using epoll 22:48 < anticw> you *have* to use epoll? 22:49 < reiddraper> well, i want to make it an asynchronous server, so that seems like the best option to me. i'm open to suggestions though 22:50 < reiddraper> so, simple but asynch 22:50 < taruti> why not use the builtin tcp sockets? 22:50 < taruti> (is there nonblocking io on them?) 22:50 -!- perdix [~perdix@sxemacs/devel/perdix] has quit [Remote host closed the connection] 22:51 < reiddraper> not that i'm aware of, and either way, i've had to hack net.netFD to expose its int fd 22:51 < reiddraper> because all of the socket stuff seems to contain a netFD struct 22:55 < anticw> internally go uses epoll 22:55 < anticw> idiomatic you just spawn goroutines for all this, 1000s of them if need be 22:55 < anticw> if you really want the fd internally, you'll have to tweak the net/* code to expose it 22:57 < reiddraper> anticw: what do you mean, internally go uses epoll? 22:57 < anticw> if you use blocking io + channels, internally go will use epoll 22:57 < anticw> so 1000s of goroutines and 1000s of channels scales pretty well 22:58 < reiddraper> anticw: ah, interesting, so that has been my plan, just didnt realize that go was using epoll for io anyway... 23:01 < reiddraper> anticw: do you know an example in the source i can look at, I haven't seen any Write or Read calls that return on a channel, or do you just wrap that call with a closure that responds on a channel you pass it? 23:02 < anticw> reiddraper: what is the purpose here? a simple web server? 23:03 < anticw> there is one in the distribution you can look at 23:03 < anticw> wrapping socket io and poking intpo goroutines doesn't seem useful, you might as well actually do some work there 23:04 -!- nettok_ [~netto@200.119.154.45] has quit [Ping timeout: 246 seconds] 23:04 < reiddraper> anticw: the purpose is to write an asynchronous web server, something like tornado or twisted in python. here is a basic python implementation of what i want http://scotdoyle.com/python-epoll-howto.html 23:05 < anticw> you can do an event based framework though 23:05 < taruti> reiddraper: why? 23:05 < taruti> why not use go-routines + channels? 23:05 < anticw> take you socket IO and wrap/unwrap the protocol data you care about, then hand off partially processed data to 'event' channels 23:06 < anticw> but really im not sure it makes that much sense 23:06 < reiddraper> anticw: yes, i want to make an event based framework, and i like go for it because i can use the channels for signalling events 23:07 < anticw> or just dont bother 23:07 < anticw> write everything to use blocking goroutines ... and see how well the runtime does the muxing/demuxing for you 23:07 < reiddraper> and i hope that as the go scheduler gets smarter (if its not already), won't switch contexts to a go routine that is blocking on a channel, unless the scheduler knows that go routine can read from the channel 23:07 < anticw> reiddraper: if can't switch to something that's blocked, try it ... you'll get a panic 23:08 < anticw> s/if/it/ 23:08 < taruti> reiddraper: why do you want to block on channel receives instead of network reads? 23:08 < reiddraper> taruti: i don't want to block ever :) 23:08 < anticw> reiddraper: block, it's fine, really 23:09 < anticw> reiddraper: you can have 100,000 goroutines and channels blocking and not break a sweat 23:09 < taruti> reiddraper: actually you want to block, e.g. when there are no clients 23:10 < reiddraper> taruti: ok, point taken 23:10 < anticw> reiddraper: consider this, i have some code i did, in fact the first thing i did in go that does dns lookups 23:10 < anticw> 1000s of them ... you can just spawn lots of goroutines and block, and stick the results back into a channel 23:11 < anticw> and it works very well 23:11 < reiddraper> and, under the hood, go is using epoll for the io? 23:12 -!- gnuvince [~vince@72.0.219.6] has quit [Quit: What the fruit is goin' on here!?] 23:12 < anticw> yes 23:13 < anticw> well ... it's more subtle 23:13 < anticw> and of course could change and depends on platform, etc ... you shouldn't really have to worry about too many internal details for most things 23:16 -!- TMKCodes [~toni@bbwirelessgw2-fee1dc00-62.dhcp.inet.fi] has quit [Ping timeout: 265 seconds] 23:16 -!- Ycros [~ycros@gnaw.yi.org] has quit [Quit: No Ping reply in 180 seconds.] 23:16 -!- Ycros [~ycros@gnaw.yi.org] has joined #go-nuts 23:17 < reiddraper> hmm, perhaps i need to start digging into the go C src, and not just the pkg source for go 23:18 < reiddraper> nothing i've seen in net or http seems to imply that it's doing any kind of asynch stuff 23:18 < reiddraper> certainly possible i've missed something though 23:19 -!- nettok_ [~netto@200.119.154.45] has joined #go-nuts 23:21 < anticw> reiddraper: go c.serve() 23:22 -!- TMKCodes [~toni@bbwirelessgw2-fee1dc00-62.dhcp.inet.fi] has joined #go-nuts 23:23 -!- lux` [lux`@151.95.169.212] has joined #go-nuts 23:25 -!- ikaros [~ikaros@f050227254.adsl.alicedsl.de] has quit [Quit: Leave the magic to Houdini] 23:26 -!- digi9 [none@csplan9.rit.edu] has left #go-nuts [] 23:29 -!- lux` [lux`@151.95.169.212] has quit [Read error: Connection reset by peer] 23:30 -!- skelterjohn [~jasmuth@c-76-124-23-95.hsd1.nj.comcast.net] has quit [Quit: skelterjohn] 23:31 < reiddraper> anticw: right, i saw that. i guess i just need to go read through some more of the source. I've been able to successfully make a simple server in go, I just want to have a firm understanding of the asynchronous bits 23:38 -!- guutlee [~guutlee@host-2-148-3-96.midco.net] has joined #go-nuts 23:38 -!- guutlee [~guutlee@host-2-148-3-96.midco.net] has left #go-nuts [] 23:38 -!- guutlee [~guutlee@host-2-148-3-96.midco.net] has joined #go-nuts 23:40 -!- guutlee [~guutlee@host-2-148-3-96.midco.net] has left #go-nuts [] 23:45 -!- megaboz_ [~megaboz@189.115.35.3] has joined #go-nuts 23:48 -!- nettok_ [~netto@200.119.154.45] has quit [Quit: Ex-Chat] 23:49 -!- megaboz [~megaboz@189.115.33.111] has quit [Ping timeout: 276 seconds] 23:49 -!- Sorcy [~ycros@gnaw.yi.org] has joined #go-nuts 23:50 -!- Ycros [~ycros@gnaw.yi.org] has quit [Quit: No Ping reply in 180 seconds.] 23:54 -!- brx [~brx@p5796FD6D.dip.t-dialin.net] has quit [Ping timeout: 260 seconds] 23:56 -!- brx [~brx@p5796FD6D.dip.t-dialin.net] has joined #go-nuts 23:59 -!- wuehlmaus [~wuehlmaus@p4FCC6FD4.dip.t-dialin.net] has quit [Ping timeout: 264 seconds] --- Log closed Mon Mar 22 00:00:02 2010