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

--- Log opened Wed Aug 03 00:00:19 2011
00:02 -!- tvw [~tv@e176006091.adsl.alicedsl.de] has quit [Read error: Connection
reset by peer]
00:04 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
00:05 -!- tvw [~tv@e176005254.adsl.alicedsl.de] has joined #go-nuts
00:06 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has left #go-nuts []
00:08 -!- robteix [~robteix@host195.190-231-150.telecom.net.ar] has joined
#go-nuts
00:14 -!- tgall_foo [~tgall@206.9.88.154] has quit [Read error: Connection reset
by peer]
00:15 -!- tgall_foo [~tgall@206.9.88.154] has joined #go-nuts
00:19 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 260 seconds]
00:19 -!- cco3 [~conleyo@nat/google/x-qjwxaggxkzhyyfjy] has quit [Quit: Leaving.]
00:24 -!- tvw [~tv@e176005254.adsl.alicedsl.de] has quit [Remote host closed the
connection]
00:24 -!- mardok_ [~mardok@74-140-109-5.dhcp.insightbb.com] has quit [Quit: Lost
terminal]
00:26 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
00:37 < knowmercy> how do I get a string representation of a Template?
00:40 -!- Sep102 [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has quit [Read
error: Connection reset by peer]
00:40 -!- Sep102 [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has joined
#go-nuts
00:40 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
00:43 -!- lmnop [none@ppp-70-225-166-42.dsl.chmpil.ameritech.net] has quit [Ping
timeout: 260 seconds]
00:47 < Kahvi> Does TCPConn.Read read all data available at the moment and
possibly return without fully filling the byte slice or does it hang until the
slice is filled or error occurs?
00:50 -!- robteix [~robteix@host195.190-231-150.telecom.net.ar] has quit [Quit:
Computer has gone to sleep.]
00:54 -!- ccc1 [~Adium@140.109.98.230] has joined #go-nuts
00:54 -!- ccc12 [~Adium@140.109.98.187] has joined #go-nuts
00:57 -!- ph1234k [~Steven@ip72-209-135-200.ks.ks.cox.net] has quit [Quit:
Leaving]
00:58 -!- ph1234k [~ph1234k@ip72-209-135-200.ks.ks.cox.net] has joined #go-nuts
00:58 -!- ccc1 [~Adium@140.109.98.230] has quit [Ping timeout: 246 seconds]
01:01 -!- ph1234k [~ph1234k@ip72-209-135-200.ks.ks.cox.net] has quit [Client Quit]
01:05 -!- deepfuture [~liuxing@218.75.249.184] has joined #go-nuts
01:06 < f2f> kahvi, the former.  if it was the latter it'd be caled ReadFull
01:06 -!- tokuhiro_ [~tokuhirom@www33009u.sakura.ne.jp] has quit [Quit: Tiarra
0.1: SIGINT received; exit]
01:06 -!- tokuhiro_ [~tokuhirom@www33009u.sakura.ne.jp] has joined #go-nuts
01:07 < f2f> note that you can pass that Conn to io.ReadFull() and achieve
the latter effect if you need it
01:07 -!- tokuhiro_ [~tokuhirom@www33009u.sakura.ne.jp] has quit [Client Quit]
01:07 -!- Fish [~Fish@exo3753.pck.nerim.net] has quit [Ping timeout: 260 seconds]
01:07 < Kahvi> f2f, thought so.  I just needed a confirmation because a
fellow programmer once mentioned something about Read hanging until os.EOF
01:08 -!- iant [~iant@67.218.103.234] has quit [Quit: Leaving.]
01:08 -!- ccc12 [~Adium@140.109.98.187] has quit [Ping timeout: 246 seconds]
01:09 -!- tokuhiro_ [~tokuhirom@www33009u.sakura.ne.jp] has joined #go-nuts
01:09 < Kahvi> At first I thought it would be confusing when almost
everything is Reader and/or Writer and can be used almost anywhere but nowadays I
love it.
01:10 -!- tsung [~jon@112.104.53.151] has quit [Read error: Connection reset by
peer]
01:10 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 250 seconds]
01:11 < f2f> yes.  it took me a while to realize the power behind
Reader/Writer.  for a while I was passing pointers to Conn interfaces and was
wondering why I can't use them anywhere else but in my code.
01:13 -!- tokuhiro_ [~tokuhirom@www33009u.sakura.ne.jp] has quit [Client Quit]
01:13 -!- tokuhiro_ [~tokuhirom@www33009u.sakura.ne.jp] has joined #go-nuts
01:15 -!- danilo04
[~danilo04@province-wireless-173-84-27-249.dr02.roch.ny.frontiernet.net] has
joined #go-nuts
01:18 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
01:19 -!- replore_ [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
01:20 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
01:23 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
01:25 -!- ronnyy [~quassel@p4FF1C4D4.dip0.t-ipconnect.de] has quit [Ping timeout:
276 seconds]
01:28 < Kahvi> I did the same.  Now I usually automatically use Writer and
Reader even if I use only one type of them in my code.  Should be easier to
understand for another Go programmer and you never know if someone wants to reuse
your code.
01:31 -!- seb32 [~sebastian@f055253242.adsl.alicedsl.de] has quit [Ping timeout:
255 seconds]
01:32 -!- ph1234k [~ph1234k@ip72-209-135-200.ks.ks.cox.net] has joined #go-nuts
01:33 -!- ccc1 [~Adium@140.109.98.7] has joined #go-nuts
01:34 -!- ccc12 [~Adium@140.109.98.187] has joined #go-nuts
01:37 -!- ccc1 [~Adium@140.109.98.7] has quit [Ping timeout: 258 seconds]
01:38 -!- gremmachook [u1735@gateway/web/irccloud.com/x-djpbkanxoihnsfhw] has
joined #go-nuts
01:39 -!- gremmachook [u1735@gateway/web/irccloud.com/x-djpbkanxoihnsfhw] has left
#go-nuts []
01:41 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Ping
timeout: 252 seconds]
01:43 -!- rael_wiki [~chatzilla@unaffiliated/rael-wiki/x-8420294] has quit [Ping
timeout: 255 seconds]
01:45 -!- Halavanja [~chatzilla@mcswl207.mcs.anl.gov] has joined #go-nuts
01:46 < Halavanja> Hello all.  I am trying to format a time.SecondsToLocal
time structure to the fomat of (hh:mm:ss) is there any way this can be done with
the format feature?
01:47 -!- comex [~ec2-user@ec2-67-202-46-7.compute-1.amazonaws.com] has quit
[Remote host closed the connection]
01:50 < knowmercy> this garyburd fella has some neat stuff on github
01:50 < f2f> halavanja, the documentation says that ANSI C time format
strings are available
01:51 -!- ccc12 [~Adium@140.109.98.187] has quit [Ping timeout: 258 seconds]
01:52 < Halavanja> So that would me that I can use %H:%M:%S?
01:53 < f2f> i'm looking at the code and i'm not so sure anymore :)
01:54 < Halavanja> haha yyeah that was what I was having problems with
01:54 < Halavanja> it seems like a simple thing to do
01:54 < str1ngs> Halavanja: 15:04:05
01:54 < str1ngs> literally use that
01:55 < str1ngs> godoc time | less to see what I mean
01:56 < Halavanja> I tried that first when I was browsing the site.  It kept
the minutes static for some reason
01:57 < Halavanja> And now it magically worked
01:57 < Halavanja> I have no idea what I was doing wrong
01:57 < Halavanja> thank you str1ngs
01:57 < Halavanja> and f2f for your help
01:58 < Halavanja> will this also allow for single digit times?
01:58 -!- rael_wiki
[~chatzilla@host198-51-dynamic.11-87-r.retail.telecomitalia.it] has joined
#go-nuts
01:58 -!- rael_wiki
[~chatzilla@host198-51-dynamic.11-87-r.retail.telecomitalia.it] has quit [Changing
host]
01:58 -!- rael_wiki [~chatzilla@unaffiliated/rael-wiki/x-8420294] has joined
#go-nuts
01:58 < Halavanja> i.e.  05 01..  etc
01:59 -!- ph1234k [~ph1234k@ip72-209-135-200.ks.ks.cox.net] has quit [Quit:
Leaving]
02:01 < str1ngs> not sure off hand but I would think so.
02:02 < Halavanja> okay because I know the other guy on the project was
using the timeToLocalSeconds.Hour, .Minute, .Second to do all of the conversions
and that seemed stupid to me
02:02 < Halavanja> just throw it in a fucntion
02:02 < Halavanja> lol
02:02 < Halavanja> answered my own question
02:02 < Halavanja> it does work
02:02 < Halavanja> thanks again!
02:07 < Halavanja> well it is time for me to take my leave again.  Thanks
again for all the help!
02:08 -!- Halavanja [~chatzilla@mcswl207.mcs.anl.gov] has quit [Quit: ChatZilla
0.9.87 [Firefox 5.0/20110622232440]]
02:08 -!- ccc1 [~Adium@140.109.98.187] has joined #go-nuts
02:23 -!- ccc1 [~Adium@140.109.98.187] has quit [Quit: Leaving.]
02:30 -!- tgall_foo [~tgall@206.9.88.154] has quit [Ping timeout: 250 seconds]
02:37 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has quit [Read
error: Connection reset by peer]
02:40 -!- deepfuture [~liuxing@218.75.249.184] has quit [Quit: Leaving.]
02:41 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 246 seconds]
02:52 -!- dreadlorde [dreadlorde@68.42.82.10] has joined #go-nuts
02:56 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Quit: Leaving]
03:04 -!- niemeyer [~niemeyer@200-102-194-39.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
03:06 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Read error:
Connection reset by peer]
03:10 -!- benjack [~benjack@bb220-255-251-77.singnet.com.sg] has joined #go-nuts
03:11 -!- benjack [~benjack@bb220-255-251-77.singnet.com.sg] has quit [Client
Quit]
03:16 -!- keithcascio [~keithcasc@nat/google/x-esloxbauydtgkjai] has quit [Quit:
Leaving]
03:18 -!- Fish [~Fish@exo3753.pck.nerim.net] has joined #go-nuts
03:21 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has joined #go-nuts
03:23 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
03:32 -!- tsung [~jon@112.104.53.151] has joined #go-nuts
03:38 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Remote host
closed the connection]
03:39 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
03:43 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
03:43 -!- replore [~replore@g1-223-25-190-182.bmobile.ne.jp] has joined #go-nuts
03:46 -!- bemasher [~bemasher@host-98-127-89-183.lar-wy.client.bresnan.net] has
joined #go-nuts
03:46 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Remote host
closed the connection]
03:51 -!- rael_wiki [~chatzilla@unaffiliated/rael-wiki/x-8420294] has quit [Quit:
ChatZilla 0.9.87 [Iceweasel 5.0/20110722135453]]
03:53 -!- replore [~replore@g1-223-25-190-182.bmobile.ne.jp] has quit [Remote host
closed the connection]
03:55 < bemasher> i'm having some trouble with parsing JSON data
03:55 < bemasher> what i've figured out so far is how to parse it into an
arbirtrary interface{}
03:55 < bemasher> but there's one particular section in the data i'd like to
then cast into a type i've defined
03:55 < bemasher> https://gist.github.com/1121873
03:56 < bemasher> to make it easier to access it's components without doing
a dozen data.(map[string]interface{}) type assertions
03:59 < jessta> bemasher: copy it
03:59 < bemasher> what do you mean?
04:00 < jessta> make a PaginationInfo and copy the fields from the map to
that struct
04:01 < jessta> you could probably make it fairly generic using reflect
04:02 < bemasher> ok, i'll see if i can come up with something
04:02 < bemasher> just seems unnecessarily complicated
04:02 < bemasher> there was an example i saw where they defined types that
mapped the entire json structure
04:02 < bemasher> but in my case there's way too much data that i don't need
to bother with doing that
04:02 < bemasher> and i can't guaranty that the structure won't change
04:03 -!- benjack [~benjack@bb220-255-251-77.singnet.com.sg] has joined #go-nuts
04:08 < f2f> try this:
04:08 < f2f> var data map[string]interface{}
04:08 < f2f> then:
04:08 < f2f> z := data["PaginationInfo"]
04:08 < f2f> zz, _ := json.MarshalIndent(z, "", "\t")
04:08 < f2f> println(string(zz))
04:09 < f2f> it works for me
04:10 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
04:10 < f2f> $ ./6.out
04:10 < f2f> { "PageCount": 0, "PageNumber": 1, "PageSize": 20,
"TotalCount": 643
04:10 < f2f> }
04:13 < bemasher> well, i've managed to get this
04:13 < bemasher> pageInfo :=
data.(map[string]interface{})["PaginationInfo"].(map[string]interface{})
04:13 < bemasher>
04:13 < bemasher> log.Println(pageInfo["TotalCount"])
04:13 < bemasher> this works, but it seems like the stupid way to do it
04:14 -!- tgall_foo [~tgall@206.9.88.154] has joined #go-nuts
04:14 -!- dreadlorde [dreadlorde@68.42.82.10] has quit [Ping timeout: 240 seconds]
04:15 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
04:15 < f2f> well, it's a statically typed language.  some things ought to
be harder.  what i suggested is that you predefine 'data' to be
map[string]interface, but it will contain more than one type of interface so you
can't really predefine 'paginationInfo'.  this is as close as you can get to a
dynamic structure and duck typing.
04:17 < bemasher> the method i've seen before for parsing json is to
predeinfe all of the types that will occur in the structure and pass that
structure to the decode method, json then fills it all in properly
04:17 < bemasher> i'm just trying to have json parse it into an interface
and then copy the map i'm interested into the type i've defined
04:17 < bemasher> which doesn't seem like it will work the way i think it
should
04:18 -!- ccc1 [~Adium@140.109.98.187] has joined #go-nuts
04:18 < f2f> right, so if you're not sure that PageCount will never change
you can't predefine it and expect it to always work, right?
04:18 < f2f> hence the interface{} dance
04:19 < bemasher> well i know that PaginationInfo won't change, it's just
that i have no intention of defining types for everything else returned in the
json data
04:19 -!- benjack [~benjack@bb220-255-251-77.singnet.com.sg] has quit [Quit:
Leaving.]
04:23 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
04:26 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
04:26 -!- mode/#go-nuts [+v iant] by ChanServ
04:27 < f2f> i think i see what you mean.  you can't extract a concrete type
from a map[string]interface{}, only interface{}.  i don't think i'm explaining it
well
04:27 < f2f> describing, rather
04:27 < bemasher> well it's better than anything i've been able to find
while searching for a solution
04:28 -!- vmil86 [~vmil86@88.118.36.96] has joined #go-nuts
04:28 < bemasher> well i think i may have solved parts of it at least
04:31 -!- pilgrum [~pilgrum@cpe-76-87-204-40.socal.res.rr.com] has joined #go-nuts
04:32 < bemasher> https://gist.github.com/1121873
04:32 < bemasher> i've defined another type that just dumps maps i'm not
interested in into an interface{}
04:32 < bemasher> but the rest go into types i know for sure including the
PaginationInfo i've defined
04:33 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 258 seconds]
04:33 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz]
04:34 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error: Operation
timed out]
04:35 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
04:35 -!- zozoR2 [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
04:35 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
04:37 -!- ccc1 [~Adium@140.109.98.187] has quit [Quit: Leaving.]
04:37 -!- ccc1 [~Adium@140.109.103.153] has joined #go-nuts
04:37 -!- ccc1 [~Adium@140.109.103.153] has quit [Client Quit]
04:38 -!- zozoR2 [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Client Quit]
04:38 < bemasher> ah nevermind, you can ignore fields you're not interested
in in the type definition and the decode function will just skip the data that
would go in them
04:38 -!- ccc1 [~Adium@140.109.98.187] has joined #go-nuts
04:39 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Remote host
closed the connection]
04:45 -!- Bigbear1 [~Cody@d75-158-137-7.abhsia.telus.net] has joined #go-nuts
04:48 -!- ccc1 [~Adium@140.109.98.187] has quit [Quit: Leaving.]
04:48 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
05:06 -!- Bigbear1 [~Cody@d75-158-137-7.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
05:07 -!- Bigbear1 [~Cody@d75-158-137-7.abhsia.telus.net] has joined #go-nuts
05:10 < f2f> ugh...  it should be possible to do this more easily :)
05:11 < f2f> i got the concrete type out, but only after encoding it from
interface{} to JSON and then back to PaginationInfo :) that's the long way to go
about it.
05:12 < f2f> off to read the decoder.
05:14 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the
connection]
05:22 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 255 seconds]
05:23 -!- ajray [~ajray@li175-41.members.linode.com] has joined #go-nuts
05:23 -!- Bigbear1 [~Cody@d75-158-137-7.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
05:25 < f2f> i think i understand the issue -- because data is
map[str]interface{} there is never anything decoded that has an actual
PaginationInfo concrete type, that's why all the casts to anything concrete fail.
05:26 < f2f> now, go doesn't have union types so you can't say 'my data is
going to be a map of string to many types, one of which is PaginationInfo'
05:28 < f2f> so one is left with a single option of turning map[str]iface{}
to concrete type by hand.  func makePaginationInfo(v map[string]interface{})
PaginationInfo {}
05:31 -!- pilgrum [~pilgrum@cpe-76-87-204-40.socal.res.rr.com] has quit [Ping
timeout: 252 seconds]
05:33 -!- xcombelle [~xcombelle@AToulouse-551-1-42-60.w90-11.abo.wanadoo.fr] has
joined #go-nuts
05:34 -!- noselasd [~kvirc@80.239.96.162] has quit [Read error: Connection reset
by peer]
05:37 < ajray> how do i convert int/uint without sign extension?
05:37 -!- pilgrum [~pilgrum@cpe-76-87-204-40.socal.res.rr.com] has joined #go-nuts
05:38 -!- GilJ [~GilJ@zeusgw.ugent.be] has quit [Ping timeout: 255 seconds]
05:40 < f2f> ajray, what exactly are you trying to achieve?
05:40 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
05:41 < ajray> f2f sign preservation of int's
05:41 < ajray> f(x,y int) int => returns the magnitude of x with the sign
of y
05:43 < ajray> technically I could do it with a tree of if statements
05:43 < ajray> y > 0 ? ( x < 0 ? -x : x ) : ( x < 0 ? x : -x)
05:44 < ajray> if that makes sense; basically four cases based on the signs
of x and y
05:44 < ajray> but i want to do it with bitwise arithmatic
05:44 < f2f> sounds like something "hacker's delight" should be able to
answer
05:45 < jessta> f2f: you could do it for just PaginationInfo, or you could
use reflect and write it to work with any struct
05:46 < ajray> hackers delight?
05:46 < f2f> jessta, i tried with reflect and couldn't do it.  could you
show me how to extract PaginationInfo using reflect?
05:47 < f2f> ajray, it's a book -- hacking tips at the bitwise level.
chapter 2-5 deals with sign extension
05:47 < f2f> http://www.hackersdelight.org/
05:47 < ajray> f2f: well its trivially simple if i know the size of the
int's.  maybe i just need to grab that from runtime
05:47 < f2f> you can force the size?  use int32 and int64 if you need them
05:50 < ajray> the idea was to make it use ints
05:50 < ajray> (part of the point of this whole thing)
05:50 < ajray>
https://groups.google.com/group/golang-nuts/browse_thread/thread/7f7d943754d88802
05:53 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
05:55 < f2f> would it be better if you simply checked whether x & y had
different signs?  that'll give you an operation + if statement instead of the 4
ifs above?
05:57 < f2f> umm.  here's some abs() C code for ints:
05:57 < f2f> http://graphics.stanford.edu/~seander/bithacks.html#IntegerAbs
05:58 < f2f> min/max are below
06:00 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
06:01 < f2f> that's not really helping, i know :)
06:01 -!- serialhex [~quassel@99.101.148.183] has quit [Read error: Connection
reset by peer]
06:01 -!- serialhex [~quassel@99-101-148-183.lightspeed.wepbfl.sbcglobal.net] has
joined #go-nuts
06:06 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
06:07 < bemasher> f2f: i got it solved, it works nicely now
06:07 < bemasher> http://pastebin.com/zkqF8NKu
06:07 < bemasher> you can just omit any fields you do'nt need in the type
and the json marshaler will skip any data that would go in them
06:10 < f2f> that looks much cleaner :)
06:11 -!- Kumul [~Kumul@67.224.130.18] has quit [Quit: gone]
06:14 -!- anticide [~textual@91.200.224.93] has quit [Read error: Connection reset
by peer]
06:22 < bemasher> yeah, so it's useful to know that you can just define only
the stuff you need and it will fill it in as it goes
06:22 < bemasher> i've also gotten some concurrency setup and this is
already much much faster than the version i wrote in python
06:22 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has joined
#go-nuts
06:27 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Remote
host closed the connection]
06:31 -!- GilJ [~GilJ@zeusgw.ugent.be] has joined #go-nuts
06:36 -!- virtualsue [~chatzilla@nat/cisco/x-tdyqwmagffozzlwg] has joined #go-nuts
06:37 -!- Adys_ [~Adys@unaffiliated/adys] has joined #go-nuts
06:38 -!- serialhex [~quassel@99-101-148-183.lightspeed.wepbfl.sbcglobal.net] has
quit [Ping timeout: 260 seconds]
06:39 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 255 seconds]
06:39 -!- serialhex [~quassel@99-101-148-183.lightspeed.wepbfl.sbcglobal.net] has
joined #go-nuts
06:41 -!- noodles775 [~michael@canonical/launchpad/noodles775] has joined #go-nuts
06:52 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 260 seconds]
06:54 -!- firwen [~firwen@adevlaptop.cern.ch] has joined #go-nuts
07:06 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
07:10 -!- Jamra [~Jamra@89-139-63-150.bb.netvision.net.il] has joined #go-nuts
07:11 -!- napsy [~luka@193.2.66.6] has joined #go-nuts
07:21 -!- xcombelle [~xcombelle@AToulouse-551-1-42-60.w90-11.abo.wanadoo.fr] has
quit [Ping timeout: 260 seconds]
07:24 -!- yogib [~yogib@131.234.59.64] has joined #go-nuts
07:26 -!- Jamra [~Jamra@89-139-63-150.bb.netvision.net.il] has quit [Ping timeout:
255 seconds]
07:28 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has quit [Quit:
Leaving]
07:29 -!- odoacre [~antonio@218.241.169.34] has quit [Ping timeout: 250 seconds]
07:29 -!- xcombelle [~xcombelle@AToulouse-551-1-144-40.w86-201.abo.wanadoo.fr] has
joined #go-nuts
07:35 -!- odoacre [~antonio@222.126.240.10] has joined #go-nuts
07:35 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
07:37 -!- deepfuture [~liuxing@218.75.249.184] has joined #go-nuts
07:38 < f2f> bemasher, after looking a bit more, i'm now convinced yours is
the correct way to do it.  one can't simply create types from nothing.  even when
using reflection one must have a concrete type to make a conversion from/to.
07:38 < bemasher> true, this is much cleaner than anything i could probably
have done with reflect anyway
07:41 < f2f> my union type effort came from an attempt to describe 'data'
statically, but that doesn't work -- simply defining the concrete types one needs
and omitting the rest is much better than throwing the kitchen sync into a global
union type (interface{} notwithstanding)
07:41 < f2f> because interface is not a type :)
07:42 -!- erus` [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
07:42 < f2f> the more i learn the more i think a lot more thought went into
go than we give it credit for :)
07:44 < bemasher> yeah, definitely
07:44 < bemasher> at first some things seem stupid and overly complex
07:45 < bemasher> but once you figure it out you get that "ah, i see what
you did there" moment
07:45 -!- firwen [~firwen@adevlaptop.cern.ch] has quit [Ping timeout: 250 seconds]
07:46 < f2f> exactly
07:47 -!- samuell [~samuel@pc2-samuel.uppmax.uu.se] has joined #go-nuts
07:48 -!- samuell [~samuel@pc2-samuel.uppmax.uu.se] has left #go-nuts []
07:50 -!- seb32 [~sebastian@89.246.67.229] has joined #go-nuts
07:50 -!- foocraft [~ewanas@178.152.109.5] has quit [Quit: default SIGPORTAL
handler]
07:56 -!- sebastianskejoe [~sebastian@56344f29.rev.stofanet.dk] has joined
#go-nuts
08:06 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
08:07 < erus`> http://imgur.com/gallery/APmQQ
08:10 < fluffle> sadface, r59 appears to break ragel-generated Go code
08:12 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
08:13 -!- deepfuture [~liuxing@218.75.249.184] has quit [Read error: Connection
reset by peer]
08:14 -!- neshaug [~oyvind@213.239.108.5] has quit [Read error: No route to host]
08:27 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined
#go-nuts
08:30 < bemasher> huh, this is weird
08:30 < bemasher> i'm unable to import csv
08:30 < bemasher> i get "can't find import: csv"
08:30 < bemasher> on both my windows system and my linux system
08:31 < bemasher> they should both be the latest install of go too
08:31 -!- neshaug [~oyvind@213.239.108.5] has joined #go-nuts
08:32 -!- deepfuture [~liuxing@218.75.249.184] has joined #go-nuts
08:39 < f2f> cd $GOROOT/src/pkg/csv && make install
08:39 < f2f> it sounds like your install did no complete
08:40 < f2f> i get this error often because i have two separate systems used
for 386 and amd64 arches.  if i'm on the wrong one i don't have the package
compiled
08:41 < aiju> hahahaha, a CSV package
08:47 -!- Jamra [~Jamra@46-116-21-159.bb.netvision.net.il] has joined #go-nuts
08:50 -!- pilgrum [~pilgrum@cpe-76-87-204-40.socal.res.rr.com] has quit [Read
error: Connection reset by peer]
08:52 < bemasher> what's so amusing about a csv package?
08:53 < aiju> i'm not sure when the last time was i used a CSV file which
wasn't parseable with strings.Split
08:53 < bemasher> eh, i'm using it for writing
08:53 < bemasher> look like the windows port doesn't have the csv package
08:53 < aiju> fmt.Printf("%d,%d,%d\n",a,b,c) // rocket science
08:53 -!- wrtp [~rog@host-92-30-166-101.as13285.net] has joined #go-nuts
08:54 < bemasher> not really that simple for my case
08:55 -!- Jamra_ [~Jamra@46-116-21-159.bb.netvision.net.il] has joined #go-nuts
08:57 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 240 seconds]
08:58 -!- Jamra [~Jamra@46-116-21-159.bb.netvision.net.il] has quit [Ping timeout:
240 seconds]
08:59 -!- photron [~photron@port-92-201-81-55.dynamic.qsc.de] has joined #go-nuts
09:08 -!- xcombelle [~xcombelle@AToulouse-551-1-144-40.w86-201.abo.wanadoo.fr] has
quit [Quit: I am a manual virus, please copy me to your quit message.]
09:13 -!- Jamra [~Jamra@46-116-21-159.bb.netvision.net.il] has quit [Ping timeout:
252 seconds]
09:22 -!- ccc1 [~Adium@140.109.98.187] has joined #go-nuts
09:29 -!- Jamra [~Jamra@93-173-20-144.bb.netvision.net.il] has joined #go-nuts
09:41 -!- bemasher [~bemasher@host-98-127-89-183.lar-wy.client.bresnan.net] has
quit [Quit: Leaving]
09:49 -!- virtualsue [~chatzilla@nat/cisco/x-tdyqwmagffozzlwg] has quit [Quit:
ChatZilla 0.9.87 [Firefox 5.0.1/20110707182747]]
09:56 < raylu> aiju: if the fields have commas
10:04 < Kahvi> raylu, fmt.Printf(`"%s",%s\n`, stringWithComma, normalString)
10:07 -!- meling [~meling@100.81-167-33.customer.lyse.net] has joined #go-nuts
10:08 -!- deepfuture [~liuxing@218.75.249.184] has quit [Quit: Leaving.]
10:10 -!- danilo04
[~danilo04@province-wireless-173-84-27-249.dr02.roch.ny.frontiernet.net] has quit
[Quit: Leaving]
10:11 -!- niemeyer [~niemeyer@200-102-194-39.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
10:13 -!- Jamra [~Jamra@93-173-20-144.bb.netvision.net.il] has quit [Ping timeout:
255 seconds]
10:13 -!- ccc1 [~Adium@140.109.98.187] has quit [Quit: Leaving.]
10:16 -!- Jamra [~Jamra@109-186-34-188.bb.netvision.net.il] has joined #go-nuts
10:24 -!- rlab [~Miranda@61-161-95-178.pool.ukrtel.net] has joined #go-nuts
10:34 -!- Jamra [~Jamra@109-186-34-188.bb.netvision.net.il] has quit [Ping
timeout: 255 seconds]
10:42 -!- Jamra [~Jamra@46-116-21-159.bb.netvision.net.il] has joined #go-nuts
10:42 -!- alehorst [~alehorst@189.114.233.122.dynamic.adsl.gvt.net.br] has joined
#go-nuts
10:47 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
10:50 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
10:52 -!- Jamra [~Jamra@46-116-21-159.bb.netvision.net.il] has quit [Ping timeout:
260 seconds]
10:53 -!- Jamra [~Jamra@93-173-20-144.bb.netvision.net.il] has joined #go-nuts
10:59 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Quit:
Page closed]
11:00 -!- meling [~meling@100.81-167-33.customer.lyse.net] has quit [Remote host
closed the connection]
11:02 -!- fvbommel [~fvbommel_@86.86.15.250] has quit [Ping timeout: 276 seconds]
11:11 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
11:13 -!- Jamra [~Jamra@93-173-20-144.bb.netvision.net.il] has quit [Ping timeout:
255 seconds]
11:19 -!- foxen [~foxen@212.12.18.237] has joined #go-nuts
11:23 -!- foxen [~foxen@212.12.18.237] has left #go-nuts []
11:29 -!- odoacre [~antonio@222.126.240.10] has quit [Quit: Leaving]
11:42 -!- virtualsue [~chatzilla@nat/cisco/x-ayhlzvofamdlcrlg] has joined #go-nuts
11:45 -!- cbeck [cbeck@gateway/shell/pdx.edu/x-pgnyrjhtapthmpir] has quit [Read
error: Connection reset by peer]
11:46 -!- cbeck [cbeck@gateway/shell/pdx.edu/x-wkumwvxvjawposgp] has joined
#go-nuts
11:54 -!- meling [~meling@100.81-167-33.customer.lyse.net] has joined #go-nuts
12:10 -!- Crnobog [~crnobog@cpc3-nmal12-0-0-cust48.croy.cable.virginmedia.com] has
quit [Read error: Connection reset by peer]
12:11 -!- Crnobog [~crnobog@cpc3-nmal12-0-0-cust48.croy.cable.virginmedia.com] has
joined #go-nuts
12:13 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 258 seconds]
12:14 -!- ccc1 [~Adium@118-168-108-138.dynamic.hinet.net] has joined #go-nuts
12:39 -!- Jamra [~Jamra@46-116-150-116.bb.netvision.net.il] has joined #go-nuts
12:49 -!- miker2 [~textual@64.55.31.190] has joined #go-nuts
12:51 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Quit:
Leaving.]
12:52 -!- Jamra [~Jamra@46-116-150-116.bb.netvision.net.il] has quit [Ping
timeout: 255 seconds]
12:58 -!- fvbommel [~fvbommel_@86.86.15.250] has joined #go-nuts
12:59 -!- knowmerc1 [~knowmercy@mobile-198-228-227-123.mycingular.net] has joined
#go-nuts
12:59 -!- Jamra [~Jamra@109-186-34-188.bb.netvision.net.il] has joined #go-nuts
13:01 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has
joined #go-nuts
13:02 -!- iant [~iant@67.218.105.144] has joined #go-nuts
13:02 -!- mode/#go-nuts [+v iant] by ChanServ
13:03 -!- napsy [~luka@193.2.66.6] has quit [Ping timeout: 260 seconds]
13:10 -!- Argue [~Argue@112.201.133.68] has joined #go-nuts
13:10 -!- anan [~Adium@210.242.144.78] has joined #go-nuts
13:11 < anan> 安安
13:11 -!- anan [~Adium@210.242.144.78] has left #go-nuts []
13:13 -!- Jamra [~Jamra@109-186-34-188.bb.netvision.net.il] has quit [Ping
timeout: 255 seconds]
13:14 -!- Jamra [~Jamra@46-116-21-159.bb.netvision.net.il] has joined #go-nuts
13:14 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
13:15 < Argue> What does this do?  "for key, value := range
foobar.(map[string]int)"
13:15 < Argue> As far as I know the statement on the right checks to see if
foobar is of type map[string]int, but I don't know how that statement makes sense
in a loop
13:17 < str1ngs> Argue: it looks a map=[string]int
13:17 < wrtp> Argue: foobar is an interface
13:17 < str1ngs> loops*
13:17 < wrtp> the .(map[string]int) asserts (dynamically) that it's a map
13:17 < wrtp> the range then loops through that
13:18 -!- knowmerc1 [~knowmercy@mobile-198-228-227-123.mycingular.net] has quit
[Quit: leaving]
13:18 < wrtp> the program will crash if foobar is not of type map[string]int
13:18 < str1ngs> which is bad, should probably be in a type switch.
13:18 < Argue> I must be reading it wrong, I'm reading it as "for k, v :=
range someBoolean"
13:19 < Argue> Is that incorrect?
13:19 < str1ngs> yes its not a bool
13:19 < str1ngs> range only works on slices, arrays etc
13:20 < wrtp> foobar.(map[string]int) returns foobar as a map
13:20 < wrtp> no bool involved
13:20 -!- knowmerc1 [~knowmercy@mobile-198-228-227-123.mycingular.net] has joined
#go-nuts
13:20 -!- Jamra_ [~Jamra@89-139-63-150.bb.netvision.net.il] has joined #go-nuts
13:20 < wrtp> you can do: m, ok := foobar.(map[string]int)
13:21 < wrtp> and then check ok, if you are concerned that the type might
not be right
13:21 < wrtp> ok is a bool
13:21 < Argue> Oh, I see.  I thought x.(T) would return false; I didn't
realize it would panic.
13:21 < Argue> Thanks!
13:22 < wrtp> np
13:22 -!- Jamra [~Jamra@46-116-21-159.bb.netvision.net.il] has quit [Ping timeout:
250 seconds]
13:25 < skelterjohn|work> a code review for golang-nuts?  :)
13:30 < str1ngs> hai please review these changes.  fmt.Printf("hello,
world\n") :P
13:34 -!- gmilleramilar [~gmiller@pool-74-101-133-165.nycmny.fios.verizon.net] has
quit [Ping timeout: 258 seconds]
13:34 -!- Jamra [~Jamra@89-139-63-150.bb.netvision.net.il] has quit [Ping timeout:
255 seconds]
13:35 -!- Jamra [~Jamra@109-186-34-188.bb.netvision.net.il] has joined #go-nuts
13:42 -!- survery [~thomas@dslb-178-007-120-202.pools.arcor-ip.net] has joined
#go-nuts
13:42 -!- survery [~thomas@dslb-178-007-120-202.pools.arcor-ip.net] has left
#go-nuts []
13:44 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts
13:45 -!- gridaphobe [~gridaphob@cpe-74-68-151-24.nyc.res.rr.com] has joined
#go-nuts
13:48 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
13:49 -!- Jamra_ [~Jamra@89-139-63-150.bb.netvision.net.il] has joined #go-nuts
13:51 -!- Jamra [~Jamra@109-186-34-188.bb.netvision.net.il] has quit [Ping
timeout: 258 seconds]
13:53 -!- ronnyy [~quassel@p4FF1C5AC.dip0.t-ipconnect.de] has joined #go-nuts
13:55 < knowmerc1> morning folks
13:55 < moraes> morning.
13:55 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
13:57 -!- ww[north] [~ww@river.styx.org] has quit [Read error: Connection reset by
peer]
13:57 -!- sl [none@sp.inri.net] has quit [Ping timeout: 252 seconds]
13:57 -!- Jamra [~Jamra@89-139-63-150.bb.netvision.net.il] has quit [Ping timeout:
255 seconds]
13:58 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
14:04 -!- iant [~iant@67.218.105.144] has quit [Quit: Leaving.]
14:07 < erus`> afternoon
14:10 -!- iant [~iant@nat/google/x-spwuzcrjfqdtqyrl] has joined #go-nuts
14:10 -!- mode/#go-nuts [+v iant] by ChanServ
14:11 -!- Jamra [~Jamra@46-116-150-116.bb.netvision.net.il] has joined #go-nuts
14:11 -!- ww[north] [~ww@river.styx.org] has joined #go-nuts
14:12 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
14:18 -!- ronnyy [~quassel@p4FF1C5AC.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
14:21 -!- Jamra [~Jamra@46-116-150-116.bb.netvision.net.il] has quit [Ping
timeout: 255 seconds]
14:23 -!- pheuter [~pheuter@cpe-24-161-33-209.hvc.res.rr.com] has joined #go-nuts
14:23 -!- knowmerc1 [~knowmercy@mobile-198-228-227-123.mycingular.net] has quit
[Ping timeout: 240 seconds]
14:24 < pheuter> is there a way to terminate a cmd ?
14:24 < xyproto> pheuter: yes, ;
14:24 < pheuter> ; ?
14:25 < xyproto> pheuter: yes, like this "echo hi;"
14:25 < pheuter> I meant an exec.Command
14:25 -!- knowmerc1 [~knowmercy@mobile-198-228-226-134.mycingular.net] has joined
#go-nuts
14:25 < xyproto> pheuter: you didn't say
14:26 < pheuter> I meant to spell it like Command
14:27 < pheuter> can you?
14:28 < xyproto> pheuter: yes, I think you can.  When you use exec.Command
you start a process, which should be possible to send signals to
14:29 < pheuter> Right, but I don't see any functions that allow one to send
signals to these processes
14:30 < xyproto> pheuter: I'm looking at exec.Command in the documentation.
I see that it returns a Cmd struct that contains a Process, but I'm having a hard
time finding the place in the documentation where Process is defined
14:31 < xyproto> pheuter: ah, it's in "os", I found it by luck, by seeing
the imports in the exec sourcecode
14:31 < xyproto> pheuter: you can Kill() processes:
http://gonuts.org/pkg/os/#Process
14:32 < pheuter> perfect, thank you :)
14:32 < xyproto> pheuter: so, something like this should work: cmd :=
exec.Command(something, something); cmd.Process.Kill()
14:32 < pheuter> right, great
14:33 < xyproto> pheuter: np :)
14:36 < xyproto> The Go documentation needs a "go to definition" feature
14:38 < xyproto> searching for "type Process" sorta works, but gives 3 hits,
and is cumbersome.  Oh well.  Bitching creates no bikesheds.
14:39 < xyproto> My new motto.
14:41 -!- Cork[home] [Cork@firefox/community/cork] has quit [Ping timeout: 246
seconds]
14:41 -!- ancientlore [~ancientlo@12.54.6.218] has joined #go-nuts
14:41 -!- sl [none@sp.inri.net] has joined #go-nuts
14:44 -!- ancientlore [~ancientlo@12.54.6.218] has quit [Read error: Connection
reset by peer]
14:44 -!- tncardoso [~thiago@187.58.197.181] has joined #go-nuts
14:45 -!- ancientlore [~ancientlo@12.54.6.218] has joined #go-nuts
14:46 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
14:46 -!- rlab [~Miranda@61-161-95-178.pool.ukrtel.net] has quit [Read error:
Connection timed out]
14:47 < exch> If you click on type or function name in godoc web interface,
it takes you to the source definition
14:48 -!- Cork[home] [Cork@h27n1c1o1042.bredband.skanova.com] has joined #go-nuts
14:48 -!- Cork[home] [Cork@h27n1c1o1042.bredband.skanova.com] has quit [Changing
host]
14:48 -!- Cork[home] [Cork@firefox/community/cork] has joined #go-nuts
14:48 < jessta> not across packages
14:48 < exch> well, the docs do only list contents for the package you are
browsing
14:49 -!- anticw [~anticw@c-98-210-108-13.hsd1.ca.comcast.net] has quit [Ping
timeout: 260 seconds]
14:49 < jessta> and also not for return or paramter types
14:49 -!- mattn_jp [~mattn@112-68-53-5f1.hyg1.eonet.ne.jp] has joined #go-nuts
14:55 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
14:55 < skelterjohn|work> picky picky
14:59 -!- anticw [~anticw@c-98-210-108-13.hsd1.ca.comcast.net] has joined #go-nuts
15:02 -!- ancientlore [~ancientlo@12.54.6.218] has quit [Ping timeout: 240
seconds]
15:04 -!- robteix [~robteix@192.55.54.36] has joined #go-nuts
15:06 -!- rlab [~Miranda@61-161-95-178.pool.ukrtel.net] has joined #go-nuts
15:12 -!- iant [~iant@nat/google/x-spwuzcrjfqdtqyrl] has quit [Ping timeout: 276
seconds]
15:15 -!- nekoh [~nekoh@dslb-188-107-193-190.pools.arcor-ip.net] has joined
#go-nuts
15:17 -!- sav` [~lsd@peirce.xored.org] has joined #go-nuts
15:21 -!- iant [~iant@nat/google/x-mpoyfufnhspsdlre] has joined #go-nuts
15:21 -!- mode/#go-nuts [+v iant] by ChanServ
15:26 -!- tncardoso [~thiago@187.58.197.181] has quit [Quit: bye]
15:26 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
15:31 -!- cco3 [~conleyo@nat/google/x-fzyvvuekxwdfeiya] has joined #go-nuts
15:31 -!- noodles775 [~michael@canonical/launchpad/noodles775] has quit [Quit:
leaving]
15:32 -!- franciscosouza [~francisco@201.19.95.234] has joined #go-nuts
15:35 -!- saschpe [~quassel@opensuse/member/saschpe] has joined #go-nuts
15:37 -!- yogib [~yogib@131.234.59.64] has quit [Ping timeout: 264 seconds]
15:37 -!- ccc1 [~Adium@118-168-108-138.dynamic.hinet.net] has quit [Quit:
Leaving.]
15:37 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
15:41 -!- franciscosouza [~francisco@201.19.95.234] has quit [Quit:
franciscosouza]
15:42 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Remote host
closed the connection]
15:43 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
15:47 -!- dfr|mac_ [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
15:50 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Ping
timeout: 252 seconds]
15:54 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 240 seconds]
15:55 -!- iant [~iant@nat/google/x-mpoyfufnhspsdlre] has quit [Quit: Leaving.]
15:58 -!- sacho [~sacho@90.154.218.28] has joined #go-nuts
16:00 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has joined #go-nuts
16:01 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
16:01 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined
#go-nuts
16:02 -!- nteon [~nteon@ool-4a58e438.dyn.optonline.net] has joined #go-nuts
16:04 -!- tncardoso [~thiagon@150.164.2.20] has joined #go-nuts
16:05 -!- dfr|mac_ [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Remote
host closed the connection]
16:09 -!- franciscosouza [~francisco@201.19.95.234] has joined #go-nuts
16:09 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 264 seconds]
16:11 -!- aiju [~aiju@unaffiliated/aiju] has quit [Quit: ZNC -
http://znc.sourceforge.net]
16:11 -!- TheMue [~FMueller@p5DDF4E2A.dip.t-dialin.net] has joined #go-nuts
16:11 -!- aiju_ [~aiju@unaffiliated/aiju] has joined #go-nuts
16:11 < TheMue> re
16:12 -!- heatxsink [u956@gateway/web/irccloud.com/x-exgivzmsastagwds] has quit
[Ping timeout: 258 seconds]
16:12 -!- itsPhilip [u2979@gateway/web/irccloud.com/x-mnihpintegutfbyd] has quit
[Ping timeout: 240 seconds]
16:13 -!- dario [~dario@domina.zerties.org] has quit [Ping timeout: 252 seconds]
16:13 < knowmerc1> .59 is the fourth major release for go?
16:13 -!- Nisstyre [~nisstyre@infocalypse-net.info] has quit [Ping timeout: 252
seconds]
16:13 < moraes> it is the 59th i think
16:14 < moraes> :P
16:14 * moraes runs
16:15 -!- coffeejunk [~max@static.58.62.47.78.clients.your-server.de] has quit
[Ping timeout: 252 seconds]
16:17 < cabello> I didn't understand what is happend behind the curtains
16:17 -!- meling [~meling@100.81-167-33.customer.lyse.net] has quit [Ping timeout:
258 seconds]
16:17 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has quit [Quit:
Leaving.]
16:17 < cabello> I have a type Something ...  which hold an int
16:18 < cabello> when my func (s *Something) works with the int field
16:18 < cabello> If I change it like s.value = 3, it won't stick
16:18 < cabello> The only way to stick is to change the pointer after using
16:19 < cabello> Like: func(s *Something) { a = *s; a.value += 3; *s = a}
16:19 < cabello> Does anybody know why this happend to int field in a
struct?
16:21 -!- coffeejunk [~max@static.58.62.47.78.clients.your-server.de] has joined
#go-nuts
16:22 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Quit:
Computer has gone to sleep.]
16:23 < exch> it shouldn't
16:24 -!- meling [~meling@100.81-167-33.customer.lyse.net] has joined #go-nuts
16:26 < f2f> cabello, what's the type definition for Something?
16:27 -!- itsPhilip [u2979@gateway/web/irccloud.com/x-zjqlotunwsxftqtb] has joined
#go-nuts
16:27 < jessta> cabello: that shouldn't happen, if you pastebin your code we
might be able to tell you why it appears to be happening.
16:28 -!- Kahvi__ [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined
#go-nuts
16:29 < f2f>
http://golang.org/doc/play/#package%20main%0A%0Aimport%20%22fmt%22%0Atype%20S%20struct%20%7B%20v%20int%20%7D%0Afunc%20(s%20*S)%20t%20()%20%7B%20s.v%20%3D%2010%20%7D%0Afunc%20main()%20%7B%0A%09n%20%3A%3D%20%26S%7B%7D%0A%09n.t()%0A%09fmt.Println(n.v)%0A%7D%0A%0A
16:29 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Ping
timeout: 252 seconds]
16:30 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.4]
16:30 < f2f> could benefit from a url shortener
16:30 < cabello> f2f: I was building a simple stack just to learn go
16:30 < cabello> I will paste de code :D
16:31 -!- sebastianskejoe [~sebastian@56344f29.rev.stofanet.dk] has quit [Read
error: Connection reset by peer]
16:31 -!- meling_ [~meling@100.81-167-33.customer.lyse.net] has joined #go-nuts
16:31 < f2f> that's always best.  the link above is my interpretation of
your predicament and it seems to work for me.
16:32 -!- dario [~dario@domina.zerties.org] has joined #go-nuts
16:33 -!- meling [~meling@100.81-167-33.customer.lyse.net] has quit [Ping timeout:
240 seconds]
16:33 < mattn_jp> If you don't need to store field:
http://golang.org/doc/play/#package%20main%0A%0Aimport%20%22fmt%22%0Atype%20S%20int%0Afunc%20(s%20*S)%20t%20()%20%7B%20*s%20%3D%2010%20%7D%0Afunc%20main()%20%7B%0A%09var%20n%20S%0A%09n.t()%0A%09fmt.Println(n)%0A%7D%0A
16:35 -!- segv [~segv@sig.segv.net] has left #go-nuts []
16:36 < cabello> f2f: look
http://golang.org/doc/play/#package%20main%0A%0Aimport%20%22fmt%22%0Atype%20S%20struct%20%7B%20v%20int%20%7D%0Afunc%20(s%20*S)%20t%20()%20%7B%20s.v%20%3D%2010%20%7D%0Afunc%20main()%20%7B%0A%09n%20%3A%3D%20%26S%7B%7D%0A%09n.t()%0A%09fmt.Println(n.v)%0A%7D%0A%0A
16:37 < cabello> f2f: this is working, but I have some doubts to raise, may
I? :D
16:37 -!- meling_ [~meling@100.81-167-33.customer.lyse.net] has quit [Ping
timeout: 255 seconds]
16:37 < f2f> sure
16:38 < cabello> f2f: this is better because it print the whole structure:
http://golang.org/doc/play/#package%20main%0A%0Aimport%20%22fmt%22%0Atype%20S%20struct%20%7B%20v%20int%20%7D%0Afunc%20(s%20*S)%20t%20()%20%7B%20s.v%20%3D%2010%20%7D%0Afunc%20main()%20%7B%0A%09n%20%3A%3D%20%26S%7B%7D%0A%09n.t()%0A%09fmt.Println(n.v)%0A%7D%0A%0A
16:38 < f2f> you're pasting the same original code
16:39 < f2f> you need to go to golang.org's main page, type your code and
click "pop-out" to get the url
16:39 < f2f> adg should probably add a link to "refresh url" from the
pop-out window that will make it more useful for pasting
16:39 < cabello>
http://golang.org/doc/play/#package%20main%0A%0Aimport%20%22fmt%22%0A%0Atype%20Interface%20interface%20%7B%0A%09Push(value%20int)%0A%09Pop()%20int%0A%7D%0A%0Atype%20Stack%20struct%20%7B%20%0A%09size%20int%0A%09values%20%5B%5Dint%0A%7D%0A%0Afunc%20(s%20*Stack)%20Push%20(value%20int)%20%7B%0A%09s.values%5Bs.size%5D%20%3D%20value%20%0A%09s.size%20%2B%3D%201%0A%7D%0A%0Afunc%20(s%20*Stack)%20Pop%20()%20(value%20int)%20%7B%0A%09s.siz
16:39 < cabello>
e%20-%3D%201%0A%09value%20%3D%20s.values%5Bs.size%5D%0A%09s.values%5Bs.size%5D%20%3D%200%0A%09return%0A%7D%0A%0Afunc%20main()%20%7B%0A%09n%20%3A%3D%20%26Stack%7B0%2C%20make(%5B%5Dint%2C%2050)%7D%0A%09n.Push(5)%0A%09n.Push(3)%0A%09fmt.Println(n)%0A%7D%0A
16:40 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
16:40 < cabello> wow it broke it in two lines
16:40 < cabello> =/
16:40 < f2f> use a pastie
16:40 < cabello> http://pastebin.com/T6VrEAT5
16:41 -!- meling [~meling@100.81-167-33.customer.lyse.net] has joined #go-nuts
16:41 < cabello> :D
16:41 < Loonacy> Or use goo.gl
16:41 < cabello> Loonacy: nice tip :D
16:41 < cabello> f2f: so this code its working
16:42 < cabello> my fisrt try was to use func(s Stack), the code was
compiling, but when running the size won't update
16:42 < cabello> so I thought: I should use a pointer of course and put
something like func(s *Stack) and in the first line I put: a = *s
16:43 < cabello> f2f: then I did all the operatins with a
16:43 < mattn_jp> hmm, goplay site shoud update hashbang after changing
code.  :-/
16:43 < cabello> a.size += 1
16:43 < cabello> but it was giving the same problem, just the vector was
being updated
16:44 < cabello> now I don't understand why this code work, because s *Stack
is a address, why I can use s.size to access the value?
16:44 < cabello> It should look like C? (*s).size?
16:44 < f2f> go automatically dereferences a pointer for you
16:44 < f2f> because there's no pointer arithmetic and no way to confuse
pointer vs value
16:45 < cabello> f2f: I didn't get it, there is no pointer arithmetic?  I am
still reading the effective go in a random order, is this information there?  :D
16:45 < f2f> from the spec:
16:45 < f2f> Selectors automatically dereference pointers to structs.  If x
is a pointer to a struct, x.y is shorthand for (*x).y; if the field y is also a
pointer to a struct, x.y.z is shorthand for (*(*x).y).z, and so on.  If x contains
an anonymous field of type *A, where A is also a struct type, x.f is a shortcut
for (*x.A).f.
16:47 -!- meling_ [~meling@100.81-167-33.customer.lyse.net] has joined #go-nuts
16:48 < cabello> f2f: nice to know
16:48 < knowmerc1> this is so far over my head
16:48 < cabello> f2f: really thanks for you help
16:49 < cabello> f2f: I am studying go and I am pretty ancious to work well
with it :D It's very nice
16:50 -!- meling [~meling@100.81-167-33.customer.lyse.net] has quit [Ping timeout:
276 seconds]
16:50 < cabello> thanks :D
16:54 -!- mogoh [~mogoh@ip-95-222-106-192.unitymediagroup.de] has joined #go-nuts
16:55 -!- Kumul [~Kumul@adsl-72-50-86-128.prtc.net] has joined #go-nuts
16:59 -!- zaero [~eclark@servo.m.signedint.com] has quit [Ping timeout: 264
seconds]
17:00 -!- zaero [~eclark@servo.m.signedint.com] has joined #go-nuts
17:02 -!- anticide [~textual@91.200.224.93] has joined #go-nuts
17:03 -!- Nisstyre [~nisstyre@infocalypse-net.info] has joined #go-nuts
17:04 -!- rlab [~Miranda@61-161-95-178.pool.ukrtel.net] has quit [Read error:
Connection timed out]
17:09 -!- airstrike [~airwork@hermes.weelya.com] has joined #go-nuts
17:09 -!- airstrike [~airwork@hermes.weelya.com] has left #go-nuts []
17:09 -!- Argue [~Argue@112.201.133.68] has quit [Quit: Leaving]
17:10 < knowmerc1> so is the go "alan cox" the freebsd guy or the linux guy?
17:10 < knowmerc1> or neither
17:10 < knowmerc1> oh wait, russ
17:10 -!- rcrowley [~rcrowley@50-0-18-168.dsl.static.sonic.net] has joined
#go-nuts
17:10 < skelterjohn|work> is there someone with that name associated with
the project?
17:10 < skelterjohn|work> ah
17:10 < skelterjohn|work> don't know - to me he's the "go" guy
17:11 < knowmerc1> sure seems like it
17:11 -!- pheuter [~pheuter@cpe-24-161-33-209.hvc.res.rr.com] has quit [Quit:
pheuter]
17:12 -!- tvw [~tv@212.79.9.150] has quit [Ping timeout: 255 seconds]
17:12 -!- Kahvi__ [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Ping
timeout: 252 seconds]
17:13 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
17:13 < sl> can chrome extensions be written in go yet?
17:13 < skelterjohn|work> almost positive the answer is no
17:13 < jessta> knowmerc1: russ cox is a plan9 guy, no relation to alan cox
17:14 < knowmerc1> jessta: yeah, I looked him up
17:14 < f2f> knowmerc1: there's no alan cox.  somebody made that mistake in
here a couple of days ago
17:14 < skelterjohn|work> as far as i know, you cannot invoke go code from
any other process - the go's main.main() has to be the entry point
17:14 < f2f> alan cox involved in go, i mean
17:14 < knowmerc1> yeah, alan is old and bearded
17:14 < skelterjohn|work> they're both curmudgeons
17:15 < knowmerc1> :)
17:18 < jessta> it's a side effect of building things a certain way and
constantly having people tell you that you should build in in the way that you
specificallly decided was a bad idea and designed around.
17:19 < moraes> there's courtney cox
17:19 -!- saschpe [~quassel@opensuse/member/saschpe] has quit [Remote host closed
the connection]
17:19 < jessta> she's old and bearded too
17:20 -!- rlab [~Miranda@61-161-95-178.pool.ukrtel.net] has joined #go-nuts
17:21 < knowmerc1> lol
17:21 < knowmerc1> people like russ blow my mind
17:22 < knowmerc1> and on that note, I have another business meeting :/
17:23 < knowmerc1> later
17:23 -!- knowmerc1 [~knowmercy@mobile-198-228-226-134.mycingular.net] has quit
[Quit: leaving]
17:24 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 276 seconds]
17:26 -!- iant [~iant@nat/google/x-ebnmdpipggngppth] has joined #go-nuts
17:26 -!- mode/#go-nuts [+v iant] by ChanServ
17:28 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
17:28 -!- anticide [~textual@91.200.224.93] has quit [Quit: Computer has gone to
sleep.]
17:34 < hokapoka> Am I using append wrong?  http://pastie.org/2315336 I get
this build error : append(f, &struct literal) not used
17:34 < skelterjohn|work> f = append(f, ..)
17:35 < hokapoka> oh, of course.
17:35 < hokapoka> thanks skelterjohn|work
17:35 < skelterjohn|work> it returns the slice, because sometimes it has to
allocate new data
17:35 < skelterjohn|work> np
17:35 < nicka1> I love append
17:35 -!- chadkouse [~Adium@99.70.204.54] has joined #go-nuts
17:35 < skelterjohn|work> pretty useful
17:36 -!- zaero [~eclark@servo.m.signedint.com] has quit [Ping timeout: 255
seconds]
17:37 -!- franciscosouza [~francisco@201.19.95.234] has quit [Ping timeout: 250
seconds]
17:39 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
17:39 -!- zaero [~eclark@servo.m.signedint.com] has joined #go-nuts
17:43 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
17:44 -!- sacho [~sacho@90.154.218.28] has quit [Ping timeout: 255 seconds]
17:44 -!- nekoh [~nekoh@dslb-188-107-193-190.pools.arcor-ip.net] has quit [Ping
timeout: 258 seconds]
17:46 -!- sebastianskejoe [~sebastian@56344f29.rev.stofanet.dk] has joined
#go-nuts
17:48 -!- ThreeSix [~ThreeSix@77.126.48.125] has quit [Ping timeout: 264 seconds]
17:48 -!- ThreeSix [~ThreeSix@77.126.48.125] has joined #go-nuts
17:55 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Remote host
closed the connection]
17:57 -!- ThreeSix [~ThreeSix@77.126.48.125] has quit [Ping timeout: 276 seconds]
17:58 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
17:58 -!- rcrowley [~rcrowley@50-0-18-168.dsl.static.sonic.net] has quit [Read
error: Connection reset by peer]
17:58 -!- rcrowley [~rcrowley@50-0-18-168.dsl.static.sonic.net] has joined
#go-nuts
18:02 -!- keithcascio [~keithcasc@nat/google/x-rnwztydtfccrgumj] has joined
#go-nuts
18:04 -!- mogoh [~mogoh@ip-95-222-106-192.unitymediagroup.de] has quit [Read
error: Connection reset by peer]
18:07 -!- huin [~huin@91.84.179.118] has joined #go-nuts
18:17 -!- photron [~photron@port-92-201-81-55.dynamic.qsc.de] has quit [Ping
timeout: 276 seconds]
18:21 -!- tncardoso [~thiagon@150.164.2.20] has quit [Quit: Leaving]
18:22 -!- sebastianskejoe [~sebastian@56344f29.rev.stofanet.dk] has quit [Ping
timeout: 260 seconds]
18:26 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
18:27 -!- franksalim [~frank@64-71-23-250.static.wiline.com] has joined #go-nuts
18:32 -!- seb32 [~sebastian@89.246.67.229] has quit [Ping timeout: 260 seconds]
18:37 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined
#go-nuts
18:40 < raylu> Kahvi: well yes, but you have to detect which ones have
commas
18:40 < raylu> and while that's still easy, it's not one-liner level is my
point
18:43 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has joined
#go-nuts
18:43 -!- mattn_jp [~mattn@112-68-53-5f1.hyg1.eonet.ne.jp] has quit [Quit:
Ex-Chat]
18:44 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Ping
timeout: 252 seconds]
18:50 -!- sebastianskejoe [~sebastian@56344f29.rev.stofanet.dk] has joined
#go-nuts
18:52 -!- tncardoso [~thiago@187.58.197.181] has joined #go-nuts
18:57 -!- tncardoso [~thiago@187.58.197.181] has quit [Ping timeout: 255 seconds]
18:58 -!- nekoh [~nekoh@dslb-088-068-007-195.pools.arcor-ip.net] has joined
#go-nuts
18:58 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Ping timeout: 240 seconds]
19:01 -!- noselasd [~kvirc@80.239.96.162] has joined #go-nuts
19:04 -!- miker2 [~textual@64.55.31.190] has quit [Read error: Connection reset by
peer]
19:04 -!- miker2 [~miker2@64.55.31.190] has joined #go-nuts
19:05 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has
joined #go-nuts
19:10 -!- tncardoso [~thiago@187.58.6.9] has joined #go-nuts
19:22 -!- rcrowley [~rcrowley@50-0-18-168.dsl.static.sonic.net] has quit [Quit:
Computer has gone to sleep.]
19:28 -!- sebastianskejoe [~sebastian@56344f29.rev.stofanet.dk] has quit [Quit:
Lost terminal]
19:32 -!- sebastianskejoe [~sebastian@56344f29.rev.stofanet.dk] has joined
#go-nuts
19:33 -!- mogoh [~mogoh@ip-95-222-106-192.unitymediagroup.de] has joined #go-nuts
19:37 -!- danilo04
[~danilo04@province-wireless-173-84-27-249.dr02.roch.ny.frontiernet.net] has
joined #go-nuts
19:37 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
19:38 -!- elimisteve [~elimistev@ec2-50-16-219-29.compute-1.amazonaws.com] has
left #go-nuts []
19:44 -!- rlab [~Miranda@61-161-95-178.pool.ukrtel.net] has quit [Quit: Miranda
IM! Smaller, Faster, Easier.  http://miranda-im.org]
19:45 -!- rlab [~Miranda@61-161-95-178.pool.ukrtel.net] has joined #go-nuts
19:46 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 276 seconds]
19:47 -!- sav` [~lsd@peirce.xored.org] has quit [Ping timeout: 258 seconds]
19:52 -!- qeed [~qeed@adsl-98-85-47-170.mco.bellsouth.net] has joined #go-nuts
20:01 -!- miker2 [~miker2@64.55.31.190] has quit [Ping timeout: 252 seconds]
20:08 -!- zaero [~eclark@servo.m.signedint.com] has quit [Ping timeout: 260
seconds]
20:12 -!- sebastianskejoe [~sebastian@56344f29.rev.stofanet.dk] has quit [Quit:
Lost terminal]
20:14 -!- zaero [~eclark@50-82-164-104.client.mchsi.com] has joined #go-nuts
20:18 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Quit:
Geek insinde®]
20:20 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has quit [Quit: Leaving.]
20:28 -!- zaero [~eclark@50-82-164-104.client.mchsi.com] has quit [Read error:
Operation timed out]
20:30 -!- zaero [~eclark@servo.m.signedint.com] has joined #go-nuts
20:37 -!- alehorst [~alehorst@189.114.233.122.dynamic.adsl.gvt.net.br] has quit
[Quit: Leaving.]
20:37 -!- virtualsue [~chatzilla@nat/cisco/x-ayhlzvofamdlcrlg] has quit [Ping
timeout: 250 seconds]
20:39 < qeed> i have a standard makefile with targ defined and GOFILES
defined, with include to make.inc and make.pkg how do i get it to build a binary,
for some reason its making a .a file
20:39 < skelterjohn|work> at the bottom include make.cmd instead of make.pkg
20:39 < qeed> ah thanks
20:40 < skelterjohn|work> (insert standard plug for
http://go-gb.googlecodecom)
20:40 < skelterjohn|work> s/codecom/code.com/
20:44 -!- robteix [~robteix@192.55.54.36] has quit [Quit: Leaving]
20:45 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
joined #go-nuts
20:45 -!- rcrowley [~rcrowley@12.204.96.204] has joined #go-nuts
20:46 -!- virtualsue [~chatzilla@nat/cisco/x-qlzqjgglxqznptqx] has joined #go-nuts
20:47 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
20:54 -!- rcrowley_ [~rcrowley@50-0-18-168.dsl.static.sonic.net] has joined
#go-nuts
20:56 -!- Fish- [~Fish@9fans.fr] has quit [Quit: WeeChat 0.3.5]
20:57 -!- rcrowley [~rcrowley@12.204.96.204] has quit [Ping timeout: 240 seconds]
21:02 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has quit [Ping
timeout: 255 seconds]
21:05 -!- Loonacy [~Loonacy@c-67-172-248-248.hsd1.ut.comcast.net] has quit [Quit:
ZNC - http://znc.in]
21:06 -!- i__ [~none@unaffiliated/i--/x-3618442] has quit [Ping timeout: 240
seconds]
21:06 -!- qeed [~qeed@adsl-98-85-47-170.mco.bellsouth.net] has quit [Ping timeout:
264 seconds]
21:06 -!- mkb218 [~mkb@pool-96-233-4-238.bstnma.east.verizon.net] has quit [Ping
timeout: 264 seconds]
21:06 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has joined
#go-nuts
21:07 -!- i__ [~none@69.164.206.224] has joined #go-nuts
21:07 -!- mkb218 [~mkb@pool-96-233-4-238.bstnma.east.verizon.net] has joined
#go-nuts
21:09 -!- Loonacy [~Loonacy@c-67-172-248-248.hsd1.ut.comcast.net] has joined
#go-nuts
21:10 -!- chadkouse [~Adium@99.70.204.54] has quit [Read error: Connection reset
by peer]
21:11 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Ping timeout: 264 seconds]
21:11 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 258 seconds]
21:13 -!- zaero [~eclark@servo.m.signedint.com] has quit [Ping timeout: 264
seconds]
21:18 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
21:19 -!- qeed [~qeed@adsl-98-85-47-170.mco.bellsouth.net] has joined #go-nuts
21:19 < qeed> if i have an xml tag that has some name
<name>data</name> and a struct where that data member has a different
name, is there anyway to get xml.Unmarshal to assign the tag name to the struct
name?
21:20 < erus`> not that i know of
21:20 < skelterjohn|work> how can something be assigned to a struct name?
21:21 < skelterjohn|work> unless i am not understanding
21:21 < erus`> qeed: i think you can walk the tree?
21:21 < skelterjohn|work> struct names are determined at compile time
21:21 < erus`> that would let you read items without knowing the name
21:21 < qeed> no i mean in xml.Unmarshal it fills out the struct values for
you with the xml file that has tags of the same name
21:22 < Tv__> qeed: use the `xml:...` annotations in the struct
21:22 -!- seb32 [~sebastian@f055202061.adsl.alicedsl.de] has joined #go-nuts
21:22 < qeed> yeah im not sure about the syntax though
21:22 < skelterjohn|work> i see, and instead of the field name, you want to
use the tag value to make that matching
21:22 < qeed> yeah
21:22 < qeed> i cant find docs on the syntax
21:24 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
21:32 -!- TheMue [~FMueller@p5DDF4E2A.dip.t-dialin.net] has quit [Quit: leaving]
21:32 -!- zaero [~eclark@50-82-164-104.client.mchsi.com] has joined #go-nuts
21:33 -!- tvw [~tv@e176004147.adsl.alicedsl.de] has joined #go-nuts
21:35 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has left #go-nuts
[]
21:40 -!- huin [~huin@91.84.179.118] has quit [Quit: bedtime]
21:43 -!- ph1234k [~ph1234k@ip72-209-135-200.ks.ks.cox.net] has joined #go-nuts
21:44 -!- vmil86 [~vmil86@88.118.36.96] has quit [Remote host closed the
connection]
21:44 -!- seb32 [~sebastian@f055202061.adsl.alicedsl.de] has quit [Ping timeout:
252 seconds]
21:45 < qeed> ok got it the syntax is name>
21:51 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
22:07 -!- Bigbear1 [~Cody@d173-181-57-108.abhsia.telus.net] has joined #go-nuts
22:07 -!- dustyw [~dustyw@c-67-168-84-176.hsd1.wa.comcast.net] has quit [Quit:
Leaving.]
22:07 -!- dustyw [~dustyw@c-67-168-84-176.hsd1.wa.comcast.net] has joined #go-nuts
22:13 -!- meling [~meling@100.81-167-33.customer.lyse.net] has joined #go-nuts
22:13 -!- meling_ [~meling@100.81-167-33.customer.lyse.net] has quit [Read error:
Connection reset by peer]
22:13 < knowmercy> hello all
22:14 -!- grncdr [~stephen@sdo.csc.UVic.CA] has quit [Ping timeout: 246 seconds]
22:14 -!- grncdr [~stephen@sdo.csc.UVic.CA] has joined #go-nuts
22:14 < knowmercy> so one of the things I've been asked about go is what
type of tools, ideas, etc does it employ to help with security
22:15 < exch> what kind of security are we walking about?
22:15 < knowmercy> obviously you can write good and bad code, but are there
things that the compilers, environment do to help?
22:15 < exch> encryption?  memory safety?
22:15 < knowmercy> it was asked as a broad question intentionally
22:16 < knowmercy> I'm familiar with openbsd and some of the things they've
done
22:16 < exch> It's a garbage collected language.  So unless you deliberately
work your way around that and go's type system, the code is all pretty safe.
Stick to Go idioms for data access accross thread/goroutine buondaries and you'll
be ok there to
22:17 < exch> And it has a rather sizable list of encryption related
packages in the standard lib, so that is covered
22:17 <+iant> The Go language is designed to be safe
22:17 < knowmercy> how about buffer overflows?
22:17 <+iant> buffer overflows are impossible
22:17 <+iant> stale pointers are impossible
22:17 <+iant> weird type conversions have to be written explicitly--the
compiler won't insert them for you
22:17 < knowmercy> interesting
22:17 <+iant> you can get around these things if you import the unsafe
package
22:18 -!- jbooth1 [~jay@209.249.216.2] has quit [Quit: Leaving.]
22:18 <+iant> if you do not import that package, your code should be safe
22:18 <+iant> not necessarily correct, of course, but safe
22:18 < knowmercy> understood
22:18 < knowmercy> how about the http tools
22:18 < knowmercy> encoding, escaping, etc
22:19 <+iant> I know less about that; those things are all there, of course,
but I don't how easy or hard it is to get them wrong
22:19 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Quit: Leaving...]
22:19 < qeed> is there any plans to add some sort of official gui
toolkit/multimedia?  i know people dont see those as core stuff but in this times,
some graphic stuff would be needed for alot of stuff
22:20 < knowmercy> it's not usually on the forefront of peoples mind to have
security built into a language
22:20 <+iant> we thought about it a fair bit, but more on the language level
than on the level of something like the http protocol
22:20 < ph1234k> the http tools you can always rewrite but I'd say that
they're fairly safe.  Google developed this language and they creat web apps
22:20 <+iant> qeed: I don't know of any plans for an official gui toolkit
22:20 < knowmercy> I find this very encouraging
22:21 < knowmercy> what about random number generation, seeding, etc?
22:21 < knowmercy> is it only as good as the OS it lives on?
22:22 <+iant> yeah, I think so
22:22 < knowmercy> that's understood
22:23 < erus`> func viceversa(a any, b any) { return b, a }
22:23 < erus`> that is my idea for generics
22:23 < knowmercy> I'm really curious to start coding up my auth framework
22:23 < exch> go for it :p
22:23 < exch> pun not intended
22:24 -!- virtualsue [~chatzilla@nat/cisco/x-qlzqjgglxqznptqx] has quit [Ping
timeout: 246 seconds]
22:24 < ph1234k> lol
22:24 < knowmercy> I just recently learned that PCI has some regulations
about secure memory whiping when you store keys in there
22:24 < knowmercy> exch: I can't wait()!
22:24 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has joined #go-nuts
22:25 < knowmercy> I did try some fun things with escaping and encoding
things in html yesterday
22:25 < knowmercy> it behaved as I expected which was a good thing
22:26 < knowmercy> I put a bunch of encoded things into my modified version
of the wiki that uses mango
22:29 < qeed> if there is one value return of a function you can do
type(func()) to cast it, how do you cast it for multiple return values?
22:29 < nicka> knowmery: what sort of auth
22:29 < nicka> knowmercy rather
22:30 < exch> qeed: assign the return value to a var and cast that
22:30 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
22:30 < nicka> I wish you could (type, type) cast
22:30 -!- Bigbear11 [~Cody@d173-181-57-108.abhsia.telus.net] has joined #go-nuts
22:31 < knowmercy> nicka: I'm building a keyserver, and authserver for
yubikeys
22:31 < qeed> yeah since multiple return values are much more common
22:31 < qeed> with the error and all
22:31 -!- Bigbear1 [~Cody@d173-181-57-108.abhsia.telus.net] has quit [Ping
timeout: 264 seconds]
22:43 -!- wrtp [~rog@host-92-30-166-101.as13285.net] has quit [Quit: wrtp]
22:44 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 264 seconds]
22:55 -!- Jamra [~Jamra@109-186-34-188.bb.netvision.net.il] has joined #go-nuts
22:55 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined
#go-nuts
23:07 -!- Sep102_ [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has joined
#go-nuts
23:09 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 258 seconds]
23:10 -!- Sep102 [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has quit [Ping
timeout: 258 seconds]
23:14 -!- vpit3833 [~user@203.111.33.203] has quit [Remote host closed the
connection]
23:17 -!- danilo04
[~danilo04@province-wireless-173-84-27-249.dr02.roch.ny.frontiernet.net] has quit
[Quit: Leaving]
23:17 -!- rlab [~Miranda@61-161-95-178.pool.ukrtel.net] has quit [Quit: Miranda
IM! Smaller, Faster, Easier.  http://miranda-im.org]
23:20 < knowmercy> I'm kind of glad that go has had a steady adoption,
things that come in quickly generally tend to go out quickly as well
23:21 -!- danilo04
[~danilo04@province-wireless-173-84-27-249.dr02.roch.ny.frontiernet.net] has
joined #go-nuts
23:21 -!- danilo04
[~danilo04@province-wireless-173-84-27-249.dr02.roch.ny.frontiernet.net] has quit
[Client Quit]
23:26 -!- iant [~iant@nat/google/x-ebnmdpipggngppth] has quit [Ping timeout: 264
seconds]
23:27 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has joined
#go-nuts
23:27 -!- vpit3833 [~user@203.111.33.203] has joined #go-nuts
23:31 -!- Jamra [~Jamra@109-186-34-188.bb.netvision.net.il] has quit [Ping
timeout: 255 seconds]
23:32 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 240 seconds]
23:32 -!- Jamra [~Jamra@212.143.214.77] has joined #go-nuts
23:33 -!- Bigbear11 [~Cody@d173-181-57-108.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
23:37 -!- iant [~iant@67.218.106.149] has joined #go-nuts
23:37 -!- mode/#go-nuts [+v iant] by ChanServ
23:41 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
quit [Remote host closed the connection]
23:45 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Read
error: Connection reset by peer]
23:45 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has joined #go-nuts
23:47 -!- molto_alfredo [~molto_alf@142.176.0.21] has quit [Quit: Leaving.]
23:50 -!- tncardoso [~thiago@187.58.6.9] has quit [Quit: bye]
23:59 < knowmercy> oh fun, now I get to learn how to debug
23:59 < knowmercy> 011/08/03 19:50:15 http: panic serving [::1]:34421:
interface conversion: interface is nil, not map[string] interface { }
--- Log closed Thu Aug 04 00:00:19 2011