--- Log opened Tue Aug 10 00:00:05 2010
00:09 -!- tvw [~tv@e176000119.adsl.alicedsl.de] has quit [Remote host closed the
connection]
00:24 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has quit
[Quit: carllerche]
00:31 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts
00:32 -!- aho [~nya@fuld-4d00d213.pool.mediaWays.net] has quit [Ping timeout: 246
seconds]
00:33 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts
00:54 -!- carter [~carter@cpe-69-201-181-224.nyc.res.rr.com] has left #go-nuts
["Leaving..."]
00:56 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 258 seconds]
01:00 -!- scm [justme@d019254.adsl.hansenet.de] has quit [Quit: leaving]
01:08 -!- allengeorge [~allengeor@74.12.150.7] has joined #go-nuts
01:10 -!- carrus85 [~carrus85@64.0.193.15] has quit [Quit: Leaving]
01:12 -!- amacleod [~amacleod@pool-96-252-93-11.bstnma.fios.verizon.net] has
joined #go-nuts
01:18 -!- tav_ [~tav@2001:0:53aa:64c:0:3c8c:a3f8:bbdd] has joined #go-nuts
01:18 -!- tav [~tav@2001:0:53aa:64c:0:3c8c:a3f8:bbdd] has quit [Ping timeout: 248
seconds]
01:22 -!- scm [justme@d019254.adsl.hansenet.de] has joined #go-nuts
01:22 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Remote host
closed the connection]
01:29 < manveru> anybody has an idea how i can restrict a goroutine to run
only on one native thread?
01:31 < Namegduf> LockOSThread
01:31 < Namegduf> In runtime, I think.
01:32 < manveru> ah, cool
01:36 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Ping
timeout: 260 seconds]
01:36 -!- ShadowIce [pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
01:36 -!- jcao219 [~Jimmy_Cao@124.126.154.127] has joined #go-nuts
01:56 -!- jcao219 [~Jimmy_Cao@124.126.154.127] has quit [Quit: Leaving.]
01:56 -!- jhawk28 [~jhawk28@nc-71-2-27-144.sta.embarqhsd.net] has joined #go-nuts
01:56 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Remote host closed
the connection]
02:05 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts
02:13 -!- scm [justme@d019254.adsl.hansenet.de] has quit [Quit: leaving]
02:14 -!- allengeorge [~allengeor@74.12.150.7] has quit [Quit: allengeorge]
02:17 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has quit
[Quit: derferman]
02:21 < plexdev> http://is.gd/eaNoX by [Nigel Tao] in 7 subdirs of
go/src/pkg/ -- image: replace Width and Height by Bounds, and introduce the Point
and
02:23 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
02:23 -!- scm [justme@d039237.adsl.hansenet.de] has joined #go-nuts
02:33 -!- urandom__ [~user@p548A5056.dip.t-dialin.net] has quit [Remote host
closed the connection]
02:38 < plexdev> http://is.gd/eaOnk by [Mathieu Lonjaret] in
go/src/pkg/image/png/ -- png: grayscale support.
02:57 -!- stalled [~stalled@unaffiliated/stalled] has quit [Ping timeout: 265
seconds]
03:02 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
03:03 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit:
slashus2]
03:08 -!- amacleod [~amacleod@pool-96-252-93-11.bstnma.fios.verizon.net] has quit
[Ping timeout: 265 seconds]
03:16 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
03:34 -!- alc [~arx@114.245.249.17] has joined #go-nuts
03:44 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined
#go-nuts
03:44 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has quit
[Client Quit]
04:00 -!- peter___ [~peter@c-76-21-104-218.hsd1.ca.comcast.net] has joined
#go-nuts
04:02 -!- peter___ [~peter@c-76-21-104-218.hsd1.ca.comcast.net] has quit [Client
Quit]
04:02 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined
#go-nuts
04:30 -!- alc [~arx@114.245.249.17] has quit [Quit: Leaving...]
04:36 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has quit
[Quit: derferman]
04:39 -!- nighty__ [~nighty@210.188.173.245] has quit [Remote host closed the
connection]
04:42 -!- strategicpause [~nick@pool-173-51-83-98.lsanca.fios.verizon.net] has
joined #go-nuts
04:44 -!- alc [~arx@114.245.249.17] has joined #go-nuts
04:44 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined
#go-nuts
04:56 -!- strategicpause [~nick@pool-173-51-83-98.lsanca.fios.verizon.net] has
quit [Quit: strategicpause]
05:02 -!- scm [justme@d039237.adsl.hansenet.de] has quit [Ping timeout: 264
seconds]
05:04 -!- scm [justme@d070003.adsl.hansenet.de] has joined #go-nuts
05:12 < taruti> Is the http-server multi-goroutine?  i.e.  if page handlers
access shared data structures do they need locking?
05:13 -!- sacho [~sacho@79-100-57-33.btc-net.bg] has quit [Ping timeout: 260
seconds]
05:21 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has joined
#go-nuts
05:29 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts
05:31 < nf> taruti: yes
05:36 -!- TheSaint [~thesaint@166.205.11.61] has joined #go-nuts
05:38 -!- alc [~arx@114.245.249.17] has quit [Quit: Leaving...]
05:50 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has quit [Quit:
Morten.  Desu~]
05:50 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
05:56 < plexdev> http://is.gd/eaZvA by [Nigel Tao] in
go/src/pkg/exp/draw/x11/ -- exp/draw/x11: temporarily workaround compiler bug
1011.
06:03 -!- TheSaint [~thesaint@166.205.11.61] has quit [Remote host closed the
connection]
06:08 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
06:10 -!- alc [~arx@222.128.156.84] has joined #go-nuts
06:12 < plexdev> http://is.gd/eb0vM by [Nigel Tao] in 2 subdirs of
go/src/pkg/ -- First cut of an HTML tokenizer (and eventually a parser).
06:25 -!- path[l] [UPP@120.138.102.50] has quit [Read error: Connection reset by
peer]
06:26 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts
06:40 -!- boscop [~boscop@g225237232.adsl.alicedsl.de] has joined #go-nuts
06:42 -!- Namegduf [~namegduf@eu.beshir.org] has quit [Ping timeout: 260 seconds]
06:42 -!- Namegduf [~namegduf@eu.beshir.org] has joined #go-nuts
06:43 -!- TR2N [email@89.180.223.127] has quit [Quit: Time left until the
Epochalypse: 27yrs 23wks 1day 2hrs 29mins 33secs]
06:44 < plexdev> http://is.gd/eb2gb by [Nigel Tao] in 4 subdirs of
go/src/pkg/ -- image: change image representation from slice-of-slices to linear
buffer,
06:56 < Namegduf> Using Go's ability to have NULs in strings to NUL-separate
values: Good or Evil?
06:58 -!- jcao219 [~Jimmy_Cao@124.126.154.127] has joined #go-nuts
06:59 -!- phirox [~phirox@g225253.upc-g.chello.nl] has quit [Ping timeout: 260
seconds]
06:59 -!- jsharkey [jsharkey@208.43.219.52] has quit [Ping timeout: 258 seconds]
07:00 -!- phirox [~phirox@g225253.upc-g.chello.nl] has joined #go-nuts
07:03 < nsf> is there a way in go to statically combine string literal and a
string constant?
07:03 < nsf> like in C we can do this:
07:03 < nsf> #define MY_STRING "x"
07:03 < nsf> printf("hello, " MY_STRING "\n");
07:04 -!- jdp [~gu@24.238.32.162.res-cmts.segr.ptd.net] has joined #go-nuts
07:04 < Namegduf> nsf: Define a constant.
07:04 < Namegduf> Add the constant to the string.
07:04 < nsf> ah..  I see
07:04 < Namegduf> If the compiler is smart, it will combine the two
constants at compile time.
07:05 < nsf> if I do: const "hello, " + MY_STRING + "\n"
07:05 < Namegduf> If the compiler is stupid, it probably needs making
smarter.
07:05 < nsf> it will be statically combined right?
07:05 < Namegduf> Hmm, yeah, but it should be doing that anyway.
07:05 < nsf> I mean 'const X = '
07:05 < Namegduf> "blah" i a constant.
07:05 < Makoryu> Does ("foo" + 5) evaluate to "foo5"?
07:05 < nsf> Makoryu: probably not
07:05 < Namegduf> No.
07:06 < Namegduf> It evaluates to a compile error.
07:06 < Makoryu> That's a nice change.
07:06 < Namegduf> Use string(5)
07:06 < Namegduf> Go doesn't do implicit conversions ever, I think.
07:08 -!- jsharkey [jsharkey@irc.jsharkey.org] has joined #go-nuts
07:09 -!- ronnyy [~quassel@p4FF1D862.dip.t-dialin.net] has joined #go-nuts
07:12 < KirkMcDonald> Except to interface types.
07:14 < Namegduf> Ah, right.
07:21 -!- ikaros [~ikaros@dslb-084-059-064-238.pools.arcor-ip.net] has joined
#go-nuts
07:27 < taruti> Do the standard libs contain html-escaping somewhere?
07:28 -!- forgey [brook@seahawk.ript.net] has quit [Read error: Operation timed
out]
07:29 < KirkMcDonald> taruti: template.HTMLEscape seems to be a thing.
07:29 < KirkMcDonald> http://golang.org/pkg/template/#HTMLEscape
07:29 < taruti> ok :)
07:31 -!- drhodes [~none@209-20-72-61.slicehost.net] has quit [Ping timeout: 248
seconds]
07:32 -!- forgey [brook@seahawk.ript.net] has joined #go-nuts
07:32 -!- drhodes [~none@209-20-72-61.slicehost.net] has joined #go-nuts
07:37 -!- ExtraSpice [~XtraSpice@88.118.32.225] has joined #go-nuts
07:39 < taruti> mustache.go says that it is better than go builtin templates
but it seems much poorer
07:39 < taruti> is there any reason to use it?
07:47 -!- ikaros [~ikaros@dslb-084-059-064-238.pools.arcor-ip.net] has quit [Ping
timeout: 240 seconds]
07:50 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Ping timeout: 248
seconds]
07:51 -!- emmanueloga [~emmanuelo@190.247.41.202] has quit [Ping timeout: 265
seconds]
08:01 < plexdev> http://is.gd/eb7tT by [Nigel Tao] in go/src/pkg/image/ --
image: fix comment typo.
08:01 -!- photron [~photron@port-92-201-221-96.dynamic.qsc.de] has joined #go-nuts
08:02 -!- Bombe [~droden@weltgehirnmaschine.de] has quit [Changing host]
08:02 -!- Bombe [~droden@freenet/developer/Bombe] has joined #go-nuts
08:06 -!- Makoryu [~vt920@ool-4a599a98.dyn.optonline.net] has quit []
08:09 -!- emmanueloga [~emmanuelo@190.247.41.202] has joined #go-nuts
08:15 -!- jcao219 [~Jimmy_Cao@124.126.154.127] has quit [Quit: Leaving.]
08:18 < plexdev> http://is.gd/eb8Aw by [Scott Lawrence] in
go/src/cmd/gopack/ -- gopack documentation: fixed typo
08:30 -!- sladegen [~nemo@unaffiliated/sladegen] has quit [Ping timeout: 276
seconds]
08:33 -!- saschpe [~saschpe@mgdb-4d0cf53b.pool.mediaWays.net] has joined #go-nuts
08:38 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
08:40 -!- photron [~photron@port-92-201-221-96.dynamic.qsc.de] has quit [Ping
timeout: 246 seconds]
08:42 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-180-250.clienti.tiscali.it] has
joined #go-nuts
08:45 -!- nighty__ [~nighty@210.188.173.245] has joined #go-nuts
08:47 -!- sacho [~sacho@213.91.244.15] has joined #go-nuts
09:08 -!- wrtp [~rog@92.16.115.185] has joined #go-nuts
09:08 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
09:11 < hokapoka> Not very important but I'd like to be as consistant as
possible with the community when writing Go. So when adding a method to a type
I've seen that alot of people use : func (self *foo) bar() ....  whereas others
use func(f *foo) bar() ....  What's the "prefered" method, self/f?
09:14 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has quit
[Quit: derferman]
09:17 -!- sacho [~sacho@213.91.244.15] has quit [Ping timeout: 276 seconds]
09:20 < chressie> hokapoka: i suppose less typing (e.g.  f) is better..  at
least that's what i see all the time in the 'official' go code :)
09:21 < Namegduf> I normally hate single character names
09:21 < Namegduf> But for some reason, I find myself favouring them in Go.
09:21 < Namegduf> They seem clear enough.
09:22 < mpl> I had a friend who was simply using the alphabet letters in
order to name his variables.  fortran code of course.
09:24 < hokapoka> chressie: yeah I saw that the office code using single
char's.
09:24 -!- path[l] [UPP@120.138.102.50] has quit [Quit: path[l]]
09:24 < hokapoka> Like you say Namegduf i normally don't like to use single
char's but it kinda feels okay in go.
09:25 < chressie> one or two characters are okay for local and unexported
variables/functions/etc..  not only in go code
09:25 < Namegduf> I think it's the typing, so what a variable "is" is fully
visible, coupled with the shortnes.
09:26 < Namegduf> I find C code gets too long for short variable names to
remain unambiguious and clear.  Not as well as in Go, at least.
09:27 < hokapoka> Yeah, back when I used dBase we had to prefix the var with
the type, b for bool or was it l for logic then...  c for string n for a numeric
value and so one.
09:28 < hokapoka> So when we had a loop rather than i or j we had to use
nIndex & nIndexA, nIndexB
09:31 * chressie feels sorry for hokapoka
09:31 -!- sacho [~sacho@213.91.244.15] has joined #go-nuts
09:33 < hokapoka> :) that was some timeago.
09:42 < nsf> hokapoka: I use both
09:42 < nsf> self and one letter vars sometimes
09:42 < nsf> and don't care much about it
09:44 < nsf> the name itself doesn't really matter, the fact that we have
that var is much more important
09:44 < nsf> in C++ it's easy to get confused by local variable vs.  class
field thing
09:44 < hokapoka> Yeah it's not a big issue, just wanted to get into the
right habbit from the start.
09:45 < nsf> well I've started with 'self'
09:45 < nsf> and I find it too long and use one letter vars more often
09:46 < nsf> and I find it too long now*
09:47 < nsf> but I guess Go std lib doesn't use 'self' at all
09:47 < nsf> at least I haven't seen that
09:48 * exch mixes it up for good measure.  reciever type is always called 'this'.
Local variables are often 1 letter
09:50 < hokapoka> heh
09:51 < hokapoka> Okay well I'll carry on using single chars in that case.
09:53 * Namegduf never uses "this"
09:54 -!- jcao219 [~Jimmy_Cao@124.126.154.127] has joined #go-nuts
09:56 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit:
slashus2]
09:59 < rsaarelm> I use self, but I suppose what the Go libraries use is the
preferred style.
10:00 < Namegduf> I use a single appropriate character.
10:00 < Namegduf> p if I'm writing it for some kind of FooParser
10:00 < bartbes> don't the libraries just use the first character of the
type?
10:00 < bartbes> so in FooParser, wouldn't that be f?
10:00 < bartbes> (I don't know this, and I won't pretend I do)
10:01 < Namegduf> Maybe, I dunno.
10:01 < rsaarelm> Are they consistent?  What if the type starts with I or L
or O or some other (non-iteration) single char variable unfriendly name?
10:01 < rsaarelm> Well, lowercase o isn't that bad.  But l definitely is.
10:01 < rsaarelm> And i, j should be reserved for loop counters.
10:02 < bartbes> maybe..
10:02 < hokapoka> Wasn't there a page on the golang site that talked about
contributing to go?
10:04 < rsaarelm> It's not consistent at least.  I've already found "rng"
for a random number generator and "e" instead of the type's first letter for some
error types.
10:04 < bartbes> here it is: http://golang.org/doc/contribute.html
10:05 < bartbes> right
10:05 < bartbes> most of it is how to create patches
10:05 < bartbes> they faq mostly says "use gofmt"
10:06 < hokapoka> bartbes: yeah nothing on naming.
10:07 < bartbes> *-y
10:08 < bartbes> well, there are no rules, anarchy!
10:08 < bartbes> :P
10:09 < hokapoka> I guess what's important is that it's easy to understand
10:09 * exch will stick with 'this' :p Relic from his years with C#. Besides, I
already added it to my Go syntax highlight file as a keyword
10:09 < hokapoka> exch: I was going to say thats' C# isn't it?
10:09 < bartbes> if you get the aforementioned FooParser I guess you should
just call it something that makes sense and don't call it
mysupermagicthingythatwillblowyourmind
10:09 < exch> ya
10:10 < bartbes> I will say that it's c++
10:10 < bartbes> and since C# is derived from c++ (AFAIK) I should be right
10:11 < tensorpudding> it's more similar to Java
10:11 < hokapoka> I gess one of the resaon I was relcutant to use this &
self is that it's not like you have a class, or partial class.  You could add a
method to an imported type at anytime.
10:12 < bartbes> yes, this sounds very class-y
10:12 < bartbes> (that doesn't mean it's classy :P)
10:13 < hokapoka> :P
10:13 < bartbes> I am used to self though
10:13 < bartbes> and not in a class-related context either
10:13 < bartbes> (well..  semi-class-related...)
10:13 < bartbes> lua
10:15 < rsaarelm> Yeah, Lua and Python are probably where I picked the habit
too.
10:15 < bartbes> well, python has a stronger concept of classes
10:18 -!- path[l] [~path@59.162.86.164] has joined #go-nuts
10:18 -!- General13372 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined
#go-nuts
10:19 < mpl> what could be the reason for hg change not picking up my
changes while hg status and hg diff tell me they're indeed here.
10:19 < mpl> ?
10:20 < bartbes> they are untracked files maybe?
10:20 < mpl> nope, M files.
10:20 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts
10:21 -!- path[l] [~path@59.162.86.164] has quit [Read error: Connection reset by
peer]
10:21 -!- path[l] [~path@59.162.86.164] has joined #go-nuts
10:21 * bartbes is not familiar with hg change
10:21 < bartbes> actually
10:21 < bartbes> I don't think my hg has it
10:21 < mpl> nope, it's a go extension
10:22 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit
[Ping timeout: 276 seconds]
10:25 < mpl> bah, seems like editing the change by hand worked.
10:35 -!- ak_ [~arx@222.128.156.84] has joined #go-nuts
10:35 -!- alc [~arx@222.128.156.84] has quit [Read error: Connection reset by
peer]
10:36 -!- jhawk28 [~jhawk28@nc-71-2-27-144.sta.embarqhsd.net] has quit [Remote
host closed the connection]
10:38 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
10:40 -!- saschpe [~saschpe@mgdb-4d0cf53b.pool.mediaWays.net] has quit [Remote
host closed the connection]
10:46 -!- rbraley [~rbraley@ip72-222-128-78.ph.ph.cox.net] has quit [Ping timeout:
265 seconds]
10:51 -!- nighty__ [~nighty@210.188.173.245] has quit [Quit: Disappears in a puff
of smoke]
10:53 -!- Bombe [~droden@freenet/developer/Bombe] has quit [Excess Flood]
10:54 -!- Netsplit *.net <-> *.split quits: Boney, plexdev
10:54 -!- Bombe [~droden@weltgehirnmaschine.de] has joined #go-nuts
10:54 -!- danderson [~dave@atlas.natulte.net] has quit [Ping timeout: 264 seconds]
10:55 -!- danderson [~dave@atlas.natulte.net] has joined #go-nuts
10:55 -!- mode/#go-nuts [+v danderson] by ChanServ
10:56 < jcao219> how do you do a multiline string in go?
10:57 < bartbes> `
10:58 < mpl> jcao219: http://golang.org/doc/go_spec.html#String_literals
10:58 -!- ak_ [~arx@222.128.156.84] has quit [Quit: Leaving...]
10:59 < jcao219> thank you
10:59 * bartbes blinks
10:59 -!- rbraley [~rbraley@ip72-222-128-78.ph.ph.cox.net] has joined #go-nuts
10:59 < bartbes> did I go unnoticed?
11:00 < jcao219> no you didn't
11:01 < bartbes> well in that case, no problem
11:01 < mpl> bartbes: the combination of your info + mine got him what to
look for and where to look for it :)
11:01 -!- virtualsue [~chatzilla@nat/cisco/x-feutjqrjbvvpmhzj] has joined #go-nuts
11:03 -!- Netsplit over, joins: Boney, plexdev
11:04 -!- vrtical [rm445@pip.srcf.societies.cam.ac.uk] has left #go-nuts []
11:04 -!- korfuri [~korfuri@eth0.korfuri.fr] has quit [Ping timeout: 241 seconds]
11:06 -!- korfuri [~korfuri@eth0.korfuri.fr] has joined #go-nuts
11:13 -!- korfuri [~korfuri@eth0.korfuri.fr] has quit [Ping timeout: 252 seconds]
11:20 -!- ronnyy [~quassel@p4FF1D862.dip.t-dialin.net] has quit [Remote host
closed the connection]
11:21 -!- path[l] [~path@59.162.86.164] has quit [Quit: path[l]]
11:28 -!- boscop [~boscop@g225237232.adsl.alicedsl.de] has quit [Read error:
Connection timed out]
11:33 -!- virtualsue [~chatzilla@nat/cisco/x-feutjqrjbvvpmhzj] has quit [Ping
timeout: 276 seconds]
11:41 -!- ronnyy [~quassel@p4FF1D862.dip.t-dialin.net] has joined #go-nuts
11:42 -!- path[l] [~path@122.182.0.38] has joined #go-nuts
11:45 -!- navigator [~navigator@p548963F6.dip.t-dialin.net] has joined #go-nuts
11:55 -!- alc [~arx@222.128.144.140] has joined #go-nuts
12:02 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 240 seconds]
12:07 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts
12:08 -!- jcao2191 [~Jimmy_Cao@124.126.154.127] has joined #go-nuts
12:09 -!- korfuri [~korfuri@eth0.korfuri.fr] has joined #go-nuts
12:09 < hokapoka> This there a http function that will encode a URL, for
example convert http:// to http%3A%2F%2F ?
12:11 -!- wrtp [~rog@92.16.115.185] has quit [Ping timeout: 258 seconds]
12:11 -!- jcao219 [~Jimmy_Cao@124.126.154.127] has quit [Ping timeout: 276
seconds]
12:17 -!- wrtp [~rog@92.16.115.185] has joined #go-nuts
12:21 < plexdev> http://is.gd/ebn7g by [Nigel Tao] in 3 subdirs of
go/src/pkg/ -- exp/draw: remove the Color, Point and Rectangle types.
12:24 -!- path[l] [~path@122.182.0.38] has quit [Quit: path[l]]
12:26 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
12:30 -!- Bombe [~droden@weltgehirnmaschine.de] has quit [Excess Flood]
12:31 -!- Bombe [~droden@weltgehirnmaschine.de] has joined #go-nuts
12:31 < MaybeSo> given a vector.Vector of underlying type []interface{}
which I've filled with int64, is there a way to cast the entire []interface{} to
[]int64?  Or do I simply have to copy the elements one by one (e.g., range over
the original and copy[i] = original[i].(int64)) ?
12:34 < MaybeSo> I suppose I could just do what's done to implement the
[]int and []string vectors...
12:35 < rsaarelm> You have to copy the elements.  Each individual element
needs to be unboxed to get the []int64.
12:35 -!- Bombe [~droden@weltgehirnmaschine.de] has quit [Excess Flood]
12:36 < MaybeSo> ok, thank you
12:36 -!- Bombe [~droden@weltgehirnmaschine.de] has joined #go-nuts
12:37 < rsaarelm> I had an idea about doing a function which takes an array
of any type and a thunk that operates on an interface{} vector.  The function
would use reflection to make a new array with the input array's element's wrapped
in interfaces, run the vector thunk on that, and then make an array of the
original type from the result using reflection.
12:38 < rsaarelm> Of course this could be pretty slow, involving
regenerating the array twice.
12:38 < MaybeSo> it's not so much the "extra" code that bothers me as having
to double the storage requirements until the copy is finished
12:41 < skelterjohn> well you just can't simply cast an array of interfaces
to an array of structs
12:41 < skelterjohn> the memory layout is simply different
12:41 < MaybeSo> yep
12:41 < MaybeSo> thanks
12:42 < skelterjohn> though i was thinking about a different kind of
anonymous type...
12:42 < skelterjohn> an anonymous array - it could know how many bytes per
element and how many elements
12:42 < skelterjohn> and then you take care of casting when you index
12:42 < MaybeSo> isn't the sort of thing the json code is doing?
12:43 < skelterjohn> but then that doesn't lend itself well to arrays of
arrays of unknown types
12:43 < skelterjohn> json does some good stuff, but it's not in the go
runtime :)
12:43 < MaybeSo> ah, wanting your cake and wanting it fast as well.  :)
12:44 < MaybeSo> do you folks use profilers on your Go code?  it looks like
they bundle some stuff, but I'm having trouble finding documentation on them
12:45 < skelterjohn> i've been using good ole printlines for any sort of
code runtime analysis
12:46 < MaybeSo> using time.Nanoseconds() ?
12:46 < skelterjohn> that's what i would use if i did profiling.  so far
just debug printlns
12:46 -!- path[l] [~path@59.162.86.164] has joined #go-nuts
12:52 -!- artefon [~thiago@189.107.227.111] has joined #go-nuts
13:03 < MizardX> hokapoka: http://golang.org/pkg/http/#URLEscape
13:07 -!- Bombe [~droden@weltgehirnmaschine.de] has quit [Excess Flood]
13:07 < hokapoka> MizardX: I tried that, it doesn't appear to encode http://
to http%3A%2F%2F ?
13:08 -!- Bombe [~droden@weltgehirnmaschine.de] has joined #go-nuts
13:08 < hokapoka> I've created a simple parser, for now.
13:08 < MizardX> hokapoka: http://ideone.com/zGP43
13:09 < hokapoka> MizardX: oh nice, many thanks.
13:15 -!- ath [~ath@193.167.161.3] has quit [Remote host closed the connection]
13:16 -!- ath [~ath@omega.lambda.fi] has joined #go-nuts
13:18 -!- lmoura [~lauromour@186.212.112.70] has joined #go-nuts
13:33 -!- angasule [c80571ea@gateway/web/freenode/ip.200.5.113.234] has joined
#go-nuts
13:33 -!- ronnyy [~quassel@p4FF1D862.dip.t-dialin.net] has quit [Remote host
closed the connection]
13:42 -!- cybergirl [~cybergirl@ANantes-552-1-85-178.w92-139.abo.wanadoo.fr] has
joined #go-nuts
13:45 -!- cybergirl [~cybergirl@ANantes-552-1-85-178.w92-139.abo.wanadoo.fr] has
quit [Client Quit]
13:51 -!- jcao219 [~Jimmy_Cao@124.126.154.127] has left #go-nuts []
13:52 -!- ak [~arx@222.128.144.140] has joined #go-nuts
13:52 -!- alc [~arx@222.128.144.140] has quit [Ping timeout: 240 seconds]
13:55 -!- wrtp [~rog@92.16.115.185] has quit [Ping timeout: 240 seconds]
13:56 -!- smw [~smw@12.198.177.3] has joined #go-nuts
13:58 -!- jcao219 [~Jimmy_Cao@124.126.154.127] has joined #go-nuts
14:02 -!- wrtp [~rog@92.16.115.185] has joined #go-nuts
14:11 -!- boscop [~boscop@g225237232.adsl.alicedsl.de] has joined #go-nuts
14:14 -!- smw [~smw@12.198.177.3] has quit [Remote host closed the connection]
14:15 -!- ak [~arx@222.128.144.140] has quit [Ping timeout: 240 seconds]
14:17 -!- tumdum [~tumdum@unaffiliated/tumdum] has joined #go-nuts
14:18 -!- alc [~arx@222.128.144.140] has joined #go-nuts
14:24 -!- tumdum [~tumdum@unaffiliated/tumdum] has left #go-nuts []
14:25 -!- virtualsue [~chatzilla@nat/cisco/x-llbitnugyezjiemb] has joined #go-nuts
14:36 -!- jcao219 [~Jimmy_Cao@124.126.154.127] has quit [Quit: Leaving.]
14:39 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
14:51 -!- gid [~gid@220-253-29-69.VIC.netspace.net.au] has quit [Quit: Leaving.]
14:51 -!- saschpe [~saschpe@mgdb-4d0cf53b.pool.mediaWays.net] has joined #go-nuts
14:54 -!- alc [~arx@222.128.144.140] has quit [Ping timeout: 240 seconds]
14:56 -!- artefon [~thiago@189.107.227.111] has quit [Quit: bye]
14:57 -!- ikaros [~ikaros@188.107.213.197] has joined #go-nuts
15:01 -!- saschpe [~saschpe@mgdb-4d0cf53b.pool.mediaWays.net] has quit [Remote
host closed the connection]
15:04 -!- saschpe [~saschpe@mgdb-4d0cf53b.pool.mediaWays.net] has joined #go-nuts
15:07 < hokapoka> nyone using chrome?
15:07 < hokapoka> On a linux machine
15:08 < exch> yes
15:08 < tensorpudding> yes
15:08 < hokapoka> I have an odity with Setting Cookies, it works fine on all
the other machines and different browsers on the same machine.  Just Chrome on my
workstation doesn't appear to accept cookies
15:08 < tensorpudding> but i don't think you're in the right channel
15:08 < hokapoka> can you go here : http://oauth.hokapoka.com/test/setcookie
15:08 < hokapoka> click the like it should show you Value : 1234
15:08 < hokapoka> If the cookie are getting set.
15:09 < exch> it does
15:09 < hokapoka> tensorpudding: Aye, you're probably right it's not the
right channel, only I'm using Go to render the headers to set the cookies.
15:10 < hokapoka> Thanks exch, I'll dig out a couple of other nix boxes see
if I can workout why it's not getting set.
15:10 < hokapoka> Many thanks
15:10 < exch> this is chrome version 5.0.375.99
15:11 < hokapoka> I updated to 6.0.472.22 (0) (dev channel) because it
wasn't working the other day.  Thought it might have been an issue in that
version.
15:11 < hokapoka> For me it worked in neither builds.
15:11 < exch> odd
15:12 -!- jcao219 [~Jimmy_Cao@124.126.154.127] has joined #go-nuts
15:12 < exch> Did you change the security settings or something?  perhaps
its set to not allow any cookies
15:13 < hokapoka> Yeah, it's deffo not that.  I'm using them on other
platforms, it's just this combination Go's http and chrome on this *nix
workstation.
15:13 < hokapoka> In fact.  That's not accurate.
15:15 < hokapoka> It only appears to effect hoisie's web.go, if I use the
*http.Conn.AddHeader("Set-Cookie", "name=val") without using web.go at all it's
fine.
15:15 < hokapoka> I think it's time to port back to the default Go http
package and drop web.go.
15:15 < hokapoka> Many thanks for your time, exch
15:15 < hokapoka> s/AddHeader/SetHeader
15:17 < exch> np.  cookies worked fine in my own go http fiddlings.  I
didn't use web.go either
15:18 < hokapoka> I've been having a few grumbles to myself over web.go's
implymentation.  QuerryString Params and form Params are mixxed together and it's
a bitt of a pain to get just a single value from one of them.
15:19 -!- awidegreen [~quassel@62.176.237.78] has joined #go-nuts
15:34 -!- gent00r [~haxOr@gw.invnetworks.com] has quit [Quit: Leaving]
15:41 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
15:41 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts
15:56 -!- artefon [~thiagon@150.164.2.20] has joined #go-nuts
15:58 -!- virtualsue [~chatzilla@nat/cisco/x-llbitnugyezjiemb] has quit [Ping
timeout: 245 seconds]
16:07 -!- Venom_X [~pjacobs@99-8-218-190.lightspeed.hstntx.sbcglobal.net] has
joined #go-nuts
16:08 -!- danderson [~dave@atlas.natulte.net] has quit [Ping timeout: 248 seconds]
16:10 -!- danderson [~dave@atlas.natulte.net] has joined #go-nuts
16:10 -!- mode/#go-nuts [+v danderson] by ChanServ
16:12 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
16:16 -!- atsampson [~ats@212.183.140.16] has quit [Ping timeout: 260 seconds]
16:17 -!- Venom_X_ [~pjacobs@66.54.185.131] has joined #go-nuts
16:17 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
16:18 -!- atsampson [~ats@212.183.140.22] has joined #go-nuts
16:19 -!- Venom_X [~pjacobs@99-8-218-190.lightspeed.hstntx.sbcglobal.net] has quit
[Ping timeout: 240 seconds]
16:21 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has joined #go-nuts
16:24 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 260 seconds]
16:26 -!- snearch [~snearch@f053008201.adsl.alicedsl.de] has joined #go-nuts
16:27 -!- photron [~photron@port-92-201-221-96.dynamic.qsc.de] has joined #go-nuts
16:27 < jnwhiteh> Anyone familiar with this error message: implicit
assignment of unexported field 'auth' of chttp.AuthHandler in array index
16:28 < jnwhiteh> not sure what the array index part is referring to, since
there isn't one here.
16:30 -!- chickamade [~chickamad@125.234.49.49] has joined #go-nuts
16:30 * jnwhiteh recompiles against the latest release =)
16:31 < hokapoka> jnwhiteh: are you getting the error at runtime or compile,
or put another way, is it using some for of reflection to deserialize the data?
16:31 < jnwhiteh> compile, and the code is very simple =)
16:32 < exch> the implicit assignment bit usually happens when you try to
create a value instance of a type instead of instantiation a pointer to it, 'var
foo T' as opposed to 'var foo *T; foo = &T{...}'
16:32 < jnwhiteh> http://pastebin.ca/1914526
16:32 < jnwhiteh> then that's actually happening in the library, in
chttp.SimpleAuth()
16:33 < jnwhiteh> I'll convert it to a pointer, just didn't think I needed
to use one for it here.
16:33 -!- sladegen [~nemo@unaffiliated/sladegen] has joined #go-nuts
16:34 -!- virtualsue [~chatzilla@nat/cisco/x-tgqqpmljkrgsrcei] has joined #go-nuts
16:34 < exch> either define the map as taking chttp.Conn, or have
chttp.ChainOut() return a pointer.  As far as I can see, that's prolly where the
issue resides
16:35 < jnwhiteh> that map is fine, there's other stuff that's been in it
for quite some time.
16:35 < exch> The error message could be a bit clearer though
16:35 < jnwhiteh> the issue is in chttp.SimpleAuth()
16:35 < exch> ah
16:35 < jnwhiteh> which was just making a new chttp.Handler rather than a
*chttp.Handler
16:36 -!- chickamade [~chickamad@125.234.49.49] has quit [Quit: Got to keep
moving!!]
16:37 -!- fission6 [~silverman@65-86-91-130.client.dsl.net] has quit [Quit:
fission6]
16:41 -!- wrtp_ [~rog@92.16.115.185] has joined #go-nuts
16:41 -!- wrtp [~rog@92.16.115.185] has quit [Read error: Connection reset by
peer]
16:41 -!- Shyde [~shyde@HSI-KBW-078-043-070-132.hsi4.kabel-badenwuerttemberg.de]
has joined #go-nuts
16:43 -!- wrtp_ [~rog@92.16.115.185] has joined #go-nuts
16:43 -!- wrtp [~rog@92.16.115.185] has quit [Read error: Connection reset by
peer]
16:46 -!- gent00r [~haxOr@gw.invnetworks.com] has joined #go-nuts
16:46 -!- fission6 [~silverman@65-86-91-130.client.dsl.net] has joined #go-nuts
16:46 -!- babusri [~Babu@122.172.210.173] has joined #go-nuts
16:51 -!- derferman_ [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined
#go-nuts
16:52 -!- derferman_ [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has quit
[Read error: Connection reset by peer]
16:52 -!- derferman_ [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined
#go-nuts
16:52 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Quit: Lost
terminal]
16:53 < hokapoka> Can you add methods to []*T for example : func (p []*pair)
Add(pair) {...
16:54 < hokapoka> opps, Add(foo *Pair)
16:54 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts
16:54 < hokapoka> The case is still wrong, you get the idea though
16:54 < exch> type MyList []*T; func(m MyList) Add() { ...  }
16:54 < plexdev> http://is.gd/ebGoE by [Robert Griesemer] in
go/src/pkg/asn1/ -- asn1: remove superfluous if's, unused function
16:54 < plexdev> http://is.gd/ebGoH by [Robert Griesemer] in
go/src/cmd/godoc/ -- godoc: report Status 404 if a pkg or file is not found
16:55 < hokapoka> exch: Yeah that's how I normatlly doit, afdter your
example I thing
16:55 < exch> ml := make(MyList) <-- use that to create it, cos []*T is a
slice
16:55 < hokapoka> Thanks.
16:57 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Client Quit]
16:57 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts
16:59 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection
reset by peer]
17:00 < gent00r> HI, for go template package does it support template
inheritance?
17:01 -!- path[l] [~path@59.162.86.164] has quit [Quit: path[l]]
17:02 < hokapoka> inheritance?  how do you mean?
17:02 -!- derferman_ [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has quit
[Quit: derferman_]
17:03 < gent00r> like include page top template etc ?
17:03 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
17:03 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has quit [Remote host closed the
connection]
17:03 < hokapoka> Nesting / emebeding templates?
17:04 < gent00r> yes
17:04 < hokapoka> yep, tis easy
17:04 < hokapoka>
http://go.hokapoka.com/go/embedding-or-nesting-go-templates/
17:06 < gent00r> hokapoka, thank you very informative blog.
17:06 < hokapoka> np
17:21 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-180-250.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
17:24 < gent00r> i am also wondering if i could specify something like this
17:24 < gent00r> http://pastebin.com/cEaZ4KuL
17:25 < gent00r> a map of string keys that point to functions?
17:26 < skelterjohn> var funcMap map[string]func(param Type)returnType
17:26 < skelterjohn> ?
17:27 < plexdev> http://is.gd/ebJes by [Robert Griesemer] in
go/src/pkg/exp/draw/ -- fix build: update exp/draw/draw_test.go
17:27 < gent00r> skelterjohn, yes
17:27 < skelterjohn> but you seem to have already figured that out, from
your pastebin
17:27 < skelterjohn> i think i don't understand the question
17:27 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts
17:28 < gent00r> skelterjohn, i would want to initilize that map with some
default values.  But, i couldn't do so.
17:28 < skelterjohn> oh
17:30 < skelterjohn> http://pastebin.com/9mDykNSk
17:31 < skelterjohn> that equals sign is the problem, apparently
17:31 < skelterjohn> i mirrored the example in
http://golang.org/doc/effective_go.html#maps
17:32 < gent00r> skelterjohn, thank you very much.
17:32 < skelterjohn> my pleasure
17:36 -!- jcao219 [~Jimmy_Cao@124.126.154.127] has quit [Quit: Leaving.]
17:38 -!- Boney [~paul@124-148-189-246.dyn.iinet.net.au] has quit [Ping timeout:
246 seconds]
17:39 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
17:40 -!- Boney [~paul@124-148-189-246.dyn.iinet.net.au] has joined #go-nuts
17:40 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche]
17:40 -!- sacho [~sacho@213.91.244.15] has quit [Ping timeout: 258 seconds]
17:41 < araujo> hello all
17:42 < gent00r> araujo, hi
17:42 * araujo should probably try to avoid going against the Go type system
17:43 < araujo> hello gent00r
17:43 < araujo> :)
17:48 -!- ExtraSpice [~XtraSpice@88.118.32.225] has quit [Quit: Leaving]
17:51 -!- g0bl1n [~anonymous@a213-22-18-58.cpe.netcabo.pt] has joined #go-nuts
17:51 < skelterjohn> how have you gone against the go type system?
17:59 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has joined
#go-nuts
18:01 -!- virtualsue [~chatzilla@nat/cisco/x-tgqqpmljkrgsrcei] has quit [Ping
timeout: 265 seconds]
18:04 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has joined
#go-nuts
18:05 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Ping timeout: 265 seconds]
18:08 -!- acts_as [~acts_as@208.236.105.27] has joined #go-nuts
18:09 -!- Xenith [~xenith@kiwi.he.net] has joined #go-nuts
18:09 -!- tumdum [~tumdum@unaffiliated/tumdum] has joined #go-nuts
18:10 -!- Boney [~paul@124-148-189-246.dyn.iinet.net.au] has quit [Ping timeout:
246 seconds]
18:18 -!- jcao219 [~Jimmy_Cao@124.126.154.127] has joined #go-nuts
18:22 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
18:30 -!- smw [~smw@12.198.177.3] has joined #go-nuts
18:31 -!- jcao219 [~Jimmy_Cao@124.126.154.127] has quit [Quit: Leaving.]
18:37 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
18:38 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
18:39 -!- fission6 [~silverman@65-86-91-130.client.dsl.net] has left #go-nuts []
18:51 -!- tumdum [~tumdum@unaffiliated/tumdum] has quit [Quit: tumdum]
18:52 -!- snearch [~snearch@f053008201.adsl.alicedsl.de] has quit [Quit:
Verlassend]
19:00 -!- obiwahn_ [~heini@g228198181.adsl.alicedsl.de] has joined #go-nuts
19:01 -!- obiwahn_ [~heini@g228198181.adsl.alicedsl.de] has quit [Client Quit]
19:07 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
19:10 -!- wrtp [~rog@92.16.115.185] has quit [Ping timeout: 265 seconds]
19:15 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
19:16 -!- wrtp [~rog@92.16.115.185] has joined #go-nuts
19:18 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
19:18 -!- Venom_X [~pjacobs@adsl-99-3-159-249.dsl.hstntx.sbcglobal.net] has joined
#go-nuts
19:18 -!- nano` [~user@bas1-montreal48-1176433311.dsl.bell.ca] has joined #go-nuts
19:18 -!- smw [~smw@12.198.177.3] has quit [Remote host closed the connection]
19:21 -!- ikaros_ [~ikaros@188.107.213.197] has joined #go-nuts
19:22 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
19:23 -!- tumdum [~tumdum@unaffiliated/tumdum] has joined #go-nuts
19:24 -!- tumdum [~tumdum@unaffiliated/tumdum] has quit [Client Quit]
19:25 -!- chressie [~chressie@dreggn.in-ulm.de] has quit [Ping timeout: 240
seconds]
19:25 -!- napsy_ [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts
19:25 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Ping timeout:
276 seconds]
19:26 -!- sacho [~sacho@79-100-57-33.btc-net.bg] has joined #go-nuts
19:31 -!- Venom_X [~pjacobs@adsl-99-3-159-249.dsl.hstntx.sbcglobal.net] has quit
[Quit: Venom_X]
19:32 -!- hippondog [~user@unaffiliated/yesudeep] has joined #go-nuts
19:33 -!- Guest76235 [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Quit:
leaving]
19:39 -!- saschpe [~saschpe@mgdb-4d0cf53b.pool.mediaWays.net] has quit [Remote
host closed the connection]
19:39 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts
19:41 -!- wrtp [~rog@92.16.115.185] has quit [Quit: wrtp]
19:43 -!- artefon [~thiagon@150.164.2.20] has quit [Quit: Leaving]
19:48 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
19:51 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Remote host
closed the connection]
19:51 -!- navigator [~navigator@p548963F6.dip.t-dialin.net] has quit [Quit:
Leaving]
19:53 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts
19:56 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has quit [Quit:
skelterjohn]
19:59 < gent00r> how do one write a multi line string in Go?
19:59 < exch> use ` as the string delimiter instead of "
19:59 < gent00r> i was trying the usual \ for hours now :).  Thank you very
much
20:12 -!- wrtp [~rog@92.16.115.185] has joined #go-nuts
20:14 -!- hippondog [~user@unaffiliated/yesudeep] has quit [Quit: ERC Version 5.3
(IRC client for Emacs)]
20:16 -!- ronnyy [~quassel@p4FF1D862.dip.t-dialin.net] has joined #go-nuts
20:25 -!- ikaros_ [~ikaros@188.107.213.197] has quit [Quit: Leave the magic to
Houdini]
20:28 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Ping timeout:
248 seconds]
20:36 -!- babusri [~Babu@122.172.210.173] has quit [Ping timeout: 276 seconds]
20:40 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts
20:42 -!- Shyde [~shyde@HSI-KBW-078-043-070-132.hsi4.kabel-badenwuerttemberg.de]
has quit [Remote host closed the connection]
20:42 * jlouis attempts a rewrite of go-pg
20:55 -!- divoxx [~divoxx@189.63.144.228] has joined #go-nuts
21:04 -!- Boney [~paul@124-148-189-246.dyn.iinet.net.au] has joined #go-nuts
21:06 -!- wrtp [~rog@92.16.115.185] has quit [Quit: wrtp]
21:09 < nickaugust> what language did the := in Go come from?
21:11 < KirkMcDonald> nickaugust: I believe its a Pascal-ism.  Other
languages use it, too.
21:12 < KirkMcDonald> s/its/it's/
21:14 < nickaugust> hm cool.  its nice to have
21:15 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
21:16 < KirkMcDonald> nickaugust: Were you asking about the ":=" operator
specifically, or type-inferring variable declarations in general?
21:19 < nickaugust> the := operator specifically.  i guess ive used type
inferring variable declarations before but not also staticly typed
21:19 < nickaugust> KirkMcDonald: ^
21:25 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts
21:31 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
21:32 < araujo> skelterjohn, I have been trying to get some kind of "C
union" type in Go, but seems there is no close equivalent to it
21:33 < KirkMcDonald> Plays hell with the garbage collector.
21:33 < jlouis> nickaugust: the type-inferring comes from Newsqueak or Limbo
IIRC
21:34 -!- tav [~tav@2001:0:53aa:64c:0:3c8c:a3f8:bbdd] has quit [Ping timeout: 260
seconds]
21:35 -!- tav [~tav@92.7.119.179] has joined #go-nuts
21:35 < araujo> Though I think union types are in the roadmap right now ....
21:38 < skelterjohn> well, you can certainly fake it
21:38 < skelterjohn> just won't have any safety
21:38 < araujo> skelterjohn, you know any doc/example code explaining how?
21:38 < skelterjohn> use an interface...
21:39 < skelterjohn> nothing tricky
21:39 < araujo> skelterjohn, more specifically, I want t variable that can
contain a float and int ....
21:39 < skelterjohn> union type would be a float OR an int
21:39 < skelterjohn> not and
21:39 < araujo> correct, float OR an int
21:39 < skelterjohn> then var i interface{}; i= 0; i=0.0; etc
21:40 < skelterjohn> and then to get it out
21:40 < skelterjohn> i.(int)
21:40 < skelterjohn> i.(float)
21:41 < araujo> so ..  use an interface?  ...  what do you mean?
21:41 < skelterjohn> you can treat an interface{} as any sort of union type
21:41 < skelterjohn> since anything can be stored in an interface
21:41 < skelterjohn> in an interface{}
21:41 < skelterjohn> an interface{} is just an arbitrary piece of data, but
you have to know its type to get at it
21:42 < skelterjohn> have to know its type at compile time
21:43 < araujo> ok, yeah, knew that way, just that I am not sure when the
variable has an int or float ...  I need to go with type assertion all the way
through ?
21:43 < skelterjohn> you can check
21:43 -!- g0bl1n [~anonymous@a213-22-18-58.cpe.netcabo.pt] has quit [Quit: g0bl1n]
21:44 < skelterjohn> intVal, ok := theInterface.(int)
21:44 < skelterjohn> if ok is true, it was an int
21:45 < araujo> correct, I just was wondering if I could avoid the
checking....
21:47 < araujo> skelterjohn, because, for example, I have a func(a, b
interface{}) interface{} .....  and I want to sum/convert values between float/int
inside that function ...  so, the only way I can do it is to go with type
assertions all the way through?
21:48 < skelterjohn> if you do it with interface{}s, yes
21:48 < skelterjohn> if the maximum integer you could see is fairly small,
just use floats exclusively
21:48 < skelterjohn> but i understand that is not a solution to the general
problem
21:48 < araujo> mm I see
21:51 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Ping
timeout: 264 seconds]
21:51 -!- ShadowIce [pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
21:54 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Read error: Connection
reset by peer]
21:55 -!- MizardX [~MizardX@unaffiliated/mizardx] has joined #go-nuts
21:55 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection]
21:56 -!- aho [~nya@fuld-4d00d51e.pool.mediaWays.net] has joined #go-nuts
21:56 < nickaugust> what does it mean when a type is defind as a func..
like in this example: type binOp func(a, b int) int
21:56 < nickaugust> i dont get that
21:57 < exch> it means that anything declared as binOp can only be assigned
a function with that signature
21:57 < gnuvince> nickaugust: binOp is a type that is a function taking two
integers and returning an int
21:58 < skelterjohn> for instance, var foo binOp = func(a, b int) int
{return a+b}
21:58 < skelterjohn> makes sense
21:58 < exch> var f binOp; f = func(a, b int) int { return a + b }
21:58 < skelterjohn> you read my mind
21:58 < skelterjohn> but i used fewer semicolons
21:58 < skelterjohn> i think that means i win
21:58 < skelterjohn> or lose
21:58 < exch> :P
21:58 < skelterjohn> one or the other
21:58 < exch> cookie for you
21:58 < skelterjohn> <3
21:59 < nickaugust> ok yeah that makes sense
21:59 < nickaugust> isnt it almost an interface then?
21:59 < skelterjohn> no
21:59 < skelterjohn> for instance, you can define methods with binOp as a
receiver type
21:59 < nickaugust> maybe an interface with one method?
21:59 < skelterjohn> func (f binOp) foo() {println("this function has a
function!")}
22:00 < skelterjohn> no - it's really a different thing
22:00 < exch> that is a bit wacky when you think about it
22:00 < nickaugust> oh and then that function will work on any object with
the type binOp?
22:00 < skelterjohn> yes
22:00 < skelterjohn> so, that f from before, we can call foo on it
22:00 < exch> yes
22:01 < skelterjohn> something more intuitive might be
22:01 < nickaugust> yeah..  ok got it.  thats kinda intense
22:01 < skelterjohn> func (f binOp) callDefaults() int {return f(0,0)}
22:01 < skelterjohn> type Defaulter interface{ callDefaults() int }
22:01 < skelterjohn> so there is a meaningful reason to have this kind of
behavior
22:03 < nickaugust> ok thanks man
22:04 < skelterjohn> np
22:08 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
22:09 < gent00r> is it possible to bind a goroutine to a particular core?
22:10 < skelterjohn> i don't think the programmer has any control over that
sort of thing, at the moment
22:10 < skelterjohn> but it does sound like the kind of thing that would
have to be added eventually
22:10 < skelterjohn> the user-base would demand it
22:11 -!- KinOfCain [~KinOfCain@rrcs-64-183-61-2.west.biz.rr.com] has joined
#go-nuts
22:12 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts
22:13 < MaybeSo> It was interesting to see in the golang-nuts threads that
runtime.LockOSThread() has been provided
22:14 -!- path[l] [UPP@120.138.102.50] has quit [Read error: Connection reset by
peer]
22:14 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts
22:16 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has quit [Quit:
skelterjohn]
22:19 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined
#go-nuts
22:22 -!- General13372 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit
[Ping timeout: 265 seconds]
22:28 -!- DrHennessy [~alex@2002:180a:dda5:1234:223:6cff:fe7f:7ef2] has joined
#go-nuts
22:28 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit:
slashus2]
22:29 -!- ronnyy [~quassel@p4FF1D862.dip.t-dialin.net] has quit [Remote host
closed the connection]
22:30 -!- DrHennessy [~alex@2002:180a:dda5:1234:223:6cff:fe7f:7ef2] has left
#go-nuts []
22:31 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
22:49 -!- photron [~photron@port-92-201-221-96.dynamic.qsc.de] has quit [Read
error: Operation timed out]
22:52 -!- ikaros [~ikaros@188.107.213.197] has quit [Quit: Leave the magic to
Houdini]
23:03 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
23:03 -!- hokapoka [~hokapoka@hoka.hokapoka.com] has quit [Ping timeout: 240
seconds]
23:05 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Quit: (◣_◢)
BigBrowser is watching ⓎⓄⓊ]
23:11 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
23:11 < MizardX> http://gowiki.tamu.edu/wiki/index.php/Main_Page :)
23:21 -!- awidegreen [~quassel@62.176.237.78] has quit [Remote host closed the
connection]
23:23 -!- dju [dju@fsf/member/dju] has quit [Read error: Connection reset by peer]
23:23 -!- dju_ [dju@fsf/member/dju] has joined #go-nuts
23:27 -!- jsharkey [jsharkey@irc.jsharkey.org] has quit [Ping timeout: 258
seconds]
23:31 -!- divoxx [~divoxx@189.63.144.228] has quit [Quit: divoxx]
23:36 -!- jsharkey [~jsharkey@irc.jsharkey.org] has joined #go-nuts
23:37 -!- Popog [43ab3466@gateway/web/freenode/ip.67.171.52.102] has joined
#go-nuts
23:39 -!- taruti [taruti@aoi.yi.org] has quit [Read error: Operation timed out]
23:40 -!- Popog [43ab3466@gateway/web/freenode/ip.67.171.52.102] has quit [Client
Quit]
23:42 -!- taruti [taruti@aoi.yi.org] has joined #go-nuts
23:45 -!- angasule [c80571ea@gateway/web/freenode/ip.200.5.113.234] has quit
[Quit: Page closed]
23:48 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Remote host closed the
connection]
23:48 -!- path[l] [UPP@120.138.102.50] has quit [Read error: Connection reset by
peer]
23:49 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts
23:50 -!- taruti [taruti@aoi.yi.org] has quit [Read error: Operation timed out]
23:59 -!- hokapoka [~hokapoka@hoka.hokapoka.com] has joined #go-nuts
23:59 -!- taruti [taruti@aoi.yi.org] has joined #go-nuts
--- Log closed Wed Aug 11 00:00:05 2010