--- Log opened Wed Jul 14 00:00:12 2010
00:05 -!- photron [~photron@port-92-201-47-104.dynamic.qsc.de] has quit [Ping
timeout: 248 seconds]
00:15 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
00:17 -!- ericvh [~ericvh@2002:467b:802c:0:223:6cff:fe93:c616] has joined #go-nuts
00:21 -!- ericvh [~ericvh@2002:467b:802c:0:223:6cff:fe93:c616] has left #go-nuts
[]
00:33 -!- g0bl1n [~pr0kter@a213-22-76-1.cpe.netcabo.pt] has joined #go-nuts
00:35 -!- Agon-laptop
[~marcel@HSI-KBW-095-208-003-128.hsi5.kabel-badenwuerttemberg.de] has quit [Remote
host closed the connection]
00:35 < plexdev> http://is.gd/dr0FK by [Russ Cox] in go/src/pkg/runtime/ --
runtime: better error for send/recv on nil channel
00:44 -!- g0bl1n [~pr0kter@a213-22-76-1.cpe.netcabo.pt] has quit [Quit: Leaving]
00:44 -!- carllerche [~carllerch@99.13.242.166] has joined #go-nuts
00:51 -!- mikespook [~mikespook@58.62.5.54] has joined #go-nuts
00:52 -!- ExtraSpice [~ExtraSpic@88.118.32.225] has quit [Ping timeout: 240
seconds]
00:54 -!- binarypie [~binarypie@adsl-99-50-122-26.dsl.pltn13.sbcglobal.net] has
quit [Quit: Lost terminal]
01:08 -!- zerofluid [~zerofluid@ip24-56-54-185.ph.ph.cox.net] has joined #go-nuts
01:08 -!- gid [~gid@220.253-225-62.VIC.netspace.net.au] has joined #go-nuts
01:09 < zerofluid> 1 package main
01:09 < zerofluid> 2
01:09 < zerofluid> 3 import fmt "fmt"
01:09 < zerofluid> 4
01:09 < zerofluid> 5 func main() {
01:09 < zerofluid> 6 var Point struct {i, j int}
01:09 < zerofluid> 7 p := new Point
01:09 < zerofluid> 8 fmt.Println(p)
01:09 < zerofluid> 9 }
01:09 < zerofluid> 10
01:09 < zerofluid> hello.go:7: syntax error: unexpected name, expecting
semicolon or newline or }
01:09 < Ginto8> pastebin or w/e
01:09 < zerofluid> what is w/e
01:10 < Ginto8> don't paste code in IRC
01:10 < Ginto8> anyway
01:10 < Ginto8> it's new(Point)
01:10 < Ginto8> that is all
01:10 < KirkMcDonald> Well
01:11 < KirkMcDonald> Except Point isn't a type.
01:11 < Ginto8> oh yeah good point
01:11 < Ginto8> it's a ver
01:11 < Ginto8> var*
01:11 -!- bmizerany [~bmizerany@dsl081-064-072.sfo1.dsl.speakeasy.net] has quit
[Ping timeout: 252 seconds]
01:11 < Ginto8> there isn't a typeof()
01:11 < Ginto8> so you need to do like
01:11 < Ginto8> type Point struct {i,j int}
01:11 < Ginto8> before func main()
01:12 < Ginto8> cuz I don't think you can have type decl's inside a func
01:13 < KirkMcDonald> The grammar suggests that you can.
01:13 < zerofluid> works either way - in or out of function - thanks and
sorry - too quick on the trigger
01:14 < Ginto8> oh cool
01:14 < Ginto8> function scope types
01:14 < zerofluid> yes - that probably isn't what I want, but it works
01:15 < Ginto8> what is it that you actually want?
01:15 -!- anticw [~anticw@c-67-169-41-113.hsd1.ca.comcast.net] has quit [Quit:
leaving]
01:15 -!- anticw [~anticw@c-67-169-41-113.hsd1.ca.comcast.net] has joined #go-nuts
01:16 < zerofluid> believe it or not, just a point right now - but what I'll
need by Friday is a two-dimensional array of vectors (or eqv) that can hold points
01:16 < zerofluid> figured I'd make a point first...
01:16 < Ginto8> uh why?
01:16 < Ginto8> and by vector you mean like C++'s std::vector?
01:17 < zerofluid> dynamic programming using vectors and DFS ...  and yes -
vectors like C++ and Java - Go has one, but I'm not sure that is what I need
01:18 < Ginto8> well go's slices can be reallocated and copiesd
01:18 < Ginto8> copied*
01:18 < Ginto8> what exactly do you want to do?
01:18 -!- carllerche [~carllerch@99.13.242.166] has quit [Quit: carllerche]
01:18 -!- ender2070 [~ender2070@bas22-toronto12-2925103372.dsl.bell.ca] has joined
#go-nuts
01:18 < zerofluid> combinations of exact change algorithm
01:19 < zerofluid> I can work this out on paper with a 2-dim array of
vectors that contain points
01:20 < Ginto8> why do you need points?
01:20 < zerofluid> and yes, the recursive solution was the warm up
01:21 < zerofluid> because the next valid point points to the last valid
point
01:21 < zerofluid> and next can be on the current coin or the next lesser
coin
01:21 < zerofluid> I think
01:21 < zerofluid> like I said, I could even declare a point today
01:22 < Ginto8> wait...  is this supposed to be something like a linked
list?
01:22 < zerofluid> and yes, I bothered you yesterday for the recursive
solution
01:22 < zerofluid> yes- so a slice might do
01:22 < nsf> omg, function scope types
01:22 < Ginto8> nsf, yeah inorite?  I had no clue
01:22 < zerofluid> http://golang.org/pkg/container/vector/#Vector
01:22 < Ginto8> what would be the real kicker is if we could have functions
IN FUNCTIONS
01:22 < zerofluid> so - something is at least NAMED vector ...
01:23 < KirkMcDonald> Ginto8: Hmm?
01:23 < Ginto8> zerofluid, yes but I don't think you know what you're
talking about
01:23 < nsf> Ginto8: we can
01:23 < nsf> there are closures
01:23 < zerofluid> nothing like like blind finding something new
01:23 < Ginto8> nsf, well I know function literals
01:23 < Ginto8> but can you have named functions?
01:23 < nsf> you can store it in a variable
01:23 < Ginto8> like aside from f := func() { ..  }
01:23 < nsf> afaik
01:23 < Ginto8> oh ok
01:23 < Ginto8> I'll have to test that sometime
01:24 -!- Bombe [~droden@freenet/developer/Bombe] has quit [Excess Flood]
01:24 < Ginto8> zerofluid, what coins are valid?
01:24 < Ginto8> quarters dimes nickels pennies?
01:24 < zerofluid> later and thanks - we'll see if I'm clueless if or when I
get the right numbers
01:24 < zerofluid> 1 2 5 10 20 25 50 100
01:24 < Ginto8> okey dokey
01:24 < zerofluid> yes, we have a two-cent coin in my prof's world ;-)
01:25 -!- Bombe [~droden@weltgehirnmaschine.de] has joined #go-nuts
01:25 < zerofluid> anyway - thanks - I'll let you know
01:25 -!- zerofluid [~zerofluid@ip24-56-54-185.ph.ph.cox.net] has quit [Quit:
Leaving]
01:35 -!- aho [~nya@fuld-4d00d23e.pool.mediaWays.net] has quit [Ping timeout: 245
seconds]
01:37 -!- Robbo [~Robbocogs@CPE-124-187-134-193.lns15.ken.bigpond.net.au] has
joined #go-nuts
01:40 -!- Robbo_ [~Robbocogs@CPE-124-187-134-193.lns15.ken.bigpond.net.au] has
quit [Ping timeout: 260 seconds]
01:42 -!- aho [~nya@fuld-4d00d1b8.pool.mediaWays.net] has joined #go-nuts
01:54 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts
01:59 < Eko> can anyone explain this:
01:59 < Eko> eko@graff ~/dev/hosted/gofr_goro $ testsuite/cgonested/cgosub
01:59 < Eko> PASS
01:59 < Eko> eko@graff ~/dev/hosted/gofr_goro $ testsuite/cgonested/cgosub |
cat
01:59 < Eko> eko@graff ~/dev/hosted/gofr_goro $ echo
`testsuite/cgonested/cgosub`
01:59 < Eko> the last one has no output either.
02:00 < Eko> It uses printf within cgo.
02:00 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
02:02 < Ginto8> uh idk
02:03 < Ginto8> but why use printf within cgo?
02:03 < Eko> well, it's in my test suite for my builder
02:04 < Eko> it just prints PASS
02:04 < Eko> but I can't grep for it because it somehow doesn't make it
through the pipeline.
02:04 < Ginto8> ok what's the source code?
02:05 -!- KillerX [~anant@nat/mozilla/x-nwsmmnhbqniimrtf] has joined #go-nuts
02:05 -!- KillerX [~anant@nat/mozilla/x-nwsmmnhbqniimrtf] has quit [Changing host]
02:05 -!- KillerX [~anant@gentoo/developer/KillerX] has joined #go-nuts
02:06 -!- KillerX [~anant@gentoo/developer/KillerX] has quit [Client Quit]
02:09 < Eko> Ginto8: http://gist.github.com/474907
02:10 -!- lmoura [~lmoura@187.78.130.104] has quit [Ping timeout: 265 seconds]
02:10 < Ginto8> ok just why?
02:10 < Ginto8> the whole point of cgo is so that you can access C libs
directly
02:10 < Ginto8> for example, printf
02:11 < Ginto8> creating another .c/h for the wrapping just makes it a
little...  pointless.
02:11 < Eko> Ginto8: the whole point is to test to make sure my builder can
build a cgo package in a subdirectory if the programmer has a .c/.h file that they
want to access in go
02:11 < Ginto8> hm
02:11 < Eko> and link it into an executable
02:11 < Eko> This is not production code, it's for a test suite.
02:12 < Ginto8> ok
02:12 < Eko> do I have direct access to C.printf() within Go though?
02:12 < Eko> I thought vararg functions didn't work
02:12 < Ginto8> maybe
02:12 < Ginto8> or fmt.Printf
02:12 < Eko> well, clearly
02:13 < cw> C printf will be cumbersome if you dont really need it
02:14 < Eko> is there a more obvious way that anyone can think of to test a
braindead simple cgo program than using printf?
02:14 < Ginto8> SDL window
02:14 < Eko> I guess I could check that it's exit code is what I expect...
02:14 < Ginto8> or math
02:14 < Eko> Ginto8: uh, automated test.
02:14 < Eko> aha.
02:14 < Ginto8> test math and string manip
02:15 < Ginto8> (string as in char*)
02:15 < Eko> I like it.
02:15 < Eko> thanks.
02:15 < Ginto8> you're welcome
02:15 < Ginto8> and you can return the C strings to go and use C.GoString()
to convert them
02:15 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts
02:17 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has quit [Remote
host closed the connection]
02:28 -!- jdp [~gu@24.238.32.162.res-cmts.segr.ptd.net] has quit [Read error:
Connection reset by peer]
02:45 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche]
03:00 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
03:11 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
03:25 -!- incluye [~inklewyay@NW-ESR1-74-215-114-218.fuse.net] has quit [Remote
host closed the connection]
03:27 -!- adu [~ajr@softbank220043138128.bbtec.net] has joined #go-nuts
03:31 -!- incluye [~inclooye@NW-ESR1-74-215-114-218.fuse.net] has joined #go-nuts
03:35 -!- incluye [~inclooye@NW-ESR1-74-215-114-218.fuse.net] has quit [Remote
host closed the connection]
03:35 -!- incluye [~inclooye@NW-ESR1-74-215-114-218.fuse.net] has joined #go-nuts
03:43 -!- jhawk28 [~jhawk28@c-069-063-212-182.sd2.redwire.net] has joined #go-nuts
03:44 -!- eikenberry [~jae@ivanova.zhar.net] has quit [Quit: End of line.]
04:06 -!- g0bl1n [~pr0kter@a213-22-76-1.cpe.netcabo.pt] has joined #go-nuts
04:07 -!- exch [~exch@h144170.upc-h.chello.nl] has quit [Read error: Connection
reset by peer]
04:08 -!- exch [~exch@h144170.upc-h.chello.nl] has joined #go-nuts
04:09 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has joined
#go-nuts
04:11 -!- Robbo_ [~Robbocogs@CPE-121-216-124-94.lnse2.ken.bigpond.net.au] has
joined #go-nuts
04:12 -!- Robbo [~Robbocogs@CPE-124-187-134-193.lns15.ken.bigpond.net.au] has quit
[Ping timeout: 248 seconds]
04:18 -!- jhawk28 [~jhawk28@c-069-063-212-182.sd2.redwire.net] has quit [Remote
host closed the connection]
04:19 -!- Robbo [~Robbocogs@CPE-121-217-236-26.lnse3.cht.bigpond.net.au] has
joined #go-nuts
04:21 -!- Robbo_ [~Robbocogs@CPE-121-216-124-94.lnse2.ken.bigpond.net.au] has quit
[Ping timeout: 252 seconds]
04:24 -!- Robbo_ [~Robbocogs@CPE-121-217-236-26.lnse3.cht.bigpond.net.au] has
joined #go-nuts
04:26 -!- Robbo [~Robbocogs@CPE-121-217-236-26.lnse3.cht.bigpond.net.au] has quit
[Ping timeout: 246 seconds]
04:29 -!- path[l] [UPP@120.138.102.50] has quit [Quit: path[l]]
04:29 -!- Robbo [~Robbocogs@CPE-121-217-236-26.lnse3.cht.bigpond.net.au] has
joined #go-nuts
04:29 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts
04:31 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2]
04:31 -!- Robbo_ [~Robbocogs@CPE-121-217-236-26.lnse3.cht.bigpond.net.au] has quit
[Ping timeout: 265 seconds]
04:32 -!- gid [~gid@220.253-225-62.VIC.netspace.net.au] has quit [Quit: Leaving.]
04:40 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts
04:40 -!- Robbo_ [~Robbocogs@CPE-60-229-233-57.lns10.ken.bigpond.net.au] has
joined #go-nuts
04:41 -!- carllerche [~carllerch@208.87.61.203] has quit [Client Quit]
04:41 -!- Robbo [~Robbocogs@CPE-121-217-236-26.lnse3.cht.bigpond.net.au] has quit
[Ping timeout: 258 seconds]
04:47 -!- zerofluid [~zerofluid@ip24-56-54-185.ph.ph.cox.net] has joined #go-nuts
04:48 -!- Robbo [~Robbocogs@CPE-60-229-233-57.lns10.ken.bigpond.net.au] has joined
#go-nuts
04:49 -!- zerofluid [~zerofluid@ip24-56-54-185.ph.ph.cox.net] has quit [Client
Quit]
04:50 -!- zerofluid [~zerofluid@ip24-56-54-185.ph.ph.cox.net] has joined #go-nuts
04:51 -!- zerofluid [~zerofluid@ip24-56-54-185.ph.ph.cox.net] has quit [Client
Quit]
04:52 -!- Robbo_ [~Robbocogs@CPE-60-229-233-57.lns10.ken.bigpond.net.au] has quit
[Ping timeout: 260 seconds]
04:52 -!- mduft [~mduft@gentoo/developer/mduft] has quit [Ping timeout: 260
seconds]
04:55 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts
04:55 -!- zerofluid [~zerofluid@ip24-56-54-185.ph.ph.cox.net] has joined #go-nuts
04:56 < zerofluid> can you size a two-dimensional array dynamically?  like
myArray[5][somevalue] ???
04:56 < zerofluid> I'm getting one of these: invalid array bound someValue
04:57 < zerofluid> which is a drag...
04:57 -!- carllerche [~carllerch@208.87.61.203] has quit [Client Quit]
04:59 -!- scm [justme@d039060.adsl.hansenet.de] has quit [Ping timeout: 265
seconds]
05:00 -!- scm [justme@d070120.adsl.hansenet.de] has joined #go-nuts
05:02 < exch> fixed arrays need a constant size initializer
05:02 -!- mduft [~mduft@gentoo/developer/mduft] has joined #go-nuts
05:03 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has quit [Ping
timeout: 245 seconds]
05:03 < zerofluid> I was afraid of that
05:04 < zerofluid> thanks
05:04 < Ginto8> but you can use a 2d slice
05:04 < Ginto8> well
05:04 < Ginto8> a slice of slices
05:04 < Ginto8> you just have to make sure all the slices have a uniform
size
05:05 -!- Robbo_ [~Robbocogs@CPE-60-229-233-57.lns10.ken.bigpond.net.au] has
joined #go-nuts
05:05 < zerofluid> still processing that...thx
05:06 < Ginto8> [][]T
05:06 < Ginto8> it's akin to C's T**
05:06 < zerofluid> so in my case it would be [][][]Point
05:06 < Ginto8> uhm
05:07 < Ginto8> what ARE you actualy trying to do?
05:07 < zerofluid> since it is a two-dimensional array of slices
05:07 < zerofluid> which works well when I don't have to dynamically create
the slice
05:07 < zerofluid> pardon
05:07 < zerofluid> create the 2d array
05:07 -!- Robbo [~Robbocogs@CPE-60-229-233-57.lns10.ken.bigpond.net.au] has quit
[Ping timeout: 252 seconds]
05:08 < Ginto8> your goal is a change maker correct?
05:08 < Ginto8> http://paste.pocoo.org/show/237313/
05:08 < zerofluid> yes and no - right now my goal is a two dimensional array
of vectors
05:08 < Ginto8> if your endgoal is a change maker, WHY ARE YOU USING
VECTORS?
05:09 < zerofluid> let me clean up a sec
05:10 < zerofluid> because we have to find all combinations, not the most
efficient
05:10 -!- Robbo [~Robbocogs@CPE-60-229-233-57.lns10.ken.bigpond.net.au] has joined
#go-nuts
05:10 -!- jesusaur [jesusaur@firefly.cat.pdx.edu] has quit [Ping timeout: 260
seconds]
05:11 < Ginto8> oh
05:11 < Ginto8> well then
05:11 < Ginto8> one sec
05:12 < zerofluid> pasted
05:12 < Ginto8> hm?
05:12 < Ginto8> link if you pasted
05:12 < zerofluid> pasted back to you
05:12 < Ginto8> you can't "paste back"
05:12 < zerofluid> in a replay to http://paste.pocoo.org/show/237313/
05:12 -!- Robbo_ [~Robbocogs@CPE-60-229-233-57.lns10.ken.bigpond.net.au] has quit
[Ping timeout: 276 seconds]
05:12 < Ginto8> paste then link
05:12 -!- jesusaur [jesusaur@firefly.cat.pdx.edu] has joined #go-nuts
05:13 < Ginto8> send the url
05:13 < zerofluid> http://paste.pocoo.org/show/237315/
05:13 < zerofluid> ahhhhh - the number changed...
05:14 -!- Robbo_ [~Robbocogs@CPE-60-229-233-57.lns10.ken.bigpond.net.au] has
joined #go-nuts
05:14 < zerofluid> not even to the logic yet - just want a 2d vector array
of Points
05:14 -!- cmarcelo [~cmarcelo@187.59.242.138] has joined #go-nuts
05:14 -!- cmarcelo [~cmarcelo@187.59.242.138] has quit [Changing host]
05:14 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has joined
#go-nuts
05:14 -!- Kylarr [Kyle@122-148-63-115.static.dsl.dodo.com.au] has joined #go-nuts
05:15 < Ginto8> but...  why?
05:15 < Ginto8> why do you use Points to find change?
05:15 < Ginto8> and why do you need every combination?
05:16 -!- Robbo [~Robbocogs@CPE-60-229-233-57.lns10.ken.bigpond.net.au] has quit
[Ping timeout: 260 seconds]
05:16 < zerofluid> I need every combination because it is a class - although
since I'm using go I have a little latitude to ask questions
05:16 < Ginto8> hm
05:16 < Ginto8> ok
05:17 < Ginto8> but why Points?
05:17 < zerofluid> points are for vectors from the previous point
05:17 < Ginto8> uhm
05:17 < Ginto8> so you're...  graphing it?
05:17 < zerofluid> so I can do a DFS search
05:17 < zerofluid> right
05:17 < Ginto8> well
05:17 < zerofluid> 2D matrix of adjacency lists
05:17 < Ginto8> if you need every single combination
05:17 < Ginto8> that adds up to a specific amount
05:17 < zerofluid> or vector list actually
05:17 < Ginto8> why do any algo?
05:18 < Ginto8> just brute force it
05:18 < zerofluid> haha
05:18 < Ginto8> srs
05:18 < zerofluid> yes, the recursive solution is done
05:18 < zerofluid> and it was easy
05:18 < Ginto8> oh now they require you to do an algo?
05:18 < zerofluid> we HAVE to do a dynomic programming solution in this
fashion
05:18 < zerofluid> it's an algo class
05:18 < Ginto8> oic
05:18 < Ginto8> damn
05:18 -!- mikespook1 [~mikespook@219.137.235.61] has joined #go-nuts
05:19 < Ginto8> that's a stupid way to teach an algo
05:19 < zerofluid> yeah - I worked it out on paper
05:19 < zerofluid> actually - he didn't give all the information
05:19 < zerofluid> but we needed something faster than recursive
05:19 < Ginto8> especially since you're better off solving this particular
problem with a brute force approach
05:19 < Ginto8> uhm...
05:19 < Ginto8> well don't recurse
05:19 < Ginto8> just loop
05:19 < Ginto8> it's pretty easy
05:20 < Ginto8> well it's easy, I just don't want to set it up =/
05:20 < zerofluid> the recursion is a bunch of loops - regardless - I'm
going to try to make a 2d slice of slices of points
05:20 -!- mikespook [~mikespook@58.62.5.54] has quit [Ping timeout: 245 seconds]
05:20 < Ginto8> oh
05:21 < Ginto8> hmm
05:21 < zerofluid> and perform a DFS from hell
05:21 < zerofluid> works on paper
05:21 < Ginto8> oh
05:21 < zerofluid> and kind of seemed simple enought to try to use go on the
way
05:21 < Ginto8> depth first is the naive solution
05:21 < Ginto8> got it
05:21 < Ginto8> well you can actually have multiple goroutines doin it
05:22 < Ginto8> go search(branch1)
05:22 < Ginto8> go search(branch2)
05:22 < Ginto8> and then the first to find it sends on a channel
05:22 < Ginto8> though that wouldn't necessarily find the FIRST match
05:22 < zerofluid> this is funny - I used OpenMP and OpenMPI for a knapsack
problem a few semesters back
05:22 < Ginto8> hm
05:23 -!- Robbo [~Robbocogs@CPE-121-216-12-120.lnse1.ken.bigpond.net.au] has
joined #go-nuts
05:23 < Ginto8> looks interesting
05:23 < zerofluid> thanks - let me get back to it - there has to be a
dynamic way
05:23 < Ginto8> okey dokey
05:23 < zerofluid> it has been fun
05:23 < Ginto8> good luck
05:23 < zerofluid> :-)
05:23 -!- Robbo_ [~Robbocogs@CPE-60-229-233-57.lns10.ken.bigpond.net.au] has quit
[Ping timeout: 245 seconds]
05:23 -!- zerofluid [~zerofluid@ip24-56-54-185.ph.ph.cox.net] has quit [Quit:
Leaving]
05:32 < exch> Anyone ever worked with directFB ( http://directfb.org/ )?
05:32 < exch> i'm wondering what it's advantages are as opposed to a plain
old X environment
05:33 < exch> apart from the fact that it's mostly aimed at embedded devices
05:36 < exch> It does seem like an admirable replacement for X on older
hardware where resources are limited
05:43 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
05:48 -!- TR2N [email@89.180.153.197] has left #go-nuts []
05:49 -!- Robbo_ [~Robbocogs@CPE-139-168-124-86.lns16.cht.bigpond.net.au] has
joined #go-nuts
05:50 -!- Robbo [~Robbocogs@CPE-121-216-12-120.lnse1.ken.bigpond.net.au] has quit
[Ping timeout: 245 seconds]
05:56 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
06:05 -!- mikespook1 [~mikespook@219.137.235.61] has quit [Quit: Leaving.]
06:08 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has joined #go-nuts
06:08 -!- mode/#go-nuts [+v iant] by ChanServ
06:09 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has quit [Remote
host closed the connection]
06:11 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
06:13 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has quit [Quit: Leaving.]
06:13 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has joined #go-nuts
06:13 -!- mode/#go-nuts [+v iant] by ChanServ
06:20 -!- g0bl1n [~pr0kter@a213-22-76-1.cpe.netcabo.pt] has quit [Quit: Leaving]
06:21 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has quit [Quit: Leaving.]
06:21 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Ping
timeout: 258 seconds]
06:23 -!- slashus2 [~slashus2@m455636d0.tmodns.net] has joined #go-nuts
06:27 -!- slashus2 [~slashus2@m455636d0.tmodns.net] has quit [Ping timeout: 240
seconds]
06:30 -!- aho [~nya@fuld-4d00d1b8.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
06:32 -!- Robbo [~Robbocogs@CPE-139-168-124-86.lns16.cht.bigpond.net.au] has
joined #go-nuts
06:33 -!- napsy [~napsy@193.2.66.101] has joined #go-nuts
06:34 -!- Robbo_ [~Robbocogs@CPE-139-168-124-86.lns16.cht.bigpond.net.au] has quit
[Ping timeout: 240 seconds]
06:49 -!- adu [~ajr@softbank220043138128.bbtec.net] has quit [Quit: adu]
06:49 -!- slashus2 [~slashus2@m415636d0.tmodns.net] has joined #go-nuts
06:56 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
06:58 -!- ender2070 [~ender2070@bas22-toronto12-2925103372.dsl.bell.ca] has quit
[Remote host closed the connection]
06:59 -!- Adys [~Adys@unaffiliated/adys] has quit [Quit: I ♥ Unicode]
07:01 -!- wrtp [~rog@92.17.5.218] has joined #go-nuts
07:01 -!- ender2070 [~ender2070@bas22-toronto12-2925103372.dsl.bell.ca] has joined
#go-nuts
07:04 -!- wrtp [~rog@92.17.5.218] has quit [Client Quit]
07:26 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
07:27 -!- slashus2 [~slashus2@m415636d0.tmodns.net] has quit [Quit: slashus2]
07:33 -!- path[l] [UPP@120.138.102.50] has quit [Quit: path[l]]
07:36 -!- alkavan_ [~alkavan@77.126.117.120] has joined #go-nuts
07:37 -!- pjm0616 [~user@61.250.113.98] has quit [Ping timeout: 265 seconds]
07:39 -!- alkavan_ [~alkavan@77.126.117.120] has quit [Client Quit]
07:40 -!- alkavan_ [~alkavan@77.126.117.120] has joined #go-nuts
07:40 -!- alkavan_ [~alkavan@77.126.117.120] has left #go-nuts []
07:56 -!- Robbo [~Robbocogs@CPE-139-168-124-86.lns16.cht.bigpond.net.au] has quit
[Disconnected by services]
07:56 -!- Robbo_ [~Robbocogs@CPE-139-168-124-86.lns16.cht.bigpond.net.au] has
joined #go-nuts
07:57 -!- sauerbraten [~sauerbrat@p508CF990.dip.t-dialin.net] has joined #go-nuts
07:58 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
07:58 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
07:59 -!- ikaros [~ikaros@drms-4d014b02.pool.mediaWays.net] has joined #go-nuts
08:00 -!- ExtraSpice [~ExtraSpic@88.118.32.225] has joined #go-nuts
08:00 -!- ikaros [~ikaros@drms-4d014b02.pool.mediaWays.net] has quit [Client Quit]
08:04 -!- tux21b [~christoph@90.146.60.30] has quit [Ping timeout: 240 seconds]
08:15 -!- iant [~iant@62-20-124-50.customer.telia.com] has joined #go-nuts
08:15 -!- mode/#go-nuts [+v iant] by ChanServ
08:22 -!- path[l] [~path@59.162.86.164] has joined #go-nuts
08:33 -!- mbarkhau [~koloss@dslb-088-068-251-010.pools.arcor-ip.net] has joined
#go-nuts
08:34 -!- Xurix [~Luixsia@AToulouse-254-1-5-202.w83-203.abo.wanadoo.fr] has quit
[Ping timeout: 240 seconds]
08:41 -!- lmoura [~lmoura@187.78.130.104] has joined #go-nuts
08:45 -!- dju [dju@fsf/member/dju] has quit [Read error: Connection reset by peer]
08:46 -!- dju [dju@fsf/member/dju] has joined #go-nuts
08:49 -!- holmescn [~20526B545@221.192.238.10] has joined #go-nuts
08:50 -!- dju [dju@fsf/member/dju] has quit [Read error: Connection reset by peer]
08:51 -!- dju [dju@fsf/member/dju] has joined #go-nuts
08:59 -!- belkiss [~belkiss@drn13-1-78-235-168-105.fbx.proxad.net] has joined
#go-nuts
09:05 -!- ikaros [~ikaros@drms-4d014b02.pool.mediaWays.net] has joined #go-nuts
09:07 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
09:14 -!- dju [dju@fsf/member/dju] has quit [Quit: Quitte]
09:15 -!- photron [~photron@port-92-201-207-183.dynamic.qsc.de] has joined
#go-nuts
09:19 -!- General13372 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined
#go-nuts
09:19 -!- TheSaint [~thesaint@166.205.10.133] has joined #go-nuts
09:22 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit
[Ping timeout: 248 seconds]
09:31 -!- tux21b [~christoph@90.146.60.30] has joined #go-nuts
09:33 -!- lmoura [~lmoura@187.78.130.104] has quit [Ping timeout: 265 seconds]
09:46 -!- ikaros [~ikaros@drms-4d014b02.pool.mediaWays.net] has quit [Quit: Leave
the magic to Houdini]
09:52 -!- belkiss [~belkiss@drn13-1-78-235-168-105.fbx.proxad.net] has quit [Quit:
KVIrc Equilibrium 4.1.0, revision: 4632, sources date: 20100519, built on:
2010-07-09 07:13:47 UTC http://www.kvirc.net/]
09:53 -!- wrtp [~rog@92.17.53.171] has joined #go-nuts
09:56 -!- ukai [~ukai@220.109.219.244] has quit [Ping timeout: 264 seconds]
10:02 < nsf> he-he, there is exactly one place in Go where you can't deduce
type of a variable (in autocompletion IDE feature)..  multiple types case in a
type switch statement :) like 'case *ast.FuncDecl, *ast.GenDecl:'
10:03 -!- Project_2501 [~Marvin@82.84.92.36] has joined #go-nuts
10:07 <+iant> when a type switch has multiple cases, no new variable is
introduced
10:08 < exch> The IDE could be made to be smart enough to know if a specific
reference to the type variable occurs within a given case statement.  In which
case it can infer the type from the case label itself
10:11 < nsf> exch: yes, but I'm talking about the case when case label has
multiple variants
10:11 < nsf> compiler generates the same code for both types (if possible)
10:11 < exch> ah right
10:11 < exch> hmm
10:11 < nsf> but you can't autocomplete that :)
10:11 < exch> interesting
10:11 < nsf> well actually here the solution: I should merge both types
10:12 < nsf> if they have similar fields/methods
10:12 < nsf> and I should propose them
10:12 <+iant> what variable are you trying to deduce the type for, though?
10:12 < nsf> because this is the only thing that makes sense anyway
10:12 < nsf> iant: 'switch t := iface.(type) {' the "t" one
10:13 < exch> sounds reasonable
10:13 <+iant> You are talking about the way that a new 't' variable is
introduced for each type switch case, right?
10:13 <+iant> and it has the type of the case itself?
10:13 < nsf> yes
10:13 -!- wrtp [~rog@92.17.53.171] has quit [Ping timeout: 265 seconds]
10:14 <+iant> that doesn't happen when multiple types are listed in the case
10:14 < exch> 'case Foo, Bar:' Does the compiler even work if you call a
specific field on the t variable in this situation?
10:14 <+iant> it only happens when there is a single type
10:14 < nsf> iant: take a look:
http://github.com/nsf/gocode/blob/master/gocodestruct.go#L385 (line 385)
10:14 <+iant> when there are multiple types, there is no new variable 't';
the variable 't' is still the same one as in the surrounding scope
10:14 < nsf> hm..
10:14 < nsf> that's interesting
10:14 <+iant> It's the only way it could work
10:14 < nsf> so it has a type of an original interface right?
10:14 <+iant> right
10:15 <+iant> it's the same variable
10:15 < nsf> that makes sense too :)
10:15 < nsf> thanks for clarifying
10:15 < exch> So calling 't.X' where X is a field of either Foo or Bar would
result in a compile error?
10:15 < nsf> yes
10:15 <+iant> yes
10:15 < exch> ok.  makes sense
10:16 < nsf> I thought that compiler would just generate two type cases at a
source level for two types
10:16 < nsf> it it's possible
10:16 <+iant> I suppose that would be possible
10:16 <+iant> it doesn't do that, though
10:16 < nsf> ok :)
10:16 < nsf> well that makes my job easier
10:17 < nsf> :D
10:17 < exch> the current implementation is simpler I suppose.  You don't
even have to bother with autocompletion if the code is wrong
10:19 < nsf> the best part of the autocompletion function is that it's not
required that it will work in all cases, if it works - great, if it doesn't - bad,
but still ok :D you can't do the same with compilers
10:19 < nsf> so..  writing an autocompletion is easier
10:19 -!- wrtp [~rog@92.16.123.146] has joined #go-nuts
10:24 -!- rv2733 [~rv2733@c-98-242-168-49.hsd1.fl.comcast.net] has joined #go-nuts
10:33 -!- Ginto8 [~ginto8@pool-72-82-235-34.cmdnnj.fios.verizon.net] has quit
[Ping timeout: 265 seconds]
10:35 -!- lmoura [~lauromour@200.184.118.130] has joined #go-nuts
10:35 -!- lmoura [~lauromour@200.184.118.130] has quit [Read error: Connection
reset by peer]
10:36 -!- anykey [~anykey@unaffiliated/anykey] has joined #go-nuts
10:37 -!- Sacho [~sacho@213.91.244.15] has joined #go-nuts
10:40 -!- lmoura [~lauromour@200.184.118.130] has joined #go-nuts
10:42 -!- wrtp [~rog@92.16.123.146] has quit [Ping timeout: 276 seconds]
10:46 -!- wrtp [~rog@92.17.75.234] has joined #go-nuts
10:55 -!- path[l] [~path@59.162.86.164] has quit [Remote host closed the
connection]
10:56 -!- wrtp [~rog@92.17.75.234] has quit [Ping timeout: 265 seconds]
10:57 -!- path[l] [~path@59.162.86.164] has joined #go-nuts
10:57 < anykey> how does one declare a function that has an array of any
size as parameter?  Is that even possible?
10:57 < nsf> array - no, slice - yes
10:57 < nsf> because the size of an array is a part of its type
10:58 < anykey> how does a slice parameter look in the signature?
10:58 < nsf> []int
10:58 < anykey> yeah, that's what I have.  okay, I get it.
10:59 < anykey> I cannot pass the array as a slice.  might I say x[:]?
10:59 < nsf> you should say &x afaik
10:59 < anykey> oh.  oh, yes, that'd make sense.
10:59 < anykey> Slices are only references, I gathered
11:01 < nsf> if you want a copy, just make it: copyofx := make([]<type of
x>, len(x)); copy(copyofx, x)
11:02 < anykey> http://pastebin.com/s9thS2bi I meant to do this as a reduced
example
11:03 -!- wrtp [~rog@92.17.94.219] has joined #go-nuts
11:03 < anykey> I am just trying to find my way about the first steps :-)
11:04 < anykey> oh, that should be only a call to prettyprint, not
fmt.Printf() in line 9
11:04 -!- [Pete_27] [~noname@115-64-1-61.static.tpgi.com.au] has quit [Ping
timeout: 246 seconds]
11:04 < anykey> which was the error.  my bad.  forget it.
11:05 -!- dju [dju@fsf/member/dju] has joined #go-nuts
11:05 < nsf> you can also make slice explicitly..  x := []int{1,2,3,4,5,6}
11:05 < nsf> and you don't have to convert therefore
11:05 < nsf> arrays are used mostly in structs
11:05 < anykey> so by leaving out "..." this is a slice, the array under it
gets created as a side effect?
11:06 < nsf> yes
11:06 * anykey writes that down.
11:10 -!- ukai [~ukai@220.109.219.244] has joined #go-nuts
11:11 < anykey> and as a side note, I think I haven't understood interfaces
yet to their full extent.  If I declare an interface, say it's called "Evaluable",
and requires a method value() int, one thinks that one could now declare a method
func (e Evaluable) cmp(e2 Evaluable) int with a three way return (-, 0, +).  I now
understand from the documentation that it is completely intended that this DOESN'T
work.  I just don't see why, exactly.
11:12 <+iant> an interface type is defined in terms of a group of methods
11:12 <+iant> a value of an interface type has the methods associated with
the interface type
11:12 <+iant> it does not make sense to define additional methods for an
interface type
11:13 < sauerbraten> is there something like os.ForkExec() that executes
something and gives back the output of it?
11:14 < anykey> iant: okay.  but that means, that the method in question --
like cmp, which really only needs value() to work on everything -- must be defined
for every type, which is more work.  I just wanted to clarify that this is
intendedß
11:14 < sauerbraten> or wait, exec.Run returns a Cmd struct, may i just set
the stdout to a file i can read from later?
11:15 <+iant> anykey: I'm not sure I understand the question
11:15 < nsf> anykey: 'func cmp(e, e2 Evaluable) int'
11:15 < nsf> and you're done
11:15 < nsf> why method, really?
11:15 < anykey> that has not occured to me, tbh
11:15 < nsf> or better call it cmpEvaluable, no function overloading here
11:16 < anykey> yeah, in that case.
11:17 < anykey> I think I have thought too much in the way of Java's
apple.equals(orange).  I can't help that sometimes.
11:19 < nsf> yep, in this crazy worlds you need to learn two things: how to
learn and how to forget what you've learned :D
11:19 < nsf> world*
11:20 < anykey> Oh, I cannot afford to completely forget it.  I just try to
learn some additional ways of thinking.
11:20 < nsf> well, that's why Go was created right?  because keep adding new
things doesn't help much
11:20 < anykey> sauerbraten: in other languages, I'd popen() the program in
question, reading from a buffered pipe.  Not sure how to do it in go though
11:21 < sauerbraten> yeah in python i just did os.popen("ls -a") to get the
content of the running dir...  :/
11:21 < anykey> nsf: yes, but I feel like a newb all over again, and I have
been programming for 20 years now.
11:22 < anykey> nsf: it's kinda frustrating to lose all power every once in
a while :-)
11:22 < anykey> but it's also fun and rewarding when finally getting it
11:23 < nsf> anykey: well it depends, power is an illusion, you're loosing
an illusion..  yes it may be frustrating, but it's a good thing actually
11:23 < nsf> :)
11:23 < nsf> ok, enough theory, I'll beter get back to my work :D
11:23 < nsf> better*
11:24 < sauerbraten> nsf: you'll better get another coffee against all that
typos :D
11:25 < nsf> sauerbraten: english isn't my native lang, that's why I'm so
bad at writing it
11:25 -!- skelterjohn [~jasmuth@c-76-116-181-134.hsd1.nj.comcast.net] has joined
#go-nuts
11:25 < sauerbraten> isn't mine too, so i just check every sentence before
sending it :D (not really, just kidding)
11:25 < sauerbraten> or is it isn't mine, either?
11:26 < nsf> yes :)
11:26 < nsf> well, explaining things in a chat is a bad idea anyway
11:26 < nsf> so, I'll better write more code :D
11:27 -!- adu [~ajr@softbank220043138128.bbtec.net] has joined #go-nuts
11:27 < sauerbraten> :)
11:27 < anykey> sauerbraten: your nick is a popular dish in my native lang
11:27 < anykey> heh
11:27 -!- cmarcelo [~cmarcelo@187.59.242.138] has joined #go-nuts
11:27 -!- cmarcelo [~cmarcelo@187.59.242.138] has quit [Changing host]
11:27 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has joined
#go-nuts
11:27 < nsf> I know a game called sauerbraten :)
11:28 < nsf> and I have no idea what does it mean
11:28 < nsf> :D
11:28 -!- adu [~ajr@softbank220043138128.bbtec.net] has quit [Client Quit]
11:28 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 246 seconds]
11:28 < exch> sauerbraten is delicious
11:28 < anykey> it's "sour roast", a kind of a meat dish prepared by
pickling meat in vinegar and some other spices.
11:29 < anykey> the meat gets very soft when prepared that way.
11:29 * anykey returns to work
11:29 < nsf> i see :)
11:29 < sauerbraten> exch: yes it is, but the game is even better :)
www.sauerbraten.org
11:30 < sauerbraten> anykey, german?
11:30 < anykey> yes.
11:31 < sauerbraten> na dann...  hi :D
11:31 < anykey> hi auch :-)
11:32 < anykey> sauerbraten:
http://groups.google.com/group/golang-nuts/browse_thread/thread/7cee60e7b38cd818
this post explains about os.Pipe, but it's of course probably not applicable to
windows
11:33 -!- artefon [~thiago@189.107.175.62] has joined #go-nuts
11:33 < sauerbraten> ankey: who cares about windows?  :D seriously, go
should definetly get better win support, since microsoft is the leading os seller
11:34 < anykey> sauerbraten: yeah, but in my field of study and profession,
microsoft is only relevant if at all in the client market.
11:34 < anykey> sauerbraten: the server thingy is not MS-Field around here
11:35 < sauerbraten> anykey, yeah of course but that's what a programming
language is build for, to write programs for the client market
11:35 < nsf> windows is my gaming platform, lol
11:36 < anykey> sauerbraten: I have touched windows only a couple of times
at all during the last decade.  Mostly customers sending me documents in formats I
couldn't otherwise open; and of course the German Tax Administration program
"Elster Formular" to do my income tax declaration.
11:37 < exch> The Dutch tax administration has it's software available in
python.  So it runs fine on linux as well :)
11:37 < anykey> sauerbraten: I think Go is mostly targeted to do server
apps.  At least it seems to do very well there with its
channels/multithreading/-plexing goroutines.
11:37 < sauerbraten> anykey: haha, i only had win to play games on it, but
now that i mainly play sauerbraten and cs 1.6 in wine, i uninstalled it a year ago
11:37 < nsf> it's written by google engineers, client software, really?  :)
11:38 < anykey> exch: I will resettle within the next ten years, but not
within the EU.
11:38 < exch> I have found a good use for go as a userland app tool.  the
standalone webserver makes for an excellent web application framework.  Using
html5/js/css for the UI you don't even need any third party libs like gtk
11:38 < sauerbraten> nsf: mhmm that makes me think :D
11:38 < anykey> exch: but that is off-topic in here
11:42 -!- incluye [~inclooye@NW-ESR1-74-215-114-218.fuse.net] has quit [Remote
host closed the connection]
11:42 < anykey> exch: you could even make it a "real" application if you
embedded WebKit.  I have worked with QtWebKit a bit, and some of our user
interfaces really are html5/css/js, and a bundle of RPCs.
11:42 < exch> works like a charm for most stuff
11:47 < chressie> sauerbraten: in exec.Run set 'stdout' to 'exec.Pipe' and
then you can read from Cmd.Stdout like from any other os.File (see io package,
e.g.  io.ReadFull)
11:52 < anykey> chressie: thanks!  that will go into my recipes book :-)
11:54 < chressie> you're welcome :)
11:58 -!- skelterjohn [~jasmuth@c-76-116-181-134.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
12:12 < sauerbraten> chressie: thanks a very lot :)
12:13 -!- sauerbraten [~sauerbrat@p508CF990.dip.t-dialin.net] has quit [Remote
host closed the connection]
12:31 -!- skelterjohn [~jasmuth@c-76-116-181-134.hsd1.nj.comcast.net] has joined
#go-nuts
12:34 < boscop> is go's grammar LL(1)?
12:42 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
12:42 -!- fenicks1 [~christian@log77-3-82-243-254-112.fbx.proxad.net] has quit
[Quit: Leaving.]
12:45 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has joined
#go-nuts
12:49 -!- iant [~iant@62-20-124-50.customer.telia.com] has quit [Quit: Leaving.]
12:49 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 240 seconds]
13:00 -!- skelterjohn [~jasmuth@c-76-116-181-134.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
13:13 -!- wrtp [~rog@92.17.94.219] has quit [Ping timeout: 260 seconds]
13:16 -!- ikaros [~ikaros@drms-4d014151.pool.mediaWays.net] has joined #go-nuts
13:19 -!- wrtp [~rog@92.16.126.4] has joined #go-nuts
13:21 -!- Zigs [~evil-live@0x5da170da.cpe.ge-1-1-0-1101.hinqu1.customer.tele.dk]
has joined #go-nuts
13:29 -!- marsu [~marsu@ANancy-154-1-53-33.w83-196.abo.wanadoo.fr] has joined
#go-nuts
13:30 -!- skelterjohn [~jasmuth@c-76-116-181-134.hsd1.nj.comcast.net] has joined
#go-nuts
13:30 -!- Zigs [~evil-live@0x5da170da.cpe.ge-1-1-0-1101.hinqu1.customer.tele.dk]
has quit []
13:34 -!- ender2070 [~ender2070@bas22-toronto12-2925103372.dsl.bell.ca] has quit
[Ping timeout: 265 seconds]
13:35 -!- gid1 [~gid@220.253-225-62.VIC.netspace.net.au] has joined #go-nuts
13:41 -!- incluye [~inclooye@NW-ESR1-74-215-114-218.fuse.net] has joined #go-nuts
13:42 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
13:43 -!- ikaros_ [~ikaros@drms-4d014151.pool.mediaWays.net] has joined #go-nuts
13:43 -!- ikaros [~ikaros@drms-4d014151.pool.mediaWays.net] has quit [Quit: Leave
the magic to Houdini]
13:52 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:8dd8:7fd2:e3e1:b567] has joined
#go-nuts
13:56 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts
13:58 -!- ikaros_ [~ikaros@drms-4d014151.pool.mediaWays.net] has quit [Ping
timeout: 265 seconds]
13:58 -!- ikaros_ [~ikaros@drms-4d014d11.pool.mediaWays.net] has joined #go-nuts
13:59 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Quit: Lost
terminal]
14:01 -!- ikaros_ [~ikaros@drms-4d014d11.pool.mediaWays.net] has quit [Client
Quit]
14:01 -!- niemeyer [~niemeyer@201-11-213-235.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
14:09 -!- b00m_chef [~watr@75.156.21.228] has joined #go-nuts
14:10 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 260 seconds]
14:11 -!- ikaros [~ikaros@drms-4d014e77.pool.mediaWays.net] has joined #go-nuts
14:13 -!- ikaros [~ikaros@drms-4d014e77.pool.mediaWays.net] has quit [Client Quit]
14:15 -!- b00m_chef [~watr@75.156.21.228] has quit [Ping timeout: 276 seconds]
14:18 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has quit [Read
error: Connection reset by peer]
14:19 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has joined
#go-nuts
14:22 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
14:24 -!- marsu [~marsu@ANancy-154-1-53-33.w83-196.abo.wanadoo.fr] has quit [Ping
timeout: 265 seconds]
14:26 < nsf> http://nsf.110mb.com/gocode_teaser.swf
14:26 < nsf> another teaser :D
14:26 < nsf> I tried to make it short this time
14:29 -!- Robbo_ [~Robbocogs@CPE-139-168-124-86.lns16.cht.bigpond.net.au] has quit
[Read error: Connection reset by peer]
14:29 -!- slashus2 [~slashus2@m315636d0.tmodns.net] has joined #go-nuts
14:30 -!- akanton [5ae72cd0@gateway/web/freenode/ip.90.231.44.208] has joined
#go-nuts
14:32 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has quit [Remote
host closed the connection]
14:36 -!- napsy [~napsy@193.2.66.101] has quit [Read error: Operation timed out]
14:37 < jessta> nsf: nice
14:38 < nsf> although it still broken in a lot of places
14:38 -!- tvw [~tv@212.79.9.150] has quit [Read error: Connection reset by peer]
14:38 < nsf> for example while making this demo
14:38 < nsf> I tried this:
14:38 < nsf> h := <and autocomplete here>
14:39 < nsf> for some reason it fails :D
14:39 < temoto> nsf, completion is just awesome.
14:39 < nsf> it's awesome on the demo, it works partially, but in the most
places it is really broken :D
14:39 < temoto> I like speed.
14:40 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 240 seconds]
14:40 -!- ikaros [~ikaros@drms-4d014e77.pool.mediaWays.net] has joined #go-nuts
14:40 < nsf> it's usually fast, 0.050 secs for the first time and 0.010 for
next ones
14:41 < niemeyer> nsf: Nice stuff indeed
14:43 < plexdev> http://is.gd/drJbE by [Adam Langley] in
go/src/pkg/crypto/tls/ -- crypto/tls: add client OCSP stapling support.
14:43 < nsf> niemeyer: I'm trying hard to make it good, it's getting better
every day :D I hope soon it will be in a good enough shape to announce it on the
ML
14:45 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection]
14:45 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
14:46 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection]
14:50 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
14:50 -!- skelterjohn [~jasmuth@c-76-116-181-134.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
14:54 -!- artefon [~thiago@189.107.175.62] has quit [Quit: bye]
14:58 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
15:01 -!- slashus2 [~slashus2@m315636d0.tmodns.net] has quit [Quit: slashus2]
15:06 -!- zero7 [~crazy@89.211.97.124] has joined #go-nuts
15:06 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
15:10 -!- awidegreen [~quassel@62.176.237.78] has joined #go-nuts
15:13 < temoto> nsf, i'd announce it yesterday so you can attract
contributors.
15:13 -!- visof [~visof@unaffiliated/visof] has quit [Quit: Leaving]
15:15 < jessta> temoto: announcing before it appears to work properly is ill
adviced
15:16 < jessta> too early and people get a bad idea about the project
15:21 < temoto> Maybe i'm a bad PM :)
15:28 -!- zero7 [~crazy@89.211.97.124] has left #go-nuts []
15:30 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
15:45 < MaybeSo> for some reason I'm hearing tweety bird when I read that
15:48 < exch> rofl.  ik waaide bijna van het dak af
15:48 < exch> zand, blikjes, steentje som mn oren
15:49 < exch> wrong chan :p
15:49 -!- kanru [~kanru@118-160-163-155.dynamic.hinet.net] has joined #go-nuts
15:49 < skelterjohn> phew
15:49 < skelterjohn> got worried
15:50 < MaybeSo> "omg, I'm having a stroke!"
15:50 -!- mbarkhau [~koloss@dslb-088-068-251-010.pools.arcor-ip.net] has quit
[Quit: Leaving.]
15:50 -!- artefon [~thiagon@150.164.2.20] has joined #go-nuts
15:50 < skelterjohn> hhe
15:57 -!- Venom_X [~pjacobs@71.21.124.111] has joined #go-nuts
16:08 -!- bytecolor [~user@adsl-71-137-195-53.dsl.scrm01.pacbell.net] has joined
#go-nuts
16:09 -!- bytecolor [~user@adsl-71-137-195-53.dsl.scrm01.pacbell.net] has left
#go-nuts ["ERC Version 5.3 (IRC client for Emacs)"]
16:09 -!- mlip [~mlip@85-127-233-119.dynamic.xdsl-line.inode.at] has joined
#go-nuts
16:14 -!- Sacho [~sacho@213.91.244.15] has quit [Ping timeout: 265 seconds]
16:16 < mlip> hej: as far as I see it is not possible to call C code (shared
objects) from within the runtime, is it?  would it be possible if I somehow
managed to compile the C code with 6c ?
16:16 < taruti> yes
16:17 < taruti> the runtime has C code compiled by 6c
16:20 < mlip> ok, that makes sense.  and the code has to be self-contained,
or can I use something from libc,...  ?
16:25 -!- getisboy [~Family@pool-173-76-228-217.bstnma.fios.verizon.net] has
joined #go-nuts
16:28 -!- getisboy [~Family@pool-173-76-228-217.bstnma.fios.verizon.net] has left
#go-nuts []
16:28 -!- getisboy [~Family@pool-173-76-228-217.bstnma.fios.verizon.net] has
joined #go-nuts
16:31 < boscop> does anyone have a ANTLR grammar for go?
16:38 -!- GeoBSD [~geobsd@lns-bzn-54-82-251-110-43.adsl.proxad.net] has joined
#go-nuts
16:45 -!- getisboy [~Family@pool-173-76-228-217.bstnma.fios.verizon.net] has quit
[Quit: Leaving.]
16:45 < plexdev> http://is.gd/drQSm by [Evan Shaw] in go/src/pkg/exp/eval/
-- exp/eval: Converted from bignum to big
16:45 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
hcatlin]
16:47 -!- sauerbraten [~sauerbrat@p508CF990.dip.t-dialin.net] has joined #go-nuts
16:47 -!- path[l]_ [~path@59.162.86.164] has joined #go-nuts
16:51 -!- path[l] [~path@59.162.86.164] has quit [Ping timeout: 265 seconds]
16:51 -!- path[l] [~path@59.162.86.164] has joined #go-nuts
16:51 -!- path[l]_ [~path@59.162.86.164] has quit [Read error: Connection reset by
peer]
16:56 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has joined
#go-nuts
16:57 -!- gid [~gid@220.253-225-62.VIC.netspace.net.au] has quit [Quit: Leaving.]
16:59 -!- Meidor [~quassel@piggy.cs.ru.nl] has quit [Ping timeout: 276 seconds]
17:02 < plexdev> http://is.gd/drRZy by [Robert Griesemer] in go/test/chan/
-- select statement: initial set of test cases for corner cases
17:05 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has quit [Quit:
WeeChat 0.3.3-dev]
17:05 -!- path[l] [~path@59.162.86.164] has quit [Quit: path[l]]
17:05 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has joined
#go-nuts
17:07 -!- path[l] [~path@122.182.0.38] has joined #go-nuts
17:09 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 276 seconds]
17:11 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has quit [Quit:
WeeChat 0.3.3-dev]
17:11 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has joined
#go-nuts
17:14 -!- Ginto8 [~ginto8@pool-72-82-235-34.cmdnnj.fios.verizon.net] has joined
#go-nuts
17:14 -!- ShadowIce [pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
17:15 -!- kanru [~kanru@118-160-163-155.dynamic.hinet.net] has quit [Quit: WeeChat
0.3.2]
17:19 < plexdev> http://is.gd/drT4s by [Robert Griesemer] in
go/src/pkg/exp/eval/ -- fix build: reverting exp/eval Makefile to old form
17:20 -!- gid [~gid@220.253-225-62.VIC.netspace.net.au] has joined #go-nuts
17:26 -!- boscop_ [~boscop@f055071041.adsl.alicedsl.de] has joined #go-nuts
17:26 -!- boscop [~boscop@f055056041.adsl.alicedsl.de] has quit [Ping timeout: 265
seconds]
17:33 -!- g0bl1n [~pr0kter@a213-22-76-1.cpe.netcabo.pt] has joined #go-nuts
17:38 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has quit [Quit:
WeeChat 0.3.3-dev]
17:40 -!- wrtp [~rog@92.16.126.4] has quit [Quit: wrtp]
17:42 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
17:44 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
17:46 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has joined
#go-nuts
17:48 < sauerbraten> chressie: coming back to wrote me some hours ago,
instead of io.ReadFull, could i also use ioutil.ReadFile and pass Cmd.Stdout as
file to it?
17:50 < chressie> sauerbraten: i'm afraid, the ioutil package works directly
on files in the filesystem
17:51 < sauerbraten> that means no?  mhmm
17:53 < sauerbraten> chressie: io.ReadFull() reads from a reader r, so i
have to make a new reader for the file right?
17:54 -!- ikaros [~ikaros@drms-4d014e77.pool.mediaWays.net] has quit [Quit: Leave
the magic to Houdini]
17:54 < chressie> the os.File satisfies the Reader interface, so you can
just use Cmd.Stdout as the os.Reader object
17:54 < sauerbraten> ok cool
17:55 < chressie> that's the nice thing about interfaces in go :)
17:56 -!- path[l] [~path@122.182.0.38] has quit [Quit: path[l]]
17:57 < sauerbraten> just to be sure...  instead: "msg := make([]byte, 512)
17:57 < sauerbraten> connection.Read(msg[0:])
17:57 < sauerbraten> i cuold also write "connection.Read(make([]byte, 512))"
right?
17:58 < KirkMcDonald> sauerbraten: There is one obvious problem with this.
17:58 < bartbes> but then you couldn't have the read data
17:58 < sauerbraten> right i just saw it
17:58 < sauerbraten> "connection.Read(msg make([]byte, 512))" right?
17:58 < sauerbraten> what about that?
17:59 < KirkMcDonald> Eh?
17:59 < KirkMcDonald> That's not even valid syntax.
17:59 < sauerbraten> :/ so how could i write it?
17:59 < KirkMcDonald> In two statements.
18:00 < sauerbraten> like before?
18:00 < KirkMcDonald> Like you had before.
18:00 < sauerbraten> no shorter way?
18:00 < KirkMcDonald> Nope.
18:00 -!- mertimor [~mertimor@p508CC19A.dip.t-dialin.net] has joined #go-nuts
18:01 < sauerbraten> too bad...  in python, msg=*some sort of conn
obj*recv(512) would be fine, i liked that better
18:07 < sauerbraten> http://golang.org/pkg/strings/#SplitAfter is a bit
confusing...  if n >= 0, ...  thus if n == 0...  so if n is 0 both cases are
true???
18:07 < temoto> sauerbraten, well you could do the same here.  recv := func
(conn io.Reader, sz int) { buf := make([]byte, sz); conn.Read(buf, sz); return buf
}
18:08 < sauerbraten> temoto: hey that's cool thanks
18:08 < sauerbraten> i think i'm gonna use that
18:13 < skelterjohn> why is it important to do it on one line?
18:14 < bartbes> because it's less readable
18:14 < bartbes> that's why you should write your entire program on one
line!
18:17 -!- incluye [~inclooye@NW-ESR1-74-215-114-218.fuse.net] has quit [Remote
host closed the connection]
18:18 < sauerbraten> skelterjohn: because for me it's one thing to get
somethin from a conn, and if you use it often it's less to type...
18:19 < skelterjohn> i once wrote a python program that did a lot of stuff
one one line - i used [f(x) for x in l] kind of stuff, sometimes twice or three
times nested
18:19 < skelterjohn> i thought i was so clever
18:19 < skelterjohn> and then i went back and couldn't figure out what the
hell was going on
18:19 < Namegduf> "get something from a conn" is one line.
18:19 < Namegduf> Your first line is "get somewhere to put it"
18:19 < skelterjohn> if it's something that you do a lot, you should write a
function to do it
18:20 < skelterjohn> that's the basic motivation behind having functions
18:20 -!- incluye [~inclooye@NW-ESR1-74-215-114-218.fuse.net] has joined #go-nuts
18:21 < bartbes> and you can probably reuse the buffer anyway
18:21 < Namegduf> Yeah
18:21 < bartbes> I like Namegduf's explanation
18:21 < Namegduf> Tis typical to declare a buffer once, then read in a loop
18:28 -!- mertimor [~mertimor@p508CC19A.dip.t-dialin.net] has quit [Read error:
Connection reset by peer]
18:29 -!- alehorst [~alehorst@187.58.237.20] has joined #go-nuts
18:29 -!- mertimor [~mertimor@p508CC19A.dip.t-dialin.net] has joined #go-nuts
18:32 -!- mertimor [~mertimor@p508CC19A.dip.t-dialin.net] has quit [Remote host
closed the connection]
18:34 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts
18:36 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
18:39 -!- TheSaint [~thesaint@166.205.10.133] has quit [Remote host closed the
connection]
18:40 < sauerbraten> skelterjohn: yeah i forgot to say that i used the code
by temoto to define a function...  i'm not gonna use the same line 10 times :D
18:40 < skelterjohn> ok hehe
18:42 < sauerbraten> and I modified it so it returns string, and wrote one
send() func that takes string as parameter, too..
18:43 < temoto> sauerbraten, Consider that reusing buffer for multiple reads
would really increase performance.
18:43 < temoto> and your karma
18:43 < sauerbraten> so it is easier to compare them like: "msg :=
recv(connection_in, 512); if msg == "exec" {...}"
18:44 < sauerbraten> otherwise i had to write " if msg == []byte("info")
every single time...
18:44 < temoto> For one read that's perfectly fine.
18:45 < temoto> For multiple reads you could abstract a bit more logic.
(even less typing, isn't it fun?)
18:45 < sauerbraten> temoto: yeah it's in a client.go that communicates with
the server.go so the network latency will cost the most time :D
18:45 < sauerbraten> *cost = take
18:46 < temoto> Like, write conn_iter function which would allocate buffer
once and spit strings into channel over which you can iterate with for/range.
18:47 -!- akanton [5ae72cd0@gateway/web/freenode/ip.90.231.44.208] has quit [Quit:
Page closed]
18:47 < temoto> sauerbraten, most *user* time.  There's CPU time too.
18:52 < sauerbraten> temoto: would that fit into such code?
http://is.gd/ds0qr i know it's crappy code ;)
18:53 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
18:54 -!- trustin [~trustin@redhat/jboss/trustin] has quit [Remote host closed the
connection]
18:55 -!- sladegen [~nemo@unaffiliated/sladegen] has quit [Disconnected by
services]
18:55 -!- sladegen [~nemo@unaffiliated/sladegen] has joined #go-nuts
18:55 -!- wrtp [~rog@92.16.126.4] has joined #go-nuts
18:57 < temoto> sauerbraten, sure.
18:58 < temoto> sauerbraten, but i'd recommend using BEEP or STOMP.  And
exec/exec_output commands suggest that you could just run ssh.
19:03 < sauerbraten> temoto: i'm not good at programming, so what exaclty
are BEEP or STOMP?  and to that exec/exec_output, they are there, i want to use
server-client to be able to control my home server with it :D
19:04 < sauerbraten> and it's just for fun, i know how to use ssh ;)
19:05 < temoto> sauerbraten, BEEP and STOMP are message-layer protocols.
19:06 < temoto> sauerbraten, AMQP, HTTP and SCTP are another examples of
similar stuff.  All of these are very different.  But all handle "message
delivery" task, which TCP doesn't.
19:10 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
19:16 -!- boscop_ [~boscop@f055071041.adsl.alicedsl.de] has quit [Ping timeout:
265 seconds]
19:19 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
19:19 < napsy> Hello.  I have this simple program that uses encoding/binary
to write a structure.  But When reading from it I get "binary.Read: invalid type
main.info" Any ideas?
19:20 < napsy> The strange thing is that I'm able to write the structure but
can't read it back from the file
19:21 < taruti> are you passing the Read a correctly typed pointer?
19:22 -!- artefon [~thiagon@150.164.2.20] has quit [Quit: Leaving]
19:22 < napsy> I think so
19:22 < napsy> It's not a pointer
19:24 < taruti> it should be passed a pointer to the correctly typed value
as the last argument
19:24 < taruti> "Read reads structured binary data from r into data.  Data
must be a pointer to a fixed-size value or a slice of fixed-size values.  A
fixed-size value is either a fixed-size integer (int8, uint8, int16, uint16, ...)
or an array or struct containing only fixed-size values.  Bytes read from r are
decoded using the specified byte order and written to successive fields of the
data."
19:24 < napsy> data is a fixed-sized value
19:25 < taruti> is it a pointer?
19:25 < napsy> no
19:25 < napsy> it's info
19:25 < napsy> so if I pass data is &i it should work?
19:25 < taruti> well that is why it fails
19:26 < skelterjohn> you need to give it a *main.info
19:26 < skelterjohn> or &i
19:26 < skelterjohn> otherwise how is it going to get the data back to you?
19:26 < taruti> if you are trying to read main.info you need to pass it
*main.info (i.e.  &i)
19:26 < napsy> huh I get another panic with &i
19:26 < napsy> panic: cannot set value obtained via unexported struct field
19:26 < skelterjohn> all fields of the info need to be exported, then
19:26 < skelterjohn> i guess
19:26 < skelterjohn> capitalize them
19:27 < napsy> ok
19:27 -!- opafan48 [~opafan48@213.144.157.75] has joined #go-nuts
19:27 < napsy> oh cool it works
19:28 < skelterjohn> hooray!
19:29 < napsy> I didn't know struct members have to be exported
19:29 < napsy> or that it matters
19:29 < napsy> why do they have to be exported
19:29 < napsy> the struct is in the same package
19:30 < skelterjohn> no it isn't - the struct is in package main, and the
function doing the stuff is in package binary
19:31 < skelterjohn> binary can't see things in main that aren't exported,
same way main can't see things in binary that aren't exported
19:31 < napsy> oh ok
19:31 < napsy> makes sense
19:33 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
19:33 < napsy> I just noticed that member names are also exported
19:33 < napsy> What for is that good?
19:34 < KirkMcDonald> binary can't even seen things in main which are
exported, yes?  Because importing main would be a circular dependency.
19:35 < napsy> Oh what I ment was when writing to the file the member names
are written down
19:35 < napsy> E.g.  I now have A B C D ...  in the file instead of raw data
19:35 < napsy> A B C D being the members of the struct
19:41 < skelterjohn> doesn't seem like a problem to me :)
19:41 < skelterjohn> though i can't give a definitive answer to why it's
like that
19:41 < napsy> maybe not but I don't need that information
19:41 < skelterjohn> so encode each of the fields individually
19:42 < napsy> I thought there was a simpler way
19:42 < napsy> binary looked promising
19:42 < skelterjohn> i think you are discounting it too easily
19:43 < napsy> another way I could think is casting the struct to []byte but
I guess that's not possible because of the type system
19:45 < skelterjohn> you can use unsafe
19:46 < Namegduf> That is NOT safe or a good idea
19:47 < MaybeSo> heh
19:47 < Namegduf> And /will/ break your files being portable between
different systems
19:47 < Namegduf> Or compiler options
19:47 < Namegduf> Or anything, really.
19:48 < skelterjohn> depends on what you are trying to communicate with
using the encodings
19:48 < skelterjohn> but you're right about one thing - it's certainly not
safe
19:52 -!- incluye [~inclooye@NW-ESR1-74-215-114-218.fuse.net] has quit [Remote
host closed the connection]
19:54 < napsy> well
19:55 < napsy> I need to support a protocol
19:55 < Namegduf> Structs in memory have space between elements
19:56 < napsy> I know
19:56 < Namegduf> Serialising them straight to binary will not support a
protocol which lacks this.
19:56 < KirkMcDonald> Always?  Or are you just talking about alignment?
19:56 < Namegduf> Alignment.
19:57 < napsy> It's a network protocol
19:57 < skelterjohn> if you're designing a protocol to communicate over the
network, don't just write the raw data using unsafe
19:57 -!- mlip [~mlip@85-127-233-119.dynamic.xdsl-line.inode.at] has left #go-nuts
[]
19:58 < skelterjohn> that would be silly, as Namegduf pointed out
19:58 < KirkMcDonald> Unless there were some way to specify the alignment of
Go structs.
19:58 < napsy> No the specs are alredy written and I have a working
implementation in C but want to reimplement in Go
19:58 < skelterjohn> my advice would be to just use encoding/binary, but you
don't seem to like the extra couple bytes that tacks on
19:58 < skelterjohn> oh, i see
19:59 < skelterjohn> then you'll need to encode it piece by piece probably
19:59 < Namegduf> Is this protocol supposed to work between machines on
multiple architectures?
19:59 < Namegduf> Because C has the same problem
19:59 < KirkMcDonald> As it is, you can use the reflection interface to
effectively serialize an arbitrary struct using whatever alignment you want.
19:59 < napsy> yes but c compilers usually support structure packing
20:00 < Namegduf> That's not going to help performance.
20:00 < napsy> i know
20:00 < Namegduf> Just do it element by element, the safe way.
20:01 < skelterjohn> or write your own version of binary.Write that doesn't
put in identifier names
20:01 < napsy> ok.  Are there any plans to support this kind of stuff?  Lika
packing and setting alignments?
20:01 < skelterjohn> tbh it sounds like the kind of thing that should be
hidden from the programmer
20:02 < KirkMcDonald> In Go, certainly.
20:02 < skelterjohn> in go
20:02 < napsy> well yes but still these things can come handy
20:02 < Namegduf> Only reasons I've heard are "to avoid printing a structure
element by element" and "to take a shit on the type system"
20:02 < KirkMcDonald> In Go, I don't even care if the fields of my structs
are laid out in a different order than the order I specify in my code.
20:02 < Namegduf> Adding complexity to the language for either of those
purposes seem dubious
20:03 -!- ShadowIce [pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
20:03 < Namegduf> *seems
20:03 < KirkMcDonald> I don't believe that Go does this.
20:03 < KirkMcDonald> But it could, and I would not (as a rule) care.
20:03 < skelterjohn> right - what KirkMcDonald said suggests that Go labels
the field in case a later compiler decides to optimize by changing order
20:04 < KirkMcDonald> (Though I *would* want the reflection interface to
give me the fields in the order they are specified.)
20:05 < Namegduf> Actually, there were the whole embedded applications
things.
20:05 < Namegduf> So maybe a packed struct type would make sense (you can
always use it to emulate other structs via bytes inserted, I guess)
20:05 < Namegduf> But eh.
20:18 -!- ender2070 [~ender2070@bas22-toronto12-2925103372.dsl.bell.ca] has joined
#go-nuts
20:22 < plexdev> http://is.gd/ds6qc by [Robert Griesemer] in go/test/chan/
-- channel tests: added a couple of tests with closed channels
20:23 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has quit [Quit:
WeeChat 0.3.3-dev]
20:24 -!- bmizerany [~bmizerany@adsl-68-127-144-60.dsl.pltn13.pacbell.net] has
joined #go-nuts
20:24 < sauerbraten> temoto: i couldn't find much about BEEP and STOMP, and
i also didn't understand the whole thing...  should i use something else than TCP
because i'm only sending strings?
20:32 -!- gid [~gid@220.253-225-62.VIC.netspace.net.au] has quit [Ping timeout:
240 seconds]
20:33 -!- wrtp [~rog@92.16.126.4] has quit [Quit: wrtp]
20:37 < skelterjohn> using an existing protocol can make your life easier,
if there is a package available to encode and decode it
20:37 < skelterjohn> json might be useful
20:38 < skelterjohn> if you just have strings, it seems like they are
already supported
20:39 < plexdev> http://is.gd/ds7nP by [Rob Pike] in go/doc/ -- tutorial:
show how to compile helloworld3, which depends on ./file
20:41 -!- ender2070 [~ender2070@bas22-toronto12-2925103372.dsl.bell.ca] has quit
[Remote host closed the connection]
20:44 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has quit [Quit:
skelterjohn]
20:50 < sauerbraten> skelterjohn: right now i use TCP to send strings as
messages, should i change it?
21:06 -!- bmizerany [~bmizerany@adsl-68-127-144-60.dsl.pltn13.pacbell.net] has
quit [Ping timeout: 246 seconds]
21:12 -!- bmizerany [~bmizerany@adsl-68-127-144-60.dsl.pltn13.pacbell.net] has
joined #go-nuts
21:14 -!- sauerbraten [~sauerbrat@p508CF990.dip.t-dialin.net] has quit [Ping
timeout: 265 seconds]
21:15 < bortzmeyer> sauerbraten:Raw TCP is fine, it all depends on your set
of requirments
21:19 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined
#go-nuts
21:19 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection]
21:21 -!- gregorstocks [~gregors@nat/google/x-vnpgzbacxmmtfdab] has joined
#go-nuts
21:22 -!- General13372 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit
[Ping timeout: 260 seconds]
21:32 -!- g0bl1n [~pr0kter@a213-22-76-1.cpe.netcabo.pt] has quit [Ping timeout:
265 seconds]
21:34 -!- Venom_X [~pjacobs@71.21.124.111] has quit [Quit: Venom_X]
21:34 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:8dd8:7fd2:e3e1:b567] has quit
[Quit: Leaving.]
21:45 -!- rsaarelm [~rsaarelm@cs181128175.pp.htv.fi] has quit [Ping timeout: 265
seconds]
21:47 -!- rsaarelm [~rsaarelm@cs181128175.pp.htv.fi] has joined #go-nuts
21:47 -!- Sacho [~sacho@87-126-51-231.btc-net.bg] has joined #go-nuts
21:57 -!- anykey [~anykey@unaffiliated/anykey] has quit [Quit: leaving]
22:01 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has joined
#go-nuts
22:04 -!- Agon-laptop
[~marcel@HSI-KBW-095-208-003-128.hsi5.kabel-badenwuerttemberg.de] has joined
#go-nuts
22:06 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has quit [Ping
timeout: 276 seconds]
22:11 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts
22:18 -!- aho [~nya@fuld-4d00d22e.pool.mediaWays.net] has joined #go-nuts
22:21 -!- mxweas [~max@c-98-225-102-170.hsd1.az.comcast.net] has joined #go-nuts
22:23 -!- opafan48 [~opafan48@213.144.157.75] has quit [Quit: opafan48]
22:34 < Ginto8> for a slice, would it be more appropriate to check != nil or
len() > 0?
22:39 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 264 seconds]
22:40 < KirkMcDonald> Ginto8: These have distinct meanings.
22:40 < Ginto8> yeah I know
22:40 < Ginto8> but I'm trying to check if I can safely access the slice
22:41 < Ginto8> so it would be best to check len() > 0 correct?
22:42 < KirkMcDonald> I wonder what len() does if the slice is nil...
22:42 < KirkMcDonald> I guess I'd expect it to return zero.
22:47 < Ginto8> well nil is the zero value
22:47 < Ginto8> and a slice is (basically) a struct { *T;len,cap int }
22:47 < Ginto8> so the zero value would make len 0
22:47 < KirkMcDonald> Yeah.
22:48 -!- awidegreen [~quassel@62.176.237.78] has quit [Remote host closed the
connection]
22:49 -!- Project_2501 [~Marvin@82.84.92.36] has quit [Quit: E se abbasso questa
leva che succ...]
22:53 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has quit
[Quit: carllerche]
22:53 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has joined
#go-nuts
22:54 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit
[Ping timeout: 240 seconds]
22:56 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has quit
[Client Quit]
22:56 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined
#go-nuts
22:59 -!- rv2733 [~rv2733@c-98-242-168-49.hsd1.fl.comcast.net] has quit [Quit:
Leaving]
23:01 -!- sakirious [~saki@c-98-223-212-96.hsd1.il.comcast.net] has joined
#go-nuts
23:03 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
23:08 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
23:08 -!- bmizeran_ [~bmizerany@adsl-68-127-144-60.dsl.pltn13.pacbell.net] has
joined #go-nuts
23:09 -!- bmizerany [~bmizerany@adsl-68-127-144-60.dsl.pltn13.pacbell.net] has
quit [Ping timeout: 240 seconds]
23:10 -!- gr0gmint [~gr0gmint@93.182.133.44] has joined #go-nuts
23:15 -!- gr0gmint [~gr0gmint@93.182.133.44] has quit [Client Quit]
23:16 -!- emmanuel_oga [~emmanuelo@190.247.41.202] has quit [Quit: WeeChat
0.3.3-dev]
23:17 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
23:27 -!- tux21b [~christoph@90.146.60.30] has quit [Quit: exit(EXIT_SUCCESS); //
see ⓎⓄⓊ]
23:29 -!- skelterjohn [~jasmuth@c-76-116-181-134.hsd1.nj.comcast.net] has joined
#go-nuts
23:34 -!- bmizerany [~bmizerany@adsl-68-127-144-60.dsl.pltn13.pacbell.net] has
joined #go-nuts
23:35 -!- bmizerany [~bmizerany@adsl-68-127-144-60.dsl.pltn13.pacbell.net] has
quit [Read error: Connection reset by peer]
23:35 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
23:35 -!- bmizerany [~bmizerany@80.sub-69-99-175.myvzw.com] has joined #go-nuts
23:36 -!- bmizeran_ [~bmizerany@adsl-68-127-144-60.dsl.pltn13.pacbell.net] has
quit [Ping timeout: 276 seconds]
23:43 -!- skelterjohn [~jasmuth@c-76-116-181-134.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
23:56 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Ping timeout: 276
seconds]
23:57 -!- alehorst [~alehorst@187.58.237.20] has quit [Quit: Leaving.]
--- Log closed Thu Jul 15 00:00:12 2010