--- Log opened Wed May 04 00:00:50 2011
00:01 -!- Kafo [~Henry@a91-152-179-101.elisa-laajakaista.fi] has quit [Read error:
Connection reset by peer]
00:02 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has joined #go-nuts
00:21 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 252 seconds]
00:34 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Quit:
Leaving...]
00:36 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
00:43 -!- foocraft [~ewanas@89.211.248.245] has quit [Quit: Leaving]
00:49 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined
#go-nuts
00:49 -!- mikespook [~mikespook@119.131.233.224] has joined #go-nuts
00:52 -!- iant [~iant@67.218.107.213] has quit [Quit: Leaving.]
00:53 -!- l00t [~i-i3id3r_@189.105.102.222] has joined #go-nuts
00:54 -!- foocraft [~ewanas@89.211.248.245] has joined #go-nuts
00:57 < TMKCodes> suggestion to write codewalk on how to handle FormValues,
Cookies and File uploads
01:04 -!- skelterjohn [~jasmuth@c-24-0-97-7.hsd1.nj.comcast.net] has joined
#go-nuts
01:08 -!- Bigbear1 [~Cody@d173-181-58-84.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
01:09 -!- Bigbear1 [~Cody@d173-181-58-84.abhsia.telus.net] has joined #go-nuts
01:11 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has joined
#go-nuts
01:19 -!- Joshwa [~Joshwa@h18.214.213.151.dynamic.ip.windstream.net] has joined
#go-nuts
01:21 -!- Joshwa [~Joshwa@h18.214.213.151.dynamic.ip.windstream.net] has quit
[Client Quit]
01:21 -!- vsayer [~vivek@c-67-170-236-166.hsd1.ca.comcast.net] has joined #go-nuts
01:25 -!- kr [~Keith@c-24-5-193-165.hsd1.ca.comcast.net] has quit [Quit: WeeChat
0.3.4]
01:26 -!- skelterjohn [~jasmuth@c-24-0-97-7.hsd1.nj.comcast.net] has quit [Ping
timeout: 248 seconds]
01:34 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
01:57 -!- ab3 [~abe@ip-83-134-160-54.dsl.scarlet.be] has joined #go-nuts
01:57 -!- cco3 [~conleyo@nat/google/x-gsfwkjlrsehsvinc] has quit [Read error:
Connection reset by peer]
01:58 -!- niemeyer [~niemeyer@189.27.154.170.dynamic.adsl.gvt.net.br] has joined
#go-nuts
02:02 -!- aho [~nya@fuld-590c62ea.pool.mediaWays.net] has quit [Quit: foo]
02:23 -!- niemeyer [~niemeyer@189.27.154.170.dynamic.adsl.gvt.net.br] has quit
[Ping timeout: 240 seconds]
02:28 -!- Bigbear1 [~Cody@d173-181-58-84.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
02:29 -!- Bigbear1 [~Cody@d173-181-58-84.abhsia.telus.net] has joined #go-nuts
02:40 -!- Bigbear1 [~Cody@d173-181-58-84.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
02:40 -!- Bigbear1 [~Cody@d173-181-58-84.abhsia.telus.net] has joined #go-nuts
02:41 -!- soapy_illusions [~alex@modemcable005.105-177-173.mc.videotron.ca] has
quit [Quit: Leaving]
02:52 -!- Bigbear1 [~Cody@d173-181-58-84.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
02:53 -!- PJRobins [~kvirc@184-100-100-163.mpls.qwest.net] has quit [Quit: KVIrc
4.1.1 Equilibrium http://www.kvirc.net/]
02:54 -!- angasule [~angasule@190.2.33.49] has quit [Remote host closed the
connection]
02:54 -!- Bigbear1 [~Cody@d173-181-58-84.abhsia.telus.net] has joined #go-nuts
02:54 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
03:02 -!- Bigbear11 [~Cody@d173-181-58-84.abhsia.telus.net] has joined #go-nuts
03:03 -!- Bigbear1 [~Cody@d173-181-58-84.abhsia.telus.net] has quit [Ping timeout:
260 seconds]
03:11 -!- Bigbear11 [~Cody@d173-181-58-84.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
03:12 -!- Bigbear1 [~Cody@d173-181-58-84.abhsia.telus.net] has joined #go-nuts
03:19 -!- Bigbear1 [~Cody@d173-181-58-84.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
03:19 -!- Bigbear11 [~Cody@d173-181-58-84.abhsia.telus.net] has joined #go-nuts
03:24 -!- foocraft [~ewanas@89.211.248.245] has quit [Quit: Leaving]
03:28 -!- fmoo [~Adium@66.220.144.74] has quit [Quit: Leaving.]
03:28 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
03:28 -!- mode/#go-nuts [+v iant] by ChanServ
03:39 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has left #go-nuts
["Leaving"]
03:40 -!- Bigbear11 [~Cody@d173-181-58-84.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
03:41 -!- Bigbear1 [~Cody@d173-181-58-84.abhsia.telus.net] has joined #go-nuts
03:50 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 260 seconds]
03:51 -!- iant [~iant@216.239.45.130] has joined #go-nuts
03:51 -!- mode/#go-nuts [+v iant] by ChanServ
03:54 -!- Bigbear1 [~Cody@d173-181-58-84.abhsia.telus.net] has quit [Ping timeout:
260 seconds]
03:55 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
04:01 -!- nkdnstbr [~nkdnstbr@li118-64.members.linode.com] has quit [Quit:
leaving]
04:01 -!- djcapelis [~djc@blender/coder/DJCapelis] has quit [Read error: Operation
timed out]
04:01 -!- comex [comex@c-67-188-10-190.hsd1.ca.comcast.net] has quit [Quit: ZNC -
http://znc.sourceforge.net]
04:02 -!- comex [comex@c-67-188-10-190.hsd1.ca.comcast.net] has joined #go-nuts
04:03 -!- djcapelis [~djc@capelis.dj] has joined #go-nuts
04:03 -!- djcapelis [~djc@capelis.dj] has quit [Changing host]
04:03 -!- djcapelis [~djc@blender/coder/DJCapelis] has joined #go-nuts
04:13 -!- Bigbear1 [~Cody@d75-158-140-53.abhsia.telus.net] has joined #go-nuts
04:13 -!- keithgcascio [~keithcasc@nat/google/x-mnjomyekysqubonm] has quit [Quit:
Leaving]
04:13 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has joined #go-nuts
04:17 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services]
04:17 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:32 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has quit [Ping
timeout: 240 seconds]
04:34 -!- Garen [noway@69.76.18.3] has quit [Remote host closed the connection]
04:40 -!- Bigbear1 [~Cody@d75-158-140-53.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
04:40 -!- Bigbear1 [~Cody@d75-158-140-53.abhsia.telus.net] has joined #go-nuts
04:46 -!- steven [~steven@unaffiliated/steven] has joined #go-nuts
04:46 < steven> hahahhah
04:46 < steven> guys
04:46 < steven> the Tree Comparison sample on the home page of golang.org is
broken :D
04:47 <+iant> argh
04:48 < steven> i was trying to fix it but its kind of a complex example
04:49 < steven> and i kinda forgot how the comma-ok pattern works in channel
ops
04:49 <+iant> v, ok = <-c now sets ok to true if it got a value or false
if it did not get a value because the channel is closed
04:49 < steven> oh right.  duh.
04:51 < steven> and to think, im giving a talk on go in 2 weeks
04:51 < steven> :)
04:54 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts
04:55 -!- boscop_ [~boscop@g227007087.adsl.alicedsl.de] has joined #go-nuts
04:57 -!- boscop [~boscop@f055014043.adsl.alicedsl.de] has quit [Ping timeout: 240
seconds]
04:59 < Bigbear1> where?
04:59 < steven> i thought i had a fix but i guess i did it wrong because it
keeps saying [process took too long]
04:59 < steven> oh, im giving my talk in mchenry il
04:59 < steven> its a small group of people
04:59 < Bigbear1> on anything particular?
05:00 < steven> nah, general overview of the pros and cons, and depending on
how quick the crowd is to pick it up, we might touch on channels and goroutines
05:00 < steven> http://scmcmay2011.eventbrite.com/
05:01 < Bigbear1> What are the cons?
05:01 < steven> well it kinda sucks
05:01 -!- enherit [~enherit@24-176-217-66.dhcp.lnbh.ca.charter.com] has joined
#go-nuts
05:03 -!- foocraft [~ewanas@89.211.248.245] has joined #go-nuts
05:03 < Bigbear1> how so?
05:03 < steven> just a lot of little things
05:04 < steven> for one thing, no generics, so we cant write things like
append() ourselves, or map() or reduce() etc
05:04 < steven> which is a big punch in the stomach
05:05 < Bigbear1> because you cannot use the names?
05:05 < steven> um, type names?
05:05 < steven> what?
05:05 < Bigbear1> why can't you write append()
05:06 -!- Adys [~Adys@unaffiliated/adys] has quit [Quit: Quit]
05:06 < steven> because you have to write it for every type you will need it
for.
05:06 < Bigbear1> sorry I'm new to Go and *nix for that matter can't even
get Go installed
05:06 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
05:06 < steven> oh.
05:06 < Bigbear1> as apposed to doing what?
05:06 < steven> then you might wanna come to my talk :)
05:07 < Bigbear1> come to Canada
05:07 < steven> fly me there :)
05:07 < Bigbear1> I'm coming from a C/c++ background
05:07 < steven> http://golang.org/doc/go_for_cpp_programmers.html
05:07 < steven> read that, you will enjoy it
05:07 < Bigbear1> yeah I am actually
05:07 < Bigbear1> from your other link
05:08 < Bigbear1> in C++ every class you would have would need an append
function
05:08 < Bigbear1> right?
05:08 < Bigbear1> wether you overload an operaor or w/e
05:08 < steven> the analogy in C++ to the append() function in Go, is an
append() function in C++
05:08 < steven> still just a function, maybe in its own namespace though
05:09 < Bigbear1> yeah I'm not sure
05:09 < Bigbear1> you mean a function which you pass the object that will be
appended and the other object to append to
05:10 < Bigbear1> and it works for all cases?
05:10 < steven> in Go, yes.
05:12 < taruti> Has anyone hacking on the toolchain stumbled on recursive
imports failing?  (importing all the recursively needed packages makes the bug go
away)
05:12 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
05:15 -!- mikespook [~mikespook@119.131.233.224] has quit [Read error: No route to
host]
05:15 < Bigbear1> steven are they going to fix those small things eventually
05:15 < Bigbear1> or are they like that because of something else
05:15 <+iant> doing something about generics is on the roadmap
05:15 -!- mikespook [~mikespook@119.131.233.224] has joined #go-nuts
05:17 < taruti> so e.g.  importing fmt panics during initialization, but
importing all the packages fmt depends on works, although syscall is not required.
05:19 < steven> Bigbear1: thats something only time will answer for you
<3
05:19 < steven> god bless you all, good night.
05:19 -!- benjack [~benjack@bb121-6-49-43.singnet.com.sg] has joined #go-nuts
05:20 < Bigbear1> what does fmt stand for?
05:26 < Bigbear1> so I installed it but I need to set the $GOROOT
05:26 < Bigbear1> how do I access my .profile
05:27 < zozoR> fmt = format
05:47 -!- Bigbear1 [~Cody@d75-158-140-53.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
05:49 -!- tvw [~tv@e176004041.adsl.alicedsl.de] has joined #go-nuts
06:05 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Read error:
Operation timed out]
06:16 -!- ab3 [~abe@ip-83-134-160-54.dsl.scarlet.be] has quit [Ping timeout: 252
seconds]
06:17 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
06:24 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
06:32 -!- benjack [~benjack@bb121-6-49-43.singnet.com.sg] has quit [Quit:
Leaving.]
06:32 -!- nkdnstbr [~nkdnstbr@li118-64.members.linode.com] has joined #go-nuts
06:46 -!- benjack [~benjack@bb121-6-49-43.singnet.com.sg] has joined #go-nuts
07:00 -!- ExtraSpice [XtraSpice@88.118.35.153] has joined #go-nuts
07:03 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
07:05 -!- enherit [~enherit@24-176-217-66.dhcp.lnbh.ca.charter.com] has quit
[Quit: leaving]
07:07 -!- nkdnstbr [~nkdnstbr@li118-64.members.linode.com] has quit [Read error:
Connection reset by peer]
07:10 -!- dropdrive [~dropdrive@cpe-72-227-159-70.nyc.res.rr.com] has quit [Read
error: Operation timed out]
07:11 < vegai> I really kinda wish they changed the name of the language,
though
07:12 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-177-80.clienti.tiscali.it] has
joined #go-nuts
07:16 -!- dropdrive [~dropdrive@cpe-72-227-159-70.nyc.res.rr.com] has joined
#go-nuts
07:22 -!- boomtopper
[~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has joined
#go-nuts
07:25 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 264 seconds]
07:31 -!- dropdrive [~dropdrive@cpe-72-227-159-70.nyc.res.rr.com] has quit [Read
error: Operation timed out]
07:35 -!- boomtopper
[~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has quit [Quit:
leaving]
07:36 -!- boomtopper
[~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has joined
#go-nuts
07:37 -!- dropdrive [~dropdrive@cpe-72-227-159-70.nyc.res.rr.com] has joined
#go-nuts
07:41 -!- Kafo [~Henry@a91-152-179-101.elisa-laajakaista.fi] has joined #go-nuts
07:49 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
07:50 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
07:52 -!- foocraft [~ewanas@89.211.248.245] has quit [Quit: Leaving]
07:57 -!- GeertJohan [~Squarc@ip4da06866.direct-adsl.nl] has joined #go-nuts
08:04 -!- GeertJohan [~Squarc@ip4da06866.direct-adsl.nl] has quit [Read error:
Operation timed out]
08:04 -!- GeertJohan [~Squarc@ip4da06866.direct-adsl.nl] has joined #go-nuts
08:09 -!- benjack [~benjack@bb121-6-49-43.singnet.com.sg] has quit [Quit:
Leaving.]
08:12 -!- foocraft [~ewanas@89.211.224.113] has joined #go-nuts
08:12 -!- napsy [~luka@193.2.66.6] has joined #go-nuts
08:17 -!- boomtopper
[~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has quit [Quit:
leaving]
08:19 -!- mikespook [~mikespook@119.131.233.224] has quit [Ping timeout: 240
seconds]
08:25 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-lnyorbccbikywdqh]
has quit [Ping timeout: 248 seconds]
08:26 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-ylsyyynhnxegxavn]
has joined #go-nuts
08:31 -!- mikespook [~mikespook@119.131.233.224] has joined #go-nuts
08:35 -!- foocraft [~ewanas@89.211.224.113] has quit [Quit: Leaving]
08:40 -!- foocraft [~ewanas@89.211.224.113] has joined #go-nuts
08:42 -!- foocraft [~ewanas@89.211.224.113] has quit [Client Quit]
08:43 -!- sebastianskejoe [~sebastian@188.114.142.217] has joined #go-nuts
08:48 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
joined #go-nuts
08:52 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has joined #go-nuts
09:10 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
09:20 -!- sebastianskejoe [~sebastian@188.114.142.217] has quit [Read error:
Operation timed out]
09:29 -!- nkdnstbr [~nkdnstbr@li118-64.members.linode.com] has joined #go-nuts
09:30 -!- nkdnstbr [~nkdnstbr@li118-64.members.linode.com] has quit [Client Quit]
09:30 -!- nkdnstbr [~nkdnstbr@li118-64.members.linode.com] has joined #go-nuts
09:33 -!- mikespook [~mikespook@119.131.233.224] has quit [Quit: Leaving.]
09:41 < Sebastian_> taruti: occasionally that might be caused by wrong order
of imports
09:41 < Sebastian_> tho that would really be a bug in the package(s) you
import
09:45 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote
host closed the connection]
10:02 -!- Stiletto [7f000001@69.195.144.4] has quit [Ping timeout: 250 seconds]
10:08 -!- Stiletto [7f000001@69.195.144.4] has joined #go-nuts
10:15 -!- GeertJohan [~Squarc@ip4da06866.direct-adsl.nl] has quit [Ping timeout:
240 seconds]
10:20 -!- napsy [~luka@193.2.66.6] has quit [Quit: leaving]
10:26 -!- wrtp [~rog@92.17.111.113] has joined #go-nuts
10:30 -!- TMKCodes [~TMKCodes@unaffiliated/tmkcodes] has quit [Ping timeout: 260
seconds]
10:36 < ognom> If I have a string that I wish to manipulate by adding a '/'
after every 4th character, what would be the easiest solution to accomplish that?
10:38 -!- Sep102_ [~Sep102@c-71-231-176-153.hsd1.wa.comcast.net] has joined
#go-nuts
10:42 -!- Sep102 [~Sep102@c-71-231-176-153.hsd1.wa.comcast.net] has quit [Ping
timeout: 260 seconds]
11:00 < Kafo> Simple http://pastie.org/1863695 comes first to my head
11:01 < Kafo> ognom: But I guess it fails with non-ascii characters.
11:02 < ognom> Kafo: Thanks, I'll check it out
11:15 < ognom> Kafo: Works like a charm, many thanks!
11:18 < Kafo> No problem :)
11:21 -!- l00t [~i-i3id3r_@189.105.102.222] has quit [Quit: Leaving]
11:30 -!- prip [~foo@host91-196-dynamic.17-79-r.retail.telecomitalia.it] has quit
[Ping timeout: 260 seconds]
11:33 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has quit [Quit:
Leaving.]
11:41 -!- artefon [~thiago@187.58.4.179] has joined #go-nuts
11:44 -!- prip [~foo@host200-120-dynamic.42-79-r.retail.telecomitalia.it] has
joined #go-nuts
11:47 -!- artefon [~thiago@187.58.4.179] has quit [Ping timeout: 240 seconds]
11:53 -!- Project-2501 [~Marvin@82.84.64.230] has joined #go-nuts
11:56 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-177-80.clienti.tiscali.it] has
quit [Ping timeout: 246 seconds]
11:59 -!- zerosanity [~josh@8.20.178.82] has joined #go-nuts
11:59 -!- artefon [~thiago@189.59.133.187] has joined #go-nuts
12:02 -!- prip [~foo@host200-120-dynamic.42-79-r.retail.telecomitalia.it] has quit
[Ping timeout: 276 seconds]
12:09 -!- PJRobins [~kvirc@184-100-100-163.mpls.qwest.net] has joined #go-nuts
12:15 -!- prip [~foo@host33-131-dynamic.47-79-r.retail.telecomitalia.it] has
joined #go-nuts
12:23 -!- zimsim [~simon@87.72.77.195] has joined #go-nuts
12:40 -!- ab3 [~abe@ip-83-134-160-54.dsl.scarlet.be] has joined #go-nuts
12:40 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
12:40 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has quit [Remote host closed
the connection]
12:40 < exch> Kafo: ranging over a string yields unicode rune indices
instead of bytes.  So that should work for multibyte characters as well
12:41 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has joined #go-nuts
12:41 < wrtp> exch: i don't think it will, because the character count will
be wrong
12:41 < wrtp> here's a version that works with unicode (and might be a bit
more efficient too): http://pastie.org/1863924
12:42 < exch> http://pastie.org/1863931
12:46 < wrtp> actually this should be better
12:46 < wrtp> http://pastie.org/1863940
12:46 < wrtp> (more efficient, i mean)
12:46 < wrtp> exch: the specification for the problem was that a '/' should
be inserted after every 4th *character*, not byte
12:47 < exch> I know
12:47 < wrtp> Kafo's solution above inserts after every byte, which can
split unicode characters
12:47 < wrtp> so it won't work properly with multibyte characters
12:50 < wrtp> the main efficiency problem with Kafo's solution is that it is
O(n^2) - it reallocates the string for each character
12:50 < wrtp> oh yeah, and it will lose bytes too
12:51 < xyproto> how many functions does a garbage collector consist of?
Would it be possible to unsafe.SetMyGCFuncMalloc(f) etc?  :P
12:56 < skelterjohn> never build a string with += on a string type
12:57 < wrtp> never say never...  sometimes it really doesn't matter
12:57 < skelterjohn> xyproto: if you are asking if it's possible to specify
your own allocator, no it isn't
12:57 < skelterjohn> but i have confidence that one day it wil be
12:57 < xyproto> skelterjohn: I'm asking if it should/could be a possibility
:)
12:57 < skelterjohn> wrtp: sure, sometimes clarity reigns
12:57 < xyproto> skelterjohn: and I agree on the += vs buffers standpoint.
Perhaps compiler can optimize += for strings to use buffers, somehow?
12:58 < wrtp> xyproto: it can't do that
12:58 < skelterjohn> of course it can - the compiler can make any changes to
the code it wants to
12:58 < wrtp> unless strings were changed to include cap as well as len
12:58 < skelterjohn> as long as it has the same behaviors
12:58 < skelterjohn> wrtp: it would just use a []byte instead of a string
12:59 < wrtp> i suppose it could for local variables
12:59 < skelterjohn> now, it's a difficult optimization and one i never hope
to see in go :)
13:00 < xyproto> skelterjohn: not even if it was a different operator for
it?  like .= or something?  :P
13:00 < wrtp> a more useful optimisation (and an equivalent one, i think)
would be to avoid the allocation when doing string([]byte)
13:00 < skelterjohn> then that wouldn't be a compiler optimization
13:00 < xyproto> skelterjohn: true, true
13:00 < skelterjohn> it would be a new language feature
13:00 -!- plainhao [~plainhao@208.75.85.237] has joined #go-nuts
13:01 < skelterjohn> wrtp: i bet that will happen one day - if the []byte
can be shown to never be modified
13:01 < wrtp> yup
13:01 < xyproto> wrtp: and just use the allocated []byte directly?
13:01 < wrtp> yes
13:01 < xyproto> wrtp: sounds smart to me
13:01 < wrtp> escape analysis will enable a lot of cool optimisations in go
13:02 < skelterjohn> at the moment i think they're trying to keep too much
analysis out of the compiler
13:02 < skelterjohn> analysis hurts compilation time
13:02 < wrtp> they're definitely going to do some escape analysis in the
future
13:02 < wrtp> it's been mentioned quite a few times
13:02 < skelterjohn> i think a good easy one would be seeing when var
addresses actually escape
13:03 < wrtp> yeah, but to do it right you have to do it across function
calls
13:03 < wrtp> when you can do that, you can avoid many allocations
13:03 < xyproto> nice
13:03 < wrtp> (at least, you can stack allocate rather than heap allocate)
13:06 -!- Project-2501 [~Marvin@82.84.64.230] has quit [Quit: E se abbasso questa
leva che succ...]
13:08 -!- GeertJohan [~Squarc@ip4da06866.direct-adsl.nl] has joined #go-nuts
13:12 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 252 seconds]
13:18 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
13:30 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 276 seconds]
13:40 -!- iant [~iant@67.218.109.241] has joined #go-nuts
13:40 -!- mode/#go-nuts [+v iant] by ChanServ
13:48 < chressie> using bytes.Buffer usually leads to a clean solution when
you have to deal with a lot of string concats..
13:48 < chressie> http://pastie.org/1864157
13:57 -!- Simiolus [~simiolus@p578ED202.dip.t-dialin.net] has joined #go-nuts
13:57 < xyproto> chressie: why len(s)*2 ?
13:58 < chressie> it might be possible that we add as much / as the string
has characters
13:58 < chressie> this avoids reallocation of the internal buffer
13:58 < chressie> (i hope :) )
14:00 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
14:10 -!- Simiolus [~simiolus@p578ED202.dip.t-dialin.net] has left #go-nuts ["Once
you know what it is you want to be true, instinct is a very useful device for
enabling you to know that it is"]
14:10 < exch> there will be only runecount(s)/n number of slashes
14:12 < wrtp> len(s) * 2 is easier to say than len(s) + ((len(s) + n - 1) /
n) * n
14:13 < wrtp> and it doesn't matter too much because the buffer will be
thrown away anyway
14:13 < exch> not len(s).  that yields bytes, not runes
14:13 < wrtp> chressie: BTW you can use b.String() rather than
string(b.Bytes())
14:13 < wrtp> exch: we want an overestimate, so len(s) is fine
14:14 < exch> why overestimate when you can have the precise length?
14:14 < wrtp> you can't have a precise length without counting the
characters in s, for which you have to traverse the whole string
14:14 < wrtp> which is unnecessary
14:14 -!- vsayer [~vivek@c-67-170-236-166.hsd1.ca.comcast.net] has quit [Ping
timeout: 260 seconds]
14:15 < wrtp> chressie: BTW i like your solution
14:15 < exch> there is an expensive string -> []int conversion in that
loop anyway.  Might as well use it
14:15 < exch> http://pastie.org/1864250
14:16 < wrtp> exch: where's the string -> []int conversion?
14:16 < exch> the range statement
14:16 < wrtp> that doesn't convert to []int
14:17 < exch> it loops over runes
14:17 < wrtp> it gives each character in turn
14:17 < wrtp> no allocation involved
14:17 < exch> mm
14:18 < wrtp> converting string to []int does the loop twice, once to
determine the number of characters; next to actually put them into the []int
14:18 < exch> fair enough
14:18 < chressie> wrtp: b.String() that's right..  i forgot about that
14:21 < chressie> i think it's easier and more readable to allocate *the*
upper bound, if there's any
14:21 < chressie> forget 4 gb strings ;)
14:21 < wrtp> chressie: do you mean "least upper bound"?
14:22 < wrtp> there are many upper bounds...
14:23 < chressie> yeah, the size that any result will fit in, but not more
14:23 < wrtp> i think that len(s)*2 is just fine - it's obviously right, and
the extra space is unlikely to be a problem
14:24 < chressie> i agree
14:26 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
14:28 -!- imsplitbit [~imsplitbi@64.39.4.132] has joined #go-nuts
14:29 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
14:30 -!- uiltrix [~uiltrix@c9345547.virtua.com.br] has joined #go-nuts
14:30 -!- virtualsue [~chatzilla@nat/cisco/x-bqgbgkrtpgjnjzuy] has quit [Ping
timeout: 240 seconds]
14:38 -!- saschpe [~quassel@opensuse/member/saschpe] has joined #go-nuts
14:55 -!- iant [~iant@67.218.109.241] has quit [Quit: Leaving.]
14:57 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 240
seconds]
15:04 -!- GeertJohan [~Squarc@ip4da06866.direct-adsl.nl] has quit [Quit: Leaving.]
15:05 -!- TMKCodes [~TMKCodes@unaffiliated/tmkcodes] has joined #go-nuts
15:07 -!- iant [~iant@216.239.45.19] has joined #go-nuts
15:07 -!- mode/#go-nuts [+v iant] by ChanServ
15:09 -!- artefon [~thiago@189.59.133.187] has quit [Quit: bye]
15:12 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
15:16 -!- zimsim [~simon@87.72.77.195] has quit [Remote host closed the
connection]
15:17 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Ping timeout: 276 seconds]
15:18 -!- Venom_X [~pjacobs@66.54.185.131] has joined #go-nuts
15:18 -!- Wiz126 [Wiz@h187.120.232.68.ip.windstream.net] has quit []
15:23 < vegai> anyone working on an openbsd port?
15:28 < xyproto> wrtp: thanks for the len(s)*2 explanation
15:30 -!- iant [~iant@216.239.45.19] has quit [Ping timeout: 252 seconds]
15:31 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts
15:31 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.]
15:32 < xyproto> wrtp: you never fail to write good, knowledgeable and
insightful stuff.  You're the closest thing to a Go oracle I know of.  Really.
(Just to build up some expectations ;) )
15:33 < mpl> vegai: if anyone is, I'd say devon o'dell.
15:33 < mpl> I don't think he hangs around here though.
15:33 < mpl> oh he is.
15:34 < mpl> evildho: 17:27 < vegai> anyone working on an openbsd
port?
15:34 < vegai> :)
15:34 * wrtp blushes.
15:35 < wrtp> xyproto: thanks - but the real go oracle is probably rsc...
15:35 * mpl jumps on the opportunity
15:35 < aiju> 16:25 < chressie> forget 4 gb strings ;)
15:35 < xyproto> wrtp: :)
15:35 < mpl> wrtp: if I may ask, what do you do for a living?
15:35 < aiju> as a fun side note, some x86 CPUs freeze if you try to work
with strings larger than 4 GB
15:36 < aiju> (using string instructions, that is)
15:36 < wrtp> mpl: look for jobs, currently :-)
15:36 < mpl> heh.  that may be the best "job" to give one enough time to
play with go during the day ;)
15:37 < wrtp> :-)
15:37 < aiju> Go code in production ...
15:42 -!- iant [~iant@nat/google/x-bovfoopcylzpyaqq] has joined #go-nuts
15:42 -!- mode/#go-nuts [+v iant] by ChanServ
15:45 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
15:46 -!- petrux_ [~petrux@host16-224-static.53-82-b.business.telecomitalia.it]
has joined #go-nuts
15:46 -!- petrux_ [~petrux@host16-224-static.53-82-b.business.telecomitalia.it]
has quit [Client Quit]
15:48 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
15:49 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
quit [Ping timeout: 276 seconds]
15:49 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
15:49 -!- TMKCodes [~TMKCodes@unaffiliated/tmkcodes] has quit [Read error:
Connection reset by peer]
15:58 -!- cco3 [~conleyo@nat/google/x-srcennqevhqvtwjf] has joined #go-nuts
16:11 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:11 -!- artefon [~thiago@dhcp17.usuarios.dcc.ufmg.br] has joined #go-nuts
16:12 -!- enherit [~enherit@205.147.6.118] has joined #go-nuts
16:12 -!- enherit [~enherit@205.147.6.118] has quit [Client Quit]
16:13 -!- enherit [~enherit@205.147.6.118] has joined #go-nuts
16:15 -!- enherit [~enherit@205.147.6.118] has quit [Client Quit]
16:16 -!- TMKCodes [~TMKCodes@unaffiliated/tmkcodes] has joined #go-nuts
16:17 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
16:17 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
16:18 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
16:24 -!- saschpe [~quassel@opensuse/member/saschpe] has quit [Remote host closed
the connection]
16:28 -!- zozoR2 [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
16:30 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 258
seconds]
16:31 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
16:33 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
hcatlin]
16:35 -!- Bigbear1 [~Cody@d75-158-140-53.abhsia.telus.net] has joined #go-nuts
16:41 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
16:42 < jeremy_c> Is there a ChangeLog document for various releases?  I
upgraded to the latest release and my Open() code ceased to work.  That's fine,
just wondering if there is a heads up doc somewhere.
16:43 < mpl> jeremy_c: hg log ?
16:43 < pharris> jeremy_c: There is.  While we're looking for it, "gofix ."
in your project should fix it up.
16:43 < mpl> jeremy_c: besides, gofix may fix that.
16:43 < pharris> That's one of the more useful things that's new in this
release.
16:44 < jeremy_c> mpl: sure, that will work but pretty hard to find
something.  would be nice to have a change log: Bugs Fixed: 123, 456, New
features: ABC, XYZ, API Breaks: XXX, YYY.
16:45 < jeremy_c> pharris: I did read about gofix, but my project is small,
only had two compile errors.  Wanted to go to the docs anyway to see how it
changed to learn the new API.
16:46 < pharris>
http://go.googlecode.com/hg/doc/devel/weekly.html#2011-04-27
16:46 < jeremy_c> pharris: thanks!
16:47 < mpl> jeremy_c: btw, the changelogs are usually posted to the ml at
each release, so you can also find them on google groups.
16:48 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has left #go-nuts
[]
16:48 < Bigbear1> I followed the installation guide but 6g is an unknown
command
16:48 < Bigbear1> I think I have to set my path variables but I am not sure
how
16:49 < Soultaker> Bigbear1: which OS?
16:49 < Bigbear1> Ubuntu
16:49 < Soultaker> Ok. Where did you install 6g?
16:49 < Bigbear1> I put it in Document/go
16:49 < jeremy_c> I use MicroEmacs (www.jasspa.com) and recently wrote a
mode for Go for it (syntax highlighting, folding and function browsing).  Is that
of interest to the people maintaining the misc/* stuff?
16:49 < Bigbear1> but then I tried to put it in home/go and it failed to
pass all the tests
16:50 < Soultaker> hmm.  can you call it directly?  e.g.  with
$HOME/go/bin/6g?
16:52 < Bigbear1> so what would my full path be?
16:52 < Bigbear1> in Documents/go
16:53 < Bigbear1> ok so I call it and it says "it is a directory"
16:54 < Bigbear1> my full path for the install that passed all test was
home/cody/Documents/go 6g
16:54 < Soultaker> does /home/cody/Documents/go/bin/6g work?
16:55 < Bigbear1> a bunch of flags pop up
16:56 < Soultaker> so that command does work right?  it says something like:
"usage: 6g file.go"?
16:56 < Soultaker> in that case, you just need to add that directory to your
path
16:56 < mpl> then all you need is 'export
PATH=$PATH:/home/cody/Documents/go/bin'
16:57 < Soultaker> yup.  put that at the bottom of /home/cody/.bashrc if
that exists.
16:57 < Soultaker> then restart your shell, and you should be good to go.
16:58 < Bigbear1> I don't understand what you mean by put that at the bottom
of .bashrc
16:59 -!- gedevan [~gedevan@83.167.106.253] has joined #go-nuts
17:00 < mpl> Bigbear1: he meant add the line I gave you to the end of that
file, then save it.
17:00 < mpl> that file is read everytime you open a new shell.  hence you
can set there whatever you want to be done for any new shell you open.
17:01 -!- Bigbear11 [~Cody@d75-158-140-53.abhsia.telus.net] has joined #go-nuts
17:01 -!- Bigbear1 [~Cody@d75-158-140-53.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
17:01 < Bigbear11> so it does not exist so I have to make it?
17:02 < Bigbear11> ok I guess it does when I opened it
17:02 -!- uiltrix [~uiltrix@c9345547.virtua.com.br] has quit [Quit: Leaving]
17:03 -!- keithgcascio [~keithcasc@nat/google/x-wauebsfgsqjwykty] has joined
#go-nuts
17:08 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Quit: skelterjohn]
17:23 -!- Project_2501 [~Marvin@82.84.82.119] has joined #go-nuts
17:23 < Bigbear11> does go have syntax highlighting?
17:24 < Soultaker> (filenames that start with a dot are "hidden"; they are
not displayed by ls unless you add the -a option.  this is probably why you didn't
see it)
17:24 < Soultaker> Bigbear11: depends entirely on which editor you use :)
17:25 < Bigbear11> I am using nano because I only know of that and vi
17:25 < Bigbear11> and I don't know how to exit vi
17:25 < mpl> :q to quit, :wq to save and quit in vi.
17:25 < Soultaker> Have a look here: http://go-lang.cat-v.org/text-editors/
17:25 < Soultaker> there are probably better ways to start than with nano
17:25 < mpl> afaik there's a syntax highlighting conf file for vi.
17:26 < Soultaker> for vim, yes.
17:26 < Soultaker> vi does not do any syntax highlighting.
17:26 < mpl> true.
17:27 < Bigbear11> I rember vi doing syntax for c++ no?
17:27 < Bigbear11> these editors are not from the terminal though?
17:27 <+iant> good random number generator: start up vi for somebody who
doesn't know it and record the keystrokes they use to get out of it
17:27 < mpl> iant: :D
17:27 < mpl> q
17:28 < mpl> ^C
17:28 < mpl> quit damnit
17:28 < Bigbear11> would you guys suggest GolangIDE?  or gogo?
17:28 < mpl> etc...
17:28 < mpl> ;)
17:28 < mpl> I'd suggest acme, but it's not a popular choice here.
17:28 < Soultaker> I like Kate, but ymmv
17:29 < Soultaker> it has a good editor and a terminal window to run the
compiler in.
17:30 < mpl> Bigbear11: gedit is probably installed by default on your
ubuntu, you could start with that.
17:30 -!- Fish [~Fish@88.162.170.133] has joined #go-nuts
17:31 < Bigbear11> mpl ok cool now how do I get syntax highlighting
17:31 < Bigbear11> also why doesn't the website have syntax highlighitng?
17:31 < Bigbear11> also how do I change my resolution
17:32 < mpl> no idea, I don't use it.  go through the menus.
17:32 < mpl> http://go-lang.cat-v.org/text-editors/gedit/
17:37 < Bigbear11> why can't I graphically copy and paste it in that folder
17:42 -!- TheMue [~TheMue@p5DDF4D69.dip.t-dialin.net] has joined #go-nuts
17:43 < mpl> Bigbear11: probably because you can't do it as a regular user.
17:44 < Bigbear11> yeah I sudo made a new and copied and pasted
17:44 < mpl> lol
17:44 < Bigbear11> :)
17:44 < mpl> you could have sudo mv it
17:44 < Bigbear11> I'm brand new to *nix
17:44 -!- tvw [~tv@e176004041.adsl.alicedsl.de] has quit [Ping timeout: 240
seconds]
17:45 < Bigbear11> so I thought to declare a stuct in Go you say var myVar
struct
17:45 < Bigbear11> but in the wiki codelab it has type Page struct {
17:46 <+iant> use "var" to name a variable, use "type" to name a type
17:49 < Bigbear11> also it has the line ending in a {
17:49 < Bigbear11> which then adds a semicolon
17:49 < Bigbear11> that is also ok?
17:49 <+iant> a semicolon is not added to a line which ends in {
17:50 < Bigbear11> oh ok
17:54 < Kafo> Creating new types in Go always makes me smile.
17:54 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
17:54 -!- Kafo [~Henry@a91-152-179-101.elisa-laajakaista.fi] has left #go-nuts []
17:55 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts
17:55 -!- Kafo [5b98b365@gateway/web/freenode/ip.91.152.179.101] has joined
#go-nuts
17:55 < Bigbear11> seems wierd to have the type both infront and behind
17:56 < Bigbear11> also if a func has no parameters why do we need ()
17:58 <+iant> the type is not both in front and behind, not sure what you
mean by that
17:58 <+iant> the parentheses are optional for the result parameters, so
they can not also be optional for the regular parameters
18:02 < Bigbear11> in the same example
18:02 < Bigbear11> Title string
18:02 < Bigbear11> no var
18:03 <+iant> sorry, I don't know what you mean
18:03 <+iant> I don't know what example you are referring to
18:04 < Bigbear11> http://golang.org/doc/codelab/wiki/
18:04 <+iant> Where I see "Title string" it is a field in a struct
18:05 <+iant> not a variable
18:05 <+iant> the type is "string" and it appears in only one place
18:05 <+iant> the name of the struct field is "Title"
18:05 < Bigbear11> ok
18:05 <+iant> that segment defines "Page" as a type which is a struct with
two fields
18:06 < Bigbear11> also fmt.Println(string(p2.Body)) is type first because
it is a pointer?
18:07 <+iant> the occurrence of "string" is a type conversion
18:07 <+iant> it is converting p2.Body, of type []byte, to type string
18:08 <+iant> because Println treats values of type []byte differently from
values of type string
18:09 -!- photron_ [~photron@port-92-201-85-162.dynamic.qsc.de] has joined
#go-nuts
18:10 < Bigbear11> ok how come that line prints more than one line
18:10 < Bigbear11> and if there is no newline character at the end it adds
one
18:11 <+iant> if the string passed to fmt.Println has any newline
characters, then fmt.Println will print multiple lines
18:11 <+iant> and fmt.Println always prints a newline at the end
18:11 < Kafo> C++ is pretty damn annoying after using Go for few months
18:11 -!- kr [~Keith@c-24-5-193-165.hsd1.ca.comcast.net] has joined #go-nuts
18:12 <+iant> http://golang.org/pkg/fmt/#Println
18:12 < Kafo> Compile times feel like forever
18:13 < Kafo> I have time to get a new cup of coffee during compiling though
18:14 -!- nkdnstbr [~nkdnstbr@li118-64.members.linode.com] has quit [Quit:
leaving]
18:22 < aiju> haha
18:22 < aiju> Kafo: try using Verilo
18:22 < aiju> +g
18:22 < aiju> with the Xilinx tools, compiling times are about 5 minutes or
more for *100 lines of code*
18:23 < skelterjohn> or try K, where just looking at one line of code takes
about ten minutes
18:23 < aiju> hahahahahahahahahaha
18:24 < aiju> skelterjohn: being good at it reduces to time to five minutes
18:24 < aiju> gcd:{[a]{[b]*{:[x[1];(x[1]),x[0]!x[1];x]}/(a,b)}}
18:25 < aiju> c'mon, it's bloody damn obvious
18:25 < Kafo> skelterjohn: Isn't K similar to APL?
18:25 -!- boomtopper
[~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has joined
#go-nuts
18:25 < aiju> Kafo: yes
18:25 < skelterjohn> i don't know APL
18:25 < aiju> Kafo: http://aiju.de/code/k/
18:25 < skelterjohn> in git, if i have two branches, release and master, how
to i push master into release?
18:25 < Kafo> It's interesting one.  Maybe not suitable for my head but I
find it really interesting.  :D
18:26 < aiju> Kafo: look at my tictactoe program
18:26 < skelterjohn> aiju: if you're not careful, your K tic tac toe program
will become the defining contribution of your life
18:26 < aiju> hahahahahaha
18:27 < aiju> i'll be in encyclopedias nevertheless
18:27 < aiju> aiju (n.): guy who wrote a tictactoe program in the K
programming language and saved humanity from extinction thereby
18:29 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
18:30 < Kafo> aiju: I should rewrite my brain to interpret K.
18:31 < Kafo> Maybe some day I'll understand what saved the humanity from
extinction.
18:31 < aiju> hahahaha
18:34 < Kafo> What languages are capable of doing cross-platform game-like
program without much problems?
18:35 < aiju> none
18:35 < Kafo> Game-like as in 3D and audio
18:35 < aiju> C is close
18:35 < Namegduf> C with appropriate library selection is best for complex
games, out of what I know of.
18:36 < Kafo> Aren't C++ and Java decent for that too?
18:36 < Namegduf> Python is also an option.
18:36 < skelterjohn> not really
18:36 < aiju> C++ and Java are decent for fucking your brain
18:36 < skelterjohn> using java for cross platform 3D stuff is hugely
painful
18:36 < aiju> s/for.*stuff//
18:36 < Namegduf> Java is pretty awful and runs slow.  It *works* maybe.
18:36 < Namegduf> C++ can be used if you need to talk to a C++ library, but
C is less horribly complex.
18:37 < aiju> libraries: opengl period
18:37 < Soultaker> Namegduf: but Minecraft!
18:37 < aiju> minecraft is the best example why you don't write games in
java
18:37 < skelterjohn> minecraft is a great idea, not a great code base
18:37 < Soultaker> ok, that airplane game then?
18:37 < aiju> skelterjohn is being way too nice with that statement
18:37 < skelterjohn> it's important to not confuse the too
18:38 < skelterjohn> well, i've never played minecraft.  i just know it's
very popular, so i'm assuming it's a great idea.
18:38 < aiju> the idea is okay
18:38 < aiju> the implementation is HORRIBLE
18:38 < aiju> i had my inventory contents randomly disappearing
18:39 -!- jyxent [~jyxent@129.128.191.96] has quit [Quit: leaving]
18:39 -!- jyxent [~jyxent@129.128.191.96] has joined #go-nuts
18:40 < aiju> 20:40 < Namegduf> Python is also an option.
18:40 < aiju> python for gamedev?
18:40 < skelterjohn> yes
18:40 < skelterjohn> python + pygame
18:40 < skelterjohn> for simple stuff
18:40 < Soultaker> this is also Java:
http://www.youtube.com/watch?v=Cqh2VXQ99mo
18:40 < aiju> tictactoe
18:40 < skelterjohn> can easily do 2d sprite games
18:40 < aiju> Soultaker: given enough thrust even a brick will fly
18:40 < aiju> 20:39 < Kafo> Game-like as in 3D and audio
18:40 < skelterjohn> anything complex (gamedev or not) and i wouldn't use
python
18:41 < Soultaker> in fact, it runs in your browser:
http://altitudegame.com/playnow
18:41 < aiju> not in mine
18:41 < KirkMcDonald> http://blip.tv/file/4882916
18:41 < KirkMcDonald> (On the subject of 3D in Python.)
18:41 < Soultaker> but anyway, that was not 3d.
18:42 < Soultaker> (still a pretty cool game, and it doesn't even run as
crappy as Minecraft)
18:42 < aiju> KirkMcDonald: hell, you can use BASIC for 3D
18:42 < aiju> and again
18:42 < aiju> 20:44 < aiju> Soultaker: given enough thrust even a
brick will fly
18:42 < skelterjohn> i find python code to be too free-form for complex
projects
18:42 < skelterjohn> i know i can enforce structure on my own
18:42 < skelterjohn> but it's too easy to forget
18:43 < Namegduf> Soultaker: "People use it" is not a legitimate argument
for why it is good for something.
18:43 < KirkMcDonald> Mandatory code reviews are a good thing.
18:43 < KirkMcDonald> (I work on a large Python code base for a living.)
18:43 * aiju pats KirkMcDonald
18:43 -!- jyxent [~jyxent@129.128.191.96] has quit [Client Quit]
18:44 -!- jyxent [~jyxent@129.128.191.96] has joined #go-nuts
18:44 < uriel> 18:38 < aiju> the implementation is HORRIBLE
18:44 < uriel> hey, it is java, what did you expect?
18:44 < Kafo> There should be some cross-platform miracle that would fix all
problems in the world.
18:45 < skelterjohn> i think cross-platform-ability is overrated
18:45 < aiju> uriel: not something THAT horrible
18:45 < skelterjohn> just pick your demographic and get over it
18:45 < uriel> in any case, if somebody is interested, they are working on a
minecraft multi-player server written in Go: https://github.com/huin/chunkymonkey
18:45 < aiju> but i don't expect much from a guy who calls git "evil"
18:45 < Soultaker> as Unix/Linux user I do like cross-platform-abilitity
18:45 < aiju> skelterjohn: ack
18:45 < Soultaker> because without it everybody would develop for Windows
and I'd be screwed.
18:46 < skelterjohn> i wouldn't
18:46 < aiju> i just run windows for games
18:46 < aiju> (if i play any games at all)
18:46 < skelterjohn> i used to, until my windows machine committed seppuku
18:46 < Kafo> It kinda stinks that I use mostly Linux but almost everyone
using my programs use Windows.
18:46 < aiju> Kafo: games?  ;P
18:47 < skelterjohn> porn chatrooms, i'm guessing
18:47 -!- awidegreen_ [~quassel@178.63.120.5] has joined #go-nuts
18:47 -!- artefon [~thiago@dhcp17.usuarios.dcc.ufmg.br] has quit [Quit: bye]
18:47 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Ping
timeout: 240 seconds]
18:47 < Kafo> aiju: Those too.
18:48 < aiju> Kafo: C + OpenGL + SDL (glue)
18:48 < aiju> should work on Windows, Linux, OS X
18:49 < aiju> you have to do some hacks for Windows, though
18:51 < aiju> contrary to popular (academic?) opinion, C code can be very
portable if you do it right
18:51 < skelterjohn> man, SDL cracks me up sometimes
18:51 < aiju> even more portable than Java and what not
18:51 < skelterjohn> with their "#define main SDL_main"
18:52 < skelterjohn> what's great is when you use two libraries that do this
18:52 < aiju> skelterjohn: SDL is stupid, yeah
18:52 -!- Sep102_ [~Sep102@c-71-231-176-153.hsd1.wa.comcast.net] has quit [Quit:
Leaving]
18:52 < aiju> GLUT or something might be a better idea; i haven't tried
18:53 < skelterjohn> exch is working on glfw
18:53 < skelterjohn> which is like glut but without all the horribleness
18:53 < Kafo> I think SFML is similar to SDL
18:53 < KirkMcDonald> So clearly what we need is an SDL replacement written
in Go.
18:53 < Kafo> And it looks decent.
18:54 < exch> there's not much work to be done on glfw.  The only thing it
currently needs to be finished is working callbacks from c -> go
18:54 -!- Sep102 [~Sep102@c-71-231-176-153.hsd1.wa.comcast.net] has joined
#go-nuts
18:54 < skelterjohn> exch: you should try to push it to the main repository
18:55 < skelterjohn> we need to get visual stuff in the distribution
18:55 < skelterjohn> and not exp/draw/x11
18:55 < skelterjohn> that is horrible
18:55 < exch> it is pure Go though.  glfw isn't.  I'm not sure how the go
team feels about having C bindings in the standard lib
18:57 < skelterjohn> it also depends on the Go-OpenGL project, if i remember
right
18:57 < exch> only if you want to actually draw stuff :p
18:57 < exch> opening a window will work fine without opengl
18:58 < skelterjohn> oh right
18:58 < skelterjohn> so, not a direct dependence
18:58 < exch> but considering the window is created with an opengl context,
it wont be of much use for anything else
18:59 -!- ab3 [~abe@ip-83-134-160-54.dsl.scarlet.be] has quit [Ping timeout: 240
seconds]
19:00 < uriel> skelterjohn: what is wrong with exp/draw/x11?
19:00 < skelterjohn> can't resize the window, for one
19:00 < uriel> exp/draw is much nicer than most other drawing libs
19:01 < uriel> skelterjohn: is there an issue for that?
19:01 < aiju> i'd expect exp/draw to be broken
19:01 < skelterjohn> i dunno
19:01 < skelterjohn> also, on my computer (a mac) it starts the x11
application and looks stupid
19:01 < skelterjohn> x11 is not the way to go for multi-platform drawing
19:01 < uriel> skelterjohn: then write exp/draw/osx or whatever
19:01 < skelterjohn> i was just scrolling through developer.apple.com
references
19:02 < uriel> skelterjohn: that is why exp/draw exists
19:02 < skelterjohn> looking for stuff on 2d drawing
19:02 < aiju> uriel: you'd need to link to objective C or so
19:02 < aiju> objective-cgo!
19:02 < skelterjohn> aiju: you can do anything with regular C
19:02 < aiju> okay
19:02 < skelterjohn> it's just not as well documented
19:02 < aiju> haha
19:02 < aiju> i love how OS X identifiers start with NS
19:02 < exch> exp/draw/x11 has no facility to specify the initial window
size.  which is pretty gay tbh.
19:02 < skelterjohn> next step here we go
19:02 < aiju> that abbreviation is used in germany for national socialism
19:02 < aiju> fits perfectly
19:03 < skelterjohn> yeah - x11 clearly is attracted to other drawing API's
of the same gender =p
19:03 < aiju> skelterjohn: gay is another meaning
19:03 < aiju> x11 is pretty happy
19:03 < aiju> s/is/has
19:03 < skelterjohn> that's where the new meaning came from, originally
19:03 < aiju> i know
19:04 < skelterjohn> it used to be that an unmarried older man was referred
to as gay because he was happy (presumably because he had no wife to bring him
down)
19:04 < skelterjohn> but the term was subvereted
19:04 < skelterjohn> subverted
19:07 < skelterjohn> however, i love my wife dearly (this last bit in case
she feels like nosing through my IRC logs)
19:11 -!- zozoR2 [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Read error:
Connection reset by peer]
19:12 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
19:17 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
19:17 -!- zozoR2 [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
19:17 -!- skelterjohn_ [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts
19:17 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Read error:
Connection reset by peer]
19:19 < skelterjohn> i'm finding it very difficult to locate an example of a
C program that pops up a window on os x
19:19 < aiju> popping up windows considered harmful
19:20 -!- ww [~ww@2.98.88.157] has joined #go-nuts
19:21 -!- foocraft [~ewanas@78.100.176.128] has joined #go-nuts
19:21 < pharris> skelterjohn: The C API has been deprecated.  They really
want you to use ObjC.
19:21 < skelterjohn> perhaps go to C to ObjC is the answer
19:22 * ww thinks of matrioshka doll
19:23 -!- cenuij [~cenuij@93.26.130.28] has joined #go-nuts
19:23 -!- cenuij [~cenuij@93.26.130.28] has quit [Changing host]
19:23 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
19:32 -!- foocraft_ [~ewanas@89.211.208.39] has joined #go-nuts
19:35 -!- foocraft [~ewanas@78.100.176.128] has quit [Ping timeout: 240 seconds]
19:37 -!- artefon [~thiago@189.59.133.187] has joined #go-nuts
19:50 < skelterjohn> god, the os x APIs are garbage
19:51 < skelterjohn> i hate t
19:51 < skelterjohn> heir
19:51 < skelterjohn>
19:51 < skelterjohn> wtf
19:51 < skelterjohn> i hate their whole system of doing things
19:53 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
19:57 * uriel just hates Apple and all that is Apple-related, specially
apple-fanboys
20:03 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has joined #go-nuts
20:04 -!- pothos_ [~pothos@111-240-168-232.dynamic.hinet.net] has joined #go-nuts
20:04 -!- zerosanity [~josh@8.20.178.82] has quit [Remote host closed the
connection]
20:05 -!- pothos [~pothos@111-240-171-155.dynamic.hinet.net] has quit [Ping
timeout: 240 seconds]
20:09 -!- zerosanity [~josh@8.20.178.82] has joined #go-nuts
20:10 -!- zerosanity [~josh@8.20.178.82] has quit [Remote host closed the
connection]
20:14 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has joined #go-nuts
20:14 -!- xash [~xash@d062194.adsl.hansenet.de] has joined #go-nuts
20:17 -!- zerosanity [~josh@8.20.178.82] has joined #go-nuts
20:18 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has left #go-nuts []
20:18 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts
20:18 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has left #go-nuts []
20:18 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts
20:19 < Bigbear11> are there any problem exercises
20:19 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Quit: skelterjohn]
20:20 < Bigbear11> I learn best by trying
20:20 < kamaji> project euler :D
20:20 < kamaji> it's not go-specific
20:20 < kamaji> but it's superfuntimes
20:20 < Bigbear11> there should be some on the website
20:21 < kamaji> there are, www.projecteuler.net ~~
20:23 < Bigbear11> k well I had an account and I forgot my username which is
required for a password reset
20:23 < Bigbear11> and don't really help you learn to program
20:23 < kamaji> you kidding?
20:23 < kamaji> project euler rules
20:23 < kamaji> Recommended by Google
20:24 -!- foocraft_ [~ewanas@89.211.208.39] has quit [Ping timeout: 252 seconds]
20:24 < kamaji> Could always make up a project and do it
20:24 -!- photron_ [~photron@port-92-201-85-162.dynamic.qsc.de] has quit [Ping
timeout: 276 seconds]
20:24 -!- foocraft_ [~ewanas@78.100.172.205] has joined #go-nuts
20:26 -!- virtualsue
[~chatzilla@cpc6-haye15-0-0-cust61.haye.cable.virginmedia.com] has joined #go-nuts
20:29 < Bigbear11> fine I guess I will make a new account
20:29 -!- chimes [~chimes@24.104.130.118] has quit [Quit: chimes]
20:29 < kamaji> *grumble grumble* :P
20:29 < kamaji> How far did you get before?
20:29 < kamaji> Someone told me "topcoder" is also good, plus they give out
cash prizes
20:29 < kamaji> I've not used it tho
20:30 < kamaji> oh actually it looks pretty good
20:30 -!- alanliang [~yogafire@c-71-204-189-190.hsd1.ca.comcast.net] has joined
#go-nuts
20:32 < mpl> kamaji: project euler is fun in itself but not so great for
learning a new language, because it doesn't really push you to use the language
particularities.
20:33 < kamaji> I dunno, I was thinking about that, but I found it useful to
learn haskell
20:33 < kamaji> although I guess in haskell you can get away with not really
doing much 'real-world' stuff, so maybe that's true
20:33 -!- zozoR2 [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 260
seconds]
20:34 < kamaji> ok yeah, point taken.
20:34 < mpl> I doubt one would naturally come to use Interfaces or
goroutines while solving some project euler stuff
20:34 < mpl> unless they already know it and in that case the point is moot
;)
20:34 < kamaji> Ok position reversed :D
20:35 < kamaji> In that case: make a chat server
20:35 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
20:35 < kamaji> seems like a good application :3
20:35 -!- awidegreen_ [~quassel@178.63.120.5] has quit [Ping timeout: 252 seconds]
20:35 < tux21b> There is also a website called
http://www.pythonchallenge.com/ which has some nice tasks (and most of them are
highlighting features of python).  You do not need any math/algorithm background
for that (unlike project euler and topcoder)
20:35 < mpl> Bigbear11: isn't there anything easy that you need for
yourself.  I always find it more motivating to code things I actually need :)
20:35 < kamaji> Things you need is definitely the best way to go
20:36 < Namegduf> Things you need or want, yeah.
20:36 < kamaji> I always end up writing bad chat servers though
20:36 < kamaji> and I neither need nor want them :D
20:38 < Bigbear11> mpl well that would be remaking things I have already
made
20:38 -!- zerosanity [~josh@8.20.178.82] has quit [Read error: Connection reset by
peer]
20:41 -!- TheMue [~TheMue@p5DDF4D69.dip.t-dialin.net] has quit [Quit: TheMue]
20:44 < Bigbear11> What is the syntac for modulo?
20:45 < xash> %
20:49 -!- nictuku [~yvesj@84-72-7-79.dclient.hispeed.ch] has joined #go-nuts
20:49 -!- nictuku [~yvesj@84-72-7-79.dclient.hispeed.ch] has quit [Changing host]
20:49 -!- nictuku [~yvesj@unaffiliated/nictuku] has joined #go-nuts
20:50 -!- artefon [~thiago@189.59.133.187] has quit [Quit: bye]
20:57 < Bigbear11> to output a integer does this work?
20:57 < Bigbear11> fmt.Printf((string)count)
20:57 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has quit [Quit: Leaving.]
20:59 < kamaji> Is it possible to switch/case on a string?
21:00 < aiju> ofc
21:00 < nictuku> Bigbear11, fmt.Println(count) is enough
21:01 -!- plainhao [~plainhao@208.75.85.237] has quit [Quit: plainhao]
21:04 -!- hcatlin_ [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
21:07 < alanliang> you could contribute to open source go projects
21:07 < Bigbear11> says it is not a string
21:07 < alanliang> i wonder how many there are
21:07 -!- lnostdal [~Lars@213.80-202-59.nextgentel.com] has quit [Read error:
Connection reset by peer]
21:08 < Bigbear11> not many
21:08 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Ping
timeout: 276 seconds]
21:10 < Kafo> Bigbear11: fmt.Printf("%d", count)
21:11 < Kafo> Printf's first argument is the format string
21:11 < Kafo> fmt.Print(count) and fmt.Println(count) do not need the format
string.
21:12 < kamaji> Bigbear11: you can also just use "%v" as the format string
for any type
21:12 < Bigbear11> ugg not C style
21:13 < kamaji> nor is built-in concurrency :P
21:13 -!- Fish [~Fish@88.162.170.133] has quit [Quit: So Long, and Thanks for All
the Fish]
21:13 < Bigbear11> What is wrong with :
21:13 < Bigbear11> return fib (n-1) + fib(n-2)
21:14 < tux21b> I'm also highly interested in some open-source projects
(preferable web applications).  porting my own projects to Go is not yet possible
since there are still many things missing in Go, but when we work together (on
some web projects) we might produce a lot of useful code (or even libraries)...
21:15 < aiju> Bigbear11: everything
21:16 < fzzbt> it's super inefficient
21:16 < Bigbear11> syntax wise though?
21:17 -!- boomtopper
[~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has quit [Ping
timeout: 260 seconds]
21:17 < Kafo> Have you declared the return type?
21:17 < Bigbear11> func int fib (n int) {
21:18 < Bigbear11> also tried (int)
21:18 < Bigbear11> I know it is inefficient
21:19 < kamaji> Bigbear11: return type comes after
21:19 < kamaji> Bigbear11: func fib(n int) int {
21:19 < kamaji> same with vars :)
21:21 < Bigbear11> wait why not
21:21 < Bigbear11> func (n int) fib (int) {
21:22 < aiju> that's illegal
21:22 < Bigbear11> thought what is takes is before the identifier
21:22 < aiju> you need to list parameters
21:22 < aiju> even if you don't have any
21:22 < aiju> and you can't define a method on int
21:22 < kamaji> func name(arg1 type1, arg2 type2, ...) (ret1 rtype1, ...) {
...  }
21:22 < aiju> only on types you define in the same package
21:22 < aiju> func fib() (n int) {
21:22 < aiju> ehm
21:23 < aiju> bs
21:23 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
21:23 -!- wrtp [~rog@92.17.111.113] has quit [Quit: wrtp]
21:23 -!- imsplitbit [~imsplitbi@64.39.4.132] has quit [Quit: Bye!]
21:23 < aiju> func fib(n int) int {
21:23 < aiju> is probably what you want
21:23 < Bigbear11> from the wiki codelab
21:23 < Bigbear11> func (p *Page) save() os.Error{
21:23 < Bigbear11> why is that before
21:25 < tux21b> fib() in your example is a function, which mean you can call
it like " fib(3) ", but save() on the other hand is a method (which is a function
which belongs to an object).  therefore you can only write " page.save() " (and
not just "save()")
21:25 < kamaji> Bigbear11: p behaves like the "this" pointer in that case
21:26 < aiju> Bigbear11: it is a method
21:26 < kamaji> you have to explicitly say it's there tho
21:26 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
21:31 < Bigbear11> not that it has anything to do with Go but how do you end
something that is running in the terminal
21:31 < Bigbear11> my program is not exiting for some reason
21:32 < kamaji> Ctrl+C
21:32 < Bigbear11> tyvm
21:32 < kamaji> np
21:32 < ww> or Ctrl-\ if you want to be brutal
21:32 < kamaji> ww: SIGKILL?
21:32 < kamaji> just curious
21:32 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-170-171.clienti.tiscali.it] has
joined #go-nuts
21:33 < ww> don't know off the top of my head - usually causes a core-dump
and can't normally be ignored
21:33 < kamaji> lol
21:33 < tux21b> Bigbear11, you are probably missing some kind of: if n <=
1 { return 1 }
21:33 < kamaji> that doesn't seem to work on mine
21:33 < kamaji> oh no that worked.
21:33 < ww> sigquit
21:33 < ww> i thin
21:33 < ww> k
21:34 -!- gedevan [~gedevan@83.167.106.253] has quit [Quit: Leaving...]
21:34 < tux21b> oh, wait.  if n == 0 { return 0 } else if n == 1 { return 1
} should be correct.
21:34 < Bigbear11> I got if n ==0 || n==1 {
21:34 < Bigbear11> return n
21:34 < Bigbear11> }
21:34 < kamaji> if n <= 1 { return n }
21:35 < kamaji> do expressions like that need parentheses?
21:35 < kamaji> I always put them in because i'm paranoid
21:35 -!- Project_2501 [~Marvin@82.84.82.119] has quit [Ping timeout: 276 seconds]
21:35 < KirkMcDonald> The logical operators have a pretty low precedence.
21:36 < pharris> When I'm unsure, I put parentheses everywhere and let gofmt
strip out the unnecessary ones.
21:36 < tux21b> Bigbear11, ok, how big is n in your example, then?  :D
21:37 < kamaji> what about negative n?
21:37 < tux21b> fib isn't defined for negative ones, is it?
21:37 < Bigbear11> I changed it to n<=1
21:38 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
21:38 < kamaji> tux21b: nope, but if fib(n) calls fib(n-1) + fib(n-2) then
it might go negative
21:38 < kamaji> or WILL IT
21:38 < kamaji> no
21:38 < kamaji> .....  hehe
21:39 < tux21b> kamaji, not if you call it with non-negative n's (preferable
using an uint here) and when you provide 2 values as base (0 and 1)
21:39 < Bigbear11> var count int = 0
21:39 < Bigbear11> is legal?
21:39 < kamaji> Bigbear11: yep
21:40 < Bigbear11> why ins't it := 0
21:40 < kamaji> can also do "count := 0"
21:40 < kamaji> := is like "define type and assign value"
21:40 < kamaji> var is for explicitly defining type
21:40 < Bigbear11> var count int := 0
21:40 < alanliang> what services at Google use Go?
21:40 < Bigbear11> is illegal though
21:40 < skelterjohn> := is an abbreviation for code you could already write
with more typing
21:40 < kamaji> Bigbear11: because you've already specified type
21:40 < Bigbear11> var count := 0 is legal?
21:40 < skelterjohn> alanliang: golang.org :) and they say they haveinternal
things
21:41 < kamaji> Bigbear11: don't think so
21:41 < kamaji> just do count := 0 :p
21:41 < skelterjohn> Bigbear11: saying "var x = y" is th esame as saying "x
:= y"
21:41 < Bigbear11> no var?
21:41 < Bigbear11> it doesn't have to be declared?
21:41 < skelterjohn> "var x := y" is not legal
21:41 < kamaji> Bigbear11: := is the "definition" operator
21:41 < Bigbear11> makes no sense
21:41 < alanliang> skelterjohn, lol at least they eat their dogfood
21:41 < kamaji> it defines type and value
21:41 < skelterjohn> Bigbear11: the rules are clear
21:42 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Remote
host closed the connection]
21:43 -!- foocraft_ [~ewanas@78.100.172.205] has quit [Remote host closed the
connection]
21:44 < Bigbear11> here is my code http://pastebin.com/gBMmc2ur
21:45 < tux21b> Bigbear11, 40000 is a huge even for very efficient fib
implementations
21:46 < skelterjohn> it would be far more efficient to use some kind of
memoization
21:46 < tux21b> and your's is quite slow, so do not call it with values
greater than ~20.
21:47 < skelterjohn> most easily done by calculating the fib numbers
starting at 0 going to 40000
21:47 < Bigbear11> ahh ok
21:48 < tux21b> it's also possible to express fib(2*n) and fib(2*n+1) which
is far more efficient than memorization and also quite short to write
21:48 < aiju> Bigbear11: read the tutorial or something
21:49 < tux21b> and there is an explicit formula too, which is able to
calculate fib(40000) without any immediate values, but the formula looks quite
ugly ;)
21:49 < skelterjohn> memoization wasn't a typo O:-)
21:49 < aiju> there is an explicit formula?  have i missed something?  ;P
21:49 < kamaji> tux21b: no way!
21:49 < skelterjohn> yes, there is
21:49 < aiju> unless you mean stirling's formula
21:49 < kamaji> you fucking what
21:49 < skelterjohn> involves square roots
21:49 < tux21b> kamaji, hmm?
21:49 < kamaji> I didn't know there was a formula
21:50 < kamaji> :D
21:50 < aiju> i'm sure they are refering to stirling's formula
21:50 < skelterjohn> http://en.wikipedia.org/wiki/Fibonacci_number
21:50 < skelterjohn> binet's formula
21:50 < tux21b> there definitely is, but its extremely ugly.  Therefore I
prefer the fib(2*n) and fib(2*n+1) approach which is O(log(n))
21:50 < skelterjohn> did stirling do more than the log gamma function?
21:51 < kamaji> http://www.physicsforums.com/showthread.php?t=61235
21:51 < aiju> oh right
21:51 < kamaji> is that it?
21:51 < aiju> i use a lookup table for factorials, O(1) ;P
21:51 -!- virtualsue
[~chatzilla@cpc6-haye15-0-0-cust61.haye.cable.virginmedia.com] has quit [Ping
timeout: 240 seconds]
21:51 < kamaji> oh right that's Binet
21:51 < kamaji> aiju: lol
21:51 < kamaji> the Engineer's Method
21:52 < skelterjohn> gamma function is not limited to integers
21:52 < aiju> the Person's Who Actually Writes Programs, Not Papers Method
21:52 < skelterjohn> <- writes papers backed by programs?
21:53 < kamaji> oh shit son!
21:53 < kamaji> it's ON
21:53 * kamaji gets popcorn
21:53 < Bigbear11> what is MAX_INT in Go ?
21:53 < aiju> Bigbear11: 2^31 - 1
21:53 < aiju> just like everywhere else
21:53 < skelterjohn> Bigbear11: depends if you mean uint, uint64, int,
int64, etc
21:53 < mpl> funny how papers and programs are interchangeable in that
sentence :)
21:54 < kamaji> mpl: woah :D
21:56 * mpl sadly, does not have any popcorn
21:57 < kamaji> I need a USB microwave and some mini-popcorn bags for
moments like these
21:57 < kamaji> Do I smell a business idea!?
21:57 < kamaji> I'm sure you can microwave on 5v
21:57 < kamaji> and.....  notverymany amps
21:57 < skelterjohn> i don't think it's the voltage that's the problem
21:58 < kamaji> Stupid USB
21:59 * mpl remembers the meme/hoax about the mobile phones wicrowaving popcorn
21:59 < Bigbear11> so I am on problem 3 of Project Euler, I can write the
code in C++ no problem but in Go it says constant 600851475143 overlows int
21:59 < skelterjohn> Bigbear11: use uint64
22:00 < skelterjohn> max value for int type is 2^31-1
22:00 < skelterjohn> max value for uint64 is 2^64-1
22:00 < skelterjohn> which is 18446744073709551615
22:00 < skelterjohn> somewhat larger than your problem value
22:01 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
22:02 < Bigbear11> in C++ I am not using a long int or anything though
22:02 < Bigbear11> what is the difference?
22:03 < skelterjohn> in C++ you don't realize that your code won't work due
to int capacity problems
22:03 < skelterjohn> either that or the int type you're using is actually 64
bits
22:03 < skelterjohn> (the latter is probably true)
22:04 < Bigbear11> I am using Visual Studio and it is a Win32 console
application
22:04 < skelterjohn> that means nothing to me
22:04 < Bigbear11> but I am on 64 bit architexture
22:04 < skelterjohn> i can help you fix your go code
22:04 < skelterjohn> i can't tell you how or why microsoft does anything it
does
22:06 < Bigbear11> http://pastebin.com/RQwzyW0R
22:07 < skelterjohn> thank you.
22:08 < KirkMcDonald> Curiously, a "long" in Windows is always 32 bit.
22:09 -!- aho [~nya@fuld-590c65e6.pool.mediaWays.net] has joined #go-nuts
22:09 < tux21b> haha.  I've just tried to implement fib myself, but fib(94)
is already large than uint64 :D
22:10 < tux21b> i think i will try out the big package now
22:10 < tux21b> s/large/larger/
22:16 -!- kr [~Keith@c-24-5-193-165.hsd1.ca.comcast.net] has quit [Quit: WeeChat
0.3.4]
22:18 -!- xash [~xash@d062194.adsl.hansenet.de] has quit [Quit: Lost terminal]
22:19 < KirkMcDonald> My favorite number sequence goes, 1, 2, fib(720).
22:19 < KirkMcDonald> Er.
22:19 < KirkMcDonald> Not fib().
22:19 < KirkMcDonald> factorial.
22:21 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
22:24 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
22:25 < Bigbear11> skelterjohn: any ideas?
22:25 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Quit:
Geek insindeĀ®]
22:28 -!- jbooth1 [~jay@209.249.216.2] has quit [Quit: Leaving.]
22:28 < Bigbear11> I mean I know the answer from Wolfram but still want this
to work
22:30 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
22:33 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has quit [Quit:
Leaving.]
22:35 < Project-2501> BW-HAHAHAHAHAAAAAAAAaaaaaaaaaaaaaaaa!!!
22:36 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-170-171.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
22:36 < kamaji> the fuck?
22:37 -!- lucid [~rbl@84-74-142-37.dclient.hispeed.ch] has joined #go-nuts
22:38 -!- rl [~rbl@84-74-142-37.dclient.hispeed.ch] has quit [Ping timeout: 250
seconds]
22:39 * ww tries to compute the golden ratio by continued fractions...  makes a
mistake...  discovers what's called the silver ratio according to wikipedia...
22:40 < ww> func golden(n) ratio float64 { for i=0; i<n; i++ { ratio =
float64(1) / ( 1 + ratio ) }; return 1 + ratio }
22:40 < ww> func silver(n) ratio float64 { for i=0; i<n; i++ { ratio = 1
+ float64(1) / ( 1 + ratio) }; return 1 + ratio }
22:41 < kamaji> continued fractions are awesome
22:43 -!- tylerl [~tylerl@ip24-251-232-171.ph.ph.cox.net] has joined #go-nuts
22:49 < ww> am thinking of using successive approximations of the GR as
software version numbers
22:49 < ww> is it too weird that it goes 1, 2, 1.5, 1.666666, 1.6....
22:49 < ww> ?
22:50 < kamaji> How many versions will it take before storage of the version
number exceeds that of the program?
22:51 < ww> always compute, never store?  :P
22:55 < jeremy_c> How can I determine the amount free on a disk?  (Windows)
22:57 < jeremy_c> Guess I have to revert to writing some C code (assuming)
22:58 < tux21b> kamaji, skelterjohn: dealing with the big package is quite
error prone, however here it is: http://pastie.org/1866080 :)
23:02 < kamaji> tux21b: is that really your last name?
23:03 < kamaji> because that's kinda awesome :D
23:03 < kamaji> Nominative Determinism strikes again!
23:04 < tux21b> hehe, but yes, it is *g*
23:04 -!- fmoo [~Adium@66.220.144.74] has joined #go-nuts
23:04 < tux21b> I guess I just was lucky and got the right job for my name
23:08 < tux21b> The snipped might be a good candidate for a codewalk about
the big package, but unfortunately my English isn't that good :/
23:12 -!- Nitro [~Nitro@unaffiliated/nitro] has joined #go-nuts
23:12 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
23:20 -!- Bigbear11 [~Cody@d75-158-140-53.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
23:21 -!- iant [~iant@nat/google/x-bovfoopcylzpyaqq] has quit [Quit: Leaving.]
23:21 -!- Wiz126 [~Wiz@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts
23:25 -!- exch [~exch@c74149.upc-c.chello.nl] has quit [Read error: Operation
timed out]
23:25 -!- exch [~exch@c74149.upc-c.chello.nl] has joined #go-nuts
23:31 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has joined #go-nuts
23:32 -!- iant [~iant@216.239.45.19] has joined #go-nuts
23:32 -!- mode/#go-nuts [+v iant] by ChanServ
23:32 -!- iant1 [~iant@67.218.107.213] has joined #go-nuts
23:36 -!- iant [~iant@216.239.45.19] has quit [Ping timeout: 240 seconds]
23:39 -!- ExtraSpice [XtraSpice@88.118.35.153] has quit [Read error: Connection
reset by peer]
23:45 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
hcatlin]
23:45 -!- mode/#go-nuts [+v iant] by ChanServ
23:46 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
23:47 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Client
Quit]
23:48 -!- ab3 [~abe@ip-83-134-160-54.dsl.scarlet.be] has joined #go-nuts
--- Log closed Thu May 05 00:00:50 2011