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

--- Log opened Fri Jan 21 00:00:05 2011
00:04 -!- brownee [~brownee@209.34.56.106] has quit [Ping timeout: 260 seconds]
00:05 -!- artefon [~thiago@189.59.157.127.dynamic.adsl.gvt.net.br] has joined
#go-nuts
00:06 -!- tav [~tav@92.7.100.207] has quit [Ping timeout: 240 seconds]
00:07 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-159-27.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
00:12 -!- tav [~tav@92.7.116.65] has joined #go-nuts
00:12 -!- TubeSteak [~vlad@94-226-82-25.access.telenet.be] has left #go-nuts ["ERC
Version 5.3 (IRC client for Emacs)"]
00:33 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Ping timeout: 276 seconds]
00:36 -!- tedster [~tedster@cpe-067-023-155-183.dhcp.wadsnet.com] has joined
#go-nuts
00:39 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
00:41 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
00:43 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
00:44 -!- Venom_X [~pjacobs@75.92.43.21] has quit [Quit: Venom_X]
01:02 -!- dju [dju@fsf/member/dju] has quit [Read error: Connection reset by peer]
01:02 -!- dju [dju@fsf/member/dju] has joined #go-nuts
01:03 -!- nettok [~quassel@200.119.176.173] has joined #go-nuts
01:03 -!- boscop_ [~boscop@g225235043.adsl.alicedsl.de] has quit [Ping timeout:
240 seconds]
01:15 -!- saturnfive [~saturnfiv@210.74.155.131] has joined #go-nuts
01:24 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
01:28 -!- Scorchin [~Scorchin@host109-154-188-18.range109-154.btcentralplus.com]
has quit [Quit: Scorchin]
01:40 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
01:41 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com]
has quit [Read error: Operation timed out]
01:41 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
01:42 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com]
has joined #go-nuts
01:49 -!- saturnfive1 [~saturnfiv@210.74.155.131] has joined #go-nuts
01:49 -!- devrim [~Adium@cpe-72-225-239-227.nyc.res.rr.com] has quit [Read error:
Connection reset by peer]
01:49 -!- devrim [~Adium@cpe-72-225-239-227.nyc.res.rr.com] has joined #go-nuts
01:50 -!- saturnfive2 [~saturnfiv@210.74.155.131] has joined #go-nuts
01:51 -!- saturnfive [~saturnfiv@210.74.155.131] has quit [Ping timeout: 240
seconds]
01:53 -!- saturnfive1 [~saturnfiv@210.74.155.131] has quit [Ping timeout: 240
seconds]
01:56 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 260 seconds]
01:59 -!- mosva [~mosva@unaffiliated/mosva] has quit [Read error: Connection reset
by peer]
02:03 -!- aconran___ [~aconran-o@adsl-67-119-205-150.dsl.pltn13.pacbell.net] has
joined #go-nuts
02:03 -!- aconran__ [~aconran-o@adsl-67-119-205-150.dsl.pltn13.pacbell.net] has
quit [Read error: Connection reset by peer]
02:04 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
02:06 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
02:14 -!- devrim [~Adium@cpe-72-225-239-227.nyc.res.rr.com] has quit [Remote host
closed the connection]
02:16 -!- devrim [~Adium@cpe-72-225-239-227.nyc.res.rr.com] has joined #go-nuts
02:17 -!- jack [~jack@92.27.140.198] has joined #go-nuts
02:17 -!- jack [~jack@92.27.140.198] has left #go-nuts []
02:17 -!- niemeyer [~niemeyer@189.30.51.233] has quit [Ping timeout: 240 seconds]
02:18 -!- jack9253 [~jack9253@92.27.140.198] has joined #go-nuts
02:25 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
02:26 -!- artefon [~thiago@189.59.157.127.dynamic.adsl.gvt.net.br] has quit [Quit:
bye]
02:36 -!- cafesofie [~cafesofie@dhcp-128-146-69-126.osuwireless.ohio-state.edu]
has joined #go-nuts
02:40 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
02:44 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
02:45 < jack9253> hi, I have a question regarding compiling a program using
6g, is there an easy way to compile multiple files from different packages?
02:49 < exch> separate packages should be compiled separately
02:50 < exch> bind em together by using the appropriate import statements
02:54 < jack9253> so in case i have "package a" and "package main" with
"import "a"" in the same folder I get an error import not found
02:58 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Remote
host closed the connection]
03:01 < jack9253> maybe I am asking my question in a wrong way.  When I am
compiling a program from multiple sources I need to compile it using one 6g
command, like 6g file1.go file2.go etc, because it will not resolve function and
classes defined in a different file.  Then is there a simple way of doing that
with files from different packages?
03:06 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
03:08 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
03:11 < rm445> jack9253: here's how you do it.  Every *package* you compile
all at once: 6g -o file.6 file1.go file2.go BUT...
03:11 < rm445> Each package needs its dependencies built first.
03:12 < rm445> so package main does 'import ./a', you need to build a.6
before you can build main.6
03:13 < rm445> So you build a.6, then main.6, then link them.  Does this
help?
03:14 < jack9253> yes
03:14 < rm445> :-)
03:15 < jack9253> i though i tried that last time, but i think i did not
compile it to object file
03:15 -!- tedster [~tedster@cpe-067-023-155-183.dhcp.wadsnet.com] has left
#go-nuts []
03:15 -!- bmizerany [~bmizerany@204.14.152.118] has quit [Remote host closed the
connection]
03:16 < jessta> jack9253: all compiling is to an object file
03:17 < jack9253> i know :), I meant the file i was importing.  I thought
that 6g would detect it automatically and compile it for me, kinda like java
compiler :/
03:22 < jack9253> Second thing, If i have a structure containing an empty
map, what's the best way to initialize it in a constructor?
03:23 < Namegduf> Add a NewStruct function to get one, that returns a
pointer.
03:25 < jack9253> but how I do make an empty map?  map[string]int{} ?
03:25 < Namegduf> make(map[string]int)
03:26 < Namegduf> Yours might work as well (I don't know) but the one I
described is the function provided for the purpose of making a map for you.
03:26 < jack9253> thanks
03:30 < jessta> jack9253: unlike the java, go packages can be split in to
multiple files.  The compiler can't reliably work out which files you want to
compile
03:36 < jessta> especially in the case that you're writing tests
03:37 < Namegduf> Yeah.
03:38 < Namegduf> You don't import "a file"
03:38 < Namegduf> You import a package.
03:41 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
03:43 -!- ymasory [~ymasory@c-76-99-55-224.hsd1.pa.comcast.net] has quit [Remote
host closed the connection]
03:46 < jack9253> another thing: i have a structure with a private field
name string, a constructor that sets name = "", and getter func (s Structure)
GetName() string {return s.name}, when I use it in another file in main I get
implicit assignment of unexported field 'name' of package.Structure in method
receiver.  I really don't have a clue what is causing it
03:48 < skelterjohn> jack9253: the field "name" is unexported
03:48 < skelterjohn> because it is not capitalized
03:48 < skelterjohn> you cannot copy a structure from another package that
has an unexported field
03:48 < skelterjohn> (you can, however, copy a pointer to such an object
with no issue)
03:49 < skelterjohn> the typical thing to do here would be to use *Structure
instead of Structure
03:55 < skelterjohn> oh and jack9253, about auto-detecting source, consider
using go-gb.googlecode.com :) i tool i wrote for easy project building.
03:56 < skelterjohn> i'd be thrilled if you gave it a spin and let me know
what you thought
03:59 < plexdev> http://is.gd/c9wGpq by [Anschel Schaffer-Cohen] in
go/src/pkg/netchan/ -- Fixed documentation for netchan import()
04:03 -!- brownee [~brownee@209.34.56.106] has joined #go-nuts
04:07 < jack9253> skelterjohn: what do you mean copy a pointer for another
package?  Copy it by using a constructor that returns *Structure?  I am currently
doing that, and I still receive that error
04:07 < skelterjohn> if the constructor is not in the same package that
defines Structure, you won't be able to create it
04:08 < skelterjohn> maybe you could put something in pastebin?
04:08 -!- keithcascio [~keithcasc@nat/google/x-wtanqhtxmmqziujo] has quit [Quit:
Leaving]
04:10 < skelterjohn> for now it might be worth while to change the field
"name" to "Name" - capitalizing it causes it to be exported
04:10 < skelterjohn> and you can learn some of the nuances later
04:10 < skelterjohn> (bed time for me)
04:14 < jack9253> i though that i was doing everything right, source code is
here http://pastie.org/1483209
04:16 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
04:21 -!- sjd [~sjd@4.78.243.126] has quit [Quit: sjd]
04:22 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Ping timeout: 264 seconds]
04:25 < quantumelixir> skelterjohn: there?
04:25 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
04:30 < rm445> jack9253: note if you change GetName to say 'return "Foo"'
you get the same error message.
04:30 < jack9253> i know
04:30 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
04:30 < rm445> ah.  Make it func (e *En) GetName
04:30 < jack9253> i guess it's go compiler allocating the structure just
before it is needed
04:31 < rm445> ^^^ note the *.  It's as skelterjohn said, you can pass a
pointer but not the struct itself.
04:31 < jack9253> ok, i get it
04:33 -!- Renich [~Renich@187.175.144.57] has joined #go-nuts
04:33 < Renich> guys
04:33 < Renich> anyone awake?
04:34 < Renich> I am trying to build a spec file for fedora based on a
currently pending review one
04:34 < Renich> and they say no static libs
04:34 < Renich> any help¿?
04:34 -!- jack9253 [~jack9253@92.27.140.198] has quit [Read error: Connection
reset by peer]
04:38 < Renich> http://fpaste.org/a0kP/n <- line 135
04:39 < Renich> and the spec:
https://bugzilla.redhat.com/show_bug.cgi?id=652987
04:40 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 272 seconds]
04:40 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
04:40 -!- jack9253 [~jack9253@92.27.140.198] has joined #go-nuts
04:42 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
04:42 -!- jack9253 [~jack9253@92.27.140.198] has left #go-nuts []
04:46 -!- roo [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
04:48 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
04:50 -!- 16WAACAYX [~w7@freenode/staff/wikimedia.werdan7] has quit [Read error:
Operation timed out]
04:54 -!- brownee [~brownee@209.34.56.106] has quit [Ping timeout: 265 seconds]
04:55 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Read error:
Operation timed out]
04:59 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
05:18 -!- Skola [~ik@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has joined #go-nuts
05:20 -!- sav [~lsd@189001130056.usr.predialnet.com.br] has quit [Read error:
Connection reset by peer]
05:22 -!- gits [~gits@77.94.219.158] has quit [Ping timeout: 265 seconds]
05:34 -!- fabled [~fabled@mail.fi.jw.org] has joined #go-nuts
05:46 -!- anticw [~anticw@c-67-169-68-180.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
05:46 -!- anticw [~anticw@c-67-169-68-180.hsd1.ca.comcast.net] has joined #go-nuts
05:50 -!- saturnfive2 [~saturnfiv@210.74.155.131] has quit [Read error: Connection
reset by peer]
05:54 -!- saturnfive [~saturnfiv@210.74.155.131] has joined #go-nuts
05:59 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts
06:33 -!- cafesofie [~cafesofie@dhcp-128-146-69-126.osuwireless.ohio-state.edu]
has quit [Remote host closed the connection]
06:42 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 255 seconds]
06:43 -!- Zoopee [alsbergt@zoopee.org] has quit [Ping timeout: 240 seconds]
06:45 -!- Zoopee [alsbergt@zoopee.org] has joined #go-nuts
06:49 -!- cafesofie [~cafesofie@rnwifi-164-107-93-156.resnet.ohio-state.edu] has
joined #go-nuts
06:59 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
06:59 -!- mode/#go-nuts [+v iant] by ChanServ
07:05 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts
07:06 -!- chressie [~chressie@dreggn.in-ulm.de] has quit [Client Quit]
07:10 -!- dforsyth_ [~dforsyth@bastion.inap.yelpcorp.com] has quit [Quit: Computer
has gone to sleep.]
07:13 -!- adu [~ajr@pool-72-83-254-159.washdc.fios.verizon.net] has joined
#go-nuts
07:19 < adu> wow, lots of New Zealand residents...
07:22 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:1180:eaa2:bcd1:6412] has joined
#go-nuts
07:43 -!- dforsyth [~dforsyth@c-76-21-40-117.hsd1.ca.comcast.net] has joined
#go-nuts
07:48 -!- wrtp [~rog@92.17.17.115] has joined #go-nuts
08:05 -!- ios_ [~ios@180.191.129.30] has joined #go-nuts
08:05 -!- ios_ [~ios@180.191.129.30] has left #go-nuts []
08:10 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
08:11 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 250 seconds]
08:13 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
08:20 -!- Skola [~ik@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has quit [Quit: Skola]
08:36 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 240 seconds]
08:38 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
08:41 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
08:45 -!- antileet [~anirudhs@122.167.64.99] has joined #go-nuts
08:50 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
09:02 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
09:08 -!- Renich [~Renich@187.175.144.57] has left #go-nuts []
09:08 -!- dforsyth [~dforsyth@c-76-21-40-117.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
09:08 -!- dforsyth [~dforsyth@c-76-21-40-117.hsd1.ca.comcast.net] has joined
#go-nuts
09:09 < hokapoka> Is it possible to write a swtich / if within templates?
09:10 < adu> what's a template?
09:10 < hokapoka> http://golang.org/pkg/template/
09:10 < hokapoka> The template package.
09:11 < hokapoka> There's {.or} but that only checks for the state of a
property, null / default value.
09:11 < adu> fascinating
09:11 < adu> sounds like a poorly designed package
09:11 < hokapoka> Not really, it actually very simple and yet powerful.
09:12 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Quit: LeNsTR]
09:12 < adu> most macro systems are
09:12 < adu> for example, I use M4 for all my websites
09:13 < hokapoka> I can get arround my issue using a map.
09:13 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Ping
timeout: 264 seconds]
09:14 < hokapoka> as I can use : {.section somemap[field1]} Type 1 {.end}
{.section somemap[field2]} type 2 {.end}
09:17 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
09:24 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 246 seconds]
09:26 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
09:39 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 255 seconds]
09:40 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
09:43 -!- Xurix [~Luixsia@5ad86381.bb.sky.com] has joined #go-nuts
09:44 < wrtp> hokapoka: you might be able to do it with a method
09:46 -!- alek [d4bd2304@gateway/web/freenode/ip.212.189.35.4] has joined #go-nuts
09:47 < alek> Hello.  What would be an optimal way to look for a binary
pattern inside []byte?
09:48 < alek> I mean something like strstr() but operating on bytes
09:49 -!- go^lang [~newblue@113.84.48.12] has joined #go-nuts
09:50 < go^lang> Is bloom filter write by golang?
09:53 < wrtp> alek: bytes.Index
09:54 < alek> Thank you, wrtp!
09:56 < wrtp> hokapoka: this seems to work for me:
http://pastebin.com/0rLqjGep
10:09 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
10:21 -!- shvntr [~shvntr@113.84.151.140] has joined #go-nuts
10:28 -!- saturnfive [~saturnfiv@210.74.155.131] has quit [Read error: Connection
reset by peer]
10:33 -!- tvw [~tv@212.79.9.150] has quit [Ping timeout: 240 seconds]
10:34 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
10:35 < wrtp> hokapoka: didn't you see my paste?  no need to post on
golang-nuts :-)
10:38 < hokapoka> oh, sorry
10:39 < hokapoka> heh
10:39 < wrtp> but reading your post, i'm not sure i understand your question
any more...
10:39 < hokapoka> Yeah, but like I said at the bottom of my post, using a
method requires that I hold the content that I whish to render within the compiled
go routine
10:40 < hokapoka> Just looking for a better solution.
10:41 < hokapoka> usign a map works, but I have to fill the map[string]bool
will all possible options set to false and then assign the one that I want to
match as true
10:42 < hokapoka> using a struct works too, but that means having to define
all the possible options within the struct, but only assign to the relavant one.
10:42 < wrtp> yeah, i see now.
10:42 < wrtp> i think template should probably treat a missing map entry as
empty rather than never-existing.
10:42 < hokapoka> But my values are comming from a data source and say
another option is added, all of these methods require the application to be re
recompiled.
10:43 < hokapoka> That's exactally what I tought.
10:43 < hokapoka> And as foo, found := map["bar"] tells you
10:43 < hokapoka> You would have thought the template processor would check
found and not halt.
10:44 < hokapoka> make sence?
10:45 < wrtp> yeah.  i think this is really a hangover from when accessing a
non-existent key in a map gave a panic
10:46 < taruti> hmm, that has changed?
10:47 < wrtp> yeah, a few months ago now
10:47 < hokapoka> was that before that map would return 2 params then?
10:48 < taruti> iirc both: x := m[k] and x,found := m[k] were legal
10:48 < taruti> and the first would have panicced
10:48 < wrtp> yes, but the former would panic if k didn't exist in m
10:48 < wrtp> now it returns the zero value.
10:50 -!- nettok [~quassel@200.119.176.173] has quit [Ping timeout: 255 seconds]
10:56 -!- alek [d4bd2304@gateway/web/freenode/ip.212.189.35.4] has quit [Quit:
Page closed]
10:56 < hokapoka> Humm, it doesn't appear to error either, it just stops
processing.
10:57 < hokapoka> oh no, it might be.
11:00 < hokapoka> yes it does, I wasn't capturing the error in my test.
11:02 < wrtp> hokapoka: i've got a fix that's working
11:02 < hokapoka> Looking at the template package code Line 599 lookup
appears to have...
11:02 < hokapoka> heh GREAT
11:02 < hokapoka>
http://golang.org/src/pkg/template/template.go?s=23923:23996#L599 <- to this
method?
11:03 < wrtp> yeah, the MapValue case changed to look like this:
11:04 < wrtp> case *reflect.MapValue:
11:04 < wrtp> if v := av.Elem(reflect.NewValue(name)); v != nil {
11:04 < wrtp> return v
11:04 < wrtp> }
11:04 < wrtp> return reflect.MakeZero(typ.(*reflect.MapType).Elem())
11:04 < wrtp> it's a bit funny that map field names must be capitalised
too...
11:05 < hokapoka> really, as in the keys?
11:07 -!- tensorpudding [~user@99.23.127.179] has quit [Remote host closed the
connection]
11:07 < wrtp> yeah
11:08 < wrtp> i can't work out if it's usefully consistent behaviour or a
bug
11:08 < hokapoka> I've not been experiancing that.
11:08 < wrtp> no i'm lying
11:09 < wrtp> it was an earlier bug in my program :-)
11:09 < hokapoka> :)
11:12 -!- Xurix [~Luixsia@5ad86381.bb.sky.com] has quit [Quit: Leaving]
11:15 < hokapoka> Just updated to the latest version & edited the template
package, waiting for it to build atm.
11:16 < hokapoka> How frequently should I be updating my go src?
11:20 < wrtp> whenever you want :-)
11:20 < wrtp> i do it every so often.  probably once a week or so.
11:22 < hokapoka> I kinda wishing I had done it more often.  got a couple of
issues with some packages.
11:23 < wrtp> it's changing pretty fast at the moment
11:25 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
11:27 -!- adu [~ajr@pool-72-83-254-159.washdc.fios.verizon.net] has quit [Ping
timeout: 240 seconds]
11:28 < wrtp> hokapoka: http://codereview.appspot.com/4036045
11:29 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
11:30 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection
reset by peer]
11:32 < temoto> My last update included new ciphers in crypto/tls which
allowed my project to talk to all HTTPS servers instead of just a few.
11:38 < hokapoka> wrtp: sweet, your fix is working.
11:39 < wrtp> temoto: i haven't looked at talking https at all.  can you
just use Get("https:...", ...) ?
11:39 < temoto> wrtp, idk, if there is Get function somewhere - well may be.
11:40 < wrtp> temoto: so you don't use the standard http client interface?
11:40 < hokapoka> I've used http.Get & http.Post with my OAuth stuff worked
fine.
11:41 < temoto> But it will use crypto/tls to establish TLS connection
anyway and it would return error for servers using those other ciphers.
11:41 < hokapoka> (that was over https) - albeit mainly googles https
services.
11:41 < temoto> wrtp, i don't need any http in that project.  It's a
certificate crawler.
11:41 < wrtp> ah
11:46 < Mr_Dark`> anyone else have problems with building Go packages for
windows
11:46 < Mr_Dark`> I'm getting "conflicted types for 'pread'"
11:47 < quantumelixir> I've been thinking lately about (the lack of)
Generics in Go, and most cases where it would be generally used, in C++/Java, say,
I find that we can solve the same problems using Interfaces or, at worst,
copy-pasting code.  Is there any "real-world" case where you find the lack of
Generics an equally real problem?
11:48 < quantumelixir> I mean, is it possible that we may never need
Generics at all?
11:49 < temoto> quantumelixir, i think the possibility of 'need in future'
may not be defined.
11:49 < quantumelixir> temoto: I don't understand what you mean by that
11:50 < hokapoka> who know what the "need in future" holds...
11:50 -!- xash [~xash@d073236.adsl.hansenet.de] has joined #go-nuts
11:50 < wrtp> quantumelixir: i think Go misses out on having some more
sophisticated container data types
11:51 < temoto> quantumelixir, of course we can live w/o generics.  And of
course with generics some tasks would be easier and nicer.
11:51 < quantumelixir> of course, but we know what problems Generics have
solved in Java/C++ right?  So we don't have to look into the future so much as
look at Java/C++ itself
11:51 < wrtp> (without paying the interface conversion & type unsafeness
penalty)
11:51 < quantumelixir> wrtp: You mean to say that we can, at best, only
achieve that kind of capability using reference types?
11:51 < nsf> quantumelixir: what problems did they solve?
11:51 -!- Skola [~ik@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has joined #go-nuts
11:52 < quantumelixir> nsf: containers for instance
11:52 < temoto> in example, i wrote a type-specific function to take first
string of []string.  This is very ugly that i can't pass []int there.
11:52 < wrtp> wrtp: currently we can't achieve that capability
11:52 < wrtp> even with reference types
11:52 < nsf> quantumelixir: and that's the only one, actually
11:52 < hokapoka> quantumelixir: I kinda aggree tho.  I've found that all
I've needed todo, at worst, is to define an interface with 2/3 methods that are
almost identical for each type.
11:52 < nsf> everything else gives more problems
11:52 < quantumelixir> nsf: which I suppose we can do by copy pasting, if
need be right?
11:52 < hokapoka> wrtp: you talking to your self now?
11:53 < wrtp> oops.  i meant to reference quantumelixir
11:53 < quantumelixir> hokapoka: Yes.  They seem to abstract away the
complexity rather neatly
11:53 < nsf> quantumelixir: generic containers is a nice feature, but there
is a limited number of cases where you need that and limited number of solutions
11:53 < wrtp> nsf: i'm not sure that's true
11:53 < nsf> wrtp: which part?
11:53 -!- artefon [~thiago@187.20.205.128] has joined #go-nuts
11:53 < nsf> nice feature or limited...?
11:54 < wrtp> limited
11:54 < wrtp> and the notion of "container" is slippery
11:54 < nsf> well, there are very often used kinds of containers, e.g.
vector, map, unordered_map, set
11:55 < wrtp> func(c0 <-chan int, c1 chan<-int) {for x := range c0 {c1
<- x}}
11:55 < quantumelixir> If I understand correctly, currently every vector
operation in Go's container package has to perform a pointer lookup which can be
avoided with specialized vector types as provided by Generics
11:55 < wrtp> is that a container ?
11:55 < nsf> and the amount of them is quite limited
11:55 < nsf> other cases are exceptional
11:55 < wrtp> it contains one value most of the time
11:55 < nsf> e.g.  do not require generic solution
11:55 < wrtp> quantumelixir: that's not quite true
11:56 < quantumelixir> Oh
11:56 < quantumelixir> wrtp: what's the deal then?
11:56 < wrtp> interfaces don't necessarily requre a pointer lookup
11:56 < wrtp> if the value fits within the size of a pointer
11:56 < quantumelixir> no, but because they don't export their fields we
need to do a pointer lookup
11:56 < wrtp> what?
11:56 < quantumelixir> or incur the copying expense
11:57 < quantumelixir> http://golang.org/pkg/container/vector/ has methods
defined on *Vector
11:57 < wrtp> what does that have to do with vector operations?
11:57 < quantumelixir> no, every call must do a pointer dereference
11:57 < wrtp> dereferencing which pointer?
11:57 < quantumelixir> of type *Vector?
11:58 < quantumelixir> *IntVector, *StringVector ..
11:58 < wrtp> that would be true of a generic-based version too
11:58 < quantumelixir> true..
11:59 < quantumelixir> But I think the current implementation does not store
the value *directly* but rather a pointer to it
11:59 < quantumelixir> I don't know for sure though
11:59 < wrtp> which value are you talking about?
11:59 < quantumelixir> the one stored in the vector
11:59 < wrtp> the value of the Vector or the value of an element inside the
Vector?
11:59 < quantumelixir> element in the vector
11:59 < uriel> never use Vector!
11:59 < uriel> *sigh*
11:59 < wrtp> uriel: shh
12:00 < wrtp> :-)
12:00 < uriel> how many times one has to repeat: use *slices* not Vector
12:00 < wrtp> uriel: that's not the point here
12:00 < uriel> sorry, I wasn't paying attention ;P
12:00 < wrtp> we're talking about the overhead of interfaces vs generics.
knee jerk reactions aren't helpful.
12:00 < uriel> still, argh, could people use any of the other many examples?
lets all just agree to pretend Vector doesn't exist
12:01 < uriel> yes, I know, but Vectors aren't useful either ;P
12:01 < wrtp> quantumelixir: the current implementation stores the value
directly if the size of the value is <= sizeof(uintptr)
12:01 < quantumelixir> exactly
12:01 < quantumelixir> becase how else could it know the size of each
element
12:01 < wrtp> yup
12:02 < wrtp> but often the value *is* that small
12:02 < wrtp> e.g.  int, *anything, map
12:02 < quantumelixir> hmm..  but it doesn't seem too serious after all..  I
could always s/Told/Tnew/g to get my new container, no?
12:02 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
12:02 < quantumelixir> What is the real case for generics?
12:03 < quantumelixir> *in GO
12:03 < nsf> min max
12:03 < quantumelixir> ah good point
12:03 * nsf wants generic min max
12:03 < quantumelixir> I've found that I had to do MinInt and MinFloat ....
12:03 < quantumelixir> but the case is similar..  s/Told/Tnew/g
12:04 < wrtp> nsf: min max is a container?
12:04 < nsf> no
12:04 < quantumelixir> wrtp: he's saying it's another potential usecase
12:04 < quantumelixir> *he/she
12:04 < quantumelixir> :)
12:04 < nsf> he
12:05 < nsf> but I said earlier that the only problem that generics solve
are containers
12:05 < wrtp> indeed
12:05 < nsf> I guess, I meant generic types by that
12:05 < quantumelixir> But in most cases, copy-pasting code isn't so bad a
problem because, for these kind of things (Min/Max, vector, queue..  you name it)
the implementation is clear and you would not want to change it
12:05 < nsf> generic functions are another kind of thing :)
12:05 < wrtp> you need generic types inside generic functions
12:06 < nsf> not really
12:06 < nsf> well, ok, terminology
12:06 < quantumelixir> What about pre processor macros?
12:06 < wrtp> ok, so what's the signature of min?
12:06 < quantumelixir> is ther eany in Go?
12:06 < nsf> by generic type I mean type that can be parametrized with
another type
12:06 < nsf> parameterize*
12:07 < nsf> wrtp: yes
12:07 < quantumelixir> nsf: Hey..  can't you do that with a LessInterface?
12:07 < wrtp> i don't think you can avoid that
12:07 < nsf> generic function is a function that can be parameterized with
type
12:07 < wrtp> yeah, but inside the function you can create types that are
themselves parameterised with that type
12:07 < nsf> quantumelixir: you're talking about restricting possible types
12:08 < quantumelixir> nsf: Can Min/Max be implemented with interfaces?
12:08 < quantumelixir> Like cleanly
12:08 < nsf> quantumelixir: yes and no
12:08 < nsf> interfaces are slow
12:08 < nsf> it's like virtual function call
12:08 < wrtp> func less<T>(x, y T) {a := []T{x, y}; if a[0] < a[1]
{return a[0]} return a[1]}
12:09 < nsf> I want generics to be as fast as hand written code
12:09 < quantumelixir> yes..  that's what generics is for right
12:09 * wrtp doesn't mind if generics aren't code-expanded for every type
12:09 < nsf> quantumelixir: no, "generics" is just a term
12:09 < nsf> I'm talking about implementation
12:09 < quantumelixir> yeah, but that's the end result
12:09 < nsf> you see, it's another problem
12:10 < wrtp> quantumelixir: not necessarily
12:10 < nsf> if you're writing generic container or function or type..
whatever
12:10 < nsf> you want it to be as fast as hand written code
12:10 < wrtp> if you're not careful, you end up with huge code bloat.
12:10 < nsf> for each of the parameters
12:10 < quantumelixir> wrtp: Why not?  If the compiler is going to generate
code for you then it's the same as if you'd written it..
12:10 < nsf> because otherwise it's more efficient to write code by hand
12:10 < quantumelixir> yeah..  standard tradeoff
12:10 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Ping
timeout: 250 seconds]
12:11 < wrtp> nsf: you could say that about interfaces.  more efficient
runtime vs more efficient programmer time
12:11 < nsf> I think code bloat and linker problems can be avoided by simple
feature: explicit instantiation
12:11 < wrtp> that means you have to have a code generator at runtime
12:12 < nsf> wrtp: I don't believe in programmer time
12:12 < quantumelixir> Why can't the compiler figure out what templates to
instantiate?
12:12 < wrtp> at least, perhaps i'm not understanding you.
12:12 < wrtp> nsf: well why aren't use using just assembler then
12:12 < wrtp> ?
12:12 < wrtp> s/use/you/
12:12 < nsf> because it's hard to write code in it..  requires too much
focus
12:12 < wrtp> it's only time :-)
12:13 < quantumelixir> nsf: ^^
12:13 < nsf> ok, I agree
12:13 < wrtp> quantumelixir: depends on the form that generics take
12:14 < nsf> quantumelixir: because you need to know a place where compiler
should instantiate them
12:14 < quantumelixir> My question is why the compiler can't figure out for
itself?  After all Go is statically typed..
12:14 < wrtp> with many kinds of generics, you can create arbitrarily large
types.
12:15 < quantumelixir> Why require "explicit instatiation" -- what does it
give over the implicit one?
12:15 < nsf> uhm..  in Go case I don't know
12:15 -!- adu [~ajr@64.134.67.69] has joined #go-nuts
12:15 < nsf> the problem was in C++ for sure
12:15 < nsf> quantumelixir: control..
12:15 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts
12:15 < nsf> you can easily track an amount of code created by templates
12:15 < wrtp> func f<T>(x T) {type Foo struct {i int; t T}; f(Foo{99,
x})}
12:16 < nsf> but actually I was wrong it doesn't solve the problem
12:16 < wrtp> i suppose you can get around that by forbidding function-local
types holding a generic type.
12:16 < nsf> like what if libA instantiates min<int>() and libB too
12:16 < quantumelixir> nsf: I don't get your point at all.  If you're going
to call foo(x) then no matter explicit/implicit the code for foo(T x) is going to
be generated
12:16 < wrtp> quantumelixir: i agree
12:17 < nsf> quantumelixir: but it makes it easy to bloat your code
12:17 < nsf> without noticing
12:17 < quantumelixir> ah right
12:17 < nsf> it should be hard
12:17 < wrtp> the fundamental problem is that if you pre-generate all the
code, you can get quadratic expansion of code
12:17 < nsf> like in D, there is an approach that states: simple stuff is
correct, hard stuff is fast and unsafe
12:17 < wrtp> particularly when you're dealing with value types
12:18 < nsf> like vars are 0-initialized, but you can avoid that by adding
more code:
12:18 < wrtp> if you restrict yourself to pointer types only, there's no
problem
12:18 < nsf> int i; // zero
12:18 < nsf> int i = void; // stack garbage
12:18 < quantumelixir> ?
12:18 < wrtp> nsf: in D, what are the initial contents of arrays?
12:19 < nsf> the same thing should be about templates, instantiating
templates is a big deal, compiler generates a whole bunch of code
12:19 < nsf> it should be at least explicit
12:19 < nsf> wrtp: I have no idea
12:19 < quantumelixir> nsf: I think the case of explicit instantiation is
faster build times and not so much code bloat (found out after some googling)
12:19 < quantumelixir> s/of/for/
12:19 < wrtp> nsf: i don't want to have to say min<int>(2, 5)
12:20 < wrtp> when min(2, 5) is fine
12:20 < nsf> wrtp: it's not explicit instantiation
12:20 < nsf> what you're showing is lack of type inference
12:20 < nsf> what expl instantiation means, that if you're using min for int
type
12:20 < nsf> you need to specify that somewhere:
12:21 < nsf> using min<int>; // or whatever syntax..
12:21 < wrtp> but the compiler can see that
12:21 < quantumelixir> wrtp: explicit instantiation is when you tell the
compiler to instantiate only those functions/classes for which you have specified
explicitly
12:21 < nsf> yes, but you sometimes don't!
12:21 < wrtp> yeah, i see now
12:21 < quantumelixir> that basically means the compiler can forget about
type inference and do a good job of just compiling
12:21 < nsf> it's just a matter of tracking and controling an amount of code
generated via that mechanism
12:22 < wrtp> quantumelixir: i think the compiler would still have to do
type inference
12:22 < wrtp> otherwise it wouldn't know which explicit instance to use.
12:22 < nsf> type inference is easy in Go's case
12:22 < quantumelixir> wrtp: not for figuring out what T stands for in teh
template
12:22 < wrtp> yeah
12:22 < quantumelixir> "no implicit type conversions"
12:22 < quantumelixir> awesomeness
12:22 < wrtp> no subtypes
12:23 < quantumelixir> Can we define methods on the basic types in Go?
12:23 < wrtp> but still, there are some difficulties: min(nil, nil) ?
12:23 < quantumelixir> Why do I see the "type Int int" everywhere?
12:23 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
12:24 < kimelto> to define methods on basic types?
12:24 < nsf> quantumelixir: because you can only declare methods on types
defined in the same module
12:24 < wrtp> quantumelixir: if you want to define methods, you have to
define a new name for them to hang off
12:24 < wrtp> otherwise different packages would clash
12:24 < quantumelixir> eh?
12:24 < wrtp> well, if one package does func (i int) Add(j int) ...
12:25 -!- niemeyer [~niemeyer@189.30.51.233] has joined #go-nuts
12:25 < quantumelixir> nsf: Ok..
12:25 < quantumelixir> wrtp: right..  go on..
12:25 < wrtp> and another does: func (i int) Add(a ...int) int { ...  }
12:25 < wrtp> then which method does int have?
12:25 -!- boscop_ [~boscop@f055065031.adsl.alicedsl.de] has joined #go-nuts
12:26 < quantumelixir> is there some kind of method choosing rules like in
C++?
12:26 < wrtp> nope
12:26 < quantumelixir> hehe..  thank GOD!!
12:26 < wrtp> even if there were, you wouldn't be able the difference when
one argument is passed
12:27 < quantumelixir> What's the state of the regexp library?  I was
shocked to see this:
http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=python&lang2=go
12:28 < quantumelixir> (Python, lousy Python!!, is 23 times faster at re) :(
12:28 < nsf> regexp library is not optimized at all
12:28 < quantumelixir> Does python use some C extensions?
12:28 < quantumelixir> for re at least?
12:28 < fzzbt> yes
12:28 < nsf> of course
12:29 < quantumelixir> ah..
12:29 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
12:29 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
12:30 < quantumelixir> Isn't C interfacing one of Go's top features?
12:30 < nsf> no
12:30 < wrtp> it's a feature
12:30 < quantumelixir> oh..
12:30 < quantumelixir> I did some myself and I thought it would be easy
12:30 < quantumelixir> for a rather simple library of course..  but still
12:30 < nsf> it's easy
12:30 < nsf> but not as fast as it could be in some cases
12:31 < wrtp> depends on the C whether it's easy or not
12:31 < nsf> e.g.  non-blocking calls like regexp library
12:32 < quantumelixir> what do you mean nsf?
12:32 < quantumelixir> it conflicts with Go's scheduler etc?
12:32 < nsf> quantumelixir: calling a C function from Go is expensive, there
is some kind of magic
12:32 < nsf> yes
12:32 < quantumelixir> :(
12:32 < wrtp> it's inevitable.  there's no way that go can call C safely
without some shenanigans
12:33 < quantumelixir> Where can I read up on this "magic"?
12:33 < quantumelixir> the interfacing bits.
12:33 < nsf> quantumelixir: Go runtime source code and cgo
12:33 < quantumelixir> wrtp: Ah, the safety guarantees eh..
12:33 < nsf> no documentation here
12:33 < quantumelixir> does it involve some kind of complicated sandboxing?
12:34 < nsf> also Go has different calling convention
12:34 < wrtp> quantumelixir: no, it just involves hijacking the current
thread and jumping to a different stack
12:34 < quantumelixir> Why doesn't Go just say: If you're running pure Go
code then you have my word for safety but if you include C and stuff then all bets
are off?
12:34 < nsf> quantumelixir: it's true
12:34 < wrtp> quantumelixir: because we want to be able to call C and have
it work reliably
12:34 < nsf> because if C code explodes, it will explode the Go app as well
12:34 < wrtp> and C can use indefinite amounts of stack space
12:35 < quantumelixir> we can just not guarantee anything at all
12:35 < wrtp> then you get random crashes
12:35 < quantumelixir> at least that way we needn't sacrifice so much
performance
12:35 < quantumelixir> and there are lot of nice C libraries that are ready
to be used
12:35 < wrtp> "i can make your application as fast as you want, as long as
you don't need it to work"
12:35 < quantumelixir> hehe
12:36 < quantumelixir> it's not the same: we are talking about linking to
*working* and *tested* libraires
12:36 < nsf> *buggy*
12:36 < nsf> all of them are
12:36 < nsf> :P
12:36 < wrtp> even if they're working and tested, they can still crash if
you don't give them enough stack
12:37 < wrtp> and there's no way to know how much stack to give them
12:37 < quantumelixir> so you mean to say something like: good C libraries
can do nasty things when called from Go?
12:37 < hokapoka> wrtp: You were right, although not about the keys of the
maps.  Before I updated my src the template would render against object with
unexported properties.  Now they have to be exported.  I knida thought would have
had to have been exported, but it wasn't until recently.
12:38 < wrtp> quantumelixir: yes
12:38 < quantumelixir> wrtp: for no fault of the C code?!
12:38 < wrtp> quantumelixir: yes
12:38 < quantumelixir> wow
12:38 < wrtp> quantumelixir: that's what cgo protects against
12:39 < wrtp> go uses a segmented stack architecture, where each function
checks its stack size on entry.  C does not.
12:39 < wrtp> that's why thread libraries in C have to specify a stack size,
which is a guess, and they blow up if you get it wrong.
12:39 -!- mosva [~mosva@unaffiliated/mosva] has joined #go-nuts
12:40 < quantumelixir> Why are we trying to guarantee the safety of linked C
code?  Why can't we just worry about it being able to run?
12:40 -!- go^lang [~newblue@113.84.48.12] has quit [Read error: Connection timed
out]
12:40 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
12:40 < quantumelixir> Or are these two inter-related
12:40 < wrtp> if it's not safe, it might not run
12:40 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal]
12:41 -!- go^lang [~newblue@113.84.48.12] has joined #go-nuts
12:41 < wrtp> hokapoka: yeah, that's a recent change.  it happened for gobs
and json too
12:41 < quantumelixir> So, this penalty is recurrent or just once for one
external C function call?
12:41 < quantumelixir> *is this
12:42 < wrtp> if you want to know what's going on, look in
src/pkg/runtime/cgo
12:42 < wrtp> see 386.S and one of the mach dependent files, e.g.
darwin_386.c
12:43 < wrtp> quantumelixir: there's a penalty for each call
12:43 < quantumelixir> thing is that I know very little about assembly and
call stacks etc..  just superficial idea about these things
12:43 < quantumelixir> but I'll try to learn what I can
12:43 < wrtp> looks like about 15 instructions penalty to me
12:44 < wrtp> quantumelixir: well, don't worry about it then.  it's a pretty
small overhead.
12:44 < wrtp> just make sure that the granularity of the C functions you're
calling is large enough that the overhead is negligible.
12:44 < quantumelixir> hmm..  easier to remember that way
12:44 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
12:45 < quantumelixir> but once the function gets running it is basically
unhindered right?
12:47 < wrtp> quantumelixir: yes
12:47 < quantumelixir> wrtp: neat
12:47 < wrtp> to be honest, you're only talking a few hundred ns of overhead
12:48 < wrtp> or less, who knows
12:48 < quantumelixir> yeah..  which I doubt is the answer to the regexp
sluggishness
12:48 < quantumelixir> but I'm sure this will be fixed
12:48 < quantumelixir> just that I was shocked :)
12:48 < wrtp> depends on the regexp
12:49 < wrtp> quantumelixir: there's a port of re2 in the works.  saw a
little bit of life yesterday, but who knows whether it'll carry on.
12:49 < quantumelixir> what's up with the pcre c library?
12:50 < wrtp> i've no idea
12:52 < mosva> Does go support ternary operator?
12:52 < quantumelixir> nope
12:52 < mosva> why not?
12:53 < quantumelixir> well, because it doesn't
12:53 < quantumelixir> use if boolean { ..  } else { ..  }
12:53 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
12:54 < quantumelixir> I'm sure many of you guys might have also found cases
where some code could be simplified if Go's statements were really expressions
with side effects like in C
12:54 < quantumelixir> Is there any reason it's not part of Go?
12:55 < quantumelixir> Just cleanear syntax?
12:56 < wrtp> see this thread:
http://groups.google.com/group/golang-nuts/browse_thread/thread/206a3e00e28c589c/d1ac88d7f7b34f26?lnk=gst&q=ternary#d1ac88d7f7b34f26
12:56 < rm445> Bear in mind this is a language without a while loop :-)
12:57 < wrtp> rm445: it's not
12:57 < wrtp> for expr {...} is exactly equivalent to while
12:57 < rm445> yeah yeah
12:57 < mosva> and its better
12:58 < rm445> actually, I'm not meaning to troll.  Only having one loop
construct does make me boggle slightly.
12:58 < mosva> Its cleaner
12:58 < rm445> Perhaps other languages have broken my brain, but I think I
would think of how to do something in terms of while or do and then think of how
to write it as Go for syntax.
12:59 < wrtp> the one thing i miss from C is an equivalent of while((n =
read(fd, buf, len)) > 0) { ...  }
12:59 < quantumelixir> I am beginning to like the limited set of features
that Go supports.  It's almost like, no matter what you write, it will always end
up being idiomatic Go!
12:59 < wrtp> rm445: just write it as while and change the while to for :-)
12:59 < rm445> wrtp: maybe I could write a preprocessor to do it for me :-)
13:00 < wrtp> or write it as for { ....  if !condition { break } }
13:00 < quantumelixir> that's a do while right there rm445
13:00 < wrtp> rm445: you just need to write more Go code.  it becomes
natural pretty quickly.
13:00 < quantumelixir> that's why Go is aweomse
13:00 < quantumelixir> *awesome
13:00 < wrtp> rm445: i've written your preprocessor
13:00 < wrtp> sed 's/while/for/'
13:00 < wrtp> :-)
13:01 < mosva> When I first heard about go I was like "Now a days every
company makes a language", now I'm like :O
13:02 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
13:05 < rm445> I think there's massive value to having a language resist
extra features, and for its idioms to be strongly ingrained (enforcing the 1TBS by
the way the lexer inserts semicolons is literally genius).  The line has to be
drawn, but we're all entitled to quibble about its placement.
13:06 < wrtp> yeah sure.  the lack of the ternary operator is certainly
arguable.
13:06 < wrtp> but i think the looping construct works well
13:07 < wrtp> only one keyword vs three in C
13:07 < quantumelixir> rm445: I agree.  If you feel strongly about something
then write a compelling case for it -- maybe you'll even understand why it's not
necessary in the process :)
13:07 < wrtp> (except you've got "range" too of course)
13:07 -!- adu [~ajr@64.134.67.69] has quit [Quit: adu]
13:07 < quantumelixir> rm445: What's 1TBS?
13:07 < rm445> The One True Brace Style :-)
13:08 < quantumelixir> yep!  <3!!
13:08 < quantumelixir> I liked the way it was done too
13:10 -!- d_m_ [d6@SDF.ORG] has quit [Ping timeout: 240 seconds]
13:15 -!- adu [~ajr@64.134.67.69] has joined #go-nuts
13:15 < rm445> OK guys, I'm not going to bang the drum about this, but
here's what I think.  'While' is a natural construct for expressing algorithms.
13:15 < rm445> Open a credible programming book such as 'Programming Pearls'
and you'll see while loops in the pseudo-code.
13:15 < rm445> You still write while loops in Go, it's just the /syntax/
makes you write 'for'.
13:15 < rm445> Saying every loop can be expressed through 'for' isn't saying
much.  You could eliminate if from Go and replace it with 'switch'.  Heck, you
could replace switch with an extra type of 'for' expression!
13:16 < wrtp> what difference does the spelling of the word make?
13:16 -!- cafesofie [~cafesofie@rnwifi-164-107-93-156.resnet.ohio-state.edu] has
quit [Remote host closed the connection]
13:17 < wrtp> while is, after all, a special case of the C "for" construct
13:17 < wrtp> in C you could write for(; condition;){ ...  }
13:17 < wrtp> and it's exactly the same as while(condition){ ...  }
13:17 < wrtp> i think removing while is a brilliant idea
13:18 < quantumelixir> me too
13:18 < quantumelixir> rm445: this is bikeshedding
13:18 < quantumelixir> it's a moot point
13:18 < quantumelixir> not worth debating :/
13:19 < wrtp> naah, it's good to have the debate, occasionally.
13:19 -!- jumzi [~jumzi@c-89-233-234-125.cust.bredband2.com] has quit [Read error:
Operation timed out]
13:19 < quantumelixir> Don't tear apart the idea by taking it to it's
logical extreme..  of course it's not natural to replace a weitch by a for
13:19 < quantumelixir> s/weitch/switch/
13:20 < rm445> I know what you mean by bikeshedding, but I'm not some guy
saying Go isn't interesting because of lack of while (some people take that view
wrt lack of generics).
13:20 < rm445> I'm a pro-Go person and Go user who has a view about the
syntax.
13:21 < wrtp> rm445: my view is that the gain from having "while" isn't as
great as the gain from losing a reserved word.
13:21 -!- jumzi [~jumzi@c-89-233-234-125.cust.bredband2.com] has joined #go-nuts
13:21 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
13:21 < quantumelixir> Great!  I was just saying that this language feature
is going to be around no matter what.  Although, now I feel that's a poor way of
dissuading someone to debate about the feature.  :)
13:21 -!- MX80 [~MX80@cust222.253.117.74.dsl.g3telecom.net] has quit [Remote host
closed the connection]
13:21 < quantumelixir> poor because it's circular
13:21 < wrtp> and it's common in C code do write: for(;;){ ...  } rather
than while(1){ ...  } so for is used that way in C too
13:22 < skelterjohn> good morning
13:24 < wrtp> skelterjohn: hey
13:29 -!- Sgeo [~Sgeo@ool-18bf618a.dyn.optonline.net] has quit [Read error:
Connection reset by peer]
13:30 -!- Sgeo [~Sgeo@ool-18bf618a.dyn.optonline.net] has joined #go-nuts
13:41 -!- virtualsue [~chatzilla@nat/cisco/x-ymiqxpikuijuamxc] has joined #go-nuts
13:41 -!- xash [~xash@d073236.adsl.hansenet.de] has quit [Ping timeout: 255
seconds]
13:46 -!- dju [dju@fsf/member/dju] has quit [Ping timeout: 240 seconds]
13:47 -!- dju [dju@fsf/member/dju] has joined #go-nuts
13:59 -!- ExtraSpice [~XtraSpice@88.118.33.48] has joined #go-nuts
14:00 < mosva> morning skelterjohn
14:05 -!- DerHorst [~Horst@e176096216.adsl.alicedsl.de] has joined #go-nuts
14:08 -!- soapy_illusions [~soapy_ill@modemcable005.105-177-173.mc.videotron.ca]
has joined #go-nuts
14:11 -!- go^lang [~newblue@113.84.48.12] has quit [Quit: 暂离]
14:13 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Quit:
Leaving.]
14:14 -!- antileet [~anirudhs@122.167.64.99] has quit [Remote host closed the
connection]
14:17 -!- adu [~ajr@64.134.67.69] has quit [Quit: adu]
14:21 -!- Nitro [~Nitro@unaffiliated/nitro] has joined #go-nuts
14:25 -!- adu [~ajr@64.134.67.69] has joined #go-nuts
14:25 -!- adu [~ajr@64.134.67.69] has quit [Client Quit]
14:26 -!- adu [~ajr@64.134.67.69] has joined #go-nuts
14:27 -!- artefon [~thiago@187.20.205.128] has quit [Quit: bye]
14:43 -!- iant [~iant@67.218.105.75] has joined #go-nuts
14:43 -!- mode/#go-nuts [+v iant] by ChanServ
14:54 -!- femtoo [~femto@95-89-198-16-dynip.superkabel.de] has joined #go-nuts
14:58 -!- Wiz126 [Wiz@h29.117.232.68.ip.windstream.net] has quit [Ping timeout:
246 seconds]
15:00 -!- tav [~tav@92.7.116.65] has quit [Ping timeout: 240 seconds]
15:01 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
15:03 -!- Fish- [~Fish@coss6.exosec.net] has quit [Quit: So Long, and Thanks for
All the Fish]
15:04 -!- Wiz126 [Wiz@h29.117.232.68.ip.windstream.net] has joined #go-nuts
15:06 -!- Fish [~Fish@exo3753.pck.nerim.net] has joined #go-nuts
15:08 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
15:10 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se]
has joined #go-nuts
15:11 -!- shvntr [~shvntr@113.84.151.140] has quit [Quit: leaving]
15:12 < homa_rano> I keep getting segfaults when running anything with
gotest
15:13 < homa_rano> tests run with all.bash pass, but run.bash segfaults on
the first test
15:13 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
15:26 -!- d_m [d6@SDF.ORG] has joined #go-nuts
15:32 -!- adu [~ajr@64.134.67.69] has quit [Quit: adu]
15:32 < aiju> is there some function to concatenate slices?
15:33 -!- fabled [~fabled@mail.fi.jw.org] has quit [Quit: Ex-Chat]
15:33 < kimelto> aiju: append
15:33 < mosva> aiju, and to generate string?
15:34 < aiju> kimelto: append appends single objects
15:34 < kimelto> s1 = append(s1, s2..)
15:34 < kimelto> iirc
15:34 < aiju> no
15:36 < aiju> and is there some way to kill goroutines?
15:36 < mosva> kimelto, its ...
15:37 <+iant> aiju: there is no way to kill a different goroutine, there
isn't even a way to name it
15:38 < aiju> hmmm
15:38 < aiju> makes me add control channels to all goroutines …
15:38 -!- brownee [~brownee@209.34.56.106] has joined #go-nuts
15:39 <+iant> yes, but it avoids a host of complexities; what should happen
if you kill a goroutine that is holding a lock?
15:39 < aiju> hm.
15:39 <+iant> the pthreads library tries to support pthread_cancel, but
making it work in real programs is so complex that hardly anybody ever uses it
15:40 -!- emjayess [~emjayess@pix1.i29.net] has joined #go-nuts
15:40 < kimelto> mosva: right!
15:43 -!- sauerbraten [~sauerbrat@p508CECAC.dip.t-dialin.net] has joined #go-nuts
15:44 -!- adu [~ajr@64.134.67.69] has joined #go-nuts
15:56 -!- iant [~iant@67.218.105.75] has quit [Quit: Leaving.]
15:56 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
15:57 -!- nsf [~nsf@jiss.convex.ru] has quit [Client Quit]
15:57 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
15:58 -!- qjcg [~qjcg@208.88.110.46] has joined #go-nuts
16:04 -!- wrtp [~rog@92.17.17.115] has quit [Quit: wrtp]
16:04 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts
16:05 < skelterjohn> homa_rano: did you try hg pull -u?
16:06 -!- iant [~iant@nat/google/x-hujhguauphptfeie] has joined #go-nuts
16:06 -!- mode/#go-nuts [+v iant] by ChanServ
16:06 -!- iant [~iant@nat/google/x-hujhguauphptfeie] has quit [Client Quit]
16:06 -!- iant [~iant@nat/google/x-dueizczxbwskpnaq] has joined #go-nuts
16:06 -!- mode/#go-nuts [+v iant] by ChanServ
16:07 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
16:10 < homa_rano> skelterjohn: yes, it's the most recent version
16:11 < homa_rano> my other 64bit box is unaffected
16:11 < homa_rano> the problem one is 386
16:13 < skelterjohn> that was the only troubleshooting suggestion i had,
sorry
16:16 -!- femtoo [~femto@95-89-198-16-dynip.superkabel.de] has quit [Read error:
Connection reset by peer]
16:20 -!- Natch| [~natch@c-2bcfe155.25-4-64736c10.cust.bredbandsbolaget.se] has
quit [Ping timeout: 245 seconds]
16:21 -!- Natch| [~natch@c-2bcfe155.25-4-64736c10.cust.bredbandsbolaget.se] has
joined #go-nuts
16:25 -!- Natch| [~natch@c-2bcfe155.25-4-64736c10.cust.bredbandsbolaget.se] has
quit [Client Quit]
16:25 < quantumelixir> Is running ./all.bash from within the src/ directory
the correct way to recompile?
16:25 < quantumelixir> Why does it delete the object files first?!
16:26 < quantumelixir> Isn't it supposed to remake only those that *need*
rebuilding?
16:28 < skelterjohn> all.bash does a clean-build
16:28 < skelterjohn> and yes
16:28 < skelterjohn> in the opposite order
16:29 < skelterjohn> there is a way to do only the incremental build as well
16:29 < skelterjohn> i just don't know what it is, off the top of my head
16:29 < skelterjohn> oh - there is a makefile in src/pkg
16:30 < skelterjohn> run that
16:30 < quantumelixir> ah thanks skelterjohn
16:30 < quantumelixir> what's the point of a "clean build"?
16:30 < skelterjohn> sometimes that fixes problems
16:31 < quantumelixir> well maybe because 6g itself might change..
16:31 < skelterjohn> for instance, the makefile runs gomake
16:31 < skelterjohn> and gomake might have a bug
16:31 -!- devrim [~Adium@cpe-72-225-239-227.nyc.res.rr.com] has quit [Quit:
Leaving.]
16:31 < skelterjohn> so all.bash rebuilds gomake first
16:32 < skelterjohn> there are other things too
16:32 < quantumelixir> yeah, because this is the source tree there are all
kinds of dependencies
16:32 < quantumelixir> the compilers may not be producing the same object
files anymore
16:32 < skelterjohn> right
16:32 < skelterjohn> so, if you aren't worried about that, you can run the
pkg makefile
16:32 < skelterjohn> but if you have a problem after doing that, you should
run all.bash
16:32 -!- soapy_illusions [~soapy_ill@modemcable005.105-177-173.mc.videotron.ca]
has quit [Ping timeout: 272 seconds]
16:33 < quantumelixir> hmm..
16:34 < quantumelixir> How much time does it take for a full build on your
machines?  (at anyone who cares to answer) :)
16:34 < quantumelixir> mine took 4:28s
16:35 -!- snearch [~snearch@f053010232.adsl.alicedsl.de] has joined #go-nuts
16:35 < aiju> is there some way to define empty types?
16:36 < kimelto> empty?
16:36 < aiju> containing no data
16:36 < aiju> for use with type switches
16:37 < taruti> type foo struct {}
16:38 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 255 seconds]
16:39 < aiju> perfect
16:39 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-149-190.clienti.tiscali.it] has
joined #go-nuts
16:39 < kimelto> Im not sure to understand why you want to do that
16:40 < skelterjohn> usually if you just want a "pointer to nothing", you
can use interface{}
16:40 < skelterjohn> though i guess struct{} is just as good
16:40 < aiju> invalid value for a variable
16:41 < skelterjohn> need more context
16:41 < skelterjohn> oh - you can't say a := interface{}
16:41 < skelterjohn> interface{} is a type
16:41 < skelterjohn> but you can say
16:41 < aiju> yeah
16:41 < skelterjohn> var a interface{}
16:41 < skelterjohn> what exactly do you want to do?
16:42 < aiju> i have an interface variable and need an invalid value for
that
16:42 < skelterjohn> nil isn't good?
16:42 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
16:43 -!- adu [~ajr@64.134.67.69] has quit [Quit: adu]
16:43 < aiju> can i test nil with a type switch?
16:43 < skelterjohn> this feels like a really awkward way to do things, tbh
16:43 < skelterjohn> but: i don't think so
16:43 < skelterjohn> if you want to say var a interface{} = new(struct{})
16:44 < skelterjohn> and test against the type *struct{}, that might work
16:44 < aiju> type NullToken struct{} works perfectly
16:48 < aiju> haha i just noticed i can use goto to solve the old problem of
pushing chars back into a char stream
16:49 < skelterjohn> not gonna lie, this sounds sort of nightmarish :)
16:49 < aiju> not really
16:49 < aiju> i simply jump behind the ReadRune
16:50 < aiju> ungetc or something like that is waaay uglier imho
16:50 < skelterjohn> goto, and using an extra type to check for an error
condition :)
16:50 < aiju> it's not an error condition
16:51 -!- rlab_ [~Miranda@91.200.158.34] has joined #go-nuts
16:51 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 255 seconds]
16:52 < aiju> go Databaser(dbc)
16:52 < aiju> go Lexer(os.Stdin, ch)
16:52 < aiju> go Parser(ch, dbc)
16:52 < aiju> this feels infinitely awesome
16:54 -!- wrtp [~rog@92.17.17.115] has joined #go-nuts
16:57 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:58 < aiju> it's annoying that you can have .(type) only with switch
16:58 < skelterjohn> what else would you like?
16:59 < aiju> if
16:59 < skelterjohn> oh
16:59 < aiju> nested switch is very awkward
16:59 < skelterjohn> if valWithType, ok := x.(type); ok { ...  }
16:59 < skelterjohn> :)
16:59 < aiju> oh k
16:59 < skelterjohn> if x is not that type, ok will be false
17:00 < skelterjohn> if you just do valWithType := x.(type), and it's not
the right type, it will panic
17:00 < aiju> i'm trying to rite a parser …
17:00 < aiju> +w
17:00 < skelterjohn> have you taken a look at goyacc?
17:01 < aiju> nope
17:01 < Tonnerre> Oh
17:01 < Tonnerre> Great
17:01 < Tonnerre> I need to
17:01 < aiju> but it's not concurrent :P
17:01 < skelterjohn> hmm
17:02 < aiju> needs me to redesign my lexer
17:02 < quantumelixir> aiju: what happened to gofy?
17:02 < skelterjohn> lexing is usually so fast compared to parsing that it's
not often an issue
17:02 < aiju> but yeah, thanks
17:02 < aiju> quantumelixir: nothing
17:02 < quantumelixir> oh, you're doing them concurrently?
17:02 < quantumelixir> s/them/them both/
17:02 < aiju> yeah
17:02 < quantumelixir> great
17:02 < skelterjohn> it certainly makes sense to make tokens available to
the parser as they become available
17:02 < aiju> also, having a prolog interpreter for gofy would be fucking
awesome
17:03 < skelterjohn> prolog!
17:03 < kimelto> oh dear!
17:03 < aiju> http://phicode.de/git/?p=golorp.git;a=tree
17:03 < skelterjohn> i'm scared to click, but i shall
17:03 < aiju> a partly working version
17:05 -!- im2ee [im2ee@gateway/shell/bshellz.net/x-oulqsuimlzjlhaso] has joined
#go-nuts
17:06 < skelterjohn> i think you should write a "Let's go!" interpreter for
go
17:07 < aiju> i'll also try writing a K interpreter
17:07 < quantumelixir> aiju: you're crazy..  no..  deranged!
17:07 < aiju> or rather an interpreter for a K variant called KKK
17:07 < aiju> KonKurrent K, the array supremacy language
17:07 < skelterjohn> i don't see that catching on, for some reason
17:09 < wrtp> aiju: there's nothing stopping you using goyacc parsers
concurrently
17:09 < wrtp> i made a modification to it to specifically allow it
17:10 < aiju> wrtp: yeah sure, but my lexer supplies token on a channel :P
17:12 < quantumelixir> aiju: did you know prolog from before?
17:12 < aiju> ofc
17:12 < quantumelixir> looks positively esoteric
17:13 < aiju> hahaha
17:13 < aiju> prolog is really nice
17:13 < quantumelixir> I am sure.  Just as nice as K, isn't it?
17:13 < aiju> they are nice in different ways
17:13 < quantumelixir> something I'll never know ;)
17:13 -!- Venom_X [~pjacobs@66.54.185.131] has joined #go-nuts
17:14 < quantumelixir> when I have the time (next semester maybe?), I'll try
Haskell
17:17 < wrtp> aiju: that's fine
17:17 < wrtp> you can do that no problem
17:18 < wrtp> just provide a Lex method which reads from the channel
17:19 -!- rlab_ [~Miranda@91.200.158.34] has quit [Ping timeout: 240 seconds]
17:20 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
17:20 -!- artefon [~thiagon@150.164.2.20] has joined #go-nuts
17:21 -!- imsplitbit [~imsplitbi@64.39.4.132] has joined #go-nuts
17:22 -!- dforsyth_ [~dforsyth@bastion.inap.yelpcorp.com] has joined #go-nuts
17:24 -!- wtfness [~dsc@78.100.221.189] has joined #go-nuts
17:25 -!- foocraft [~dsc@78.101.191.254] has quit [Ping timeout: 240 seconds]
17:27 -!- im2ee [im2ee@gateway/shell/bshellz.net/x-oulqsuimlzjlhaso] has quit
[Quit: leaving]
17:30 -!- tvw [~tv@e176003029.adsl.alicedsl.de] has joined #go-nuts
17:30 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Quit: This computer has gone
to sleep]
17:34 < aiju> somehow this doesn't work at all
17:35 -!- adu [~ajr@pool-72-83-254-159.washdc.fios.verizon.net] has joined
#go-nuts
17:37 -!- artefon [~thiagon@150.164.2.20] has quit [Ping timeout: 276 seconds]
17:37 < aiju> it is like totally crazy …
17:37 < aiju> i have my grammar and it doesn't complain about anything
17:38 < aiju> oh my error
17:38 < aiju> $$ instead of $0
17:38 < aiju> eh $0 instead of $$
17:39 -!- LeNsTR_ [~lenstr@79.165.23.55] has joined #go-nuts
17:39 -!- LeNsTR_ [~lenstr@79.165.23.55] has quit [Changing host]
17:39 -!- LeNsTR_ [~lenstr@unaffiliated/lenstr] has joined #go-nuts
17:40 -!- enherit [~enherit@cpe-98-149-170-48.socal.res.rr.com] has joined
#go-nuts
17:40 -!- artefon [~thiagon@150.164.2.20] has joined #go-nuts
17:41 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Ping timeout: 240
seconds]
17:41 < aiju> prolog grammar is a nightmare to parse
17:48 < skelterjohn> yeah, not sure why you're inflicting this nightmare
upon yourself :)
17:54 -!- artefon [~thiagon@150.164.2.20] has quit [Read error: Connection reset
by peer]
17:54 < aiju> for some reason it loses the last statement in every program
18:01 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-149-190.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
18:03 < aiju> if i add a fmt.Printf for one argument it works o.O
18:04 < aiju> if i print ANYTHING it works
18:04 < aiju> what the FUCK?
18:04 < mosva> aiju, you are crazy!
18:07 < skelterjohn> nothing wrong with being a little crazy
18:07 < skelterjohn> it makes real problems less intimidating :)
18:08 < mosva> lol, yeah
18:09 -!- Natch| [~natch@c-2bcfe155.25-4-64736c10.cust.bredbandsbolaget.se] has
joined #go-nuts
18:13 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Quit: LeNsTR]
18:13 -!- Nitro [~Nitro@unaffiliated/nitro] has joined #go-nuts
18:27 -!- temoto [~temoto@81.19.91.15] has quit [Ping timeout: 240 seconds]
18:30 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
18:33 < quantumelixir> In a loop I have this: if (m*m - n) > 0 { ...  }.
Now because m is really large, m*m overflows and I get wrong results.  But I just
need the sign of this operation -- not the actual difference
18:33 -!- emjayess [~emjayess@pix1.i29.net] has quit [Quit: Leaving]
18:33 < quantumelixir> Any hack to do this?
18:34 -!- gilles [~gilles@zeus.ugent.be] has joined #go-nuts
18:34 -!- gilles [~gilles@zeus.ugent.be] has quit [Client Quit]
18:34 < mosva> quantumelixir, What is the type of m and n?
18:34 < quantumelixir> uint64
18:35 < quantumelixir> oh crap
18:35 < quantumelixir> that's it
18:35 < quantumelixir> `u'!!
18:35 < mosva> :)
18:35 < quantumelixir> thanks mosva :)
18:35 < quantumelixir> wow..  lot of head scratching :D
18:38 -!- GilJ [~gilles@zeus.ugent.be] has quit [Quit: leaving]
18:40 -!- GilJ [~GilJ@zeus.ugent.be] has joined #go-nuts
18:41 -!- GilJ [~GilJ@zeus.ugent.be] has quit [Client Quit]
18:42 -!- GilJ [~GilJ@zeus.ugent.be] has joined #go-nuts
18:43 -!- GilJ [~GilJ@zeus.ugent.be] has quit [Client Quit]
18:43 -!- GilJ [~GilJ@zeus.ugent.be] has joined #go-nuts
18:44 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Quit: skelterjohn]
18:46 -!- GilJ_ [~GilJ@zeus.ugent.be] has joined #go-nuts
18:46 -!- GilJ_ [~GilJ@zeus.ugent.be] has quit [Client Quit]
18:47 -!- nettok [~quassel@200.119.152.125] has joined #go-nuts
18:48 -!- Wiz126 [Wiz@h29.117.232.68.ip.windstream.net] has quit [Read error:
Connection reset by peer]
18:48 -!- Wiz126 [Wiz@h29.117.232.68.ip.windstream.net] has joined #go-nuts
18:48 -!- devrim [~Adium@160.79.7.234] has joined #go-nuts
18:51 -!- keithgcascio [~keithcasc@nat/google/x-nbowelueglgplamk] has joined
#go-nuts
18:53 -!- l00t [~i-i3id3r_@189.105.21.146] has joined #go-nuts
18:54 -!- devrim [~Adium@160.79.7.234] has quit [Ping timeout: 240 seconds]
18:57 -!- sauerbraten [~sauerbrat@p508CECAC.dip.t-dialin.net] has quit [Remote
host closed the connection]
19:01 -!- devrim [~Adium@160.79.7.234] has joined #go-nuts
19:14 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com]
has quit [Remote host closed the connection]
19:15 -!- jkakar [~jkakar@193.153.244.102] has quit [Ping timeout: 240 seconds]
19:17 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com]
has joined #go-nuts
19:19 < Venom_X> hey guys, if I have a struct T with a string x as a
property, since strings are immutable, how can I go about changing the value of
that property?  I'm trying to setup a method func (t *T) changeX(newX string) {
t.x = newX } //but that doesn't seem to do the job
19:21 -!- virtualsue [~chatzilla@nat/cisco/x-ymiqxpikuijuamxc] has quit [Ping
timeout: 255 seconds]
19:24 < aiju> Venom_X: this should work just as expected
19:25 -!- MX80 [~MX80@cust107.253.117.74.dsl.g3telecom.net] has joined #go-nuts
19:27 -!- virtualsue [~chatzilla@nat/cisco/x-blxuffuagignqqzo] has joined #go-nuts
19:28 -!- jkakar [~jkakar@202.Red-79-152-227.dynamicIP.rima-tde.net] has joined
#go-nuts
19:32 -!- virtualsue [~chatzilla@nat/cisco/x-blxuffuagignqqzo] has quit [Ping
timeout: 255 seconds]
19:39 -!- The_Cog [~steve@i-195-137-123-15.freedom2surf.net] has joined #go-nuts
19:44 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
19:48 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
19:50 -!- dforsyth_ [~dforsyth@bastion.inap.yelpcorp.com] has quit [Quit: Computer
has gone to sleep.]
19:59 -!- oscitate [~oscitate@CPE-124-187-120-137.lns1.woo.bigpond.net.au] has
joined #go-nuts
20:01 -!- DerHorst [~Horst@e176096216.adsl.alicedsl.de] has quit [Remote host
closed the connection]
20:02 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Quit:
Leaving.]
20:03 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
20:12 -!- photron [~photron@port-92-201-38-33.dynamic.qsc.de] has joined #go-nuts
20:17 -!- illya77 [~illya77@91-211-133-95.pool.ukrtel.net] has joined #go-nuts
20:29 -!- The_Cog [~steve@i-195-137-123-15.freedom2surf.net] has quit [Quit:
Leaving.]
20:30 -!- virtualsue [~chatzilla@93-97-62-8.zone5.bethere.co.uk] has joined
#go-nuts
20:31 -!- TheMue [~TheMue@p5DDF521B.dip.t-dialin.net] has joined #go-nuts
20:33 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
20:34 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Quit: This computer has gone
to sleep]
20:38 -!- Nitro [~Nitro@unaffiliated/nitro] has joined #go-nuts
20:38 -!- bmizerany [~bmizerany@204.14.152.118] has joined #go-nuts
20:40 < rm445> If I understand correctly, saying strings are immutable is a
bit like saying the number 7 is immutable.  You can still assign a new value to a
string variable, they're just telling you that you can't expect to change bits of
a string with mystring[2]='a' or whatever.
20:42 < rm445> (you can still do stuff with your strings e.g.  mystring =
mystring[0:1] + "foo")
20:51 < KirkMcDonald> rm445: Yes, that's about right.
20:53 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Quit: This computer has gone
to sleep]
20:59 -!- adu [~ajr@pool-72-83-254-159.washdc.fios.verizon.net] has quit [Quit:
adu]
21:11 -!- adu [~ajr@pool-72-83-254-159.washdc.fios.verizon.net] has joined
#go-nuts
21:14 -!- illya77 [~illya77@91-211-133-95.pool.ukrtel.net] has quit [Quit:
illya77]
21:18 -!- devrim [~Adium@160.79.7.234] has quit [Read error: Connection reset by
peer]
21:20 -!- emjayess [~emjayess@pix1.i29.net] has joined #go-nuts
21:22 -!- prip [~foo@host80-133-dynamic.42-79-r.retail.telecomitalia.it] has quit
[Ping timeout: 240 seconds]
21:28 -!- iant [~iant@nat/google/x-dueizczxbwskpnaq] has quit [Quit: Leaving.]
21:34 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:1180:eaa2:bcd1:6412] has quit
[Quit: Leaving.]
21:36 -!- prip [~foo@host1-128-dynamic.36-79-r.retail.telecomitalia.it] has joined
#go-nuts
21:38 -!- frobnitz [~ian@king.bitgnome.net] has quit [Ping timeout: 240 seconds]
21:38 -!- frobnitz [~ian@king.bitgnome.net] has joined #go-nuts
21:52 -!- sav [~lsd@189001130056.usr.predialnet.com.br] has joined #go-nuts
21:55 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
21:55 -!- iant [~iant@nat/google/x-acnotzdkrmcazyyb] has joined #go-nuts
21:55 -!- mode/#go-nuts [+v iant] by ChanServ
21:57 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 264 seconds]
21:58 -!- adu [~ajr@pool-72-83-254-159.washdc.fios.verizon.net] has quit [Quit:
adu]
22:00 -!- tensorpudding [~user@99.23.127.179] has joined #go-nuts
22:09 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
22:09 -!- imsplitbit [~imsplitbi@64.39.4.132] has quit [Quit: Bye!]
22:10 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
22:14 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Ping timeout: 240 seconds]
22:27 -!- devrim [~Adium@160.79.7.234] has joined #go-nuts
22:30 -!- adu [~ajr@pool-72-83-254-159.washdc.fios.verizon.net] has joined
#go-nuts
22:32 -!- pff__ [557f028e@gateway/web/freenode/ip.85.127.2.142] has joined
#go-nuts
22:35 -!- pff__ [557f028e@gateway/web/freenode/ip.85.127.2.142] has left #go-nuts
[]
22:41 -!- virtualsue [~chatzilla@93-97-62-8.zone5.bethere.co.uk] has quit [Ping
timeout: 246 seconds]
22:43 -!- TheMue [~TheMue@p5DDF521B.dip.t-dialin.net] has quit [Quit: TheMue]
22:55 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
22:56 -!- Nitro [~Nitro@unaffiliated/nitro] has joined #go-nuts
22:56 -!- im2ee [im2ee@gateway/shell/bshellz.net/x-hyfzmlsgvewvbkej] has joined
#go-nuts
22:58 -!- emjayess [~emjayess@pix1.i29.net] has quit [Quit: Leaving]
22:58 -!- osct [~oscitate@CPE-124-187-120-137.lns1.woo.bigpond.net.au] has joined
#go-nuts
23:01 -!- oscitate [~oscitate@CPE-124-187-120-137.lns1.woo.bigpond.net.au] has
quit [Ping timeout: 255 seconds]
23:04 -!- qjcg [~qjcg@208.88.110.46] has quit [Quit: qjcg]
23:08 -!- devrim [~Adium@160.79.7.234] has quit [Quit: Leaving.]
23:08 -!- wrtp [~rog@92.17.17.115] has quit [Quit: wrtp]
23:11 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
23:27 -!- devrim [~Adium@160.79.7.234] has joined #go-nuts
23:27 -!- ExtraSpice [~XtraSpice@88.118.33.48] has quit [Read error: Connection
reset by peer]
23:30 -!- devrim [~Adium@160.79.7.234] has quit [Client Quit]
23:35 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
23:36 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Quit: Morten.  Desu~]
23:39 -!- devrim [~Adium@160.79.7.234] has joined #go-nuts
23:43 -!- snearch [~snearch@f053010232.adsl.alicedsl.de] has quit [Quit:
Verlassend]
23:44 -!- devrim [~Adium@160.79.7.234] has quit [Client Quit]
23:45 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se]
has quit [Remote host closed the connection]
23:54 -!- tav [~tav@92.7.116.65] has joined #go-nuts
23:54 -!- boscop_ [~boscop@f055065031.adsl.alicedsl.de] has quit [Ping timeout:
240 seconds]
23:57 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
23:57 -!- cafesofie [~cafesofie@dhcp-140-254-204-61.osuwireless.ohio-state.edu]
has joined #go-nuts
23:58 -!- brownee [~brownee@209.34.56.106] has quit [Ping timeout: 255 seconds]
--- Log closed Sat Jan 22 00:00:04 2011