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

--- Log opened Sat Jun 04 00:00:53 2011
00:16 -!- aaronblohowiak [47c606a4@gateway/web/freenode/ip.71.198.6.164] has
joined #go-nuts
00:32 -!- iant [~iant@67.218.103.62] has joined #go-nuts
00:32 -!- mode/#go-nuts [+v iant] by ChanServ
00:35 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has joined #go-nuts
00:39 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
00:50 -!- bmizerany [~bmizerany@204.14.152.118] has quit [Remote host closed the
connection]
00:54 -!- bmizerany [~bmizerany@204.14.152.118] has joined #go-nuts
01:02 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
01:02 -!- foocraft_ [~ewanas@78.101.125.51] has quit [Quit: if you're going....to
san.  fran.  cisco!!!]
01:05 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
01:11 -!- jrabbit [~babyseal@unaffiliated/jrabbit] has quit [Quit: Reconnecting]
01:12 -!- jrabbit [~babyseal@unaffiliated/jrabbit] has joined #go-nuts
01:16 -!- mkb_ [~mkb@pool-71-174-16-245.bstnma.east.verizon.net] has joined
#go-nuts
01:16 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 258 seconds]
01:20 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has joined
#go-nuts
01:23 -!- meling [~meling@cse-dhcp-10-91.ucsd.edu] has quit [Remote host closed
the connection]
01:26 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
01:28 -!- juster [~juster@juster.us] has left #go-nuts []
01:41 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 252 seconds]
01:41 -!- robteix [~robteix@host40.201-253-152.telecom.net.ar] has joined #go-nuts
01:43 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
01:49 -!- achoo [~achoo@71-80-179-102.dhcp.wsco.ca.charter.com] has joined
#go-nuts
01:55 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 252
seconds]
01:56 -!- bmizerany [~bmizerany@204.14.152.118] has quit [Remote host closed the
connection]
01:57 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has left #go-nuts []
02:00 -!- iant [~iant@67.218.103.62] has quit [Quit: Leaving.]
02:16 -!- Venom_X [~pjacobs@66.54.185.130] has quit [Quit: Leaving]
02:23 -!- hargettp [~hargettp@pool-71-184-177-169.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
02:24 -!- hargettp [~hargettp@pool-71-184-177-169.bstnma.east.verizon.net] has
joined #go-nuts
02:25 -!- achoo [~achoo@71-80-179-102.dhcp.wsco.ca.charter.com] has quit [Quit:
achoo]
02:40 -!- icey [~user@ip68-104-183-151.ph.ph.cox.net] has joined #go-nuts
02:41 -!- robteix [~robteix@host40.201-253-152.telecom.net.ar] has quit [Quit:
Leaving...]
02:52 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
02:53 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has joined
#go-nuts
03:07 -!- Natch| [~natch@c-adcee155.25-4-64736c10.cust.bredbandsbolaget.se] has
quit [Ping timeout: 276 seconds]
03:08 -!- Natch| [~natch@c-adcee155.25-4-64736c10.cust.bredbandsbolaget.se] has
joined #go-nuts
03:15 -!- hargettp [~hargettp@pool-71-184-177-169.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
03:18 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Quit: Leaving]
03:31 -!- niemeyer [~niemeyer@201-40-174-53.pltce701.dsl.brasiltelecom.net.br] has
quit [Ping timeout: 240 seconds]
03:35 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has quit [Ping
timeout: 240 seconds]
03:39 -!- Tv_ [~Tv_@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout:
260 seconds]
03:40 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
03:46 -!- icey [~user@ip68-104-183-151.ph.ph.cox.net] has quit [Remote host closed
the connection]
03:46 -!- Sep102 [~Sep102@c-71-231-176-153.hsd1.wa.comcast.net] has quit [Ping
timeout: 250 seconds]
03:49 -!- Sep102 [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has joined
#go-nuts
03:56 < meling> a newbie learning question.  the following code works fine,
but i'd like to do it more compactly (there is too much bloat with the err
checking).  the code is here: http://pastie.org/2016781
03:58 < meling> if there is a std api call to do this, that would of course
be even better.  i've check the time package but found nothing that does what i
really wanted.
04:02 -!- Sep102_ [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has joined
#go-nuts
04:03 -!- Sep102 [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has quit [Ping
timeout: 252 seconds]
04:04 -!- Sep102__ [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has joined
#go-nuts
04:07 -!- Sep102_ [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has quit [Ping
timeout: 250 seconds]
04:08 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has quit [Quit: Computer
has gone to sleep.]
04:11 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services]
04:11 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:14 -!- mkb_ [~mkb@pool-71-174-16-245.bstnma.east.verizon.net] has quit [Quit:
Lost terminal]
04:14 < edsrzf> meling: I think the time package can do what you want
04:15 < edsrzf> time.Parse("15:04:05", str) will give you a time.Time
pointer, then call Seconds on it
04:15 < meling> ok, interesting...  I tried something along those lines, but
couldn't get it to work right...  i'll give it another try.
04:16 < edsrzf> I haven't tried it, so I may be missing something
04:16 < str1ngs> if time will not handle it then maybe something like sscanf
04:16 < str1ngs> int the fmt package
04:19 < meling> ok, good thanks guys...  will try these tips.
04:23 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 260 seconds]
04:26 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has joined #go-nuts
04:30 -!- mkb_ [~mkb@pool-71-174-16-245.bstnma.east.verizon.net] has joined
#go-nuts
04:36 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
04:36 -!- mode/#go-nuts [+v iant] by ChanServ
04:49 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 276 seconds]
04:49 -!- iant [~iant@216.239.45.130] has joined #go-nuts
04:49 -!- mode/#go-nuts [+v iant] by ChanServ
04:56 -!- Sep102 [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has joined
#go-nuts
04:59 -!- Sep102__ [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has quit [Ping
timeout: 258 seconds]
05:07 -!- Sep102 [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has quit [Ping
timeout: 276 seconds]
05:14 -!- imsplitbit [~imsplitbi@cpe-72-181-38-86.satx.res.rr.com] has joined
#go-nuts
05:18 -!- imsplitbit [~imsplitbi@cpe-72-181-38-86.satx.res.rr.com] has quit
[Client Quit]
05:28 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
05:33 -!- jarsen [~jarsen@76.8.206.60] has joined #go-nuts
05:35 -!- zozoR2 [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
05:35 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Read error:
Connection reset by peer]
05:40 -!- jarsen [~jarsen@76.8.206.60] has quit [Remote host closed the
connection]
05:45 -!- replore_ [~replore@ntkngw256114.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
05:49 -!- jarsen [~jarsen@76.8.206.60] has joined #go-nuts
06:37 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has quit [Quit: Computer
has gone to sleep.]
06:41 -!- jarsen [~jarsen@76.8.206.60] has quit [Remote host closed the
connection]
06:42 -!- photron [~photron@port-92-201-148-136.dynamic.qsc.de] has joined
#go-nuts
06:59 * nsf wrote a tetris game in his programming language
06:59 < nsf> http://pastie.org/2017212
06:59 < nsf> :P
06:59 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
07:03 -!- Sep102 [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has joined
#go-nuts
07:06 -!- tvw [~tv@e176005059.adsl.alicedsl.de] has joined #go-nuts
07:06 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
07:08 < zozoR2> go nsf :D
07:13 < nsf> although, I'm starting to realize
07:13 < nsf> that coolness of Go wasn't just in its syntax
07:14 < nsf> but some part of it is syntax :D
07:16 -!- jarsen [~jarsen@76.8.206.60] has joined #go-nuts
07:18 < nsf> I'm still fighting with the type system
07:18 < nsf> I rewrote it from scratch once
07:18 < nsf> but still, it is not satisfactory
07:18 < nsf> :\
07:21 < elimisteve> nsf: Nice.  What's with the semicolons?
07:22 -!- b33p [~root@li226-224.members.linode.com] has joined #go-nuts
07:22 < elimisteve> is this for an older version of Go or something?
07:23 < nsf> elimisteve: it's not Go :)
07:23 < nsf> but syntax is Go-like
07:23 < nsf> I'm working on a language which is supposed to be some kind of
a C with Go syntax
07:24 < nsf> quite an experiment I must say
07:25 < elimisteve> with the advantage that it's faster than Go?
07:25 < nsf> no, it's for low level programming
07:25 < zozoR2> with the advangtage that you are not raping your self :D
07:25 < nsf> there is a pointer arithmetic
07:25 < nsf> and all that stuff
07:25 < nsf> union types
07:25 < nsf> unsafe >8-)
07:25 < elimisteve> I see.  Right
07:26 < aiju> with the advantage that uriel called it stupid and retarded
07:26 < nsf> is he?
07:26 < ampleyfly> wow, stupid _and_ retarded
07:36 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
07:36 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
07:45 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
07:48 -!- boscop [~boscop@unaffiliated/boscop] has quit [Ping timeout: 240
seconds]
07:50 -!- boscop [~boscop@unaffiliated/boscop] has joined #go-nuts
07:59 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
08:07 -!- mikespook [~mikespook@219.137.48.76] has quit [Read error: Connection
reset by peer]
08:07 -!- jarsen [~jarsen@76.8.206.60] has quit [Remote host closed the
connection]
08:09 -!- huin [~huin@91.85.171.238] has joined #go-nuts
08:09 -!- mikespook [~mikespook@219.137.48.76] has joined #go-nuts
08:10 -!- Project_2501 [~Marvin@82.84.73.77] has joined #go-nuts
08:10 -!- Xenith [~xenith@xenith.org] has quit [Remote host closed the connection]
08:11 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
08:16 -!- Xenith [~xenith@xenith.org] has joined #go-nuts
08:17 -!- tvw [~tv@e176005059.adsl.alicedsl.de] has quit [Remote host closed the
connection]
08:19 -!- ynv [~alon@xdsl-188-154-4-146.adslplus.ch] has joined #go-nuts
08:23 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving]
08:32 -!- virtualsue [~chatzilla@host81-148-98-238.in-addr.btopenworld.com] has
joined #go-nuts
08:37 -!- Project-2501 [~Marvin@82.84.93.163] has joined #go-nuts
08:40 -!- Project_2501 [~Marvin@82.84.73.77] has quit [Read error: Operation timed
out]
08:51 -!- rlab_ [~Miranda@91.200.158.34] has joined #go-nuts
08:52 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 258 seconds]
08:55 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
08:58 -!- rlab_ [~Miranda@91.200.158.34] has quit [Ping timeout: 258 seconds]
09:00 -!- ynv [~alon@xdsl-188-154-4-146.adslplus.ch] has quit [Quit: Lost
terminal]
09:01 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
09:03 -!- zozoR2 [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 250
seconds]
09:30 -!- ynv [~alon@xdsl-188-154-4-146.adslplus.ch] has joined #go-nuts
09:36 < ynv> Hi! Which build tool would you recommend for a beginner using
go?  Would you stick to make or try some of the new programms like gobuild, gg
etc?
09:37 < aiju> make?
09:37 < nsf> I like make
09:37 < nsf> and with Go I would stick to bash
09:37 < nsf> I usually use bash in C++ as well until project build time is
less than 10 seconds
09:38 < nsf> :)
09:38 < ynv> ok, thanks :)
09:38 < nsf> in Go it would a very big project which has a build time >
10 seconds :)
09:38 < nsf> it would be*
09:38 < aiju> or a slow computer
09:38 < nsf> or that
09:38 < ynv> that's true go is insanly fast at compiling
09:39 < aiju> kencc is still faster
09:39 < nsf> it's slow at linking though
09:39 < nsf> but for most projects you link only few times
09:40 < ynv> Well, I haven't programmed any big projects in go yet.  I'm
just fooling around with the examples :)
09:40 < ynv> so, kencc is also a go compiler?
09:40 < aiju> no
09:40 < aiju> a C compiler
09:40 < aiju> a modified form is used for the C parts of the go runtime
09:41 < ynv> ah, ok :) so your overall response to go is stick with c?  hehe
09:41 < aiju> haha no
09:43 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has quit [Read error:
Operation timed out]
09:43 < aiju> although i'm writing C right now
09:46 < ynv> C is a wonderful language...  I just don't want to do any
webdev in it.
09:46 < nsf> that's a very good point
09:48 < aiju> i just don't want to do any webdev
09:48 < nsf> haha
09:49 < ynv> hehe, there's some truth to that.
09:50 < ynv> I don't get it: Half of the examples of go I see use the sized
integer types and half use platform dependend ones.
09:51 < ynv> as I understand the new standard should be using int64 etc.
right?
10:05 -!- ynv [~alon@xdsl-188-154-4-146.adslplus.ch] has quit [Quit: leaving]
10:26 -!- virtualsue [~chatzilla@host81-148-98-238.in-addr.btopenworld.com] has
quit [Ping timeout: 250 seconds]
10:37 -!- Project-2501 [~Marvin@82.84.93.163] has quit [Read error: Connection
reset by peer]
10:38 < Omnivore> bad thing about GNU make is non compatibility with windows
even using mingw or cygwin
10:39 < str1ngs> you sure ? pretty sure cygwin use gnu make
10:39 < str1ngs> in terms of go yes I can see it not being ideal
10:40 < Omnivore> oh I'm sure, try using a makefile with multiple else
clauses - unless cygwin has a patched version of 3.81 make that hasn't made it
back upstream
10:40 < Omnivore> 3.80 dropped support for windows paths, 3.81 added
multiple else clauses - so...  half the make files bomb
10:41 < str1ngs> ah
10:41 < aiju> do the Go makefiles do such things?
10:41 < nsf> aiju: oh, yes
10:41 < Omnivore> I had a horrible time with the freetype go package
10:42 <@adg> Omnivore: oh?
10:42 < Omnivore> finally got a '.a' file that *might* be viable
10:42 < Omnivore> but after going through all that said the heck with it and
switched to Ubuntu in a VM
10:46 < aiju> i gave up using "foreign compilers" on Windows rather quickly
10:46 < Omnivore> yeah its a lost cause - more headache than its worth imo
10:47 < aiju> at least MSVC "works"
10:55 < Omnivore> I hate to say it but I think go badly needs two features
from C, inline asm and some type of compile time directives to allow for platform
specific code
10:56 < aiju> Omnivore: inline asm is pure evil
10:56 < aiju> what would you ever need it for
10:56 < Omnivore> lol yeah but it makes it possible to have 'pure' libraries
that aren't half baked posix on windows
10:57 < aiju> huh?
10:57 < aiju> what are you talking about?
10:57 < Omnivore> also for the interlocked instructions
10:57 < aiju> you can always create an ASM function
10:57 < aiju> and call it from Go
10:58 < skelterjohn> i wouldn't dream of using go with make, windows or not
10:58 < Omnivore> calling a function to do an interlocked instruction
seems...  like a slow way of doing performance critical sections
10:59 < aiju> skelterjohn: because you wrote another utility
10:59 < skelterjohn> works great on windows
11:00 < Omnivore> which package skelterjohn?
11:00 < skelterjohn> go-gb.googlecode.com
11:00 < Omnivore> thanks, I'll give it a shot
11:01 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
11:02 -!- hargettp [~hargettp@pool-71-184-177-169.bstnma.east.verizon.net] has
joined #go-nuts
11:02 < aiju> Omnivore: what do you need interlocked instructions ever for
11:02 < Omnivore> lock free code
11:02 < aiju> just use channels?
11:03 < skelterjohn> i don't know if i'd call channels "lock free"
11:03 < aiju> no visible locks
11:03 < Omnivore> go still includes mutexes for a reason
11:03 < aiju> if you want to do multithreaded code the ugly way, you're
using the wrong language
11:04 < aiju> Omnivore: using them is highly discouraged
11:04 < Omnivore> channels are great but sometimes you do need other tools -
there are no one size fits all
11:04 < skelterjohn> i disagree
11:04 < skelterjohn> there are times when you just want a mutex.  sure you
can use a channel to do the same thing, but it's less efficient
11:05 < skelterjohn> though it requires fewer imports :)
11:05 < skelterjohn> in gb i use channels as leaky bucket mutexs a bit
11:05 -!- ynv [~alon@xdsl-188-154-4-146.adslplus.ch] has joined #go-nuts
11:06 -!- alehorst [~alehorst@189.58.28.232.dynamic.adsl.gvt.net.br] has joined
#go-nuts
11:09 -!- hargettp [~hargettp@pool-71-184-177-169.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
11:18 -!- bartbes [~bartbes@love/developer/bartbes] has joined #go-nuts
11:27 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has joined #go-nuts
11:27 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote
host closed the connection]
11:33 -!- Qvist_ [~erik@c-13cee455.05-294-6c6b701.cust.bredbandsbolaget.se] has
joined #go-nuts
11:56 * cenuij groans
11:56 < cenuij> "The real WTF is that an 800 LoC program is taking 1.2 MiB
for a dynamically linked Google Go binary.  The Google Go toolchain is a fucking
joke."
11:56 -!- tux21b [~christoph@chello213047047175.3.graz.surfer.at] has quit [Ping
timeout: 258 seconds]
11:56 < cenuij> some more trolls on /r/programming subreddit
11:56 < cenuij> same guys, always trolling anything with Go in it
11:57 < aiju> who gives a fuck about reddit?
11:57 < cenuij> who gives a fuck about you?
11:57 < cenuij> ?
11:57 < aiju> 4chan has less trolls than reddit
11:58 < cenuij> probably
11:59 < cenuij> annoying thing abotu this guy, he knows fine well Go is
statically linked
11:59 < mpl> aiju: or at least on 4chans they're not hiding that they're
just there to troll.
11:59 < cenuij> It's probably that "⚛" guy that used to troll the go-nuts
ML, but has at least become less abrassive in the last couple of months
12:06 -!- Qvist_ [~erik@c-13cee455.05-294-6c6b701.cust.bredbandsbolaget.se] has
quit [Quit: leaving]
12:08 -!- foocraft [~ewanas@78.101.125.51] has joined #go-nuts
12:11 -!- hungrygruffalo
[~hungrygru@host81-159-211-162.range81-159.btcentralplus.com] has joined #go-nuts
12:12 -!- b33p [~root@li226-224.members.linode.com] has quit [Quit: leaving]
12:15 -!- hungrygruffalo_
[~hungrygru@host86-161-14-163.range86-161.btcentralplus.com] has joined #go-nuts
12:16 -!- hungrygruffalo
[~hungrygru@host81-159-211-162.range81-159.btcentralplus.com] has quit [Ping
timeout: 250 seconds]
12:16 -!- hungrygruffalo
[~hungrygru@host86-183-75-113.range86-183.btcentralplus.com] has joined #go-nuts
12:17 -!- dfc [~dfc@124-168-57-245.dyn.iinet.net.au] has joined #go-nuts
12:18 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.5]
12:19 -!- hungrygruffalo_
[~hungrygru@host86-161-14-163.range86-161.btcentralplus.com] has quit [Ping
timeout: 240 seconds]
12:21 -!- hungrygruffalo
[~hungrygru@host86-183-75-113.range86-183.btcentralplus.com] has quit [Ping
timeout: 252 seconds]
12:23 -!- niemeyer [~niemeyer@201-40-174-53.pltce701.dsl.brasiltelecom.net.br] has
joined #go-nuts
12:26 -!- hungrygruffalo
[~hungrygru@host81-159-210-70.range81-159.btcentralplus.com] has joined #go-nuts
12:32 -!- mehalelal [~mehalelal@76.103.175.11] has joined #go-nuts
12:41 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has joined
#go-nuts
12:53 -!- tncardoso [~thiago@201.80.233.227] has joined #go-nuts
12:54 -!- _dfc [~dfc@124-149-49-45.dyn.iinet.net.au] has joined #go-nuts
12:54 -!- dfc [~dfc@124-168-57-245.dyn.iinet.net.au] has quit [Ping timeout: 250
seconds]
12:56 < ynv> Why is gmfmt using tabs instead of spaces?
12:56 < aiju> because.
12:57 < aiju> tabs vs spaces probably has killed more productivity than doom
and minecraft combined
12:57 < ynv> not so sure about minecraft, hehe
12:57 < exch> tha is indeed a bold statement :P
12:59 < str1ngs> you can tell it to use spaces no?
13:00 < aiju> and there's that
13:00 < ynv> can you?
13:00 < aiju> -tabindent=true: indent with tabs independent of -spaces
13:00 < ynv> aaah, yeah
13:00 < str1ngs> gofmt -h
13:01 < ynv> great, thanks :)
13:02 < aiju> rob pike will kill you in sleep
13:04 < ynv> worth the risk ;)
13:04 < str1ngs> just never fall asleep.  you will be safe then :P
13:05 < ynv> I don't plan on sleeping anytime soon before the finals anyway,
heh
13:06 < str1ngs> redbull git me wings.
13:06 < str1ngs> give*
13:06 < ynv> lol
13:08 -!- virtualsue [~chatzilla@host81-148-98-238.in-addr.btopenworld.com] has
joined #go-nuts
13:09 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
13:19 -!- ynv [~alon@xdsl-188-154-4-146.adslplus.ch] has quit [Quit: leaving]
13:21 -!- hungrygruffalo
[~hungrygru@host81-159-210-70.range81-159.btcentralplus.com] has quit [Quit:
hungrygruffalo]
13:25 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
13:29 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
13:57 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
14:05 -!- tux21b [~christoph@chello213047047175.3.graz.surfer.at] has joined
#go-nuts
14:18 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has joined #go-nuts
14:23 -!- ronnyy [~quassel@p4FF1C7AB.dip0.t-ipconnect.de] has joined #go-nuts
14:29 -!- GeertJohan [~Squarc@ip545460b7.adsl-surfen.hetnet.nl] has joined
#go-nuts
14:29 < GeertJohan> Hey
14:30 < GeertJohan> How should I "mimic" the extend feature of java in go ?
14:30 < GeertJohan> I mean, there's no way to extend a struct, right?
14:30 < aiju> there is, in a way
14:30 < aiju> struct { OldStruct; Foo int }
14:31 < GeertJohan> oh :O
14:31 < GeertJohan> and that will give the struct all parameters and methods
of OldStruct?
14:31 < aiju> methods yes
14:31 < aiju> elements via .OldStruct.Bar
14:31 < GeertJohan> ah ok
14:32 < GeertJohan> hum sounds like a great solution
14:32 < aiju> you shouldn't use Go like Java, though
14:33 < aiju> GeertJohan: elements also work via .Bar
14:33 < GeertJohan> ah ok :)
14:33 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has quit [Quit: Textual IRC
Client: http://www.textualapp.com/]
14:33 < aiju> just looked it up
14:36 -!- kamaji [~kamaji@cpc2-aztw22-2-0-cust775.aztw.cable.virginmedia.com] has
joined #go-nuts
14:36 -!- _dfc [~dfc@124-149-49-45.dyn.iinet.net.au] has quit [Quit: _dfc]
14:37 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the
connection]
14:38 < jessta_> GeertJohan: note, that the methods still only have
Oldstruct as the reciever
14:38 < GeertJohan> okay :)
14:38 < GeertJohan> but thats good :)
14:38 < GeertJohan> and logical :)
14:38 < GeertJohan> hum, I like this more then java's extend :D
14:44 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
14:44 < GeertJohan> aiju and jessta_ : thanks for the help :) brb rebooting
X11 is failing me :/
14:44 -!- GeertJohan [~Squarc@ip545460b7.adsl-surfen.hetnet.nl] has quit [Quit:
Leaving.]
14:47 -!- Fish- [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has joined #go-nuts
14:52 -!- GeertJohan [~Squarc@ip545460b7.adsl-surfen.hetnet.nl] has joined
#go-nuts
15:00 < GeertJohan> back
15:00 < GeertJohan> X11 still failing me but anyway...
15:03 < skelterjohn> i think it's important to not write go code like you'd
write java code
15:03 < skelterjohn> it's a fundamentally different setup
15:04 < GeertJohan> yeah I understand that :)
15:04 < skelterjohn> for instance, composition (doing "type A struct { B }")
does not give you polymorphism like java extends does
15:04 < GeertJohan> Did follow lots of tutorials and stuff
15:05 < GeertJohan> but I needed some way to 'extend' structs with
additional elements/methods...
15:05 < huin> it's probably best to say what you're trying to do, as opposed
to "how does feature X from language Y work in language Z?"
15:05 < skelterjohn> yeah - asking "how to do java X in go" is a bit of a
button push in here :)
15:06 < huin> i think that's true of many language forums :)
15:06 < GeertJohan> and I just used "java's extend" to kinda ehm, explain my
question :P
15:06 < GeertJohan> XD but I get the point :)
15:06 < huin> oh btw - how do you use `.` to concatenate strings in Go like
you do in PHP?  </troll>
15:06 < huin> GeertJohan: it's cool :)
15:06 < GeertJohan> XD
15:07 < huin> (excuse my trolling.  i mean it in irony)
15:07 < GeertJohan> np :) I get it :)
15:07 < GeertJohan> looking into composition some more
15:08 < GeertJohan> there's not a lot of info about it actually :o
15:08 < skelterjohn> there is not a lot to it
15:08 < skelterjohn> if you composite A into B, B has all of A's fields and
methods
15:08 < huin> is this composition as-in `type Foo { a int } ;; type Bar {
Foo ;; b int }` ?
15:09 < huin> oops
15:09 < skelterjohn> yes
15:09 < huin> + struct in the right places there :)
15:09 < huin> ah, i called that embedding, maybe incorrectly
15:09 < skelterjohn> maybe i'm wrong
15:09 < huin> it's more likely than i am
15:09 < skelterjohn> vocabulary hasn't really stabilized
15:10 < GeertJohan> hum ok
15:10 < skelterjohn> but if you composite A into B, you cannot A(aB)
15:10 < huin> actually, i think embedding might be the thing of having a
type "embedded" directly into another type, without going via a pointer or
something, but again, i could be wrong
15:10 < skelterjohn> that conversion does not work
15:10 * huin goes and reads
15:12 < GeertJohan> say I have "type Foo struct { a int } ; type Bar struct
{ Foo ; b int }" and a function: "func myFunc(Foo) {}" does myFunc accept a Bar
instance as argument?
15:12 < huin> oh...  apparently embedding *is* the `type Bar struct { Foo }`
thing
15:12 < huin> http://golang.org/doc/effective_go.html#embedding
15:12 < skelterjohn> no, it doesn't
15:12 < GeertJohan> ok
15:12 < huin> GeertJohan: you need interfaces for that
15:12 < skelterjohn> i should called it embedding, then
15:12 < skelterjohn> composition makes sense too, though
15:12 < huin> aye
15:12 < skelterjohn> in the UML diagram sense
15:13 < huin> of course, there's the "has a" relationship, and the "embeds
and inherits methods/attributes" relationship
15:14 < huin> embedding tempts me to describe it as a "is a" relationship,
but i think that's dangerous and misleading at best.
15:16 -!- mehalelal [~mehalelal@76.103.175.11] has quit [Quit: Leaving]
15:19 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 252
seconds]
15:23 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Ping
timeout: 240 seconds]
15:24 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
15:24 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
15:24 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
15:28 < GeertJohan> yeah
15:28 < GeertJohan> say you have an inventory which can store items..
15:28 < GeertJohan> and you got object, item, sword..
15:28 < GeertJohan> inheritting eachother in that order..
15:29 < GeertJohan> you cant store a sword in an inventory..
15:29 < GeertJohan> so if thats true, "is a" is indeed misleading..
15:32 < GeertJohan> hum, so embedding/composing is nice..
15:32 < GeertJohan> but it's not the solution to my problem :P
15:33 < GeertJohan> cause I have the "inventory storing items, books being
items, cds being items" problem..
15:34 -!- gedevan [~gedevan@83.167.106.253] has joined #go-nuts
15:35 -!- foocraft_ [~ewanas@78.101.222.35] has joined #go-nuts
15:37 < skelterjohn> if you want an inventory to be ab le to store more than
one type (without special cases) use an interface
15:37 -!- foocraft [~ewanas@78.101.125.51] has quit [Ping timeout: 246 seconds]
15:37 < skelterjohn> there is talk, now and again, of a union type which
would be like an interface but be able to store only one of a list of types
15:38 < skelterjohn> but it hasn't come to anything
15:38 < skelterjohn> the solution i would use for your issue is to have the
inventory be a collection of interface{} types, and when you stash/remove
something you can check to make sure its one of the correct types
15:40 < skelterjohn>
https://groups.google.com/d/topic/golang-nuts/-94Fmnz9L6k/discussion <- a
go-nuts thread about this
15:44 < exch> the struct embedding is a bit misleading in itself.  It makes
people think of inheritance like you get it in java/C#.  There is a subtle, but
significant difference there
15:45 < aiju> the main purpose of struct embedding is embedding something
like a Lock
15:48 < GeertJohan> ah ok :)
15:49 < GeertJohan> allright :) will try this stuff using interfaces :)
15:50 < GeertJohan> btw embedding interfaces seems to work too :)
15:50 < GeertJohan> ehm I mean:
15:51 < GeertJohan> "type A interface { Foo() int }; type B interface { A;
Bar() int }"
15:54 < huin> makes sense
15:55 < GeertJohan> yes that works nice :)
15:56 -!- prip [~foo@host233-130-dynamic.36-79-r.retail.telecomitalia.it] has quit
[Ping timeout: 241 seconds]
15:58 -!- jarsen [~jarsen@76.8.206.60] has joined #go-nuts
16:00 < GeertJohan> working test showing interface inherritance:
http://pastebin.com/0y6nM1Em
16:06 -!- jarsen [~jarsen@76.8.206.60] has quit [Remote host closed the
connection]
16:07 < skelterjohn> there is a way to fake a union, kinda, if you want it
to only include types you define
16:07 < skelterjohn> you can make an interface with one unexported method
16:08 < skelterjohn> and give all the types you want included that method
too
16:08 < skelterjohn> the go/ast package does this
16:08 -!- prip [~foo@host92-220-dynamic.45-79-r.retail.telecomitalia.it] has
joined #go-nuts
16:32 < kevlar> GeertJohan: try to avoid calling it inheritance; I think
I've heard it called "interface composition." Inheritance just has too much
baggage associated with it.
16:34 -!- wrtp [~rog@92.30.183.6] has joined #go-nuts
16:35 < GeertJohan> ok :)
16:36 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
16:37 -!- ronnyy [~quassel@p4FF1C7AB.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
16:41 * huin hopes he isn't violating any good style or other rules with what he's
doing in chunkymonket
16:41 < huin> chunkymonkey*
16:49 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 246 seconds]
17:07 -!- KingPhilroy [~kingphilr@68-116-192-86.dhcp.oxfr.ma.charter.com] has quit
[Quit: Sleeping with the fishes...]
17:08 -!- jrabbit [~babyseal@unaffiliated/jrabbit] has quit [Quit: Reconnecting]
17:08 -!- jrabbit [~babyseal@unaffiliated/jrabbit] has joined #go-nuts
17:10 < kevlar> huin: you should tell us what you're worried about doing and
then we could tell you ;-).
17:11 < GeertJohan> How do I "transform" Element.Value to its original
inteface?  right now I get an error cause the Value is interface{}..  while I
added 'type Item interface {etc.}' value's
http://golang.org/pkg/container/list/#Element
17:11 < kevlar> !golang type assertion
17:11 < GoBIR> kevlar: Spec Section Type assertions -
http://golang.org/doc/go_spec.html#Type_assertions
17:13 -!- jrabbit [~babyseal@unaffiliated/jrabbit] has quit [Ping timeout: 246
seconds]
17:14 < GeertJohan> thx :)
17:14 -!- jrabbit [~babyseal@unaffiliated/jrabbit] has joined #go-nuts
17:16 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
17:18 < kevlar> np.
17:30 -!- Natch| [~natch@c-adcee155.25-4-64736c10.cust.bredbandsbolaget.se] has
quit [Ping timeout: 248 seconds]
17:32 < mpl> what's the recommended way to implement a simple password
protection to enable some of the services for a web app I'm writing?  it should
not be clear text over the wire.
17:33 < mpl> (no authentication needed, just authorization by password).
17:36 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
17:37 -!- dfr|mac [~dfr|work@nat/google/x-xtdktcyjgkvtxfgr] has joined #go-nuts
17:44 -!- Natch| [~natch@c-adcee155.25-4-64736c10.cust.bredbandsbolaget.se] has
joined #go-nuts
17:50 -!- hargettp [~hargettp@pool-71-184-177-169.bstnma.east.verizon.net] has
joined #go-nuts
17:52 -!- noam [noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
17:53 -!- mostafa__ [~mostafa@109.162.218.140] has quit [Quit: Leaving]
17:53 -!- TheMue [~TheMue@p5DDF7133.dip.t-dialin.net] has joined #go-nuts
17:54 < huin> mpl: other than HTTPS?
17:54 < huin> mpl: JavaScript hash the password client-side?
17:54 < huin> admittedly that does run into the problem of still being able
to replay the hash
17:54 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 252 seconds]
17:55 < huin> ideally there'd be a salt in the session server-side
17:57 -!- _foocraft [~ewanas@78.100.182.138] has joined #go-nuts
17:57 -!- jarsen [~jarsen@76.8.206.19] has joined #go-nuts
18:00 -!- foocraft_ [~ewanas@78.101.222.35] has quit [Ping timeout: 250 seconds]
18:01 < huin> a nonce is probably a better thing/term
18:01 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
18:03 -!- dj2 [~dj2@CPE001f5b35feb4-CM0014048e0344.cpe.net.cable.rogers.com] has
joined #go-nuts
18:04 < mpl> huin: https is fine.
18:04 -!- Project_2501 [~Marvin@82.84.74.72] has joined #go-nuts
18:04 < mpl> but that does not really answer the question of the pass
itself.
18:05 < mpl> should I just store a hash of the pass on the server in a
textfile?
18:05 < huin> yeah
18:05 < huin> with a salt
18:06 < huin> or a DB or whatever, but salted hashes are the way to go i
believe
18:06 < huin> i.e you store in the db: salt:password_hash
18:07 < mpl> ok, and as long as I'm over https I can simply have the user
the pass in clear text in a form, right?  that pass will go encrypted over the
wire, isn't it?
18:12 -!- wrtp [~rog@92.30.183.6] has quit [Quit: wrtp]
18:13 -!- brett [~brett@rdnzl.net] has joined #go-nuts
18:13 -!- KingPhilroy [~kingphilr@68-116-192-86.dhcp.oxfr.ma.charter.com] has
joined #go-nuts
18:15 -!- jarsen [~jarsen@76.8.206.19] has quit [Remote host closed the
connection]
18:17 < huin> mpl: it should do.  but note that SSL doesn't imply
encryption, strictly speaking.  make sure your server insists on some minimal
level of cipher level
18:18 -!- jarsen [~jarsen@76.8.206.19] has joined #go-nuts
18:21 -!- robteix [~robteix@host40.201-253-152.telecom.net.ar] has joined #go-nuts
18:23 -!- jarsen [~jarsen@76.8.206.19] has quit [Remote host closed the
connection]
18:25 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 258 seconds]
18:39 -!- boscop [~boscop@unaffiliated/boscop] has quit [Read error: Connection
reset by peer]
18:40 -!- boscop [~boscop@unaffiliated/boscop] has joined #go-nuts
18:41 -!- robteix [~robteix@host40.201-253-152.telecom.net.ar] has quit [Quit:
Computer has gone to sleep.]
18:42 -!- boscop [~boscop@unaffiliated/boscop] has quit [Read error: Connection
reset by peer]
18:42 -!- boscop [~boscop@unaffiliated/boscop] has joined #go-nuts
18:43 < mpl> huin: kthx.
18:59 -!- boscop [~boscop@unaffiliated/boscop] has quit [Read error: Connection
reset by peer]
19:00 -!- boscop_ [~boscop@f055174148.adsl.alicedsl.de] has joined #go-nuts
19:00 -!- tncardoso [~thiago@201.80.233.227] has quit [Read error: Connection
reset by peer]
19:06 -!- dfr|mac_ [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
19:08 -!- boscop_ [~boscop@f055174148.adsl.alicedsl.de] has quit [Ping timeout:
250 seconds]
19:09 -!- boscop_ [~boscop@f055174148.adsl.alicedsl.de] has joined #go-nuts
19:10 -!- dfr|mac [~dfr|work@nat/google/x-xtdktcyjgkvtxfgr] has quit [Ping
timeout: 260 seconds]
19:13 -!- GeertJohan [~Squarc@ip545460b7.adsl-surfen.hetnet.nl] has quit [Quit:
Leaving.]
19:14 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
19:17 -!- boscop_ [~boscop@f055174148.adsl.alicedsl.de] has quit [Ping timeout:
240 seconds]
19:18 -!- boscop_ [~boscop@f055174148.adsl.alicedsl.de] has joined #go-nuts
19:22 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
19:25 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-183-52.clienti.tiscali.it] has
joined #go-nuts
19:27 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Ping
timeout: 246 seconds]
19:28 -!- Project_2501 [~Marvin@82.84.74.72] has quit [Ping timeout: 252 seconds]
19:29 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined
#go-nuts
19:33 -!- boscop_ [~boscop@f055174148.adsl.alicedsl.de] has quit [Read error:
Connection reset by peer]
19:33 -!- boscop [~boscop@unaffiliated/boscop] has joined #go-nuts
19:36 -!- boscop_ [~boscop@f055169159.adsl.alicedsl.de] has joined #go-nuts
19:38 -!- boscop [~boscop@unaffiliated/boscop] has quit [Ping timeout: 248
seconds]
19:41 -!- wrtp [~rog@92.30.183.6] has joined #go-nuts
19:42 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 244 seconds]
19:44 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
19:46 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
19:53 -!- danilo04 [~danilo04@66.44.228.140] has joined #go-nuts
19:59 -!- meatmanek_ [~meatmanek@70-36-143-151.dsl.dynamic.sonic.net] has joined
#go-nuts
20:03 -!- aaronblohowiak [47c606a4@gateway/web/freenode/ip.71.198.6.164] has quit
[Quit: Page closed]
20:04 < meatmanek_> I've just updated my go, and now I'm getting "syntax
error: unexpected literal, expecting name" whenever I try to import "fmt"
20:04 < meatmanek_> http://pastebin.com/
20:04 < meatmanek_> that is not a pastebin link
20:04 < meatmanek_> hold on
20:04 < meatmanek_> http://pastebin.com/WbZu5J31
20:05 < meatmanek_> hmm, could be that my compilers didn't actually copy to
~/bin
20:06 -!- Tv_ [~Tv_@ip68-4-237-249.oc.oc.cox.net] has joined #go-nuts
20:08 < ampleyfly> meatmanek_: have you tried doing just import "fmt"?
20:09 < meatmanek_> it was my compiler version
20:10 < meatmanek_> previously, I had copied the compiler and such to
~/bin/, and when I updated, it only updated the stuff in ~/go/bin
20:10 < meatmanek_> ~/bin/ comes before ~/go/bin in my path, so it was using
the old version.
20:12 < ampleyfly> aha =)
20:15 -!- danilo04 [~danilo04@66.44.228.140] has quit [Quit: Leaving]
20:20 -!- Bigbear11 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
20:21 -!- Bigbear12 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
20:21 -!- dfr|mac_ [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote
host closed the connection]
20:24 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has quit [Ping timeout:
252 seconds]
20:25 -!- Bigbear11 [~Cody@d173-181-43-12.abhsia.telus.net] has quit [Ping
timeout: 240 seconds]
20:36 -!- pvarga [~pvarga@pool-71-172-108-117.nwrknj.east.verizon.net] has joined
#go-nuts
20:40 -!- NfNitLoop [~bip@2001:470:b9cc:beef::1] has joined #go-nuts
20:41 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 250 seconds]
20:41 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
20:43 < NfNitLoop> I'm looking at the prime sieve example in the tutorial
and it brought up a question -- if I were to do that in a long-running
application, would I have dangling goroutines that existed for the rest of the
duration?
20:43 < aiju> goroutines are not garbage collected if you mean that ;P
20:43 < NfNitLoop> or does the GC realize that a goroutine is blocked on a
channel that doesn't exist outside of the goroutine and stop it?
20:43 < NfNitLoop> ah.
20:43 < NfNitLoop> yeah.
20:44 -!- robteix [~robteix@host40.201-253-152.telecom.net.ar] has joined #go-nuts
20:44 < NfNitLoop> Maybe the tutorial should have a note.  "Don't do this in
a real application!" :p
20:44 -!- pvarga_ [~pvarga@pool-71-172-108-117.nwrknj.east.verizon.net] has joined
#go-nuts
20:46 -!- Bigbear12 [~Cody@d173-181-43-12.abhsia.telus.net] has left #go-nuts []
20:49 -!- pvarga [~pvarga@pool-71-172-108-117.nwrknj.east.verizon.net] has quit
[Ping timeout: 260 seconds]
20:55 -!- pvarga_ [~pvarga@pool-71-172-108-117.nwrknj.east.verizon.net] has quit
[Quit: pvarga_]
21:00 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 260
seconds]
21:01 < str1ngs> meatmanek_: you can export GOBIN and it will handle that
for you
21:01 < meatmanek_> str1ngs: got it figured out, thanks
21:02 < str1ngs> kk
21:03 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
21:06 -!- jarsen [~jarsen@76.8.206.19] has joined #go-nuts
21:08 -!- robteix [~robteix@host40.201-253-152.telecom.net.ar] has quit [Quit:
Computer has gone to sleep.]
21:08 -!- huin [~huin@91.85.171.238] has quit [Quit: leaving]
21:09 -!- jarsen [~jarsen@76.8.206.19] has quit [Remote host closed the
connection]
21:17 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts
21:21 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
21:23 -!- MaL0 [~ircd@unaffiliated/mal0] has joined #go-nuts
21:26 -!- aslakr_ [~aslak@static.42.114.40.188.clients.your-server.de] has joined
#go-nuts
21:28 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
21:30 < kevlar> woah, meatmanek_?
21:30 < meatmanek_> kevlar: ?
21:30 < kevlar> I haven't seen you on IRC in awhile.
21:31 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 246
seconds]
21:31 < meatmanek_> I haven't done much go stuff in a while
21:31 -!- Tv_ [~Tv_@ip68-4-237-249.oc.oc.cox.net] has quit [Ping timeout: 244
seconds]
21:32 -!- meatmanek [~meatmanek@70-36-143-151.dsl.dynamic.sonic.net] has joined
#go-nuts
21:33 < kevlar> meatmanek: you should help out with my Go IRCd >:-)
21:33 < meatmanek_> haha I should
21:33 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
21:34 < kevlar> this time, I decided to make server linking work up front
21:34 < kevlar> instead of adding it in later
21:34 < kevlar> seems to have been a good choice.
21:34 < meatmanek> yeah probably
21:38 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-183-52.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
21:40 < MaL0> hello
21:41 < kevlar> helo MaL0
21:41 < MaL0> why go and not other languages ?
21:42 < kevlar> MaL0: It's a compiled language that is as easy an fun to
program as a dynamic language
21:42 < meatmanek> ^ that
21:42 < MaL0> aha
21:42 < aiju> that somehow implies using other compiled languages is not fun
21:42 < meatmanek> aiju: Java.
21:43 < meatmanek> I do not find Java fun at all
21:43 -!- hargettp [~hargettp@pool-71-184-177-169.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
21:43 < aiju> Java is not the only compiled language out there
21:43 < kevlar> aiju: a lot of things (memory management,
threading/synchronization) that you have to do frequently in compiled languages
like C and C++ are really, really not fun
21:43 -!- photron [~photron@port-92-201-148-136.dynamic.qsc.de] has quit [Read
error: Operation timed out]
21:43 < MaL0> kevlar it's OOP ?
21:44 < kevlar> MaL0: It has objects and methods on objects and an interface
mechanism
21:44 < kevlar> but it's not the OOP you're used to.
21:44 < meatmanek> no inheritance though
21:44 < kevlar> I thought that was weird at first
21:44 < kevlar> but now I wonder why I ever wanted it in the first place.
21:45 < skelterjohn> i like not spending time thinking about object
hierarchies
21:45 < skelterjohn> and using that time to write actual code instead
21:46 < kevlar> yeah
21:47 < kevlar> and when I want to take in a type that I can Delete(),
Commit(), and WriteTo(...), I just make an interface
21:47 < kevlar> and I don't need to think about abstracting everything that
can do that into a superclass
21:47 -!- Fish- [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has quit [Quit: So
Long, and Thanks for All the Fish]
21:47 < kevlar> or editing all of the classes to add the interface name.
21:48 < MaL0> what about the integration with java ?
21:48 < kevlar> MaL0: why?
21:48 < kevlar> you might be able to do it with swig
21:48 < MaL0> because I administrate j2ee servers and I need to access via
jmx, rmi ....
21:49 -!- aaronblohowiak [47c606a4@gateway/web/freenode/ip.71.198.6.164] has
joined #go-nuts
21:49 < aaronblohowiak> what is the memory usage per channel?
21:49 < kevlar> I don't know what that means; but if there is a C library
for it, you can wrap it with cgo (on linux)
21:49 < kevlar> and you may be able to interface with swig.
21:50 < str1ngs> aaronblohowiak: I think that would depend on that data
structure of the channel
21:50 < kevlar> aaronblohowiak: the size of a semaphore plus the size of the
type multiplied by the size of the channel
21:50 < str1ngs> aaronblohowiak: ie make(chan init) vs make (chan int64)
21:50 < str1ngs> int*
21:50 < kevlar> aaronblohowiak: don't worry about the size in that case.
21:51 < kevlar> just know that a make(chan int, 1024) could potentially
expand to be big enough to store 1024 integers.
21:51 < aaronblohowiak> str1ngs: for buffered channels, is the memory usage
fixed at sz * sizeof(T) or is it just the sz * sizeof(pointer) ?
21:52 < kevlar> aaronblohowiak: there is a constant overhead for the
channel, and then there is an expandable queue that increases up to the maximum
size as necessary
21:52 < kevlar> but it never shrinks.
21:53 < aaronblohowiak> kevlar: oh!  so each message is copied into the
channel's (JIT)-allocated space?
21:53 < kevlar> yeah.
21:53 < aaronblohowiak> boo.
21:53 < kevlar> basically.
21:53 < aaronblohowiak> thanks.
21:53 < kevlar> why boo?
21:53 < kevlar> most of the time you're using a basic type or a pointer in
the channel anyway
21:55 < aaronblohowiak> oh, that's not so bad..  i thought you were supposed
to copy every time you put into the channel
21:55 < kevlar> it's just like a function call; the value that 's being put
into the channel is copied by value.
21:55 < Omnivore> only time you'd need to copy is if you (for some really
odd and probably very wrong) reason wanted to change the original elsewhere
21:56 < aaronblohowiak> Omnivore: mutability scares me =(
21:56 < kevlar> meatmanek: did you see that Go came to Google AppEngine?
21:56 < kevlar> aaronblohowiak: how so?
21:57 < Omnivore> aaronblohowiak: you're protected by convention - passing a
pointer through a channel is (by convention) passing ownership
21:58 < aaronblohowiak> Omnivore: oh!  Where are conventions like that
explained?  i didnt see that mentioned in Effective Go
21:58 < kevlar> aaronblohowiak: it depends on what you mean by "mutability"
21:58 -!- virtualsue [~chatzilla@host81-148-98-238.in-addr.btopenworld.com] has
quit [Ping timeout: 250 seconds]
21:58 < kevlar> objects basically have to be mutable to be useful
21:58 < kevlar> (yes, yes, I know, go away functional programmers)
21:58 < NfNitLoop> Yeah.  Strings are useless.  :p
21:59 -!- _foocraft [~ewanas@78.100.182.138] has quit [Ping timeout: 244 seconds]
21:59 < kevlar> NfNitLoop: oh, I hadn't noticed that strings were objects.
21:59 < Omnivore> erm..  I know I read it somewhere in the docs
21:59 < aaronblohowiak> :-)
21:59 < aaronblohowiak> thanks for sharing the knowledge
22:00 < kevlar> aaronblohowiak:
http://golang.org/doc/effective_go.html#sharing
22:01 < aaronblohowiak> kevlar: yea, that share by communicating not by
sharing memory was what made me think you were supposed to copy
22:01 < kevlar> it has no bearing at all on copying or not
22:02 < kevlar> but you do have to understand the ramifications of not
copying something if you are passing it outside the owning goroutine
22:02 < aaronblohowiak> kevlar: exactly.  it would be interesting if the
ownership could be language-enforced =)
22:03 < kevlar> no.
22:03 < aaronblohowiak> v.  v you weren't kidding about functional
programmers going away, huh =)
22:04 < kevlar> no, I actually really enjoy functional programming
22:04 < kevlar> but imposing that stricture on a non-functional language is
the road to oblivion.
22:04 < Omnivore> consider what the ramifications are of enforcing ownership
in the language
22:05 < kevlar> you end up with the "synchronized" keyword from Java
22:05 < kevlar> or worse.
22:05 < aaronblohowiak> or a much , much more complicated compiler
22:05 < Omnivore> esp in a systems language that has to interface with
external libs/resources
22:06 < kevlar> aaronblohowiak: it probably would fall to the runtime to
enforce it
22:06 < aaronblohowiak> kevlar: then that would be far less useful
22:06 < kevlar> which would slow down execution, increase memory, all for
(arguably) little benefit, because channels and mutexes can give you the semantics
you want.
22:06 < aaronblohowiak> :-)
22:07 < kevlar> the tradeoff is that programmers have to learn how to use
them.
22:07 < kevlar> but I would argue that you get better programs when the
programmers do it than when the compiler does it, and that go makes it easier than
other languages.
22:08 < kevlar> you are free to disagree ;-).
22:09 < aaronblohowiak> kevlar: i disagree only in theory, in practice, i
agree (so far.)
22:10 -!- alanliang [~yogafire@c-71-204-189-190.hsd1.ca.comcast.net] has joined
#go-nuts
22:11 < kevlar> the Go language was very much designed with practice in
mind.  When you hear the creators talking about it, they often talked about how
they didn't go with what language theorists think is the purest, best thing
because it wasn't practical.
22:11 < kevlar> s/talked/talk/
22:12 < kevlar> (most of them ARE language theorists, lol)
22:13 < kevlar> I recommend listening to rob pike and russ cox's various
talks about it (andrew gerrand has a few floating aorund too if you can find
them).  I haven't seen any by ken thompson, but they might also exist.
22:13 < aiju> i haven't seen him talking either
22:13 < Omnivore> also read their blogs
22:14 < aaronblohowiak> kevlar: thanks.  listening to those talks got me
interested in the language, also i assumed it would be easier to pick up than
Erlang and so far that seems to be true
22:14 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 240 seconds]
22:14 < kevlar> oyeah, research!rsc has some really great articles;
especially one about how interfaces work
22:14 < kevlar> I don't get around to checking my blogroll enough though, so
I've probably missed a lot of good ones.
22:15 < kevlar>
http://research.swtch.com/2009/12/go-data-structures-interfaces.html
22:22 < Omnivore> hmm..  would it be a silly idea to embed a go compiler in
a go program to compile externally provided plugins on demand?
22:26 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
22:27 -!- noam [noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 248
seconds]
22:29 < aaronblohowiak> Omnivore: like eval?
22:32 < kevlar> Omnivore: dynamic loading will come
22:32 < Omnivore> well more like in lieu of embedding a script engine, I'm
thinking you could compile a dll/so and load it instead
22:33 < kevlar> Omnivore: it's not on the roadmap, I don't think, but the
creators have acknowledged that it is something that is necessary and that will be
tackled
22:33 < Omnivore> conceptually its pretty simple, LoadLibrary is already
there
22:33 < kevlar> what who?
22:33 < Omnivore> oh lemme see what pkg
22:35 < kevlar> Omnivore: that appears to be windows only
22:35 < Omnivore> syscall package
22:35 < kevlar> and I suspect it doesn't do what you think
22:36 < kevlar> it's only defined on windows.
22:36 < kevlar> windows_386, to be precise.
22:36 < kevlar> and it is only used in wingui.
22:37 < Omnivore> oh it does what I think, loads a dll, still have to call
GetProcAddr and such but yeah unfortunately windows specific for now
22:38 < Omnivore> loading linux style .so's shouldn't be too much of a
stretch to add
22:39 < Omnivore> still need a compiler/linker which might be a bit much to
embed lol
22:40 < kevlar> why would you need a compiler?
22:40 -!- abiosoft [~abiosoft@41.206.12.7] has joined #go-nuts
22:40 -!- TheMue [~TheMue@p5DDF7133.dip.t-dialin.net] has quit [Quit: TheMue]
22:41 < kevlar> my thought is that adding the loader is simple, it's making
it work within the language that would be gross.
22:41 < kevlar> for instance, what do you do with a type that's in the
dynamic library?
22:41 < Omnivore> yeah linking the runtimes will be fun
22:42 < kevlar> we will probably have to make our own shared object format
that has an easily loadable type table
22:42 < kevlar> oh, you wouldn't link the runtimes
22:42 < kevlar> the shared object would only have the types and methods
defined in the so
22:43 < Omnivore> done that way would certainly make more sense - I was
thinking of the current situation
22:43 < kevlar> Omnivore: don't think about how to hack it, think about how
to make it work right
22:43 < Omnivore> right sorry :)
22:44 < kevlar> you're a lot more likely to get other people to think "Oh,
hey, I know how to do that!" when it's for a long-term solution
22:44 < Omnivore> instinctive response from having worked on too many legacy
projects
22:44 < kevlar> yeah, or languages like C and C++ where the language just
isn't evolving.
22:44 < kevlar> (C++0x might as well be a new language)
22:44 < Omnivore> or D where its a glacier
22:45 < kevlar> haha, I haven't dealt with it
22:45 < kevlar> but a coworker of mine evangelizes about it obsessively just
to piss people off, so I don't think I ever will :)
22:46 < Omnivore> its interesting, has theoretical promise but practically
imo bound by upper management to fade away
22:46 < aiju> D is an attempt to "fix C++"
22:47 -!- boscop_ [~boscop@f055169159.adsl.alicedsl.de] has quit [Ping timeout:
250 seconds]
22:48 -!- aaronblohowiak [47c606a4@gateway/web/freenode/ip.71.198.6.164] has quit
[Quit: Page closed]
22:48 < kevlar> just based on what this coworker says, it seems like they
take the opposite direction that Go does: take every feature and make it a
language feature so you can choose which you need
22:50 < Omnivore> that and alot of (optional?) restrictions to protect
programmers from themselves
22:50 < aiju> doesn't compile between 0:00 and 5:00?
22:50 < Omnivore> question mark there because I haven't been tracking their
'pure' implementation for a few years
22:50 < kevlar> rofl.
22:50 < aiju> to give the programmer some time to sleep
22:50 < Omnivore> hehehe
22:51 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the
connection]
22:51 < kevlar> the more useful one would be: doesn't compile between 12-13,
18-19, and 3-6 to give the programmer time to eat and nap.
22:51 < aiju> haha
22:51 -!- boscop [~boscop@unaffiliated/boscop] has joined #go-nuts
22:51 < aiju> who needs 1 hour to eat?
22:51 < aiju> except french people
22:51 < jlaffaye> bleh!
22:52 < Omnivore> eh eat at the keyboard, just buy a new one every few
months when the crumbs clog it up too much
22:52 -!- Tv_ [~Tv_@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
22:52 < kevlar> jlaffaye: rofl.  were you idling or do you highlight on
"french"
22:53 < kevlar> (or eat?)
22:53 < jlaffaye> ;)
22:53 < kevlar> (I should highlight on eat; it would make the conversations
I participate in WAY more fun)
22:53 < aiju> 00:58 [ZNC] -!- ircname : Julien Laffaye
22:53 < aiju> seems french to mr
22:53 < jlaffaye> I read but stay quiet most of the time
22:53 < aiju> *me
22:55 < Omnivore> well its either read the go-nuts channel or face what my
xml editor is telling me...  someone has embedded common lisp in an xml
document...
22:55 < kevlar> oh lord.
22:55 < kevlar> just in case you have trouble finding closing tags, now you
have to find closing parenthesis!
22:56 < aiju> find -name '*.xml' -exec rm '{}' ';'
22:56 < aiju> the path to sanity
22:56 < Omnivore> hehehe
22:56 < jlaffaye> aiju: it is
22:57 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
22:58 < Omnivore> I think my first real go project will be to rewrite that
app, unforunately have to wait for some advances yet
22:59 * aiju is currently finding an error buried very deeply in pages of hex
23:03 < brandini> Anyone ever do any thing for yubikey's in go?
23:04 -!- Tv_ [~Tv_@cpe-76-168-227-45.socal.res.rr.com] has left #go-nuts []
23:04 -!- Tv_ [~Tv_@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
23:05 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 246 seconds]
23:07 -!- robteix [~robteix@host40.201-253-152.telecom.net.ar] has joined #go-nuts
23:08 < Omnivore> https://github.com/andradeandrey/Go-Yubikey
23:18 -!- Tv_ [~Tv_@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout:
255 seconds]
23:35 < brandini> I guess that answers my question!
23:35 < brandini> I did not find that during my initial investigation
23:36 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
23:36 < brandini> Omnivore: is there an auth server as well?
23:38 -!- wrtp [~rog@92.30.183.6] has quit [Quit: wrtp]
23:41 -!- ajstarks [~ajstarks@pool-173-54-115-34.nwrknj.fios.verizon.net] has
joined #go-nuts
23:41 -!- Baughn [~svein@2002:5965:d1f2::1] has quit [Ping timeout: 248 seconds]
23:50 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
23:51 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 276 seconds]
--- Log closed Sun Jun 05 00:00:53 2011