--- Log opened Fri Feb 25 00:00:29 2011 00:00 -!- Venom_X [~pjacobs@66.54.185.133] has quit [Quit: Venom_X] 00:04 < foocraft> aiju, :( that sounds horrible 00:06 < rl> soudns like the best one-liner ever 00:07 < foocraft> I'm talking about the line count for one function 00:07 < rl> woops, sorry i had misread it 00:07 < foocraft> one liners are fine, but I tend to encapsulate not-so-obvious "magic" into a function of its own :p 00:07 < rl> actually that's not right, i had mis-parsed it 00:07 < rl> I had thought it said one line was 428 characters 00:07 < foocraft> even if it's a one-liner 00:08 < foocraft> rl, it's alright :) 00:08 < rl> thus the comment about it being a "oneliner"... anyway i'm obviously too sleepy. night 00:11 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has joined #go-nuts 00:16 -!- decaf [556ee0e9@gateway/web/freenode/ip.85.110.224.233] has joined #go-nuts 00:20 -!- Scorchin [~Scorchin@host86-145-9-54.range86-145.btcentralplus.com] has joined #go-nuts 00:22 < plexdev> http://is.gd/UuxJV3 by [Alex Brainman] in go/src/pkg/runtime/windows/ -- runtime: add empty windows/signals.h file to fix build 00:30 -!- foocraft [~dsc@78.101.82.81] has quit [Ping timeout: 240 seconds] 00:33 -!- decaf [556ee0e9@gateway/web/freenode/ip.85.110.224.233] has quit [Quit: Page closed] 00:36 -!- foocraft [~dsc@78.100.182.197] has joined #go-nuts 00:39 -!- itrekkie_ [~itrekkie@ip72-211-129-122.tc.ph.cox.net] has joined #go-nuts 00:39 < plexdev> http://is.gd/rzpQrj by [Robert Griesemer] in go/src/cmd/godoc/ -- godoc: accept symbolic links as path names provided to -path 00:39 -!- itrekkie_ [~itrekkie@ip72-211-129-122.tc.ph.cox.net] has quit [Client Quit] 00:41 -!- deltaphc [delta@cpe-76-173-127-142.socal.res.rr.com] has joined #go-nuts 00:43 -!- itrekkie [~itrekkie@ip72-211-129-122.tc.ph.cox.net] has quit [Ping timeout: 276 seconds] 00:50 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|] 00:51 -!- nutate [~rseymour@cacsag4.usc.edu] has joined #go-nuts 00:53 -!- Scorchin [~Scorchin@host86-145-9-54.range86-145.btcentralplus.com] has quit [Quit: Scorchin] 00:57 -!- nettok [~quassel@200.119.184.90] has joined #go-nuts 00:57 -!- itrekkie [~itrekkie@ip72-211-129-122.tc.ph.cox.net] has joined #go-nuts 00:59 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts 01:02 -!- Glasswalker [~Glasswalk@CPE002369b3cd1a-CM00222d53f155.cpe.net.cable.rogers.com] has joined #go-nuts 01:21 -!- JusticeFries_ [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has joined #go-nuts 01:23 -!- shvntr [~shvntr@123.89.100.228] has quit [Quit: leaving] 01:24 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has quit [Ping timeout: 264 seconds] 01:26 < plexdev> http://is.gd/Pg8Q2j by [Adam Langley] in 3 subdirs of go/src/pkg/ -- crypto/openpgp: add package 01:26 -!- JusticeFries_ [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has quit [Ping timeout: 250 seconds] 01:29 -!- binarypie [~binarypie@adsl-99-37-227-229.dsl.pltn13.sbcglobal.net] has quit [Remote host closed the connection] 01:46 -!- espeed [~espeed@63.246.231.57] has joined #go-nuts 01:51 -!- ako [~nya@fuld-590c6a83.pool.mediaWays.net] has joined #go-nuts 01:54 -!- aho [~nya@fuld-590c79f3.pool.mediaWays.net] has quit [Ping timeout: 240 seconds] 01:59 -!- tux21b [~christoph@pyhost.srv.tux21b.org] has joined #go-nuts 02:13 -!- nutate [~rseymour@cacsag4.usc.edu] has quit [Quit: I'm outta heee-eere] 02:15 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Ping timeout: 240 seconds] 02:22 -!- m4dh4tt3r [~Adium@c-69-181-219-75.hsd1.ca.comcast.net] has joined #go-nuts 02:52 -!- wtfness [~dsc@89.211.209.182] has joined #go-nuts 02:52 -!- foocraft [~dsc@78.100.182.197] has quit [Ping timeout: 246 seconds] 02:55 -!- ronnyy [~quassel@p4FF1C522.dip0.t-ipconnect.de] has joined #go-nuts 02:59 -!- nettok [~quassel@200.119.184.90] has quit [Ping timeout: 250 seconds] 02:59 -!- niemeyer [~niemeyer@189-10-154-99.pltce701.dsl.brasiltelecom.net.br] has quit [Ping timeout: 240 seconds] 03:02 < versificator> can one actually declare arrayOfInt* ? 03:06 < rm445> versificator: var p *[5]int sort of thing? 03:06 < versificator> that an array of 5 int*'s ? 03:06 < rm445> no, it's a pointer to an array[5] of int 03:06 < versificator> ah. 03:07 < rm445> do you want var p [5]*int ? 03:07 < versificator> aha. yeah gotcha 03:07 < versificator> what's up with the arrayOfInt style decl? 03:07 < versificator> is it only used for non ptrs? 03:07 < rm445> Go declarations seem to read from left to right. 03:10 -!- itrekkie [~itrekkie@ip72-211-129-122.tc.ph.cox.net] has quit [Quit: itrekkie] 03:13 < plexdev> http://is.gd/8Mfuue by [Andrew Gerrand] in 2 subdirs of go/ -- release.2011-02-24 03:14 < versificator> http://golang.org/pkg/strings/ (no strcpy)? or is it just handled well in assignment 03:19 < rm445> just assign I think 03:21 < versificator> how's go on tail recursion? can i go full functional programming style on it? 03:30 < plexdev> http://is.gd/Kjmsr0 by [Andrew Gerrand] in go/ -- tag release.2011-02-24 03:30 < plexdev> http://is.gd/k0oFUY by [Robert Griesemer] in 4 subdirs of go/test/ -- bug324.go: test case for issue 1550 03:31 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Ping timeout: 250 seconds] 03:33 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined #go-nuts 03:35 <@adg> versificator: no 03:35 <@adg> versificator: not that kind of language 03:38 -!- yiyus [1242712427@server1.bouncer4you.de] has quit [Ping timeout: 260 seconds] 03:39 -!- ako [~nya@fuld-590c6a83.pool.mediaWays.net] has quit [Quit: EXEC_over.METHOD_SUBLIMATION] 03:44 -!- ronnyy [~quassel@p4FF1C522.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 03:50 -!- ronnyy [~quassel@p4FF1C522.dip0.t-ipconnect.de] has joined #go-nuts 03:54 -!- elimisteve [~elimistev@pool-71-102-138-52.snloca.dsl-w.verizon.net] has joined #go-nuts 03:54 -!- coldturnip1 [~COLDTURNI@118-166-68-6.dynamic.hinet.net] has quit [Ping timeout: 246 seconds] 03:59 -!- ronnyy [~quassel@p4FF1C522.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 04:02 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|] 04:05 < skelterjohn> doesn't have to be a functional language to take advantage of tail recursion 04:15 -!- ronnyy [~quassel@p4FF1C522.dip0.t-ipconnect.de] has joined #go-nuts 04:16 -!- ronnyy [~quassel@p4FF1C522.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 04:18 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 246 seconds] 04:21 -!- wtfness [~dsc@89.211.209.182] has quit [Ping timeout: 240 seconds] 04:31 -!- m4dh4tt3r [~Adium@c-69-181-219-75.hsd1.ca.comcast.net] has quit [Quit: Leaving.] 04:36 -!- edsrzf [~kelvan@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts 04:43 -!- mattn_jp [~mattn@112-68-91-138f1.hyg1.eonet.ne.jp] has joined #go-nuts 04:49 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has joined #go-nuts 04:50 -!- DeedleFake [~Deedles@c-98-251-36-162.hsd1.ga.comcast.net] has joined #go-nuts 04:51 < DeedleFake> Hi. Is there an easy way to check if a file exists? 04:53 < zozoR> open the file, if its not there, then it does not exist? 04:55 < edsrzf> You could try os.Lstat or os.Stat, too. Depends on what you want to do. 04:57 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Ping timeout: 272 seconds] 04:59 < DeedleFake> Alright. Thanks. 04:59 -!- DeedleFake [~Deedles@c-98-251-36-162.hsd1.ga.comcast.net] has quit [Quit: Ex-Chat] 05:01 < mattn_jp> os.Stat() 05:02 < mattn_jp> ah, sorry. i found in above. 05:08 -!- edsrzf [~kelvan@122-61-221-144.jetstream.xtra.co.nz] has quit [Ping timeout: 264 seconds] 05:10 -!- kingfishr [~kingfishr@c-98-207-87-183.hsd1.ca.comcast.net] has joined #go-nuts 05:19 -!- adu [~ajr@softbank220043138128.bbtec.net] has joined #go-nuts 05:25 -!- yiyus [1242712427@je.je.je] has joined #go-nuts 05:32 -!- cco3 [~conley@c-69-181-140-72.hsd1.ca.comcast.net] has joined #go-nuts 05:41 -!- saturnfive [~saturnfiv@210.74.155.131] has joined #go-nuts 05:57 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts 05:59 -!- yiyus [1242712427@je.je.je] has quit [Ping timeout: 240 seconds] 05:59 -!- fabled [~fabled@mail.fi.jw.org] has joined #go-nuts 06:01 -!- keithgcascio [~keithcasc@nat/google/x-xmcvndvpivlqjhod] has quit [Quit: Leaving] 06:03 -!- edsrzf [~kelvan@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts 06:04 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has quit [Remote host closed the connection] 06:17 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has joined #go-nuts 06:17 < plexdev> http://is.gd/dzELSm by [Russ Cox] in 2 subdirs of go/src/cmd/ -- 5a, 5l: add LDREXD, STREXD 06:17 < plexdev> http://is.gd/n2d6ms by [Russ Cox] in 2 subdirs of go/src/cmd/ -- 8a, 8l: add CMPXCHG8B, XADDB, XADDL, XADDW 06:34 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Read error: Connection reset by peer] 06:34 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined #go-nuts 06:34 -!- elimisteve [~elimistev@pool-71-102-138-52.snloca.dsl-w.verizon.net] has quit [Ping timeout: 240 seconds] 06:34 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Read error: Connection reset by peer] 06:39 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined #go-nuts 06:43 -!- tensai_cirno [~cirno@79.104.4.232] has joined #go-nuts 06:51 -!- adu [~ajr@softbank220043138128.bbtec.net] has quit [Quit: adu] 06:51 -!- adu [~ajr@softbank220043138128.bbtec.net] has joined #go-nuts 06:55 -!- yiyus [1242712427@je.je.je] has joined #go-nuts 07:03 -!- mattn_jp [~mattn@112-68-91-138f1.hyg1.eonet.ne.jp] has quit [Quit: Ex-Chat] 07:08 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Read error: Connection reset by peer] 07:08 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined #go-nuts 07:08 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Read error: Connection reset by peer] 07:09 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 07:09 -!- adu [~ajr@softbank220043138128.bbtec.net] has quit [Quit: adu] 07:11 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined #go-nuts 07:13 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined #go-nuts 07:16 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Read error: Connection reset by peer] 07:18 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined #go-nuts 07:21 -!- ExtraSpice [XtraSpice@78-62-101-194.static.zebra.lt] has joined #go-nuts 07:24 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Read error: Connection reset by peer] 07:25 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined #go-nuts 07:25 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Read error: Connection reset by peer] 07:25 -!- aconran [~aconran-o@38.104.129.126] has quit [Read error: Operation timed out] 07:26 -!- deltaphc [delta@cpe-76-173-127-142.socal.res.rr.com] has quit [] 07:30 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined #go-nuts 07:30 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Read error: Connection reset by peer] 07:33 -!- wrtp [~rog@92.17.33.100] has joined #go-nuts 07:35 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined #go-nuts 07:38 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Read error: Connection reset by peer] 07:40 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined #go-nuts 08:06 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has quit [Quit: This computer has gone to sleep] 08:10 -!- m4dh4tt3r1 [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined #go-nuts 08:11 -!- eiffel_ [~eiffel@119.57.32.202] has joined #go-nuts 08:12 -!- mbernstein [~michael@cpe-70-113-7-72.austin.res.rr.com] has quit [Ping timeout: 264 seconds] 08:13 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Ping timeout: 276 seconds] 08:14 -!- elimisteve [~elimistev@pool-71-102-138-52.snloca.dsl-w.verizon.net] has joined #go-nuts 08:17 -!- vsayer [~vivek@c-76-102-205-58.hsd1.ca.comcast.net] has quit [Quit: Leaving] 08:18 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts 08:27 -!- perdix [~mkhl@sxemacs/devel/perdix] has joined #go-nuts 08:36 -!- tensorpudding [~user@99.23.127.179] has quit [Read error: Connection reset by peer] 08:39 -!- m4dh4tt3r1 [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Quit: Leaving.] 08:40 -!- vsayer [~vivek@c-76-102-205-58.hsd1.ca.comcast.net] has joined #go-nuts 08:48 -!- eiffel__ [~eiffel@119.57.32.202] has joined #go-nuts 08:50 -!- adu [~ajr@softbank220043138128.bbtec.net] has joined #go-nuts 08:51 -!- eiffel_ [~eiffel@119.57.32.202] has quit [Ping timeout: 240 seconds] 08:54 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|] 08:54 -!- snearch [~snearch@f053007144.adsl.alicedsl.de] has joined #go-nuts 08:58 -!- eiffel__ [~eiffel@119.57.32.202] has quit [Quit: eiffel__] 09:02 -!- cirno_ [~cirno@79.104.4.232] has joined #go-nuts 09:02 -!- tensai_cirno [~cirno@79.104.4.232] has quit [Read error: Connection reset by peer] 09:04 -!- cenuij [~cenuij@78.112.41.178] has joined #go-nuts 09:04 -!- cenuij [~cenuij@78.112.41.178] has quit [Changing host] 09:04 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts 09:06 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts 09:10 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined #go-nuts 09:11 -!- cirno_ [~cirno@79.104.4.232] has quit [Ping timeout: 240 seconds] 09:16 -!- ExtraSpice [XtraSpice@78-62-101-194.static.zebra.lt] has quit [Remote host closed the connection] 09:21 < __gilles> hi 10:00 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the connection] 10:03 -!- cenuij [~cenuij@78.112.41.178] has joined #go-nuts 10:03 -!- cenuij [~cenuij@78.112.41.178] has quit [Changing host] 10:03 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts 10:09 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the connection] 10:19 < wrtp> __gilles: hi 10:21 -!- visof [~visof@unaffiliated/visof] has quit [Ping timeout: 264 seconds] 10:23 -!- itrekkie [~itrekkie@ip72-211-129-122.tc.ph.cox.net] has joined #go-nuts 10:25 -!- itrekkie [~itrekkie@ip72-211-129-122.tc.ph.cox.net] has quit [Client Quit] 10:27 -!- cde [~cde@2a01:e0b:1:134:ca0a:a9ff:fec8:eedb] has joined #go-nuts 10:28 -!- cde [~cde@2a01:e0b:1:134:ca0a:a9ff:fec8:eedb] has left #go-nuts [] 10:28 -!- shvntr [~shvntr@123.64.89.165] has joined #go-nuts 10:33 -!- shvntr [~shvntr@123.64.89.165] has quit [Ping timeout: 246 seconds] 10:35 -!- shvntr [~shvntr@116.26.130.160] has joined #go-nuts 10:37 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:4c81:60b6:5747:a7c8] has joined #go-nuts 10:39 -!- edsrzf [~kelvan@122-61-221-144.jetstream.xtra.co.nz] has quit [Ping timeout: 276 seconds] 10:44 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:4c81:60b6:5747:a7c8] has quit [Quit: Leaving.] 10:45 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:4c81:60b6:5747:a7c8] has joined #go-nuts 10:45 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:4c81:60b6:5747:a7c8] has quit [Client Quit] 10:45 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:4c81:60b6:5747:a7c8] has joined #go-nuts 10:49 -!- snearch [~snearch@f053007144.adsl.alicedsl.de] has quit [Quit: Verlassend] 11:01 -!- cco3-hampster1 [~conleyo@nat/google/x-ahpmbtrrfowrcrpb] has quit [Ping timeout: 260 seconds] 11:01 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:4c81:60b6:5747:a7c8] has quit [Quit: Leaving.] 11:06 < adu> hi 11:15 -!- saturnfive [~saturnfiv@210.74.155.131] has quit [Read error: Connection reset by peer] 11:18 < __gilles> is there an env var to specify so the compiler knows where packages are installed ? 11:19 < __gilles> or does it assume its below GOROOT ? 11:19 < str1ngs> it assumes GOROOT 11:19 < __gilles> 'k thanks 11:21 < str1ngs> I think you can do import "./foo" thogh 11:22 < __gilles> actually im trying to import fmt 11:22 < __gilles> but on an unsupported arch 11:22 < __gilles> :) 11:22 < __gilles> err 11:22 < __gilles> unsupported system sorry 11:30 -!- tvw [~tv@212.79.9.150] has joined #go-nuts 11:49 -!- artefon [~thiagon@150.164.2.20] has joined #go-nuts 11:51 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts 11:52 -!- GilJ [~GilJ@zeus.ugent.be] has quit [Quit: leaving] 11:52 -!- GilJ [~GilJ@zeus.ugent.be] has joined #go-nuts 12:03 < wrtp> sometimes i wish it were possible to derive a slice with the same length but lower capacity than the original 12:03 < wrtp> dunno what the syntax would look like though 12:04 < dario> does a:= b[:] copy capacity ? 12:04 < wrtp> dario: capacity always goes to the end of the original allocation 12:04 < wrtp> dario: so yes 12:04 < ww> a := shrink(b) 12:04 < wrtp> what about a := b[0:n:n] 12:05 < wrtp> i.e. an optional extra slice argument 12:05 < wrtp> b[start : len : cap] 12:05 < ww> in some other languages the third slice argument is step... 12:06 < wrtp> yes, but this isn't other languages :-) 12:07 < wrtp> and make already gets an optional extra arg which is cap, so there is precedent 12:10 < wrtp> the main problem as i see it is that some things make use of the fact that &a[cap(a)-1] == &b[cap(b)-1] => a and b refer to the same original slice 12:11 -!- aimxhaisse [~mxs@buffout.org] has joined #go-nuts 12:11 < __gilles> hi aimxhaisse :) 12:11 -!- boscop [~boscop@f055192144.adsl.alicedsl.de] has joined #go-nuts 12:12 < aimxhaisse> hi __gilles :) 12:12 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts 12:26 -!- niemeyer [~niemeyer@189-10-154-99.pltce701.dsl.brasiltelecom.net.br] has joined #go-nuts 12:33 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has joined #go-nuts 12:34 -!- vsayer [~vivek@c-76-102-205-58.hsd1.ca.comcast.net] has quit [Read error: Operation timed out] 12:35 -!- foocraft [~dsc@89.211.209.182] has joined #go-nuts 12:38 -!- vsayer [~vivek@c-76-102-205-58.hsd1.ca.comcast.net] has joined #go-nuts 12:50 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout: 612 seconds] 12:57 -!- foocraft [~dsc@89.211.209.182] has quit [Ping timeout: 240 seconds] 12:57 -!- niemeyer [~niemeyer@189-10-154-99.pltce701.dsl.brasiltelecom.net.br] has quit [Ping timeout: 240 seconds] 12:58 -!- niemeyer [~niemeyer@189-10-154-99.pltce701.dsl.brasiltelecom.net.br] has joined #go-nuts 13:01 -!- nettok [~quassel@200.119.189.97] has joined #go-nuts 13:02 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the connection] 13:03 -!- foocraft [~dsc@78.101.228.183] has joined #go-nuts 13:04 -!- cenuij [~cenuij@78.112.41.178] has joined #go-nuts 13:04 -!- cenuij [~cenuij@78.112.41.178] has quit [Changing host] 13:04 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts 13:10 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Ping timeout: 240 seconds] 13:11 -!- nettok [~quassel@200.119.189.97] has quit [Ping timeout: 276 seconds] 13:12 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined #go-nuts 13:14 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has joined #go-nuts 13:22 -!- adu [~ajr@softbank220043138128.bbtec.net] has quit [Quit: adu] 13:22 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has quit [Quit: This computer has gone to sleep] 13:23 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has quit [Remote host closed the connection] 13:40 < foocraft> is Go, going for GSoC? 13:40 < rm445> guys, am I right in saying Go slices don't have Python-style [0:-2] sort of syntax? Has this been discussed, are people for or against it? 13:44 < rm445> wrtp: you can do it in two lines, right? (with 'make'). - that's assuming you want a copy with lower capacity. 13:44 < rm445> Two slices on the same underlying array, each with a different concept of where the array ends, just seems really weird to me. 13:45 < KBme> rm445: what does -2 mean here? 13:45 < KBme> it does have the [something:something] but indexes aren't indexed in negatives 13:45 < KBme> argh oops 13:45 < KBme> it does have the [something:something] but indexes aren't defined in negatives i don't think 13:45 < KBme> doesn't make much sense to me 13:47 < rm445> well -1 is the last element and -2 is the one before that. Yes, the negative numbers aren't real indices but that's the whole point (saves you working out the index of the last element) 13:47 < KBme> ah, there is not that 13:47 < KBme> there is len(slice) 13:47 < KBme> and len(slice)-1 13:48 -!- versificator [~nobody@h-68-166-192-11.nycmny83.static.covad.net] has quit [Ping timeout: 240 seconds] 13:48 < rm445> like, recently I wrote something like: s := getSomeString(); s = s[0:len(s)-1] 13:48 < skelterjohn> foocraft: They decided not to, this summer 13:48 < KBme> yep 13:48 < rm445> when I'd have preferred to write s := getSomeString()[0:-1] 13:48 < KBme> oh i see the thing, yeah 13:49 < KBme> well, that's how it goes :) 13:49 < foocraft> skelterjohn, damn! 13:49 < skelterjohn> one thing about negative indices is that you might not always mean it 13:50 < rm445> I don't know how tough it is to implement, it's just something fairly powerful that comes up occasionally, thought someone might know if the Go team are strongly against it or whatever. 13:50 < skelterjohn> for instance, if you have array[a:b-a] and a is accidentally larger than b 13:50 < foocraft> it has to be an unsigned int, unfortunately, rm445 13:50 < skelterjohn> then you might have weird behavior, where in go you have an error 13:50 < skelterjohn> rm445: it will not be added to go, i am fairly sure 13:50 < skelterjohn> it has come up before 13:51 -!- versificator [~nobody@h-68-166-192-11.nycmny83.static.covad.net] has joined #go-nuts 13:51 < rm445> okay 13:51 < skelterjohn> http://groups.google.com/group/golang-nuts/browse_frm/thread/e7c44811f5030037/6b2932169ccbdf58?lnk=gst&q=negative+indices#6b2932169ccbdf58 13:51 < skelterjohn> take a look at rob pike's first post in the thread 13:51 < KBme> yeah, i don't think this sort of thing is for low level languages 13:52 < rm445> thanks 13:52 -!- tux21b [~christoph@pyhost.srv.tux21b.org] has quit [Excess Flood] 13:52 -!- tux21b [~christoph@pyhost.srv.tux21b.org] has joined #go-nuts 13:53 * KBme totally agrees with rob 13:54 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts 13:56 -!- Fish- [~Fish@coss6.exosec.net] has joined #go-nuts 13:59 -!- Fish [~Fish@exo3753.pck.nerim.net] has quit [Ping timeout: 246 seconds] 14:01 -!- coldturnip [~COLDTURNI@118-166-65-74.dynamic.hinet.net] has joined #go-nuts 14:02 -!- Maddas [~maddas@74.125.57.36] has joined #go-nuts 14:02 < Maddas> Hi. There's a bit of code in the protocol buffer compiler that looks unnecessarily complicated, but I'm new to Go, so I just wanted to double-check. Aren't the following two functions identical? 14:03 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has joined #go-nuts 14:03 < Maddas> 1) func String(v string) *string { p := new(string); *p = v; return p } and 2) func String(v string) *string { return &v } 14:03 -!- mbernstein [~michael@cpe-70-113-7-72.austin.res.rr.com] has joined #go-nuts 14:03 < Maddas> (lib.go uses the former) 14:04 < Maddas> (Identical in terms of observable behaviour; the second one should be more efficient in general.) 14:05 < Maddas> The same pattern is used for the {Int,Uint,Float}{32,64} functions. 14:05 < skelterjohn> identical behavior. 14:05 < Maddas> Ok, thanks. 14:05 < skelterjohn> as long as what comes in on the parameter list is not a pointer, and is passed by value 14:06 < wrtp> rm445: it seems reasonable to me. you're just saying "if i hand out this slice, nothing can mess with it beyond here" 14:06 < foocraft> guys, does anyone know a good place to buy buckling spring keyboards? 14:06 < skelterjohn> foocraft: I don't know what that is 14:06 < skelterjohn> but try newegg.com 14:06 < skelterjohn> they have all sorts of good stuff 14:06 < foocraft> skelterjohn, like model M IBM keyboards 14:06 < skelterjohn> oh, let me go get my model M IBM 14:07 < foocraft> soft, clicky, least-force-per-press 14:07 < skelterjohn> :) 14:07 < foocraft> damn you skelterjohn!! :D 14:07 -!- saulhoward [~saulhowar@195.188.203.80] has joined #go-nuts 14:07 < foocraft> yeah newegg is completely unaware of buckling spring 14:08 < skelterjohn> froogle.com :) 14:08 < foocraft> there are a couple of used ones on amazon, but I'm not sure if 1) it will be clean 2) it will be in good condition 14:09 -!- saulhoward [~saulhowar@195.188.203.80] has quit [Client Quit] 14:09 -!- versificator [~nobody@h-68-166-192-11.nycmny83.static.covad.net] has left #go-nuts [] 14:15 -!- saturnfive [~saturnfiv@117.36.19.110] has joined #go-nuts 14:15 -!- saturnfive [~saturnfiv@117.36.19.110] has left #go-nuts [] 14:16 < frobnitz> foocraft: http://pckeyboards.stores.yahoo.net/keyboards.html 14:16 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts 14:16 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts [] 14:20 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has quit [Remote host closed the connection] 14:21 < rm445> wrtp: I see what you're saying, hadn't thought of you keeping a big array and passing out the ability to change some fixed part of it by passing out a slice. 14:22 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has joined #go-nuts 14:24 -!- mattn_jp [~mattn@112-68-84-135f1.hyg1.eonet.ne.jp] has joined #go-nuts 14:26 < foocraft> frobnitz, these guys rejected a lot of my orders for no reason :p 14:29 < KBme> they don't even have dvorak 14:30 < foocraft> kbME, have you used the NEO layout? 14:30 < KBme> i don't even know what it is 14:32 -!- vegai [vegai@archlinux/developer/vegai] has quit [Quit: soitellaan] 14:34 -!- DerHorst [~Horst@e176103235.adsl.alicedsl.de] has joined #go-nuts 14:36 < KBme> yeah, i'd rather have an english dvorak 14:36 < KBme> though this looks interesting enough aswell 14:40 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal] 14:41 < mpl> I'm glad I never bought a physical dvorak layout. because it was so easy to learn to blind type with dvorak and because now all of my keyboards are a weak first security against anyone attempting to use my comps :) 14:42 < KBme> heh 14:45 -!- JusticeFries [~JusticeFr@c-67-161-204-251.hsd1.co.comcast.net] has joined #go-nuts 14:51 -!- Fish- [~Fish@coss6.exosec.net] has quit [Ping timeout: 240 seconds] 14:51 -!- Maddas [~maddas@74.125.57.36] has quit [Quit: leaving] 14:53 -!- yiyus [1242712427@je.je.je] has quit [Ping timeout: 240 seconds] 14:53 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 14:58 -!- shvntr [~shvntr@116.26.130.160] has quit [Ping timeout: 240 seconds] 14:59 -!- tux21b [~christoph@pyhost.srv.tux21b.org] has quit [Excess Flood] 14:59 -!- tux21b [~christoph@pyhost.srv.tux21b.org] has joined #go-nuts 15:03 -!- artefon [~thiagon@150.164.2.20] has quit [Quit: Leaving] 15:04 -!- emjayess [~emjayess@pix1.i29.net] has joined #go-nuts 15:07 -!- imsplitbit [~imsplitbi@64.39.4.132] has joined #go-nuts 15:12 -!- yiyus [1242712427@je.je.je] has joined #go-nuts 15:18 -!- niemeyer [~niemeyer@189-10-154-99.pltce701.dsl.brasiltelecom.net.br] has quit [Ping timeout: 240 seconds] 15:18 -!- niemeyer_ [~niemeyer@189-10-154-99.pltce701.dsl.brasiltelecom.net.br] has joined #go-nuts 15:22 -!- mattn_jp [~mattn@112-68-84-135f1.hyg1.eonet.ne.jp] has quit [Ping timeout: 246 seconds] 15:27 -!- mattn_jp [~mattn@112-68-84-135f1.hyg1.eonet.ne.jp] has joined #go-nuts 15:29 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has quit [Quit: skelterjohn] 15:33 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se] has joined #go-nuts 15:37 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:2907:ecb4:6b3e:d5f0] has joined #go-nuts 15:37 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se] has quit [Remote host closed the connection] 15:39 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has joined #go-nuts 15:41 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has joined #go-nuts 15:42 -!- femtoo [~femto@95-89-248-52-dynip.superkabel.de] has joined #go-nuts 15:44 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se] has joined #go-nuts 15:46 -!- Fish [~Fish@exo3753.pck.nerim.net] has joined #go-nuts 15:46 -!- JusticeFries [~JusticeFr@c-67-161-204-251.hsd1.co.comcast.net] has quit [Quit: JusticeFries] 15:49 -!- Soultaker [~Soultaker@hell.student.utwente.nl] has quit [Ping timeout: 264 seconds] 15:50 < foocraft> I never used dvorak 15:50 < foocraft> I bet it would take some training to switch from one layout to another 15:52 < foocraft> seems highly efficient though 15:55 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:2907:ecb4:6b3e:d5f0] has quit [Quit: Leaving.] 15:56 -!- Soultaker [~Soultaker@hell.student.utwente.nl] has joined #go-nuts 15:58 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:2907:ecb4:6b3e:d5f0] has joined #go-nuts 16:02 -!- adu [~ajr@softbank220043139062.bbtec.net] has joined #go-nuts 16:06 -!- niemeyer [~niemeyer@189-10-154-99.pltce701.dsl.brasiltelecom.net.br] has quit [Ping timeout: 264 seconds] 16:08 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts 16:11 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has joined #go-nuts 16:13 < rm445> hey guys, any whizzes with the template package here? I'm just getting started with it and it's confusing me. 16:14 < rm445> I can do the basics, but what I'd like to do is pass some sort of list to t.Execute() (maybe a slice of pointers to structs) 16:14 < rm445> and have the template package render me a nice html list from it. 16:14 < rm445> Does that work, and if so what's the syntax, and if not, what data structure should I pass instead? 16:18 -!- foocraft [~dsc@78.101.228.183] has quit [Quit: Leaving] 16:21 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has quit [Quit: This computer has gone to sleep] 16:21 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the connection] 16:22 < skelterjohn> i'd help you, but i have no idea how to use the template package 16:22 < wrtp> rm445: look at repeated section 16:22 < wrtp> if you're not passing in a structure, you may be able to do {.repeated section @} 16:24 < rm445> Thanks. I was just about to try wrapping my slice in a struct, so I can do {.repeated section StructName}. Will see if it works in a minute 16:27 < wrtp> rm445: here's an example: http://pastebin.com/aTcRqDij 16:28 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Quit: Computer has gone to sleep.] 16:28 < rm445> beautiful, thanks 16:28 -!- artefon [~thiago@189.59.196.59] has joined #go-nuts 16:30 -!- saschpe [~quassel@opensuse/member/saschpe] has joined #go-nuts 16:30 -!- niemeyer [~niemeyer@189-10-154-99.pltce701.dsl.brasiltelecom.net.br] has joined #go-nuts 16:33 -!- cenuij [~cenuij@78.112.41.178] has joined #go-nuts 16:33 -!- cenuij [~cenuij@78.112.41.178] has quit [Changing host] 16:33 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts 16:36 -!- jbooth1 [~jay@209.249.216.2] has joined #go-nuts 16:39 -!- foocraft [~dsc@78.101.228.183] has joined #go-nuts 16:40 -!- jeng [~jeng@74.194.1.28] has joined #go-nuts 16:43 -!- femtoo [~femto@95-89-248-52-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 16:48 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection] 16:50 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the connection] 16:54 < rm445> for anyone following along, getting at a struct in a slice with the template package is a bit of a pain, but works: 16:54 < rm445> to get at a field in a slice of struct fields, it's {.repeated section @} {.section field}{@}{.end} {.end} (and you nest this further if field is a struct itself) 16:55 -!- ShadowIce [~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined #go-nuts 16:55 -!- ShadowIce [~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit [Changing host] 16:55 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 16:55 -!- imsplitbit [~imsplitbi@64.39.4.132] has quit [Quit: Bye!] 16:56 -!- cenuij [~cenuij@78.112.41.178] has joined #go-nuts 16:56 -!- cenuij [~cenuij@78.112.41.178] has quit [Changing host] 16:56 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts 16:59 < wrtp> rm445: i think you can just do: {.repeated section @} {field} {.end} 17:02 < aiju> argh 17:02 < aiju> i wish there was syntactic sugar for if err != nil { return err } .... 17:02 < wrtp> aiju: i sympathise 17:03 < wrtp> but i can't see any better possibility 17:03 < wrtp> in most cases i copy and paste 17:04 < wrtp> and it means there's a good incentive to write no-possible-error-case code :-) 17:05 < rm445> wrtp: yes, thanks for that, sorry, yes, {field} and {field.subfield} work fine. 17:06 < aiju> wrtp: it's so hard in DAU close code 17:06 < rm445> I think I got confused because at one point I was trying to write {@.subfield} 17:07 -!- piranha [~piranha@5ED4B890.cm-7-5c.dynamic.ziggo.nl] has joined #go-nuts 17:11 < wrtp> aiju: DAU ? 17:12 < aiju> wrtp: http://www.catb.org/jargon/html/D/DAU.html 17:15 -!- marekweb [~marek@bas1-montreal48-1176173369.dsl.bell.ca] has joined #go-nuts 17:18 < wrtp> aiju: of course where there is an error return you have to check it. but it's often possible to manage things so that that's mostly at the boundaries of the code. 17:18 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the connection] 17:18 < wrtp> for instance, if you look at the godoc source, out of 4741 lines of code, only 43 match if.*err != nil 17:19 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts 17:19 < wrtp> that's 0.1% which isn't bad, and not really motivation for a language syntax change 17:20 < wrtp> i know that sometimes it feels like every other line is if err != nil .... 17:20 < homa_rano> isn't that 1%? not including the 2 following lines of handling 17:20 < homa_rano> leading to an ENORMOUS 3% 17:21 -!- aho [~nya@fuld-590c7a05.pool.mediaWays.net] has joined #go-nuts 17:21 -!- __gilles [~gilles@poolp.org] has quit [Ping timeout: 272 seconds] 17:22 -!- __gilles [~gilles@poolp.org] has joined #go-nuts 17:23 < wrtp> yeah, doh 17:24 < wrtp> still not too bad, really 17:24 < wrtp> is it? 17:24 -!- plainhao [~plainhao@208.75.85.237] has joined #go-nuts 17:34 -!- sav [~user@67.18.186.221] has joined #go-nuts 17:38 < wrtp> and it's interesting that only 9 or 10 of those 43 checks did a simple return of the same error code. 17:38 < fzzbt> it's still shorter than try {...} except {...} finally {...} 17:38 < wrtp> all the others did something special with the error 17:39 < skelterjohn> fzzbt: in some cases yes, in many cases no 17:39 < skelterjohn> for instance, if i do file io and i write 40 different things 17:39 < skelterjohn> as it is, i'm not going to bother checking err each time 17:40 < skelterjohn> too much effort for something that is not likely 17:40 < skelterjohn> but if it threw an exception, i'd certainly check it 17:45 < wrtp> skelterjohn: it's always worth checking the error 17:45 < wrtp> even if it's only to panic 17:45 < skelterjohn> i check at the end of the writes 17:46 < skelterjohn> just in the meantime 17:48 < skelterjohn> imagine the code from http://code.google.com/p/go-gb/source/browse/gb/pkg.go#1002 for the next 70-odd lines, checking err each time 17:48 < wrtp> if i'm doing a lot of one thing, i usually make a little wrapper for the function 17:49 < wrtp> i don't see the point of all those _, err =... 17:50 < skelterjohn> if there is a write error, it will be put in err 17:50 < wrtp> no it won't 17:50 < wrtp> only the last error will 17:50 < skelterjohn> well, yeah ok i don't have to have that all there 17:50 -!- aconran [~aconran-o@38.104.129.126] has joined #go-nuts 17:50 < skelterjohn> but if there is an error in one of the earlier ones, presumably it will still be an error for the last one 17:51 < wrtp> i'd just make a wrapper around fmt.Fprintf that checks the errors and sets the error only if it's not already set 17:51 < skelterjohn> and if it is, does nothing 17:51 < skelterjohn> not a bad idea 17:52 < wrtp> print = func(f string, a ...interface{}){if _, e := fmt.Fprintf(file, f, a...); e != nil {if err != nil {err = e}}} 17:52 < wrtp> then you can just use print("something ...%v", arg) 17:52 < wrtp> and not worry any more 17:53 < aiju> oh, closures 17:53 < plexdev> http://is.gd/QcsmBx by [Rob Pike] in go/src/pkg/gob/ -- gob: make recursive map and slice types work. 17:53 < skelterjohn> yeah - just wrote that 17:53 < wrtp> they can work quite well for things like this sometimes 17:54 < wrtp> skelterjohn: bet the code looks nicer now :-) 17:54 < skelterjohn> it will once i do a lot of copy/replacing :) 17:54 < fzzbt> maybe return could be given a special syntax like map deletions have. eg. "return err, err" would return err only if err is non-nil (or true), otherwise it would do nothing. 17:54 < wrtp> naah 17:55 < wrtp> it's not common enough 17:55 < wrtp> skelterjohn: one regexp should do it 17:55 < skelterjohn> don't even need a regexp 17:55 < skelterjohn> xcode's find/replace did it 17:55 < wrtp> indeed 17:56 < wrtp> the other alternative when you're doing a lot of io ops and need to exit when the first one errors, is to use panic/recover locally 17:56 < wrtp> just don't let the panic escape. 17:57 < wrtp> you do have the option to do exception code if it will really benefit 17:59 < wrtp> skelterjohn: now that you've got the wrapper, you could always make it add the \n automatically... 17:59 < skelterjohn> enough out of you 17:59 < skelterjohn> ;) 17:59 -!- belkiss [~kvirc@drn13-1-78-235-168-105.fbx.proxad.net] has joined #go-nuts 18:00 < wrtp> what, i don't get to mention templates either? 18:00 -!- belkiss [~kvirc@drn13-1-78-235-168-105.fbx.proxad.net] has left #go-nuts [] 18:00 < wrtp> "if it's good enough for goinstall"... 18:01 < skelterjohn> on an unrelated note, any idea why goinstall won't work with cmds? 18:01 < skelterjohn> also, goinstall seems to squelch any error messages 18:02 -!- cco3-hampster [~conleyo@nat/google/x-lphjgerogecrtzlz] has joined #go-nuts 18:03 -!- tvw [~tv@e176004035.adsl.alicedsl.de] has joined #go-nuts 18:04 < skelterjohn> i always thought the template stuff was for serving webpages, working with css or somethign 18:05 < skelterjohn> i guess it would make lots of sense for makefile generation, now that i look at it 18:06 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal] 18:09 -!- snearch [~snearch@f053007144.adsl.alicedsl.de] has joined #go-nuts 18:12 -!- aconran [~aconran-o@38.104.129.126] has quit [Read error: Connection reset by peer] 18:13 -!- aconran [~aconran-o@38.104.129.126] has joined #go-nuts 18:17 -!- cenuij [~cenuij@78.112.41.178] has joined #go-nuts 18:17 -!- cenuij [~cenuij@78.112.41.178] has quit [Changing host] 18:17 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts 18:25 < __gilles> re ! 18:32 < skelterjohn> ? 18:37 < marekweb> what do you guys think of a server using go coroutines for concurrency versus asynchronous io like node.js? does the node.js hype have any substance? 18:39 < niemeyer> marekweb: This question is probably better put at #nodejs 18:39 < Namegduf> Async I/O is how normal webservers work. 18:39 < Namegduf> In some cases, anyway. 18:39 < Namegduf> It's in general the alternative to concurrency via goroutines. 18:39 < marekweb> like nginx for instance, is that right? 18:39 < Namegduf> Goroutines are cleaner, simpler, and easier to work with. 18:40 < Namegduf> Synchronous I/O is easier to write. 18:40 < Namegduf> Async I/O is a pain. 18:40 < niemeyer> marekweb: I mean, whether node.js has substance 18:40 < Namegduf> I don't know anything much about it beyond "write servers in JavaScrip" 18:40 < niemeyer> marekweb: Regarding the first one, well.. pretty much every Go server does that 18:41 < Namegduf> Which sounds cool if you want to write servers and really love JS 18:41 < marekweb> indeed 18:41 < niemeyer> marekweb: Is there any specific questions around this which you're curious about? 18:42 < marekweb> well, specifically, the hype surrounding nodejs is that threading or other concurrency has poor performance, while the async approach that they use is superior 18:42 -!- belkiss [~kvirc@drn13-1-78-235-168-105.fbx.proxad.net] has joined #go-nuts 18:42 < Namegduf> Threading has poor performance. 18:42 < marekweb> so I'm wondering if this is just hype, and whether gorouttines for instance are good for the task 18:43 -!- belkiss [~kvirc@drn13-1-78-235-168-105.fbx.proxad.net] has left #go-nuts [] 18:43 < Namegduf> Thus why async, despite being a a pain, is popular. 18:43 < Namegduf> "other concurrency" is expanding it too far, though. 18:43 < marekweb> I see 18:43 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 18:43 < Namegduf> Coroutines cannot use synchronous I/O normally without blocking all other coroutines in that thread. 18:43 < Namegduf> So they're not a solution on their own. 18:44 -!- tensorpudding [~user@99.23.127.179] has joined #go-nuts 18:44 < Namegduf> What Go does is implement synchronous I/O per coroutine using asynchronous I/O behind the scenes. 18:44 < Namegduf> You get the clenaness of the former with the performance of the latter. 18:44 < Namegduf> *cleanness 18:44 < aiju> if you really love JS, fuck 18:45 -!- snearch [~snearch@f053007144.adsl.alicedsl.de] has quit [Quit: Verlassend] 18:45 < marekweb> interesting 18:45 < Namegduf> Because a goroutine is much, much cheaper than a thread, and the way it combines the many synchronous operations into a single syscall, you don't get the overhead of full threading 18:45 < Namegduf> In the same way you don't when using goroutines for concurrency in other cases. 18:46 * ww curses whomever invented threading 18:48 < ww> (nothing really to do with go, just sunk an afternoon fruitlessly trying to debug a deadlock somewhere deep in some other code) 18:49 < marekweb> Thanks for the explanation Namegduf 18:50 < Namegduf> No problem. 18:57 -!- adu [~ajr@softbank220043139062.bbtec.net] has quit [Quit: adu] 18:59 < niemeyer> <marekweb> well, specifically, the hype surrounding nodejs is that threading or other concurrency has poor performance, while the async approach that they use is superior 18:59 < niemeyer> marekweb: GOMAXPROCS=1 means Go does async I/O to handle goroutines 18:59 < Namegduf> It always does, actually 19:00 < niemeyer> marekweb: and no, doing concurrency by hand is not actually entirely nice 19:00 < niemeyer> marekweb: I have experience with Twisted, on that field.. have to write a blog post to describe it in more detail 19:01 < niemeyer> Namegduf: Heh, I'm trying to make the point clear. GOMAXPROCS=1 makes it easy to imagine that it can't be synchronous. 19:01 < Namegduf> niemeyer: Well, GOMAXPROCS doesn't include stuff blocked in a syscall... 19:02 < Namegduf> So you COULD have 30 threads blocked plus 1 running, it'd just suck 19:02 < niemeyer> Namegduf: Nevermind.. 19:02 < aiju> Go isn't about performance anyway 19:02 < jumzi> a tiny itsy part is 19:03 < Namegduf> aiju: If Go wasn't about performance it'd have magic arrays which were extendable and deleteable anywhere while retaining ordering 19:04 < Namegduf> aiju: "about" implies that things aren't a compromise. :P 19:05 < aiju> and all performance advantages the nodejs approach might have are probably compensated by poor javascript performance *cough* 19:05 -!- maattd [~maattd@esc31-1-78-245-92-71.fbx.proxad.net] has joined #go-nuts 19:05 -!- Project-2501 [~Marvin@82.84.78.37] has joined #go-nuts 19:05 < jumzi> aaaah 19:06 < jumzi> Write node.js, that probably took me 15 seconds to figure out 19:06 < Namegduf> aiju: I doubt it has any. :P 19:07 < Namegduf> At least, no measurable ones. 19:07 < aiju> i'd love to see serious servers in node.js, invalid requests are answered by "undefined" then 19:07 < Namegduf> At the least, when it comes to I/O, synchronous or asynchronous, CPU is relatively cheap 19:08 < Namegduf> Threading is just horrible in other ways. 19:09 < aiju> i once saw a 10 KLOC program which basically just *read from serial line* and did some minor parsing. 19:09 < aiju> Of course it used five threads with complex locking between them. 19:09 < aiju> never forget performance when reading from a 9600 baud line 19:09 < kimelto> hehe 19:09 -!- edsrzf [~kelvan@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts 19:10 < plexdev> http://is.gd/6k7axC by [Russ Cox] in go/ -- A+C: Chris Dollin (individual CLA) 19:12 -!- sven_ [~sven@mnhm-4d006b50.pool.mediaWays.net] has joined #go-nuts 19:12 < __gilles> hi 19:13 < __gilles> just to be sure im getting it right 19:13 < __gilles> src/pkg/runtime/<os>/thread.c provides wrappers to the C api for threads on the target only ? 19:13 < __gilles> there is no "unified" api ? 19:14 < __gilles> (like what i see in mem.c) 19:15 < __gilles> erf phone, brb 19:17 < skelterjohn> thread.c seems to provide synchronization primitives, rather than threading stuff 19:17 < skelterjohn> at first glance 19:17 < skelterjohn> go doesn't use threads - it uses goroutines 19:18 -!- Project-2501 [~Marvin@82.84.78.37] has quit [Read error: Connection reset by peer] 19:18 < skelterjohn> at least in the sense that, when you start a new goroutine, it doesn't spawn a new thread and run the code in that other thread 19:18 < skelterjohn> it does something much more lightweight 19:19 < ww> skelterjohn: gccgo does do that right no, right? 19:19 < skelterjohn> sure, but that's because gccgo isn't where it wants to be 19:19 < edsrzf> It might spawn a new thread if you have GOMAXPROCS > 1 19:19 < skelterjohn> edsrzf: it could spawn a new process 19:20 < ww> skelterjohn: right, just checking 19:20 < aiju> gccgo isn't what anyone should want 19:21 < skelterjohn> who better to say what people should want than aiju 19:21 -!- itrekkie [~itrekkie@150.135.210.60] has joined #go-nuts 19:22 -!- cenuij [~cenuij@base/student/cenuij] has quit [Quit: Curry time...] 19:30 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts 19:30 < ww> aiju: why not? 19:31 < aiju> ww: gcc is a mess 19:32 -!- femtoo [~femto@95-89-248-52-dynip.superkabel.de] has joined #go-nuts 19:38 < skelterjohn> you don't have to read it, just use it 19:38 < skelterjohn> i don't spend much time perusing 6g's source, either 19:39 < __gilles> re 19:39 < skelterjohn> re indeed 19:39 < __gilles> :-) 19:39 < skelterjohn> what does "re" mean 19:39 < jumzi> Hmm a good argument would be that gcc is slow 19:40 < __gilles> "i'm back" 19:40 < jumzi> But if you can deal with that, sure 19:40 < niemeyer> Risky Environment 19:40 < niemeyer> But no, not really ;) 19:41 < __gilles> 20:19 < skelterjohn> thread.c seems to provide synchronization primitives, rather than threading stuff 19:41 < niemeyer> http://www.infoq.com/interviews/pike-google-go 19:41 < __gilles> i was actually looking at freebsd/thread.c 19:41 < aiju> 20:40 < skelterjohn> you don't have to read it, just use it 19:41 < skelterjohn> i was looking at darwin/thread.c 19:41 < aiju> it's still a buggy mess 19:42 < __gilles> ok, let's rephrase my question i wasn't very clear 19:42 < aiju> __gilles: there is a unified API 19:42 < plexdev> http://is.gd/G0FVDI by [Russ Cox] in 2 subdirs of go/src/pkg/ -- sync/atomic: new package 19:42 < aiju> with functions like newosproc or something 19:42 < plexdev> http://is.gd/nzmPCQ by [Russ Cox] in 2 subdirs of go/src/pkg/sync/ -- sync: use sync/atomic 19:42 < __gilles> ok 19:42 < plexdev> http://is.gd/BGywML by [Russ Cox] in 3 subdirs of go/src/pkg/runtime/ -- runtime: use kernel-supplied cas on linux/arm 19:42 < aiju> __gilles: OS threads might be called procs 19:42 < __gilles> you answered :p 19:42 < plexdev> http://is.gd/kD3PXj by [Russ Cox] in go/src/pkg/sync/atomic/ -- sync/atomic: make BUG comment godoc-compatible 19:43 < aiju> (Plan 9 heritage) 19:43 < __gilles> aiju: any pointer to documentation of this api ? 19:43 < niemeyer> Woot 19:43 < aiju> the source is the documentation for the Go internals 19:43 < niemeyer> sync/atomic is awesome 19:43 < __gilles> ok 19:43 < aiju> there are some random bits, but most of that is wrong lol 19:44 < aiju> don't trust the comments either 19:44 < __gilles> :) 19:49 < skelterjohn> in Rob Pike's talk, that niemeyer just linked to, he talks about the ability to do your own memory management 19:50 < skelterjohn> but i wonder how you'd do that for something like a chan or a map 19:50 < skelterjohn> you can't just say "var ch chan int" and have a ready-to-go channel - make does some initialization for you 19:50 < skelterjohn> what that initialization is is not clear to me 19:50 < skelterjohn> but i feel like if i just took the right amount of zeroed memory and unsafe'd it to a channel, it wouldn't work 19:52 < skelterjohn> anyone know how that might work? 19:54 -!- mattn_jp [~mattn@112-68-84-135f1.hyg1.eonet.ne.jp] has quit [Quit: Ex-Chat] 19:57 -!- nodie [~josemaria@90.Red-83-61-112.dynamicIP.rima-tde.net] has joined #go-nuts 19:58 -!- KimHemma2 [~urtie@90-227-159-22-no57.tbcn.telia.com] has quit [Read error: Connection reset by peer] 19:59 -!- KimHemma2 [~urtie@90-227-159-22-no57.tbcn.telia.com] has joined #go-nuts 20:06 -!- TheMue [~TheMue@p5DDF7CBE.dip.t-dialin.net] has joined #go-nuts 20:06 < skelterjohn> well, i posted in the google group 20:09 -!- maattd [~maattd@esc31-1-78-245-92-71.fbx.proxad.net] has quit [Quit: Computer has gone to sleep.] 20:10 < niemeyer> skelterjohn: I don't think it's doable.. that's why make() exists at all 20:10 < skelterjohn> i didn't think so either, but what rob said in the talk implied otherwise 20:15 < niemeyer> skelterjohn: Yeah, he missed the special case of maps and channels a couple of times 20:16 < skelterjohn> it would be neat if go allowed you to provide your own allocator for make to use under the hood, but that would add a whole lot of complexity that no one really needs right now 20:18 < nodie> hi, I'm a completely newbie in go 20:18 < nodie> I just download with hg the sources and compiled it 20:19 < nodie> I can compile the hello world example with 8g and it works 20:19 < nodie> I've copied an example of http.ListenAndServe 20:20 < nodie> but when I try to compile it I get an error saying: web.go:9: undefined: http.Conn 20:20 -!- fabled [~fabled@mail.fi.jw.org] has quit [Quit: Ex-Chat] 20:20 -!- itrekkie [~itrekkie@150.135.210.60] has quit [Quit: itrekkie] 20:20 < nodie> I suppose I miss something (I've the environment variables set) 20:20 < nodie> what could it be? 20:20 -!- tensai_cirno [~cirno@77.232.15.216] has joined #go-nuts 20:21 < skelterjohn> nodie: pastebin the source you're talking about 20:23 < nodie> http://pastie.org/1607381 20:23 < niemeyer> nodie: Without looking, are you importing? 20:24 < niemeyer> Hmm 20:24 < skelterjohn> well, nodie, the http package has no type Conn 20:24 < niemeyer> Yeah, that's what I was looking at as well 20:25 < niemeyer> nodie: golang.org/pkg/http 20:25 < nodie> could you refer me to a better example of http listenandserve? 20:25 < skelterjohn> the example you're looking at might be old 20:26 < niemeyer> nodie: Look at that link 20:26 < niemeyer> nodie: There are examples in it 20:27 -!- eriko [~eriko@mail.familyolson.org] has quit [Quit: leaving] 20:28 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts 20:29 < nodie> thanks niemeyer skelterjohn 20:29 < nodie> it works 20:29 < plexdev> http://is.gd/Fh6zY5 by [Russ Cox] in go/src/pkg/runtime/ -- runtime: omit breakpoint during terminal panic 20:29 < nodie> does 8g always compile statically? 20:30 < skelterjohn> yes 20:30 < skelterjohn> no dynamic linking, yet 20:30 < skelterjohn> maybe one day, maybe not 20:30 -!- itrekkie [~itrekkie@uawifi-nat-210-24.arizona.edu] has joined #go-nuts 20:31 -!- Eridius [~kevin@69.170.160.74] has joined #go-nuts 20:31 -!- Eridius [~kevin@69.170.160.74] has quit [Changing host] 20:31 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts 20:32 < __gilles> pffff 20:32 < __gilles> $ head -1 mksyscall.sh 20:32 < __gilles> #!/usr/bin/perl 20:33 < __gilles> obviously `sh mksyscall.sh` was going to fail :) 20:34 < nodie> skelterjohn, I don't care about dynamic linking 20:34 < nodie> I even prefer not to use it 20:35 < aiju> .NAZI "compiling statically" is an oxymoron 20:35 < aiju> also, cgo stuff is dynamically linked 20:37 < nodie> :) 20:37 < nodie> is there a good postgresql library in go ? 20:38 < skelterjohn> i don't think anyone has done that - there is a mysql lib though 20:39 < Namegduf> Yes, there is 20:39 < Namegduf> http://go-lang.cat-v.org/pure-go-libs <- List here. 20:39 < Namegduf> Lots of MySQL, but there's a go-pgsql to. 20:39 < Namegduf> *too 20:39 < skelterjohn> ah, neat 20:42 < nodie> bye! 20:42 -!- nodie [~josemaria@90.Red-83-61-112.dynamicIP.rima-tde.net] has left #go-nuts ["Saliendo"] 20:44 -!- ronnyy [~quassel@p4FF1C6E1.dip0.t-ipconnect.de] has joined #go-nuts 20:48 -!- dshep [~dss@24.130.32.125] has joined #go-nuts 20:50 -!- ronnyy [~quassel@p4FF1C6E1.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 20:52 -!- itrekkie [~itrekkie@uawifi-nat-210-24.arizona.edu] has quit [Quit: itrekkie] 20:55 -!- dshep [~dss@24.130.32.125] has quit [Quit: leaving] 20:56 -!- jeng [~jeng@74.194.1.28] has quit [Quit: ChatZilla 0.9.86 [Firefox 3.6.8/20100722155716]] 20:58 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error: Operation timed out] 20:59 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 21:11 -!- itrekkie [~itrekkie@ip72-211-129-122.tc.ph.cox.net] has joined #go-nuts 21:11 -!- itrekkie [~itrekkie@ip72-211-129-122.tc.ph.cox.net] has quit [Client Quit] 21:11 -!- plainhao [~plainhao@208.75.85.237] has quit [Quit: plainhao] 21:13 -!- roto [~roto@S010600215a08cecc.cg.shawcable.net] has joined #go-nuts 21:22 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:2907:ecb4:6b3e:d5f0] has quit [Quit: Leaving.] 21:40 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has quit [Ping timeout: 246 seconds] 21:46 < plexdev> http://is.gd/F8B5yK by [Rob Pike] in go/src/pkg/crypto/openpgp/ -- crypto/openpgp: fix test prints 21:55 -!- keithcascio [~keithcasc@nat/google/x-wutkgbcdcwyynnnj] has joined #go-nuts 21:57 -!- JusticeFries_ [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has joined #go-nuts 21:58 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout: 612 seconds] 22:00 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has quit [Ping timeout: 260 seconds] 22:07 -!- piranha [~piranha@5ED4B890.cm-7-5c.dynamic.ziggo.nl] has quit [Quit: Computer has gone to sleep.] 22:09 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has joined #go-nuts 22:10 -!- TheMue [~TheMue@p5DDF7CBE.dip.t-dialin.net] has quit [Quit: TheMue] 22:14 -!- femtoo [~femto@95-89-248-52-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 22:15 -!- artefon [~thiago@189.59.196.59] has quit [Quit: bye] 22:22 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has quit [Remote host closed the connection] 22:27 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has quit [Remote host closed the connection] 22:27 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has joined #go-nuts 22:29 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Quit: skelterjohn] 22:33 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts 22:34 -!- aconran [~aconran-o@38.104.129.126] has quit [Remote host closed the connection] 22:39 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the Fish] 22:41 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has quit [Ping timeout: 246 seconds] 22:41 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has quit [Read error: Connection reset by peer] 22:41 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has joined #go-nuts 22:48 < comex_> it's not possible to automatically generate String() for a set of constants, is it? 22:48 < plexdev> http://is.gd/CM3Vob by [Nigel Tao] in go/src/pkg/compress/lzw/ -- compress/lzw: fix the stupidity of allocating and zeroing a new buffer 22:49 -!- aconran [~aconran-o@38.104.129.126] has joined #go-nuts 22:53 -!- JusticeFries_ [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has joined #go-nuts 22:55 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has quit [Ping timeout: 250 seconds] 22:59 -!- saschpe [~quassel@opensuse/member/saschpe] has quit [Remote host closed the connection] 22:59 < edsrzf> It's not possible just through Go alone. 22:59 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit: Verlassend] 22:59 < edsrzf> You could write a script to do it or similar. 23:03 < ww> will len(s) where s is a string give you the lenght in bytes of the string or the number of runes? 23:03 < ww> e.g. if i need bytes should i do len([]byte(s)) ? 23:03 < Namegduf> Bytes. 23:09 < ww> ty 23:10 -!- emjayess [~emjayess@pix1.i29.net] has quit [Quit: Leaving] 23:13 -!- wrtp [~rog@92.17.33.100] has quit [Quit: wrtp] 23:14 -!- tvw [~tv@e176004035.adsl.alicedsl.de] has quit [Remote host closed the connection] 23:18 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 260 seconds] 23:24 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 23:25 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by peer] 23:31 < ww> https://bitbucket.org/ww/hashtable/src/tip/kyoto/cabinet/ 23:31 < ww> have to be the easiest experience i've ever had writing bindings... 23:31 < ww> only minimal yet... 23:32 < ww> but... the C section at the bottom of http://fallabs.com/kyotocabinet/api/ 23:32 < ww> is it possible to implement the visitor pattern in go where some go code would be called as a callback by the library? 23:32 < Namegduf> Pass a function. 23:33 < Namegduf> Oh, I see. 23:33 < Namegduf> Yes. 23:33 < Namegduf> It is possible to call Go from C. 23:34 < ww> any examples off the top of your head? 23:34 < Namegduf> I'm not sure how to implement what you're wanting, no. 23:34 < niemeyer> ww: misc/cgo/life 23:34 < Namegduf> I just know that cgo got that feature added. 23:34 < niemeyer> ww: In the Go tree 23:34 * ww looking 23:37 < ww> oh, so thats easy, you just say // export Func and make sure the function has C arguments... 23:41 < niemeyer> ww: Yeah, pretty much 23:41 < ww> go is too easy 23:41 < niemeyer> Agreed :) 23:41 < Namegduf> It's okay. 23:42 < Namegduf> Because it's statically typed the PHP, Ruby, and other shiny dynamic language morons will stay away 23:42 < Namegduf> And we can have an easy language without dealing with them. :P 23:43 < niemeyer> Namegduf: Ugh.. that's unnecessarily harsh 23:43 < Namegduf> niemeyer: I'm not saying that everyone who uses those languages is one, just that the bad programmers prefer such languages. 23:44 < niemeyer> Namegduf: Continues to be harsh.. I've heard the same thing about pretty much every language, and if Go ever gets as popular, people will say the same thing about Go 23:44 < niemeyer> Namegduf: There are unbelievable programmers on pretty much every language, and people that haven't learned all their way yet too. 23:45 < Namegduf> niemeyer: That contradicts nothing I said. 23:45 < Namegduf> It's a question of relative numbers. It was supposed to be a tongue-in-cheek comment, though, so I'll withdraw it rather than cause bother. :P 23:45 < nickbp> stop taking irc chat so seriously 23:46 < Namegduf> Sorry for bothering you. 23:46 < niemeyer> nickbp: Sorry, my mistake 23:46 < nickbp> irc chat atm machine 23:46 < Namegduf> My fault too. 23:46 < nickbp> youre not not taking it seriously!! 23:48 < niemeyer> nickbp: I'm not not not taking it.. 23:53 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Ping timeout: 250 seconds] 23:54 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4] 23:59 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts --- Log closed Sat Feb 26 00:00:29 2011