--- Log opened Thu Dec 03 00:00:30 2009
00:03 -!- hipe [n=hipe@pool-96-224-8-82.nycmny.east.verizon.net] has quit [Remote
closed the connection]
00:04 -!- gasreaa [n=atwong@nat/slide/x-exbzvuhyubcvgoeo] has left #go-nuts []
00:05 -!- XniX23 [i=vegy@89-212-233-217.dynamic.dsl.t-2.net] has quit [Connection
timed out]
00:05 -!- NoOneButMe [i=znc@unaffiliated/noonebutme] has left #go-nuts []
00:07 -!- rakd [n=rakd@219.117.252.7.static.zoot.jp] has quit ["See you..."]
00:07 -!- ag90 [n=Adium@bas3-unionville55-1279752520.dsl.bell.ca] has joined
#go-nuts
00:13 -!- gkmngrgn [n=gkmngrgn@unaffiliated/gkmngrgn] has quit [Remote closed the
connection]
00:13 -!- xuser [n=xuser@unaffiliated/xuser] has left #go-nuts []
00:18 -!- hipe [n=hipe@pool-96-224-8-82.nycmny.east.verizon.net] has joined
#go-nuts
00:18 -!- GeoBSD [n=geocalc@lns-bzn-35-82-250-255-148.adsl.proxad.net] has quit
[Read error: 113 (No route to host)]
00:19 -!- osmosis [n=steven@m390e36d0.tmodns.net] has quit ["Ex-Chat"]
00:19 -!- osmosis [n=steven@m790e36d0.tmodns.net] has joined #go-nuts
00:20 -!- rhelmer [n=rhelmer@adsl-71-139-219-78.dsl.snfc21.pacbell.net] has quit
[]
00:24 < fgb> the noise dude just posted a treaty
00:24 < fgb> I'll check volume 1
00:25 -!- gisikw [n=gisikw@137.28.246.58] has joined #go-nuts
00:26 -!- The_Doctor [n=The_Doct@dhcp-168-105-225-31.wireless.manoa.hawaii.edu]
has joined #go-nuts
00:27 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has joined
#go-nuts
00:28 -!- The_Doctor [n=The_Doct@dhcp-168-105-225-31.wireless.manoa.hawaii.edu]
has quit [Remote closed the connection]
00:28 -!- brunov [n=bruno@190.191.110.64] has quit [Read error: 110 (Connection
timed out)]
00:31 -!- goplexian [n=goplexia@d154-20-0-9.bchsia.telus.net] has quit ["go to
sleep!"]
00:32 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has quit []
00:34 -!- The_Doctor [n=The_Doct@dhcp-168-105-225-31.wireless.manoa.hawaii.edu]
has joined #go-nuts
00:34 < fgb> I didn't get what problem is the notnull thing trying to
solve....
00:37 -!- The_Doctor [n=The_Doct@dhcp-168-105-225-31.wireless.manoa.hawaii.edu]
has quit [Client Quit]
00:43 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
["Leaving."]
00:43 < amuck_> fgb: The problem is unexpected nulls
00:44 < fgb> what about the ones you expect
00:44 < amuck_> You should use a nullable type for when you expect nulls
00:45 < amuck_> Having non-nullable types lets the compiler enforce more
00:45 -!- iant [n=iant@nat/google/x-dgotndvddotbuayw] has quit [Read error: 110
(Connection timed out)]
00:46 < fgb> sorry, but it looks like a solution looking for a problem
00:46 -!- brunov [n=bruno@190.191.110.64] has joined #go-nuts
00:47 < dho> fgb: what happens if you call make() or new() and get nil back?
00:47 < fgb> you deal with it
00:47 < dho> no, your shit crashes.
00:48 < fgb> if there's no memory, there's no memory
00:48 < dho> There are more elegant ways to handle that
00:48 -!- brrant [n=John@168-103-78-133.hlrn.qwest.net] has quit ["Leaving"]
00:50 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has
quit [Remote closed the connection]
00:50 < dho> there may be more memory later, so you could just sit around
until there is.  or, you could do some cleanup to save some state and exit.
crashing and saying `oh well' isn't good enough for everyone
00:50 < nf_> dho: this is a pretty age-old problem.  generally the solution
is "don't run out of memory"
00:50 < dho> right
00:51 -!- iant [n=iant@67.218.109.83] has joined #go-nuts
00:51 -!- mode/#go-nuts [+v iant] by ChanServ
00:51 < KirkMcDonald> But you need to be able to run your "save state and
exit" code within the (apparently) limited amount of memory which is available.
00:52 < dho> KirkMcDonald: you can always reserve memory to do that when the
process begins
00:53 -!- decriptor [n=decripto@137.65.132.17] has quit [Read error: 110
(Connection timed out)]
00:55 < nf_> dho: in that case, you're implementing something at a way
higher level than malloc()
00:55 < dho> nf_: how so?
00:55 < nf_> dho: you'd want to first test if there's enough memory to
create your object - not try to create it and handle the nil
00:55 < dho> nf_: if there's not enough memory to create your stuff at
startup, you can't start.
00:55 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
00:56 < nf_> well in that case you'll crash and burn anyway, rightg?
00:56 < dho> nf_: yes, but at least you will be in a nascent state where
you're not potentially losing information
00:56 < nf_> yes
00:56 < nf_> what i'm saying is that you don't ever want the OS to be saying
"no, you can't do that." you want to avoid doing things you can't do in the first
place.
00:57 -!- lolsuper_ [n=super_@unaffiliated/lolsuper-/x-9881387] has quit [Read
error: 104 (Connection reset by peer)]
00:57 < dho> nf_: that's not your decision
00:57 < dho> you're never the only process running in practice
00:57 < nf_> exactly
00:58 < nf_> so if your program has the tendency to grow in size
unpredictably, you need to attend to that within your program
00:58 < dho> not really
00:58 < nf_> well what's the solution then?
00:58 < dho> if someone else's program tends to grow in size unpredictably,
it affects you
00:58 < dho> that's my point
00:58 < nf_> as a sysadmin, i like to configure my apps to observe certain
limits.  most server daemons and such allow me to do this
00:58 < dho> if you don't know the memory consumption of your own code,
you're doing it wrong anyway
00:59 < dho> and your code isn't of the caliber that needs that kind of
stuff
00:59 < dho> (generally, I'm sure there are exceptions)
00:59 < nf_> i suppose my position is that you don't necessarily need to
guard against the system becoming memory exhausted at an application level
00:59 < nf_> that should be attended by the sysadmin
00:59 < dho> i agree, not all applications do
01:00 < nf_> set ulimits, prevent processes from interfering with each other
01:00 < dho> but if you're working in financials and all of a sudden the
database takes all your memory, you don't want to drop a 10 billion dollar
transaction
01:00 < nf_> if something wants to spiral out of control, let it die a
horrible death.  but you shouldn't let it deprive your other apps of memory
01:00 < plexdev> http://is.gd/5aBoo by [Robert Griesemer] in 3 subdirs of
go/src/ -- Add flag -tabindent to gofmt: forces use of
01:00 -!- fenicks [n=christia@log77-4-82-246-228-78.fbx.proxad.net] has joined
#go-nuts
01:00 < dho> i don't disagree with you purely
01:01 < dho> anyway i gotta go home
01:01 < dho> bbl
01:01 < fenicks> hi guys
01:09 -!- ag90 [n=Adium@bas3-unionville55-1279752520.dsl.bell.ca] has left
#go-nuts []
01:12 < Kom> Does anyone know if there a specific document somewhere that
contains proof of Go's compile and run speed compared to C and such that I could
use as a citation in a research paper?
01:14 -!- mbarkhau1 [n=koloss@p54A7F00B.dip.t-dialin.net] has joined #go-nuts
01:14 -!- mbarkhau1 [n=koloss@p54A7F00B.dip.t-dialin.net] has quit [Read error:
104 (Connection reset by peer)]
01:16 -!- brrant [n=John@168-103-78-133.hlrn.qwest.net] has joined #go-nuts
01:16 < KirkMcDonald> Kom: I doubt that such a document exists.
01:17 < Kom> I've been looking around, having something like that would
help.
01:17 < Kom> Though, yeah...  I have my doubts too
01:18 <+iant> Kom: there is no proof at this time, only benchmarks and
reasoned estimates of what Go will look like in the future
01:18 < Kom> Ah, thanks.
01:19 -!- fgb [n=fgb@190.246.85.45] has left #go-nuts []
01:19 -!- AndrewBC_ [n=Andrew@97.93.242.12] has joined #go-nuts
01:22 -!- osmosis [n=steven@m790e36d0.tmodns.net] has quit ["Ex-Chat"]
01:27 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has quit []
01:31 < plexdev> http://is.gd/5aCy4 by [Russ Cox] in 4 subdirs of
go/src/cmd/ -- 6g etc: groundwork for eliminating redundant bounds checks.
01:32 -!- mbarkhau [n=koloss@p54A7F92E.dip.t-dialin.net] has quit [Connection
timed out]
01:37 -!- AndrewBC [n=Andrew@97.93.242.12] has quit [Read error: 110 (Connection
timed out)]
01:39 -!- Associat0r [n=Associat@h163153.upc-h.chello.nl] has quit []
01:47 -!- hipe [n=hipe@pool-96-224-8-82.nycmny.east.verizon.net] has quit [Remote
closed the connection]
01:51 -!- kiva [n=quassel@eth6568.nsw.adsl.internode.on.net] has joined #go-nuts
01:52 -!- amuck_ [n=amuck_@rrcs-76-79-44-2.west.biz.rr.com] has quit []
01:54 -!- aaront [n=aaront@unaffiliated/aaront] has quit ["And that's all he
wrote..."]
01:54 -!- kota1111 [n=kota1111@gw2.kbmj.jp] has joined #go-nuts
01:54 -!- aaront [n=aaront@d24-141-25-171.home.cgocable.net] has joined #go-nuts
01:54 -!- nutate [n=rseymour@cacsag4.usc.edu] has quit ["I'm outta heee-eere"]
01:55 -!- aaront [n=aaront@unaffiliated/aaront] has quit [Client Quit]
01:55 -!- aaront [n=aaront@d24-141-25-171.home.cgocable.net] has joined #go-nuts
01:58 -!- triplez [n=triplez@bb116-14-65-38.singnet.com.sg] has joined #go-nuts
02:05 -!- hstimer [n=hans@70.90.170.37] has quit [Read error: 60 (Operation timed
out)]
02:06 -!- jsgotangco [n=JSG@ubuntu/member/jsgotangco] has joined #go-nuts
02:09 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
["Leaving."]
02:17 -!- StDan [n=danielb@124-197-59-227.callplus.net.nz] has joined #go-nuts
02:19 -!- hstimer [n=hans@c-98-234-25-125.hsd1.ca.comcast.net] has joined #go-nuts
02:19 -!- aaront [n=aaront@unaffiliated/aaront] has quit ["And that's all he
wrote..."]
02:20 -!- NoOneButMe [i=znc@unaffiliated/noonebutme] has joined #go-nuts
02:20 -!- kiva [n=quassel@eth6568.nsw.adsl.internode.on.net] has quit [Read error:
110 (Connection timed out)]
02:21 -!- Tuller [n=Tuller@pool-72-84-246-12.rcmdva.fios.verizon.net] has joined
#go-nuts
02:22 -!- brunov [n=bruno@190.191.110.64] has quit [Read error: 60 (Operation
timed out)]
02:23 -!- iant [n=iant@67.218.109.83] has quit [Read error: 110 (Connection timed
out)]
02:31 -!- Kom [n=kommentg@ip70-178-193-114.ks.ks.cox.net] has left #go-nuts []
02:34 < plexdev> http://is.gd/5aELj by [Russ Cox] in go/src/cmd/8g/ -- 8g:
discard tempalloc/tempfree experiment
02:42 -!- tor7 [n=tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has quit
[]
02:44 -!- jsgotangco [n=JSG@ubuntu/member/jsgotangco] has quit ["Ciao"]
02:47 -!- lolsuper_ [n=super_@unaffiliated/lolsuper-/x-9881387] has joined
#go-nuts
02:49 -!- hipe [n=hipe@pool-74-101-72-105.nycmny.east.verizon.net] has joined
#go-nuts
02:49 -!- senneth_ [i=senneth@irssi/staff/senneth] has joined #go-nuts
02:49 -!- senneth [i=senneth@equinox.oberkommando.org] has quit [Read error: 104
(Connection reset by peer)]
02:54 -!- chid [n=mgzxnqvs@c122-106-95-175.rivrw1.nsw.optusnet.com.au] has joined
#go-nuts
02:54 -!- trickie [n=trickie@86.93.227.181] has joined #go-nuts
03:05 -!- ni| [n=james@c-24-34-220-147.hsd1.ma.comcast.net] has joined #go-nuts
03:08 -!- malkomalko_ [n=malkomal@66-234-41-82.nyc.cable.nyct.net] has quit []
03:13 -!- beardeddog2 [n=beardedd@24.20.122.211] has quit ["Leaving"]
03:19 -!- Tuller [n=Tuller@pool-72-84-246-12.rcmdva.fios.verizon.net] has quit
["to the batcave?"]
03:20 -!- felipe [n=felipe@my.nada.kth.se] has quit [Client Quit]
03:22 -!- decriptor [n=decripto@174-27-134-202.slkc.qwest.net] has joined #go-nuts
03:24 -!- jA_cOp [n=yakobu@unaffiliated/ja-cop/x-9478493] has quit [Read error: 54
(Connection reset by peer)]
03:24 -!- jA_cOp_ [n=yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts
03:25 -!- lambo4jos [n=chatzill@c-76-126-250-10.hsd1.ca.comcast.net] has joined
#go-nuts
03:26 -!- hipe [n=hipe@pool-74-101-72-105.nycmny.east.verizon.net] has left
#go-nuts ["Leaving..."]
03:29 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has quit []
03:31 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has joined
#go-nuts
03:38 < plexdev> http://is.gd/5aH2X by [Robert Griesemer] in
go/src/cmd/gofmt/ -- updated documentation for gofmt
03:41 -!- decriptor [n=decripto@174-27-134-202.slkc.qwest.net] has quit [Read
error: 110 (Connection timed out)]
03:42 -!- decriptor [n=decripto@174-27-134-202.slkc.qwest.net] has joined #go-nuts
03:50 -!- tav_ [n=tav@78.149.148.224] has joined #go-nuts
03:50 -!- Amaranth [n=travis@ubuntu/member/Amaranth] has joined #go-nuts
03:53 -!- Gracenotes [n=person@wikipedia/Gracenotes] has joined #go-nuts
03:53 -!- xjih78_ [i=z0r0@87-126-67-31.btc-net.bg] has joined #go-nuts
03:55 -!- iant [n=iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined
#go-nuts
03:55 -!- mode/#go-nuts [+v iant] by ChanServ
03:55 -!- RolaBlade [n=winston@hoasb-ff08dd00-36.dhcp.inet.fi] has joined #go-nuts
04:03 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has quit []
04:04 -!- iwikiwi [n=iwikiwi@59.177.107.90] has joined #go-nuts
04:05 < hstimer> should I be able to take the address of a function?
04:07 -!- tav [n=tav@78.149.148.224] has quit [Read error: 110 (Connection timed
out)]
04:07 <+iant> hstimer: you don't really need to, you can just refer to the
function without taking its address
04:07 -!- RolaBlade [n=winston@hoasb-ff08dd00-36.dhcp.inet.fi] has quit
["leaving"]
04:08 < hstimer> what if I'm optionally passing a function?  can I pass nil
in it's place event though it is not an address?
04:09 <+iant> yes
04:09 < hstimer> oh
04:09 < hstimer> odd
04:09 < hstimer> magic
04:09 <+iant> not all that magic, nil is the empty value for several types,
including function types
04:09 <+iant> think of the Go function type as equivalent to a C/C++
function pointer
04:11 -!- xjih78 [i=z0r0@87-126-211-86.btc-net.bg] has quit [Read error: 110
(Connection timed out)]
04:13 < hstimer> iant: I spent too much time writing assembly -- I'm often
too literal
04:14 < hstimer> iant: so I can dereference a function variable to call it
(*foo)(blah)
04:14 <+iant> hstimer: if foo has type func(int) or whatever, just write
foo(blah)
04:15 < hstimer> iant: I'm pointing out that the compiler is a little
deceptive -- it allows (*foo)(blah), but not $foo
04:15 < hstimer> &foo
04:15 <+iant> (*foo)(blah) should only work with a *func
04:16 < hstimer> right, but how do you ever get the &func to begin with
04:16 <+iant> &foo, where foo is a function, is meaningless in Go
04:16 <+iant> if you refer to foo, you get a func
04:16 < hstimer> yes, i understand
04:16 <+iant> you can take the address of a variable of type func to get a
*func
04:17 < hstimer> but the compiler should probably not allow *foo either
04:17 < hstimer> oh...
04:17 <+iant> I hope it doesn't if foo is an actual function, rather than a
variable of type *func
04:17 < hstimer> right
04:17 < hstimer> got it
04:18 < hstimer> so this is ok: f := func; &f
04:18 <+iant> yes
04:19 < hstimer> iant: on a different subject, why do foreign calls require
a thread context switch?  seems a little drastic
04:20 <+iant> hstimer: I don't think they require a thread context switch,
but they do require a large contiguous stack
04:20 <+iant> is there a thread context switch in there?
04:20 < hstimer> something I thought I read in the mailing list
04:21 -!- codedread [i=180dd699@gateway/web/freenode/x-rzzjyxwjzuqrajel] has
joined #go-nuts
04:21 <+iant> I think rsc said that there used to be a thread context switch
but there isn't one now
04:21 < hstimer> glad to hear that
04:22 < hstimer> how long do you think before go reaches the only 10% slower
than c goal?
04:22 <+iant> hstimer: mainly we need to get the garbage collector right and
then see where we are
04:23 < hstimer> I'm assuming people will learn not to do s += s2
04:23 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has joined #go-nuts
04:23 < hstimer> in loops
04:23 -!- iwikiwi [n=iwikiwi@59.177.107.90] has quit [Read error: 110 (Connection
timed out)]
04:23 < hstimer> just like with c++; good performance when someone
understands the implications of what they write
04:24 < hstimer> iant: so should we expect the new gc this year or next?
04:24 <+iant> at this point I would guess next year but I don't really know
04:26 < hstimer> iant: I appreciate that y'all aren't automatically just
throwing in every feature language request.  Let us use it for a while so we
really understand what it needs.
04:28 < hstimer> iant: I used C++ since cfront 1.0 and I can't stand using
it anymore.  It is too unwieldily.  The syntax is a nightmare, and the libraries
are difficult to master.  I find myself using c more than c++ just so I can avoid
all the baggage
04:29 <+iant> yeah
04:29 < hstimer> iant: and if performance is a consideration the STL is
pretty much useless because there isn't a compiler that can go a good job, despite
the theoretical possiblity
04:31 -!- scandal [n=nobody@unaffiliated/scandal] has quit ["leaving"]
04:36 -!- skyyy [i=caw@res55551479.rh.rit.edu] has quit [Client Quit]
04:36 -!- felipe [n=felipe@my.nada.kth.se] has joined #go-nuts
04:40 -!- atsampson [n=ats@94-193-50-45.zone7.bethere.co.uk] has quit [Read error:
110 (Connection timed out)]
04:42 -!- uxp [n=uxp@uxp.dsl.xmission.com] has quit [Remote closed the connection]
04:43 -!- nigwil [n=chatzill@berkner.ccamlr.org] has quit ["ChatZilla 0.9.85
[Firefox 3.5.5/20091102152451]"]
04:43 -!- uxp [n=uxp@uxp.dsl.xmission.com] has joined #go-nuts
04:43 -!- decriptor [n=decripto@174-27-134-202.slkc.qwest.net] has quit [Read
error: 110 (Connection timed out)]
04:44 -!- jpowermacg5 [n=jpowerma@c-71-204-41-29.hsd1.ga.comcast.net] has quit
[Read error: 104 (Connection reset by peer)]
04:44 < hstimer> iant: Is there a way to get reflection info at compile
time?
04:45 <+iant> hstimer: I'm not sure what that would mean
04:45 < hstimer> mainly for diagnostics
04:45 < hstimer> names of variable, line #, function name, etc...  stuff you
might want in a trace
04:45 <+iant> fmt.Printf("%T", v) will print the type of v
04:46 <+iant> name of variable is not available
04:46 <+iant> there is a backtrace function somewhere
04:46 < hstimer> foo(a int) { ptrace("%A"); // prints args }
04:46 < hstimer> a: 2
04:47 <+iant> I don't think there is anything like that at present
04:47 < hstimer> i'll look for the backtrace
04:47 < hstimer> thx
04:49 -!- malkomalko [n=malkomal@66-234-41-82.nyc.cable.nyct.net] has joined
#go-nuts
04:52 -!- Kibiz0r [n=Adium@99-48-204-31.lightspeed.brhmmi.sbcglobal.net] has
joined #go-nuts
04:53 -!- codedread [i=180dd699@gateway/web/freenode/x-rzzjyxwjzuqrajel] has quit
["Page closed"]
04:53 -!- tar_ [n=tom@c-67-180-208-162.hsd1.ca.comcast.net] has joined #go-nuts
04:55 < plexdev> http://is.gd/5aJvH by [Peter Froehlich] in 2 subdirs of
go/src/pkg/ -- Runes: turn string into []int
04:57 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts
04:57 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit [Client Quit]
04:58 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts
04:59 -!- Amaranth [n=travis@ubuntu/member/Amaranth] has quit ["Ex-Chat"]
04:59 -!- Kibiz0r [n=Adium@99-48-204-31.lightspeed.brhmmi.sbcglobal.net] has quit
["Leaving."]
05:01 -!- halfdan [n=halfdan@p57A976BB.dip.t-dialin.net] has joined #go-nuts
05:04 -!- Amaranth [n=travis@ubuntu/member/Amaranth] has joined #go-nuts
05:05 < tar_> someone already reported my bug.  :(
05:10 < Gracenotes> you can do one better than them and fix it!  :o
05:10 < anticw> tar_: which bug is that?
05:12 -!- p0g0_ [n=pogo@unaffiliated/p0g0] has quit [Read error: 110 (Connection
timed out)]
05:15 < nf_> it's a meta-bug: there already exists a bug that he wants to
report.
05:15 -!- jA_cOp_ [n=yakobu@unaffiliated/ja-cop/x-9478493] has quit ["Leaving"]
05:15 -!- halfdan_ [n=halfdan@p57A9697A.dip.t-dialin.net] has quit [Read error:
110 (Connection timed out)]
05:18 < tar_> select { case _ = <-ch: ...  }
05:18 < tar_> and nf_'s
05:18 -!- tav_ [n=tav@92.24.53.220] has joined #go-nuts
05:20 -!- KillerX [n=anant@122.181.150.106] has joined #go-nuts
05:20 -!- abford [n=abford@c-71-205-224-173.hsd1.mi.comcast.net] has left #go-nuts
["Leaving"]
05:31 -!- Vova [n=Vova@80.178.10.36.adsl.012.net.il] has joined #go-nuts
05:31 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
05:33 -!- droid0011 [n=g1@p4FDCA2D9.dip.t-dialin.net] has joined #go-nuts
05:33 -!- tav [n=tav@78.149.148.224] has quit [Read error: 110 (Connection timed
out)]
05:33 -!- diltsman_ [n=diltsman@64.122.18.77] has joined #go-nuts
05:34 < diltsman_> Why would Go give me an "illegal rune in string" error on
a line that only contains /*
05:34 <+iant> diltsman_: I would look on the preceding line
05:35 < diltsman_> The only things before it are a line that says "package
Elements" and a blank line.
05:36 < anticw> iant: do you know much about the unsafe' package?
05:36 <+iant> diltsman_: no idea, that error should only happen in a string,
I think; the error should also show the characters involved
05:36 < anticw> specifically Unreflect
05:36 <+iant> anticw: yes, I know something about it
05:37 -!- kaib [n=kaib@c-76-102-52-156.hsd1.ca.comcast.net] has joined #go-nuts
05:37 -!- mode/#go-nuts [+v kaib] by ChanServ
05:37 < anticw> iant: using unreflect i can turn a byte slice into an int
slice, but len/cap are wrong
05:37 < diltsman_> iant: It says " a5 20" followed by "Element.go:3: illegal
rune in string" on the next line.
05:37 < anticw> iant: and it looks like it does a copy all the same
05:37 <+iant> diltsman_: is there a 0xa5 character in your file?
05:38 < anticw> iant: i was wondering if it might make sense to change
Unreflect to allow giving the size ...  so basically you can create an slice or
whatever of anysize from any valid pointer
05:39 <+iant> anticw: I think the easiest approach is something like
([10000]int)(&a[0])[0:len]
05:39 -!- decriptor [n=decripto@53.250.sfcn.org] has joined #go-nuts
05:39 <+iant> make that (*[10000]int)
05:39 < anticw> iant: hmm, let me try that
05:40 <+iant> you'll have to mix in an unsafe.Pointer too, I suppose
05:41 < diltsman_> iant: There is a 0xa5 in the comment, but it is several
lines in to the comment.
05:43 < diltsman_> iant: Shouldn't comments allow any character (with the
exception of the */ that ends them)?
05:43 <+iant> diltsman_: ah, thanks; the same function is used to pick up
characters in a comment, so the error message is downright misleading
05:43 <+iant> diltsman_: please feel free to file an issue on this
05:43 <+iant> diltsman_: also, when reading a comment the line number is not
updated until the end of the comment, so the error message gives the wrong line
05:44 <+iant> diltsman_: no, comments don't allow any character; Go source
code is always supposed to be UTF-8, even in comments
05:44 < anticw> iant: a better refinement would be to create a slice from a
ptr returned by mmap to allow demand paging and avoid the read-in
05:44 < anticw> iant: however, that seems like it might confuse things
horribly
05:44 < diltsman_> iant: If it is UTF-8, why wouldn't that character be
allowed?
05:44 -!- Loafers [n=loafers@unaffiliated/loafers] has joined #go-nuts
05:44 <+iant> diltsman_: 0xa5 by itself is not a valid UTF-8 character
05:45 <+iant> http://en.wikipedia.org/wiki/UTF-8
05:46 -!- droid001 [n=g1@p4FDCAFB5.dip.t-dialin.net] has quit [Connection timed
out]
05:48 < anticw> heh, speaking of utf-8 i found i have trouble with cut &
paste for code points > 2^16
05:48 < diltsman_> iant: Ok, Vim was throwing me off.  It was displaying
0xa5 as a Yen symbol, so I assumed that it was the correct code sequence.
05:49 <+iant> that's Latin-1
05:49 <+iant> not UTF-8
05:53 -!- aho [n=nya@f051139160.adsl.alicedsl.de] has quit
["EXEC_over.METHOD_SUBLIMATION"]
05:54 < asyncster> Quick question: should this code print 0 or 1:
05:54 < asyncster> http://pastie.org/725007
05:55 < asyncster> (it prints 0)
05:56 -!- triplez_ [n=triplez@bb116-14-29-110.singnet.com.sg] has joined #go-nuts
05:56 -!- triplez [n=triplez@bb116-14-65-38.singnet.com.sg] has quit [Read error:
104 (Connection reset by peer)]
05:57 < asyncster> i guess i'll file an issue
05:59 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has joined
#go-nuts
06:01 -!- exn [n=exn@195.49.206.202] has joined #go-nuts
06:03 -!- triplez_ [n=triplez@bb116-14-32-200.singnet.com.sg] has joined #go-nuts
06:06 -!- tar_ [n=tom@c-67-180-208-162.hsd1.ca.comcast.net] has quit []
06:08 < anticw> iant: is reflection expensive?  i've not looking in details
as to how much it cost in cycles but it seems to be it potentially could be
06:08 -!- triplez [n=triplez@bb116-14-29-110.singnet.com.sg] has quit [Read error:
60 (Operation timed out)]
06:10 -!- nareaisd [n=kklwl@187.35.245.167] has quit ["CyberScript - if you don't
try it, you can't tell me it sucks.  (www.cyberscript.org)"]
06:11 < plexdev> http://is.gd/5aMqB by [Rob Pike] in 25 subdirs of go/ --
move ReadFile, WriteFile, and ReadDir into a separate io/ioutil package.
06:20 -!- diltsman_ [n=diltsman@64.122.18.77] has quit [Read error: 113 (No route
to host)]
06:20 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has quit ["This
computer has gone to sleep"]
06:20 < Gracenotes> hm, entirely separate package?
06:20 < Gracenotes> then I suppose all that io does now is provide
interfaces and code that uses them directly.  no actual io :)
06:22 -!- triplez [n=triplez@bb116-14-32-200.singnet.com.sg] has quit [Read error:
104 (Connection reset by peer)]
06:23 -!- codedread [i=180dd699@gateway/web/freenode/x-gyurvcyciudlyrzs] has
joined #go-nuts
06:23 -!- diltsman [n=diltsman@64.122.18.77] has joined #go-nuts
06:24 <+iant> anticw: reflection is not particularly expensive
06:25 -!- melba [n=blee@unaffiliated/lazz0] has joined #go-nuts
06:26 < codedread> just pulled the latest down for go and tried to build it
after 1-2 weeks
06:26 -!- itrekkie [n=itrekkie@ip72-200-105-72.tc.ph.cox.net] has joined #go-nuts
06:27 < anticw> Gracenotes: io has the basic reader/writer/etc stuff
06:27 < codedread> i'm getting an error http://pastebin.com/m2b058a6e
06:27 < codedread> i'm on OSX 10.5
06:27 < anticw> fw issue i think
06:28 < codedread> anticw - sorry, are you talking to me?
06:29 < anticw> yes; there are reports the mcapple fw rules break certain
tests, i think it's been reported on the list and probably the issue tracker
06:29 -!- itrekkie [n=itrekkie@ip72-200-105-72.tc.ph.cox.net] has quit [Client
Quit]
06:30 < codedread> i'm afraid i don't know what 'fw' means so i can't search
the issue tracker
06:30 < anticw> firewall
06:31 < codedread> k, will create an issue
06:31 -!- triplez [n=triplez@bb116-14-25-184.singnet.com.sg] has joined #go-nuts
06:32 < anticw> actually, that looks like something else
06:32 < anticw> maybe the 0-len dgram stuff someone added recently
06:32 < anticw> maybe mcapple os doesn't like those
06:34 -!- alc [n=alc@222.128.159.61] has joined #go-nuts
06:34 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has quit [Read
error: 113 (No route to host)]
06:36 < diltsman> Is there some way to modify the Makefile on
http://golang.org/doc/contribute.html so that you don't have to have your package
root at $GOROOT/src/pkg/?
06:37 < anticw> codedread: ok, i think it is likely fall out from that
06:38 -!- brrant [n=John@168-103-78-133.hlrn.qwest.net] has quit ["Leaving"]
06:38 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has quit
["Leaving"]
06:41 -!- decriptor [n=decripto@53.250.sfcn.org] has quit [Read error: 113 (No
route to host)]
06:41 -!- tar_ [n=tom@c-67-180-208-162.hsd1.ca.comcast.net] has joined #go-nuts
06:43 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has quit []
06:44 < tar_> how would you protect a concurrent map?  using a channel like
a mutex, creating a goroutine with communication channels, or something else?
06:45 -!- Xavi [n=Xavi@71-85-10-175.dhcp.buft.sc.charter.com] has joined #go-nuts
06:45 -!- Xavi [n=Xavi@71-85-10-175.dhcp.buft.sc.charter.com] has quit [Remote
closed the connection]
06:45 < tar_> my map has information on a server's clients, for access by
handlers of those clients' connections
06:45 < Gracenotes> built-in maps should be concurrent safe
06:46 < tar_> I'm pretty sure I read they weren't.
06:46 < anticw> they're not
06:49 < anticw> at some level i like the idea they should be ...  but then
people might expect that of Vectors
06:49 < anticw> and similar, which again might be reasonable but it deserves
some thought
06:50 < Zeffrin> is it possible to check on whether theres data waiting on a
channel without blocking?
06:50 < tar_> It looks like "if data <- ch {}" does that
06:50 < Zeffrin> maybe if you used a channel like a lock, post data when
it's in use and clear it out/post some other value when it's free again?
06:50 < Zeffrin> oh ok sweet, I thought <- from ch blocked
06:50 -!- diltsman [n=diltsman@64.122.18.77] has quit [Read error: 104 (Connection
reset by peer)]
06:51 -!- diltsman__ [n=diltsman@64.122.18.77] has joined #go-nuts
06:51 < anticw> you can use a select as well
06:51 < tar_> Zeffrin: maybe it's a difference with buffered channels that I
don't appreciate yet.  :-X You'll have to double-check me.
06:51 < anticw> actaully, i guess that will block for something (or close)
06:52 < Zeffrin> From effective go it says reader always blocks and if the
channel is unbuffered the sender will block until the value has been received
06:53 < tar_> :\
06:53 < Zeffrin> but that could work ok with a buffered channel still, when
someone wants to get to the map chances are they're going to wait for access
anyway?
06:54 < Zeffrin> so maybe reverse, post some data when map is freed, though
then I guess ...  hrm
06:54 -!- tor7 [n=tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has
joined #go-nuts
06:54 < Zeffrin> i udnno sorry, have to wait for someone who knows what
they're talkin about heh
06:55 < anticw> ideally you shouldn't 'poll' channels
06:55 < anticw> that's wasteful, try to structure the flow and program
differently
06:55 < tar_> "b, ok := <-freeList" from Effective Go ...  maybe also
getting the second parameter makes it non-blocking
06:55 -!- lux` [n=lux@151.54.242.220] has joined #go-nuts
06:55 < anticw> Zeffrin: is this because you need to check on a channel OR
something else?
06:56 < Zeffrin> just thinking about tars problem, how would you protect a
concurrent map?  using a channel like a mutex, creating a goroutine with
communication channels, or something else?
06:56 < Zeffrin> and yah tar_ actually, I do remember reading that now
06:56 < anticw> net/fd.go does this
06:57 < tar_> Here's some code I wrote for the second approach:
http://pastie.org/725062 Made sense there because I'm just protecting some data
which happens to be a map.
06:57 -!- ShadowIce [n=pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
06:57 -!- Intelliware [n=danielb@124-197-59-227.callplus.net.nz] has joined
#go-nuts
06:58 < tar_> anticw: does what?
06:58 < tar_> oh, protects a map
07:00 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has quit []
07:00 < tar_> I hope it's okay to remove a key from a map while you're
iterating.
07:01 -!- asyncster [n=asyncste@206.169.213.106] has quit []
07:01 < anticw> i wouldn't bet on it :-)
07:01 < anticw> in python it's not robust, i had to fix someones code a
couple of weeks ago that did that
07:02 < tar_> mehh
07:02 -!- codedread [i=180dd699@gateway/web/freenode/x-gyurvcyciudlyrzs] has quit
[Ping timeout: 180 seconds]
07:03 -!- tor7 [n=tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has quit
[]
07:04 < tar_> well, a chance to use a vector
07:07 -!- nf_ [n=nf@203-214-149-37.perm.iinet.net.au] has quit [Read error: 101
(Network is unreachable)]
07:10 -!- yoasif [n=asif@175.sub-75-192-121.myvzw.com] has joined #go-nuts
07:10 -!- triplez [n=triplez@bb116-14-25-184.singnet.com.sg] has quit [Read error:
104 (Connection reset by peer)]
07:12 -!- kaib [n=kaib@c-76-102-52-156.hsd1.ca.comcast.net] has quit []
07:16 -!- diltsman__ [n=diltsman@64.122.18.77] has quit []
07:19 -!- StDan [n=danielb@124-197-59-227.callplus.net.nz] has quit [Read error:
110 (Connection timed out)]
07:19 -!- triplez [n=triplez@bb116-14-69-242.singnet.com.sg] has joined #go-nuts
07:21 -!- karnath [n=karnath@MS-241-20.dyn-ip-II.SPb.SkyLink.RU] has joined
#go-nuts
07:25 -!- brrant [n=John@168-103-78-133.hlrn.qwest.net] has joined #go-nuts
07:28 < plexdev> http://is.gd/5aPlO by [Russ Cox] in go/src/cmd/gc/ -- gc:
make 'invalid rune in string' a little less cryptic
07:29 -!- r2p2 [n=billy@v32671.1blu.de] has joined #go-nuts
07:33 -!- Vova [n=Vova@80.178.10.36.adsl.012.net.il] has quit [Read error: 60
(Operation timed out)]
07:33 -!- Vova [n=Vova@80.178.0.22.adsl.012.net.il] has joined #go-nuts
07:33 -!- felipe [n=felipe@my.nada.kth.se] has quit [Connection timed out]
07:36 -!- trickie [n=trickie@86.93.227.181] has quit ["Computer has gone to
sleep"]
07:38 -!- tobiasu [n=tobiasu@tin.tmux.org] has quit [Nick collision from
services.]
07:38 -!- tobiasu [n=tobiasu@tin.tmux.org] has joined #go-nuts
07:46 -!- WalterMundt [n=waltermu@twiki/developer/EtherMage] has quit ["Leaving."]
07:48 -!- KillerX [n=anant@gentoo/developer/KillerX] has quit ["Leaving."]
07:48 -!- kiva [n=quassel@r220-101-159-148.cpe.unwired.net.au] has joined #go-nuts
07:50 -!- path[l] [n=path@115.184.110.159] has joined #go-nuts
07:50 -!- aarapov [n=aarapov@nat/redhat/x-qobycgqdvemhpbtx] has joined #go-nuts
07:51 -!- Kibiz0r [n=Adium@99-48-204-31.lightspeed.brhmmi.sbcglobal.net] has
joined #go-nuts
07:52 -!- lambo4jos [n=chatzill@c-76-126-250-10.hsd1.ca.comcast.net] has quit
["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
07:52 -!- lambo4jos [n=chatzill@c-76-126-250-10.hsd1.ca.comcast.net] has joined
#go-nuts
07:55 -!- Vova [n=Vova@80.178.0.22.adsl.012.net.il] has quit [Read error: 110
(Connection timed out)]
07:55 -!- Vova [n=Vova@80.178.10.177.adsl.012.net.il] has joined #go-nuts
07:55 -!- tar_ [n=tom@c-67-180-208-162.hsd1.ca.comcast.net] has quit []
07:55 -!- nf [n=nf@124-171-26-50.dyn.iinet.net.au] has joined #go-nuts
07:59 < plexdev> http://is.gd/5aQwL by [Russ Cox] in 2 subdirs of go/ -- gc:
function argument ordering bug
08:00 -!- trickie [n=trickie@94.100.112.225] has joined #go-nuts
08:04 -!- Associat0r [n=Associat@h163153.upc-h.chello.nl] has joined #go-nuts
08:06 -!- JSharpe [n=jamie@5adaea8d.bb.sky.com] has joined #go-nuts
08:09 -!- kiva [n=quassel@r220-101-159-148.cpe.unwired.net.au] has quit [Read
error: 60 (Operation timed out)]
08:13 -!- hcatlin [n=hcatlin@host81-154-246-241.range81-154.btcentralplus.com] has
joined #go-nuts
08:13 -!- cpr420 [n=cpr420@67.165.199.143] has quit ["Vision[0.9.7-H-090423]: i've
been blurred!"]
08:16 < plexdev> http://is.gd/5aRAg by [Rob Pike] in go/src/pkg/fmt/ --
minor improvement to formatting: don't allocate padding strings every time.
08:16 < plexdev> http://is.gd/5aRAm by [Russ Cox] in 3 subdirs of go/ -- gc:
minor import grammar bug fixes
08:20 -!- JSharpe2 [n=jamie@5ad673da.bb.sky.com] has quit [Connection timed out]
08:21 -!- Loafers [n=loafers@unaffiliated/loafers] has quit [Read error: 60
(Operation timed out)]
08:25 -!- kaigan|work
[n=kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has joined
#go-nuts
08:30 -!- kleinjt [n=kleinjt@tarsonis.dhcp.rose-hulman.edu] has joined #go-nuts
08:34 -!- JPascal [n=jpascal@195.239.8.22] has joined #go-nuts
08:34 -!- kevinwatt [i=kevin@59-125-147-75.HINET-IP.hinet.net] has joined #go-nuts
08:36 -!- Kibiz0r [n=Adium@99-48-204-31.lightspeed.brhmmi.sbcglobal.net] has quit
["Leaving."]
08:37 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
["Leaving."]
08:37 -!- Zaba [n=zaba@about/goats/billygoat/zaba] has quit [Read error: 60
(Operation timed out)]
08:39 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
08:39 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
[Remote closed the connection]
08:39 -!- felipe [n=felipe@my.nada.kth.se] has joined #go-nuts
08:41 -!- Zaba [n=zaba@ip102.148.adsl.wplus.ru] has joined #go-nuts
08:42 -!- djanderson [n=dja@hltncable.pioneerbroadband.net] has quit [Read error:
110 (Connection timed out)]
08:43 -!- Associat0r [n=Associat@h163153.upc-h.chello.nl] has quit []
08:44 -!- Associat0r [n=Associat@h163153.upc-h.chello.nl] has joined #go-nuts
08:52 -!- p0g0 [n=pogo@unaffiliated/p0g0] has joined #go-nuts
08:53 -!- HeavensRevenge
[n=quassel@CPE001d0fe73b7d-CM00111ae5c642.cpe.net.cable.rogers.com] has joined
#go-nuts
08:59 -!- kiva [n=quassel@r220-101-159-148.cpe.unwired.net.au] has joined #go-nuts
09:02 < plexdev> http://is.gd/5aTJB by [Russ Cox] in 2 subdirs of go/ -- gc:
better diagnosis of initialization loops
09:02 -!- lambo4jos [n=chatzill@c-76-126-250-10.hsd1.ca.comcast.net] has quit
["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
09:02 -!- Associat0r [n=Associat@h163153.upc-h.chello.nl] has quit [Connection
timed out]
09:02 -!- path[l] [n=path@115.184.110.159] has quit [Read error: 110 (Connection
timed out)]
09:10 -!- r2p2 [n=billy@v32671.1blu.de] has left #go-nuts []
09:12 -!- path[l] [n=path@115.184.123.162] has joined #go-nuts
09:15 -!- p0g0 [n=pogo@unaffiliated/p0g0] has quit [Read error: 110 (Connection
timed out)]
09:15 -!- p0g0 [n=pogo@unaffiliated/p0g0] has joined #go-nuts
09:16 -!- r2p2 [n=billy@v32671.1blu.de] has joined #go-nuts
09:16 -!- rog [n=rog@78.148.16.235] has joined #go-nuts
09:18 < plexdev> http://is.gd/5aUnA by [Russ Cox] in 2 subdirs of go/ -- gc:
recursive type error
09:19 -!- yoasif [n=asif@175.sub-75-192-121.myvzw.com] has quit [Read error: 110
(Connection timed out)]
09:19 -!- analogue [n=analogue@toulouse.jfg-networks.net] has joined #go-nuts
09:28 -!- crashR [n=crasher@codextreme.pck.nerim.net] has joined #go-nuts
09:34 < plexdev> http://is.gd/5aV2s by [Russ Cox] in 4 subdirs of go/ -- gc:
handle _ = <-c in select.
09:36 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has quit [Read error:
113 (No route to host)]
09:41 -!- Adys [n=Adys@unaffiliated/adys] has quit [Read error: 104 (Connection
reset by peer)]
09:52 < Innominate> http://www.youtube.com/watch?v=xvW_2YyAiUc
09:55 -!- pilt [n=pilt@h-60-10.A163.priv.bahnhof.se] has left #go-nuts []
09:58 -!- GeoBSD [n=geocalc@lns-bzn-54-82-251-103-164.adsl.proxad.net] has joined
#go-nuts
10:00 -!- alc [n=alc@222.128.159.61] has quit []
10:03 -!- path[l] [n=path@115.184.123.162] has quit [Read error: 110 (Connection
timed out)]
10:07 -!- triplez [n=triplez@bb116-14-69-242.singnet.com.sg] has quit []
10:07 -!- tibshoot [n=tibshoot@linagora-230-146.pr0.nerim.net] has joined #go-nuts
10:11 -!- tobiasu [n=tobiasu@tin.tmux.org] has quit [Nick collision from
services.]
10:11 -!- tobiasu [n=tobiasu@tin.tmux.org] has joined #go-nuts
10:14 -!- CaptainLucifel [n=captainl@75.84.196-77.rev.gaoland.net] has joined
#go-nuts
10:23 -!- path[l] [n=path@115.184.69.188] has joined #go-nuts
10:26 -!- atsampson [n=ats@94-193-50-45.zone7.bethere.co.uk] has joined #go-nuts
10:28 -!- JPascal [n=jpascal@195.239.8.22] has left #go-nuts []
10:32 -!- amorpisseur [n=analogue@ip-139.net-81-220-254.rev.numericable.fr] has
joined #go-nuts
10:34 -!- kiva [n=quassel@r220-101-159-148.cpe.unwired.net.au] has quit [Read
error: 60 (Operation timed out)]
10:44 -!- analogue [n=analogue@toulouse.jfg-networks.net] has quit [Read error:
110 (Connection timed out)]
10:46 -!- afurlan [n=afurlan@scorpion.mps.com.br] has joined #go-nuts
10:51 -!- Cyanure [n=cyanure@212-198-164-142.rev.numericable.fr] has joined
#go-nuts
10:53 -!- sladegen [n=nemo@unaffiliated/sladegen] has quit [Nick collision from
services.]
10:53 -!- sladegen [n=nemo@unaffiliated/sladegen] has joined #go-nuts
10:53 -!- tomestla [n=tom@78.251.236.156] has joined #go-nuts
11:02 -!- raichoo [n=raichoo@129.70.165.116] has joined #go-nuts
11:08 -!- rdd` [n=rdd@c83-250-145-223.bredband.comhem.se] has quit [Remote closed
the connection]
11:14 -!- awishformore [n=awishfor@vpn341.uni-trier.de] has joined #go-nuts
11:17 -!- XniX23 [i=vegy@89-212-233-217.dynamic.dsl.t-2.net] has joined #go-nuts
11:19 < JeffJohnson> blist
11:19 -!- Freeaqingme| [n=dolf@145.74.180.208] has joined #go-nuts
11:19 < JeffJohnson> oh wrong channel:)
11:22 -!- karnath_ [n=karnath@MS-172-20.dyn-ip-II.SPb.SkyLink.RU] has joined
#go-nuts
11:28 -!- SuBmUnDo [n=pCCC@unaffiliated/submundo] has quit [Remote closed the
connection]
11:33 -!- tomestla [n=tom@78.251.236.156] has quit [Read error: 110 (Connection
timed out)]
11:36 -!- sladegen_ [n=nemo@78.8.136.19] has joined #go-nuts
11:36 -!- sladegen [n=nemo@unaffiliated/sladegen] has quit [Nick collision from
services.]
11:42 -!- amorpisseur [n=analogue@toulouse.jfg-networks.net] has joined #go-nuts
11:43 -!- analogue [n=analogue@ip-139.net-81-220-254.rev.numericable.fr] has quit
[Read error: 60 (Operation timed out)]
11:46 -!- karnath [n=karnath@MS-241-20.dyn-ip-II.SPb.SkyLink.RU] has quit [Read
error: 113 (No route to host)]
11:47 -!- karnath_ [n=karnath@MS-172-20.dyn-ip-II.SPb.SkyLink.RU] has quit
["leaving"]
11:49 -!- Netsplit kornbluth.freenode.net <-> irc.freenode.net quits:
zeroish, ukai, DJCapelis, brrant, mjburgess, idemal, beneth`, path[l], Peter`,
bsod2, (+87 more, use /NETSPLIT to show all of them)
11:49 -!- Netsplit over, joins: JSharpe
11:50 -!- Netsplit over, joins: melba, tobiasu
11:50 -!- Netsplit over, joins: mycroftiv, jessta, shardz, sqweek, Robdgreat, kfx,
vt3, me__, emilh_, sstangl (+84 more)
11:50 -!- Netsplit kornbluth.freenode.net <-> irc.freenode.net quits:
brrant, syd, rullie, maruel, mjburgess, KirkMcDonald, me__, mycroftiv, Makdaam,
DJCapelis, (+41 more, use /NETSPLIT to show all of them)
11:50 -!- kve [i=zaknifar@81.22.244.218] has joined #go-nuts
11:51 -!- beneth`_ [n=beneth`@beneth.fr] has joined #go-nuts
11:51 -!- blackdog` [n=user@200.104.73.92] has joined #go-nuts
11:51 -!- Paradox934X [n=Paradox9@98.142.211.46] has joined #go-nuts
11:51 -!- maruel_ [n=maruel_2@google1.osuosl.org] has joined #go-nuts
11:51 -!- mycrofti1 [n=infernus@h69-128-47-243.mdsnwi.dedicated.static.tds.net]
has joined #go-nuts
11:51 -!- hhg_ [n=hhg@hhg.to] has joined #go-nuts
11:51 -!- zidoh [n=bjornar@pyrrophlagalon.nithia.net] has joined #go-nuts
11:51 -!- xjih78 [i=z0r0@87-126-67-31.btc-net.bg] has joined #go-nuts
11:52 -!- Netsplit over, joins: Demp, hooopy, senneth, syd
11:52 -!- Makdaam [n=lhx@opers.man.poznan.pl] has joined #go-nuts
11:52 -!- Netsplit over, joins: fenicks
11:53 -!- Netsplit over, joins: Gussi, Innominate
11:53 -!- Netsplit over, joins: sqweek, me__, BlueT_, rndbot, afurlan, path[l],
Zaba, brrant, Amaranth, malkomalko (+21 more)
11:53 -!- cyt_ [n=cyt@li57-21.members.linode.com] has joined #go-nuts
11:53 -!- codemac [n=codemac@archlinux/developer/codemac] has quit [Read error: 60
(Operation timed out)]
11:53 -!- _mjburgess [n=michael@m1.mjburgess.co.uk] has joined #go-nuts
11:53 -!- philips_ [n=brandon@ash.osuosl.org] has quit [Read error: 60 (Operation
timed out)]
11:53 -!- Netsplit over, joins: exn
11:53 -!- mjburgess [n=michael@m1.mjburgess.co.uk] has quit [Read error: 54
(Connection reset by peer)]
11:53 -!- shasbot [n=shasbot@ip70-171-218-55.tc.ph.cox.net] has quit [Read error:
60 (Operation timed out)]
11:53 -!- cyt [n=cyt@li57-21.members.linode.com] has quit [Read error: 60
(Operation timed out)]
11:53 -!- codemac_ [n=codemac@archlinux/developer/codemac] has joined #go-nuts
11:56 -!- Zaba [n=zaba@about/goats/billygoat/zaba] has quit [Remote closed the
connection]
11:56 -!- Zaba [n=zaba@ip102.148.adsl.wplus.ru] has joined #go-nuts
11:58 -!- philips [n=brandon@opensuse/member/philips] has joined #go-nuts
11:58 -!- shasbot [n=shasbot@ip70-171-218-55.tc.ph.cox.net] has joined #go-nuts
11:58 -!- stalled [n=411@unaffiliated/stalled] has quit [Excess Flood]
12:04 -!- tonyg [n=tonyg@host238.lshift.net] has joined #go-nuts
12:05 -!- stalled [n=411@unaffiliated/stalled] has joined #go-nuts
12:06 < tonyg> If a goroutine is blocked reading on an unreachable channel,
will the goroutine be garbage-collected?
12:06 < tonyg> (it should be)
12:09 -!- Cyanure [n=cyanure@212-198-164-142.rev.numericable.fr] has quit [Remote
closed the connection]
12:17 -!- tor7 [n=tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has
joined #go-nuts
12:20 < taruti> tonyg: I don't think the current implementation does.
12:21 < taruti> tonyg: also "reading on an unreachable channel" sounds like
a bug.
12:22 < tonyg> taruti, it's not a bug: think of a service backed by a
goroutine.  The channel the service accepts requests on is effectively the handle
to the service.  It should be able to be treated as a garbage-collected value like
any other; the backing goroutine shouldn't prevent collection of the handle, so
logically should be collected too
12:22 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has joined
#go-nuts
12:30 -!- scyth [n=scyth@rots.in.rs] has quit [Excess Flood]
12:30 -!- scyth [n=scyth@rots.in.rs] has joined #go-nuts
12:32 -!- trickie [n=trickie@94.100.112.225] has quit [Read error: 113 (No route
to host)]
12:36 -!- awishformore [n=awishfor@vpn341.uni-trier.de] has quit [Remote closed
the connection]
12:39 < taruti> tonyg: the service should be shutdown by explicit api
probably.
12:39 < Amaranth> Indeed, you should have a quit/error channel the goroutine
checks to tell it when to stop
12:40 -!- Freeaqingme| [n=dolf@145.74.180.208] has quit [Read error: 110
(Connection timed out)]
12:40 < tonyg> well that seems odd to me.  ordinary structs/objects with
methods don't have explicit shutdowns -- they just vanish.  i should not have to
expose the goroutine-based implementation of my object in my api
12:41 < tonyg> i mean, i could use a lock (which just vanishes) to get
mutexing, or i could use a goroutine
12:41 < tonyg> and i should not have to expose my decision in the api
12:41 -!- tibshoot [n=tibshoot@linagora-230-146.pr0.nerim.net] has quit [Read
error: 110 (Connection timed out)]
12:42 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has joined
#go-nuts
12:43 < rog> tonyg: it's a fair question
12:44 < rog> the difficulty being that of course the channel *is*
reachable...  by the goroutine itself!
12:44 < tonyg> mm.  shouldn't be a problem though -- goroutines should be
Just Data to the runtiem
12:44 < tonyg> *runtime
12:44 < taruti> isn't that the normal cyclic value + gc thing
12:44 < tonyg> it then becomes a piece of cyclic garbage
12:44 < tonyg> yes
12:45 < rog> but goroutines are primary values
12:45 < taruti> e.g.  GHC gargage collects threads in such situations iirc
12:45 < rog> i.e.  you don't want to GC a goroutine just because nothing has
a reference to it, because it might decide to print something
12:45 < rog> ...  or otherwise interact with the system
12:45 < tonyg> rog, if it can possibly do anything else, then it is not a
candidate for collection
12:45 < rog> GHC has an easier time of it
12:46 < rog> because no side effects
12:46 < tonyg> when it's blocked on a single channel, there's nothing that
can interrupt it save that channel communicating or closing
12:46 < taruti> rog: threads in GHC are in the IO monad and thus there are
side-effects.
12:46 < tonyg> so if it's (in the runtime view, now) on the channel's
waitlist, and the channel is collected, it should silently go too
12:47 < taruti> and the channel receive is not multivalued
12:47 < tonyg> if, however, it's selecting across two channels, e.g.  to get
a timeout-style wake up call, then *both* channels would have to become
unreachable to let the goroutine become collected
12:47 -!- plainhao [n=plainhao@mail.xbiotica.com] has joined #go-nuts
12:48 < rog> tonyg: if the process has a reference to the channel, how can
the channel be collected?
12:48 < tonyg> rog, because to the runtime, the goroutine is just more data
12:48 < taruti> tonyg: think of: "foo, ok <- chan; if ok { ...  } else {
...  }"
12:48 < tonyg> taruti, that is not a blocking operation
12:48 < tonyg> it will not be entered on the channel's waitlist
12:49 < tonyg> rog, goroutines are not GC roots *necessarily*.
12:49 < tonyg> they *may* be (but I'd be disappointed if they were --
there's no reason for them to be)
12:49 < rog> tonyg: i don't see how you can easily decide when they're not
12:50 -!- amuck_ [n=amuck_@rrcs-76-79-44-2.west.biz.rr.com] has joined #go-nuts
12:50 < taruti> so basically "if a goroutine is blocked on a channel (with
no timeout) and no-one else has a reference to the goroutine then it should be
garbage collected"
12:50 < tonyg> taruti, bingo
12:50 < tonyg> it falls out of the natural implementation at the metalevel
12:51 < rog> taruti: yes, i was coming to that conclusion
12:51 -!- Adys [n=Adys@unaffiliated/adys] has joined #go-nuts
12:51 < tonyg> taruti, actually minor quibble: a reference to the channel
the goroutine is blocked on
12:51 < taruti> that seems quite possible to implement and doesn't change
any semantics
12:51 < rog> basically, when you block on a channel, you remove yourself
from the collection of roots
12:51 < tonyg> it's not possible to refer to a goroutine directly
12:51 < tonyg> rog, more or less; or, never be a root to begin with.  Make
the scheduler's runlist a root instead
12:51 < taruti> tonyg: tried to make the definition general and
feature-agnostic
12:51 < rog> tonyg: same difference
12:51 < tonyg> :)
12:53 < rog> hold on
12:53 < rog> to make this work, a channel has to point back to the process
that's reading from it
12:53 < rog> not the other way around
12:54 < tonyg> yes, if that proc is blocked on the channel
12:54 < tonyg> that has to happen anyway though
12:54 < rog> but that's still doable, i guess.  except that there can be
many processes reading from a single channel.
12:54 < tonyg> there has to be a waitlist somewhere that the channel holds
12:54 < rog> but that's still ok
12:54 < rog> yup.
12:54 < tonyg> yep
12:54 -!- path[l]_ [n=path@115.184.17.149] has joined #go-nuts
12:54 < taruti> what would func "main() { ch := make(chan int); x := <-
ch; }" do?
12:54 < tonyg> be collected :)
12:54 < rog> the source is in pkg/runtime/chan.c if you're interested
12:55 < tonyg> the main goroutine seems to be treated a bit specially anyway
12:55 -!- chid [n=mgzxnqvs@c122-106-95-175.rivrw1.nsw.optusnet.com.au] has quit
[Client Quit]
12:55 < rog> it is
12:55 < tonyg> so then maybe treat it specially there too.
12:55 < tonyg> make it a gc root
12:55 < taruti> then the library needs a "sleepForever()"
12:55 < tonyg> but make none of the other goroutines a gc root
12:55 < tonyg> seeing as once the main thread dies it takes the vm with it
12:55 < rog> but the above is fine - if you want something to sleep forever,
just sleep forever :-)
12:56 < tonyg> taruti, the idiom you posted *is* sleepForever -- if the
goroutine is garbage collected, no one notices
12:56 < tonyg> identity of indiscernibles :-)
12:56 < tonyg> phew.  i am neck deep in twisty channels at the moment.
implementing an amqp 0-9-1 harness.
12:56 < rog> tonyg: except that the process exits, and takes everything else
with it...
12:57 < tonyg> rog, oh i see.  well it only exits if the main thread is
treated like all the others!
12:57 < rog> tonyg: if your channels are too twisty, you're doing something
wrong.  in my experience!
12:57 < tonyg> i meant more generally, allocating a channel and reading
immediately from it is sleepForever()
12:57 < tonyg> rog, yes i know
12:57 < tonyg> it's getting better as I work on it
12:57 < rog> just like with algorithms, a few basic techniques get you a
long way
12:58 < taruti> tonyg: the main goroutine behaving differently is *bad*
12:59 -!- raichoo [n=raichoo@129.70.165.116] has quit []
12:59 < tonyg> taruti, possibly.  the alternative is exposing more control
over the vm's operation; a la java's daemon threads
13:00 < taruti> tonyg: an explicit sleepForever-function is enough
13:01 -!- Freeaqingme| [n=dolf@145.74.181.68] has joined #go-nuts
13:02 -!- path[l] [n=path@115.184.69.188] has quit [Read error: 60 (Operation
timed out)]
13:02 -!- tricky [n=Knave@dsl-240-175-185.telkomadsl.co.za] has joined #go-nuts
13:02 < tonyg> taruti, yes that would do.  But in general the main goroutine
is a bit special: it's primordial, after all; so I'm not too fussed about it being
special in more than one way.  It's easy enough to spawn a non-special goroutine
for your main-ish things if you need one of those for them
13:03 < tonyg> *shrug*
13:03 < tonyg> I'm enjoying go programming, though.  This language is fun
13:05 -!- raichoo [n=raichoo@lain.dhcp.uni-bielefeld.de] has joined #go-nuts
13:06 < taruti> the lack of generics is a quite nasty wart, but hopefully
that will be fixed
13:07 < Ycros> I'd like exceptions or some other better way of propagating
errors
13:07 < taruti> (and the lack of expressivity in the type system in general)
13:07 < Ycros> especially between goroutines
13:07 < taruti> well exceptions won't help there.
13:09 < Ycros> they could, there'd just have to be some thought put into
cross-gouroutine propagation
13:09 -!- hooopy_ [i=hoopy@173-30-98-140.client.mchsi.com] has joined #go-nuts
13:09 -!- awishformore [n=awishfor@vpn073.uni-trier.de] has joined #go-nuts
13:09 < taruti> Ycros: what kind of semantics are you thinking about?
13:10 -!- hooopy [i=hoopy@173-30-98-140.client.mchsi.com] has quit [Read error:
104 (Connection reset by peer)]
13:10 < tonyg> erlang's process monitors and links are a nice model
13:11 < taruti> which needs an identity for the goroutines (at the moment
they are anonymous)
13:11 < tonyg> taruti, aha!  interesting
13:11 < tonyg> yes
13:11 -!- vdrab [n=vdrab@222-151-096-016.jp.fiberbit.net] has joined #go-nuts
13:12 < tonyg> ...  hmm.
13:12 < tonyg> "go x" could be an expression resulting in a "chan
GoroutineManagementEvent"
13:12 < taruti> maybe "gochan (func ()) chan ErrorType"
13:12 < taruti> exacty :)
13:12 < Ycros> yeah.
13:13 < tonyg> did you guys ever read much on the pi calculus?
13:13 -!- todos [n=ttodos@195.160.234.10] has joined #go-nuts
13:13 < tonyg> go feels pi-like in a good way
13:13 < taruti> although efficient process monitors couldn't be done with
that without further extensions
13:13 < tonyg> taruti, really?  why not?
13:14 < taruti> tonyg: think of a monitor that has a collection of children.
It needs to wait for a message from any children.  Now using select won't work
since the children are _dynamic_ and not statically defined.
13:14 < taruti> (it could be done in a logarithmic way, but that is ugly)
13:14 < tonyg> taruti, good point...  interstitial goroutines could
multiplex, but yeah, ick
13:15 -!- tricky [n=Knave@dsl-240-175-185.telkomadsl.co.za] has quit [Remote
closed the connection]
13:15 < tonyg> (in fact, such multiplexing is what i'm dealing with in this
amqp library right now)
13:16 < taruti> needs something like "select (map [chan <t>] (func
(<t> <r>) <r>" (with <xxx> for type variables)
13:16 < tonyg> :)
13:16 < rog> tonyg: re: making the runlist a root, things might be off the
runlist for other reasons (e.g.  blocking on a syscall)
13:16 < rog> taruti: if you're waiting for many children, just have them all
write to the same channel
13:16 < tonyg> rog, indeed; and it'd be a free context-specific choice as to
whether such other contexts are gc roots or not
13:17 < rog> taruti: (including some identifier)
13:17 < dho> morning
13:17 < taruti> rog: which means that library apis producing channels are
bad?
13:17 < Ycros> taruti: but multiple goroutines can share a channel
13:17 < tonyg> heh.  smalltalk's #becomeForward: operator: "n := go
something(); n.becomeForward(m); mgmtEvent := <-m;"
13:18 < taruti> seems like the current recommendation is for library
routines to produce new channels rather than taking callback functions (that could
use existing channels)
13:18 < taruti> which is of course incompatible with the "use an existing
channel" approach
13:18 < rog> taruti: it depends.  c.f.  the Walk function in ast
13:18 -!- Adys [n=Adys@unaffiliated/adys] has quit [Read error: 110 (Connection
timed out)]
13:19 < rog> i usually prefer passing in a channel rather than returning
one, as then you can choose for it to be shared.
13:21 < taruti> rog: still needs the tagging usually thus requiring a
callback function
13:21 < rog> taruti: depends on what's passed down the channel.
13:22 < rog> in general, a channel is equivalent to a callback function
13:22 < rog> they both have strengths and weaknesses
13:23 < taruti> and both can emulate each other (but emulation is more
efficient with a callback)
13:23 < uriel> yes, both have strengths and weaknesses, but channels have
many more strengths and callbacks just suck
13:23 -!- brunov [n=bruno@190.191.110.64] has joined #go-nuts
13:24 < rog> for a little experiment, i just changed the syntax tree walker
in the ast package to take a recursively defined callback function so that you
could track the structure of the tree
13:24 < uriel> (well, there might be a few cases were callbacks work well,
but as a general mechanism like used for example in javascript, they are a
nightmare
13:24 < rog> the function type is defined like this: type Visitor func(n
interface{}) Visitor
13:25 < taruti> uriel: a typical callback will 1) mangle the value, 2) send
it down a channel to be processed :)
13:25 < rog> i should experiment with doing the equivalent thing with a
channel
13:26 < rog> i quite like the "function returning a function of the same
type" idiom though
13:27 < taruti> uriel: with taking channels one needs to create proxy
forwarders "go func() { for { x := <- ch1; ch2 <- f(x) } }"
13:29 -!- vdrab [n=vdrab@222-151-096-016.jp.fiberbit.net] has quit [Read error: 60
(Operation timed out)]
13:29 < rog> yeah, with channels, you can't recurse without adding
goroutines.  but continuation-passing-style becomes tedious quite quickly if
you're doing callbacks.
13:29 < rog> function calls are always going to be quicker, i think
13:30 < rog> although it would be nice to be back in the occam days where
they were approx the same cost
13:30 < taruti> occam just had very slow function calls :P
13:31 < taruti> function calls should be faster on any reasonable
implementation
13:31 < rog> only because they're the things best supported by the h/w
13:31 -!- hooopy_ [i=hoopy@173-30-98-140.client.mchsi.com] has quit [Read error:
104 (Connection reset by peer)]
13:32 < rog> on the transputer, channels were supported by the h/w, hence
the lack of performance disparity
13:32 < rog> i don't think there's any fundamental reason why context switch
should be costlier than context push
13:33 -!- fgb [n=liveuser@190.246.85.45] has joined #go-nuts
13:33 -!- tibshoot [n=tibshoot@linagora-230-146.pr0.nerim.net] has joined #go-nuts
13:33 < tonyg> rog, given a Sufficiently Smart JIT you could plausibly even
implement context switch as function call
13:33 < tonyg> the erlang HIPE guys experimented a little with that
13:34 < tonyg> don't think it grew past being a research project, though.
13:34 < rog> tonyg: difficult if you want to do time slicing
13:34 < tonyg> Some kind of self-style memoisation of context-switch
patterns
13:34 < tonyg> oh; yeah i guess
13:35 < tonyg> well.  depends how you do it.  if you reserve a GPR you could
do it by reading the cycle counter at function-call time
13:35 < rog> i think one of rob pike's early concurrency experiements did
something along the same lines
13:35 < rog> tonyg: assuming you're calling a function at least once each
time around the loop
13:36 < tonyg> actually maybe i don't understand what you mean by
timeslicing.
13:36 < taruti> function call counters seem like a bad way to do it.  there
is sigvtalarm and friends
13:36 < rog> i mean that if you've got two compute-bound, uncommunicative
processes, they both share cpu time between them as they're running
13:37 -!- JeffJohnson [n=fho@unaffiliated/jeffjohnson] has quit ["leaving"]
13:38 -!- raichoo [n=raichoo@lain.dhcp.uni-bielefeld.de] has quit []
13:38 < rog> so if i do: c := make(chan bool); go func(){<-c;
computation...; c <- true}(); go func(){c <- true; computation...; <-c}
13:38 < tonyg> righto
13:38 < tonyg> yes
13:38 < tonyg> depends how precise you want to be about it
13:38 < rog> then the two computations will proceed side-by-side rather than
one after the other
13:38 < tonyg> if you just want occasional preempton, then as taruti points
out, sigvtalarm etc work ok
13:38 < tonyg> *preemption
13:39 -!- sladegen [n=nemo@unaffiliated/sladegen] has joined #go-nuts
13:40 < rog> but i'm not sure how vtalarm can help if you've turned the
<- op into a fn call op - the context you want to switch to is now buried in
the stack
13:41 < tonyg> hm
13:41 < tonyg> yeah
13:41 < tonyg> well, i was assuming you'd only change rpc-like interactions
into function calls
13:42 -!- fgb [n=liveuser@190.246.85.45] has quit ["Leaving."]
13:42 < tonyg> i'm sure there's a phd in here somewhere ;-)
13:42 -!- sladegen_ [n=nemo@unaffiliated/sladegen] has quit [Read error: 110
(Connection timed out)]
13:42 -!- crashR [n=crasher@codextreme.pck.nerim.net] has quit [Excess Flood]
13:42 < rog> :-)
13:43 -!- crashR [n=crasher@codextreme.pck.nerim.net] has joined #go-nuts
13:45 -!- fgb [n=fgb@190.246.85.45] has joined #go-nuts
13:45 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has joined
#go-nuts
13:45 < rog> hey, here's a little conundrum: if i've got this (legal)
declaration: type Foo *struct {a int; next Foo};
13:45 < rog> is it possible to create an instance of Foo?
13:46 -!- melba [n=blee@unaffiliated/lazz0] has quit [Read error: 110 (Connection
timed out)]
13:47 < rog> oh yes, you can: p := Foo(&(struct {a int; next Foo}){12,
nil});
13:47 < rog> not very convenient though.
13:48 -!- exn [n=exn@195.49.206.202] has quit [Client Quit]
13:51 -!- Anders_ [n=Anders@c83-253-2-206.bredband.comhem.se] has joined #go-nuts
13:52 -!- kmc [n=keegan@64.121.133.238] has quit [Read error: 60 (Operation timed
out)]
13:53 -!- kmc [n=keegan@64.121.133.238] has joined #go-nuts
13:57 -!- ni| [n=james@c-24-34-220-147.hsd1.ma.comcast.net] has quit [Read error:
110 (Connection timed out)]
13:58 -!- Trey_ [n=trey@sangha.cyberius.net] has joined #go-nuts
14:00 < Trey_> I've been trying to install...  How long can I expect the
"--- cd ../test" line to stick around?  It's been about 22 hours on a 2.53 GHz
Core 2 Duo on a Mac.
14:01 < Ycros> not that long
14:01 -!- blackdog` [n=user@200.104.73.92] has left #go-nuts ["ERC Version 5.3
(IRC client for Emacs)"]
14:01 < uriel> taruti: are you building tip or release?
14:01 < Ycros> stop it, do a hg sync, try again
14:02 < Trey_> Ycros: "hg: unknown command 'sync'"
14:02 < uriel> Trey_: hg pull -u
14:02 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has quit [Remote closed the
connection]
14:03 < taruti> uriel: ?
14:03 < uriel> taruti: sorry, stupid tab completion
14:03 -!- Loafers [n=loafers@unaffiliated/loafers] has joined #go-nuts
14:03 < taruti> np
14:03 < Trey_> ok, thanks.  how long does the install and test process
usually take?
14:04 < taruti> Trey: a couple of minutes
14:04 < Trey> ah, so i didn't need my laptop's fan to be straining for the
past day :)
14:05 -!- nullpo [n=nullpo@221x252x46x83.ap221.ftth.ucom.ne.jp] has quit
["Leaving..."]
14:06 < jessta> lol, even gcc doesn't take that long
14:06 < taruti> Trey: you are building gc?  (not gccgo)
14:07 < Ycros> uriel: where does my hg sync come from then?  newer version
of hg?
14:07 < Trey> taruti: i don't know, i'm following the instructions.
"./all.bash"
14:08 < dho> Trey: you're building gc
14:09 -!- perdix [n=perdix@g227156075.adsl.alicedsl.de] has joined #go-nuts
14:09 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has joined #go-nuts
14:09 < dho> Trey: if you're building -release there are a bunch of bugs
that have been fixed since then
14:09 < dho> oh, EREDUNDANT
14:10 -!- awishformore [n=awishfor@vpn073.uni-trier.de] has quit [Remote closed
the connection]
14:10 -!- melba [n=blee@unaffiliated/lazz0] has joined #go-nuts
14:10 < Trey> dho: i know these words you are using individually, but
together i don't know what you mean.  I'm following the instructions at
http://golang.org/doc/install.html to the letter, so whatever that would have me
do, I'm doing.  Well, aside from the "hg pull -u" that I did a moment ago
14:11 -!- HeavensRevenge
[n=quassel@CPE001d0fe73b7d-CM00111ae5c642.cpe.net.cable.rogers.com] has quit [Read
error: 104 (Connection reset by peer)]
14:11 < Trey> ...  and that failed.
14:11 < dho> what failed?
14:11 < dho> Trey: on a 3 core amd64 box with 8gb ram, it takes 2 minutes
and something.  on a 2-processor virtualbox vm with 512mb ram running on that
system it takes 3.5 minutes
14:12 < dho> so 22 hours is not ok :)
14:12 < Trey> dho: http://paste.lopsa.org/66
14:13 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has joined #go-nuts
14:14 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has joined
#go-nuts
14:16 < dho> er, that's weird.
14:17 < dho> if you go into $GOROOT/src/pkg/net/ and run make test, does
that happen every time?
14:18 -!- iwikiwi [n=iwikiwi@59.177.98.195] has joined #go-nuts
14:18 < dho> Trey: or just sometimes?
14:19 < Trey> dho: dunno, it happened once when I ran "./all.bash".  i just
ran make test in that dir and got PASS
14:19 < Trey> how do i continue?  "./all.bash" again, or will that start
from scratch?
14:20 -!- ponce [n=ponce@paradisia.net] has joined #go-nuts
14:21 -!- jA_cOp [n=yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts
14:23 -!- prip [n=_prip@host62-134-dynamic.42-79-r.retail.telecomitalia.it] has
quit [Read error: 110 (Connection timed out)]
14:24 -!- prip [n=_prip@host69-133-dynamic.46-79-r.retail.telecomitalia.it] has
joined #go-nuts
14:24 < dho> cd pkg/net ; make test
14:24 < dho> oh
14:24 < dho> continue with the build?  It's already built.  Can you run hg
identify and paste the results here?
14:24 < tonyg> hmmmmmmm.  segv's shouldn't happen, right?
14:24 < dho> tonyg: correct.
14:25 < dho> Trey: it should say 68ebc44e8429 tip
14:25 < tonyg> hmmmmmmmmmmmmmm.
14:26 < Trey> dho: it does.  i meant, how do i continue with the tests?
14:26 < dho> all.bash, but you seem to have stumbled upon a bug that I
thought I fixed.
14:28 < Trey> yikes, no, that rm -r'd everything and it's started building
again
14:28 < Trey> too late now...
14:28 < Trey> er, rm -f'd, i mean.  :)
14:29 < dho> well, yeah, it doesn't continue
14:29 < dho> but it's fast enough that it shouldn't need to
14:30 < dho> or shouldn't matter much that it doesn't anyway
14:31 < dho> Trey: can you create a new issue for that?
14:31 < dho> http://code.google.com/p/go/issues/entry
14:31 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has quit []
14:31 < dho> (test hangs in pkg/net)
14:32 -!- vdrab [n=vdrab@222-151-096-016.jp.fiberbit.net] has joined #go-nuts
14:32 -!- JPascal1 [n=jpascal@195.239.8.22] has joined #go-nuts
14:32 < JPascal1> Hello all!  )
14:33 < tonyg> hi
14:33 < Trey> dho: okay, just did, it's 373.
14:33 < JPascal1> How I can do fork() in GO as in C/C++?  To backgroup
process//
14:34 < Trey> dho: and the test failed again, same thing.  "--- FAIL:
net.TestUDPServer" etc.
14:34 -!- melba [n=blee@unaffiliated/lazz0] has quit [Read error: 104 (Connection
reset by peer)]
14:34 < dho> Trey: nono, not for all.bash, for this test failure
14:34 < dho> lol
14:35 < dho> that's sort of to be expected.
14:35 < dho> Trey: i'm intrigued though
14:35 -!- Fish-Work [n=Fish@86.65.182.194] has quit [Read error: 104 (Connection
reset by peer)]
14:35 < dho> Trey: if you go into pkg/net and run make test a bunch, do you
get that frequently?
14:36 * dho heads into work, be back in 20-30
14:37 < Trey> dho: it's happening consistently now.
14:37 < Trey> dunno why i got that single pass that one time
14:38 < uriel> Ycros: yes, I think sync is a new thing in 1.4, or it is some
extra extension some distros package
14:38 < uriel> in any case, hg pull -u is simple enough
14:39 <+iant> the sync command comes from the codereview plugin
14:39 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has quit ["KVIrc
Insomnia 4.0.0, revision: , sources date: 20090520, built on: 2009/06/06 11:44:47
UTC http://www.kvirc.net/"]
14:41 -!- ponce [n=ponce@paradisia.net] has left #go-nuts []
14:41 < tonyg> > var err os.Error; println(err.String());
14:41 < rndbot> SIGSEGV: segmentation violation Faulting address: 0x14
PC=0x804882b main·main+0x2b /tmp/bzxznpdggen.go:4 main·main() mainsta...
14:41 < tonyg> ???
14:41 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has joined #go-nuts
14:42 <+iant> tonyg: you're calling a method on a nil interface
14:42 < tonyg> yes
14:42 -!- Fish-Work [n=Fish@86.65.182.194] has joined #go-nuts
14:42 -!- broo [n=my_nick@97-116-179-177.mpls.qwest.net] has joined #go-nuts
14:42 < broo> hello
14:43 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has quit [Client
Quit]
14:43 < broo> is there a way to control the greediness in regexp, I tried
using a ? after an expression (like .*?) but that just results in a regexp compile
error
14:44 < clip9_> Nope :|
14:44 < broo> bummer
14:44 <+iant> what would .*?  mean?
14:45 < clip9_> by itself?  nothing
14:45 < clip9_> .*?([a-z]*)
14:45 -!- atsampson [n=ats@94-193-50-45.zone7.bethere.co.uk] has quit [Read error:
104 (Connection reset by peer)]
14:45 < broo> well in most other regex systems ? has two meanings, either
{0,1} or be less greedy
14:45 < clip9_> capture everything until a-z
14:45 -!- aarapov [n=aarapov@nat/redhat/x-qobycgqdvemhpbtx] has quit ["Leaving."]
14:46 < broo> yeah thats what I'd like it to do but it doesn't
14:46 <+iant> the regexp package definitely needs work in general, it's not
particularly efficient
14:47 -!- diltsman_ [n=diltsman@64.122.18.77] has joined #go-nuts
14:47 -!- diltsman_ [n=diltsman@64.122.18.77] has quit [Client Quit]
14:47 < broo> I have something like '(.+) :(.+)' and it grabs until the last
:
14:47 -!- atsampson [n=ats@94-193-50-45.zone7.bethere.co.uk] has joined #go-nuts
14:47 -!- Vova [n=Vova@80.178.10.177.adsl.012.net.il] has quit []
14:47 < broo> I thought '(.+?) :(.+)' would be the way to limit the
greediness, but it just results in a regex compiler error
14:47 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has joined #go-nuts
14:48 -!- Anders_ [n=Anders@c83-253-2-206.bredband.comhem.se] has quit [Read
error: 60 (Operation timed out)]
14:48 < clip9_> yeo
14:48 < clip9_> err
14:48 < clip9_> yep
14:49 < clip9_> Perl regexp
14:49 < clip9_> is the goal right?  :P
14:49 < broo> :)
14:50 < broo> also is there a way to catch signals and send them to a signal
handler, in particular I'm interested in catching sigwinch
14:50 <+iant> broo: we haven't figured out the best way to implement signals
yet, though it is clearly important
14:52 < broo> okay, well keep up the good work, go is a great language, very
easy to use
14:54 -!- broo [n=my_nick@97-116-179-177.mpls.qwest.net] has quit [Remote closed
the connection]
14:54 -!- ryniek [n=RYNIEK@host-89-231-120-113.warszawa.mm.pl] has joined #go-nuts
14:54 < ryniek> django-pl
14:54 < ryniek> sorry
14:54 < ryniek> hi btw
14:54 < tonyg> are nil interface-values *typed*??
14:55 < tonyg> (and are they *supposed* to be??)
14:55 <+iant> tonyg: an interface value which is nil has no dynamic type
14:55 <+iant> tonyg: this is distinct from an interface value which contains
a value of a dynamic type which happens to be nil
14:56 < tonyg> oooooooo yuck
14:56 < tonyg> ok
14:56 < Ycros> tonyg: yeah, I know
14:56 < tonyg> so if I have some class that is a Stringer, then return it in
a context expecting os.Error, it silently becomes not == to nil
14:56 < tonyg> os.Error(mytype(nil)) != nil
14:57 <+iant> yes, that can happen
14:57 < tonyg> ok that helps explain some of the segvs i'm seeing
14:57 -!- Nanoo [n=Nano@95-89-198-45-dynip.superkabel.de] has joined #go-nuts
14:58 -!- TMinus36 [n=serverz@pdpc/supporter/student/tminus36] has quit [Remote
closed the connection]
14:58 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has quit ["This
computer has gone to sleep"]
15:00 < JPascal1> How I can fork() programm like C/C++ fork()?
15:00 -!- vdrab [n=vdrab@222-151-096-016.jp.fiberbit.net] has quit []
15:03 <+iant> JPascal: it's generally very hard to use fork safely in a
multi-threaded program, and Go programs are pretty much always multi-threaded
15:03 <+iant> when would you want to fork without calling exec?
15:03 < JPascal> I want demonize programm to background
15:03 < JPascal> I write system service programm
15:03 -!- ni| [n=james@c-24-34-220-147.hsd1.ma.comcast.net] has joined #go-nuts
15:04 <+iant> hmmm, that makes sense but I don't really know how to
implement it
15:05 <+iant> the problem is that if you call fork(), you wind up with only
a single thread running
15:06 < JPascal> hm...
15:06 < JPascal> binding to C function fork() not help me?
15:07 -!- skelterjohn [n=jasmuth@c-76-116-177-32.hsd1.nj.comcast.net] has joined
#go-nuts
15:07 <+iant> JPascal: it would probably work OK if you called it from an
init function, in many cases it would fail horribly if you called it after main
started
15:08 < JPascal> hm...
15:09 < JPascal> As I have understood.  Now it is impossible to start
process in a background mode.
15:09 <+iant> That is something that should probably be fixed if we can
figure out how; it may be worth opening an issue for it
15:11 < Ycros> tonyg: imo it should treat that case as nil
15:11 < JPascal> :)
15:11 < JPascal> I really need fork function ))
15:12 < Ycros> tonyg: I had a debate about it on the mailing list a while
back -
http://groups.google.com/group/golang-nuts/browse_thread/thread/21bfac3121e0edd2/e7fc32c907c3c177
15:12 <+iant> JPascal: well, a plain fork function is just never going to
work correctly for Go, but we may be able to implement some sort of Daemonize
function
15:13 -!- jA_cOp_ [n=yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts
15:14 < JPascal> Thank you.
15:14 -!- jA_cOp [n=yakobu@unaffiliated/ja-cop/x-9478493] has quit [Read error:
104 (Connection reset by peer)]
15:16 -!- iwikiwi [n=iwikiwi@59.177.98.195] has quit ["I ascend to reality!"]
15:16 -!- tsuwabuki [n=tsuwabuk@FLH1Aav065.kyt.mesh.ad.jp] has joined #go-nuts
15:16 -!- melba [n=blee@unaffiliated/lazz0] has joined #go-nuts
15:16 < tsuwabuki> hello
15:16 -!- einsidan [n=einsidan@194-144-68-248.du.xdsl.is] has quit ["Leaving..."]
15:16 -!- werdan7 [n=w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
15:17 -!- einsidan [n=einsidan@194-144-68-248.du.xdsl.is] has joined #go-nuts
15:19 < dho> Trey: it's a race condition
15:19 < dho> Trey: moment
15:19 < dho> iant: of course it didn't build
15:20 < dho> i forgot there's still runtime stuff that has to be implemented
for freebsd XD
15:20 -!- jA_cOp_ [n=yakobu@unaffiliated/ja-cop/x-9478493] has quit ["Leaving"]
15:22 < tonyg> Ycros, thanks for that link.  Now I see the analogy to
int(0), I get it
15:22 < dho> interesting.
15:23 < Ycros> tonyg: yeah, I still think that in the case of interfaces, it
should treat it as nil.
15:23 -!- triplez [n=triplez@bb219-74-8-236.singnet.com.sg] has joined #go-nuts
15:24 < Ycros> tonyg: then we could return strongly typed stuff everywhere
(like errors!)
15:25 -!- diltsman [n=diltsman@64.122.18.77] has joined #go-nuts
15:25 < dho> iant: are there already thoughts on how to handle signals?
15:26 < tonyg> Ycros, I'm tempted to agree, but that'd be inconsistent with
other kinds of zero in the system.  The problem, as always in languages like this,
is a confusion between a zero value and a non-value.  A Maybe-type would fix the
issue, but until there's generics that's not doable either
15:26 < tonyg> :(
15:26 < tonyg> Though, it doesn't prevent using strongly typed errors
15:26 < tonyg> it just means you have to be careful when returning
possibly-nil your-own-errors as os.Error
15:27 < tonyg> instead of "return myMaybeError" you "if myMaybeError == nil
{ return nil } return myMaybeError"
15:27 < Ycros> tonyg: yes, but the way I see it - interfaces already mask
whether the type underneath is a pointer or a value.  IDK.  I would find it nicer
15:27 < dho> iant: it looks like the -fplan9-extensions isn't working.
15:27 < Ycros> tonyg: and, yeah, that's a mistake someone could make
15:27 < Ycros> tonyg: infact, you made it just then didn't you
15:28 < dho> iant: compiling malloc.c shows some errors in malloc.h where
there's e.g.  struct MCentral { Lock;
15:28 < Ycros> I bet it's going to bite a lot of people
15:28 < diltsman> In the makefile on http://golang.org/doc/contribute.html
is there a way to add an additional -I flag to the call by make all?
15:29 < tonyg> Ycros, indeed i got segv's up the wazoo til i figured it out.
15:30 < tonyg> ...  and it was *not* easy to figure out
15:30 < tonyg> it is a highly surprising behaviour.
15:30 < tonyg> and i don't like it
15:30 -!- raichoo [n=raichoo@i577ACC04.versanet.de] has joined #go-nuts
15:31 < tonyg> it's just -- unless (interface{})(int(0)) == nil, it'd be
nasty and warty in a whole different way
15:31 < tonyg> hmm.  if it *compared* to nil as true, but could still be
cast out to the carried type, perhaps?
15:32 < tonyg> By the way, the other gotcha that caused segvs for me was the
compiler not warning me on accidental capture of variables in a closure.
15:32 < tonyg> accidental redeclaration, that is
15:33 < tonyg> > s := "hello"; (func () { s := 123; println(s); })();
println(s);
15:33 < rndbot> 123 hello
15:34 < Ycros> tonyg: very surprising
15:34 <+iant> dho: I'm heading out for a while, but -fplan9-extensions does
work when I build it; what could be different for your case?
15:34 < dho> I don't know, I see it in the command line, but it is not
applying
15:34 < Ycros> tonyg: yeah, I didn't reply to the thread further, because I
couldn't think of a nicer solution to the whole problem
15:34 -!- aarapov [n=aarapov@r2ah201.net.upc.cz] has joined #go-nuts
15:34 < dho> the struct polymorphism fails in every case
15:35 < Ycros> tonyg: if you think of one, do tell :P
15:35 -!- kaib [n=kaib@c-76-102-52-156.hsd1.ca.comcast.net] has joined #go-nuts
15:35 -!- mode/#go-nuts [+v kaib] by ChanServ
15:35 < rog> is there an easy/quick way of checking whether the value inside
an interface is nil?
15:35 < tonyg> Ycros, what do you think of the
compares-to-nil-as-true-but-is-still-castable idea?
15:35 < rog> (regardless of type)
15:35 < tonyg> it could easily be icky semantically
15:35 < Ycros> tonyg: that could work
15:35 < dho> then I also get things like /usr/include/pthread.h:222:6: note:
expected 'struct pthread_mutex **' but argument is of type 'struct
<anonymous> *'
15:35 < tonyg> rog, i think you might have to cast it out to the type you're
interested in!
15:35 < rog> yeah, i think i do
15:35 < dho> (and I'm guessing that's also because of -fplan9-extensions not
working)
15:35 < rog> just checking
15:36 < Ycros> tonyg: what I want (in order) 1) less surprising behaviour 2)
stronger typing (less casting!)
15:36 < rog> i do find it confusing that (interface{})(nil) != nil
15:36 < rog> particular if i'm not sure whether the struct member is or
isn't an interface
15:37 < tonyg> well,
15:37 < tonyg> > println( (interface{})(nil) == nil )
15:37 < rndbot> true
15:37 < tonyg> but,
15:37 < tonyg> > println( (interface{})(int(0)) == nil )
15:37 < rndbot> false
15:39 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has joined
#go-nuts
15:39 < rog> type F struct {f *F}; println((interface{})(F{}.f) == nil}
15:40 < rog> > type F struct {f *F}; println((interface{})(F{}.f) == nil}
15:40 < rndbot> <Error: syntax error near nil>
15:40 < rog> > type F struct {f *F}; println((interface{})(F{}.f) ==
nil);
15:40 < rndbot> false
15:41 < rog> tonyg: so nil on its own counts as an interface, but a typed
nil does not
15:41 < rog> tonyg: which is...  easy to get wrong
15:41 -!- Vova [n=Vova@80.178.10.177.adsl.012.net.il] has joined #go-nuts
15:43 < tonyg> rog, yes; yes it is :-) very easy...
15:43 < rog> i think that if there was a rule that (interface{})(nil) ==
nil, things would get much easier
15:43 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
15:44 < rog> i know it's not totally consistent, but it would work ok, i
think.
15:44 < JPascal> How to bind C functions in Go? Can`t find documentation.
:(
15:44 < tonyg> rog, what about (interface{})(int(0)) == nil ?
15:44 < tonyg> would you have that be true as well?
15:44 < rog> i think that's fine
15:44 < tonyg> yeah, i think it's maybe worth considering.
15:44 < rog> int(0) is not type compatible with nil
15:45 < tonyg> I can't immediately see a semantic problem with it
15:45 < rog> neither are struct values
15:45 -!- arquebus [n=shintaro@201.139.156.133.cable.dyn.cableonline.com.mx] has
joined #go-nuts
15:45 -!- drry [n=drry@unaffiliated/drry] has quit ["Tiarra 0.1+svn-35634M:
SIGTERM received; exit"]
15:46 -!- Loafers [n=loafers@unaffiliated/loafers] has quit [Read error: 60
(Operation timed out)]
15:46 < rog> the only thing is, it's permissible to have: func (f *Foo)()
where f is nil and it'll work
15:47 < rog> that's the semantic problem - you can't change such an instance
of f into an interface.
15:47 < rog> s/of f/of *Foo/
15:47 -!- kaigan|work
[n=kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has quit []
15:50 -!- diltsman [n=diltsman@64.122.18.77] has quit []
15:51 < rog> i wonder how useful that (i.e.  having a nil instance) actually
is though.
15:51 < rog> because it brings quite a lot of pain with it.
15:52 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
["Leaving."]
15:53 < rog> and if you still had the nil value -> nil interface rule,
it'd be easy to work around for the very few cases it's a problem.
15:53 < rog> i.e.  just put the value into a struct.
15:53 -!- diltsman_ [n=diltsman@64.122.18.77] has joined #go-nuts
15:53 -!- diltsman_ [n=diltsman@64.122.18.77] has quit [Client Quit]
15:55 < Ycros> rog: yeah, as I told tonyg - I raised this a while ago at
http://groups.google.com/group/golang-nuts/browse_thread/thread/21bfac3121e0edd2/e7fc32c907c3c177
15:55 -!- tibshoot [n=tibshoot@linagora-230-146.pr0.nerim.net] has quit ["Quitte"]
15:58 < rog> that's the exact thing.
15:58 < rog> russ's argument is a good one.
15:58 < rog> but...
15:58 < rog> it's awkward in practice!
15:59 -!- chickamade [n=chickama@123.16.79.248] has joined #go-nuts
15:59 -!- p4p4_ [n=P4p4@24.121.113.82.net.de.o2.com] has joined #go-nuts
16:02 < nickjohnson> Is there no way with the current http module to send
additional headers?
16:04 -!- chickamade [n=chickama@123.16.79.248] has quit [Client Quit]
16:05 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has quit
[Connection timed out]
16:13 -!- qbit_ [n=qbit_@c-75-71-160-106.hsd1.co.comcast.net] has joined #go-nuts
16:13 < dho> hm
16:13 < dho> i'm getting index out of range throwing a panic if i call
rand.Int63n(1<<24)
16:14 < Ycros> rog: yes.
16:14 -!- Freeaqingme| [n=dolf@145.74.181.68] has quit [Client Quit]
16:14 < dho> nm
16:14 < Ycros> rog: which is why I didn't push the argument further -
because I don't have a good solution apart from my original suggested
16:15 -!- crc_ [n=charlesc@c-68-80-139-0.hsd1.pa.comcast.net] has joined #go-nuts
16:15 < qbit_> anyone know if there is a vim plugin to zap the code in the
current buffer with gofmt?
16:15 -!- crc [n=charlesc@c-68-80-139-0.hsd1.pa.comcast.net] has quit [Read error:
60 (Operation timed out)]
16:17 < Ycros> qbit_: dunno, but if you join the dark side (emacs), the go
emacs plugin does it ;)
16:18 < qbit_> heh, figured they would have one already :P
16:18 < rog> Ycros: this issue is the reason there are so many different
checks against nil of different types in http://golang.org/src/pkg/go/ast/walk.go
16:18 < dho> http://gopaste.org/view/s4aNn Thoughts on why this would
segfault?  Looks like it's segfaulting in MCentral_Free, but it doesn't do it all
the time.
16:19 < Ycros> rog: nice catch!
16:19 < uriel> qbit_: isn't that something like !!gofmt?
16:19 < Ycros> rog: maybe it'd be worth writing a patch at this point, so
everyone can actually try it out instead of just talking over it - though i'm not
sure I'm skilled enough to do that at this point
16:20 < uriel> vim scripting is trocious, but something like this can't be
harder than a one line of code
16:20 < rog> Ycros: one possible, slightly grubby solution, to russ's email
is to let a nil interface be polymorphic - i.e.  a nil interface value can be cast
to a nil value of any pointer type.
16:20 < uriel> (in acme is just clicking on |gofmt)
16:21 < qbit_> uriel, maybe something like that :P - but I don't know what
it is
16:21 < rog> so his final tt := i.(T); would work...  but it's no longer
entirely type safe.
16:21 < uriel> well, that is why vim sucks so much, it is impossible to know
how to perform even the simplest task because the whole system is so ridiculously
complex
16:22 < dho> throw: bad gcref
16:22 < rog> in vim, can't you just do :%|gofmt ?
16:22 < vegai> I know it's sinful, but I just like syntax highlighting too
much to be able to use acme ;-/
16:22 < dho> grmbl
16:22 < Ycros> rog: hmm
16:23 < rog> or 1,$|gofmt it's ages since i used vi
16:23 < Ycros> isn't it :r!gofmt ?
16:23 < Ycros> idk
16:23 < rog> i think not!
16:23 < Ycros> I switched to emacs like a year or so ago
16:23 < uriel> nobody knows even 0.1% of vim's features, so...
16:24 < rog> well that one was in the original vi
16:24 < Ycros> mmm, I used vim
16:24 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has joined
#go-nuts
16:24 < rog> oh yes, i remember: go to the start of the file (1G), type
!Ggofmt<cr>
16:25 < dho> must be a go on freebsd bug
16:26 < dho> can't reproduce it in linux
16:26 < qbit_> nice
16:26 -!- smooge [n=smooge@int.smoogespace.com] has quit ["-ENOBRAIN"]
16:26 < qbit_> rog, that works
16:28 < qbit_> thanks :)
16:28 < rog> Ycros: ah, but then you can't do reflection on a nil type.
darn.
16:28 < rog> qbit_: n[
16:28 < rog> np
16:28 < Ycros> rog: yeaaaaah
16:29 < JPascal> iant: I have tried with function fork from C. While works
without censures.
16:29 < rog> but...  i still think it's worth special-casing
16:30 -!- path[l]_ [n=path@115.184.101.29] has joined #go-nuts
16:30 < Ycros> rog: I agree
16:30 < rog> nil is nil is nil and polymorphic in whatever form it's in.
16:30 < Ycros> rog: well, my other argument was that interfaces already mask
whether you have a value or a pointer type underneath
16:31 -!- WalterMundt [n=waltermu@twiki/developer/EtherMage] has joined #go-nuts
16:32 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has joined #go-nuts
16:33 < rog> Ycros: well they wouldn't in this proposal
16:36 < taruti> the interface nil things is *very* confusing
16:37 < taruti> "if val != nil { val.Foo() }" <- so this bad code with
interfaces?
16:37 -!- path[l] [n=path@115.184.17.149] has quit [Read error: 60 (Operation
timed out)]
16:37 -!- JPascal [n=jpascal@195.239.8.22] has left #go-nuts []
16:37 -!- mkanat [n=mkanat@c-67-188-1-39.hsd1.ca.comcast.net] has joined #go-nuts
16:37 < rog> taruti: not necessarily
16:38 < rog> taruti: it depends whether your Foo method can deal with a nil
receiver value
16:38 < rog> taruti: but the call itself will succeed
16:38 -!- elmar [n=elmar@188.107.216.107] has joined #go-nuts
16:38 < taruti> rog: in the non-interface context the receiver cannot be nil
if I understand correctly
16:39 < rog> taruti: it can be nil.
16:39 -!- snearch [n=olaf@g225055177.adsl.alicedsl.de] has joined #go-nuts
16:39 < taruti> hmm?  (slow today)
16:40 -!- fgb [n=fgb@190.246.85.45] has quit [Read error: 110 (Connection timed
out)]
16:40 < rog> > type Foo struct {}; func (f *Foo)() {print("hello")}; var
f *Foo; f.Foo()
16:40 < rndbot> <Error: (node CLOSURE) not used, f.Foo undefined (type
Foo has no field Foo)>
16:41 < rog> oh, can't do in-function method decls
16:41 < rog> anyway, the principal should work
16:41 -!- Anders_ [n=Anders@c83-253-2-206.bredband.comhem.se] has joined #go-nuts
16:41 < nickjohnson> Annoying, I wanted to use the http library to read from
Twitter, but I can't set headers:/
16:41 < rog> s/principal/principle/
16:42 < uriel> nickjohnson: IIRC there is an issue filled about that..
16:42 < hagna> nickjohnson: can't you change the source?
16:43 < nickjohnson> hagna: Sure, but then it'll break in the future
16:43 < taruti> rog: ok.  most languages don't allow such calls but seems
like the language specification says that is legal.
16:43 < taruti> deferencing nil being ok feels weird
16:44 < nickjohnson> rog: You're neither naming the function nor calling it,
so I don't see how that would work
16:44 < rog> sorry, i got my syntax wrong
16:45 < rog> > type Foo struct {}; func (f *Foo)P() {print("hello")}; var
f *Foo; f.P();
16:46 < rog> that works
16:46 < rndbot> <Error: syntax error near P, fatal error: automatic
outside function>
16:46 < rog> type Foo struct {}; func (f *Foo)P() int {print("hello")}; var
f *Foo; var g = f.P();
16:47 < rog> > type Foo struct {}; func (f *Foo)P() int {print("hello")};
var f *Foo; var g = f.P();
16:47 < rndbot> <Error: syntax error near P, fatal error: automatic
outside function>
16:47 < rog> anyway, it works in a normal go source file
16:47 < rog> 'cos i just tried it
16:50 < tonyg> rog, the bot doesn't let you define types :-/
16:51 < tonyg> or named functions
16:51 < tonyg> i think it's syntactically a block scope
16:52 < taruti> and according to the language specification one can call
methods like functions, so that makes the last objection go away
16:52 < taruti> "t.Mv(7) == T.Mv(t,7)" <- now it seems logical to allow
the nil
16:54 -!- spb [i=stephen@freenode/developer/exherbo.spb] has left #go-nuts []
16:56 -!- toumbia [n=toumbia@216.144.118.20] has joined #go-nuts
16:57 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has quit
[Connection timed out]
16:59 -!- path[l] [n=path@115.184.101.29] has quit [Connection timed out]
17:00 < rog> yeah it is
17:02 -!- kaib [n=kaib@c-76-102-52-156.hsd1.ca.comcast.net] has quit []
17:05 -!- Altercation [n=Altercat@pdpc/supporter/active/altercation] has left
#go-nuts []
17:07 -!- codedread [i=88b6021b@gateway/web/freenode/x-uaisdpexjwcsjifu] has
joined #go-nuts
17:09 < anticw> taruti: i dont think the current compilers implement that
though
17:10 -!- yoasif [n=asif@user-387h1cm.cable.mindspring.com] has joined #go-nuts
17:14 -!- djanderson [n=dja@hltncable.pioneerbroadband.net] has joined #go-nuts
17:15 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has joined
#go-nuts
17:15 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has quit [SendQ
exceeded]
17:16 -!- tsuwabuki [n=tsuwabuk@FLH1Aav065.kyt.mesh.ad.jp] has quit ["さようなら"]
17:19 -!- Anders__ [n=Anders@c83-253-2-206.bredband.comhem.se] has joined #go-nuts
17:20 -!- yoasif_ [n=asif@36.sub-75-238-54.myvzw.com] has joined #go-nuts
17:20 -!- decriptor [n=decripto@137.65.132.17] has joined #go-nuts
17:21 -!- JPascal [n=jpascal@78-106-26-155.broadband.corbina.ru] has joined
#go-nuts
17:28 -!- perdix [n=perdix@sxemacs/devel/perdix] has quit ["A cow.  A trampoline.
Together they fight crime!"]
17:28 -!- yoasif [n=asif@user-387h1cm.cable.mindspring.com] has quit [Read error:
54 (Connection reset by peer)]
17:29 -!- yoasif [n=asif@user-387h1cm.cable.mindspring.com] has joined #go-nuts
17:31 < tonyg> will readers from a chan always see every queued-up message
before seeing closed() go true?
17:33 -!- tonyg [n=tonyg@host238.lshift.net] has quit ["Leaving"]
17:33 -!- JPascal2 [n=jpascal@78-106-196-253.broadband.corbina.ru] has joined
#go-nuts
17:34 < JPascal2> .
17:34 -!- JPascal2 [n=jpascal@78-106-196-253.broadband.corbina.ru] has left
#go-nuts []
17:34 -!- JPascal2 [n=jpascal@78-106-196-253.broadband.corbina.ru] has joined
#go-nuts
17:35 -!- r2p2 [n=billy@v32671.1blu.de] has left #go-nuts []
17:36 -!- Anders_ [n=Anders@c83-253-2-206.bredband.comhem.se] has quit [Read
error: 110 (Connection timed out)]
17:36 -!- kne1p [n=Chris@HSI-KBW-091-089-008-044.hsi2.kabelbw.de] has joined
#go-nuts
17:39 -!- triplez [n=triplez@bb219-74-8-236.singnet.com.sg] has quit []
17:40 < taruti> What was the method of subscribing to the mailing list
without a Google account?
17:41 < poe> sending a mail to mailinglistname-subscribe@googlegroups.com
17:42 -!- kne1p [n=Chris@HSI-KBW-091-089-008-044.hsi2.kabelbw.de] has left
#go-nuts []
17:43 -!- JPascal [n=jpascal@78-106-26-155.broadband.corbina.ru] has quit [Read
error: 110 (Connection timed out)]
17:45 -!- yoasif_ [n=asif@36.sub-75-238-54.myvzw.com] has quit [Read error: 110
(Connection timed out)]
17:46 -!- kne1p [n=Chris@HSI-KBW-091-089-008-044.hsi2.kabelbw.de] has joined
#go-nuts
17:47 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
17:47 -!- Venom_X [n=pjacobs@cpe-67-9-131-167.austin.res.rr.com] has joined
#go-nuts
17:47 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
17:47 -!- kne1p [n=Chris@HSI-KBW-091-089-008-044.hsi2.kabelbw.de] has left
#go-nuts []
17:47 -!- malkomalko_ [n=malkomal@66-234-41-82.nyc.cable.nyct.net] has joined
#go-nuts
17:48 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
17:50 -!- rowdog [n=jth@h220.145.30.71.dynamic.ip.windstream.net] has joined
#go-nuts
17:53 -!- decriptor_ [n=decripto@137.65.229.179] has joined #go-nuts
17:53 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
17:53 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
17:53 -!- malkomalko [n=malkomal@66-234-41-82.nyc.cable.nyct.net] has quit [Read
error: 60 (Operation timed out)]
17:54 -!- decriptor [n=decripto@137.65.132.17] has quit [Read error: 110
(Connection timed out)]
17:54 -!- beneth`_ [n=beneth`@beneth.fr] has quit ["leaving"]
17:56 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed
out)]
17:57 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
17:57 -!- Anders_ [n=Anders@c83-253-2-206.bredband.comhem.se] has joined #go-nuts
17:59 -!- brrant [n=John@168-103-78-133.hlrn.qwest.net] has quit ["Leaving"]
18:00 -!- yoasif_ [n=asif@user-387h1cm.cable.mindspring.com] has joined #go-nuts
18:02 -!- yoasif [n=asif@user-387h1cm.cable.mindspring.com] has quit [No route to
host]
18:03 -!- perdix [n=perdix@g227156075.adsl.alicedsl.de] has joined #go-nuts
18:03 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
18:03 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
18:04 * tav waves
18:05 < tav> am ill and figured i'd see what the nutters were upto ;p
18:06 -!- kaib [n=kaib@c-76-102-52-156.hsd1.ca.comcast.net] has joined #go-nuts
18:06 -!- mode/#go-nuts [+v kaib] by ChanServ
18:08 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has joined #go-nuts
18:09 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
18:09 -!- hooopy [i=hoopy@173-30-98-140.client.mchsi.com] has joined #go-nuts
18:09 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
18:10 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
[Read error: 60 (Operation timed out)]
18:14 -!- kaib [n=kaib@c-76-102-52-156.hsd1.ca.comcast.net] has quit []
18:14 -!- Nanoo [n=Nano@95-89-198-45-dynip.superkabel.de] has quit ["Leaving"]
18:15 -!- Anders__ [n=Anders@c83-253-2-206.bredband.comhem.se] has quit [Read
error: 110 (Connection timed out)]
18:15 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has quit []
18:15 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
18:16 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
18:18 -!- bombuzal [n=sbus@77.75.105.87] has left #go-nuts []
18:21 -!- sku [n=sk@217.175.1.199] has joined #go-nuts
18:22 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
18:22 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
18:23 -!- willdye [n=willdye@fern.dsndata.com] has joined #go-nuts
18:24 -!- hooopy_ [i=hoopy@173-30-98-140.client.mchsi.com] has joined #go-nuts
18:24 < taruti> Is there any proposal already for handling out of memory
conditions with a simple "addOOMHandler(func())" and none of the exception
madness?
18:26 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed
out)]
18:26 -!- paul0 [n=paulogey@189.34.46.226] has joined #go-nuts
18:26 < paul0> or some reason i can't import "os" and "fmt"
18:27 < paul0> http://pastebin.ca/1700513
18:27 < paul0> what's wrong?
18:27 <+iant> paul0: usually your GOARCH is wrong; see the wiki page
mentioned in the channel topic
18:27 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
18:27 < paul0> my GOARCH is amd64
18:28 < paul0> and GOOS darwin
18:28 < dho> or GOOS or GOROOT
18:28 * dho grumbles
18:28 < Gracenotes> taruti: is it possible to go out of memory?
18:28 < dho> something's wrong in the memory allocator
18:29 < Vova> can i somehow get byte pointer of a string?
18:29 < Gracenotes> I thought the malloc module allocated without
consideration of limits.  and, by default, virtual memory allocation is limitless
18:29 < paul0> http://pastebin.ca/1700525
18:29 < Gracenotes> I've used setrlimit for the bot, albeit not caring so
much about what happens when that limit is reached
18:29 <+iant> Vova: you can convert a string to a []byte, but you can't get
a pointer into the string, and it wouldn't help much if you did
18:29 < paul0> here is my result for export | grep GO
18:30 <+iant> paul0: what command are you running to compile your program?
18:30 < Vova> thanks iant
18:30 < paul0> 6g file.go && 6l file.6
18:31 < Gracenotes> string.Bytes does the conversion by copying
18:31 < Gracenotes> strings
18:31 -!- rog [n=rog@78.148.16.235] has quit [Read error: 110 (Connection timed
out)]
18:32 < dho> paul0: and is there anything in
/Users/paulogeyer/go/pkg/darwin_amd64?
18:32 <+iant> paul0: the error message in your initial paste does not
correspond to the program you pasted
18:32 < paul0> dho: yes
18:33 -!- sku [n=sk@217.175.1.199] has quit []
18:33 -!- JPascal1 [n=jpascal@78-106-188-247.broadband.corbina.ru] has joined
#go-nuts
18:33 < JPascal1> How I can send signal to program by pid?
18:33 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
18:33 <+iant> JPascal1: I think the only way at present is syscall,Kill
18:33 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
18:34 -!- hooopy [i=hoopy@173-30-98-140.client.mchsi.com] has quit [Read error:
110 (Connection timed out)]
18:35 -!- hooopy [i=hoopy@173-30-98-140.client.mchsi.com] has joined #go-nuts
18:36 < paul0> in the Common Problems article from the wiki, it says only it
couldn't import fmt...
18:36 < Gracenotes> which you can send, for example, syscall.SIGKILL to
18:36 < paul0> but when i try to import only fmt, it works
18:36 <+iant> paul0: you need to show us the real example you tried to
compile and the error message
18:37 -!- path[l] [n=path@115.184.103.153] has joined #go-nuts
18:37 < paul0> oh
18:37 < JPascal1> iant,thanks.  How to me to catch signal?
18:38 < paul0> i've fixed...  it wasn't a problem with the import
18:38 <+iant> JPascal1: unfortunately there is no way to catch a signal in
Go at present
18:38 <+iant> This is a known omission
18:38 < paul0> i forgot to use ; in the end of line
18:38 < paul0> sorry, and thanks for the help
18:38 < JPascal1> iant, thanks)
18:39 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
18:40 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
18:40 < taruti> Gracenotes: e.g.  trying to malloc 5gb on a 32bit machine.
18:41 < Gracenotes> oh, I see.  so the OS says no, but only because you're
being somewhat insane :)
18:41 -!- hooopy_ [i=hoopy@173-30-98-140.client.mchsi.com] has quit [Read error:
110 (Connection timed out)]
18:41 < taruti> Gracenotes: but most practically people keep whining on the
mailing list that new should handle errors somehow.
18:42 < taruti> thus they could be pointed "there is a way, now shut up" :)
18:42 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed
out)]
18:43 <+iant> taruti: it strikes me as a reasonable approach
18:43 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
18:43 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has quit []
18:43 -!- yoasif_ [n=asif@user-387h1cm.cable.mindspring.com] has quit [No route to
host]
18:44 < Gracenotes> currently, it seems to be printf("mmap: errno=%p\n",
p);.  that's what I've gotten
18:44 < Gracenotes> from breaking rlimits, I mean
18:44 < Gracenotes> ..and then exit(2)
18:47 -!- JPascal [n=jpascal@78-106-196-253.broadband.corbina.ru] has quit [Read
error: 110 (Connection timed out)]
18:49 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
18:49 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
18:49 -!- hooopy [i=hoopy@173-30-98-140.client.mchsi.com] has quit [Remote closed
the connection]
18:52 -!- chrelad [n=chrelad@76.164.12.11] has joined #go-nuts
18:52 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has joined #go-nuts
18:52 -!- hooopy [i=hoopy@173-30-98-140.client.mchsi.com] has joined #go-nuts
18:53 < dho> how the FUCK can I possibly hit unlock of unlocked lock in
MCentral_AllocList->MCentral_Grow?!?!
18:53 < dho> the *only way* is if cas() is broken
18:53 < dho> unless i'm on crack
18:54 < Gracenotes> how is listty formed?  how memory get growed?
18:54 <+iant> dho: I concur: something must be wrong with lock
18:54 < dho> iant: the code is copied from linux, except using freebsd's
umtx which does the exact same thing futex does
18:55 < dho> iant: and nobody's touched cas()
18:55 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
18:55 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
18:55 < dagle> dho: Did you do I.crack() ? ;)
18:56 -!- lenst [n=user@81-237-244-185-no52.tbcn.telia.com] has joined #go-nuts
18:56 < dho> I'd wonder if its a red herring, but all the other bugs seem
indicative of lock issues as well
18:57 < dho> (i.e.  s->freelist is all of a sudden 0x3)
18:57 <+iant> is there any chance that memory is not getting zero
initialized when it should be?
18:57 < dho> maybe
18:58 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has joined
#go-nuts
18:59 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed
out)]
18:59 -!- todos [n=ttodos@195.160.234.10] has quit ["Ex-Chat"]
19:00 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has quit [SendQ
exceeded]
19:00 < paul0> what would be the equivalent to "array[i] = var" in Go?
19:00 < dho> iant: it doesn't look like mheap.c zeroes MSpans
19:00 < dho> hm
19:00 < dho> no, it does
19:00 -!- decriptor [n=decripto@137.65.229.179] has quit ["Ex-Chat"]
19:00 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:01 -!- decriptor [n=decripto@137.65.132.17] has joined #go-nuts
19:01 <+iant> paul0: array[i] = var works in Go
19:01 < paul0> "non-name numeros[i] on left side of :="
19:01 <+iant> paul0: array[i] := var does not work in Go; array[i] = var
does work
19:01 < paul0> oh
19:02 < paul0> what is the difference between := and =?
19:02 <+iant> := declares and initializes a new variable; = assigns a value
to an existing l-value
19:02 <+iant> This is covered in the tutorial
19:03 < paul0> it's a new concept for me
19:03 < paul0> never seen that before
19:03 < dagle> You don't need to use it.
19:04 <+iant> Go is not the first language to use :=, but it is not a widely
used idea
19:04 <+iant> in any case, I really encourage you to read the tutorial
19:05 < dagle> paul0: It just remove the redundancy in variable declaration.
19:05 -!- elmar [n=elmar@188.107.216.107] has quit ["Leaving"]
19:05 * dho goes to shoot himself
19:05 < paul0> thanks :)
19:05 < paul0> how to i convert a string to integer?
19:05 * dagle steals dho's bullets.
19:05 <+iant> strconv.Atoi
19:05 < dho> you read the documentation.
19:05 < hstimer> iant: why not just use = and always have the compiler try
and derive type; when it can't then give an error
19:06 <+iant> hstimer: because if you mistype the variable name the compiler
won't notice
19:06 <+iant> providing both := and = is a cost/benefit decision
19:06 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
19:07 <+iant> there are languages which only have =
19:07 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:07 < Gracenotes> does the compiler still complain if you have unused
variables?
19:07 < hstimer> yes, that is a bit of headache in languages like ruby et al
but not that much of a big deal in practice
19:07 <+iant> Gracenotes: yes
19:07 <+iant> hstimer: as I say, it's a cost/benefit decision
19:07 < JBeshir> hstimer: I find it remarkably annoying and hate every
language which doesn't require declaration, myself
19:07 <+iant> ultimately one just has to decide
19:08 < Gracenotes> iirc that fucking annoying error was put in place so
people wouldn't confuse = and :=.
19:08 < Gracenotes> there's no other sane reason it would be in there
19:08 <+iant> that is basically correct, yes
19:08 <+iant> but for the reverse confusion, using := when you meant =
19:08 < Gracenotes> (if that even qualifies as a sane reason)
19:09 < Gracenotes> there is a "warn" function for a reason, you know
19:10 < Gracenotes> anyway, though, philosophy class..  so need laptop :/ be
back after that, though :)
19:11 < Gracenotes> (and rndbot too, sorry)
19:13 < paul0> i've tried to use strconv.Atori(flag.Arg(1)), and i receive
this error: numeros[i] = strconv.Atoi(flag.Arg(i));
19:13 < paul0> i mean
19:13 < paul0> multiple-value strconv.Atoi() in single-value context
19:13 <+iant> paul0: I would encourage you to spend a bit more time reading
the documentation
19:14 < paul0> ok ok
19:14 -!- Gracenotes [n=person@wikipedia/Gracenotes] has quit [Remote closed the
connection]
19:14 < paul0> thanks for the help :)
19:15 -!- rndbot [n=bot@wikipedia/Gracenotes] has quit [Remote closed the
connection]
19:15 -!- reubens [n=reubens@c-66-235-53-139.sea.wa.customer.broadstripe.net] has
joined #go-nuts
19:16 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed
out)]
19:16 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:18 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has joined
#go-nuts
19:19 < JPascal1> How I can write message in syslog?
19:21 < reubens> i don't understand how to write general purpose containers
in go, i got as far as thinking you would take an empty interface when you store
something, but then how does the user get the right type back when they retrieve
it?
19:21 < rovar> anyone here familiar with reflect?  I am passed an
interface{} which , in this case is a map type.  I need to make a new map which is
the type of the map that is passed in.
19:21 <+iant> reubens: val.(type)
19:22 <+iant> rovar: reflect.MakeZero
19:22 < rovar> thanks
19:22 <+iant> rovar: actually, see also reflect.MakeMap
19:22 < reubens> iant: do we lose all static typechecking here?
19:22 <+iant> reubens: no....
19:22 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
19:23 <+iant> val.(type) only succeeds if the value really is that type
19:23 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:23 < rovar> iant: yea..  I'm using that one..  but it doesn't initialize
the result, correct?
19:23 < rovar> hrrm..  maybe it does.
19:23 < reubens> iant: but it fails at runtime, no?
19:23 <+iant> rovar: MakeMap should give you more or less what make(map[K]V)
does
19:23 <+iant> reubens: yes, it fails at runtime
19:24 -!- melba [n=blee@unaffiliated/lazz0] has quit [Read error: 113 (No route to
host)]
19:24 < rovar> kay
19:24 <+iant> reubens: oh, sorry, you're right, you do lose static type
checking
19:24 <+iant> the type checking in that case is dynamic
19:24 < reubens> okay, i guess that's fine, it's just not quite what i
expected
19:24 < rovar> so I have:
19:24 < rovar> nmap :=
reflect.MakeMap(reflect.Typeof(m).(*reflect.MapType)); omap :=
reflect.NewValue(reflect.Typeof(m).(*reflect.MapType));
19:24 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit ["Leaving."]
19:25 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts
19:25 < rovar> actually..  omap isn't right yet.
19:26 -!- gasreaa [n=atwong@nat/slide/x-yswpgrevokqkltti] has joined #go-nuts
19:27 < JPascal1> Can I store message in SysLog on Linux?
19:29 -!- kiva [n=quassel@r220-101-159-148.cpe.unwired.net.au] has joined #go-nuts
19:29 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
19:29 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:32 -!- werdan7 [n=w7@freenode/staff/wikimedia.werdan7] has quit [SendQ
exceeded]
19:32 -!- rog [n=rog@78.148.16.235] has joined #go-nuts
19:33 < rovar> iant: http://gopaste.org/view/uo5NO
19:33 < rovar> my problem is: cloneable2.go:21: int is not reflect.Value
missing Type() (reflect.Type)
19:34 < rovar> the CloneMap function is an attempt to make a generic
function that copies any map
19:34 <+iant> nmap.SetElem(reflect.NewValue(k), omap.Elem(k))
19:35 <+iant> I don't know if it will work, but it will get past that error
message
19:35 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
19:35 <+iant> actually, wait
19:35 <+iant> don't do that
19:35 < rovar> but k already is a Value
19:35 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:35 < rovar> that's the wierd part
19:35 <+iant> the problem is that you need to write "for _, k := range Keys"
19:35 < rovar> ?
19:36 < rovar> oh..  yes
19:36 < rovar> you're right
19:36 < kimelto> morning!
19:36 < rovar> hah..  so i got the crazy reflect stuff right..  just screwed
up the basic syntax :)
19:36 < dho> hi
19:37 -!- paul0 [n=paulogey@189.34.46.226] has quit []
19:37 < rovar> iant: now it compiles..  but line 18 fails with an interface
conversion: interface{} is not a MapValue (which is true..  but...)
19:38 < rovar> oh..  that's wrong..  it's in my Clone functions..
19:39 < rovar> argh..  so close..  so returning from the functions, it says
that the interface is MapValue..  which can't be cast back into MapA or MapB
19:39 < plexdev> http://is.gd/5btq4 by [Robert Griesemer] in
go/src/pkg/go/doc/ -- - include type-associated consts and vars when filtering a
PackageDoc
19:39 -!- ryniek [n=RYNIEK@host-89-231-120-113.warszawa.mm.pl] has quit [Remote
closed the connection]
19:40 <+iant> rovar: call Interface() on the map value to get something you
can cast
19:41 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
19:41 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:42 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has quit
["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
19:45 < rovar> iant: I don't exactly follow
19:45 < rovar> how would I use that function?
19:46 <+iant> If v is a reflect.Value, which includes a MapValue, you can
call v.Interface to get a value of type interface{}
19:46 -!- sum-it [i=7afcf20f@gateway/web/freenode/x-ykvyjophyczirwsp] has joined
#go-nuts
19:46 <+iant> so you would use something like v.Interface().(MyMapType)
19:46 < rovar> hrrm..
19:48 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
19:48 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:54 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
19:54 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:55 < rovar> haha
19:55 < rovar> fixed!: http://gopaste.org/view/Vdu39
19:55 < rovar> thanks for your help
19:55 <+iant> congrats
19:55 < rovar> man I can't wait for generics
19:56 <+iant> after all that work?
19:56 < Vova> Go simple chat,
http://korprg.blogspot.com/2009/12/go-simple-chat.html
19:58 -!- reubens [n=reubens@c-66-235-53-139.sea.wa.customer.broadstripe.net] has
quit [Client Quit]
20:00 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
20:00 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
20:02 -!- Xavi [n=Xavi@66-191-181-152.dhcp.gnvl.sc.charter.com] has joined
#go-nuts
20:02 -!- gnuvince [n=vince@64.235.207.85] has quit ["What the fruit is goin' on
here!?"]
20:02 -!- gnuvince [n=vince@64.235.207.85] has joined #go-nuts
20:03 -!- aho [n=nya@f051150022.adsl.alicedsl.de] has joined #go-nuts
20:03 -!- Xavi [n=Xavi@66-191-181-152.dhcp.gnvl.sc.charter.com] has quit [Client
Quit]
20:04 -!- brrant [n=John@168-103-78-133.hlrn.qwest.net] has joined #go-nuts
20:04 -!- directrixx [n=aleksand@ip68-231-189-247.tc.ph.cox.net] has joined
#go-nuts
20:05 -!- gasreaa [n=atwong@nat/slide/x-yswpgrevokqkltti] has left #go-nuts []
20:05 -!- ritolatu [n=ritolatu@dsl-olubrasgw1-fe54fb00-201.dhcp.inet.fi] has
joined #go-nuts
20:06 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
20:06 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
20:11 -!- sum-it [i=7afcf20f@gateway/web/freenode/x-ykvyjophyczirwsp] has quit
["Page closed"]
20:11 -!- Venom_X [n=pjacobs@cpe-67-9-131-167.austin.res.rr.com] has quit []
20:13 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
20:13 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
20:19 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
20:19 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
20:19 < Vova> is there a way to code async sockets?
20:20 -!- illya77 [n=illya77@148-153-133-95.pool.ukrtel.net] has joined #go-nuts
20:22 < hagna> Vova: like the kind that don't block?
20:23 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed
out)]
20:23 < Vova> yea, like with Kqueue or epoll
20:24 < hagna> yeah I'd like to know that too someone said they use epoll
and kqueue internally
20:24 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
20:24 < rovar> goroutines are actually event driven when using io
20:25 < dho> hagna: they do
20:25 < rovar> but their coroutine nature hides the event handling for your,
so it feels like a blocking socket.
20:25 < dho> but you can certainly use syscall.Kqueue / sycall.Epoll
natively.
20:26 -!- keeto [n=keeto@121.54.92.149] has quit [Read error: 113 (No route to
host)]
20:27 -!- keeto_ [n=keeto@121.54.92.149] has joined #go-nuts
20:27 < Vova> Kqueue is faster then epoll right?
20:27 < reppie> they're just different APIs
20:27 < dho> for different operating systems.
20:27 < taruti> Vova: depends on how many clients you have.
20:28 < dho> it depends on too many factors to draw a good conclusion.
20:28 < taruti> Vova: on a small number of clients classical select(2) will
be the fastest usually
20:28 < rovar> kqueue is for freebsd, epoll is for linux
20:28 < rovar> unless i'm missing something
20:28 -!- arquebus [n=shintaro@201.139.156.133.cable.dyn.cableonline.com.mx] has
quit [Remote closed the connection]
20:28 < reppie> i personally like kqueue better
20:29 < dho> rovar: darwin has kqueue
20:29 < dho> and so do the other bsds
20:29 < dho> iant: does this look `bad' to you?
20:29 < dho> (gdb) x/x 0x45c3d0
20:29 < dho> 0x45c3d0 <mheap>: 0x00000000
20:29 < rovar> dho, darwin ~= fbsd :)
20:29 < dho> not really
20:29 < rovar> err.  bsd
20:30 -!- keeto [n=keeto@121.54.92.149] has quit [Read error: 104 (Connection
reset by peer)]
20:30 -!- keeto_ [n=keeto@121.54.92.149] has joined #go-nuts
20:30 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
20:31 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
20:31 < taruti> using epoll or kqueue is not worth it for most applications
(of course libraries underneath can use them when it makes sense)
20:31 < dho> I guess that would be MHeap.(Lock)
20:31 -!- plainhao [n=plainhao@mail.xbiotica.com] has quit []
20:32 < dho> but that doesn't make sense.
20:32 < taruti> e.g.  forking breaks epoll in evil ways
20:32 < dho> that would mean that (Lock)mheap.key is 0
20:33 < dho> or
20:33 < dho> ((Lock)mheap).key rather
20:34 * dho hrms
20:34 -!- directrixx [n=aleksand@ip68-231-189-247.tc.ph.cox.net] has quit
["Adios"]
20:34 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed
out)]
20:36 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
20:36 -!- JPascal1 [n=jpascal@78-106-188-247.broadband.corbina.ru] has left
#go-nuts []
20:36 < dho> meh, little endian, x/2x yields 0x00000001 0x00000000.  duh
20:40 -!- leitaox [n=leitaox@189.20.94.66] has joined #go-nuts
20:42 < anticw> dho: the linux 2.4.x issue ...  there is a way we can
probably have the runtime detect the clone failure and have a fallback mode
20:42 < anticw> dho: but honestly, i would prefer we didn't ...  it's
supporting something very old and ugly
20:42 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
20:42 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
20:42 < dho> i don't know why clone should fail
20:43 < dho> args on i386 and amd64 in linux are passed in registers
20:43 < anticw> because 2.4.x can't clone tid
20:43 < dho> we don't ask it to
20:43 < anticw> unless you have 2.4.20+ from RH
20:43 < anticw> mainline never had that
20:43 < anticw> so you can close w/o that and then do some uglies
20:43 < dho> the person who is running that is using RH 2.4.22
20:44 < anticw> but really it means we have a different behavior in some
cases ...  so any bugs in the area would muddied potentially
20:44 < dho> i don't know why it doesn't work
20:44 < dho> and i don't have a 2.4 system to try it on
20:44 < anticw> i did a threading lib once in the past and had to make it
work
20:44 < anticw> i forget detials now, it was a long time ago
20:44 < dho> and on top of that, I'm trying to figure out why I'm getting
errors in memory allocation with this really really simple code
20:44 < anticw> i really don't want to confuse/muddy things for the sake of
something ancient
20:44 -!- snearch [n=olaf@g225055177.adsl.alicedsl.de] has quit ["Ex-Chat"]
20:44 < anticw> i mean, how far do we go?
20:45 < anticw> do we one windows is merged regress parts of that so win95
works?
20:45 < anticw> it's almost 2010 ...
20:46 < dho> russ didn't initially want to accept that ticket
20:46 * dho is going to shoot self
20:47 < dho> anticw: you don't happen to have a freebsd/amd64 machine do
you?
20:48 -!- aarapov [n=aarapov@r2ah201.net.upc.cz] has quit ["Leaving."]
20:48 < anticw> dho: not this second, i can get one (in a vm) though w/o
that much effort
20:49 < WalterMundt> is it bad if runtime.Caller(...) SIGSEGV's?  I'm trying
to build a stack and was relying on being able to just call it with increasing
levels until it starts returning ok = false
20:49 < dho> if you could, it would be nice to see if this can be reproduced
20:50 < fenicks> hello
20:52 < WalterMundt> dho: If you're speaking to me, I'm rebuilding after
pull -u and seeing if the issue persists.  If it does then I'll play with boiling
it down
20:52 < dho> WalterMundt: was talking to anticw
20:52 < WalterMundt> k
20:52 < dho> sorry
20:53 -!- Cyanure [n=cyanure@212-198-164-142.rev.numericable.fr] has joined
#go-nuts
20:53 -!- perdix [n=perdix@sxemacs/devel/perdix] has quit [Read error: 104
(Connection reset by peer)]
20:53 -!- tobel [n=tobel@p4FDCA38D.dip.t-dialin.net] has joined #go-nuts
20:53 -!- perdix [n=perdix@g227156075.adsl.alicedsl.de] has joined #go-nuts
20:56 < plexdev> http://is.gd/5by7C by [Christopher Wedgwood] in
go/src/cmd/gc/ -- gc: Allow allow data types up to 1GB
20:56 < plexdev> http://is.gd/5by7G by [Rob Pike] in 3 subdirs of
go/src/pkg/ -- Add ReadFrom and WriteTo methods to bytes.Buffer, to enable i/o
without buffer allocation.
20:57 -!- TMinus36 [n=serverz@pdpc/supporter/student/tminus36] has joined #go-nuts
20:57 < Fringehead> Is there an OpenGL package in the works somewhere?
20:58 -!- werdan7 [n=w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
20:59 -!- stevenyvr [n=schan@76-10-184-108.dsl.teksavvy.com] has joined #go-nuts
21:01 -!- mbarkhau [n=koloss@p54A7F00B.dip.t-dialin.net] has joined #go-nuts
21:02 -!- mitchellh [n=mitchell@D-69-91-143-37.dhcp4.washington.edu] has joined
#go-nuts
21:03 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has joined
#go-nuts
21:03 < Vova> why does kevn := new(syscall.Kevent_t); isnt compiling?
21:04 -!- kiva [n=quassel@r220-101-159-148.cpe.unwired.net.au] has quit [No route
to host]
21:04 < dho> what OS are you using?
21:04 -!- amuck_ [n=amuck_@rrcs-76-79-44-2.west.biz.rr.com] has quit []
21:08 < WalterMundt> looks like my issue is same as 176; is there any way to
reopen, or will someone do that now that I've commented on it?
21:10 -!- hd_ [n=hd_@253.176.233.220.static.exetel.com.au] has joined #go-nuts
21:12 -!- tobel [n=tobel@p4FDCA38D.dip.t-dialin.net] has quit ["WeeChat 0.3.0"]
21:12 <+iant> WalterMundt: I flipped the state back to New
21:12 -!- illya77 [n=illya77@148-153-133-95.pool.ukrtel.net] has quit []
21:15 -!- malkomalko [n=malkomal@66-234-41-82.nyc.cable.nyct.net] has quit [Read
error: 110 (Connection timed out)]
21:15 < WalterMundt> iant: much appreciated
21:16 -!- p4p4_ [n=P4p4@24.121.113.82.net.de.o2.com] has quit [Client Quit]
21:17 -!- leitaox [n=leitaox@189.20.94.66] has quit [Client Quit]
21:17 -!- malkomalko [n=malkomal@66-234-41-82.nyc.cable.nyct.net] has joined
#go-nuts
21:19 -!- mitchellh [n=mitchell@D-69-91-143-37.dhcp4.washington.edu] has quit
["Leaving."]
21:20 -!- stevenyvr [n=schan@76-10-184-108.dsl.teksavvy.com] has quit [Read error:
113 (No route to host)]
21:21 -!- carllerche [n=carllerc@enginey-9.border1.sfo002.pnap.net] has joined
#go-nuts
21:21 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has quit []
21:22 -!- hd_2 [n=hd_@253.176.233.220.static.exetel.com.au] has quit [Connection
timed out]
21:23 -!- Zanith [n=Zanith@1337.h4ck3rs.pinged.us] has joined #go-nuts
21:27 -!- rhelmer [n=rhelmer@adsl-69-107-65-140.dsl.pltn13.pacbell.net] has joined
#go-nuts
21:28 < Vova> how can i get tcplistener fd?
21:29 < Vova> socket int?
21:31 < WalterMundt> Vova: you can't; net.TCPListener struct's fd member is
unexported
21:32 < dho> man i wish running this under ktrace would give me one of the
panics
21:33 < dho> this is the most frustrating bug i've ever dealt with
21:34 -!- lux` [n=lux@151.54.242.220] has quit [Remote closed the connection]
21:36 < Zanith> Is there any resources other than golang?
21:36 < carllerche> Is cgo the only way to call a C function from Go? I read
on the documentation that it should be possible if the C file was compiled with
6c, but i can't figure out how
21:37 < taruti> Vova: what are you trying to do?
21:37 < taruti> Zanith: http://go-lang.cat-v.org/
21:38 -!- crashR [n=crasher@codextreme.pck.nerim.net] has quit [Read error: 113
(No route to host)]
21:38 < WalterMundt> carllerche: check out $GOROOT/src/pkg/runtime
21:39 < Vova> taruti: sockets using epoll
21:39 < WalterMundt> a good chunk of that is implemented in C/compiled by
6c/8c, and linked in directly
21:39 < carllerche> WalterMundt: I've browsed through it, but I'm having a
hard time figuring out exactly how it's being called.  I'll look more closely
though, thanks for the tip
21:40 -!- sliceofpi1 [n=Adium@c-98-194-205-176.hsd1.tx.comcast.net] has joined
#go-nuts
21:41 < WalterMundt> Vova: I may be wrong, but I think you'll either have to
hack the net package to make the data public or add an accessor, use unsafe.* to
extract it by pointer magic, or dupe the functionality in
net/sock.go/ipsock.go/tcpsock.go by making the syscall to socket() yourself
21:41 -!- perdiy [n=perdix@sxemacs/devel/perdix] has joined #go-nuts
21:42 < Vova> O_o
21:42 < dho> i'm officially unable to figure this out
21:42 < dho> unlocking unlocked lock is not possible.
21:42 < carllerche> WalterMundt: yeah, it seems that stuff in the runtime
package still go through cgo
21:42 < dho> i caught it in the act in ktrace and all the locking is
balanced.
21:42 < WalterMundt> oh, my mistake
21:43 <+iant> dho: memory corruption of the lock word?
21:43 < carllerche> i'm just not a fan of writing C in Go comments :P
21:43 < dho> iant: all the addresses look ok, and i can reproduce this on
other systems
21:43 < dho> (just freebsd)
21:43 * dho wonders what would trample on lock->key
21:44 -!- sliceofpi [n=Adium@c-98-194-205-176.hsd1.tx.comcast.net] has quit [Read
error: 104 (Connection reset by peer)]
21:44 < WalterMundt> carllerche: wait a minute...
21:44 <+iant> dho: I suppose valgrind is not going to recreate the bug....
21:44 < WalterMundt> carllerche: there is SOME cgo in runtime
21:44 < dho> iant: ktrace already makes it near impossible
21:45 < dho> iant: i'll see if i can get valgrind running in the first place
21:45 -!- abford [n=abford@unaffiliated/abford] has joined #go-nuts
21:45 < WalterMundt> carllerche: but if you make clean; make in runtime,
you'll see a ton of the files are getting built by 8c
21:45 < carllerche> as far as i can tell, all the functions in *.c files get
called from cgo files
21:45 -!- rhelmer_ [n=rhelmer@adsl-69-107-65-140.dsl.pltn13.pacbell.net] has
joined #go-nuts
21:45 < WalterMundt> ahh; guess you have to do that.  note that there is
less overhead for functions compiled by 6c/8c
21:45 < carllerche> i'll keep looking
21:46 < dho> whaddayaknow, we have a valgrind package these days
21:46 < carllerche> WalterMundt: there is a cgo2c executable in the runtime
directory though
21:46 -!- crashR [n=crasher@codextreme.pck.nerim.net] has joined #go-nuts
21:47 -!- rhelmer [n=rhelmer@adsl-69-107-65-140.dsl.pltn13.pacbell.net] has quit
[Read error: 60 (Operation timed out)]
21:47 < dho> > valgrind --leak-check=full --track-origins=yes ./6.out a b
c d
21:47 < dho> valgrind: mmap(0x400000, 4291047424) failed in UME with error
22 (Invalid argument).
21:47 < dho> valgrind: this can be caused by executables with very large
text, data or bss segments.
21:47 < dho> sweet.
21:47 <+iant> oy
21:47 <+iant> carllerche: the cgo2c program turns X.cgo into X.c
21:47 < taruti> Vova: for which application do you need them?
21:48 < taruti> Vova: using epoll safely is very non-trivial
21:48 < carllerche> iant: is cgo2c not something for public consumption?
21:49 <+iant> carllerche: it's kind of special purpose, but there is nothing
wrong with using it if you want to
21:50 < carllerche> iant: do you know if the weird unicode dot character in
the C method name how Go knows that the function is in a package?
21:50 < carllerche> or is it just arbitrary
21:51 <+iant> carllerche: if you have the function F in the package P, Go
will write out a symbol P·F
21:51 < KirkMcDonald> MIDDLE DOT U+00B7
21:51 <+iant> so if you want to write a function in C which is callable from
Go, you need to use the center dot in the name
21:51 < WalterMundt> thus the cgo2c, so humans don't need to type the
center-dot
21:52 < WalterMundt> right?
21:52 < KirkMcDonald> That reminds me.
21:52 <+iant> well, sort of; the center dot is typed by humans in some
places
21:52 < KirkMcDonald> I wish Go had Python's \N string-escape sequence.
21:52 < KirkMcDonald> That is, "\N{MIDDLE DOT}".
21:52 <+iant> I actually wrote cgo2c in the first place in order to generate
different wrapper code for 6g and gccgo, since gccgo doesn't use the center dot
21:52 < Zanith> Oh, another question, are there any Go IDEs yet?
21:52 < KirkMcDonald> Zanith: There is vim.
21:53 < WalterMundt> I wonder what they'll do when they do go to resolve the
issue with packages in different places with the same name
21:53 <+iant> 6g will rewrite the package names in the linker
21:53 <+iant> gccgo will do something horrible involving GUIDs, I think
21:53 -!- codedread [i=88b6021b@gateway/web/freenode/x-uaisdpexjwcsjifu] has left
#go-nuts []
21:54 < WalterMundt> huh
21:54 <+iant> that more or less sums it up, yes
21:54 < WalterMundt> how will it know whether package foo in .8 file bar is
baz/foo or fron/foo?
21:55 < taruti> Zanith: http://go-lang.cat-v.org/text-editors/
21:55 <+iant> that I don't know
21:55 -!- mmw [n=mmw@2002:51f4:7f90:0:223:6cff:fe84:1914] has joined #go-nuts
21:55 < dho> unless the kernel tromps on it somehow
21:55 < dho> but i don't see any copyout
21:56 < WalterMundt> maybe the compiler can rewrite imported symbols to
include path info
21:56 < WalterMundt> and then we just need to hope that if two files import
the same full import path, they mean the same package
21:57 -!- JSharpe [n=jamie@5adaea8d.bb.sky.com] has quit [Read error: 104
(Connection reset by peer)]
21:57 -!- hooopy [i=hoopy@173-30-98-140.client.mchsi.com] has quit [Read error:
110 (Connection timed out)]
21:58 < carllerche> Go doesn't have header files, so how do I tell it that I
defined a function in a different file?
21:58 < carllerche> do I make it a different package?
21:59 <+iant> carllerche: you can only functions defined in packages which
you import
21:59 <+iant> carllerche: oh, you mean a C function
21:59 <+iant> carllerche: see, e.g., runtime/extern.go
21:59 < carllerche> yeah..  but I named it int32 main·Hello()
21:59 < carllerche> ok
21:59 <+iant> the main package is kind of special, I recommend trying
something else
22:02 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has quit [Remote closed the
connection]
22:02 -!- perdix [n=perdix@sxemacs/devel/perdix] has quit [Read error: 110
(Connection timed out)]
22:03 -!- nigwil [n=chatzill@berkner.ccamlr.org] has joined #go-nuts
22:04 -!- mikedee [n=quassel@91.108.122.173] has quit [Remote closed the
connection]
22:04 -!- mike [n=quassel@91.111.23.128] has joined #go-nuts
22:04 -!- mike [n=quassel@91.111.23.128] has quit [Remote closed the connection]
22:07 -!- mmw [n=mmw@2002:51f4:7f90:0:223:6cff:fe84:1914] has quit []
22:07 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has
joined #go-nuts
22:10 -!- qbit__ [n=qbit_@c-75-71-160-106.hsd1.co.comcast.net] has joined #go-nuts
22:12 -!- qbit_ [n=qbit_@c-75-71-160-106.hsd1.co.comcast.net] has quit [Read
error: 60 (Operation timed out)]
22:15 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has joined #go-nuts
22:15 -!- rovar [i=c7aca911@gateway/web/freenode/x-sfpyqafpqvsswnno] has quit
["Page closed"]
22:15 -!- decriptor [n=decripto@137.65.132.17] has quit ["Ex-Chat"]
22:19 -!- brrant [n=John@168-103-78-133.hlrn.qwest.net] has quit ["Leaving"]
22:19 -!- Adys [n=Adys@unaffiliated/adys] has joined #go-nuts
22:20 -!- brunov [n=bruno@190.191.110.64] has quit [Read error: 110 (Connection
timed out)]
22:24 -!- path[l]_ [n=path@115.184.38.101] has joined #go-nuts
22:26 -!- amuck_ [n=amuck@h11.78.88.75.dynamic.ip.windstream.net] has joined
#go-nuts
22:32 -!- path[l]__ [n=path@115.184.77.83] has joined #go-nuts
22:33 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has quit ["KVIrc
Insomnia 4.0.0, revision: , sources date: 20090520, built on: 2009/06/06 11:44:47
UTC http://www.kvirc.net/"]
22:33 -!- brrant [n=John@168-103-78-133.hlrn.qwest.net] has joined #go-nuts
22:34 -!- Anders_ [n=Anders@c83-253-2-206.bredband.comhem.se] has quit ["Leaving"]
22:37 -!- lenst` [n=user@81-237-244-185-no52.tbcn.telia.com] has joined #go-nuts
22:39 -!- itrekkie [n=itrekkie@ip72-200-105-72.tc.ph.cox.net] has joined #go-nuts
22:39 -!- afurlan [n=afurlan@scorpion.mps.com.br] has quit ["Leaving"]
22:40 -!- amuck [n=amuck@h158.70.88.75.dynamic.ip.windstream.net] has quit [Read
error: 110 (Connection timed out)]
22:40 -!- LuitvD [n=LuitvD@beigetower/luitvd] has joined #go-nuts
22:41 < LuitvD> this might be a stupid question:
22:41 -!- itrekkie_ [n=itrekkie@ip72-200-105-72.tc.ph.cox.net] has joined #go-nuts
22:41 < LuitvD> what should my Makefile look like to build a cgo project?
22:42 < LuitvD> I presume the Make.cmd file has some handy stuff for that...
22:44 -!- amuck_ [n=amuck@h11.78.88.75.dynamic.ip.windstream.net] has quit
[Connection timed out]
22:48 -!- path[l] [n=path@115.184.103.153] has quit [Read error: 110 (Connection
timed out)]
22:48 -!- entropy_sam [n=sam@cpc3-york2-0-0-cust567.leed.cable.ntl.com] has joined
#go-nuts
22:49 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has joined #go-nuts
22:52 < drhodes> LuitvD: maybe this is worth checking out,
http://github.com/banthar/Go-SDL
22:53 -!- lenst [n=user@81-237-244-185-no52.tbcn.telia.com] has quit [Read error:
110 (Connection timed out)]
22:55 -!- ShadowIce [n=pyoro@unaffiliated/shadowice-x841044] has quit
["Verlassend"]
22:56 < entropy_sam> anyone know of any Go/OpenGL projects?
22:56 -!- path[l]_ [n=path@115.184.38.101] has quit [Read error: 110 (Connection
timed out)]
22:57 -!- itrekkie [n=itrekkie@ip72-200-105-72.tc.ph.cox.net] has quit [Read
error: 110 (Connection timed out)]
22:59 -!- raichoo [n=raichoo@i577ACC04.versanet.de] has quit
["http://raichoo.blogspot.com"]
23:00 -!- lenst`` [n=user@81-237-244-185-no52.tbcn.telia.com] has joined #go-nuts
23:03 < rog> is there a way to run all.bash without the make clean bit?
23:04 < KirkMcDonald> rog: Run make.bash instead?
23:05 -!- Whtiger [n=josh@c-68-60-92-33.hsd1.mi.comcast.net] has quit [Read error:
110 (Connection timed out)]
23:06 < rog> make.bash runs clean.bash
23:06 -!- CaptainLucifel [n=captainl@75.84.196-77.rev.gaoland.net] has quit [Read
error: 113 (No route to host)]
23:07 < rog> unfortunately
23:08 < LuitvD> drhodes: thanks for the link
23:09 * LuitvD made brought his computer close to crashing with Go
23:09 < LuitvD> -made
23:10 < LuitvD> re-enacting the tech demo, only with one million goroutines,
needing 5GB memory
23:16 -!- lenst` [n=user@81-237-244-185-no52.tbcn.telia.com] has quit [Read error:
110 (Connection timed out)]
23:16 -!- Zanith [n=Zanith@1337.h4ck3rs.pinged.us] has quit [Remote closed the
connection]
23:17 -!- brrant [n=John@168-103-78-133.hlrn.qwest.net] has quit ["Leaving"]
23:19 -!- drry [n=drry@unaffiliated/drry] has joined #go-nuts
23:20 -!- Whtiger [n=josh@c-68-60-92-33.hsd1.mi.comcast.net] has joined #go-nuts
23:25 -!- mythz [n=mythz@5ad3feca.bb.sky.com] has joined #go-nuts
23:27 -!- rog [n=rog@78.148.16.235] has quit []
23:31 -!- LuitvD [n=LuitvD@beigetower/luitvd] has quit ["Gone"]
23:33 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
23:37 < XniX23> entropy_sam: yes banthar was doing go-opengl
23:40 < XniX23> entropy_sam: http://github.com/banthar/Go-OpenGL here it is,
i dont know how good it is though, i used his sdl to write rubic cube game and it
worked but it doesnt have all the funcs
23:44 -!- skyyy [i=caw@129.21.116.238] has joined #go-nuts
23:45 -!- hcatlin [n=hcatlin@host81-154-246-241.range81-154.btcentralplus.com] has
quit []
23:46 -!- rbohn [n=rbohn@192.206.100.4] has quit ["ChatZilla 0.9.85 [Firefox
3.0.15/2009101601]"]
23:46 -!- JSharpe [n=jamie@5adaea8d.bb.sky.com] has joined #go-nuts
23:47 < entropy_sam> XniX23: thanks, I'll take a look
23:52 -!- reubens [n=reubens@c-66-235-53-139.sea.wa.customer.broadstripe.net] has
joined #go-nuts
23:53 -!- reubens [n=reubens@c-66-235-53-139.sea.wa.customer.broadstripe.net] has
quit [Client Quit]
23:56 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has joined
#go-nuts
--- Log closed Fri Dec 04 00:00:30 2009