Go Language Resources Go, golang, go... NOTE: This page ceased updating in October, 2012

--- Log opened Tue Jul 12 00:00:56 2011
00:05 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
00:06 -!- franciscosouza [~francisco@187.105.25.184] has quit [Read error:
Connection reset by peer]
00:07 -!- vyom [~vyom@c-24-18-47-160.hsd1.wa.comcast.net] has quit [Remote host
closed the connection]
00:07 -!- franciscosouza [~francisco@187.105.25.184] has joined #go-nuts
00:09 -!- meling [~meling@12.238.254.50] has joined #go-nuts
00:15 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 258
seconds]
00:19 -!- dario_ [~dario@domina.zerties.org] has joined #go-nuts
00:19 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
00:21 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
00:22 -!- grai [~grai@38.70.70.115.static.exetel.com.au] has joined #go-nuts
00:26 -!- Loonacy [~loonacy@c-67-172-248-248.hsd1.ut.comcast.net] has quit [Ping
timeout: 240 seconds]
00:27 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 250
seconds]
00:28 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has joined
#go-nuts
00:28 -!- bugQ [~bug@c-71-195-207-34.hsd1.ut.comcast.net] has quit [Ping timeout:
240 seconds]
00:33 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
00:37 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
00:44 -!- danilo04 [~danilo04@wireless-184-12-12-73.dr02.roch.ny.frontiernet.net]
has joined #go-nuts
00:52 -!- ccc1 [~Adium@140.109.98.187] has joined #go-nuts
00:54 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 246 seconds]
00:56 -!- franciscosouza [~francisco@187.105.25.184] has quit [Read error:
Connection reset by peer]
00:59 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Read error:
Connection reset by peer]
01:29 < vsmatck> I don't think I understand the break with label.  Can
anyone help me understand that?
01:30 < vsmatck> I've been using a goto to get out of a nested loop.  I see
the example with the break with label, but the label is above the loops.
01:31 < vsmatck> Does the break with label just tell it what scope to break
out to?  Is that it?
01:31 < jessta_> vsmatck: a goto can go to any label, a break should only be
able to go to a label of an outer loop
01:32 < nicka> Yeah
01:32 < jessta_> it's better to use break since it makes it easier to read
01:33 < nicka> You're labelling the control structure basically
01:33 < vsmatck> Does it matter where the label is at with break?  Does it
just have to be in the right scope?
01:34 < nicka> http://golang.org/doc/go_spec.html#Break_statements
01:34 < vsmatck> I'm looking at that now.
01:34 < vsmatck> "If there is a label, it must be that of an enclosing "for"
...  " I don't know what this means.
01:35 < jessta_> somelabel: for {
01:35 < nicka> It can't be an arbitrary label
01:35 < nicka> Only one associated with an enclosing control structure
01:35 < vsmatck> ahh!  I think I get it.
01:35 * vsmatck goes to verify he gets it.
01:36 < vsmatck> Yeah.  Got it.  Thanks guys.  :)
01:37 -!- opt [~opt@174.3.227.184] has joined #go-nuts
01:45 -!- bmizerany [~bmizerany@204.14.152.118] has quit [Remote host closed the
connection]
01:53 -!- chadkouse1 [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has joined
#go-nuts
01:54 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has quit [Ping
timeout: 250 seconds]
01:55 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Quit: Leaving]
02:05 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 250 seconds]
02:10 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 250
seconds]
02:16 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
02:20 -!- espeed [~espeed@63.246.231.57] has joined #go-nuts
02:20 -!- Loonacy [~loonacy@c-67-172-248-248.hsd1.ut.comcast.net] has joined
#go-nuts
02:25 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
02:44 -!- telexicon [~telexicon@unaffiliated/chowmeined] has quit [Quit: Leaving]
02:45 -!- telexicon [~telexicon@unaffiliated/chowmeined] has joined #go-nuts
02:50 -!- espeed [~espeed@63.246.231.57] has quit [Quit: Leaving]
02:57 -!- danilo04 [~danilo04@wireless-184-12-12-73.dr02.roch.ny.frontiernet.net]
has quit [Ping timeout: 252 seconds]
02:57 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
03:01 -!- gridaphobe [~gridaphob@cpe-74-68-151-24.nyc.res.rr.com] has quit [Read
error: Connection reset by peer]
03:17 -!- bmizerany [~bmizerany@204.14.152.118] has joined #go-nuts
03:21 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 255 seconds]
03:24 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
03:27 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
03:27 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
03:30 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout:
240 seconds]
03:35 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
03:37 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz]
03:40 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has quit [Quit:
Leaving]
03:53 -!- jmil [~jmil@2001:468:1802:e148:223:32ff:feb1:9dfc] has quit [Quit: jmil]
03:55 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
03:56 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
04:04 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services]
04:04 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:09 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
04:12 -!- keithcascio [~keithcasc@nat/google/x-ztebkjetmqehphau] has quit [Quit:
Leaving]
04:12 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
04:12 -!- bmizerany [~bmizerany@204.14.152.118] has quit [Remote host closed the
connection]
04:20 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
04:24 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
04:31 -!- jmil [~jmil@c-68-81-252-40.hsd1.pa.comcast.net] has joined #go-nuts
04:36 -!- Bigbear1 [~Cody@d173-181-54-56.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
04:49 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts
04:57 -!- jyxent [~jyxent@129.128.191.96] has quit [Ping timeout: 246 seconds]
05:00 -!- jyxent [~jyxent@129.128.191.96] has joined #go-nuts
05:00 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 240
seconds]
05:01 -!- xcombelle [~xcombelle@AToulouse-551-1-63-115.w92-146.abo.wanadoo.fr] has
joined #go-nuts
05:06 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
05:11 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
05:13 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has joined #go-nuts
05:15 -!- \toothrot [~mux@66-169-185-121.dhcp.ftwo.tx.charter.com] has quit [Quit:
here we are]
05:20 -!- htoothrot [~mux@66-169-185-121.dhcp.ftwo.tx.charter.com] has joined
#go-nuts
05:23 -!- noodles775 [~michael@canonical/launchpad/noodles775] has joined #go-nuts
05:23 -!- coldturnip1 [~COLDTURNI@111-250-30-140.dynamic.hinet.net] has joined
#go-nuts
05:25 -!- coldturnip [~COLDTURNI@111-250-30-140.dynamic.hinet.net] has quit [Ping
timeout: 246 seconds]
05:26 -!- str1ngs [~strings@unaffiliated/str1ngs] has joined #go-nuts
05:31 -!- chanwit [~chanwit@223.206.127.157] has joined #go-nuts
05:33 -!- telexicon [~telexicon@unaffiliated/chowmeined] has quit [Ping timeout:
252 seconds]
05:40 -!- kfb [~kfb@c-24-7-24-215.hsd1.ca.comcast.net] has quit []
05:41 -!- benjack [~benjack@bb121-6-51-10.singnet.com.sg] has joined #go-nuts
05:42 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 240
seconds]
05:44 -!- vmil86 [~vmil86@78.57.227.12] has joined #go-nuts
05:46 -!- jmil [~jmil@c-68-81-252-40.hsd1.pa.comcast.net] has quit [Quit: jmil]
05:46 -!- molto_alfredo [~molto_alf@142.176.0.21] has quit [Ping timeout: 240
seconds]
05:48 -!- nicka1 [~lerp@142.176.0.21] has quit [Ping timeout: 252 seconds]
05:48 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 240 seconds]
05:48 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
05:49 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
05:53 -!- mjml [~opt@174.3.227.184] has quit [Quit: Leaving]
05:53 -!- ccc1 [~Adium@140.109.98.187] has left #go-nuts []
05:54 -!- blb [~blb@c-24-11-236-117.hsd1.il.comcast.net] has quit [Ping timeout:
252 seconds]
05:55 -!- jmil [~jmil@c-68-81-252-40.hsd1.pa.comcast.net] has joined #go-nuts
05:59 -!- chanwit [~chanwit@223.206.127.157] has quit [Quit: Leaving.]
06:05 -!- foocraft [~ewanas@78.100.194.220] has joined #go-nuts
06:07 -!- chadkouse1 [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has quit
[Quit: Leaving.]
06:08 -!- deadmoth [~void@ip98-181-33-119.br.br.cox.net] has joined #go-nuts
06:11 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 250 seconds]
06:11 -!- mindphaze [~void@ip98-181-33-119.br.br.cox.net] has quit [Ping timeout:
276 seconds]
06:19 -!- blb [~blb@c-24-11-236-117.hsd1.il.comcast.net] has joined #go-nuts
06:20 -!- ronnyy [~quassel@p4FF1C5EF.dip0.t-ipconnect.de] has joined #go-nuts
06:20 -!- jmil [~jmil@c-68-81-252-40.hsd1.pa.comcast.net] has quit [Quit: jmil]
06:20 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
06:43 -!- Project_2501 [~Marvin@82.84.93.231] has joined #go-nuts
06:59 -!- Project-2501 [~Marvin@82.84.70.165] has joined #go-nuts
07:03 -!- Project_2501 [~Marvin@82.84.93.231] has quit [Ping timeout: 264 seconds]
07:03 -!- bpalmer [~user@unaffiliated/bpalmer] has left #go-nuts ["ERC Version
5.1.2 $Revision: 1.796.2.6 $ (IRC client for Emacs)"]
07:06 -!- Crnobog_ [~crnobog@cpc3-nmal12-0-0-cust48.croy.cable.virginmedia.com]
has quit [Ping timeout: 246 seconds]
07:06 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving]
07:08 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 240 seconds]
07:11 -!- mikespook [~mikespook@183.47.227.242] has quit [Ping timeout: 260
seconds]
07:12 -!- yogib [~yogib@131.234.59.64] has joined #go-nuts
07:23 -!- napsy [~luka@193.2.66.6] has joined #go-nuts
07:25 -!- mikespook [~mikespook@183.47.234.5] has joined #go-nuts
07:25 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
07:27 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has quit [Quit:
Leaving]
07:30 -!- alkor [~alkor@unaffiliated/alkor] has joined #go-nuts
07:31 < alkor> In go, can I declare an array of chan int?
07:31 < alkor> And if I can how can run select over it?
07:32 < aiju> [10]chan int and no
07:32 < aiju> you can't
07:32 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
07:34 -!- ronnyy [~quassel@p4FF1C5EF.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
07:35 < alkor> ok, so I have the following little snippet
07:36 < alkor> http://pastebin.com/PBS1cb1w
07:36 < alkor> is there an idiomatic way to run this for general N instead
for just N=2?
07:36 < jnwhiteh> use a shared channel
07:36 < jnwhiteh> that would be the idiomatic way, since that's what you're
doing.
07:37 < alkor> what is a shared channel?
07:37 < jnwhiteh> multiple goroutines can share a channel and both write to
it
07:37 < alkor> thanks
07:38 < alkor> i don't think that would work in my case
07:38 < alkor> each channel represents a network connection to a different
node in a network
07:38 < jnwhiteh> they should be roughly equivalent
07:38 < jnwhiteh> yes, but the way you handle the messages is the same
07:38 < jnwhiteh> since you're looking for a general solution
07:39 < alkor> and a node can be connected to an arbitrary number of nodes -
and that number may change as the application runs
07:39 < alkor> so i really need a select on N channels
07:39 < jnwhiteh> why?
07:39 < jnwhiteh> why can't each node simply have an 'in' channel
07:39 < jnwhiteh> and anyone that is connected to that node has that
channel?
07:39 < alkor> when another node sends information on the in channel, it
will expect an answer
07:40 < alkor> and the original node will not be able to send it back if
there is a single in channel
07:40 < aiju> rob pike stated that there never will be a select on N
channels
07:40 < jnwhiteh> it could send a channel on which it expects a response
07:40 < jnwhiteh> so you want to implement method calls over channels
07:40 < jnwhiteh> in an arbitrarily connected way
07:41 < alkor> can i send channels over a netchan?
07:41 < aiju> i doubt it
07:41 < jnwhiteh> ah, I'm not sure
07:41 < jnwhiteh> but you didn't say you were using netchans =)
07:41 < aiju> yes he was
07:41 < aiju> 09:45 < alkor> each channel represents a network
connection to a different node in a network
07:41 < aiju> did you think he was using magic voodoo?
07:41 < jnwhiteh> aiju: you are reading into the word 'network' here
07:41 < jnwhiteh> no, I work in concurrent architecture all day in
07:41 < alkor> well for now i will simulate the application without the
network just using channels, but the eventual plan is to make it a p2p application
where each node works on a different computer
07:42 < jnwhiteh> a process oriented system is a 'network'
07:42 -!- Project_2501 [~Marvin@82.84.77.6] has joined #go-nuts
07:42 < jnwhiteh> so its mixed terminology
07:42 < aiju> alkor: have one go routine per netchan
07:42 < aiju> have them gather the data and write into a shared channel
07:42 < aiju> ???
07:42 < aiju> profit!
07:43 < alkor> so why can't i send a channel over a netchan?  isn't netchan
a first class channel?
07:43 < aiju> alkor: how the fuck is that supposed to work?
07:44 < alkor> so i will send an object over a netchan (a request) and the
object will have a channel where the response is supposed to send on which the
client will listen
07:45 -!- Project-2501 [~Marvin@82.84.70.165] has quit [Ping timeout: 264 seconds]
07:45 < aiju> i mean, how do you send a channel across the network?
07:46 < aiju> it would require some crazy magic
07:48 < jnwhiteh> Here's what Russ suggests:
http://paste.pocoo.org/show/436813/
07:49 < jnwhiteh> but that doesn't directly address your issue since you
want to be able to communicate back
07:49 -!- foocraft_ [~ewanas@dyn-86-36-35-147.QATAR.CMU.EDU] has joined #go-nuts
07:49 < jnwhiteh> but you could alter that to use two channels in order to
allow that, for example
07:53 < alkor> thanks
07:54 -!- alkor [~alkor@unaffiliated/alkor] has quit [Quit: alkor]
08:00 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has quit [Ping
timeout: 252 seconds]
08:04 -!- mikespook [~mikespook@183.47.234.5] has quit [Remote host closed the
connection]
08:04 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has joined #go-nuts
08:05 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
08:06 -!- mikespook [~mikespook@183.47.234.5] has joined #go-nuts
08:11 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 246
seconds]
08:15 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:17 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
08:18 -!- pjz [~pj@place.org] has joined #go-nuts
08:18 -!- madari_ [madari@idm.irc-galleria.net] has joined #go-nuts
08:19 -!- russell_1 [~russell_h@ash.osuosl.org] has joined #go-nuts
08:21 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.0]
08:23 -!- Netsplit *.net <-> *.split quits: russell_h, bthomson, madari,
pjz_
08:27 -!- photron [~photron@port-92-201-101-3.dynamic.qsc.de] has joined #go-nuts
08:32 -!- fabled [~fabled@83.145.235.194] has quit [Read error: No route to host]
08:32 -!- virtualsue [~chatzilla@nat/cisco/x-svncacxihyuhvsts] has joined #go-nuts
08:34 -!- ccc1 [~Adium@140.109.98.187] has joined #go-nuts
09:01 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
09:07 -!- mikespook [~mikespook@183.47.234.5] has quit [Remote host closed the
connection]
09:08 -!- shachaf [~shachaf@204.109.63.130] has quit [Read error: Operation timed
out]
09:14 -!- blb [~blb@c-24-11-236-117.hsd1.il.comcast.net] has quit [Ping timeout:
252 seconds]
09:15 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
09:22 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote
host closed the connection]
09:23 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 253
seconds]
09:24 -!- blb [~blb@c-24-11-236-117.hsd1.il.comcast.net] has joined #go-nuts
09:27 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-166-158.clienti.tiscali.it] has
joined #go-nuts
09:29 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
09:30 -!- Project_2501 [~Marvin@82.84.77.6] has quit [Ping timeout: 240 seconds]
09:30 -!- exch [~blbl@87.209.181.34] has joined #go-nuts
09:32 -!- ccc1 [~Adium@140.109.98.187] has quit [Quit: Leaving.]
09:36 -!- zaero [~eclark@servo.m.signedint.com] has quit [Ping timeout: 260
seconds]
09:46 -!- benjack [~benjack@bb121-6-51-10.singnet.com.sg] has quit [Quit:
Leaving.]
10:08 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
10:16 -!- erus` [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
10:17 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has quit [Read
error: Connection reset by peer]
10:18 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has joined #go-nuts
10:18 -!- alehorst [~alehorst@189.58.19.21.dynamic.adsl.gvt.net.br] has quit [Read
error: Connection reset by peer]
10:18 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 252
seconds]
10:21 < uriel> aiju: maybe netchan could wrap channels sent with netchans
10:22 < uriel> (I have absolutely no idea if this is feasible, I have not
even used netchan, but even if at first it sounds crazy, it might be possible)
10:22 < aiju> many things are possible
10:22 < aiju> i just doubt that they took the effort
10:22 < uriel> yea, doesn't sound too useful in any case
10:23 < uriel> I just was surprised to realize that it *migtht* be possible
10:24 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
10:25 -!- bthomson [~bthomson@c-68-33-5-232.hsd1.va.comcast.net] has joined
#go-nuts
10:26 -!- alehorst [~alehorst@201.22.35.44.dynamic.adsl.gvt.net.br] has joined
#go-nuts
10:39 -!- Kahvi [~Kahvi@a91-152-186-228.elisa-laajakaista.fi] has joined #go-nuts
10:39 -!- blb [~blb@c-24-11-236-117.hsd1.il.comcast.net] has quit [Quit: leaving]
10:49 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
10:50 -!- coldturnip [~COLDTURNI@111-250-30-140.dynamic.hinet.net] has joined
#go-nuts
10:52 -!- coldturnip1 [~COLDTURNI@111-250-30-140.dynamic.hinet.net] has quit [Ping
timeout: 240 seconds]
10:53 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
10:55 -!- JimPeak [~lejimpeak@modemcable213.208-160-184.mc.videotron.ca] has quit
[Ping timeout: 252 seconds]
10:58 -!- cmike_ [~cmike@adsl-99-75-50-144.dsl.bltnin.sbcglobal.net] has quit
[Remote host closed the connection]
11:00 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
11:05 -!- coldturnip [~COLDTURNI@111-250-30-140.dynamic.hinet.net] has quit [Read
error: Connection reset by peer]
11:06 -!- coldturnip [~COLDTURNI@111-250-30-140.dynamic.hinet.net] has joined
#go-nuts
11:08 -!- rael_wiki [~chatzilla@unaffiliated/rael-wiki/x-8420294] has joined
#go-nuts
11:13 -!- ronnyy [~quassel@p4FF1C5EF.dip0.t-ipconnect.de] has joined #go-nuts
11:18 < rael_wiki> in the rpc package what should mean an error message like
"2011/07/12 13:26:00 rpc: client protocol error: read tcp 127.0.0.1:5360:
connection reset by peer"
11:19 < jessta_> sounds like the connection was dropped
11:20 < rael_wiki> yep, but it's strange...  the client opens a connection,
calls a remote procedure and then closes the connection
11:21 < rael_wiki> this happens many times...
11:21 -!- gnuvince|work [8e544424@gateway/web/freenode/ip.142.84.68.36] has joined
#go-nuts
11:23 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 252
seconds]
11:29 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
11:33 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
11:34 < erus`> i wish do had algebraic types sometimes
11:35 < aiju> algebraic types?
11:35 < aiju> enums?
11:36 < erus`> data Maybe = Just x | Nothing
11:36 < aiju> oh that stuff
11:36 < erus`> they a function can return a Maybe int
11:36 < aiju> yeah i know
11:36 < erus`> rather than a int, bool
11:36 < aiju> i like int, bool better
11:37 < erus`> yeah but you cant feed that straight into another function
can you?
11:37 < erus`> somethingelse(IntBoolFunc(123), 321);
11:38 < mpl> good question
11:38 < skelterjohn> Just x | Nothing => use a *int
11:38 < mpl> I guess you can always pass a struct that wraps those two if
anything.
11:39 < skelterjohn> it can be an int or nil
11:39 < skelterjohn> but int, ok is much clearer
11:39 < aiju> i don't remember exactly but i found maybe stuff to be a
plague
11:40 < exch> confused the hell out of me
11:40 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 260 seconds]
11:40 < aiju> not confusing, just annoying to work with
11:40 -!- lurcio [~margent@compy386.queens.ox.ac.uk] has joined #go-nuts
11:44 -!- _foocraft [~ewanas@78.101.175.151] has joined #go-nuts
11:45 -!- foocraft [~ewanas@78.100.194.220] has quit [Ping timeout: 246 seconds]
11:46 -!- foocraft_ [~ewanas@dyn-86-36-35-147.QATAR.CMU.EDU] has quit [Quit: if
you're going....to san.  fran.  cisco!!!]
11:46 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
11:48 < jessta_> exch: you can, as long the the function takes the same
number of parameters as you are returning
11:49 < jessta_> erus`: oops I ment you
11:55 -!- ronnyy [~quassel@p4FF1C5EF.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
11:55 -!- meling [~meling@12.238.254.50] has quit [Remote host closed the
connection]
12:11 -!- PortatoreSanoDiI [~Marvin@82.84.87.65] has joined #go-nuts
12:14 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-166-158.clienti.tiscali.it] has
quit [Ping timeout: 240 seconds]
12:18 < skelterjohn> jessta_: is that right?  didn't know that
12:18 < skelterjohn> can you string together multiple multi-returns into one
function?
12:18 < Namegduf> I don't think so.
12:19 < Namegduf> I remember the basic form working but I think that's it.
12:19 < jessta_> skelterjohn: nope
12:19 < exch> a().b().c() doesnt work if any of those (or all) have more
than 1 return value
12:19 < jessta_> has to match exactly
12:19 < exch> But I realize that's not what you meant
12:19 < Namegduf> It wouldn't work for the hypothetical "Maybe" type either,
though
12:20 < Namegduf> So I think that's no loss there
12:22 -!- molto_alfredo [~molto_alf@142.176.0.21] has joined #go-nuts
12:25 -!- nicka1 [~lerp@142.176.0.21] has joined #go-nuts
12:28 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 246
seconds]
12:30 -!- coffeejunk [~max@static.58.62.47.78.clients.your-server.de] has quit
[Ping timeout: 276 seconds]
12:34 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
12:42 -!- PortatoreSanoDiI [~Marvin@82.84.87.65] has quit [Ping timeout: 246
seconds]
12:52 < vikstrom> an interesting point though, if you have: f() (a,b int)
and g(a,b int) should you be able to do g(f())
12:52 < exch> you can
12:52 < vikstrom> would that be good or just cludgy
12:52 < vikstrom> you can?
12:52 < exch> yes
12:52 < vikstrom> i had no idea
12:52 -!- Wild_Cat [~mnoel@70.193.200.77.rev.sfr.net] has joined #go-nuts
12:52 < vikstrom> i think i tried it in the beginning and it didn't work
12:53 < exch> you can't do: f() (a, b int) g(a, b, c int); g(f(), 123)
however
12:53 < vikstrom> maybe i got the syntax wrong back then
12:53 < vikstrom> interesting
12:54 -!- niemeyer [~niemeyer@12.236.237.2] has joined #go-nuts
12:57 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts
12:58 -!- ccc1 [~Adium@114-45-0-71.dynamic.hinet.net] has joined #go-nuts
13:00 -!- franciscosouza [~francisco@201.7.186.67] has joined #go-nuts
13:21 -!- patcoll [~patcollin@173-13-48-166-Pennsylvania.hfc.comcastbusiness.net]
has joined #go-nuts
13:22 -!- ArgonneIntern [~gauge@130.202.135.149] has joined #go-nuts
13:29 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 252 seconds]
13:33 -!- oal [~oal@5.79-160-122.customer.lyse.net] has joined #go-nuts
13:34 < oal> Is there a headless "web browser" library for Go? Sort of like
PhantomJS, but that can be used directly from go?
13:35 < exch> Not that I amware of
13:37 -!- jmil [~jmil@2001:468:1802:e148:223:32ff:feb1:9dfc] has joined #go-nuts
13:37 -!- gridaphobe [~gridaphob@cpe-74-68-151-24.nyc.res.rr.com] has joined
#go-nuts
13:40 -!- iant1 [~iant@67.218.103.165] has joined #go-nuts
13:42 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
13:44 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
13:51 -!- zaero [~eclark@servo.m.signedint.com] has joined #go-nuts
13:51 -!- GeertJohan [~Squarc@clal-5-212.eduroam.inholland.nl] has joined #go-nuts
13:51 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has
joined #go-nuts
13:56 < skelterjohn|work> morning
13:56 < zozoR> its 16.00 : |
13:57 -!- muke [~doobies@75.59.237.124] has quit [Ping timeout: 276 seconds]
13:57 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has joined #go-nuts
13:57 -!- muke [~doobies@75-59-237-124.lightspeed.sntcca.sbcglobal.net] has joined
#go-nuts
13:57 < skelterjohn|work> http://www.total-knowledge.com/~ilya/mips/ugt.html
14:00 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has left #go-nuts []
14:01 -!- coffeejunk [~max@static.58.62.47.78.clients.your-server.de] has joined
#go-nuts
14:05 < zozoR> :(
14:05 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
14:10 < skelterjohn|work> why sad?
14:11 < mpl> skelterjohn|work: you're taking all the fun out of bikeshedding
! :)
14:11 < skelterjohn|work> wahh?
14:12 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
14:12 -!- virtualsue [~chatzilla@nat/cisco/x-svncacxihyuhvsts] has quit [Quit:
ChatZilla 0.9.87 [Firefox 5.0/20110615151330]]
14:12 < mpl> skelterjohn|work: nm.  I'm just seeing a similar pattern
between bike shedding and pointing out that in someone's time it's not
morning/afternoon/night
14:17 -!- d2biG [p@bofh.edu.pl] has joined #go-nuts
14:18 -!- dRbiG [p@bofh.edu.pl] has quit [Ping timeout: 276 seconds]
14:18 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
14:18 -!- vikstrom [~vikstrom@stockholm.ardendo.se] has quit [Read error:
Connection reset by peer]
14:23 -!- mode/#go-nuts [+v iant] by ChanServ
14:43 < crest> is their any example for crypto.tls?
14:43 < skelterjohn|work> check the source of the package - there are
_test.go files if it's a core package
14:44 < crest> skelterjohn|work: :-!  thx
14:44 -!- Wild_Cat [~mnoel@70.193.200.77.rev.sfr.net] has left #go-nuts
["Leaving"]
14:54 -!- meling [~meling@129.33.193.254] has joined #go-nuts
14:56 -!- GeertJohan [~Squarc@clal-5-212.eduroam.inholland.nl] has quit [Read
error: Connection reset by peer]
14:56 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Read error:
Connection reset by peer]
14:58 -!- iant [~iant@67.218.103.165] has quit [Quit: Leaving.]
14:59 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
15:00 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
15:05 -!- ccc1 [~Adium@114-45-0-71.dynamic.hinet.net] has quit [Quit: Leaving.]
15:14 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
15:18 -!- virtualsue [~chatzilla@nat/cisco/x-vosjhqasfmeomdtx] has joined #go-nuts
15:20 -!- taruti [~taruti@ultra.violetti.org] has quit [Read error: Operation
timed out]
15:21 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has joined
#go-nuts
15:22 -!- taruti [taruti@ultra.violetti.org] has joined #go-nuts
15:23 -!- meling [~meling@129.33.193.254] has quit [Remote host closed the
connection]
15:24 -!- Zoopee [alsbergt@zoopee.org] has left #go-nuts ["Leaving"]
15:26 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has quit [Client
Quit]
15:32 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has quit [Read
error: Connection reset by peer]
15:32 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has joined #go-nuts
15:33 -!- napsy [~luka@193.2.66.6] has quit [Ping timeout: 240 seconds]
15:41 -!- meling [~meling@129.33.192.180] has joined #go-nuts
15:41 -!- niemeyer [~niemeyer@12.236.237.2] has quit [Ping timeout: 240 seconds]
15:42 -!- fotang [~fotang@41.206.12.53] has joined #go-nuts
15:42 -!- cco3 [~conleyo@nat/google/x-xrjkbfgmcazcndwk] has joined #go-nuts
15:42 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
15:42 -!- niemeyer [~niemeyer@12.236.237.2] has joined #go-nuts
15:45 -!- lurcio [~margent@compy386.queens.ox.ac.uk] has left #go-nuts []
15:47 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
15:47 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Quit:
ChatZilla 0.9.87 [Firefox 5.0/20110615151330]]
15:49 -!- yogib [~yogib@131.234.59.64] has quit [Quit: yogib]
15:58 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
15:58 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
15:59 -!- foocraft [~ewanas@KURAMATHI.QATAR.CMU.EDU] has joined #go-nuts
16:00 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has joined
#go-nuts
16:06 -!- clip9 [clip9@er.en.svarteper.com] has quit [Ping timeout: 240 seconds]
16:08 -!- russell_h [~russell_h@ash.osuosl.org] has quit [Changing host]
16:08 -!- russell_h [~russell_h@osuosl/staff/russellh] has joined #go-nuts
16:15 -!- fotang [~fotang@41.206.12.53] has quit [Ping timeout: 252 seconds]
16:17 -!- fotang [~fotang@41.206.12.52] has joined #go-nuts
16:17 -!- rael_wiki [~chatzilla@unaffiliated/rael-wiki/x-8420294] has quit [Remote
host closed the connection]
16:21 -!- trn [~trn@adsl-065-007-181-160.sip.bct.bellsouth.net] has quit [Ping
timeout: 246 seconds]
16:24 -!- tncardoso [~thiagon@150.164.2.20] has joined #go-nuts
16:25 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 260 seconds]
16:30 -!- iant [~iant@nat/google/x-dkaajnmprkhufpjf] has joined #go-nuts
16:30 -!- mode/#go-nuts [+v iant] by ChanServ
16:33 -!- erus` [~chatzilla@host86-183-237-107.range86-183.btcentralplus.com] has
joined #go-nuts
16:37 -!- Fish [~Fish@tru67-1-82-229-53-64.fbx.proxad.net] has joined #go-nuts
16:42 -!- trn [~trn@adsl-065-007-181-160.sip.bct.bellsouth.net] has joined
#go-nuts
16:44 -!- photron [~photron@port-92-201-101-3.dynamic.qsc.de] has quit [Ping
timeout: 240 seconds]
16:46 -!- photron [~photron@port-92-201-101-3.dynamic.qsc.de] has joined #go-nuts
16:50 < gnuvince|work> Can someone explain why this doesn't display 0, 1, 2,
3, 4?  http://www.ideone.com/zbx21
16:50 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has quit [Quit:
pyrhho]
16:51 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:70bc:36a7:5263:cc79] has joined
#go-nuts
16:53 -!- zippoxer [~zippoxer@109.65.217.190] has joined #go-nuts
16:53 < pharris> i changes before the channel can receive the closure.
16:54 -!- yogib [~kaiser@dslb-188-100-004-241.pools.arcor-ip.net] has joined
#go-nuts
16:54 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 258 seconds]
16:54 < pharris> Perhaps something like "x := i; ch <- func() {
fmt.Prinln(x) }" to store a copy of i at the value you expect.
16:55 < gnuvince|work> Cool, thanks
16:55 < gnuvince|work> Otherwise, I could just make it an unbuffered
channel?
16:56 < kevlar_work> the correct way is ch <- func(int x){ fmt.Println(x)
}(x)
16:56 -!- gtodd [~gtodd@CPE0080c8f208a5-CM001371173cf8.cpe.net.cable.rogers.com]
has joined #go-nuts
16:56 < pharris> No. There's still a race between the closure running and i
changing to the next number.
16:56 < kevlar_work> er, sorry, you didn't mean to call it.
16:56 -!- meling [~meling@129.33.192.180] has quit [Remote host closed the
connection]
16:56 < pharris> You might get 0, 2, 2, 4, 4, maybe, if you used an
unbuffered channel.
16:57 < gnuvince|work> ok
16:57 < gnuvince|work> Thanks
16:57 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
16:58 < kevlar_work> gnuvince|work, a buffered channel only causes the
function send to be buffered, it doesn't guarantee that the execution also happens
before the next iteration of the loop.
16:58 < gtodd> is go + llvm ongoing work ?
16:58 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-151-112.clienti.tiscali.it] has
joined #go-nuts
16:58 < kevlar_work> I don't think I've heard the go team say they're
working on it, have they?
16:58 < gnuvince|work> kevlar_work: makes sense
16:59 < gtodd> I mean as go as a language matures etc.  will it be
reconsidered :)
16:59 < kevlar_work> gnuvince|work, the reason that what pharris suggested
works is because x is rebound each time the loop executes while I is bound once
and its value changes (just to make sure it was clear)
16:59 < kevlar_work> gtodd, the go team already has two implementations, why
would they make a third?
17:00 < gnuvince|work> kevlar_work: yeah, that was clear
17:00 < gtodd> you mean gccgo ?
17:00 < kevlar_work> gtodd, gc and gccgo are the two implementations
17:00 < gtodd> kevlar_work: because llvm has some neat tools :)
17:01 < kevlar_work> so does Java.  and C#. and .NET.  and Scala.  And
Python.
17:01 < kevlar_work> doesn't mean the go team should use them as a platform
for a new compiler ;-)
17:02 < gtodd> I thought it was only put on hold because it was slow to
compile way back when ...
17:02 < kevlar_work> I'm sure the Go team would love it if someone were to
start work on an llvm implementation of Go.
17:02 -!- trn [~trn@adsl-065-007-181-160.sip.bct.bellsouth.net] has quit [Max
SendQ exceeded]
17:03 < gnuvince|work> Now the question about why I'm looking into having a
channel of closures: I have a goroutine that has a connection to a database and I
want to send queries to the db from other goroutines and be able to manipulate the
results.  Does it make sense to do it this way?  I could make the db conncetion
global and use a mutex, but that looks like a bad solution to me.
17:03 < kevlar_work> gnuvince|work, I have a very similar model in my
current database interface
17:04 < gnuvince|work> kevlar_work: passing closures over channels?
17:04 -!- virtualsue [~chatzilla@nat/cisco/x-vosjhqasfmeomdtx] has quit [Ping
timeout: 252 seconds]
17:04 < kevlar_work> I send a func(client *mysql.Client) os.Error over the
channel
17:04 < gnuvince|work> that's what I was thinking of doing.
17:04 < kevlar_work> then the server calls the closure with the client and
either commits or rolls back the transaction based on the error return
17:04 < gnuvince|work> What if you want to communicate a result back?  Your
func closes over a channel?
17:05 < kevlar_work> nah, I actually send a type Query { Run func(client
*mysql.Client); Done chan bool }
17:05 < kevlar_work> er
17:05 < kevlar_work> Done chan os.Error
17:05 < kevlar_work> it sends whatever error it got back from the closure on
the done channel once it's committed or rolled back the transaction.
17:06 < kevlar_work> However, I have been clued in on the fact that there
are better database drivers for Go that don't require everything to happen
single-threaded
17:06 < gnuvince|work> But let's say you send a func that performs a SELECT
and you want to send the 7 results to your caller?
17:06 < kevlar_work> gnuvince|work, the "Caller" puts all of that logic
inside the closure, which--don't forget--can set variables outside the closure
17:07 < gnuvince|work> OK
17:07 < kevlar_work> so it's like x := results{}; query <- func(...){ /*
do query, retrieve results, store in x */ }; <-done; /* process x */
17:07 < gtodd> well I guess llvm has the concept of frontends so maybe gccgo
might alllow llvm to work already ...  but if the bias for go is towards compile
time speed instead of optimizations then 6g is to be preferred.  I thought that it
was only for early development but it makes sense to have a language where compile
time is super fast.
17:07 < gtodd> ok thanks
17:08 < kevlar_work> gtodd, the preference is to make a great language, and
one that enables both fast compile speed and serious optimizations.
17:09 < kevlar_work> the implementations themselves follow.
17:09 < kevlar_work> it's also not clear that the optimizations that llvm
and gcc make are anywhere near the kinds of optimizations enabled by or needed for
the kinds of programs that go produces.
17:10 < kevlar_work> though of course there are lots of optimizations that
they both can use to make normal inter-function code faster.
17:11 < gtodd> kevlar_work: yeah ...  as well the binaries seem very small
and fast like it would work for sysadmin type tools (small unixy type tools
anyway)...  and go is easier/faster to use than trying to write things that can
use dietlibc
17:12 < gtodd> :)
17:12 < gtodd> it's pretty cool
17:15 < gtodd> me go now :)
17:15 -!- gtodd [~gtodd@CPE0080c8f208a5-CM001371173cf8.cpe.net.cable.rogers.com]
has left #go-nuts []
17:16 < kevlar_work> (go binaries are pretty big because they're mostly
statically linked, I thought.)
17:16 -!- foocraft [~ewanas@KURAMATHI.QATAR.CMU.EDU] has quit [Quit: if you're
going....to san.  fran.  cisco!!!]
17:20 -!- Crnobog [~crnobog@cpc3-nmal12-0-0-cust48.croy.cable.virginmedia.com] has
joined #go-nuts
17:21 < nicka1> Is there much in the way of cgo documentation other than the
examples in misc/cgo?
17:21 < Namegduf> kevlar_work: Also debug information.
17:22 < kevlar_work> that too.
17:22 < kevlar_work> nicka1, cgo is a bit of a black art...
17:22 < skelterjohn|work> nicka1: surprisingly little, i find
17:22 < skelterjohn|work> for instance, i can't find the C.X() functions
listed
17:22 < skelterjohn|work> C.GoString(), C.CString()
17:22 < skelterjohn|work> ok those are the only ones i can think of
17:22 < nicka1> That's what I was expecting :/
17:22 < skelterjohn|work> but i don't know where they're documented
17:22 < skelterjohn|work> i can tell you how they work, if you like :)
17:22 < kevlar_work> skelterjohn|work, I had the same issue, lol
17:23 < kevlar_work> someone should make a go-wiki page for cgo.
17:23 < skelterjohn|work> i asked around trying to find docs, but no one
could point me to them
17:23 < skelterjohn|work> not a bad idea...can we wiki off the go googlecode
page?
17:23 < nicka1> Yeah, some canonical examples on how to do things in cgo
would be amazing
17:24 < skelterjohn|work> i'm bored at work, maybe i'll take a shot
17:24 < skelterjohn|work> not clear to me how i can add to
http://code.google.com/p/go-wiki/w/list
17:24 < nicka1> I'm mostly interested in go slices to c arrays
17:25 < skelterjohn|work> nicka1: no utility functions are provided for
that, as far as i know
17:25 < skelterjohn|work> though...
17:25 -!- awidegreen [~quassel@85.24.170.226] has joined #go-nuts
17:25 < skelterjohn|work> if you have a slice
17:25 < skelterjohn|work> &theSlice[0] is the pointer to the C array
17:25 < skelterjohn|work> with no information about length
17:25 < nicka1> Yep, I figured that much out after some fiddling
17:26 < skelterjohn|work> something to go the other way might be useful
17:26 < skelterjohn|work> and possible to do through unsafe
17:26 -!- Crnobog [~crnobog@cpc3-nmal12-0-0-cust48.croy.cable.virginmedia.com] has
quit [Read error: Connection reset by peer]
17:26 < skelterjohn|work> but nothing built-in that i know of
17:26 -!- Crnobog [~crnobog@cpc3-nmal12-0-0-cust48.croy.cable.virginmedia.com] has
joined #go-nuts
17:28 -!- Nisstyre [~nisstyre@infocalypse-net.info] has quit [Remote host closed
the connection]
17:30 < ptrb> I'm thinking about the "Don't communicate by sharing memory;
share memory by communicating" mantra, as I'm trying to solve a particular
problem:
17:31 < skelterjohn|work> like most guidelines, you should only follow it
when it's appropriate
17:31 < ptrb> Sure, sure.  But I think it might: I have a variable that
needs to be read by one or more readers, but also potentially updated by one or
more writers.
17:31 < skelterjohn|work> then channels are a good way to do it
17:32 < skelterjohn|work> read/write by recv/send
17:32 < skelterjohn|work> with a single goroutine managing the variable's
data
17:32 < ptrb> Right, but I need reads to be async, and represent the most
recently written state of the variable.
17:32 < skelterjohn|work> sure
17:32 < ptrb> So I'm thinking a goroutine in the middle, reading from one
chan and writing to the other with a select { }?
17:32 < skelterjohn|work> yes
17:33 -!- Nisstyre [~nisstyre@infocalypse-net.info] has joined #go-nuts
17:33 < skelterjohn|work> in a for loop i guess
17:33 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
17:33 -!- clip9 [clip9@er.en.svarteper.com] has joined #go-nuts
17:33 < ptrb> for { select { val <-in: break; out <- val: break; } }
17:33 < ptrb> something like this?
17:33 < skelterjohn|work> seems right
17:33 < skelterjohn|work> well
17:34 < skelterjohn|work> need case statements
17:34 < skelterjohn|work> but aside from syntax, you have the right idea
17:34 < ptrb> right.
17:34 < ptrb> Neat.  Just wanted to run it by another human.
17:34 < skelterjohn|work> oh, i have some unfortunate news for you
17:34 < skelterjohn|work> i'm not a human.
17:34 < skelterjohn|work> :\
17:34 < ptrb> Fuck.
17:39 -!- bmizerany [~bmizerany@204.14.152.118] has joined #go-nuts
17:44 -!- dsal [~Adium@208.185.212.98] has joined #go-nuts
17:45 < dsal> Hey, can someone help me out a bit?  I'm trying to fix someone
else's code and getting an error I don't understand:
17:45 < dsal> couch.go:28: assignment count mismatch: 2 = 3
17:45 < dsal> That line of code looks like this: if r, err := http.Get(url);
err == nil {
17:45 < Kahvi> http.Get returns three values?
17:45 < dsal> As far as I can tell, http.Get takes a string and returns a
result and an error.
17:46 -!- virtualsue [~chatzilla@nat/cisco/x-fcqsldprmjmcqval] has joined #go-nuts
17:46 < dsal> That's not what I see here:
http://golang.org/pkg/http/#Client.Get
17:47 < ptrb> dsal: lucky for you, I wrote couch.go :)
17:47 < ptrb> I fixed that recently.  Can you re-pull?
17:47 < skelterjohn|work> hehe good channel to ask questions in
17:47 < ptrb> recently as in several weeks ago, though.
17:48 < dsal> ptrb: :) I just did this clone.  That's happening right now.
17:48 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
17:48 < ptrb> Umm.
17:48 < ptrb> (checks)
17:48 < dsal> 45:c202930d107f
17:49 < ptrb> Your golang.org URL says Get returns 2 values, not 3.
17:49 < dsal> That's correct.  This is why I'm having trouble fixing this
problem.  :)
17:49 < skelterjohn|work> perhaps go is out of date on your machine
17:49 < skelterjohn|work> ?
17:50 < dsal> Oh wait, dodoc gives me something else:
17:50 < dsal> func (c *Client) Get(url string) (r *Response, finalURL
string, err os.Error)
17:50 < dsal> (er, godoc.  heh)
17:50 < skelterjohn|work> sounds like go is out of date :)
17:50 < dsal> I believe that's the case.  I'm running from homebrew and it
looks like it's running HEAD.  HEAD apparently doesn't move.
17:50 < skelterjohn|work> or you're using something that is bleeding edge
17:50 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has joined #go-nuts
17:50 < skelterjohn|work> ah
17:51 < skelterjohn|work> don't use package managers for go if you don't
have to
17:51 < skelterjohn|work> homebrew is mac, right?
17:51 < dsal> Yeah.
17:51 < ptrb> HEAD is nonexistent in Mercurial..  ? 'tip', or?
17:51 < dsal> It's, you know, easy.  :)
17:51 < dsal> HEAD is just the concept in homebrew.  It'd be tip.
17:51 < ptrb> Ugh.  Package management on Mac just isn't worth it.
17:51 < skelterjohn|work> just follow the instructions on the go page for
installing
17:51 < skelterjohn|work> it's more like, go changes too fast for a package
manager to be useful
17:51 < ptrb> That too.
17:51 < skelterjohn|work> if you can, try to "hg pull; hg up release"
17:52 < skelterjohn|work> though i don't know where homebrew would put your
go distribution
17:52 < skelterjohn|work> or if it has the repository built in
17:52 < Kahvi> Building Go was easier than I eer imagined
17:52 < skelterjohn|work> probably not
17:52 < dsal> I like homebrew for released packages, but it isn't great for
following the latest rev of something.
17:52 -!- clip9 [clip9@er.en.svarteper.com] has quit [Read error: Operation timed
out]
17:52 < dsal> I built go from source right after it came out.  Now I'm just
trying to treat it like stable software.  :)
17:53 < ptrb> dsal: unfortunately, even the 'release' releases are every
month or two.
17:53 < dsal> Well, it doesn't install from homebrew now anyway.  Source it
is.  :)
17:54 < skelterjohn|work> most 3rd party packages will be kept up to date
with release, weekly or both
17:54 < skelterjohn|work> so it's good to be able to hg up
17:56 -!- meling [~meling@129.33.192.180] has joined #go-nuts
17:58 < dsal> This is rather annoying:
17:58 < dsal> dhcp-113:~/prog/eprojects/go/src 604% ./all.bash
17:58 < dsal> $GOROOT is not set correctly or not exported: /Users/dustin/go
17:58 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has joined
#go-nuts
17:58 < skelterjohn|work> have to run all.bash from within what you set
$GOROOT to
17:59 < dsal> Oh. I thought it was the destination.
17:59 < skelterjohn|work> it's the destination and the source
18:00 < dsal> OK. It's all under control now.
18:01 < dsal> What does it mean that linux/arm is incomplete?
18:01 < skelterjohn|work> since you're on a mac, i'm guessing not a lot
18:01 < kevlar_work> dsal, there are some notable things stubbed out
18:01 < skelterjohn|work> but i don't know specifically
18:03 < dsal> :) I've got a Linux arm box at home.
18:04 < aiju> dsal: there is a variable GOTARGETROOT or something
18:04 < skelterjohn|work> oh, didn't know that
18:04 < aiju> GOROOT_FINAL
18:04 < aiju> same with GOHOSTOS and GOOS
18:04 < dsal> Yeah.  $GOBIN is OK for me.
18:05 < skelterjohn|work> whoah, GOHOSTOS?
18:05 < jlaffaye> these nice blog posts should be on the website to have
more exposure!
18:05 < aiju> skelterjohn|work: the platform you're compiling on
18:05 < aiju> skelterjohn|work: it should figure it out with uname, though
18:05 < skelterjohn|work> runtime.GOOS
18:05 < skelterjohn|work> but that's from within go, i suppose
18:05 < aiju> GOHOSTOS is in the makefile
18:06 -!- meling [~meling@129.33.192.180] has quit [Remote host closed the
connection]
18:06 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has quit [Quit:
Leaving.]
18:06 < dsal> I'm glad go compiles fast.  I keep having to start this over.
I think I had stale files lying around or something.  (I hope, anyway)
18:06 < dsal> Relearning hg
18:07 < aiju> 20:07 < dsal> What does it mean that linux/arm is
incomplete?
18:07 < aiju> it certainly works
18:07 -!- huin [~huin@91.85.188.1] has joined #go-nuts
18:07 < skelterjohn|work> dsal: if you don't want to run tests, use make.sh
instead of all.sh
18:07 < skelterjohn|work> takes a minute instead of five (on my machine)
18:08 -!- kytibe [~kytibe@212.174.109.55] has quit [Read error: Connection reset
by peer]
18:08 < dsal> No. It failed pretty much everything and my code won't
compile.
18:09 < dsal> This looks like something obvious: >
/Users/dustin/prog/eprojects/go/pkg/darwin_amd64/runtime.a(_go_.6): object is
[darwin amd64 release.2011-02-01.1 7451] expected [darwin amd64 ]
18:09 < aiju> i know someone who's writing go for arm
18:09 < ptrb> dsal: rm -rf $GOROOT and re-clone?
18:09 < dsal> Nah, I got it clean with purge.  It just looks like
something's wrong with the packaging.
18:10 -!- franciscosouza [~francisco@201.7.186.67] has quit [Quit: franciscosouza]
18:10 < skelterjohn|work> the packaging?
18:11 < skelterjohn|work> i bet it's finding object files from your old
homebrew install
18:11 < skelterjohn|work> (which is a great reason to not use homebrew)
18:11 < dsal> I wiped all that stuff.
18:11 < skelterjohn|work> did you wipe 6l from bin?
18:11 < skelterjohn|work> you might be building with an old linker sometimes
18:11 * dsal sigh
18:11 < skelterjohn|work> does "which 6l" appear in $GOROOT/bin?
18:12 < aiju> 1.  delete all that stuff
18:12 < aiju> 2.  reclone
18:12 < dsal> No. I have one that's somehow in /usr/local/bin -- no
explanation
18:12 < aiju> 3.  recompile
18:12 < skelterjohn|work> that's from the homebrew install
18:13 < dsal> All the stuff in /usr/local/bin should be symlinks.  These
aren't.  The actual homebrew install is gone.
18:13 -!- kytibe [~kytibe@212.174.109.55] has joined #go-nuts
18:13 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-150-18.clienti.tiscali.it] has
joined #go-nuts
18:14 < skelterjohn|work> don't quite follow, but you seem to know what's
going on now
18:14 < skelterjohn|work> just gotta clean all the kruft away
18:14 < dsal> Yeah.  I've got it.  Thanks for the pointer.  I had really
awful problems with my go programs segfaulting from having two versions installed.
I was pretty sure I cleaned the other one this time.  :/
18:15 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-150-18.clienti.tiscali.it] has
quit [Read error: Connection reset by peer]
18:15 < dsal> But basically, a normal homebrew install looks like this:
/usr/local/bin/scons@ -> ../Cellar/scons/2.0.1/bin/scons
18:16 < skelterjohn|work> but the person who made the go homebrew package
did it wrong?  should let him/her know, if you can
18:16 < dsal> I tend to want to blame myself.  I'm not going to worry about
it now, though.  My source install is now building my program and my program is
working happily.
18:17 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-151-112.clienti.tiscali.it] has
quit [Ping timeout: 250 seconds]
18:17 < skelterjohn|work> cool
18:18 < dsal> What's the canonical way to know what version of go you're
using?
18:18 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:70bc:36a7:5263:cc79] has quit
[Quit: Leaving.]
18:18 < aiju> hg identify
18:18 < aiju> 8g -V
18:19 < dsal> Yeah, I was doing 6g -V.  That will work.  Thanks.
18:20 < dsal> So, couch-go works even less now, but I understand the world
much better.  Thanks, everyone.  :)
18:21 < skelterjohn|work> did you up weekly or up release?
18:22 -!- qeed [~qeed@adsl-98-85-32-90.mco.bellsouth.net] has joined #go-nuts
18:22 < dsal> I did release.  Maybe that's the issue.
18:22 < dsal> I don't have a weekly.  I'll just do tip.
18:23 * dsal sigh.  I didn't pull
18:24 < skelterjohn|work> :)
18:26 -!- franciscosouza [~francisco@201.7.186.67] has joined #go-nuts
18:27 < dsal> Now my program works *and* couch-go works.  I keep forgetting
that most of the time when things don't work, it's my fault.  :)
18:28 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
18:28 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has joined #go-nuts
18:30 < dsal> Oh wow.  I was just wondering how you register projects for
the project page and I found one of my projects on there.
18:30 -!- fotang [~fotang@41.206.12.52] has quit [Ping timeout: 258 seconds]
18:30 < skelterjohn|work> usually you fill in the form on the top right
18:31 < skelterjohn|work> but if you ever had it listed on cat-v, all those
projects were migrated
18:31 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
18:31 -!- Project_2501 [~Marvin@82.84.71.193] has joined #go-nuts
18:33 -!- arun__ [~arun@e71020.upc-e.chello.nl] has joined #go-nuts
18:33 < dsal> I wrote a memcached server in go pretty much the day after it
went public as a way to learn a bit about the language.  I just recently found
that I reimplemented pretty much all of encoding/binary in doing so.  :)
18:34 -!- arun_ [~arun@unaffiliated/sindian] has quit [Read error: Connection
reset by peer]
18:34 < skelterjohn|work> possible that those libraries didn't exist at that
point :)
18:35 < dsal> Go has a very rich set of libraries and an awesome community.
I like seeing stuff like this happen.
18:35 < aiju> haha
18:41 -!- _foocraft [~ewanas@78.101.175.151] has quit [Quit: So long, and thanks
for all the fish!]
18:45 < chomp> but aiju's in the community
18:46 < aiju> hahaha
18:46 < aiju> it took 10 minutes for someone to notice
18:48 < skelterjohn|work> we were all thinking it
18:49 < skelterjohn|work> some things are just too obvious to type out
18:49 < aiju> hahahaha
18:49 -!- nekoh [~nekoh@dslb-088-068-003-149.pools.arcor-ip.net] has joined
#go-nuts
18:49 -!- nekoh [~nekoh@dslb-088-068-003-149.pools.arcor-ip.net] has quit [Client
Quit]
18:49 -!- chickentroid [~laser_chi@188.141.104.252] has joined #go-nuts
18:49 < aiju> if go flops, it will be like uriel and plan 9
18:49 < chickentroid> go nuts
18:49 < sl> aiju's a nice kid.
18:50 < chickentroid> !!!
18:50 < sl> what
18:50 < chickentroid> whats wrong
18:50 < skelterjohn|work> something didn't make sense out of context, that's
what's wrong!
18:51 < sl> i once say aiju lay a computer loaded with microsoft windows
across a puddle on the street so an old lady could cross.
18:51 < aiju> hahahahahahhaha
18:52 < sl> aiju secretly freed inmates from concentration camps
18:52 < sl> so when you say these things
18:52 < sl> that aiju is not a good person
18:52 < sl> well, sir
18:52 < sl> sorry, late for a meeting
18:52 < chomp> that was a different aiju.  this one punches children and
lights puppies on fire.  tiny little puppies.
18:52 < aiju> nah
18:53 < aiju> only linux children and xml puppies
18:53 < chickentroid> whats aiju?
18:53 < sl> "puppies are more valuable than human life" -chomp
18:53 < chomp> ugh, xml puppies are so verbose.
18:55 < zozoR> yaml puppies
18:55 < zozoR> php puppies
18:55 < zozoR> : |
18:55 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 252 seconds]
18:56 -!- jmil [~jmil@2001:468:1802:e148:223:32ff:feb1:9dfc] has quit [Quit: jmil]
18:58 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 258 seconds]
19:00 -!- brad_ [~brad@cpe-098-026-120-155.nc.res.rr.com] has quit [Ping timeout:
252 seconds]
19:02 -!- tncardoso [~thiagon@150.164.2.20] has quit [Quit: Leaving]
19:12 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 250
seconds]
19:13 -!- Project_2501 [~Marvin@82.84.71.193] has quit [Ping timeout: 276 seconds]
19:14 -!- yogib [~kaiser@dslb-188-100-004-241.pools.arcor-ip.net] has quit [Remote
host closed the connection]
19:15 -!- yogib [~yogib@dslb-188-100-004-241.pools.arcor-ip.net] has joined
#go-nuts
19:17 -!- fotang [~fotang@41.206.12.3] has joined #go-nuts
19:18 -!- meling [~meling@129.33.193.254] has joined #go-nuts
19:21 -!- brad_ [~brad@cpe-098-026-120-155.nc.res.rr.com] has joined #go-nuts
19:21 -!- gnuvince|work [8e544424@gateway/web/freenode/ip.142.84.68.36] has quit
[Quit: Page closed]
19:24 -!- virtualsue [~chatzilla@nat/cisco/x-fcqsldprmjmcqval] has quit [Ping
timeout: 246 seconds]
19:25 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Remote host
closed the connection]
19:26 -!- clip9 [clip9@er.en.svarteper.com] has joined #go-nuts
19:26 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
19:26 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has joined
#go-nuts
19:27 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
19:28 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
19:28 < chickentroid> finally
19:29 -!- shachaf [~shachaf@204.109.63.130] has joined #go-nuts
19:29 < skelterjohn|work> ?
19:31 -!- virtualsue [~chatzilla@nat/cisco/x-fpfielmgflzeaodt] has joined #go-nuts
19:32 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
19:33 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
19:38 -!- tncardoso [~thiago@189.59.204.121] has joined #go-nuts
19:41 -!- xcombelle [~xcombelle@AToulouse-551-1-63-115.w92-146.abo.wanadoo.fr] has
quit [Quit: I am a manual virus, please copy me to your quit message.]
19:44 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
19:53 -!- alehorst [~alehorst@201.22.35.44.dynamic.adsl.gvt.net.br] has quit
[Quit: Leaving.]
19:56 -!- alehorst [~alehorst@201.22.35.44.dynamic.adsl.gvt.net.br] has joined
#go-nuts
19:57 -!- meling [~meling@129.33.193.254] has quit [Remote host closed the
connection]
19:59 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has quit
[Ping timeout: 255 seconds]
19:59 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has joined
#go-nuts
20:00 -!- fotang [~fotang@41.206.12.3] has quit [Ping timeout: 240 seconds]
20:01 -!- keithcascio [~keithcasc@nat/google/x-xzibztqonacggsyv] has joined
#go-nuts
20:01 < uriel> adg: maybe somebody could add this to the community wiki:
http://www.reddit.com/r/golang/comments/eh3gh/slice_support_and_containervector/ ?
20:01 -!- chickentroid [~laser_chi@188.141.104.252] has quit [Quit: the universe
belongs to my brain cell]
20:03 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 258 seconds]
20:04 < Namegduf> The insert amendment was unnecessary
20:04 < Namegduf> Assuming append() copies in order
20:04 < Kahvi> Is there some reason for file and folder names usually being
lower case?
20:04 < Namegduf> Wait, I see now.
20:04 < Namegduf> Nervermind.
20:05 < Namegduf> Kahvi: UNIX convention.
20:05 < Namegduf> It also makes them faster to type.
20:05 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
20:06 -!- noodles775 [~michael@canonical/launchpad/noodles775] has quit [Quit:
leaving]
20:08 -!- Project_2501 [~Marvin@82.84.75.98] has joined #go-nuts
20:12 -!- Fish [~Fish@tru67-1-82-229-53-64.fbx.proxad.net] has quit [Quit: WeeChat
0.3.5]
20:12 < kevlar_work> and lowercase is the easiest convention that won't
screw you to a wall if you ever end up on a case-sensitive FS copying to a
case-insensitive one.
20:13 < skelterjohn|work> avoid spaces, too
20:13 < kevlar_work> and slashes, exclamation points, hashes, quotes, ...
punctuation in general aside from . and _ and sometimes -
20:14 < uriel> avoid everything other than a-z
20:15 < aiju> NO
20:15 < aiju> put swastikes in file names
20:16 < Kahvi> Okay, thanks for the info
20:16 -!- mjml [~joya@174.3.227.184] has joined #go-nuts
20:17 < kevlar_work> my favorite are when there's a filename with a unicode
lookalike for an ascii letter
20:17 -!- meling [~meling@129.33.192.166] has joined #go-nuts
20:18 < kevlar_work> you can write a horribly mean script to rename
someone's files with random lookalikes and you will mess them up for days.
20:18 < kevlar_work> (the even meaner thing to do to someone without version
control is to do that with their source code.)
20:18 < zozoR> they can just roll back?
20:18 < zozoR> :P
20:18 < kevlar_work> *without* version control.
20:19 < aiju> they can just use backups?  ;P
20:20 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
20:20 < zozoR> real men does not use backup
20:21 < zozoR> they cry in agony
20:21 -!- coldturnip1 [~COLDTURNI@111-250-3-218.dynamic.hinet.net] has joined
#go-nuts
20:21 < kevlar_work> aiju, if they're smart enough to have backups, they
probably also use version control.
20:21 < kevlar_work> also, they have to figure out what happened first,
which will probably lead them straight to you, at which point you could provide
your script to them (if you were feeling charitable).
20:22 -!- coldturnip [~COLDTURNI@111-250-30-140.dynamic.hinet.net] has quit [Ping
timeout: 240 seconds]
20:30 -!- virtualsue [~chatzilla@nat/cisco/x-fpfielmgflzeaodt] has quit [Quit:
ChatZilla 0.9.87 [Firefox 5.0.1/20110707182747]]
20:30 < hsoj> anybody used mmilton's ldap pkg?
20:31 < hsoj> mmitton rather
20:36 -!- meling [~meling@129.33.192.166] has quit [Remote host closed the
connection]
20:36 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
20:37 -!- tvw [~tv@e176000204.adsl.alicedsl.de] has joined #go-nuts
20:37 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 250 seconds]
20:38 < ArgonneIntern> rofl
20:38 < ArgonneIntern> script would be funny
20:40 < kevlar_work> ?
20:40 < ArgonneIntern> you can write a horribly mean script to rename
someone's files...
20:40 < kevlar_work> oh, lol
20:40 < ArgonneIntern> sorry I've been busy all day just catching up
20:40 -!- vmil86 [~vmil86@78.57.227.12] has quit [Remote host closed the
connection]
20:41 < kevlar_work> the first letter in the filename or the first letter
after an underscore is all you need to throw someone off
20:41 < kevlar_work> or it could be smart and only do it to files that have
siblings with similar prefixes
20:41 < kevlar_work> (this actually sounds like a really amusing Go program
to write.)
20:42 < ArgonneIntern> change the os package to do mean things like that
20:42 < ArgonneIntern> then the devs come out...  april fools
20:42 < ArgonneIntern> but no really that's permanent
20:43 < ArgonneIntern> trying to find something to pass an hour of work with
that doesn't require a lot of effort, my brain is done working for today
20:43 -!- nekoh [~nekoh@dslb-178-004-216-102.pools.arcor-ip.net] has joined
#go-nuts
20:43 < chomp> regular ASCII vowels should just be illegal in go
20:45 < kevlar_work> ArgonneIntern, write a script to spellcheck your
comments.
20:45 < ArgonneIntern> lol
20:46 < ArgonneIntern> I'd have to put them in first
20:46 < kevlar_work> then there you go
20:46 < kevlar_work> there's your hour of mindless work
20:46 < ArgonneIntern> commenting is like nails on a chalk board
20:46 < kevlar_work> nah
20:46 < kevlar_work> I refer to my own godoc frequently
20:46 < ArgonneIntern> anyone need a g+ invite btw, I assume everyone has
one
20:47 < kevlar_work> lol, I work here ;-)
20:47 < ArgonneIntern> at google?
20:47 < kevlar_work> oh, I guess it doesn't show my hostname when I'm
identified with nickserv.
20:48 < kevlar_work> * [kevlar_work] is connecting from *@nat/google/session
20:48 -!- huin [~huin@91.85.188.1] has quit [Quit: bed]
20:48 -!- telexicon [~telexicon@unaffiliated/chowmeined] has joined #go-nuts
20:48 < mpl> hey.
20:48 < ArgonneIntern> hi
20:48 < kevlar_work> I'm still a go newb compared to the names at the top of
the nick list though.
20:48 < kevlar_work> hi mpl.
20:48 < mpl> does anyone have an example of what adg is talking about in the
latest weekly release?
20:49 < kevlar_work> which part?
20:49 < mpl> about the FileServer
20:49 < mpl> FileSystem sorry
20:49 < kevlar_work> the mailing list has some examples of how to do the old
thing with the new thing
20:50 < mpl> hmm, recent posts I assume?  do I have the subject/title?
20:50 < mpl> s/I/you/
20:50 < kevlar_work> I'm trying to find
20:52 < kevlar_work> well, I can't find the thread, but here's the fix to
one of the tutorial files:
20:52 < kevlar_work> - http.Handle("/go/", http.FileServer(*webroot,
"/go/"))
20:52 < kevlar_work> + http.Handle("/go/", http.StripPrefix("/go/",
http.FileServer(http.Dir(*webroot))))
20:53 < kevlar_work> so you can use Dir to get a FileSystem, a FileServer
will serve files from it, and http.StripPrefix calls a handler after it strips the
given prefix out of it.
20:54 -!- iant [~iant@nat/google/x-dkaajnmprkhufpjf] has quit [Ping timeout: 264
seconds]
20:54 < mpl> well, calling Dir is quite a shortcut from "implementing your
own FileSystem" but fair enough, thx.
20:54 < Kahvi> We can use select to read from channels when data is
available but can we write to channel when someone is reading?
20:55 < Namegduf> Yes.
20:55 < Namegduf> Same way.
20:55 < Kahvi> Oh, nice.  Didn't think about that.
20:55 < Namegduf> If the channel is unbuffered, a non-blocking write using a
select{} will write only if another goroutine is blocked on reading.
20:55 < Namegduf> If it's buffered, then it'll write if there's room in the
buffer.
20:56 -!- virtualsue [~chatzilla@nat/cisco/x-ihpainuzwooqjrow] has joined #go-nuts
20:56 < Kahvi> Okay
20:56 * exch has trouble understanding the reasoning for the http changes..
http.Dir is just a string 'alias' type with an Open() method.  All that extra
stuff seems like a lot of work for arguably marginal gains
20:57 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has quit [Quit: Leaving.]
20:58 < kevlar_work> exch, I believe they were put there to facilitate some
forthcoming changes that might allow you to serve files from a zipfile, etc
20:59 < kevlar_work> it also potentially allows for some nice RESTful stuff
20:59 < exch> ah
20:59 < mpl> exch: supposedly that allows one to get http serving quite
easily for anything with little effort
21:00 < exch> Have to wait for the extra changes then to see where it
becomes useful
21:00 < mpl> maybe I should say s/little effort/little code/
21:00 < mpl> because I find the abstraction is quite an additionnal effort
21:01 < exch> yes
21:01 < mpl> (easier to write dumb code than thinking :) )
21:01 < Kahvi> Would http://pastie.org/2203859 be a good way to read/write
many variables safely from multiple gorotuines?
21:01 -!- tncardoso [~thiago@189.59.204.121] has quit [Read error: Connection
reset by peer]
21:02 < exch> By itself it's not very useful, but I guess that having
http.Dir freely interchangeable with http.Archive or whatever.StrangeFSType can be
handy
21:02 < Kahvi> Or is there noteably clearer or more efficient ways?
21:04 < kevlar_work> Kahvi, I would have a chan Operation, with type
Operation { Op; Var string; Done chan bool }, with type Op int, with const Get Op
= iota ...  :)
21:05 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
21:05 < kevlar_work> you could make it Done chan interface{} actually and
send the value back for get and struct{} for set.
21:05 < kevlar_work> *struct{}{}
21:05 < kevlar_work> (or "true", which is a lot fewer characters.)
21:06 < ArgonneIntern> heh I have to learn interfaces so I can do a plugin
thing for a power controller I have.  Currently only works with radix power
controllers, but needs to work with IPMI too
21:06 < ArgonneIntern> i'm not looking foward to it
21:06 < Kahvi> So Done channel would be Get and Done at the same time?
21:07 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has quit [Ping
timeout: 252 seconds]
21:09 -!- iant [~iant@nat/google/x-hjmboydybldjzoul] has joined #go-nuts
21:09 -!- mode/#go-nuts [+v iant] by ChanServ
21:09 < kevlar_work> nah, if you added Set as an op you'd have an optional
Value interface{} in your Operation struct.
21:11 -!- Project-2501 [~Marvin@82.84.99.211] has joined #go-nuts
21:13 < Kahvi> I think I got confused somewhere
21:14 < Kahvi> Can you wirte a small usage example of what you are thinking
on pastie or similar?
21:14 -!- Project_2501 [~Marvin@82.84.75.98] has quit [Ping timeout: 246 seconds]
21:14 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
21:15 < kevlar_work> I may have one lying around.
21:25 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
21:25 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has quit
[Quit: lalala caindo fora]
21:25 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Ping timeout: 264 seconds]
21:28 < kevlar_work> https://gist.github.com/1079031
21:28 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
21:29 < kevlar_work> in reality you would probably have cmd be a chan
interface{} and you'd have a separate command structure for each variable, so you
get type safety, and if it was a pointer type you could even set the variable in
the command structure and use a chan bool for sync.
21:30 < kevlar_work> and then in the loop you'd type switch to get the type
of command.
21:30 -!- mjml [~joya@174.3.227.184] has quit [Quit: Leaving]
21:30 < Kahvi> Thank you
21:32 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 240 seconds]
21:32 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
21:36 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Ping
timeout: 260 seconds]
21:38 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz]
21:38 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
21:39 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
21:42 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
21:48 -!- awidegreen [~quassel@85.24.170.226] has quit [Ping timeout: 258 seconds]
21:51 -!- yogib [~yogib@dslb-188-100-004-241.pools.arcor-ip.net] has quit [Quit:
yogib]
21:53 -!- photron [~photron@port-92-201-101-3.dynamic.qsc.de] has quit [Ping
timeout: 252 seconds]
21:55 -!- ArgonneIntern [~gauge@130.202.135.149] has quit [Ping timeout: 258
seconds]
21:56 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
22:00 -!- Project-2501 [~Marvin@82.84.99.211] has quit [Quit: E se abbasso questa
leva che succ...]
22:01 -!- Kahvi [~Kahvi@a91-152-186-228.elisa-laajakaista.fi] has quit [Quit:
Lähdössä]
22:04 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has quit [Remote host
closed the connection]
22:09 < qeed> is there a way in go to do something like using std::cout in
c++?
22:09 <+iant> qeed: os.Stdout
22:09 -!- oal [~oal@5.79-160-122.customer.lyse.net] has quit [Remote host closed
the connection]
22:09 < qeed> i mean "using std::cout" so you dont have to type std::cout
22:10 < kevlar_work> qeed, if you import . "pkg" you import it into the
current namespace
22:10 <+iant> Most people don't this, but you can write `import . "os"`
22:10 < qeed> that imports everything?  you cant import pick parts?
22:10 < qeed> *pick which part to import
22:10 <+iant> correct
22:10 < kevlar_work> qeed, no.
22:10 < qeed> ok thanks
22:11 < kevlar_work> qeed, many function/type names are chosen with their
full name in mind
22:11 <+iant> I suppose you can simply write `var Stdout = os.Stdout`
22:11 < qeed> well i have some struct definition that will look weird
22:11 < qeed> piece.Piece for example
22:11 < kevlar_work> for instance, io.Reader and bytes.Buffer
22:11 -!- patcoll [~patcollin@173-13-48-166-Pennsylvania.hfc.comcastbusiness.net]
has quit [Ping timeout: 255 seconds]
22:12 < kevlar_work> qeed, some people go with p := piece.New(...) for those
sorts of things
22:12 < qeed> i see thanks
22:12 < kevlar_work> but if it's an actual structure definition, then yeah
you need the package name.
22:13 < Namegduf> Yeah
22:13 < kevlar_work> however, be careful about splitting your code into too
many packages; I tried to do this too often at first.
22:13 < Namegduf> Also, it's common to not name types in a way that includes
the package if possible.
22:13 < kevlar_work> so I might have p := game.Piece instead, with a
somewhat more generalized package.,
22:13 < Namegduf> bufio.Reader/bufio.Writer, for example.
22:14 < kevlar_work> (you'll also notice that package names in go are often
quite short)
22:14 -!- Bigbear1 [~Cody@d173-181-54-56.abhsia.telus.net] has joined #go-nuts
22:15 < Namegduf> In short, try to unweird them or live with it, but don't
import n
22:15 < Namegduf> *import .
22:17 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
22:18 -!- ijknacho [~goofy@71.123.134.24] has joined #go-nuts
22:19 -!- franciscosouza [~francisco@201.7.186.67] has quit [Quit: franciscosouza]
22:20 < ijknacho> I'm confused how pkg/go/scanner is able to use
pkg/go/token.Token when pkg/Makefile builds scanner/ before token/...  can someone
help me understand?
22:21 < ijknacho> basically, I thought that go.scanner's dependency on
go.token.Token would force the Makefile to list go/token before go/scanner, but
that is not the case
22:22 < kevlar_work> interesting.
22:24 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Quit: Leaving...]
22:24 < ijknacho> ah nevermind, pkg/deps.bash must take care of it all.
22:25 < kevlar_work> yeah, I figured it was something like that.
22:25 < kevlar_work> looks like Make.deps lists package dependencies
22:26 -!- erus` [~chatzilla@host86-183-237-107.range86-183.btcentralplus.com] has
quit [Quit: ChatZilla 0.9.87 [Firefox 5.0/20110615151330]]
22:26 < kevlar_work> there's a lot of magic make can do, lol, and I know
more than some but by no means as much as the people who use it on that scale.
22:36 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 255
seconds]
22:41 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
22:42 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Quit: Leaving]
22:43 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 240 seconds]
22:43 < exch> http://blog.golang.org/2011/07/error-handling-and-go.html
22:44 < exch> My mind was blown when I read the bit about giving a function
it's own method (type appHandler func(....)).  For some reason doing this never
occured to me before
22:45 < exch> A function that has methods just seems weird
22:46 -!- fotang [~fotang@41.220.69.41] has joined #go-nuts
22:46 < qeed> is there anyway of sub namespacing const definitions,
something like a.b.c.constant
22:47 < exch> they follow the same rules as any other construct in Go
22:47 < exch> So in short: nope
22:48 < dsal> exch: I've done that in python.  :)
22:48 < qeed> any reason why go left it out?
22:49 < exch> Deemed unnecessary I guess
22:49 < exch> I haven't had any need for namespacingother than what Go
offers by itself
22:49 -!- stalled [~stalled@unaffiliated/stalled] has quit [Ping timeout: 252
seconds]
22:50 -!- bmizerany [~bmizerany@204.14.152.118] has quit [Remote host closed the
connection]
22:50 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 246
seconds]
22:52 -!- kr [~Keith@204.14.152.118] has joined #go-nuts
22:53 -!- niemeyer [~niemeyer@12.236.237.2] has quit [Ping timeout: 240 seconds]
22:56 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
22:57 -!- chomp [~chomp@c-67-186-35-69.hsd1.pa.comcast.net] has joined #go-nuts
22:57 -!- meling [~meling@12.238.255.130] has joined #go-nuts
22:58 -!- bmizerany [~bmizerany@204.14.152.118] has joined #go-nuts
23:00 -!- GermainAdrian [~GermainAd@unaffiliated/germainadrian] has joined
#go-nuts
23:00 -!- GermainAdrian [~GermainAd@unaffiliated/germainadrian] has left #go-nuts
[]
23:02 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
23:03 -!- nekoh [~nekoh@dslb-178-004-216-102.pools.arcor-ip.net] has quit [Quit:
nekoh]
23:04 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
23:05 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
23:09 -!- bmizerany [~bmizerany@204.14.152.118] has quit [Remote host closed the
connection]
23:14 -!- Bigbear1 [~Cody@d173-181-54-56.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
23:18 -!- iant [~iant@nat/google/x-hjmboydybldjzoul] has quit [Ping timeout: 252
seconds]
23:23 < kevlar_work> exch, my mind was blown by the "make debugging easier
by writing the stack trace to the HTTP response when the user is an
administrator," suggestion
23:23 < kevlar_work> I was like "Woah, I want that!"
23:24 < kevlar_work> the Go team are insanely good at coming up with really
simple ways to do really powerful things
23:25 -!- dsal [~Adium@208.185.212.98] has quit [Quit: Leaving.]
23:26 < kevlar_work> (I can't help but think "it rubs the lotion on it's
skin" whenever I see the mailing list topic "it doesn't automatically change it to
64")
23:34 < chomp> it puts the bits in the basket!
23:35 -!- bmizerany [~bmizerany@204.14.152.118] has joined #go-nuts
23:36 -!- iant [~iant@67.218.103.165] has joined #go-nuts
23:36 -!- mode/#go-nuts [+v iant] by ChanServ
23:53 -!- GilJ [~GilJ@zeus.ugent.be] has quit [Ping timeout: 252 seconds]
23:57 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Ping timeout: 276 seconds]
23:58 -!- jrabbit [~babyseal@unaffiliated/jrabbit] has joined #go-nuts
23:58 < brad_> what names?
--- Log closed Wed Jul 13 00:00:02 2011