--- Log opened Tue Jul 13 00:00:12 2010
00:01 -!- artefon [~thiago@189.107.212.6] has joined #go-nuts
00:06 -!- belkiss [~belkiss@drn13-1-78-235-168-105.fbx.proxad.net] has joined
#go-nuts
00:09 -!- adu [~ajr@softbank220043139062.bbtec.net] has joined #go-nuts
00:10 < plexdev> http://is.gd/dpFYS by [Rob Pike] in go/src/pkg/fmt/ --
tweak comment for %#X
00:13 -!- photron [~photron@port-92-201-115-153.dynamic.qsc.de] has quit [Ping
timeout: 276 seconds]
00:15 -!- geocalc [~geobsd@lns-bzn-26-82-254-89-236.adsl.proxad.net] has quit
[Quit: Lost terminal]
00:17 -!- prip_ [~foo@host163-125-dynamic.36-79-r.retail.telecomitalia.it] has
quit [Ping timeout: 260 seconds]
00:17 -!- gnuvince [~vince@70.35.167.149] has quit [Ping timeout: 248 seconds]
00:18 -!- gnuvince_ [~vince@70.35.167.149] has quit [Ping timeout: 240 seconds]
00:27 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
00:27 < plexdev> http://is.gd/dpGLZ by [Andrew Gerrand] in
go/misc/dashboard/godashboard/ -- dashboard: use jQuery Autocomplete plugin from
Google AJAX Libs API
00:27 < plexdev> http://is.gd/dpGM5 by [Robert Griesemer] in 2 subdirs of
go/src/pkg/ -- container/vector: rename Data() -> Copy()
00:31 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit
[Ping timeout: 265 seconds]
00:35 -!- mikespook [~mikespook@58.62.5.54] has joined #go-nuts
00:36 -!- prip [~foo@host163-125-dynamic.36-79-r.retail.telecomitalia.it] has
joined #go-nuts
00:37 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined
#go-nuts
00:39 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
00:44 < plexdev> http://is.gd/dpHuK by [Andrew Gerrand] in
go/src/pkg/websocket/ -- websocket: fix comment indentation
00:44 < plexdev> http://is.gd/dpHuN by [Peter Mundy] in go/src/pkg/os/ --
os: Use TempFile with default TempDir for temp test files
00:44 < plexdev> http://is.gd/dpHv5 by [Russ Cox] in go/src/pkg/debug/proc/
-- fix build
01:01 < plexdev> http://is.gd/dpIpV by [Andrew Gerrand] in
go/src/pkg/runtime/tiny/ -- runtime/tiny: style and doc tweaks
01:15 -!- Ginto8 [~ginto8@pool-72-82-235-34.cmdnnj.fios.verizon.net] has joined
#go-nuts
01:24 -!- adu [~ajr@softbank220043139062.bbtec.net] has quit [Quit: adu]
01:33 -!- ExtraSpice [~ExtraSpic@88.118.32.225] has quit [Ping timeout: 240
seconds]
01:35 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2]
01:43 -!- gnuvince [~vince@70.35.166.98] has joined #go-nuts
01:47 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has joined
#go-nuts
01:56 -!- artefon [~thiago@189.107.212.6] has quit [Quit: bye]
02:08 -!- jdp [~gu@24.238.32.162.res-cmts.segr.ptd.net] has joined #go-nuts
02:55 -!- Soultaker [~maks@hell.student.utwente.nl] has joined #go-nuts
03:12 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has quit
[Quit: Lost terminal]
03:15 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
03:30 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
03:35 < nsf> Ginto8: I've answered your question on the ML, shortly: use
runtime.LockOSThread()
03:35 < Ginto8> what for?
03:35 < nsf> OpenGL context is tied to a thread
03:35 < nsf> you can't call it from different threads
03:35 < Ginto8> ok
03:35 < Ginto8> well I'm not
03:35 < nsf> Go multiplexes goroutines onto different threads and that may
cause this error
03:35 < Ginto8> I'm calling it from a single thread o.o
03:36 < nsf> if you're not using LockOSThread you can't say for sure
03:36 < Ginto8> do I still have to do that/
03:36 < Ginto8> well single goroutine
03:36 < nsf> single goroutine doesn't guarantee that it will be executed
always on the same thread
03:36 < Ginto8> hm
03:36 < Ginto8> ok so I have to, in one of the calls, use
runtime.LockOSThread()
03:37 < Ginto8> sounds good
03:37 < nsf> you have to call runtime.LockOSThread once in the goroutine
that calls opengl
03:37 < nsf> see my mandelbrot and gotris examples
03:37 < Ginto8> also does GL need a window before you can load textures?
03:37 < nsf> I just call runtime.LockOSThread in main() once and that's all
03:38 < nsf> I'm not sure about that
03:38 < Ginto8> well I want it out of sight out of mind honestly
03:38 < nsf> it needs working context, and context is being created with the
window often
03:38 < Ginto8> so I'm gonna have the window init function do it
03:41 < nsf> well it doesn't matter where you call runtime.LockOSThread
until it's all in the same goroutine
03:41 < nsf> just call it before making any opengl calls
03:46 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts
03:47 -!- emmanueloga [~emmanuelo@190.247.41.202] has joined #go-nuts
04:00 -!- Pete_27 [~noname@115-64-1-61.static.tpgi.com.au] has quit [Ping timeout:
240 seconds]
04:05 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Ping timeout: 276
seconds]
04:15 < Ginto8> is there any way to easily access the contents of a C array?
or am I gonna have to do a lot of conversions between unsafe.Pointer and uintptr?
04:16 < nsf> I guess you can convert it to a pointer to a go array and then
make a slice from it
04:16 < Ginto8> hmm
04:16 < nsf> never did that, though
04:16 < Ginto8> well that's probly a bad idea
04:20 -!- jhawk28 [~jhawk28@c-069-063-212-182.sd2.redwire.net] has joined #go-nuts
04:23 -!- jhawk28 [~jhawk28@c-069-063-212-182.sd2.redwire.net] has quit [Remote
host closed the connection]
04:30 -!- jer [~jtregunna@unaffiliated/jer] has quit [Ping timeout: 276 seconds]
04:33 -!- TR2N [email@89.180.161.235] has left #go-nuts []
04:36 -!- jer [~jtregunna@unaffiliated/jer] has joined #go-nuts
04:54 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Ping
timeout: 258 seconds]
04:56 -!- scm [justme@d018229.adsl.hansenet.de] has quit [Read error: Connection
reset by peer]
05:01 -!- scm [justme@d039060.adsl.hansenet.de] has joined #go-nuts
05:02 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche]
05:05 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Ping timeout: 260
seconds]
05:19 -!- homa_rano [~erice@HATESHELL.MIT.EDU] has quit [Quit: leaving]
05:30 -!- bmizeran_ [~bmizerany@dsl081-064-072.sfo1.dsl.speakeasy.net] has quit
[Remote host closed the connection]
05:30 -!- tvw [~tv@e176006156.adsl.alicedsl.de] has joined #go-nuts
05:47 -!- pl3 [~noam@77.126.167.205] has joined #go-nuts
05:53 -!- pl31 [~noam@77.126.127.131] has joined #go-nuts
05:53 -!- pl3 [~noam@77.126.167.205] has quit [Read error: Connection reset by
peer]
05:53 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has joined #go-nuts
05:53 -!- mode/#go-nuts [+v iant] by ChanServ
05:58 -!- htoothrot [~mux@71-8-117-228.dhcp.ftwo.tx.charter.com] has quit [Ping
timeout: 264 seconds]
06:00 -!- lmoura [~lmoura@187.78.130.104] has quit [Ping timeout: 265 seconds]
06:01 -!- htoothrot [~mux@71-8-117-228.dhcp.ftwo.tx.charter.com] has joined
#go-nuts
06:05 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined
#go-nuts
06:07 -!- homa_rano [~erice@hmsvelociraptor.csail.mit.edu] has joined #go-nuts
06:09 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has quit [Quit: Leaving.]
06:26 -!- pl31 [~noam@77.126.127.131] has quit [Ping timeout: 246 seconds]
06:30 -!- aho [~nya@fuld-4d00d1f5.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
06:35 -!- htoothrot [~mux@71-8-117-228.dhcp.ftwo.tx.charter.com] has quit [Ping
timeout: 260 seconds]
06:36 -!- napsy [~napsy@193.2.66.101] has joined #go-nuts
06:39 -!- htoothrot [~mux@71-8-117-228.dhcp.ftwo.tx.charter.com] has joined
#go-nuts
06:46 -!- tvw [~tv@e176006156.adsl.alicedsl.de] has quit [Remote host closed the
connection]
06:55 < cw> nsf: you use LockOsThread to avoid opengl having a fit over TLS
?
06:55 -!- tvw [~tv@e176006156.adsl.alicedsl.de] has joined #go-nuts
06:58 < jessta> cw: you do
07:00 -!- 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/]
07:03 -!- tvw [~tv@e176006156.adsl.alicedsl.de] has quit [Remote host closed the
connection]
07:04 < nsf> LockOSThread is the only way to make OpenGL work correctly when
Go's scheduler has more than one thread
07:07 -!- sladegen [~nemo@unaffiliated/sladegen] has quit [Ping timeout: 258
seconds]
07:09 -!- jchico [~jchico@cpe-98-14-12-209.nyc.res.rr.com] has quit [Quit:
Leaving]
07:12 -!- sladegen [~nemo@unaffiliated/sladegen] has joined #go-nuts
07:21 -!- iant [~iant@62-20-124-50.customer.telia.com] has joined #go-nuts
07:21 -!- mode/#go-nuts [+v iant] by ChanServ
07:25 -!- incluye [~inklewyay@NW-ESR1-74-215-114-218.fuse.net] has quit [Remote
host closed the connection]
07:32 -!- ExtraSpice [~ExtraSpic@88.118.32.225] has joined #go-nuts
07:43 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
07:45 -!- rv2733 [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has joined #go-nuts
07:54 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
08:03 -!- sauerbraten [~sauerbrat@p508CF542.dip.t-dialin.net] has joined #go-nuts
08:13 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
08:15 -!- ikaros [~ikaros@drms-4d014bb1.pool.mediaWays.net] has joined #go-nuts
08:23 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2]
08:25 -!- Tiger_ [~chatzilla@118.126.12.53] has joined #go-nuts
08:41 -!- photron [~photron@port-92-201-47-104.dynamic.qsc.de] has joined #go-nuts
09:07 -!- napsy [~napsy@193.2.66.101] has quit [Quit: leaving]
09:10 -!- Kylarr [Kyle@122-148-63-115.static.dsl.dodo.com.au] has joined #go-nuts
09:10 < Eko> Did the mechanics of CGO linking change?
09:11 < Eko> cgo things that used to link don't appear to do so anymore...
09:11 <+iant> I don't think it changed....
09:13 -!- wrtp [~rog@92.17.68.115] has joined #go-nuts
09:17 -!- jdp [~gu@24.238.32.162.res-cmts.segr.ptd.net] has quit [Ping timeout:
260 seconds]
09:18 -!- General13372 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined
#go-nuts
09:18 < Eko> I'm now getting cryptic messages like:
09:19 < Eko> testsuite/cgotpkg/cgomain: error while loading shared
libraries: cgo__home_eko_dev_hosted_gofr__lib_testsuite_cgotpkg_tpkg.so: cannot
open shared object file: No such file or directory
09:19 < Eko> and that used to build fine.
09:19 < Eko> (well, build and then *run* fine, that's the error I get when I
run it.)
09:21 -!- Project_2501 [~Marvin@82.84.92.36] has joined #go-nuts
09:22 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit
[Ping timeout: 252 seconds]
09:25 <+iant> oh yeah, that part did change
09:25 <+iant> I think the library is now expected to be in
$GOROOT/pkg/$GOOS_$GOARCH by default
09:26 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
09:30 < Eko> iant: so does it no longer respect GOPKGPATH?
09:30 < Eko> though actually, I think I might have found my issue by looking
at the cgo source
09:30 <+iant> I don't know
09:30 < Eko> or at least something that might fix it.
09:32 -!- mikespook [~mikespook@58.62.5.54] has quit [Quit: Leaving.]
09:35 -!- dju [dju@fsf/member/dju] has quit [Ping timeout: 252 seconds]
09:36 -!- ikaros [~ikaros@drms-4d014bb1.pool.mediaWays.net] has quit [Quit: Leave
the magic to Houdini]
09:38 < Eko> apparently not.
09:38 < Eko> I thought maybe my CGOPKGPATH wasn't absolute, but I made sure
it was and it's still being gross.
09:38 -!- anykey [~anykey@unaffiliated/anykey] has joined #go-nuts
09:42 -!- Kylarr [Kyle@122-148-63-115.static.dsl.dodo.com.au] has quit []
09:43 < Eko> sigh.  It looks like I either have to edfix the dynimport
myself, set the LD_LIBRARY_PATH, or submit a CL to give CGO the option of
absolutely referencing the file again.
09:46 <+iant> you can pass an option to 6l to put a runtime search path in
the binary
09:47 < Eko> aha.
09:52 < Eko> gah, this is taking more brain power than I have this late at
night.  Time to go to bed...
09:52 < Eko> iant: thanks for the tip, looks like I should be able to make
this work.
09:53 -!- Tiger_ [~chatzilla@118.126.12.53] has quit [Quit: quit]
09:58 -!- dju [dju@fsf/member/dju] has joined #go-nuts
09:59 -!- GeoBSD [~geobsd@lns-bzn-26-82-254-89-236.adsl.proxad.net] has joined
#go-nuts
10:02 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Quit: WeeChat
0.3.2]
10:06 -!- path[l] [~path@59.162.86.164] has joined #go-nuts
10:11 -!- dju [dju@fsf/member/dju] has quit [Ping timeout: 260 seconds]
10:25 -!- pjm0616 [~user@61.250.113.98] has quit [Ping timeout: 252 seconds]
10:31 -!- pjm0616 [~user@61.250.113.98] has joined #go-nuts
10:39 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts
10:46 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
11:01 -!- [Pete_27] [~noname@115-64-1-61.static.tpgi.com.au] has joined #go-nuts
11:06 -!- surma [~surma@brln-4dba8e42.pool.mediaWays.net] has joined #go-nuts
11:10 -!- nsf [~nsf@jiss.convex.ru] has quit [Ping timeout: 245 seconds]
11:18 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
11:22 -!- rlab [~Miranda@136-187-113-92.pool.ukrtel.net] has joined #go-nuts
11:33 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
11:55 -!- artefon [~thiago@dhcp29.usuarios.dcc.ufmg.br] has joined #go-nuts
11:55 -!- rlab [~Miranda@136-187-113-92.pool.ukrtel.net] has quit [Read error:
Connection reset by peer]
11:59 -!- dju [dju@fsf/member/dju] has joined #go-nuts
12:02 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
12:04 -!- dju [dju@fsf/member/dju] has quit [Ping timeout: 240 seconds]
12:11 -!- surma [~surma@brln-4dba8e42.pool.mediaWays.net] has left #go-nuts []
12:14 -!- artefon [~thiago@dhcp29.usuarios.dcc.ufmg.br] has quit [Ping timeout:
240 seconds]
12:15 -!- artefon [~thiago@dhcp29.usuarios.dcc.ufmg.br] has joined #go-nuts
12:18 -!- Xurix [~Luixsia@AToulouse-254-1-67-220.w81-49.abo.wanadoo.fr] has joined
#go-nuts
12:27 -!- rp2 [~rp2@dyn068178.nbw.tue.nl] has joined #go-nuts
12:30 -!- RobertLJ [~RobertLJ@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
12:30 -!- Luixsia [~Luixsia@AToulouse-254-1-103-196.w86-207.abo.wanadoo.fr] has
joined #go-nuts
12:32 -!- Xurix [~Luixsia@AToulouse-254-1-67-220.w81-49.abo.wanadoo.fr] has quit
[Ping timeout: 265 seconds]
12:33 -!- dju [dju@fsf/member/dju] has joined #go-nuts
12:37 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts
12:37 -!- dju_ [dju@fsf/member/dju] has joined #go-nuts
12:38 -!- dju [dju@fsf/member/dju] has quit [Read error: Connection reset by peer]
12:38 -!- mxweas [~max@c-98-225-102-170.hsd1.az.comcast.net] has joined #go-nuts
12:41 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
12:45 -!- agent_orange [~joel@lolnet.org] has quit [Remote host closed the
connection]
12:46 -!- Tiger_ [~chatzilla@118.126.12.53] has joined #go-nuts
12:48 -!- franksalim [~frank@adsl-75-61-93-123.dsl.pltn13.sbcglobal.net] has quit
[Quit: Ex-Chat]
12:55 -!- ender2070 [~ender2070@bas22-toronto12-2925103372.dsl.bell.ca] has quit
[Ping timeout: 265 seconds]
13:08 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
13:11 -!- Tiger_ [~chatzilla@118.126.12.53] has quit [Ping timeout: 246 seconds]
13:12 -!- MizardX [~MizardX@unaffiliated/mizardx] has joined #go-nuts
13:14 -!- plainhao [~plainhao@mail.xbiotica.com] has joined #go-nuts
13:22 -!- path[l] [~path@59.162.86.164] has quit [Quit: path[l]]
13:24 -!- path[l] [~path@59.162.86.164] has joined #go-nuts
13:26 -!- path[l] [~path@59.162.86.164] has quit [Read error: Connection reset by
peer]
13:26 -!- path[l] [~path@59.162.86.164] has joined #go-nuts
13:35 -!- lmoura [~lmoura@187.78.130.104] has joined #go-nuts
13:38 -!- adu [~ajr@softbank220043139062.bbtec.net] has joined #go-nuts
13:39 -!- skelterjohn [~jasmuth@c-76-116-181-134.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
13:54 -!- tux21b [~christoph@90.146.60.30] has joined #go-nuts
13:59 -!- rlab [~Miranda@136-187-113-92.pool.ukrtel.net] has joined #go-nuts
14:00 -!- ender2070 [~ender2070@bas22-toronto12-2925103372.dsl.bell.ca] has joined
#go-nuts
14:03 -!- mxweas [~max@c-98-225-102-170.hsd1.az.comcast.net] has quit [Quit: Mac
has gone to sleep]
14:06 -!- awidegreen [~quassel@62.176.237.78] has joined #go-nuts
14:07 -!- g0bl1n [~anonymous@a213-22-76-1.cpe.netcabo.pt] has joined #go-nuts
14:08 -!- path[l] [~path@59.162.86.164] has quit [Quit: path[l]]
14:12 -!- path[l] [~path@122.182.0.38] has joined #go-nuts
14:14 < rsaarelm> Looks like Vector.Iter is gone.  So what's the recommended
idiom for iterating through a vector?
14:14 < rsaarelm> Explicit index?
14:14 -!- jchico [~jchico@cpe-98-14-12-209.nyc.res.rr.com] has joined #go-nuts
14:14 < rsaarelm> As in "for i := 0; i < vec.Len(); i++ { ..  }"
14:17 < vrtical> rsaarelm: gone?
14:17 < rsaarelm> vrtical: Gone.
http://github.com/tav/go/commit/a2a4a94e66bcb30489947894908dd94bf4261894
14:19 < rsaarelm> And I'm not seeing the obvious wrongness, I'm using it as
the default idiom for iterating my vectors.
14:19 -!- RobertLJ [~RobertLJ@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Ping
timeout: 265 seconds]
14:21 < vrtical> thanks, that's interesting.  But yeah, people here have
told me that Iter was the easy way to range over a vector.
14:22 < temoto> rsaarelm, no 'i := 0' → obviously wrong way.  :)
14:23 < temoto> If seriously, i think that commit is pure wrong.
14:24 < temoto> And no link to "as per discussed with rsc".
14:24 < rsaarelm> Oh, wait.  Vectors are just a type alias for arrays, so I
can use the builtin array iteration.
14:24 < rsaarelm> Was confused before since it returned indices only if I
only had one lvalue.
14:24 < chressie> yes, see the last change in the commit in nntp.go
14:24 < rsaarelm> So "for _, obj := range vec { stuff }" works.
14:25 < jessta> vector.Iter() wasn't great, channels are kind of slow for
that purpose
14:25 < rsaarelm> Right.
14:27 < rsaarelm> Ok, that takes care of the manual loops.  I also have
cases where I'm treating vecs as iterable.Iterables.
14:28 < rsaarelm> So now I'll want a wrapper thing that makes something that
does provide the .Iter() there.
14:34 < rsaarelm> I guess I like the iterable interface a bit more than the
core Go team.
14:35 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
14:45 -!- deathstr5 [4e5609bb@gateway/web/freenode/ip.78.86.9.187] has joined
#go-nuts
14:48 -!- Tiger_ [~chatzilla@118.126.12.53] has joined #go-nuts
14:50 -!- deathstr5 [4e5609bb@gateway/web/freenode/ip.78.86.9.187] has quit [Quit:
Page closed]
14:50 -!- sladegen [~nemo@unaffiliated/sladegen] has quit [Ping timeout: 258
seconds]
14:51 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
15:02 -!- iant [~iant@62-20-124-50.customer.telia.com] has quit [Ping timeout: 258
seconds]
15:06 -!- mxweas [~max@c-98-225-102-170.hsd1.az.comcast.net] has joined #go-nuts
15:09 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has joined
#go-nuts
15:10 < sauerbraten> how may i add Go support to gedit?
15:12 < Ginto8> http://go-lang.cat-v.org/text-editors/
15:12 < Ginto8> look there
15:13 < jchico> which syntax highlighter would you use for gEdit?
15:14 -!- artefon [~thiago@dhcp29.usuarios.dcc.ufmg.br] has quit [Quit: bye]
15:14 -!- wrtp [~rog@92.17.68.115] has quit [Quit: wrtp]
15:14 < jchico> oh nevermind, found it
15:25 -!- incluye [~inklewyay@NW-ESR1-74-215-114-218.fuse.net] has joined #go-nuts
15:34 -!- mxweas [~max@c-98-225-102-170.hsd1.az.comcast.net] has quit [Quit:
mxweas]
15:34 -!- Venom_X [~pjacobs@71.21.124.111] has joined #go-nuts
15:35 -!- path[l] [~path@122.182.0.38] has quit [Quit: path[l]]
15:50 < sauerbraten> i can find 3 syntax files there, which one is the best?
:D
15:54 < Ginto8> the go.xml or w/e for your editor o.o
15:55 < sauerbraten> i meant i found 3 different go.lang files for gedit ;)
i just used the first one now
15:56 < Ginto8> uhm idk
15:56 < Ginto8> that should work
15:58 -!- tvw [~tv@212.79.9.150] has quit [Read error: Operation timed out]
16:00 < sauerbraten> yeah it should thanks anyway
16:01 -!- Robbo_ [~Robbocogs@CPE-124-187-134-193.lns15.ken.bigpond.net.au] has
joined #go-nuts
16:02 < Robbo_> yo
16:02 < Robbo_> does go have socket support?
16:02 < Ginto8> what exactly do you mean by "socket"?
16:03 < Ginto8> if you mean network connections, then yes
16:03 < Robbo_> Yeah
16:03 -!- wrtp [~rog@92.17.68.115] has joined #go-nuts
16:03 < Ginto8> look up the package net
16:03 < Robbo_> I guess I am too used to other languages....  don't actually
know the correct term
16:03 < Robbo_> Another question
16:03 < Robbo_> I'm on windows
16:04 < Robbo_> What is the best way to run linux so I can have a play?
16:04 < Ginto8> ubuntu
16:04 < Robbo_> Other then dual bot which I will do later
16:04 < Ginto8> oh
16:04 < Robbo_> I mean running it from windows
16:04 < MaybeSo> probably vmware
16:04 < Ginto8> eyah
16:04 < Ginto8> yeah*
16:04 < Robbo_> Waiting for parts and time before dual boot
16:04 < Robbo_> ok
16:04 < Ginto8> why do you need parts?
16:04 < Ginto8> just partition your drive
16:05 < Ginto8> if you have all the necessary stuff backed up you'll be fine
16:05 < Robbo_> oh i mean for my new mobo to arrive
16:05 < Ginto8> oic
16:05 < Ginto8> okey dokey
16:07 < Robbo_> Tryin to get right into go :)
16:07 < jchico> I'm using VirtualBox to run Ubuntu, don't you have to pay
for VMware?
16:07 < Robbo_> Lack of stuff on the net so lucky I found this channel
16:07 < Robbo_> I'm on x64
16:07 < Robbo_> Will virtualbox still work?
16:08 < jchico> yeah, I also have an x64
16:08 < jchico> I'm actually running the 32bit version of Ubuntu though
16:08 < Robbo_> sounds good then
16:09 < Robbo_> So anyone here using go for much?
16:09 < jchico> just remember to install the Guest Additions after you
install Ubuntu
16:09 < MaybeSo> anyone here run into problems on Linux w/ a Go program that
ends up blocking forever on a futex FUTEX_WAIT call?
16:10 < Robbo_> Gonna make an IRC client for my first program using it...
well try :p
16:10 < Robbo_> jchico, if I run into problems I'll be sure to annoy
16:10 < jchico> heh ok, you have program in any other languages before?
16:11 < Robbo_> I mean with virtualbox
16:11 < jchico> oh yeah but have you program an IRC client before?
16:11 < Robbo_> The language I won't annoy people until I have spent at
least an hour working out what I am doing wrong.  In which case I usually ask
someone and just from reading my own question I work out the solution
16:11 -!- visof [~visof@unaffiliated/visof] has quit [Ping timeout: 258 seconds]
16:12 < Robbo_> made bots and shit
16:12 < Robbo_> I should be fine with it
16:12 < jessta> MaybeSo: you're using futex calls in GO?
16:12 < MaybeSo> not directly, the underlying Go code is
16:12 < Robbo_> I'm not that good with apps....  I'm a web programmer that
wants to work with more powerful languages :p
16:12 < MaybeSo> I suspect something along these lines:
http://codereview.appspot.com/218065/diff/1003/7
16:13 < Robbo_> So I know C++ but not that well
16:13 < jessta> MaybeSo: ok, good to know
16:13 < MaybeSo> Robbo: this might be of interest to you as a resource:
http://go-lang.cat-v.org/go-code
16:13 < MaybeSo> (see Irc section, go-bot)
16:14 < Robbo_> oh nicv
16:14 < Robbo_> nice
16:14 < Robbo_> thanks
16:14 < jchico> yeah that is nice
16:15 < Robbo_> golang.org is written with go right?
16:15 < MaybeSo> yes it is running a server written in go
16:15 < Robbo_> so can we make our own sites running go?
16:15 < MaybeSo> it is distributed w/ the go dist itself
16:16 < MaybeSo> (godoc)
16:16 * Robbo_ feels noob
16:16 < Robbo_> ok cool
16:16 < Robbo_> does it have mysql support?
16:16 < MaybeSo> Ha, that is in fact what I'm running into futex problems
with.  I'm using some of the tools from this page:
http://go-lang.cat-v.org/pure-go-libs
16:17 -!- aho [~nya@fuld-4d00d23e.pool.mediaWays.net] has joined #go-nuts
16:17 < Robbo_> I wouldn't ask so many questions but being a new language it
is hard to find info
16:17 < MaybeSo> GoMySQL seems to mostly work for inline SQL, but using a
prepared statement more than once appears to be busted
16:18 < MaybeSo> searching for 'golang' or '"go programming language"'
instead of 'go' helps
16:18 < Robbo_> And if I was to get 'good' with go is it something I could
fix or is it a more lower end thing?
16:18 < Ginto8> Robbo_, it should also be possible to access sql through a c
lib
16:18 < Ginto8> look at cgo
16:19 -!- adu [~ajr@softbank220043139062.bbtec.net] has quit [Quit: adu]
16:20 < MaybeSo> Robbo_: if you were asking about fixing things like GoMySQL
the code looks straightforward enough w/re to what it is doing, it's just a matter
of knowing the MySQL client/server message routines
16:20 -!- Robbo [~Robbocogs@CPE-124-187-134-193.lns15.ken.bigpond.net.au] has
joined #go-nuts
16:20 < MaybeSo> Ginto8: have you had good success using cgo wrapped
libraries?
16:20 -!- bechmoul [~joel@lolnet.org] has joined #go-nuts
16:21 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts
16:22 -!- Robbo [~Robbocogs@CPE-124-187-134-193.lns15.ken.bigpond.net.au] has left
#go-nuts []
16:22 -!- Robbo [~Robbocogs@CPE-124-187-134-193.lns15.ken.bigpond.net.au] has
joined #go-nuts
16:22 -!- Robbo_ [~Robbocogs@CPE-124-187-134-193.lns15.ken.bigpond.net.au] has
quit [Ping timeout: 258 seconds]
16:23 -!- belkiss [~belkiss@drn13-1-78-235-168-105.fbx.proxad.net] has joined
#go-nuts
16:23 -!- Robbo [~Robbocogs@CPE-124-187-134-193.lns15.ken.bigpond.net.au] has quit
[Client Quit]
16:24 -!- Robbo_ [~Robbocogs@CPE-124-187-134-193.lns15.ken.bigpond.net.au] has
joined #go-nuts
16:24 < Robbo_> ping
16:25 < Robbo_> ok got virtualbox working
16:26 < Robbo_> never actually tried linux...
16:26 -!- RobertLJ [~RobertLJ@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
16:26 < MaybeSo> have you used other unix based systems?
16:27 < Robbo_> nope
16:27 < Robbo_> been meaning to
16:27 < MaybeSo> ah
16:27 < Robbo_> oh it wants an OS image
16:27 < Robbo_> what OS should I go for?
16:27 < Robbo_> centos or something I have been told is good?
16:28 < MaybeSo> I couldn't say, I use centos and redhat but ubuntu might be
even easier for someone new to unix
16:29 < Robbo_> I'll go centos
16:29 < Robbo_> I don't need easy heh
16:30 < jchico> why not?  you rather be complicated?  :P
16:30 < Ginto8> MaybeSo, what do you mean by "cgo wrapped libraries"?
16:30 < Robbo_> yesm
16:30 < Robbo_> lo
16:30 < Robbo_> l
16:31 < Robbo_> Ok and a question I was going to ask before my net died
16:31 < Robbo_> What does google use for its repos?
16:31 < Ginto8> ubuntu actually has a history of just plain working for me,
so I use it
16:31 < Robbo_> On code.google.com
16:31 < Ginto8> Robbo_, why should that matter?
16:31 < Robbo_> Oh I want to know so I can use it
16:31 < Ginto8> a server version of an OS isn't going to be used the same
way as a desktop OS
16:32 < Robbo_> Oh
16:32 < Robbo_> Ummm
16:32 < Robbo_> I dunno
16:32 -!- Luixsia [~Luixsia@AToulouse-254-1-103-196.w86-207.abo.wanadoo.fr] has
quit [Ping timeout: 252 seconds]
16:32 < Ginto8> just use ubuntu, it's an easy install and should work out of
the box
16:32 < Robbo_> I'm just using w/e
16:32 < Robbo_> I know nothing about any of these OS
16:32 < Robbo_> Which is the main problem
16:32 < jchico> yeah when learning something new, try simplicity first.
16:32 -!- artefon [~thiago@189.107.222.110] has joined #go-nuts
16:33 < Robbo_> When I partition I'll go ubuntu
16:33 < Ginto8> if you're new, use ubuntu
16:33 < MaybeSo> Ginto8: I mean using native C libraries within Go, e.g.,
stuff like http://go-lang.cat-v.org/library-bindings
16:33 < Ginto8> I actually directly access them, those bindings aren't that
good
16:33 < Ginto8> but I'm currently using SDL and OpenGL through cgo, and it
hasn't been that bad
16:34 < Robbo_> Oh that raises another question
16:34 < Robbo_> Any plans on opengl support for go?
16:34 < Ginto8> my only nuisances are accessing C arrays (using uintptr and
unsafe.Pointer) and accessing unions
16:34 < MaybeSo> Ginto8: thanks
16:34 < Ginto8> cuz cgo defines unions as byte arrays, so you have to do an
unsafe.Pointer cast
16:35 < Ginto8> aside from that, it's actually a pretty good interface
16:35 < Ginto8> Robbo_, there is opengl support for C
16:35 < Robbo_> So what does code.google use for their repo?
16:35 < Robbo_> git?
16:35 < Ginto8> that's all you need for go
16:35 < Ginto8> nope
16:35 < Ginto8> mercurial
16:35 < Robbo_> ok
16:35 < Ginto8> mercurial is actually very similar to git from what I've
seen
16:35 < Ginto8> but w/e
16:36 < Robbo_> I don't know much of either of them
16:36 < Robbo_> I have only had to use svn
16:36 < Robbo_> And hated it ;p
16:36 < Ginto8> basically it's a decentralized version control mechanism
16:36 -!- ender2070 [~ender2070@bas22-toronto12-2925103372.dsl.bell.ca] has quit
[Remote host closed the connection]
16:37 < temoto> Ginto8, http://browsertoolkit.com/fault-tolerance.png
16:37 -!- Xurix [~Luixsia@AToulouse-254-1-5-202.w83-203.abo.wanadoo.fr] has joined
#go-nuts
16:37 < Robbo_> So since you guys know a fair amount about Go. Do you see it
taking over C++ for things like gaming anytime soon?
16:37 < taruti> no
16:38 < MaybeSo> nor I
16:38 < taruti> Language X replacing language Y will always take a long time
16:38 < jchico> yeah is this language even 1 year old?
16:39 < Robbo_> well
16:39 < Robbo_> do you thnk it has the potential?
16:39 < Robbo_> also do you think it could even handle a game?
16:39 < Robbo_> as in AAA
16:40 < Ginto8> idk, it's performance isn't on par with C
16:40 < Namegduf> Yes.
16:41 < Ginto8> but it would definitely be capable of a good game
16:41 < Ginto8> temoto, lol
16:41 < Ginto8> but quite honestly I think Go is a true modern version of C
16:42 < taruti> Robbo_: game things require good game libraries and
developers
16:42 < taruti> even python is suitable for lots of game writing
16:42 < temoto> Robbo_, we plan to take over C++ for things like gaming and
databases at 2011Q2.
16:43 < temoto> i know, whole year is not soon enough, but there's a lot of
work to do
16:43 < Ginto8> I don't think Go is going to fully take over, but I think it
will cause a major paradigm shift, and will probably get a pretty big following
16:43 < Ginto8> because other languages aren't very good with parallelism
and working on multicore processors
16:43 < Ginto8> and multicore is the future
16:44 < Robbo_> temoto, you work for google?
16:44 < Robbo_> yeah from what I have spoken to with other people they
really like what go does with multi core stuff
16:44 < Ginto8> so I think a lot more languages will be integrating go-like
parallelism in the near future
16:44 < Robbo_> I haven't yet had a chance to dive into go though
16:44 < Ginto8> even if go itself doesn't become super popular
16:45 < temoto> Ginto8, "other languages aren't very good with parallelism"
is a sound statement.  :)
16:45 < Robbo_> Can go replace php?
16:45 < Ginto8> Robbo_, take any chance you get.  It will, seriously change
how you think about parallelism in general
16:45 < Robbo_> I use php daily
16:45 < Robbo_> So say
16:45 < skelterjohn> go and php have different purposes
16:45 < Robbo_> I made a framework for go
16:45 < Robbo_> To act more like php
16:45 < Robbo_> Would it work?
16:45 < Robbo_> AS in
16:45 -!- sladegen [~nemo@unaffiliated/sladegen] has joined #go-nuts
16:45 < Robbo_> Be web based
16:45 < temoto> Robbo_, no, i'm just kidding at your hm...  naive?
question.
16:45 < Ginto8> skelterjohn, yes but go can do all kinds of server side
stuff
16:46 < Ginto8> yeah go isn't going to "take over"
16:46 < skelterjohn> i know, but it just seems like using a hammer to push a
thumb tack
16:46 < skelterjohn> we don't need go for server side scripting
16:46 < Robbo_> Err I don't mean replace sorry
16:46 < skelterjohn> it's nicer to have something like php, or jsp
16:46 < Robbo_> I mean can it replace it for me...  not in general
16:46 < skelterjohn> maybe a go-server-pages language
16:46 < Ginto8> but it's definitely gonna have a major impact on any new
languages that are developed
16:46 < temoto> Robbo_, you do gaming?
16:47 < Ginto8> Robbo_, yes
16:47 < Robbo_> Yes but not my main thing
16:47 < skelterjohn> Robbo_: the biggest weakness go would have taking over
PHP's domain is that there isn't a convenient way to insert large blocks of static
text
16:47 < skelterjohn> what appears between <% %> in php or jsp
16:47 < Ginto8> I used C/++ for a while, and I shifted over to go and I've
been absolutely loving
16:47 < Ginto8> loving it*
16:47 < Ginto8> skelterjohn, really?
16:47 < Robbo_> skelterjohn, as in echo in php?
16:48 < Ginto8> "<"+text+">"
16:48 < skelterjohn> i could be wrong
16:48 < Ginto8> go has builtin string operations
16:48 < Ginto8> skelterjohn, ^
16:48 < skelterjohn> you can do all the same things, certainly
16:48 < skelterjohn> but it is less convenient in go
16:48 < Robbo_> A templatting system could easily overcome that
16:48 < Ginto8> hm good point
16:48 < Robbo_> Although
16:48 < Robbo_> It would need an output buffer
16:48 < Ginto8> Robbo_, yes but templating at the moment is a maybe
16:48 < skelterjohn> there is a package for that sort of templating
16:49 < skelterjohn> Ginto8: different kind of templating :)
16:49 < temoto> Robbo_, anyway...  "for somebody" answer will always be yes.
Since all languages are turing complete bla-bla.  But there are some success
stories.  Like i've rewritten most part of my web crawler worker in 2 days.  And
stuck with absense of robots.txt parsing library.
16:49 < Ginto8> oh
16:49 < Robbo_> That could be a killer for using websites
16:49 -!- incluye [~inklewyay@NW-ESR1-74-215-114-218.fuse.net] has quit [Remote
host closed the connection]
16:49 -!- incluye [~inklewyay@NW-ESR1-74-215-114-218.fuse.net] has joined #go-nuts
16:50 < temoto> I'd say that Go is only a bit more verbose than Python.
(Which is whoa hell great for statically typed language)
16:50 < Ginto8> yeah
16:50 < skelterjohn> := makes a lot of things easier
16:50 < Ginto8> go has been rightfully described as C meets python
16:50 < skelterjohn> good operator
16:50 < Ginto8> very good operator
16:50 < Robbo_> Ok for example
16:51 < Robbo_> I work a lot with SMF
16:51 < KirkMcDonald> skelterjohn: I would argue against the need for
inserting large blocks of static text.
16:51 < skelterjohn> I'm not a web developer, so I will concede any well
founded argument immediately
16:51 < KirkMcDonald> skelterjohn: I much prefer how Python does it, with a
seperate templating language.
16:51 < KirkMcDonald> separate*
16:51 < Robbo_> If I was to port it to Go would I see any performance
increase and would it be a very hard port when it comes to all the stuff it does
directly from apache?
16:52 < skelterjohn> i only pointed out that issue because the only stuff
i'd ever done is php or jsp, and years ago at that
16:52 < KirkMcDonald> skelterjohn: Dumb templates are good.
16:53 < Robbo_> Large text blocks with websites would be a downside as I
like to output everything I have just with PHP.  However, a templating system can
be good if I am working on anything open source etc.  And if I couldn't do it
directly from Go I'm sure it would be fast enough to parse a template and output
it
16:53 < skelterjohn> Robbo_: whether or not you'd see a performance increase
depends heavily on the quality of the code you're porting from and the quality of
the code you're writing, along with the compilers.  so it's hard to answer that
question
16:53 < Robbo_> Yeha true
16:53 < Robbo_> Yeah*
16:53 < Namegduf> Yes.
16:53 < Namegduf> Go code will generally run faster than PHP
16:53 < Namegduf> PHP is slowass
16:54 < temoto> Robbo_, porting a monster like SMF or Django would take you
months if done alone.
16:54 < skelterjohn> well that's certainly true
16:54 -!- mattikus [~mattikus@witty.mcs.anl.gov] has joined #go-nuts
16:54 < Robbo_> temoto, I know, it was in theory
16:54 < skelterjohn> Robbo_: the templating system for go ->
http://golang.org/pkg/template/
16:54 < Robbo_> I might be making a team to make a new forum with some of
the old SMF team, so was just wondering
16:54 -!- artefon [~thiago@189.107.222.110] has quit [Ping timeout: 252 seconds]
16:54 -!- rv2733 [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has quit [Quit:
Leaving]
16:55 < Namegduf> That's interesting.
16:56 < temoto> Robbo_, in theory it would bring very much performance
increase.  But if PHP site is written and deployed properly, users shouldn't
notice the difference.
16:56 < Robbo_> Yeah
16:57 < temoto> So performance is definitely not the main reason for that.
16:57 < KirkMcDonald> One advantage to a separate templating language is
when you have a very large website, with a large number of developers.
16:57 < aho> usually the db is the bottleneck...  so php's slowness
typically doesn't have much of an impact
16:57 < KirkMcDonald> And, most importantly, web developers which are
separate from the other devs.
16:57 < Namegduf> I dunno
16:58 < Robbo_> Well PHP isn't exaclty the best language for organizing
code.  It's OOP isn't the best
16:58 < Namegduf> Running PHP just serving MediaWiki, I've seen abysmal
performance
16:58 < Robbo_> but from what I have seen from Go
16:58 < Namegduf> To the point where when an indexer bot hits, it actually
suffers.
16:58 < Robbo_> I don't know how I would structure it tbh
16:58 < Namegduf> Write packages for individual pieces of functionality.
16:58 < MaybeSo> Namegduf: a lot of those system rely very heavily on
caching, so a bot tends to throw them off their stride
16:58 < temoto> Namegduf, ...if written and deployed *properly*
16:58 < Namegduf> Have a main package that calls into the utility packages.
16:59 < Namegduf> temoto: Yes, if written and deployed with far more RAM
than Go will work happily with
16:59 < Namegduf> And far more than I can afford
16:59 < Namegduf> That is the case
16:59 < Robbo_> I would need to see a descent sized program in Go to
understand how I should go about it
16:59 < Venom_X> Robbo_: have you heard of hiphop-php?
http://developers.facebook.com/blog/post/358
16:59 < aho> Namegduf, so...  have you profiled it?
16:59 < jessta> aho: the db is only the bottle neck if you make it the
bottle neck
16:59 < Robbo_> nope
16:59 < Venom_X> check it out
16:59 < Namegduf> aho: No, it isn't a primary interest of mine
17:00 < Robbo_> Looks cool
17:00 < temoto> Namegduf, i don't think that RAM is bottleneck there.  But
that's a guess on surface.
17:00 < Robbo_> I don't actually have a problem with how fast my sites run
17:00 < Robbo_> Just trying to learn about Go
17:01 < Robbo_> But I will definately bookmark that
17:01 < Ginto8> look at the website
17:01 < Venom_X> oh..  well write something that fits better with GO then
17:01 < Ginto8> you will learn most of the stuff you need
17:01 < Robbo_> I have read a lot of it
17:01 < Robbo_> And videos
17:01 < skelterjohn> writing code is the best way to learn to write code
17:01 < aho> jessta, typically you wont run that much logic in php...
basically you just take stuff out of the database, use some templating stuff, and
send it to the user
17:01 < aho> e.g.  wordpress or drupal sites
17:01 < Robbo_> skelterjohn, waiting for stuff to download so I can write it
17:01 < Robbo_> so in the mean time
17:01 < Robbo_> I'm chatting about it :)
17:02 < Ginto8> skelterjohn, yes but I always like to research what I can
use for my code before I write it =P
17:02 < Namegduf> In general, the way I would design a Go program
17:02 < Namegduf> Is not to try to model the problem domain in terms of
objects or such crap
17:02 < Namegduf> But merely to break up the job I'm doing into subjobs
17:02 < Ginto8> but in processes
17:02 < Namegduf> And create packages doing self-contained tasks that can be
combined to do that job
17:02 < Ginto8> it's a parallel paradigm
17:03 < jchico> yeah Erlang does that pretty well too, but I just hate its
syntax...  so ugly
17:03 < Robbo_> Hmmm, I really need to play with it before I know what you
are talking about :p
17:03 < Ginto8> One of the really good thing about go is the modularity
17:03 < Namegduf> "but in processes" was not my thought, and should be taken
separately.
17:03 < Ginto8> so amazingly superior to C/++
17:03 < Namegduf> I tend to consider that after.
17:03 < Ginto8> hm
17:04 < Namegduf> In terms of how each job can be implemented.
17:04 < Robbo_> Any editors to help me?  I have the syntax highlighting in
notepad++ working I think
17:04 < Ginto8> ok so procedural paradigm with extra parallelism
17:04 < Ginto8> Robbo_, I use kate
17:04 < KirkMcDonald> vim!
17:04 < Venom_X> emacs
17:04 < Ginto8> vim is good
17:04 < Robbo_> lol screw vim
17:04 < skelterjohn> I use xcode on os x
17:04 < Ginto8> but I like mah gui for coding
17:04 < Robbo_> ok kate it is
17:04 < Ginto8> http://go-lang.cat-v.org/text-editors/
17:04 < skelterjohn> not really an IDE, but a file organizer
17:04 < skelterjohn> and syntax colorer
17:04 < Ginto8> that's all the editors with syntax highlighting
17:05 < Robbo_> yeah saw that
17:05 < Namegduf> Anyways, my thought is that there's a number of conceptual
models you can use, but you should probably not use OO
17:05 < Robbo_> I'm more of an IDE guy :p
17:05 < Robbo_> I want my files listed
17:05 < Namegduf> OO feels to me like a detour from actually solving the
problem, in which you rephrase the problem in terms of objects, then solve the new
problem, then the language converts it into the real solution.
17:05 < Robbo_> Still 30 mins to download ubuntu
17:05 < Ginto8> Robbo_, kate does that very well
17:05 < Namegduf> The problem is that Go doesn't do the last bit very well
17:06 < Namegduf> I daresay it isn't designed to be used with OO.
17:06 < Ginto8> nope
17:06 < KirkMcDonald> Go is by no means a "traditional" OO language.
17:06 < KirkMcDonald> It has composition and not inheritance.
17:06 < Namegduf> Right.
17:06 < Ginto8> go takes normal OO concepts, sets them on fire and throws
them out the window
17:06 < Robbo_> I see Go as similar to JavaScript.  They are OOP languages
but don't look like it
17:06 < skelterjohn> i find when I write java code i spend too much time
organizing class hierarchies
17:06 < Ginto8> and then does things right
17:06 < Robbo_> So people get confused and judgemental
17:06 < Ginto8> Robbo_, go isn't actually OO
17:07 < skelterjohn> now my only stupid efficiency hang up is spending time
deciding what to call everything
17:07 < KirkMcDonald> JavaScript is different still, since it's
prototype-based.
17:07 < Ginto8> it's somehow unclassifiable
17:07 < Namegduf> Go actually isn't OO at all, I feel, by any traditional
view of OO.
17:07 < skelterjohn> go is interface oriented
17:07 < Robbo_> Which is my main problem of getting my head around it
17:07 < Robbo_> I just can't think of how I should struture things
17:07 < Namegduf> It has some ideas that OO might have had, but the
differences are at the least big enough you can't just use OO, then expect it to
map "but differently".
17:07 < Ginto8> Robbo_, think python duck typing plus better C structs plus
overall awesome
17:07 -!- artefon [~thiago@vpn-226.dcc.ufmg.br] has joined #go-nuts
17:07 < skelterjohn> Robbo_: I'd say experiment, but your download probably
isn't done yet ;)
17:07 < temoto> Robbo_, write like in C or Pascal.
17:08 < Robbo_> Lol
17:08 < KirkMcDonald> It's not worth talking about "OO", anyway, since the
term is not at all defined.
17:08 < Robbo_> So procedurla
17:08 < skelterjohn> well, not really
17:08 < Robbo_> Well really powerful procedural?
17:08 < Namegduf> You can write with a procedural methodology very easily.
17:08 < Namegduf> It "works for me".
17:08 < skelterjohn> i mean, you still have structs with data and methods
associated with them.  some people call those "objects"
17:08 < Robbo_> Like C right?
17:08 < KirkMcDonald> And you have polymorphism via interfaces.
17:09 < temoto> Robbo_, procedural is a good start, then you'll find other
tools like interfaces.
17:09 < skelterjohn> C structs have no methods associated with them
17:09 < Ginto8> Robbo_, it's like taking procedural, sprinkle in a tiny bit
of OOP, add duck typing, add goroutines, then mix it all together, bake at 400
degrees for 20 minutes, then enjoy
17:09 < KirkMcDonald> skelterjohn: Unless you fake it.
17:09 < skelterjohn> But yeah, overall I feel it's better to start thinking
of it as procedural, and then using an interface when it makes the code simpler
17:09 < Namegduf> KirkMcDonald: It has a bunch of definitions.  I think
"works in some manner with object modeling" is a fairly minimal theme, and the
appropriate one for discussion of program decomposition.
17:09 < Ginto8> it's quite tasty
17:10 < Namegduf> Hmm, that's a good point, actually.
17:10 < skelterjohn> KirkMcDonald: well, turing complete, etc
17:10 < Robbo_> I watched some vids on interfaces
17:10 < KirkMcDonald> skelterjohn: I'm just referring to function pointers.
17:10 < Robbo_> They look very powerful
17:10 < KirkMcDonald> skelterjohn: Manually creating a vtable, etc.
17:10 < skelterjohn> KirkMcDonald: gotcha
17:10 < Namegduf> What I mean is, "Go is not friendly with object modeling
as an approach to program decomposition, so I'd suggest not using it."
17:10 < Ginto8> Robbo_, they are
17:10 < skelterjohn> Namegduf: I agree with that statement
17:10 < Ginto8> they are more powerful than batman on their good days
17:11 < Robbo_> Hopefully I will have time to play with it heaps and get
used to everything
17:11 < Robbo_> Is there a forum you can discuss all this one?
17:11 < Namegduf> Interfaces are a valuable tool indeed; I'd suggest using
them where you've some code that wants to deal with multiple different types
similarly.
17:11 < Ginto8> uh well there's a mailing list for problems
17:11 < Namegduf> Or can simply benefit from such.
17:12 < Robbo_> Lol someone make a forum, could be a good investment this
early
17:12 < skelterjohn> Robbo_: http://groups.google.com/group/golang-nuts
17:12 < skelterjohn> which is linked on the website
17:13 < skelterjohn> it's the only one that i know of right now, and it's
fairly low traffic (~5-10 messages per day) so good luck getting anyone to migrate
to a different one
17:13 < Namegduf> Haha
17:13 < Namegduf> I guess it is low traffic now.
17:13 < skelterjohn> everyone is busy writing code
17:13 < Namegduf> It used to be massively busy.
17:13 < skelterjohn> it was never more than 30 or so per day
17:14 < Namegduf> Now we just get the occasional Ruby idiot who wants some
features of Go, but really wants to be using Ruby
17:14 < skelterjohn> the "go doesn't have X, like Y does, there for Y >
go" posts happen sometimes
17:14 < Namegduf> Suggesting it be made more like Ruby.
17:15 < Robbo_> if you know how to make a nice site and have the time you
could make plenty of money out of go
17:15 < Namegduf> Sure, as with most other programming languages
17:15 < Robbo_> when i say know...  i mean pro
17:15 < Robbo_> yeah, but other languages aren't new
17:16 < skelterjohn> well, 16637 messages total, since 11/10/09.  Been 9
months since then, so that is more than 30 messages per day
17:16 < Robbo_> it is very yound
17:16 < Robbo_> that group will have a LOT of posts when it gets more
popular
17:17 < skelterjohn> the posts will also be a lot less interesting, though
:)
17:17 < Robbo_> indeed
17:18 -!- ShadowIce [pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
17:18 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
17:18 < Robbo_> if I get time some time next year and no one else has made a
dominent Go site I think I might make it one of my projects
17:19 < Robbo_> simple sites built in php and then slowly port everything to
go to showcase its power
17:19 < Robbo_> site*
17:19 < skelterjohn> golang.org is entirely go
17:19 < Robbo_> yeah I know
17:19 < skelterjohn> there is also http://www.gosnippets.org/ which seems
neat
17:19 < skelterjohn> and go-lang.cat-v.org
17:19 < temoto> I hate it when people rebuild all tools in language X to
advocate it.
17:20 -!- jchico [~jchico@cpe-98-14-12-209.nyc.res.rr.com] has quit [Ping timeout:
241 seconds]
17:20 < skelterjohn> why?  it means you can do things in that language
without worrying language-to-language interfacing
17:20 < skelterjohn> which is usually a huge pain
17:20 < Robbo_> skelterjohn, anymore go site you know of?
17:20 < skelterjohn> Robbo_: not off the top of my head
17:20 < Robbo_> sites*
17:21 < temoto> skelterjohn, because there is exactly no need to build a
website in Go.
17:21 < skelterjohn> define "need"
17:21 < temoto> There are far more sophisticated tools.
17:21 -!- Namegduf [~namegduf@eu.beshir.org] has quit [Quit: Client restart.]
17:21 < Fish> that's probably the problem
17:21 < Robbo_> Why does it need to be a need?
17:21 < Fish> they are sophisticated
17:21 < skelterjohn> go's original purpose (it has extended) was to do
parallel server programming
17:21 < skelterjohn> a web server seems quite appropriate for showcasing
17:21 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has joined
#go-nuts
17:22 < Robbo_> Sometimes people want something and not need it
17:22 -!- Namegduf [~namegduf@eu.beshir.org] has joined #go-nuts
17:22 < skelterjohn> perhaps temoto's point is that certain programs only
need to be written once?
17:22 < Robbo_> Not to mention the example I gave.  The site written in Go
would be a HUGE marketing step
17:22 < temoto> Partly that.
17:23 < skelterjohn> marketing is irrelevant :)
17:23 < Robbo_> Not to me
17:23 < temoto> Partly that putting effort into marketing steps seems awful
for me.
17:23 < Robbo_> I make sites to make money
17:23 < Robbo_> There is no other motivation
17:23 < skelterjohn> but creating a well-written webserver in go is sort of
a proof-of-concept for "go is useful because it can do interesting things easily"
17:23 -!- boscop_ [~boscop@f055056041.adsl.alicedsl.de] has joined #go-nuts
17:23 < temoto> Robbo_, and people visit them not because they're done in
PHP or SMF, but because of their concept.  Same here.
17:23 -!- boscop [~boscop@f055064232.adsl.alicedsl.de] has quit [Ping timeout: 276
seconds]
17:23 < Robbo_> And if I was to port one to go I would get hours of
experience and then the marketing as well
17:24 < skelterjohn> Robbo_: go is a language.  not a web site.
17:24 < Robbo_> My example was about what I would want to do
17:24 < Robbo_> Not what would need to be done
17:24 < Robbo_> I would port it to go for 2 reasons
17:24 < Robbo_> Marketing being the lesser reason
17:24 < Robbo_> The main reason would be learning
17:24 < Robbo_> Learning more about the languages
17:24 < Robbo_> language*
17:25 < Robbo_> I have 'reinvented the wheel' a few times for that reason
17:25 < Robbo_> to learn how it is done
17:25 < Robbo_> It's not about need
17:25 < skelterjohn> i feel like everyone in this conversation is talking
about something slightly different
17:26 < Robbo_> I kind of do too :/
17:26 < Robbo_> I'm half pissed though
17:26 < Robbo_> So I have an excuse!
17:26 < skelterjohn> what time zone are you in?
17:26 < Robbo_> Aussie
17:26 < Robbo_> It's 3.30am here
17:26 < skelterjohn> ok :)
17:27 < skelterjohn> i could have got that from you describing yourself as
"pissed" without you being angry about anything, i suppose
17:27 < Namegduf> The critical problem with duck typing is how you factor in
moorhens.
17:27 < Robbo_> Oh my bad
17:27 < Robbo_> Forgot about that
17:27 < Robbo_> I'm half drunk??
17:27 < skelterjohn> no, i understood
17:27 < Robbo_> (doesn't sound as good)
17:27 < skelterjohn> and "I'm half drunk" sounds fine to an american
17:27 < Robbo_> heh
17:28 < Robbo_> I know a few americans etc, I forget to keep my 'slang' to
myself
17:28 < skelterjohn> why would you bother?
17:28 < Robbo_> Because it can get confusing with certain people
17:28 < skelterjohn> your slang is just as good as mine
17:29 < skelterjohn> keeping it to yourself just keeps the confusion going
17:29 < Ginto8> yeppers
17:29 -!- jchico [~jchico@cpe-98-14-12-209.nyc.res.rr.com] has joined #go-nuts
17:30 < Robbo_> Hmmm I wonder how long until facebook brings out its email
messaging system
17:30 < Robbo_> Attempting to take over gmail
17:30 < skelterjohn> i feel like the takeover is in the opposite direction
17:30 < Robbo_> Oh I have no doubt facebook could 'own' gmail
17:31 < Robbo_> The amount of people that use it
17:31 < Robbo_> I have no friends....  well 2 that I can think of actually
that don't use facebook
17:31 < skelterjohn> not sure what you mean by 'own'
17:31 < Robbo_> Ummm
17:31 < Ginto8> uh Robbo_, facebook is owned by google
17:31 < Robbo_> Like if I kill you
17:31 < Robbo_> And I own you
17:31 < Robbo_> from killing you?
17:31 < Robbo_> in a game
17:31 < skelterjohn> Ginto8: facebook is not owned by google...
17:32 < Ginto8> it isn't?
17:32 < sauerbraten> like "OWNED!  HAHAHA" ;_)
17:32 < skelterjohn> no
17:32 < Robbo_> nope
17:32 < sauerbraten> ;-)
17:32 < Ginto8> ok I feel retarded now
17:32 < Ginto8> =/
17:32 < Robbo_> lol
17:32 < Ginto8> w/e
17:32 < Robbo_> if google owned google it would be way differnt
17:32 < sauerbraten> Ginto8: Youtube is owned by Google
17:32 < Ginto8> yeah I know
17:32 < Ginto8> but I heard from someone facebook is owned by google
17:32 < Robbo_> facebook I think is the second most used site over
google.com
17:32 < Ginto8> but I guess that person is crazy
17:32 < sauerbraten> Ginto8 and the creators of farmville are owned by
google now, too
17:33 < Ginto8> hm
17:33 < Robbo_> download done!
17:33 < Ginto8> interesting
17:33 < Ginto8> now just burn the iso
17:33 < Ginto8> and boot from it
17:33 < Robbo_> noes
17:33 < sauerbraten> What did you load?
17:33 < Robbo_> im going virtual atm
17:33 < Robbo_> partition later
17:33 < Ginto8> btw proof that you can use both OpenGL and SDL with go:
17:33 < Ginto8> http://img709.imageshack.us/img709/109/4002.png
17:33 < skelterjohn> Robbo_: you can also use a live CD
17:34 < skelterjohn> you can boot from the ubuntu install CD and use linux
directly from if
17:34 < Robbo_> Ginto8, oh wow
17:34 < skelterjohn> install golang, etc
17:34 < skelterjohn> Ginto8: I'd like you to get that working for os x :\
17:34 < Ginto8> Robbo_, yeah right now I'm trying to figure out how to get
global camera panning to work
17:34 < Robbo_> I am in the process of building a new editor for a game
17:34 < Robbo_> I would like to build it in go if I can render
17:34 < skelterjohn> Ginto8: glTranslatef?  :)
17:35 < Ginto8> skelterjohn, it's not that simple
17:35 < Robbo_> But the guy I'm doing it with is anti-google
17:35 < Ginto8> because there's also global rotation
17:35 < Ginto8> and I don't want panning messed up by rotation
17:35 < skelterjohn> then translate before rotating
17:35 < Ginto8> but ysee that creates the issue of the rotation origin not
being the center of the screen
17:36 < skelterjohn> err
17:36 < Ginto8> yeah
17:36 < skelterjohn> i'm not so sure we're thinking about the same thing,
then
17:36 < Ginto8> uh no we are
17:36 < Ginto8> if you translate
17:36 < Ginto8> then rotate
17:36 < skelterjohn> because the way i am thinking works fine :) i've done
it many times
17:36 < Ginto8> it rotates around the translated point
17:37 < Ginto8> hm
17:37 < skelterjohn> yes, which would correspond to the center of your
camera
17:37 < Ginto8> I wish
17:37 < Ginto8> for some reason it doesn't
17:37 < skelterjohn> then we aren't thinking exactly the same thing
17:37 < skelterjohn> which is fine - i haven't expressed what i'm thinking
completely
17:37 < skelterjohn> irc is a pain for talking math
17:38 < Robbo_> ok so...
17:38 < Robbo_> i get
17:38 < Robbo_> this kernel requires x86-64 cpu, but only detected an i686
CPU.
17:38 < Robbo_> unable to boot
17:38 < Ginto8> do you have a 64 bit comp?
17:38 < sauerbraten> wrong .iso?
17:39 < Robbo_> yes
17:39 < Ginto8> did you set up virtualbox or w/e to be 64 bit?
17:39 < sauerbraten> settings -> 64
17:39 < sauerbraten> bit
17:39 < sauerbraten> ;)
17:39 < Robbo_> pretty sure i did
17:39 < Robbo_> but ill re check
17:39 < sauerbraten> check again, won't hurt
17:39 < skelterjohn> Ginto8: say your world is made up of two boxes.  you
have a method drawworld() which translates to box 1's location, draws it, and then
translates to box 2's location and then draws it.
17:39 < Ginto8> yes?
17:40 < Ginto8> I should rotate before I translate with that for global
rotation
17:40 < skelterjohn> if you translate -x, -y where the camera location is
x,y , then rotate the camera angle, then call drawworld(), it will work fine
17:40 < skelterjohn> or negative the camera angle, i forget
17:40 < Ginto8> hm
17:40 < Ginto8> well the way I'm doing it
17:40 < Ginto8> it translates to -x,-y
17:40 < skelterjohn> i'm gonna make a pastebin
17:40 < Ginto8> then does it
17:40 < Ginto8> and it fails
17:41 < Ginto8> it rotates around the translated location
17:41 < Ginto8> and kills a kitten
17:41 < Ginto8> =(
17:42 < sauerbraten> poor kitten :/
17:42 < Ginto8> hm even my zooming is based on the translated origin =(
17:43 < Robbo_> hmmm i cant see any 86 vs 64 options
17:43 < skelterjohn> http://pastebin.com/V695LfAB
17:43 < Ginto8> then dl the 64 bit version
17:43 < skelterjohn> that is what i mean
17:43 < Robbo_> i did
17:43 < Robbo_> i think
17:43 < Robbo_> lol let me check
17:43 < skelterjohn> oh except i forgot to draw the boxes
17:43 < skelterjohn> but you can figure out where that would go
17:43 < Robbo_> yeah it is
17:43 < Robbo_> ubuntu-10.04-desktop-amd64.iso
17:43 < Robbo_> hmm
17:44 < Robbo_> prob not it
17:44 < Robbo_> sigh
17:44 < sauerbraten> Robbo_: i think there is a special VirutalBox-iso of
Ubuntu
17:44 < sauerbraten> ;)
17:44 * Robbo_ shouldnt drink and try to run this shit
17:44 < sauerbraten> at least i saw something like that a long time ago
17:44 < Ginto8> the negative rotation is just to make it go clockwise by
default right?
17:44 < skelterjohn> Ginto8: not sure what you mean
17:44 < Ginto8> you rotate negatively
17:45 < skelterjohn> dependso n what cameraAngle is
17:45 < Ginto8> is that to make positive go clockwise?
17:45 < skelterjohn> if it is positive, then the rotation will be negative
17:45 < Ginto8> yeah I know
17:45 < Ginto8> but why?
17:45 < skelterjohn> Ginto8: it might not be negative - i can't remember.
17:45 < Ginto8> what's the reason for negation
17:45 < skelterjohn> if it is, for the same reason you translate the
negative
17:45 < skelterjohn> but i could be off on a sign or two
17:45 < sauerbraten> Robbo_: mhm seems like there is not
17:45 < skelterjohn> i could look up some code that does this
17:46 < Ginto8> yeah that would have the same issue
17:46 < skelterjohn> actually, no recent game i wrote has a rotating camera,
lol
17:46 < Ginto8> it's based on the origin
17:46 -!- wrtp [~rog@92.17.68.115] has quit [Quit: wrtp]
17:47 < Ginto8> translated origin*
17:48 < skelterjohn> rotate before translating, sorry
17:48 < skelterjohn> (just tested)
17:48 < Ginto8> but I want it to move based on the screen
17:48 < skelterjohn> and positive will be counter clockwise
17:48 < sauerbraten> skelterjohn: what games did you write?
17:48 < skelterjohn> sauerbraten: nothing that you'd be able to download and
play.  just a hobbyist
17:48 < Ginto8> for example translating by (1,0) will move the camera to the
right, regardless of rotation
17:49 < sauerbraten> skelterjohn: oj ok
17:49 < Ginto8> I'm gonna have to use the rotation matrix aren't I?
17:49 < sauerbraten> *oh
17:49 < Ginto8> like rotating a vector
17:49 < Ginto8> manually
17:49 < skelterjohn> http://pastebin.com/JsCC1uQ0
17:49 < skelterjohn> that is copied from a game i just ran and tested
17:50 -!- boscop_ [~boscop@f055056041.adsl.alicedsl.de] has quit [Ping timeout:
264 seconds]
17:50 < skelterjohn> if you comment out that line rotating 10 degrees, it
will rotate clockwise
17:50 < skelterjohn> and go as if the camera had that position and rotation,
etc
17:50 < Ginto8> so can you do something like this?
17:50 < skelterjohn> Ginto8: no you won't have to do it manually - that's
what glRotatef function is for - it changes your current transform matrix
17:50 < Ginto8> yeah I know
17:51 < Ginto8> but if you rotate before the translate
17:51 -!- inclooye [~inklewyay@NW-ESR1-74-215-114-218.fuse.net] has joined
#go-nuts
17:51 < skelterjohn> (which i am)
17:51 < Ginto8> a translate of (1,0) will move you differently
17:51 < skelterjohn> than if you rotate after?  yes certainly.
17:51 < Ginto8> well take a dude in the middle of a play field
17:51 < Ginto8> and you can only see in from a window above
17:52 < Ginto8> and the playfield itself can rotate
17:52 < skelterjohn> then taht would be rotating after the translation
17:52 < Ginto8> moving right from his, rotated perspective will provide a
different vector to you,the viewer
17:52 -!- incluye [~inklewyay@NW-ESR1-74-215-114-218.fuse.net] has quit [Ping
timeout: 245 seconds]
17:53 < Ginto8> so if you want him to move in a vector (1,0) from your
perspective
17:53 < skelterjohn> anyway - the pastebin i copied in here works.  honest!
17:53 < Ginto8> not the way I want, unfortunately
17:53 * Ginto8 is a picky bastard
17:53 < skelterjohn> then i'm not sure what you want
17:53 < skelterjohn> what i pasted will move a camera around a static world
17:53 < Ginto8> I'm not either, that's the issue =P
17:54 < skelterjohn> where the translation is in the world's plane, and then
the camera spins once it gets there
17:54 < Robbo_> hmmm seems virtualbox doesn't support 64bit
17:55 < Robbo_> round 2
17:55 < skelterjohn> Robbo_: live CD :)
17:55 < skelterjohn> you will lose everything when you reboot (unless you
save it onto a different disk), but it's ok for trying stuff
17:55 -!- snearch [~snearch@f053009058.adsl.alicedsl.de] has joined #go-nuts
17:57 < Robbo_> nah im just doing virtual stuff for now
17:57 < Robbo_> until parts arrive
17:57 < Robbo_> then i will partition windows and unix
17:58 < Robbo_> and thinking about a second pc to just be unix
17:58 < Robbo_> might look at prices for that now actually
17:58 < skelterjohn> if it doesn't need to be powerful, you can get some
pretty sweet and cheap computers
17:58 < skelterjohn> one of those eeeeee PCs, maybe
18:00 < Robbo_> well its basically the sitaution im in
18:00 < Robbo_> i have my main pc
18:00 < Robbo_> mobo just died
18:00 < Robbo_> so while buying new mobo i bought a better cpu
18:00 < Robbo_> and i am making a media centre for the old man
18:00 < Robbo_> but the gpu i got for it is low profile and doesnt like the
case
18:00 < Robbo_> so im thinking
18:01 < Robbo_> get a mini mobo
18:01 -!- artefon [~thiago@vpn-226.dcc.ufmg.br] has quit [Ping timeout: 260
seconds]
18:01 < Robbo_> use it with the media centre cpu
18:01 < Robbo_> then i have a spare mobo + case + some ram maybe
18:01 < Robbo_> so i get a cpu
18:01 < Robbo_> and then....
18:01 < Robbo_> my main pc needs a goo gpu soon
18:01 < Robbo_> so when i get that
18:01 < Robbo_> i have a spare gpu
18:02 < Robbo_> so i essentially have a small price to pay for a backup pc
18:02 < Robbo_> which can also be a test pc
18:02 < skelterjohn> Just got this
(http://www.newegg.com/Product/Product.aspx?Item=N82E16856158009) for a HTPC
18:02 < skelterjohn> it's pretty nice
18:02 < skelterjohn> quiet
18:03 < Robbo_> what you use it for?
18:03 < MaybeSo> see if you can pick up one of these:
http://www.seamicro.com/?q=node/38 :D
18:03 -!- wrtp [~rog@92.17.68.115] has joined #go-nuts
18:03 < skelterjohn> hooked it up to my HDTV
18:03 -!- geocalc [~geobsd@lns-bzn-60-82-254-226-156.adsl.proxad.net] has joined
#go-nuts
18:03 < skelterjohn> we watch hulu, fancast (comcast's online video
service), downloading anime, etc
18:04 < Robbo_> ah ok
18:04 < Robbo_> we dont get that 'free' luxury here
18:04 -!- lmoura [~lmoura@187.78.130.104] has quit [Ping timeout: 265 seconds]
18:04 < skelterjohn> the 2nd one is not free.  the 3rd one is as free to you
as it is to me.
18:05 -!- rp2 [~rp2@dyn068178.nbw.tue.nl] has left #go-nuts ["-"]
18:05 < skelterjohn> does hulu cost money in australia?
18:05 < Robbo_> just can't use it
18:05 < Robbo_> last time I checked
18:05 < skelterjohn> ah
18:06 < Venom_X> try a proxya
18:06 -!- GeoBSD [~geobsd@lns-bzn-26-82-254-89-236.adsl.proxad.net] has quit [Ping
timeout: 276 seconds]
18:06 -!- fenicks1 [~christian@log77-3-82-243-254-112.fbx.proxad.net] has joined
#go-nuts
18:06 < skelterjohn> MaybeSo: that computer seems a bit overwhelming for
what i need...
18:06 < Robbo_> Venom_X, too slow
18:07 < skelterjohn> what's a proxya
18:07 < Robbo_> faster to just use a torrent or something
18:07 < skelterjohn> proxy
18:07 < skelterjohn> ah
18:07 < Venom_X> proxy*
18:07 < skelterjohn> yeah - all the hulu servers are in not-australia, so
it's tough to use
18:08 < Robbo_> They reject us
18:08 < Robbo_> And proxies are slow and annoying
18:08 -!- wrtp [~rog@92.17.68.115] has quit [Client Quit]
18:08 < Robbo_> Easier to just download from somewhere else
18:09 -!- lmoura [~lmoura@187.78.130.104] has joined #go-nuts
18:09 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has quit
[Ping timeout: 264 seconds]
18:09 < skelterjohn> thepiratebay
18:13 < Robbo_> Indeed
18:13 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has quit [Remote
host closed the connection]
18:13 < Ginto8> ok can someone give me a good pastebin-like site with go
syntax highlighting?
18:14 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has joined
#go-nuts
18:14 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has joined #go-nuts
18:14 -!- mode/#go-nuts [+v iant] by ChanServ
18:15 -!- tvw [~tv@e176006156.adsl.alicedsl.de] has joined #go-nuts
18:16 < skelterjohn> i miss gopaste.org
18:16 < Ginto8> well then can someone help me figure out if there's anything
wrong with how I'm doing texture loading:
18:16 < Ginto8> http://pastebin.com/cEUCbH14
18:16 < MaybeSo> I was pointed at http://paste.pocoo.org/ the other day
18:17 -!- gr0gmint [~gr0gmint@87.60.23.38] has joined #go-nuts
18:17 < Ginto8> well then
18:17 < Ginto8> http://paste.pocoo.org/show/237130/
18:18 < Ginto8> what happens is when the texture gets applied to a quad the
quad is completely black
18:18 < Robbo_> man some of that confuses me
18:18 < Robbo_> if r,ok := textures[filename]; ok {
18:18 < skelterjohn> maybe you are applying it to the wrong side of the quad
18:18 < Robbo_> what does the comma mean?
18:18 -!- artefon [~thiago@189.107.180.178] has joined #go-nuts
18:18 < Robbo_> oh
18:18 < Robbo_> nvm
18:18 < Ginto8> Robbo_, it's a multiple assignment in a short declaration
18:18 < Robbo_> lol
18:18 < skelterjohn> Robbo_: r, ok := mapInstance[key]
18:18 < KirkMcDonald> Robbo_: You should read the spec.
18:18 < Ginto8> textures is a map
18:18 < Robbo_> yeah i just realized
18:18 < skelterjohn> ok gets true or false, depending on if the key was in
there
18:19 < Robbo_> after i asked
18:19 < Robbo_> i was like oh
18:19 < Robbo_> *feels like moron*
18:19 < Ginto8> OH
18:19 < Ginto8> found the issue
18:19 < Ginto8> I had the default tex coords fucked up
18:19 < Robbo_> Glad to see gl working :)
18:20 -!- rlab_ [~Miranda@24-185-113-92.pool.ukrtel.net] has joined #go-nuts
18:20 < Ginto8> hm
18:20 < Ginto8> seems that OpenGL texture Y coords are weird
18:20 < Ginto8> well then
18:20 * Ginto8 swaps em
18:22 -!- rlab [~Miranda@136-187-113-92.pool.ukrtel.net] has quit [Ping timeout:
258 seconds]
18:23 < Ginto8> and we have texturing!
18:23 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has joined #go-nuts
18:23 < Ginto8> http://img709.imageshack.us/img709/109/4002.png
18:24 < skelterjohn> i don't see any texturing :)
18:24 < skelterjohn> just vertex shading
18:24 -!- lmoura [~lmoura@187.78.130.104] has quit [Ping timeout: 265 seconds]
18:24 < skelterjohn> wrong link?
18:25 < Ginto8> yeah sorry
18:26 < Ginto8> http://img188.imageshack.us/img188/4859/libgtest004.png
18:26 < Ginto8> upper right one has vertex shading as well
18:27 < skelterjohn> excellent.  looks good
18:27 < skelterjohn> i'd love for some opengl package that worked on every
platform to become part of the distribution
18:28 < Robbo_> so would I
18:28 < Robbo_> I think that would be something that would bring more people
to try out the language
18:28 < Ginto8> I'm probly gonna release libG and libGB
18:29 < skelterjohn> what is the B for?
18:29 < Ginto8> batch
18:29 < KirkMcDonald> I don't necessarily think OpenGL belongs in the
standard library.
18:29 < Ginto8> it's gonna have an event driven stuff
18:29 < Ginto8> s/an //
18:29 < Ginto8> and tile/sprite rendering
18:29 -!- snearch [~snearch@f053009058.adsl.alicedsl.de] has quit [Quit:
Verlassend]
18:30 -!- boscop [~boscop@f055056041.adsl.alicedsl.de] has joined #go-nuts
18:30 < skelterjohn> KirkMcDonald: maybe not - but *some* easily installable
package that opens up opengl without regards to platform
18:30 < skelterjohn> or having to do cgo on your own
18:30 < KirkMcDonald> skelterjohn: Yes.
18:31 < Ginto8> well my lib is based on SDL
18:31 < Ginto8> so it should be cross platform
18:32 < skelterjohn> everything works, in theory :)
18:32 < skelterjohn> it will take some effort to make everything compile
easily for everyone
18:32 < skelterjohn> no small task
18:32 < Robbo_> Been working with SDL lately
18:32 < Robbo_> And guichan
18:33 < Robbo_> oh 32bit ub
18:33 < Robbo_> done
18:33 < Robbo_> lets see if this one works...
18:35 -!- tvw [~tv@e176006156.adsl.alicedsl.de] has quit [Ping timeout: 265
seconds]
18:37 -!- Fish [~Fish@9fans.fr] has quit [Ping timeout: 265 seconds]
18:39 -!- mischief [~mischief@unaffiliated/mischief] has quit [Read error:
Connection reset by peer]
18:39 -!- mischief [~mischief@unaffiliated/mischief] has joined #go-nuts
18:39 -!- mischief [~mischief@unaffiliated/mischief] has quit [Excess Flood]
18:40 -!- mischief [~mischief@unaffiliated/mischief] has joined #go-nuts
18:40 -!- mischief [~mischief@unaffiliated/mischief] has quit [Excess Flood]
18:40 -!- mischievious [~mischief@unaffiliated/mischief] has joined #go-nuts
18:40 -!- mischievious [~mischief@unaffiliated/mischief] has quit [Excess Flood]
18:41 < Ginto8> it seems that mischieve is causing mischief
18:41 < Ginto8> mischief*
18:42 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
18:43 < Ginto8> hmm...  are import's recursive?
18:44 < Ginto8> like, I know C's #include's can then #include other files
18:44 < Ginto8> but can go's imports do that?
18:44 < rsaarelm> Don't think so.
18:44 < Ginto8> okey dokey
18:44 < Ginto8> I didn't think so either, but I wanted to check
18:45 < rsaarelm> If foo imports bar and bar imports baz, you don't get baz
in foo.
18:45 < rsaarelm> Like you would with C headers.
18:46 < Ginto8> ok goodie
18:48 < skelterjohn> grading undergrad quizzes and homeworks always
depresses me
18:50 -!- mattikus [~mattikus@witty.mcs.anl.gov] has quit [Ping timeout: 240
seconds]
18:52 -!- mattikus [~mattikus@alcfwl136.alcf.anl.gov] has joined #go-nuts
18:53 -!- gid [~gid@220.253-225-62.VIC.netspace.net.au] has joined #go-nuts
18:54 -!- mischievious [~mischief@unaffiliated/mischief] has joined #go-nuts
18:54 -!- mischievious [~mischief@unaffiliated/mischief] has quit [Excess Flood]
18:54 < Robbo_> so im in ubuntu
18:54 < Robbo_> and i just get a command promt
18:54 -!- mischievious [~mischief@unaffiliated/mischief] has joined #go-nuts
18:54 < Robbo_> prompt*
18:54 < skelterjohn> good start
18:54 < skelterjohn> oh with no UI
18:54 < Robbo_> too drunk to know what im doing :D
18:54 -!- carllerche [~carllerch@99.13.242.166] has joined #go-nuts
18:54 < skelterjohn> try "startx"
18:55 < Robbo_> yes
18:55 < Robbo_> a console
18:55 < Robbo_> k
18:55 < Robbo_> getting a shit load of errs
18:55 < Robbo_> errors
18:55 < skelterjohn> k hehe
18:55 < Robbo_> i think something has gone wrong?
18:55 < skelterjohn> i don't know, then
18:56 < Robbo_> ill just wait till i patition and put it straight on my hdd
instead of a vm
18:56 -!- gnuvince_ [~vince@70.35.166.126] has joined #go-nuts
18:56 < Robbo_> and hope that works
18:57 < skelterjohn> that generally works fine
18:57 < skelterjohn> in any case - i think #ubuntu is a good place to ask
ubuntu questions
18:57 < gid> Hey, I just discovered go, and it looks great...  but I'm
bothered by the lack of exceptions.  Anybody else here have an opinion (either
way) in this area?
18:57 < sauerbraten> Robbo_: that's a good idea...  maybe you aren't drunk
then anymore ;)
18:57 < sauerbraten> Robbo_: and btw it should work
18:57 < Robbo_> lol
18:58 < Robbo_> some time this week i wont be drinking
18:58 < Robbo_> maybe....
18:58 < plexdev> http://is.gd/dqGWw by [Robert Griesemer] in go/doc/ -- go
spec: specify len/cap for nil slices, maps, and channels
18:58 -!- lmoura [~lmoura@187.78.130.104] has joined #go-nuts
18:58 -!- gnuvince [~vince@70.35.166.98] has quit [Ping timeout: 246 seconds]
18:58 < Robbo_> think ill go play some hon before i sleep
18:59 < skelterjohn> gid: exceptions in, for instance, java are just a lazy
way to propagate errors.  most exceptions that are actually caught somewhere other
than the top level are thrown from one level deeper than they're caught
18:59 < skelterjohn> which is really just a strange way of returning an
error
19:00 < skelterjohn> for systemic "eveyrthing has gone wrong" type
exceptions, panic works fine
19:01 < skelterjohn> passing up an error along with the regular return value
is easy in go, since functions can return multiple types
19:01 < gid> skelterjohn: yeah, but that's when they're done wrong, and I've
seen lots of java like that.  But done right, they can lead to really, really
clean code.
19:01 < skelterjohn> it also forces the programmer using that function to
either handle the error, or specifically ignore it
19:01 -!- g0bl1n [~anonymous@a213-22-76-1.cpe.netcabo.pt] has quit [Quit: g0bl1n]
19:01 < skelterjohn> i would argue that when it's "done right", it's
something you can do easily with error returns
19:01 < gid> Without long chains of err = fn(), err |=fn or chains of ifs
etc.  etc...
19:02 < skelterjohn> i write functions that often have a return type with
multiple values, one of which is "err os.Error"
19:03 < skelterjohn> and when i call other functions, i'll do "if val, err
:= theFunction(); err != nil { return }"
19:03 < skelterjohn> which will pass that error up to the callee if it
occurred
19:04 < gid> I agree you can do it, and I can see that multiple returns
help, but it's the sort of code your talking about that can be avoided with the
right choice of exceptions.  Ok, if you're dealing with lots of system calls you
can't, and the multi-return value is an improvement, but in application layers
above this level it's usually possible to avoid lots of passing about of error
values with the right choice of exceptions, and the code is much clean
19:06 < skelterjohn> there is a cost vs reward issue
19:06 < skelterjohn> i think the main one was what to do about exceptions
thrown in other goroutines
19:06 < skelterjohn> and in the end, i believe the dev team decided the
benefit wasn't worth the effort
19:06 < skelterjohn> i think there is something in the faq
19:06 < gid> To take an extreme example, compare a good bash script written
with set -e and the occasional || die...
19:06 < gid> Ah, I can see that.
19:07 < skelterjohn> http://golang.org/doc/go_lang_faq.html#exceptions
19:07 -!- jchico [~jchico@cpe-98-14-12-209.nyc.res.rr.com] has quit [Quit:
Leaving]
19:08 -!- b00m_chef [~watr@216.251.138.130] has joined #go-nuts
19:08 < gid> Actually, given the quality of most of the code I see using
exceptions, I can see why you'd want to ditch them too.  Except of course IMHO I
think I get it right personally, and I would miss them.....  (following you link
now)
19:10 -!- plainhao [~plainhao@mail.xbiotica.com] has quit [Quit: plainhao]
19:10 < skelterjohn> it's important to realize that the dev team's stance,
with regard to features in other languages, is to not ask "is there a reason we
can't do this too?", but instead to ask "why should we do this?  is there
something that can't be done if we don't?"
19:10 < skelterjohn> that is, they need a reason *to* include it, rather
than a reason *to not* include it
19:14 < gid> I guess that my argument is that it's not the idiom, it's the
poor choice of exceptions that are the problem, and I still believe that
exceptions really are a big improvement over passing errors everywhere.  I'm
basing a lot of this on C++ work with exception-safe cons/destructors and the old
(sadly under used) construction is resource acquisition) paradigm..  hmmm....  so
there's more to it than just the exceptions I guess.
19:15 < gid> But the "why" for me is "because I can write really clean
looking uncluttered code", which I think is a big driver of go.
19:15 < skelterjohn> yeah, i'm more or less with you
19:16 < skelterjohn> but the lack of them does not bother me as much as,
say, the lack of generics :)
19:16 -!- yaroslav [~yaroslav@ppp83-237-188-175.pppoe.mtu-net.ru] has joined
#go-nuts
19:16 < skelterjohn> no generics means there really are some things i just
cannot do efficiently, now
19:16 < skelterjohn> efficiently and safely, that is
19:17 < gid> hehe...  my guess is that many people will agree, and they'll
eventually arrive.
19:17 < gid> not as hopeful with the exceptions though.
19:17 < skelterjohn> i think that exceptions will remain off the list, yeah
19:18 -!- yaroslav [~yaroslav@ppp83-237-188-175.pppoe.mtu-net.ru] has left
#go-nuts []
19:19 <+iant> well, there is panic/recover
19:20 <+iant> I very much doubt there will be any other form of exceptions
19:21 < gid> Ah well.  I'll just have to find something to code and see if
the other goodies make up for it!
19:21 < skelterjohn> right - for systemic problems that invalidate long
chains of function calls, panic is appropriate.  for one step errors that can be
dealt with and corrected, returning an error value is appropriate
19:21 < sauerbraten> that was discussed yesterday, too...  result: most
exception handling is done by returned error codes
19:21 < gid> panic/recover is more like a setjmp/longjump thing?
19:22 < skelterjohn> i don't know...but calling recover() stops a panic from
propagating up the call stack
19:23 <+iant> I wouldn't call it setjmp/longjmp, panic does execute deferred
functions as it unwinds the stack
19:23 <+iant> that is different from longjmp
19:24 < skelterjohn> oh that's interesting.  didn't know that
19:24 < gid> scuse, brb
19:29 -!- awidegreen [~quassel@62.176.237.78] has quit [Remote host closed the
connection]
19:31 -!- carllerche [~carllerch@99.13.242.166] has quit [Quit: carllerche]
19:32 < gid> I don't think I'm really going to understand how panic/recover
might work to achieve clean code until I've absorbed defer as a control
mechanism...
19:32 < gid> might take a bit of poking
19:33 < skelterjohn> absorb meaning something more than reading the
definition?
19:33 < skelterjohn> why it's useful, etc?
19:33 < gid> yeah...  it looks like a closure that you pop at the end of
your function
19:34 < skelterjohn> here is an example that might make it make sense
19:34 < skelterjohn> say i have two functions: openTheFile() and
closeTheFile()
19:34 < skelterjohn> i write another function foo() {openTheFile(); defer
closeTheFile(); do some other stuff that may or may not panic }
19:35 < skelterjohn> now i know that if foo ever returns, either explicitly
through "return;" or a panic occuring somewhere, the file will definitely get
closed
19:35 < skelterjohn> or at least, closeTheFile() will get called
19:36 < skelterjohn> so, one of the big problems with C style error handling
was having conditions to do all these things for the various contingencies that
could happen
19:36 < skelterjohn> now you only have to defer them
19:36 < gid> Ok, so that's like the freeing resources in destructors I
mentioned, or sort of like a finally block.  That's looking good.
19:36 < skelterjohn> those are both things that have something in common
19:37 < skelterjohn> as in, they cause something to happen when you finish
the other stuff
19:38 < gid> well, that's just made me feel quite a bit better about missing
exceptions right there
19:38 < skelterjohn> excellent.
19:40 < gid> I'm keen to actually do something, is there a clearinghouse for
productive ways to contribute somewhere?
19:41 < skelterjohn> a lot of people ask that question, but it always seems
like the wrong question to me
19:41 < skelterjohn> i think the question should be "what kinds of things do
i like to do.  i'll try it in go!"
19:44 < plexdev> http://is.gd/dqK51 by [Russ Cox] in go/src/pkg/crypto/rand/
-- crypto/rand: add missing Unlock
19:45 < gid> Well, on a home front I'm a gentoo user, and I think that as a
package manager, portage is like a big glob of twigs and feathers held together
with bird poo.  It would be interesting to tackle that; except I strongly suspect
pointless.
19:45 < anykey> skelterjohn: I think people are not good at picking things
to play around with, and look for what's "needed" in order to make go better, so
they'd try a "real" task in go
19:46 < gid> It's the old...  if nobody's going to use it, why do it?
19:46 < anykey> skelterjohn: which is why they ask that question to get one
handed to them :-)
19:46 < skelterjohn> i suppose
19:46 < skelterjohn> i'm not saying it's not a valid way to approach things.
it's just not the way i approach things.
19:46 < gid> the hand of go..
19:47 < anykey> gid: I'd do something I'd have fun with.  If portage
scratches your itch, why not do it?
19:49 < skelterjohn> portage sounds like a complex task to learn a language
with
19:49 < gid> ...  plus: it's got some interesting graph structures, does a
fair bit of OS interaction and dealing with shell scripting etc.
19:49 < skelterjohn> i found that it took me a few iterations of projects to
get the go style right.  assuming i have, at this point
19:49 < gid> ...minus: I'll get BBQ'd not just flamed.
19:50 < anykey> okay, I just wanted to inspire you to look for fun in
programming
19:50 < skelterjohn> now i feel like a downer
19:50 < anykey> heh
19:50 < gid> No, you're right, I agree.  After all, go really did look like
fun, that's why I'm here at all.
19:50 < anykey> hard to get right.
19:50 < skelterjohn> with me, for instance, i'm a grad student doing machine
learning
19:51 < skelterjohn> so i wanted to use go for some inference stuff
19:51 < skelterjohn> which requires linear algebra to do efficiently
19:51 < skelterjohn> so i wrote gomatrix
19:51 < anykey> I am mostly lurking here in order to read my irc logs some
day and have some use of what has been said
19:51 < skelterjohn> and with the help of a few others, made it into
something fairly stable and idiomatic
19:52 < gid> anykey, that's very forward thinking of you
19:52 < sauerbraten> are there methods to get information about the system,
like what OS is used and which ind of processor?  in python there are those in
os-pkg, but i couldn't find them in go's os pkg
19:53 < anykey> I have not been very good at my first try to do something
with go, but my boss has authorized me to try go for production work, and if it
doesn't work out, fine, but if it does work out, there's more programming going to
be allotted to go.
19:53 < gid> skelterjohn, you're holding the maybe this can be of real use
card then
19:53 < skelterjohn> yeah - the fact that a good matrix library would be
well-used was very good encouragement to work hard on it
19:54 < anykey> skelterjohn: I am a software engineer, schooled in
traditional software engineering.  go is downright an adventure for me, and I like
it (I think.)
19:54 < anykey> it's a fine deviation from other languages.
19:54 < skelterjohn> i like it
19:55 < skelterjohn> i don't bother learning new languages very often
19:55 < skelterjohn> so far it's C/C++, java, python, objective-C (for
iPhone game dev) and now Go
19:55 < skelterjohn> and i can write small amounts of code in other
languages
19:55 < anykey> I am really looking forward to a new gc for go, because the
gcc backend will have gc by then; gcc integration would really be a big selling
point for some people I know
19:56 < skelterjohn> but not particularly well
19:56 < skelterjohn> you mean like...  gccgo?
19:56 < anykey> yeah
19:56 < skelterjohn> ok, it exists
19:56 < skelterjohn> ?
19:56 < skelterjohn> party time!
19:56 < anykey> it has no garbage collection
19:56 < skelterjohn> ahh
19:57 < anykey> "long running programs are not supported"
19:57 < anykey> it WILL have the new gc, when that's finished.
19:57 < skelterjohn> gc meaning both "go compiler" and "garbage collector"
always gets me
19:57 < anykey> there's virtually no way to free memory in gccgo.
19:57 < skelterjohn> and when you say gc and gcc in the same sentence, i
assumed compiler
19:57 < anykey> yeah, my bad.
19:57 < anykey> okay.
19:57 < anykey> but I am looking forward to it.
19:58 < skelterjohn> not your fault - i think they should have called it goc
instead of gc
19:58 < gid> That's what I thought.  I like terse, I'm very tired of the the
multicoloured raincoat of C++, python is ugly, java is really long-winded.  In
fact the language I've liked most in recent years has been C#. So go seems like a
breath of fresh air to me.
19:58 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has quit [Quit:
WeeChat 0.3.3-dev]
19:58 < skelterjohn> yeah - i feel like it's impossible to write java code
without a massive tank of an IDE backing you up
19:58 < sauerbraten> has anybody actually read my question?
19:58 < skelterjohn> to write boilerplates and refactor
19:59 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has joined
#go-nuts
19:59 < skelterjohn> sauerbraten: i don't know the answer to your question
19:59 < gid> Anyway, thx for the discussion guys, I wish you well with your
respective projects
19:59 < sauerbraten> ok cause normally i always got an answer within 2 mins
:) so now i was a bit confused :D
19:59 < sauerbraten> i'll search the pkg docs
20:01 < sauerbraten> ah os.Hostname() returns the pc's name in a network...
that's a beginning
20:01 < anykey> sauerbraten: whoops sorry, I think you might examine whether
/proc exists
20:01 -!- bubobibeba [~chatzilla@205.236.184.16] has joined #go-nuts
20:01 < skelterjohn> anykey: that isn't exactly os independent
20:02 < sauerbraten> that's what i wanted to say too
20:02 < sauerbraten> Go runs on win, doesn't it?
20:02 < anykey> no.  windows doesnt have proc.  but hey, it's a start
20:02 < skelterjohn> os x doesn't, either
20:02 < skelterjohn> go has some windows ports.  i think it might be
officially supported, now
20:02 < sauerbraten> so if /proc exists, it's most likely a unix/linux
system?
20:03 < skelterjohn> sauerbraten: almost certainly.  well, i could make such
a directory on my computer
20:03 < anykey> in Linux, you can obtain kernel version from /proc/version,
and cpu information /proc/cpuinfo.  I dunno about others.
20:03 < KirkMcDonald> Windows support is still experimental, as I understand
it.
20:03 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has quit [Client
Quit]
20:03 < sauerbraten> mhm ok
20:03 < KirkMcDonald> (I would not e.g.  run a production service written in
Go on Windows, yet.)
20:03 < anykey> I haven't used Windows in almost a decade.
20:03 < sauerbraten> let me see what i can do with these info
20:05 < anykey> sauerbraten: if you're gonna write a module that does it, in
case it hasn't been done before, you could include that as a form of detection for
linux systems.  A common struct could still be used, with unknown values for what
you don't know.
20:06 < skelterjohn> i don't think it's a good way to detect linux systems.
*if* you know it's linux, then you can examine the files in /proc
20:06 < skelterjohn> but if there are files in /proc, it is not necessarily
linux
20:06 -!- b00m_chef [~watr@216.251.138.130] has quit [Ping timeout: 260 seconds]
20:06 < sauerbraten> anykey: i'll think about it...  atm i just want to get
information about the system my program is running on, so not much info, just
enoug
20:06 < sauerbraten> h
20:07 < sauerbraten> shouldn't Go itself know on which platform it is
installed?
20:07 < skelterjohn> seems reasonably to me :)
20:07 < anykey> yes, umm, the environment vars GOARCH and GOOS are there,
but I don't know, I think they are compile-time only
20:08 < skelterjohn> can't depend on env vars either :)
20:08 < anykey> I mean, a machine running your program might not necessarily
define them
20:08 < skelterjohn> one thing to keep in mind - the OS and cpu arch are
known at compile time
20:08 < skelterjohn> if not at code writing time
20:08 < sauerbraten> yeah right...  didn't think about that
20:09 < skelterjohn> not sure how to leverage that knowledge, at the moment
20:09 -!- gr0gmint [~gr0gmint@87.60.23.38] has quit [Quit: leaving]
20:09 < sauerbraten> but a program is normally used ready-to-run, as binary,
right?
20:10 < sauerbraten> can someone explain the difference between
os.ForkExec() and sxec.Run()?
20:10 < sauerbraten> *exec.Run
20:10 < sauerbraten> *+to mee
20:10 < anykey> is there a ftw() or nftw() in Go?
20:11 < skelterjohn> exec.Run is a function with a receiver type
20:11 < skelterjohn> so you have a Cmd struct
20:11 < KirkMcDonald> skelterjohn: No, it is not.
20:11 < skelterjohn> my bad
20:11 < skelterjohn> you're right
20:11 < KirkMcDonald> skelterjohn: It *returns* a Cmd struct.
20:11 < skelterjohn> it's listed right next to some functions with receiver
types, though :)
20:11 < KirkMcDonald> It is effectively the constructor for the Cmd struct.
20:12 < skelterjohn> i wonder why it gets indented under the Cmd struct?
20:12 < skelterjohn> in the godoc
20:12 < KirkMcDonald> exec.Run takes three ints, representing what to do
with the standard pipes.
20:12 < KirkMcDonald> os.ForkExec takes a slice of *File objects to
represent them.
20:13 < sauerbraten> what a huge difference :D
20:13 < KirkMcDonald> ForkExec returns a pid, exec.Run returns a Cmd object
(which contains the pid).
20:14 < sauerbraten> maybe they should be merged?
20:14 < KirkMcDonald> sauerbraten: But it is a big difference!  The ints
accepted by exec.Run aren't pids, they are supposed to be one of a few predefined
constants.
20:14 < KirkMcDonald> sauerbraten: I suspect that one calls the other.
20:14 < KirkMcDonald> (Specifically, I bet that exec.Run calls os.ForkExec.)
20:14 -!- bubobibeba [~chatzilla@205.236.184.16] has quit [Remote host closed the
connection]
20:16 < sauerbraten> KirkMcDonald: wouldn't it be easier to make it one
method, with a bool parameter with wich you can tell the method how to handle the
std pipes?
20:16 -!- artefon [~thiago@189.107.180.178] has quit [Ping timeout: 265 seconds]
20:17 < KirkMcDonald> os.ForkExec is a fairly literal wrapper around the
relevant syscalls.
20:18 -!- artefon [~thiago@189.107.180.178] has joined #go-nuts
20:18 < KirkMcDonald> It is useful to have such things.
20:18 < KirkMcDonald> exec.Run is marginally easier to use for many
use-cases.
20:18 < sauerbraten> mhm ok, i think you are the more eperienced of us, so
i'll believe you :)
20:19 -!- 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/]
20:19 < KirkMcDonald> sauerbraten:
http://en.wikipedia.org/wiki/Exec_(operating_system)
20:20 < sauerbraten> that's what os.Exec() does, right?
20:20 -!- emmanuel_oga [~emmanuelo@190.247.41.202] has joined #go-nuts
20:20 < KirkMcDonald> Yes.
20:20 < KirkMcDonald> Exec is just a wrapper around that syscall.
20:20 -!- emmanueloga [~emmanuelo@190.247.41.202] has quit [Read error: No route
to host]
20:22 < KirkMcDonald> So ForkExec() forks a subprocess, then has the
subprocess replace itself with exec().  (Which is the normal way to spawn a
subprocess in Unix-like systems.)
20:22 < sauerbraten> ForkExec() is a bit like go(os.Exec(...)) then?
20:23 < sauerbraten> a very little BIT
20:24 < skelterjohn> saying go foo() does not (necessarily spawn a process
20:24 < KirkMcDonald> Sorrrt of.
20:24 < sauerbraten> are their any processes that always run on every unix /
linux system?  maybe one could get info with the proc pkg then
20:25 < sauerbraten> skelterjohn: oh right...  but kind of it's the same
20:25 < skelterjohn> i think the best answer would be to make a package that
uses cgo to look these things up
20:25 < KirkMcDonald> When doing a fork/exec, there are also some
implications for open file descriptors.
20:25 < KirkMcDonald> src/pkg/syscall/exec.go contains the actual
implementation of the ForkExec function.
20:26 < KirkMcDonald> Most of the code is just duplicating fds.
20:28 < KirkMcDonald> The one thing I would do to exec.Run is have it take
(say) three interface{} values instead of three ints.
20:28 < skelterjohn> why is that?
20:28 < KirkMcDonald> Then allow you to pass either one of those integer
constants, or a *File.
20:28 < skelterjohn> ah
20:28 < skelterjohn> you want a union type
20:29 < KirkMcDonald> Hmm.  Not really.
20:29 < sauerbraten> that's what i wanted too :/
20:29 < sauerbraten> or not >.<
20:29 < KirkMcDonald> At least, not a union in the C sense.
20:29 < skelterjohn> well, you're treating the interface{} as either one of
two types.  any others would presumably be an error
20:29 < skelterjohn> not type-safe unless you've got built-in union types
20:29 < KirkMcDonald> skelterjohn: Right.  Easily done with a type-switch.
20:30 < KirkMcDonald> If you hit the default case, panic().
20:30 < skelterjohn> eek!
20:30 < Namegduf> Or
20:30 < Arimoto> I recently saw a C++ JSON library that has a Json::Value
class with isString, asString, isInt, asInt, isArray, asArray, etc.  I was
wondering, since Go lacks generics, would something like that be a good approach
to supporting basic types in containers without doing typecasts?
20:30 < Namegduf> Don't use an interface{} and circumvent compiletime type
safety
20:30 < skelterjohn> i'd rather have the compiler tell me it's wrong, since
it's something you can know at compile time
20:30 < Namegduf> Use a proper interface
20:30 < KirkMcDonald> Namegduf: Pfft.  You're no fun.
20:30 < KirkMcDonald> Namegduf: That's probably wise.
20:31 < sauerbraten> so at any Go core developer hanging out here: make a
platform-independent pkg via that you can gain info about the system running the
program!
20:31 < skelterjohn> i think a union type similar to interface would be
pretty useful
20:31 < Namegduf> "os"
20:31 < Namegduf> sauerbraten: You could try filing a bug for specific
functions to add.
20:32 < Namegduf> And if they're interested, offering a patch.  :P
20:32 < KirkMcDonald> All you'd really need is an interface { Fd() int }
20:32 < KirkMcDonald> Well, maybe not.
20:32 < KirkMcDonald> Since os.ForkExec literally wants *File.
20:32 < sauerbraten> lol i am far too bad at programming to offer a patch to
them :D it would be useless to them and embarrassing for me :D
20:32 < skelterjohn> yeah
20:32 < KirkMcDonald> Change os.ForkExec to take an interface { Fd() int } ?
20:33 < KirkMcDonald> (Since that's all it does with the *File things you
pass to it.)
20:33 -!- carllerche [~carllerch@99.13.242.166] has joined #go-nuts
20:33 < skelterjohn> make a type Fd int
20:33 < Namegduf> I think the idea is that you don't need to use .Fd()
manually
20:33 < KirkMcDonald> Then exec.Run can check to see if the value in the
interface is one of the predefined constants.
20:33 < skelterjohn> and func (f Fd) Fd() int {return int(f)}
20:33 < skelterjohn> or something
20:34 < KirkMcDonald> Otherwise, pass it to os.ForkExec directly.
20:36 < sauerbraten> gotta go, see you tomorrow maybe :)
20:37 -!- sauerbraten [~sauerbrat@p508CF542.dip.t-dialin.net] has quit [Remote
host closed the connection]
20:38 -!- artefon [~thiago@189.107.180.178] has quit [Ping timeout: 245 seconds]
20:39 -!- RobertLJ [~RobertLJ@c-68-44-163-191.hsd1.nj.comcast.net] has left
#go-nuts []
20:42 -!- iant1 [~iant@81-233-149-58-no82.tbcn.telia.com] has joined #go-nuts
20:42 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has quit [Read error:
Connection reset by peer]
20:43 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has joined
#go-nuts
20:53 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has quit [Quit:
WeeChat 0.3.3-dev]
20:53 -!- dju_ [dju@fsf/member/dju] has quit [Read error: Connection reset by
peer]
20:56 -!- bmizerany [~bmizerany@dsl081-064-072.sfo1.dsl.speakeasy.net] has joined
#go-nuts
21:01 -!- dju [dju@fsf/member/dju] has joined #go-nuts
21:01 -!- wrtp [~rog@92.17.72.146] has joined #go-nuts
21:02 -!- iant1 [~iant@81-233-149-58-no82.tbcn.telia.com] has quit [Quit:
Leaving.]
21:17 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has quit [Remote host closed the
connection]
21:17 -!- rlab_ [~Miranda@24-185-113-92.pool.ukrtel.net] has quit [Read error:
Connection timed out]
21:18 -!- binarypie [~binarypie@adsl-99-50-122-26.dsl.pltn13.sbcglobal.net] has
joined #go-nuts
21:18 -!- gid [~gid@220.253-225-62.VIC.netspace.net.au] has quit [Ping timeout:
240 seconds]
21:19 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined
#go-nuts
21:22 -!- General13372 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit
[Ping timeout: 265 seconds]
21:35 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
21:39 -!- Agon-laptop
[~marcel@HSI-KBW-095-208-003-128.hsi5.kabel-badenwuerttemberg.de] has joined
#go-nuts
21:40 -!- surma [~surma@95-88-90-24-dynip.superkabel.de] has joined #go-nuts
21:40 -!- surma [~surma@95-88-90-24-dynip.superkabel.de] has left #go-nuts []
21:42 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has quit [Quit:
skelterjohn]
21:48 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
21:52 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has quit [Client Quit]
21:58 -!- eikenberry [~jae@ivanova.zhar.net] has joined #go-nuts
22:01 -!- carllerche [~carllerch@99.13.242.166] has quit [Quit: carllerche]
22:02 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
22:04 -!- Adys_ [~Adys@unaffiliated/adys] has joined #go-nuts
22:05 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
22:07 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 240 seconds]
22:07 -!- LeNsTR [~quassel@unaffiliated/lenstr] has joined #go-nuts
22:15 -!- LeNsTR [~quassel@unaffiliated/lenstr] has quit [Read error: Connection
reset by peer]
22:28 < Ginto8> ok quick question
22:28 < Ginto8> I have type X with method foo()
22:29 < Ginto8> and I have type Y struct { X }
22:29 < Ginto8> and Y has a method foo()
22:29 < Ginto8> and I have a Y blarg
22:29 < Ginto8> calling blarg.foo() calls Y.foo(), and I have to explicitly
go blarg.X.foo() to call X.foo() correct?
22:31 -!- LeNsTR [~quassel@unaffiliated/lenstr] has joined #go-nuts
22:34 -!- TR2N [email@89.180.153.197] has joined #go-nuts
22:35 -!- jdp [~gu@24.238.32.162.res-cmts.segr.ptd.net] has joined #go-nuts
22:38 < KirkMcDonald> Yes.
22:39 -!- wrtp [~rog@92.17.72.146] has quit [Quit: wrtp]
22:40 < Ginto8> ok thanks
22:42 -!- ShadowIce [pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
22:47 -!- jdp [~gu@24.238.32.162.res-cmts.segr.ptd.net] has quit [Ping timeout:
240 seconds]
22:48 -!- jdp [~gu@24.238.32.162.res-cmts.segr.ptd.net] has joined #go-nuts
22:49 -!- anykey [~anykey@unaffiliated/anykey] has quit [Quit: leaving]
22:58 -!- jdp [~gu@24.238.32.162.res-cmts.segr.ptd.net] has quit [Ping timeout:
252 seconds]
23:02 -!- inclooye [~inklewyay@NW-ESR1-74-215-114-218.fuse.net] has left #go-nuts
[]
23:02 -!- incluye [~inklewyay@NW-ESR1-74-215-114-218.fuse.net] has joined #go-nuts
23:07 -!- franksalim [~frank@adsl-75-61-93-123.dsl.pltn13.sbcglobal.net] has
joined #go-nuts
23:09 -!- LeNsTR [~quassel@unaffiliated/lenstr] has quit [Read error: Operation
timed out]
23:09 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection]
23:14 -!- mattikus [~mattikus@alcfwl136.alcf.anl.gov] has quit [Quit: mattikus]
23:16 -!- mattikus [~mattikus@witty.mcs.anl.gov] has joined #go-nuts
23:21 -!- mattikus [~mattikus@witty.mcs.anl.gov] has quit [Ping timeout: 258
seconds]
23:26 -!- geocalc [~geobsd@lns-bzn-60-82-254-226-156.adsl.proxad.net] has quit
[Quit: Lost terminal]
23:28 -!- LeNsTR [~quassel@unaffiliated/lenstr] has joined #go-nuts
23:30 -!- TR2N` [email@89.180.153.197] has joined #go-nuts
23:35 -!- TR2N [email@89.180.153.197] has quit [Ping timeout: 240 seconds]
23:35 < plexdev> http://is.gd/dqXd3 by [Rob Pike] in go/doc/ -- Go
specification: Lock down some details about channels and select:
23:35 -!- mattikus [~mattikus@witty.mcs.anl.gov] has joined #go-nuts
23:36 -!- mattikus [~mattikus@witty.mcs.anl.gov] has quit [Remote host closed the
connection]
23:42 -!- jdp [~gu@24.238.32.162.res-cmts.segr.ptd.net] has joined #go-nuts
23:47 -!- [Pete_27] [~noname@115-64-1-61.static.tpgi.com.au] has quit [Ping
timeout: 258 seconds]
23:48 -!- [Pete_27] [~noname@115-64-1-61.static.tpgi.com.au] has joined #go-nuts
23:50 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
23:50 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
23:51 -!- LeNsTR [~quassel@unaffiliated/lenstr] has quit [Remote host closed the
connection]
23:54 -!- Venom_X [~pjacobs@71.21.124.111] has quit [Quit: Venom_X]
23:54 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
23:59 -!- Project_2501 [~Marvin@82.84.92.36] has quit [Quit: E se abbasso questa
leva che succ...]
--- Log closed Wed Jul 14 00:00:12 2010