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

--- Log opened Wed Nov 18 00:00:02 2009
--- Day changed Wed Nov 18 2009
00:00 < jgoebel> i just want it to compile my package and optionally
"states" if i ask it to
00:00 -!- vdrab [n=vdrab@cap003-017.kcn.ne.jp] has joined #go-nuts
00:00 < WalterMundt> jgoebel: standard make issue; indents for commands must
be actual tab characters
00:00 < nbaum> make says that if you've used spaces instead of tabs.
00:01 -!- svet [n=svet@adsl-99-162-123-95.dsl.austtx.sbcglobal.net] has left
#go-nuts []
00:01 < jgoebel> sweet :)
00:04 -!- vdrab [n=vdrab@cap003-017.kcn.ne.jp] has quit [Client Quit]
00:07 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has joined #go-nuts
00:07 < jgoebel> hmmm
00:08 < jgoebel> anyway to set a default argument for a function so i can
call it with fewer parameters?
00:08 < mitchellh> jgoebel: Language specification is there for that reason:
http://golang.org/doc/go_spec.html#Function_declarations
00:09 < KirkMcDonald> (The answer is "no.")
00:10 < jgoebel> but i can do a ...
00:10 -!- evilhackerdude [n=stephan@82.113.121.195] has quit [Read error: 60
(Operation timed out)]
00:14 -!- Wiz126 [n=Wiz@72.20.220.150] has joined #go-nuts
00:16 -!- Cyprien [n=Cyprien@43-180.203-62.cust.bluewin.ch] has quit [Read error:
110 (Connection timed out)]
00:16 -!- mxpxpod [n=bryan@unaffiliated/mxpxpod] has quit [Remote closed the
connection]
00:20 -!- nsa310 [n=Adium@145.116.229.86] has joined #go-nuts
00:20 -!- nsa310 [n=Adium@145.116.229.86] has left #go-nuts []
00:22 -!- gkmngrgn [n=gkmngrgn@unaffiliated/gkmngrgn] has quit ["Leaving"]
00:23 -!- metageorge [n=metageor@212.251.110.2.dsl.dyn.forthnet.gr] has joined
#go-nuts
00:27 -!- aninhumer
[n=aninhume@client-81-105-73-94.lds-bng-011.adsl.virginmedia.net] has quit
["Ex-Chat"]
00:28 -!- Jan_Flanders [n=chatzill@d54C1E33B.access.telenet.be] has quit
["Chatzilla 0.9.75.1 [SeaMonkey 1.1.18/2009082513]"]
00:30 < NoPyGod> anyone here interested in buying fuckoff@hotmail.com
00:30 < NoPyGod> :P
00:33 < jgoebel> how can i check and see if a map has a certain key?
00:34 < scandal> _, ok := m["key"]; if ok { ...key present...  }
00:34 -!- ian1 [n=iant@67.218.102.226] has joined #go-nuts
00:34 -!- Perberos [n=Perberos@190.49.39.117] has quit ["Ex-Chat"]
00:35 -!- sm [n=sm@pool-71-189-233-10.lsanca.dsl-w.verizon.net] has quit [" "]
00:37 -!- hasenj [n=hasenj@S010600032f3629c8.cg.shawcable.net] has joined #go-nuts
00:38 -!- fgb [n=fgb@190.246.85.45] has joined #go-nuts
00:39 -!- iant [n=iant@nat/google/x-sqciwazqxkbmrczn] has quit [Read error: 110
(Connection timed out)]
00:40 -!- evilhackerdude [n=stephan@e181124118.adsl.alicedsl.de] has joined
#go-nuts
00:40 -!- JAH [n=jeff@ip70-174-143-177.dc.dc.cox.net] has left #go-nuts
["Leaving"]
00:40 < jgoebel>
http://github.com/yyyc514/go_datamapper/blob/master/states.go
00:41 -!- tcpip40001 [n=fulano@dsl-emcali-190.99.193.179.emcali.net.co] has joined
#go-nuts
00:41 -!- mode/#go-nuts [+v iant] by ChanServ
00:42 -!- hsuh [n=hsuh@c925a62a.virtua.com.br] has joined #go-nuts
00:43 -!- WalterMundt [n=waltermu@twiki/developer/EtherMage] has quit ["Leaving."]
00:43 -!- metageorge [n=metageor@212.251.110.2.dsl.dyn.forthnet.gr] has left
#go-nuts []
00:44 -!- Jan_Flanders [n=chatzill@d54C1E33B.access.telenet.be] has joined
#go-nuts
00:46 -!- kaib [n=kaib@c-76-102-52-156.hsd1.ca.comcast.net] has joined #go-nuts
00:46 -!- mode/#go-nuts [+v kaib] by ChanServ
00:47 < alexsuraci> jgoebel: neat!
00:47 -!- kaib_ [n=kaib@216.239.45.130] has joined #go-nuts
00:47 -!- mode/#go-nuts [+v kaib_] by ChanServ
00:47 -!- hsuh [n=hsuh@c925a62a.virtua.com.br] has left #go-nuts ["Killed buffer"]
00:49 -!- StDan [n=danielb@124-197-59-227.callplus.net.nz] has quit []
00:49 -!- cpr420 [n=cpr420@67.165.199.143] has joined #go-nuts
00:52 < jgoebel> alexsuraci: no i want to see if i can push the global
methods down into model classes :)
00:53 < jgoebel> *now
00:58 < jgoebel> <epoch>: implicit assignment of sqlite3.Handle field
'cptr' in method receiver
00:58 < jgoebel> now i'm not sure what that means :)
00:59 <+iant> jgoebel: it means that you are implicitly changing the value
of a field which is hidden by another package
00:59 -!- Queue29 [n=Queue29@cpe-70-112-194-192.austin.res.rr.com] has joined
#go-nuts
00:59 < jgoebel> how
00:59 <+iant> jgoebel: this typically means that you defined a method on a
value rather than a pointer, and the struct has a hidden field, and you called the
method from a different package
00:59 < jgoebel> my find method does nothing
00:59 < jgoebel> *reading*
01:00 -!- rbohn [n=rbohn@192.206.100.4] has quit ["ChatZilla 0.9.85 [Firefox
3.0.15/2009101601]"]
01:01 < jgoebel> func (m Model) Find() {
01:01 < jgoebel> println("working");
01:01 < jgoebel> }
01:01 < jgoebel> is all i have
01:01 -!- gilmarsouza [n=gilmar@187.19.0.13] has joined #go-nuts
01:01 <+iant> so, you are using a value receiver rather than a pointer
receiver
01:01 <+iant> that is, you wrote m Model rather than m *Model
01:01 < jgoebel> ah
01:01 <+iant> that means that anybody who calls your method has to copy
their Model object
01:01 < jgoebel> hmmm
01:02 -!- rickard__ [n=rickard@v-412-ostermalm-112.bitnet.nu] has joined #go-nuts
01:02 < jgoebel> i'm not sure i understand how hidden connections work
01:02 -!- tetha [n=hk@217.238.104.180] has quit [Nick collision from services.]
01:02 * jgoebel pasted http://pastie.textmate.org/private/jyhzt6kr1lirm9djf33eyg
01:02 -!- tetha [n=hk@pD9EE6663.dip.t-dialin.net] has joined #go-nuts
01:02 <+iant> there is a field in Model named "cptr"
01:02 < jgoebel> Find is a method on Model
01:02 -!- diltsman [n=diltsman@76.8.194.226] has quit []
01:02 <+iant> it is hidden because it starts with a lower case letter
01:02 -!- assiss [n=assiss@219.143.153.59] has joined #go-nuts
01:02 < jgoebel> but it just says: State is not an expression
01:02 -!- path__ [n=path@115.240.9.1] has joined #go-nuts
01:03 < jgoebel> or i guess i need an instance or state?
01:03 < jgoebel> yes :)
01:03 -!- ergodicsum [n=ergudics@70.158.116.43] has joined #go-nuts
01:03 <+iant> yes, State is a type, not an expression
01:03 -!- kaib [n=kaib@c-76-102-52-156.hsd1.ca.comcast.net] has quit [Read error:
110 (Connection timed out)]
01:03 < jgoebel> but i could set state equal to an instance of model
01:04 < jgoebel> State := Model{}
01:05 -!- StDan [n=danielb@124-197-59-227.callplus.net.nz] has joined #go-nuts
01:07 <+iant> jgoebel: when you do that you are declaring the name State as
a variable in local scope, hiding the name State in package scope
01:07 -!- vegy [i=neki@89-212-27-225.dynamic.dsl.t-2.net] has quit ["(
www.nnscript.com :: NoNameScript 4.22 :: www.esnation.com )"]
01:07 -!- zero-1 [n=macbook@201.170.214.25.dsl.dyn.telnor.net] has joined #go-nuts
01:08 -!- timmcd [n=Adium@97-117-100-106.slkc.qwest.net] has joined #go-nuts
01:08 < timmcd> Is it possible to use cgo to embed Lua?
01:08 < timmcd> or Io?
01:09 -!- zero-1 [n=macbook@201.170.214.25.dsl.dyn.telnor.net] has quit [Client
Quit]
01:09 < jgoebel> iant: i would probably var it outside the main loop so it's
global
01:09 -!- assiss [n=assiss@219.143.153.59] has quit [Remote closed the connection]
01:09 <+iant> jgoebel: well, you can't define State as both a global type
and a global variable
01:09 < jgoebel> right
01:10 < jgoebel> State would have to become StateType
01:10 -!- assiss [n=assiss@219.143.153.59] has joined #go-nuts
01:10 < jgoebel> or something :)
01:10 <+iant> yes
01:10 < jgoebel> or StateData
01:10 -!- BMeph [n=black_me@65.103.151.24] has joined #go-nuts
01:11 < alexsuraci>
http://mail.google.com/a/toogeneric.com/#label/Go/12504c9093702c6c hahaha.
01:11 < alexsuraci> err.
01:11 < alexsuraci> well, so much for that.
01:11 -!- kaib [n=kaib@216.239.45.130] has quit []
01:11 < jgoebel> can't read that
01:11 < alexsuraci> I feel like I just linked to localhost :/
01:11 < jgoebel> ha
01:11 < jgoebel> indeed
01:12 < jimi_hendrix> in a struct, do the names of public members need to be
capitolized?
01:12 < alexsuraci> jimi_hendrix: yes
01:12 -!- RayNbow [i=kirika@scientia.demon.nl] has quit ["When science finally
locates the center of the universe, some people will be surprised to learn they're
not it"]
01:12 < jimi_hendrix> ok
01:12 -!- assiss [n=assiss@219.143.153.59] has left #go-nuts []
01:13 < timmcd> Any information on how to embed Lua or io in Go?
01:14 < uriel> timmcd: why do you want to do that?
01:14 < mitchellh> timmcd: It should be pretty simple, since you'd jsut have
to create a wrapper around the Lua API using cgo.  It would be more time consuming
than anything else
01:15 < mitchellh> timmcd: But I remember the Lua API being very clean and
simple, so I you'd just have to wrap I believe its Lua_State* and then just the
push/pop functions
01:16 < timmcd> mitchellh: Ok, thanks!  =D
01:16 < timmcd> uriel: So the users of my MUD client have some way to script
;)
01:16 < mitchellh> timmcd: Just look into cgo (and look at the source at
src/misc/cgo i believe for examples)
01:16 < mitchellh> :)
01:16 < uriel> timmcd: ah, I guess that is quite reasonable
01:17 -!- hstimer [n=hans@70.90.170.37] has joined #go-nuts
01:18 < timmcd> mitchellh: Would it be that simple to have Lua call the Go
functions?  I'd have to wrap that part of the stuff as well, right?
01:18 < mitchellh> timmcd: Umm, that I'm not so sure about.  I'm not sure
how Go handles function pointers and so on (which if I remember right you have to
push down a stack).
01:19 < timmcd> hmm
01:19 < uriel> I could be wrong, but if I remeber correctly it is not yet
possible to call Go from C
01:19 < timmcd> Perhaps it should be channel based ;)
01:19 < uriel> so that might be an issue
01:19 -!- rickard [n=rickard@v-412-ostermalm-112.bitnet.nu] has quit [Read error:
110 (Connection timed out)]
01:19 < mitchellh> uriel: There we go.
01:19 < timmcd> push functions up and down a channel for each side to
interpret
01:19 < mitchellh> up to you!
01:19 -!- fhs [n=fhs@pool-72-89-203-117.nycmny.east.verizon.net] has joined
#go-nuts
01:19 < timmcd> uriel: Oh yeah, thanks
01:20 -!- delza [n=delza@209-52-232-202.vlan452.static.ucc-net.ca] has quit [Read
error: 110 (Connection timed out)]
01:20 < uriel> hey, don't take my word as gospel, I'm just vaguely
remembering something, which could be wrong
01:20 < jgoebel> Users/jgoebel/gosrc/go_datamapper/dm.go:43: implicit
assignment of sqlite3.Handle field 'cptr' in field value
01:20 < jgoebel> i'm getting it again
01:20 < timmcd> NO yeah I had read that earlier today
01:20 < timmcd> just forgot
01:20 * jgoebel pasted http://pastie.textmate.org/private/pw4artceokuoms9m7zaefa
01:20 < jgoebel> line 2
01:21 < jgoebel> hmmm
01:21 -!- raichoo [n=raichoo@i577B8E89.versanet.de] has quit
["http://raichoo.blogspot.com"]
01:21 < jgoebel> so i changed my connetion type to a pointer and it works
01:22 -!- limec0c0nut [n=michael@c-24-12-53-42.hsd1.il.comcast.net] has joined
#go-nuts
01:23 -!- ergodicsum [n=ergudics@70.158.116.43] has quit [Read error: 145
(Connection timed out)]
01:23 < evilhackerdude> ok, unimportant but minor annoyance imho: is there a
reason why gofmt uses tabs and not spaces?
01:23 < timmcd> tabs ftw, thats why.  ^_^
01:23 < jgoebel> cause google likes tabs
01:23 < StDan> ftw?
01:24 < evilhackerdude> ok, whatever :)
01:24 < timmcd> Sorry, gamer slang.  For the win.
01:24 < jimi_hendrix> ftw ftw
01:24 < uriel> really, the least said about tabs vs.  spaces, the much
better
01:24 < jimi_hendrix> would someSlice[2:]; pull the third element to the end
of the slice?
01:24 < alexsuraci> evilhackerdude: you could always use gofmt -spaces
01:25 < evilhackerdude> alexsuraci: thx!
01:25 < evilhackerdude> uriel: right
01:25 < jimi_hendrix> or is that an error
01:25 < alexsuraci> evilhackerdude: you may also have to set -tabwidth to
something more sensible than 8, it might use that for the indent level
01:25 < alexsuraci> s/indent level/number of spaces
01:26 < evilhackerdude> good to know
01:26 < alexsuraci> (see gofmt --help)
01:27 -!- inittab [n=dlbeer@ip-118-90-113-64.xdsl.xnet.co.nz] has joined #go-nuts
01:27 < jimi_hendrix> hmm...it seems to error
01:27 < uriel> that is evil, what is the point of gofmt as a standard if it
has such options?  :(
01:27 < jimi_hendrix> if i have an array, how do i slice it so i get
everything from element 3 to the end of the string?
01:27 < scandal> jimi_hendrix: s[3:len(s)]
01:28 < alexsuraci> uriel: who cares, as long as it's consistent
01:28 < jimi_hendrix> ok
01:28 < alexsuraci> as in not mixing them in the source
01:28 < scandal> uriel: i was surprised it had options as well.
01:28 < jimi_hendrix> scandal, wait that gets the from the 4th to the end
right
01:29 * scandal is now annoyed gofmt adds a semicolon after a return as the last
statement in a func
01:29 < scandal> jimi_hendrix: yep
01:29 < alexsuraci> noticed that too
01:29 * jimi_hendrix just changes the 3 to the 2
01:29 < mitchellh> GitHub just added Go syntax highlighting.  Cool
01:29 < scandal> jimi_hendrix: oh, right doh
01:29 < evilhackerdude> awesome
01:30 < evilhackerdude> are there textmate bundles for go you can recommend?
01:30 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
quit [Read error: 113 (No route to host)]
01:30 < alexsuraci> mitchellh: where?
01:30 < uriel> mitchellh: that was fast, nice
01:30 < jgoebel> state = States.First().(State);
01:30 < uriel> evilhackerdude: http://go-lang.cat-v.org/text-editors/
01:30 < jgoebel> now if there is anyway to get rid of that .(State)
01:30 < alexsuraci> hm, not doing it for my stuff, must be a server-side
cache or something
01:30 < uriel> evilhackerdude:
http://go-lang.cat-v.org/text-editors/textmate/ to be specific
01:31 < alexsuraci> ah, at gist
01:31 < uriel> alexsuraci: they are afraid of the gopaste.org competition!
01:31 < uriel> ;P
01:31 < jgoebel> ha
01:31 -!- timmcd [n=Adium@97-117-100-106.slkc.qwest.net] has left #go-nuts []
01:31 < alexsuraci> haha
01:32 < mitchellh> uriel: Hah, I think it was more for the viewing of Go
code in the git repos
01:32 < mitchellh> uriel: like so:
http://github.com/jdp/lineup/blob/master/msgqueue.go
01:32 -!- keyist [n=keyist@cpe-24-24-168-56.socal.res.rr.com] has joined #go-nuts
01:32 < alexsuraci> bah, mine don't have it
01:33 < mitchellh> alexsuraci: You'll have to wait for your cache to expire,
it will :)
01:33 < jgoebel> can i ever use anything dynamic inside .()
01:33 < jgoebel> like a reflection or something?
01:33 < mitchellh> alexf: not *your* cache, im sorry, github's
01:33 < mitchellh> alexsuraci: meant you ^
01:33 < alexsuraci> yea
01:33 < uriel> mitchellh: that lineup thing is cool, I'll add it to my page
of pure-go lbis
01:33 < uriel> (well, ti is not a lib, hmmm..)
01:33 < alexsuraci> figured gopaste would have a pretty short lifespan, heh
01:34 < alexsuraci> i'll leave it up, i already have the domain and hosting
anyway
01:34 < jgoebel> i'd like to have the library itself do the .(State) but i'm
not sure if it can be done dynamically
01:34 < alexsuraci> jgoebel: you mean have the library cast the type to
whatever the package interfacing with it uses?
01:34 < jgoebel> alexsuraci: yes
01:35 -!- loureiro [n=loureiro@201008192047.user.veloxzone.com.br] has joined
#go-nuts
01:36 -!- mesenga [n=cbacelar@20150131219.user.veloxzone.com.br] has quit [Remote
closed the connection]
01:36 -!- Guest16765 [n=sn@chello089075057223.chello.pl] has joined #go-nuts
01:37 < hstimer> A couple questions about composite literals: when a
function creates one to use internally is it created on the stack?  And is the
address is taken and passed out of the function is it moved to the heap?
01:38 < hstimer> small correction ...  And IF the address is taken...
01:38 <+iant> hstimer: if you take the address of a composite literal, it is
allocated on the heap
01:38 < hstimer> and if you don't it stays on the stack?
01:38 <+iant> yes
01:38 < hstimer> iant: thx
01:39 < uriel> alexsuraci: I really like gopaste, I like it better than
pretty much any other pastebin I have used, and buitin support for gofmt is a nice
unique feature too
01:39 -!- SRabbelier [n=SRabbeli@ip138-114-211-87.adsl2.static.versatel.nl] has
quit ["Leaving."]
01:39 -!- nacmartin [n=chatzill@77.224.92.149] has quit [Remote closed the
connection]
01:39 < alexsuraci> uriel: thanks :)
01:40 < alexsuraci> i have no reason to take it down, if anything it'll just
be my little playpen for go
01:40 < alexsuraci> I'd like to get some sort of deploying mechanism going
going
01:41 < alexsuraci> maybe abstract it into various libraries, who knows
01:41 -!- drusepth [n=drusepth@76.194.203.21] has joined #go-nuts
01:42 -!- nigwil [n=chatzill@berkner.ccamlr.org] has joined #go-nuts
01:42 -!- inittab- [n=dlbeer@ip-118-90-30-86.xdsl.xnet.co.nz] has quit [Read
error: 110 (Connection timed out)]
01:43 -!- pace_t_zulu [n=pacetzul@unaffiliated/pacetzulu/x-585030] has joined
#go-nuts
01:44 -!- drusepth`` [n=drusepth@adsl-76-194-203-21.dsl.spfdmo.sbcglobal.net] has
quit [Read error: 60 (Operation timed out)]
01:45 < hstimer> iant: does the compiler try and figure out ahead of time if
the composite literal should be initially allocated on the heap, or does it move
it to the heap when the address is taken?
01:46 <+iant> hstimer: if the address is taken, the composite literal is
allocated directly on the heap
01:46 -!- turutosiya [n=turutosi@219.106.251.65] has joined #go-nuts
01:46 < hstimer> iant: so if it is created as a var initially and then the
address is taken some lines later, what happens?
01:47 -!- keishi [n=keishi@h116-000-230-016.ms01.itscom.jp] has left #go-nuts []
01:47 < hstimer> iant: and do primitive types work the same way?
01:47 -!- teedex [n=teedex@204.14.155.161] has quit [Remote closed the connection]
01:47 -!- gilmarsouza [n=gilmar@187.19.0.13] has quit [Read error: 54 (Connection
reset by peer)]
01:47 -!- gilmarsouza [n=gilmar@187.19.0.13] has joined #go-nuts
01:48 < jimi_hendrix> what dirs are searched for packages?
01:49 -!- gilmarsouza [n=gilmar@187.19.0.13] has quit [Client Quit]
01:51 -!- phillipsm [n=mattscom@173-23-56-105.client.mchsi.com] has joined
#go-nuts
01:51 < jimi_hendrix> also, how do i end a package declaration, i have two
files, one with a package and one with my main package, i am compiling by doing:
6g *.go ...  it says it is expected the other package in my main package
01:51 < jabb> GOROOT/pkg?
01:51 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has joined #go-nuts
01:52 < KirkMcDonald> jimi_hendrix:
http://kirkmcdonald.blogspot.com/2009/11/on-compilation-of-go-packages.html
01:53 -!- tcpip40001 [n=fulano@dsl-emcali-190.99.193.179.emcali.net.co] has quit
[Read error: 60 (Operation timed out)]
01:53 < jimi_hendrix> ok
01:53 -!- NachPlus [n=nach@89-138-223-213.bb.netvision.net.il] has joined #go-nuts
01:53 -!- assiss [n=assiss@219.143.153.59] has joined #go-nuts
01:54 -!- NachPlus [n=nach@89-138-223-213.bb.netvision.net.il] has left #go-nuts
["Konversation terminated!"]
01:55 < slashus2> I am trying to figure out how to delete a key/value pair
from a map.  It says in the docs "Values may be added and removed during execution
using special forms of assignment.  " Thank you.
01:55 -!- drusepth` [n=drusepth@adsl-76-194-203-21.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
01:57 < jimi_hendrix> KirkMcDonald, first post in two years?
01:59 < KirkMcDonald> jimi_hendrix: I only post when I have something to
say.  :-)
01:59 -!- franksalim [n=frank@adsl-76-221-202-115.dsl.pltn13.sbcglobal.net] has
quit ["Ex-Chat"]
01:59 -!- ergodicsum [n=ergudics@cpe-075-182-116-231.nc.res.rr.com] has joined
#go-nuts
02:00 < jimi_hendrix> KirkMcDonald, so let me get this straight, i compile
the other packages first, then the main one that depends on them, then i just need
t link main?
02:00 -!- General13372 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has
joined #go-nuts
02:01 < KirkMcDonald> jimi_hendrix: That's about it, yep.
02:01 < jimi_hendrix> ok
02:01 -!- cablehead [n=Adium@nat/slide/x-ashpzntpemrqqeos] has quit ["Leaving."]
02:02 -!- brrant [n=John@65-102-193-77.hlrn.qwest.net] has quit ["Leaving"]
02:03 -!- penguin42 [n=dg@tu006.demon.co.uk] has quit [Read error: 113 (No route
to host)]
02:03 -!- penguin42 [n=dg@tu006.demon.co.uk] has joined #go-nuts
02:04 < jimi_hendrix> can i somehow drop the first char from a string?
02:04 -!- gasreaa [n=atwong@nat/slide/x-laikwsduzeuuvnhy] has left #go-nuts []
02:04 < directrixx> slashus2: You make an assignment of the form, mymap[x] =
y, false
02:04 < directrixx> slashus2: x is the key you want to delete, y can be
anything.
02:05 < slashus2> directrixx: Thanks
02:05 -!- keyist [n=keyist@cpe-24-24-168-56.socal.res.rr.com] has left #go-nuts []
02:05 -!- jrgp [n=jrgp@rrcs-65-34-27-38.se.biz.rr.com] has joined #go-nuts
02:05 < directrixx> slashus2: np
02:05 < jrgp> are there any plans to port a gtk package to Go?
02:05 -!- penguin42 [n=dg@tu006.demon.co.uk] has quit [Read error: 104 (Connection
reset by peer)]
02:06 < KirkMcDonald> jimi_hendrix: s[1:len(s)]
02:06 < KirkMcDonald> jimi_hendrix: Er, well.
02:06 < jimi_hendrix> ok
02:06 < KirkMcDonald> jimi_hendrix: Actually, that's incorrect.
02:06 < jimi_hendrix> then i should do...
02:06 < KirkMcDonald> jimi_hendrix: It will drop the first byte from the
string.
02:06 < jimi_hendrix> that works
02:07 < jimi_hendrix> i just have an extra char i dont need in a string i am
parsing
02:07 -!- aanderse
[n=aanderse@CPE001b11cc67d3-CM0019475d7f5e.cpe.net.cable.rogers.com] has joined
#go-nuts
02:07 < KirkMcDonald> Note that strings are (as a rule) UTF-8 encoded.
02:07 -!- nickgibbon [n=nring@210.8.201.244] has quit [Read error: 60 (Operation
timed out)]
02:07 < jimi_hendrix> right...
02:07 < jimi_hendrix> how much does that change?
02:07 < KirkMcDonald> It means that a "character" may cover multiple bytes.
02:07 < jimi_hendrix> its a semicolen, always
02:07 -!- iant [n=iant@67.218.102.226] has quit [Read error: 110 (Connection timed
out)]
02:08 < KirkMcDonald> Oh, then the expression I gave will be alright.
02:08 -!- insane_coder [n=nach@89-138-158-241.bb.netvision.net.il] has quit [Read
error: 110 (Connection timed out)]
02:08 -!- hstimer [n=hans@70.90.170.37] has quit [Read error: 110 (Connection
timed out)]
02:08 < KirkMcDonald> Since that'll be one byte.
02:08 < jimi_hendrix> KirkMcDonald, oh and do single quotes make chars or is
ther no real char type thingie?
02:08 < JBeshir> If the character you're stripping is single-byte and you
always know it's there at that point in the code, you're good.
02:08 -!- waltermundt [n=codemage@twiki/developer/EtherMage] has joined #go-nuts
02:09 < KirkMcDonald> As in C, ';' will be an integer literal containing
that ASCII byte.
02:09 -!- penguin42 [n=dg@tu006.demon.co.uk] has joined #go-nuts
02:09 -!- nickgibbon [n=nring@210.8.201.244] has joined #go-nuts
02:09 < KirkMcDonald> Unlike C, it will be an untyped, "ideal" integer.
02:10 < waltermundt> if anyone cares to give feedback/poke holes in my
understanding of Go's types:
http://www.codethink.info/2009/11/mental-model-of-types-and-methods-in-go.html
02:10 < jimi_hendrix> ok
02:10 -!- Glao [n=raskc@c-71-198-186-8.hsd1.ca.comcast.net] has quit [Connection
timed out]
02:10 < jimi_hendrix> untyped as in?
02:11 < waltermundt> jimi_hendrix: it has no sign, no bit capacity; it only
gets those when put into a variable or an expression that includes typed numbers
02:11 < jimi_hendrix> ok
02:12 -!- drusepth [n=drusepth@76.194.203.21] has quit [Read error: 110
(Connection timed out)]
02:13 -!- thedevel [n=thedevel@pool-72-78-219-199.phlapa.fios.verizon.net] has
joined #go-nuts
02:13 -!- tcpip4000 [n=tcpip400@190.84.233.18] has quit [Nick collision from
services.]
02:14 -!- tcpip40001 [n=fulano@dsl-emcali-190.99.193.179.emcali.net.co] has joined
#go-nuts
02:14 -!- tcpip4000 [n=tcpip400@190.84.233.18] has joined #go-nuts
02:15 < jlouis> A character literal is a constant integer, typically a
unicode codepoint, so it behaves like all other constants I guess.  See:
http://golang.org/doc/go_spec.html#Character_literals
02:16 -!- edn_ [n=eden@209.130.205.171] has joined #go-nuts
02:18 -!- blackmagik [n=blackmag@unaffiliated/blackmagik] has quit ["Leaving"]
02:18 -!- General1337 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has quit
[Connection timed out]
02:19 -!- penguin42 [n=dg@tu006.demon.co.uk] has quit ["Leaving."]
02:20 -!- penguin42 [n=dg@tu006.demon.co.uk] has joined #go-nuts
02:20 < jimi_hendrix> does + concat strings?
02:20 -!- voluspa [n=voluspa@x-134-84-102-227.reshalls.umn.edu] has joined
#go-nuts
02:21 < KirkMcDonald> Yes.
02:22 -!- drusepth` [n=drusepth@adsl-76-194-203-21.dsl.spfdmo.sbcglobal.net] has
quit [Read error: 145 (Connection timed out)]
02:26 -!- loureiro [n=loureiro@201008192047.user.veloxzone.com.br] has quit
["Quit"]
02:27 -!- drusepth [n=drusepth@76.194.203.21] has joined #go-nuts
02:28 -!- aaront [n=aaront@d24-141-25-171.home.cgocable.net] has joined #go-nuts
02:30 -!- strohman [n=strohman@216.239.45.130] has quit [Read error: 110
(Connection timed out)]
02:37 -!- penguin42 [n=dg@tu006.demon.co.uk] has quit [Read error: 148 (No route
to host)]
02:38 -!- aaront [n=aaront@unaffiliated/aaront] has quit ["And that's all he
wrote..."]
02:39 -!- xuser [n=xuser@unaffiliated/xuser] has joined #go-nuts
02:39 -!- drusepth` [n=drusepth@adsl-75-44-238-163.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
02:40 -!- diabolix [n=jsoyke@c-24-3-115-134.hsd1.pa.comcast.net] has joined
#go-nuts
02:41 -!- drusepth`` [n=drusepth@adsl-75-44-238-163.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
02:42 -!- xuser [n=xuser@unaffiliated/xuser] has left #go-nuts []
02:44 -!- jA_cOp [n=yakobu@ti0043a380-3093.bb.online.no] has joined #go-nuts
02:45 -!- amacleod [n=amacleod@c-24-34-33-96.hsd1.ma.comcast.net] has joined
#go-nuts
02:45 < jgoebel> state = States.First(dm.Opts{"conditions":
"name='Russia'"}).(State);
02:45 < jgoebel> if state == nil {
02:45 < jgoebel> so this this not allowed?
02:45 < jgoebel> states.go:35: cannot use nil as State
02:46 < jgoebel> trying to figure out what to do with NULL values from the
DB
02:47 -!- Jan_Flanders [n=chatzill@d54C1E33B.access.telenet.be] has quit
["Chatzilla 0.9.75.1 [SeaMonkey 1.1.18/2009082513]"]
02:49 -!- drusepth` [n=drusepth@adsl-75-44-238-163.dsl.spfdmo.sbcglobal.net] has
quit [Read error: 60 (Operation timed out)]
02:49 -!- strohman [n=strohman@adsl-71-135-96-124.dsl.pltn13.pacbell.net] has
joined #go-nuts
02:51 -!- cpr420 [n=cpr420@67.165.199.143] has quit ["Vision[0.9.7-H-090423]: i've
been blurred!"]
02:53 -!- edn_ [n=eden@209.130.205.171] has quit [Client Quit]
02:54 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
["Leaving."]
02:54 -!- phillipsm [n=mattscom@173-23-56-105.client.mchsi.com] has quit
["ChatZilla 0.9.85 [Firefox 3.5.5/20091109134913]"]
02:55 -!- strohman_ [n=strohman@216.239.45.130] has joined #go-nuts
02:57 -!- drusepth [n=drusepth@76.194.203.21] has quit [Read error: 110
(Connection timed out)]
02:57 < jessta> jgoebel: you want a pointer if you want to set it to nil
02:58 < jgoebel> hmmmm
02:59 < jessta> jgoebel: also use the (nil,error) return convention when you
want to indicte an error
02:59 -!- Tuller [n=Tuller@pool-72-84-246-12.rcmdva.fios.verizon.net] has joined
#go-nuts
02:59 < dho> freebsd/i386 done
03:00 < reppie> already
03:00 < reppie> you're quick
03:00 < dho> russ is god
03:00 -!- diabolix [n=jsoyke@c-24-3-115-134.hsd1.pa.comcast.net] has quit
["Leaving"]
03:00 < dho> there's no way i can take all the credit
03:01 < NoPyGod> dho: you just made it possible for go to run on freebsd?
03:01 < dho> NoPyGod: i had freebsd/amd64 done yesterday
03:01 < dho> but yes, now i386 works too
03:01 < NoPyGod> ic
03:01 < NoPyGod> i have a question, you may or may not know the answer
03:02 < NoPyGod> when go is made to run on windows, will the socket package
wrap WINSOCK?
03:02 < NoPyGod> [this may be a stupid question, i'm no expert]
03:02 < dho> probably, that's windows' socket interface
03:03 < reppie> dho is it already committed?
03:03 < reppie> or do you have a patch?
03:03 < dho> reppie: no, russ went home
03:03 < dho> after we figured out that tls for new threads was never being
set up
03:03 < dho> by we i mean he
03:03 < dho> then i fixed it
03:04 -!- strohman [n=strohman@adsl-71-135-96-124.dsl.pltn13.pacbell.net] has quit
[Read error: 145 (Connection timed out)]
03:04 < reppie> cool
03:04 < dho> now i'm trying to get it together to fill a CL
03:05 < reppie> how do you talk to him
03:05 < jgoebel> hmmm
03:05 < jgoebel> i want a file to log to
03:05 < jgoebel> what pkg am i looking for
03:06 < dho> google chat
03:06 < jgoebel> ah os
03:06 < dho> on gmail
03:06 < reppie> ah
03:06 < dho> i've known him for a few years though via plan 9
03:06 < reppie> yeah, i figured
03:07 -!- thedevel [n=thedevel@pool-72-78-219-199.phlapa.fios.verizon.net] has
left #go-nuts []
03:10 -!- asyncster [n=asyncste@206.169.213.106] has quit [Read error: 110
(Connection timed out)]
03:11 -!- andresambrois [n=aa@r190-135-138-46.dialup.adsl.anteldata.net.uy] has
joined #go-nuts
03:14 -!- tor7 [n=tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has quit
[]
03:15 -!- strohman [n=strohman@216.239.45.130] has quit []
03:17 < dho> http://codereview.appspot.com/157055
03:18 * dho sleep
03:21 < dho> oh
03:21 < dho> if me___ or snert come in, point them to that cl please
03:21 < dho> it should be very helpful for them
03:21 * dho really sleep
03:22 -!- offby1` [n=user@q-static-138-125.avvanta.com] has joined #go-nuts
03:23 -!- tcpip40001 [n=fulano@dsl-emcali-190.99.193.179.emcali.net.co] has left
#go-nuts []
03:26 -!- offby1 [n=user@pdpc/supporter/monthlybyte/offby1] has quit [Nick
collision from services.]
03:26 -!- ni| [n=ni|@isp2-resnet-nat1.union.edu] has joined #go-nuts
03:28 -!- Tuller [n=Tuller@pool-72-84-246-12.rcmdva.fios.verizon.net] has quit []
03:31 -!- Null-A [n=jason@c-76-21-4-0.hsd1.ca.comcast.net] has joined #go-nuts
03:33 -!- aa [n=aa@r190-135-220-138.dialup.adsl.anteldata.net.uy] has quit [Read
error: 110 (Connection timed out)]
03:34 -!- ni| [n=ni|@isp2-resnet-nat1.union.edu] has quit [Remote closed the
connection]
03:35 -!- tanamo [n=tanamo@125.252.70.230] has joined #go-nuts
03:36 -!- voluspa [n=voluspa@x-134-84-102-227.reshalls.umn.edu] has quit [Read
error: 113 (No route to host)]
03:38 -!- Null-A [n=jason@c-76-21-4-0.hsd1.ca.comcast.net] has quit []
03:39 -!- interskh [n=interskh@c-67-163-156-103.hsd1.pa.comcast.net] has quit
[Read error: 60 (Operation timed out)]
03:40 -!- interskh [n=interskh@c-67-163-156-103.hsd1.pa.comcast.net] has joined
#go-nuts
03:47 -!- hstimer [n=hans@c-98-234-25-125.hsd1.ca.comcast.net] has joined #go-nuts
03:50 -!- aanderse
[n=aanderse@CPE001b11cc67d3-CM0019475d7f5e.cpe.net.cable.rogers.com] has quit
[Remote closed the connection]
03:53 -!- hyn [n=hyn@p0a38fe.tokyte00.ap.so-net.ne.jp] has joined #go-nuts
03:53 -!- Netsplit farmer.freenode.net <-> irc.freenode.net quits: Fl1pFl0p,
emit
03:54 -!- iant [n=iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined
#go-nuts
03:54 -!- mode/#go-nuts [+v iant] by ChanServ
03:55 < jgoebel> hmmm
03:55 -!- dionysiac [n=dionysia@S01060013102db8c7.cg.shawcable.net] has joined
#go-nuts
03:56 -!- ajray [n=alex@wvc32563rh.rh.ncsu.edu] has joined #go-nuts
03:56 < ajray> hey.  i'm having trouble understanding how to use the ebnf
package
03:56 -!- travisbrady [n=tbrady@67-207-96-194.static.wiline.com] has quit []
03:56 < ajray> what does the filename parameter to ebnf.Parse() do?
03:57 < jgoebel> no idea
03:57 < jgoebel> hmmm
03:57 < jgoebel> i need more help understanding structs and go's idea of
inheritance
04:00 < waltermundt> what's unclear to you?  A struct inherits member
functions from anonymous fields that have them; that's really all there is to it.
04:01 < jgoebel> ok
04:01 < jgoebel> but what is the scope when i run a member function?
04:01 < jgoebel> from an anonymous field?
04:01 < waltermundt> what value does it operate on?  that of the field
04:02 * jgoebel pasted http://pastie.textmate.org/private/so0pyn7teldmlkm2sojixa
04:02 < waltermundt> if you need the wider structure, you have to override
the member
04:02 < jgoebel> trying to make line 4 work
04:02 < jgoebel> i want any model to have a Save method that knows what
table the models is stored in and can save it
04:02 < jgoebel> so it seems to wrap this interface in a struct and make
that struct anonymous in my model?
04:03 <+iant> jgoebel: to make any model have a Save method, you need to
write the Save method for each model
04:03 < jgoebel> i'm worried if i do that it won't be able to access the
parent properties
04:03 <+iant> jgoebel: to have code which can call the Save method, you need
an interface with the Save method, and you need to use that interface in the
calling code
04:03 < jgoebel> iant: there is only one save method that can save any
object
04:04 <+iant> jgoebel: I think the only way to make that work would be to
use type reflection in a Save function, not method
04:04 < waltermundt> jgoebel: you are correct; if you have a Save method on
an embedded struct member, that method will not have access to the fields of the
embedding struct
04:04 < jgoebel> so i'm back to States.Save(state) instead of state.Save() ?
04:05 -!- strohman [n=strohman@adsl-71-135-96-124.dsl.pltn13.pacbell.net] has
joined #go-nuts
04:05 < waltermundt> probably
04:05 -!- turing_type_bot [n=turing@pool-71-241-35-143.nrflva.east.verizon.net]
has joined #go-nuts
04:05 < waltermundt> unless you just want to implement a States member on
each State object, and have the state.Save() just be a call to
self.states.Save(self)
04:06 -!- KinOfCain [n=KinOfCai@cpe-76-170-26-1.socal.res.rr.com] has quit [Read
error: 110 (Connection timed out)]
04:06 < jgoebel> but for every model i'd still have to write a delegation
method, right?
04:06 < waltermundt> right
04:06 -!- NoPyGod [n=NoPyGod@125-236-202-220.adsl.xtra.co.nz] has quit []
04:07 -!- voluspa [n=voluspa@c-75-72-148-166.hsd1.mn.comcast.net] has joined
#go-nuts
04:07 < jgoebel> so with embadded anonymous structs no way to magically get
a reference to the parent container?
04:07 < jgoebel> ie do the same thing, but with no delegation method :)
04:07 <+iant> jgoebel: that is correct
04:08 < waltermundt> nope.  I'm wondering if you can do something workable
by implementing a method on an interface.  I read on a blog post that interfaces
can have concrete methods
04:08 < waltermundt> this has some implications which I find interesting
04:08 < jgoebel> hmmm
04:08 < jgoebel> link?
04:08 <+iant> that's not really accurate, though you can approximate that by
having a struct which contains an interface field
04:09 -!- diltsman_ [n=diltsman@64.122.18.77] has joined #go-nuts
04:09 < waltermundt> iant: is that so?  I'd been wondering how that would be
implemented by the runtime
04:09 < ajray> iant: who made the ebnf package?
04:09 < waltermundt> since that would potentially make method-set
determination a quite difficult problem
04:09 -!- hasenj [n=hasenj@S010600032f3629c8.cg.shawcable.net] has quit []
04:09 < ajray> its confusing me.
04:10 < tokuhiro_______> how to handle the signal in golang?
04:10 < ajray> tokuhiro_______: I tried to use the syscall package
04:10 <+iant> ajray: according to hg log it was gri
04:10 < jgoebel> hmmm
04:10 < jgoebel> frustrating
04:10 < jgoebel> i can't attach any generic funtionality to a type then it
seems
04:11 -!- Netsplit over, joins: Fl1pFl0p, emit
04:11 < tokuhiro_______> ajray: ah, i'll try it too
04:12 < jgoebel> oh
04:12 < jgoebel> wait
04:12 < jgoebel> i can have a struct inside a struct
04:13 < jgoebel> type State struct { Name string; d dmconnector }
04:13 < jgoebel> state.d.Save();
04:13 -!- homovitruvius [n=maurizio@pool-72-95-253-175.pitbpa.east.verizon.net]
has quit [Remote closed the connection]
04:13 < jgoebel> when building states I just need to make sure d has it's
own reference back to state, right?
04:13 <+iant> jgoebel: but d.Save() won't have access to the other fields in
state
04:14 < jgoebel> it will if d has a pointer to state, wouldn't it?
04:14 <+iant> and even if it did, how would it know what to do with them?
04:14 < ajray> jgoebel: why not embed it?
04:14 <+iant> jgoebel: why not use pkg/gob?
04:14 < jgoebel> i have no idea what gob is :)
04:14 < jgoebel> let me look
04:14 < ajray> no offense, but it reminds me of pythons pickle
04:14 <+iant> sure
04:15 -!- path___ [n=path@115.240.37.8] has joined #go-nuts
04:15 < jgoebel> iant: save is a generic function...  iterate ofer a models
attributes, write them to the db
04:15 < jgoebel> all save needs to know is the table name and the
attributes, which a point would give it
04:15 -!- halfdan_ [n=halfdan@p57A94177.dip.t-dialin.net] has joined #go-nuts
04:16 < ajray> jgoebel: are you just saving arbitrary memory structures to
disk?
04:16 < jgoebel> well, they aren't arbitrary
04:16 <+iant> but a single Save function isn't going to be able to access
fields of an arbitrary struct, unless it uses type reflection
04:16 < jgoebel> the structs have to match the SQL
04:16 < ajray> ah.
04:16 <+iant> ah, OK, so type reflection may be the way to go
04:16 < jgoebel> yes, it would have to use reflection
04:16 < jessta> jgoebel: making an ORM?
04:16 < jgoebel> is reflection dead ass slow?
04:16 < waltermundt> iant: it does use reflection.  He just wants to be able
to call it via obj.Save() for some reason
04:16 <+iant> reflection is pretty fast
04:17 < jgoebel> jessta: http://github.com/yyyc514/go_datamapper
04:17 -!- Perberos [n=Perberos@190.49.39.117] has joined #go-nuts
04:17 <+iant> but why use obj.Save and not a general Save function?  Why
make it a method if it isn't going to know anything about the struct in which it
is embedded anyhow?
04:17 -!- goplexian [n=acombas@d154-20-0-9.bchsia.telus.net] has joined #go-nuts
04:17 -!- Wiz126 [n=Wiz@72.20.220.150] has quit [Remote closed the connection]
04:17 < jgoebel> waltermundt: maybe my mind is muddled by ruby but it seems
to be an object should know how to save itself :)
04:17 -!- halfdan [n=halfdan@p57A96706.dip.t-dialin.net] has quit [Read error: 60
(Operation timed out)]
04:17 < uriel> jgoebel: OO thinking has damaged your brain
04:18 < ajray> jgoebel: sounds like SmallTalk to me
04:18 < uriel> it is perfectly fine to have a function that saves objects
04:18 < jgoebel> uriel: yes, that's less OO and more procedural
04:18 -!- zilt [n=aking@74.210.120.119] has quit [Read error: 110 (Connection
timed out)]
04:18 < uriel> jgoebel: and that is a good thing
04:18 < jgoebel> i love my Rails :)
04:18 < uriel> it is *simpler*
04:18 < Perberos> there is not mysql/postgres module yet?
04:18 < ajray> (IMHO) whichever gets the job done so i can get on with other
stuf
04:18 < ajray> Perberos: PG yes
04:18 < waltermundt> Perberos: several in progress
04:18 < jgoebel> Perberos: where are some wrappers i've seen
04:19 < jgoebel> *there
04:19 < path___> wait how does a struct having an interface field
approximate the idea of being able to add method to interfaces
04:19 < Perberos> yay
04:19 * uriel is starting to wonder if Rails has done more damage to the software
industry than the C preprocessor ever did...
04:19 < ajray> PostgreSQL has been wrapped (libpq using the ffi)
04:19 < jgoebel> uriel: why?
04:19 < ajray> uriel: no.  not there yet
04:19 < jgoebel> uriel: it's very pragmatic
04:19 < tanamo> hello iim currently studying go and im implementing a doubly
link list, if i want to remove a node all i have to do is equate it to nil right?
04:19 < jgoebel> uriel: you can get a lot done very quickly
04:19 < ajray> path___: i dont understand your question
04:19 < path___> this was something iant said earlier
04:19 < ajray> tanamo: if the node is a pointer to the struct
04:20 < ajray> you can set pointers to nil
04:20 < uriel> Perberos: there are a few pgsql/mysql 'modules', see
http://go-lang.cat-v.org/library-bindings
04:20 < tanamo> yes it's a pointer
04:20 < Perberos> ok, thankyousomuch
04:20 < goplexian> hi go-nuts :)
04:20 < path___> someone asked if go allows you to create a method directly
on an interface (so all interface implementors now obtain that method)
04:20 < path___> kinda like a mixin
04:20 < ajray> tanamo: then you have to update the stuff before/after it
that pointed to it but yeah
04:20 < waltermundt> that's what the blog post was calling it!
04:21 < waltermundt> and the language spec forbids that, which I'm perfectly
okay with
04:21 < tanamo> ajray, all i have to do is remove all the reference to that
node right?  and the gc will clean it up for me?
04:21 -!- Will_D [n=will@c-71-231-59-135.hsd1.wa.comcast.net] has joined #go-nuts
04:21 < ajray> uriel: i might have an IRC lib to add to that soon ...
04:21 < ajray> as soon as i figure out how to use EBNF
04:21 < ajray> tanamo: yeah.
04:22 < ajray> :-) yay GC!
04:22 < tanamo> ajray, thanks man :)!  go is fun!
04:22 < path___> so I was wondering about iant's response.  When he said you
could approximate that by having a struct which contains an interface field
04:22 < path___> did you get what he meant waltermundt ?
04:22 -!- path__ [n=path@115.240.9.1] has quit [Read error: 145 (Connection timed
out)]
04:22 < path___> bah
04:22 < waltermundt> path___: yeah
04:23 < path___> stupid net connection
04:23 < waltermundt> path___: if a struct contains an anonymous interface
field, it inherits the methods on that interface
04:23 < waltermundt> though the methods actually get called on whatever the
underlying object you put in the field is
04:23 < path___> only if you assign it an object that has those methods
04:23 < path___> right
04:24 < uriel> ajray: cool!
04:24 -!- Will_D [n=will@c-71-231-59-135.hsd1.wa.comcast.net] has quit [Client
Quit]
04:24 < path___> hmmm ok I was interested in this more as the idea of a
mixin where over time you might want to introduce a method that all implementors
of an interface could benefit from but ok.
04:24 -!- Will_D [n=will@c-71-231-59-135.hsd1.wa.comcast.net] has joined #go-nuts
04:25 < goplexian> does anyone else think that since C++ is so widely used
for game development because of its speed that if Go proves to be nearly as fast,
popular, and easier to work with, that it might also end up in that field?
04:25 < waltermundt> path___: Go philosophy says you can just make a
function that takes the interface as an ordinary parameter for things like that as
I understand it
04:25 < hstimer> are there any heap tools/functions/classes that provide any
information like object count, gc status, etc.
04:25 < waltermundt> goplexian: if it also ends up portable and someone at
MS decides to port DirectX to it, maybe
04:25 * sladegen can see it now: Ruby on Go or PyGo...
04:26 -!- kayess [n=kayess@ppp-124-122-211-206.revip2.asianet.co.th] has quit
[Remote closed the connection]
04:26 < path___> waltermundt: yeah true.  Again maybe OO thinking damaging
my brain as someone earlier said.  I usually find it difficult to find a place to
house such functions and I love being able to make them appear to be added to the
objects themselves.  For easier determination :)
04:27 < goplexian> waltermundt, right DX is the big player these days, well
perhaps if OpenGL gets off its arse, im sure someone has already start to make a
wrapper for it in go
04:27 < waltermundt> no doubt
04:27 < uriel> goplexian: speculating about such things is rather silly at
this point
04:27 -!- djanderson [n=dja@hltncable.pioneerbroadband.net] has quit [Client Quit]
04:27 < uriel> lets concentrate in making Go as good as it can be, and then
we will see what happens
04:27 -!- strohman [n=strohman@adsl-71-135-96-124.dsl.pltn13.pacbell.net] has quit
[]
04:27 < goplexian> uriel, but isn't just about everything silly?  :)
04:29 < waltermundt> speaking of wrappers -- does anyone know what it'd take
to call a Go function from C code?  Nasty hacks are okay.
04:29 < uriel> waltermundt: I think that was something that still needed
work, I wish I knew the answer too
04:29 < waltermundt> I'm curious about whether it's at all practical to wrap
libs like gsasl that do use C-funcptr+void-baton idioms
04:30 -!- jA_cOp [n=yakobu@ti0043a380-3093.bb.online.no] has quit [Remote closed
the connection]
04:30 < jgoebel> hmmm
04:30 < uriel> something that might be interesting is a way to send messages
down channels from C to go (no clue how that could/would work out)
04:30 -!- KinOfCain [n=KinOfCai@cpe-76-170-26-1.socal.res.rr.com] has joined
#go-nuts
04:30 < kuroneko> pipes!
04:31 < uriel> kuroneko: ^_^
04:31 < kuroneko> *cough*
04:31 < uriel> kuroneko: did you figure out the varargs thing yet?
04:31 < kuroneko> I haven't had a chance since yesterday
04:31 < kuroneko> last night I went to the Tori Amos concert here in Sydney
04:31 < kuroneko> so no coding took place
04:31 -!- diltsman_ [n=diltsman@64.122.18.77] has quit []
04:32 < uriel> lucky bastard!
04:32 < kuroneko> dunno about that.
04:32 < uriel> (sorry, tori fan here)
04:32 * sladegen steals summer from kuroneko
04:32 < kuroneko> you too can see Tori Amos when she visits your city by
paying the relevant ticketing agency...  :P
04:32 < uriel> kuroneko: hahaha, but I live in the middle of the north pole!
04:32 < waltermundt> uriel: yeah
04:33 < waltermundt> the problem I see with C-> go invocation is that
gofuncs can yield to the go scheduler while blocking on a channel etc
04:33 < lifeless> so it may take a whiel :P
04:33 < waltermundt> and then arbitrary go code happens, and the func gets
control again later, possibly on a different os thread
04:33 -!- path__ [n=path@115.240.76.34] has joined #go-nuts
04:33 < waltermundt> this is not conducive to maintaining the C stack
04:34 < lifeless> the different os thread could be a problem :)
04:34 -!- mizai [n=mizai@rhou-164-107-213-187.resnet.ohio-state.edu] has quit
[Read error: 110 (Connection timed out)]
04:35 -!- drusepth` [n=drusepth@adsl-75-44-238-163.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
04:35 < kuroneko> I won't say it.
04:35 < kuroneko> uriel: I'm expecting varargs to be easy in implementation
04:35 < kuroneko> I'm worried about the internal representation in cgo more
than anything else
04:36 -!- drusepth [n=drusepth@adsl-75-44-238-163.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
04:36 -!- iant [n=iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Read
error: 110 (Connection timed out)]
04:37 < kuroneko> and back calling?  umm.  use gccgo?
04:37 < jgoebel> kuroneko: variable args?
04:37 < kuroneko> jgoebel: calling varargs C functions via cgo
04:37 < jgoebel> oh
04:37 < jgoebel> n/m
04:37 -!- turing_type_bot [n=turing@pool-71-241-35-143.nrflva.east.verizon.net]
has quit [Read error: 110 (Connection timed out)]
04:38 < kuroneko> at the moment, cgo just catches on fire
04:38 -!- ergodicsum [n=ergudics@cpe-075-182-116-231.nc.res.rr.com] has quit [Read
error: 110 (Connection timed out)]
04:38 -!- Venom_X [n=pjacobs@66.54.185.131] has quit []
04:39 -!- mizai [n=mizai@164.107.141.210] has joined #go-nuts
04:40 -!- wobsite [n=wobsite_@68-189-250-56.static.oxfr.ma.charter.com] has joined
#go-nuts
04:40 -!- path__ [n=path@115.240.76.34] has quit [Read error: 104 (Connection
reset by peer)]
04:41 -!- path__ [n=path@115.240.76.34] has joined #go-nuts
04:45 -!- esm [n=esm@70-91-101-46-chicago-il.hfc.comcastbusiness.net] has joined
#go-nuts
04:45 -!- rhelmer [n=rhelmer@adsl-69-107-65-242.dsl.pltn13.pacbell.net] has quit
[]
04:45 -!- path___ [n=path@115.240.37.8] has quit [Read error: 110 (Connection
timed out)]
04:47 < dionysiac> jgoebel: What about myDataStore.Save(state)?  from an oo
perspective it's the datastore that knows about saving rather than the model..
04:47 < jgoebel> actually the model object knows the most
04:47 < jgoebel> so for now it's States.Save(state)
04:48 < jgoebel> when i actually get save/destroy working then i can revisit
04:49 -!- bhp [n=bp@user-0cdfva4.cable.mindspring.com] has joined #go-nuts
04:49 < bhp> hello, can you make a map where the value can be any type?
04:49 < dionysiac> Yes, but I'm thinking of the datastore as a kind of
manual version of ActiveRecord :)
04:49 < bhp> somethign like
04:49 < bhp> map[string]object
04:50 < bhp> what's the syntax?
04:50 < bhp> haha
04:50 < bhp> different purpose
04:51 -!- turutosiya [n=turutosi@219.106.251.65] has quit [Read error: 110
(Connection timed out)]
04:52 < s_mosher> bhp, it's just map[type] type
04:53 -!- drusepth`` [n=drusepth@adsl-75-44-238-163.dsl.spfdmo.sbcglobal.net] has
quit [Read error: 110 (Connection timed out)]
04:54 -!- drusepth` [n=drusepth@adsl-75-44-238-163.dsl.spfdmo.sbcglobal.net] has
quit [Read error: 110 (Connection timed out)]
04:54 < alexsuraci> bhp: map[type]interface{} is probably what you want.
note that you'll need to do explicit conversions on the values when you use them
(e.g.  mymaps["foo"].(int))
04:54 < alexsuraci> off to bed
04:54 -!- dionysiac_ [n=dionysia@209.91.107.250] has joined #go-nuts
04:54 < alexsuraci> (also, that
04:54 < alexsuraci> bah nevermind.  stupid premature enter key.
04:54 < alexsuraci> bed now.
04:55 < s_mosher> alexsuraci, oops I mistook him
04:56 -!- assiss [n=assiss@219.143.153.59] has left #go-nuts []
04:56 -!- laurei [n=laurei@dsl-58-6-144-57.qld.westnet.com.au] has joined #go-nuts
04:57 -!- kmc [n=keegan@206-71-236-70.c3-0.nyw-ubr5.nyr-nyw.ny.cable.rcn.com] has
quit [Read error: 110 (Connection timed out)]
04:57 < bhp> alex, thanks.  that's what i was looking for.  any code in the
packages that uses this interface{} syntax?
04:59 < laurei> Hi guys, I come from a scripting (php) background, not C++,
I'm finding the documentation incredibly complex, what would be the easiest way to
learn Go
04:59 < bhp> ok, so i can declare a function like map[type]type
04:59 < bhp> but what if i want to declare a map
04:59 < bhp> where the keys and values
04:59 < bhp> each one
04:59 < bhp> is different?  it doesn't seem to let me do
05:00 < bhp> m := make(map[type]type);
05:00 -!- dionysiac_ [n=dionysia@209.91.107.250] has quit []
05:00 -!- dionysiac_ [n=dionysia@209.91.107.250] has joined #go-nuts
05:01 < s_mosher> the keys need to be comparable
05:01 < bhp> that's fine
05:01 < robot12> hi all
05:03 < jgoebel> you can't
05:03 < jgoebel> you have to use an emptry interface to do that
05:03 < jgoebel> map[string] interface{};
05:03 < jgoebel> would let you do "test" :1, "wow" : "wowey", "what" :
float64(24)
05:03 < jgoebel> but it's a pain to work with raw interfaces later :)
05:03 -!- dschn [n=dschn@pool-70-19-224-19.bos.east.verizon.net] has quit
[Success]
05:04 < bhp> ok.  i guess that will work
05:04 < bhp> so
05:04 * jgoebel pasted http://pastie.textmate.org/private/mkt8kijafqphfaukf26iw
05:04 < bhp> thanks :)
05:04 * jgoebel pasted http://pastie.textmate.org/private/y2q1njc86inrt4wmvrg4bg
05:04 < jgoebel> anyone know why this doesn't work?
05:04 < jgoebel> i can't seem to assign the columns right
05:04 < jgoebel> no matter what i do
05:05 < jgoebel> i need to read up on pointers again
05:05 < jgoebel> i removed them all and now it works
05:05 -!- evilhackerdude [n=stephan@e181124118.adsl.alicedsl.de] has quit [Nick
collision from services.]
05:05 -!- evilhackerdude [n=stephan@e181088183.adsl.alicedsl.de] has joined
#go-nuts
05:06 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
05:06 -!- dionysiac_ [n=dionysia@209.91.107.250] has quit []
05:06 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
[Client Quit]
05:07 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
05:09 < Amaranth> whoa, len(channel) will tell you if the channel has
something in it without taking something from the channel?
05:09 < jgoebel> sounds reasonable :)
05:09 -!- Queue29 [n=Queue29@cpe-70-112-194-192.austin.res.rr.com] has quit
[Remote closed the connection]
05:10 -!- dionysiac [n=dionysia@S01060013102db8c7.cg.shawcable.net] has quit [Read
error: 110 (Connection timed out)]
05:10 -!- dionysiac [n=dionysia@209.91.107.250] has joined #go-nuts
05:11 -!- iant [n=iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined
#go-nuts
05:11 -!- mode/#go-nuts [+v iant] by ChanServ
05:11 -!- magglass1 [n=notroot@unaffiliated/magglass1] has left #go-nuts []
05:11 < bhp> quit
05:11 -!- bhp [n=bp@user-0cdfva4.cable.mindspring.com] has quit ["leaving"]
05:12 -!- wifs [n=eazy@murky.cs.stevens.edu] has left #go-nuts []
05:16 -!- zerofluid [n=zeroflui@ip68-227-10-141.lv.lv.cox.net] has joined #go-nuts
05:16 * uriel refuses to help jgoebel until he starts to use gopaste.org ;P
05:16 < uriel> (just kidding, I don't even know what the question is, bussy
with other stuff)
05:16 -!- shambler [i=kingrat@mm-73-164-84-93.dynamic.pppoe.mgts.by] has quit
[Read error: 104 (Connection reset by peer)]
05:17 -!- shambler [i=kingrat@mm-73-164-84-93.dynamic.pppoe.mgts.by] has joined
#go-nuts
05:17 < uriel> laurei: did you watch rob's presentation?
05:17 -!- triplez_ [n=triplez@124.155.195.7] has joined #go-nuts
05:18 < laurei> i watched an hour long video uriel was that it?
05:20 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has quit [Read error:
104 (Connection reset by peer)]
05:20 -!- triplez__ [n=triplez@cm52.sigma225.maxonline.com.sg] has joined #go-nuts
05:21 < uriel> laurei: yes
05:22 < uriel> laurei: did you read the tutorial?
05:23 -!- dschn [n=dschn@pool-70-19-224-19.bos.east.verizon.net] has joined
#go-nuts
05:23 < uriel> if you have trouble with that, probably the best you can do
is get yourself a copy of K&R and learn C, it will be time well invested no matter
how successful Go becomes
05:23 < laurei> Yeah I have watched that, i'm trying really, just coming
from php, I'm stuck at package main :S
05:24 < jabb> <3 C
05:25 < laurei> sounds like sound advice uriel, though i was hoping just to
start playing
05:26 * jgoebel pasted http://pastie.textmate.org/private/rhcgqlfh2ky6vpwvge7sdg
05:26 < jgoebel> what's a better way to do a randomly sized throw-away
array?
05:28 < jgoebel> should i just use a string vector?
05:28 -!- travisbrady [n=tbrady@98.210.155.175] has joined #go-nuts
05:28 <+iant> jgoebel: if you are really just going to throw it away, don't
use new
05:29 <+iant> just make a slice of the right size
05:29 -!- kmc [n=keegan@206-71-236-70.c3-0.nyw-ubr5.nyr-nyw.ny.cable.rcn.com] has
joined #go-nuts
05:29 < jgoebel> i don' know what the right size is
05:29 -!- triplez_ [n=triplez@124.155.195.7] has quit [No route to host]
05:29 <+iant> make([]string, len(m.Table.Columns))
05:29 -!- bogen [n=bogen@cpe-76-186-22-145.tx.res.rr.com] has joined #go-nuts
05:29 <+iant> but if you don't know how many columns there are, then, yes,
use container/vector
05:29 < jgoebel> ha
05:29 < jgoebel> i was trying to do something like that
05:30 < jgoebel> but i was using array
05:30 < jgoebel> which wants the size to be staticly linked
05:30 < jgoebel> SQL ERROR INSERT INTO states (`id`,`name`) VALUES ();
05:30 < jgoebel> close :)
05:30 < Eridius> the size is part of the type of an array
05:30 < JBeshir> What's the implementation difference between creating an
array like that, and using make?
05:31 < JBeshir> Is one stack and the other heap?
05:31 < jgoebel> Eridius: yes i know :)
05:31 < jgoebel> hence it did not work :)
05:31 <+iant> JBeshir: in this case, yes, but it doesn't have to be that way
05:31 <+iant> JBeshir: an array has a size which is fixed at compile time
05:31 <+iant> JBeshir: a slice does not
05:31 <+iant> JBeshir: but if you have an array on the stack, you can
convert it to a slice, and you will have a slice on the stack
05:32 <+iant> although that depends on compiler optimizations
05:32 < JBeshir> Okay.
05:33 -!- ineol [n=hal@mar75-9-88-171-191-168.fbx.proxad.net] has joined #go-nuts
05:33 -!- ineol [n=hal@mar75-9-88-171-191-168.fbx.proxad.net] has quit [Client
Quit]
05:36 -!- amacleod [n=amacleod@c-24-34-33-96.hsd1.ma.comcast.net] has quit ["Bye
Bye"]
05:36 -!- KinOfCain [n=KinOfCai@cpe-76-170-26-1.socal.res.rr.com] has quit
[Connection timed out]
05:36 -!- dionysiac [n=dionysia@209.91.107.250] has quit []
05:39 -!- facemelter [n=facemelt@87.60.0.194] has quit [Connection timed out]
05:39 -!- ajray [n=alex@wvc32563rh.rh.ncsu.edu] has left #go-nuts []
05:42 -!- travisbrady_ [n=tbrady@98.210.155.175] has joined #go-nuts
05:44 < jgoebel> grrr
05:44 -!- facemelter [n=facemelt@87.61.163.3] has joined #go-nuts
05:44 < jgoebel> man i think this would be easier if i didn't use native
types at all :)
05:44 < jgoebel> and made everything a string or something
05:45 -!- viirya [n=viirya@cml506-25.csie.ntu.edu.tw] has joined #go-nuts
05:47 -!- Fl1pFl0p1 [n=FlipFlop@ip68-8-225-187.sd.sd.cox.net] has joined #go-nuts
05:47 -!- travisbrady [n=tbrady@98.210.155.175] has quit [Read error: 60
(Operation timed out)]
05:47 < jessta> ORMs have always seemed a bit crazy to me
05:47 < jgoebel> how so?
05:47 < jgoebel> right now i'm struggling to get the values back out of the
objects struct for saving
05:48 < jgoebel> i suppose it's barely doable since i will know the type
from the DB
05:48 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has joined
#go-nuts
05:48 < jgoebel> and i can use that to know have a case that builds the
right types
05:50 -!- drusepth`` [n=drusepth@adsl-75-44-238-163.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
05:50 -!- droid001 [n=g1@p4FDCD362.dip.t-dialin.net] has joined #go-nuts
05:50 < jessta> because most of the time that database you're using isn't a
new database specific for your application
05:51 < Eridius> what makes you say that, jessta?
05:52 < jessta> so the ORM needs to be more complex to taking in to account
the various renaming of fields and distributing of data across different tables
etc.
05:52 < Eridius> quite often yes, the database you're working with is one
whose schema was designed for your app.  That's certainly true for web apps
05:52 -!- depood [n=depood@chello080108055214.19.11.vie.surfer.at] has joined
#go-nuts
05:53 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has quit ["This
computer has gone to sleep"]
05:54 -!- wackbeak [n=wackbeak@c-24-21-240-198.hsd1.or.comcast.net] has joined
#go-nuts
05:55 -!- wackbeak [n=wackbeak@c-24-21-240-198.hsd1.or.comcast.net] has quit
[Client Quit]
05:56 -!- wackbeak [n=wackbeak@c-24-21-240-198.hsd1.or.comcast.net] has joined
#go-nuts
05:59 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
["Leaving."]
06:00 -!- skyyy [i=caw@129.21.116.238] has quit [Client Quit]
06:00 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
06:00 -!- x-ip [n=sakura@unaffiliated/x-ip] has quit ["Leaving"]
06:00 < Ycros> uuuuuu
06:01 < Ycros> o_O
06:01 -!- natim [n=natim@202.114.95.154] has joined #go-nuts
06:01 -!- Heavensrevenge
[n=quassel@CPE001d0fe73b7d-CM00111ae5c642.cpe.net.cable.rogers.com] has quit
[Remote closed the connection]
06:02 < jgoebel> hmmm
06:02 -!- drusepth [n=drusepth@adsl-75-44-238-163.dsl.spfdmo.sbcglobal.net] has
quit [Read error: 110 (Connection timed out)]
06:02 -!- KinOfCain [n=KinOfCai@cpe-76-170-26-1.socal.res.rr.com] has joined
#go-nuts
06:02 < jgoebel> and i still can't tell the diffrence between a null numer
and a 0 one
06:02 -!- KinOfCain [n=KinOfCai@cpe-76-170-26-1.socal.res.rr.com] has quit [Remote
closed the connection]
06:02 < jgoebel> doe people usually use pointers to solve that?
06:03 < laurei> fmt.Printf("Hello, world"); // Why do we need to fmt.Printf,
why not just Printf?
06:03 <+iant> jgoebel: In Go there is no such thing as a null number
06:03 < jgoebel> there is in SQL :)
06:03 < Ycros> jgoebel: not if you set your column to "not null" :P
06:03 <+iant> jgoebel: so in Go you either use *int, as you suggest, or you
use a separate bool
06:03 <+iant> laurei: because Printf is in the fmt package
06:04 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts
06:04 < jabb> you could do "import . "fmt"" and then all you need to do is
Printf :P
06:06 < natim> jabb, Yes something like that could be good
06:06 -!- droid0011 [n=g1@p4FDCD806.dip.t-dialin.net] has quit [Connection timed
out]
06:07 < natim> looks like System.out.println()
06:07 < natim> Is there binding for GUI like gtk or Qt ? Or to connect
database ?
06:07 -!- me___ [n=venkates@c-68-55-179-48.hsd1.md.comcast.net] has joined
#go-nuts
06:07 < jessta> natim: no GUI yet
06:07 < jessta> but you can make web apps
06:07 < jabb> natim: http://go-lang.cat-v.org/library-bindings
06:08 -!- Will_D [n=will@c-71-231-59-135.hsd1.wa.comcast.net] has quit [Read
error: 110 (Connection timed out)]
06:09 < natim> Could do it : http://github.com/banthar/Go-SDL
06:09 -!- voluspa [n=voluspa@c-75-72-148-166.hsd1.mn.comcast.net] has quit [Read
error: 110 (Connection timed out)]
06:13 -!- zerofluid [n=zeroflui@ip68-227-10-141.lv.lv.cox.net] has quit ["This
computer has gone to sleep"]
06:13 -!- ronaldbe [n=ron@adsl-76-212-133-89.dsl.sndg02.sbcglobal.net] has joined
#go-nuts
06:13 < hyn> what's a good key-value database to use with Go?
06:13 < JBeshir> The map.
06:13 < hyn> Ah, I didn't think of that
06:15 < directrixx> me___: dho left this for you
http://codereview.appspot.com/157055
06:16 < laurei> will go be use for web apps via apache?
06:16 < uriel> laurei: will?
06:17 < jgoebel> or by itself :)
06:17 < uriel> (and really, apache 2.x is awful, why would anyone use it
with so many much better web servers out there?)
06:17 < me___> directrixx: thanks!
06:17 < laurei> so go would be used as standalone server then?
06:18 < JBeshir> Go can already be used by itself.
06:18 < JBeshir> Or rather, can already reply to HTTP requests.
06:18 < jgoebel> sure
06:18 < me___> there exists a few fastcgi modules for it as well
06:18 < jgoebel> golang.org is running a go written web server
06:18 < uriel> laurei: golang.org runs go
06:19 < natim> laurei, it could be use yes
06:19 < directrixx> me___: np
06:19 -!- cablehead [n=Adium@76.14.66.55] has joined #go-nuts
06:19 -!- cablehead [n=Adium@76.14.66.55] has quit [Remote closed the connection]
06:19 < natim> Actually it is the only thing that you can do for the moment
since there is no GUI interface
06:19 < reppie> i'm bored
06:20 < laurei> heh; got it
06:20 -!- danly [n=danlesli@S010600226b5eab8e.vs.shawcable.net] has quit []
06:20 < laurei> so if go can be used as a fastcgi, it can accept requests
from apache
06:21 < me___> yes.  you could also use go programs as regular cgi ones.
06:21 < laurei> which means that instances only get spawned when started via
apache?
06:21 < jgoebel> that should be really easy i'd think?
06:21 < laurei> (in a cgi configuration)
06:22 < me___> right.
06:22 < JBeshir> natim: You can create CLI programs.  :P
06:22 < natim> Oh yes of course :)
06:23 < natim> laurei, since it is compiled, it work exactly the same way as
a C,C++,C#,D, whatever program
06:23 < uriel> there are SDL and allegro libs already
06:23 < uriel> and even OpenGL I think
06:23 < natim> But why not just have done a Python Compiler ?
06:23 < uriel> see http://go-lang.cat-v.org/library-bindings
06:23 < uriel> natim: because python and go are like completely different
languages
06:24 < natim> Yes uriel, I saz this
06:24 < natim> Yes they are
06:24 < natim> But I don't understand the need of a new language
06:24 < JBeshir> natim: For the same reason they didn't just release a new
line of banana-flavoured fruitcakes.
06:24 < JBeshir> natim: They're kinda unrelated things.
06:24 < me___> natim: if you want CSP / channel based concurrency, what
would you do without Go?
06:25 < limec0c0nut> JBeshir: If Google released banana-flavored fruitcakes,
I would buy them.
06:25 < uriel> natim: did you watch rob's presentation?
06:25 < me___> Limbo, libthread, concurrent ML. all of which have their own
problems.
06:25 < JBeshir> limec0c0nut: Oh, me too.
06:25 < natim> Ok it is the needed answer.  Thank you me__
06:25 < me___> also, if you want something that compiles really fast, what
would you do?
06:26 < me___> (occam and a few others too, to not leave them out in the
cold :))
06:26 < natim> uriel, it is kind of impossible from China to watch Youtube,
Google Vidéo
06:26 * waltermundt is still thinking about XMPP-in-Go...but that needs SASL;
either bindings of a lib with callbacks or a new go impl.  Say we aim at the
latter.  Go-SASL needs stringprep, which probably means binding libidn which is a
more standard C lib.
06:26 < JBeshir> natim: In direct comparison to Python, what Go provides is
greatly increased speed and type safety.
06:27 < me___> and an understandable machine model.
06:27 < JBeshir> As well as no dependency on Python or Go libraries being
installed on the finished system.
06:27 < uriel> natim: that really sucks
06:27 < uriel> maybe somebody should put a copy of the video somewhere else?
06:28 < natim> The great firewall make even go test case failed :
http://paste.pocoo.org/show/151363/
06:28 < uriel> hah
06:28 < laurei> can go be used for embedding inside a webpage like php or
asp
06:28 < JBeshir> laurei: Not yet.
06:28 < jgoebel> so if i have *string in a struct....  how do i turn "blah"
into a pointer to blah?
06:28 < uriel> laurei: for embeding inside a web page?  uhu?
06:29 < jgoebel> so i can store it in the struct
06:29 < waltermundt> I imagine that one will crop up pretty quickly,
especially since I think Go code can build and then compile a Go AST
06:29 < uriel> laurei: if you want a templating system, go has one (and I'm
sure there will be more)
06:29 < jgoebel> i want ERB for go :)
06:29 < limec0c0nut> Someone was talking about a CGI package.  Wait a couple
weeks.
06:29 < uriel> laurei: mixing go and html is just idiotic, of course mixing
html with anything that is not just templating is idiotic
06:29 < Ycros> jgoebel: & ?
06:30 < jgoebel> cannot take the address of "Jimmy Dean"
06:30 < waltermundt> uriel: want to lay odds someone won't be doing it
within a month?
06:30 < natim> laurei, I 100% agree with uriel
06:30 < uriel> waltermundt: want to bet?  sure, how much?
06:30 < jgoebel> state.Name = &"Jimmy Dean";
06:30 < limec0c0nut> Nobody said it wasn't stupid.  They just said someone's
going to do it.
06:30 < natim> The big question is : Should we create binding from C
librairy or reprogram them in Go ?
06:30 <+iant> jgoebel: state.Name = new(string); *state.Name = "Jimmy Dean";
06:31 < waltermundt> I'm not the gambling type, but I'd give it pretty good
odds that *someone* implements a mixed Go+HTML templating language in the near
future.
06:31 < uriel> I mean, after .jsp, I think pretty much everyone with more
than one half working neuron realized the whole approach was a non-starter
06:31 < jgoebel> hmmm
06:31 < laurei> yeah i think they may implement it, i mean what if someone
knows go but not php/asp in the future
06:31 -!- oklofok [n=oklopol@a91-153-117-63.elisa-laajakaista.fi] has quit [Read
error: 110 (Connection timed out)]
06:31 < uriel> natim: that depends
06:31 < laurei> surely it can't hurt to just do it
06:31 < laurei> for a few lines of code
06:32 < laurei> simple page
06:32 < limec0c0nut> laurei: Down that way lie demons
06:32 < JBeshir> Writing Go to output HTML would be good as a CGI would be
good.
06:32 < jgoebel> no way to make [] a method call in Go, is there?
06:32 < Ycros> yeaaaah
06:32 < uriel> natim: writting stuff in Go from scratch will be more
interesting, educational, and in the long term useful, on the other hand getting
bindings to c will be easier and will get you up and running sooner
06:32 < limec0c0nut> laurei: That's what everyone says.  "It can't hurt...
for just a simple thing..."
06:32 < JBeshir> Interleaving Go and HTML weirdly could be horrible.
06:32 < uriel> laurei: please, if you don't understand what go is for, don't
speculate about silly stuff you don't understand
06:33 < Ycros> jgoebel: no
06:33 -!- aa [n=aa@r190-135-138-46.dialup.adsl.anteldata.net.uy] has quit [Read
error: 148 (No route to host)]
06:33 <+iant> worse than interleaving JavaScript and HTML?
06:33 < uriel> laurei: Go already has a quite good templating system if
anyone wants to use it
06:33 < limec0c0nut> JBeshir: It's already been done for a lot of languages.
<script language="go">...
06:33 < JBeshir> iant: Good question.
06:33 < uriel> ugh
06:33 < me___> also, since go can run in nacl, you could (with security way
off) feed it to a client nacl in source form!
06:34 < uriel> me___: I think rob actually wants something like that (he is
*really* crazy ;P)
06:34 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
["Leaving."]
06:34 < JBeshir> Go in the browser?  Sounds like something I should ask the
Chromium guys about, haha.
06:34 < me___> its like the blit, then, actually!
06:34 < uriel> I have seen comments of him saying that if Wave was written
in Go instead of JS, it would be so much faster!  ;)))
06:34 < Ycros> you could pre-process some sort of "template" file into go
source and then compile it
06:34 < me___> (browser == blit of 2009)
06:34 < laurei> speculation leads to understanding
06:35 -!- jgoebel [n=jgoebel@96-28-100-3.dhcp.insightbb.com] has quit [Read error:
104 (Connection reset by peer)]
06:36 < uriel> (maybe that is the secret plan, to use Go to reimplement wave
so people without 10Ghz and 30Gb of ram can actually use the thing ;P)
06:36 -!- jgoebel [n=jgoebel@96-28-100-3.dhcp.insightbb.com] has joined #go-nuts
06:36 < me___> forget wave, think flash.
06:36 < JBeshir> Ooooh, haha.
06:36 < JBeshir> Interesting plots.
06:36 < me___> so that our poor atom users can actually use the internet...
06:36 < uriel> it will take less time to get all browsers to support
compiling and running Go, than it will take hardware to become fast enough to make
wave bearable in its current incarnation
06:36 < laurei> so your answer to someone in 2015 who only knew go who
wanted to make a simple dynamic html page, would be to learn php?
06:37 < uriel> laurei: what part of *templating* you didnt understand?
06:37 -!- nigwil [n=chatzill@berkner.ccamlr.org] has quit ["ChatZilla 0.9.85
[Firefox 3.5.5/20091102152451]"]
06:37 < JBeshir> uriel: Yeah, Wave is kinda slow.  I don't see myself using
it much even fast, though.
06:37 < uriel> and I thought Rails damaged the brain!  I sure had forgotten
php!
06:38 < JBeshir> Call me an old IRC lag, but actually holding a conversation
in it looks horribly cumbersome.
06:38 < uriel> I bet there is a php-related disorder in the DSM-V
06:38 -!- ronaldbe [n=ron@adsl-76-212-133-89.dsl.sndg02.sbcglobal.net] has quit []
06:39 < directrixx> uriel: embedded personality disorder?
06:39 < uriel> JBeshir: I was going to give once more my opinion of wave,
but this is very offtopic here, come join #cat-v if you want to hear the whole
collection of curses and swearing ;)
06:39 < uriel> directrixx: hehehe
06:39 < me___> laurei: being more fair.  why would you want to make an html
page that contains php right now rather than have the php generate the html?
06:40 < me___> (or replace php with some template system + language)
06:42 < laurei> i just imagined a huge static site, that just needed one
dynamic section in one page, i would need to rewrite that page into a go program,
and output it via a template?
06:43 < me___> fair enough.  that means that there is a barrier to using a
template engine / program over embedding html
06:43 -!- Glao [n=raskc@c-71-198-186-8.hsd1.ca.comcast.net] has joined #go-nuts
06:43 < me___> and currently that barrier is high enough sometimes that its
worth resorting to inline php
06:43 < directrixx> I'm an SSI man myself.
06:44 -!- turutosiya [n=turutosi@219.106.251.65] has joined #go-nuts
06:45 < laurei> its just that most people who have ever done any shell
scripting or heavy lifting via php, have been introduced to php slowly through
just editing one line embedded scripts, i thought that by allowing go to do this,
would get people used to the syntax of the language, and when they have that down,
they might consider learning what compiling is because it would be worth it
06:45 < uriel> laurei: so?  what does any of that have to do with Go? *zero*
06:45 < JBeshir> As a system language, that isn't really the intended
primary reason for learning Go.
06:46 < me___> go doesn't look like its an answer to that problem; it does
take very little code to do some things
06:46 < me___> but its not as simple as a start/end tag.
06:47 -!- dschn [n=dschn@pool-70-19-224-19.bos.east.verizon.net] has quit
[Connection timed out]
06:47 < Gracenotes> laurei: I like the idea of static content generation.  a
lot.
06:48 < Gracenotes> triggered by things like adding comments, for instance
06:48 < laurei> I figure PHP is so popular is that anyone can start using
it, if go reached out to these people and helped them complete small tasks then go
would take off alot faster
06:48 < Gracenotes> if you host sites on github you can have it integrated
with, for instance, http://wiki.github.com/mojombo/jekyll/
06:49 < uriel> laurei: lots of things are very popular, that doesn't mean
they are not stupid, more like the contrary
06:49 < Gracenotes> Ruby script that does templating, can generate markdown,
etc.  I think the more static things are, the better.  but that's just me.
06:49 < Gracenotes> parse markdown, more like
06:49 < Ycros> Gracenotes: oh, yeah, jekyll is awesome
06:50 < Gracenotes> of course mostly just blogs and personal pages are
suited for it, not really for sites with a high information bandwidth, so to speak
:)
06:50 < laurei> i'd just be happier if i could have some platform running,
where i could throw syntax at and see the results, (ie a host running it) learn
slowly and then worry about installing and compiling etc
06:50 < Ycros> Gracenotes: though these days you can outsource comments to a
free service
06:50 < natim> What's wrong with this ? http://paste.pocoo.org/show/151366/
06:50 -!- ink_polaroid [n=pangloss@c-98-207-93-195.hsd1.ca.comcast.net] has joined
#go-nuts
06:50 < natim> It doesn't display any thing for the Reverse function
06:50 < Gracenotes> Ycros: yeah, I know someone who uses it with Disqus
06:50 < natim> It is true that the compilation is really fast
06:51 < natim> Good point
06:51 -!- hd_ [n=hd_@253.176.233.220.static.exetel.com.au] has joined #go-nuts
06:51 -!- drusepth`` [n=drusepth@adsl-75-44-238-163.dsl.spfdmo.sbcglobal.net] has
quit [Read error: 110 (Connection timed out)]
06:51 < uriel> laurei: you see, there is this thing called a *compiler*, you
throw code at it, and it generates *binaries*, which you then run and..
06:52 < Gracenotes> Ycros: Disqus also has consequences in terms of who owns
a comment.  which is a monolithic concept, but more appealing to many people
06:53 < Ycros> Gracenotes: that's exactly the setup I use
06:53 < ink_polaroid> Puzzle: I want to parse an XML file with my own
SAX-like interface.  io.ReadFile returns a bunch of bytes, and xml.NewParser wants
an io.reader.  What's the best way to get the contents of a file coerced to an
io.reader interface?
06:55 < Gracenotes> natim: hm, works for me
06:56 -!- path__ [n=path@115.240.76.34] has quit [Read error: 110 (Connection
timed out)]
06:57 -!- octoploid [n=octoploi@77-23-212-222-dynip.superkabel.de] has quit
["WeeChat 0.3.1-dev"]
06:57 < Gracenotes> natim: what's it not doing for you?
06:58 < natim> Maybe I am not using the good compiler
06:58 < natim> 8c instead of 6c
06:58 < JBeshir> natim: You're supposed to use the right compiler for your
platform.
06:58 < natim> Yes I know
06:59 < jgoebel> ink_polaroid: os.Open will open a file and return a
interface that's a reader i believe
06:59 < jgoebel> tht you can then pass to xml.newParser
06:59 < s_mosher> ink_polaroid, doesn't type File implement the Reader
interface?
06:59 < jgoebel> couldn't strings be readers to?  :)
07:00 < Gracenotes> they are
07:00 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has quit []
07:00 < Gracenotes> at least, the type wrapping strings.Reader
07:00 < s_mosher> you know, I think they'll want to document the implemented
interfaces more thoroughly
07:01 < s_mosher> looking up which implements what is a bit like doing
chemistry
07:02 < s_mosher> (but the table of elements is hardly periodic)
07:02 -!- ring-zero [n=hotshot@117.199.130.31] has joined #go-nuts
07:03 < me___> be fair, the halogens pretty much are.
07:03 < directrixx> s_mosher: isn't the fact that File implements Reader
documentation enough?
07:03 < directrixx> s_mosher: Read
07:03 < laurei> not everyone can use compilers uriel, and certainly not many
have access to a web server that runs binaries, but my baby brother could make php
print his name on a page on a shared host, if go just _allowed_ people to use its
syntax mixed in with html, it would drastically flatten the learning curve, the
community would grow much faster, how is that evil?
07:04 < Gracenotes> given that strings are immutable, are there any
string-building-packages around anywhere?
07:04 < s_mosher> directrixx, it's enough to work it out, but it might be
nice to have a table for that, so I can find it in one place instead of ~4 (the
call, the interface, the type and then the method)
07:04 < JBeshir> laurei: Go's primary goal is as a systems language and to
gain popularity as that.  Additionally, if you can't use a compiler, you're pretty
much screwed about learning how to actually program.
07:05 < s_mosher> me___, which are the halogens in go?
07:05 < Gracenotes> I can never be sure about what the libraries contain
07:05 < jdp> hey all
07:05 < jdp> is there anywhere to post go projects?
07:06 -!- ArekZB [n=ArekZB@76-10-138-81.dsl.teksavvy.com] has left #go-nuts []
07:06 < Gracenotes> I've said it before, the sooner Go gets some relatively
central packing system, the better .-.
07:06 < directrixx> s_mosher: that's true, especially for the really common
interfaces.
07:07 < s_mosher> though to be fair, parts 3 and 4 can be seen in the ToC on
the relevant page
07:07 < laurei> JBeshir: no you're not screwed, compiling isn't programming,
any more than owning a pit crew is race-car-driving, programming is commands in
syntax, which scripts do quite well
07:07 < Gracenotes> there is http://go-lang.cat-v.org/ - not very many
listed http://go-lang.cat-v.org/pure-go-libs
07:07 < s_mosher> I really think godoc should be smart enough to spit out
interface implementations though
07:08 < Gracenotes> s_mosher: what I would like somewhat better is all
implemented interfaces of a type :) but the other way around would be good
07:08 -!- nigwil [n=chatzill@ppp59-167-87-232.lns20.hba1.internode.on.net] has
joined #go-nuts
07:08 < Gracenotes> s/better/more/ maybe
07:09 < JBeshir> laurei: Compiling requires, in effect, the ability to
execute a few simple commands.  Programming is a lot, lot harder.
07:09 < JBeshir> It's like saying there should be a way to learn Go for
people who can't handle the power button on their computers.
07:10 < s_mosher> Gracenotes, I would pick my way over yours if I could only
have one, but ideally I'd like to see both
07:10 < laurei> you make programming harder JBeshir
07:10 < laurei> programming should be getting toward the proverbial 5th
generation natural human language, not backwards
07:11 -!- nolsen01 [n=nicholas@pool-108-0-91-8.lsanca.fios.verizon.net] has joined
#go-nuts
07:11 < quag> laurei: is there a tendency towards natural human language?
07:11 < JBeshir> Personal opinion to counter yours: No it shouldn't.
07:11 < Innominate> programming is counter to natural human language
07:11 < JBeshir> But, either way, you're probably looking at the wrong
language.
07:11 < Innominate> natural human language is full of ambiguities, something
a programming language cannot have
07:12 < quag> Innominate: without ai compilers, but then they aren't really
compilers are they :)
07:12 < ink_polaroid> thanks jgoebel, s_mosher.  os.Open hands me a *File
which is what xml.NewParser wants.
07:12 < Innominate> quag: Nor would it really be programming
07:12 < s_mosher> ink_polaroid, it's pretty cool that the answer to your
problem was "just throw the file itself at it"
07:13 < quag> Innominate: more like having a conversation :)
07:13 < Innominate> management.  heh
07:13 < laurei> programming should be easy as natural human language
07:13 < laurei> why on earth should it be harder
07:14 < laurei> you can be very specific in english
07:14 < Innominate> Because programming isn't a language issue, it's a
thought process issue
07:14 < nolsen01> natural language that uses slang is really ambiguous.  But
anybody who has ever written a research paper knows that there are extremely
strict rules to follow when using a natural language in a formal capacity
07:14 < laurei> for eg.  lawyers speak very specifiacally, they don't use
slang
07:14 < ink_polaroid> it _is_ what I would have done if I hadn't received so
much brain damage from C++ :-)
07:14 < nolsen01> Whether or not its strict enough is a different question.
07:15 < Innominate> And legal speak is both loaded with ambiguities AND is
often far more arcane than any programming language
07:16 < s_mosher> boy I sure hope this stuff about programming and natural
languages passes before I let a certain opinion slip
07:16 < me___> laurei: programming isn't all about computers!  can you think
of a relatively complex concurrent system?
07:16 < Innominate> legal speak is a pretty good example of why it's hard to
be completely unambiguous with natural language
07:16 < quag> s_mosher is a lawyer!
07:16 -!- oklofok [n=oklopol@sparkgw.utu.fi] has joined #go-nuts
07:16 < me___> (hoare's CSP book describes CSP in terms of a vending machine
and customers).
07:17 < s_mosher> quag, I've been called worse
07:17 -!- dinx [n=kelly@CPE-58-175-97-189.szmy1.win.bigpond.net.au] has joined
#go-nuts
07:17 < JBeshir> s_mosher is a patent lawyer!
07:17 < JBeshir> Sorry, had to.
07:17 < ink_polaroid> that's an awful thing to say about someone.  even a
lawyer.
07:18 < s_mosher> it's true
07:18 < ink_polaroid> if you're good, you'll return in the next life as an
insurance adjuster :-)
07:18 < nolsen01> Before I wanted to be a software engineer, I thought about
becoming a lawyer
07:18 < s_mosher> I'm not even a lawyer
07:18 < laurei> human language becomes very accurate depending on the
context, its ALL about context
07:19 < JBeshir> laurei: Go write a human language compiler
07:19 < laurei> my point is, that there should be a context for web in go
07:19 < JBeshir> laurei: If it's that clear, shouldn't be hard.
07:19 < nolsen01> what exactly do you mean by "context"?  or "depending"?
or "accurate"?
07:19 < me___> what do you mean by 'context for web'?
07:19 < JBeshir> What do you mean by 'in go'?
07:20 < Innominate> what do you mean by "its"?
07:20 -!- bogen [n=bogen@cpe-76-186-22-145.tx.res.rr.com] has left #go-nuts []
07:20 < me___> (i wasn't being snarky, i don't actually know...)
07:20 < s_mosher> man, is Bill Clinton around?
07:20 < Innominate> (i was just making a bad clinton joke)
07:20 < nolsen01> You know what is interesting: creating a parser for a
natural programming language would require gigantic breakthroughs in artificial
intelligence.
07:20 < directrixx> I'm under his desk right now
07:20 < ink_polaroid> no, but Joe Biden is on the Daily Show.
07:21 < s_mosher> Innominate, at least one person caught it
07:21 < laurei> by context i mean, an understanding of certain preconceived
facts
07:21 < laurei> in web, the fact is you are outputting to a browser by
default
07:22 * JBeshir makes notes
07:22 < laurei> so in mod_php echo sends something to the browser
07:22 < laurei> in a cli, its not going to do that
07:22 * nolsen01 loves google products
07:22 < me___> (would a browser-retargetted libdraw be interesting,
actually?)
07:22 < Gracenotes> nyaa~
07:22 * nolsen01 and is extremely stoked about Go
07:23 -!- path__ [n=path@59.162.86.164] has joined #go-nuts
07:23 -!- shambler [i=kingrat@mm-73-164-84-93.dynamic.pppoe.mgts.by] has quit
["What you have been is not on boats."]
07:23 < s_mosher> I am really having a hard time resisting the urge
07:23 < directrixx> I've lost track of what this discussion/argument is
about.
07:24 < laurei> context makes a few words very powerful, thats why php is so
popular, people don't have to compile or be specific about much at all
07:24 < Innominate> i think it's about not having mod_go like php and the
ability to horribly mash up code/html
07:25 < laurei> i just think go should have a better context for web so that
clueless people can start to use it and then finally when they are proficient,
change context and become great at systems or whatever
07:25 -!- sm [n=sm@cpe-75-85-88-227.socal.res.rr.com] has joined #go-nuts
07:25 -!- trickie [n=trickie@94.100.112.225] has joined #go-nuts
07:25 < laurei> Innominate: are you a parent, if you are do you tell your
baby to shut up until it can recite shakespeare?
07:26 -!- Guest16765 [n=sn@chello089075057223.chello.pl] has quit [Read error: 104
(Connection reset by peer)]
07:26 < nolsen01> Why did the creators of Go concentrate so much to compile
speeds?  It seems like computers are fast enough by now that the difference is
negligible.
07:26 < s_mosher> ok that's it.  laurei, please stop.
07:26 < Innominate> i agree, a nice web framework for go would be nice, but
your comments about what that means are questionable
07:26 < Perberos> wtf
07:26 -!- evilhackerdude [n=stephan@e181088183.adsl.alicedsl.de] has quit [Read
error: 113 (No route to host)]
07:26 < directrixx> Perberos: indeed.
07:26 < laurei> what it means is that, people should be able to create bad
code
07:26 < laurei> if they are learning
07:27 < JBeshir> nolsen01: Actually, the differences are pretty big.
07:27 < laurei> bad code is only bad if you trust it
07:27 < Innominate> and the moment you put bad code onto a webserver you're
implicitly trusting it
07:27 < JBeshir> nolsen01: Compiling a moderately sized C/C++ app can take
ten minutes, more for most "big" applications.
07:27 < JBeshir> Go takes...  under a second?  Ten seconds for the whole Go
standard library?
07:28 < nolsen01> ah.  I haven't worked on a big project yet.
07:28 < nolsen01> wow.
07:28 -!- travisbrady [n=tbrady@98.210.155.175] has quit [Read error: 60
(Operation timed out)]
07:28 < fgb> yep, compiling c++ really sucks ass
07:28 < fgb> specially with all the header dance
07:29 < JBeshir> fgb: Someone needs to make that into a video.  "Header
dance"
07:29 < laurei> Innominate: not all webservers are important, not all of
them can really damage much at all
07:29 < JBeshir> It could be great marketing for Google.
07:29 < JBeshir> Or Go.
07:29 < Innominate> laurei: And who would want to steal my identity i dont
have any money in the bank!
07:29 < ink_polaroid> nolsen01 and laurei are really talking about the same
thing.  if Go can bring the compilation time of 100K LOC libraries or applications
down to a handful of seconds, then the compile/run/debug cycle will mean we can
iterate as fast as we can with python/ruby/etc.
07:29 < laurei> so who actually thinks that languages that allow people to
create bad code are bad inherently?
07:29 < nolsen01> I wonder how long it would take to go through all of the
source code and find the BigO for each algorithm used in the Go standard library
and compare it to the BigO of the C++ standard library
07:29 < JBeshir> laurei: All webservers are very very important.
07:29 < fgb> JBeshir, heh
07:29 < Innominate> Allowing people to create bad code is different from
encouraging it.
07:29 < Perberos> I am programmer, not money, not life
07:29 < JBeshir> laurei: If your webserver gets compromised, you are
spamming and DDoSing anything, anywhere.
07:30 < path__> is this true even with good dependency management so that
only small amounts of code have to be compiled each time
07:30 < JBeshir> laurei: This is extremely bad, and if you permit it, you
are not doing your job nor behaving with any level of decency.
07:30 < nolsen01> I programmed in C++ for awhile, but then was forced to use
C in an embedded systems programming class.  I have an affinity for C that I lack
for C++
07:30 < nolsen01> because of its efficiency over C++
07:31 < me___> 'efficiency'?
07:31 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
07:31 < nolsen01> efficiency
07:32 < kmc> C++ isn't magically slower than C
07:32 < kmc> it has specific features that are, which you can choose not to
use
07:32 < nolsen01> nope.  Not magically.  There are in fact reasons
07:32 < KragenSitaker> it is often the case that C++ compilers have
avoidable efficiency problems when compiling pure-C constructs
07:32 -!- ego [n=ego@ait-23-247.ait.gr] has joined #go-nuts
07:32 < kmc> such as?
07:33 < fgb> how much time do you need to build firefox in a quad?
07:33 < KragenSitaker> g++, msvc++, portland group
07:33 < laurei> JBeshir: we are getting out of context, with security in
place nobody shouldbe able to ddos or hacked or spam people, but people should be
able to start to write programs easily, not worry about compiling, mistakes etc
07:33 < path__> why is go being used for templating such a bad thing?  Im
just asking
07:33 < KragenSitaker> (or so I have heard)
07:33 < nolsen01> Well, for instance: each instance of a class has its own
version of their functions
07:33 < nolsen01> in C, you have ownly one function in memory that you call
07:33 < me___> KragenSitaker: just a quick silly test, hello world with gcc
was about a kilobyte smaller than with gcc...
07:33 < nolsen01> in C++, you have the same function for every instance of
the class that you call
07:33 < kmc> nolsen01, that's not at all true
07:34 < ink_polaroid> no one really uses C++.  everyone picks their subset.
google's style guide forbids exceptions, RTTI, etc.
07:34 < fgb> http://linuxreviews.org/gentoo/compiletimes/
07:34 < KragenSitaker> nolsen01: you need to spend more time with a
disassembler I think
07:34 -!- turutosiya [n=turutosi@219.106.251.65] has quit [Connection timed out]
07:34 < kmc> nolsen01, a non-virtual member function is just like a regular
old C function, that takes a hidden "this" argument
07:34 < me___> also, that g++ can't do ipa (gcc can) is the only limitation
i know of those two...
07:34 < nolsen01> I have spent absolutely no time with a disassembler
07:34 < nolsen01> this is just what I've learned from a class that I took
07:34 < nolsen01> I don't know assembly
07:35 < kmc> a class with virtual member functions gets a single pointer to
a per-*class*, not per-object table, which has pointers for each of the virtual
methods only
07:35 < kmc> (on a typical C++ compiler)
07:35 < path__> ink_polaroid: why no exceptions?
07:35 < fgb> nolsen01, app-office/openoffice-ximian-1.1.59 10 hours, 50
minutes and 18 seconds.  in a xeon
07:35 < kmc> a non-virtual member function call should take exactly as much
time as a C function call with the same arguments (including the hidden "this")
07:36 < me___> KragenSitaker: what kind of stuff have you seen c++ do wrong
(that was avoidable)?
07:37 -!- MrTopf [n=mrtopf@p5B3D7105.dip.t-dialin.net] has joined #go-nuts
07:37 < nolsen01> kmc: I appreciate that.
07:37 < ink_polaroid> path__, they're difficult to work with across a large
codebase.  it's difficult/impossible to see the control flow just by reading the
code.
07:37 < ink_polaroid> more here:
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Exceptions
07:38 < path__> hmm I see.
07:38 < KragenSitaker> me___: oh, just missed optimizations
07:38 < path__> surely the second con can be dealt with using a top level
catch like statement ....  I dunno
07:39 < ink_polaroid> in the sense of managed server-side code, it's better
just to crash.
07:39 < kmc> KragenSitaker, but C++-specific missed optimization?
07:39 < KragenSitaker> no
07:39 < path__> hmm
07:39 < me___> that the c compiler would have gotten?
07:39 < kmc> well okay...
07:39 < KragenSitaker> yes
07:39 < path__> oh maybe this is specifically exceptions with C++ they're
talking about.  I use it in languages with managed memory
07:39 < kmc> exceptions in C++ are hairy
07:40 < ink_polaroid> google uses exceptions in java, yes.  they're a 1st
class citizen of the language there.
07:40 -!- developer09
[n=develope@CPE0018f845c8e2-CM0014e8b55514.cpe.net.cable.rogers.com] has joined
#go-nuts
07:40 < KragenSitaker> well and
07:40 < KragenSitaker> you can't avoid them
07:40 < kmc> they weren't well-supported in older C++ compilers either
07:40 < KragenSitaker> and you don't have N years of exception-free Java
code to maintain either
07:40 < me___> sure, they were added later.
07:40 < KragenSitaker> they were added before Google was started
07:40 < JBeshir> kmc: Old C++ compilers don't support anything
07:40 < KragenSitaker> so that's not much of an excuse
07:41 < JBeshir> kmc: You're generally far better off just dropping support
for them, IMO.
07:41 < path__> in the case of C++ I assume the real problem is if you throw
exceptions you dont know if you've cleaned up memory and stuff
07:41 < kmc> path__, you do if you're properly using RAII
07:41 < me___> not quite, if you play the RAII game, you cna
07:41 < KragenSitaker> well, side effects in general
07:41 < kmc> but most people don't
07:41 < KragenSitaker> not just resource acquisition
07:41 < path__> ah
07:42 < vegai> why are people so moronically defending nullable pointers?
07:42 < KragenSitaker> if there is some data structure with invariants that
are temporarily broken, you have to either destroy the data structure (without
crashing!) or restore the invariant
07:42 < vegai> Haven't they read anything in 30 years?!
07:42 < ink_polaroid> for C++, the only way to ensure safety is to have
everyone understand the call stack all the way down from their code to the last
turtle.  that hits a limit pretty soon with N+1 developers.
07:43 < KragenSitaker> vegai: it may not be a good idea to assume that Rob
Pike, Ian Taylor, and the coworkers they've chosen disagree with you because they
are morons who haven't read anything in 30 years
07:43 < kmc> vegai, stockholm syndrome from Java perhaps?
07:43 < ink_polaroid> hence, a rule (compiler-enforced) that exceptions
aren't used
07:43 < vegai> KragenSitaker: I think that way too, but I'm starting to
doubt that notion
07:43 < kmc> is there a principled defense of the inclusion of nullable
pointers in Go?
07:43 < KragenSitaker> vegai: a lot of that team actually has substantial
experience with SML
07:43 < KragenSitaker> kmc: not that I've seen.  it's more a matter of taste
07:44 -!- nolsen01 [n=nicholas@pool-108-0-91-8.lsanca.fios.verizon.net] has quit
[]
07:44 < me___> bob harper worked down the hall from them, actually.
07:44 < kmc> taste??
07:44 < vegai> KragenSitaker: I wonder if they had this discussion already,
then
07:45 < path__> ah I just read up RAII.  I wasnt familiar with the term, but
I guess the basic idea is something most us know without the name for it
07:45 < kmc> you're talking about adding a magical special-case value to
nearly *every* type in the language
07:45 < kmc> that is more than a matter of taste.
07:45 < kmc> it could be defended by argument, but you can't dismiss it as
"taste"
07:45 < KragenSitaker> vegai: I am sure they did
07:46 < KragenSitaker> kmc: I'm not dismissing it.
07:46 < KragenSitaker> I wonder if there are discussions on the mailing list
that elucidate this crucial point.
07:46 < laurei> ok guys I must go, but so you don't get the wrong idea, my
point again is that I believe Go sounds like an awesome language, but if there was
something like a mod_go which enabled people to "script" in web pages using the
immensely powerful infrastructure of a live web server to see INSTANT results (as
opposed to needing your own server, compiling etc.) a lot more people would get
satisfaction in the language, and become go users, and
07:46 < laurei> to become "real" programmers.  I realise Go is not primarily
for the web, but I can't see how allowing it (a context which lets inexperienced
programmers to see results on the web) needs to hurt Go, it will just make it more
popular.  Thanks.
07:46 < vegai> I'm all for minimalism, though, and removing features that
are sometimes useful as well
07:46 < vegai> but to defend these choices like they were the single best
option seems absurd
07:46 < me___> option ptrs aren't quite a feature
07:47 -!- RayNbow [i=kirika@scientia.demon.nl] has joined #go-nuts
07:47 < KragenSitaker> laurei: I look forward to seeing your mod_go project
07:47 -!- Fl1pFl0p1 [n=FlipFlop@ip68-8-225-187.sd.sd.cox.net] has quit [Client
Quit]
07:47 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
[Connection timed out]
07:47 < jgoebel> man
07:47 < jgoebel> laurei: you still going on about that?
07:47 < KragenSitaker> vegai: yeah, I don't think anything in Go can be
defended as being clearly the single best option
07:47 < me___> laurei: the tragedy with mod_* is that its mean to the poor
webservers.  in pythonland, fastcgi is preferred, i think.
07:47 < kmc> arent mod_foo out of style these days in favor of writing an
embedded webserver library?
07:48 < me___> KragenSitaker: the channel system would be close if anything
07:49 < KragenSitaker> I think most things can be defended as useful,
usable, simple, and solid.  but not optimum..
07:49 < kmc> nullable pointers are certainly not simpler than the
alternative
07:50 < KragenSitaker> in implementation they are!
07:50 -!- stepnem [n=stepnem@88.103.132.186] has quit [Read error: 110 (Connection
timed out)]
07:50 < me___> there is no runtime for them
07:50 < KragenSitaker> I don't want to put words in the mouths of the Go
team, but separating nullability from pointers would impose a lot of changes on
the language.  pointer types wouldn't have a zero value and so would need to be
initialized upon creation, you'd need an ML-like constructor syntax to build
full-grown structs already populated
07:50 < laurei> sorry not to sure about difference between mod_ and cgi,
whichever would work best
07:50 < KragenSitaker> instead of populating them with a series of side
effects
07:50 -!- laurei [n=laurei@dsl-58-6-144-57.qld.westnet.com.au] has quit []
07:51 < kmc> KragenSitaker, and you'd have the very basic property that any
pointer to an object is actually a pointer to an object and not an empty promise
07:51 < KragenSitaker> laurei: there's already a whole webserver in go
07:51 < kmc> that's worth a lot
07:51 < KragenSitaker> kmc: yes, I understand the benefit
07:51 -!- oklokok [n=oklopol@sparkgw.utu.fi] has joined #go-nuts
07:51 < KragenSitaker> kmc: I'm sure they do too
07:51 -!- ned- [n=ned@c-76-19-208-96.hsd1.ma.comcast.net] has joined #go-nuts
07:51 -!- _rogue780 [n=rogue780@c-68-34-234-213.hsd1.md.comcast.net] has joined
#go-nuts
07:51 < JBeshir> kmc: How, precisely, do I have an optional pointer
parameter to things now?
07:51 < kmc> ?
07:52 < KragenSitaker> but how much that benefit is worth, and whether it's
worth the other complexities it introduces, is a matter of taste
07:52 -!- ned [n=ned@c-76-19-208-96.hsd1.ma.comcast.net] has quit [Nick collision
from services.]
07:52 < JBeshir> In C, there are numerous cases you pass a pointer, or NULL
for it to not use something.
07:52 < KragenSitaker> JBeshir: oh, we're just speaking ML. a C pointer is
an option ref in ML-speak
07:52 < me___> JBeshir: that's mixing meanings.
07:52 < kmc> JBeshir, you'd use a type that explicitly incorporates the idea
of a missing value
07:52 < JBeshir> If there was no nil value and it always pointed to a valid
object
07:52 < JBeshir> Then that would not precisely work well.
07:52 < kmc> and the language would of course have to support these well
07:52 < KragenSitaker> JBeshir: which is to say, it is a reference, and it
also has the option of pointing to nil
07:52 -!- nathanielk_ [n=quassel@frigga.summersault.com] has joined #go-nuts
07:53 < JBeshir> KragenSitaker: Right.  I'm answering the "Why not force all
pointers to point to something?" thing.
07:53 < KragenSitaker> JBeshir: there are alternatives; you can try out any
ML dialect to experience them.
07:53 < kmc> KragenSitaker, 'a option ref or 'a ref option?
07:53 < kmc> i think the latter makes more sense (unless i forget ML)
07:53 -!- tabo` [n=tabot@camelot.tabo.pe] has joined #go-nuts
07:53 < kmc> because a NULL pointer doesn't point to a valid place to store
something
07:53 < JBeshir> Precisely
07:53 < kmc> you want a ref which might not exist.  not a ref to a cell
which definitely exists and may or may not hold an object
07:53 < KragenSitaker> kmc: I think you're right
07:53 < JBeshir> A NULL pointer is a "missing value" pointer.
07:54 < KragenSitaker> JBeshir: yes, we all know what a nil pointer is, I
think
07:54 < sladegen> why?  null pointer can point to unique value that is
considered "NULL"...
07:54 < JBeshir> sladegen: No, it can't.
07:54 < JBeshir> sladegen: By definition of NULL and nil.
07:54 < JBeshir> They never point to anything any other pointer can point
to.
07:54 < KragenSitaker> JBeshir: the alternatives include the Null Object
Pattern and the ML approach
07:54 < kmc> ?
07:54 < JBeshir> KragenSitaker: I was relating it to his previous
statements.
07:54 -!- Netsplit farmer.freenode.net <-> irc.freenode.net quits:
directrixx, bakkdoor, mrd`, trickie, oklofok, spiffytech, roto, tabo, nathanielk,
bluemoon, (+47 more, use /NETSPLIT to show all of them)
07:55 < Gracenotes> I don't like parser.ParseExpr very much :/
07:55 -!- eharmon [n=eharmon@74.204.161.105] has joined #go-nuts
07:55 -!- Netsplit over, joins: Boohbah
07:55 < sladegen> JBeshir: sure it can...  this null value is of unique
type, and has one single "static" instanstiation.
07:55 -!- Netsplit over, joins: mrd`, eno, Bao
07:55 < path__> why pointers at all?  Why not references like in say java?
07:56 -!- Netsplit over, joins: Robdgreat
07:56 -!- Paradox924X [n=Paradox9@98.142.211.46] has joined #go-nuts
07:56 -!- Netsplit over, joins: bengl, dj_ryan
07:56 -!- Netsplit over, joins: tsavola
07:56 < kmc> path__, pointers in go are more like references
07:56 < sladegen> JBeshir: for example #f in scheme.
07:56 -!- Netsplit over, joins: Egelmex, vegai, trickie, akheron, spiffytech,
feenode
07:56 < kmc> in that you can't do unsafe pointer arithmetic, without a
special module
07:56 -!- Netsplit over, joins: ac
07:56 < ink_polaroid> back in the day, we used to yell SPLIT!  when things
like that happened.  welcome back everyone.  :-)
07:56 < Gracenotes> what is the distinction between pointers and references?
07:56 -!- Netsplit over, joins: philips
07:56 < kmc> well, except they can be NULL
07:56 < me___> also - Object* x points to a type Object, no?  then what is
typeof (nil)?
07:56 -!- Netsplit over, joins: laprice
07:56 < Gracenotes> ink_polaroid: I don't think everyone is back yet :)
07:56 -!- Netsplit over, joins: Jerub, sdier, anticw, chipdude, enigmus
07:56 -!- BlueT_ [n=matthew@blog.psinfo.com.tw] has joined #go-nuts
07:56 < kmc> interface {} * ?
07:56 < Gracenotes> at least, not for me
07:56 < JBeshir> Constant?
07:57 < path__> well I just mean why the deferencing stuff?  how is it
useful
07:57 -!- Netsplit over, joins: jnwhiteh, bakkdoor
07:57 < path__> why not the approach everything is a reference?
07:57 -!- wackbeak [n=wackbeak@c-24-21-240-198.hsd1.or.comcast.net] has quit []
07:57 < path__> is it because function calls in go by default are "by value"
?
07:57 < Gracenotes> path__: oh, you're asking for safety checks
07:57 -!- Netsplit over, joins: lstoll
07:57 < JBeshir> Because it's ungodly horrible when mixing mutable and
immutable types
07:57 < Gracenotes> that would require runtime overhead that's not always
acceptable
07:57 < JBeshir> That's one reason why not "everything is a reference".
07:58 < KragenSitaker> kmc: in Go there's a difference between **T and *T;
not so for C++ or Java references
07:58 < kmc> that's true
07:58 < developer09> Hi - quick question: been browsing the Go page, but
still not sure what the target platform is...is this for desktop apps.  web apps,
etc.  ?
07:58 < kmc> C++ will not let you take a double-ref
07:58 < JBeshir> I think in C++, there is a difference.
07:58 < path__> I dont understand.  If immutable types have methods which
just return new instances ...  it all works well doesnt it
07:58 < kmc> a ref, once initialized, is supposed to be indistinguishable
from its refarant
07:58 < KragenSitaker> developer09: compilers, linkers, web servers,
operating systems
07:58 < Gracenotes> Go is similar to Java in that is passes pointers by
value
07:58 < ink_polaroid> in a class/struct you want the ability to allocate
memory only when you need to create the object.  hence pointers.  they only carry
a 4 byte overhead, as opposed to having to create an empty instance of every
object you have a reference to.
07:58 -!- jaska^ [i=jaska@CDLXXI.voas.sl-laajakaista.fi] has joined #go-nuts
07:58 < kmc> it has the same address too
07:58 -!- kcwu [i=fakeidkc@kcwu.csie.org] has joined #go-nuts
07:59 -!- Demp [i=sbnc@13.f.cali.vgames.co.il] has joined #go-nuts
07:59 -!- vcgomes [n=vcgomes@li17-238.members.linode.com] has joined #go-nuts
07:59 -!- shambler [n=sil@213.184.241.199] has joined #go-nuts
07:59 < path__> but with references the same thing happens.  If I have a
reference I havent allocated memory
07:59 -!- arun [n=arun@skeletor.few.vu.nl] has joined #go-nuts
07:59 -!- no_mind [n=orion@122.162.27.69] has joined #go-nuts
07:59 < KragenSitaker> ink_polaroid: the null object pattern answers that
objection
07:59 < developer09> KargenSitaker: ...and the current SDK: is it for
desktop apps now ?
07:59 -!- existsec [n=existsec@yosemite.yosemite.edu] has joined #go-nuts
07:59 < KragenSitaker> developer09: not really
08:00 < Gracenotes> anyway, I'm somewhat annoyed: if you pass
parser.ParseExpr something like "i)", it will accept it :/ and say it's just "i"
08:00 < KragenSitaker> developer09: wait a week
08:00 < path__> I still dont get why pointers and values is better than a
model where every variable is a reference
08:00 < Gracenotes> I want recursive descent, damn it!  whole-expression
parsing!  aren't there any standards anymore???
08:00 -!- ivan` [n=ivan@unaffiliated/ivan/x-000001] has joined #go-nuts
08:00 -!- MrTopf [n=mrtopf@p5B3D7105.dip.t-dialin.net] has joined #go-nuts
08:00 < developer09> KragenSitaker: Do you work for google ?
08:00 -!- bluemoon [n=bluemoon@c-98-225-14-178.hsd1.wa.comcast.net] has joined
#go-nuts
08:00 < KragenSitaker> developer09: no
08:00 -!- dwery [n=dwery@nslu2-linux/dwery] has joined #go-nuts
08:00 -!- roto [n=roto@64.79.202.154] has joined #go-nuts
08:00 -!- depood [n=depood@chello080108055214.19.11.vie.surfer.at] has quit []
08:00 < developer09> KragenSitaker: ahh, ok - is there an announcement
coming ?
08:01 < KragenSitaker> developer09: not that I know of
08:01 -!- bjorn` [i=bjorn@archlinux.no] has joined #go-nuts
08:01 < path__> The only guess I could make was that in go if I call foo(a),
foo gets a copy of a instead of a copy of the reference.
08:01 < KragenSitaker> developer09: I'm just predicting that in a week,
people outside google will have put together bindings to enough GUI libraries that
you can write desktop apps with it
08:01 < shambler> and what will happen in a week?
08:01 < shambler> oh
08:01 < shambler> ;)
08:01 < developer09> shambler: that's what I'm wondering...Chrome OS ?
08:01 < KragenSitaker> just given what I've seen people doing so far
08:01 < path__> but even then if a is an immutable type that returns a new a
on any method the problem seems to go away
08:01 -!- Yuffster [n=yuffster@71.181.138.238] has joined #go-nuts
08:01 -!- freespace [i=foobar@85.203.232.72.static.reverse.ltdomains.com] has
joined #go-nuts
08:01 -!- depood [n=depood@chello080108055214.19.11.vie.surfer.at] has joined
#go-nuts
08:02 < KragenSitaker> developer09: Google is a huge company, it's not like
every person there uses every piece of software they make
08:02 < waltermundt> I wouldn't make any bets on what Google projects may
use Go, or when.
08:02 -!- Killerkid [n=l1am9111@host86-132-25-26.range86-132.btcentralplus.com]
has joined #go-nuts
08:02 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has joined
#go-nuts
08:02 < KragenSitaker> developer09: also it's not production-ready yet
08:02 -!- directrixx [n=aleksand@ip68-231-189-247.tc.ph.cox.net] has joined
#go-nuts
08:02 -!- directrixx [n=aleksand@ip68-231-189-247.tc.ph.cox.net] has left #go-nuts
["Leaving"]
08:02 -!- jimi_hendrix [n=jimi_hen@unaffiliated/jimihendrix] has joined #go-nuts
08:02 < developer09> KragenSitaker: Yes, that is true.  I am just wondering
if there are practical uses in store.
08:03 -!- cgibreak [n=cgibreak@pool-71-171-137-50.chi01.dsl-w.verizon.net] has
joined #go-nuts
08:03 -!- Amaranth [n=travis@ubuntu/member/Amaranth] has joined #go-nuts
08:03 < sladegen> and probably won't be production ready as fully planned in
another six months.
08:03 < developer09> KragenSitaker: Can I make money with it, or is it more
of a curiosity...  :)
08:04 < kmc> you can make money with any language no matter how bad it is
08:04 < KragenSitaker> developer09: do you make money with C or C++ now?
08:04 < kmc> (e.g.  PHP)
08:04 < ink_polaroid> thanks for the pointers (no pun intended) earlier.
'night everyone.
08:04 -!- ink_polaroid [n=pangloss@c-98-207-93-195.hsd1.ca.comcast.net] has quit
[]
08:04 < quag> developer09: given the interest in go, I'd expect people will
make money with it
08:04 -!- shasbot [n=shasbot@ip70-171-218-55.tc.ph.cox.net] has joined #go-nuts
08:04 < developer09> KragenSitaker: yuppers...development is where it's at!
08:04 < KragenSitaker> developer09: then you will probably be able to make
money with Go
08:04 < sladegen> convince your bosses to switch to go, then.
08:04 -!- werdan7 [n=w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
08:04 < kmc> go is not amazingly radically different from C or C++
08:04 < developer09> KragenSitaker: Great!
08:04 < kmc> it is a clean-up and evolution along the same lines
08:05 < path__> :/ are the questions Im asking really dumb or something
08:05 < KragenSitaker> well, I guess it does have the major difference that
C and C++ are popular
08:05 < quag> there are too many people itching to try out go for people not
to try things out :)
08:05 < developer09> kmc: Fine by me...Java was/is essentially a
clean-up/evolutionary language
08:05 < KragenSitaker> path__: no, I think they're just unanswerable
08:05 -!- mizai [n=mizai@164.107.141.210] has quit [Connection timed out]
08:06 < KragenSitaker> developer09: hopefully Go will end up better than
*that* :)
08:06 < path__> hmm maybe I should rephrase it.  What can people do with
pointers and value type variables that they can't do in a language where every
variable is a reference?
08:07 < sladegen> path__: at least not by people present between the screens
and keynards, atm.
08:07 < developer09> KragenSitaker: Ha ha!
08:07 < sladegen> keyboards* bleh
08:07 < path__> heh ok fair enough
08:07 -!- SilverWolf [n=SilverWl@nusnet-190-98.dynip.nus.edu.sg] has joined
#go-nuts
08:08 -!- mizai [n=mizai@rhou-164-107-213-187.resnet.ohio-state.edu] has joined
#go-nuts
08:08 < kmc> anyone else just get a buttload of DCC spam?
08:08 < developer09> kmc: No.
08:08 < Perberos> me not
08:09 * sladegen has dcc turned off.
08:09 < JBeshir> Not I, but I heard someone else who's in #freenode say they
did.
08:09 < KragenSitaker> path__: well, you have more control over memory
layout in a language like Go or C than in a language like Python or Java
08:09 < kmc> indeed, bit-level layout is not part of the Python virtual
machine
08:09 < KragenSitaker> path__: and you do fewer allocations, which is a
little more efficient, although I doubt that matters much
08:10 < kmc> (virtual machine meaning the abstract machine of the language
spec, not any implementation detail)
08:10 -!- itrekkie_afk [n=itrekkie@ip72-200-108-156.tc.ph.cox.net] has quit
[Remote closed the connection]
08:10 < KragenSitaker> path__: and there are a few things like linked list
insertion that are simpler to write in a language where you can take the address
of a pointer
08:10 < KragenSitaker> but the difference is pretty small
08:11 * sladegen still wonders if generics problem could not be solved by some low
level system of macros at the ast level.
08:11 < KragenSitaker> and the resulting code is kind of obscure, I think
08:11 < kmc> KragenSitaker, only if you define linked lists at such a low
level
08:11 < KragenSitaker> sladegen: yes, I think it can
08:11 < KragenSitaker> kmc: what do you mean?
08:11 < kmc> i mean that plenty of languages have linked lists without any
notion of "pointer"
08:11 < path__> hmm well I suppose, but most code seems to look a lot
cleaner in a language where I dont have two types of variables.  I used to write a
bunch of c++ code so for me the first time I switched was hard.  But over time it
ended up looking a lot cleaner
08:12 < KragenSitaker> oh, sure
08:12 -!- oklokok [n=oklopol@sparkgw.utu.fi] has quit [No route to host]
08:12 < JBeshir> kmc: Many languages *provide* them.
08:12 < path__> so I was wondering if there was a) an important ability I
was overlooking b) some OTHER detail about the language which forced this decision
08:13 -!- RayNbow [i=kirika@scientia.demon.nl] has quit ["When science finally
locates the center of the universe, some people will be surprised to learn they're
not it"]
08:13 < KragenSitaker> path__: well, they have talked a bit about the memory
layout thing
08:13 < Gracenotes> okay, the behavior of ParseExpr is really bothering me
:/
08:13 < path__> like in perl they seem to have these reference types that
exist because its impossible to "pass by reference" otherwise.
08:13 < sladegen> coping and pasint due to static type system annotations
evil could be well averted by it...  /me is just reading steve yegge's post from
last year on bloat in j*$% language.
08:13 < Gracenotes> how it fails silently
08:13 < KragenSitaker> Gracenotes: does it not return a pointer to where it
stopped parsing?
08:13 < path__> KragenSitaker: could you explain what that means?  Sorry I
didnt get it
08:13 < kmc> JBeshir, some languages allow you to define lists, trees, etc
in terms of a more fundamental concept
08:13 < kmc> without having pointers
08:14 < Gracenotes> KragenSitaker: not one that's easily accessible
08:14 < path__> the memory layout you have control over in go
08:14 < path__> as opposed to in other languages
08:14 < Gracenotes> just starting position, afaik
08:14 -!- FunctorSalad [n=ohno@p4FD89D1B.dip0.t-ipconnect.de] has joined #go-nuts
08:14 < KragenSitaker> path__: if you have structs A, B, and C, and some
struct D that has all of them as members
08:14 -!- sm [n=sm@cpe-75-85-88-227.socal.res.rr.com] has quit []
08:14 < path__> ah you can allocate them all together instead of in pieces
you mean
08:14 < KragenSitaker> path__: you can choose to put them into struct D
physically, and then you can do a single allocation and have them all be
contiguous: in the same cache line, most likely
08:15 < path__> right
08:15 < KragenSitaker> path__: or you can choose to put pointers of them
into struct D instead
08:15 < path__> ok
08:15 < path__> in other languages you're forced down path 2
08:15 < Gracenotes> KragenSitaker: do you know any way to access that
information?
08:15 < KragenSitaker> Gracenotes: no, I haven't played with the parser at
all, sorry
08:16 < KragenSitaker> path__: right.  which uses more memory (malloc
alignment and headers aren't free) and may be slower to access
08:16 < path__> ok thanks, that makes sense :)
08:16 < Gracenotes> I'm not even interested in the results, I just want to
find out if something is a complete expression >:(
08:16 < KragenSitaker> path__: on the other hand, an even bigger help for
this kind of micro-efficiency tweaking is being able to write your own allocator,
and you can't do that in Go, so I don't know if it's really worth it
08:17 < KragenSitaker> C, C++, Pascal, and so on are all like Go in this way
08:17 < kmc> you can write your own allocator in C and C++
08:17 < KragenSitaker> while Python, Perl, Java, Ruby, Smalltalk, etc., are
all not like it
08:17 < me___> its good times.  :)
08:17 < kmc> C++ has considerable syntactic support for it
08:18 < KragenSitaker> yes, you certainly can.
08:18 < KragenSitaker> I meant C and C++ etc.  are like Go in giving you
more control over memory layout, sorry.
08:18 < me___> oh, yea, fair.
08:19 < exch> mm.  init() is a special case function?  seems definint it
will invoke it automatically when the app is started.  right before main()
08:19 < exch> *defining
08:19 < KragenSitaker> exch: yes, more or less
08:20 < Gracenotes> grr.  this is annoying..
08:20 < exch> you ca even define it as many times in the same package as you
want
08:21 < KragenSitaker> yes, that's the special case
08:21 -!- teedex [n=teedex@204.14.155.161] has quit [Remote closed the connection]
08:21 < KragenSitaker> and you can't call it, IIRC.
08:21 < Gracenotes> maybe I should wrap what I think to be an expression in
parens, or something
08:21 < exch> it's called automatically
08:21 < Gracenotes> but then someone could inject something like '4);
otherFunc(10'.
08:21 < Gracenotes> UGH
08:25 -!- Glao [n=raskc@c-71-198-186-8.hsd1.ca.comcast.net] has quit [Connection
timed out]
08:26 -!- shambler_ [n=sil@213.184.241.199] has joined #go-nuts
08:29 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has quit
["Leaving"]
08:31 -!- shambler [n=sil@213.184.241.199] has quit [Read error: 60 (Operation
timed out)]
08:32 -!- depood [n=depood@chello080108055214.19.11.vie.surfer.at] has quit
[Remote closed the connection]
08:33 < jgoebel> hard to inet into compiled code
08:33 < jgoebel> *inject
08:34 -!- dinx [n=kelly@CPE-58-175-97-189.szmy1.win.bigpond.net.au] has quit
[Remote closed the connection]
08:35 -!- nigwil [n=chatzill@ppp59-167-87-232.lns20.hba1.internode.on.net] has
quit ["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
08:38 -!- kaigan|work
[n=kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has joined
#go-nuts
08:39 -!- dinx [n=dinx@CPE-58-175-97-189.vic.bigpond.net.au] has joined #go-nuts
08:39 -!- depood [n=depood@chello080108055214.19.11.vie.surfer.at] has joined
#go-nuts
08:39 -!- Nanoo [n=Nano@95-89-198-15-dynip.superkabel.de] has joined #go-nuts
08:40 < sladegen> still, gotta lookout for next gen exploits like
keystrokers.
08:41 < sladegen> you leave your emacs running over night and next morning
you find your computer overtaken by skynet.
08:41 < jgoebel> rofl
08:41 < jgoebel> soudns like an emacs issues not go
08:42 -!- fgb [n=fgb@190.246.85.45] has left #go-nuts []
08:42 < bthomson> never give an ai root privs no matter how much it begs
08:42 -!- p0g0_ [n=pogo@unaffiliated/p0g0] has quit [Read error: 60 (Operation
timed out)]
08:43 < jgoebel> ha
08:43 < me___> bthomson: why not?  its just an ai, what's the worst it can
do?  :)
08:45 < sladegen> yeah, who's using keyboards nowdays anyway.
08:46 < sladegen> you either talk on skype or make yt video.
08:46 < Gracenotes> jgoebel: I would expect a /parser/ to be able to detect
that sort of thing, no?
08:47 < Gracenotes> I can accept that it accumulates partial results, but as
a top-level method it should have *some* idea that it might be parsing an entire
string.
08:48 -!- asmo_ [n=asmo@c83-248-96-173.bredband.comhem.se] has joined #go-nuts
08:48 < jgoebel> wtf are you talking about?
08:48 < Gracenotes> it seems I could get the stopping position by
recursively going towards rightmost components.  that should be something I can
get instantaneously
08:48 < Gracenotes> jgoebel: nvm, I thought you were following the
conversation
08:49 -!- MrTopf [n=mrtopf@p5B3D7105.dip.t-dialin.net] has quit [Read error: 113
(No route to host)]
08:50 -!- Perberos [n=Perberos@190.49.39.117] has quit [Read error: 60 (Operation
timed out)]
08:52 < quag> grrr...  building with a package in another file is proving
troublesome
08:52 < quag> Any tips?
08:52 < jgoebel> what you having trouble with?
08:53 -!- p0g0_ [n=pogo@unaffiliated/p0g0] has joined #go-nuts
08:56 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
joined #go-nuts
08:57 < quag> http://gist.github.com/237666
08:57 < quag> perhaps I've misunderstood what packages are
08:57 < jgoebel> compile a first
08:58 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
08:59 -!- gkmngrgn [n=gkmngrgn@78.163.13.177] has joined #go-nuts
08:59 < exch> quag, the import statement refers to compiled packages, not to
sourcecode.  so first you compile the individual packages in the right order to
satisfy dependencies..  In your case 'a' gets compiled first.  Then main.
09:00 < quag> right.  When a.go is compiled first the error is:
http://gist.github.com/237670
09:00 < quag> exch: how should the Makefile be setup to handle the
dependencies?
09:00 < exch> yes.  because you are compiling 2 separate packages in 1 go.
'main' and 'a'.  that doesnt work.
09:01 < quag> oh...  whoops
09:01 < exch> I dont use makefiles myself, but the way go does it is to have
a separate makefile for every package
09:02 < quag> ok
09:02 < exch> I wrote a bash script that sorts all this out for me
automatically (building packages separately and in the right order)
09:02 < quag> for now I'll avoid multiple packages :)
09:02 < quag> thanks
09:03 < KragenSitaker> bthomson: have you seen the results of Eliezer's
AI-in-the-box experiment?
09:03 < exch> It took me a while to get the hang of this as well, but it's
pretty straight forward really :)
09:04 -!- travisbrady [n=tbrady@98.210.155.175] has joined #go-nuts
09:04 < quag> exch: yeah.  Think I had the wrong idea about what packages
are meant to be.
09:04 < quag> package == library, right?
09:05 < exch> basically, yes.
09:05 < sladegen> there is
http://gist.github.com/raw/235391/eaf9cffddf31d5966c59e1d8d693a9f55c8fe9e5/depscan.go
and src/pkg/deps.bash in go source tree.
09:05 < bthomson> KragenSitaker: i seem to remember somebody let him out of
the box, but i don't recall the details
09:06 < bthomson> tsk tsk, we're doomed
09:06 < KragenSitaker> bthomson: all the people who have done the experiment
with him have let him out of the box
09:07 -!- RayNbow [i=kirika@wlan-145-94-172-62.wlan.tudelft.nl] has joined
#go-nuts
09:07 < sladegen> the gray goo is a coming!
09:09 < lifeless> its already here, though its more tan coloured
09:11 -!- Snert [n=achowe@puff.snert.com] has joined #go-nuts
09:13 -!- natim [n=natim@202.114.95.154] has quit [Remote closed the connection]
09:18 -!- gkmngrgn [n=gkmngrgn@unaffiliated/gkmngrgn] has quit ["Leaving"]
09:18 -!- mitchellh1 [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
09:18 < quag> lifeless: spreading across the world, eating big macs as it
goes?
09:24 < lifeless> quag: exactly
09:25 -!- MrTopf [n=mrtopf@p5B395C3D.dip.t-dialin.net] has joined #go-nuts
09:25 -!- Sylvain_ [i=d4528311@gateway/web/freenode/x-jvuusmkasoyklgkp] has joined
#go-nuts
09:26 -!- turutosiya [n=turutosi@219.106.251.65] has joined #go-nuts
09:26 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
[Read error: 110 (Connection timed out)]
09:28 -!- me___ [n=venkates@c-68-55-179-48.hsd1.md.comcast.net] has quit ["Lost
terminal"]
09:33 < sliceofpi> this room has gotten quite lively!  I'm still trying to
decide on a go project to start
09:33 < sliceofpi> Has anyone toyed with the idea of implementing a NoSQL
Database ala CouchDB in Go?
09:33 -!- travisbrady_ [n=tbrady@98.210.155.175] has joined #go-nuts
09:34 -!- travisbrady [n=tbrady@98.210.155.175] has quit [Read error: 54
(Connection reset by peer)]
09:34 < wobsite> can't say that I have.
09:34 < wobsite> I've been messing with some X11 stuff.
09:36 -!- lolsuper_ [n=super_@unaffiliated/lolsuper-/x-9881387] has quit [Read
error: 104 (Connection reset by peer)]
09:37 -!- mitchellh1 [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
["Leaving."]
09:37 -!- JSharpe [n=jamie@5ad1d7f1.bb.sky.com] has joined #go-nuts
09:39 < tanamo> i really want to see a gui lib in go, that would be awesome,
pls someone do it :)
09:40 < wobsite> tanamo: there are some SDL/OpenGL bindings already
09:40 < wobsite> also, I'm working on an X11 interface library
09:40 < wobsite> don't have much yet
09:40 < tanamo> wobsite, wow ill wait for X11 one...  nice!
09:41 < wobsite> lol, it might be some time; the X11 docs are horrible.  I
basically at this point have a library that sends a message to the X server and
gets back a complaint that my authentication is wrong
09:41 < wobsite> I found the spec for core protocol, but there's a lot it
doesn't specify
09:42 < tanamo> hehe, how about a gtk binding?  maybe that would be easier?
09:42 -!- FunctorSalad [n=ohno@p4FD89D1B.dip0.t-ipconnect.de] has quit
["intermediate cat is, in fact, of moderate length"]
09:42 < Smergo> wobsite: I'm working on an implementation in Erlang.
09:43 -!- lenst [n=user@90-229-131-67-no52.tbcn.telia.com] has joined #go-nuts
09:43 < wobsite> tanamo: probably would be, but I've been curious about X11
in general
09:43 < Smergo> wobsite: It takes a while to do because the docs sucks yes
:)
09:44 < wobsite> Smergo: yeah.  I can't find anything specifying how to read
the ~/.Xauthority anywhere, so I'm a little stuck at the moment.
09:44 < wobsite> I suppose if I had to I could just call the xauth utility
and parse the output
09:44 < Smergo> wobsite: Aha, hum, I think I looked at source code for that.
09:44 < wobsite> or try and dig through the code...
09:44 < Smergo> I have done it in OCaml as well.
09:45 < Smergo> wobsite: That's the boring way, to use xauth ;)
09:45 < wobsite> that was my inkling.
09:45 < exch> would it be prudent to regularly call runtime.Gosched() in a
blocking/long running goroutine?
09:47 < Smergo> wobsite: But it is not hard, first it is the family, 16
bits, then a string with address, string with number, string with name and then a
binarydata with the auth data.  For every entry.
09:48 < wobsite> yeah, I figured it was something simple, but undocumented.
09:48 < Smergo> :)
09:48 < wobsite> thanks.
09:48 -!- Whtiger [n=josh@c-68-40-105-104.hsd1.mi.comcast.net] has joined #go-nuts
09:51 -!- Anders__ [n=Anders@c83-253-2-206.bredband.comhem.se] has joined #go-nuts
09:52 < wobsite> fun, found the struct for it in the source.
09:53 < Smergo> :)
09:54 < Smergo> Yes, I think the source is the only way for xauth stuff.
09:54 -!- dams__ [i=57d18168@gateway/web/freenode/x-bokezjxwkkmzwxtv] has joined
#go-nuts
09:55 -!- hd_ [n=hd_@253.176.233.220.static.exetel.com.au] has quit ["Nettalk6 -
www.ntalk.de"]
09:55 < Smergo> What would be nice in Go is some kind of bitsyntax similar
to the one in Erlang.
09:55 < Smergo> That's the single one thing I miss the most in other
languages.
09:56 < wobsite> don't really know erlang; my only experience with it is
messing with ejabberd.
09:57 < Smergo> Aha :)
10:00 < jessta> Smergo: bitsyntax?
10:01 < KragenSitaker> jessta: like C bit fields, only portable
10:02 < KragenSitaker> and supporting pattern-matching so you can do some
backtracking parsing of binary data formats
10:03 -!- acmeuser125 [n=acmeuser@217.175.7.15] has joined #go-nuts
10:06 -!- dacc [n=dan@dsl-216-162-193-144.drizzle.com] has joined #go-nuts
10:06 < Smergo> It is very powerful :)
10:07 < Smergo> For example, let's say we have a packet, which is the first
byte is the type, then 2 bytes with the length of the payload and then the
payload, you could do:
10:07 -!- etianen [n=david@82.152.167.1] has joined #go-nuts
10:08 < Smergo> <<Type, Length:16, Payload:Length,
_Rest/binary>> = Data.
10:08 < etianen> Yo people...  I was wondering the other day about the
difference between string and []byte.
10:08 < Smergo> By default they will be integers, but you can also tell what
type the different fields should be and so on.
10:08 -!- paulca [n=paul@94-116-155-216.dynamic.thecloud.net] has joined #go-nuts
10:09 < etianen> As in, if you call string(someByteArray), what is actually
happening?
10:09 -!- hd_ [n=hd_@253.176.233.220.static.exetel.com.au] has joined #go-nuts
10:09 < Smergo>
http://www.erlang.org/doc/reference_manual/expressions.html#bit_syntax
10:09 < Smergo> Now lunch.
10:10 < jessta> etianen: string are imuttable
10:11 < etianen> jessta: Indeed, but if you call string(byteArray), does the
runtime copy the byte array into a string object.  I'm suspecting it does.
10:11 < jessta> yeah
10:12 < etianen> jessta: So the regex package methods that return byte
slices should be substantially more efficient than the ones that return strings?
10:13 -!- jeeemac [n=johan@83.101.83.195] has quit [Read error: 104 (Connection
reset by peer)]
10:13 -!- jeeemac [n=johan@83.101.83.195] has joined #go-nuts
10:13 -!- SRabbelier [n=SRabbeli@ip138-114-211-87.adsl2.static.versatel.nl] has
joined #go-nuts
10:15 < uriel> etianen: not necessarily
10:15 < jgoebel> yeah
10:16 < jgoebel> slice vs string
10:16 < uriel> in any case, the regexp package is still very inmature and
needs much work, so I wouldn't worry about such details much
10:16 < jgoebel> might be more overhead with slice management
10:16 < kuroneko> I must be unwell.  I'm building LLVM under windows because
I'm too lazy to reboot.  >_>
10:16 < jdp> regexp was pretty good for my purposes
10:16 < uriel> it could be either way, profiling is the only way to know
10:16 < uriel> kuroneko: hahaha
10:16 < jdp> i'm still trying to figure out how to use the ebnf package
10:17 < uriel> jdp: I didn't say it is not good, just that it is not
optimized for performance at all yet
10:17 < jdp> oh true
10:17 < etianen> It seems to be that you can start with a huge byte slice,
and create cheap slices that reference it.  But to create string objects from it,
you need to copy the data.  On the other hand, any slices that reference the huge
byte array will probably prevent its garbage collection.
10:17 < jdp> i didn't even look at the implementation
10:17 < KragenSitaker> Smergo: oh right, I forgot about being able to use
stuff extracted from the binary as part of the pattern
10:18 -!- paulca [n=paul@94-116-155-216.dynamic.thecloud.net] has quit []
10:18 < dacc> i'd like to convert generic data structures into json strings.
e.g.  maps of slices of strings.  would it be reasonable / possible to write
methods for these core types making them implement json.Json, or is there a better
way?
10:18 < KragenSitaker> dacc: I have been frustrated attempting to do this
10:19 < dacc> KragenSitaker: any progress?  not sure what's "gothonic" here.
=)
10:19 -!- jharrys [n=de043124@71.195.253.55] has joined #go-nuts
10:19 < jgoebel> dacc: wht seems to be the problem?
10:20 < dacc> jgoebel: i'd like to be able to do e.g.  fmt.Printf("%s",
json.JsonToString([]string { "wee", "baz" }))
10:20 -!- evilhackerdude [n=stephan@e181088183.adsl.alicedsl.de] has joined
#go-nuts
10:20 < jgoebel> you can't add to json
10:20 < jgoebel> if you need new functionality it's outside json package
10:20 -!- hyn [n=hyn@p0a38fe.tokyte00.ap.so-net.ne.jp] has quit ["Get MacIrssi -
http://www.sysctl.co.uk/projects/macirssi/"]
10:20 < dacc> ok, sure.  just looking for the right approach
10:21 < dacc> is it possible to add methods to maps and slices inside your
own package?  i guess maybe they aren't objects in the usual sense
10:21 < jgoebel> once you declare them a type
10:22 < dacc> ooh right, cool
10:22 < jgoebel> maybe before
10:22 -!- etianen [n=david@82.152.167.1] has left #go-nuts []
10:22 < jgoebel> since you're just specifying what types allows methods to
be called on them
10:23 < dacc> *nod*
10:23 < dacc> so i could create my own type that i could treat as a slice,
and also add the methods required by the json.Json interface to it?
10:24 < dacc> forget what the go idiom is, but something like a typedef
10:26 -!- FeyyazEsat [n=feyyazes@85.107.217.136] has joined #go-nuts
10:26 < FeyyazEsat> hi ,
10:26 -!- ego [n=ego@ait-23-247.ait.gr] has quit [Nick collision from services.]
10:27 -!- ego_ [n=ego@ait-23-247.ait.gr] has joined #go-nuts
10:27 < FeyyazEsat> how compile the go file I don't understand...
10:27 < KragenSitaker> jgoebel: don't you have to explicitly cast the native
object to your newly declared type?
10:28 < nbaum> dacc: "type IntSlice []int", say.
10:28 < jgoebel> KragenSitaker: well yeah...  or it hould be that type to
begin with
10:28 < jgoebel> which is why you'd make a type and use that everywhere
10:29 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has joined #go-nuts
10:30 < KragenSitaker> jgoebel: and your newly declared type can't be
parametric, right?
10:30 -!- mxcl [n=mxcl@94-193-125-246.zone7.bethere.co.uk] has quit [Remote closed
the connection]
10:30 < jgoebel> huh?
10:30 < exch> FeyyazEsat: http://golang.org/doc/go_tutorial.html
10:30 < KragenSitaker> you can define a type IntSlice but not a parametric
type Slice that takes "int" as a parameter, the way [] does
10:31 < jgoebel> huh?
10:31 < jgoebel> [] is not a function
10:31 < jgoebel> just apart of the language
10:31 < KragenSitaker> okay, look, we want to be able to
json.JsonToString([]string { "wee", "baz" })
10:32 < KragenSitaker> but we also want to be able to
json.JsonToString(map[string]int whatever)
10:32 < huf> jsontostring?  isnt json a string already?  :)
10:32 < jgoebel> then that's tought
10:32 < KragenSitaker> and to json.JsonToString(map[string]map[int][]string
whatever)
10:32 < jgoebel> you can look at reflection
10:32 < KragenSitaker> huf: perhaps the function should be called
json.ToString
10:33 < jgoebel> but it's a pain :)
10:33 < KragenSitaker> heh
10:33 < KragenSitaker> that is probably the real answer
10:33 < jgoebel> methods don't really take different tyeps well
10:33 < jgoebel> other than interface{} and reflection
10:33 < KragenSitaker> right
10:33 < FeyyazEsat> tnx exch: but these instruction "6g or gccgo" not
works...  I get this error "bash: gccgo: command not found" or as 6g
10:33 < jgoebel> oh Value too
10:34 < KragenSitaker> what is Value other than interface{}?
10:34 < exch> FeyyazEsat: do you have the right environment variables set?
like $GOROOT and $GOBIN
10:35 < exch> FeyyazEsat: they need to point to your install directory of go
10:35 < FeyyazEsat> yes....  GOROOT=home/hg/src
10:35 < FeyyazEsat> and GOBIN=$HOME/bin
10:35 < KragenSitaker> exch: I think that if bash is saying it can't find
gccgo, his PATH doesn't include $HOME/bin, or gccgo isn't installed in it
10:35 < KragenSitaker> the package I downloaded doesn't include gccgo
10:35 < exch> ya
10:36 < jgoebel> KragenSitaker: some icing
10:36 < exch> I don't have gccgo either though.  And he says t cant find 6g
either
10:37 < FeyyazEsat> this is my home/feyyazesat content of directory bin
Desktop Downloads go go.go hg Webcam
10:37 < FeyyazEsat>
10:37 -!- afurlan [n=afurlan@scorpion.mps.com.br] has joined #go-nuts
10:37 -!- developer09
[n=develope@CPE0018f845c8e2-CM0014e8b55514.cpe.net.cable.rogers.com] has left
#go-nuts []
10:38 < exch> if the go directory actually contains your go version, then
$GOROOT and $GOBIN should point there
10:39 -!- bquinn [n=bquinn@nat/yahoo/x-xezzyweglrjtpyes] has joined #go-nuts
10:39 -!- mxcl [n=mxcl@94-193-125-246.zone7.bethere.co.uk] has joined #go-nuts
10:40 < exch> $GOBIN is also added to $PATH btw
10:41 -!- oklofok [n=oklopol@a91-153-117-208.elisa-laajakaista.fi] has joined
#go-nuts
10:41 < andguent> did he even make the stuff?
10:41 < exch> dunno
10:42 < exch> that would seem the logical thing to do when you download
sourcecode :p
10:42 < FeyyazEsat> I'm trying echo $GOROOT and $GOBIN result null , but I
was filled these variable
10:42 < sladegen> GOROOT is wrong too...
10:42 < exch> this is what it looks like for me
http://text.pastebin.com/m254e2f74
10:43 < exch> they are all set in my ~/.bashrc file
10:43 < sladegen> or is hg your username...
10:45 -!- betim [n=betim@gentoo/user/betim] has joined #go-nuts
10:45 -!- cls`work [n=cls_work@195-241-68-133.ip.telfort.nl] has joined #go-nuts
10:45 < exch> FeyyazEsat: this should be in your .bashrc file for the
variables to work properly.  http://text.pastebin.com/m3672625
10:46 -!- dacc [n=dan@dsl-216-162-193-144.drizzle.com] has quit [Read error: 110
(Connection timed out)]
10:47 < FeyyazEsat> yes , I've done
10:50 < FeyyazEsat> no exch:
10:50 < FeyyazEsat> I guess will not be
10:50 < exch> it should work then.  Unless you haven't actually compiled the
Go sourcecode
10:50 < FeyyazEsat> thx for help me..
10:51 < exch> np
10:51 -!- wobsite [n=wobsite_@68-189-250-56.static.oxfr.ma.charter.com] has quit
["Leaving"]
10:53 -!- aidecoe [n=aidecoe@2001:470:1f0b:77d:0:0:a1d:3c0e] has quit [Read error:
60 (Operation timed out)]
10:54 -!- kve [i=zaknifar@srv-e218.esp.mediateam.fi] has joined #go-nuts
10:57 -!- JoNaZ [n=jonaz@user77.77-105-229.netatonce.net] has quit [Remote closed
the connection]
10:59 -!- Anders__ [n=Anders@c83-253-2-206.bredband.comhem.se] has quit ["Lämnar"]
11:00 -!- pace_t_zulu [n=pacetzul@unaffiliated/pacetzulu/x-585030] has quit []
11:01 -!- mtz [n=jaan@165.206.191.90.dyn.estpak.ee] has quit [Read error: 145
(Connection timed out)]
11:04 -!- Nanoo [n=Nano@95-89-198-15-dynip.superkabel.de] has quit ["Leaving"]
11:06 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
11:10 -!- mtz [n=jaan@165.206.191.90.dyn.estpak.ee] has joined #go-nuts
11:10 -!- oklofok [n=oklopol@a91-153-117-208.elisa-laajakaista.fi] has quit [Read
error: 60 (Operation timed out)]
11:10 -!- oklofok [n=oklopol@91.153.117.208] has joined #go-nuts
11:11 -!- Zaba_ [n=zaba@about/goats/billygoat/zaba] has quit [Read error: 60
(Operation timed out)]
11:12 -!- dinx2 [n=dinx@CPE-58-175-97-189.vic.bigpond.net.au] has joined #go-nuts
11:12 -!- ring-zero [n=hotshot@117.199.130.31] has quit [Remote closed the
connection]
11:12 -!- Zaba [n=zaba@ip102.148.adsl.wplus.ru] has joined #go-nuts
11:13 -!- Nanoo [n=Nano@95-89-198-15-dynip.superkabel.de] has joined #go-nuts
11:14 -!- dinx2 [n=dinx@CPE-58-175-97-189.vic.bigpond.net.au] has quit [Client
Quit]
11:15 -!- jharrys [n=de043124@71.195.253.55] has quit ["Leaving."]
11:15 -!- dinx [n=dinx@CPE-58-175-97-189.vic.bigpond.net.au] has quit [Read error:
110 (Connection timed out)]
11:18 -!- travisbrady [n=tbrady@98.210.155.175] has quit []
11:24 -!- raichoo [n=raichoo@129.70.166.193] has joined #go-nuts
11:25 -!- engla [n=ulrik@90-229-231-23-no153.tbcn.telia.com] has joined #go-nuts
11:25 -!- oklofok [n=oklopol@91.153.117.208] has quit ["( www.nnscript.com ::
NoNameScript 4.2 :: www.regroup-esports.com )"]
11:26 -!- monteslu [n=monteslu@ip68-109-171-127.ph.ph.cox.net] has quit [Read
error: 110 (Connection timed out)]
11:28 -!- Jan_Flanders [n=chatzill@d54C1E33B.access.telenet.be] has joined
#go-nuts
11:28 -!- banthar [n=banthar@chello084010208203.chello.pl] has joined #go-nuts
11:32 -!- pbunbun [n=bunbun@minerva.redbrick.dcu.ie] has quit [Read error: 110
(Connection timed out)]
11:38 -!- triplez [n=triplez@124.155.195.7] has joined #go-nuts
11:38 -!- Guest22265 [n=sn@chello089075057223.chello.pl] has joined #go-nuts
11:42 < banthar> How to pass an array to C function ?
11:43 < jgoebel> that might be hard
11:43 -!- Adys [n=Adys@unaffiliated/adys] has joined #go-nuts
11:43 < jgoebel> not sure
11:44 -!- zilt [n=aking@74.210.120.119] has joined #go-nuts
11:46 -!- Sylvain_ [i=d4528311@gateway/web/freenode/x-jvuusmkasoyklgkp] has quit
[Ping timeout: 180 seconds]
11:48 -!- ring-zero [n=hotshot@117.199.139.242] has joined #go-nuts
11:49 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has quit [Excess Flood]
11:50 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has joined #go-nuts
11:53 -!- penguin42 [n=dg@tu006.demon.co.uk] has joined #go-nuts
11:55 -!- ego_ [n=ego@ait-23-247.ait.gr] has quit [Read error: 60 (Operation timed
out)]
11:59 -!- SmoothPorcupine [n=chatzill@207.224.112.150] has joined #go-nuts
12:00 -!- Heavensrevenge
[n=quassel@CPE001d0fe73b7d-CM00111ae5c642.cpe.net.cable.rogers.com] has joined
#go-nuts
12:00 -!- triplez [n=triplez@124.155.195.7] has quit []
12:00 < SmoothPorcupine> Part of the design philosophy of go is to not add
useless and counterproductive things like exceptions, correct?
12:01 -!- cls`work [n=cls_work@195-241-68-133.ip.telfort.nl] has quit [Read error:
60 (Operation timed out)]
12:02 < KragenSitaker> Although I'm not part of the design team, I think you
could shorten that to "to not add things"
12:02 < KragenSitaker> obviously, which things don't get added is informed
by how useful and productive they are expected to be
12:03 < SmoothPorcupine> So to phrase it as them being "actively rejected"
would not be incorrect?
12:03 -!- hd_ [n=hd_@253.176.233.220.static.exetel.com.au] has quit ["sadsadasd"]
12:03 < KragenSitaker> that's Kremlinology.  I don't know.
12:04 < KragenSitaker> Why don't you email the list?
12:04 -!- hd_ [n=hd_@253.176.233.220.static.exetel.com.au] has joined #go-nuts
12:04 < KragenSitaker> Ken weighed in on the null pointer question
12:04 < sladegen> if you think that not going on a shooting spree is
avtively rejecting violence...  sure.
12:05 -!- Lorthirk [n=cm0901@109.112.5.161] has joined #go-nuts
12:05 < SmoothPorcupine> Because posting a post to know how to word another
post exceeds my irony allotment for the day.
12:05 -!- cls`work [n=cls_work@195-241-68-133.ip.telfort.nl] has joined #go-nuts
12:05 < KragenSitaker> and Ian and Russ have been pretty interactive,
although I think the constant stream of "Why did you design Go instead of my pet
language?" posts is kind of wearing on them.
12:06 -!- aidecoe [n=aidecoe@2001:470:1f0b:77d:0:0:a1d:3c0e] has joined #go-nuts
12:06 < KragenSitaker> You wouldn't have to do that ironically.  You could
do it entirely sincerely.
12:07 < sladegen> considering the project is open sourced i'm sure there
will be people who will put exceptions into their go at it.
12:08 < KragenSitaker> their go at it, sigh
12:08 * sladegen chickles.
12:09 < KragenSitaker> no doubt.  exceptions are a pretty incompatible
language feature, though.
12:09 < KragenSitaker> so at that point it becomes a different language,
really.
12:10 -!- ego_ [n=ego@ait-23-247.ait.gr] has joined #go-nuts
12:10 * sladegen demends continuations!
12:10 < alus> making nil an object which can hold error code and message
would be neat
12:12 < SmoothPorcupine> So, is there a general consensus on the name issue?
12:13 < sladegen> alus: but in order to call anything on nil you need to
dereference it!
12:13 < SmoothPorcupine> (Guessing not, given 444 people in the channel and
the language is only days old.)
12:14 < penguin42> SmoothPorcupine: You mean that it's hard to search for -
it's not a problem, it's no harder than C
12:14 < SmoothPorcupine> No, my argument is actually that the name just
sucks.
12:14 * penguin42 happens to like it
12:14 -!- SilverWlf [n=SilverWl@nusnet-190-98.dynip.nus.edu.sg] has joined
#go-nuts
12:15 < SmoothPorcupine> All other details of morality and searchability and
whatnot are trivial.
12:15 < dpb> There already was a language they stole the name from.
12:15 -!- SilverWolf [n=SilverWl@nusnet-190-98.dynip.nus.edu.sg] has quit [Read
error: 54 (Connection reset by peer)]
12:15 < sladegen> they did not steal it, they merely took a pointer to it!
12:16 * sladegen is on the roll!
12:16 < dpb> o.o
12:17 -!- plainhao [n=plainhao@mail.xbiotica.com] has joined #go-nuts
12:18 < SmoothPorcupine> That that dead language was using the same name is
telling about the quality of the name.
12:19 < dpb> Who says it's dead?
12:19 < SmoothPorcupine> Well, it *was* dead.  <.<
12:19 -!- zhaozhou [n=zhaozhou@linfast76.bitnet.nu] has quit [Read error: 110
(Connection timed out)]
12:19 < sladegen> now it's DOA.
12:21 < penguin42> you mean it's a goner?
12:22 < sladegen> it's in limbo ;)
12:23 < SmoothPorcupine> It's the zombie-like cancer patient in the talk
show.
12:24 < penguin42> SmoothPorcupine: Thing is I think the keyword go is
appropriate for what it does, and given it's one of the defining features of the
language it sems OK to name the language after it
12:24 -!- Ishmael [n=Ishmael@200.202.122.5] has joined #go-nuts
12:24 -!- tcpip4000 [n=tcpip400@190.84.233.18] has quit [Nick collision from
services.]
12:24 < KragenSitaker> penguin42: C's popularity makes a difference; people
make special accommodations for it
12:24 -!- tcpip4000 [n=tcpip400@190.84.233.18] has joined #go-nuts
12:24 < SmoothPorcupine> Sure, it may seem like that, until you realize it
is a stupid name.
12:25 < penguin42> KragenSitaker: To, but we've pretty much ran out of
single character names :-)
12:25 < SmoothPorcupine> Gosh, it is hard to make this argument without
offending someone.  >.>
12:25 < KragenSitaker> yes, true
12:25 < KragenSitaker> SmoothPorcupine: heh
12:25 < KragenSitaker> SmoothPorcupine: it sounds like you're enjoying that
part
12:26 < SmoothPorcupine> Yeah.  I didn't hide it well did I?
12:26 < KragenSitaker> penguin42: yeah, there are at least two languages
each named D and E
12:27 < penguin42> KragenSitaker: And calling it G would make it feel like a
C descendent which I think they're trying to explicitly avoid
12:27 < s_mosher> SmoothPorcupine, I agree the name is stupid.
12:27 < KragenSitaker> penguin42: also, that I know of, B, M, G
12:27 < s_mosher> As are the names of all other languages.  Ask me how much
I Care.
12:27 < s_mosher> :P
12:27 < KragenSitaker> there's already a G; it's the graphical programming
language in LabView
12:28 < SmoothPorcupine> They don't all suck.
12:28 < KragenSitaker> oh, I forgot J, K, and Q (again, at least two: q and
Q)
12:28 < KragenSitaker> and of course R and S
12:28 < KragenSitaker> and T, a dialect of Lisp
12:29 < KragenSitaker> penguin42: I think Go already feels a lot like a C
descendant
12:30 < penguin42> KragenSitaker: Yeh but it does have enough things that
are explicitly different rather than additions - e.g.  the swap of declaration
order
12:30 -!- Sylvain_ [i=d4528311@gateway/web/freenode/x-jdjmbammllrsfyun] has joined
#go-nuts
12:30 -!- ragsagar [n=ragsagar@117.204.97.34] has joined #go-nuts
12:30 < sladegen> nah, it's definitely AL-GO-L related!
12:31 -!- karpar [n=karpar@58.253.170.248] has joined #go-nuts
12:31 < s_mosher> KragenSitaker, in comparison to C it feels like walking on
stilts
12:31 < SmoothPorcupine> That sounds like it would be a descendant in the
biological context.
12:31 -!- Cyprien [n=Cyprien@pub1.heig-vd.ch] has joined #go-nuts
12:32 < SmoothPorcupine> Of course in a programming language context, I
imagine the family tree shows massive inbreeding.
12:33 < KragenSitaker> s_mosher: I'm not sure what you mean.
12:33 < KragenSitaker> People look at you funny and wonder about your sanity
when you do it?
12:33 < KragenSitaker> It's really hard to do?
12:33 < s_mosher> KragenSitaker, you're still targeting the machine, but
it's farther away
12:33 < SmoothPorcupine> They do that all the time.
12:33 * sladegen awaits GOBOL to enter the scene.
12:33 -!- drry [n=drry@unaffiliated/drry] has quit ["Tiarra 0.1+svn-35621M:
SIGTERM received; exit"]
12:33 < KragenSitaker> oh, I see
12:33 < KragenSitaker> the ground is further away
12:33 < SmoothPorcupine> Yeah, you are all going to burn in pun hell.
12:33 < KragenSitaker> GOBOL!
12:34 < KragenSitaker> yeah, it's true
12:34 < Snert> dho: g'day
12:35 -!- ector [n=ector@74.125.57.33] has quit [Remote closed the connection]
12:35 < sladegen> INTERGO!  oh, the fun never stoops.
12:36 -!- p4p4_ [n=pedro@24.121.113.82.net.de.o2.com] has joined #go-nuts
12:36 < Snert> Avanti!
12:36 < mgdm> GOBOL works twice, too!  (SNOBOL and COBOL)
12:36 * mgdm runs
12:37 -!- SilverWlf [n=SilverWl@nusnet-190-98.dynip.nus.edu.sg] has quit [Read
error: 110 (Connection timed out)]
12:37 < KragenSitaker> you mean it's a pun on two different other language
names?
12:37 < Snert> "iku" japanese for Go
12:37 < KragenSitaker> I think there were actually a lot more
12:37 < KragenSitaker> iku iku!
12:37 < mgdm> KragenSitaker: yeah, something like that.
12:38 < Snert> Or "Goal!"
12:38 < sladegen> ada, come!
12:38 -!- gmurphy [n=gmurphy@203-206-248-145.dyn.iinet.net.au] has joined #go-nuts
12:38 -!- raichoo [n=raichoo@129.70.166.193] has quit []
12:38 < jabb> fungo (funge)
12:38 < sladegen> ha ha
12:38 < penguin42> ForGo
12:38 -!- aidecoe [n=aidecoe@2001:470:1f0b:77d:0:0:a1d:3c0e] has quit [Read error:
60 (Operation timed out)]
12:39 -!- dgnorton [n=dgnorton@97.65.135.119] has joined #go-nuts
12:39 < SmoothPorcupine> The deepest level of pun hell.
12:40 < sladegen> although after looking at first pages of the 3 day pdf
tutorial i think calling it neexcogacosyla might be approriate, too.
12:40 < KragenSitaker> I like "Goal"
12:40 < KragenSitaker> unfortunately I don't think "Come" will really fly
12:41 -!- FeyyazEsat [n=feyyazes@85.107.217.136] has quit [Read error: 110
(Connection timed out)]
12:42 < Snert> For GOAL you could use one of the excite British commentators
to intro the language at some seminar.
12:42 < sladegen> Ccross (with cross being a unicode char of it)
12:42 < alus> sladegen: dereferencing nil should cause your function to
return with the nil you tried to dereference
12:43 -!- simonz05 [n=simon@143.84-49-89.nextgentel.com] has joined #go-nuts
12:43 < sladegen> alus: right, and then you dereference that nil, and then
that other nil, and the other ...  ;)
12:44 -!- aidecoe [n=aidecoe@2001:470:1f0b:77d:0:0:a1d:3c0e] has joined #go-nuts
12:44 -!- fhs [n=fhs@pool-72-89-203-117.nycmny.east.verizon.net] has quit
["leaving"]
12:45 < alus> sladegen: exactly.  just like an exception
12:47 < dgnorton> http://pastebin.com/d7696e979 ...  should that clip of
code be sufficient (i.e., bare minimum) to accept a TCP connection?
12:48 < KragenSitaker> alus: we tried that in Wheat; it more or less worked
12:48 < KragenSitaker> well, something like that
12:48 < sladegen> alus: perhaps, finally we could settle on "nils all the
way up", fuck turtles!
12:48 -!- chickamade [n=chickama@222.254.12.228] has joined #go-nuts
12:49 < KragenSitaker> sladegen: if people who want to fuck badgers are
furries, does that make you a scaly?
12:49 < SmoothPorcupine> Yes, sadly, it does.
12:50 -!- hyn [n=hyn@p0a38fe.tokyte00.ap.so-net.ne.jp] has joined #go-nuts
12:50 < alus> KragenSitaker: hey!  I presented Incoherence at CodeCon 2005
when someone presented Wheat :D
12:50 < alus> KragenSitaker: if that's the same Wheat
12:50 < sladegen> i don't think i'm scaly, i like to think of myself as a
lesbian stuck in a man's body.
12:51 < SmoothPorcupine> Damn.  Well, I'd love to say up and talk about puns
and furries, but these spikes don't drive themselves through my eyes.
12:52 -!- melba [n=blee@unaffiliated/lazz0] has joined #go-nuts
12:52 -!- SmoothPorcupine [n=chatzill@207.224.112.150] has left #go-nuts ["But
wouldn't it be cool if they could?"]
12:52 -!- lux` [n=lux@151.54.240.177] has joined #go-nuts
12:54 -!- CoZo [n=jules@lan31-6-82-238-146-65.fbx.proxad.net] has joined #go-nuts
12:54 < KragenSitaker> alus: yes!  the same Wheat!
12:55 < KragenSitaker> I remember your demo, showing how phase-correlation
can locate sounds in the stereo field
12:55 < KragenSitaker> it was AWESOME
12:55 < KragenSitaker> I haven't listened to music the same way since then
12:56 -!- octoploid [n=octoploi@77-23-212-222-dynip.superkabel.de] has joined
#go-nuts
12:58 < dgnorton> KragenSitaker, you don't use your ears now?
12:58 -!- ragsagar [n=ragsagar@117.204.97.34] has quit [Read error: 110
(Connection timed out)]
12:58 < alus> thanks!
13:00 < KragenSitaker> dgnorton: I'm always thinking about how the different
sounds fill the stereo field and how they are arranged in the spectrum relative to
one another
13:00 -!- CoZo [n=jules@lan31-6-82-238-146-65.fbx.proxad.net] has quit ["Ex-Chat"]
13:00 < sladegen> as long as we are off topic:
http://www.youtube.com/watch?v=hrhIxABqOtk
13:00 < KragenSitaker> and trying to distinguish if some really
unusual-sounding instrument is actually a clever combination of two more quotidian
instruments being played in close synchronization in the same place in the stereo
field
13:01 < sladegen> KragenSitaker: what's wheat?
13:01 < Snert> sladegen: wheat is a grain, which when ground down is called
flour and can be used to bake bread
13:02 * sladegen wants it distilled!
13:03 < KragenSitaker> sladegen: a language.  mark and jim got it to a
prototype stage (with a little help from me) and then gave up
13:04 < KragenSitaker> it has two unique features: the object memory is
tree-shaped (every object has one primary parent, although it can be symlinked
from elsewhere in the tree) and it uses NaN-like contagious error objects instead
of exceptions
13:05 < KragenSitaker> the web site is still online and really excellent:
http://wheatfarm.org/
13:05 -!- callidus [n=callidus@213-131-121-253.onyx.net] has joined #go-nuts
13:07 < sladegen> kool, i had an idea of prototype, graph language but like
good idealist ended up with only few hundred lines of shameful scheme.
13:09 -!- vdrab [n=vdrab@cap011-109.kcn.ne.jp] has joined #go-nuts
13:09 < KragenSitaker> we were prototyping in C++.  we had written a
register-based bytecode virtual machine.  maybe not the best idea.
13:09 < KragenSitaker> that website is running on it.
13:10 < sladegen> no, writting yet another virtual machine/runtime is a
waste of time unless one gets a kick out of it.
13:12 < sladegen> btw,
http://sourceforge.net/forum/message.php?msg_id=4857677 hah, how synchronistic.
13:13 -!- acmeuser125 [n=acmeuser@217.175.7.15] has left #go-nuts []
13:14 -!- raichoo [n=raichoo@i577BBDFB.versanet.de] has joined #go-nuts
13:19 -!- sergio__ [n=sergio@201.9.100.218] has joined #go-nuts
13:19 -!- sergio [n=sergio@unaffiliated/sergio] has quit [Nick collision from
services.]
13:20 -!- Nanooo [n=Nano@95-89-198-15-dynip.superkabel.de] has joined #go-nuts
13:21 -!- trvbldn [n=trvbldn@c-98-218-95-154.hsd1.dc.comcast.net] has quit [Read
error: 110 (Connection timed out)]
13:22 -!- drusepth` [n=drusepth@ppp-70-129-184-157.dsl.spfdmo.swbell.net] has
joined #go-nuts
13:23 -!- drusepth`` [n=drusepth@ppp-70-129-184-157.dsl.spfdmo.swbell.net] has
joined #go-nuts
13:27 -!- tor7 [n=tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has
joined #go-nuts
13:28 -!- Nanoo [n=Nano@95-89-198-15-dynip.superkabel.de] has quit [Read error:
110 (Connection timed out)]
13:30 < Snert> dho: I can give you a bundle if you're still interested
13:32 -!- chickamade [n=chickama@222.254.12.228] has quit ["Leaving"]
13:34 -!- triplez [n=triplez@124.155.195.7] has joined #go-nuts
13:34 -!- clip9 [i=tj@12.81-166-62.customer.lyse.net] has joined #go-nuts
13:35 -!- esynth [n=antonz@vhe-364607.sshn.net] has joined #go-nuts
13:35 -!- esynth [n=antonz@vhe-364607.sshn.net] has quit [Client Quit]
13:36 -!- ronaldbe [n=ron@76.212.133.89] has joined #go-nuts
13:36 -!- ronaldbe [n=ron@76.212.133.89] has quit [Client Quit]
13:36 -!- triplez [n=triplez@124.155.195.7] has quit [Read error: 104 (Connection
reset by peer)]
13:36 -!- aekeus [n=aubreyk@24.75.15.14] has joined #go-nuts
13:38 -!- p4p4_ [n=pedro@24.121.113.82.net.de.o2.com] has quit [Read error: 104
(Connection reset by peer)]
13:38 -!- p4p4_ [n=pedro@24.121.113.82.net.de.o2.com] has joined #go-nuts
13:39 -!- triplez [n=triplez@124.155.195.7] has joined #go-nuts
13:40 -!- JSharpe [n=jamie@5ad1d7f1.bb.sky.com] has quit [Read error: 110
(Connection timed out)]
13:40 -!- XniX23 [n=XniX23@89-212-198-49.dynamic.dsl.t-2.net] has joined #go-nuts
13:41 -!- drusepth` [n=drusepth@ppp-70-129-184-157.dsl.spfdmo.swbell.net] has quit
[Read error: 110 (Connection timed out)]
13:43 -!- sku [n=sku@217.175.7.15] has joined #go-nuts
13:45 -!- engla [n=ulrik@wikipedia/Sverdrup] has quit [Read error: 110 (Connection
timed out)]
13:48 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has joined #go-nuts
13:48 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has quit [Client
Quit]
13:48 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has joined #go-nuts
13:49 -!- nullpo_ [n=nullpo@221x252x46x83.ap221.ftth.ucom.ne.jp] has quit [Read
error: 110 (Connection timed out)]
13:50 -!- asmo_ [n=asmo@c83-248-96-173.bredband.comhem.se] has quit [Remote closed
the connection]
13:51 -!- triplez [n=triplez@124.155.195.7] has quit [Read error: 104 (Connection
reset by peer)]
13:53 -!- triplez [n=triplez@124.155.195.7] has joined #go-nuts
13:55 -!- gmurphy [n=gmurphy@203-206-248-145.dyn.iinet.net.au] has left #go-nuts
[]
13:57 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
quit ["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
13:57 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
joined #go-nuts
13:57 -!- engla [n=ulrik@90-229-231-23-no153.tbcn.telia.com] has joined #go-nuts
13:59 -!- slashus2_ [n=slashus2@74-137-26-8.dhcp.insightbb.com] has joined
#go-nuts
14:00 < hector> bit quiet
14:00 -!- General1337 [n=support@71.84.247.187] has joined #go-nuts
14:01 -!- gpurrenhage [n=gpurrenh@141.209.59.129] has joined #go-nuts
14:02 -!- drusepth`` [n=drusepth@ppp-70-129-184-157.dsl.spfdmo.swbell.net] has
quit [Read error: 60 (Operation timed out)]
14:03 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has joined #go-nuts
14:04 -!- gpurrenhage [n=gpurrenh@141.209.59.129] has quit [Client Quit]
14:04 -!- gpurrenhage [n=gpurrenh@141.209.59.129] has joined #go-nuts
14:05 < XniX23> yes
14:05 -!- esm [n=esm@70-91-101-46-chicago-il.hfc.comcastbusiness.net] has quit
["Bye."]
14:07 < dho> Snert: http://codereview.appspot.com/157055
14:07 < dho> should be everything you need to finish
14:07 < dho> that's freebsd/i386
14:08 < dho> actually
14:08 < dho> it's committed
14:08 < dho> so if you sync with tip you should be able to go off that
14:09 < dho> wait what
14:09 < dho> me___ is in maryland?
14:10 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has quit [Read
error: 110 (Connection timed out)]
14:11 < Snert> dho: frak your fast
14:11 -!- asmo_ [n=asmo@c-f6c5e055.1155-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
14:11 < dho> russ helped a lot
14:11 -!- lenst [n=user@90-229-131-67-no52.tbcn.telia.com] has quit [Remote closed
the connection]
14:12 < XniX23> anyone here has thinkpad r500, ubuntu & low life battery
power?  :o
14:12 < Snert> dho: can't sync with head; can you give me a current (today,
yesterday) tarball?
14:12 < tcpip4000> hi, I just wrote a simple socket server and client in go,
there is a way to contribute to documentation?
14:13 < Snert> dho: my problem right now is the startup code for go programs
allocates memory that fails :(
14:13 -!- tomestla1 [n=tom@78.251.140.59] has joined #go-nuts
14:13 < Snert> dho: i'll review of course
14:13 < dho> sure -- gimme a sec
14:13 < dho> my change yesterday broke freebsd/amd64
14:14 < Snert> dho: nothing like testing cross-platforms to break something
14:14 < dho> not sure how to deal with it, problem is that long is a
different size on i386 than amd64
14:14 < dho> which is really frustrating here
14:14 < Snert> dho: thats normal
14:14 < dho> because i have to cast, and there's no way to know which size
it needs to cast to
14:15 < dho> int32* is right on i386 but intt64 is right on amd64 :(
14:15 < dho> there's no `give me whatever long is'
14:15 < Snert> dho: C has always defined long to be at least 32 bits, short
at least 16, and int to be the ideal machine word size
14:16 -!- BlunderBuss [n=BlunderB@12.54.221.117] has joined #go-nuts
14:16 < dho> yes, but look at pkg/runtime/runtime.h
14:16 < Snert> dho: doesn't the SO specific stuff in syscall define what a
int and long are based on the C compiler's defines
14:17 < dho> this is in the runtime
14:17 < Snert> _C_int and _C_long and _C_long_long
14:17 < Snert> maybe these should be global then
14:18 < Snert> make syscall._C_long and syscall._C_int globally defined for
other packages
14:18 < dho> no, I just need intptr
14:18 < dho> it just got forgotten in there
14:18 -!- General13372 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has quit
[Connection timed out]
14:22 < mpl> is there any http server written in go yet?
14:22 < exDM69> mpl: as far as I know, the golang.org site runs on one
14:22 < Snert> mpl: yes the golang.org is servered by a go based web server
14:23 -!- nsa310 [n=Adium@dyn26-46.roaming.few.vu.nl] has joined #go-nuts
14:23 -!- jA_cOp [n=yakobu@ti0043a380-3093.bb.online.no] has joined #go-nuts
14:23 < mpl> ok, but is the code available?
14:23 -!- nsa310 [n=Adium@dyn26-46.roaming.few.vu.nl] has left #go-nuts []
14:23 < mpl> can we install and run it?
14:24 < exch> golang.org is the godoc program that cokmes with the source.
It's written using the http package iirc.  so yes, you can use the code yourself
14:24 < exch> *comes
14:25 < dgnorton> how do i convert a string literal to a []byte?  (e.g.,
"this is test text" to a []byte)
14:25 -!- dschn [n=dschn@pool-70-19-224-19.bos.east.verizon.net] has joined
#go-nuts
14:25 < mpl> alright, thx.
14:25 -!- RayNbow [i=kirika@wlan-145-94-172-62.wlan.tudelft.nl] has quit ["When
science finally locates the center of the universe, some people will be surprised
to learn they're not it"]
14:25 < exch> dgnorton: b := strings.Byte("moo")
14:25 < exch> *Bytes()
14:25 < dgnorton> exch, thanks
14:25 -!- asmo_ [n=asmo@c-f6c5e055.1155-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: 104 (Connection reset by peer)]
14:26 -!- asmo_ [n=asmo@85.224.197.246] has joined #go-nuts
14:26 < exch> who do I poke to get the Gedit syntax file listed on
http://go-lang.cat-v.org/ updated?
14:27 -!- spiffytech [i=spiffyte@pilot.trilug.org] has left #go-nuts []
14:28 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has joined
#go-nuts
14:28 < sladegen> exch: uriel
14:28 -!- raichoo [n=raichoo@i577BBDFB.versanet.de] has quit []
14:28 < dho> Snert: ping
14:29 < Snert> dho: pong
14:29 < gpurrenhage> pung?
14:29 < exch> righty
14:29 < dho> I don't actually have anywhere to put a tarball
14:29 < sladegen> perfect alignment
14:29 < Snert> hold on
14:29 < alus> pyng
14:30 -!- drusepth`` [n=drusepth@209.106.203.252] has joined #go-nuts
14:31 -!- loureiro [n=loureiro@189.2.128.130] has joined #go-nuts
14:32 -!- x-ip [n=sakura@unaffiliated/x-ip] has joined #go-nuts
14:33 * exch just discovered you can define go strings as `foo`; and get away with
not having to double-escape backslashes and other funky regex related special
tokens
14:34 -!- iant [n=iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Read
error: 60 (Operation timed out)]
14:36 -!- pbunbun [n=bunbun@minerva.redbrick.dcu.ie] has joined #go-nuts
14:36 < rhc> exch: they can even be multiline
14:36 < exch> goodie
14:36 < rhc> and newlines are interpreted literally, i.e.  "foo\nbar" ==
'foo<CR>bar'
14:37 -!- Perberos [n=Perberos@190.49.56.65] has joined #go-nuts
14:37 -!- ego_ [n=ego@ait-23-247.ait.gr] has quit [Client Quit]
14:39 -!- turutosiya [n=turutosi@219.106.251.65] has quit [Remote closed the
connection]
14:42 -!- shambler_ [n=sil@213.184.241.199] has quit [Read error: 104 (Connection
reset by peer)]
14:43 -!- pbunbun [n=bunbun@minerva.redbrick.dcu.ie] has quit ["leaving"]
14:44 -!- edw [n=user@c-76-99-21-9.hsd1.pa.comcast.net] has joined #go-nuts
14:44 -!- KillerX [n=anant@145-116-234-40.uilenstede.casema.nl] has joined
#go-nuts
14:46 < Snert> rhc: actually \n is typical LF assuming ASCII, while \r is
CR; though a MAC might change \n to be CR
14:47 -!- ejb [n=ejb@unaffiliated/ejb] has joined #go-nuts
14:47 < XniX23> any graphics library support for go?
14:48 < exch> I've seen some SDL/opengl stuff floating around on
reddit.com/r/golang if I remember right.
14:49 < exch> Not sure how complete/useful it is though
14:49 -!- Ishmael [n=Ishmael@200.202.122.5] has quit [Read error: 110 (Connection
timed out)]
14:50 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has quit ["This
computer has gone to sleep"]
14:50 -!- al-maisan
[n=al-maisa@conference/ubuntu-developer-summit/x-wmrnjkzsbdjgrpmh] has joined
#go-nuts
14:50 -!- vdrab [n=vdrab@cap011-109.kcn.ne.jp] has quit []
14:50 -!- al-maisan
[n=al-maisa@conference/ubuntu-developer-summit/x-wmrnjkzsbdjgrpmh] has left
#go-nuts ["Parting is tough.."]
14:50 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has quit []
14:51 -!- dams__ [i=57d18168@gateway/web/freenode/x-bokezjxwkkmzwxtv] has quit
[Ping timeout: 180 seconds]
14:55 -!- broogo [n=broogo@97-116-179-177.mpls.qwest.net] has joined #go-nuts
14:55 < banthar> XniX23: http://go-lang.cat-v.org/library-bindings
14:56 -!- MrTopf [n=mrtopf@p5B395C3D.dip.t-dialin.net] has quit ["Leaving..."]
14:56 -!- depood [n=depood@chello080108055214.19.11.vie.surfer.at] has quit
[Remote closed the connection]
14:56 < exch> nice
14:57 -!- jgoebel [n=jgoebel@96-28-100-3.dhcp.insightbb.com] has quit [Client
Quit]
14:58 -!- sku [n=sku@217.175.7.15] has left #go-nuts []
14:58 -!- depood [n=depood@chello080108055214.19.11.vie.surfer.at] has joined
#go-nuts
14:59 -!- monteslu [n=monteslu@ip68-109-171-127.ph.ph.cox.net] has joined #go-nuts
15:00 -!- p4p4 [n=pedro@24.121.113.82.net.de.o2.com] has joined #go-nuts
15:01 -!- Kyle|Mr_K_13 [i=Kyle@122-148-63-115.static.dsl.dodo.com.au] has joined
#go-nuts
15:04 -!- iant [n=iant@67.218.109.147] has joined #go-nuts
15:04 -!- mode/#go-nuts [+v iant] by ChanServ
15:05 < XniX23> exch, banthar: thanks
15:05 -!- Ishmael [n=Ishmael@200.202.122.5] has joined #go-nuts
15:06 -!- triplez [n=triplez@124.155.195.7] has quit []
15:08 -!- drusepth`` [n=drusepth@209.106.203.252] has quit [Read error: 110
(Connection timed out)]
15:09 < rhc> Snert: yeah, I guess I'm coming from C where \n is always
translated into the host make-a-new-line character(s)
15:09 -!- Adys [n=Adys@unaffiliated/adys] has quit [Remote closed the connection]
15:11 -!- sockmonk [n=user@pixout.appriss.com] has joined #go-nuts
15:12 < poucet> Does reading from a channel block?
15:12 -!- Heavensrevenge
[n=quassel@CPE001d0fe73b7d-CM00111ae5c642.cpe.net.cable.rogers.com] has quit
[Remote closed the connection]
15:12 < nbaum> poucet: Usually.
15:13 < poucet> I'm trying to find a way to kill a goroutine from either
outside, or somewhere deep inside the stack of that goroutine
15:13 < poucet> (Unrelated to my previous question)
15:13 -!- p4p4_ [n=pedro@24.121.113.82.net.de.o2.com] has quit [Read error: 110
(Connection timed out)]
15:13 <+iant> poucet: from inside, call runtime.Goexit()
15:14 <+iant> from outside, can't be done
15:14 < exDM69> poucet: there's an example of that in the google tech talk
15:14 < poucet> iant: ah great!
15:14 < poucet> exDM69: I must have missed that.
15:14 < exDM69> poucet: if you want to kill it from outside you can use a
special switch statement to listen to many channels, one of them is for a quit
message and the others are your data
15:15 < poucet> exDM69: right, but that still requires the opssibility to
kill it from the inside
15:15 < exDM69> poucet: well, yeah, if you can't use ordinary control flow
statements
15:15 < exch> runtime.Goexit() doesn't seem like a very elegant solution,
but it works if all else fails :)
15:15 < exDM69> poucet: ie.  loop until there's a quit message
15:15 < poucet> exDM69: again, this will be somewhere deep in the call stack
15:16 < exDM69> poucet: yeah, that complicates it
15:16 < poucet> reset { lots of random code; shift; }
15:19 -!- Adys [n=Adys@APoitiers-259-1-24-220.w90-55.abo.wanadoo.fr] has joined
#go-nuts
15:20 -!- broogo [n=broogo@97-116-179-177.mpls.qwest.net] has quit [Remote closed
the connection]
15:21 -!- broogo [n=broogo@97-116-179-177.mpls.qwest.net] has joined #go-nuts
15:21 < dho> iant: did you guys slip release yesterday?
15:21 < broogo> hello
15:21 <+iant> dho: I have no idea, did we?
15:21 < dho> i don't know, russ was saying you might
15:22 < dho> i was hoping not
15:22 < broogo> I have a quick question, I'm reading from a Conn object that
I've set a read timeout on
15:22 <+iant> I guess I just don't know
15:22 < broogo> The timeout gets hit but when I check the error condition it
won't match os.EAGAIN
15:22 <+iant> mostly Rob decides when we will do a release
15:22 < broogo> n, err = c.Read(&_buf);
15:22 < p4p4> what might be wrong with http://codepad.org/RyrtqB5r ? it
compiles, runs, but the socket does not seem to block and i get no data, just eof.
15:22 <+iant> broogo: what is the err object?  What do you see if you print
it?
15:22 < dho> ok
15:22 < broogo> if err == os.EAGAIN { // do soemthing }
15:23 < dho> damn
15:23 < dho> it did get slipped yesterday
15:23 -!- JPascal [n=jpascal@213.141.153.53] has joined #go-nuts
15:23 * dho grumbles a bit
15:24 < broogo> with %T it shows as os.PathError and with %v it gives the
connection info ip:port ip:port followed by resource temporarily unavailable
15:25 <+iant> broogo: if it's a PathError, then it won't be == os.EAGAIN
15:25 -!- karpar [n=karpar@58.253.170.248] has quit []
15:25 <+iant> broogo: you need to something like err.(*PathError).Error ==
os.EAGAIN
15:25 <+iant> this is definitely awkward and I wonder if there is a better
way
15:25 -!- bluszcz [n=bluszcz@static.144.74.47.78.clients.your-server.de] has
joined #go-nuts
15:25 < broogo> okay, so why does a Conn object return a PathError?
15:25 -!- jA_cOp [n=yakobu@ti0043a380-3093.bb.online.no] has quit [Remote closed
the connection]
15:26 <+iant> broogo: I guess to conveniently provide the ip:port info
15:26 < exch> funky
15:27 < broogo> ah, then the documentation for the Conn object needs to be
changed since it suggests just doing the err == os.EAGAIN, thanks, I'll try it
15:27 <+iant> broogo: if it works could you send a doc patch or open an
issue?  thanks
15:27 -!- RayNbow [i=kirika@scientia.demon.nl] has joined #go-nuts
15:28 < exch> here's my q from yesterday again.  ..  receiving a *int (list
of integers of arbitrary length) from c..  I can dereference the pointer to get
the first element, but because Go lacks pointer arithmatic, I can't seem to get
the rest of the values in the list..  Is there a way around this?
15:28 -!- directrixx [n=aleksand@ip68-231-189-247.tc.ph.cox.net] has joined
#go-nuts
15:29 < broogo> hmm looking at the issues, it kind of looks like a similar
one was opened for the UDP Connection object
15:30 <+iant> broogo: Ah, OK
15:31 <+iant> exch: you can do it using something like
(*[1000]int)(unsafe.Pointer(c_pointer_value))
15:31 < exch> hmm.  that could work
15:31 < exch> ill give it a try
15:31 < exch> the complettion of my PCRE package kinda hinges on it
15:33 * vegai contemplates making a feature request: "Never support Solaris,
please!"
15:37 -!- aa [n=aa@r190-135-186-24.dialup.adsl.anteldata.net.uy] has joined
#go-nuts
15:38 < broogo> iant, casting it like that worked, though I did have to add
a nil check, it was throwing an interface conversion error otherwise
15:38 < broogo> thanks again
15:38 -!- fhujray [n=jray@12.204.194.160] has joined #go-nuts
15:38 < halfdan_> vegard: for what reason?  solaris is very nice
15:38 < vegard> huh?
15:38 < Kyle|Mr_K_13> vegai*
15:39 < vegard> ah, ok.
15:39 < fhujray> i'm trying to install go (again) and the script just hangs
after this line: --- cd ../test
15:39 < halfdan_> vegard: sorry ;)
15:39 < fhujray> it installed the first time, but I wanted to update it
because I was getting a "bus error" for some unknown reason
15:39 -!- kmc [n=keegan@206-71-236-70.c3-0.nyw-ubr5.nyr-nyw.ny.cable.rcn.com] has
quit [No route to host]
15:40 <+iant> fhujray: at that point it is running the tests; it is expected
to take a minute or two; if it's really hanging then some test is presumably
hanging; does top show anything running?
15:40 < fhujray> mdworker, is that part of this install?
15:41 -!- golangguru [n=chatzill@124.125.104.56] has joined #go-nuts
15:41 < fhujray> ps ax |grep bash is showing me this too
15:41 < fhujray> 82542 s000 S+ 0:00.00 time -p bash -c bash
/tmp/gorun-80842-jray >/tmp/gotest1-80842-jray 2>&1
15:41 < fhujray> 82543 s000 S+ 0:00.00 bash -c bash /tmp/gorun-80842-jray
>/tmp/gotest1-80842-jray 2>&1
15:41 < fhujray> 82544 s000 S+ 0:00.00 bash /tmp/gorun-80842-jray
15:41 < fhujray> 82547 s000 S+ 0:00.00 bash /tmp/gorun-80842-jray
15:41 < fhujray> 82548 s000 S+ 0:00.00 bash /tmp/gorun-80842-jray
15:43 <+iant> fhujray: can you figure out which Go program is running?  It
will the child of one of those scripts
15:43 < halfdan_> pstree
15:44 -!- mtz [n=jaan@165.206.191.90.dyn.estpak.ee] has quit [Read error: 60
(Operation timed out)]
15:44 < vegai> halfdan_: sorry for the troll.
15:44 -!- Venom_X [n=pjacobs@66.54.185.131] has joined #go-nuts
15:44 < vegai> I have hardly anything but lousy experiences when dealing
with Solaris
15:44 -!- ergodicsum [n=ergudics@cpe-075-182-116-231.nc.res.rr.com] has joined
#go-nuts
15:44 -!- broogo [n=broogo@97-116-179-177.mpls.qwest.net] has quit []
15:44 < fhujray> sed /tmp.*Bus error/s/.*Bus/Bus/;
/tmp.*Trace.BPT/s/.*Trace/Trace/^J^I^Is!/tmp/gorun-80842-jray!$RUNFILE!g^J^I^Is/^PC=0x[0-9a-f]*/pc:
xxx/^J^I^Is/^pc: 0x[0-9a-f]*/pc:
xxx/^J^I^Is/PC=0x[0-9a-f]*/PC=xxx/^J^I^I/^Trace\/breakpoint
trap/d^J^I^I/^Trace\/BPT trap/d^J^I^I/RUNFILE/ s/line 1: *[0-9]*/line 1:
PID/^J^I^I/^\$RUNFILE: line 1: PID Trace\/breakpoint trap/d^J^I^I/^qemu: uncaught
target signal 11 (Segmentation fault) - exiting/d
15:44 < fhujray> looks like there's my problem
15:45 -!- mainman__ [n=Adium@host247-200-dynamic.45-79-r.retail.telecomitalia.it]
has joined #go-nuts
15:45 -!- aa [n=aa@r190-135-186-24.dialup.adsl.anteldata.net.uy] has quit [Remote
closed the connection]
15:46 < fhujray> thanks for your help
15:46 -!- fhujray [n=jray@12.204.194.160] has left #go-nuts []
15:46 -!- Ishmael [n=Ishmael@200.202.122.5] has quit [Read error: 110 (Connection
timed out)]
15:49 -!- Ishmael [n=Ishmael@200.202.122.5] has joined #go-nuts
15:49 -!- chupish [i=182ed347@gateway/web/freenode/x-gsqqfhpiklkuonzn] has joined
#go-nuts
15:49 -!- chrelad [n=chrisd@76.164.12.11] has joined #go-nuts
15:50 -!- mesenga [n=cbacelar@20150131219.user.veloxzone.com.br] has joined
#go-nuts
15:51 < chrelad> When compiling the toolchain, I got "test output
differs..." Should we file bugs for each test that failed?
15:52 -!- gkmngrgn [n=gkmngrgn@unaffiliated/gkmngrgn] has joined #go-nuts
15:52 <+iant> chrelad: no, but you could open one issue for the general
problem, if there isn't one open already
15:52 -!- alexsuraci` [n=alex@li71-127.members.linode.com] has joined #go-nuts
15:52 < chrelad> iant, okay, thanks
15:52 < XniX23> anyone wrote a tutorial on go yet?  except for site tutorial
and 3pdfs :P
15:53 -!- tomestla1 [n=tom@78.251.140.59] has quit [Read error: 104 (Connection
reset by peer)]
15:54 -!- tor7 [n=tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has quit
[]
15:54 < halfdan_> XniX23: i'm on it
15:54 < halfdan> but probably in german ;)
15:54 < XniX23> halfdan: i can be a beta tester
15:54 < XniX23> oh, maybe not
15:55 < chrelad> halfdan, :D
15:55 < halfdan> ;)
15:55 -!- tomestla [n=tom@78.251.140.59] has joined #go-nuts
15:55 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has joined #go-nuts
15:57 -!- nixfreak [n=nixfreak@mn-10k-dhcp1-3174.dsl.hickorytech.net] has joined
#go-nuts
15:57 -!- decriptor [n=decripto@137.65.132.26] has joined #go-nuts
15:57 < nixfreak> I put $GOROOT in my .bashrc but still unable to compile a
program
15:58 < nixfreak> i have a 686 (6g hello.go)
15:58 <+iant> nixfreak: first see the common problems wiki page mentioned in
the channel topic
15:58 -!- mainman__ [n=Adium@host247-200-dynamic.45-79-r.retail.telecomitalia.it]
has left #go-nuts []
15:58 <+iant> nixfreak: if you have 686, you probably want GOARCH=386, and
8g rather than 6g
15:59 < nixfreak> yeah your right sorry to waste your time
16:00 -!- gnuvince [n=vince@64.235.207.47] has joined #go-nuts
16:01 -!- waltermundt [n=codemage@twiki/developer/EtherMage] has quit ["Leaving."]
16:04 -!- tomestla [n=tom@78.251.140.59] has quit [Read error: 145 (Connection
timed out)]
16:04 < XniX23> iant: are there any projects being developed like web
framework for go?
16:04 -!- boccob [n=quassel@predator.cs.odu.edu] has joined #go-nuts
16:04 <+iant> XniX23: I think I've seen some comments go by on the list, I
don't know how serious they are at this point
16:05 -!- mtz [n=jaan@165.206.191.90.dyn.estpak.ee] has joined #go-nuts
16:06 < XniX23> iant: i actually meant developed by google, but thats super
too
16:07 <+danderson> XniX23: the go team at this point is really focused more
on the language core
16:07 <+danderson> but quality library contributions are welcome
16:08 < exch> is there a reason why arrays can only be initialized with
constant sizes?  eg: [10]int as opposed to x:=10; ...  [x]int;
16:08 <+iant> exch: for variable sizes, use a slice
16:08 < alexsuraci`> exch: use make([]int, x)
16:09 < exch> I know about those..  was just wondering why the limitation
exists for array declarations
16:09 -!- Gracenotes [n=person@wikipedia/Gracenotes] has quit ["Leaving"]
16:10 -!- iant [n=iant@67.218.109.147] has quit ["Leaving."]
16:10 < alexsuraci`> probably because it's something determined at runtime
16:11 -!- hstimer [n=hans@c-98-234-25-125.hsd1.ca.comcast.net] has quit
["Leaving..."]
16:11 -!- wcn [n=wcn@74.125.57.33] has joined #go-nuts
16:13 < exch> I broke gopaste.org :p code is submitted, but nothing shows up
on the result page
16:13 < alexsuraci`> exch: probably a syntax error, it'll just silently fail
16:13 < alexsuraci`> if you click "raw" you can see the input
16:14 < alexsuraci`> got a link?
16:14 -!- MigoMipo [n=kvirc@84-217-12-180.tn.glocalnet.net] has joined #go-nuts
16:14 < alexsuraci`> note that anything gofmt/go accepts gopaste should
accept.  anything else will fail.
16:14 < exch> yarr http://gopaste.org/raw?paste=VNVkX It does contain
invalid code.  but that's why I posted it :)
16:15 < exch> righto.  Noted.
16:15 < alexsuraci`> yea, these need to be in a func main() or as var ...
16:15 -!- ergodicsum [n=ergudics@cpe-075-182-116-231.nc.res.rr.com] has quit [Read
error: 110 (Connection timed out)]
16:16 -!- cls`work [n=cls_work@195-241-68-133.ip.telfort.nl] has quit [Success]
16:16 < exch> not just that.  the second bit has an invalid array
declaration
16:16 -!- cls`work [n=cls_work@195-241-68-133.ip.telfort.nl] has joined #go-nuts
16:16 < exch> But cuold you perhaps make the backend auto-detect if there is
a func main() or not and add it?  Should make gopaste a lil more versatile
16:17 < alexsuraci`> i'd rather not do too much preprocessing, but maybe
16:18 < Smergo> Why do you need to paste valid code?  Is it executed?
16:18 < exch> gofmt parses it
16:18 < alexsuraci`> Smergo: it's processed with go/*
16:18 < alexsuraci`> and spat out as gofmt would, yea
16:18 < alexsuraci`> (it actually just uses go/printer)
16:19 < Smergo> Ok, because I would think that it might be nice for people
to be able to paste code that isn't correct when/if they need help to correct it
:)
16:19 < alexsuraci`> Smergo: true, but that's kind of unpredicable
16:20 -!- brrant [n=John@65-102-193-77.hlrn.qwest.net] has joined #go-nuts
16:20 < alexsuraci`> simple things like "package main" or main() missing are
relatively simple but anything could result in it failing to compile.  though, in
this case all it has to do is parse.
16:20 -!- iant [n=iant@nat/google/x-fdzugcrdqwovwtea] has joined #go-nuts
16:20 -!- mode/#go-nuts [+v iant] by ChanServ
16:20 -!- Fl1pFl0p [i=fl1pfl0p@unaffiliated/fl1pfl0p] has quit [Read error: 110
(Connection timed out)]
16:20 -!- itrekkie [n=itrekkie@ip72-200-108-156.tc.ph.cox.net] has joined #go-nuts
16:21 < alexsuraci`> also the only way it does the fancy syntax hilighting
is with go/printer, which requires a valid ast
16:21 < alexsuraci`> so I could add, say, "paste raw", but then there'd be
no syntax hilighting and they might as well just link to /raw?paste=XXXXX
16:21 -!- p4p4 [n=pedro@24.121.113.82.net.de.o2.com] has quit [Remote closed the
connection]
16:22 -!- bquinn [n=bquinn@nat/yahoo/x-xezzyweglrjtpyes] has quit []
16:22 < Smergo> alexsuraci`: Yes, but a lot of pastes on those kind of pages
is not valid code but just snippets and they can still get syntax hilighting.
16:22 < Smergo> But yes, raw works.
16:23 -!- chupish [i=182ed347@gateway/web/freenode/x-gsqqfhpiklkuonzn] has left
#go-nuts []
16:23 -!- qbit_ [n=qbit_@c-75-71-160-106.hsd1.co.comcast.net] has joined #go-nuts
16:24 -!- aidecoe [n=aidecoe@2001:470:1f0b:77d:0:0:a1d:3c0e] has quit
["przeprowadzka?"]
16:24 -!- rbohn [n=rbohn@192.206.100.4] has joined #go-nuts
16:24 < alexsuraci`> Smergo: right.  as long as they can be parsed they'll
get the hilighting.  but things like a missing package decl or missing main() will
not parse correctly.  I just don't really want to complicate it too much.
16:24 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has quit []
16:25 < alexsuraci`> if I don't do it I'll at least add a blurb about that
in the little sidebar next to the paste area.
16:25 < Smergo> :)
16:26 < exch> mmm.  one of my methods called 'add' is making a new slice
'slice := make([]int, 1);'.  The program segv's on the makeslice call().  When I
rename the method to something other than add(), it works.
16:27 < exch> actually, scratch that.  It segv's when the struct parameter
it belongs to is a pointer instead of a value.
16:29 < exch> It has to be passed as a pointer though, because the method
changes one of it's fields.
16:29 -!- aa [n=aa@r200-40-114-26.ae-static.anteldata.net.uy] has joined #go-nuts
16:31 -!- raichoo [n=raichoo@i577BBDFB.versanet.de] has joined #go-nuts
16:32 -!- mxpxpod [n=bryan@unaffiliated/mxpxpod] has joined #go-nuts
16:33 < mxpxpod> is there a way to do a multi-file cgo package?  for
instance, I want to do something like gobject.go and gio.go
16:34 < mxpxpod> however, when I go to compile them with the Makefile like
in the examples, it says _C_void is redeclared
16:34 -!- offby1` [n=user@q-static-138-125.avvanta.com] has joined #go-nuts
16:34 -!- Nanoo [n=Nano@95-89-198-15-dynip.superkabel.de] has joined #go-nuts
16:36 -!- loureiro [n=loureiro@189.2.128.130] has quit [Read error: 113 (No route
to host)]
16:37 -!- jA_cOp [n=yakobu@ti0043a380-3093.bb.online.no] has joined #go-nuts
16:39 -!- Ishmael [n=Ishmael@200.202.122.5] has quit [Read error: 60 (Operation
timed out)]
16:40 -!- Cyprien [n=Cyprien@pub1.heig-vd.ch] has quit [Read error: 110
(Connection timed out)]
16:41 -!- category [n=category@robothouse.vm.bytemark.co.uk] has quit [Remote
closed the connection]
16:44 -!- directrixx [n=aleksand@ip68-231-189-247.tc.ph.cox.net] has quit
["Leaving"]
16:47 -!- raichoo [n=raichoo@i577BBDFB.versanet.de] has quit []
16:47 -!- nixfreak [n=nixfreak@mn-10k-dhcp1-3174.dsl.hickorytech.net] has quit
[Read error: 113 (No route to host)]
16:48 -!- offby1 [n=user@pdpc/supporter/monthlybyte/offby1] has quit [Nick
collision from services.]
16:49 -!- raichoo [n=raichoo@i577BBDFB.versanet.de] has joined #go-nuts
16:51 < exch> wohoo.  Finished the PCRE lib.
16:52 -!- Nanooo [n=Nano@95-89-198-15-dynip.superkabel.de] has quit [Read error:
110 (Connection timed out)]
16:52 < chrelad> exch, Nice, and thanks!
16:52 < exch> now to find a place to put it
16:53 -!- trickie [n=trickie@94.100.112.225] has quit [Read error: 113 (No route
to host)]
16:54 -!- Ishmael [n=Ishmael@200.202.122.5] has joined #go-nuts
16:55 -!- plainhao [n=plainhao@mail.xbiotica.com] has quit [Remote closed the
connection]
16:56 -!- sadjester [n=sadjeste@216-54-231-66.static.twtelecom.net] has joined
#go-nuts
16:56 -!- travisbrady [n=tbrady@67-207-96-194.static.wiline.com] has joined
#go-nuts
16:58 -!- cls`work [n=cls_work@195-241-68-133.ip.telfort.nl] has quit []
16:58 -!- gkmngrgn [n=gkmngrgn@unaffiliated/gkmngrgn] has quit ["Leaving"]
16:58 < exch> anyone who wants to put it through it's paces?  I'll PM you a
link to the tarball.  Think it could use some testing.
17:00 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has joined #go-nuts
17:00 -!- kaigan|work
[n=kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has quit []
17:01 -!- plainhao [n=plainhao@mail.xbiotica.com] has joined #go-nuts
17:02 -!- zeebo- [n=zeebo-@pool-74-110-97-28.nrflva.fios.verizon.net] has joined
#go-nuts
17:02 -!- zeebo- [n=zeebo-@pool-74-110-97-28.nrflva.fios.verizon.net] has left
#go-nuts []
17:02 < mxpxpod> exch: is it a cgo thing?
17:03 < mxpxpod> s/thing/package/
17:03 < exch> ya
17:03 < mxpxpod> I'd like to see it
17:03 < exch> alright
17:05 -!- mtz [n=jaan@165.206.191.90.dyn.estpak.ee] has quit [Remote closed the
connection]
17:06 -!- depood [n=depood@chello080108055214.19.11.vie.surfer.at] has quit []
17:06 < uriel> /win29
17:06 < JPascal> how to read file to one string?
17:07 -!- hyn [n=hyn@p0a38fe.tokyte00.ap.so-net.ne.jp] has quit ["Computer has
gone to sleep"]
17:08 -!- p4p4 [n=P4p4@24.106.113.82.net.de.o2.com] has joined #go-nuts
17:08 -!- WalterMundt [n=waltermu@twiki/developer/EtherMage] has joined #go-nuts
17:09 -!- timmcd [n=Adium@97-117-100-106.slkc.qwest.net] has joined #go-nuts
17:09 -!- ergodicsum [n=ergudics@70.158.116.43] has joined #go-nuts
17:10 -!- ergodicsum [n=ergudics@70.158.116.43] has left #go-nuts []
17:10 -!- Sylvain_ [i=d4528311@gateway/web/freenode/x-jdjmbammllrsfyun] has quit
["Page closed"]
17:13 -!- bquinn [n=bquinn@office.velleman.com] has joined #go-nuts
17:13 -!- bluemoon_ [n=bluemoon@c-98-225-14-178.hsd1.wa.comcast.net] has joined
#go-nuts
17:14 -!- Cyprien [n=Cyprien@96-28.3-85.cust.bluewin.ch] has joined #go-nuts
17:15 -!- tor7 [n=tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has
joined #go-nuts
17:16 -!- bquinn_ [n=bquinn@dip5-fw.corp.ukl.yahoo.com] has joined #go-nuts
17:19 < uriel> nickjohnson: "If I wanted a new programming language I will
use one that is tried and tested." <--- hahaha I just woke up, and you already
made my day :))
17:19 < uriel> nickjohnson: is that a direct quote from somewhere?
17:19 < nickjohnson> uriel: From an article about Go, yeah.  I'll hunt it up
later.  :)
17:20 -!- bluemoon [n=bluemoon@c-98-225-14-178.hsd1.wa.comcast.net] has quit [Read
error: 60 (Operation timed out)]
17:20 < uriel> just want to add it to my fortunes file, it is pure gold :)
17:20 < uriel> btw, great article
17:21 < uriel> I hope somebody can explain the performance mistery...
17:21 < uriel> did you try with gccgo in the end?  (IIRC the runtime is
still different, so it might have different bugs)
17:21 < uriel> in any case, might be worth filling an issue about it
17:25 -!- nacmartin [n=chatzill@77.224.92.149] has joined #go-nuts
17:26 -!- nsa310 [n=Adium@145.116.229.86] has joined #go-nuts
17:27 -!- nsa310 [n=Adium@145.116.229.86] has quit [Client Quit]
17:30 -!- drusepth`` [n=drusepth@209.106.203.252] has joined #go-nuts
17:30 -!- jA_cOp [n=yakobu@ti0043a380-3093.bb.online.no] has quit [Remote closed
the connection]
17:31 -!- bquinn [n=bquinn@office.velleman.com] has quit [Read error: 110
(Connection timed out)]
17:31 -!- Ishmael [n=Ishmael@200.202.122.5] has quit [Read error: 110 (Connection
timed out)]
17:32 -!- Ishmael [n=Ishmael@200.202.122.5] has joined #go-nuts
17:32 -!- sm [n=sm@cpe-75-85-88-227.socal.res.rr.com] has joined #go-nuts
17:32 -!- sm_ [n=sm@cpe-76-173-194-242.socal.res.rr.com] has joined #go-nuts
17:33 -!- drry [n=drry@unaffiliated/drry] has joined #go-nuts
17:34 -!- Lorthirk [n=cm0901@109.112.5.161] has quit [Read error: 110 (Connection
timed out)]
17:35 -!- Nanoo [n=Nano@95-89-198-15-dynip.superkabel.de] has quit ["Leaving"]
17:37 -!- Nanoo [n=Nano@95-89-198-15-dynip.superkabel.de] has joined #go-nuts
17:37 -!- depood [n=depood@chello080108055214.19.11.vie.surfer.at] has joined
#go-nuts
17:38 < uriel> exch: I'd be happy to host it at http://go-lang.cat-v.org
17:38 < uriel> exch: or if you put it somewhere else, let me know so I can
add a link
17:39 -!- callidus [n=callidus@213-131-121-253.onyx.net] has quit ["Lost
terminal"]
17:40 -!- smooge [n=smooge@int.smoogespace.com] has quit [Read error: 104
(Connection reset by peer)]
17:42 < exch> I'm looking into setting up a git repo atm
17:42 < s_mosher> ooo PCRE?  how does it perform?
17:42 < chrelad> exch, good idea
17:42 -!- zilt [n=aking@74.210.120.119] has quit ["Leaving"]
17:44 -!- Txarli_ [n=jcarles@53.Red-80-24-0.staticIP.rima-tde.net] has quit [Read
error: 104 (Connection reset by peer)]
17:44 < exch> s_mosher: I havn't done any real performance testing.  I have
included a couple of test cases to make sure it works as expected..
compiling/single and multiple matches etc.
17:44 -!- jeeemac [n=johan@83.101.83.195] has quit []
17:44 < exch> http://github.com/jteeuwen/go-pkg-pcre
17:44 < s_mosher> ah
17:44 -!- raichoo [n=raichoo@i577BBDFB.versanet.de] has quit []
17:44 -!- jeeemac [n=johan@83.101.83.195] has joined #go-nuts
17:45 -!- Adys_ [n=Adys@unaffiliated/adys] has joined #go-nuts
17:45 < exch> I will soon enough though.  I needed it for my irc stuff.
Which I can continue to work on now this is done.
17:45 < exch> Any issues will come up by themselves if they exist :)
17:46 < s_mosher> I'm curious because the existing regexes seem to have
inordinate times
17:46 < chrelad> exch, cool, you're working on IRC stuff for go?  I'd like
to take a crack at that when you're done
17:46 < exch> the regexp package is pretty horrid tbh.  (no offense to the
devs ;))
17:47 * uriel *HATES* PCRE
17:47 < exch> it does state clearly that it's a simple imlpementation
though, so can hardly blame em :)
17:47 -!- raichoo [n=raichoo@i577BBDFB.versanet.de] has joined #go-nuts
17:47 -!- jeeemac [n=johan@83.101.83.195] has quit [Client Quit]
17:47 < uriel> but hey, if people want to use retarded crap...
17:47 -!- Adys_ [n=Adys@unaffiliated/adys] has quit [Client Quit]
17:47 -!- jeeemac [n=johan@83.101.83.195] has joined #go-nuts
17:47 -!- jeeemac [n=johan@83.101.83.195] has left #go-nuts []
17:47 -!- Adys_ [n=Adys@unaffiliated/adys] has joined #go-nuts
17:47 < uriel> exch: why don't you implement Pike's Structural Regular
Expresions next ;)
17:47 < uriel> now that would be nice
17:48 < exch> never heard of em :p
17:48 < uriel> http://doc.cat-v.org/bell_labs/structural_regexps/
17:48 -!- path__ [n=path@59.162.86.164] has quit []
17:48 -!- danly [n=danlesli@S010600226b5eab8e.vs.shawcable.net] has joined
#go-nuts
17:48 < uriel> exch: I guess you at least have read
http://swtch.com/~rsc/regexp/regexp1.html ?
17:49 -!- danly [n=danlesli@S010600226b5eab8e.vs.shawcable.net] has quit [Read
error: 104 (Connection reset by peer)]
17:49 < s_mosher> uriel, someday soon I'll share my go.jsf (go syntax
highlighting for joe) if you want.  I'm not in a big rush to polish it off 'cause
no one uses joe really
17:49 -!- danly [n=danlesli@S010600226b5eab8e.vs.shawcable.net] has joined
#go-nuts
17:49 < exch> probably./ I've read tons of info on it over the past years
17:49 < uriel> s_mosher: sure, let me know when you want it posted
17:49 < uriel> exch: that is not really an 'intro', it is a comparison of
the performance of two very different forms of regexps
17:50 -!- danly [n=danlesli@S010600226b5eab8e.vs.shawcable.net] has left #go-nuts
[]
17:50 < uriel> exch: it is very well worth reading, even if it wasn't
written by Russ Cox ;)
17:50 < exch> hmm.  worth a look.
17:50 < uriel> in particular it shows how broken most regexp implemetnations
are
17:50 < uriel> special PCRE implementations
17:50 < chrelad> s_mosher, i'm always up for trying something new, i'll
check out joe :)
17:50 < s_mosher> yeah, I just have to fix up the printf tokens (currently
just using the ones from C) and then I'll send it your way
17:51 < uriel> chrelad: if you are up for something new, why not try acme?
;) http://acme.cat-v.org (this is what russ and rob use)
17:51 < uriel> (ken still uses sam: http://sam.cat-v.org )
17:51 < chrelad> uriel, that's the plan9 editor isn't it?
17:51 -!- Wiz126 [n=Wiz@72.20.230.25] has joined #go-nuts
17:51 < uriel> chrelad: it is a 'user interface for programmers', quite a
bit more than just an editor actually (sam is just an editor)
17:51 < s_mosher> chachan, it imitates a few other editors.  for some reason
I like joe's wordstar-like default mode
17:51 < uriel> both run on pretty much any OS you can think of
17:51 < exch> I've never really concerned myself much with regex lib
performance tbh.  I just want it to match the stuff I throw at it :p Never had
much use for relativistic speeds in my apps
17:52 -!- sm [n=sm@cpe-75-85-88-227.socal.res.rr.com] has quit [No route to host]
17:52 < uriel> exch: the problem is that in some cases, it can take pretty
much for ever
17:52 < exch> true
17:52 < uriel> it is not average perf, but that it has some black holes in
there where your regexp can fall into
17:52 < uriel> read the paper, really, it is very well worth it
17:52 < exch> I will.  It does look interesting.
17:52 < uriel> (and the structural regexp one is also awesome, but that is a
different thing)
17:52 -!- drusepth`` [n=drusepth@209.106.203.252] has quit [Read error: 145
(Connection timed out)]
17:52 < chrelad> uriel, checkin' it out, after i read up on structural
regexp ;)
17:53 < exDM69> chrelad: structural regex?
17:53 < s_mosher> exch, I know what you mean.  I usually end up throwing one
or two regexes it in the midst of doing a pile of other work so it's not like I'd
notice
17:53 < chrelad> exDM69: The link posted above,
http://doc.cat-v.org/bell_labs/structural_regexps/
17:54 < s_mosher> (but if you're running it inside your run loop on a
long-running app, you might want to think about it)
17:54 -!- path__ [n=path@59.162.86.164] has joined #go-nuts
17:55 -!- alexf [n=alexf@c-71-205-224-173.hsd1.mi.comcast.net] has quit
["Leaving"]
17:55 < exch> I use it to process incoming data from irc servers and slpit
it up into specific sections.  makes it easy to convert it to internal message
structures which my plugins can deal with
17:55 < exch> so far it's never proven problematic, but my bots have never
really been in 200+ user channels
17:56 -!- pshahmumbai [n=prashant@59.164.24.31] has joined #go-nuts
17:56 < exch> In those cases I can see it getting a bit hairy
17:56 < JPascal> Hello all!
17:56 < exch> lo
17:57 < JPascal> How I can read all from os.Stdin?  :(
17:58 < exch> JPascal: have a look at bufio.Reader
17:58 -!- nacmartin [n=chatzill@77.224.92.149] has quit [Remote closed the
connection]
17:58 -!- ring-zero [n=hotshot@117.199.139.242] has quit ["Leaving"]
17:59 < exch> r := bufio.NewReader(os.Stdin); ...
18:00 -!- elmar [n=elmar@188.107.222.52] has joined #go-nuts
18:00 -!- ni| [n=ni|@isp2-resnet-nat1.union.edu] has joined #go-nuts
18:01 -!- Adys [n=Adys@unaffiliated/adys] has quit [Read error: 110 (Connection
timed out)]
18:01 < JPascal> Thx.  I go try it.
18:02 -!- nsa310 [n=Adium@145.116.229.86] has joined #go-nuts
18:02 -!- nsa310 [n=Adium@145.116.229.86] has left #go-nuts []
18:04 -!- ShadowIce [n=pyoro@p54A2467A.dip.t-dialin.net] has joined #go-nuts
18:07 -!- Snert [n=achowe@puff.snert.com] has quit ["ChatZilla 0.9.85 [Firefox
3.5.5/20091102152451]"]
18:07 < JPascal> multiple-value r.*Reader·ReadString() in single-value
context :-\
18:07 < exch> it returns a string and a possible error
18:08 -!- timmcd [n=Adium@97-117-100-106.slkc.qwest.net] has left #go-nuts []
18:08 < exch> str, err = r.ReadString(); if err != nil { ohnoes() } else {
yay(str) }
18:08 < JPascal> yes, right) sorry
18:08 -!- Lorthirk [n=cm0901@109.114.84.99] has joined #go-nuts
18:10 -!- engla [n=ulrik@wikipedia/Sverdrup] has quit [Read error: 110 (Connection
timed out)]
18:10 -!- Dunkelstern [n=Dunkelst@p549C1C52.dip0.t-ipconnect.de] has joined
#go-nuts
18:10 -!- ni| [n=ni|@isp2-resnet-nat1.union.edu] has quit [Remote closed the
connection]
18:11 -!- ni| [n=ni|@isp2-resnet-nat1.union.edu] has joined #go-nuts
18:11 < jlouis> 24
18:11 < jlouis> argh
18:14 -!- ni| [n=ni|@isp2-resnet-nat1.union.edu] has quit [Client Quit]
18:16 -!- RayNbow [i=kirika@scientia.demon.nl] has quit ["When science finally
locates the center of the universe, some people will be surprised to learn they're
not it"]
18:17 -!- smooge [n=smooge@int.smoogespace.com] has joined #go-nuts
18:18 -!- dacc [n=dan@dsl-216-162-193-144.drizzle.com] has joined #go-nuts
18:18 -!- gpurrenhage_ [n=gpurrenh@141.209.48.127] has joined #go-nuts
18:18 -!- werdan7_ [n=w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
18:18 -!- r00ttap [n=wjones@204.108.244.100] has joined #go-nuts
18:19 < tcpip4000> a simple client/server socket sin go:
http://bit.ly/2NYzwx
18:19 -!- path__ [n=path@59.162.86.164] has quit [Connection timed out]
18:19 -!- nanditux [n=freenina@triband-mum-59.184.129.182.mtnl.net.in] has joined
#go-nuts
18:19 -!- werdan7 [n=w7@freenode/staff/wikimedia.werdan7] has quit [Nick collision
from services.]
18:20 -!- nanditux [n=freenina@triband-mum-59.184.129.182.mtnl.net.in] has left
#go-nuts []
18:24 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has joined
#go-nuts
18:25 -!- gdebug [n=gdebug@97.93.221.235] has quit []
18:25 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has quit [SendQ
exceeded]
18:26 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has joined
#go-nuts
18:28 < exch> uriel: the article is an excellent read.  I might have a go at
getting this into go and see how it performs
18:28 -!- engla [n=ulrik@90-229-231-23-no153.tbcn.telia.com] has joined #go-nuts
18:29 < uriel> exch: which article?  or bot :)
18:29 < uriel> h
18:29 < chrelad> uriel, yeah, that was an interesting article.  go seems
like a good platform for introducting these new ideas to the masses
18:29 -!- alex1 [n=alex@unaffiliated/a1g] has joined #go-nuts
18:29 < exch> uriel: the regex thing you linked me to
18:30 < uriel> exch: yea, but which one, russ' or rob's :)
18:30 < exch> http://swtch.com/~rsc/regexp/regexp1.html that one :p
18:30 < uriel> (note that go's built-in regexp lib uses a fairly naive
version of the algorithm described in russ' paper)
18:31 < uriel> ok, now take a look at structural regexps, those are really
interesting, and add a bit more over what is already in Go :)
18:31 < uriel> (but keep in mind that I wouldn't be surprised if Rob plans
to write an structural regexps lib for Go at some point, or something equivalent)
18:33 -!- manowar721 [n=manowar7@c-75-70-238-199.hsd1.co.comcast.net] has joined
#go-nuts
18:33 -!- Nanoo [n=Nano@95-89-198-15-dynip.superkabel.de] has quit ["Leaving"]
18:33 < chrelad> uriel, right.  if go *did* contain structural regular
expressions via a library, i think it would have a lot more traction and a lot
more people would take notice.  Heck, if enough people liked it and saw it's
benefit, some of the core, foundational aspects of linux might be changed to allow
for structural regular expressions :D
18:33 < exch> ive never actually considered implementing one of those
myself..  I've always considered state machines like that to be a akin to black
magic, but this is all pretty straight forward it seems.
18:34 -!- hagna [n=hagna@70.102.57.178] has joined #go-nuts
18:34 -!- gpurrenhage [n=gpurrenh@141.209.59.129] has quit [Read error: 110
(Connection timed out)]
18:34 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts
18:35 -!- voluspa [n=voluspa@x-134-84-102-227.reshalls.umn.edu] has joined
#go-nuts
18:35 < hagna> david bacon has a lot of papers on garbage collection which
one should I start with to understand where you want to go with go?
18:35 -!- broo [n=estabroo@97-116-179-177.mpls.qwest.net] has joined #go-nuts
18:36 -!- bartwe [n=bwerf@bwerf.xs4all.nl] has quit []
18:37 < broo> Is there a way to put a function reference as the value in a
map?  like map[string]func....
18:37 <+iant> hagna: try "A Pure Reference Counting Garbage Collector" on
this page: http://www.research.ibm.com/people/d/dfb/recycler-publications.html
18:37 <+iant> broo: sure, that should work
18:37 < uriel> chrelad: if Go could kill not only Java and C++, but also
PCRE, that would be the biggest and greatest miracle in history, it would be just
way too good to be true
18:37 < chrelad> uriel, how would i start using plan9's window manager?  i'm
running gentoo and i've emerged plan9port which put all of plan9's stuff under
/usr/lib/plan9.
18:37 < hagna> iant: thanks
18:38 < broo> iant: I guess I'm looking for syntax, so far what I've tried
hasn't worked
18:39 < uriel> chrelad: just start rio
18:39 <+iant> broo: e.g., map[int]func(int)
18:39 < uriel> chrelad: but rio in p9p is not rio in plan9, it is just an
X11 wm that looks like it
18:39 <+iant> broo: what is the type of the function you want to put in the
map?
18:39 < uriel> chrelad: but this is offtopic, better ask in #plan9
18:39 < chrelad> uriel, Would be nice given the mint constructs that you
gain with go that java and c/++ lack for sure!  Any ideas how go would overcome
the gui hurdle, and the windows hurdle?
18:40 < uriel> chrelad: I have no idea, but I'm sure rob does
18:40 < broo> a function that takes a string, like map[int]func(string)
18:40 < uriel> (not sure what you mean by 'windows hurdle')
18:40 <+iant> broo: that works for me, how does it fail for you?
18:40 < broo> syntax error near string
18:40 < chrelad> uriel, just don't see much as compiling on windows machines
on the website.
18:41 <+iant> broo: what does the code look like?
18:41 < broo> iant: cmdFunc := make(map[int]func(string);
18:41 < broo> doh left off the trailing )
18:41 <+iant> broo: that line is missing a close right paren
18:41 -!- dacc [n=dan@dsl-216-162-193-144.drizzle.com] has quit [Read error: 110
(Connection timed out)]
18:41 < broo> iant: thanks
18:42 < chrelad> uriel, okay..  So i'm not getting the "true" rio window
manager then...  still, it'll be nice to see what it feels like...  i like the
idea of everything as a file though, always have.  just always been turned off by
the 8 bit graphics in the screenshots :D
18:42 < chrelad> uriel, righto, entering #plan9
18:42 < uriel> chrelad: don't get me started on that *SIGH*
18:43 -!- gasreaa [n=atwong@nat/slide/x-onxymleslbamgiov] has joined #go-nuts
18:44 < uriel> (the people at Bell Labs sure know how to scare people off
and give them totally wrong perceptions, Plan 9 has not been 8bits since the early
90's or so, but they keep that retarded .gif screenshot because when it was taken
browsers still didn't support .png)
18:44 < WalterMundt> hmm, this script maxes out at ~65 request/sec, but I
can run a second copy and both will run at that rate: http://gopaste.org/kTNrw
18:44 < exch> no bashing the 8-bit!  :p
18:44 -!- path__ [n=path@115.240.92.110] has joined #go-nuts
18:44 < chrelad> exch, LOL
18:44 < WalterMundt> (even if I set the rate higher, that is)
18:45 < chrelad> uriel, Yeah, I know...  I just now found some 32 bit stuff
burried in a directory somewhere on the plan9 site
18:45 < chrelad> uriel, they still aren't that good lookin' though to be
honest.  I suppose that's intended to help keep coders focused?
18:45 < uriel> chrelad: plan9 devs don't want the world to know that plan9
doesn't totally suck and is not totally dead!
18:45 < uriel> I like the colors, matter of taste I guess
18:46 < exch> I think Bell does that deliberatly..  to only attract people
who spenmd most of their time buried in a shell anyways..  Beats all the kids
whining about lack of 6 dimensional windows and pixel shader mousepointers
18:46 < chrelad> exch, LOL :DDD
18:46 < rullie> hehe
18:47 < WalterMundt> oh, it's terminal output over head
18:47 -!- manowar721 [n=manowar7@c-75-70-238-199.hsd1.co.comcast.net] has left
#go-nuts ["Leaving"]
18:48 < s_mosher> exch, don't you be dissin' my moon phase widget...
gadget...  gidget thing
18:49 -!- p4p4_ [n=P4p4@24.106.113.82.net.de.o2.com] has joined #go-nuts
18:49 < s_mosher> (I got it from the google repo so it's cool, right?)
18:49 < chrelad> WalterMundt, LOL
18:50 -!- alexsuraci` [n=alex@li71-127.members.linode.com] has quit ["Lost
terminal"]
18:50 -!- aho [n=nyamo@f051163126.adsl.alicedsl.de] has joined #go-nuts
18:51 -!- flyfish [n=flyfish@pixout.appriss.com] has joined #go-nuts
18:52 -!- pshahmumbai [n=prashant@59.164.24.31] has quit ["Ex-Chat"]
18:53 < sdier> eah
18:53 < sdier> wrong channel, oops
18:53 -!- edw [n=user@c-76-99-21-9.hsd1.pa.comcast.net] has quit [Remote closed
the connection]
18:53 -!- edw [n=user@c-76-99-21-9.hsd1.pa.comcast.net] has joined #go-nuts
18:54 -!- elmar [n=elmar@188.107.222.52] has quit ["Leaving"]
18:55 < Dunkelstern> hi there, go newb here.  I have a simple question: How
to use the png decoder, how do i get an io.Reader to supply it to png.Decode?  I
am a bit lost at the moment :)
18:56 -!- hiromtz [n=hiromtz@softbank220046023004.bbtec.net] has joined #go-nuts
18:56 -!- nil [n=ni|@isp2-resnet-nat1.union.edu] has joined #go-nuts
18:56 -!- dho_ [n=dho@onager.omniti.com] has joined #go-nuts
18:57 < s_mosher> Dunkelstern, os.File implements io.Reader
18:57 < s_mosher> so just hand it a filehandle
18:57 -!- hiromtz_ [n=hiromtz@softbank220046023004.bbtec.net] has joined #go-nuts
18:57 -!- dho [n=devon@onager.omniti.com] has quit [Read error: 104 (Connection
reset by peer)]
18:58 < ajhager> Is it possible to convert a length 4 byte slice to an
int32?
18:58 <+iant> ajhager: encoding/binary
18:58 < ajhager> iant: Thanks
18:59 < Dunkelstern> s_mosher, ok thanks, have to find my way through the
std libs :)
18:59 < s_mosher> iant, that package is really impinging on my love for
shifts
18:59 < ajhager> iant: I thought I had looked through everything, but that
is exactly what I needed.  doh!
18:59 -!- jharrys [n=de043124@c-71-195-253-55.hsd1.ut.comcast.net] has joined
#go-nuts
18:59 <+iant> there is a lot in those libraries already
19:00 < s_mosher> Dunkelstern, you're not the first person to ask that (and
you won't be the last)...  it takes some navigating through docs to find which
type implements what interface
19:01 < s_mosher> iant, the libs are really good.  I come from C, so there's
a lot of work I'm used to doing by hand.
19:01 < Dunkelstern> s_mosher, some kind of "class diagram" (i know they're
not classes) would be incredibly helpful
19:02 < s_mosher> yeah, I'd like to see tables for that in the generated
docs
19:02 < chrelad> Dunkelstern, i agree
19:04 < Dunkelstern> ok works...  now for the image manipulation, starts to
get interesting now :)
19:05 -!- nil [n=ni|@isp2-resnet-nat1.union.edu] has quit [Remote closed the
connection]
19:05 < s_mosher> I do enjoy skipping the "filling buffers" step
19:06 -!- octoploid [n=octoploi@77-23-212-222-dynip.superkabel.de] has quit
["WeeChat 0.3.1-dev"]
19:07 -!- p4p4 [n=P4p4@24.106.113.82.net.de.o2.com] has quit [Success]
19:07 -!- kaib [n=kaib@c-76-102-52-156.hsd1.ca.comcast.net] has joined #go-nuts
19:07 -!- mode/#go-nuts [+v kaib] by ChanServ
19:07 -!- BeaN [n=afitz@adsl-190-192-124.asm.bellsouth.net] has quit []
19:07 < dho> harro kaib
19:07 -!- kaib_ [n=kaib@216.239.45.130] has joined #go-nuts
19:08 -!- mode/#go-nuts [+v kaib_] by ChanServ
19:08 <+kaib_> dho: hi there
19:08 -!- JPascal [n=jpascal@213.141.153.53] has left #go-nuts []
19:08 < dho> is this william josephson guy on irc, do we know?
19:08 < s_mosher> aaaaaaaaa: http://gofmt.com/compile.html
19:09 < s_mosher> I sure hope that's sandboxed and all sorts of other things
19:09 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has
joined #go-nuts
19:09 < chrelad> s_mosher, woah!
19:09 < s_mosher> rate-limited and etc
19:09 -!- KinOfCain [n=KinOfCai@rrcs-64-183-61-2.west.biz.rr.com] has joined
#go-nuts
19:10 -!- codehai [n=codehai@xdsl-78-34-46-174.netcologne.de] has joined #go-nuts
19:10 < exch> lol
19:10 < exch> the author has a lot of faith in the world
19:12 -!- Ishmael [n=Ishmael@200.202.122.5] has quit [Read error: 60 (Operation
timed out)]
19:12 -!- binaryjohn [n=binaryjo@24.30.132.50] has joined #go-nuts
19:12 < exch> hehe "somewhere/run.bash: line 17: 7737 Killed ./exe.elf
19:12 < exch> giving it an infinite loop
19:13 -!- loureiro [n=loureiro@189.2.128.130] has joined #go-nuts
19:14 -!- afurlan [n=afurlan@scorpion.mps.com.br] has quit [Remote closed the
connection]
19:14 -!- r00ttap [n=wjones@204.108.244.100] has quit ["leaving"]
19:15 < s_mosher> exch, you're given the keys to a shiny new car and your
first instinct is to crash it?  :P
19:15 < exch> nah.  Just seeing if it meets the established safety
guidelines before I let my kids sit in the back :p
19:16 -!- engla [n=ulrik@wikipedia/Sverdrup] has quit [Read error: 104 (Connection
reset by peer)]
19:16 < s_mosher> heh
19:16 < s_mosher> I can't argue with that
19:17 -!- engla [n=ulrik@90-229-231-23-no153.tbcn.telia.com] has joined #go-nuts
19:18 -!- afurlan [n=afurlan@scorpion.mps.com.br] has joined #go-nuts
19:20 -!- Nanoo [n=Nano@95-89-198-15-dynip.superkabel.de] has joined #go-nuts
19:20 -!- brunov [n=bruno@190.191.110.64] has joined #go-nuts
19:20 -!- golangguru [n=chatzill@124.125.104.56] has quit ["ChatZilla 0.9.85
[Firefox 3.5.5/20091102134505]"]
19:21 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has quit []
19:23 -!- kaib [n=kaib@c-76-102-52-156.hsd1.ca.comcast.net] has quit [Read error:
110 (Connection timed out)]
19:24 -!- hiromtz [n=hiromtz@softbank220046023004.bbtec.net] has quit [Read error:
110 (Connection timed out)]
19:25 -!- shambler [i=kingrat@mm-39-166-84-93.dynamic.pppoe.mgts.by] has joined
#go-nuts
19:26 -!- voluspa [n=voluspa@x-134-84-102-227.reshalls.umn.edu] has quit [Read
error: 113 (No route to host)]
19:26 -!- boccob [n=quassel@predator.cs.odu.edu] has left #go-nuts
["http://quassel-irc.org - Chat comfortably.  Anywhere."]
19:28 -!- hugov [n=hugov@sjc237n225.joh.cam.ac.uk] has joined #go-nuts
19:29 -!- hiromtz_ [n=hiromtz@softbank220046023004.bbtec.net] has quit [Read
error: 110 (Connection timed out)]
19:29 -!- afurlan [n=afurlan@scorpion.mps.com.br] has quit [Remote closed the
connection]
19:29 -!- interskh [n=interskh@c-67-163-156-103.hsd1.pa.comcast.net] has quit
[Remote closed the connection]
19:29 -!- Wiz126 [n=Wiz@72.20.230.25] has quit [Connection timed out]
19:29 -!- blackmagik [n=blackmag@unaffiliated/blackmagik] has joined #go-nuts
19:31 < chrelad> What is the status of Google Go being compil(able) on
windows?
19:31 < chrelad> Sorry, not Google Go, but Go
19:31 < blabla> it is not google?
19:31 < saati_> chrelad: there is no go for windows at the moment
19:31 <+iant> chrelad: it does not work on WIndows, sorry
19:32 < chrelad> blabla: Hmmm, maybe it is?  I'm not sure I guess...  I
thought it was open sourced
19:32 < chrelad> iant, Cool, is there work going on to get it working on
windows?
19:32 <+iant> chrelad: there seems to be a project using cygwin, it was
mentioned on the mailing list
19:33 < chrelad> iant, Oh, okay...  I'll subscribe to the mailing list right
now
19:33 -!- ejb [n=ejb@unaffiliated/ejb] has quit [Read error: 113 (No route to
host)]
19:34 -!- ejb [n=ejb@unaffiliated/ejb] has joined #go-nuts
19:34 -!- Ishmael [n=Ishmael@200.202.122.5] has joined #go-nuts
19:34 -!- tonelu [n=tonelu@188.27.86.51] has joined #go-nuts
19:34 -!- triddell [n=tim@207-191-198-64.cpe.ats.mcleodusa.net] has quit
["Leaving."]
19:35 -!- afurlan [n=afurlan@scorpion.mps.com.br] has joined #go-nuts
19:37 < WalterMundt> hmm, on one of my machines, time.Ticker() doesn't seem
to want to tick more often than every .01s
19:38 < uriel> chrelad: there is also an effort to get a native port going,
see http://code.google.com/r/hectorchu-go-windows/
19:38 -!- nonet [n=nonet@c-69-181-203-73.hsd1.ca.comcast.net] has joined #go-nuts
19:38 < chrelad> uriel, Hmmmm...  Interesting...  I'll check it out
19:38 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has joined
#go-nuts
19:40 -!- kmc [n=keegan@206-71-236-70.c3-0.nyw-ubr5.nyr-nyw.ny.cable.rcn.com] has
joined #go-nuts
19:41 -!- jharrys [n=de043124@c-71-195-253-55.hsd1.ut.comcast.net] has quit
["Leaving."]
19:41 < uriel> anyone remembers who was working on the openbsd and dfbsd
ports?
19:41 < uriel> my memory is not good..
19:41 * uriel is listing all known porting efforts at
http://go-lang.cat-v.org/ports
19:42 < dho> yes
19:42 < dho> snert was working on openbsd
19:42 < dho> i'm giving him some help
19:43 < dho> trying to find me___ because i just noticed he lives in
maryland.
19:43 < dho> and so do i
19:43 < dho> he's working on dragonfly
19:43 < uriel> ah, cool
19:43 -!- ryniek [n=Adrian-A@host-89-231-98-162.warszawa.mm.pl] has joined
#go-nuts
19:43 < dho> his hours don't seem to sync well with my own
19:43 < chrelad> uriel, Cool, I'll bookmark that port page you have
19:44 < ryniek> hi
19:44 < uriel> if anyone knows of other porting efforts, please let me know
19:44 < dho> are you on the mailing list?
19:44 < uriel> yes
19:44 < dho> someone in brazil was mentioning a haiku port today
19:45 < uriel> but Im a bit swamped by email :)
19:45 < uriel> yea, I just listed that one
19:45 < uriel> (hit reload ;)
19:45 < dho> uriel: freebsd is all merged
19:45 < dho> there's ongoing work but it works.
19:45 -!- ryniek [n=Adrian-A@host-89-231-98-162.warszawa.mm.pl] has left #go-nuts
[]
19:45 < cbus> is go-lang available for freebsd?
19:45 < gl> yes
19:45 < dho> cbus: yes, I finished the i386 port yesterday
19:46 < cbus> dho, ahh, cool
19:46 < dho> and amd64 was done the day before
19:46 < dho> it took longer :)
19:46 < dho> (since i'd never seen the code before)
19:46 < dho> i don't think any other unix-like system port should take more
than 2 days
19:46 < uriel> dho: ok, updated
19:47 -!- amacleod [n=amacleod@c-24-34-33-96.hsd1.ma.comcast.net] has joined
#go-nuts
19:48 < uriel> ok, renamed the page from ports to os-ports, anyone that
bookmarked it, please updated, sorry for the confusion
19:48 < eno> uriel: is there people working on powerpc, mips?
19:49 < uriel> eno: not that I'm aware of
19:49 -!- chrelad2 [n=chrelad@76.164.12.11] has joined #go-nuts
19:49 < uriel> although somebody was trying to make gccgo work on a pcc mac
19:49 < uriel> er ppc
19:49 -!- chrelad [n=chrisd@76.164.12.11] has left #go-nuts []
19:51 < dho> well
19:51 -!- tonelu [n=tonelu@188.27.86.51] has quit []
19:51 < dho> i'm sorry, any unix-like system port that runs on
i386/amd64/arm and uses ELF
19:51 -!- afurlan [n=afurlan@scorpion.mps.com.br] has quit [Remote closed the
connection]
19:51 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has quit []
19:57 -!- afurlan [n=afurlan@scorpion.mps.com.br] has joined #go-nuts
19:58 -!- afurlan [n=afurlan@scorpion.mps.com.br] has quit [Remote closed the
connection]
19:58 -!- afurlan [n=afurlan@scorpion.mps.com.br] has joined #go-nuts
19:59 -!- Ishmael [n=Ishmael@200.202.122.5] has quit [Read error: 60 (Operation
timed out)]
20:01 -!- Nanooo [n=Nano@95-89-198-15-dynip.superkabel.de] has joined #go-nuts
20:01 -!- afurlan [n=afurlan@scorpion.mps.com.br] has quit [Remote closed the
connection]
20:02 < uriel> dho: do you know if there is a repo for the dfbsd port?
20:02 -!- jamalta [n=jamalta@209.20.66.76] has joined #go-nuts
20:04 < cmatei> a.go:5: imported and not used: fmt
20:04 -!- napsy_ [n=luka@88.200.96.14] has joined #go-nuts
20:04 < napsy_> Hello.  Is there a syntax file for go for vim?
20:04 < cmatei> is there some way I can make this kind of warning non-fatal
?
20:04 < uriel> napsy_: misc/vim/
20:05 < mxpxpod> I'm trying to wrap a C function that takes a const char*
and I keep getting SIGSEV: segmentation violation when I try to use it...  how do
I wrap that correctly?
20:05 -!- Chaze [n=Chase@dslb-188-097-015-251.pools.arcor-ip.net] has joined
#go-nuts
20:05 < cmatei> i.e.  have a warning, not a compile error
20:05 < uriel> cmatei: yes, remove the import "fmt"
20:05 < napsy_> uriel: thanks
20:05 < cmatei> :)
20:05 < cmatei> it is rather painful to experiment
20:05 -!- Nanoo [n=Nano@95-89-198-15-dynip.superkabel.de] has quit [Read error: 60
(Operation timed out)]
20:07 < jabb> mxpxpod: I'm not sure if a null character is in go strings
20:07 < mxpxpod> jabb: what do you mean?
20:08 -!- nonet [n=nonet@c-69-181-203-73.hsd1.ca.comcast.net] has left #go-nuts []
20:08 < cmatei> does gccgo behave the same ?
20:09 -!- Anders__ [n=Anders@c83-253-2-206.bredband.comhem.se] has joined #go-nuts
20:10 < banthar> mspxpod: look at puts function in misc/cgo/stdio/file.go
20:10 < rbancroft> cmatei: I kind of like that feature, why would you want
imports that you don't use?
20:11 < cmatei> imports were just an example, it's the same with unused vars
20:11 < rbancroft> ah, yes that is a bit harsh
20:11 < cmatei> you'd like to import some package thinking that you *might*
use something in it, while fooling around
20:11 -!- codehai [n=codehai@xdsl-78-34-46-174.netcologne.de] has quit [Read
error: 104 (Connection reset by peer)]
20:11 -!- depood [n=depood@chello080108055214.19.11.vie.surfer.at] has quit [Read
error: 104 (Connection reset by peer)]
20:12 < cmatei> but then you don't use it anymore, and have to comment the
import as well
20:12 < uriel> cmatei: even easier, s/import "fmt"/\/\/&/
20:12 < mxpxpod> banthar: it still segfaults
20:12 -!- depood [n=depood@chello080108055214.19.11.vie.surfer.at] has joined
#go-nuts
20:12 < banthar> mxpxpod: show your code
20:13 -!- depood [n=depood@chello080108055214.19.11.vie.surfer.at] has quit
[Remote closed the connection]
20:13 -!- directrixx [n=aleksand@ip68-231-189-247.tc.ph.cox.net] has joined
#go-nuts
20:13 < cmatei> uriel: that fails with import ( "fmt"; "whatever"; )
20:13 < cmatei> sic!
20:13 -!- codehai [n=codehai@xdsl-78-34-46-174.netcologne.de] has joined #go-nuts
20:13 < mxpxpod> banthar: http://www.reigndropsfall.net/gtkgo.tar.bz2
20:13 < mxpxpod> banthar: run make after you've untarred
20:13 < cmatei> well, it's just an annoyance, I'd expect these to be just
warnings :)
20:14 < mxpxpod> make sure you have
http://github.com/eden/mysqlgo/raw/master/gcc.patch applied
20:15 -!- cpr420 [n=cpr420@67.165.199.143] has joined #go-nuts
20:15 < uriel> mxpxpod: is that what I think i tis?
20:15 < mxpxpod> uriel: it's a crap attempt
20:15 < uriel> mxpxpod: ah, well, if it works let me know
20:16 < mxpxpod> uriel: just me playing around, but I can't get it to work
;)
20:16 < uriel> mxpxpod: and would be cool if you put it up on some repo
20:16 < mxpxpod> uriel: if I have a working copy sometime, then I will
20:16 < mxpxpod> uriel: I'm just trying to get GFile to work right now
20:16 -!- cooperm [n=cooperm@shell.onid.oregonstate.edu] has joined #go-nuts
20:17 < mxpxpod> uriel: but I'm running into segfaults
20:18 -!- flyfish [n=flyfish@pixout.appriss.com] has quit []
20:19 < Dunkelstern> is it just me or is the type system a bit over
restrictive?  why can't i just compare an uint and an int without conversion?
20:19 < mxpxpod> uriel: the other problem I run into is that when I go to do
the wrapper for gtk, I get this when I try to compile: struct size calculation
error
20:20 < mxpxpod> uriel: even with the patch for gcc.go applied
20:21 < mxpxpod> uriel: I haven't tracked it down to what yet, though
20:21 < mxpxpod> uriel: I figured I'd work my way up from gobject/gio
20:21 < uriel> Dunkelstern: it is simpler
20:22 < uriel> (and avoids many silly errors)
20:22 < uriel> mxpxpod: glib is a real abomination
20:23 < s_mosher> Dunkelstern, I like it.  Fascist type enforcement is a
really good thing.
20:23 < exch> aww.  it seems gofmt.com/compile has some sanity checks for
'questionable' code
20:23 < uriel> exch: hehe
20:23 < mxpxpod> I'm not sure I would call not being able to compare an int
and a uint simpler ;)
20:24 -!- Yuffster [n=yuffster@71.181.138.238] has quit [Remote closed the
connection]
20:24 < jimi_hendrix> i have an idea for an addition to the logger package,
after i code the change, what can i do with it?
20:24 < jabb> gcc warns you about it and you end up converting in C/C++ too
20:24 -!- gpurrenhage [n=gpurrenh@141.209.48.127] has quit [Read error: 110
(Connection timed out)]
20:25 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has joined
#go-nuts
20:25 -!- binaryjohn [n=binaryjo@24.30.132.50] has quit []
20:26 -!- h4xOr [n=prudhvi@aldebaran.surapaneni.in] has quit ["Lost terminal"]
20:26 < Dunkelstern> s_mosher, uriel: for greater, less comparisons there
can be errors but if i just want to make sure they are the same value (==) it's a
bit...  eehm...  you have to get used to it first
20:26 < uriel> jimi_hendrix: post it to golang-nuts, or perhaps even see the
contribute page in the website
20:26 < mxpxpod> banthar: any clues?
20:27 < jimi_hendrix> ok
20:27 < jimi_hendrix> golang-nuts?
20:27 < banthar> mxpxpod: comment out C.free
20:27 -!- illya77 [n=illya77@153-7-133-95.pool.ukrtel.net] has joined #go-nuts
20:27 < uriel> jimi_hendrix: mailing list
20:27 < mxpxpod> banthar: I still get a segfault
20:27 -!- h4xOr [n=prudhvi@aldebaran.surapaneni.in] has joined #go-nuts
20:28 < jimi_hendrix> ok
20:28 < uriel> jimi_hendrix: anyway, see
http://golang.org/doc/contribute.html
20:28 -!- gpurrenhage [n=gpurrenh@141.209.107.72] has joined #go-nuts
20:29 -!- myw [n=myw@dhcp-18-111-16-53.dyn.mit.edu] has joined #go-nuts
20:29 < s_mosher> Dunkelstern, yeah.  it's not without a cost, but I really
don't mind it.  I'm masochistic when it comes to type enforcement.
20:29 < mxpxpod> banthar: wait, no
20:29 < banthar> mxpxpod: unused "unsafe" ?
20:29 < mxpxpod> banthar: I forgot to comment out "unsafe"
20:29 < mxpxpod> my Makefile doesn't report that as an error yet
20:29 < Dunkelstern> ok next question :) How to create a dynamically sized
array...  let's say it c-style: char *c; c = malloc(x * sizeof(char));
20:30 < mxpxpod> that fixed it
20:30 < Dunkelstern> sorry for newb questions
20:30 < jimi_hendrix> oh, and do go routines go into a new thread for each
routine, or are there a few threads that manage all the go routines
20:31 < mxpxpod> banthar: thank you very much!
20:31 -!- kill-9 [n=kill-9@cpe-65-24-145-70.columbus.res.rr.com] has joined
#go-nuts
20:31 < Dunkelstern> jimi_hendrix, i understood it works like those solaris
lightweight threads, it spawns some threads and dispatches the goroutines to them
then
20:31 <+iant> you can avoid the warning for an unused import by saying
import _ "fmt"
20:32 < mythmon> Dunkelstern: i think there is an example of that here
http://golang.org/doc/effective_go.html#slices
20:32 -!- pierron [n=pierron@91-164-249-116.rev.libertysurf.net] has joined
#go-nuts
20:33 < jimi_hendrix> thanks
20:34 < uriel> I don't think go works like solaris at all
20:34 < uriel> in any case, go routines all run in a single thread, unless
they need to run on more threads...
20:34 < uriel> ie., the number of threads is increased and decresed as
needed, and goruotines moved around
20:35 < Dunkelstern> uriel, but the lightweight threads on solaris work the
same way, it was just an example :)
20:35 < uriel> (usually what happens is that when a goroutine blocks on IO
for example, a new thread is started to run the other goruotines)
20:36 < Dunkelstern> mythmon, oh thanks...  have to learn that there are two
allocation functions, new and make...
20:38 < Dunkelstern> wow go programs are so much smaller (in sourcecode)
than everyting i've seen the last few years...  i like that
20:38 < myw> hi, I have a (probably silly) linking question.  I'm trying to
make packages, and it just doesn't seem to be working for me.  I have a source
file, called file.go.  I compile it with "6g -o file.6 file.go", and then I create
a static library of it with "gopack cr file.a file.6".  Then, in the same
directory, I try to compile another file, file_test.go, with the command "6g -o
file_test.6 file_test.go".  file_test.go includes the line ' import "./file"
20:39 -!- plainhao [n=plainhao@mail.xbiotica.com] has quit []
20:39 -!- sadjester [n=sadjeste@216-54-231-66.static.twtelecom.net] has quit []
20:40 -!- sadjester [n=sadjeste@216-54-231-66.static.twtelecom.net] has joined
#go-nuts
20:40 <+iant> myw: use "gcr" with gopack, not just "cr"
20:40 < myw> AH
20:40 < myw> i _knew_ that -g flag was gonna play a role somewhere
20:41 < myw> i'll try it out
20:41 <+iant> it means "do magic Go stuff"
20:42 < myw> yeah, i thought it only applied when I was adding additional
files
20:42 < myw> so I didn't think to use it
20:42 < myw> I guess I misread that
20:42 < myw> anyway, thank you
20:42 < myw> that worked
20:42 -!- nullpo [n=nullpo@221x252x46x83.ap221.ftth.ucom.ne.jp] has joined
#go-nuts
20:43 -!- mythmon [n=cooperm@shell.onid.oregonstate.edu] has quit ["leaving"]
20:44 < mxpxpod> how would I go from a C char* to a go string?
20:45 -!- gmurphy [n=gmurphy@203-206-248-145.dyn.iinet.net.au] has joined #go-nuts
20:45 -!- p4p4_ [n=P4p4@24.106.113.82.net.de.o2.com] has quit [Read error: 145
(Connection timed out)]
20:45 -!- Salvo [n=chatzill@151.56.129.77] has joined #go-nuts
20:46 < Salvo> heya people
20:46 < banthar> mxpxpod: C.GoString
20:46 -!- gpurrenhage [n=gpurrenh@141.209.107.72] has quit []
20:46 -!- mennis [n=mennis@adsl-068-016-104-079.sip.asm.bellsouth.net] has joined
#go-nuts
20:47 -!- tcpip4000 [n=tcpip400@190.84.233.18] has left #go-nuts []
20:47 -!- pierron_ [n=pierron@91-164-174-118.rev.libertysurf.net] has quit [Read
error: 110 (Connection timed out)]
20:48 < mxpxpod> banthar: thanks
20:48 -!- yibter [n=yibter@c-76-105-116-44.hsd1.ga.comcast.net] has joined
#go-nuts
20:48 -!- mennis [n=mennis@adsl-068-016-104-079.sip.asm.bellsouth.net] has quit []
20:48 < banthar> mxpxpod: also it seems you can use C.g_free instead of
C.free
20:49 < mxpxpod> banthar: as long as you cast the argument to C.gpointer
20:50 -!- Ishmael [n=Ishmael@187.88.184.1] has joined #go-nuts
20:51 -!- x-ip [n=sakura@unaffiliated/x-ip] has quit ["Leaving"]
20:51 < mxpxpod> banthar: oh, nice...  I see what you mean now
20:51 -!- malkia [n=malkia@external.treyarch.com] has quit [Read error: 54
(Connection reset by peer)]
20:54 -!- kfx [n=kfx@location-b.madleet.net] has joined #go-nuts
20:55 < kfx> I'm assuming somone has deployed go to a beowulf cluster; I'm
looking for pointers and pitfalls on the process
20:55 < kfx> :)
20:56 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has quit
["Leaving"]
20:58 -!- melba [n=blee@unaffiliated/lazz0] has quit ["MICROSOFT WORD IS A FUN
GAME"]
20:59 -!- Lustra [n=James@host81-155-229-84.range81-155.btcentralplus.com] has
joined #go-nuts
21:01 -!- zhaozhou [n=zhaozhou@linfast76.bitnet.nu] has joined #go-nuts
21:01 < mxpxpod> is there a way to correctly free the C object inside a
wrapping struct when the struct gets collected?
21:04 < dho> uriel: there isn't, he's maintaining his own patchsets
21:04 -!- hehu [n=asddas@unaffiliated/hehu] has joined #go-nuts
21:04 < uriel> i see
21:04 -!- aa [n=aa@r200-40-114-26.ae-static.anteldata.net.uy] has quit [Remote
closed the connection]
21:04 < hehu> in the interest of trying go, i want to see if it suits my
needs.  i am a proeficient visual basic hacker, and i want to know if go is good
enough to stand in comparison
21:05 -!- Salvo [n=chatzill@151.56.129.77] has quit ["ChatZilla 0.9.85 [Firefox
3.5.5/20091102152451]"]
21:05 -!- Anders__ [n=Anders@c83-253-2-206.bredband.comhem.se] has quit ["Lämnar"]
21:07 < banthar> mxpxpod: check out destroy() method in gmp example
21:07 < mxpxpod> banthar: yeah, I just found that...  duh, me
21:07 -!- Yuffster [n=yuffster@71.181.138.238] has joined #go-nuts
21:09 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has quit []
21:10 < hector> i need some help with extern register variables
21:10 < hector> in the x86 port they get turned to indexes into gs segment
21:10 < mxpxpod> thanks for all the help, guys
21:10 -!- mxpxpod [n=bryan@unaffiliated/mxpxpod] has quit [Remote closed the
connection]
21:10 < hector> but for windows i need to generate two instructions
21:10 < hector> one to load the tls pointer in 0x2c(fs)
21:11 -!- illya77 [n=illya77@153-7-133-95.pool.ukrtel.net] has quit [Read error:
104 (Connection reset by peer)]
21:11 < hector> then another to index into tls memory
21:11 < hector> how can i do this?
21:13 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has joined
#go-nuts
21:14 -!- gmurphy [n=gmurphy@203-206-248-145.dyn.iinet.net.au] has quit []
21:15 < hector> nobody here?
21:15 < dho> hector: how can you do what?
21:16 -!- Gracenotes [n=person@wikipedia/Gracenotes] has joined #go-nuts
21:16 <+iant> hector: I think Russ would argue that the Windows port should
use direct syscalls, in which case it can do whatever it likes with fs
21:16 <+iant> but if you don't go that path, I don't know how to do what you
want to do, and I recommend that you ask on the mailing list
21:17 < exch> so far the PCRE lib is holding up nice.
21:17 -!- MrTopf [n=mrtopf@p5B3D6F33.dip.t-dialin.net] has joined #go-nuts
21:17 < hector> well, currently i believe 8c converts a reference to an
extern register to something like 0(gs)
21:17 -!- bquinn [n=bquinn@dip5-fw.corp.ukl.yahoo.com] has quit []
21:18 < hector> 8c/txt.c line 452?
21:18 < dho> m is stored in gs
21:18 < dho> 0(gs)
21:18 < hector> well on windows we can't use gs
21:19 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has joined
#go-nuts
21:19 < hector> windows provides tls storage in fs
21:19 -!- Zaba_ [n=zaba@about/goats/billygoat/zaba] has joined #go-nuts
21:19 < hector> specifically, location 0x2c(fs)
21:19 < hector> its 4 bytes
21:19 < hector> so, not enough room for both g and m
21:20 < hector> hence, the extra level of indirection
21:20 < hector> my strategy is to put the address of tls[0] in 0x2c(fs)
21:20 -!- myw [n=myw@dhcp-18-111-16-53.dyn.mit.edu] has left #go-nuts []
21:20 -!- myw [n=myw@dhcp-18-111-16-53.dyn.mit.edu] has joined #go-nuts
21:20 -!- myw [n=myw@dhcp-18-111-16-53.dyn.mit.edu] has left #go-nuts []
21:20 -!- dsp_ [n=dsp@lebesgue.cowpig.ca] has left #go-nuts []
21:21 -!- brunov [n=bruno@190.191.110.64] has left #go-nuts ["Ex-Chat"]
21:21 < hector> at the moment i'm crashing at mallocinit()
21:21 -!- g0bl1n [n=anonymou@a213-22-237-39.cpe.netcabo.pt] has joined #go-nuts
21:21 < hector> when it sets m->mcache
21:22 < dho> ah ok
21:22 -!- RayNbow [i=kirika@scientia.demon.nl] has joined #go-nuts
21:22 -!- nacmartin [n=chatzill@77.224.92.149] has joined #go-nuts
21:22 -!- alexf [n=alexf@c-71-205-224-173.hsd1.mi.comcast.net] has joined #go-nuts
21:23 < hector> when i look in a debugger it seems there's some garbage just
before it does MOVL AX, A8(CX), where CX is presumably loaded with m
21:23 < hector> at that point, CX is zero
21:23 -!- JSharpe [n=jamie@5ad1d7f1.bb.sky.com] has joined #go-nuts
21:23 -!- mesenga [n=cbacelar@20150131219.user.veloxzone.com.br] has quit [Read
error: 104 (Connection reset by peer)]
21:23 -!- migomipo [n=kvirc@84-217-12-180.tn.glocalnet.net] has quit ["When two
people dream the same dream, it ceases to be an illusion.  KVIrc 3.4.2 Shiny
http://www.kvirc.net"]
21:23 < hector> i assume the garbage is some instruction generated to load
CX with 4(GS)
21:24 < hector> what i would like to generate here is MOVL 0x2c(FS), CX;
MOVL 4(CX), CX
21:25 -!- hipe [n=hipe@static-64-61-115-26.isp.broadviewnet.net] has joined
#go-nuts
21:25 -!- travisbrady [n=tbrady@67-207-96-194.static.wiline.com] has quit []
21:25 -!- flyfish [n=flyfish@pixout.appriss.com] has joined #go-nuts
21:25 -!- KillerX [n=anant@gentoo/developer/KillerX] has quit ["Leaving."]
21:25 < hector> so, have i explained my problem clearly?
21:26 -!- asyncster [n=asyncste@206.169.213.106] has joined #go-nuts
21:26 < hector> iant: i can't use syscalls on Windows because the syscall
numbers change from version to version
21:27 -!- travisbrady [n=tbrady@67-207-96-194.static.wiline.com] has joined
#go-nuts
21:27 < asyncster> out of curiosity, how is gofmt built?  does it use some
other open source program?
21:27 -!- ejb [n=ejb@unaffiliated/ejb] has quit [Read error: 110 (Connection timed
out)]
21:28 < asyncster> nvm..  i guess it's written in go
21:28 < sladegen> asyncster: you kidding?
21:28 -!- Zaba [n=zaba@about/goats/billygoat/zaba] has quit [Connection timed out]
21:28 < sladegen> too late
21:30 -!- ejb [n=ejb@unaffiliated/ejb] has joined #go-nuts
21:30 -!- napsy_ [n=luka@88.200.96.14] has quit [Read error: 131 (Connection reset
by peer)]
21:31 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has quit []
21:32 < Dunkelstern> how can i define a const array of bytes in go?
21:32 -!- lolsuper_ [n=super_@unaffiliated/lolsuper-/x-9881387] has joined
#go-nuts
21:33 < Dunkelstern> something like const char[] = { 0xff, 0x00, 0xff }; of
c in go
21:34 < sladegen> Dunkelstern: strings are immutable.
21:34 -!- pure_x01 [n=pure@c83-248-3-188.bredband.comhem.se] has joined #go-nuts
21:34 < Dunkelstern> sladegen, but how to build one out of hex values,
ignoring utf8 on purpose
21:34 < sladegen> and they are basically arrays of unit8, at least for now.
21:34 -!- timmcd [n=Adium@97-117-100-106.slkc.qwest.net] has joined #go-nuts
21:35 -!- napsy [n=luka@88.200.96.14] has joined #go-nuts
21:35 < sladegen> uint8*
21:35 < Clooth> night noobs.  <3
21:35 < pure_x01> Where can i read more about the C binding feature ..  i do
not find it in Effective Go or language spec . ?
http://golang.org/doc/go_faq.html#Do_Go_programs_link_with_Cpp_programs
21:35 -!- HerrTopf [n=mrtopf@p5B3D6F33.dip.t-dialin.net] has joined #go-nuts
21:36 < Dunkelstern> sladegen, ok i think i know what you mean, i'll try
something
21:36 < banthar> pure_x01: misc/cgo
21:36 < pure_x01> banthar: thanx
21:36 < exch> pure_x01: may also help to just look at some of the libraries
already wrapped.  http://go-lang.cat-v.org/library-bindings
21:37 -!- fhs [n=fhs@pool-72-89-203-117.nycmny.east.verizon.net] has joined
#go-nuts
21:38 -!- broo [n=estabroo@97-116-179-177.mpls.qwest.net] has left #go-nuts
["Client exiting"]
21:38 < pure_x01> exch: a very nice..  and a nice webpage thnx
21:38 < purefusion> didn't Google recently release a new kind of output
compression?  (gzip replacement or the like)
21:38 < pure_x01> is there support in Go for having plugins..  dynamically
extending an application in runtime ?
21:39 < sladegen> Dunkelstern: you can always use closures to seal anything
you want.
21:39 -!- codehai [n=codehai@xdsl-78-34-46-174.netcologne.de] has quit [Client
Quit]
21:40 < exch> pure_x01: it doesnt have runtime loading/compiling of code.
There is a go parser in the packages, so the closest thing you could get is a
script like setup
21:41 < hector> i'm thinking i should somehow 'patch' the instruction during
the linker phase, maybe in patch()?
21:42 -!- aho [n=nyamo@f051163126.adsl.alicedsl.de] has quit [Read error: 104
(Connection reset by peer)]
21:42 < pure_x01> exch: oh ok i see..  and i guess it would be possible to
load C "plugins" by using the C binding stuff
21:43 < exch> probably
21:43 < dho> hector: I'd ask russ about that; he's likely to know.
21:43 < Dunkelstern> sladegen, my problem is the following: i have some
binary data that i want to hardcode into a go program, it may be a constant value
as it is never changed at runtime.  In C i would write const char c[] = { 0x00,
0xff, 0x00 }; how to do that in go?  tried const c = [...]byte{0x00, 0xff, 0x00}
but that leads to an error 'const initializer must me constant' but it is
21:44 < hector> dho: ok.  shame he doesn't frequent irc
21:44 -!- pure_x01 [n=pure@c83-248-3-188.bredband.comhem.se] has quit ["Ex-Chat"]
21:44 < timmcd> To add to a slice: myslice.push(item); ?
21:45 -!- djanderson [n=dja@hltncable.pioneerbroadband.net] has joined #go-nuts
21:45 -!- wobsite [n=wobsite_@140.232.177.79] has joined #go-nuts
21:46 -!- timmcd [n=Adium@97-117-100-106.slkc.qwest.net] has quit ["Leaving."]
21:46 < dho> he's very responsive to email
21:47 -!- simonz05 [n=simon@143.84-49-89.nextgentel.com] has quit ["Ex-Chat"]
21:48 < Amaranth> Dunkelstern: Did you give a fixed size?  If not you don't
get an array you get a slice
21:48 -!- Cyprien [n=Cyprien@96-28.3-85.cust.bluewin.ch] has quit [Read error: 110
(Connection timed out)]
21:48 < Dunkelstern> Amaranth, you mean sth like [3]byte{...}?
21:49 < Amaranth> Dunkelstern: right
21:49 < Dunkelstern> Amaranth, same error message
21:49 < Amaranth> *shrug*
21:49 < Amaranth> worth a shot
21:50 -!- aa [n=aa@r190-135-186-24.dialup.adsl.anteldata.net.uy] has joined
#go-nuts
21:50 < banthar> Dunkelstern: do you need the array constant?  im not sure
if that's supported
21:50 < KirkMcDonald> I don't believe arrays can be "const".
21:50 < Dunkelstern> i think it doesn't allow the 'byte' conversion in an
const initializer somehow...
21:50 < KirkMcDonald>
http://golang.org/doc/go_spec.html#Constant_expressions
21:50 < Dunkelstern> if i don't write const i'll get a syntax error
21:51 < KirkMcDonald> Bools, numbers, and strings are permitted as const
values.  Nothing else, which means no arrays.
21:51 -!- hugov [n=hugov@sjc237n225.joh.cam.ac.uk] has quit []
21:52 < Dunkelstern> ok, then it is: how to build a const string from hex
values
21:52 < KirkMcDonald> "\x00\xff\x00"
21:53 < Dunkelstern> ok...  must have been blind...  but that's not very
pretty :P
21:53 < engla> but it's the usual way to do it
21:54 -!- MrTopf [n=mrtopf@p5B3D6F33.dip.t-dialin.net] has quit [Read error: 110
(Connection timed out)]
21:55 < Dunkelstern> if i slice that string, does it interpret it as utf8 or
just byte by byte?  for example if i write const c = "\x00\xff\x00"; c[1]...
21:55 -!- dacc [n=dan@D-128-95-10-176.dhcp4.washington.edu] has joined #go-nuts
21:56 < KirkMcDonald> Dunkelstern: Indicies refer to bytes.
21:56 < Dunkelstern> ok thanks, that was it...  off to work :)
21:56 -!- mxpxpod [n=bryan@unaffiliated/mxpxpod] has joined #go-nuts
21:57 < banthar> Dunkelstern: string([]byte{'h', 'e', 43, 32, 'o'}) works
too
21:57 < mxpxpod> is there a way to make a multi-file cgo library?
21:57 < mxpxpod> whenever I try, I get declaration errors
21:58 -!- drusepth [n=drusepth@adsl-76-194-201-39.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
21:59 -!- gvllada_ [n=gvllada@cable-89-216-227-60.dynamic.sbb.rs] has joined
#go-nuts
21:59 < Dunkelstern> banthar, oh cool, that's better readable if you want to
have comments for the different values in that blob
21:59 -!- drusepth` [n=drusepth@adsl-76-194-201-39.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
22:00 < hector> dho: are a thread's g or m ever set from c code?
22:00 -!- vhost-_ [n=kyle@kyleterry.com] has joined #go-nuts
22:01 < Dunkelstern> banthar, but it cannot be a const then
22:01 -!- mashbridge [n=mashbrid@nat/google/x-juqujhorpphhdxkt] has joined
#go-nuts
22:02 -!- Freakzoid [n=Freakzoi@1503026015.dhcp.dbnet.dk] has joined #go-nuts
22:02 -!- gnuvince [n=vince@64.235.207.47] has quit [Remote closed the connection]
22:03 -!- gnuvince [n=vince@64.235.207.47] has joined #go-nuts
22:03 < banthar> Dunkelstern: string isn't either, you just don't see the
pointer
22:04 -!- gkmngrgn [n=gkmngrgn@unaffiliated/gkmngrgn] has joined #go-nuts
22:05 -!- teedex [n=teedex@204.14.155.161] has quit ["Leaving..."]
22:06 < Dunkelstern> banthar, something is wrong with the
string([]byte{...}) version i get error messages of the initializer not beeing
constant, if i let go the const i get a syntax error again (even with := then)
22:06 -!- skyyy [i=caw@129.21.116.238] has joined #go-nuts
22:07 < wobsite> I'm a little confused about how go includes work.
22:08 < Dunkelstern> is it just me beeing slow on the uptake (or is it just
to late in the day) or what don't i get correctly now
22:08 < alexsuraci> why is it that imports must be wrapped in quotes,
despite package names being unquoted?  is it just because they're file-based and
not package-name-based?
22:08 < KirkMcDonald> wobsite: Imports.
22:08 < Dunkelstern> alexsuraci, i think it is because filenames could in
theory contain spaces
22:08 < KirkMcDonald> wobsite: When you import something in Go, you are
importing a package.
22:08 < Amaranth> Ok, I've come to the conclusion there is no valid
replacement for the select() function in C
22:09 < wobsite> KirkMcDonald: that much I understand.  here's the problem:
22:09 -!- g0bl1n [n=anonymou@a213-22-237-39.cpe.netcabo.pt] has quit []
22:09 < wobsite> I have two source files in the same package.  one of them
uses functions in the other, and it currently can't find them
22:09 < wobsite> what do I need to do to get it to see them?
22:10 < KirkMcDonald> wobsite: If two source files are in the same package,
their contents will automatically be visible to each other.
22:10 < Amaranth> Or perhaps the real problem is that calling Read on a TCP
connection doesn't block so my for loop spins like mad
22:10 < Amaranth> Either way, I'm stuck :/
22:10 < KirkMcDonald> wobsite: You have to compile them at the same time: 6g
-o foo.6 first.go second.go
22:10 -!- prefrontal [n=prefront@mist.colorado.edu] has quit [Read error: 113 (No
route to host)]
22:10 < alexsuraci> Dunkelstern: don't see why they couldn't just be based
on package names (granted it would change for things like import "./foo")
22:10 < alexsuraci> makes it a bit more consistent
22:11 -!- rog [n=rog@89.240.185.200] has quit []
22:11 -!- prefrontal [n=prefront@mist.colorado.edu] has joined #go-nuts
22:11 < Gracenotes> but separate packages don't have to be compiled at the
same time
22:11 < Dunkelstern> alexsuraci, but you have to open each and every file to
search for the package name then because the filename != packagename
22:11 < KirkMcDonald> wobsite: The first part of this section describes this
behavior: http://golang.org/doc/go_spec.html#Declarations_and_scope
22:11 < Gracenotes> (just linked at the same time.  barring any sort of
future experiments with dynamic linking)
22:11 < wobsite> I'll have a look at that, thanks
22:12 < Null_> ;
22:12 < Gracenotes> o
22:12 < nbaum> )
22:13 < KirkMcDonald> wobsite: In particular, note how there is both a file
block and a package block.  The things you declare at the top level of a source
file end up in the package block.
22:13 < KirkMcDonald> wobsite: (And imports end up in the file block, which
is why one file's imports aren't visible from other files.)
22:13 -!- wcn [n=wcn@74.125.57.33] has quit []
22:14 < wobsite> yeah; I just needed to compile them together.  I was trying
to compile the two files as separate object files.
22:14 < Amaranth> oh, read was blocking I just popped the value off my quit
channel so all the goroutines weren't seeing it
22:14 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts
22:14 < KirkMcDonald> wobsite: I wrote a blog post of the subject of
compilation:
http://kirkmcdonald.blogspot.com/2009/11/on-compilation-of-go-packages.html
22:14 < Amaranth> And I was spinning in my function that handles data from
the goroutines by including a default case in my select {}
22:14 < wobsite> KirckMcDonald : I may look into that
22:15 < Amaranth> So maybe go's select can be used as a replacement for
select() but it's somewhat annoying to do
22:15 < mxpxpod> is there a way to make a multi-file cgo library?
22:15 -!- madhatter09 [n=wvicente@187.34.148.55] has joined #go-nuts
22:16 -!- amacleod [n=amacleod@c-24-34-33-96.hsd1.ma.comcast.net] has quit ["Bye
Bye"]
22:17 -!- drusepth [n=drusepth@adsl-76-194-201-39.dsl.spfdmo.sbcglobal.net] has
quit [Read error: 110 (Connection timed out)]
22:17 < nbaum> import foo.bar.baz; foo.bar.baz.DoSomething(); would make me
happier.
22:19 -!- Lorthirk [n=cm0901@109.114.84.99] has quit [Remote closed the
connection]
22:19 < nbaum> import "foo/bar/baz"; foo.bar.baz.DoSomething(); if I must.
As it stands, it seems as though somebody forgot what directories are for.
22:20 -!- franksalim [n=frank@adsl-76-221-202-115.dsl.pltn13.sbcglobal.net] has
joined #go-nuts
22:21 < hector> haha, the patch works to get past mallocinit()!
22:23 * exch added Replace() to the strings package
22:23 < exch> seems a bit odd that it wasn't in there
22:23 < Dunkelstern> yay first printer driver in go...  (i think) Brother
QL560/QL580
22:24 < exch> hehe cool
22:24 < Dunkelstern> just wrote that for my first go program
22:24 < Amaranth> wha?
22:24 < nbaum> I already have drivers for my printer.
22:24 < Dunkelstern> needed something to get that thing working with cups
22:25 < Dunkelstern> ok one bug: printout is mirrored...  but that should be
no problem
22:26 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has quit ["KVIrc
Insomnia 4.0.0, revision: , sources date: 20090520, built on: 2009/06/06 11:44:47
UTC http://www.kvirc.net/"]
22:26 < Dunkelstern> and it seems i can not use 'flag' as thought by default
as it is a bit inflexible, but that should be no real problem :)
22:27 < exch> does it interpret postscript or does the printer handle that?
22:27 < Dunkelstern> no it receives rastered data from cups and just
reformats it and adds headers for that specific printer
22:27 -!- HerrTopf [n=mrtopf@p5B3D6F33.dip.t-dialin.net] has quit [Connection
timed out]
22:27 < exch> ah
22:28 < Dunkelstern> not really fancy but very short if you compare that
with the c program
22:28 -!- gvllada_ [n=gvllada@cable-89-216-227-60.dynamic.sbb.rs] has quit
["Ex-Chat"]
22:28 -!- MrTopf [n=mrtopf@p5B3D6F33.dip.t-dialin.net] has joined #go-nuts
22:28 < exch> nice way to get to grips with go
22:29 < Dunkelstern> 118 lines of code, c version is about 4 times that big
22:29 -!- nmichaels [n=nathan@dhcp-0-50-ba-58-39-ed.cpe.townisp.com] has joined
#go-nuts
22:29 -!- MrTopf [n=mrtopf@p5B3D6F33.dip.t-dialin.net] has quit [Remote closed the
connection]
22:29 -!- Arhuaco [n=n@186.80.240.243] has joined #go-nuts
22:30 < nmichaels> Is there a way to pass tuples (preferably with different
types) through channels?
22:30 < travisbrady> Dunkelstern: can I peek at the source?  i've never seen
a printer driver's code
22:30 < Dunkelstern> go is cool, needs more library bindings though.  Is
there a list of who works on what bindings?  i've seen cairo on the mailing list
22:30 -!- MrTopf [n=mrtopf@p5B3D6F33.dip.t-dialin.net] has joined #go-nuts
22:30 < KirkMcDonald> nmichaels: chan []interface{}
22:30 < Rob_Russell> cairo bindings would be nice
22:30 < nmichaels> ahhh, thanks Kirk
22:31 < Dunkelstern> travisbrady, that specific printer is very simple, some
escape sequences for paper size and stuff and then simply a monochrome bitmap with
3 bytes line headers
22:31 < nmichaels> I get all wrapped up in new features that I forget about
other features.
22:31 -!- Guest78766 [n=luka@88.200.96.14] has quit [Read error: 60 (Operation
timed out)]
22:31 -!- nmichaels [n=nathan@dhcp-0-50-ba-58-39-ed.cpe.townisp.com] has left
#go-nuts []
22:32 < Dunkelstern> travisbrady, if i get all things working and cleaned up
the code i'll publish it somewhere, its kind of proof of concept currently
22:32 < exch> If everyone in this channel delivers at least 1 binding of
some library, it'll go a long way to giving us a nice codebase :)
22:33 < uriel> exch: haha
22:33 < exch> I did mine :p
22:33 * exch sits back and eats popcorn
22:33 < uriel> exch: which one did you do?  (sorry, my memory sucks)
22:33 -!- gasreaa [n=atwong@nat/slide/x-onxymleslbamgiov] has quit ["Leaving."]
22:33 < Dunkelstern> exch, i'll go for jpeg and gif then :)
22:33 < exch> uriel, yuo'll hate me for this, but i did PCRE :)
22:33 -!- gasreaa [n=atwong@nat/slide/x-gdmiahzjxysrceep] has joined #go-nuts
22:34 < uriel> exch: oh, but I thought you said you wrote it from scratch,
not that you had done bindings..
22:34 < exch> Dunkelstern: libjpeg would be cool.  libPNG as well
22:34 < Dunkelstern> png is there
22:34 < exch> lol nope
22:34 < exch> oh cool
22:34 < uriel> exch: link?
22:34 < Dunkelstern> is there a xml parser?
22:34 < uriel> I'll add it to http://go-lang.cat-v.org/library-bindings
22:34 < uriel> Dunkelstern: yes
22:35 < uriel> Dunkelstern: see xml pkg
22:35 < exch> can you wrap up libgif just like that?  I vaguely remember
there being some copyright or patent issues
22:35 < uriel> (although I expect it to suck, as all xml parsers suck)
22:35 < Dunkelstern> cool, just a gui lib missing then :)
22:35 < uriel> Dunkelstern: there are sdl and allegro bindings, see the link
I pasted
22:35 < exch> uriel: http://github.com/jteeuwen/go-pkg-pcre
22:35 < Dunkelstern> exch, i think that went extinct some years ago
22:35 < exch> goodie
22:37 < wobsite> ls
22:37 < wobsite> oops, wrong window
22:37 < Dunkelstern> uriel, i thought something fltk, qt or gtk for fast gui
creation, sdl and allegro are too lowlevel for me
22:38 < uriel> tk bindings would be nice, it is the least insane portable
toolkit out there..
22:38 < Dunkelstern> but that would be a big project
22:38 < exch> I considered starting with wxWidgets, but when I saw the
codebase for it I panic()'d
22:38 < uriel> wxWidgets is awful
22:38 < Dunkelstern> we would need something like swig for automating such
bindings
22:39 < uriel> Dunkelstern: IIRC they are working on swig (or something like
it)
22:39 -!- MrTopf [n=mrtopf@p5B3D6F33.dip.t-dialin.net] has quit [Connection timed
out]
22:40 -!- gasreaa [n=atwong@nat/slide/x-gdmiahzjxysrceep] has quit [Read error: 54
(Connection reset by peer)]
22:40 -!- gasreaa [n=atwong@nat/slide/x-ypnectyxweplbswg] has joined #go-nuts
22:40 < Dunkelstern> uriel, but that was the other way round, wasn't it?
including go as 'scripting' language into another language
22:42 < Gracenotes> uriel: you wrote the online go compiler?
22:42 -!- gasreaa [n=atwong@nat/slide/x-ypnectyxweplbswg] has quit [Client Quit]
22:43 -!- gasreaa [n=atwong@nat/slide/x-frxlhtxabxsiskgp] has joined #go-nuts
22:43 -!- gasreaa [n=atwong@nat/slide/x-frxlhtxabxsiskgp] has left #go-nuts []
22:43 < Gracenotes> with its jquery-y goodness?
22:44 < sergio> is there an online go compiler?
22:44 -!- wobsite [n=wobsite_@140.232.177.79] has quit ["Leaving"]
22:44 < Gracenotes> well, an interface, apparently
22:44 < exch> it's a bit boring.  It doesn't let you do creepy filesystem
i/o :p
22:44 < Dunkelstern> perhaps the fox toolkit would be a candidate for go
bindings http://www.fox-toolkit.org/ seems to be pretty "small"
22:45 -!- gasreaa [n=atwong@nat/slide/x-ycdvuwwktmaunaqd] has joined #go-nuts
22:46 < mat_> hum, is there a vim syntax for go ?
22:47 < sergio> where is it, Gracenotes?  (the interface)
22:47 < sladegen> mat_: src/misc/vim
22:47 < alexsuraci> mat_: /misc
22:47 < Gracenotes> via reddit http://gofmt.com/compile.html
22:47 < mat_> ok, that was easy 0:-)
22:47 < sergio> thank you
22:48 -!- Adys [n=Adys@unaffiliated/adys] has quit ["I ♥ Unicode"]
22:49 -!- rbohn [n=rbohn@192.206.100.4] has quit [Remote closed the connection]
22:50 -!- nmichaels [n=nathan@dhcp-0-50-ba-58-39-ed.cpe.townisp.com] has joined
#go-nuts
22:50 -!- Cyprien [n=Cyprien@49-197.77-83.cust.bluewin.ch] has joined #go-nuts
22:50 < mat_> ok, so, I now have go on my freebsd, nice 0:-)
22:51 < uriel> Gracenotes: me?  no, I didn't write any such thing
22:51 < nmichaels> Is there a way to get a tcp.Listener to listen on
multiple addresses or all addresses on a given interface?  I'd like my server to
answer requests on 10.0.0.x and localhost at the same time.
22:52 < uriel> Gracenotes: I just posted it to http://reddit.com/r/golang/
22:52 < Dunkelstern> nmichaels, if it follows unix style just listen to
0.0.0.0 that includes all interfaces
22:52 < nmichaels> er, by tcp.listener I meant net.listener
22:52 < Dunkelstern> nmichaels, but i am not sure
22:52 < nmichaels> Dunkelstern: cool...lemme try that.
22:53 < nmichaels> Yep, that worked.
22:53 < XniX23> nice one uriel :o
22:54 -!- Nanooo [n=Nano@95-89-198-15-dynip.superkabel.de] has quit [Client Quit]
22:54 < nmichaels> So now my question becomes "Is there a way to limit a
net.Listener to a specific set of addresses and/or physical interfaces?"
22:54 -!- rbohn [n=rbohn@192.206.100.4] has joined #go-nuts
22:54 -!- dinx [n=dinx@CPE-58-175-97-189.vic.bigpond.net.au] has joined #go-nuts
22:56 < Dunkelstern> nmichaels, i don't think so if you want more control
you have to do it by hand
22:57 < Dunkelstern> btw: is there an official twitter tag for go?  #golang
?
22:57 < nmichaels> Dunkelstern: Does "by hand" mean create a listener for
every address I care about?
22:57 < rbohn> #go is pointless on twitter.
22:58 -!- flyfish [n=flyfish@pixout.appriss.com] has quit []
22:58 -!- wcn [n=wcn@80-219-150-87.dclient.hispeed.ch] has joined #go-nuts
22:58 -!- triddell [n=tim@207-191-198-64.cpe.ats.mcleodusa.net] has joined
#go-nuts
22:58 < Dunkelstern> nmichaels, i didn't use the listener myself yet, but if
it follows unix in some way (which i think) you will have to run listeners for
each and every address
22:58 -!- raichoo [n=raichoo@i577BBDFB.versanet.de] has quit
["http://raichoo.blogspot.com"]
22:59 < nmichaels> Dunkelstern: okay, thanks.
23:00 < uriel> rbohn: #golang
23:00 < Dunkelstern> nmichaels, as i can read from the source there is no
possibility to set multiple addresses for a listener
23:01 < Dunkelstern> go is pointless on google too
23:01 < nmichaels> Dunkelstern: Yeah, that's what I gathered.  I was hoping
maybe there was an obscure module I didn't see.
23:03 < uriel> Dunkelstern: http://go-lang.cat-v.org/go-search
23:04 -!- rndbot [n=bot@wikipedia/Gracenotes] has joined #go-nuts
23:04 < Gracenotes> okay, I think the bot's reasonably ready \o/
23:05 < reppie> is a go program ever supposed to segfault?
23:05 < Dunkelstern> uriel, that does not fix the problem when i write about
it in my blog :)
23:05 -!- asmo_ [n=asmo@85.224.197.246] has quit [Remote closed the connection]
23:05 < Dunkelstern> Gracenotes, what can it do?
23:06 < gl> reppie: i made some go program often segfault already
23:06 < gl> programs*
23:06 < reppie> gl me too
23:06 < Gracenotes> I think it does a core dump, but not an actual segfault
23:06 < reppie> it gets a SIGSEGV
23:06 < Gracenotes> Dunkelstern: evaluate things!  :)
23:06 -!- brrant [n=John@65-102-193-77.hlrn.qwest.net] has quit ["Leaving"]
23:06 < Gracenotes> ah, mm, takes a (somewhat) more elegant way out
23:06 < uriel> Dunkelstern: that reminds me, I got to start a Go Planet
23:07 < Dunkelstern> uriel, that would be cool
23:08 < uriel> need a good name for it..
23:09 -!- sadjester [n=sadjeste@216-54-231-66.static.twtelecom.net] has quit []
23:09 -!- wcn_ [n=wcn@74.125.121.49] has joined #go-nuts
23:09 < Dunkelstern> damn...  the irc logs on the go-lang page crashed my
browser...  a bit long :P
23:10 -!- wcn_ [n=wcn@74.125.121.49] has quit [Client Quit]
23:11 < uriel> Dunkelstern: the old ones?  yes, they are like 3mb!
23:11 < uriel> (that is why I started to split it into one log per day
23:11 < Gracenotes> Dunkelstern:
23:12 -!- mashbridge [n=mashbrid@nat/google/x-juqujhorpphhdxkt] has quit []
23:12 < Dunkelstern> whoa my laptop got too hot for my lap...  have to
search a table...  just a moment
23:12 < Gracenotes> > race := make(chan int); var sec int64 = 1000000000;
for i := 1; i <= 5; i++ { go func(self int) { time.Sleep(sec); race <- self;
}(i); }; fmt.Print(<-race, " won")
23:12 < rndbot> 5 won
23:12 < Dunkelstern> lol
23:13 < nmichaels> nice
23:13 < Gracenotes> it might be useful to have around.  written entirely in
Go
23:13 < nmichaels> > fmt.Print("I have goSmarts")
23:13 < rndbot> I have goSmarts
23:13 < Gracenotes> (danderson said it should be fine)
23:13 < nmichaels> fancy
23:13 <+danderson> I say what?
23:13 <+danderson> oh, the bot
23:13 <+danderson> yeah
23:13 < Gracenotes> :)
23:14 < Gracenotes> I think it's reasonably stable
23:14 <+danderson> well, congrats on "launching" :)
23:14 < reppie> > h := int[] { 1 }; fmt.Printf("%d\n", h[5]);
23:14 < rndbot> <Error: syntax error near int, empty top-level
declaration>
23:14 < Dunkelstern> does it compile the code or is that the interpreter?
23:14 < reppie> > h := []int { 1 }; fmt.Printf("%d\n", h[5]);
23:14 < rndbot> SIGTRAP: trace trap Faulting address: 0x0 PC=0x804886f
main·main+0x6f /tmp/uhvitbvagwgumkjugen.go:4 main·main() mainstart+0x...
23:14 < Gracenotes> compiles it
23:14 < Gracenotes> heh, you killed it :)
23:15 <+danderson> the bot, or the program?
23:15 < Gracenotes> also, to wrap things in a print, @eval 2+2, for example
23:15 -!- dinx [n=dinx@CPE-58-175-97-189.vic.bigpond.net.au] has quit [Read error:
110 (Connection timed out)]
23:15 < Gracenotes> the program
23:15 <+danderson> > fmt.Printf("I'm not quite dead!");
23:15 -!- franksalim [n=frank@adsl-76-221-202-115.dsl.pltn13.sbcglobal.net] has
quit [Read error: 104 (Connection reset by peer)]
23:15 < rndbot> I'm not quite dead!
23:15 < uriel> Gracenotes: awesome
23:15 < KragenSitaker> Gracenotes: AWESOME
23:15 < nmichaels> You should keep him in another channel too for when
people start going nuts.
23:15 < reppie> go nuts
23:15 <+danderson> it's in #go-run iirc
23:15 < uriel> > fmt.Printf("Go Nuts!")
23:15 < nmichaels> ah, good deal
23:15 < rndbot> Go Nuts!
23:15 < Gracenotes> yep, it is.  #go-run
23:16 < uriel> nice
23:16 < Dunkelstern> > for i:=0;i<5;i++ { fmt.Printf("Flood\n"); }
23:16 < rndbot> Flood Flood Flood Flood Flood
23:16 < uriel> haha
23:16 < nmichaels> Ooh, strippage of newlines.
23:16 < Gracenotes> It's just running off of my laptop at the moment
23:16 < uriel> Gracenotes: let me know if you need a server to run it
23:17 < Dunkelstern> what does it import for default?  just fmt?
23:17 < rbohn> >a,b,c := net.HostLookup("www.golang.org"); fmt.Print(a,b)
23:17 < Gracenotes> uriel: sure :) it does it its own modified compiler that
tries to strip out some nasties, but I really should use something like ptrace, as
danderson suggested
23:18 < WalterMundt> heh
23:18 < olegfink> Gracenotes: gc or gccgo?
23:18 < Gracenotes> it has a file of things that can be imported..  just a
sec
23:18 < uriel> Gracenotes: or perhaps run it inside nacl or vx32...
23:18 < Gracenotes> 8g, sadly
23:18 < reppie> Gracenotes sounds like a recipe for disaster
23:18 < olegfink> (or is the official gc name 'keng'?  :-))
23:18 -!- ahasver [n=st0rm@85.94.99.40] has joined #go-nuts
23:19 < uriel> olegfink: 'gc', which is a bit confusing IMHO, oh well :)
23:19 < Gracenotes> reppie: heh.  I'm pretty sure things are stable, and it
is in a VM (so minimal damage with leakage)
23:19 -!- sockmonk [n=user@pixout.appriss.com] has quit [Success]
23:20 < Gracenotes> here's the list of what it thinks it allows, although
I'm sure people will find devious ways around it:
http://gopaste.org/raw?paste=1KVgU
23:20 < Dunkelstern> Gracenotes, thats bad...  now i want to find something
cool for the bot, but there comes nothing to my mind
23:21 < Dunkelstern> Gracenotes, you are sure you want io and os in that
list/
23:21 <+danderson> if you want to try breaking the bot, be Gracenotes'
guest, but in #go-run please
23:22 <+danderson> don't spam here with l33t h4x attempts :)
23:22 <+danderson> if you do break it though, explain here how you did it :)
23:22 < Dunkelstern> :P
23:22 < Gracenotes> that's where the horrible hack of editing
$GOROOT/src/pkg came in, hopefully replaced with something more sane.  do try to
break it, though, I should be fine :)
23:23 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
quit [Read error: 113 (No route to host)]
23:23 -!- rndbot [n=bot@wikipedia/Gracenotes] has quit [Remote closed the
connection]
23:23 -!- pierron [n=pierron@91-164-249-116.rev.libertysurf.net] has left #go-nuts
[]
23:24 < ahasver> hello all..are there any programs written in this go
language?
23:24 -!- rndbot [n=bot@wikipedia/Gracenotes] has joined #go-nuts
23:24 -!- mashbridge [n=mashbrid@nat/google/session] has joined #go-nuts
23:25 < uriel> ahasver: yes, quite a few, many included with the go
distribution, and a few others by other people
23:25 < nmichaels> ahasver: Check out the hg repository.  There are some
reasonably sized examples in there.
23:25 < uriel> btw, everyone remember to vote for this:
http://code.google.com/p/googleappengine/issues/detail?id=2382 ;)
23:25 < exch> ahasver: nope.  none.  we are just here to talk about politics
and the weather
23:25 < ahasver> exch, youve got a nice sense for humor
23:25 < nmichaels> I hate it when it rains on libertarians!
23:26 < ahasver> but im more interested in instaling this on windows
23:26 < ahasver> if it is possible?
23:26 < uriel> not yet
23:26 -!- wcn [n=wcn@80-219-150-87.dclient.hispeed.ch] has quit [Read error: 110
(Connection timed out)]
23:26 < ahasver> will be?
23:26 < uriel> yes
23:26 < ahasver> so, for now i can use it only ON: ____________
23:26 < ahasver> ?
23:26 -!- kjk1 [n=Adium@67.215.69.74] has joined #go-nuts
23:26 < uriel> but now you can play with go over irc, see #go-run ;)
23:26 < XniX23> linux
23:26 -!- Netsplit farmer.freenode.net <-> irc.freenode.net quits: roto,
vhost-_, shasbot, emit
23:26 < uriel> ahasver: linux, OS X, FreeBSD
23:26 < exch> linux, bsd, macos I think
23:27 < uriel> other ports are in the works
23:27 < ahasver> ubunti is ok?
23:27 < uriel> of course, you can just install linux on a VM on windows
23:27 < uriel> ahasver: yes
23:27 < ahasver> i have a few distributions of linux on my second PC
23:28 < ahasver> thats because of the free open source sense of the language
23:28 < ahasver> just linux for now
23:28 -!- Netsplit over, joins: roto
23:28 < ahasver> will it be needed to purchase if it is going to be ported
to win?
23:28 < clip9> probably not :P
23:28 < exch> that would be awesome, but I doubt it :)
23:29 -!- Netsplit over, joins: shasbot
23:29 < uriel> ahasver: there are people already working on a windows port
23:29 < uriel> (actually on a cygwin and a native port)
23:29 < uriel> Go is opensource, it is free everywhere
23:29 < ahasver> interesting
23:30 < ahasver> any dates for now?
23:30 * nmichaels pities the windows porters.
23:30 -!- rndbot [n=bot@wikipedia/Gracenotes] has quit [Remote closed the
connection]
23:30 < clip9> hrh
23:30 -!- KillerX [n=anant@145-116-234-40.uilenstede.casema.nl] has joined
#go-nuts
23:30 -!- sliceofpi [n=Adium@c-98-201-178-27.hsd1.tx.comcast.net] has quit [Read
error: 131 (Connection reset by peer)]
23:30 -!- hipe [n=hipe@static-64-61-115-26.isp.broadviewnet.net] has quit [Remote
closed the connection]
23:31 -!- sliceofpi [n=Adium@c-98-201-178-27.hsd1.tx.comcast.net] has joined
#go-nuts
23:31 < kmc> well a language is not open-source; an implementation is
23:31 -!- napsy [n=luka@88.200.96.14] has joined #go-nuts
23:31 < kmc> is there anything preventing someone from making a
non-open-source implementation of Go?
23:31 -!- rndbot [n=bot@wikipedia/Gracenotes] has joined #go-nuts
23:31 < reppie> kmc probably not
23:31 < uriel> kmc: good point
23:31 < reppie> > f, _ := os.Open("/proc/self/cmdline", os.O_RDONLY,
0600); d, _ := f.Stat(); fmt.Print(d.Size);
23:31 < jessta> kmc: just take the current code
23:31 < rndbot> SIGSEGV: segmentation violation Faulting address: 0x2c
PC=0x8048855 main·main+0x55 /tmp/sopumgeklrlkhskhgen.go:4 main·main()...
23:31 * reppie wonders what he's doing wrong :(
23:31 -!- rndbot [n=bot@wikipedia/Gracenotes] has quit [Remote closed the
connection]
23:32 -!- kjk1 [n=Adium@67.215.69.74] has quit [Read error: 54 (Connection reset
by peer)]
23:32 < ahasver> what do you think
23:32 < uriel> still, there are *two* implemenations, and one is GPL, and
the other is BSD licensed, I think it is safe to bet nobody will bother building a
closed-source implementation
23:32 < ahasver> will google
23:32 < Gracenotes> reppie: you're not doing much wrong, but f is nil
23:32 < kmc> i mean the case with C, C++, Java, etc.  is a variety of open
and non-open implementations
23:32 -!- kjk [n=Adium@67.215.69.74] has quit [Read error: 110 (Connection timed
out)]
23:32 < reppie> Gracenotes oh.
23:32 < ahasver> from now make its applications on Go language?
23:32 < kmc> uriel, there are GPL C compilers, and BSD C compilers, and a
lot of closed-source C compilers as well
23:32 < nmichaels> there isn't anything preventing someone from forking the
BSD licensed version of the compiler and trying to sell it for money...except that
they would lose at life.
23:32 < ahasver> and so, allow users to write apps for them?
23:32 -!- Meidor [n=quassel@cl-936.ams-05.nl.sixxs.net] has joined #go-nuts
23:32 < Gracenotes> reppie: except..  I need to find out why it keeps
crashing, probably some deference I forgot about
23:33 < uriel> kmc: ok, anyway, it is safe to bet there will always be a few
open source implemetnations
23:33 < kmc> ahasver, Google uses a lot of languages; Go would not even be a
suitable replacement for most of them
23:33 < reppie> > f, e := os.Open("/proc/self/cmdline", os.O_RDONLY,
0600); fmt.Print(f, e);
23:33 < ahasver> that is my point
23:33 < uriel> ahasver: allow?  google already allows you to do whatever you
like with go
23:33 < ahasver> what is the point of a language
23:33 < uriel> writte apps, port it, rewrite it, whatever
23:33 < uriel> ahasver: go to golang and read the docs
23:34 < ahasver> well, I thought that this is a good place to
23:34 < uriel> ahasver: and watch rob's presentation
23:34 < ahasver> discuss that anyway
23:34 < ahasver> Iam sorry if Iam bothering
23:34 < uriel> no, this is a place to discuss the language itself, it
assumes you have put some effort on understanding what it is about
23:34 < kmc> ahasver, is there some feature you don't see the point of?
23:34 < ahasver> well...i jump three steps at once :)
23:35 < ahasver> i wanted to see your oppionions guys
23:35 < ahasver> dont get me wrong
23:35 < XniX23> go is the way
23:35 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has quit []
23:35 < XniX23> here you go ;)
23:35 < ahasver> just getting informations
23:35 < jessta> ahasver: it's an experiment, the point is to experiement and
see what's a good soultion to current problems
23:35 < kmc> ahasver, how can we have opinions when you haven't asked a
decent question?
23:35 -!- emit [n=emit@unaffiliated/emit] has joined #go-nuts
23:35 -!- hipe [n=hipe@static-64-61-115-26.isp.broadviewnet.net] has joined
#go-nuts
23:35 -!- nmichaels [n=nathan@dhcp-0-50-ba-58-39-ed.cpe.townisp.com] has left
#go-nuts []
23:35 < kmc> the very general "what is it good for" is already answered in
the documentation
23:36 < ahasver> well, if youre awaiting for a question like
23:36 < kmc> if you find some specific bit of that that you'd like to
discuss, i'm sure people here would be glad to do so
23:36 < ahasver> "how to do this in go"
23:36 < ahasver> then youll have to wait
23:36 < ahasver> some time :)
23:36 < ahasver> that doesnt mean we cant be friends...hope so?
23:36 < XniX23> indeed, people are nice, they even help me
23:37 < uriel> XniX23: hahaha
23:37 < mxpxpod> is there a way to make a multi-file cgo library?
23:37 < kmc> in my opinion, Go is like C with one or two major design
changes, and a variety of smaller clean-up changes
23:37 < ahasver> here goes a decent question
23:37 < KirkMcDonald> kmc: And the interface mechanism.
23:38 < Dreamer3> what is the other go site with lots of info on it?
23:38 < KirkMcDonald> kmc: This isn't so much a design change as an entirely
new mechanism.
23:38 < Dreamer3> not golang
23:38 -!- rndbot [n=bot@wikipedia/Gracenotes] has joined #go-nuts
23:38 < Dunkelstern> Dreamer3, http://go-lang.cat-v.org/
23:38 -!- rndbot [n=bot@wikipedia/Gracenotes] has quit [Remote closed the
connection]
23:39 < olegfink> uriel: by the way, why the list of language bindings,
which is "done", is in "todo"?
23:40 < XniX23> guys anyone knows if someone is working on web framework or
smth?
23:40 -!- Meidor [n=quassel@cl-936.ams-05.nl.sixxs.net] has quit
["http://quassel-irc.org - Chat comfortably.  Anywhere."]
23:40 < uriel> olegfink: heh, sorry :))
23:41 < Freeaqingme> XniX23, I do s/o yes, but I got no further details
23:41 < uriel> the site is still a work in progress
23:41 -!- Meidor [n=quassel@cl-936.ams-05.nl.sixxs.net] has joined #go-nuts
23:41 -!- decriptor [n=decripto@137.65.132.26] has quit ["Ex-Chat"]
23:41 < XniX23> Freeaqingme: sorry for my bad english but what is s/o?
23:41 < olegfink> uriel: and I hope it'll continue to be, but that just
seems slightly illogical.  :-)
23:42 -!- kjk [n=Adium@67.215.69.74] has joined #go-nuts
23:42 -!- Ishmael [n=Ishmael@187.88.184.1] has quit [Read error: 104 (Connection
reset by peer)]
23:42 < jessta> XniX23: plenty of web related packages "template", "json",
etc.
23:42 < Freeaqingme> XniX23, s/o = someone (at least that's what I meant ;))
23:42 -!- hipe [n=hipe@static-64-61-115-26.isp.broadviewnet.net] has quit [Remote
closed the connection]
23:42 < ahasver> is go object oriented, no?
23:42 < jessta> ahasver: yes, but not the object orientated you're thinking
of
23:43 <+danderson> to paraphrase Spock: it's objects, jim, but not as you
know them.
23:43 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has joined
#go-nuts
23:43 < ahasver> jessta: can you explain me that?
23:43 < jessta> ahasver: watch the video, read the docs
23:44 < XniX23> jessta: yeah saw this, but im kinda looking for something
faster, thanks anyway; Freeaqingme: cool, if you get some info pm me ;)
23:44 < ahasver> jessta: tnx :>
23:44 < ahasver> p.s.  can you link me with the video
23:44 < XniX23> ahasver: you have structures in go, but you can write
methods for them
23:44 < triddell> ahasver: http://www.youtube.com/watch?v=rKnDgT73v8s
23:45 < kmc> OO is not about writing x.f(y) instead of f(x,y).  that's
syntax.
23:45 < ahasver> triddell: youre very kind
23:45 < kmc> OO is about polymorphism through interfaces and subclassing
23:45 < kmc> Go has the former but not the latter
23:45 < ahasver> it doenst have inheritage
23:45 < ahasver> of objects
23:45 < uriel> olegfink: it is illogical, working on it ;P
23:46 < kmc> ahasver, correct
23:46 <+danderson> ahasver: correct.  And that is a good thing.
23:46 <+danderson> see the video.
23:46 < kmc> you cannot cast between two struct types
23:46 < kmc> you can cast a struct up to an "interface" which describes a
subset of the methods that can be called on it
23:46 -!- decriptor [n=decripto@137.65.132.26] has joined #go-nuts
23:46 < Dunkelstern> it remembers me of lua sometimes :)
23:46 < ahasver> think i understand...
23:46 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has quit [Client
Quit]
23:46 < ahasver> but as we all know...inheritage was
23:46 < kmc> am i correct that you don't declare interface membership
anywhere?
23:47 < ahasver> the peak of C++
23:47 < ahasver> am I correct?
23:47 < kmc> it's automatic by virtue of implementing those methods?
23:47 < kmc> ahasver, i don't know what you mean
23:47 < kmc> C++ is a tremendously complicated language
23:47 < ahasver> i mean that was one of its most powerful weapons
23:47 < XniX23> danderson: did you mean a good thing that he answered
correct or that it doesnt have inheritance?  (and no, im not making fun of anyone)
23:47 < rbohn> > m, _ := hex.DecodeString("526f7365627564");
fmt.Print(string(m))
23:47 -!- sliceofpi [n=Adium@c-98-201-178-27.hsd1.tx.comcast.net] has quit
["Leaving."]
23:47 < kmc> ahasver, sure.  it's also often misused in C++>
23:47 <+danderson> XniX23: it's a good thing that the language doesn't have
inheritance
23:47 < kmc> C++ badly muddles the two very separate concepts of code reuse
and interface implementation
23:48 <+danderson> it's explained in Rob's tech talk: inheritance forces you
to organize your types in trees, and generally forces you to structure your
program in a certain way
23:48 <+danderson> Go interfaces are much more freeform, letting you
structure your program more naturally
23:48 < rbohn> Let's not forget multiprocessing.
23:48 < chrome> kmc: yes, just meet the interface, you don't have to declare
that you do.  That way if I write a new interface and ome method sets that work on
it, and your type already meets it, it'll work.
23:48 < ahasver> nice explained, danderson
23:49 < Dreamer3> Dunkelstern: thanks!
23:49 -!- rndbot [n=bot@wikipedia/Gracenotes] has joined #go-nuts
23:49 < ahasver> do you think go will replace some of the languages we use
now?
23:49 < ahasver> danderson?
23:49 -!- gkmngrgn [n=gkmngrgn@unaffiliated/gkmngrgn] has quit ["Leaving"]
23:50 < kmc> chrome, that seems a little bit like structural (as opposed to
nominal) subtyping, which i feel is a bad idea
23:50 < kmc> because an interface is more than a set of method signatures;
it's a set of contracts about what those methods do
23:50 <+danderson> I reserve judgement, although I'd like to see it replace
C and C++ to some extent in the long term.
23:50 <+danderson> how effective it will be as a replacement for those
languages, I can't say.
23:50 < chrome> kmc: write some code, play with it.  It actually works great
in practice.
23:51 < XniX23> danderson: oh i see, my bad, i really need to see this video
^^
23:51 < XniX23> ahasver: i believe that is up to people hanging on this
chan...  if we build a large community, i believe it will succeed
23:52 < kmc> chrome, that's not really a response
23:52 < sladegen> Dunkelstern: i'm not sure why it works but that's the best
i could do for now: http://gopaste.org/mu16y
23:52 < ahasver> well, XniX23 you need to understand that maybe some people
(me) dont have time
23:53 < ahasver> to experiment and try to
23:53 < ahasver> build a good-working new programming language
23:53 < ahasver> i hope you understand what i wish to say
23:53 < ahasver> developing is something that costs
23:53 < ahasver> months...years
23:54 -!- nigwil [n=chatzill@berkner.ccamlr.org] has joined #go-nuts
23:54 -!- ShadowIce [n=pyoro@unaffiliated/shadowice-x841044] has quit
["Verlassend"]
23:54 -!- vhost- [n=kyle@kyleterry.com] has joined #go-nuts
23:54 < ahasver> ofcourse, I dont wish to offend nobody, but there are
different point of views
23:55 < kmc> chrome, if i have a type representing a register of bits, and a
type representing an engine transmission, and they both have a function
"shift(int)"...  why should the language treat those functions as related?
23:55 < Amaranth> ahasver: In that case you should check back in two years
to see if it still exits
23:56 < Amaranth> exists*
23:56 < directrixx> kmc: It doesn't until you pass them to a function that
asks for one of those interfaces
23:56 < Dunkelstern> sladegen, thats weird...
23:56 < sladegen> Dunkelstern: very ;)
23:56 < kmc> right, but suppose i define an interface for engine
transmissions, requiring only that method
23:56 < kmc> now my bit register is accidentally considered an engine
transmission
23:56 < kmc> and i lose some type safety
23:57 < olegfink> on "go vs.  X", interestingly there wasn't any mention of
ocaml on the golang-nuts, nor there was a word about go on caml-list -- am I the
only one to think that the systems have somewhat overlapping niches and ideas?
23:57 < ahasver> Amaranth: tnx for the irony, but no tnx...Iam not a sceptic
23:57 < Dunkelstern> Amaranth, let it be 5-6 years, lua needed some time too
and is just used for scripting until now (even there is a web framework named
keppler)
23:57 < chrome> thats a pretty contrived example
23:57 < kmc> chrome, this happens all the time
23:57 < kmc> things that look similar but act different
23:57 < kmc> usually they won't be as totally unrelated
23:57 < directrixx> kmc: heh, its _your_ fault if you pass a register to a
function as a transmission, not the compilers
23:57 < Dunkelstern> olegfink, perhaps it is that not many people know caml
23:58 < kmc> directrixx, the whole point of static typing is for the
compiler to find some of those problems for me
23:58 < kmc> that's what i meant by "i lose type safety"
23:58 -!- aaront [n=aaront@d24-141-25-171.home.cgocable.net] has joined #go-nuts
23:58 -!- XniX23 [n=XniX23@89-212-198-49.dynamic.dsl.t-2.net] has quit [Read
error: 104 (Connection reset by peer)]
23:58 < chrome> sounds like you've already formed an opinion and nothing
anyone will say will convince you otherwise.
23:59 < directrixx> kmc: Then name the methods differently BitShift vs
ShiftGears
23:59 -!- XniX23 [n=XniX23@89-212-198-49.dynamic.dsl.t-2.net] has joined #go-nuts
23:59 < sladegen> kmc: type unsafety in the C++ version is a silly straight
jacket.
23:59 -!- hehu [n=asddas@unaffiliated/hehu] has quit [Success]
23:59 < directrixx> I understand what you're saying.  But I think the
flexibility of the interface system out-weighs the risk of everyone creating an
interface with method foo
--- Log closed Thu Nov 19 00:00:28 2009