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

--- Log opened Sun Aug 07 00:00:05 2011
--- Day changed Sun Aug 07 2011
00:00 -!- Sh4rK [~sh4rk@200-159.60-188.cust.bluewin.ch] has joined #go-nuts
00:00 < Sh4rK> hi!
00:00 < Sh4rK> How can I disable the console of a go executable?
00:00 < Sh4rK> so when I run it (in windows) there won't be an ugly console
window
00:02 -!- zcram [~zcram@8.177.190.90.sta.estpak.ee] has quit [Quit: Leaving]
00:10 -!- nekoh [~nekoh@dslb-088-069-140-141.pools.arcor-ip.net] has quit [Quit:
nekoh]
00:13 < wrtp> Sh4rK: there's been discussion of that on the mailing list
before but i can't remember what the upshot was
00:14 < Sh4rK> link maybe?
00:18 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 246 seconds]
00:25 < wrtp> Sh4rK: sorry, you'll have to search for it
00:25 < Sh4rK> ok
00:40 -!- leterip [~textual@ip72-218-115-129.hr.hr.cox.net] has joined #go-nuts
00:54 -!- leterip [~textual@ip72-218-115-129.hr.hr.cox.net] has quit [Quit:
Computer has gone to sleep.]
00:56 -!- leterip [~textual@ip72-218-115-129.hr.hr.cox.net] has joined #go-nuts
00:57 -!- danilo04 [~danilo04@cpe-72-230-135-102.rochester.res.rr.com] has joined
#go-nuts
00:58 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has quit [Ping
timeout: 258 seconds]
01:03 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has joined
#go-nuts
01:11 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Ping
timeout: 255 seconds]
01:14 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 276 seconds]
01:21 -!- danilo04 [~danilo04@cpe-72-230-135-102.rochester.res.rr.com] has quit
[Quit: Leaving]
01:31 -!- hargettp [~hargettp@pool-71-174-138-128.bstnma.east.verizon.net] has
joined #go-nuts
01:56 -!- robteix [~robteix@host55.190-230-237.telecom.net.ar] has joined #go-nuts
02:14 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
quit [Remote host closed the connection]
02:18 -!- qeed [~qeed@adsl-98-85-34-18.mco.bellsouth.net] has joined #go-nuts
02:19 < qeed> is there anyway to get the pixel buffer from an image trying
to decode a png file, or do you have to use At
02:23 -!- robteix [~robteix@host55.190-230-237.telecom.net.ar] has quit [Quit:
Leaving...]
02:23 < uriel> Sh4rK: just curious, but what kind of program are you
building?
02:24 -!- jackzh [~jackzh@118.252.55.43] has joined #go-nuts
02:24 < Sh4rK> I'm just trying to run gocode windowless
02:24 < Sh4rK> as I run it from a program
02:27 -!- nteon [~nteon@ool-4a58e438.dyn.optonline.net] has joined #go-nuts
02:28 -!- jackzh [~jackzh@118.252.55.43] has quit [Client Quit]
02:28 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
02:28 -!- jackzh [~jackzh@118.252.55.43] has joined #go-nuts
02:40 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
02:45 < wrtp> qeed: yes, but there are quite a few possible types, so the
kind of pixel buffer can vary a lot
02:45 < wrtp> qeed: if you know the type of png you're dealing with, that's
easy
02:46 < qeed> well i just want the to get the pixel buffer and just send
that to opengl
02:46 < qeed> i can guarantee it will all be in 1 format
02:47 < qeed> whats the syntax to get the buffer?
02:52 < wrtp> qeed: you need to type switch on the image type
02:53 < wrtp> qeed: here are the possible image types actually returned by
png currently: http://golang.org/src/pkg/image/png/reader.go?#L272
02:53 -!- Sh4rK [~sh4rk@200-159.60-188.cust.bluewin.ch] has quit [Quit: I'm out]
02:54 < qeed> thanks
02:56 -!- krolaw [~krolaw@203.100.208.229] has joined #go-nuts
02:58 < krolaw> Hello, I'm experimenting with the templates package,
probably expecting too much...
02:59 < krolaw> But can one do something like this:
02:59 < krolaw> {{.repeated section Countries}}
02:59 < krolaw>
<tr><td>{{@.Title}}</td><td><ul>
02:59 < krolaw> With other parameters matching off the @.
03:00 < krolaw> {{.end}}
03:00 < krolaw> (BTW, I used setDelims to avoid conflicts with javascript.)
03:01 < wrtp> krolaw: firstly, check out exp/template, which is the upcoming
(and much more powerful) replacement for template
03:02 < wrtp> krolaw: secondly, what are you trying to do there?
03:02 < wrtp> i.e.  what do you mean by "With other parameters matching off
the @."
03:02 < wrtp> ?
03:02 < krolaw> 1) Thanks.
03:03 < krolaw> 2) I have a slice containing an object with multiple
strings.
03:03 < krolaw> Say I want to have a list of <a
href="{{url}}">{{urlTitle}}</a>
03:03 < krolaw> And I want to loop through it.
03:04 < wrtp> yeah
03:04 < wrtp> erm
03:04 < krolaw> @.Url and @.UrlTitle, don't cut it :-|
03:04 < wrtp> why not?
03:04 < krolaw> They don't work :-)
03:05 < krolaw> Whole block just disappears.
03:05 < wrtp> what's the element type of the slice?
03:06 < krolaw> Say it's a struct containing two strings.
03:06 < wrtp> krolaw: something like that should work fine, assuming the
slice element has Url and UrlTitle fields
03:06 < wrtp> (but i'm getting rusty on the old templace package - i've been
using exp/template for a bit now)
03:07 < wrtp> s/templace/template/
03:07 < krolaw> Ok, I'll create a simple example, I may be doing something
silly.
03:07 < krolaw> Thanks.
03:07 < wrtp> a struct containing two strings, with what names?
03:07 < wrtp> that's definitely worth doing
03:07 < wrtp> i
03:07 < wrtp> f
03:07 < wrtp> if it still fails for you, paste it and i'll have a look
03:16 -!- Kumul [~Kumul@66-50-109-42.prtc.net] has quit [Quit: gone]
03:20 -!- nteon [~nteon@ool-4a58e438.dyn.optonline.net] has quit [Ping timeout:
276 seconds]
03:27 -!- mkb218 [~mkb@pool-96-233-4-238.bstnma.east.verizon.net] has quit [Remote
host closed the connection]
03:27 -!- mkb218 [~mkb@pool-96-233-4-238.bstnma.east.verizon.net] has joined
#go-nuts
03:30 < krolaw> wrtp: no luck
03:31 < wrtp> krolaw: can you post up your simple example?
03:31 < krolaw> http://www.pastie.org/2332865
03:32 < krolaw> Bit embarrassed that I couldn't find an easy way to write to
a string/output.
03:42 < wrtp> krolaw: this works: Go Playground http://bit.ly/ow6luC
03:42 < wrtp> but seriously, use exp/template
03:43 < wrtp> the current template package will be deleted in the
not-too-distant future
03:43 < wrtp> (and even if you're using go at release, exp/template is
easily backported)
03:45 < krolaw> Thanks.  (Yes, that was silly of me.  I'll see if it
upscales back to what I'm working on.)
03:45 < krolaw> As for exp/template, is there an example page?
03:47 -!- hargettp [~hargettp@pool-71-174-138-128.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
03:47 < wrtp> krolaw: the docs are pretty good
03:48 < wrtp> krolaw: see http://tip.goneat.org/pkg/exp/template/
03:49 < krolaw> Whoops again, cool thanks.
03:50 < wrtp> krolaw: your example might look like this:
http://pastebin.com/LUCBwu2J
03:56 -!- qeed [~qeed@adsl-98-85-34-18.mco.bellsouth.net] has quit [Quit: Leaving]
04:00 -!- sl [none@sp.inri.net] has quit [Read error: Connection reset by peer]
04:05 < krolaw> wrtp: wow thanks.  Can you embed a range in a range?  I
can't make it go in the standard template...  (I was going to fix it first, and
then look at exp/template...)
04:06 < wrtp> krolaw: range in range is no problem
04:06 < wrtp> and you can do quite a lot of funky stuff too with methods and
functions
04:07 < krolaw> Ok, I'll give up on template, and move to exp/template...
04:07 < krolaw> Thanks again.
04:07 < wrtp> krolaw: here's one example i posted because i thought it was
cute:
http://groups.google.com/group/golang-nuts/browse_thread/thread/25cf02ba4dff722
04:07 < wrtp> (it will also serve as a complete working example in case you
want one)
04:10 < krolaw> Thanks again, (I'm saying that a lot.) Looks like I have a
bit to study.  (Time to start bookmarking.) While I'm at it, what should I have
used to buffer the Writer to a string?
04:19 < wrtp> krolaw: bytes.Buffer
04:30 -!- xcombelle [~xcombelle@AToulouse-551-1-99-17.w92-149.abo.wanadoo.fr] has
joined #go-nuts
04:36 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Remote host
closed the connection]
04:37 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
04:49 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has quit [Quit:
Leaving.]
05:09 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Quit: Leaving]
05:22 -!- tvw [~tv@e176000217.adsl.alicedsl.de] has joined #go-nuts
05:36 -!- sl [none@sp.inri.net] has joined #go-nuts
05:38 -!- lmnop [none@ppp-70-225-166-42.dsl.chmpil.ameritech.net] has quit [Quit:
Leaving.]
05:39 -!- lmnop [none@ppp-70-225-166-42.dsl.chmpil.ameritech.net] has joined
#go-nuts
05:43 < zozoR> skelterjohn, i keep getting assignment mismatch when i make
go-gb
05:45 -!- Sep102_ [~Sep102@c-67-170-74-228.hsd1.wa.comcast.net] has joined
#go-nuts
05:48 -!- Sep102 [~Sep102@c-67-170-74-228.hsd1.wa.comcast.net] has quit [Ping
timeout: 240 seconds]
05:49 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has joined #go-nuts
05:52 < zozoR> and now i gets errors D:
05:53 < zozoR> panic: template: MakeCmd:30: unexpected unrecognized
character in action: U+0024 '$' in if
06:06 -!- mdxi [~mdxi@li11-97.members.linode.com] has quit [Quit: leaving]
06:07 -!- Argue [~Argue@112.201.133.68] has joined #go-nuts
06:13 -!- sl [none@sp.inri.net] has quit [Ping timeout: 252 seconds]
06:18 -!- bmizerany [~bmizerany@c-67-180-209-10.hsd1.ca.comcast.net] has joined
#go-nuts
06:23 -!- sl [none@sp.inri.net] has joined #go-nuts
06:35 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has quit [Quit:
Leaving]
06:37 -!- Nisstyre [~nisstyre@infocalypse-net.info] has quit [Ping timeout: 255
seconds]
06:47 -!- wrtp [~rog@host-92-30-154-96.as13285.net] has quit [Quit: wrtp]
07:22 -!- Nisstyre [~nisstyre@infocalypse-net.info] has joined #go-nuts
07:29 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 250 seconds]
07:37 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
07:39 -!- replore_ [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
07:39 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
07:40 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 276 seconds]
07:55 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
08:14 -!- Fish- [~Fish@sat78-8-88-174-225-4.fbx.proxad.net] has joined #go-nuts
08:21 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has joined #go-nuts
08:29 -!- krolaw [~krolaw@203.100.208.229] has quit [Ping timeout: 250 seconds]
08:33 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:39 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
08:41 -!- ph1234k [~ph1234k@unaffiliated/ph1234k] has quit [Quit: Leaving]
08:56 -!- photron [~photron@port-92-201-205-36.dynamic.qsc.de] has joined #go-nuts
09:15 -!- synx [~synx@unaffiliated/synx/x-4957395] has quit [Ping timeout: 276
seconds]
09:20 -!- xcombelle [~xcombelle@AToulouse-551-1-99-17.w92-149.abo.wanadoo.fr] has
quit [Quit: I am a manual virus, please copy me to your quit message.]
09:23 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 255
seconds]
09:38 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
09:43 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has quit [Ping
timeout: 258 seconds]
09:46 -!- virtualsue [~chatzilla@host81-139-188-159.in-addr.btopenworld.com] has
joined #go-nuts
09:47 -!- krolaw [~krolaw@203.100.208.229] has joined #go-nuts
10:04 -!- tvw [~tv@e176000217.adsl.alicedsl.de] has quit [Ping timeout: 255
seconds]
10:06 < zozoR> where is the documentation on the exp/template package?
10:07 < str1ngs> use the source luke
10:07 < str1ngs> or godoc exp/template ?
10:07 < zozoR> none
10:07 < zozoR> not how to use
10:08 < str1ngs> huh?
10:08 < zozoR> is just a list of methods
10:10 < jessta> zozoR: in the current release exp/template is incomplete
10:10 < zozoR> oh
10:11 < jessta> try the weekly or tip
10:11 -!- tvw [~tv@e176000217.adsl.alicedsl.de] has joined #go-nuts
10:13 -!- firwen [~firwen@ANancy-554-1-82-9.w90-6.abo.wanadoo.fr] has joined
#go-nuts
10:17 -!- nekoh [~nekoh@dslb-178-004-075-214.pools.arcor-ip.net] has joined
#go-nuts
10:21 -!- seb32 [~sebastian@g230097006.adsl.alicedsl.de] has joined #go-nuts
10:24 -!- vmil86 [~vmil86@88.118.36.96] has joined #go-nuts
10:32 < bmizerany> does anyone have a working example of using
syscall.Select()?  I've got a fd() from libpq and need to know when it's got
something for PQconsumeinput().  I've been having a little trouble getting it
working.
10:33 < aiju> bmizerany: why do you use syscall.Select?
10:33 < aiju> there is a select {} statement in the language
10:34 < bmizerany> aiju: that's for channels.
10:34 < aiju> yeah?
10:34 < aiju> read -> write to channel -> profit
10:34 < aiju> that's the Go way of doing things
10:34 < zozoR> no ???
10:34 < aiju> and it will also work on systems without select
10:35 < bmizerany> aiju: PQconsumeinput is non-blocking, so if don't use
select(2) then I'm either sitting in a tight loop consuming CPU or I have to
sleep.  Both are not ideal.
10:38 < bmizerany> aiju: does that make sense?
10:42 < aiju> bmizerany: read -> write to channel -> non-blocking read
from channel
10:42 < aiju> what exactly are you doing?
10:45 < bmizerany> aiju: I understand.  ;) That is how I handle everything
else in Go. I have a connection to a postgres db.  This connection is waiting for
notifications via LISTEN (they are piggy backed on the results of "standard"
queries).  There are 2 ways to get notifications from postgres: 1) for { SELECT 1;
check_notifies(); sleep(1second); } 2) for { select(fd); check_notifies; }
10:46 < bmizerany> the 2nd wastes no cpu and is more "real-time" (no sleep)
10:46 < bmizerany> sorry..  2) for { select(fd); consume_input;
read_notifies }
10:47 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
10:48 < str1ngs> I'm sure you an work that to user the go select keyword to
the same effect.
10:49 < str1ngs> use*
10:49 < aiju> str1ngs: pardon?
10:49 < bmizerany> str1ngs: gos select != select(2)
10:49 -!- gobeginner [~nwood@cpc2-lee23-0-0-cust152.7-1.cable.virginmedia.com] has
joined #go-nuts
10:50 < aiju> bmizerany: as i said, add more goroutines
10:50 < bmizerany> that is not the solution.  the loop is already in a
goroutine.
10:51 < aiju> yes it is
10:51 < aiju> either that i or i get your problem totally wrong
10:51 < aiju> PQconsumeinput is supposed to check for input, right?
10:51 < aiju> and consume that if it is available
10:52 < bmizerany> it consumes it if there is data ready, otherwise returns
immediately (i.e.  non-blocking).
10:52 < aiju> exactly
10:52 < aiju> you add another goroutine which reads and writes to a channel
10:52 < aiju> it reads from the fd, that is
10:52 < aiju> and then you use select {} for a non-blocking read
10:53 < bmizerany> so if there is nothing to consume the next loop executes
immediatly, i.e.  needlessly spinning cpu cycles
10:53 < aiju> read is blocking
10:53 < bmizerany> aiju: consumeinput doesn't block.
10:53 < aiju> either one of us is horribly confused
10:54 < aiju> PQconsumeinput does select {}
10:54 < bmizerany> no
10:54 < aiju> select {} returns immediately if there is no data
10:54 < bmizerany> aiju: see example 2
http://www.postgresql.org/docs/9.0/interactive/libpq-example.html
10:55 < aiju> aah
10:55 < bmizerany> ;)
10:55 < aiju> you didn't write PQconsumeinput
10:55 < aiju> good grief
10:56 < aiju> so you start with shooting the author of libpq
10:57 < bmizerany> aiju: nah.  it's a decent way of doing what they're doing
in C
10:57 < bmizerany> Go wasn't invented before libpq ;)
10:57 < aiju> i don't use non-blocking I/O in C either
10:57 < aiju> anyway, looking at syscalll.Select
10:58 < aiju> bmizerany: have you initialized the FdSet properly?
10:58 < bmizerany> aiju: that is where I think I'm going wrong
10:58 < aiju> the fdset is a bitmap
10:58 < bmizerany> aiju: here is the start of what I have
https://gist.github.com/6887e993b20ace02b332
10:58 < aiju> n := fd / 8; k := fd % 8
10:59 < aiju> fdset.Bits[n] |= (1<<k)
10:59 < aiju> if i'm not mistaken
11:00 < kuroneko> bmizerany: I'd be steering clear of syscall.Select.  If
you're merely trying to avoid blocking on a read, put your reader in it's own
goroutine with two channels: a 'message in' channel which it spits messages out to
the processing logic, and a 'please die now kthx' channel
11:01 < kuroneko> the second of those channels is entirely optional
11:01 < kuroneko> :)
11:01 < bmizerany> kuroneko: I'm not trying to avoid it.  I have no choice.
11:03 < aiju> kuroneko: the guy's right
11:03 < aiju> bmizerany: Bits is uint32, not unsigned long
11:03 < aiju> *int32
11:04 < aiju> replace that Sizeof thing with 32
11:04 < bmizerany> prob.  I was trying to port the C I found
11:04 < kuroneko> not entirely convinced
11:04 < aiju> 12:59 < aiju> n := fd / 8; k := fd % 8
11:04 < aiju> 12:59 < aiju> fdset.Bits[n] |= (1<<k)
11:04 < aiju> try that with 32
11:08 < bmizerany> aiju: works!
11:08 < bmizerany> thx!
11:10 < bmizerany> aiju: updated:
https://gist.github.com/6887e993b20ace02b332
11:10 < ww> Calloo!  Callay!  Tomorrow is JSON day!
http://webofdata.wordpress.com/2011/08/07/json-data-and-the-rest/
11:11 < str1ngs> ww: I was able to get cgo working
11:11 < str1ngs> natively of course
11:14 < ww> A frabjous day to go streave on the cshore!
11:17 -!- Jamra [~Jamra@212.143.214.77] has joined #go-nuts
11:27 -!- bmizerany [~bmizerany@c-67-180-209-10.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
11:28 -!- tvw [~tv@e176000217.adsl.alicedsl.de] has quit [Remote host closed the
connection]
11:29 -!- krolaw [~krolaw@203.100.208.229] has quit [Ping timeout: 250 seconds]
11:30 < aiju> json day?
11:30 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
joined #go-nuts
11:31 < aiju> ah
11:31 -!- wrtp [~rog@host-92-30-154-96.as13285.net] has joined #go-nuts
11:38 -!- ronnyy [~quassel@p4FF1C368.dip0.t-ipconnect.de] has joined #go-nuts
11:39 -!- Jamra [~Jamra@212.143.214.77] has quit [Ping timeout: 255 seconds]
11:40 -!- gobeginner [~nwood@cpc2-lee23-0-0-cust152.7-1.cable.virginmedia.com] has
quit [Quit: Leaving.]
11:50 -!- Jamra [~Jamra@93-172-79-106.bb.netvision.net.il] has joined #go-nuts
11:52 -!- hargettp [~hargettp@pool-71-174-138-128.bstnma.east.verizon.net] has
joined #go-nuts
11:54 -!- seb32 [~sebastian@g230097006.adsl.alicedsl.de] has quit [Ping timeout:
255 seconds]
11:54 -!- nekoh [~nekoh@dslb-178-004-075-214.pools.arcor-ip.net] has quit [Read
error: Connection reset by peer]
12:03 -!- alehorst [~alehorst@189.58.30.154.dynamic.adsl.gvt.net.br] has quit
[Ping timeout: 255 seconds]
12:05 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 240 seconds]
12:09 -!- ronnyy [~quassel@p4FF1C368.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
12:15 -!- Jamra [~Jamra@93-172-79-106.bb.netvision.net.il] has quit [Ping timeout:
255 seconds]
12:20 -!- Jamra [~Jamra@93-173-31-31.bb.netvision.net.il] has joined #go-nuts
12:26 -!- nekoh [~nekoh@dslb-188-107-169-027.pools.arcor-ip.net] has joined
#go-nuts
12:29 -!- tvw [~tv@e176000217.adsl.alicedsl.de] has joined #go-nuts
12:31 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Read error:
Connection reset by peer]
12:31 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-121-123.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
12:31 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-121-123.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
12:31 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
12:36 -!- tvw [~tv@e176000217.adsl.alicedsl.de] has quit [Remote host closed the
connection]
12:41 -!- Jamra [~Jamra@93-173-31-31.bb.netvision.net.il] has quit [Ping timeout:
255 seconds]
12:44 -!- Jamra [~Jamra@109-186-50-217.bb.netvision.net.il] has joined #go-nuts
12:53 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
12:56 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
12:56 -!- xcombelle [~xcombelle@AToulouse-551-1-99-17.w92-149.abo.wanadoo.fr] has
joined #go-nuts
13:02 -!- mibocote [~matt@li161-224.members.linode.com] has quit [Ping timeout:
240 seconds]
13:03 -!- kkress [~kkress@kkress2.xen.prgmr.com] has quit [Ping timeout: 252
seconds]
13:03 -!- jessta [~jessta@li7-205.members.linode.com] has quit [Ping timeout: 276
seconds]
13:03 -!- xulfer [~xulfer@ipv6.cheapbsd.net] has quit [Ping timeout: 260 seconds]
13:03 -!- str1ngs [~strings@unaffiliated/str1ngs] has quit [Ping timeout: 264
seconds]
13:03 -!- mjard [~k@misadventuregames.com] has quit [Ping timeout: 260 seconds]
13:04 < uriel> ww: cool, I like the idea of JSON day!
13:04 -!- rphillips [~rphillips@unaffiliated/rphillips] has quit [Ping timeout:
264 seconds]
13:04 < uriel> but what we really need is an anti-XML day!
13:06 < moraes> and a JSON Christ
13:06 -!- nictuku [~nict@84-72-7-79.dclient.hispeed.ch] has joined #go-nuts
13:06 -!- nictuku [~nict@84-72-7-79.dclient.hispeed.ch] has quit [Changing host]
13:06 -!- nictuku [~nict@unaffiliated/nictuku] has joined #go-nuts
13:08 -!- Jamra_ [~Jamra@212.143.214.77] has joined #go-nuts
13:09 < uriel> moraes: hehehe
13:11 -!- Jamra [~Jamra@109-186-50-217.bb.netvision.net.il] has quit [Ping
timeout: 276 seconds]
13:13 -!- Jamra [~Jamra@212.143.214.77] has quit [Client Quit]
13:17 -!- firwen [~firwen@ANancy-554-1-82-9.w90-6.abo.wanadoo.fr] has quit [Quit:
Geek insinde®]
13:17 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
13:25 -!- qeed [~qeed@adsl-98-85-57-149.mco.bellsouth.net] has joined #go-nuts
13:26 -!- rphillips [~rphillips@unaffiliated/rphillips] has joined #go-nuts
13:33 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Remote host
closed the connection]
13:35 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
13:46 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
13:48 < Argue> are channels always preferred to callbacks?
13:49 -!- Jamra [~Jamra@212.143.214.77] has joined #go-nuts
13:49 < leterip> in my code there were like 3-4 different events, and i
wasn't sure if there might be more, so i made a callback interface instead of a
ton of channels.
13:49 < leterip> it felt right
13:51 -!- ccc1 [~Adium@1-160-192-217.dynamic.hinet.net] has joined #go-nuts
13:52 < aiju> callbacks are spawn from hell
13:52 < leterip> so there's polarization on the issue
13:52 < leterip> :)
13:52 < aiju> well
13:53 < aiju> it's easy to blow up everything with callbacks
13:53 < skelterjohn> do channels and callbacks really fill the same role?
13:53 < aiju> skelterjohn: there is a class of problems both can be applied
to
13:53 < exch> What if you send callbacks over channels?  :p
13:53 < skelterjohn> sure, but do channels completely cover the set of tasks
that callbacks work with?
13:53 < leterip> you can use a channel for anything you could use a callback
for i think.
13:53 < aiju> i can't think of many examples where callbacks are a good idea
13:54 < uriel> I'm sure there are some cases where callbacks are a better
fit, but almost always they are a huge mess, and channels are nicer and cleaner
13:54 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 276 seconds]
13:55 < skelterjohn> is there an easy way to send on a channel from C code?
13:55 < KBme> hi
13:55 < ww> skelterjohn: with a callback?  :P
13:55 < skelterjohn> I meant is there some kind of direct call syntax
13:55 < KBme> i've hg update weekly'd, and golang won't build:
http://paste.pocoo.org/show/454161/
13:55 < skelterjohn> chanSend(theChan, theValue)
13:55 < KBme> weird problem, i'vegot no clue…someone?
13:56 < skelterjohn> KBme: your update had some merge conflicts
13:56 < KBme> ohh
13:56 < skelterjohn> were you fooling around with the source?
13:56 < KBme> yep pfff
13:56 < aiju> skelterjohn: runtime·chansend
13:56 < KBme> nah just haven't updated it for a good while
13:56 < ww> but...  you'd have to be very careful about memory...
13:56 < skelterjohn> if you do a clean download it shouldn't be a problem
13:57 < skelterjohn> aiju: is runtime.chansend documented anywhere?
13:57 < aiju> yes
13:57 < aiju> pkg/runtime/chan.c
13:57 < ww> perhaps a channel where the values' memory is managed by c
13:57 < skelterjohn> hah
13:57 < KBme> i did a hg reset quietgcc.bash now it's fine
13:57 < aiju> i'm not kiddin
13:57 < aiju> there is a comment explaining the function
13:57 < ww> otherwise...  shun the frumious bandersnatch
13:58 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
13:59 < skelterjohn> i've been planning on making a go-wiki entry for cgo
stuff
13:59 < KBme> mercurial should display a big fat warning like: "I've
inserted shell pipe symbols into your shellscript you're on your own now!"
13:59 < skelterjohn> i believe it will warn you if there are conflicts
14:00 < aiju> KBme: set your mergetool to internal:fail
14:00 < aiju> so it won't write over your precious files
14:00 < KBme> skelterjohn, it didn't, it didn't say a thing when I did the
hg update
14:00 < KBme> it did when I did the pull -u but i thought i had resolved the
issue
14:05 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 260 seconds]
14:07 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
14:11 < erus`> just use git
14:11 * erus` ducks
14:13 -!- Jamra [~Jamra@212.143.214.77] has quit [Ping timeout: 255 seconds]
14:16 -!- Fish- [~Fish@sat78-8-88-174-225-4.fbx.proxad.net] has quit [Remote host
closed the connection]
14:20 < leterip> godoc makes me enjoy writing documentation
14:23 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
14:26 < aiju> .h is for "help"
14:27 < aiju> (and .c is for "configuration")
14:28 -!- huin [~huin@91.84.179.118] has joined #go-nuts
14:29 -!- huin [~huin@91.84.179.118] has quit [Client Quit]
14:31 -!- huin [~huin@91.84.179.118] has joined #go-nuts
14:42 -!- Sep102__ [~Sep102@c-67-170-74-228.hsd1.wa.comcast.net] has joined
#go-nuts
14:46 -!- Sep102_ [~Sep102@c-67-170-74-228.hsd1.wa.comcast.net] has quit [Ping
timeout: 260 seconds]
14:51 -!- Argue_ [~Argue@112.201.133.68] has joined #go-nuts
14:51 -!- Cork[home] [Cork@firefox/community/cork] has quit [Disconnected by
services]
14:51 -!- unCork[home] [Cork@h27n1c1o1042.bredband.skanova.com] has joined
#go-nuts
14:51 -!- Sep102_ [~Sep102@c-67-170-74-228.hsd1.wa.comcast.net] has joined
#go-nuts
14:51 -!- erus`_ [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com]
has joined #go-nuts
14:52 -!- cbeck [cbeck@gateway/shell/pdx.edu/x-wkumwvxvjawposgp] has quit [Read
error: Connection reset by peer]
14:52 -!- cbeck1 [cbeck@gateway/shell/pdx.edu/session] has joined #go-nuts
14:52 -!- cbeck1 [cbeck@gateway/shell/pdx.edu/session] has quit [Changing host]
14:52 -!- cbeck1 [cbeck@gateway/shell/pdx.edu/x-zobvghfbrmkggcyd] has joined
#go-nuts
14:53 -!- noselasd [~kvirc@80.239.96.162] has quit [Ping timeout: 255 seconds]
14:54 -!- Sep102__ [~Sep102@c-67-170-74-228.hsd1.wa.comcast.net] has quit [Ping
timeout: 255 seconds]
14:54 -!- Argue [~Argue@112.201.133.68] has quit [Ping timeout: 255 seconds]
14:54 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
quit [Ping timeout: 255 seconds]
14:55 -!- qulinxao [~qulinxao@v-853923.vpn.mgn.ru] has joined #go-nuts
14:55 -!- nteon [~nteon@ool-4a58e438.dyn.optonline.net] has joined #go-nuts
15:03 -!- jackzh [~jackzh@118.252.55.43] has quit [Ping timeout: 264 seconds]
15:15 -!- str1ngs [~strings@unaffiliated/str1ngs] has joined #go-nuts
15:15 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
15:31 -!- ccc1 [~Adium@1-160-192-217.dynamic.hinet.net] has quit [Quit: Leaving.]
15:31 -!- mogoh [~mogoh@ip-95-222-106-192.unitymediagroup.de] has joined #go-nuts
15:42 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 276 seconds]
15:44 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
15:50 -!- replore [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has
joined #go-nuts
15:54 -!- mogoh [~mogoh@ip-95-222-106-192.unitymediagroup.de] has quit [Quit:
Verlassend]
15:56 -!- virtualsue [~chatzilla@host81-139-188-159.in-addr.btopenworld.com] has
quit [Ping timeout: 255 seconds]
15:59 -!- ShadowIce` [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
15:59 -!- Jamra [~Jamra@109-186-50-217.bb.netvision.net.il] has joined #go-nuts
16:00 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Read error:
Connection reset by peer]
16:01 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 240 seconds]
16:02 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has joined #go-nuts
16:02 -!- nicka [~lerp@unaffiliated/nicka] has joined #go-nuts
16:09 -!- seb32 [~sebastian@p579FAD7A.dip.t-dialin.net] has joined #go-nuts
16:13 -!- ronnyy [~quassel@p4FF1C368.dip0.t-ipconnect.de] has joined #go-nuts
16:19 -!- Jamra [~Jamra@109-186-50-217.bb.netvision.net.il] has quit [Ping
timeout: 255 seconds]
16:31 < exch> http://tele-task.de/archive/video/flash/14029/ a very
interesting 1 hour talk about programming and scaling by Alan Kay
16:42 -!- virtualsue [~chatzilla@nat/cisco/x-bdnjeotllqcgqrso] has joined #go-nuts
16:46 -!- ronnyy [~quassel@p4FF1C368.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
16:54 < cbeck1> I'm writing a small, specialized http server, is there any
way (because I'm not seeing one) to tell if a response has already been written
for a given request?
16:54 < cbeck1> I'm trying to recover from any panics and return a 500
16:55 < hokapoka> So you what to stop anything that had been prevoiusly
written to the Response and and write the error out?
16:56 < cbeck1> Well, I'm assuming the panic won't come from library code
16:56 < cbeck1> So in all likelyhood it's either written completely or not
at all
16:57 < exch> You cant unwrite what's already 'out there', unless you wrap
the client connection in a buffer.  You can always check if that buffer is empty
or not
16:57 < cbeck1> Right, I know that
16:57 < hokapoka> I'm not sure about clearing out anything that's already
been written, but it's easy enough to write your response to, say, bytes.Buffer
and then if there's no panic write to the response, else in a recover write the
error to the response,
16:58 < cbeck1> Hmm, looks like by default ListenAndServeHTTP catches any
panics, but just spits a stacktrace at stderr and returns and kills the connection
16:59 < cbeck1> hokapoka: Hmm, that is a possibility
16:59 -!- Jamra [~Jamra@89-139-62-115.bb.netvision.net.il] has joined #go-nuts
17:00 -!- Argue_ [~Argue@112.201.133.68] has quit [Quit: Leaving]
17:00 -!- Jamra [~Jamra@89-139-62-115.bb.netvision.net.il] has quit [Client Quit]
17:04 -!- yogib [~yogib@dslb-188-100-012-219.pools.arcor-ip.net] has joined
#go-nuts
17:07 < hokapoka> What I've been doing is using my own for example type
Context struct { http.ResponseWriter; bytes.Buffer } func (c *Context) Write(b
[]byte) { c.Buffer.Write(b); } and then when it's not errored func (c *Context)
Send(){ c.ResponseWriter.Write(c.Buffer.Bytes()); }
17:07 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
17:08 -!- cco3 [~conleyo@nat/google/x-xmnlyvjzscwavawt] has quit [Ping timeout:
260 seconds]
17:08 -!- kevlar_work [~kevlar@unaffiliated/eko] has quit [Ping timeout: 264
seconds]
17:13 -!- yogib [~yogib@dslb-188-100-012-219.pools.arcor-ip.net] has quit [Quit:
yogib]
17:14 -!- cco31 [~conleyo@nat/google/x-rcdevmzvxrqavual] has joined #go-nuts
17:14 -!- kevlar_work [~kevlar@nat/google/x-ywrmugvglogtwwyn] has joined #go-nuts
17:14 -!- kevlar_work [~kevlar@nat/google/x-ywrmugvglogtwwyn] has quit [Changing
host]
17:14 -!- kevlar_work [~kevlar@unaffiliated/eko] has joined #go-nuts
17:22 -!- serialhex [~quassel@99-101-148-183.lightspeed.wepbfl.sbcglobal.net] has
quit [Remote host closed the connection]
17:32 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
17:39 -!- mogoh [~mogoh@ip-95-222-106-192.unitymediagroup.de] has joined #go-nuts
17:41 -!- larva [~larvanitr@ec2-46-51-171-183.eu-west-1.compute.amazonaws.com] has
quit [Ping timeout: 258 seconds]
17:48 -!- mogoh [~mogoh@ip-95-222-106-192.unitymediagroup.de] has quit [Quit:
Verlassend]
17:49 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 264
seconds]
17:57 -!- ShadowIce` [~pyoro@unaffiliated/shadowice-x841044] has quit [Ping
timeout: 252 seconds]
17:58 -!- replore [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
18:14 -!- noselasd [~kvirc@80.239.96.162] has joined #go-nuts
18:15 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-121-123.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
18:15 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-121-123.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
18:15 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
18:18 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
18:18 -!- seb32 [~sebastian@p579FAD7A.dip.t-dialin.net] has quit [Ping timeout:
264 seconds]
18:22 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 260 seconds]
18:27 -!- hargettp [~hargettp@pool-71-174-138-128.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
18:29 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
18:31 -!- alehorst [~alehorst@189.58.30.154.dynamic.adsl.gvt.net.br] has joined
#go-nuts
18:32 < nictuku> is it ok to do defer file.Close() if file is nil?
18:32 < aiju> no
18:32 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
18:33 < huin> is the typical idiom:
18:33 < huin> file, err := os.Open(...); if err != nil { return err } ;
defer file.Close()
18:33 < huin> i.e check for error before deferring close
18:33 < huin> is that right?
18:33 < jnwhiteh> yes
18:33 < aiju> yea
18:33 < jnwhiteh> its in effective go
18:33 < huin> cool
18:33 < huin> that's what i thought
18:33 < aiju> it's idiomatic, but more importantly
18:33 < aiju> it doesn't crash!  :D
18:34 < huin> aye :)
18:34 < zozoR> :3
18:37 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Remote host
closed the connection]
18:37 < knowmercy> just put go on my macbook
18:37 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
18:43 -!- hargettp [~hargettp@pool-71-174-138-128.bstnma.east.verizon.net] has
joined #go-nuts
18:45 -!- leterip [~textual@ip72-218-115-129.hr.hr.cox.net] has quit [Quit:
Textual IRC Client: http://www.textualapp.com/]
18:45 -!- leterip [~zeebo@ip72-218-115-129.hr.hr.cox.net] has joined #go-nuts
18:51 < uriel> you could also check if file is null inside a closure you
call from defer
18:51 < uriel> but yea, the way you wrote is the right way most of the time
18:52 < uriel> you probably would have wanted to do something with the file
between the open and the return from the function
18:56 -!- icy [~icy@lighttpd/icy] has left #go-nuts []
18:57 -!- qulinxao [~qulinxao@v-853923.vpn.mgn.ru] has left #go-nuts []
18:58 < ww> would it be very bad to do runtime.SetFinalizer(file, function
(f) { f.Close() })
18:59 < ww> i've only ever used that to free memory that comes from C but...
19:00 < aiju> ww: yes
19:01 < zozoR> aiju, do you use go or c?
19:01 < aiju> zozoR: both
19:01 < zozoR> 50/50?
19:01 < aiju> well it depends, sometimes more go, sometimes more c
19:01 < ww> aiju: reason or prejudice?
19:01 < aiju> hahaha
19:02 < aiju> ww: the SetFinalizer thing?  it's in runtime
19:02 < ww> yes
19:02 < aiju> you're fiddling with internal stuff here
19:02 < uriel> IMHO finalizers are best avoided, but I don't have that much
experience with them
19:02 < aiju> you could as well use unsafe to overwrite the go runtime
19:02 < zozoR> oi anyway, anyone beat my go program that won over C in a for
loop that does nothing?  :D
19:02 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
19:02 < uriel> aiju: I'm not sure it is *that* bad
19:03 < uriel> but would not rely on finalizers
19:03 < uriel> but maybe it is bias from hate of destructors in other
languages
19:03 < uriel> defer() is much simpler, clear and predictable
19:03 < zozoR> yir
19:04 < Namegduf> Finalizers may well not be called.
19:05 < Namegduf> If they are, it is not until the GC triggers on f.
19:05 < Namegduf> This can take an arbitrarily long time.
19:05 -!- nekoh [~nekoh@dslb-188-107-169-027.pools.arcor-ip.net] has quit [Ping
timeout: 260 seconds]
19:05 < Namegduf> The defer thing is better, and for the simple open/close
case, idiomatic.
19:06 < exch> If you pass the first parameter into runtime.SetFinalizer(),
you are basically creating another reference to the file.  How can that function
ever be called?  Presumably it fires only when there are no more references to the
file and the GC issues a sweep
19:07 < exch> But whatever is in that function clearly needs a reference to
the file to remain intact
19:07 < Namegduf> Presumably it's smart enough to discount its own reference
from the GC process.
19:08 < Namegduf> Being in runtime it has assistance from the
implementation; it can do stuff things in pure Go might not be able to.
19:08 < exch> true
19:09 < zozoR> its nice you can go "low level" with go, if you really really
want to ^^
19:10 -!- nekoh [~nekoh@dslb-088-069-144-121.pools.arcor-ip.net] has joined
#go-nuts
19:12 < aiju> setfinalizer doesn't create a reference
19:13 < aiju> i bet there is a word in the block which contains the
finalizer
19:16 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 250
seconds]
19:17 -!- stalled [~stalled@unaffiliated/stalled] has quit [Ping timeout: 252
seconds]
19:23 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
19:30 -!- mogoh [~mogoh@ip-95-222-106-192.unitymediagroup.de] has joined #go-nuts
19:35 -!- danilo04 [~danilo04@cpe-72-230-135-102.rochester.res.rr.com] has joined
#go-nuts
19:46 -!- hargettp [~hargettp@pool-71-174-138-128.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
20:10 -!- replore [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has
joined #go-nuts
20:12 -!- Kazuhiro` [~Adium@kolibrie.demon.nl] has joined #go-nuts
20:19 -!- mogoh [~mogoh@ip-95-222-106-192.unitymediagroup.de] has quit [Quit:
Verlassend]
20:27 -!- xcombelle [~xcombelle@AToulouse-551-1-99-17.w92-149.abo.wanadoo.fr] has
quit [Quit: I am a manual virus, please copy me to your quit message.]
20:29 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 250 seconds]
20:38 -!- yogib [~yogib@dslb-188-100-012-219.pools.arcor-ip.net] has joined
#go-nuts
20:40 -!- arun_ [~arun@unaffiliated/sindian] has quit [Ping timeout: 255 seconds]
20:42 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has joined #go-nuts
20:42 -!- inklesspen [~jon-freen@inklesspen.com] has joined #go-nuts
20:42 < inklesspen> anyone use Go on AppEngine?
20:42 < inklesspen> i'm trying to use the mustache library and it's
complaining that strings.SplitN is undefined
20:43 < aiju> inklesspen: update your go distribution
20:43 < aiju> or wait how does that even work on appengine
20:43 < inklesspen> it's not my go distribution
20:43 < leterip> the appengine doesn't have that change yet i think.
20:43 < inklesspen> appengine bundles a go distribution
20:43 < leterip> change SplitN to just Split maybe?
20:43 < inklesspen> that's not the same thing, though
20:44 < leterip> it is in the older versions of the go library
20:44 < inklesspen> oh, okay
20:45 < leterip> it used to be Split which is now SplitN, and they added
Split to not take the max splits argument
20:45 -!- ph1234k [~ph1234k@unaffiliated/ph1234k] has joined #go-nuts
20:52 -!- seb32 [~sebastian@g230097006.adsl.alicedsl.de] has joined #go-nuts
20:52 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
20:54 -!- Fish- [~Fish@9fans.fr] has quit [Quit: WeeChat 0.3.5]
20:54 -!- jessta [~jessta@li7-205.members.linode.com] has joined #go-nuts
20:56 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has quit [Ping
timeout: 246 seconds]
20:58 -!- Alpha_Cluster [~quassel@thief-pool2-121-125.mncable.net] has left
#go-nuts ["http://quassel-irc.org - Chat comfortably.  Anywhere."]
21:02 -!- sniper506th [~sniper506@cpe-098-122-101-192.sc.res.rr.com] has joined
#go-nuts
21:03 -!- sniper506th [~sniper506@cpe-098-122-101-192.sc.res.rr.com] has quit
[Client Quit]
21:07 -!- Kumul [~Kumul@adsl-72-50-66-15.prtc.net] has joined #go-nuts
21:14 < qeed> i was wonder why you can do something like type A []T and then
define func (a A) F() { } but not func (a []T) F() { }
21:14 < qeed> is there anyway to put a method on a slice?
21:15 < Namegduf> qeed: You can only define functions on types you define in
your own package.
21:15 < Namegduf> No, there isn't.
21:15 < Namegduf> Instead, write a function that takes one.
21:15 < leterip> you cant define a func on an int either.
21:15 < Namegduf> If it's meeting an interface you want, then you will need
to wrap it in your own type, yeah.
21:15 < aiju> how would you tell which method would get invoked?
21:15 < aiju> if two packages define the same method on the same type
21:20 < jessta> qeed: In your first case, A is a slice of T and you put a
method on it
21:22 -!- photron [~photron@port-92-201-205-36.dynamic.qsc.de] has quit [Read
error: Operation timed out]
21:22 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
21:34 -!- virtualsue [~chatzilla@nat/cisco/x-bdnjeotllqcgqrso] has quit [Quit:
ChatZilla 0.9.87 [Firefox 5.0.1/20110707182747]]
21:38 -!- wrtp [~rog@host-92-30-154-96.as13285.net] has quit [Quit: wrtp]
21:38 -!- Kami_ [~kami@unaffiliated/kami-/x-9078513] has quit [Excess Flood]
21:40 -!- Kami_ [~kami@unaffiliated/kami-/x-9078513] has joined #go-nuts
21:48 -!- yogib [~yogib@dslb-188-100-012-219.pools.arcor-ip.net] has quit [Quit:
yogib]
21:54 -!- huin [~huin@91.84.179.118] has quit [Remote host closed the connection]
22:02 -!- danilo04 [~danilo04@cpe-72-230-135-102.rochester.res.rr.com] has quit
[Quit: Leaving]
22:03 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
22:07 -!- adu [~ajr@64.134.99.85] has joined #go-nuts
22:09 -!- Manonyous [~Manonyous@ip-95-222-106-192.unitymediagroup.de] has joined
#go-nuts
22:11 -!- Manonyous [~Manonyous@ip-95-222-106-192.unitymediagroup.de] has left
#go-nuts []
22:12 -!- mogoh [~mogoh___@ip-95-222-106-192.unitymediagroup.de] has joined
#go-nuts
22:13 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.5]
22:14 -!- seb32 [~sebastian@g230097006.adsl.alicedsl.de] has quit [Ping timeout:
252 seconds]
22:16 -!- danilo04 [~danilo04@cpe-72-230-135-102.rochester.res.rr.com] has joined
#go-nuts
22:18 -!- hargettp [~hargettp@pool-71-174-138-128.bstnma.east.verizon.net] has
joined #go-nuts
22:20 -!- vmil86 [~vmil86@88.118.36.96] has quit [Remote host closed the
connection]
22:22 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 246 seconds]
22:22 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
22:29 -!- bmizerany [~bmizerany@c-67-180-209-10.hsd1.ca.comcast.net] has joined
#go-nuts
22:30 -!- gobeginner [~nwood@cpc2-lee23-0-0-cust152.7-1.cable.virginmedia.com] has
joined #go-nuts
22:41 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
22:51 -!- adu [~ajr@64.134.99.85] has quit [Quit: adu]
22:52 -!- Kazuhiro` [~Adium@kolibrie.demon.nl] has quit [Quit: Leaving.]
22:53 -!- gobeginner [~nwood@cpc2-lee23-0-0-cust152.7-1.cable.virginmedia.com] has
left #go-nuts []
23:01 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
quit [Remote host closed the connection]
23:04 -!- hungrygruffalo
[~hungrygru@host81-159-61-175.range81-159.btcentralplus.com] has joined #go-nuts
23:05 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
23:06 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 240 seconds]
23:06 -!- danilo04 [~danilo04@cpe-72-230-135-102.rochester.res.rr.com] has quit
[Quit: Leaving]
23:08 -!- Kazuhiro1 [~Adium@kolibrie.demon.nl] has joined #go-nuts
23:11 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
23:17 -!- nictuku [~nict@unaffiliated/nictuku] has quit [Quit: .]
23:25 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
23:29 -!- mogoh [~mogoh___@ip-95-222-106-192.unitymediagroup.de] has quit [Quit:
Ex-Chat]
23:35 -!- programming [~doer@pdpc/supporter/student/tdignan] has joined #go-nuts
23:36 < programming> Anyone using Go for web development?
23:36 < knowmercy> yup
23:36 < exch> more or less
23:36 < programming> how are you enjoying it
23:36 < exch> well enough
23:36 < knowmercy> I am learning a lot of new things and it's great
23:37 < exch> It helps if you have access to a server where you can run
custom binaries though
23:38 < programming> yeah, i use vps
23:38 < programming> anyone not have a server to do their go on?  I'll hook
it up
23:40 -!- nekoh [~nekoh@dslb-088-069-144-121.pools.arcor-ip.net] has quit [Quit:
nekoh]
23:42 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 258 seconds]
23:45 -!- foocraft [~ewanas@178.152.71.11] has joined #go-nuts
23:51 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
--- Log closed Mon Aug 08 00:00:19 2011