--- Log opened Tue Mar 30 00:00:39 2010
00:10 -!- zard_ [~4176bf02@gateway/web/freenode/x-iytalfvnjysuwgiz] has quit [Ping
timeout: 252 seconds]
00:13 -!- dipoll [~dmytro@ppp-77-247-24-232.wildpark.net] has left #go-nuts []
00:14 -!- warthurton [~warthurto@pdpc/supporter/active/warthurton] has quit [Quit:
00:15 -!- zerd [~quassel@2a01:608:ffff:2773:2e0:4dff:fe83:76ed] has joined
00:15 -!- ryan_baker [~ryan_bake@128-193-249-150.resnet.oregonstate.edu] has
joined #go-nuts
00:17 -!- akrill [~akrill@dynamic-216-231-57-80.sea0.krillr.com] has quit [Quit:
00:21 -!- rv2733 [~rv2733@c-98-242-168-49.hsd1.fl.comcast.net] has quit [Quit:
00:29 -!- ryan_baker [~ryan_bake@128-193-249-150.resnet.oregonstate.edu] has quit
[Quit: ryan_baker]
00:30 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has quit [Quit:
00:30 -!- defectiv [~clays@] has quit [Quit: This computer has gone
to sleep]
00:34 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
00:37 -!- warthurton [~warthurto@pdpc/supporter/active/warthurton] has joined
00:44 -!- XenoPhoenix
[dfb22abb08@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com] has quit [Quit:
"Wait...  what?!"]
00:46 -!- b00m_chef__ [~watr@d64-180-45-230.bchsia.telus.net] has quit [Ping
timeout: 276 seconds]
00:47 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:47 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:47 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:47 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:48 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:48 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:48 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:49 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:49 -!- micrypt [~micrypt@94-195-127-212.zone9.bethere.co.uk] has joined
00:49 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:49 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:50 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:50 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:50 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:50 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:51 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:51 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:52 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:52 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:52 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:52 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:53 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:53 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:53 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com]
has joined #go-nuts
00:53 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:53 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:54 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:54 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:55 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:55 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:55 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:55 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:56 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:56 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:57 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:57 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:57 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:57 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:58 < smw> how so you create a multiline string constant?
00:58 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:58 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:58 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
00:58 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:58 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
00:59 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
00:59 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
01:00 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
01:00 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
01:00 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
01:00 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
01:01 < kmeyer> smw: backticks
01:01 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
01:01 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
01:01 < smw> thanks
01:01 < Eridius> iant: if you're around, we could probably use a temporary
ban on rue
01:02 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
01:02 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
01:02 -!- mode/#go-nuts [+o iant] by ChanServ
01:02 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
01:02 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
01:03 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
01:03 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
01:03 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
01:03 -!- rue [~rhubarb@echo622.server4you.de] has quit [Excess Flood]
01:04 -!- lux` [~lux@] has quit [Remote host closed the connection]
01:04 -!- rue [~rhubarb@echo622.server4you.de] has joined #go-nuts
01:05 -!- mode/#go-nuts [+b rue!*@*] by iant
01:05 <@iant> let's see if that does it....
01:10 -!- Venom_X [~pjacobs@] has quit [Quit: Venom_X]
01:13 -!- viirya [~viirya@cml506-25.csie.ntu.edu.tw] has quit [Ping timeout: 276
01:19 -!- viirya [~viirya@cml506-25.csie.ntu.edu.tw] has joined #go-nuts
01:26 -!- boscop_ [~boscop@g226231155.adsl.alicedsl.de] has joined #go-nuts
01:27 -!- boscop [~boscop@g226225195.adsl.alicedsl.de] has quit [Ping timeout: 258
01:27 -!- boscop_ [~boscop@g226231155.adsl.alicedsl.de] has left #go-nuts []
01:29 -!- ericvh [~ericvh@2002:467b:802c:0:223:6cff:fe93:c616] has left #go-nuts
01:29 < Eridius> btw iant, rue seems to have fixed his problem (in fact, if
you look he was in the room when you turned on the ban, and so he's still here)
01:29 -!- mode/#go-nuts [-b rue!*@*] by iant
01:30 <@iant> there are many things I don't know about irc channel
01:34 -!- warthurton [~warthurto@pdpc/supporter/active/warthurton] has quit [Quit:
01:35 < Eridius> iant: that's ok.  I appreciate you trying to help, I just
thought that since rue had fixed his issue that he shouldn't be barred from
rejoining the room if he happened to leave
02:10 -!- thakis_ [~thakis@] has joined #go-nuts
02:11 -!- meatmanek_ [~meatmanek@mesingw.STUDENT.CWRU.Edu] has quit [Quit:
02:13 < anticw> iant: back to something from earlier ...  6l puts the
symbols 'in-order' from the starts of package main it seems
02:13 < anticw> iant: but there is no symbol for the start of text afaict
02:13 <@iant> that seems to be true, yes
02:14 -!- thakis_ [~thakis@] has quit [Ping timeout: 248 seconds]
02:14 -!- thakis [~thakis@nat/google/x-ddfdtyztkiukoubm] has quit [Ping timeout:
248 seconds]
02:20 -!- meatmanek [~meatmanek@mesingw.student.cwru.edu] has joined #go-nuts
02:22 -!- smw [~stephen@pool-72-80-200-253.nycmny.east.verizon.net] has quit
[Remote host closed the connection]
02:24 -!- rhelmer [~rhelmer@c-71-202-117-54.hsd1.ca.comcast.net] has joined
02:28 -!- rhelmer [~rhelmer@c-71-202-117-54.hsd1.ca.comcast.net] has quit [Client
02:32 < anticw> iant: gah ...  any idea what 'spans' are in 6l terms?
02:33 -!- no_mind_ [~orion@] has quit [Quit: Leaving]
02:33 -!- no_mind [~orion@] has joined #go-nuts
02:35 -!- mikem77 [~mikemarty@nat/google/x-klwcepteaqnzspum] has joined #go-nuts
02:37 -!- mikem77 [~mikemarty@nat/google/x-klwcepteaqnzspum] has left #go-nuts []
02:42 < no_mind> can interfaces inherit ?
02:42 < kmeyer> No
02:42 < kmeyer> Well, sort of
02:42 < kmeyer> Actually, yes, I guess you can call it that
02:44 < no_mind> let me explain my problem
02:44 < kmeyer> no_mind: http://golang.org/doc/effective_go.html#embedding
02:45 < kmeyer> (But, please go on if that doesn't answer your question(s))
02:45 < no_mind> I am trying to build an inventory application where I have
two types of items.  One are the physical items or services so that the quantity
can be input manually . The second item type has only one differnt feature, the
quality needs to be calculated using some function.  Second type includes items
such as bandwidth consumtion
02:46 -!- SecretofMana [~mana@] has quit [Ping timeout: 264 seconds]
02:46 < no_mind> what will be the best way to represent both types of items
in GO
02:47 < kmeyer> Why don't you take a shot (trying/implementing something),
and if it doesn't work, come back with a more specific question?
02:48 < no_mind> my OOP training will guide me to make an abstract class and
derive two subclasses :)
02:49 < JBeshir> no_mind: Define an interface for what they have in common.
02:49 < JBeshir> Implement both separately.
02:50 < JBeshir> Access things through the interface in code which can
handle either, and specifically by type for code which can only handle one.
02:51 < kmeyer> read the Go Tutorial and Effective Go first ;)
02:51 < kmeyer> It won't take too long
02:52 < no_mind> kmeyer, read them
02:52 < anticw> Effective Go is excellent
02:52 -!- mikem77 [~mikemarty@nat/google/x-klwcepteaqnzspum] has joined #go-nuts
02:58 < kmeyer> no_mind: read them again.  if you had to ask about
interfaces inheriting...
02:59 -!- SecretofMana [~mana@] has joined #go-nuts
03:05 -!- no_mind [~orion@] has quit [Quit: Leaving]
03:05 -!- b00m_chef__ [~watr@] has joined #go-nuts
03:05 -!- nighty__ [~nighty@] has joined #go-nuts
03:09 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Ping timeout: 276
03:09 -!- felipe [~felipe@my.nada.kth.se] has quit [Ping timeout: 276 seconds]
03:16 -!- mikem77 [~mikemarty@nat/google/x-klwcepteaqnzspum] has left #go-nuts []
03:27 -!- General13372 [~support@71-93-97-216.dhcp.mtpk.ca.charter.com] has quit
[Read error: Connection reset by peer]
03:27 -!- General1337 [~support@71-93-97-216.dhcp.mtpk.ca.charter.com] has joined
03:34 -!- rv2733 [~rv2733@c-98-242-168-49.hsd1.fl.comcast.net] has joined #go-nuts
03:38 -!- micrypt [~micrypt@94-195-127-212.zone9.bethere.co.uk] has quit [Quit:
03:39 -!- megaboz_ [~megaboz@] has quit [Quit: Lost terminal]
03:39 -!- pines0ul [~travis@S0106002129644754.gv.shawcable.net] has joined
03:40 -!- gnuvince_ [~vince@] has quit [Ping timeout: 265 seconds]
03:42 -!- megaboz [~none@unaffiliated/megaboz] has joined #go-nuts
03:42 -!- nocturnal [~nocturnal@] has quit [Ping timeout: 276
03:48 -!- meatmanek [~meatmanek@mesingw.student.cwru.edu] has quit [Quit: Leaving]
03:50 -!- robot12 [~robot12@robot12.kgts.ru] has joined #go-nuts
03:51 -!- robot12 [~robot12@robot12.kgts.ru] has left #go-nuts []
03:51 -!- skj [~jasmuth@c-76-124-23-96.hsd1.nj.comcast.net] has joined #go-nuts
03:57 -!- rv2733 [~rv2733@c-98-242-168-49.hsd1.fl.comcast.net] has quit [Quit:
03:59 -!- KillerX [~anant@] has joined #go-nuts
03:59 -!- KillerX [~anant@] has quit [Changing host]
03:59 -!- KillerX [~anant@gentoo/developer/KillerX] has joined #go-nuts
04:00 -!- gnuvince_ [~vince@220.215-ppp.3menatwork.com] has joined #go-nuts
04:05 -!- meatmanek [~meatmanek@mesingw.student.cwru.edu] has joined #go-nuts
04:05 -!- hdon [~donny@c-67-163-244-40.hsd1.pa.comcast.net] has joined #go-nuts
04:06 < hdon> error building go on ubuntu karmic:
04:06 -!- Chryson [~Chryson@c-71-60-247-62.hsd1.pa.comcast.net] has joined
04:08 < hdon> looks like not a go problem either
04:08 -!- KillerX [~anant@gentoo/developer/KillerX] has quit [Quit: Leaving.]
04:09 < jessta> yeah
04:09 < JBeshir> hdon: It looks like you're on a 64bit OS
04:09 < JBeshir> And you've told it to build a 32bit version
04:10 < JBeshir> And you don't have the prerequisite multilib files.
04:10 < JBeshir> If this is unintentional, you probably need to change
04:10 < hdon> yeah, that's what i've done
04:10 < JBeshir> If it's intentional, check you have the gcc-multilib
packages and such.
04:11 -!- meatmanek [~meatmanek@mesingw.student.cwru.edu] has quit [Quit: Leaving]
04:16 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Quit:
04:18 -!- skelterjohn [~jasmuth@c-76-124-23-96.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
04:18 -!- kssreeram [~kssreeram@] has quit [Quit: kssreeram]
04:19 -!- kssreeram [~kssreeram@] has joined #go-nuts
04:19 -!- b00m_chef__ [~watr@] has quit [Ping timeout: 264 seconds]
04:27 -!- skj [~jasmuth@c-76-124-23-96.hsd1.nj.comcast.net] has quit [Ping
timeout: 248 seconds]
04:29 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has quit
[Excess Flood]
04:29 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has joined
04:29 -!- skelterjohn [~jasmuth@c-76-124-23-96.hsd1.nj.comcast.net] has joined
04:29 -!- smw [~stephen@pool-96-232-88-231.nycmny.fios.verizon.net] has joined
04:30 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
04:32 -!- thakis [~thakis@c-71-198-222-88.hsd1.ca.comcast.net] has joined #go-nuts
04:38 -!- fluf^arr [~camelid@s.pl0rt.org] has quit [Ping timeout: 240 seconds]
04:39 -!- meatmanek [~meatmanek@mesingw.STUDENT.CWRU.Edu] has joined #go-nuts
04:39 -!- meatmanek [~meatmanek@mesingw.STUDENT.CWRU.Edu] has quit [Remote host
closed the connection]
04:39 -!- kssreeram [~kssreeram@] has quit [Quit: kssreeram]
04:42 -!- thakis_ [~thakis@] has joined #go-nuts
04:42 -!- nocturnal [~nocturnal@] has joined #go-nuts
04:45 -!- thakis [~thakis@c-71-198-222-88.hsd1.ca.comcast.net] has quit [Ping
timeout: 258 seconds]
04:47 -!- fluffle [~camelid@s.pl0rt.org] has joined #go-nuts
04:49 < rue> Sorry about spam earlier, network freakout.  Increased my
autorejoin to 10 mins to avoid that
04:53 -!- jinzhu [~jinzhu@] has joined #go-nuts
04:57 -!- skelterjohn [~jasmuth@c-76-124-23-96.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
05:22 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has quit [Ping
timeout: 252 seconds]
05:25 -!- thakis_ [~thakis@c-71-198-222-88.hsd1.ca.comcast.net] has joined
05:28 -!- thakis [~thakis@] has quit [Ping timeout: 258 seconds]
05:44 -!- kssreeram [~kssreeram@] has joined #go-nuts
05:49 -!- TMKCodes [~toni@bbwirelessgw2-fee1dc00-62.dhcp.inet.fi] has quit [Ping
timeout: 258 seconds]
05:52 -!- megaboz [~none@unaffiliated/megaboz] has quit [Ping timeout: 276
06:00 -!- Discoloda [~vincent@adsl-76-205-134-22.dsl.frs2ca.sbcglobal.net] has
joined #go-nuts
06:02 -!- awidegreen [~quassel@p5B0604FD.dip.t-dialin.net] has joined #go-nuts
06:02 -!- rhelmer [~rhelmer@adsl-69-107-68-251.dsl.pltn13.pacbell.net] has joined
06:03 < Discoloda> is there a fast way to load binary data, using
encoding/binary seems to be slow with all the type checking, i just want to do the
equiv of `` (byte *data) { return (struct_t*)data; } `` but return an array so i
can index it
06:05 -!- General13372 [~support@71-93-97-216.dhcp.mtpk.ca.charter.com] has joined
06:08 -!- smw [~stephen@pool-96-232-88-231.nycmny.fios.verizon.net] has quit
[Remote host closed the connection]
06:09 -!- smw [~stephen@pool-96-232-88-231.nycmny.fios.verizon.net] has joined
06:09 -!- General1337 [~support@71-93-97-216.dhcp.mtpk.ca.charter.com] has quit
[Ping timeout: 276 seconds]
06:10 -!- thegeekinside [~thegeekin@] has joined #go-nuts
06:17 -!- path[l] [UPP@] has joined #go-nuts
06:32 -!- Discoloda [~vincent@adsl-76-205-134-22.dsl.frs2ca.sbcglobal.net] has
quit [Remote host closed the connection]
06:38 -!- michael| [~maikeru@unaffiliated/maikeru/x-7708887] has quit [Ping
timeout: 264 seconds]
06:40 -!- wrtp [~rog@] has joined #go-nuts
06:45 -!- michael| [~maikeru@unaffiliated/maikeru/x-7708887] has joined #go-nuts
06:51 -!- rv2733 [~rv2733@c-98-242-168-49.hsd1.fl.comcast.net] has joined #go-nuts
07:05 -!- felipe [~felipe@my.nada.kth.se] has joined #go-nuts
07:06 -!- GilJ [~gilles@] has joined #go-nuts
07:06 -!- Chryson [~Chryson@c-71-60-247-62.hsd1.pa.comcast.net] has quit [Quit:
07:06 -!- merlin83 [~merlin83@unaffiliated/merlin83] has quit [Ping timeout: 240
07:08 -!- Yoda`Taff [~yoda@unaffiliated/yoda-bzh] has joined #go-nuts
07:10 -!- GilJ [~gilles@] has quit [Remote host closed the
07:18 -!- nywles [~selwyn@s5593f55c.adsl.wanadoo.nl] has joined #go-nuts
07:26 -!- kaigan|work
[~kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has joined #go-nuts
07:31 -!- dsal [~Adium@adsl-69-230-8-158.dsl.pltn13.pacbell.net] has joined
07:32 < dsal> I just pulled the latest code (it's been a while) and got a
linker error.  Can anyone offer a clue?
07:32 < dsal> http://pastebin.com/7jPAh9np
07:34 < anticw> you can't use multiple .6 files on the cmd line like that
07:34 < anticw> actually, that's untrue ...  i do it here
07:34 < dsal> You *used* to be able to.
07:35 < anticw> actually, no i don't ...  i just import directly
07:35 < anticw> dsal: if you really want that you need to make a package
07:36 < anticw> or else have the dependants imported by the parents and just
import the top most
07:36 < dsal> I guess I just want to update my build.  I've got five source
files and I want to make a bin.
07:37 < anticw> dsal: you typically don't do it like that though
07:37 < anticw> dsal: do any of those import the others?
07:38 < dsal> One is pretty much a main, and then it trees down, so it could
be a single compile.
07:38 < anticw> i mean, id gocache imports mc_conn_handler ...  all you need
is gocache, mc_conn_handler ends p 'inside it'
07:38 < anticw> it's not like c
07:38 < dsal> I haven't really played with go since November.
07:38 < anticw> this isn't new
07:38 < dsal> Perhaps not, but my Makefile hasn't changed since then.
07:38 < anticw> if foo requires bar ...  you don't like with foo.6 and bar.6
07:39 < anticw> foo impors bar ...  and import foo into your main ...
07:39 < dsal> OK. I think all the right stuff happens.  How would I compile
07:40 < dsal> Seems like I want to bypass all the .6 files.
07:40 < anticw> what requires what?
07:41 < dsal> oooh.  I see.  I just link the one.
07:41 < anticw> if main requires foo which requires bar ....  6g bar ...  6g
foo (sucks in bar) ...  6g main (sucks in foo which has bar)
07:41 < dsal> Yeah.  That's not what I would expect, but it works fine.
07:43 < anticw> it's in effective go or the talk, i forget which one
07:44 < dsal> I think I wrote this memcached server a day or two after go
was made public.  I haven't touched it much then, but bug 349 just got fixed and I
was waiting on that for some cleaner teardown code.
07:45 -!- TMKCodes [~toni@87-95-95-187.bb.dnainternet.fi] has joined #go-nuts
07:46 -!- iamcarbon [~Adium@c-24-12-55-87.hsd1.il.comcast.net] has quit [Quit:
07:48 -!- dsal [~Adium@adsl-69-230-8-158.dsl.pltn13.pacbell.net] has left #go-nuts
07:50 -!- ikaros [~ikaros@g227032124.adsl.alicedsl.de] has joined #go-nuts
07:55 -!- TMKCodes [~toni@87-95-95-187.bb.dnainternet.fi] has quit [Ping timeout:
264 seconds]
08:01 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
08:03 -!- ikaros [~ikaros@g227032124.adsl.alicedsl.de] has quit [Quit: Leave the
magic to Houdini]
08:17 -!- path[l] [UPP@] has quit [Quit: path[l]]
08:23 -!- Surma [~bzfsurma@gooseberry.zib.de] has joined #go-nuts
08:30 -!- KillerX [~anant@] has joined #go-nuts
08:30 -!- KillerX [~anant@] has quit [Changing host]
08:30 -!- KillerX [~anant@gentoo/developer/KillerX] has joined #go-nuts
08:30 < KillerX> anyone know why strings.Bytes() went missing?
08:30 < KillerX> what's the recommended way of converting a string to a byte
array now?
08:31 < nf> KillerX: []byte("string")
08:31 < nf> and bytes.String() was also removed in favour of
08:31 < nf> (it's in the release notes :)
08:32 < KillerX> oh cool
08:32 < KillerX> thanks nf!
08:32 < nf> yeah much nicer.  don't have to import strings everywhere :)
08:33 < KillerX> been pulling from hg so have missed the release notes
should pay more attention to them
08:33 < nf> there should be a golang-announce list i suppose
08:35 < nf> if there were, would you subscirbe?
08:35 < nf> subscribe
08:36 < KillerX> definitely
08:36 < KillerX> i'm also subscribed to go-nuts but it's too high volume to
follow on a regular basis
08:36 < nf> okay i'll set one up
08:36 < KillerX> sounds good!
08:43 -!- motron [~smegforbr@2001:8d8:1fe:100:225:64ff:fea7:359a] has joined
08:50 -!- Surma [~bzfsurma@gooseberry.zib.de] has quit [Quit: Leaving.]
08:52 -!- ct529 [~quassel@77-44-78-159.xdsl.murphx.net] has joined #go-nuts
08:52 -!- Surma [~bzfsurma@gooseberry.zib.de] has joined #go-nuts
08:59 -!- lux` [~lux@] has joined #go-nuts
09:02 -!- ikaros [~ikaros@g227032124.adsl.alicedsl.de] has joined #go-nuts
09:13 -!- TMKCodes [~toni@87-93-61-111.bb.dnainternet.fi] has joined #go-nuts
09:13 -!- Kashia [~Kashia@p4FEB70AA.dip.t-dialin.net] has quit [Quit: This
computer has gone to sleep]
09:26 -!- lux` [~lux@] has quit [Read error: Connection reset by
09:27 -!- TMKCodes [~toni@87-93-61-111.bb.dnainternet.fi] has quit [Ping timeout:
276 seconds]
09:33 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
09:36 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has quit
[Excess Flood]
09:36 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has joined
09:50 -!- ikaros [~ikaros@g227032124.adsl.alicedsl.de] has quit [Quit: Leave the
magic to Houdini]
09:58 -!- lux` [lux`@] has joined #go-nuts
10:01 -!- pines0ul [~travis@S0106002129644754.gv.shawcable.net] has quit [Remote
host closed the connection]
10:04 -!- narsil [~npatry@] has quit [Quit: Leaving]
10:04 -!- nywles [~selwyn@s5593f55c.adsl.wanadoo.nl] has quit [Quit: nywles]
10:12 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
10:13 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts
10:19 < nsf> hi, I have a question: var array [10]byte; allocates memory on
the stack or on the heap?  or it is an implementation detail?  or..?  Russ Cox
actually told me that it does heap allocation, but frankly I don't believe him.
10:20 -!- lux` [lux`@] has quit [Read error: Connection reset by
10:21 < nsf> I looked at '8g -S' output..  but I'm not really strong in
assembly, however it's clear that make([]int, 10) calls runtime.makeslice and
statically sized arrays don't really call anything
10:23 -!- HollyRain [~quassel@] has joined #go-nuts
10:25 < HollyRain> the strings are arraies of bytes, so they can only have
ascii chars, right?
10:25 < nsf> HollyRain: strings are utf-8 encoded strings as far as I know
10:25 < HollyRain> ok
10:26 -!- mbarkhau [~koloss@dslb-084-059-161-165.pools.arcor-ip.net] has joined
10:26 -!- jvogel [~jonathan@friedpancakes.com] has quit [Read error: Operation
timed out]
10:26 < HollyRain> but utf-8 encoding, doesn't have 2 bytes by char.?
10:27 -!- TMKCodes [~toni@bbwirelessgw2-fee1dc00-62.dhcp.inet.fi] has joined
10:27 < HollyRain> and the strings are []byte
10:27 < nsf> HollyRain: you can index them as []byte, but they may contain
2,3,4-byte characters
10:28 < nsf> but things like: 'for _, unichr := range str {'
10:28 < nsf> does conversion from utf-8 to unicode index
10:28 < nsf> do*
10:31 < nsf> len(str) prints the number of bytes however (not characters)
10:31 < nsf> so, it's kinda strange to me, but I hope Go guys know why
they're doing it :)
10:31 -!- nighty__ [~nighty@] has quit [Quit: Disappears in a puff
of smoke]
10:32 < nsf> ah..  strings are immutable, []byte slices aren't
10:32 < nsf> that's the main difference
10:33 < nsf> and of course there are things like null-termination and
special semantics (like in for loop case) probably :)
10:34 < HollyRain> I believe that the strings have not null-termination
10:35 < nsf> maybe
10:37 < nsf> yes, I guess they are..  immutable strings allow slicing by
doing substrings without allocating new memory
10:38 -!- KillerX [~anant@gentoo/developer/KillerX] has quit [Quit: Leaving.]
10:47 -!- jinzhu [~jinzhu@] has quit [Ping timeout: 260 seconds]
10:51 -!- path[l] [~path@] has joined #go-nuts
10:51 -!- thegeekinside [~thegeekin@] has quit [Read error:
Connection reset by peer]
11:01 -!- Ikke [~ikkibr@] has joined #go-nuts
11:01 -!- Ikke [~ikkibr@] has quit [Changing host]
11:01 -!- Ikke [~ikkibr@unaffiliated/ikkebr] has joined #go-nuts
11:06 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts
11:06 -!- fwiffo [~none@unaffiliated/fwiffo] has joined #go-nuts
11:07 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Read error: Operation
timed out]
11:09 -!- path[l] [~path@] has quit [Ping timeout: 246 seconds]
11:15 -!- TMKCodes [~toni@bbwirelessgw2-fee1dc00-62.dhcp.inet.fi] has quit [Ping
timeout: 276 seconds]
11:17 < HollyRain> var all []int; all[i] = hex
11:17 < HollyRain> I get index out of range, why?
11:18 < Surma> HollyRain: gotta make() first
11:18 < nsf> because []int is a slice, they are not variable-size arrays
11:18 < nsf> you should preallocate is using make
11:18 < HollyRain> but, and if you know the size of that array?
11:19 -!- path[l] [~path@] has joined #go-nuts
11:19 < HollyRain> I'd have to make more work but could be got the total
11:20 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has joined
11:21 < nsf> HollyRain: do you mean 'if you _don't_ know the size'?
11:21 < HollyRain> yes
11:21 < nsf> this is topic is quite well covered in docs on the go's website
11:22 < HollyRain> I'm going to see it
11:22 < nsf> slices have capacity and size, you can allocate a slice with
needed capacity that way for example: all := make([]int, 0, 100); // allocates
slice with capacity == 100
11:22 < nsf> then all[i] = 5 changes length of an array to i if i < 100
11:23 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Quit: WeeChat]
11:23 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
11:24 -!- ikaros [~ikaros@guests59.externals.de] has joined #go-nuts
11:24 < nsf> HollyRain: and there are things like that:
11:24 < nsf> that allows you to use array in std::vector kind of style
11:25 < nsf> however Go doesn't have "true" generics yet
11:26 < nsf> I guess the main reason why things are so complicated is to be
able to avoid implicit allocations in built-in types
11:27 < nsf> and it kind of makes sense
11:27 < Surma> is it still true, that golang.org just runs godoc (which
itself is written in Go, isn't it)?
11:27 -!- TMKCodes [~toni@bbwirelessgw2-fee1dc00-62.dhcp.inet.fi] has joined
11:27 < Surma> nsf: I am convinced that the way it is right now is the best
solution.  Implicit things just make you think about stuff you shouldn't be
thinking about
11:27 < Surma> or replace thinking with checking, even worse ^^
11:28 < nsf> Surma: I'm too, but there are things that aren't covered yet
(see my Allocations in Go recent post in mailing list)
11:28 < nsf> aren't well covered*
11:29 -!- ikaros [~ikaros@guests59.externals.de] has quit [Client Quit]
11:29 < Surma> nsf: That is true, but taking the age of go into
consideration, everything's pretty well done :) It's still not officially
recomended for production use, right?
11:30 < nsf> yep
11:30 < nsf> however afaik getting it ready for production let's say
experimental use is the top priority
11:31 -!- ikaros [~ikaros@guests59.externals.de] has joined #go-nuts
11:32 < nsf> it was mentioned in their first blog post actually :)
11:32 < Surma> oh right, I still have to read thru the blog
11:43 < HollyRain> all := new([]int) ; &all[i] = {number}
11:43 < HollyRain> I've tests a lot of :(
11:44 < HollyRain> *tested
11:44 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
11:45 < nsf> new([]int) allocates a pointer to an empty slice
11:45 < nsf> afaik it's called null-slice
11:46 -!- awidegreen_ [~quassel@pD9543C20.dip.t-dialin.net] has joined #go-nuts
11:48 -!- awidegreen [~quassel@p5B0604FD.dip.t-dialin.net] has quit [Ping timeout:
245 seconds]
11:48 < HollyRain> does anybody could say me how to assign a value into an
array assigned using *new*?  foo := new([]int)
11:48 < nsf> HollyRain: read this:
11:48 < nsf> and this:
11:49 < nsf> the second one is more important actually
11:49 < nsf> for you
11:52 -!- HollyRain [~quassel@] has left #go-nuts
["http://quassel-irc.org - Chat comfortably.  Anywhere."]
11:57 -!- nywles [~selwyn@s5593f55c.adsl.wanadoo.nl] has joined #go-nuts
11:59 -!- skelterjohn [~jasmuth@c-76-124-23-96.hsd1.nj.comcast.net] has joined
12:06 -!- kaigan|work
[~kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has quit [Quit:
12:07 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
12:15 -!- soul9 [~none@unaffiliated/johnnybuoy] has quit [Ping timeout: 248
12:22 -!- hlavaty [~user@77-22-100-58-dynip.superkabel.de] has joined #go-nuts
12:24 -!- vdrab [~vdrab@cap002-055.kcn.ne.jp] has joined #go-nuts
12:25 -!- cane9 [~none@unaffiliated/johnnybuoy] has joined #go-nuts
12:26 -!- kssreeram [~kssreeram@] has quit [Quit: kssreeram]
12:28 -!- _TestamenT_ [~Miranda@staticline25109.toya.net.pl] has joined #go-nuts
12:34 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
12:35 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
12:44 -!- skelterjohn_ [~jasmuth@c-76-124-23-96.hsd1.nj.comcast.net] has joined
12:46 -!- merlin83 [~merlin83@cm16.delta196.maxonline.com.sg] has joined #go-nuts
12:46 -!- merlin83 [~merlin83@cm16.delta196.maxonline.com.sg] has quit [Changing
12:46 -!- merlin83 [~merlin83@unaffiliated/merlin83] has joined #go-nuts
12:52 -!- bthomson [~bthomson@c-69-255-188-5.hsd1.va.comcast.net] has quit [Ping
timeout: 265 seconds]
13:02 -!- skelterjohn_ [~jasmuth@c-76-124-23-96.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn_]
13:03 -!- afurlan [~afurlan@scorpion.mps.com.br] has joined #go-nuts
13:03 -!- Wiz126 [Wiz126@] has quit [Ping timeout: 258 seconds]
13:06 -!- bthomson [~bthomson@c-69-255-188-5.hsd1.va.comcast.net] has joined
13:10 -!- meanburrito920 [~john@] has joined #go-nuts
13:10 -!- meanburrito920 [~john@] has quit [Changing host]
13:10 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts
13:10 -!- skelterjohn [~jasmuth@c-76-124-23-96.hsd1.nj.comcast.net] has quit [Ping
timeout: 258 seconds]
13:14 -!- skelterjohn [~jasmuth@c-76-124-23-96.hsd1.nj.comcast.net] has joined
13:21 -!- motron [~smegforbr@2001:8d8:1fe:100:225:64ff:fea7:359a] has quit [Remote
host closed the connection]
13:25 -!- skelterjohn_ [~jasmuth@c-76-124-23-96.hsd1.nj.comcast.net] has joined
13:32 -!- ericvh [~ericvh@] has joined #go-nuts
13:33 < bortzmeyer> Is there a way to put a *big.Int into a big.Int?  Simply
using = yields "peer.go:186: implicit assignment of big.Int field 'neg' in
assignment" But I find no function Copy in package big
13:35 -!- skelterjohn [~jasmuth@c-76-124-23-96.hsd1.nj.comcast.net] has quit [Ping
timeout: 260 seconds]
13:36 < Surma> a *big.Int
13:36 < Surma> b big.Int
13:36 < Surma> b = *a // This does not work?
13:37 < bortzmeyer> Surma: no, it doesn't "peer.go:186: implicit assignment
of big.Int field 'neg' in assignment"
13:37 < Surma> I couldn't deduce from your statement whether you use *a oder
13:48 -!- Surma [~bzfsurma@gooseberry.zib.de] has quit [Quit: Leaving.]
13:52 -!- timepilot [~timepilot@c-24-91-16-174.hsd1.ma.comcast.net] has joined
13:57 -!- timepilot [~timepilot@c-24-91-16-174.hsd1.ma.comcast.net] has quit
[Quit: timepilot]
13:57 -!- timepilot [~timepilot@c-24-91-16-174.hsd1.ma.comcast.net] has joined
14:00 < Zoopee> Quick curious question -- can go programs fork actual (Unix)
subprocesses?  I've looked at the go libraries, and couldn't find a fork function
14:01 < wrtp> bortzmeyer: you're not supposed to use big.Int - only *big.Int
14:01 < bortzmeyer> wrtp: that's what I inferred but where is it documented?
14:01 < wrtp> Zoopee: see os.ForkExec and the exec package
14:01 -!- timepilot [~timepilot@c-24-91-16-174.hsd1.ma.comcast.net] has quit
[Client Quit]
14:02 < Zoopee> I see there's exec.Run to invoke programs, i.e.  fork+exec
on Unix though.  Does the Go runtime use threads in an unsafe way that is
incompatible with just forking, or is it just a missing library function?
14:02 -!- timepilot [~timepilot@c-24-91-16-174.hsd1.ma.comcast.net] has joined
14:02 < wrtp> bortzmeyer: in the language standard.
14:02 < wrtp> Zoopee: yes
14:03 < Zoopee> wrtp: sure, and I guess with goroutines there's less need
for standalone forks in Go, but it'd still be useful sometimes.
14:03 < wrtp> Zoopee: i mean, the first
14:03 < wrtp> Zoopee: why do you want to fork the whole runtime?
14:03 < Zoopee> wrtp: I see.  Oh well...
14:04 < wrtp> bortzmeyer: and also in the big package documentation it says
of Int: "contains unexported fields"
14:04 < skelterjohn> people often come in and say "why can't I do X that I
can do elsewhere?  go sucks if I can't do X" but then find out that X doesn't
happen because Y is fundamentally better (and a part of the language to boot)
14:04 < bortzmeyer> wrtp: but many structs have unexported fields and still
accept assignment, no?
14:04 < Zoopee> wrtp: Well in some contexts it is useful to actually have
independent processes.  i.e.  many classic Unix practices depend on such things.
14:04 < wrtp> bortzmeyer: no
14:05 < skelterjohn> Zoopee: just because something has always been done a
certain way doesn't mean it should continue to be done so.  do you have a specific
14:05 < wrtp> Zoopee: you can still have an independent process, by using
forkexec.  or by using go.
14:06 < Zoopee> I do realize it was not Go's goal to do things the same way
you'd do it in C/Unix, of course.
14:06 < wrtp> by "go" there i meant the go statement, of course :-)
14:07 < wrtp> Zoopee: almost every occurrence of fork in "classic" unix
style is followed very soon by an exec
14:07 < bortzmeyer> wrtp: OK, so general rule for the newbie: when you see
"// contains unexported fields " in the documentation, beware, assignment won't
14:07 < wrtp> bortzmeyer: well, assignment of the contained value anyway,
14:07 < wrtp> bortzmeyer: 'cos you can still assign pointers no problem
14:08 < skelterjohn> that one caught me up a bit too, bortzmeyer
14:08 < skelterjohn> i figured "i can just copy the data without knowing
what it's called"
14:08 < Zoopee> I don't have a need for it myself right now, I'm still just
learning the language.  I can think of some use cases though...  e.g.  linked with
a library that holds global state, or to take advantage of a distributed
processing environment with process migration.
14:08 < skelterjohn> it's more something to be aware of as a package
designer than a end programmer
14:09 < wrtp> me too.  to be honest it's a bit odd that you can create an
instance of the non-pointer variable anyway...
14:09 < Zoopee> wrtp: A vast majority of them, clearly, but not all.
14:09 < wrtp> Zoopee: so give me a good example where you'd want a
persistent fork
14:10 < wrtp> Zoopee: bearing in mind that you've got go, which allows you
to easily start a new process sharing the same memory & runtime
14:11 < skelterjohn> it's not accurate to call it a process, especially in
the context of this conversation
14:12 -!- tav [~tav@] has joined #go-nuts
14:12 -!- vpm [~vpm@reverse-94.fdn.fr] has left #go-nuts []
14:12 < skelterjohn> Zoopee is asking about control over OS level processes,
I believe, and that is hidden behind the go semantics
14:12 < skelterjohn> ie many goroutines on the same process
14:13 < Zoopee> wrtp: sure -- if your program is entirely in the Go model.
But if it's not purely Go, and some library you use has global state, or fiddles
with file descriptors, or whatever, there can be functional differences
14:14 < skelterjohn> Zoopee: what exactly do you think would break in that
14:14 < skelterjohn> you're leaving dangling conclusions that I'm not able
to jump to
14:16 < Zoopee> wrtp: Or if you use any of the process-bound system
features, e.g.  you'd call setuid or chroot after fork
14:17 < Zoopee> I'm not criticizing here BTW -- I realize Go was written
with a newer-than-Unix model in mind, and allowing these things was probably not
in its main goals.
14:18 < plexdev> http://is.gd/b6IAN by [Russ Cox] in 4 subdirs of go/ -- gc:
14:18 < plexdev> http://is.gd/b6IAU by [Russ Cox] in 2 subdirs of
go/src/pkg/runtime/ -- runtime: a couple more memory stats.
14:19 < Zoopee> skelterjohn: well, to take the first example -- if you use a
library that uses global/static state for some reason, you can't initialize it
more than once with different parameters in separate goroutines, can you?
14:19 < plexdev> http://is.gd/b6IBj by [Rob Pike] in go/src/pkg/flag/ --
Flags: add user-defined flag types.  The change is really no code; it's just
14:19 < plexdev> http://is.gd/b6IBy by [Robert Griesemer] in 2 subdirs of
go/src/ -- godoc: support for filtering of command-line output in -src mode
14:19 < plexdev> http://is.gd/b6IBN by [Robert Griesemer] in
go/src/pkg/go/printer/ -- go/printer: fix a comment
14:19 < plexdev> http://is.gd/b6ICn by [Russ Cox] in 4 subdirs of
go/src/pkg/runtime/ -- runtime: run deferred calls at Goexit
14:19 < plexdev> http://is.gd/b6ICF by [Christopher Wedgwood] in
go/src/pkg/runtime/linux/amd64/ -- runtime: Remove unused runtime.write from
14:19 < plexdev> http://is.gd/b6ICV by [Russ Cox] in go/src/cmd/gc/ -- gc:
flush warnings, if any
14:19 < skelterjohn> ah.  i follow now
14:20 < skelterjohn> are there many libraries that do that, other than ones
that deal with a unique piece of hardware?  for example, opengl, but you generally
only draw to a single graphics card
14:20 < Zoopee> skelterjohn: or for the second example, if you're going to
call something that redirects stdin, say, you want only that process affected, but
goroutines won't work.
14:21 < skelterjohn> and i don't know enough about unix to know how
redirecting stdin is affected by process control
14:22 < Zoopee> skelterjohn: and for the rest -- imagine you write a Unix
shell (you'll need pipes between processes to do some things, simply by the nature
of the interfaces you are using), or imagine you are writing a file server, and
when a user connects you want to fork a process to serve that user, calling
setuid()/setgid() to switch to the user's credentials for file access...
14:23 < skelterjohn> i see
14:24 < skelterjohn> so, in general, the unix way of doing things demands
separate processes for division of certain types of tasks
14:24 -!- zard_ [~4176bf02@gateway/web/freenode/x-mdiihtbgzckzqchi] has joined
14:25 < skelterjohn> i would argue, and you intimated at this, that the unix
way of doing things is not necessarily the best, and go should feel free to leave
it behind
14:25 -!- nanoo [~nano@95-89-197-214-dynip.superkabel.de] has joined #go-nuts
14:25 < wrtp> Zoopee: the setuid and the chroot examples are the best ones.
14:26 -!- LeNsTR [~LeNsTR@unaffiliated/lenstr] has joined #go-nuts
14:26 < wrtp> Zoopee: but there are usually command-line utilities to do
those things for you (e.g.  sudo and chroot)
14:26 < Zoopee> skelterjohn: these kinds of things, in Unix, are generally
per-process - a process has its working directory, signal masks, user credentials,
file descriptors, etc.  etc.  You can change them in the process and they will not
affect other processes (and the Unix model relies on the boundaries on fork for
many things), but I imagine the way goroutines are implemented, that isolation
does not work between goroutines.
14:28 < wrtp> Zoopee: in inferno, which has a similar process model, there
is per-process state (file descriptors, user id, etc) but there's no fork.
14:29 < wrtp> Zoopee: instead, there's a "pctl" syscall that can divorce
mark certain attributes as independently modifiable in the current process
14:29 < wrtp> it's a nicer solution, but not possible when layering onto
unix as go does
14:29 < wrtp> the problem is that a given goroutine does not run on only one
unix process
14:30 < Zoopee> skelterjohn: Definitely, I'm not saying that Go should be
constrained by the Unix model.  Go's foremost goal is to provide a fresh new way
to do things and it shouldn't let this get in its way.
14:30 < wrtp> so if you really need to manipulate those things in go, you're
probably best talking to an independent process over a pipe
14:31 < wrtp> i agree it's slightly odd that os.Chdir changes the working
directory for every goroutine
14:32 < Zoopee> wrtp: Sure, there are these external programs, but to use
those your program has to get (say) sudo to then exec itself and pass all context
via a pipe or something -- it does not work with goroutines.
14:33 -!- thakis_zzZ [~thakis@c-71-198-222-88.hsd1.ca.comcast.net] has left
#go-nuts []
14:33 < wrtp> Zoopee: you're right
14:34 < Zoopee> wrtp: I'm not sure I understood the comment about Inferno --
when you say "similar process model" you mean to goroutines or to Unix processes?
(/me doesn't know much about Inferno, but based on the Plan9 relations would guess
the Unix model)
14:34 < wrtp> i mean to goroutines
14:34 < wrtp> go's "go" is limbo's "spawn"
14:37 < Zoopee> wrtp: so in the imaginary "Go/Inferno" marriage, you get to
"exec" from a goroutine just replacing the current goroutine, and not the whole
process?  That sounds like a good solution.
14:39 < wrtp> currently go completely avoids any notion of per-goroutine
state.  it would be possible to add state, and even create some affinity between
particular goroutines and unix processes, but i don't know how much is possible in
the pthread model.
14:39 < wrtp> Zoopee: yes
14:40 < wrtp> Zoopee: but it adds considerable complexity (and probably
runtime penalty) to the process model
14:42 -!- LeNsTR [~LeNsTR@unaffiliated/lenstr] has quit [Ping timeout: 260
14:44 < Zoopee> wrtp: As for Chdir, well...  Without changing Unix or tying
Go more deeply into the system, that unfortunatly can't be changed.
14:44 -!- Ikke [~ikkibr@unaffiliated/ikkebr] has quit []
14:45 -!- timepilot [~timepilot@c-24-91-16-174.hsd1.ma.comcast.net] has quit
[Quit: timepilot]
14:47 -!- Discoloda [~vincent@adsl-76-205-134-22.dsl.frs2ca.sbcglobal.net] has
joined #go-nuts
14:47 -!- fusion44 [~quassel@p5B286F61.dip.t-dialin.net] has joined #go-nuts
14:47 < wrtp> Zoopee: can't you have two forked-but-shared-memory unix
processes with different working directories?
14:48 < wrtp> i can't say i'm surprised
14:48 -!- merlin83 [~merlin83@unaffiliated/merlin83] has quit [Ping timeout: 240
14:50 -!- ikaros [~ikaros@guests59.externals.de] has quit [Quit: Leave the magic
to Houdini]
14:53 < Zoopee> wrtp: Of course you can.
14:55 -!- jvogel [~jonathan@friedpancakes.com] has joined #go-nuts
14:55 < Zoopee> wrtp: But to make use of that on Unix without tying into the
system, Go would have to use a Unix process per goroutine which would make
goroutines not as cheap (and some things in Go's current model would become
prohibitive) -- in which case it may as well allow you to fork.
14:58 -!- LeNsTR [~LeNsTR@] has joined #go-nuts
14:58 -!- LeNsTR [~LeNsTR@] has quit [Changing host]
14:58 -!- LeNsTR [~LeNsTR@unaffiliated/lenstr] has joined #go-nuts
15:02 < wrtp> Zoopee: you could multiplex together all goroutines that share
a common working directory
15:03 < wrtp> Zoopee: what does forking mean when you've got many threads?
do all the threads get forked too?
15:04 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has quit [Ping
timeout: 276 seconds]
15:05 < wrtp> Zoopee: if that happens, then that independent goroutine
writing to a log file suddenly turns into two independent goroutines writing to
the same log file
15:05 < wrtp> Zoopee: doesn't seem right to me
15:08 -!- XniX23 [vegy@89-212-10-29.dynamic.dsl.t-2.net] has joined #go-nuts
15:10 < LeNsTR> nsf: =)
15:10 < nsf> LeNsTR: =)
15:13 -!- Venom_X [~pjacobs@] has joined #go-nuts
15:16 -!- tor5 [~tor@c-a87e71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has
joined #go-nuts
15:18 -!- skelterjohn [~jasmuth@c-76-124-23-96.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
15:19 < Zoopee> wrtp: no, with pthreads, when you fork, the new process has
only one thread, based on the thread that issued the fork.
15:21 < wrtp> Zoopee: so then if you fork, the goroutine will have to be
tied to the new thread (otherwise it'd be useless) and then you're back to the
one-thread-per-goroutine model
15:22 < Zoopee> wrtp: The problem just arises if you either (1) fork in
multiple threads at the same time sharing file descriptors (which is easy to guard
against by protecting the bookkeeping around the fork with a lock so that only one
happens at a time), or worse if (2) you keep global locks and fail to reset them
after fork.
15:23 < Zoopee> wrtp: If the Go runtime doesn't suffer from either of these,
then it should be easy to allow forking if the right bookkeeping is done for
15:24 < Zoopee> wrtp: of course, if you fork, your new process starts with
only one goroutine, as any new program starts up.  That sounds like expected
semantics to me.
15:25 < wrtp> Zoopee: and what about the memory shared with other
15:25 < wrtp> Zoopee: can the code forked process communicate with the old
15:25 < wrtp> s/code/code in the /
15:26 < Zoopee> wrtp: that depends on how the communication is implemented -
it may be possible (i.e.  Unix IPC of whatever form).  But that doesn't have to be
a requirement.
15:28 < wrtp> Zoopee: so although you have the same memory space, much of
the surrounding machinery is going to be broken - perhaps a library routine might
be implemented using a goroutine, but now it can no longer talk to it
15:29 < wrtp> it's like this one goroutine has been ripped out from the rest
of the system, leaving wires dangling :-)
15:31 < wrtp> feels like a recipe for unexpected behaviour to me...
15:31 < Zoopee> wrtp: I think allowing fork, even in the simplistic model of
the forked process becoming completely independent of the parent, can still be
valuable.  Not to use processes instead of goroutines, but really for
interoperability with the Unix model.  Since Go is, after all, likely mostly to be
used on Unix, one may want to do things which require forking...  Until our wise
elders give us a new operating system to, er..  go with it.
15:32 < Zoopee> wrtp: well, that's where the bookkeeping comes in.  When
your Go program starts, I assume there's just one "goroutine" executing?
15:32 < wrtp> yes
15:32 < wrtp> but later on, that's not true, obviously
15:33 < Zoopee> wrtp: (i.e.  I assume that the main program can be regarded
as a goroutine that's created automatically by the runtime on startup, not sure if
that's really correct)
15:33 < wrtp> yes, that's accurate AFAIK
15:34 < Zoopee> wrtp: so any library functions that are otherwise stateless,
if they use goroutines, they need to create them first on the first call.
15:34 < wrtp> if i do: if(os.Fork() == 0){somepackage.Foo()}, it won't work
if somepackage.Foo tries to speak to another goroutine
15:34 < wrtp> Zoopee: how does that help?
15:35 < wrtp> Zoopee: if you do a fork, you're divorced from *all* other
15:35 < Zoopee> wrtp: but neither would func main() {somepackage.Foo()}
15:35 < wrtp> Zoopee: i don't see why not
15:35 < wrtp> a package can create goroutines at initialisation
15:35 -!- Nexoro [~Nexoro@c-71-192-75-183.hsd1.ma.comcast.net] has joined #go-nuts
15:35 < Zoopee> wrtp: if Foo just depends on some goroutine pre-existing?
15:35 < wrtp> (although initialisation isn't allowed to block)
15:36 < Zoopee> wrtp: at program intialization, you mean?  Then that's the
bookkeeping you need to take care of on fork.
15:36 < wrtp> Zoopee: so you're saying that fork forks some other goroutines
too then?
15:36 < Zoopee> Clearly, you lose some things after fork.  That's so in
traditional Unix programming too.
15:37 < Zoopee> wrtp: No, just that this initialization will need to be
redone after fork.
15:37 -!- rlab [~Miranda@] has joined #go-nuts
15:37 < wrtp> Zoopee: if you do that, you have to restart the whole system
15:37 < wrtp> Zoopee: including the part of the system that the current
goroutine is part of
15:38 < wrtp> Zoopee: and what if that data has changed since then.
15:38 < wrtp> ?
15:39 < Zoopee> wrtp: Not sure I understand.  If the function you are
calling is otherwise stateless, then the goroutine can be recreated at any time.
Otherwise, yes, you lose some state, which is expected.
15:40 < wrtp> here's an example: i'm doing stuff with the http client.  that
starts a new goroutine for each request.  if i fork, i find that calls on the
request object block forever because i can't talk to that goroutine any more.  but
i shouldn't have to know that.
15:40 < wrtp> nothing is guaranteed stateless in go
15:41 -!- awidegreen_ [~quassel@pD9543C20.dip.t-dialin.net] has quit [Remote host
closed the connection]
15:42 < wrtp> in conventional unix, you don't lose anything with fork,
because everything is part of one process.  the moment you move to shared memory
and multiple processes, fork starts to become inadequate
15:44 -!- nanoo [~nano@95-89-197-214-dynip.superkabel.de] has quit [Quit: Leaving]
15:46 < Zoopee> wrtp: in conventional Unix some things are unsafe after fork
on inherited handles too, just in different ways.  And you can also set up shared
memory, it's just more explicit.  But I agree, that with Go the situation is more
complicated - i.e.  to get everything working transparently, you need to inherit
more state and goroutines through, for instance.
15:47 -!- GilJ [~gilles@] has joined #go-nuts
15:47 -!- zard__ [~4176bf02@gateway/web/freenode/x-yvxwqwfugdvewtje] has joined
15:47 < wrtp> Zoopee: if it's not transparent, it shouldn't be done :-) and
you can probably do everything you want to do using cgo...
15:47 -!- fusion44 [~quassel@p5B286F61.dip.t-dialin.net] has quit [Read error:
Connection reset by peer]
15:48 -!- rhelmer [~rhelmer@adsl-69-107-68-251.dsl.pltn13.pacbell.net] has quit
[Ping timeout: 240 seconds]
15:49 < wrtp> Zoopee: (i think that cgo executes its code in a separate
process, but i'll have to check to find out)
15:49 < Zoopee> wrtp: But I also think that even if it doesn't work quite
transparently, so long as it it somewhat consistent (i.e.  you don't end up with
random locks dangling due to unsafe runtime tracking), it can still be useful in
practice -- since we'll not be in a pure Go/CSP-model world for a good while
15:50 < Zoopee> wrtp: I haven't looked much into cgo yet, but I'll check it
out.  Really I wasn't complaining or bashing Go here in any way -- just expressing
curiousity and ramblings.
15:50 < wrtp> sure
15:51 < wrtp> but i still think that introducing fork would be a bad idea...
15:53 < Zoopee> I'd be happy to see the Go approach extend to a new
operating system, where goroutines neatly play across processes and such.  But I
have less hope for that.
15:54 < Zoopee> Clearly also because getting people to adopt a new and
different operating system is more difficult than getting people to adopt a new
15:56 < Zoopee> wrtp: Maybe.  If cgo lets you do that, and it's well
isolated, that may be good enough in practice.
15:57 < wrtp> Zoopee: i'm not sure it does any more...
15:59 -!- HollyRain [~quassel@] has joined #go-nuts
16:01 < HollyRain> having 2 []int, is possitble to copy one in the another
one?  until the length of the first
16:01 < HollyRain> without a loop?
16:01 < smw> HollyRain: copy() is a built in function
16:02 < smw> I think it is copy(destination, source)
16:02 -!- jophish [~jophish@hermi.gotadsl.co.uk] has joined #go-nuts
16:03 < HollyRain> source, destination
16:04 < smw> http://golang.org/doc/go_spec.html#Copying_slices
16:04 < smw> HollyRain: copy(dst, source)
16:04 -!- Wiz126 [Wiz126@] has joined #go-nuts
16:04 < wrtp> HollyRain: think of it like assignment: dest = src
16:06 -!- sjbrown_ [~sjbrown@c-69-181-182-137.hsd1.ca.comcast.net] has joined
16:08 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.]
16:08 < HollyRain> you've readon
16:08 < HollyRain> *reason
16:09 -!- Vovchik [~Vova@IGLD-84-229-233-247.inter.net.il] has quit [Read error:
Connection reset by peer]
16:09 -!- Vovchik [~Vova@IGLD-84-229-233-247.inter.net.il] has joined #go-nuts
16:13 -!- tor5 [~tor@c-a87e71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has left
#go-nuts []
16:13 < Zoopee> wrtp: I just read a bit about processes in inferno.  It
looks simpler than Unix, but there still seems to be one global process table.  Is
it as lightweight as goroutines?
16:15 < Zoopee> wrtp: i.e.  hundreds of thousands of processes with only
some memory overhead?
16:16 -!- Wiz126 [Wiz126@] has quit [Ping timeout: 264 seconds]
16:16 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has quit
[Excess Flood]
16:16 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has joined
16:17 < Zoopee> Because that seems like the main showstopper in some new
operating system to complement the new language, consolidating goroutines with
system processes -- in systems I know, every process adds some scheduling
overhead, so enormous amounts of processes can grind a system to a halt.
16:17 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat]
16:19 < jessta> Zoopee: scheduling overhead really depends on what the
processes are doing
16:19 < wrtp> Zoopee: yes, it's same order of magnitude as goroutines
16:20 < wrtp> Zoopee: it does the same kind of segmented stack trick
16:20 < wrtp> Zoopee: main difference is that it always executes like go
does with GOMAXPROCS=1
16:21 < wrtp> Zoopee: i.e.  you can get parallelism in I/O operations but
not cpu-bound operations
16:21 < wrtp> i've had >1e6 processes executing without too much problem
16:21 < wrtp> but as jessta says, it depends what the processes are doing
16:22 < wrtp> it doesn't multiplex I/O in the same way that go does
16:22 -!- rv2733 [~rv2733@c-98-242-168-49.hsd1.fl.comcast.net] has quit [Ping
timeout: 245 seconds]
16:22 -!- kerozen [~virgule@d076.nexlink.net] has left #go-nuts []
16:24 -!- ct529 [~quassel@77-44-78-159.xdsl.murphx.net] has quit [Read error:
Connection reset by peer]
16:26 < Zoopee> jessta: It also depends on how "fair" you want the
scheduling to be.  When all "processes" belong to one running program of one user,
as with goroutines, you don't so much worry about isolating load.  When you have
multiple programs that should be to some extent isolated and compete fairly on
resources, scheduling can be more difficult.
16:26 < Zoopee> wrtp: Cool.  That sounds like the way to go, then.
16:27 < Zoopee> It would also rid us of the stupid separate concept of
threads that was added to Unix in a bad way in the form of pthreads.
16:32 -!- merlin83 [~merlin83@cm24.delta241.maxonline.com.sg] has joined #go-nuts
16:32 -!- merlin83 [~merlin83@cm24.delta241.maxonline.com.sg] has quit [Changing
16:32 -!- merlin83 [~merlin83@unaffiliated/merlin83] has joined #go-nuts
16:32 < wrtp> the place it doesn't work too well is where shared memory
state intersects with process state.  if i've got a *os.File and i fork, then
close the file in one goroutine, does the file get marked as closed or not?
16:33 < wrtp> (the solution is not to fork resources that have memory-based
handles to them, i think)
16:35 -!- Yoda`Taff [~yoda@unaffiliated/yoda-bzh] has quit [Quit: ⏏ -- ☺]
16:41 -!- path[l] [~path@] has quit [Quit: path[l]]
16:43 -!- afurlan [~afurlan@scorpion.mps.com.br] has quit [Remote host closed the
16:45 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has joined #go-nuts
16:51 -!- no_mind [~orion@] has joined #go-nuts
16:51 < no_mind> do we something like decorators in python.  In go ?
16:52 < smw> what are decorators?
16:54 < wrtp> no_mind: not really
16:54 < wrtp> you might be able to do something with reflection and function
pointers, but you couldn't do it with methods
16:55 < wrtp> smw: decorators are a way of wrapping a function within a
meta-function, such that the meta-function can see all the parameters & the
returned value
16:56 < KirkMcDonald> You pass the function to another function, and that
function returns a new function, and this new function replaces the original
16:56 -!- hlavaty [~user@77-22-100-58-dynip.superkabel.de] has quit [Ping timeout:
252 seconds]
16:56 -!- Vovchik [~Vova@IGLD-84-229-233-247.inter.net.il] has quit []
16:58 < no_mind> KirkMcDonald, I am looking for an example of function that
returns a function and that can receive a function
16:59 < KirkMcDonald> no_mind: In Python?  Or Go?
16:59 < KirkMcDonald> Because Python uses decorators for things which Go
would not.
16:59 < no_mind> KirkMcDonald, Go
16:59 < no_mind> KirkMcDonald, I have used python decorators alot
17:00 < KirkMcDonald> no_mind: func f(fn func()) func() {}
17:02 -!- Xera^ [~brit@87-194-208-246.bethere.co.uk] has joined #go-nuts
17:03 -!- meanburrito920 [~john@] has joined #go-nuts
17:03 -!- meanburrito920 [~john@] has quit [Changing host]
17:03 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts
17:03 < no_mind> KirkMcDonald, in this case, do I define some sort of inner
function ?
17:06 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has quit [Client
17:10 < wrtp> no_mind: you can have literal functions in go.  or you can
return an existing function.
17:11 < wrtp> e.g.  func twice(f func(int) int) (func(int) int) {return
func(i int)int{return f(f(i))}}
17:11 < wrtp> i wonder if there's still an expression evaluation around here
17:11 < wrtp> > 2+2
17:11 < wrtp> oh well
17:12 -!- Project_2501 [~Marvin@] has joined #go-nuts
17:13 < wrtp> twice(func(i int)int{return i * i})(2) would give 16
17:18 < no_mind> wrtp, ah, that is what I wanted to know
17:22 -!- ct529 [~quassel@77-44-78-159.xdsl.murphx.net] has joined #go-nuts
17:22 -!- b00m_chef__ [~watr@d64-180-45-230.bchsia.telus.net] has joined #go-nuts
17:23 < HollyRain> is usefull to add the variable name of data to return?
the advatange is that it's initialized from beginning
17:23 -!- LeNsTR [~LeNsTR@unaffiliated/lenstr] has quit [Quit: LeNsTR]
17:24 < wrtp> HollyRain: if there's no variable, there's nothing to be
initialised :-)
17:24 < wrtp> HollyRain: it's good for documentation
17:24 < wrtp> HollyRain: and it's also particularly useful with multi return
17:25 < HollyRain> ok
17:25 < smw> anyone know if there is something wrong with this line?  switch
type := element.(type) {.  i am getting syntax error: unexpected type, expecting {
on that line.
17:26 -!- path[l] [~path@] has joined #go-nuts
17:26 < smw> element is being pulled from a interface{} slice
17:27 < no_mind> smw, are you sure its element.(type) (note the dot)
17:27 < smw> yeah
17:27 < smw> I copied and pasted it
17:29 < no_mind> try this switch type := element.(type); true {
17:30 < smw> syntax error: unexpected type, expecting {
17:30 < no_mind> smw, pastebin the code
17:31 < smw> http://codepad.org/XYDyWRlw
17:32 < smw> it is a test for goconf package.
17:32 < wrtp> smw: you can't use "type" as a variable name.  it's a keyword
17:32 < smw> ah
17:33 < smw> thanks
17:33 < smw> Now I just need to fix all the other problems :-)
17:34 -!- mssm [~mssm@ip-95-221-74-236.bb.netbynet.ru] has joined #go-nuts
17:35 -!- ct529 [~quassel@77-44-78-159.xdsl.murphx.net] has quit [Remote host
closed the connection]
17:36 -!- nanoo [~nano@95-89-197-214-dynip.superkabel.de] has joined #go-nuts
17:37 < plexdev> http://is.gd/b6XpW by [Russ Cox] in 25 subdirs of go/ --
single argument panic
17:37 -!- b00m_chef__ [~watr@d64-180-45-230.bchsia.telus.net] has quit [Ping
timeout: 276 seconds]
17:52 -!- b00m_chef__ [~watr@d64-180-45-230.bchsia.telus.net] has joined #go-nuts
17:54 < plexdev> http://is.gd/b6YwX by [Russ Cox] in go/src/cmd/godefs/ --
godefs: fix handling of negative constants
17:54 < plexdev> http://is.gd/b6Yx2 by [Russ Cox] in go/src/ -- make: use
actual dependency for install
17:54 < plexdev> http://is.gd/b6Yxr by [Russ Cox] in 19 subdirs of go/ --
simplify various code using new map index rule
17:54 < plexdev> http://is.gd/b6YxS by [Russ Cox] in 5 subdirs of go/src/ --
gc: add panic and recover (still unimplemented in runtime)
17:59 < smw> I finally got my tests working :-)
18:00 < HollyRain> one that []int has been set with several values, is
posstible clean it?  with to waiting to the garbage collector?
18:00 < HollyRain> *without
18:06 -!- General1337 [~support@71-93-97-216.dhcp.mtpk.ca.charter.com] has joined
18:08 -!- jalmeida [~jalmeida@c934233f.virtua.com.br] has joined #go-nuts
18:10 -!- General13372 [~support@71-93-97-216.dhcp.mtpk.ca.charter.com] has quit
[Ping timeout: 276 seconds]
18:10 < Zoopee> wrtp: (wrt sharinf files on fork) the way it works for Unix
file descriptors (and thus for C FILE *objects), is the kernel does reference
counting on the underlying file handle, which is only closed after no more
processes have it open.  The same semantics would make sense in the utopian-OS+Go
18:10 < Zoopee> s/sharinf/sharing/
18:14 -!- soul9 [~none@unaffiliated/johnnybuoy] has quit [Ping timeout: 252
18:15 -!- kssreeram [~kssreeram@] has joined #go-nuts
18:23 -!- sjbrown_ [~sjbrown@c-69-181-182-137.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
18:24 -!- bmm [~bram@195-240-186-6.ip.telfort.nl] has joined #go-nuts
18:25 -!- meanburrito920 [~john@] has joined #go-nuts
18:25 -!- meanburrito920 [~john@] has quit [Changing host]
18:25 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts
18:25 < plexdev> http://is.gd/b70Hf by [Robert Griesemer] in
go/src/cmd/godoc/ -- godoc: don't print package clause in -src command-line mode
with filtering
18:25 < plexdev> http://is.gd/b70Hi by [Rob Pike] in go/doc/ -- Effective
Go: update maps description regarding lookup of nonexistent entry.
18:29 -!- ThunderChicken [~bofh@dsl093-032-217.snd1.dsl.speakeasy.net] has quit
[Quit: Leaving]
18:29 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has quit [Read error:
Operation timed out]
18:31 -!- dshep [~user@dan75-7-88-166-185-201.fbx.proxad.net] has joined #go-nuts
18:32 -!- franksalim [~frank@adsl-75-61-84-181.dsl.pltn13.sbcglobal.net] has quit
[Quit: Ex-Chat]
18:38 -!- Pinkilla [~pinkilla@aether.hipocoon.be] has joined #go-nuts
18:38 -!- rv2733 [~rv2733@c-98-242-168-49.hsd1.fl.comcast.net] has joined #go-nuts
18:41 -!- terrex [~terrex@] has joined #go-nuts
18:41 < wrtp> Zoopee: the reason it works for unix file descriptors is that
the handle is an int, not a pointer to a structure
18:42 < plexdev> http://is.gd/b71Op by [Robert Griesemer] in go/ --
contributors, authors: add Risto Saarelma
18:42 < plexdev> http://is.gd/b71Ow by [Risto Jaakko Saarelma] in 2 subdirs
of go/src/pkg/go/printer/ -- Gofmt preserves newlines in multiline selector
18:42 < wrtp> Zoopee: shared-memory fork and FILE* will not work well
18:43 < wrtp> Zoopee: non-shared-memory fork and FILE* works fine because
all the memory is copied.
18:44 -!- soul9 [~none@unaffiliated/johnnybuoy] has joined #go-nuts
18:54 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
19:06 -!- uriel [~uriel@] has joined #go-nuts
19:07 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Client
19:09 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:e016:f951:71b4:8e4c] has joined
19:12 -!- aho [~nya@f051155103.adsl.alicedsl.de] has joined #go-nuts
19:14 -!- rhelmer [~rhelmer@] has joined #go-nuts
19:14 -!- rhelmer [~rhelmer@] has quit [Client Quit]
19:15 -!- iamcarbon [~Adium@c-24-12-55-87.hsd1.il.comcast.net] has joined #go-nuts
19:15 -!- rhelmer [~rhelmer@] has joined #go-nuts
19:16 < Zoopee> wrtp: I see what you mean -- specifically, it's not about
files, but generally about shared memory between processes.
19:16 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
19:18 -!- path[l] [~path@] has quit [Quit: path[l]]
19:20 -!- tobel [~tobel@pD9E8F028.dip.t-dialin.net] has quit [Quit: WeeChat]
19:22 < Zoopee> wrtp: Specifically, in this case I'd say the file gets
marked as closed, as it's shared between the processes.
19:24 < Zoopee> Finally, I got gccgo working...
19:24 < Zoopee> I'm off, time to finish the day.
19:27 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout:
615 seconds]
19:28 -!- nanoo [~nano@95-89-197-214-dynip.superkabel.de] has quit [Quit: Leaving]
19:28 -!- rhelmer [~rhelmer@] has quit [Quit: rhelmer]
19:29 -!- General1337 [~support@71-93-97-216.dhcp.mtpk.ca.charter.com] has quit
[Ping timeout: 264 seconds]
19:30 -!- rhelmer [~rhelmer@] has joined #go-nuts
19:32 -!- smw_ [~stephen@pool-96-232-88-231.nycmny.fios.verizon.net] has joined
19:32 -!- smw [~stephen@pool-96-232-88-231.nycmny.fios.verizon.net] has quit [Read
error: Connection reset by peer]
19:32 -!- easytiger [~gerrys@gi0-0.cr1.vg1.core.bfs.wombatfs.net] has quit [Ping
timeout: 258 seconds]
19:33 -!- sjbrown_ [~sjbrown@dsl081-072-059.sfo1.dsl.speakeasy.net] has joined
19:34 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has quit [Read error: Connection
reset by peer]
19:38 -!- rhelmer [~rhelmer@] has quit [Read error: Connection reset
by peer]
19:38 -!- rhelmer [~rhelmer@] has joined #go-nuts
19:43 -!- rhelmer [~rhelmer@] has quit [Ping timeout: 264 seconds]
19:45 -!- path[l] [UPP@] has joined #go-nuts
19:45 -!- mssm [~mssm@ip-95-221-74-236.bb.netbynet.ru] has quit [Read error:
Operation timed out]
19:46 -!- meanburrito920 [~john@] has joined #go-nuts
19:46 -!- meanburrito920 [~john@] has quit [Changing host]
19:46 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts
19:46 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has quit [Quit:
19:48 < bortzmeyer> Why is there no Copy() function for big.Int?  How to
copy a big.Int?  i2.SetString(i1.String()) ?
19:51 < KirkMcDonald> I would probably treat big.Int objects as immutable.
19:51 < bortzmeyer> KirkMcDonald: it should not prevent them from being
19:51 < KirkMcDonald> ...  maybe.
19:52 < KirkMcDonald> The fact that they are patently not immutable would
put a damper on that.
19:52 < bortzmeyer> It seems strange that I have to serialize then parse a
big.Int just to copy it.
19:52 -!- nchaimov [~cowtown@c-71-237-208-209.hsd1.or.comcast.net] has quit
[Remote host closed the connection]
19:52 -!- nchaimov [~cowtown@vpn174-113.uoregon.edu] has joined #go-nuts
19:53 < KirkMcDonald> I'd probably do i2.SetBytes(i1.Bytes()), rather than
the String versions.
19:53 -!- fwiffo [~none@unaffiliated/fwiffo] has quit [Quit: Lost terminal]
19:54 -!- nchaimov_ [~cowtown@c-71-237-208-209.hsd1.or.comcast.net] has joined
19:54 < KirkMcDonald> You could also always do: i2 := big.NewInt(0);
i2.Add(i1, big.NewInt(0))
19:55 < KirkMcDonald> Or, I guess: i2.Add(i1, i2)
19:55 < bortzmeyer> Ah, nice trick, with Add, thanks (although I should
profile to see which is the fastest)
19:56 < KirkMcDonald> Oh, wait.
19:56 < KirkMcDonald> There's a Set method.
19:56 < KirkMcDonald> Durr.
19:56 < KirkMcDonald> i2.Set(i1)
19:57 -!- nchaimov [~cowtown@vpn174-113.uoregon.edu] has quit [Ping timeout: 246
19:58 < bortzmeyer> KirkMcDonald: How did I miss Set?
19:58 < KirkMcDonald> Sun spots, I'm guessing.
20:00 < bortzmeyer> Anyway, perfect solution, thanks KirkMcDonald
20:01 -!- General1337 [~support@71-93-97-216.dhcp.mtpk.ca.charter.com] has joined
20:01 -!- Nexoro [~Nexoro@c-71-192-75-183.hsd1.ma.comcast.net] has quit [Quit:
20:09 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
20:11 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has quit [Read error:
Operation timed out]
20:12 -!- meanburrito920 [~john@] has joined #go-nuts
20:12 -!- meanburrito920 [~john@] has quit [Changing host]
20:12 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts
20:13 -!- GilJ [~gilles@] has quit [Remote host closed the
20:14 -!- plexdev [~plexdev@arthur.espians.com] has joined #go-nuts
20:17 -!- nanoo [~nano@95-89-197-214-dynip.superkabel.de] has joined #go-nuts
20:23 -!- Project_2501 [~Marvin@] has quit [Ping timeout: 260 seconds]
20:23 -!- kashia_ [~Kashia@port-92-200-31-156.dynamic.qsc.de] has joined #go-nuts
20:24 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has quit [Ping
timeout: 245 seconds]
20:26 -!- _TestamenT_ [~Miranda@staticline25109.toya.net.pl] has quit [Read error:
Connection reset by peer]
20:26 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts
20:32 -!- nettok [~netto@] has joined #go-nuts
20:39 -!- GilJ [~gilles@] has joined #go-nuts
20:41 -!- skelterjohn [~jasmuth@c-76-124-23-96.hsd1.nj.comcast.net] has joined
20:44 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
20:44 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:e016:f951:71b4:8e4c] has quit
[Quit: Leaving.]
20:47 -!- unhygienix [~unhygieni@host86-179-195-148.range86-179.btcentralplus.com]
has joined #go-nuts
20:48 -!- jalmeida [~jalmeida@c934233f.virtua.com.br] has quit [Quit: Fui embora]
21:04 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has quit [Quit:
21:05 -!- rlab [~Miranda@] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
21:08 -!- warthurton [~warthurto@pdpc/supporter/active/warthurton] has joined
21:11 -!- peterdn [~peterdn@host86-131-166-8.range86-131.btcentralplus.com] has
joined #go-nuts
21:12 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Quit: Leaving]
21:15 -!- smw_ [~stephen@pool-96-232-88-231.nycmny.fios.verizon.net] has quit
[Ping timeout: 245 seconds]
21:16 -!- warthurton [~warthurto@pdpc/supporter/active/warthurton] has quit [Quit:
21:17 -!- nanooo [~nano@95-89-197-214-dynip.superkabel.de] has joined #go-nuts
21:20 -!- skj [~jasmuth@c-76-124-23-96.hsd1.nj.comcast.net] has joined #go-nuts
21:21 -!- nanoo [~nano@95-89-197-214-dynip.superkabel.de] has quit [Ping timeout:
264 seconds]
21:22 -!- diabolix [~jsoyke@] has joined #go-nuts
21:23 -!- Xera^ [~brit@87-194-208-246.bethere.co.uk] has quit [Quit: (
www.nnscript.com :: NoNameScript 4.21 :: www.esnation.com )]
21:25 -!- Surma [~surma@95-88-90-137-dynip.superkabel.de] has joined #go-nuts
21:31 -!- gnuvince_ [~vince@220.215-ppp.3menatwork.com] has quit [Ping timeout:
246 seconds]
21:31 -!- akrill [~akrill@ip65-47-28-158.z28-47-65.customer.algx.net] has joined
21:31 < plexdev> http://is.gd/b7del by [Russ Cox] in go/src/pkg/syscall/ --
syscall: add IPV6 constants
21:32 -!- smw_ [~stephen@pool-96-232-88-231.nycmny.fios.verizon.net] has joined
21:36 -!- rhelmer [~rhelmer@adsl-71-139-219-78.dsl.snfc21.pacbell.net] has joined
21:37 -!- rhelmer_ [~rhelmer@adsl-71-139-219-78.dsl.snfc21.pacbell.net] has joined
21:37 -!- rhelmer [~rhelmer@adsl-71-139-219-78.dsl.snfc21.pacbell.net] has quit
[Read error: Connection reset by peer]
21:38 -!- nettok_ [~netto@] has joined #go-nuts
21:40 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has quit [Ping
timeout: 252 seconds]
21:41 -!- gnuvince_ [~vince@] has joined #go-nuts
21:41 -!- akrill [~akrill@ip65-47-28-158.z28-47-65.customer.algx.net] has quit
[Quit: akrill]
21:41 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
21:41 -!- nettok [~netto@] has quit [Ping timeout: 276 seconds]
21:42 -!- diabolix [~jsoyke@] has quit [Quit: Leaving]
21:43 -!- akrill [~akrill@ip65-47-28-158.z28-47-65.customer.algx.net] has joined
21:43 -!- nettok__ [~netto@] has joined #go-nuts
21:43 -!- nanooo [~nano@95-89-197-214-dynip.superkabel.de] has quit [Quit:
21:43 -!- hevalbaranov [~hevalbara@] has joined #go-nuts
21:47 -!- nettok_ [~netto@] has quit [Ping timeout: 240 seconds]
21:57 -!- marsu [~marsu@] has joined #go-nuts
22:01 -!- nettok__ [~netto@] has quit [Ping timeout: 246 seconds]
22:02 < plexdev> http://is.gd/b7fgF by [Russ Cox] in go/src/pkg/time/ --
time: do not segment time strings by character class.
22:05 -!- GilJ [~gilles@] has quit [Remote host closed the
22:09 -!- mbarkhau [~koloss@dslb-084-059-161-165.pools.arcor-ip.net] has quit
[Quit: Leaving.]
22:11 -!- meanburrito920 [~john@] has joined #go-nuts
22:11 -!- meanburrito920 [~john@] has quit [Changing host]
22:11 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts
22:11 -!- nywles [~selwyn@s5593f55c.adsl.wanadoo.nl] has quit [Quit: nywles]
22:15 -!- ikaros [~ikaros@g227081254.adsl.alicedsl.de] has quit [Quit: Leave the
magic to Houdini]
22:26 -!- TMKCodes [~toni@bbwirelessgw2-fee1dc00-62.dhcp.inet.fi] has quit [Ping
timeout: 252 seconds]
22:30 -!- unhygienix [~unhygieni@host86-179-195-148.range86-179.btcentralplus.com]
has left #go-nuts []
22:31 -!- scm [justme@d019091.adsl.hansenet.de] has quit [Ping timeout: 260
22:31 -!- bmm [~bram@195-240-186-6.ip.telfort.nl] has quit [Ping timeout: 248
22:32 -!- scm [justme@c155066.adsl.hansenet.de] has joined #go-nuts
22:32 -!- gnuvince1 [~vince@] has joined #go-nuts
22:35 -!- gnuvince_ [~vince@] has quit [Ping timeout: 260 seconds]
22:38 -!- TMKCodes [~toni@bbwirelessgw2-fee1dc00-62.dhcp.inet.fi] has joined
22:42 -!- ericvh [~ericvh@] has quit [Quit: ericvh]
22:43 -!- HollyRain [~quassel@] has quit [Quit:
http://quassel-irc.org - Chat comfortably.  Anywhere.]
22:47 -!- tvw [~tv@e182079064.adsl.alicedsl.de] has joined #go-nuts
22:53 -!- tvw [~tv@e182079064.adsl.alicedsl.de] has quit [Remote host closed the
22:55 -!- hevalbaranov [~hevalbara@] has quit [Quit: WeeChat]
22:56 -!- unhygienix [~unhygieni@host86-179-195-148.range86-179.btcentralplus.com]
has joined #go-nuts
22:56 -!- unhygienix [~unhygieni@host86-179-195-148.range86-179.btcentralplus.com]
has left #go-nuts []
22:57 -!- terrex [~terrex@] has quit [Quit:
22:57 -!- lux` [lucs@] has joined #go-nuts
22:58 -!- jophish [~jophish@hermi.gotadsl.co.uk] has quit [Remote host closed the
22:59 -!- peterdn [~peterdn@host86-131-166-8.range86-131.btcentralplus.com] has
quit [Ping timeout: 265 seconds]
23:04 -!- wuehlmaus [~wuehlmaus@p4FCC63CF.dip.t-dialin.net] has quit [Ping
timeout: 240 seconds]
23:04 -!- wuehlmaus [~wuehlmaus@p4FCC5E27.dip.t-dialin.net] has joined #go-nuts
23:08 -!- homiziado [~ernestofr@] has joined #go-nuts
23:12 -!- adu [~ajr@pool-74-96-89-29.washdc.fios.verizon.net] has joined #go-nuts
23:15 < yebyen> hello everybody
23:15 -!- johnnyk [~johnnyk@zecebeme1.rit.edu] has joined #go-nuts
23:15 < yebyen> can you tell me how to join two arrays?  i'm looking for
package to import "arrays" but no such package exists
23:16 < yebyen> and i can't find a lot of documentation on arrays
23:16 < yebyen> at least nothing tells you how to do that
23:16 < smw_> yebyen: there is no way to join them.  You need to copy from
one to the other
23:16 < smw_> the copy() function is good for that :-)
23:17 < yebyen> so, it's really that much code :x
23:17 < yebyen> allocate an array big enough for the two with make
23:17 < yebyen> then copy into slices on that array
23:17 < KirkMcDonald> c := make([]int, len(a) + len(b)); copy(c, a);
copy(c[len(a):], b)
23:17 < yebyen> alright, cool
23:17 < yebyen> thanks
23:18 -!- digi9 [none@csplan9.rit.edu] has joined #go-nuts
23:18 < digi9> ok, so godoc is really starting to drive me mad
23:18 < smw_> yebyen: be sure to add a comment to that.  It would be
annoying to try to figure it out when glancing through your code.
23:18 < KirkMcDonald> That's normal.
23:19 < digi9> I'd just ignore the damn thing, except I have to use it for
my course assignment.  Anyway, I've got go installed in ~/go, and I'm working on
some stuff in ~/go-hw/dagmake
23:19 < digi9> I want to view documentation for what I'm working on via the
HTTP interface, but I'll be damned if I can figure out the proper command line +
URL combination
23:19 < smw_> digi9: you have go for homework?!  I envy you
23:19 < yebyen> smw_: i just pasted from this conversation into my code in a
23:20 < digi9> smw_: Axel Schreiner at RIT is offering a course in Go, yes
23:20 < yebyen> smw_: i'm doing homework
23:20 < smw_> digi9: cool, my friend is going to RIT
23:20 -!- tav [~tav@] has quit [Quit: tav]
23:21 < yebyen> digi9: adam?
23:22 < yebyen> <-kingdon
23:22 < digi9> haha, are you in the class too?
23:23 < KirkMcDonald> Judging by the scrollback, there's at least one other
rit.edu guy in here, too.
23:24 < digi9> well, there's something like 25 of us in the class, so I
guess it's not too surprising
23:25 < smw_> I got to tell my friend about this.  He is going to RIT next
23:26 -!- homiziado [~ernestofr@] has quit [Quit:
23:27 < digi9> so anyway yebyen, how are you doing the documentation?
23:28 < digi9> Mostly I've gotten by through having the Makefile just run
something like "godoc -path=..  ./expr"
23:36 -!- micrypt [~micrypt@41-184-21-79.rv.ipnxtelecoms.com] has joined #go-nuts
23:37 -!- XniX23 [vegy@89-212-10-29.dynamic.dsl.t-2.net] has quit [Read error:
Connection reset by peer]
23:37 -!- XniX23_ [vegy@89-212-10-29.dynamic.dsl.t-2.net] has joined #go-nuts
23:38 -!- boogles_ [~highb@shell.onid.oregonstate.edu] has quit [Read error:
Connection reset by peer]
23:39 -!- boogles [~highb@shell.onid.oregonstate.edu] has joined #go-nuts
23:39 < yebyen> digi9: we haven't even touched godoc
23:39 < yebyen> probably ought to
23:43 -!- vdrab [~vdrab@cap002-055.kcn.ne.jp] has quit [Quit: vdrab]
23:43 -!- rv2733 [~rv2733@c-98-242-168-49.hsd1.fl.comcast.net] has quit [Quit:
23:43 -!- vdrab [~vdrab@cap002-055.kcn.ne.jp] has joined #go-nuts
23:45 -!- akrill [~akrill@ip65-47-28-158.z28-47-65.customer.algx.net] has quit
[Quit: akrill]
23:54 -!- megaboz [~megaboz@unaffiliated/megaboz] has joined #go-nuts
23:59 -!- smw_ [~stephen@pool-96-232-88-231.nycmny.fios.verizon.net] has quit
[Ping timeout: 245 seconds]
--- Log closed Wed Mar 31 00:00:42 2010