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

--- Log opened Tue Jun 28 00:00:01 2011
--- Day changed Tue Jun 28 2011
00:00 < kevlar_work> chomp, and they distribute `gofix` to help you fix API
changes!  :D
00:00 < str1ngs> chomp: I'll check with one on my cgo projects
00:00 < chomp> and that works beautifully
00:00 < chomp> kevlar_work, yes!
00:01 -!- franciscosouza [~francisco@187.105.0.229] has quit [Read error:
Connection reset by peer]
00:04 -!- Netsplit *.net <-> *.split quits: noam, russell_h, gnuvince,
TheSeeker, dario, vinisterx, pothos
00:04 < str1ngs> chomp: ya I suffer with hg to
00:05 < str1ngs> I just mirror hg with hg-git
00:05 * schmichael will trade hg experience for go help :)
00:05 -!- fvbommel [~fvbommel_@86.86.15.250] has quit [Ping timeout: 240 seconds]
00:05 < chomp> i have a vision of an operating system where every process is
a goroutine; every socket, a channel.
00:05 < chomp> schmichael, what's up?
00:06 < kevlar_work> schmichael, we give our help away free.  Probably not a
great business decision, but it is what it is.
00:06 < schmichael> ha, thanks
00:06 -!- fvbommel [~fvbommel_@86.86.15.250] has joined #go-nuts
00:06 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 258 seconds]
00:06 < kevlar_work> though caveat emptor, we're likely to be distracted by
food, shiny objects, email, or youtube and forget to finish helping >:-)
00:07 < schmichael> no problems atm actually ...  but is there a good
description of how to layout projects w/ multiple packages?  seems like most of
the examples in the docs are simple single file/package hello world things
00:07 < str1ngs> hey how do it..  oh look shiny object.
00:07 -!- zcram [~zcram@78-28-69-30.cdma.dyn.kou.ee] has quit [Quit: Leaving]
00:08 -!- russell_h [~russell_h@osuosl/staff/russellh] has joined #go-nuts
00:08 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
joined #go-nuts
00:08 -!- pothos [~pothos@111-240-172-131.dynamic.hinet.net] has joined #go-nuts
00:08 -!- gnuvince [~vince@ip-96-43-233-174.dsl.netrevolution.com] has joined
#go-nuts
00:08 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
00:08 -!- dario [~dario@domina.zerties.org] has joined #go-nuts
00:08 -!- vinisterx [~ryan@74-129-201-27.dhcp.insightbb.com] has joined #go-nuts
00:08 < chomp> schmichael, as far as i can tell, go building tools are a
major work in progress
00:08 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
00:09 < schmichael> ugh, i was hoping you wouldn't say that :|
00:09 < chomp> maybe look at the gb tool (ping skelterjohn)
00:09 < chomp> https://github.com/skelterjohn/go-gb
00:10 < chomp> it'll probably help you not pull your hair out.
00:10 < schmichael> if nothing else it led me to this page
http://go-lang.cat-v.org/dev-utils
00:10 < schmichael> which seems helpful
00:10 < kevlar_work> schmichael, the package layout is one of two things:
src/{pkg,cmd}/blah or ./*/
00:10 < schmichael> repls!
00:11 < kevlar_work> the former is used for things like $GOPATH, and the
latter is used for things like goinstall
00:11 < kevlar_work> (like goinstall within a remote repository)
00:11 < kevlar_work> one package or binary per directory
00:11 -!- franciscosouza [~francisco@187.105.0.229] has joined #go-nuts
00:11 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Ping timeout: 276 seconds]
00:12 < kevlar_work> in the former case, inter-package includes are relative
to the src/pkg directory; in the latter, inter-package includes are prefixed with
the repository path (github.com/yourusername/project/pkg/path)
00:12 < graftenberg> jessta: Do you have any idea how to get ISODate object
store with the mgo driver?
00:13 < kevlar_work> *these are by no means requirements, they're just what
seems to be emerging as an unofficial standard
00:21 -!- tncardoso [~thiago@189.59.185.173.dynamic.adsl.gvt.net.br] has quit
[Quit: bye]
00:24 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
00:24 < jessta> graftenberg: I think you can use a gobson.Timestamp
00:24 < schmichael> kevlar_work: interesting.  thanks
00:24 < graftenberg> jessta: I've tried that and it looks good but it's not
the same as ISODate
00:24 -!- zeroXten [~zeroXten@0x10.co.uk] has quit [Ping timeout: 246 seconds]
00:25 -!- ExtraSpice [XtraSpice@78-57-204-104.static.zebra.lt] has quit [Read
error: Connection reset by peer]
00:26 < graftenberg> jessta: When I use the MongoTimestamp I get a structure
stored {t: someinteger, i: anotherint}
00:26 < graftenberg> jessta: I need to have something more like
ISODate("1970-01-01T00:00:00Z")
00:29 -!- Jessica_Lily [~Jessica@unaffiliated/xray7224] has quit [Quit: Linkinus
is updating...]
00:29 -!- Jessica_Lily [~Jessica@unaffiliated/xray7224] has joined #go-nuts
00:38 -!- graftenberg [~graftenbe@ip69-17-252-231.vif.net] has left #go-nuts []
00:39 -!- graftenberg [~graftenbe@ip69-17-252-231.vif.net] has joined #go-nuts
00:39 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has joined #go-nuts
00:45 -!- warlock_mza [~warlock@86-91-231-201.fibertel.com.ar] has quit [Remote
host closed the connection]
00:52 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Ping timeout: 252 seconds]
00:54 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
00:57 -!- graftenberg [~graftenbe@ip69-17-252-231.vif.net] has quit [Quit:
graftenberg]
00:58 -!- ancientlore [~ancientlo@ip68-110-238-176.dc.dc.cox.net] has joined
#go-nuts
01:00 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Quit: Leaving]
01:08 -!- pbgc [~pbgc@2.81.165.134] has joined #go-nuts
01:08 -!- pbgc [~pbgc@2.81.165.134] has quit [Client Quit]
01:11 -!- ancientlore [~ancientlo@ip68-110-238-176.dc.dc.cox.net] has left
#go-nuts []
01:18 -!- ccc1 [~Adium@140.109.98.187] has joined #go-nuts
01:18 -!- ccc1 [~Adium@140.109.98.187] has quit [Client Quit]
01:18 -!- ccc1 [~Adium@140.109.98.187] has joined #go-nuts
01:23 -!- ancientlore [~ancientlo@ip68-110-238-176.dc.dc.cox.net] has joined
#go-nuts
01:24 -!- pbgc [~pbgc@2.81.165.134] has joined #go-nuts
01:24 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Quit:
Linkinus - http://linkinus.com]
01:33 -!- graftenburg [~graftenbu@ip69-17-252-231.vif.net] has joined #go-nuts
01:34 -!- robteix [~robteix@host243.200-82-125.telecom.net.ar] has quit [Quit:
Computer has gone to sleep.]
01:34 -!- pbgc [~pbgc@2.81.165.134] has quit [Quit: Textual IRC Client:
http://www.textualapp.com/]
01:39 -!- nekschot [~bla@a78242.upc-a.chello.nl] has quit []
01:42 -!- cenuij [~cenuij@184.15.8.109.rev.sfr.net] has joined #go-nuts
01:42 -!- cenuij [~cenuij@184.15.8.109.rev.sfr.net] has quit [Changing host]
01:42 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
01:52 -!- HalfMadDad [~patrick@bas4-unionville55-1176017731.dsl.bell.ca] has
joined #go-nuts
01:55 -!- dreadlorde [~dreadlord@68.42.82.10] has joined #go-nuts
02:00 -!- HalfMadDad [~patrick@bas4-unionville55-1176017731.dsl.bell.ca] has left
#go-nuts []
02:13 -!- franciscosouza [~francisco@187.105.0.229] has quit [Ping timeout: 240
seconds]
02:16 -!- ccc1 [~Adium@140.109.98.187] has quit [Read error: Connection reset by
peer]
02:16 -!- ancientlore [~ancientlo@ip68-110-238-176.dc.dc.cox.net] has quit [Quit:
~ Trillian Astra - www.trillian.im ~]
02:17 -!- Domtron_Vox [~chatzilla@196.sub-174-254-146.myvzw.com] has quit [Remote
host closed the connection]
02:18 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
02:19 -!- benjack [~benjack@bb119-74-99-26.singnet.com.sg] has joined #go-nuts
02:19 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Read
error: Connection reset by peer]
02:19 -!- Domtron_Vox [~chatzilla@196.sub-174-254-146.myvzw.com] has joined
#go-nuts
02:19 -!- ccc1 [~Adium@140.109.98.187] has joined #go-nuts
02:23 -!- kfmfe04 [~quassel@host-58-114-183-56.dynamic.kbtelecom.net] has joined
#go-nuts
02:24 -!- nannto__ [~nanto@pee5b70.tokyff01.ap.so-net.ne.jp] has joined #go-nuts
02:25 -!- nannto [~nanto@pee5b70.tokyff01.ap.so-net.ne.jp] has quit [Ping timeout:
244 seconds]
02:27 -!- srid [~srid@unaffiliated/srid] has joined #go-nuts
02:27 -!- srid [~srid@unaffiliated/srid] has quit [Client Quit]
02:27 -!- va3atc [~va3atc@24-246-17-37.cable.teksavvy.com] has joined #go-nuts
02:28 -!- srid [~srid@unaffiliated/srid] has joined #go-nuts
02:35 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
02:39 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Ping timeout: 260 seconds]
02:43 < Domtron_Vox> Hi I'm getting an error msg when trying to build godag
or any .go file that imports some pakages.  build walker.go:9: import
/home/domtron/go//pkg/linux_amd64/path/filepath.a: object is [linux amd64
release.r57.1 8296+] expected [linux amd64 release.r57.1 8294]
02:47 < str1ngs> Domtron_Vox: cd $GOROOT/src && ./clean.bash && ./all.bash
02:47 < str1ngs> that will rebuild go
02:48 -!- vyom [~vyom@c-24-18-47-160.hsd1.wa.comcast.net] has joined #go-nuts
02:48 -!- vyom [~vyom@c-24-18-47-160.hsd1.wa.comcast.net] has quit [Remote host
closed the connection]
02:48 -!- vyom [~vyom@c-24-18-47-160.hsd1.wa.comcast.net] has joined #go-nuts
02:49 < vyom> How do I access a null-terminated C char array in Go? Or in
other words how can I translate this code in Go?
https://gist.github.com/99176209ec7033400922
02:50 < vyom> i am stuck at all_dec := C.mpg123_decoders() dunno how to move
forward
02:53 < skelterjohn> you can convert to and from C strings with
C.CString(aGoString) and C.GoString(aCString)
02:54 < vyom> yes..  But what I have is an array of strings returned by a C
function
02:54 -!- graftenburg [~graftenbu@ip69-17-252-231.vif.net] has quit [Ping timeout:
252 seconds]
02:55 < vyom> and I dont know the length of the array..
02:55 < skelterjohn> you can use the unsafe package to do the C-style
pointer arithmetic required
02:55 < vyom> except that it is null terminated
02:58 < vyom> skelterjohn: can you give me an example..  i can see examples
of unsafe.Pointer..  but what functions can I use for performing the increment
02:59 < Domtron_Vox> str1ngs: about the same error 'build walker.go:8:
import /home/domtron/go/pkg/linux_amd64/os.a: object is [linux amd64 release.r57.1
8296+] expected [linux amd64 release.r57.1 8294]'
02:59 < Domtron_Vox> after running 'cd $GOROOT/src && ./clean.bash &&
./all.bash'
02:59 < skelterjohn> you can turn the **char into an unsafe.Pointer, and
then turn that into a *uint64 and increment it
03:04 < jessta> Domtron_Vox: run '6g -V'
03:05 < str1ngs> Domtron_Vox: do you have GOBIN set?
03:06 < str1ngs> which 6g
03:06 < str1ngs> like the command which
03:06 < Domtron_Vox> I'm running a bash file that comes with the code but
I'll try that on my test code
03:06 < Domtron_Vox> gobin is set
03:06 < str1ngs> echo $GOBIN
03:07 < Domtron_Vox> I just downloaded the newest version of go today
03:07 < str1ngs> echo $GOBIN and which 6g
03:08 < skelterjohn> you should probably do what str1ngs says
03:08 < Domtron_Vox> give me a sec I accidentally ran the clean/build
command
03:08 < str1ngs> the *command* which
03:08 < Domtron_Vox> i set gobin as /home/domtron/go/bin
03:11 < str1ngs> Domtron_Vox: what you have GOBIN set to and probably where
your 6g is not the same
03:12 < str1ngs> 6g is in a PATH that does not match GOBIN
03:12 < Domtron_Vox> domtron@domtron-desktop:~/go/src$ echo $GOBIN
03:12 < Domtron_Vox> /home/domtron/go/bin
03:12 < Domtron_Vox> domtron@domtron-desktop:~/go/src$ which 6g
03:12 < Domtron_Vox> /usr/bin/6g
03:12 < Domtron_Vox> that's probably my problem :P
03:12 < str1ngs> in fact you dont need to set GOBIN
03:12 < str1ngs> /usr/bin/6g wrong
03:13 < str1ngs> did you install go with a package manager?
03:14 < Domtron_Vox> I put 6g in usr/bin/6g from a privious build
03:14 < str1ngs> ok thats what I though
03:14 < Domtron_Vox> I also have the most current one in
/home/domtron/go/bin
03:14 < str1ngs> manually or did you set GOBIN ot /usr/bin ?
03:15 < Domtron_Vox> I've been setting GOBIN only in the terminal
03:15 < str1ngs> yes but how did 6g get into /usr/bin?
03:16 < Domtron_Vox> i used cp
03:16 < str1ngs> ok thats good
03:16 < str1ngs> you can delete it
03:16 < str1ngs> and unset GOBIN you dont need it
03:17 < str1ngs> what you need to do is add ~/go/bin to your PATH
03:17 -!- kfmfe04 [~quassel@host-58-114-183-56.dynamic.kbtelecom.net] has quit
[Remote host closed the connection]
03:17 < str1ngs> or /home/domtron/go/bin if you will
03:17 -!- sl [none@sp.inri.net] has quit [Ping timeout: 250 seconds]
03:20 -!- keithcascio [~keithcasc@nat/google/x-ltlbsdrbeynkaznn] has quit [Quit:
Leaving]
03:20 -!- kfeng_ [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
03:21 < Domtron_Vox> ok added /home/domtron/go/bin to .bashrc, restarted
terminal, and ran the build bash got $GOROOT missing
03:21 -!- ww [~ww@river.styx.org] has quit [Ping timeout: 260 seconds]
03:22 < Domtron_Vox> do I set all the other variables but GOBIN?
03:23 -!- _sl [none@sp.inri.net] has quit [Ping timeout: 252 seconds]
03:23 -!- ww [~ww@river.styx.org] has joined #go-nuts
03:23 -!- kfeng_ [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
leaving]
03:24 -!- ccc1 [~Adium@140.109.98.187] has quit [Ping timeout: 255 seconds]
03:24 -!- kfeng_ [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
03:24 -!- ccc1 [~Adium@140.109.98.187] has joined #go-nuts
03:25 < Domtron_Vox> I set GOOS, GOARCH, GOROOT, and now it's complaining
about not having GOBIN
03:26 < str1ngs> no just set GOROOT
03:27 -!- Domtron_Vox [~chatzilla@196.sub-174-254-146.myvzw.com] has quit [Read
error: Connection reset by peer]
03:28 -!- Domtron_Vox [~chatzilla@196.sub-174-254-146.myvzw.com] has joined
#go-nuts
03:29 < Domtron_Vox> Sorry my client just cut out on me did you say anything
after 'no just set GOROOT' ?
03:30 < str1ngs> thats all I said
03:30 < str1ngs> you should only need to set GOROOT
03:31 < Domtron_Vox> doesn't work http://yourpaste.net/8565/
03:32 < str1ngs> oh godag is giving this error
03:32 < str1ngs> go builds fine though?
03:33 < str1ngs> what is godag?
03:33 -!- kfeng_ [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
leaving]
03:33 < str1ngs> oh boy
03:33 -!- benjack [~benjack@bb119-74-99-26.singnet.com.sg] has quit [Ping timeout:
250 seconds]
03:34 < str1ngs> just use a Makefile template
03:34 < jessta> Domtron_Vox: yeah, godag requires all the env vars to be set
03:34 < Domtron_Vox> oh test.go(a copy of the echo sample program) built
fine
03:35 < str1ngs> http://golang.org/doc/code.html#tmp_34
03:35 < str1ngs> see the Outside the Go source tree (for personal packages),
the standard form is
03:36 < str1ngs> for a cmd change include $(GOROOT)/src/Make.pkg to Make.cmd
03:37 < Domtron_Vox> ok Thank you very much...  I'll probably be back :P
03:37 < str1ngs> ok good luck
03:39 -!- graftenburg [~graftenbu@208-73-252-216.dsl.colba.net] has joined
#go-nuts
03:39 -!- graftenburg [~graftenbu@208-73-252-216.dsl.colba.net] has quit [Client
Quit]
03:43 -!- benjack [~benjack@111.65.29.4] has joined #go-nuts
03:45 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
03:45 < Domtron_Vox> Huh i set the four variables and tried the .sh file and
it worked
03:45 < Domtron_Vox> thanks again :)
03:50 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
03:55 -!- sl [none@sp.inri.net] has joined #go-nuts
04:03 -!- crazy2be [~crazy2be@S01060012171a573b.cg.shawcable.net] has joined
#go-nuts
04:07 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services]
04:07 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:11 -!- crazy2be [~crazy2be@S01060012171a573b.cg.shawcable.net] has quit [Remote
host closed the connection]
04:15 -!- benjack [~benjack@111.65.29.4] has quit [Read error: Connection reset by
peer]
04:18 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
04:18 -!- Domtron_Vox [~chatzilla@196.sub-174-254-146.myvzw.com] has quit [Quit:
ChatZilla 0.9.87 [Firefox 3.6.18/20110615075715]]
04:22 -!- prasmuss1n [pii@rasm.se] has joined #go-nuts
04:22 -!- prasmussen [pii@rasm.se] has quit [Ping timeout: 244 seconds]
04:22 -!- neshaug [~oyvind@213.239.108.5] has quit [Ping timeout: 244 seconds]
04:22 -!- 30BAAFM8H [~quassel@96-42-218-124.dhcp.roch.mn.charter.com] has quit
[Ping timeout: 244 seconds]
04:22 -!- neshaug [~oyvind@213.239.108.5] has joined #go-nuts
04:23 -!- micromatikal [~quassel@96-42-218-124.dhcp.roch.mn.charter.com] has
joined #go-nuts
04:25 -!- va3atc [~va3atc@24-246-17-37.cable.teksavvy.com] has quit [Read error:
Connection reset by peer]
04:27 -!- va3atc [~va3atc@24-246-17-37.cable.teksavvy.com] has joined #go-nuts
04:34 < crunge> channels are closed in garbage collection yes?
04:37 -!- bugQ [~bug@c-71-195-206-249.hsd1.ut.comcast.net] has quit [Remote host
closed the connection]
04:46 -!- NiteRain [~kvirc@c-98-254-236-21.hsd1.fl.comcast.net] has quit [Ping
timeout: 258 seconds]
04:46 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
04:50 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
04:50 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
04:55 < chomp|beer> channels are garbage collected, yes
05:05 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts
05:05 -!- ExtraSpice [XtraSpice@78-57-204-104.static.zebra.lt] has joined #go-nuts
05:13 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
05:15 -!- foocraft [~ewanas@89.211.245.3] has joined #go-nuts
05:23 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
05:23 -!- dreadlorde [~dreadlord@68.42.82.10] has quit [Ping timeout: 240 seconds]
05:25 -!- va3atc [~va3atc@24-246-17-37.cable.teksavvy.com] has quit [Read error:
Connection reset by peer]
05:26 -!- va3atc [~va3atc@24.246.17.37] has joined #go-nuts
05:26 -!- chomp [~chomp@c-67-186-35-69.hsd1.pa.comcast.net] has quit [Quit:
Leaving]
05:27 -!- va3atc [~va3atc@24.246.17.37] has quit [Read error: Connection reset by
peer]
05:27 -!- va3atc [~va3atc@24-246-17-37.cable.teksavvy.com] has joined #go-nuts
05:27 -!- benjack [~benjack@bb119-74-99-26.singnet.com.sg] has joined #go-nuts
05:31 -!- kfeng [~kfeng@host-58-114-183-56.dynamic.kbtelecom.net] has quit [Quit:
kfeng]
05:34 -!- srid [~srid@unaffiliated/srid] has quit [Quit: Computer has gone to
sleep.]
05:51 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
06:02 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
06:07 -!- kevin`` [~kevin@sank.pentabarf.net] has joined #go-nuts
06:10 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
leaving]
06:11 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
06:14 -!- ronnyy [~quassel@p4FF1C41C.dip0.t-ipconnect.de] has joined #go-nuts
06:18 -!- noodles775 [~michael@canonical/launchpad/noodles775] has joined #go-nuts
06:31 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
06:34 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
06:34 -!- ronnyy [~quassel@p4FF1C41C.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
06:36 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
06:38 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
06:39 -!- anticide [~textual@46.138.166.118] has joined #go-nuts
06:43 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
leaving]
06:44 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
06:46 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 240 seconds]
06:52 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
06:53 -!- Tekerson [~brenton@gir.tekerson.com] has joined #go-nuts
06:54 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
06:56 -!- anticide [~textual@46.138.166.118] has quit [Quit: Computer has gone to
sleep.]
07:00 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
leaving]
07:01 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
07:04 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
07:05 -!- napsy [~luka@193.2.66.6] has joined #go-nuts
07:07 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
leaving]
07:08 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
07:13 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
07:14 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
07:27 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
leaving]
07:28 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
07:38 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
leaving]
07:52 -!- Sep102_ [~Sep102@71.227.179.131] has joined #go-nuts
07:53 -!- ctimmerm [~ctimmerm@83.150.80.193] has joined #go-nuts
07:56 -!- Sep102 [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has quit [Ping
timeout: 255 seconds]
07:57 -!- photron [~photron@port-92-201-3-103.dynamic.qsc.de] has joined #go-nuts
08:05 -!- Nisstyre [~nisstyre@109.74.204.224] has quit [Ping timeout: 255 seconds]
08:06 -!- Project_2501 [~Marvin@82.84.74.93] has joined #go-nuts
08:06 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has joined #go-nuts
08:07 -!- Slant [~scott@203.26.30.226] has joined #go-nuts
08:18 -!- Slant [~scott@203.26.30.226] has quit [Quit: Slant]
08:20 -!- GeertJohan [~Squarc@clal-1-127.eduroam.inholland.nl] has joined #go-nuts
08:21 -!- GeertJohan [~Squarc@clal-1-127.eduroam.inholland.nl] has quit [Remote
host closed the connection]
08:22 -!- GeertJohan [~Squarc@clal-1-127.eduroam.inholland.nl] has joined #go-nuts
08:22 -!- va3atc [~va3atc@24-246-17-37.cable.teksavvy.com] has quit [Ping timeout:
264 seconds]
08:28 -!- zeroXten [~zeroXten@0x10.co.uk] has joined #go-nuts
08:28 -!- niemeyer [~niemeyer@conference/canonical/x-hmxuxyqcvnemnono] has joined
#go-nuts
08:29 -!- Slant [~scott@203.26.30.226] has joined #go-nuts
08:29 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
08:32 -!- sacho [~sacho@90.154.193.207] has quit [Ping timeout: 255 seconds]
08:37 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.0]
08:37 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
08:45 -!- foocraft [~ewanas@89.211.245.3] has quit [Ping timeout: 255 seconds]
08:50 < zippoxer> the go library is rich, but will it ever have a scripting
package?  the language doesn't matter for me!
08:51 < zippoxer> I think that like websocket, http server & client and
other things in the go library, scripting is not less important for the everyday
programming.
08:52 -!- GeertJohan [~Squarc@clal-1-127.eduroam.inholland.nl] has quit [Read
error: Operation timed out]
08:57 < edsrzf> zippoxer: What do you mean by scripting?
08:57 -!- foocraft [~ewanas@178.152.126.101] has joined #go-nuts
08:57 -!- GeertJohan [~Squarc@s51478c91.adsl.wanadoo.nl] has joined #go-nuts
09:01 -!- ExtraSpice [XtraSpice@78-57-204-104.static.zebra.lt] has quit [Ping
timeout: 276 seconds]
09:01 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has left #go-nuts []
09:01 -!- foocraft [~ewanas@178.152.126.101] has quit [Client Quit]
09:04 < ww> zippoxer: i think people have done funny things like embed perl
and python in go
09:04 < ww> and there's gorun...
09:04 < ww> depends what you mean by scripting i guess...
09:05 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
09:05 -!- Sep102_ [~Sep102@71.227.179.131] has quit [Ping timeout: 240 seconds]
09:09 -!- gnuvince [~vince@ip-96-43-233-174.dsl.netrevolution.com] has quit [Quit:
""]
09:10 -!- alsvidr [~sf@2001:41d0:1:530d::1] has joined #go-nuts
09:11 -!- GeertJohan1 [~Squarc@clal-1-127.eduroam.inholland.nl] has joined
#go-nuts
09:12 -!- Sep102 [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has joined
#go-nuts
09:14 -!- ExtraSpice [XtraSpice@88.118.37.245] has joined #go-nuts
09:15 -!- GeertJohan [~Squarc@s51478c91.adsl.wanadoo.nl] has quit [Ping timeout:
255 seconds]
09:17 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote
host closed the connection]
09:23 -!- virtualsue [~chatzilla@nat/cisco/x-jrthkdsmbfxygnkp] has joined #go-nuts
09:26 < Crnobog|Work> Just use go for scripting :p
09:26 -!- kritic [~enzyme@dynamic-216-211-49-161.tbaytel.net] has joined #go-nuts
09:27 < Tonnerre> Is there a known problem with having gob encoded data
inside of gob encoded data?
09:33 -!- benjack [~benjack@bb119-74-99-26.singnet.com.sg] has quit [Quit:
Leaving.]
09:35 -!- kritic [~enzyme@dynamic-216-211-49-161.tbaytel.net] has quit [Quit:
WeeChat 0.3.5]
09:38 -!- virtualsue [~chatzilla@nat/cisco/x-jrthkdsmbfxygnkp] has quit [Ping
timeout: 250 seconds]
09:42 < zippoxer> ww: embedding python in go is more for fun, but I meant
for very simple & speedy scripting only so for quick medium change to the program
(quick = without restarting it)
09:43 < zippoxer> **fix** ww: embedding python in go is more for fun, but
I'm talking about a very simple & speedy scripting only for quick medium change to
the program (quick = without restarting it)
09:45 -!- virtualsue [~chatzilla@host81-148-52-109.in-addr.btopenworld.com] has
joined #go-nuts
09:48 -!- ronnyy [~quassel@p4FF1C41C.dip0.t-ipconnect.de] has joined #go-nuts
10:04 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has quit [Quit:
Leaving]
10:08 -!- Slant [~scott@203.26.30.226] has quit [Quit: Slant]
10:10 -!- ctimmerm [~ctimmerm@83.150.80.193] has quit [Quit: ctimmerm]
10:10 -!- virtualsue [~chatzilla@host81-148-52-109.in-addr.btopenworld.com] has
quit [Ping timeout: 250 seconds]
10:12 -!- Slant [~scott@203.26.30.226] has joined #go-nuts
10:16 -!- Sep102 [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has quit [Read
error: Connection reset by peer]
10:19 -!- Sep102 [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has joined
#go-nuts
10:21 -!- virtualsue [~chatzilla@nat/cisco/x-afhogspdcxwewhsx] has joined #go-nuts
10:23 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 255 seconds]
10:38 -!- alehorst [~alehorst@189.58.29.36.dynamic.adsl.gvt.net.br] has joined
#go-nuts
10:45 -!- GilJ [~GilJ@zeus.ugent.be] has quit [Ping timeout: 260 seconds]
10:47 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
10:57 -!- moraes [~moraes@189.103.188.201] has quit [Quit: Leaving]
11:01 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 240
seconds]
11:05 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
11:08 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has quit [Ping timeout: 240 seconds]
11:08 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has joined #go-nuts
11:09 < ment> is there a way to call functional struct member in CGO?  (as
in handle->close(handle))
11:11 < exch> Not sure really, but if you cant call it directly, just write
a wrapper function on the C side: void myfunc(T* t) { t->func(); }
11:13 -!- Aperculum [~lauri@kapsi.fi] has left #go-nuts []
11:16 < ment> C function pointers become Go's uintptr.
11:16 < ment> wrapper it is
11:17 < exch> You should be able to call it as a function, if you can cast
it something useful.  Eg: a function type
11:18 < exch> Just guessing here though.  I haven't run into this myself
11:18 -!- Project-2501 [~Marvin@82.84.99.137] has joined #go-nuts
11:19 -!- Katibe [~Katibe@212.174.109.55] has quit [Remote host closed the
connection]
11:21 -!- Project_2501 [~Marvin@82.84.74.93] has quit [Ping timeout: 258 seconds]
11:21 -!- fvbommel [~fvbommel_@86.86.15.250] has quit [Read error: Connection
reset by peer]
11:22 -!- Katibe [~Katibe@212.174.109.55] has joined #go-nuts
11:34 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-180-132.clienti.tiscali.it]
has joined #go-nuts
11:35 -!- tncardoso [~thiago@189.59.185.173.dynamic.adsl.gvt.net.br] has joined
#go-nuts
11:37 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
11:37 -!- Project-2501 [~Marvin@82.84.99.137] has quit [Ping timeout: 240 seconds]
11:39 -!- Slant [~scott@203.26.30.226] has quit [Quit: Slant]
11:41 -!- Slant [~scott@203.26.30.226] has joined #go-nuts
11:41 -!- ronnyy [~quassel@p4FF1C41C.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
11:45 -!- Slant [~scott@203.26.30.226] has quit [Client Quit]
11:55 -!- niemeyer [~niemeyer@conference/canonical/x-hmxuxyqcvnemnono] has quit
[Ping timeout: 240 seconds]
11:58 -!- Project-2501 [~Marvin@82.84.76.209] has joined #go-nuts
12:01 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-180-132.clienti.tiscali.it]
has quit [Ping timeout: 240 seconds]
12:03 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has left #go-nuts
[]
12:07 -!- Loonacy [~loonacy@c-67-172-248-248.hsd1.ut.comcast.net] has quit [Ping
timeout: 250 seconds]
12:12 < zippoxer> at pastie pastes: http://www.pastie.org/pastes is there a
way to see only Go pastes?
12:12 < skelterjohn> isn't it a bit weird to look at random pastes?
12:13 < skelterjohn> they very rarely make sense out of context
12:13 < skelterjohn> and they're almost always meant for a specific person
or group of people
12:13 -!- robteix [~robteix@192.55.54.36] has joined #go-nuts
12:15 -!- Loonacy [~loonacy@c-67-172-248-248.hsd1.ut.comcast.net] has joined
#go-nuts
12:19 -!- Katibe [~Katibe@212.174.109.55] has quit [Read error: Connection reset
by peer]
12:21 -!- Katibe [~Katibe@212.174.109.55] has joined #go-nuts
12:22 -!- Nitro [~Nitro@unaffiliated/nitro] has joined #go-nuts
12:26 -!- Katibe [~Katibe@212.174.109.55] has quit [Remote host closed the
connection]
12:28 -!- Katibe [~Katibe@212.174.109.55] has joined #go-nuts
12:29 -!- wchicken [~chicken@cpe-24-193-31-22.nyc.res.rr.com] has joined #go-nuts
12:30 < zippoxer> skelterjohn: just wanted to see some Go. a bit wierd, just
a bit :)
12:31 -!- Katibe [~Katibe@212.174.109.55] has quit [Remote host closed the
connection]
12:33 -!- Katibe [~Katibe@212.174.109.55] has joined #go-nuts
12:34 -!- GeertJohan1 [~Squarc@clal-1-127.eduroam.inholland.nl] has quit [Quit:
Leaving.]
12:35 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-165-201.clienti.tiscali.it] has
joined #go-nuts
12:38 -!- Project-2501 [~Marvin@82.84.76.209] has quit [Ping timeout: 276 seconds]
12:42 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has quit [Read
error: Connection reset by peer]
12:42 < zippoxer> lol in the ##csharp channel they always write first
capital letter...  brainfucked by c#
12:43 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has joined #go-nuts
12:43 < jessta> zippoxer: you can look up go stuff on github
12:44 < jessta> zippoxer: https://github.com/languages/Go
12:45 < zippoxer> I know I can, but being bored made me attract to pasties
random posts...
12:47 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
12:47 -!- GilJ [~GilJ@zeus.ugent.be] has joined #go-nuts
12:50 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has joined #go-nuts
12:52 < uriel> zippoxer: http://go-lang.cat-v.org/go-code
12:53 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-171-205.clienti.tiscali.it] has
joined #go-nuts
12:53 -!- r_linux [~r_linux@189.38.220.35] has joined #go-nuts
12:54 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-165-201.clienti.tiscali.it] has
quit [Ping timeout: 240 seconds]
13:01 -!- GeertJohan [~Squarc@clal-1-127.eduroam.inholland.nl] has joined #go-nuts
13:01 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has
joined #go-nuts
13:06 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
13:10 -!- replore [~replore@ntkngw256114.kngw.nt.ftth.ppp.infoweb.ne.jp] has
joined #go-nuts
13:16 -!- ArgonneIntern [82ca0251@gateway/web/freenode/ip.130.202.2.81] has joined
#go-nuts
13:18 -!- dgnorton [~dgnorton@97.65.135.112] has joined #go-nuts
13:19 < dgnorton> what is the difference between "a := []int{0,1}" and "a :=
[...]int{0,1}"?
13:22 -!- niemeyer [~niemeyer@conference/canonical/x-urwyfuertzsifxuc] has joined
#go-nuts
13:23 < jessta> dgnorton: the first one is a slice, the second is an array
13:24 < jessta> [...]int{0,1} is the same as [2]int{0,1}
13:25 < jessta> the ...  does the counting for you
13:25 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Ping
timeout: 255 seconds]
13:26 < dgnorton> Jessta: I see.  So, empty [] means slice and ellipses or a
number means array
13:27 < jessta> yep
13:27 < ment> is there a more saner way to convert C array of uchars to
[]byte than
13:27 < ment> gobuf[i] = *(*byte)(unsafe.Pointer(uintptr(buf) + uintptr(i)))
13:28 < dgnorton> is a := []int{0,1} legal?  Or is "make" required?
13:28 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 263 seconds]
13:28 < jessta> ment: I don't think so
13:28 < jessta> dgnorton: it's legal
13:29 < dgnorton> Jessta: so it creates a slice AND the underlying array?
13:29 -!- hcatlin [~hcatlin@host86-161-237-3.range86-161.btcentralplus.com] has
joined #go-nuts
13:29 -!- hcatlin [~hcatlin@host86-161-237-3.range86-161.btcentralplus.com] has
quit [Changing host]
13:29 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
13:30 < jessta> dgnorton: yes
13:30 < ment> jessta: how about the other way around?  can i get a C pointer
to []byte?
13:31 < dgnorton> jessta: thanks
13:37 < mkb218> you can do that unsafely
13:38 < mkb218> unsafe.Pointer(&(a[0]))
13:39 < Crnobog|Work> Can someone explain what the use of a pointer to
interface might be?
13:39 -!- iant [~iant@67.218.109.241] has joined #go-nuts
13:39 -!- mode/#go-nuts [+v iant] by ChanServ
13:39 -!- fvbommel [~fvbommel_@86.86.15.250] has joined #go-nuts
13:39 < ment> mkb218: oh, nice
13:40 < mkb218> i cribbed that from somewhere, go-openal i think
13:40 -!- clip9 [clip9@er.en.svarteper.com] has quit [Ping timeout: 240 seconds]
13:40 -!- clip9 [clip9@109.169.41.5] has joined #go-nuts
13:42 < mkb218> there is probably a good reason not to do that
13:49 -!- NiteRain [~kvirc@c-98-254-236-21.hsd1.fl.comcast.net] has joined
#go-nuts
13:56 -!- mattn_jp [~mattn@112.68.78.175] has joined #go-nuts
14:03 < skelterjohn|work> Crnobog|Work: usually it's a mis-use
14:04 < Crnobog|Work> Yeah that's what I read, I was making the same mistake
myself
14:04 < skelterjohn|work> but if you are providing an out-parameter to a
function, for instance
14:04 < Crnobog|Work> I was just wondering what a valid use would be
14:04 < skelterjohn|work> you can give a pointer to an interface, and the
function can make it point to a particular interface
14:04 < Crnobog|Work> Ok so you can assign to the inner pointer
14:04 < Crnobog|Work> That makes sense
14:04 < skelterjohn|work> i'm not sure that's what i meant, but i don't use
the term "inner pointer" much
14:05 < skelterjohn|work> interfaces can have pointers inside
(sometimes)...is that what you're referring to?
14:05 < Crnobog|Work> Yeah that's what I meant, but now I think I was
probably taking a simplistic/C++-colored view of interfaces
14:06 -!- sacho [~sacho@90.154.221.44] has joined #go-nuts
14:06 < skelterjohn|work> i guess you can think of it that way
14:06 < Crnobog|Work> I guess interfaces values probably contain a pointer
to some kind of method table, then a payload which could be a pointer or any other
value depending on what's the real type is?
14:06 < skelterjohn|work> if you have foo(a *interface{}) { *a = something }
14:06 < skelterjohn|work> and you have var x interface{}, foo(&x)
14:06 < skelterjohn|work> x will now contain the something
14:07 < skelterjohn|work> this wouldn't be the case if you weren't using an
interface pointer
14:07 < skelterjohn|work> Crnobog|Work: yes that's right
14:07 < Crnobog|Work> Yeah, that makes sense
14:07 < skelterjohn|work> well, mostly - it contains information about the
type
14:07 < skelterjohn|work> and another word that can either be the whole
value (if it's small enough, like an int) or a pointer to a newly allocated piece
of data on the heap
14:08 < Crnobog|Work> Hadn't quite sorted out the magic behind interfaces in
my head
14:08 < Crnobog|Work> I think I remember reading a post about how go
interfaces were implemented a while ago
14:08 < skelterjohn|work> i make the distinction only because it's not the
same as a virtual table for C++
14:08 < Crnobog|Work> Wonder if I can find that again
14:08 < skelterjohn|work> you can't mix and match - the set of methods
available come from exactly one type and that type's methods are known at compile
time
14:08 < skelterjohn|work> google the golang blog - it's probably on there
14:11 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.0]
14:11 < Crnobog|Work> Can't find it there
14:11 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
14:12 -!- dlin [~dlin@123-192-26-77.dynamic.kbronet.com.tw] has joined #go-nuts
14:12 < skelterjohn|work> dunno
14:12 < skelterjohn|work> i know what article you're talking about, but i
don't know where to find it
14:12 < Crnobog|Work> Found it:
http://research.swtch.com/2009/12/go-data-structures-interfaces.html
14:13 < Crnobog|Work> I'm implementing a toy language myself as I learn go,
so I'm interested in this sort of stuff :)
14:13 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Client Quit]
14:13 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
14:13 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
14:14 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
14:16 -!- Andy_S [~kvirc@222.129.41.248] has quit [Ping timeout: 258 seconds]
14:16 -!- dlin [~dlin@123-192-26-77.dynamic.kbronet.com.tw] has quit [Client Quit]
14:24 -!- dlin [~dlin@123-192-26-77.dynamic.kbronet.com.tw] has joined #go-nuts
14:29 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
14:29 -!- Andy_S [~kvirc@222.129.41.248] has joined #go-nuts
14:31 -!- va3atc [~va3atc@24-246-17-37.cable.teksavvy.com] has joined #go-nuts
14:34 -!- ancientlore [~ancientlo@63.76.22.10] has joined #go-nuts
14:36 -!- jogib [~kaiser@131.234.59.53] has joined #go-nuts
14:39 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.0]
14:40 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
14:41 -!- ancientlore [~ancientlo@63.76.22.10] has left #go-nuts []
14:42 -!- tncardoso [~thiago@189.59.185.173.dynamic.adsl.gvt.net.br] has quit
[Read error: Connection reset by peer]
14:43 -!- ccc1 [~Adium@140.109.98.187] has quit [Quit: Leaving.]
14:45 -!- NiteRain [~kvirc@c-98-254-236-21.hsd1.fl.comcast.net] has quit [Quit:
KVIrc 4.1.1 Equilibrium http://www.kvirc.net/]
14:46 < kevlar_work> Crnobog|Work, your name wouldn't happen to be based on
Czernobog, would it?
14:48 < skelterjohn|work> http://en.wikipedia.org/wiki/Czernobog
14:48 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
14:48 -!- vegai [v@archlinux/developer/vegai] has quit [Ping timeout: 240 seconds]
14:48 -!- ccc1 [~Adium@140.109.98.187] has joined #go-nuts
14:49 -!- vegai [v@discord.fi] has joined #go-nuts
14:49 < kevlar_work> oh hey, alternate spelling.
14:49 * kevlar_work only knows it from Neil Gaiman's American Gods.
14:49 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
14:50 -!- wchicken [~chicken@cpe-24-193-31-22.nyc.res.rr.com] has quit [Ping
timeout: 264 seconds]
14:50 < chomp> meh those crazy slavic people just mispelled 'cthulu'
14:51 < skelterjohn|work> good book - listened to it on tape for a road trip
14:51 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 252 seconds]
14:54 -!- ancientlore [~ancientlo@63.76.22.10] has joined #go-nuts
14:56 -!- tncardoso [~thiago@187.58.197.172] has joined #go-nuts
14:57 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
14:57 -!- iant [~iant@67.218.109.241] has quit [Quit: Leaving.]
15:03 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
15:06 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
15:07 -!- pjacobs [~pjacobs@adsl-99-20-147-171.dsl.aus2tx.sbcglobal.net] has
joined #go-nuts
15:09 < Crnobog|Work> Yeah, American Gods was a pretty awesome book
15:09 -!- srid [~srid@unaffiliated/srid] has joined #go-nuts
15:11 -!- sunfmin [~sunfmin@125.119.3.55] has joined #go-nuts
15:14 -!- dlin [~dlin@123-192-26-77.dynamic.kbronet.com.tw] has quit [Quit:
WeeChat 0.3.5]
15:15 -!- napsy [~luka@193.2.66.6] has quit [Ping timeout: 276 seconds]
15:16 < ww> probably cherno is bad transliteration because the "e" sounds
like an "o" invariably and the "o" starts sounding like an "a" the further east
you go.  in russian it will sound like chiorna
15:17 < ww> the "e" technically takes an umlaut-like accent but is rarely
written that way outside of grammar manuals
15:17 * ww should really be working...
15:23 < Crnobog|Work> boze moj!
15:25 -!- niemeyer [~niemeyer@conference/canonical/x-urwyfuertzsifxuc] has quit
[Ping timeout: 240 seconds]
15:28 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
15:29 -!- srid [~srid@unaffiliated/srid] has quit [Quit: Textual IRC Client:
http://www.textualapp.com/]
15:32 -!- Jessica_Lil [~Jessica@85.211.7.225] has joined #go-nuts
15:33 -!- Jessica_Lily [~Jessica@unaffiliated/xray7224] has quit [Read error:
Connection reset by peer]
15:33 -!- gnuvince|work [8e544424@gateway/web/freenode/ip.142.84.68.36] has joined
#go-nuts
15:33 < gnuvince|work> is there a community preference between gd (godag)
and gb?
15:34 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
15:36 -!- noodles775 [~michael@canonical/launchpad/noodles775] has quit [Quit:
leaving]
15:36 < skelterjohn|work> i suppose my opinion isn't super useful here
15:37 < skelterjohn|work> but i don't know that either are widely enough
used to have there be a preference one way or another
15:37 < gnuvince|work> ok
15:38 < jessta> I think the community preference is goinstall
15:39 < kevlar_work> gnuvince|work, goinstall and the forthcoming gomake (or
whatever it will be called) are probably the best things to use
15:39 < skelterjohn|work> if you like setting environment variables whenever
you want to compile in a different project directory
15:40 < kevlar_work> skelterjohn|work, that shouldn't be an issue with the
direct builder that I suspect is coming when go/build is finished
15:40 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
15:40 < kevlar_work> and it's not really an issue now if you do all of your
development in a $GOPATH
15:40 < kevlar_work> now if you add GOPATH for every project, then yeah.
15:40 < gnuvince|work> it's for a personal project that I just want to be
able to build and test without giving myself a headache with Makefiles and
whatnot.
15:40 < kevlar_work> gnuvince|work, the makefiles are really simple
actually.
15:40 < skelterjohn|work> goinstall doesn't do testing yet
15:41 < skelterjohn|work> gb and gd do
15:41 < gnuvince|work> All right
15:41 < kevlar_work> so does gofr ;-)
15:41 < gnuvince|work> Thanks
15:41 < kevlar_work> and most of the other builders.
15:42 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
15:45 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.0]
15:45 < skelterjohn|work> does gofr work again?
15:45 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
15:46 < kevlar_work> skelterjohn|work, exec.Command broke it again
15:46 < kevlar_work> working on it.
15:47 < kevlar_work> (the computer it originally lived on doesn't pull very
often)
15:47 < skelterjohn|work> cool - did you move the project from bitbucket?
15:47 < kevlar_work> I need to, lol.
15:48 < skelterjohn|work> is this accurate?
https://bitbucket.org/kylelemons/gofr/changesets
15:48 < kevlar_work> but I don't like moving projects...  I still get people
who try to download from the really old googlecode hosting for log4go and that's
been forever ago.
15:48 < skelterjohn|work> i feel like i'm not seeing an up-to-date version
15:49 < kevlar_work> skelterjohn|work, no, that's accurate.  I apparently
never pushed my last changes, but they're irrelevant now anyway, so I'm just going
to fix that version and push.
15:49 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Client Quit]
15:49 < skelterjohn|work> gotcha
15:49 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
15:49 < Crnobog|Work> I'm using godag at home at the moment, my only
complaint is it doesn't seem to have an option for using a separate build
directory for object files
15:50 < skelterjohn|work> i found it very difficult to leave gb behind, even
when the goinstall writing appeared on the wall
15:50 < skelterjohn|work> Crnobog|Work: then try out gb O:-)
15:50 < skelterjohn|work> mostly because i find using goinstall for local
projects to be untenable
15:51 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has quit [Read error:
Connection reset by peer]
15:51 -!- GeertJohan [~Squarc@clal-1-127.eduroam.inholland.nl] has quit [Quit:
Leaving.]
15:51 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has joined #go-nuts
15:52 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Client Quit]
15:52 < zippoxer> use t[:len(t)-1] instead of t[:-1] ?
15:52 < Crnobog|Work> skelterjohn|work: I'll have a look at gb then :)
15:52 < skelterjohn|work> zippoxer: yes
15:52 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
15:52 < Crnobog|Work> What do you have to do to get goinstall to build local
projects?
15:52 < skelterjohn|work> you have to set the GOPATH env var
15:52 < skelterjohn|work> and then write out the whole name of the project
each time
15:53 < skelterjohn|work> don't get me wrong - goinstall is a great tool
15:53 < Crnobog|Work> For installing libs?  :)
15:53 < skelterjohn|work> gb uses goinstall to download and build 3rd party
stuff, and it works great
15:53 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 258 seconds]
15:54 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
15:54 < skelterjohn|work> lunch time
15:55 < Crnobog|Work> The only non-core lib I know I want to use is
https://github.com/nsf/gollvm, I should see if goinstall works with that
15:55 -!- dfr|mac [~dfr|work@nat/google/x-pzwowzbjxqkdlywd] has joined #go-nuts
15:56 -!- replore [~replore@ntkngw256114.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
15:59 -!- tncardoso [~thiago@187.58.197.172] has quit [Read error: Connection
reset by peer]
15:59 -!- dfr|mac [~dfr|work@nat/google/x-pzwowzbjxqkdlywd] has quit [Remote host
closed the connection]
16:00 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 240 seconds]
16:02 -!- niemeyer [~niemeyer@conference/canonical/x-bynjzseyxvwpagkz] has joined
#go-nuts
16:03 < icy> chomp, ArgonneIntern: they fixed the issue
http://code.google.com/p/go/issues/detail?id=2011
16:04 < chomp> icy, heh yeah saw that yesterday
16:04 < chomp> very cool
16:06 < ArgonneIntern> so there is a new snapshot
16:06 < ArgonneIntern> or it's fixed and not snapshotted yet
16:07 < chomp> there are weekly snapshots, last one was 5 days ago
16:07 < icy> http://golang.org/doc/devel/weekly.html seems outdated
16:08 < ArgonneIntern> so you just type cast the response writer to a
hijaker?
16:08 < icy> w.(http.Hijacker).Hijack()
16:08 < ArgonneIntern> which can then close the connection.  That seems just
as much a hack as the original hack
16:08 < icy> then you get the underlying net.Conn
16:09 < icy> it does more though than just giving you the connection, it
removes it from the http handling
16:09 < icy> hence "hijack"
16:09 < ArgonneIntern> yea
16:10 < ArgonneIntern> I'llf ix that later, put it on my todo list.  For now
that hack works
16:10 < icy> I'm keeping my hack with ProtoMinor until the fix got into a
release
16:10 < chomp> why would you cast to a Hijacker?
16:10 < chomp> it is a Hijacker because it has a Hijack()
16:10 < ArgonneIntern> so you can hijack the connection
16:10 < icy> because you can't do it otherwise
16:10 < icy> andrew said "it's by design"
16:10 < chomp> ah i see.
16:10 * chomp reads the last post in the thread
16:10 < ArgonneIntern> you're trying to not honer a keep-alive request
16:10 < icy> I can't follow that reasoning though
16:11 < ArgonneIntern> I can't follow the reasoning either
16:11 < chomp> icy, in order for a cast to be unnecessary, ResponseWriter
would need to say it provides a Hijacker interface
16:11 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
16:11 < chomp> so that anyone who wants to implement ResponseWriter must
also implement Hijacker
16:11 < ArgonneIntern> chomp thats what I would think it would do
16:12 < ArgonneIntern> guess this is the problem with high level packages
like this
16:12 < ArgonneIntern> there are trade offs
16:12 < icy> well if the documentation says it does provide a hijacker
interface then it should do so without casting imho
16:12 < ArgonneIntern> i would agree with icy
16:13 < ArgonneIntern> that solution seems more consitant with the way go is
coded
16:13 < icy> "The Hijacker interface is implemented by ResponseWriters that
allow an HTTP handler to take over the connection."
16:13 -!- ijknacho [~goofy@cpe-72-190-64-3.tx.res.rr.com] has joined #go-nuts
16:15 < icy> I guess that wording leaves it open to have other
http.ResponseWriter implementions that don't have hijacking capabilities?  if so,
how would you test if they do
16:15 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
16:16 < chomp> well, that's not a type cast, it's a type assertion
16:16 < chomp> if hijacker, ok := writer.(http.Hijacker); ok {
hijacker.Hijack() }
16:16 < icy> I see
16:17 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
16:18 < icy> I'd love to see a blog post from russ talking about the low
level implementation of type assertions and the reflection functionality :)
16:20 < ArgonneIntern> every responsewriter can be casted to a hijacker, or
only handler funcs responsewrite?
16:20 < ArgonneIntern> whyw ould you need to assert it if they can all be
casted
16:21 < chomp> ArgonneIntern, it can't be cast...
16:22 < chomp> i don't think?
16:22 < ArgonneIntern> "it seems that you can Hijack() the connection but
for that you have to type cast the ResponseWriter to a http.Hijacker, not very
straight forward."
16:22 < ArgonneIntern> second one from the bottom
16:23 < chomp> yes but it's not actually a type cast
16:23 < chomp> so that's incorrect use of the term
16:23 -!- ccc1 [~Adium@140.109.98.187] has quit [Quit: Leaving.]
16:23 < chomp> in order to cast an interface A to interface B, A must
implement B
16:23 < chomp> since ResponseWriter does not implement Hijacker, you cannot
cast a ResponseWriter to a Hijacker
16:23 < ArgonneIntern> right
16:24 -!- iant [~iant@216.239.45.19] has joined #go-nuts
16:24 -!- mode/#go-nuts [+v iant] by ChanServ
16:24 < icy> so, how do you do it then?
16:24 < ArgonneIntern> well the fix says that it will honor changes to
Connection "close" in the response
16:24 < ArgonneIntern> the server will honor it's own header
16:24 < ArgonneIntern> SHOCKER!
16:24 < ArgonneIntern> lol
16:24 < chomp> icy, type assertion, as already said
16:25 < chomp> icy, type assertion is not the same as type casting.  type
casts are done at compile time
16:25 < ArgonneIntern> "note that you could previously also Hijack the
connection (the ResponseWriter is a http.Hijacker) and then close it."
16:25 < ArgonneIntern> how can something "be something" without implimenting
it
16:25 < icy> chomp: gotcha, I'm only used to C's casting so got a bit
confused there :)
16:26 < chomp> ArgonneIntern, i should correct myself.  http.ResponseWriter
is a http.Hijacker because it provides an http.Hijack - but the ResponseWriter
interface definition itself does not include a Hijack
16:27 < ArgonneIntern> right
16:27 < ArgonneIntern> ok yes, that is more clear
16:27 -!- niemeyer_ [~niemeyer@89.127.177.74] has joined #go-nuts
16:27 < chomp> this is so ResponseWriter can be implemented without
implementing Hijacker.  that does not preclude ResponseWriter from implementing it
though
16:27 < ArgonneIntern> right
16:27 < kevlar_work> skelterjohn|work, gofr works again, but I had forgotten
that the cgo change broke its cgo support >_<
16:28 < icy> chomp: you mean http.response
16:28 < kevlar_work> (they moved objects into the _obj directory, which
throws off a bunch of stuff in the way gofr does cgo)
16:28 < ArgonneIntern> brad was pretty hot on that getting fixed though lol
16:28 -!- niemeyer [~niemeyer@conference/canonical/x-bynjzseyxvwpagkz] has quit
[Ping timeout: 240 seconds]
16:29 < chomp> yes icy, sorry
16:29 < icy> it's kinda hard to find out if something implements a hijacker
when the type is not exported and therefor not in the docs
16:29 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:30 -!- tncardoso [~thiagon@150.164.2.20] has joined #go-nuts
16:30 -!- chressie [~chressie@dreggn.in-ulm.de] has quit [Quit: WeeChat 0.3.5]
16:30 < kevlar_work> yeah
16:31 < kevlar_work> I haven't 100% decided, but I think types with exported
fields (whether the type itself is exported) should be included in godoc
16:31 < kevlar_work> or, more importantly, types with exported methods
16:32 < kevlar_work> my worry is that this would cause excess noise and/or
encourage fragile development practices.
16:34 -!- wchicken [~chicken@rrcs-24-103-24-136.nyc.biz.rr.com] has joined
#go-nuts
16:34 < ArgonneIntern> icy after lunch imma grab the new weekly and see if
it indeed does honor it
16:34 < icy> I don't think it's in the latest weekly
16:34 < chomp> it's not
16:34 < ArgonneIntern> oh so next week then
16:34 < ArgonneIntern> well 2 days
16:34 < chomp> you could also just check out tip
16:35 < ArgonneIntern> that is ugly
16:35 < chomp> tip go is best go.
16:35 < ArgonneIntern> Iw ould rather use the hack we have then that one
16:35 < icy> I'll wait for a stable release and use the hack in the meantime
:)
16:35 < chomp> pansies
16:35 < ArgonneIntern> but setting connection to close ont he response is
clean, and I'll use than when it goes in
16:37 -!- unofficialmvp1 [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
16:39 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
16:39 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has quit [Ping
timeout: 246 seconds]
16:40 -!- sunfmin [~sunfmin@125.119.3.55] has quit [Quit: sunfmin]
16:40 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
16:41 < kevlar_work> dude, a weekly is basically just tip tagged once a week
16:41 < kevlar_work> it's no more or less stable than a weekly ;-)
16:41 < kevlar_work> s/it's/tip is/
16:41 < icy> hehe, that's why I'm gonna wait for a stable release
16:42 < kevlar_work> uh, lol, releases are pretty few and far between
16:42 < kevlar_work> if you `hg update` you should be able to pull in just
that one change, as well
16:43 < icy> I can wait :)
16:43 < chomp> honestly, i'm trying to recall the number of times being on
tip has caused me headaches
16:43 < chomp> i think at last count it was zero
16:43 < chomp> yep, still zero
16:43 < kevlar_work> the only headache is if you release code that's newer
than the release/tip and people complain, lol
16:44 < kevlar_work> release/weekly*
16:44 < kevlar_work> but I frequently use features that are too fresh for
the weekly, so I'm often at tip or pretty close.
16:45 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
16:45 < icy> btw does anyone know the status of the revamping of the GC is?
they announced a rework on the first presentation iirc
16:45 < icy> but it still does not free any memory for example
16:46 -!- Nisstyre [~nisstyre@109.74.204.224] has joined #go-nuts
16:47 < kevlar_work> icy, as far as I know they're not planning on that
particular thing
16:47 < kevlar_work> but I think it's been said that someone is working on a
new gc that will have shorter world stops
16:48 -!- Nisstyre [~nisstyre@109.74.204.224] has quit [Client Quit]
16:48 < kevlar_work> and I think it's been said that someone is working on
escape analysis
16:48 -!- Nisstyre [~nisstyre@109.74.204.224] has joined #go-nuts
16:49 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the
connection]
16:49 < icy> they already have some good in-house talent when it comes to
GCs (dalvik, v8) so I hope they can improve on the go GC sooner rather than later
16:50 < kevlar_work> icy, just because people work at google doesn't mean
they work on Go ;-)
16:50 < kevlar_work> the dalvik and v8 people probably have their hands full
with those projects.
16:50 -!- iant [~iant@216.239.45.19] has quit [Ping timeout: 255 seconds]
16:50 < icy> true
16:51 < kevlar_work> (plus, we probably don't want to steal anything from
dalvik *cough oracle cough*)
16:51 < icy> would be interesting to know why they think freeing memory is
not a priority or why it would be hard to implement (not that I'm familiar with
implementing GCs)
16:51 < kevlar_work> icy, it's not hard to implement
16:51 < icy> hehe good point (oracle)
16:51 < kevlar_work> the idea is that if you allocate something and it gets
collected, you're likely to need that much memory again later
16:52 < icy> that's not an assumption you can create for all apps
16:52 < icy> some apps might have big but rare spikes
16:53 < icy> keeping the unused memory all the time is not useful, you can
just allocate it again later if needed
16:53 < kevlar_work> icy, that's a pretty rare situation, and the memory
situation can often be amortized in those cases.
16:53 < icy> so if it's not hard to implement, then I think it would be
handy to at least have it optional
16:53 -!- jogib [~kaiser@131.234.59.53] has quit [Read error: Operation timed out]
16:54 < kevlar_work> e.g.  not loading a 4gb file into memory, instead
processing it one line or one chunk at a time
16:54 < kevlar_work> etc.
16:54 < icy> kevlar_work: we do something similar with lighty and people
curse us for having memory leaks all over the net :(
16:54 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts
16:54 -!- chressie [~chressie@dreggn.in-ulm.de] has quit [Client Quit]
16:55 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.0]
16:55 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
16:55 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts
16:55 < kevlar_work> icy, there's also the point that even if we have it
allocated, if it's not being used, it doesn't consume anything until you need it
again
16:56 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
16:57 < icy> well think about it if all applications would do that.  one
would make the other swap and once that one needs the memory again, it'll be even
slower to page stuff in than allocating it from scratch
16:59 < icy> the GC could also free pages (arenas or whatever) that have not
been used for a certain amount of time
16:59 -!- unofficialmvp1 [~dev@94-62-164-227.b.ipv4ilink.net] has quit [Ping
timeout: 276 seconds]
17:01 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has quit [Quit:
pyrhho]
17:02 -!- iant [~iant@nat/google/x-xxvbcuykvueuwrum] has joined #go-nuts
17:02 -!- mode/#go-nuts [+v iant] by ChanServ
17:02 -!- TheMue [~TheMue@p5DDF57C6.dip.t-dialin.net] has joined #go-nuts
17:04 < brandini> what's up fellow go nuts?
17:05 < skelterjohn|work> hi
17:07 < brandini> is there any stir in the job market for Go folks?
17:07 < skelterjohn|work> i know argonne national labs does some stuff with
go
17:07 < skelterjohn|work> there are a few commercial products out there
17:08 -!- chomp_ [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
17:08 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.0]
17:08 < brandini> wonder if Go builds and runs on openindiana
17:08 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
17:08 < skelterjohn|work> i've never heard of that - what is it?
17:09 < brandini> it's the successor to opensolaris
17:09 <+iant> gccgo works on Solaris, 6g/8g currently do not
17:10 <+iant> getting 6g/8g to work on x86 Solaris is probably not too hard
17:11 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Ping timeout: 244 seconds]
17:11 -!- franciscosouza [~francisco@201.7.186.67] has joined #go-nuts
17:17 < uriel> does anyone use solaris for anything?
17:17 < uriel> other than to padd tech supports bills
17:18 < chomp_> lol
17:18 -!- nekoh [~nekoh@dslb-088-068-004-255.pools.arcor-ip.net] has joined
#go-nuts
17:19 <+iant> somebody sent me Solaris patches for gccgo, so somebody must
use it....
17:21 -!- enferex [~enferex@users.757.org] has quit [Ping timeout: 240 seconds]
17:26 < mkb218> i see some sun microsystems racks at work, but they're
filled with linux boxes afaik
17:28 -!- niemeyer_ [~niemeyer@89.127.177.74] has quit [Ping timeout: 240 seconds]
17:30 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 250 seconds]
17:30 -!- vyom [~vyom@c-24-18-47-160.hsd1.wa.comcast.net] has quit [Remote host
closed the connection]
17:33 -!- b0red [~k@unaffiliated/b0r3d] has joined #go-nuts
17:35 -!- b0red [~k@unaffiliated/b0r3d] has left #go-nuts []
17:36 < skelterjohn|work> kevlar_work: yeah - cgo now puts things in _obj
17:36 < skelterjohn|work> so as to not clutter the directory
17:36 < skelterjohn|work> funny story - i had already been running cgo in a
directory _cgo for the same reason, and now it puts things in _cgo/_obj
17:45 -!- alkavan [~alkavan@IGLD-84-228-136-116.inter.net.il] has quit [Quit:
Leaving]
17:46 < zippoxer> reflect.ValueOf(msg).Field(0).SetString(t) does not set
the first field of the struct msg
17:46 < ArgonneIntern> rofl I don't suppose anyone has made a radx power
controller package ><
17:46 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
17:47 < zippoxer> it panics and says that something is unaddressable
17:47 < skelterjohn|work> zippoxer: code?
17:47 < zippoxer> reflect.ValueOf(msg).Field(0).SetString(t) :)
17:47 -!- lucian_ [~lucian@78-86-217-168.zone2.bethere.co.uk] has joined #go-nuts
17:47 < skelterjohn|work> ArgonneIntern: um.  i don't know what that is
17:47 < zippoxer> msg is a struct, t is a string
17:47 < skelterjohn|work> zippoxer: for instance, msg's type?  =p
17:47 < zippoxer> type is joinMsg
17:47 < zippoxer> a struct :)
17:48 < skelterjohn|work> not *joinMsg?
17:48 < zippoxer> not
17:48 < zippoxer> so it should be?  :)
17:48 < skelterjohn|work> just getting all the facts
17:48 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has quit [Ping
timeout: 258 seconds]
17:49 -!- robteix [~robteix@192.55.54.36] has quit [Ping timeout: 255 seconds]
17:49 < zippoxer> adding & before msg
17:49 < zippoxer> panics: call of reflect.Value·Field on ptr Value
17:50 < skelterjohn|work> yes, that is expected
17:50 < zippoxer> yeah i understand the problem
17:50 < zippoxer> but don't know the solutio
17:50 < zippoxer> n
17:52 -!- dropw [~dropw@IGLD-84-228-136-116.inter.net.il] has joined #go-nuts
17:53 < skelterjohn|work> strings are immutable is the issue i think...  you
can't change the value of a particular string
17:53 -!- mattn_jp [~mattn@112.68.78.175] has left #go-nuts ["Ex-Chat"]
17:53 < skelterjohn|work> you can only replace the pointer to that string
with a pointer to a different one
17:54 -!- mattn_jp [~mattn@112-68-78-175f1.hyg1.eonet.ne.jp] has joined #go-nuts
17:54 < ArgonneIntern> so open to discussion, this power controller has a
web interface on it and a telnet interface
17:54 < ArgonneIntern> I need to change values in it
17:54 < ArgonneIntern> annnnd go
17:55 < skelterjohn|work> zippoxer: but it's clear what you want...trying to
figure out how to do it
17:57 < skelterjohn|work> ArgonneIntern: what is it that you want, exactly?
18:01 -!- tncardoso [~thiagon@150.164.2.20] has quit [Quit: Leaving]
18:01 -!- ArgonneIntern [82ca0251@gateway/web/freenode/ip.130.202.2.81] has quit
[Ping timeout: 252 seconds]
18:01 -!- dropw [~dropw@IGLD-84-228-136-116.inter.net.il] has quit [Quit: Leaving]
18:02 < mkb218> you want to rewrite expect in go clearly
18:02 < mkb218> he's real dj don't need no expect script
18:02 < kevlar_work> I've actually considered writing expect functionality
for exec.Command
18:03 < skelterjohn|work> what's expect?
18:03 < skelterjohn|work> i only ask because it doesn't seem very googleable
18:03 < kevlar_work> skelterjohn|work, basically a way to trigger input when
an output pattern matches or a timeout fires
18:03 < kevlar_work> http://en.wikipedia.org/wiki/Expect
18:03 < skelterjohn|work> gotcha
18:04 < zippoxer> skelterjohn|work: okay i'll try too
18:06 -!- mattn_jp [~mattn@112-68-78-175f1.hyg1.eonet.ne.jp] has quit [Quit:
Ex-Chat]
18:06 -!- bmizerany [~bmizerany@p5DDB95BD.dip.t-dialin.net] has joined #go-nuts
18:06 -!- ArgonneIntern [82ca87e6@gateway/web/freenode/ip.130.202.135.230] has
joined #go-nuts
18:08 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
hcatlin]
18:08 < ArgonneIntern> skelterjohn|work: It apparently allows ssh
18:08 < ArgonneIntern> skelterjohn|work: so I can just run ssh commands
remotely
18:08 < ArgonneIntern> much eaier than html or telnet
18:09 < skelterjohn|work> have you tried?  that is often disallowed
18:09 < skelterjohn|work> often -> sometimes
18:09 < ArgonneIntern> i'm trying now
18:10 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.0]
18:11 < zippoxer> skelterjohn|work: so anyways I have to pass a pointer of
msg to reflect.ValueOf?
18:11 -!- ArgonneIntern_ [82ca87e6@gateway/web/freenode/ip.130.202.135.230] has
joined #go-nuts
18:12 < skelterjohn|work> zippoxer: i doubt that's the solution - did you
try it?
18:12 < ArgonneIntern_> yea it won't let you run ssh commands remotely
18:12 < ArgonneIntern_> booo
18:13 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
18:13 -!- dropw [~dropw@IGLD-84-228-136-116.inter.net.il] has joined #go-nuts
18:13 -!- ArgonneIntern [82ca87e6@gateway/web/freenode/ip.130.202.135.230] has
quit [Ping timeout: 252 seconds]
18:15 < zippoxer> yeah
18:15 < zippoxer> it panics
18:15 < zippoxer> with..
18:15 < zippoxer> panic: reflect: call of reflect.Value·Field on ptr Value
18:16 < skelterjohn|work> zippoxer: i feel like the "not addressable" panic
shouldn't happen if you can do &(msg.whateverField0Is)
18:16 < skelterjohn|work> keep asking, someone who knows reflect better than
i do might answer
18:17 -!- hcatlin [~hcatlin@host86-161-237-3.range86-161.btcentralplus.com] has
joined #go-nuts
18:17 -!- hcatlin [~hcatlin@host86-161-237-3.range86-161.btcentralplus.com] has
quit [Changing host]
18:17 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
18:21 < zippoxer> skelterjohn|work: msg is actually a parameter in a func,
that it's type is interface{}, but I pass a struct to it.
18:21 < zippoxer> does it change anything?
18:21 < skelterjohn|work> shouldn't
18:22 < skelterjohn|work> in my test example i didn't do that
18:22 < zippoxer> yeah so i'll pass that to google groups
18:22 < zippoxer> thanks for the help
18:22 < zippoxer> go-nuts*
18:23 -!- iant [~iant@nat/google/x-xxvbcuykvueuwrum] has quit [Ping timeout: 264
seconds]
18:23 < zippoxer> I bet the reflect package designer will be the only one
with a certain answer :P
18:27 -!- mnoel [~mnoel@c-75-65-250-60.hsd1.la.comcast.net] has joined #go-nuts
18:27 -!- Project_2501 [~Marvin@82.84.67.214] has joined #go-nuts
18:30 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-171-205.clienti.tiscali.it] has
quit [Ping timeout: 258 seconds]
18:33 -!- robteix [~robteix@192.55.54.36] has joined #go-nuts
18:34 -!- bmizerany [~bmizerany@p5DDB95BD.dip.t-dialin.net] has quit [Ping
timeout: 255 seconds]
18:34 -!- tncardoso [~thiago@187.58.197.172] has joined #go-nuts
18:34 -!- virtualsue [~chatzilla@nat/cisco/x-afhogspdcxwewhsx] has quit [Ping
timeout: 258 seconds]
18:36 -!- iant [~iant@nat/google/x-gbflvqudxotqjhol] has joined #go-nuts
18:36 -!- mode/#go-nuts [+v iant] by ChanServ
18:39 < skelterjohn|work> zippoxer: here's a condensed version of your
problem http://pastebin.com/PN6uwv0A
18:39 < skelterjohn|work> still don't know how to fix it
18:40 < zippoxer> damn I already made one, but i'll post that too
18:40 -!- virtualsue [~chatzilla@host81-148-52-109.in-addr.btopenworld.com] has
joined #go-nuts
18:41 < skelterjohn|work> if yours is clear, use it
18:41 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Quit: Leaving]
18:41 < skelterjohn|work> i actually just posted it in here hoping iant
would take a look O:-)
18:44 <+iant> skelterjohn|work: I think you need to pass &t to ValueOf
18:45 < skelterjohn|work> that does it
18:45 < skelterjohn|work> and doing reflect.ValueOf(&t).Elem()
18:45 < zippoxer> I did that one!!
18:45 < skelterjohn|work> instead of reflect.ValueOf(t)
18:45 < zippoxer> no way it works :(
18:45 < skelterjohn|work> you didn't do the Elem()
18:45 < zippoxer> probably did that in the wrong place..
18:45 < skelterjohn|work> iant: I don't understand why it isn't addressable,
though
18:45 < zippoxer> instead of valueof?
18:46 < skelterjohn|work> zippoxer: http://pastebin.com/E32uBRPz
18:46 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
hcatlin]
18:47 <+iant> when you just call ValueOf(t) you get a copy of the value
18:47 <+iant> you can assign to it because there is no associated location
to assign
18:47 <+iant> it could be supported, I suppose, it just isn't
18:48 < skelterjohn|work> it makes sense to allow it, since you've got the
value stored in your reflect.Value instance
18:48 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
18:48 <+iant> it doesn't make sense to allow it for, e.g., an int, but it
does make sense for a field in a struct
18:48 < skelterjohn|work> and that's the value you're changing - it doesn't
and shouldn't change the original thing you passed
18:49 <+iant> have to ask rsc what he thinks, though
18:49 <+iant> he may have some reason
18:49 < skelterjohn|work> so, if it *was* allowed, my code snip would print
"hi" instead of "x", since the original t would be unchanged
18:49 < skelterjohn|work> which has to be, since the internals of
reflect.ValueOf() can't know about the original data.
18:50 < skelterjohn|work> i don't intend to lecture, btw - just thinking out
loud
18:50 <+iant> sure
18:50 < zippoxer> the Elem() panics for me because I pass an interface{} to
reflect.ValueOf(), the msg: reflect: call of reflect.Value·Field on interface
Value
18:50 < skelterjohn|work> zippoxer: paste some context - a small example
like the one i pastebinned
18:52 < zippoxer> http://www.pastie.org/2135679
18:52 -!- gnuvince|work [8e544424@gateway/web/freenode/ip.142.84.68.36] has quit
[Ping timeout: 252 seconds]
18:54 -!- ArgonneIntern_ [82ca87e6@gateway/web/freenode/ip.130.202.135.230] has
quit [Ping timeout: 252 seconds]
18:55 < zippoxer> reflect.ValueOf() seems to refer to the passed arg as
interface{} when it's actually msgA
18:56 < skelterjohn|work> i feel like you haven't run that code =p
18:56 < zippoxer> works for u?
18:56 < skelterjohn|work> doesn't compile
18:56 < zippoxer> oh
18:56 < zippoxer> sec
18:56 < skelterjohn|work> oh
18:56 < skelterjohn|work> don't pass &msg in the please() func
18:57 < skelterjohn|work> pass &msgA{ ...  } in the main() func
18:58 < zippoxer> yeah it works, but not in my real code!  i'll keep tring
18:59 < zippoxer> trying
18:59 < zippoxer> thanks for the help!
18:59 < skelterjohn|work> np
18:59 -!- i__ [~none@69.164.206.224] has quit [Changing host]
18:59 -!- i__ [~none@unaffiliated/i--/x-3618442] has joined #go-nuts
19:00 -!- nekoh [~nekoh@dslb-088-068-004-255.pools.arcor-ip.net] has quit [Ping
timeout: 250 seconds]
19:01 < zippoxer> :)
19:02 -!- hcatlin [~hcatlin@host86-161-237-3.range86-161.btcentralplus.com] has
joined #go-nuts
19:02 -!- hcatlin [~hcatlin@host86-161-237-3.range86-161.btcentralplus.com] has
quit [Changing host]
19:02 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
19:02 -!- wchicken [~chicken@rrcs-24-103-24-136.nyc.biz.rr.com] has quit [Read
error: Operation timed out]
19:03 -!- Sh4rK [sh4rk@3e44a6e1.adsl.enternet.hu] has joined #go-nuts
19:03 < Sh4rK> hi
19:03 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined
#go-nuts
19:03 < Sh4rK> How can i transform a character to int?
19:04 < aiju> Sh4rK: int(...)
19:04 < zippoxer> int('c') ?
19:04 < Sh4rK> oh I didn't know that " and ' are different
19:04 < zippoxer> wait..  'c' is not uint8?
19:04 < Sh4rK> sorry
19:04 < skelterjohn|work> 'c' is int
19:04 -!- foocraft [~ewanas@178.152.126.101] has joined #go-nuts
19:05 < skelterjohn|work> there is no 'char' type in go
19:05 < zippoxer> oh
19:05 < skelterjohn|work> strings use ints
19:05 < skelterjohn|work> you can also use []byte instead of string and then
it's...  byte
19:05 < zippoxer> no way string uses 4 bytes for each character!
19:05 < zippoxer> maybe int8?
19:05 < Sh4rK> string is []byte
19:05 < aiju> zippoxer: strings re utf-8
19:05 < Sh4rK> i think
19:05 < zippoxer> ohh
19:05 < aiju> Sh4rK: no
19:05 < skelterjohn|work> i'm not exactly sure how it works, really, but
when you range over it, you get ints
19:06 < aiju> range and indexing are differnet
19:06 < Sh4rK> yeah
19:06 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
19:06 < aiju> indexing a string should give you a byte
19:06 < aiju> or maybe not.
19:06 < aiju> just try it
19:07 < Sh4rK> yeah
19:07 < Sh4rK> so a string is byte[]
19:07 < Sh4rK> *[]byte
19:07 < aiju> no
19:07 < Sh4rK> but when using range it gives you the unicode code points
19:07 < zippoxer> indexing brings uint8 for me.
19:07 < aiju> Sh4rK: strings are immutable
19:07 < Sh4rK> yeah
19:07 < aiju> zippoxer: then you fucked up
19:07 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
19:07 < skelterjohn|work> indexing into a string gets uint8
19:08 < aiju> but yeah strings are "somewhat" like []byte
19:08 < zippoxer> OOPs.
19:08 < skelterjohn|work> fmt.Printf("%T\n", "hi"[0]) -> uint8
19:08 < zippoxer> uint8 = byte
19:08 < aiju> skelterjohn|work: uint8 == byte
19:08 < skelterjohn|work> yes
19:08 < zippoxer> sorry that i'm blind.
19:09 < zippoxer> kidding :P
19:10 < skelterjohn|work> i don't really know how this utf stuff works
19:10 < aiju> magic
19:10 < zippoxer> yeah me 2
19:10 <+iant> UTF-8 is just a way of encoding 32-bit Unicode numbers into a
byte stream
19:10 < skelterjohn|work> what happens if a string has bits that are bigger
than a byte, and you index into its second byte?
19:10 < zippoxer> a prefix to the whole string?
19:11 < skelterjohn|work> garbage?
19:11 < aiju> ken thompson designed utf-8 on a placemat
19:11 < aiju> it's not that hard
19:11 <+iant> strings in Go are simply immutable []byte
19:11 < aiju> iant: but no capacity iirc
19:11 <+iant> true
19:11 <+iant> using range on a string does UTF-8 decoding on the bytes in
the string, returning a sequence of ints
19:12 < aiju> indexing into a string is probably a bad idea
19:12 < skelterjohn|work> so is it possible to range over a string and have
fewer iterations than len(theString)?
19:12 <+iant> yes
19:12 <+iant> indexing into a string which is expected to hold Unicode
characters is a bad idea
19:12 < aiju> i think the longest utf-8 sequences are five bytes
19:12 <+iant> using range on a string which is not expected to hold Unicode
characters is a bad idea
19:12 < skelterjohn|work> len("世界") -> 6
19:12 < aiju> but it changes every few years ;P
19:13 < aiju> all BMP codepoints are encoded in three bytes
19:13 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has joined #go-nuts
19:13 < aiju> +at most
19:13 <+iant> but string is just immutable []byte so it can be either
Unicode characters (encoded in UTF-8) or just arbitrary bytes
19:13 <+iant> depends on what your program does
19:13 -!- virtualsue [~chatzilla@host81-148-52-109.in-addr.btopenworld.com] has
quit [Ping timeout: 255 seconds]
19:15 < skelterjohn|work> so, the longest utf-8 sequence is 5 bytes, and a
code point is stored in a 4 byte int?
19:16 < Sh4rK> lol
19:18 -!- virtualsue [~chatzilla@nat/cisco/x-blnhyvuumgixjqlb] has joined #go-nuts
19:18 -!- vyom [~vyom@c-24-18-47-160.hsd1.wa.comcast.net] has joined #go-nuts
19:19 -!- ronnyy [~quassel@p4FF1C41C.dip0.t-ipconnect.de] has joined #go-nuts
19:19 < skelterjohn|work> a forum post i see says utf-8 is officially capped
at 4 octets
19:20 < skelterjohn|work> and it's utf-16 that can be super long
19:23 -!- vyom [~vyom@c-24-18-47-160.hsd1.wa.comcast.net] has quit [Ping timeout:
240 seconds]
19:25 < dgnorton> what's the idiomatic go equivalent of C++ "bool state =
(mychar == 0x30) ? false : true;"
19:26 < skelterjohn|work> no ternary expression, so you can do "state :=
mychar == 0x30"
19:26 < skelterjohn|work> or !=, i mean
19:26 < skelterjohn|work> probably better to do that w/ C++, too :)
19:27 < dgnorton> skelterjohn|work: yes :) ...  just trying to make a simple
example
19:28 < skelterjohn|work> with something simple like that, assign it to one
value, do the test, and if you need to, change the value
19:28 < skelterjohn|work> if instead of "false : true" you had "someFunc() :
someOtherFunc()" and you don't want to execute both
19:28 < zozoR> about all the string talking, how would one go around looping
through the characters in a string, without worrying about utf8?
19:28 < skelterjohn|work> then you can make a helper func
19:29 < skelterjohn|work> x := func() T { if condition() { return foo() }
else { return bar() } }
19:29 -!- ArgonneIntern [82ca87e6@gateway/web/freenode/ip.130.202.135.230] has
joined #go-nuts
19:29 < skelterjohn|work> zozoR: you can either range (and get int code
points) or do a for i := 0; i < len(s); i++ { ...  s[i] ...  }
19:30 -!- huin [~huin@91.85.188.1] has joined #go-nuts
19:30 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
19:31 < Sh4rK> range is better if there's utf8 in it
19:32 < zozoR> true that, it gives me garbage when i write åååå :D
19:33 < ArgonneIntern> having flowers delivered to your wifes work place for
anniversary = win
19:33 < ArgonneIntern> the present isn't flowers at all, it's the jealousy
19:33 < ArgonneIntern> ;)
19:37 < zozoR> xD
19:37 < zozoR> and the win is the hanky panky when she gets home?  :D
19:37 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has joined #go-nuts
19:39 < ArgonneIntern> eh I'm married.  Contrary to what popular sitcoms
have you believe, sex is not an issue an very many marraiges
19:40 < huin> but you get happy smiles and sweetly said thankyous :)
19:40 < ArgonneIntern> right, and I love my wife, so that is the value for
me
19:40 -!- lucian_ [~lucian@78-86-217-168.zone2.bethere.co.uk] has quit [Ping
timeout: 258 seconds]
19:41 < ArgonneIntern> anyways back to go + radix power controls
19:41 < zozoR> stupid sitcoms :o
19:41 < skelterjohn|work> http://www.jokes2go.com/jokes/8716.html
19:41 < aiju> zozoR: he's just kidding you
19:41 < aiju> obviously
19:41 < ArgonneIntern> skelterjohn|work: rofl
19:41 < Sh4rK> :D
19:41 < ArgonneIntern> aiju, I'm not kidding
19:42 < ArgonneIntern> if that is a problem in your marriage, one of the two
of you doesn't love the other one.
19:42 < zozoR> well, unless you are 40+ it isnt a problem
19:42 < ArgonneIntern> well lmao obviously
19:42 < skelterjohn|work> whoah, strong statement there ArgonneIntern
19:42 < ArgonneIntern> physically being able kinda is a prerequisite
19:42 < skelterjohn|work> though i depends on what you mean by "problem"
19:42 < ArgonneIntern> that is subjective
19:42 < skelterjohn|work> it depends
19:43 < ArgonneIntern> on a per marriage basis
19:43 < ArgonneIntern> you get what I'm trying to say though.  If two people
are in love, there won't be a problem
19:44 < zozoR> in denmark, the polls say, that everybody thinks every one
else is having an awesome sex life
19:44 < ArgonneIntern> and I mean that with modus tollens
19:44 < skelterjohn|work> i think that most couples, after they've had kids,
don't do it that much anymore (note: i have no children)
19:44 < zozoR> making 40% of the population think they get way too little
sex :D
19:45 < ArgonneIntern> heh, I honestly just try to keep up with my wife
><
19:45 < aiju> that's slang for sx, obviously
19:45 < zozoR> its not that fun being with a nympho :P
19:45 < aiju> that's modus trollens
19:45 < ArgonneIntern> lmao
19:45 < ArgonneIntern> that it is
19:46 < zozoR> its ok the first month, then you are like, "No, not anymore,
look, he is dead!"
19:46 < aiju> zozoR: he's just resting
19:46 < ArgonneIntern> I just filter you.  when you say something useful I
listen, as you're pretty smart, but when you're being opinionated, I just ignore
you
19:46 < zozoR> not if its a nympho : |
19:46 < zozoR> isnt everything aiju say oppinionated?
19:47 < ArgonneIntern> not sometimes, he is pretty smart
19:47 < aiju> zozoR: only on even days
19:47 < aiju> and on most odd ones
19:47 < ArgonneIntern> he tries very hard to be an ahole, which is common in
smart people
19:47 < skelterjohn|work> ArgonneIntern: that matches my policy too
19:47 < ArgonneIntern> just ignore the ahole and you get what you want from
him
19:47 -!- TheMue [~TheMue@p5DDF57C6.dip.t-dialin.net] has quit [Quit: TheMue]
19:47 < zozoR> its colourfull when aiju speak, even if he says something
which is true and awesome
19:48 < skelterjohn|work> at least our trolls know what they're talking
about
19:48 < skelterjohn|work> in #golang
19:48 < zozoR> :D
19:48 < ArgonneIntern> I'll say this, aiju is very intelligent, but not very
wise
19:48 < zozoR> dynamic linking means more cats?
19:48 < zozoR> xD
19:48 < zozoR> or was it less cats
19:48 < skelterjohn|work> one might say ArgonneIntern is lacking a bit in
tact, as well =p
19:49 < skelterjohn|work> since we're talking about each other in third
person
19:49 < ArgonneIntern> well, to be fair, he struck first
19:49 < aiju> hahahahaha
19:50 < zozoR> i like cats..  no more dynamic linking
19:50 < skelterjohn|work> what are you talking about?
19:50 < aiju> skelterjohn|work: he grabbed a random quote of me out of
context
19:50 < Crnobog> What is gdtest doing to my Stdout?  :(
19:50 < aiju> i like it.
19:51 < magn3ts> so I modified gopcap so that it could work with goinstall,
but the problem is...  paths differ on different computers (besides differences
for Mac/Windows).  How should I handle that?
https://github.com/colemickens/gopcap/blob/master/pcap/pcap.go
19:51 < ArgonneIntern> just for fun, in my mind, you are now fat aiju :D
19:51 < magn3ts> also, apparently with a typo
19:51 < aiju> hahaha
19:51 < zippoxer> happy hour on go-nuts!
19:51 < skelterjohn|work> magn3ts: path/filepath
19:51 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
19:51 < skelterjohn|work> whenever you're dealing with a filesystem, use
path/filepath
19:51 < skelterjohn|work> (instead of path)
19:51 < skelterjohn|work> has all the same functions
19:51 < magn3ts> skelterjohn|work, I don't understand
19:52 < magn3ts> I'm completely lost.
19:52 < skelterjohn|work> maybe you meant something else when you said
"path"
19:52 < magn3ts> I'm not talking about a path API or anything.
19:52 < magn3ts> lol
19:52 < aiju> magn3ts means stuff like
19:52 < magn3ts> I mean #cgo CFLAGS: -I/this/path
19:52 < aiju> /Library/foo/Bar/lib/MoreStuff/
19:52 < skelterjohn|work> aha
19:52 < aiju> vs.  linux /usr/lib/foo
19:52 < magn3ts> yup
19:52 < skelterjohn|work> #cgo linux CFLAGS: -the linux path
19:53 < skelterjohn|work> #cgo darwin CFLAGS: -the darwin path
19:53 -!- robteix [~robteix@192.55.54.36] has quit [Ping timeout: 240 seconds]
19:53 < skelterjohn|work> golang.org/cmd/cgo
19:53 < magn3ts> noice.
19:53 < magn3ts> thanks for the link
19:54 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
hcatlin]
19:56 < skelterjohn|work> Crnobog: does gdtest do something different than
gotest in the directory?  if so i'd report a bug
19:56 < skelterjohn|work> (gb does the right thing) O:-)
19:57 < aiju> gotry: cannot try packages os or syscall; they are too
dangerous
19:57 < aiju> hahahahahahaha
19:57 < aiju> os -- be afraid.  be very afraid.
19:58 -!- moraes [~moraes@189.103.188.201] has quit [Remote host closed the
connection]
20:05 < Crnobog> skelterjohn|work: It turns out it does work, my fmt.Println
was just somewhere dumb >.>
20:06 < dgnorton> How can I convert a []byte containing
0x30,00,30,00,30,00,31,00 to an integer?  Something similar to...  Atoi(string(b))
20:06 < skelterjohn|work> why just similar
20:06 < skelterjohn|work> why not just do that?
20:07 < dgnorton> doesn't seem to be working
20:07 < skelterjohn|work> what's the error
20:07 < aiju> do you have nullbytes in that string?
20:08 < huin> dgnorton: what's the expected result for that input?
20:10 < dgnorton> parsing "0 0 0 1 ": invalid argument
20:10 < dgnorton> huin: return an int value of 1
20:10 < skelterjohn|work> your string has spaces between the numbers
20:10 < huin> oh...
20:10 < skelterjohn|work> so, it's not a number
20:11 < aiju> there is some way to parse that kind of string
20:11 < huin> wait...  should 0 0 0 1 be 3 0x00 bytes followed by a 0x01
byte?
20:11 < dgnorton> string(b) of the data above has the spaces
20:11 < huin> or is it laterally that string?
20:11 * skelterjohn|work falls sideways
20:11 * huin is confused
20:11 < huin> s/laterally/literally/
20:12 < skelterjohn|work> he means it's literally the string - everywhere he
had 00 in his containing bit there is a space in the string he just said
20:12 -!- Fish [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
20:12 < dgnorton> It's a unicode string sent from an MFC C++ app via socket
20:12 < pharris> Looks like UTF16(LE).
20:12 < dgnorton> I get these bytes ...  0x30,00,30,00,30,00,31,00
20:12 < skelterjohn|work> i have a feeling that MFC is doin gunicode wrong
20:12 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
20:12 < huin> if it's MS, then UTF16 LE sounds highly likely
20:13 < skelterjohn|work> http://golang.org/pkg/utf16/
20:13 < pharris> Also http://golang.org/pkg/encoding/binary/ LittleEndian
20:13 * huin still isn't quite clear on the benefits of UTF16
20:14 < pharris> huin: There aren't any, aside from interop with Java and MS
products.
20:14 < skelterjohn|work> btw, 0x30 and 30 aren't the same
20:14 < skelterjohn|work> one is hex, one is decimal
20:14 < huin> pharris: that's what i figured :D
20:14 -!- nekoh [~nekoh@dslb-178-004-078-195.pools.arcor-ip.net] has joined
#go-nuts
20:15 < pharris> UCS2 kind-of sort-of made sense, back when there weren't as
many code points.  When UNICODE got bigger, Sun (Oracle) Java and MS did a big
s/UCS2/UTF16/g on all the documentation so they wouldn't have to change all their
code.
20:16 < huin> huh.  so when you have a char in Java, what does it mean?
it's a 16bit integer, isn't it?  does that mean it's potentially one half of a
codepoint?
20:16 -!- va3atc [~va3atc@24-246-17-37.cable.teksavvy.com] has quit []
20:16 < skelterjohn|work> dgnorton: the problem might be strconv.Atoi not
interacting properly with code points that are more than a single byte
20:17 -!- Project-2501 [~Marvin@82.84.83.15] has joined #go-nuts
20:17 < skelterjohn|work> strconv.Atoi("0001") -> 1
20:17 < skelterjohn|work>
strconv.Atoi(string([]byte{0x30,0x00,0x30,0x00,0x30,0x00,0x31,0x00})) -> error,
can't do "0001"
20:17 < dgnorton> skelterjohn|work: the utf16 thing looks promising ...
hadn't noticed it
20:17 < pharris> huin: Originally, it was an entire code point (UCS2).  Now,
it might be half a code point (UTF16).
20:18 < pharris> huin: These days, a sensible language designer would use
either UTF-8 or 32-bit runes (which are the two things Go supports).
20:18 < dgnorton> out of time for now...will have to look at it again
later...thanks for the help
20:18 < huin> pharris: interesting.  i wonder if the reverse-engineered
minecraft protocol docs should say that the string16 type is UTF-16 and not UCS-2
20:19 < skelterjohn|work> dgnorton: if you strip out all the 0x00 from the
[]byte, it works with strconv.Atoi
20:19 < huin> pharris: yeah...  those are the only two realistic choices for
moving forwards in my view.  everything else seems like legacy/interoperability
support
20:19 < dgnorton> skelterjohn|work: thought about that and that's probably
the easiest way to go
20:20 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
20:20 < skelterjohn|work> dgnorton: I don't know if it's appropriate or not
- ask aiju
20:20 -!- Project_2501 [~Marvin@82.84.67.214] has quit [Ping timeout: 276 seconds]
20:20 < skelterjohn|work> he knows lots about esoteric character encodings
20:20 * huin suspects that the memory usage of his server is the 386 GC bug
20:21 < Sh4rK> probably if the numbers are bigger than a byte it will fail
20:21 -!- anticide [~textual@91.200.224.93] has joined #go-nuts
20:21 < dgnorton> skelterjohn|work ...  it's probably not appropriate in
some cases but in this case I know that while it's unicode it will always be 0x30
- 0x39
20:21 < aiju> 22:19 * huin still isn't quite clear on the benefits of UTF16
20:21 < aiju> there are none
20:21 < aiju> really.
20:21 < skelterjohn|work> if it's supposed to be a human readable string,
the numbers shouldn't be bigger than 4 bits
20:22 < aiju> UCS-2 and UTF-16 are identical for the BMP
20:22 < skelterjohn|work> dgnorton: you can also use range and roll your own
atoi
20:22 < huin> aiju: aye.  the best description i've heard of UTF-16 so far
is that it combines the best and worst elements of UTF-8 and UCS-2
20:22 < aiju> and no one really ever leaves the BMP
20:22 < huin> sorry, just the worst
20:22 < aiju> huin: apples and pears
20:22 -!- vinisterx [~ryan@74-129-201-27.dhcp.insightbb.com] has quit [Read error:
Operation timed out]
20:22 < skelterjohn|work> val := 0; for _, c := range theString { val *= 10;
val += c - '0' }
20:22 < skelterjohn|work> i think that will work...untested
20:23 < dgnorton> thanks for the help...gotta run
20:23 -!- dgnorton [~dgnorton@97.65.135.112] has quit []
20:23 < skelterjohn|work> whoah that isn't even close to working
20:24 < skelterjohn|work> c - '0' is not doing what i hoped
20:24 -!- pjacobs [~pjacobs@adsl-99-20-147-171.dsl.aus2tx.sbcglobal.net] has quit
[Ping timeout: 276 seconds]
20:24 < huin> oh well, too late now :)
20:24 < aiju> now a nuclear rocket will blow up
20:24 < Sh4rK> it didn't
20:25 < skelterjohn|work> aiju: that's what nuclear rockets are for
20:25 < skelterjohn|work> blowing up
20:25 < huin> this should be a valuable lesson not to use UTF-16 when
working on nuclear rockets
20:25 < Sh4rK> :D:D
20:26 < skelterjohn|work> hmm - when i print the string i get "0001", when i
range over it and print each char, i get 8 chars and every other one is empty
(corresponding to the 0x00)
20:26 < aiju> skelterjohn|work: your terminal might not display null bytes
20:26 < skelterjohn|work> i'm using golang.org actually, but yeah
20:27 < skelterjohn|work> my for loop works if you skip the null bytes
20:27 < skelterjohn|work> so, i'm not an idiot, i'm just ignorant
20:28 -!- alehorst [~alehorst@189.58.29.36.dynamic.adsl.gvt.net.br] has quit
[Quit: Leaving.]
20:28 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has left #go-nuts
["Leaving..."]
20:30 -!- hcatlin [~hcatlin@host86-161-237-3.range86-161.btcentralplus.com] has
joined #go-nuts
20:30 -!- hcatlin [~hcatlin@host86-161-237-3.range86-161.btcentralplus.com] has
quit [Changing host]
20:30 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
20:31 -!- keithcascio [~keithcasc@nat/google/x-vsaucdtfpgumkhkn] has joined
#go-nuts
20:39 -!- Jessica_Lily [~Jessica@85.211.7.225] has quit [Changing host]
20:39 -!- Jessica_Lily [~Jessica@unaffiliated/xray7224] has joined #go-nuts
20:40 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.0]
20:40 -!- anticide [~textual@91.200.224.93] has quit [Quit: Computer has gone to
sleep.]
20:40 < zippoxer> if any1 is interested in go networking with channels:
http://www.badgerr.co.uk/2011/06/20/golang-away-tcp-chat-server/
20:40 < zippoxer> pretty new post
20:41 -!- dfr|mac [~dfr|work@nat/google/x-slgwhvzzvbnplmkz] has joined #go-nuts
20:41 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
hcatlin]
20:43 < Sh4rK> thx
20:43 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Quit: Leaving]
20:51 -!- virtualsue [~chatzilla@nat/cisco/x-blnhyvuumgixjqlb] has quit [Ping
timeout: 240 seconds]
20:54 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
20:58 -!- Sh4rK [sh4rk@3e44a6e1.adsl.enternet.hu] has quit [Quit: Távozom]
20:58 -!- virtualsue [~chatzilla@host81-148-52-109.in-addr.btopenworld.com] has
joined #go-nuts
21:01 -!- huin [~huin@91.85.188.1] has quit [Quit: bedtime]
21:02 * magn3ts wishes there were a #camlistore at freenode.
21:03 -!- niemeyer [~niemeyer@89.127.177.74] has joined #go-nuts
21:06 -!- Project-2501 [~Marvin@82.84.83.15] has quit [Quit: E se abbasso questa
leva che succ...]
21:08 < ArgonneIntern> always scary when you code a daemon, compile it
without errors on first go, run and test it without failures or errors...
21:08 < ArgonneIntern> usually when that happens there is a huge sneaky bug
somewhere
21:10 < lucian> i've been wondering, are there any plans for exposing
syntax-level features?  like overloading [ ], for example
21:11 < ArgonneIntern> I could be mistaken but I think the go devs have
stated on several places that go won't support overloading of operators
21:11 < lucian> ArgonneIntern: bah.  sad
21:12 < lucian> i hate this trend of repeating Java's mistakes in otherwise
nice languages (Vala, Go)
21:12 < ArgonneIntern> http://golang.org/doc/go_faq.html#overloading
21:13 < ArgonneIntern> looks like I'm right
21:13 < lucian> ArgonneIntern: i see thanks.  very sad ...
21:13 < lucian> ah, but that's not the same thing
21:13 < lucian> i meant simply being able to offer the same syntax for
library data structures
21:14 < lucian> like python's __ methods
21:15 < ArgonneIntern> I'm unclear what you mean, also I don't use python.
You'll have to ask someone more experienced
21:15 -!- ronnyy [~quassel@p4FF1C41C.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
21:15 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Quit: Leaving...]
21:15 < lucian> ArgonneIntern: overloading was a bad term.  i'd like to be
able to provide [ ] syntax for user-created types
21:16 < ArgonneIntern> like define the operators for it?
21:16 < ArgonneIntern> as in c++
21:16 < lucian> yes, i suppose
21:16 < lucian> i don't really know C++
21:16 < lucian> it's commonly called overloading, but it isn't always
overloading default behaviour
21:17 < ArgonneIntern> ok well you want to define the [] for your own
datatypes right
21:17 < lucian> most of the time it just provides syntax support (like + -
for custom numeric types)
21:17 < lucian> ArgonneIntern: yeah, among others
21:17 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Ping
timeout: 240 seconds]
21:17 < ArgonneIntern> the [] is a predefined operator
21:17 < ArgonneIntern> so overloading it is not allowed
21:17 < ArgonneIntern> as for making your own new operators I'm not sure
about that
21:17 < lucian> right, i know.  but i don't care about overloading it
21:17 < ArgonneIntern> I'm not experienced enough in go to answer that
21:18 < lucian> ok
21:18 < ArgonneIntern> but anything that is an operator could really be a
method
21:18 < lucian> A[1] where A is an object of a type I created makes no sense
21:18 < lucian> so i wouldn't be overloading anything by just providing an
action for it
21:18 < ArgonneIntern> nope
21:19 < lucian> ArgonneIntern: yes, it could be a method (or method-like
thing).  that's what python does
21:19 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 240 seconds]
21:19 < ArgonneIntern> heh well before I looks like a fool I'm going to stop
answering :)
21:19 < lucian> in Python, A[1] just means A.__getitem__(1)
21:19 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Ping timeout: 250 seconds]
21:19 < lucian> ArgonneIntern: :)
21:19 < ArgonneIntern> I just know you can't overload methods or operators
21:19 < ArgonneIntern> I'm fairly certain (not 100%) that you can't invent
new ones
21:19 < lucian> i know this isn't possible in Go, and i know overloading
existing methods is disallowed
21:19 < ArgonneIntern> but you can make as many methods as you want
21:20 -!- Fish [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
21:20 < lucian> and i know right now defining actions for operators (not
overloading) isn't possible, but i was wondering if people have been thinking
about it
21:20 < ArgonneIntern> by new ones I mean operators
21:20 < ArgonneIntern> not methods
21:20 < lucian> ArgonneIntern: right, but they won't have syntax support
21:21 < lucian> yeah, got that
21:21 < ArgonneIntern> skelterjohn|work:
21:21 < ArgonneIntern> he is knowledgable in this, if he is here maybe he
can answer you
21:21 < Crnobog> var buf []byte; string(buf) creates a copy, right?
21:22 < ArgonneIntern> do you mean string(buf) returns a new peice of
memory?
21:22 < ArgonneIntern> that is of type string
21:22 < lucian> ArgonneIntern: i see this as a rather important feature.
looking at Java, not providing this has proven to be a huge mistake.  there are
lots of ugly workarounds (Integer.add, HashMap.get/set)
21:22 -!- anticw [~anticw@c-98-210-108-13.hsd1.ca.comcast.net] has quit [Ping
timeout: 244 seconds]
21:22 < Crnobog> ArgonneIntern: Yes
21:22 < ArgonneIntern> yes
21:22 < ArgonneIntern> it does
21:22 < Crnobog> Thanks, just wanted to be sure
21:22 -!- anticw [~anticw@c-98-210-108-13.hsd1.ca.comcast.net] has joined #go-nuts
21:24 < ArgonneIntern> Crnobog: strings are immutable so it wouldn't matter
in that case, unless you wanted to return the string(buf) and then change buf
21:25 < Crnobog> Well precisely, that was my worry
21:25 < ArgonneIntern> ;)
21:26 -!- nekoh [~nekoh@dslb-178-004-078-195.pools.arcor-ip.net] has quit [Ping
timeout: 260 seconds]
21:30 * mkb218 takes the smalltalk route and allows all characters in method names
21:33 < KirkMcDonald> Including whitespace?
21:36 -!- ijknacho [~goofy@cpe-72-190-64-3.tx.res.rr.com] has quit [Ping timeout:
255 seconds]
21:36 -!- ArgonneIntern [82ca87e6@gateway/web/freenode/ip.130.202.135.230] has
quit []
21:40 -!- dfr|mac [~dfr|work@nat/google/x-slgwhvzzvbnplmkz] has quit [Remote host
closed the connection]
21:40 -!- tncardoso [~thiago@187.58.197.172] has quit [Quit: bye]
21:42 < kevlar_work> lucian, Go will not support operator overloading, and
by that I mean the runtime will never call a method for you when you use a builtin
operator on a user-defined type
21:42 < lucian> kevlar_work: i see.  that's very sad :(
21:42 < kevlar_work> that being said, it is perfectly happy to use standard
operators when they work on the underlying type, even if it is a named type
21:43 < kevlar_work> so you can type Map map[string]int and if you have x :=
make(Map), you can do x["test"] = 3
21:43 < kevlar_work> and then you can have whatever functions you want on it
like func (m Map) Reverse() map[int]string {}
21:43 < lucian> kevlar_work: how about implementing a custom numeric type?
adding +/- to a vector type?  mapping to a distributed hash?
21:44 < kevlar_work> lucian, all very well-intentioned uses of operator
overloading, but prone to abuse.
21:44 -!- pyrhho [~pyrhho@027dcbf3.bb.sky.com] has joined #go-nuts
21:44 < kevlar_work> Go is all about being very up-front with the code that
you're looking at; you shouldn't have to delve into anything to figure out if it's
doing something unexpected.
21:44 < lucian> kevlar_work: when it actually overloads existing behaviour.
if the types have no behaviour defined for that operator, i don't see a problem
21:44 -!- pyrhho [~pyrhho@027dcbf3.bb.sky.com] has quit [Remote host closed the
connection]
21:45 -!- virtualsue [~chatzilla@host81-148-52-109.in-addr.btopenworld.com] has
quit [Quit: ChatZilla 0.9.87 [Firefox 4.0.1/20110413222027]]
21:45 < kevlar_work> lucian: as soon as x + y stops meaning arithmetic, you
get into some very difficult to understand code that is a maintenance nightmare.
21:45 < lucian> kevlar_work: but one could say that about any feature
21:45 < Crnobog> Is there a way to access the zero value of a type as an
expression?  e.g.  I have type Mine struct { something int; buf bytes.Buffer } and
I want to initialise Mine{1,???}
21:46 -!- pyrhho [~pyrhho@027dcbf3.bb.sky.com] has joined #go-nuts
21:46 < lucian> i do want x + y to mean arithmetic, but not necessarily
between already defined types
21:46 <+iant> Crnobog: just don't initialize it
21:46 <+iant> Mine{ something: 1 }
21:46 < ment> lucian: does x + y have to be associative?  commutative?
21:46 < kevlar_work> lucian, as soon as x + y calls a function, it ceases to
mean arithmetic and I have to go double-check that you're not having any
side-effects if I'm debugging your code
21:47 < lucian> kevlar_work: right, but you have to do that for any method
anyway
21:47 < lucian> ment: whatever the programmer decides.  i would like it to
be just syntax for .add(a, b)
21:47 < Crnobog> iant: That's a bit of a pain when there are many more
fields than just "something"...
21:47 < lucian> or similar
21:48 < lucian> kevlar_work: i know how much pain the lack of this feature
produces in Java, which is why I'm enquiring about Go
21:48 < kevlar_work> lucian, go grep your code; see how many times you use
[], (), +, ++, -, *, /, &, etc and compare that to the number of function calls
you have.
21:48 <+iant> Crnobog: well, in the case of bytes.Buffer, it's a struct, so
you can say bytes.Buffer{}
21:48 <+iant> but there is no general syntax for the zero value, no
21:49 < lucian> kevlar_work: i don't see frequency as very relevant.  it
would only happen for user-defined types
21:49 -!- Murarth [~Murarth@184-98-57-28.phnx.qwest.net] has joined #go-nuts
21:49 -!- message144 [~message14@cpe-75-83-155-145.socal.res.rr.com] has joined
#go-nuts
21:49 < Crnobog> iant: bytes.Buffer{} gives me an error for assigning
implicitly to an unexported field, sadly
21:49 <+iant> ah, hm
21:49 < Murarth> Is there any documentation for writing Go packages in C?
21:50 < kevlar_work> lucian, the point is that you can no longer trust
operators.  You still have to check every operator in the function to see if it's
a user-defined type, then go find its function, then prove it's doing what you
think
21:50 <+iant> there may be no way, then
21:50 < lucian> kevlar_work: and that is considered unacceptable?  i see
21:50 < kevlar_work> lucian, for a language that prides itself on having
easily understandable code?  of course that's unacceptable.
21:51 < sl> what is the purpose of redefining operators?
21:51 < lucian> sl: not "re"
21:51 < kevlar_work> sl, making code more terse
21:51 < lucian> kevlar_work: python prides itself on having easily
understandable code, and it provides this very same feature
21:51 < lucian> kevlar_work: and following the same interface
21:52 < kevlar_work> lucian, I would argue that python has very
difficult-to-understand code precisely because of the data model and duck typing.
21:52 < lucian> kevlar_work: if i were to migrate from floats to my custom
Decimal type, i'd have to rewrite a lot of code
21:52 < sl> lucian: if you found a bug that affected a lot of your code,
wouldn't you need to rewrite that too?
21:53 < kevlar_work> lucian, any editor worth its footprint can help you
with that.  If you're changing a + b to add(a, b) a simple regular expression can
do the job.
21:53 < lucian> sl: sure, but i could keep the same interface
21:53 < lucian> kevlar_work: it's not always that simple.  but if you claim
that python is very difficult to understand, i guess we differ on deeper matters
as well
21:54 < kevlar_work> lucian, it's really easy to see what a python
programmer thinks he's doing, but it's incredibly difficult to parse out exactly
what is going on and why
21:54 < lucian> kevlar_work: i disagree on that.  i find it quite easy to
figure out exactly what's going on and why.  but again, we differ on this
21:55 -!- Sep102 [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has quit [Read
error: Connection reset by peer]
21:55 < kevlar_work> lucian, I wish the code base I worked on over the
summer was public; it would make your brain explode.  It made heavy use of
inspection, duck typing, dynamic dispatch, context objects, generators,
comprehensions, etc
21:56 < kevlar_work> and whenever you had to go find where a value was
generated it would take upwards of an hour.
21:56 < lucian> right, but that's just bad design/practice
21:56 -!- r_linux [~r_linux@189.38.220.35] has quit [Quit: ........home]
21:56 < sl> why encourage it?
21:56 < kevlar_work> why *allow* it?
21:57 < lucian> you can't make a language that makes bad practice impossible
21:57 < lucian> kevlar_work: because it's extremely useful most of the time
21:57 < kevlar_work> lucian, it all started out as "very useful" and it made
the code "much cleaner" and much "easier to write"
21:57 < lucian> and python does discourage silly things quite actively
21:57 < kevlar_work> lol.  you and I will have to agree to disagree on
*that*
21:58 < lucian> kevlar_work: and one could say that about both obviously bad
and obviously good features
21:58 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
21:58 -!- Sep102 [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has joined
#go-nuts
21:58 < kevlar_work> Python is an amazing scripting language that allows for
rapidly composing tools to do simple tasks
21:58 < kevlar_work> I think it's inappropriate for a lot of what people try
to use it for.
21:58 < lucian> kevlar_work: yes, we do disagree on *that*
21:58 < pyrhho> Sorry, mind if I interrupt?  I have a quick (hopefully)
question about the reflect package.
21:59 < kevlar_work> pyrhho, you're not interrupting :)
21:59 < pyrhho> I'm curious how one would go about getting a list of
attribute values for an object in go.  I was reading this:
http://merbist.com/2011/06/27/golang-reflection-exampl/ where he takes an object
and gives a list of attributes, but I am unsure how to go about getting the values
for those attributes (if that makes sense)
21:59 * lucian was just leaving, i guess :)
21:59 < pyrhho> basically I want func(object interface{})
map[string]interface{}
21:59 < pyrhho> where the returned map is of the form {"attribute_name":
attribute_value}
21:59 < pyrhho> having a bit of trouble sorting through the reflect
library's doc
22:00 < kevlar_work> pyrhho, take a look at the source for the json or (at
tip) xml Marshal if you want to see gritty reflection
22:00 < kevlar_work> basically what it amounts to is that there's no easy
way to get your mapping, but it's doable with a loop and a (usually pretty large)
switch statement
22:00 < pyrhho> json at tip?  or xml at tip?
22:00 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
22:00 < kevlar_work> xml Marshal was added at tip, json has had Marshal
forever
22:00 < pyrhho> bleh.  ok.  was hoping there would be a nicer way than the
switch statement.
22:00 < pyrhho> ah ok.  cool
22:01 < pyrhho> will have a look there
22:01 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
22:01 < kevlar_work> pyrhho, the problem is that Go is statically typed, so
it's no simple feat to handle values generically.
22:01 < pyrhho> isn't that was interfaces are for?
22:02 < pyrhho> I must be missing something...
22:02 -!- Murarth [~Murarth@184-98-57-28.phnx.qwest.net] has left #go-nuts ["I'm
gone."]
22:02 < kevlar_work> pyrhho, interfaces are one piece of the puzzle
22:02 < kevlar_work> but when I say generically, I mean to be able to handle
*any* object of *any* type
22:02 < kevlar_work> sure, you can pass the value around as an interface{},
but that doesn't help you get at what's in the value.
22:03 < pyrhho> ah
22:04 < kevlar_work> if you want to get a map[string]interface{}, you can
probably get away with a loop over reflect.ValueOf(structval)'s FieldByIndex(i)
and use reflect.TypeOf(structval)'s FieldByIndex(i) to get the field name.
22:05 < kevlar_work> then you just do `blah[fieldName] =
fieldValue.Interface()`
22:05 -!- jbooth1 [~jay@209.249.216.2] has left #go-nuts []
22:05 < pyrhho> ok.  I'd gotten as far as the list of field names.  it was
going from the names to the values I was a bit stuck on.
22:05 < kevlar_work> so, field names are part of the Type, values are part
of the Value
22:06 -!- zippoxer [~zippoxer@bzq-79-181-249-97.red.bezeqint.net] has quit [Ping
timeout: 276 seconds]
22:06 < kevlar_work> if you have the field names, get a reflect.Value and
call val.FieldByName(fieldname).Interface()
22:06 -!- sniper506th [~sniper506@cpe-098-122-081-186.sc.res.rr.com] has joined
#go-nuts
22:06 < pyrhho> ah!
22:06 < pyrhho> ok
22:06 < pyrhho> didn't realize it was split like that, i guess.  thanks
22:07 < kevlar_work> it's not an easy package to parse through.  And this is
after it was *simplified.*
22:08 < pyrhho> yeah.  i had looked at it a while ago and just gave up in
despair
22:08 < kevlar_work> I would not be surprised if utility functions like the
one you're writing get added to the standard library someday because they're all
that's required for a majority of use cases.
22:08 < pyrhho> it's calmed down a lot
22:08 < pyrhho> sweet
22:08 < pyrhho> that would be excellent
22:08 < kevlar_work> (probably not soon.)
22:08 < pyrhho> darn
22:08 < pyrhho> haha
22:08 -!- enferex [~enferex@users.757.org] has joined #go-nuts
22:08 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has quit [Remote host
closed the connection]
22:08 < kevlar_work> the thing that confused me for awhile was reflect.Type
and reflect.Kind lol
22:09 < pyrhho> the other awesome error I was getting for a while was
"reflect.Type is not a type"
22:09 < pyrhho> i was like eh???
22:09 < pyrhho> finally figured out you have to do reflect.Type.(type)
22:10 < pyrhho> heh
22:10 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.0]
22:10 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
22:11 < pyrhho> YEAH!
22:11 < pyrhho> got it!
22:11 < pyrhho> thanks :)
22:13 -!- pyrhho [~pyrhho@027dcbf3.bb.sky.com] has quit [Quit: Ex-Chat]
22:15 < kevlar_work> And now, back to your regularly scheduled programming.
22:20 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
22:24 -!- Nitro [~Nitro@unaffiliated/nitro] has joined #go-nuts
22:25 -!- ExtraSpice [XtraSpice@88.118.37.245] has quit [Ping timeout: 276
seconds]
22:26 -!- ijknacho [~goofy@cpe-72-190-64-3.tx.res.rr.com] has joined #go-nuts
22:27 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Remote
host closed the connection]
22:30 -!- enferex [~enferex@users.757.org] has quit [Ping timeout: 258 seconds]
22:31 -!- enferex [~enferex@users.757.org] has joined #go-nuts
22:32 -!- sniper506th [~sniper506@cpe-098-122-081-186.sc.res.rr.com] has quit
[Quit: Computer has gone to sleep.]
22:33 -!- Slant [~scott@124-148-144-228.dyn.iinet.net.au] has joined #go-nuts
22:33 -!- sniper506th [~sniper506@cpe-098-122-081-186.sc.res.rr.com] has joined
#go-nuts
22:35 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has joined
#go-nuts
22:37 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
22:39 -!- vinisterx [~ryan@74-129-201-27.dhcp.insightbb.com] has joined #go-nuts
22:40 -!- ExtraSpice [XtraSpice@88.118.37.245] has joined #go-nuts
22:42 -!- gnuvince [~vince@ip-96-43-233-174.dsl.netrevolution.com] has joined
#go-nuts
22:55 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 276 seconds]
22:57 -!- Slant [~scott@124-148-144-228.dyn.iinet.net.au] has quit [Quit: Slant]
23:05 -!- ancientlore [~ancientlo@63.76.22.10] has quit [Quit: ~ Trillian Astra -
www.trillian.im ~]
23:05 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has quit [Quit:
twolfe18]
23:05 < magn3ts> Is Android support still "not something that's being
actively worked on" ?
23:08 < uriel> magn3ts: Rob's official answer on the topic is:
23:08 < uriel> "No comment"
23:08 < magn3ts> o_0
23:08 < uriel> i will just note that Brad worked on the Android team before
he recently moved to the Go team
23:09 < magn3ts> I wondered if he had moved teams.  I was following him on
Twitter after some Android tweets and now it's mostly Go/Camlistore.
23:09 < magn3ts> Fun stuff
23:09 < kevlar_work> isn't pretty much anything regarding Android "no
comment" right about now?  lol.
23:10 < uriel> yes, actually I think he did tweet saying that he had
officially moved to the Go team
23:19 -!- iant [~iant@nat/google/x-gbflvqudxotqjhol] has quit [Ping timeout: 255
seconds]
23:23 -!- nekoh [~nekoh@dslb-088-069-134-142.pools.arcor-ip.net] has joined
#go-nuts
23:26 -!- niemeyer [~niemeyer@89.127.177.74] has quit [Ping timeout: 240 seconds]
23:27 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
23:27 -!- franciscosouza [~francisco@201.7.186.67] has quit [Quit: franciscosouza]
23:29 -!- ExtraSpice [XtraSpice@88.118.37.245] has quit [Remote host closed the
connection]
23:32 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
23:32 -!- vyom [~vyom@c-24-18-47-160.hsd1.wa.comcast.net] has joined #go-nuts
23:34 -!- iant [~iant@67.218.104.187] has joined #go-nuts
23:34 -!- mode/#go-nuts [+v iant] by ChanServ
23:38 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 252 seconds]
23:46 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has joined
#go-nuts
23:50 -!- nekoh [~nekoh@dslb-088-069-134-142.pools.arcor-ip.net] has quit [Quit:
nekoh]
23:54 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has quit [Ping
timeout: 252 seconds]
23:55 -!- Andy_S [~kvirc@222.129.41.248] has quit [Ping timeout: 260 seconds]
23:57 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Quit: Leaving]
--- Log closed Wed Jun 29 00:00:54 2011