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

--- Log opened Wed May 18 00:00:50 2011
00:02 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
00:03 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 260 seconds]
00:07 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has quit [Quit:
Leaving.]
00:08 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
00:10 -!- dfr|bohconf [~dfr|work@host-12-159-175-242.bccexpo.com] has quit [Remote
host closed the connection]
00:15 -!- zaero [~eclark@2001:470:1f11:b82:697f:fb72:fe0a:4828] has quit [Ping
timeout: 264 seconds]
00:34 < jeremy_c> well, that didn't take as long as I expected, I am now no
longer using *Ihandle receivers.
00:35 < skelterjohn> what solution did you end up using?
00:36 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
00:37 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
00:39 < jeremy_c> turning everything into functions not methods acting on a
receiver.
00:40 < jeremy_c> that enables my optional libraries to act just like any
other function and use the Ihandle type w/o issue.
00:40 < hallas> https://github.com/hallas/go-lightcycles !
00:40 -!- dfr|mac [~dfr|work@host-12-159-175-242.bccexpo.com] has joined #go-nuts
00:40 < hallas> Very simple and stupid :-) but fun
00:42 < jeremy_c> I keep hitting the wrong key doing a 180 which is an
immediate crash.
00:42 -!- tncardoso [~thiago@189.59.160.82] has quit [Quit: bye]
00:42 < hallas> yes dont turn your bike on your self ;D
00:44 < hallas> if you got a really big screen you can keep going for an
hour xD
00:44 < jeremy_c> So you're saying 18 seconds on 3840x1080 isn't very good?
00:45 < hallas> hahaha, no thats rather bad I'd say
00:45 < hallas> I did 78 seconds on my 1920 x 1080
00:45 < skelterjohn> i thought draw/x11 only had one sized window
00:45 < jeremy_c> skelterjohn:
https://github.com/jcowgar/go-iup/compare/master...split-into-packages
00:47 < nteon> im looking through the goland source, and it looks like the c
source code is using unicode identifiers?!?  (src/pkg/runtime/malloc.h)
00:47 < jeremy_c> skelterjohn: I can resize the window in his game.
00:47 < nteon> s/goland/go/
00:47 < hallas> jeremy_c: but it doesnt draw beyond anyway
00:47 < Namegduf> nteon: It's compiled with 6c
00:47 < skelterjohn> clearly i am wrong :)
00:47 < jeremy_c> ah, I see that now.
00:47 < skelterjohn> but maybe it's recent
00:47 < hallas> skelterjohn: nope
00:47 < skelterjohn> oh
00:47 < hallas> 101 secs!  not even trying
00:48 < hallas> next version might feature some boundaries and evil enemy
light cycles ;-)
00:48 < nteon> Namegduf: hah, i see now that it includes 6c in the repo
00:48 < nteon> interesting
00:49 < hallas> Alright, good night to everyone
00:50 -!- bombuzal [~bombuzal@unaffiliated/bombuzal] has quit [Read error:
Connection reset by peer]
00:51 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has left
#go-nuts []
00:57 -!- cenuij [~cenuij@237.129.26.93.rev.sfr.net] has joined #go-nuts
00:57 -!- cenuij [~cenuij@237.129.26.93.rev.sfr.net] has quit [Changing host]
00:57 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
00:58 -!- dfr|mac [~dfr|work@host-12-159-175-242.bccexpo.com] has quit [Ping
timeout: 240 seconds]
00:59 -!- l00t [~i-i3id3r_@189.105.64.96] has joined #go-nuts
01:01 -!- iant [~iant@67.218.110.18] has quit [Ping timeout: 240 seconds]
01:02 -!- ab3 [~abe@83.101.90.66] has quit [Ping timeout: 240 seconds]
01:02 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
01:05 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
01:08 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
01:11 -!- ab3 [~abe@83.101.90.66] has joined #go-nuts
01:11 -!- twopoint718 [~chris@fsf/member/twopoint718] has quit [Ping timeout: 240
seconds]
01:12 < chomp> array copies, how do?
01:13 < Namegduf> copy()
01:13 < chomp> nevermind :) documentation ftw
01:13 < chomp> and thanks
01:16 < chomp> ah, don't suppose there's a concise way of copying a slice of
one type to a slice of another..  boo.
01:16 < chomp> they're both uint8's but one is from C
01:17 -!- musicMonster [~musicMons@c-98-247-221-98.hsd1.wa.comcast.net] has joined
#go-nuts
01:18 < Namegduf> chomp: Different types can be different sizes.
01:18 < Namegduf> And have different representations.
01:18 < Namegduf> Have to copy per element, sorry.
01:18 < chomp> yep, makes sense
01:19 < exch> chomp: if the C version is of type unsigned char*, you can use
some unsafe voodoo: myslice :=
(*(*[1<<31-1]byte)(unsafe.Pointer(&myCptr)))[:expectedlength]
01:19 < musicMonster> can someone help me, i would really like to get go
installed on my ubuntu, but i cant get it to work.  When i try 6g file.go it says
6g command not found.
01:20 -!- boscop_ [~boscop@g227147115.adsl.alicedsl.de] has joined #go-nuts
01:20 < chomp> nah, it's termios stuff.  an array of type cc_t, which is
just a byte
01:20 < chomp> but that does look sufficiently evil to be worth remembering
01:20 < exch> if it's one byte per element, you could try that approach
01:20 < exch> no guaantees though :p
01:20 < exch> *guarantees
01:21 < chomp> i've already done a fair share of evil unsafe pointer math :)
trying to avoid it in all but the most dire cases
01:22 < exch> probably a wise choice :p
01:22 < dfc> musicMonster: is $GOROOT/bin in your path ?
01:22 -!- boscop [~boscop@g227144043.adsl.alicedsl.de] has quit [Ping timeout: 246
seconds]
01:22 < chomp> my pam wrapper provides a function to get the results of
pam_getenvlist into a map[string]string from the null-terminate array of char*s
that pam returns.  it's fugly.
01:23 < Namegduf> You really should just use the C.GoString() function.  :P
01:23 < chomp> i do, but you see it's a list of strings
01:24 < chomp> so i walk the buffer using a uintptr, then use c.GoString on
the cast unsafe pointer at each element
01:25 -!- xash [~xash@d003120.adsl.hansenet.de] has quit [Quit: Lost terminal]
01:28 < chomp> heh so, anyone use vim perchance?
01:29 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Quit: Venom_X]
01:29 < str1ngs> I use vim
01:30 <@adg> yes i do
01:30 -!- musicMonster [~musicMons@c-98-247-221-98.hsd1.wa.comcast.net] has quit
[Quit: #go-nuts]
01:30 * dfc raises hand
01:30 < chomp> do you happen to know which option causes it to sporadically
unindent lines when a : is typed (i.e.  when typing "foo := whatever")
01:30 <@adg> are you using the vim stuff in misc?
01:30 < chomp> i am
01:31 <@adg> because i think it has been updated recently
01:31 < chomp> hrm
01:31 < chomp> will check
01:31 < chomp> ah indent has been added, nice!
01:31 <@adg> it previously used the c indent code with some options, but now
it has its own indent function
01:31 < chomp> thanks, i didn't even think to check for a new version of it
01:31 <@adg> let me know how you go with that
01:31 <@adg> (i don't use smartindent myself)
01:32 < chomp> it seems to often create more problems than it solves
01:32 < chomp> ah, hmm nah.  guess i had a symlink setup already so it's up
been up to date
01:32 < chomp> sadly turning off smartindent doesn't stop this from
happening
01:36 < chomp> aye, ok i get it.  it is cindent's fault and i guess the
indent options from go.vim are still using mostly cindent settings
01:36 < chomp> ohhhh well.
01:38 -!- gtaylor [~gtaylor@97-95-231-85.dhcp.sffl.va.charter.com] has joined
#go-nuts
01:38 -!- twopoint718 [~chris@fsf/member/twopoint718] has joined #go-nuts
01:40 -!- dfr|mac [~dfr|work@host-12-159-175-242.bccexpo.com] has joined #go-nuts
01:42 <@adg> hmm really?
01:48 -!- kr [~Keith@204.14.152.118] has quit [Ping timeout: 240 seconds]
01:48 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
01:51 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has joined
#go-nuts
01:51 -!- dfr|mac [~dfr|work@host-12-159-175-242.bccexpo.com] has quit [Remote
host closed the connection]
01:58 -!- twopoint718 [~chris@fsf/member/twopoint718] has quit [Ping timeout: 276
seconds]
02:00 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
02:01 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
02:02 -!- ExsysHost [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has joined
#go-nuts
02:04 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has quit
[Ping timeout: 240 seconds]
02:05 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
02:13 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit []
02:15 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
02:16 -!- zaero [~eclark@2001:470:1f11:b82:d525:c609:ae9e:3de] has joined #go-nuts
02:17 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Client Quit]
02:19 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
02:20 -!- milkline [~chatzilla@218.240.155.99] has joined #go-nuts
02:24 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has left #go-nuts
["Leaving"]
02:26 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
02:27 -!- mode/#go-nuts [+v iant] by ChanServ
02:29 -!- keithgcascio [~keithcasc@nat/google/x-trubcwgemlmfdsqd] has quit [Quit:
Leaving]
02:33 -!- tav [~tav@92.7.129.170] has quit [Ping timeout: 248 seconds]
02:35 -!- Ekspluati [5b9c45fc@gateway/web/freenode/ip.91.156.69.252] has quit
[Quit: Page closed]
02:38 -!- tav [~tav@92.7.109.93] has joined #go-nuts
02:42 -!- ucasano [~ucasano@host185-90-static.5-79-b.business.telecomitalia.it]
has joined #go-nuts
02:46 -!- dfr|mac [~dfr|work@173-166-160-241-washingtondc.hfc.comcastbusiness.net]
has joined #go-nuts
02:56 < chomp> so there's no way to reliably fork in go is there
02:57 < chomp> i mean there's ForkExec, but i can't simply fork into two Go
processes
02:58 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Quit:
Linkinus - http://linkinus.com]
03:00 -!- pearle [~pearle@blk-224-181-222.eastlink.ca] has quit [Ping timeout: 246
seconds]
03:03 -!- ucasano [~ucasano@host185-90-static.5-79-b.business.telecomitalia.it]
has quit [Ping timeout: 260 seconds]
03:03 -!- ucasano_ [~ucasano@host185-90-static.5-79-b.business.telecomitalia.it]
has joined #go-nuts
03:22 -!- sunfmin [~sunfmin@115.238.44.108] has joined #go-nuts
03:24 < manveru> chomp: you shouldn't have to
03:25 < manveru> hm
03:25 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
03:25 < chomp> well, i'm implementing a library to support common terminal
functionality.  one of the functions is to fork and exec with a pty slave as the
controlling terminal
03:25 < chomp> for e.g.  a shell daemon
03:26 < chomp> but it turns out that StartProcess is sufficient and i don't
need to fork a new Go process
03:26 < chomp> makes for a slightly less elegant interface, but it'll do
03:27 -!- onats_ [7c693e8e@gateway/web/freenode/ip.124.105.62.142] has joined
#go-nuts
03:27 < onats_> hey
03:27 < onats_> so go is like a C/C++ that is easier to use?
03:27 < chomp> not really, no
03:28 < onats_> chomp, in a nutshell?
03:28 < manveru> onats_:
file:///media/5aa926fe-5a69-4419-96eb-a2b9d8f4fb4a/backup/iota/home/home/manveru/slice_replication.rb
03:28 < manveru>
file:///media/5aa926fe-5a69-4419-96eb-a2b9d8f4fb4a/backup/iota/home/home/manveru/ticker.rb
03:28 < manveru>
file:///media/5aa926fe-5a69-4419-96eb-a2b9d8f4fb4a/backup/iota/home/home/manveru/transcript_fancy.txt
03:28 < manveru> damn
03:28 < manveru> http://golang.org/doc/go_for_cpp_programmers.html
03:28 < chomp> its syntax is superficially similar to C in some ways, but
it's very different
03:28 < skelterjohn> not in a nutshell either
03:28 < manveru> i meant
03:28 < chomp> lol
03:28 < onats_> its not a web framework right?
03:28 < manveru> no
03:28 < skelterjohn> nope
03:28 < skelterjohn> it's a language
03:28 < manveru> php is a web framework :)
03:28 < chomp> no it's a language and you can read about it at
http://golang.org/
03:28 -!- benjack [~benjack@bb119-74-177-100.singnet.com.sg] has joined #go-nuts
03:29 < chomp> including the specification, which is relatively brief and
should give you a good idea of what it's like
03:29 < sunfmin> anybody using web.go?
03:29 -!- ucasano_ [~ucasano@host185-90-static.5-79-b.business.telecomitalia.it]
has quit [Quit: ucasano_]
03:29 < manveru> onats_: what languages do you know already?
03:29 < skelterjohn> sunfmin: i have used it
03:30 < sunfmin> normally how you arrange files (templates, models, etc)
when using web.go?
03:30 < skelterjohn> well, i made something up
03:30 < skelterjohn> :)
03:30 < skelterjohn> i put all my templates in a directory
03:30 < skelterjohn> it might have been called "templates", but i don't
remember
03:30 < skelterjohn> i am certainly not a source for convention or standard
practices, sorry
03:31 < chomp> obviously a much more sane name for that directory would have
been "bananas" or "jupiter"
03:32 < sunfmin> where to put global object code ? like database connection
03:32 < sunfmin> Or memcache instance
03:33 < skelterjohn> i had a directory for source code, too
03:33 < skelterjohn> but i didn't call it src
03:34 -!- onats_ [7c693e8e@gateway/web/freenode/ip.124.105.62.142] has quit [Ping
timeout: 252 seconds]
03:35 < sunfmin> alright.  do you know any open source project that using
web.go?
03:35 < sunfmin> So that I can copy, ;-)
03:37 < skelterjohn> see who is watching web.go on github, and then look at
their projects
03:37 < sunfmin> cool.  good idea.
03:37 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
03:55 -!- cco3 [~conleyo@nat/google/x-roovyhdsclefumji] has quit [Ping timeout:
248 seconds]
03:58 -!- rcrowley [~rcrowley@ip67-90-234-94.z234-90-67.customer.algx.net] has
joined #go-nuts
03:59 -!- Soultake1 [~Soultaker@hell.student.utwente.nl] has joined #go-nuts
04:05 -!- angasule [~angasule@190.2.33.49] has quit [Remote host closed the
connection]
04:05 -!- Netsplit *.net <-> *.split quits: dirthead, mpl, ukai_, Soultaker,
ab3, xb95, ampleyfly, rejb, prip, sunfmin
04:06 -!- dfr|mac [~dfr|work@173-166-160-241-washingtondc.hfc.comcastbusiness.net]
has quit [Remote host closed the connection]
04:08 -!- rejb [~rejb@p4FD752B6.dip.t-dialin.net] has joined #go-nuts
04:08 -!- Netsplit over, joins: mpl, prip, sunfmin, ab3, xb95, dirthead,
ampleyfly, ukai_
04:08 -!- cco3 [~conleyo@nat/google/x-oesjaqjafszdelna] has joined #go-nuts
04:11 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
04:14 -!- rejb [~rejb@p4FD752B6.dip.t-dialin.net] has quit [Disconnected by
services]
04:15 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:29 -!- gtaylor [~gtaylor@97-95-231-85.dhcp.sffl.va.charter.com] has quit [Quit:
gtaylor]
04:29 -!- ctimmerm [~ctimmerm@cs181050011.pp.htv.fi] has joined #go-nuts
04:32 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 276 seconds]
04:35 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 260
seconds]
04:39 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Ping timeout: 258 seconds]
04:41 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
04:54 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts
05:02 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
05:18 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 250
seconds]
05:25 < taruti> Is the GC ok with pointers into parts of an object?
05:26 < edsrzf> taruti: Yes, it should be
05:28 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
05:30 < skelterjohn> what do you mean "ok with"?
05:30 < skelterjohn> ah, yes.
05:30 < skelterjohn> i'm sure it is.
05:31 < cbeck> It is.
05:33 -!- photron [~photron@port-92-201-14-197.dynamic.qsc.de] has joined #go-nuts
05:33 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
05:36 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has joined
#go-nuts
05:38 -!- musicmonster_ [~musicmons@c-98-247-221-98.hsd1.wa.comcast.net] has
joined #go-nuts
05:40 -!- ctimmerm [~ctimmerm@cs181050011.pp.htv.fi] has quit [Ping timeout: 246
seconds]
05:41 < musicmonster_> does anyone know how to correctly add a directory to
$PATH?
05:42 < musicmonster_> trying to add /home/go/bin
05:42 < skelterjohn> what OS?
05:42 < skelterjohn> probably linux
05:42 < musicmonster_> ubuntu
05:42 < skelterjohn> in .bashrc
05:42 < skelterjohn> add the following line
05:42 < skelterjohn> export PATH = $PATH:/home/go/bin
05:42 < musicmonster_> well i tried /etc/environment but it messed up could
not login
05:43 < skelterjohn> ~/.bashrc
05:43 < skelterjohn> if you wanted to edit a file in etc (so all users would
have it in their path) i think it might be /etc/profile
05:43 < musicmonster_> skelterjohn: awesome thank
05:43 < musicmonster_> you
05:44 < skelterjohn> don't edit /etc/profile
05:44 < skelterjohn> that's not the right one
05:44 -!- tux21b [~tux21b@chello213047047175.3.graz.surfer.at] has joined #go-nuts
05:44 < musicmonster_> kk
05:45 < skelterjohn> you can edit /etc/bash.bashrc
05:46 < skelterjohn> remember to also set GOROOT=/home/go
05:46 < musicmonster_> so im doing export PATH = $PATH:/home/go/bin in
~/.bashrc see if that works
05:46 < skelterjohn> musicmonster_: remember that once you do that, you'll
have to start a new shell for it to take effect
05:47 < musicmonster_> oh perfect ya thanks i always forget that
05:47 < tux21b> you can also do ".  ~/.bashrc"
05:47 < tux21b> (instead of restarting)
05:48 < chomp> for what it's worth, you don't need to export from bashrc,
the environment is kept
05:49 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
05:49 -!- ExsysHost [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has quit
[Read error: Connection reset by peer]
05:50 < milkline> hi, does anyone can help me solve issue 1843 on go-lang
project page?
05:51 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has quit [Ping timeout: 260
seconds]
05:51 < milkline> this is the address
:http://code.google.com/p/go/issues/detail?id=1843&colspec=ID%20Status%20Stars%20Priority%20Owner%20Reporter%20Summary
05:51 -!- Paradox924X [~Paradox92@c-68-35-229-34.hsd1.fl.comcast.net] has joined
#go-nuts
05:51 <@adg> milkline: lookin gnow
05:51 <@adg> milkline: don't go anywhere :)
05:52 < musicmonster_> isnt goroot already set by default?
05:52 < milkline> ?sorry?
05:52 <@adg> milkline: what version of gcc?
05:52 < milkline> 4.6
05:53 <@adg> hmm
05:53 < skelterjohn> musicmonster_: how would it be set by default?
05:53 < skelterjohn> the go installer won't modify your .bashrc
05:53 < milkline> 4.6.0 20110513 (prerelease) (GCC)
05:53 -!- rcrowley [~rcrowley@ip67-90-234-94.z234-90-67.customer.algx.net] has
quit [Remote host closed the connection]
05:54 < musicmonster_> well when run makefile
05:54 < chomp> goroot can be inferred by go tools afaik, but it won't
actually modify your login environment
05:54 < musicmonster_> ahh ok
05:54 < skelterjohn> gomake is a script that sets goroot and then runs
regular make
05:56 < skelterjohn> and apparently runtime.GOROOT() will use that from
which it was built if it's not set in an env var
05:56 -!- dfr|mac [~dfr|work@173-166-160-241-washingtondc.hfc.comcastbusiness.net]
has joined #go-nuts
05:56 -!- Paradox924X [~Paradox92@c-68-35-229-34.hsd1.fl.comcast.net] has quit
[Changing host]
05:56 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has joined #go-nuts
05:57 <@adg> milkline: what appears at like 5203 in ~/go/src/cmd/gc/y.tab.c
?
05:58 < skelterjohn> lol
05:59 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has quit [Quit:
wallerdev]
06:00 < milkline> line 5203 is a function, "yyerror (yymsgp);"
06:01 <@adg> huh, can you grep for yymsgp ?
06:01 <@adg> what version are you running?  (hg identify)
06:01 < milkline> grep from which command?
06:02 < milkline> e1e194eb5c8e (release-branch.r57)
06:02 < chomp> so i mean it seems to me that the problem is the declaration
of yyerror(chast *fmt, ...)
06:03 < chomp> in go.h
06:03 < chomp> and that's char *fmt...  bad keyboard, bad.
06:03 < chomp> should take a const char*
06:03 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-181-139.clienti.tiscali.it] has
joined #go-nuts
06:03 < skelterjohn> question is why no one else gets the issue
06:04 < chomp> that is a mighty fine question
06:04 <@adg> yes, it's a newer gcc than i have on any of my machines
06:04 <@adg> i'm just searching to see if we've had other issues
06:04 <@adg> i know we turned -Werror on recently
06:05 <@adg> milkline: cd ~go/src/cmd/gc && grep yymsgp *
06:05 < kevlar> Morning, people
06:06 < kevlar> oh, not quite that late, yet.  Evening, then ;-).  Except
for you aussies.
06:06 < chomp> it's not an error in gcc 4.4, though that surprises me.  it
shouldn't be legal to implicitly cast a const char* up to a char*
06:07 < milkline> i'm running the command please wait a moment
06:08 -!- tux21b [~tux21b@chello213047047175.3.graz.surfer.at] has quit [Ping
timeout: 248 seconds]
06:09 < milkline> grep yymsgp [space] * or yymsgp*?
06:09 < kevlar> with a space
06:09 < milkline> got nothing
06:09 < kevlar> the * is to match all files
06:11 < musicmonster_> hey i finaly got go working!  thank you guys!
06:12 <@adg> milkline: space
06:12 < milkline> i typed space
06:12 < milkline> but got nothing
06:12 <@adg> milkline: < milkline> line 5203 is a function, "yyerror
(yymsgp);"
06:12 <@adg> milkline: is that a typo there?
06:12 < milkline> no file include this
06:12 <@adg> milkline: i guess it should be yymsg
06:13 < kevlar> my y.tab.c doesn't even have that many lines...
06:13 < milkline> not a typo i think
06:13 < chomp> this is a gcc 4.6 bug
06:14 < chomp> it's pretty straightforward
06:14 < chomp> though i don't know for sure if it's a gcc 4.6 bug or if gcc
4.6 is the only c compiler i've ever seen get it right
06:14 <@adg> it might be that gcc 4.6 now warns about this, where it didn't
before
06:14 < chomp> it does, and it didn't
06:15 < kevlar> it didn't warn about passing const char * to char *?
06:15 < chomp> nope.
06:15 < milkline> should i change yymsgp to yymsg
06:15 < kevlar> I am almost certain that it did
06:15 < chomp> well, i can tell you for sure that 4.4 doesn't
06:15 < kevlar> I taught C for four years and showed them the error every
year
06:16 < chomp> regression perhaps?
06:17 <@adg> milkline: i've cc'd some more knowledgeable people to the bug.
they're asleep now, but should be able to help within a day or so.
06:18 < kevlar> const.c: In function ?main?:
06:18 < kevlar> const.c:9: warning: passing argument 1 of ?blah?  discards
qualifiers from pointer target type
06:18 < kevlar> kyle@strategos /tmp/c $ gcc --version
06:18 < kevlar> i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc.  build
5666) (dot 3)
06:18 < milkline> ok, thank you guys
06:18 <@adg> milkline: in the mean time, you can try removing this line "
-Werror \
06:18 <@adg> " from ~go/src/quietgcc.bash and running make.bash again
06:18 < kevlar> I don't even need -Wall or -Werror to get the error.
06:18 < chomp> fwiw kevlar: http://pastebin.com/qVQD0su7 produces no warning
with -Wall when fed to gcc 4.4.5
06:18 -!- dfr|mac [~dfr|work@173-166-160-241-washingtondc.hfc.comcastbusiness.net]
has quit [Remote host closed the connection]
06:18 < kevlar> er, the warning*
06:18 <@adg> milkline: that should let you build, even with the warning
06:19 < kevlar> ah, well chomp, in ANSI C, a "" is NOT a const char *
06:19 < chomp> interesting.
06:19 <@adg> const is terrible
06:20 < chomp> so then is the problem that gcc 4.6 -is- treating "" as a
const char*, i wonder
06:20 < kevlar> chomp: try with -ansi
06:21 < chomp> yeah i can reproduce the error in 4.4 given this new
knowledge
06:21 < kevlar> I agree that it SHOULD be a const char *, but that's never
been the case before.
06:22 < chomp> well i learned something new today :)
06:22 < kevlar> That would probably remove ~10% of the errors that made my
students give up on C because they couldn't get their second or third homework
assignment working.
06:22 < chomp> i've been writing C code for what, i dunno.  15 years?
06:22 < kevlar> chomp: I never stop learning things about C.
06:23 < kevlar> Though it turns out that I never learned things about it
faster than I did while I was teaching it.
06:23 < kevlar> adg: I even learned stuff about Go in your little
introduction lab, lol, and I've been programming it for quite awhile now...
06:23 < kevlar> actually, I guess it was from your narrative during the
lecture, but that's not the point.
06:26 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
06:27 -!- kosta [~Adium@krlh-4d021d68.pool.mediaWays.net] has joined #go-nuts
06:27 < kosta> Hi all!
06:27 < kevlar> sup.
06:27 < kosta> Is it possible to do cyclic dependencies in go?
06:28 <@adg> kevlar: oh?  you were there?
06:28 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has quit [Ping timeout: 246
seconds]
06:28 < kevlar> adg: Sorry, during the practice session
06:28 < kosta> like package a imports package b and b imports a?
06:28 < kevlar> I wish I was there at I/O.
06:28 < kevlar> kosta: not nicely, no
06:28 <@adg> kevlar: oh right, cool!
06:28 < kosta> kevlar: oh, ok
06:28 <@adg> kevlar: glad you weren't; the rooms were packed solid at i/o.
it was great
06:28 < kevlar> either move the common pieces into a third package or merge
the two
06:29 < kevlar> adg: that's awesome news!  How many TT requests have we
gotten?
06:29 <@adg> kevlar: >250
06:29 < kevlar> Not too shabby
06:29 < kevlar> do we track SDK downloads?
06:29 <@adg> i assume so, haven't looked though
06:30 <@adg> our docs got a lot of views though
06:30 -!- Paradox924X [~Paradox92@c-68-35-229-34.hsd1.fl.comcast.net] has joined
#go-nuts
06:30 < kevlar> I've found Go on AppEngine to be a surprisingly nice web
backend
06:30 < kosta> is it possible to cast one of multiple return values?
06:30 < kevlar> I use JQuery on the frontend and Go on the backend.
06:30 < kevlar> kosta: nope
06:31 < kosta> hm :(
06:31 < skelterjohn> kosta: why do you need to?
06:31 < skelterjohn> just use an intermediate variable
06:31 < kevlar> I once idly wondered if we should allow
(type1,type2)(var1,var2) casting, but decided it was horribly nasty.
06:31 < kosta> skelterjohn: yeah I wanted to get rid of the intermediate var
06:31 < skelterjohn> why?
06:32 < skelterjohn> it makes everything clear
06:32 < skelterjohn> presumably if you don't want intermediate vars for a
multi-return you are ignoring all but one of them (so you can pass it to a
function call)
06:32 < kevlar> with the exception of the math libraries, I very seldom find
my self casting return values or parameters
06:32 -!- Paradox924X [~Paradox92@c-68-35-229-34.hsd1.fl.comcast.net] has quit
[Changing host]
06:32 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has joined #go-nuts
06:32 < skelterjohn> doing _, _, x, _ = foo() makes it clear that you're
ignoring 3/4 of the returns
06:34 -!- danilo04 [~danilo04@rm2348358874.student.rit.edu] has quit [Read error:
Operation timed out]
06:34 < |Craig|> I keep thinking of stilly things go could add to allow
in-lining more of that kind of thing, then realizing that using existing features
(more lines and variables) would be better anyway.
06:34 < chomp> this obviously should looks like: foo,err ~ ([]byte,_) :=
bar()
06:35 < chomp> the ~ operator symbolizes hand waving
06:35 < kevlar> lol
06:35 * kevlar has a stroke
06:35 < kevlar> Magic makes me sad.
06:35 < kevlar> It has no place in a programming language.
06:35 < kevlar> This is why I don't like Python.
06:35 < chomp> oh i suppose puppies make you sad too.
06:35 < kevlar> yeah, I'm totally a cat person.
06:35 < chomp> :p
06:36 -!- fvbommel [~fvbommel_@86.86.15.250] has quit [Ping timeout: 252 seconds]
06:37 -!- kosta [~Adium@krlh-4d021d68.pool.mediaWays.net] has quit [Quit:
Leaving.]
06:40 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
06:43 -!- zaero [~eclark@2001:470:1f11:b82:d525:c609:ae9e:3de] has quit [Ping
timeout: 264 seconds]
06:44 -!- ExtraSpice [XtraSpice@78-57-204-104.static.zebra.lt] has joined #go-nuts
06:45 -!- huin [~huin@91.85.171.238] has joined #go-nuts
06:49 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
06:51 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has joined
#go-nuts
06:52 < milkline> sorry to interrupt you
06:52 < milkline> when i remove the -Werror \
06:52 < milkline> it said gcc:fatal error:no input files
06:54 -!- ExsysHost [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has joined
#go-nuts
06:54 < chomp> don't remove the \
06:54 < chomp> just the -Werror
06:54 < chomp> the \ is important, it continues the command on the next line
:)
06:55 < chomp> unless you deleted the entire line, then you should be ok
06:55 < chomp> blanking the line would break though
06:56 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has quit
[Ping timeout: 260 seconds]
06:57 < milkline> yes i deleted the entire line
06:58 < milkline> but now i insert the \, it seems ok now
07:01 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
07:14 -!- gregschlom [~quassel@187.118.210.62.te-dns.org] has joined #go-nuts
07:15 -!- kr [~Keith@c-24-5-193-165.hsd1.ca.comcast.net] has joined #go-nuts
07:18 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
07:22 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has quit [Read
error: Operation timed out]
07:27 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 260 seconds]
07:30 -!- Urmel| [~11087Urme@82-136-196-44.ip.telfort.nl] has quit [Ping timeout:
258 seconds]
07:30 -!- Urmel| [~11087Urme@82-136-196-44.ip.telfort.nl] has joined #go-nuts
07:33 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
07:37 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
07:37 -!- musicmonster_ [~musicmons@c-98-247-221-98.hsd1.wa.comcast.net] has quit
[Remote host closed the connection]
07:37 -!- fvbommel [~fvbommel_@dyn068154.nbw.tue.nl] has joined #go-nuts
07:38 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
07:41 -!- huin [~huin@91.85.171.238] has quit [Quit: leaving]
07:43 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
joined #go-nuts
07:44 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
07:44 -!- jemeshsu_ [~jemeshsu@bb119-74-88-105.singnet.com.sg] has joined #go-nuts
07:45 -!- jemeshsu [~jemeshsu@bb219-75-41-232.singnet.com.sg] has quit [Read
error: Connection reset by peer]
07:46 -!- bombuzal [~bombuzal@unaffiliated/bombuzal] has joined #go-nuts
07:47 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
07:47 -!- milkline [~chatzilla@218.240.155.99] has quit [Quit: ChatZilla 0.9.86.1
[Firefox 4.0.1/20110429133311]]
07:49 -!- fvbommel [~fvbommel_@dyn068154.nbw.tue.nl] has quit [Ping timeout: 276
seconds]
07:53 -!- aho [~nya@fuld-590c7b71.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
07:56 -!- fvbommel [~fvbommel_@dyn068154.nbw.tue.nl] has joined #go-nuts
07:57 -!- bombuzal [~bombuzal@unaffiliated/bombuzal] has quit [Quit: Leaving]
07:59 -!- wrtp [~rog@92.17.93.207] has joined #go-nuts
08:04 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has joined
#go-nuts
08:05 -!- mpl2 [~mpl@sd-18712.dedibox.fr] has joined #go-nuts
08:06 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
08:10 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:13 -!- nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has quit [Read
error: Operation timed out]
08:18 -!- bombuzal [~bombuzal@cpc5-newc14-2-0-cust836.gate.cable.virginmedia.com]
has joined #go-nuts
08:18 -!- bombuzal [~bombuzal@cpc5-newc14-2-0-cust836.gate.cable.virginmedia.com]
has quit [Changing host]
08:18 -!- bombuzal [~bombuzal@unaffiliated/bombuzal] has joined #go-nuts
08:24 -!- tvw [~tv@212.79.9.150] has quit [Ping timeout: 252 seconds]
08:24 -!- bombuzal [~bombuzal@unaffiliated/bombuzal] has quit [Quit: Leaving]
08:28 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has quit [Read error:
Connection reset by peer]
08:33 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has joined #go-nuts
08:37 -!- xulfer [~xulfer@cheapbsd.net] has joined #go-nuts
08:45 -!- kr [~Keith@c-24-5-193-165.hsd1.ca.comcast.net] has quit [Quit: WeeChat
0.3.4]
08:49 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
08:53 -!- boscop_ [~boscop@g227147115.adsl.alicedsl.de] has quit [Ping timeout:
246 seconds]
08:54 -!- boscop_ [~boscop@g227147115.adsl.alicedsl.de] has joined #go-nuts
08:58 -!- iva [~mt_ivanov@217.8.236.15] has joined #go-nuts
08:59 -!- mpl2 [~mpl@sd-18712.dedibox.fr] has quit [Quit: leaving]
08:59 -!- Ekspluati [5b9a0515@gateway/web/freenode/ip.91.154.5.21] has joined
#go-nuts
09:01 -!- iva [~mt_ivanov@217.8.236.15] has quit [Read error: Connection reset by
peer]
09:03 -!- wrtp [~rog@92.17.93.207] has quit [Ping timeout: 258 seconds]
09:08 -!- wrtp [~rog@92.17.69.16] has joined #go-nuts
09:11 -!- nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has joined #go-nuts
09:12 -!- KingPhilroy [~kingphilr@c-66-31-213-108.hsd1.ma.comcast.net] has quit
[Remote host closed the connection]
09:26 -!- Ekspluati [5b9a0515@gateway/web/freenode/ip.91.154.5.21] has quit [Ping
timeout: 252 seconds]
09:26 -!- xyproto [~alexander@77.40.159.131] has quit [Read error: Connection
reset by peer]
09:26 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
quit [Ping timeout: 260 seconds]
09:32 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
joined #go-nuts
09:36 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
quit [Client Quit]
09:37 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote
host closed the connection]
09:38 < uriel> yay spam *sigh*
09:39 -!- xyproto [~alexander@77.40.159.131] has joined #go-nuts
09:39 < vegai> https://github.com/michaelmacinnis/oh nice
09:39 < vegai> although I'm not sure about the objects
09:43 < wrtp> vegai: me neither.  it would be nice if it was actually
documented.
09:54 -!- Sebastian [~Sebastian@git.sebastianhahn.net] has quit [Disconnected by
services]
10:25 -!- virtualsue [~chatzilla@nat/cisco/x-ordwxogrkovpbzue] has joined #go-nuts
10:27 -!- benjack [~benjack@bb119-74-177-100.singnet.com.sg] has quit [Quit:
Leaving.]
10:49 -!- tmk [~TMKCodes@unaffiliated/tmkcodes] has joined #go-nuts
11:04 -!- mbohun [~mbohun@ppp115-156.static.internode.on.net] has joined #go-nuts
11:14 < uriel> ok, this spam shit is getting on my fucking nerves
11:16 -!- l00t [~i-i3id3r_@189.105.64.96] has quit [Quit: Leaving]
11:20 -!- sunfmin [~sunfmin@115.238.44.108] has quit [Quit: sunfmin]
11:20 < wrtp> have you tried sensodyne?
11:27 -!- alehorst [~alehorst@189.114.239.84.dynamic.adsl.gvt.net.br] has joined
#go-nuts
11:33 < manveru> given `func foo(args []string) string { a, ok := args[0];
if ok { return a } else { return "something else" }}`
11:34 < manveru> why does go tell me that `a, ok := args[0]` fails because
of "assignment count mismatch: 2 = 1"
11:34 < manveru> http://golang.org/doc/go_spec.html#Indexes says that `v, ok
:= a[x]` is valid...
11:35 < manveru> or is that only for maps?
11:35 < manveru> which would be very lame :P
11:35 -!- pearle [~pearle@blk-224-181-222.eastlink.ca] has joined #go-nuts
11:36 < wrtp> it's only for maps
11:36 < wrtp> it's not really lame :-)
11:36 < manveru> how is it beneficial?
11:37 < wrtp> if len(args) > 0 { return a[0] }
11:37 < wrtp> it's beneficial because it's an unnecessary feature.  it's
usually easier to test the length of the array
11:37 < wrtp> it's been discussed on the list a few times
11:38 < manveru> easier for whom?
11:38 -!- tncardoso [~thiago@150.164.2.20] has joined #go-nuts
11:38 < manveru> go checks it already, otherwise it wouldn't panic
11:39 < wrtp> by checking the length of the array, you can check several
index possibilities at once, whereas a, ok := ...  checks only one
11:40 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
11:40 < moraes> uriel, make 1st post moderated solves it.
11:40 < wrtp> quote from rob pike last june: "I accept the argument about
regularity but not the one about utility.  We talked about this design early on
and decided it didn't come up much, didn't help much when it did, and didn't
amortize the check across the indexes in a loop, say."
11:43 < xyproto> Anyone tried the "oh" shell?  I just installed it.
11:44 < wrtp> not yet
11:47 -!- tncardoso [~thiago@150.164.2.20] has quit [Quit: bye]
11:48 -!- tncardoso [~thiago@150.164.2.20] has joined #go-nuts
11:55 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Read error: Connection reset by peer]
11:55 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
11:56 -!- jstemmer [~cheetah@mrpwn.stemmertech.com] has joined #go-nuts
11:56 < jeremy_c> I have a function to convert an array of float64 to an
array of C.float's.  It's located in the package iup.  When using it other places,
however, I get a compile error: "cannot use xyz (type *iup._Ctype_float) as type
*_Ctype_float" ...  what is that all about?
12:02 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
12:03 < wrtp> jeremy_c: that's interesting.  can you paste some code that
demos the problem?
12:05 < jeremy_c> that's always the hard part...  taking a small section out
of a large library
12:07 < jeremy_c> Maybe I can show you the code instead?
https://github.com/jcowgar/go-iup/blob/split-into-packages/iup/common.go#L79 ---
definition,
https://github.com/jcowgar/go-iup/blob/split-into-packages/iup-pplot/pplot.go#L114
--- would be use it I could make it compile.
12:07 < jeremy_c> pplot.go use to be part of the iup package, it worked
great while in the iup package, but moving to it's own package results in the
above error.
12:09 < wrtp> jeremy_c: what line is the compile error on?
12:09 < wrtp> presumable line 114, yes?
12:09 < wrtp> s/able/ably/
12:10 -!- jarbox [~rovie@cpe-98-30-33-49.woh.res.rr.com] has joined #go-nuts
12:10 < wrtp> hmm, i see the problem
12:11 < wrtp> it doesn't treat C types as universal across packages
12:11 < wrtp> it would be easy to make a small piece of code that demoed the
problem
12:12 < wrtp> i think you should raise an issue
12:13 < jeremy_c> ok.
12:13 < wrtp> the basic problem is that "C" isn't a real package, so the
types that it defines are actually local to the current package
12:13 < jeremy_c> for now, though, I'll have to duplicate those functions
:-/
12:13 < wrtp> yeah.  if in doubt don't export any C types
12:14 < wrtp> (i may be wrong about my diagnosis, BTW - worth trying on a
small example)
12:15 < jeremy_c> I may post to the ML and see if someone has an idea.
12:16 < jeremy_c> Hm, a small example won't be too hard I guess.
12:17 < wrtp> just two packages, one with a function returning C.int and the
other assigning that returned value to a local C.int should do it
12:20 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
12:24 < jeremy_c> wrtp: yes, that exposes the problem.
12:25 < wrtp> cool
12:25 -!- dju [dju@fsf/member/dju] has quit [Quit: Quitte]
12:25 < wrtp> definitely worth an issue
12:26 < manveru> does ReadLine of bufio ignore leading \r\n ?
12:29 < wrtp> manveru: it will treat it as an end of line.  why would you
want it to be ignored?
12:30 < manveru> i don't _want_ to ignore it :)
12:31 -!- angasule [~angasule@190.2.33.49] has quit [Remote host closed the
connection]
12:32 < manveru> ok, fixed it...
12:32 < wrtp> in which case that's fine.  it won't (unless there's a bug,
which i doubt)
12:32 < manveru> somehow calling NewReader multiple times on the same
net.Conn seems to be a bad idea
12:32 * jeremy_c created http://code.google.com/p/go/issues/detail?id=1846
12:33 < manveru> but it was bad practice anyway, so yay :)
12:33 < wrtp> manveru: bufio buffers input, so one NewReader will consume
input beyond where you actually read to...
12:35 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 248 seconds]
12:37 -!- jarbox [~rovie@cpe-98-30-33-49.woh.res.rr.com] has quit [Quit: Ex-Chat]
12:38 < manveru> indeed
12:39 < manveru> i'm just rewriting this whole system because i got into a
mess with circular requires
12:39 < manveru> and i really don't wanna put everything into a single file
12:40 -!- Ekspluati [5b9a0515@gateway/web/freenode/ip.91.154.5.21] has joined
#go-nuts
12:54 -!- dfr|mac [~dfr|work@173-166-160-241-washingtondc.hfc.comcastbusiness.net]
has joined #go-nuts
12:54 -!- ucasano [~ucasano@host150-147-static.225-95-b.business.telecomitalia.it]
has joined #go-nuts
12:55 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 248 seconds]
12:56 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has joined
#go-nuts
12:57 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
12:57 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
13:00 -!- firwen [~firwen@adevlaptop.cern.ch] has joined #go-nuts
13:06 < wrtp> i need a good type name for a value that changes over time.
it has Set and (blocking) Get methods.  any ideas?
13:08 -!- TheMue [~TheMue@wlan-hotspot-011.ewe-ip-backbone.de] has joined #go-nuts
13:10 < mpl> doppelganger?
13:10 * mpl hides
13:13 < manveru> ValueWithSetAndBlockingGetMethods
13:14 < wrtp> currently it's called "Value" but it's really easy to be
confused with reflect.Value
13:14 < wrtp> and Value doesn't suggest a decent package name
13:14 < mpl> how about mutable then?
13:15 -!- tmk [~TMKCodes@unaffiliated/tmkcodes] has quit [Ping timeout: 252
seconds]
13:15 < wrtp> hmm, maybe.  although it's an interface, and some types
implement immutable values ...
13:15 < wrtp> well, one type does
13:15 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
13:16 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
13:17 < wrtp> the package can be found at rog-go.googlecode.com/hg/values
BTW
13:18 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-181-139.clienti.tiscali.it] has
quit [Read error: Connection reset by peer]
13:18 -!- dfr|mac [~dfr|work@173-166-160-241-washingtondc.hfc.comcastbusiness.net]
has quit [Remote host closed the connection]
13:20 < wrtp> maybe Box
13:21 < wrtp> although that doesn't evoke its time-varying nature
13:21 -!- gtaylor [~gtaylor@99-126-136-139.lightspeed.gnvlsc.sbcglobal.net] has
joined #go-nuts
13:21 < ww> aiju: you ever get anywhere with the backtracking/unification
prologesque stuff?
13:22 < aiju> not really
13:22 < ww> schade
13:22 < manveru> hm
13:23 < manveru> what's a nice way to design a channel that scans a list of
items with delay and pushes expired items?
13:23 -!- Ekspluati [5b9a0515@gateway/web/freenode/ip.91.154.5.21] has quit [Quit:
Page closed]
13:24 < wrtp> manveru: i'm not sure exactly what you mean.  a channel can't
scan anything - it's just a conduit.
13:24 < manveru> well, behind the channel :)
13:24 < wrtp> so you want to read expired items from the channel?
13:24 < manveru> yes
13:25 < manveru> but i don't really want to iterate the list every second
just to check
13:25 < wrtp> manveru: is it a big list?
13:25 < manveru> it can be
13:25 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
13:25 < wrtp> you could use a heap - that way you don't need a linear scan
13:26 < manveru> hm
13:26 < manveru> ah, by calculating their scheduled time beforehand?
13:26 < manveru> makes sense :)
13:26 < manveru> i could also just make it a normal vector then
13:27 < manveru> or a map, even
13:27 < wrtp> essentially, you've got to have some code doing the scan.  you
could have a goroutine that does for {sleep(1 second); while expired items { c
<- item; remove expired item }}
13:27 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
13:28 < wrtp> manveru: container/heap works best with a slice or vector
13:28 < wrtp> manveru: you might want to look at the implementation of
time.After, which does something similar
13:28 < manveru> i haven't seen it used with slice...
13:29 < wrtp> if you do it with a slice, you have to implement Swap, Push
etc methods yourself, which isn't actually much of a hassle
13:29 < wrtp> again, see time.After
13:29 < manveru> yeah, but then i could just gofmt container/vector and be
done with it
13:29 < wrtp> ?
13:30 < wrtp> do you mean "import" ?
13:30 < manveru> cat src/pkg/container/vector/vector.go | gofmt -r='Vector
-> ClientVector' | gofmt -r='interface{} -> Client' >| client/vector.go
13:30 < manveru> like that
13:31 < manveru> basically poor mans generics
13:31 -!- mbohun [~mbohun@ppp115-156.static.internode.on.net] has quit [Ping
timeout: 246 seconds]
13:31 < wrtp> why bother?  it's only like 4 or 5 lines of code to write the
methods yourself
13:32 < wrtp> and then you're not dependent on the layout of the go source
tree
13:32 < manveru> i only had to do this once
13:32 < manveru> anw, thanks :)
13:33 < wrtp> yeah, but you'll still have to implement Less yourself
13:33 < manveru> i did that too
13:33 < manveru> need a new one for the time stuff, but no biggie
13:33 < manveru> maybe by 2015 we'll get proper generics :)
13:34 < aiju> also, who cares?
13:36 -!- TheMue [~TheMue@wlan-hotspot-011.ewe-ip-backbone.de] has quit [Read
error: Connection reset by peer]
13:36 < ebering> so I just spent a few days wrestling with container/ring
trying to make it do what I want.  I think the issue is that containers are
structs and not interfaces
13:36 -!- TheMue [~TheMue@wlan-hotspot-011.ewe-ip-backbone.de] has joined #go-nuts
13:37 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
13:38 < wrtp> ebering: what do you want it to do?
13:38 < ebering> wrtp: be a polygon
13:38 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
13:38 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
13:39 < ebering> that also stores annotations about the symetries it has,
the colour it should have, and maybe other junk I haven't decided on
13:39 < ebering> maybe I'm just thinking about what I want my polygons to be
wrong
13:40 < ebering> anyhow why isn't a ring just something with Next() Prev()
SetNext() and SetPrev()?
13:40 < wrtp> ebering: why don't you just create a new struct type that has
the ring as a member
13:40 < wrtp> ?
13:40 < chomp> wrtp, how about Variant?
13:40 -!- iant [~iant@67.218.109.241] has joined #go-nuts
13:40 -!- mode/#go-nuts [+v iant] by ChanServ
13:40 < ww> ebering: no i think what you seem to be trying to do makes a lot
of sense (and translates directly to some of the geosparql/geordf stuff i'm
working on)
13:40 < chomp> (for your type name)
13:41 < ww> but what wrtp says is right i think when it comes to the
implementation details
13:41 < wrtp> chomp: i'm not sure about that.  a variant is usually a
singular thing, one version of something else.
13:41 < ebering> it may be that I am still writing with a thick functional
accent
13:41 < ww> you could, though it would be kludgy, put a struct in Value that
contains both a Point, and a pointer to a (shared) metadata struct
13:42 < chomp> ah, maybe i didn't understand the meaning
13:42 < ebering> ww: yea.  I see how I should do things now
13:42 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
13:42 < wrtp> ebering: Go doesn't do "being" much, except when it comes to
satisfying interfaces.
13:42 < chomp> how does the value change over time?
13:42 < wrtp> chomp: if you Set it, it changes
13:42 -!- zaero [~eclark@2001:470:1f11:b82:d873:8930:7204:b189] has joined
#go-nuts
13:42 < wrtp> and anyone waiting on a Get will see the change
13:43 < chomp> so Get blocks on Set.
13:43 < wrtp> yeah
13:43 < chomp> does Set block on Get as well?
13:43 < wrtp> no
13:43 < chomp> ah.
13:43 < wrtp> (and that's important)
13:44 < ww> the Rign is a bit of a funny thing whose name is a bit
misleading because it's really a RingElement that you can use to get to all other
elements (obviously)
13:44 < wrtp> it's not a channel.  many clients all calling Get will see the
same value.
13:44 -!- mbohun [~mbohun@ppp115-156.static.internode.on.net] has joined #go-nuts
13:44 < ww> the Ring itself is really the collection of all such elements
that are linked together
13:44 < ww> so you have nowhere obvious to point to the shared metadata
(except in a struct in Value)
13:45 < wrtp> ebering: to be honest, if i was implementing a polygon i'd
just use []image.Point
13:45 < wrtp> (perhaps as one member of a richer type)
13:45 -!- mehalelal [~mehalelal@76.103.175.11] has joined #go-nuts
13:45 -!- chomp [~chomp@c-67-186-35-69.hsd1.pa.comcast.net] has quit [Quit: brb]
13:45 < ww> yes, do you actually need the ring machinery?
13:46 < wrtp> depends on how much you do vertex insertion really.
13:46 < wrtp> and how many points in the polygon there might be.
13:46 < ww> right
13:47 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
13:47 -!- jbooth1 [~jay@209.249.216.2] has joined #go-nuts
13:54 -!- tmk [~TMKCodes@unaffiliated/tmkcodes] has joined #go-nuts
13:54 < ebering> yes, I'm dealing with polygon packing (special case where
it is tractable) and do lots of splicing to keep track of the boundary of the
un-covered region
13:56 < wrtp> in which case it sounds like a ring might be the right answer.
but you can hide it in your struct, then it's easy to change the representation
later if you need
13:56 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has joined #go-nuts
13:58 < ww> ^^ note the equivocal naming of Ring above...  an instance of
Ring is actually a point here, so the coordinates go in Value and i think, also a
pointer to the shared metadata
13:58 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
13:58 < ww> embedding Ring doesn't make as much sense as it might at first
blush i think
14:00 < ebering> yea
14:02 < skelterjohn> morning
14:03 -!- tmk [~TMKCodes@unaffiliated/tmkcodes] has quit [Ping timeout: 240
seconds]
14:06 -!- TheMue_ [~TheMue@wlan-hotspot-011.ewe-ip-backbone.de] has joined
#go-nuts
14:06 -!- TheMue [~TheMue@wlan-hotspot-011.ewe-ip-backbone.de] has quit [Read
error: Connection reset by peer]
14:07 -!- Venom_X [~pjacobs@66.54.185.131] has joined #go-nuts
14:09 -!- dfr|mac [~dfr|work@host-12-159-175-242.bccexpo.com] has joined #go-nuts
14:13 -!- gtaylor [~gtaylor@99-126-136-139.lightspeed.gnvlsc.sbcglobal.net] has
quit [Quit: gtaylor]
14:15 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
14:16 -!- niemeyer [~niemeyer@187.91.64.223] has joined #go-nuts
14:16 -!- Squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
14:19 -!- mbohun [~mbohun@ppp115-156.static.internode.on.net] has quit [Ping
timeout: 246 seconds]
14:20 -!- JimmyRcom [~jimmy@adsl-75-53-45-212.dsl.rcsntx.sbcglobal.net] has joined
#go-nuts
14:27 -!- tmk [~TMKCodes@unaffiliated/tmkcodes] has joined #go-nuts
14:30 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
14:30 -!- ucasano_ [~ucasano@151.12.47.139] has joined #go-nuts
14:32 -!- fvbommel [~fvbommel_@dyn068154.nbw.tue.nl] has quit [Ping timeout: 276
seconds]
14:33 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
14:33 -!- mbohun [~mbohun@ppp115-156.static.internode.on.net] has joined #go-nuts
14:34 -!- ucasano [~ucasano@host150-147-static.225-95-b.business.telecomitalia.it]
has quit [Ping timeout: 250 seconds]
14:34 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
14:35 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has joined
#go-nuts
14:37 -!- TheMue_ [~TheMue@wlan-hotspot-011.ewe-ip-backbone.de] has joined
#go-nuts
14:37 -!- TheMue [~TheMue@wlan-hotspot-011.ewe-ip-backbone.de] has quit [Read
error: Connection reset by peer]
14:38 -!- firwen [~firwen@adevlaptop.cern.ch] has quit [Remote host closed the
connection]
14:38 -!- ExsysHost [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has quit
[Ping timeout: 260 seconds]
14:38 -!- firwen [~firwen@adevlaptop.cern.ch] has joined #go-nuts
14:39 -!- firwen [~firwen@adevlaptop.cern.ch] has quit [Client Quit]
14:44 -!- virtualsue [~chatzilla@nat/cisco/x-ordwxogrkovpbzue] has quit [Read
error: Operation timed out]
14:49 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Read error: Operation
timed out]
14:50 -!- niemeyer [~niemeyer@187.91.64.223] has quit [Ping timeout: 240 seconds]
14:51 -!- virtualsue [~chatzilla@nat/cisco/x-praxvkprzsymbzbs] has joined #go-nuts
14:53 < gmilleramilar> Why does os.Time do an allocation?
http://pastie.org/private/8x9zjp86sqh3q2779zpa
14:53 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-181-139.clienti.tiscali.it] has
joined #go-nuts
14:53 < gmilleramilar> assuming there's no error, I dont understand
14:54 < skelterjohn> because you're taking the address of tv
14:54 < skelterjohn> if you ever take the address of a var, it is moved from
the stack to the heap
14:54 < jeremy_c> Why does my tweets sometimes appear on #golang search and
othertimes not?  http://twitter.com/#!/jcowgar ...  I used the #golang tag.
14:54 < skelterjohn> a future compiler could optimize this better
14:54 < gmilleramilar> ah, right.
14:56 -!- iant [~iant@67.218.109.241] has quit [Quit: Leaving.]
14:56 -!- mbohun [~mbohun@ppp115-156.static.internode.on.net] has quit [Quit:
Leaving]
15:04 -!- tncardoso [~thiago@150.164.2.20] has quit [Quit: bye]
15:05 -!- iant [~iant@216.239.45.19] has joined #go-nuts
15:05 -!- mode/#go-nuts [+v iant] by ChanServ
15:06 < mpl> jeremy_c: because the internet finds your tweets unimportant?
;P
15:06 < jeremy_c> I looked in the FAQs, twitters response is their servers
cannot possibly index every tweet, thus some will not appear!  What kinda garbage
is that!?
15:07 -!- TheMue_ [~TheMue@wlan-hotspot-011.ewe-ip-backbone.de] has joined
#go-nuts
15:07 -!- TheMue [~TheMue@wlan-hotspot-011.ewe-ip-backbone.de] has quit [Read
error: Connection reset by peer]
15:07 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
15:08 < mpl> haha
15:09 < TheMue> jeremy_c: My filter fetched your tweets with the tag.
15:10 < jeremy_c> TheMue: huh.
15:10 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Client Quit]
15:10 < ww> "partition tolerance"
15:10 < TheMue> jeremy_c: 36 and 16 minutes ago
15:10 < ww> e.g.  "partitions are just fine"
15:10 < TheMue> jeremy_c: go-iup an introduction
15:11 < ww> or "eventually consistent" as in lim (t -> inf)
15:11 -!- ExtraSpice [XtraSpice@78-57-204-104.static.zebra.lt] has quit [Ping
timeout: 276 seconds]
15:11 < aiju> jeremy_c: twitter is garbage
15:11 < aiju> nothing new
15:11 < jeremy_c> TheMue: I deleted/reposted adding some whitespace around
#golang, wondering if that was a problem.  Oh well.
15:12 < TheMue> Saving resources: Why should one search his own tweeds.
*smile*
15:13 < Namegduf> Vanity!
15:13 < jeremy_c> Wasn't searching my own, just noticed others popping up in
#golang which I read frequently and noticed mine was not.
15:14 < skelterjohn> i tend to think that twitter has a massive data task,
and they're doing the best they can
15:15 < Namegduf> On one hand, the outages, the weird disappearing
information, etc, seem meh
15:15 < Namegduf> On the other, I have no idea how to even start doing what
they're doing.
15:15 < skelterjohn> they should write the servers in go
15:16 < jeremy_c> It's a large portion in ruby, no?
15:16 < skelterjohn> omg
15:16 < aiju> yes it is
15:16 < skelterjohn> unless you just mean the web front end
15:16 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
15:16 < skelterjohn> then i'll get over it
15:16 < aiju> twitter proves "given enough thrust, even a brick will fly"
15:16 < Namegduf> It was
15:16 < Namegduf> They've been optimising, but it used to be mostly straight
Ruby
15:16 < jeremy_c> I believe to start it was 100% ruby, but then they
converted a small part to C (not sure what)
15:16 < skelterjohn> aiju: i'm surprised you've never thrown a brick at
anyone
15:16 < Namegduf> Thus why the failwhale used to be more common.
15:17 < gmilleramilar> it's even better than that, they ported a bunch of it
to scala about 2 yrs ago
15:17 < Namegduf> The failwhale represents Ruby and the helicpters represent
processors.
15:17 < gmilleramilar> (the back end stuff)
15:17 < aiju> skelterjohn: how cann you tell?
15:17 < aiju> it's hard to throw bricks via IRC
15:17 < skelterjohn> otherwise you would have considered that adage proven
long ago
15:18 < Namegduf> IP geolocation and a large enough brick.
15:18 -!- tmk [~TMKCodes@unaffiliated/tmkcodes] has quit [Quit: Leaving]
15:19 -!- tmk [~TMKCodes@dsl-pribrasgw1-ff00c300-3.dhcp.inet.fi] has joined
#go-nuts
15:19 -!- tmk [~TMKCodes@dsl-pribrasgw1-ff00c300-3.dhcp.inet.fi] has quit
[Changing host]
15:19 -!- tmk [~TMKCodes@unaffiliated/tmkcodes] has joined #go-nuts
15:20 < mpl> he has tried, but he missed ;P
15:20 < skelterjohn> some gb pimping in the twitter #golang search :)
15:21 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
15:23 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
15:24 -!- alehorst [~alehorst@189.114.239.84.dynamic.adsl.gvt.net.br] has quit
[Read error: Connection reset by peer]
15:27 -!- TheMue [~TheMue@wlan-hotspot-011.ewe-ip-backbone.de] has quit [Quit:
TheMue]
15:28 -!- oal [~oal@5.79-160-122.customer.lyse.net] has joined #go-nuts
15:28 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
15:32 -!- alehorst1 [~alehorst@200.146.83.195.dynamic.adsl.gvt.net.br] has joined
#go-nuts
15:35 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
15:37 -!- virtualsue [~chatzilla@nat/cisco/x-praxvkprzsymbzbs] has quit [Ping
timeout: 276 seconds]
15:37 -!- piranha [~piranha@D57D1AB3.static.ziggozakelijk.nl] has joined #go-nuts
15:37 -!- piranha [~piranha@D57D1AB3.static.ziggozakelijk.nl] has quit [Remote
host closed the connection]
15:37 -!- tncardoso [~thiago@189.59.160.82] has joined #go-nuts
15:37 -!- piranha [~piranha@D57D1AB3.static.ziggozakelijk.nl] has joined #go-nuts
15:43 -!- piranha [~piranha@D57D1AB3.static.ziggozakelijk.nl] has quit [Quit:
Computer has gone to sleep.]
15:47 -!- virtualsue [~chatzilla@nat/cisco/x-hbwvdpxbgsasdspn] has joined #go-nuts
15:47 -!- Squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
15:52 -!- ucasano [~ucasano@151.12.47.139] has quit [Quit: ucasano]
15:53 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has joined #go-nuts
15:53 < jemeshsu> Check out this interview where Erlang inventors mentioned
Golang http://www.infoq.com/interviews/armstrong-virding-erlang-future#
15:53 < jemeshsu> "I think it goes back to the Unix C traditions back to
basics and other compiled languages and it remedies other deficiencies in C, I
don’t think C++ was an improvement but I do think Go is a definite improvement on
C and we’ve got Kernighan and things in the background there and obviously they’ve
got wonderful experience on building languages.  It’s very nicely engineered and
actually when it even came out impressive documentatio
15:53 < jemeshsu> all this stuff that you need.  Even when it first came out
it has a level of maturity that you would think would actually have been there for
many years, so it is very impressive actually."
15:59 < moraes> guys.  it is developer chat time now in #appengine.  will
last for 1 hour.  go there if you have questions about go on gae (goe?).
16:00 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
16:01 -!- nigeltao_GOOGLE [~nigeltao@nat/google/x-muucuahaxfwmondx] has joined
#go-nuts
16:01 -!- robertk [~unknown@c-98-226-157-205.hsd1.in.comcast.net] has joined
#go-nuts
16:01 -!- robertk [~unknown@c-98-226-157-205.hsd1.in.comcast.net] has left
#go-nuts []
16:02 -!- johnlockwood [~johnlockw@99.175.94.132] has joined #go-nuts
16:03 -!- OzzyB [~ozburo@70.94.99.242] has joined #go-nuts
16:06 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has quit [Quit: ERC Version 5.3
(IRC client for Emacs)]
16:06 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has joined #go-nuts
16:08 < wrtp> jemeshsu: cool, thanks
16:08 -!- OzzyB [~ozburo@70.94.99.242] has left #go-nuts []
16:08 < wrtp> interesting quote: "the first erlang was just written in
prolog"
16:09 < mtrichardson> moraes: thanks!
16:09 < skelterjohn> !
16:09 -!- rog [~rog@92.17.69.16] has joined #go-nuts
16:09 < skelterjohn> wrtp: if you didn't get around to making your mac draw
impl behave with menus etc, i have a code snip for you
16:10 < wrtp> skelterjohn: thanks
16:11 < skelterjohn> http://pastebin.com/N003NZyQ
16:11 < skelterjohn> that will have the app's own menu show, and give it its
own icon in the app switcher
16:11 < skelterjohn> instead of being a 2nd class window in the Terminal app
16:18 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:22 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the
connection]
16:23 < wrtp> skelterjohn: oh of course, it's so obvious
16:23 < wrtp> :-)
16:23 < wrtp> thanks
16:23 -!- tmk [~TMKCodes@unaffiliated/tmkcodes] has quit [Ping timeout: 240
seconds]
16:23 < skelterjohn> haha
16:23 < skelterjohn> #macdev helped me out on that one
16:24 -!- rog [~rog@92.17.69.16] has left #go-nuts []
16:24 -!- fvbommel [~fvbommel_@86.86.15.250] has joined #go-nuts
16:24 -!- huin [~huin@91.85.171.238] has joined #go-nuts
16:25 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 260
seconds]
16:37 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
16:39 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 260 seconds]
16:40 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
16:41 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
16:42 < ab3> hello
16:43 < skelterjohn> hi
16:46 < ab3> i haved decoded a json file into a var v
map[string]interface{}, and now i would like to select some parts from it for
furter processing, but it only know that v has type map[string]interface{}
16:47 < ab3> so i get errors like: invalid operation: v["data"]["children"]
(index of type interface { })
16:47 < wrtp> ab3: you need to do a dynamic type cast
16:48 < wrtp> ab3: e.g.  children := v["data"].(map[string]interface{})
16:50 -!- tux21b [~tux21b@178.115.127.113.wireless.dyn.drei.com] has joined
#go-nuts
16:51 < tux21b> hi, how can i create my own error type which simply embeds
os.ErrorString?
16:51 < mdxi> ab3: i asked pretty much the same question a couple weeks ago
on the mailing list.  here's a link (which says what wrtp did, with some expansion
and snippets) https://groups.google.com/d/topic/golang-nuts/FZBR91xX4K8/discussion
16:52 < tux21b> if i do: type NoCommand struct { *os.ErrorString }, then
NoCommand("my string") isn't working anymore (although, os.ErrorString is simply a
string type)
16:52 < skelterjohn> why *os.ErrorString - why not just os.ErrorString?
16:53 < skelterjohn> you can't assign a string to a *string and expect it to
make sense :)
16:53 < tux21b> ok, but the problem remains.  NoCommand("my string") is
still not valid
16:53 < skelterjohn> nor should it be - NoCommand isn't a string and can't
be converted from one
16:54 < skelterjohn> NoCommand{"something"} might work
16:54 < ab3> k, thx mdxi wrtp
16:54 < tux21b> oh, that's right.  many thanks skelterjohn :)
16:54 < skelterjohn> yeah, that works
16:55 < skelterjohn> my pleasure
16:57 -!- keithcascio [~keithcasc@nat/google/x-vzsllsltsujvaork] has joined
#go-nuts
17:06 -!- proppy_google [~proppy@84-72-45-206.dclient.hispeed.ch] has joined
#go-nuts
17:06 -!- marcdurden [~chatzilla@67.170.197.160] has joined #go-nuts
17:08 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has joined
#go-nuts
17:08 < hallas> greets allæ
17:09 < hallas> -ø
17:09 < hallas> argh..  -æ-ø ;P
17:15 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined
#go-nuts
17:16 < tux21b> is there a good reason, why the net.textproto.Conn struct
does not satisfy the net.Conn interface?  (missing LocalAddr() method)
17:20 -!- cco3 [~conleyo@nat/google/x-oesjaqjafszdelna] has quit [Quit: Leaving.]
17:21 < ab3> what could this mean: append(posts, post) not used
17:22 < ab3> i am just using this inside a for loop of posts
17:22 < tux21b> use: posts = append(posts, post)
17:22 < tux21b> append() might reallocate the underlying posts array, and so
the address might change
17:24 -!- TMKCodes [~TMKCodes@unaffiliated/tmkcodes] has joined #go-nuts
17:24 -!- nigeltao_GOOGLE [~nigeltao@nat/google/x-muucuahaxfwmondx] has quit
[Quit: leaving]
17:27 < uriel> 11:40 < moraes> uriel, make 1st post moderated solves
it.
17:27 < uriel> moraes: that is what I have been telling adg and iant to do
for many months
17:27 < uriel> moraes: but apparently russ is against it, god knows why
17:27 < moraes> ah.
17:27 < moraes> it is bad because one has to check list once or twice a day.
17:28 < moraes> or maybe use the notifications.
17:29 < delinka> want a go interpreter
17:30 < uriel> moraes: notifications work just fine, I run a few google
groups lists, and it si the only way to keep spam away
17:30 -!- binarypie [~binarypie@adsl-76-254-24-124.dsl.pltn13.sbcglobal.net] has
joined #go-nuts
17:31 < uriel> it is way better than letting everyone in the list have to
manually delete the spam (which in gmail prompts you to unsubscribe from the list!
I don't think the people running go-nuts want to encourage people to unsubscribe
like that)
17:31 < moraes> delinka, is that a question?
17:31 < delinka> a statement
17:32 < moraes> uriel, what are your plans for go on gae?
17:34 -!- proppy [~proppy@84-72-45-206.dclient.hispeed.ch] has quit [Remote host
closed the connection]
17:36 -!- cco3 [~conleyo@nat/google/x-zebdkgotubmvirvv] has joined #go-nuts
17:37 -!- gtaylor [~gtaylor@199.15.144.250] has joined #go-nuts
17:38 < uriel> moraes: secret
17:38 < uriel> ;P
17:39 < uriel> moraes: I'm thinking of at least starting by porting my
existing python apps to Go
17:39 * uriel got tired of waiting for python 3 on gae, and the new pricing model
doesn't make python very appealing either
17:39 < Tonnerre> gae?
17:40 < exch> google app engine
17:40 < Tonnerre> Ah, that
17:40 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has quit
[Ping timeout: 260 seconds]
17:46 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
17:46 -!- gregschlom [~quassel@187.118.210.62.te-dns.org] has quit [Ping timeout:
260 seconds]
17:52 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has joined
#go-nuts
17:52 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
17:53 -!- sacho [~sacho@95-42-83-175.btc-net.bg] has joined #go-nuts
17:58 < mehalelal> When compiling/linking with 6g/6l, are there any
limitations to moving the binary to another linux system?
17:59 < uriel> moraes: there shouldn't be
17:59 < uriel> as long as th eother system is 64bit too
17:59 < uriel> er, s/ moraes/ mehalelal/
18:00 < mehalelal> uriel: it is.  I am getting the error: cannot execute
binary file.
18:01 < uriel> what distribution(s)?
18:01 < uriel> still sounds like either you are doing something wrong, or
the other system is not really 64bit
18:02 < mehalelal> compiled on ubuntu 11.04, want to run it on system rescue
cd 2.0 (which is gentoo based).  According to uname it is
18:04 < uriel> what does uname say?  I still suspect you don't have a 64bit
kernel/libs
18:05 < nteon> mehalelal: on the problem system try: $ ldd $BINARY_NAME
18:05 < nteon> and see if there are any undefined deps
18:06 < nteon> but 32-bit is more likely.  uname -a
18:06 < nteon> as uriel said
18:06 < mehalelal> nteon: just says "not a dynamic executable"
18:07 < mehalelal> gimme a second to on the uname.
18:07 < nteon> mehalelal: $ file $BINARY_NAME
18:08 -!- virtualsue [~chatzilla@nat/cisco/x-hbwvdpxbgsasdspn] has quit [Ping
timeout: 240 seconds]
18:08 < mehalelal> nteon: ELF 64-bit LSB executable, x86-64, version 1
(SYSV), dynamically linked (uses shared libs), not stripped
18:08 < nteon> sounds like you're on a 32 bit system then.  $ uname -a
18:08 < nteon> ?
18:09 < nteon> is there a way to force building 8g?
18:09 < mehalelal> uriel: Linux sysresccd 2.6.35-std200-amd64 #2 SMP Fri Dec
31 19:29:52 UTC 2010 x86_64 Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz
GenuineIntel GNU/Linux
18:10 < mehalelal> Sorry about taking so long on that, no easy copy/paste
from the other machine
18:10 < nteon> hmmph
18:10 < nteon> np
18:11 < nteon> so you hvae a 64 bit kernel
18:11 -!- zaero [~eclark@2001:470:1f11:b82:d873:8930:7204:b189] has quit [Ping
timeout: 260 seconds]
18:12 -!- steven [~steven@unaffiliated/steven] has quit [Read error: Operation
timed out]
18:12 < nteon> and you're sure you have executable permission on the binary?
$ chmod ugo+x $BINARY_NAME
18:12 < nteon> you probably do
18:12 < nteon> just to make sure :)
18:12 < nteon> and nm because that shouldn't affect ldd
18:13 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
18:13 < mehalelal> nteon: aye
18:14 < nteon> well im stumped :)
18:14 -!- delinka [~delinka@pidsley.praxxium.com] has quit [Quit: ZNC -
http://znc.sourceforge.net]
18:15 < uriel> /me too
18:15 < mehalelal> nteon: Me too :-), thanks for the help, I never knew
about ldd or file
18:15 < uriel> try a 8g compile binary
18:15 -!- delinka [~delinka@pidsley.praxxium.com] has joined #go-nuts
18:15 < mehalelal> will do
18:15 -!- gtaylor [~gtaylor@199.15.144.250] has quit [Quit: gtaylor]
18:15 < nteon> mehalelal: can you pastebin the output of ldd on your ubuntu
system fo rthe same binary?
18:16 < uriel> mehalelal: could be the file you copied got corrupted in
transit?
18:16 -!- gtaylor [~gtaylor@199.15.144.250] has joined #go-nuts
18:16 < uriel> did you try file(1)?
18:16 -!- steven [~steven@pidsley.praxxium.com] has joined #go-nuts
18:16 < uriel> ah, nteon already suggested that
18:17 -!- virtualsue [~chatzilla@host81-148-88-17.in-addr.btopenworld.com] has
joined #go-nuts
18:17 < nteon> you could try sha1sum on the binaries on both machines and
make sure they match
18:17 < mehalelal> nteon: statically linked
18:17 < uriel> either your kernel name is misleading, or something very
weird is going on
18:17 < uriel> if ldd says it is not dynamically linked, but file says it
is...  that would be weird (although for a while Go executables where dynamic but
without linking against any libs IIRC)
18:18 -!- TheMue [~TheMue@p5DDF7CBF.dip.t-dialin.net] has joined #go-nuts
18:18 -!- iant [~iant@216.239.45.19] has quit [Ping timeout: 252 seconds]
18:18 < nteon> uriel: on my system go programs link against libc, and
potentially libpthread, along with the linux vdso
18:18 < mehalelal> nteon: doing the checksumming now, I don't think the
machine I compiled on has one
18:18 < ww> just catching the tail end...  what version of go was the thing
compiled on?
18:18 < nteon> and the dynamic linker
18:19 < ww> ah, cgo?
18:19 -!- jfalcon [~jfalcon@c-67-189-144-224.hsd1.ma.comcast.net] has joined
#go-nuts
18:19 < chomp> mm i don't think it's that weird.  any go executable 8g or 6g
is produces for me (two different machines) is "statically linked" according to
ldd but "Dynamically linked" according to file
18:19 < mehalelal> ww: 6g version release.r57.1 8294
18:19 < chomp> i suspect that is just file being stupid
18:20 < ww> ok, that's odd - there were some cgo-related dynamic linking
problems (on freebsd) in r57.1, that were fixed later
18:20 < mehalelal> nteon: checksums match
18:20 < ww> see http://code.google.com/p/go/issues/detail?id=1778
18:21 < ww> but unless you've got a very strange version of linux dynamic
linker i doubt that would be biting you
18:21 < aiju> there are non strange versions of the dynamic linker?
18:21 < ww> aiju: strange meaning out of the ordinary for the context...
18:22 * ww contemplates absolute strangeness
18:23 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has left #go-nuts []
18:24 < mehalelal> ww: If using the core packages, (and no cgo) is this
something I would have to worry about?  I am only using: big, fmt, flag, and
runtime
18:24 -!- zaero [~eclark@2001:470:1f11:b82:ac09:fed1:55e6:794f] has joined
#go-nuts
18:25 < ww> i believe it was specific to cgo so you should be ok
18:25 < jfalcon> hi.  can someone help me make sense of this error message:
"cannot use loadEntry (type func(r *http.Request, id int64) (*Entry, os.Error)) as
type func(*http.Request, int64) (interface { }, os.Error)".  my understanding is
that *Entry is assignable to interface{}, so what is the problem?
18:25 -!- ab3 [~abe@83.101.90.66] has quit [Ping timeout: 246 seconds]
18:25 < ww> you could try the game of trying previous weekly releases and
see if you can find one that works
18:26 < ww> tedious but if it was known to run on your system at a
particular version you can find the bug that way
18:28 < uriel> nteon: that is misleading, until recently Go didn't link
against anything, but now it links against libc to do dns resolution (mostly
because OS X is insane and its firewall locks any apps that don't do dns
resolution via its net stack or something bizarre like that)
18:28 < Namegduf> That's sad, because previously Go programs would work on
Linux distros with alternative libcs
18:28 < Namegduf> That said, it's a fringe thing to have to recompile for.
18:29 < exch> that's a pretty big dependency addition just for DNS
resolution
18:29 < uriel> it is sad because it also breaks cross-compiling
18:29 < aiju> what
18:29 < aiju> they really did
18:29 < aiju> godfuckindamnit
18:29 < aiju> who's to be shot?
18:29 < uriel> as rob said (heavily paraphrased): it is a shame modern
Unixes totally fucked up what made unix great
18:30 < uriel> aiju: steve jobs
18:30 < aiju> it does shit on Linux because of macs?
18:30 < uriel> exch: without the change there were all kinds of problems in
OS X
18:30 < ww> other than some ignorable tests failing, i never had any
problems on os x
18:31 < uriel> aiju: there are other problems on lunix, for example if the
system uses nis, or ldap or all kinds of bizarre stuff
18:31 < aiju> i remember with my mplayer stuff
18:31 < aiju> i wrote a mail to the glibc mailing list
18:31 < uriel> just parsing /etc/resolv.conf yourself is not feasible
anymore :(
18:31 < aiju> actual quote
18:31 < aiju> "That's just good engineering practice."
18:32 < ww> would it be crazy to put doozer in /etc/nsswitch.conf?
18:32 * ww hides
18:32 < aiju> this shit makes me angry now
18:33 < mehalelal> Thanks again y'all for the help.  I think I am just going
to compile go on the other system and see if that helps.  ttfn
18:33 -!- mehalelal [~mehalelal@76.103.175.11] has quit [Quit: Leaving]
18:34 < uriel> "Sun Microsystems first developed NSS for their Solaris
operating system"
18:34 < uriel> what a surprise, Sun once more is responsible for totally
fucking everything up
18:34 < aiju> currently watching the google I/O talk
18:34 < aiju> uriel: and yet another bad thing with NS
18:35 < aiju> jesus christ could rob pike please stop hailing open source?
18:35 < uriel> "yet another"?  everything is bad about NSS
18:36 -!- gtaylor [~gtaylor@199.15.144.250] has quit [Ping timeout: 246 seconds]
18:36 < aiju> uriel: NS - national socialism, nextstep
18:37 < uriel> next step is NSSS
18:37 -!- gtaylor [~gtaylor@199.15.144.250] has joined #go-nuts
18:48 -!- iant [~iant@nat/google/x-nysjnsahsveexoqb] has joined #go-nuts
18:48 -!- mode/#go-nuts [+v iant] by ChanServ
18:48 -!- foocraft [~ewanas@dyn-86-36-43-111.wv.qatar.cmu.edu] has joined #go-nuts
18:55 -!- prudhvi [~prudhvi@look.ma.i.am.on.ipv6.at.prudhvi.de] has quit [Ping
timeout: 248 seconds]
19:09 -!- Vigud [u1143@gateway/web/irccloud.com/x-mfsgmatrbsolzzmg] has joined
#go-nuts
19:17 -!- TMKCodes [~TMKCodes@unaffiliated/tmkcodes] has quit [Quit: Leaving]
19:17 -!- TMKCodes [~TMKCodes@unaffiliated/tmkcodes] has joined #go-nuts
19:17 -!- kr [~Keith@204.14.152.118] has joined #go-nuts
19:19 -!- Sep102_ [~Sep102@c-71-231-176-153.hsd1.wa.comcast.net] has joined
#go-nuts
19:21 -!- Squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
19:23 -!- Sep102__ [~Sep102@c-71-231-176-153.hsd1.wa.comcast.net] has quit [Ping
timeout: 240 seconds]
19:28 -!- gtaylor [~gtaylor@199.15.144.250] has quit [Quit: gtaylor]
19:29 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
19:32 < str1ngs> wow filepath.Walk is faster then find o.O
19:32 < aiju> hahaha
19:32 < aiju> GNU find?
19:32 < str1ngs> yes
19:32 < aiju> GNU tools often have strange performance deficits
19:32 < aiju> usually locale handling or something
19:33 < Namegduf> Locales are the devil
19:33 < str1ngs> bsd variant of find tends to be faster?
19:33 < aiju> str1ngs: not sure about find
19:33 < aiju> it's true about e.g.  grep
19:33 -!- binarypie [~binarypie@adsl-76-254-24-124.dsl.pltn13.sbcglobal.net] has
quit [Remote host closed the connection]
19:33 < str1ngs> walk is 2x faster then find
19:33 -!- danilo04 [~danilo04@rm2348358874.student.rit.edu] has joined #go-nuts
19:34 -!- pix__ [~axle@p5B34EB31.dip.t-dialin.net] has joined #go-nuts
19:34 -!- pix__ [~axle@p5B34EB31.dip.t-dialin.net] has quit [Client Quit]
19:34 < chomp> sounds like a good reason to rewrite find with walk
19:34 < str1ngs> think RMS will go for that?
19:34 < chomp> screw RMS
19:34 < str1ngs> hey RMS we are using go umm kay
19:35 -!- sauerbraten [~sauerbrat@p5B34EB31.dip.t-dialin.net] has joined #go-nuts
19:35 < chomp> he'd be like gnoooooo!
19:35 < str1ngs> oh snap
19:35 < aiju> what license is go even in?
19:35 < str1ngs> simplified bsd
19:36 < aiju> so RMS will be upset
19:36 < chomp> too free for RMS.
19:37 < aiju> GPL is always more free
19:37 < aiju> it's more restricting
19:37 < aiju> therefore more free
19:37 < aiju> just like french revolution
19:37 < jnwhiteh> =)
19:37 < aiju> Robespierre M. Stallman
19:40 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-157-147.clienti.tiscali.it] has
joined #go-nuts
19:42 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
19:43 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-181-139.clienti.tiscali.it] has
quit [Ping timeout: 258 seconds]
19:43 < sauerbraten> good evening :) What package(s) would you suggest me to
use to check a specific folder on my hard disk every 10 minutes and execute a
command if something of the contents changed?  :) I thought of exec to execute the
command, but how may I efficiently check a directory for chnges?
19:44 < sauerbraten> oh, ioutil may be what I'm looking for :)
19:44 < gmilleramilar> http://golang.org/pkg/os/inotify/
19:45 -!- danilo04 [~danilo04@rm2348358874.student.rit.edu] has quit [Quit:
Saliendo]
19:45 < sauerbraten> oh that's neat
19:45 < aiju> sauerbraten: don't use inotify
19:45 < aiju> as it only exists on Linux
19:45 < aiju> esp.  if you just want to check every 10 minutes
19:45 < Tonnerre> kqueue
19:45 < Tonnerre> I think libevent is the best way
19:46 < aiju> just check every 10 minutes
19:46 < str1ngs> sauerbraten: if you are on linux use inotify pay him no
mind :P
19:46 < aiju> DISREGARD THAT NOT EVERYONE USES LINUX
19:46 < str1ngs> we dont care
19:46 < str1ngs> if he is on linux inotify is the way to go
19:47 < sauerbraten> the program will only be run on linux, sooo..  ;) Well,
maybe you're right and it's easier to simply use ioutil to get the directories
contents and compare it with some kind of index file...
19:47 < sauerbraten> so, what now?  :D
19:47 < Namegduf> inotify is nice, simple, and pretty, and it is not the
program's fault that other OSes do not bother to provide such functionality.
19:47 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has joined #go-nuts
19:47 < Namegduf> If they did, an os/notify package could wrap them.
19:47 < Tonnerre> Why would the program only ever run on Linux?
19:48 < Tonnerre> Namegduf: BSDs have queue which does the same and more
19:48 < sauerbraten> because it's for my home network :)
19:48 < aiju> how does inotify even work on odd filesystems?
19:48 < str1ngs> aiju: read and find out
19:48 < aiju> how does it know when an NFS file changed?
19:48 < aiju> str1ngs: my assumption is: it doesn't
19:48 < Tonnerre> sauerbraten: and you're absolutely sure it will never be
used anywhere else?
19:48 < str1ngs> its kernel based
19:48 < nteon> does go have kqueue bindings?
19:48 * Namegduf checks what year this is.
19:48 < str1ngs> aiju: assume away
19:48 < Namegduf> No, it's still not the 80s
19:48 < Tonnerre> aiju: inotify doesn't work on NFS IIRC
19:48 < Namegduf> I don't care about NFS
19:49 < aiju> so jesus christ what the fuck do you use?
19:49 < Tonnerre> Namegduf: there are other networked fail systems
19:49 < aiju> CIFS?
19:49 < Tonnerre> coda ;)
19:49 < Namegduf> I use a local filesystem?
19:49 < Namegduf> Like a sane person?
19:49 < aiju> networking is sooo 80s
19:49 < sauerbraten> Tonnerre, I do not know how to make .exes and since I
don't know anyone who owns a mac and would use this program, yes, I'm pretty sure
of that
19:49 < Namegduf> And I don't use FS-level stuff for remote stuff because
it's fucking slow
19:49 < aiju> let's just go back to mainframes
19:50 < Tonnerre> sauerbraten: and what about BSD?  Solaris?  Minix?  iOS?
19:50 < Namegduf> Being non-portable for the sake of it is bad.  Being
non-portable where it simplifies the program and reduces maintenance is not if the
reduced portability is well-within your requirements.
19:50 < str1ngs> gets pretty annoying every time somebody asks a simple
question.  and people start bike shedding or peddling there wares
19:50 < Namegduf> In this case, they could easily change if they wanted to
support more systems.
19:51 < Namegduf> If BSD has an appropriate API, look at moving os/inotify
to os/notify and providing generic access
19:51 < Namegduf> I am sure people would be up for it
19:51 < str1ngs> Namegduf: no they rather bitch about it then contribute :P
19:51 < sauerbraten> Tonnerre, BSD isn't used by anyone I know, as well as
solaris.  WTH is MInix?  and there are enough apps for that on iOS I assume...
19:51 < aiju> again, it doesn't work on networked file systems, synthetic
file systems etc.
19:52 < Namegduf> If that's a problem then its a problem.  If not, it isn't.
19:52 < str1ngs> aiju: if you want some generic abstraction to work on your
OS then write it
19:52 < Namegduf> Notification >>>> polling and if the
notification support is enough for you then you have a nice simple maintainable
solution that will behave great.
19:53 < Namegduf> Polling is slow and ugly and makes the human wait for your
program to notice, we've gotten rid of it almost everywhere in modern OSes.
19:53 < aiju> except e.g.  tail -f
19:53 < sauerbraten> ok, I don't want to read the whole doc of inotify to
understand the event strings, so I'll simply use ioutil...  this also gives me the
possibility to rn it on other OSs, though I won't need that :D
19:53 < Namegduf> Avoidable always, no, but using it just because
notification isn't always available is silly.
19:53 < str1ngs> aiju: there is inotail :P
19:54 < Namegduf> aiju: Sure, if you're okay polling every 50ms on every
file
19:54 < Namegduf> Otherwise you're going to be slow in a human perceptible
manner
19:54 < sauerbraten> but it's nice to see I started a conversation /argument
/bitchfight :)
19:54 < Namegduf> aiju: Do you also think I should write programs for
computers with no MMU or FPU?
19:54 < str1ngs> sauerbraten: ya sorry, this happens all the time.
19:55 < str1ngs> sauerbraten: and its always the same people
19:55 -!- TMKCodes [~TMKCodes@unaffiliated/tmkcodes] has quit [Read error:
Connection reset by peer]
19:55 < sauerbraten> hehe
19:55 -!- TMKCodess [~TMKCodes@unaffiliated/tmkcodes] has joined #go-nuts
19:55 < sauerbraten> awkward silence...
19:55 < Namegduf> You *have* to be prepared to draw a line where you want to
support stuff, and I tend to think that where it takes more complexity to support
things is where that should be.  Simple is good.  :P
19:56 < aiju> just.  fucking.  poll.
19:56 < aiju> what could be simpler?
19:57 < Namegduf> aiju: Receiving from a channel
19:57 < aiju> again, i'm too busy for this crap
19:57 * str1ngs rewrits find in go with inotify support.  GPL v3
19:57 < Namegduf> Which is what os/inotify's API looks like
19:57 < Namegduf> You receive from the channel when a change has happened
19:57 < Namegduf> You're the one usually going on about how that's all
pretty
19:57 < Namegduf> And it is.
20:01 -!- ab3 [~abe@83.101.72.80] has joined #go-nuts
20:02 < chomp> i would have to agree that if you like inotify, you support
inotify and encourage other people to do the same.  dramatically, "Be the change
you want to see in the world."
20:16 -!- dfr|mac [~dfr|work@host-12-159-175-242.bccexpo.com] has quit [Remote
host closed the connection]
20:19 -!- lmnop [~amie@ppp-70-225-178-89.dsl.chmpil.ameritech.net] has joined
#go-nuts
20:20 < sauerbraten> could someone explain to me how I may reslove this type
[]*os.FileInfo to print the elements of that array human readable?
20:20 < sauerbraten> I get confused by these pointers all the time...
20:23 < str1ngs> sauerbraten: something like for _,file := range fileinfos {
println(file.Name) }
20:23 < hallas> sauerbraten: exactly what str1ngs said
20:23 < str1ngs> sauerbraten: are you doing a directory listing?
20:23 < sauerbraten> yep
20:24 < chomp> Yeah, it's important to realize that the selector (.
operator) automatically derefernces pointer types
20:24 < str1ngs> sauerbraten: ah just one dircetory?
20:24 < sauerbraten> yes, why?
20:24 -!- dfr|bohconf [~dfr|work@conference/railsconf/x-efwizxajfjvmiiqd] has
joined #go-nuts
20:24 < str1ngs> imo use Glob then
20:24 < sauerbraten> what's that?
20:24 < str1ngs> unless you actually need FileInfo
20:24 -!- dfr|bohconf [~dfr|work@conference/railsconf/x-efwizxajfjvmiiqd] has quit
[Remote host closed the connection]
20:25 < sauerbraten> I need the name, maybe the date, too
20:25 < str1ngs> ah then FileInfo is better
20:25 < str1ngs> for names though just use Glob
20:25 < hallas> io/ioutil.ReadDir if you're not already using that, and then
just go from there, else for Glob its filepath.Glob
20:26 < str1ngs> for _,file := filepath.Glob("*") { println(file) }
20:26 < sauerbraten> ReadDir is what I'm sing right now, I'll have a look at
glob
20:26 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has quit [Quit: Leaving.]
20:26 < nteon> does go have wrappers for select(2) or poll(2)?
20:26 < str1ngs> this is not tested so you might get the odd syntax error :P
20:27 < aiju> nteon: no
20:27 < aiju> nteon: use goroutines
20:27 < aiju> which uses poll internally afaik
20:27 -!- dfr|bohc_ [~dfr|work@conference/railsconf/x-zfmwarojvpugierq] has joined
#go-nuts
20:27 < Namegduf> Use synchronous I/O in Go.
20:28 < sauerbraten> I see...  but since ReadDir is more powerful and nearly
as easy to use, I'll stick with it
20:28 < Namegduf> It's implemented using epoll() on Linux, kqueue() on BSD
(and OS X?), and whatever on Windows
20:28 < Namegduf> i.e.  the most efficient platform-specific select()
varient
20:28 -!- dfr|bohc_ [~dfr|work@conference/railsconf/x-zfmwarojvpugierq] has quit
[Remote host closed the connection]
20:29 < Namegduf> So basically any blocking I/O operation does the
equivalent of have the goroutine wait on a poll()
20:29 < sauerbraten> time.Sleep in main{} makes the whole process sleep
right?
20:29 < Namegduf> You don't need/want to do it yourself.
20:29 < Namegduf> No.
20:30 < Namegduf> The main goroutine is not magic aside that its termination
kills the process.
20:30 -!- dfr|bohc_ [~dfr|work@conference/railsconf/x-axuhzcmpcqmtjctn] has joined
#go-nuts
20:30 < Namegduf> time.Sleep() in it makes that goroutine sleep.
20:30 < sauerbraten> oh right, I forgot main {} also is a goroutine
20:30 < sauerbraten> ok that's what I want
20:31 < str1ngs> sauerbraten: I still think Glob is better :P
20:31 < str1ngs> \o/
20:32 < sauerbraten> ;-)
20:33 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Quit:
Geek insinde®]
20:34 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
20:38 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 246
seconds]
20:41 < gmilleramilar> can you define struct constants?  I'm getting "const
initializer must be const" or somesuch
20:42 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 250 seconds]
20:43 < sauerbraten> silly question, but how do I compare strings?  simple
as "abc" == "def" ?
20:43 < aiju> yes
20:43 < sauerbraten> wow.  nice.  Java can't do that
20:43 < str1ngs> sauerbraten: you can compare sub slices to
20:44 < str1ngs> sauerbraten: ie if a[3:] = b[3:]
20:44 < str1ngs> == mind you
20:44 -!- oal [~oal@5.79-160-122.customer.lyse.net] has quit [Remote host closed
the connection]
20:45 < sauerbraten> cool :)
20:47 -!- foocraft [~ewanas@dyn-86-36-43-111.wv.qatar.cmu.edu] has quit [Quit: if
you're going....to san.  fran.  cisco!!!]
20:49 -!- alehorst1 [~alehorst@200.146.83.195.dynamic.adsl.gvt.net.br] has quit
[Remote host closed the connection]
20:49 < Namegduf> str1ngs: Can you?  I was pretty sure you couldn't compare
slices.
20:49 < Namegduf> Sliced strings, yeah
20:51 -!- photron [~photron@port-92-201-14-197.dynamic.qsc.de] has quit [Read
error: Operation timed out]
20:51 < str1ngs> slice strings you can not sure about bytes
20:52 < Namegduf> If you slice a string, you just get a string.
20:52 < Namegduf> You never actually have a string slice.
20:52 < str1ngs> ya bytes you get invalid operation: (test1[1:]) ==
(test2[1:]) (slice can only be compared to nil)
20:55 -!- jfalcon [~jfalcon@c-67-189-144-224.hsd1.ma.comcast.net] has quit [Quit:
jfalcon]
20:55 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has quit [Remote host closed the
connection]
20:56 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has joined #go-nuts
20:56 < ww> what about string(text1[1:]) == string(test2[1:]) :X
20:57 -!- keidaa [~keidaa@cm-84.210.56.138.getinternet.no] has joined #go-nuts
20:57 -!- alehorst1 [~alehorst@200.146.83.195.dynamic.adsl.gvt.net.br] has joined
#go-nuts
20:58 < hallas> sure it works
20:58 < hallas> they're not slices anymore, they're strings :O
20:58 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-182-205.clienti.tiscali.it]
has joined #go-nuts
20:58 < str1ngs> that works
20:58 -!- kevlar_google [~kevlar@nat/google/x-caixwkwnrkvdxldg] has joined
#go-nuts
20:58 -!- kevlar_google [~kevlar@nat/google/x-caixwkwnrkvdxldg] has quit [Changing
host]
20:58 -!- kevlar_google [~kevlar@unaffiliated/eko] has joined #go-nuts
20:59 -!- Venom_X_ [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
21:01 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Ping timeout: 246 seconds]
21:01 < str1ngs> I thought strings are slices no/
21:01 < str1ngs> ?
21:01 < kevlar_work> str1ngs, nope
21:02 < kevlar_work> str1ngs, you can create another string by slicing a
string
21:02 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-157-147.clienti.tiscali.it] has
quit [Ping timeout: 260 seconds]
21:02 < ww> you can byte strings too
21:02 < ww> mmmmm
21:02 < str1ngs> so they just have features like len an indexes like slices?
21:02 < kevlar_work> str1ngs, yes
21:03 < kevlar_work> index a string for a byte, slice a string for a string
21:03 < ww> you just can't modify the what-would-be-a-slice-header
21:03 < kevlar_work> they are freely convertable to and from a []byte (both
operations require an allocation)
21:04 < ww> strings don't have an explicit capacity
21:05 < str1ngs> either way much easier to work with then C
21:08 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-170-16.clienti.tiscali.it] has
joined #go-nuts
21:08 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
21:08 -!- achoo [~achoo@host-134-71-204-31.allocated.csupomona.edu] has joined
#go-nuts
21:08 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-182-205.clienti.tiscali.it]
has quit [Ping timeout: 258 seconds]
21:10 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Quit:
Linkinus - http://linkinus.com]
21:11 -!- huin [~huin@91.85.171.238] has quit [Quit: leaving]
21:13 -!- kevlar_work [~kevlar@unaffiliated/eko] has quit [Remote host closed the
connection]
21:14 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
21:15 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
21:16 -!- TheMue [~TheMue@p5DDF7CBF.dip.t-dialin.net] has quit [Quit: TheMue]
21:16 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-170-16.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
21:19 -!- sauerbraten [~sauerbrat@p5B34EB31.dip.t-dialin.net] has quit [Quit:
Leaving]
21:19 -!- kevlar_work [~kevlar@nat/google/x-ayhdetvpjhddlhop] has joined #go-nuts
21:19 -!- kevlar_work [~kevlar@nat/google/x-ayhdetvpjhddlhop] has quit [Changing
host]
21:19 -!- kevlar_work [~kevlar@unaffiliated/eko] has joined #go-nuts
21:22 -!- dfr|bohc_ [~dfr|work@conference/railsconf/x-axuhzcmpcqmtjctn] has quit
[Remote host closed the connection]
21:25 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
21:28 < str1ngs> I dont get filepath.Walk errors channel
21:29 < str1ngs> if I use select if falls through
21:29 < str1ngs> if I use err := <-error it only gets called on an error
21:30 -!- alehorst1 [~alehorst@200.146.83.195.dynamic.adsl.gvt.net.br] has quit
[Quit: Leaving.]
21:33 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Read error: Connection reset by peer]
21:33 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
21:33 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
21:34 -!- Fish [~Fish@exo3753.pck.nerim.net] has quit [Read error: Operation timed
out]
21:34 -!- juster [~juster@juster.us] has joined #go-nuts
21:38 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 252 seconds]
21:38 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
21:39 -!- Fish [~Fish@exo3753.pck.nerim.net] has joined #go-nuts
21:42 -!- Squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
21:43 -!- wrtp [~rog@92.17.69.16] has quit [Quit: wrtp]
21:44 -!- tncardoso [~thiago@189.59.160.82] has quit [Quit: bye]
21:44 -!- Squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
21:44 -!- virtualsue [~chatzilla@host81-148-88-17.in-addr.btopenworld.com] has
quit [Ping timeout: 250 seconds]
21:45 -!- keidaa [~keidaa@cm-84.210.56.138.getinternet.no] has quit [Remote host
closed the connection]
21:50 -!- achoo [~achoo@host-134-71-204-31.allocated.csupomona.edu] has quit
[Quit: achoo]
21:51 -!- lmnop [~amie@ppp-70-225-178-89.dsl.chmpil.ameritech.net] has quit [Ping
timeout: 264 seconds]
21:56 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has quit [Ping timeout: 250
seconds]
22:01 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
22:04 -!- cenuij [~cenuij@237.129.26.93.rev.sfr.net] has joined #go-nuts
22:04 -!- cenuij [~cenuij@237.129.26.93.rev.sfr.net] has quit [Changing host]
22:04 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
22:06 -!- jbooth1 [~jay@209.249.216.2] has quit [Quit: Leaving.]
22:08 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Quit: Venom_X]
22:10 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
22:15 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
22:17 -!- twopoint718 [~chris@fsf/member/twopoint718] has joined #go-nuts
22:17 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Remote
host closed the connection]
22:20 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
22:20 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
22:24 -!- twopoint718 [~chris@fsf/member/twopoint718] has quit [Ping timeout: 240
seconds]
22:26 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
22:26 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
22:26 < nteon> what is the origin of 'go neat'?  as in goneat.org
22:27 < nteon> etymology, if you will
22:27 < str1ngs> niemeyer's domain
22:31 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 250 seconds]
22:33 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Quit: Leaving]
22:35 < nteon> str1ngs: oh okay
22:35 -!- kr [~Keith@204.14.152.118] has quit [Ping timeout: 240 seconds]
22:39 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
22:40 -!- Temek [~TMKCodes@unaffiliated/tmkcodes] has joined #go-nuts
22:40 -!- TMKCodess [~TMKCodes@unaffiliated/tmkcodes] has quit [Read error:
Connection reset by peer]
22:40 -!- Squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
22:51 -!- Squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
22:54 -!- twopoint718 [~chris@fsf/member/twopoint718] has joined #go-nuts
23:00 -!- m4dh4tt3r1 [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined
#go-nuts
23:02 < niemeyer> nteon:
23:02 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has quit [Ping
timeout: 250 seconds]
23:02 < niemeyer> 1.  Free from that which soils, defiles, or disorders;
clean;
23:02 < niemeyer> cleanly; tidy.
23:02 < niemeyer> 2.  Free from what is unbecoming, inappropriate, or
tawdry;
23:02 < niemeyer> simple and becoming; pleasing with simplicity; tasteful;
23:02 < niemeyer> chaste; as, a neat style; a neat dress.
23:02 < niemeyer> [1913 Webster]
23:03 < niemeyer> 3.  Free from admixture or adulteration; good of its kind;
as,
23:03 < niemeyer> neat brandy; to drink one's vodka neat.  Hence: (Chem.)
23:03 < niemeyer> Pure; undiluted; as, dissolved in neat acetone.  "Our old
23:03 < niemeyer> wine neat." --Chapman.
23:03 < niemeyer> 4.  Excellent in character, skill, or performance, etc.;
nice;
23:03 < niemeyer> finished; adroit; as, a neat design; a neat thief.
23:03 < niemeyer> [1913 Webster]
23:03 < niemeyer> Syn: Nice; pure; cleanly; tidy; trim; spruce.
23:03 < KirkMcDonald> Single-malt scotch, neat.
23:04 < niemeyer> That's for "neat", but..  that's Go..
23:07 -!- kr [~Keith@204.14.152.118] has joined #go-nuts
23:07 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
23:11 -!- twopoint718 [~chris@fsf/member/twopoint718] has quit [Ping timeout: 240
seconds]
23:16 -!- ab3 [~abe@83.101.72.80] has quit [Ping timeout: 258 seconds]
23:20 -!- iant [~iant@nat/google/x-nysjnsahsveexoqb] has quit [Read error:
Connection reset by peer]
23:20 -!- iant [~iant@nat/google/x-mkjnpemharyffrzy] has joined #go-nuts
23:20 -!- mode/#go-nuts [+v iant] by ChanServ
23:21 -!- dforsyth_ [~dforsyth@ec2-50-18-22-230.us-west-1.compute.amazonaws.com]
has joined #go-nuts
23:21 -!- iant [~iant@nat/google/x-mkjnpemharyffrzy] has quit [Client Quit]
23:21 -!- iTonnerre [tonnerre@netbsd/developer/tonnerre] has joined #go-nuts
23:22 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
23:23 -!- cw_ [~anticw@parsec.stupidest.org] has joined #go-nuts
23:23 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has quit [Quit:
Leaving.]
23:25 -!- Erzwurm [~archwyrm@archwyrm.net] has joined #go-nuts
23:26 < nteon> niemeyer: :)
23:28 -!- Netsplit *.net <-> *.split quits: Tonnerre, GoBIR, dforsyth,
Wiz126, cw, fvbommel, Archwyrm, tux21b
23:28 -!- Netsplit over, joins: Wiz126
23:29 -!- Netsplit over, joins: GoBIR
23:32 -!- iant [~iant@67.218.110.18] has joined #go-nuts
23:32 -!- mode/#go-nuts [+v iant] by ChanServ
23:35 -!- fvbommel [~fvbommel_@86.86.15.250] has joined #go-nuts
23:35 -!- tux21b [~tux21b@178.115.127.113.wireless.dyn.drei.com] has joined
#go-nuts
23:41 -!- gtaylor [~gtaylor@199.15.144.250] has joined #go-nuts
23:52 < moraes> uriel, found this:
http://go-lang.cat-v.org/text-editors/jedit/ and then discovered this one, a bit
more polished: http://community.jedit.org/?q=node/view/4398
23:52 < moraes> cat-v is yours right?
23:58 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
--- Log closed Thu May 19 00:00:50 2011