--- Log opened Wed Mar 09 00:00:55 2011
00:02 -!- prip [~foo@host140-125-dynamic.35-79-r.retail.telecomitalia.it] has
joined #go-nuts
00:07 -!- iant [~iant@nat/google/x-esrmbzagxqucuoet] has joined #go-nuts
00:07 -!- mode/#go-nuts [+v iant] by ChanServ
00:13 -!- sacho [~sacho@87-126-37-121.btc-net.bg] has quit [Read error: Connection
reset by peer]
00:18 -!- DerHorst [~Horst@e177130087.adsl.alicedsl.de] has quit [Ping timeout:
246 seconds]
00:19 -!- m4dh4tt3r
[~Adium@75.144.24.109-BusName-walnutcreek.ca.hfc.comcastbusiness.net] has quit
[Quit: Leaving.]
00:24 -!- prip [~foo@host140-125-dynamic.35-79-r.retail.telecomitalia.it] has quit
[Ping timeout: 248 seconds]
00:25 -!- Fish- [~Fish@coss6.exosec.net] has joined #go-nuts
00:26 -!- iant [~iant@nat/google/x-esrmbzagxqucuoet] has quit [Quit: Leaving.]
00:28 -!- Fish [~Fish@exo3753.pck.nerim.net] has quit [Ping timeout: 276 seconds]
00:29 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has joined
#go-nuts
00:34 -!- iant [~iant@67.218.107.6] has joined #go-nuts
00:34 -!- mode/#go-nuts [+v iant] by ChanServ
00:37 -!- prip [~foo@host152-123-dynamic.32-79-r.retail.telecomitalia.it] has
joined #go-nuts
00:38 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Ping timeout: 246 seconds]
00:41 -!- nettok [~quassel@200.119.165.147] has joined #go-nuts
00:43 -!- iant1 [~iant@67.218.107.6] has joined #go-nuts
00:44 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
00:45 -!- iant [~iant@67.218.107.6] has quit [Ping timeout: 240 seconds]
00:53 -!- tvw [~tv@e176002093.adsl.alicedsl.de] has quit [Remote host closed the
connection]
00:53 -!- mikespook [~mikespook@219.137.253.190] has joined #go-nuts
01:06 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has quit [Quit: ERC Version 5.3
(IRC client for Emacs)]
01:09 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has joined #go-nuts
01:11 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
01:13 < steven> woot only a few more hours of work to go
01:16 < dfc> then what happens ? are you expecting to win the lottery ?
01:18 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net]
has quit [Ping timeout: 246 seconds]
01:20 < dfr|work> so is panic/recover only useful when doing separate
routines?
01:20 < dfr|work> or I can use them as more regular exception handling?
01:24 -!- saturnfive [~saturnfiv@210.74.155.131] has joined #go-nuts
01:25 < skelterjohn> dfr|work: I don't follow
01:25 < skelterjohn> how would you use panic/recover as regular exception
handling?
01:25 < dfr|work> skelterjohn, well, I guess what I want is regular
exception handling.
01:26 < skelterjohn> oh - i misparsed
01:26 < skelterjohn> i thought you said regular expression handling
01:26 < dfr|work> skelterjohn, >.<
01:26 < skelterjohn> even though i copied it correctly
01:26 < skelterjohn> it was still expression in my head
01:26 < skelterjohn> dfr|work: one of the golden rules is that a panic
should never escape a package unless the program really needs to go down
01:26 < dfr|work> skelterjohn, Basically, I keep having to do if ret, err :=
foo(); err != nil { return nil, err }
01:26 < skelterjohn> beyond that, people use them like they use exceptions,
on occaision
01:27 < skelterjohn> and you'd rather foo() panicked
01:27 < dfr|work> skelterjohn, and I'm getting to be a bit tired of it,
since almost all errors cause a general return.  =/
01:27 < dfr|work> yes
01:27 < dfr|work> well
01:27 < dfr|work> I'd rather just panic at some point, and then wrap and
gather that panic and return the error
01:28 < skelterjohn> as long as foo() isn't exposed, and you always
defer/recover when you call it, it's fine
01:28 < dfr|work> oh, I think I get how panic/recover works....
01:29 < dfr|work> basically recover returns the panic if anything panicked
in the function before the defer block kicks in =/
01:29 < skelterjohn> yes
01:29 < steven> guys
01:29 < skelterjohn> and it only makes sense inside a defer
01:29 < dfr|work> skelterjohn, yea, of course.
01:29 < skelterjohn> got another gist for the chan, steven?
01:29 -!- MizardX [MizardX@unaffiliated/mizardx] has joined #go-nuts
01:30 < steven> whats an intuitive way to remember the rule about "all
pointer types contain the set of methods of both the ptr type and what it points
to, whereas all nonptr types only contain the methods of the type, not the ptr
type"
01:30 < steven> or something
01:30 < steven> (see this is why im asking)
01:31 < skelterjohn> because it doesn't make sense to try to do a pointer
type method on a non-pointer type
01:31 < skelterjohn> and it does make sense to do it the other way
01:31 < steven> but cant yo just do &obj.ptrMeth() ?
01:32 < steven> i mean its not like one is inaccessible to the other, right?
01:32 < steven> just like you can do *ptrobj.regMeth()
01:32 < steven> ooh i get it i think.
01:32 < skelterjohn> what about something that is in a temporary register
01:32 < steven> ptrobj.regMethod() is fine
01:32 < steven> right?
01:32 < steven> but regobj.ptrMethod() is bad?  right?
01:33 -!- Jgonzalez [~Jgonzalez@ool-457e1652.dyn.optonline.net] has joined
#go-nuts
01:33 < skelterjohn> honestly i don't see why you should be able to do
ptrobj.regMethod()
01:34 < steven> whats the real rule?
01:34 < skelterjohn> when you could do (*ptrobj).regMethod()
01:34 < skelterjohn> oh, you had it right
01:34 < skelterjohn> but i can't justify it (which is not to say it isn't
justifiable)
01:35 < dfr|work> skelterjohn, can I affect the return value of a function
from a defer?
01:35 < skelterjohn> dfr|work: I don't know
01:35 < skelterjohn> try and find out
01:36 < skelterjohn> probably, though
01:36 < steven> dfr|work: if its a closure, then probably, yes.
01:36 < steven> i dont know how that works with pointers and indirection
though,
01:36 < steven> but i do know that you can alter arrays etc, from inside a
closure
01:36 < dfr|work> mhmm.....  but I'm trying to return nil if the panic was
recovered, hehe
01:36 < steven> or from outside it (if its contained inside it)
01:36 < dfr|work> so mutating a record may not work...
01:36 < skelterjohn> i imagine it will work
01:37 < dfr|work> well just returning doesn't seem to work
01:37 -!- Jgonzalez [~Jgonzalez@ool-457e1652.dyn.optonline.net] has quit [Client
Quit]
01:37 < dfr|work> 'cause it probably thinks the return is the return of the
anonymous function
01:37 < dfr|work> which makes sense
01:37 < skelterjohn> use a named return value
01:37 < skelterjohn> i almost never have anonymous return values
01:37 < dfr|work> skelterjohn, what do you mean?
01:38 < skelterjohn> except with things that return bool, for some reason
01:38 < dfr|work> pointer to a value?
01:38 < skelterjohn> func foo() (err os.Error) { ...  err = something;
return }
01:38 < dfr|work> oooh!
01:38 < dfr|work> duh!
01:38 < dfr|work> thanks.
01:50 < dfr|work> skelterjohn, woots.  Got it working, many thanks.  :)
01:50 < skelterjohn> great :) pleasure
01:51 < dfr|work> skelterjohn, I'm basically trying to get an xmpp client to
work.  That's the grand scheme of things :D
01:51 < skelterjohn> what's xmpp
01:51 < dfr|work> skelterjohn, the protocol for jabber, etc
01:52 < skelterjohn> ah, nat
01:52 < skelterjohn> neat
01:52 -!- aho [~nya@fuld-590c61f9.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
01:52 < dfr|work> skelterjohn, unfortunately it's a lot of xml, and I'm not
a great fan of xml.  But whatever...
01:56 -!- iant1 [~iant@67.218.107.6] has quit [Quit: Leaving.]
02:14 -!- shvntr [~shvntr@113.84.147.102] has joined #go-nuts
02:14 -!- cenuij [~cenuij@78.112.41.178] has joined #go-nuts
02:14 -!- cenuij [~cenuij@78.112.41.178] has quit [Changing host]
02:14 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
02:18 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Ping
timeout: 276 seconds]
02:19 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined
#go-nuts
02:37 -!- Natch [~natch@c-6dcde155.25-4-64736c10.cust.bredbandsbolaget.se] has
joined #go-nuts
02:38 -!- Natch| [~natch@c-6dcde155.25-4-64736c10.cust.bredbandsbolaget.se] has
quit [Ping timeout: 250 seconds]
02:49 -!- TheSeeker [~n@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has quit
[]
02:59 < dfr|work> okay...  I can understand EOF on read...  but what does it
mean on write?  =/
02:59 < dfr|work> that writer is closed?
02:59 < dfr|work> =/
02:59 -!- niemeyer [~niemeyer@201-40-140-176.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 246 seconds]
03:03 < skelterjohn> eek
03:04 < dfc> dfr|work: is this a net.Conn or any io.Writer ?
03:04 < dfr|work> dfc, net.Conn
03:04 < dfc> my best guess is the remote side has called shutdown(2), but
the sending side of the underlying conn is still open
03:05 < dfr|work> dfc, probably...
03:05 < dfr|work> was just weird to get EOF hehe
03:05 < dfc> i'm googling for a precident now
03:07 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the
connection]
03:12 < dfc> dfr|work: hmm, can't really find a precident for EOF being
returned on a write
03:13 -!- nettok [~quassel@200.119.165.147] has quit [Ping timeout: 252 seconds]
03:13 < dfr|work> dfc, well, apparently i do get it when trying to connect
to talk.google.com, hehe
03:13 < dfr|work> oh well
03:13 < dfr|work> it's probably a weird behavior
03:16 -!- TheSeeker [~n@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has joined
#go-nuts
03:17 < Xenith> Hmm.  That explains a few things.
03:18 < Xenith> No wonder I'm getting errors with golua while linking on OS
X.
03:18 < Xenith> brew doesn't create a dynamic library for it, only a static
one.
03:18 < dfc> dfr|work: if n == 0 {
03:18 < dfc> oserr = io.ErrUnexpectedEOF
03:18 < dfc> break
03:18 < dfc> }
03:18 < dfc> ^ is this the droid you are looking for ?
03:19 < dfr|work> dfc, mhmmm?
03:20 < dfr|work> dfc, I was just somewhat confused as to what End of File
when writing means...
03:20 < dfr|work> >.<
03:20 < dfr|work> apparently it is encounterable when you're writing to a
full disk, for example
03:20 < dfr|work> which i guess somewhat makes sense....
03:20 -!- clockworks [~clockwork@c-76-103-224-136.hsd1.ca.comcast.net] has joined
#go-nuts
03:20 < dfc> http://code.google.com/p/go/source/browse/src/pkg/net/fd.go#482
03:21 < dfc> i think there are probably valid places where it could be
returned
03:21 < dfc> probably where errno is being returned by os.Errno(e)
03:21 < dfr|work> dfc, fair enough.
03:21 < dfr|work> was just surprising, i guess
03:21 < dfc> but the best you can say from it is, something went wrong,
can't really fix it
03:22 < dfc> one thing you could do is
03:22 < dfc> if you get os.EOF
03:22 < dfc> do a conn.Ok()
03:22 < dfc> ^ i think that is the call
03:22 < dfc> if my theory of shutdown being called is correct
03:22 < dfc> it should report the connection is still connected
03:22 * Xenith wonders how to make cgo link to a static library instead of
dynamic...
03:22 < dfc> but the write path has been shutdown
03:23 < dfr|work> dfc, make sense...  What I'm trying to do is avoid using
tls thing, since I don't really understand it, and use underlying connection
directly
03:23 < dfr|work> that way I may get a bit more info on what's going on....
03:23 < dfc> i understand
03:23 < dfc> the way tls handshaking works in xmpp is weird
03:23 < dfc> the xml stream just stops
03:23 < dfc> while the world is juggled around
03:23 < dfc> then you have to start again emitting a new <?xml > tag
03:24 < dfc> if tls is involved then shutdown is probably also involved
03:24 < dfc> because there is something in the TLS spec that suggests you
should always close the connection cleanly
03:24 < dfc> which is a three way transaction on top of the tcp conn
03:24 < dfc> but i'm speaking from the cuff at this point
03:25 < dfc> I think the clean shutdown is necessary so both sides can
resume the ssl session later
03:27 < dfc> hmm,
http://code.google.com/p/go/source/browse/src/pkg/net/fd.go#465
03:27 < dfc> this could be a bug
03:27 < dfc> basically if write(2) returns 0 bytes an no error
03:28 < dfc> which could happen if the network buffers are full
03:28 < dfc> and you are not in non blocking mode
03:28 < dfc> which is not true
03:28 < dfr|work> =/
03:28 < dfr|work> i think most of this is a bit over my head
03:28 < dfr|work> I'm not very experty with the TLS and xmpp stuff =/
03:29 < dfr|work> buuut
03:29 < dfr|work> i think using raw connection works
03:29 < dfc> then it is probably something happening in the TLS handshaking
03:29 < dfc> oh, that could be where the EOF is coming from
03:29 < dfc> if you're speaking to a tls.Conn that wraps a net.Conn
03:31 < steven> am i missing something, or is exp/draw/Image.Set() the only
way to draw to x11 without using an actual image?
03:31 < dfr|work> dfc, that's what it does.
03:31 -!- itrekkie [~itrekkie@ip72-211-129-122.tc.ph.cox.net] has quit [Quit:
itrekkie]
03:34 < dfc> dfr|work: can you dump the traffic with wireshark
03:34 < dfc> i'm not sure if that will be able to decode all the traffic
03:35 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Ping
timeout: 255 seconds]
03:35 < dfc> but it might give you a hint if the connection is being closed
unexpectedly
03:35 < dfr|work> lemme try....
03:36 < dfc> it might be a long shot
03:36 < dfc> as TLS is negotiated after connection
03:37 < dfc> does gtalk support connection on a TLS only port ?
03:37 < dfc> that might be a more straight forward way of debugging this
03:37 < dfr|work> dfc, how do I filter the traffic by a tcp port?
03:37 < dfc> in the GUI
03:37 < dfr|work> dfc, basically what I have is the debug log from pidgin
03:37 < dfr|work> which works, naturally.
03:38 < dfr|work> however, replicating that doesn't seem to be too
straightforward =/
03:38 < dfc> you can right click on the stream and as it to show the
conversation
03:38 * dfc opens wireshark to check
03:40 -!- saturnfive [~saturnfiv@210.74.155.131] has quit [Ping timeout: 250
seconds]
03:42 -!- saturnfive [~saturnfiv@210.74.155.131] has joined #go-nuts
03:42 < dfc> dfr|work: confirmed sudo tshark -i en0 -w xmpp.pcap port 5222
03:42 < dfc> will dump
03:42 < dfc> then you can play with the file at your leasure
03:43 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
03:44 -!- KingPhilroy [~kingphilr@shc-nat-newhall.stonehill.edu] has quit [Ping
timeout: 248 seconds]
03:46 < dfr|work> okay, i think it captured....
03:51 < dfr|work> dfc, so you think it may be a bug within the tls thingie,
where it prematurely returns eof?
03:51 < dfc> i'm not sure it's a bug per sey
03:51 < dfc> probably more EOF being returned when something more
informative should be returned
03:52 < dfc> if it occurs during ssl handshaking
03:52 < dfc> i think that is probably fair bet
03:52 < dfr|work> mhmm =/
03:52 < dfr|work> in that case, i can probably try to dig into the tls code
to see if I can get some more info on what's going on...
03:53 < dfc> i've had a quick grep in crypto/tls and net
03:53 < dfc> without luck
03:53 < dfc> are you able to link to the code ? or is it secret squirrel
03:53 < dfc> ?
03:53 < dfr|work> dfc, sure.
03:54 < dfr|work> gimme a few, I'll push it to github
03:56 < dfr|work> dfc,
https://github.com/ratnikov/go-xmpp/blob/master/connection.go
03:58 < dfr|work> dfc, you should be able to just clone it and gomake main
it
03:58 < dfr|work> gomake main && ./main
03:58 -!- itrekkie [~itrekkie@ip72-211-129-122.tc.ph.cox.net] has joined #go-nuts
04:01 < dfc> thanks, i'll give it a go
04:01 < dfr|work> dfc, I'm also trying to follow
http://groups.google.com/group/golang-nuts/msg/02493781877187f6?  but it's a bit
outdated, perhaps
04:01 -!- cenuij [~cenuij@78.112.41.178] has joined #go-nuts
04:01 -!- cenuij [~cenuij@78.112.41.178] has quit [Changing host]
04:01 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
04:01 < dfc> dfr|work: yeah i see a few people working on an xmpp library at
the moment
04:01 < dfc> to the winner go the spoils i say
04:03 < Xenith> Well, I got golua working on OS X. A difficult platform to
work with, let me tell you....
04:03 -!- itrekkie [~itrekkie@ip72-211-129-122.tc.ph.cox.net] has quit [Client
Quit]
04:06 < dfr|work> dfc, from what I googled around, seems like people are
more like trying to work on it, and then give up.  :)
04:06 < dfr|work> dfc, frankly, if there was an existing xmpp client, I'd
use it...  =/
04:06 < dfc> indeed, so let the best client win
04:06 < dfc> and thus, we all win
04:08 < dfr|work> :D
04:09 < dfr|work> dfc, so did you happen to try to build it yet?
04:09 < dfr|work> and run it?
04:09 < dfr|work> and see what you get?
04:09 < dfc> sorry, many conversations ongoing, not to mention work
04:11 < dfr|work> dfc, hah, alright.  Well, it's actually kinda 11pm here,
and I'm still at work...
04:11 < dfr|work> so perhaps I ought to start heading home =/
04:12 < dfr|work> dfc, anyhow...  thanks for the help..  perhaps I'll be
able to bug you more about this stuff tomorrow :)
04:12 < dfc> sure thing, i'll be here
04:15 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 246 seconds]
04:17 -!- jedws [~jwesleysm@c114-77-210-9.rivrw3.nsw.optusnet.com.au] has joined
#go-nuts
04:23 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
04:23 -!- mode/#go-nuts [+v iant] by ChanServ
04:24 -!- cenuij [~cenuij@base/student/cenuij] has quit [Read error: Connection
reset by peer]
04:41 -!- jjames [~user@li112-65.members.linode.com] has joined #go-nuts
04:46 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Quit: Venom_X]
04:49 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 250 seconds]
04:50 -!- iant [~iant@216.239.45.130] has joined #go-nuts
04:50 -!- mode/#go-nuts [+v iant] by ChanServ
04:56 -!- sav [~lsd@peirce.xored.org] has quit [Remote host closed the connection]
04:58 -!- sav [~lsd@peirce.xored.org] has joined #go-nuts
05:13 -!- cenuij [~cenuij@78.112.41.178] has joined #go-nuts
05:13 -!- cenuij [~cenuij@78.112.41.178] has quit [Changing host]
05:13 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
05:18 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has joined #go-nuts
05:21 -!- keithcascio [~keithcasc@nat/google/x-scatqxsqihakqnnn] has quit [Quit:
Leaving]
05:24 -!- shvntr [~shvntr@113.84.147.102] has quit [Quit: leaving]
05:38 -!- KingPhilroy [~kingphilr@shc-nat-newhall.stonehill.edu] has joined
#go-nuts
05:46 -!- fabled [~fabled@mail.fi.jw.org] has joined #go-nuts
05:59 -!- clockworks [~clockwork@c-76-103-224-136.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
06:01 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has quit
[Ping timeout: 246 seconds]
06:20 -!- nixness [~dsc@dyn-86-36-42-96.wv.qatar.cmu.edu] has joined #go-nuts
06:22 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has quit [Remote host closed
the connection]
06:24 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
06:25 -!- jedws [~jwesleysm@c114-77-210-9.rivrw3.nsw.optusnet.com.au] has quit
[Quit: jedws]
06:40 -!- Fish [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
06:47 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
06:49 -!- dfc [~dfc@sydfibre2.atlassian.com] has quit [Ping timeout: 276 seconds]
06:53 -!- meanburrito920 [~john@76-217-6-100.lightspeed.irvnca.sbcglobal.net] has
joined #go-nuts
06:53 -!- meanburrito920 [~john@76-217-6-100.lightspeed.irvnca.sbcglobal.net] has
quit [Changing host]
06:53 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts
06:54 -!- adu [~ajr@softbank220043138128.bbtec.net] has quit [Quit: adu]
06:54 -!- JusticeFries [~JusticeFr@c-24-9-171-36.hsd1.co.comcast.net] has joined
#go-nuts
07:04 -!- coldturnip1 [~COLDTURNI@111-250-2-225.dynamic.hinet.net] has joined
#go-nuts
07:04 -!- coldturnip [~COLDTURNI@111-250-2-225.dynamic.hinet.net] has quit [Ping
timeout: 252 seconds]
07:09 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has quit [Quit:
leaving]
07:12 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has joined
#go-nuts
07:27 -!- shvntr [~shvntr@113.84.147.102] has joined #go-nuts
07:38 -!- Urmel|Work [~UrmelWork@cache2.uk.logica.com] has joined #go-nuts
07:43 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
07:47 -!- ExtraSpice [XtraSpice@78-62-101-194.static.zebra.lt] has joined #go-nuts
07:56 -!- shvntr [~shvntr@113.84.147.102] has quit [Quit: leaving]
07:58 -!- shvntr [~shvntr@113.84.147.102] has joined #go-nuts
08:00 -!- jedws [~jwesleysm@c114-77-210-9.rivrw3.nsw.optusnet.com.au] has joined
#go-nuts
08:00 -!- cco3 [~conley@c-69-181-140-72.hsd1.ca.comcast.net] has quit [Ping
timeout: 246 seconds]
08:01 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
08:02 < steven> guys
08:02 < steven> anyone wanna volunteer a set of eyes?
08:03 < steven> i cant figure out for the life of me why IRC isnt responding
to my authentication in this code:
08:03 < nixness> just flash, and we'll look.
08:03 < steven> https://gist.github.com/861858
08:03 < steven> ive verified that on line 67, the 2 strings get written in
their entirety to a valid *net.TCPConn
08:04 < steven> oops refresh.
08:06 < steven> run the app and see for yourself, it prints properly and
should work.  it just doesnt seem to!
08:06 < djbrown> nick and user never get's sent?
08:06 < djbrown> or rather the server doesnt respond to them?
08:07 < steven> right
08:07 < steven> the server never responds to them, and says "ident never
sent" or whatever
08:07 < steven> ":anthony.freenode.net NOTICE * :*** No Ident response"
08:08 < steven> but when i do the very same thing in telnet, it works fine.
08:08 < steven> i have 2 guesses: either im sending the wrong EOL string
(thought its sposta be \r\n) or something funky is happening with using the same
*net.TCPConn on two different goroutines.
08:09 < steven> but i verified that, at the very least, line 67 gets called
twice, with the right string, a valid writer object, and a valid conn.tcpConn
object
08:09 < djbrown> \r\n is right
08:09 < steven> which is a valid *net.TCPConn object
08:10 < steven> man im so confused.  it should be working!
08:16 -!- visof [~visof@41.233.113.242] has joined #go-nuts
08:16 -!- visof [~visof@41.233.113.242] has quit [Changing host]
08:16 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts
08:16 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has quit [Quit:
Leaving]
08:17 < djbrown> cant see anything obvious
08:18 < steven> :'(
08:19 < steven> on the bright side, i might be able to come up with regexes
for incoming IRC commands instead of using a select :)
08:19 < steven> go has sweeet regex support<3
08:22 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:39 -!- ronny [~quassel@p4FF1C6C6.dip0.t-ipconnect.de] has joined #go-nuts
08:48 < fluffle> steven: not to blow my own trumpet or anything, but
http://github.com/fluffle/goirc
08:57 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
09:05 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4]
09:07 -!- JusticeFries [~JusticeFr@c-24-9-171-36.hsd1.co.comcast.net] has quit
[Quit: JusticeFries]
09:26 -!- Guest25127 [~quassel@p4FF1C6C6.dip0.t-ipconnect.de] has quit [Remote
host closed the connection]
09:27 -!- ronny [~quassel@p4FF1C6C6.dip0.t-ipconnect.de] has joined #go-nuts
09:31 < ww> hrm...  anyone know of an implementation of RFC 4414 - UMAC
hashes?
09:32 -!- tensorpudding [~user@99.56.160.152] has quit [Remote host closed the
connection]
09:33 -!- mikespook [~mikespook@219.137.253.190] has quit [Quit: Leaving.]
09:40 -!- eXp`iRc|30869 [~VScript@dynamic-adsl-84-223-194-235.clienti.tiscali.it]
has joined #go-nuts
09:45 -!- eXp`iRc|30869 [~VScript@dynamic-adsl-84-223-194-235.clienti.tiscali.it]
has quit [Ping timeout: 276 seconds]
09:49 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-150-52.clienti.tiscali.it] has
joined #go-nuts
09:50 -!- pilgrum [~pilgrum@cpe-67-49-71-222.socal.res.rr.com] has joined #go-nuts
10:19 -!- rtharper [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
10:20 -!- shvntr [~shvntr@113.84.147.102] has quit [Quit: leaving]
10:25 -!- saturnfive [~saturnfiv@210.74.155.131] has quit [Read error: Connection
reset by peer]
10:33 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts
10:45 < xyproto> I want to try out XML-RPC in Go. I already have a
client/server application in Python that uses XML-RPC, that I want to communicate
with.  However, the first package on the dashboard for xmlrpc says: undefined:
http.Conn and cannot use map literal (type map[string] string) as type http.Header
in assignment
10:45 < xyproto> Has there been recent changes to the http package?
10:45 < xyproto> (And yes, I know JSON-RPC is cooler and better in every
way) :)
10:46 < xyproto> correction, I did not find xmlrpc in the dashboard, but
googled and found this: http://code.google.com/p/go-xmlrpc/
10:47 < xyproto> And also, hello :)
10:51 -!- wrtp [~rog@92.16.113.213] has joined #go-nuts
10:51 -!- saturnfive [~saturnfiv@222.91.81.247] has joined #go-nuts
10:51 -!- saturnfive [~saturnfiv@222.91.81.247] has left #go-nuts []
11:21 -!- rtharper [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
11:22 -!- KirkMcDonald [~Kirk@python/site-packages/KirkMcDonald] has quit [Ping
timeout: 276 seconds]
11:23 -!- boscop [~boscop@f055160240.adsl.alicedsl.de] has joined #go-nuts
11:23 < jnwhiteh> xyproto: you should always look here first
http://golang.org/pkg/
11:24 < jnwhiteh> http://golang.org/pkg/rpc/ specifically =)
11:24 < jnwhiteh> but yes, if you're using a third party package ,there have
been changes to http recently that it needs to updated to handle
11:40 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has joined #go-nuts
11:45 -!- KirkMcDonald [~Kirk@python/site-packages/KirkMcDonald] has joined
#go-nuts
11:48 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 246 seconds]
11:49 -!- DerHorst [~Horst@e176103051.adsl.alicedsl.de] has joined #go-nuts
11:50 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
11:51 -!- rtharper [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
11:55 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
12:09 -!- napsy [~luka@193.2.66.6] has joined #go-nuts
12:18 -!- tvw [~tv@212.79.9.150] has quit [Ping timeout: 246 seconds]
12:21 -!- DerHorst [~Horst@e176103051.adsl.alicedsl.de] has quit [Remote host
closed the connection]
12:25 < xyproto> jnwhiteh: okay, thank you
12:28 -!- niemeyer [~niemeyer@201-40-140-176.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
12:35 -!- shvntr [~shvntr@113.84.147.102] has joined #go-nuts
12:41 -!- niemeyer_ [~niemeyer@201-40-152-213.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
12:44 -!- niemeyer [~niemeyer@201-40-140-176.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 246 seconds]
12:52 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has joined
#go-nuts
12:53 -!- napsy [~luka@193.2.66.6] has quit [Quit: leaving]
12:53 < skelterjohn> morning
13:01 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
13:01 -!- rtharper [~tomh@unaffiliated/sioraiocht] has quit [Ping timeout: 264
seconds]
13:06 -!- rtharper [~tomh@host-84-9-143-150.dslgb.com] has joined #go-nuts
13:06 -!- rtharper [~tomh@host-84-9-143-150.dslgb.com] has quit [Changing host]
13:06 -!- rtharper [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
13:12 -!- pilgrum [~pilgrum@cpe-67-49-71-222.socal.res.rr.com] has quit [Quit:
Leaving]
13:13 -!- PortatoreSanoDiI [~Marvin@82.84.66.111] has joined #go-nuts
13:16 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-150-52.clienti.tiscali.it] has
quit [Ping timeout: 255 seconds]
13:21 -!- jedws [~jwesleysm@c114-77-210-9.rivrw3.nsw.optusnet.com.au] has quit
[Quit: jedws]
13:26 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit
[Quit: Ex-Chat]
13:37 -!- chressie [~chressie@dreggn.in-ulm.de] has quit [Ping timeout: 240
seconds]
13:38 < wrtp> skelterjohn: hey
13:39 -!- lmoura [~lauromour@187.113.96.229] has joined #go-nuts
13:41 -!- rtharper [~tomh@unaffiliated/sioraiocht] has quit [Ping timeout: 276
seconds]
13:45 -!- rtharper [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
13:47 < steven> fluffle: oh cool you wrote one too eh?
13:47 < grumpytoad> any news whether the gc has been revisited ?
13:55 < wrtp> grumpytoad: it's been significantly updated in the last month
14:00 < ww> wrtp: hey remember the weird malloc/free/cgocallback problems?
14:00 < wrtp> ww: yeah
14:00 < wrtp> ww: did you find the problem?
14:00 < ww> fixed by monday's scheduler reorg
14:00 < wrtp> i'm not entirely surprised :0)
14:00 < ww> rsc said update tip, problem gone :)
14:00 < wrtp> cool
14:01 < wrtp> well, that makes things easier then!
14:02 < ww> indeed
14:30 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
14:30 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 264 seconds]
14:39 -!- iant [~iant@67.218.107.6] has joined #go-nuts
14:39 -!- mode/#go-nuts [+v iant] by ChanServ
14:52 < steven> hey wrtp
14:52 < steven> i took your advice last night
14:52 < steven> https://gist.github.com/861858
14:52 -!- visof [~visof@unaffiliated/visof] has quit [Remote host closed the
connection]
14:52 < steven> hey guys,
14:54 -!- femtoo [~femto@95-89-198-8-dynip.superkabel.de] has joined #go-nuts
14:55 < skelterjohn> tl; dr :)
14:55 < wrtp> steven: i thought i advised you to ditch the goroutine :-)
14:56 < wrtp> (well, after the first piece of advice which was to avoid
starting a goroutine for each message)
14:59 -!- qjcg [~qjcg@208.88.110.46] has joined #go-nuts
15:00 -!- gogogrrl [~max@p5790F511.dip.t-dialin.net] has joined #go-nuts
15:00 < gogogrrl> hiho
15:00 < gogogrrl> how can I get the second return value of a function?
15:01 < skelterjohn> a, b := foo()
15:01 < skelterjohn> b is the 2nd return value
15:01 < gogogrrl> what if I dont want a?
15:01 < skelterjohn> _, b := foo()
15:01 < gogogrrl> e.g the first value
15:01 < gogogrrl> lol
15:01 < gogogrrl> what the fuck
15:01 < gogogrrl> sorry
15:01 < skelterjohn> when you want something on the LHS to be ignored, you
use _
15:02 < gogogrrl> LHS?
15:02 < skelterjohn> left hand side
15:02 < gogogrrl> ah
15:02 < gogogrrl> Could I add a method to os.File (like Copy) locally?
15:03 < gogogrrl> I tried and it didnt work
15:03 < skelterjohn> you'd have to make your own type
15:03 < gogogrrl> but maybe there is some way
15:03 < skelterjohn> type MyFile os.File
15:03 < gogogrrl> hmm kay
15:03 < skelterjohn> but if you do that, you won't have any of os.File's
methods
15:03 < skelterjohn> you might want
15:03 < skelterjohn> type MyFile struct { *os.File }
15:03 < skelterjohn> that will embed a pointer to os.File in your type
15:03 < gogogrrl> nah
15:03 < skelterjohn> and any method that works on *os.File will also work on
MyFile
15:04 < skelterjohn> you might also be interested in ioutil.Copy() :)
15:04 < gogogrrl> probably
15:04 < skelterjohn> that won't copy one file to another, but it will read
the contents of an io.Reader and write it to an io.Writer
15:05 < skelterjohn> if you want something that mimics cp, you have to open
the new file yourself
15:05 < gogogrrl> no actually I want to read from File a and write to File b
15:05 < skelterjohn> then you want ioutil.Copy()
15:06 < gogogrrl> where do the readers, writers come from?
15:06 < skelterjohn> it's an interface defined in io
15:07 < skelterjohn> *os.File satisfies io.Reader and io.Writer
15:07 < gogogrrl> sweet
15:07 < skelterjohn> so whenever it asks for either, you may give it an
*os.File
15:08 < skelterjohn> sorry, Copy() is in io, not ioutil
15:08 < gogogrrl> yeah I noticed that, no problem
15:09 -!- mnoel [~mnoel@c-75-65-250-60.hsd1.la.comcast.net] has joined #go-nuts
15:11 < gogogrrl> It is really hard to stop writing ;s :D
15:11 < gogogrrl> IDE in my head
15:12 < skelterjohn> you can still write them :)
15:12 < skelterjohn> coming from java?
15:12 < gogogrrl> hellno
15:12 < gogogrrl> C
15:12 < gogogrrl> by the book
15:12 < gogogrrl> _the_ book
15:13 < skelterjohn> go is much easier to catch on to if you aren't ordained
in the church of object orientation
15:13 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
15:14 < gogogrrl> actually I am a hobbyist church burner ;)
15:14 < gogogrrl> I do mostly common lisp currently
15:14 < gogogrrl> I am unsure if go will be able to make me dump cl, but cl
is a fat one...
15:14 < skelterjohn> so you can code without semicolons :)
15:15 < skelterjohn> what kind of targets do you use cl for?
15:15 < gogogrrl> my own server, mostly http/html stuff
15:16 < gogogrrl> but basically everything, in my spare time I usually
suffer from severe NIH
15:16 < skelterjohn> check out github.com/hoisie/web.go
15:16 < skelterjohn> a nice lightwork non-framework that makes it easy to
serve http
15:16 < gogogrrl> and I think its just fun to write your own very different
DB and everything else I need
15:17 < skelterjohn> what is NIH
15:17 < gogogrrl> "not invented here"-syndrome
15:17 < gogogrrl> a joke "sickness"
15:18 < gogogrrl> when you have to do everything from scratch because you
are paranoid ;)
15:18 < gogogrrl> or just want to know what happens
15:18 -!- femtoo [~femto@95-89-198-8-dynip.superkabel.de] has quit [Read error:
Connection reset by peer]
15:18 < skelterjohn> i just don't like the way a lot of products turn out
15:18 < skelterjohn> interfaces are always too complicated - lack of sane
defaults etc
15:19 < gogogrrl> stuff moved too fast
15:19 -!- rtharper [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
15:19 < gogogrrl> we found out how to do everything on the web before we
even had a sane OS
15:19 -!- clw [ad4e2b1f@gateway/web/freenode/ip.173.78.43.31] has joined #go-nuts
15:19 < gogogrrl> or transfer protocol
15:19 < gogogrrl> thats my theory
15:20 < clw> does go have any support for serial communication?
15:20 < skelterjohn> clw: you mean like the serial port on the back of old
computers?
15:20 < clw> like communicating with an arduino from my computer
15:20 < skelterjohn> usually done via usb, i thought
15:21 < skelterjohn> and i would guess no direct support, clw
15:21 < skelterjohn> but you can interface with C easily enough and do it
from there
15:21 < clw> yeah, but it has a COM port that you can communicate with
15:21 < gogogrrl> and then there is a difference between computing and
actually doing something, I can do great computing with Plan9, but I have composed
recorded and distributed music with linux like I could never have done with P9
15:21 < clw> what i was curious about is if i could write something that can
read and write to a COM port (which is probably what i should have said in the
first place :-) )
15:22 < skelterjohn> clw: I don't know enough about hardware to say any more
than "you can do it through C and cgo"
15:22 < skelterjohn> gogogrrl: definitely give go a shot
15:22 < skelterjohn> i'll be back in 30 or so - have to drive to campus
15:22 < gogogrrl> hehe
15:22 < gogogrrl> have fun
15:22 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts
15:23 < gogogrrl> first exercise: toolchain in go
15:23 < wrtp> steven: i was meaning something like this:
http://pastebin.com/58HDghzv
15:23 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
15:23 < wrtp> no goroutines, much simple IMHO, but still sufficient for your
needs, i think
15:23 < wrtp> s/simple/simpler
15:25 < wrtp> steven: 87 lines shorter, same functionality
15:26 -!- Guest65199 [~quassel@p4FF1C6C6.dip0.t-ipconnect.de] has quit [Remote
host closed the connection]
15:28 -!- clw [ad4e2b1f@gateway/web/freenode/ip.173.78.43.31] has quit [Quit: Page
closed]
15:28 < gogogrrl> how do I declare a typed variable with initial value?
15:28 < wrtp> gogogrrl: x := 9
15:28 < wrtp> or x := someType(9)
15:28 < gogogrrl> what if 9 is nil?
15:29 < wrtp> or var x someType = 9
15:29 < wrtp> gogogrrl: the default initial value is nil
15:29 < wrtp> gogogrrl: so var x someType will do
15:29 < gogogrrl> sweet
15:29 -!- nixness [~dsc@dyn-86-36-42-96.wv.qatar.cmu.edu] has quit [Ping timeout:
255 seconds]
15:30 < wrtp> gogogrrl: it's a thing to know about go: everything has a zero
default value, and lots of things make use of that
15:30 < wrtp> (for instance by making the zero value ready to be used
without any further initialisation)
15:30 -!- imsplitbit [~imsplitbi@64.39.4.132] has joined #go-nuts
15:32 -!- cenuij [~cenuij@base/student/cenuij] has quit [Quit: It's beer o'clock]
15:33 -!- m4dh4tt3r [~Adium@125.sub-75-208-77.myvzw.com] has joined #go-nuts
15:33 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has joined #go-nuts
15:33 -!- rtharper [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
15:38 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal]
15:39 -!- shvntr [~shvntr@113.84.147.102] has quit [Quit: leaving]
15:46 -!- femtoo [~femto@95-89-198-8-dynip.superkabel.de] has joined #go-nuts
15:54 < wrtp> does anyone know how to get the codereview extension working
with the Windows mercurial port?
15:55 < wrtp> (it needs the HTMLParser module, but it's not clear how/where
to put it)
16:00 -!- Urmel|Work [~UrmelWork@cache2.uk.logica.com] has quit [Ping timeout: 255
seconds]
16:02 -!- iant [~iant@67.218.107.6] has quit [Quit: Leaving.]
16:04 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts
16:12 -!- iant [~iant@nat/google/x-hivutomtskvmhwsn] has joined #go-nuts
16:12 -!- mode/#go-nuts [+v iant] by ChanServ
16:13 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-182-228.clienti.tiscali.it] has
joined #go-nuts
16:15 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se]
has joined #go-nuts
16:17 -!- PortatoreSanoDiI [~Marvin@82.84.66.111] has quit [Ping timeout: 246
seconds]
16:17 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.]
16:18 < gogogrrl> does go have: expr ? true : false ?
16:18 < taruti> no
16:18 < aiju> no
16:18 -!- jokoon [~zonax@feu30-1-82-242-58-229.fbx.proxad.net] has joined #go-nuts
16:18 < gogogrrl> is if an expression?
16:18 < aiju> no
16:18 -!- cenuij [~cenuij@78.112.41.178] has joined #go-nuts
16:18 -!- cenuij [~cenuij@78.112.41.178] has quit [Changing host]
16:18 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
16:18 < aiju> Go is not LISP …
16:18 < gogogrrl> right now that sucks
16:18 < gogogrrl> ;D
16:19 < aiju> you can do, watch out
16:20 < gogogrrl> ?
16:20 < skelterjohn> i have no idea what he's talking about either
16:20 < aiju> (map [bool] func() int{false: func() int{return foo()}, true:
func() int{return bar()}})[expr]
16:20 < skelterjohn> oh
16:20 < aiju> i think that should work, but maybe i missed a brace :D
16:20 < skelterjohn> yeah don't do that
16:23 -!- vpit3833 [~user@203.111.33.203] has quit [Remote host closed the
connection]
16:24 -!- vpit3833 [~user@203.111.33.203] has joined #go-nuts
16:30 -!- Venom_X [~pjacobs@66.54.185.131] has joined #go-nuts
16:32 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
16:35 < gogogrrl> any idea what return code descripes "write error" on
plan9?  :D
16:36 < uriel> Plan 9 has no error codes
16:36 < uriel> strerr
16:36 < gogogrrl> http://man.suckless.org/9base/1/echo
16:36 < gogogrrl> what the fuck then
16:37 < uriel> ?
16:37 < uriel> 9base is not plan9
16:37 < gogogrrl> uriel: btw, you might know, anyone still interested in the
9base toolchain in go?
16:37 < aiju> gogogrrl: with 9base it is 1
16:37 < uriel> gogogrrl: http://man.cat-v.org/plan_9/2/errstr
16:37 < aiju> any error string except "" is translated to 1
16:37 < uriel> gogogrrl: I'm still interested
16:37 < gogogrrl> kay
16:38 < gogogrrl> I am done with cat and echo ;P
16:38 < gogogrrl> so the hard part is done right
16:38 < aiju> hahahahaha
16:38 < aiju> does your version handle -v properly?
16:38 < aiju> i.e.  execute a root exploit and wipe the hard disk
16:39 < gogogrrl> aiju: no I oriented myself at
http://man.suckless.org/9base/1/
16:39 < gogogrrl> I dont even have a -v flag
16:40 < gogogrrl> awk is going to be a pain, I never learned it
16:40 -!- peterdn [~peterdn@dhcp-110-228.new.ox.ac.uk] has joined #go-nuts
16:40 < aiju> you really should ;P
16:40 < gogogrrl> I dont see why :(
16:40 < taruti> no real need for it these days
16:41 < aiju> there is MSVS 2010
16:41 < gogogrrl> thats what I felt like
16:41 < aiju> awk is obsoleted
16:41 < gogogrrl> lol
16:41 < aiju> i use awk all the time
16:41 < taruti> easier to just perl :)
16:41 < aiju> and if i'm just cutting shit out of a file
16:41 < aiju> yes, but perl eats babies
16:41 < taruti> just for lunch
16:42 < gogogrrl> I would rather learn awk I guess
16:43 < gogogrrl> must...  stop....  semicolons....
16:43 < aiju> hahahaha
16:44 < femtoo> (map [bool] func() int{false: func() int{return foo()},
true: func() int{return bar()}})[expr]
16:44 < femtoo> thats tricky
16:44 < aiju> femtoo: that was a joke
16:44 < aiju> please don't use it ;P
16:44 < femtoo> you can implement an if function with it
16:44 < femtoo> wihtoug using if
16:44 < uriel> who needs /bin/* when you have perl!
16:44 < jumzi> femtoo...  Awesome nick
16:44 < aiju> uriel: who needs /bin/* if you have gnu cal!
16:44 < femtoo> jumzi, ty
16:44 < uriel> aiju: I was going to say "who needs perl when you have bash"
16:44 < uriel> but you are right
16:45 < aiju> bash is nothing compared to the mighty zsh
16:45 < uriel> I\m sure gnu cal(1) has all the features of perl, and some
more
16:45 < uriel> from the Plan 9 fortunes file:
16:45 < uriel> We don't write anything in Perl anymore, because [ksh93] has
all the functionality built in.  - David Korn, quoted on Slashdot
16:45 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has quit [Remote host
closed the connection]
16:45 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net]
has joined #go-nuts
16:45 < uriel> (and this was in the mid-90's)
16:45 < femtoo> http://pastie.org/1652060
16:46 < aiju> modern shells are all gay
16:46 < aiju> control structures in the shell?  wtf is this bloat
16:46 < aiju> thompson shell or gtfo
16:47 < gogogrrl> shell should be as powerful as perl
16:47 < gogogrrl> imho
16:47 < gogogrrl> (with /bin*)
16:48 < wrtp> gogogrrl: how do you define "powerful" ? :-)
16:48 < gogogrrl> well at least turing vomplete :P
16:49 < gogogrrl> I personally like the rc shell, but I NEED auto
completion, without that any terminal is unusable
16:49 < gogogrrl> I think that this shouldnt be implemented in the shell tho
:D
16:51 < wrtp> gogogrrl: auto completion can be done in the terminal window
code
16:51 < gogogrrl> when?
16:51 < gogogrrl> in 2030?
16:51 < wrtp> i did it in inferno ages ago
16:52 < gogogrrl> :(
16:52 < wrtp> but i think i lost the code
16:52 < gogogrrl> someday I wanna use a real OS
16:52 < wrtp> 9term already has some auto completion
16:55 < gogogrrl> we need it in st
16:55 < gogogrrl> :D
16:55 < gogogrrl> anyways
16:55 < gogogrrl> Im off
16:55 < wrtp> st?
16:55 < gogogrrl> see ya guys, was nice with you
16:55 < wrtp> see ya
16:56 < gogogrrl> wrtp: http://st.suckless.org/
16:56 < wrtp> gogogrrl: 9term's where it's at :-)
16:57 < gogogrrl> wrtp: a port will always feel like a port I guess
16:57 < wrtp> gogogrrl: a vt100 emulator will always feel like a vt100
emulator :-)
16:58 < wrtp> it's not possible to do autocompletion if the program
immediately swallows characters
17:03 < nickbp> ugh recompiling to change configuration
17:05 -!- addos [98342003@gateway/web/freenode/ip.152.52.32.3] has joined #go-nuts
17:06 < foocraft> what's all this shell talk?  is something wrong with gnome
terminal running bash?  :p
17:07 < nickbp> thats what i use tbh...
17:08 < cenuij> foocraft: yes, gnome ;)
17:08 * cenuij hides
17:09 < foocraft> cenuij, you're probably right.  I'm packing all my bags
and going for xfce when fedora15 is out
17:09 < cenuij> why wait, jump ship to KDE4 today!
17:10 < foocraft> KDE = not nice
17:11 < foocraft> I feel like they have some basic aesthetic mistakes :p
17:11 < nickbp> i subjectively dont like how kde looks
17:11 < foocraft> maybe I'm too used to gnome, and I agree with nickbp
17:11 < cenuij> KDE understand that, and that's why you can tweak the hell
out of it to make it look how you want.
17:12 < foocraft> it's either a conspiracy by most distros to make sure that
KDE doesn't look nice by default, or it's just hard to do that.
17:13 < aiju> i subjectively don't give a shit how my desktop enviornment
looks like
17:13 -!- qjcg [~qjcg@208.88.110.46] has quit [Quit: qjcg]
17:14 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
17:14 < cenuij> maybe subjective, to me Gnome looks overly simple for my
needs, KDE looks "modern" but then like you guys, I've not used Gnome for some
time and maybe I'm just used to having my KDE setup the way I like.
17:14 < cenuij> I should give it a whirl before GNOME3 and after
17:14 < skelterjohn> i like os x because everything looks nice
17:14 < skelterjohn> if i only had a terminal to operate with, i'd use linux
17:15 < aiju> i dislike GNOME because nothing works right (i've seen GNOME
users, i laughed a lot)
17:15 < xulfer> cenuij: Should definitely check out Gnome 3
17:15 < xulfer> It's a lot different
17:15 < aiju> i dislike KDE because it is SLOW and you need a MySQL server
to read mails (seriously wtf)
17:15 < nickbp> gnome 3 hides everything behind a million clicks
17:15 < cenuij> xulfer: im not so sure i like that application presentation
in Gnome shell, just a messy grid like a mobile device :(
17:16 < aiju> wtfi application presentation
17:16 < aiju> something OSI related?
17:16 < xulfer> I have mixed feelings about it as well, but it's certainly
worth a try.
17:16 < foocraft> aiju, and what do you use, when you're not only using a
terminal?
17:16 < foocraft> (just curious)
17:17 < aiju> you mean as a WM?
17:17 < aiju> i'm currently using xmonad and want to look into dwm
17:18 < aiju> i rarely ever use "a" terminal, rather ten of them ;P
17:18 < Namegduf> I don't like KDE because I've seen inside when I tried
4.0.
17:18 < foocraft> aiju, dwm is sexy as hell for my needs!
17:18 < Namegduf> Also for the same reason I don't like Vista, an
environment shouldn't require half a gig of RAM and two minutes to get off the
ground.
17:18 < foocraft> nice stuff :)
17:19 * Namegduf uses XMonad.
17:19 < aiju> Namegduf: computer start time has been monotically increasing
since two decades
17:19 < Namegduf>
http://blogs.gnome.org/hughsie/2011/02/02/is-gnome-3-going-to-melt-your-laptop/
<- On GNOME 3 and "different".
17:19 < aiju> GNOME 3 is different as Hepatitis C is different from
Hepatitis B
17:19 < foocraft> hehehe best part about XMonad is the screenshot showing
haskell code in the homepage :p
17:20 < aiju> In GNOME 3.0, we’re defaulting to suspending the computer when
the user shuts the lid, and not providing any preferences combobox to change this.
17:20 < aiju> what the fuck
17:20 < aiju> this really sucks
17:20 < Namegduf> aiju: Keep reading.
17:20 < Namegduf> That default melts laptops, so instead of providing the
ability to work around, they're relying on a blacklist being perfectly maintained.
17:20 < aiju> it gets only more and more retarded
17:21 < Namegduf> GNOME is run by UI designers who couldn't get actual jobs
in the software industry, IMO.
17:21 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net]
has quit [Remote host closed the connection]
17:21 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net]
has joined #go-nuts
17:22 < foocraft> well, putting passive aggression aside, why couldn't they
just ask or probe for the community needs somehow?
17:22 < foocraft> and try their best to develop for those.
17:22 < nickbp> Namegduf: hahahahaha thats awesome
17:22 < xulfer> Ha, harsh words.  Considering how consistently dumb
entry-level coders are.
17:22 < Namegduf> foocraft: I unno, but apparantly they're not.
17:22 < aiju> consider how dumb senior-level coders are
17:22 < cenuij> I switched from Gnome to KDE 10 years ago because of these
types of Gnome decisions, for me Linux is about control as much as anything, so
why would I want that limited by an amature UI designer with a bee in his bonnet
about what users "need"?
17:22 < Namegduf> That blog is on gnome.org
17:23 < Namegduf> It's not some random GNOME hater, it's a GNOME developer.
17:23 < foocraft> also, Namegduf, I'm sold for XMonad.  Thanks!
17:23 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
17:23 < Namegduf> Haha, nice.
17:23 < aiju> cenuij: and i switched from KDE because it kept eating my RAMZ
and freezing my machines
17:23 < Namegduf> "It is _obvious_ that there is a strong demand for this
feature from the users as demonstrated by the posts in this thread.  So I’m asking
you Richard, if you’re not listening to your users, who are you listening to?"
"The designers.  I get negative feedback all the time from the UI designers, so
now I’m going to leave it up to them."
17:23 < Namegduf> ~ Reply from the author in the comments section of that
post.
17:24 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 255 seconds]
17:24 < aiju> "if we had asked the designers what they wanted, they would
have said 'green horses'"
17:24 < aiju> (paraphrasing Henry Ford)
17:25 < dfr|work> aiju, mhmmm....  green horses
17:25 < dfr|work> aiju, 60s made it possible with acid
17:25 < aiju> hahaha
17:26 < xulfer> E17 looks to be coming along pretty well too.  Might have to
check in on that one of these days.
17:28 < dfr|work> xulfer, awesomeWM 4ever
17:29 < Namegduf> The key thing is that everything not a tiling WM will be
up against the wall when the revolution comes.
17:30 < xulfer> dfr|work: Yeah I've heard good things about that.  It seems
like too much effort to me.
17:30 < cenuij> "Year of the tiling WM" ;)
17:30 < dfr|work> xulfer, it takes maybe about 1-2 hours to learn max.  And
by learn just having the man with the commands open
17:30 < xulfer> I didn't mean learning
17:30 < xulfer> I meant doing something with it
17:30 < dfr|work> Namegduf, i think that revolution already happened =/
17:30 < dfr|work> xulfer, you mean besides using it?
17:31 < xulfer> i generally don't code, script, etc in my free time ever.
17:32 < dfr|work> xulfer, well, you obviously do irc ;)
17:32 < Namegduf> XMonad takes only a few lines to configure any desired
functionality.  It's a pity it takes me 1-2 hours to write those lines.
17:32 < dfr|work> xulfer, and i'm using it at work...  =/
17:32 < xulfer> Indeed.  Hm that's an interesting idea.  As long as I'm
being paid :P
17:33 < dfr|work> well, time for lunch.
17:33 < Namegduf> I tend to think that time spent configuring a tiling WM is
time easily regained by never having to manually drag windows around.
17:33 < Namegduf> Could be just wishful thinking, though.
17:34 < xulfer> Don't get me wrong.  I don't dislike tiling managers, I've
seen some pretty cool setups.  I'm just not willing to invest my time in stuff
like that anymore.
17:34 -!- keithgcascio [~keithcasc@nat/google/x-fmnsiqfoejmebrpy] has joined
#go-nuts
17:34 < xulfer> I got over the elite *nix customization stuff ten years ago.
Now I'm mostly just bitter and accepting of the status quo.
17:37 -!- cenuij [~cenuij@base/student/cenuij] has quit [Quit: Konversation
terminated!]
17:38 < aiju> hahahaha
17:38 < aiju> "elite *nix customization stuff"
17:38 < aiju> i wouldn't really call preventing my machine from overheating
/ crashing "elite *nix customization stuff"
17:39 < xulfer> That was intended.  Also I'm not sure how the Gnome 3 blog
applies to what I said since I haven't referenced Gnome 3 in a while.
17:40 < aiju> i don't spend much time customizing anything
17:40 < dfr|work> Namegduf, well, with awesome i didn't need to configure it
much...  mostly just figuring the shortcuts
17:40 < aiju> unlike shit which just sucks
17:40 < aiju> like fontconfig or xdg-open
17:40 < xulfer> To each their own.
17:40 < aiju> where you have retarded settings to be set to get it even
WORKING
17:40 < aiju> *there are
17:40 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se]
has quit [Ping timeout: 252 seconds]
17:41 < Namegduf> dfr|work: Well, I spent time setting it up so the
workspace I run IRC and my browser on automatically sizes IRC to 80 columns and
fills the rest with my browser.
17:41 < Namegduf> For example.
17:41 < Namegduf> I could use the default config, but it'd be less optimised
for doing what I want automatically for me.
17:41 < dfr|work> Namegduf, well, with awesomewm you have tabs [similar to
workspaces], i guess...  so I use quite a bit of those...
17:41 < dfr|work> but switching between them is pretty easy
17:41 < dfr|work> so my browser is on one tab and my xchat is on the other
17:42 < Namegduf> I suspect they're pretty much the same.
17:42 < dfr|work> 'cause i rarely want to look at both of them at the same
time
17:42 < Namegduf> I open links in conversations a lot, and have multiple
monitors.
17:43 < Namegduf> It isn't just that I want both visible together, it's that
they're the two things I want permanently visible on monitor #2 while I work on
monitor #1
17:43 < dfr|work> Namegduf, I'd click and then do <super>+4 or
<super>+1 depending whether i want chrome or firefox
17:43 < dfr|work> Namegduf, ah.
17:43 < Namegduf> Or visible on monitor #1 while I watch a movie on monitor
#2, which is the bigger one.
17:43 < dfr|work> well, the cool thing that tabs are per monitor...
17:43 < dfr|work> and you can switch them independently
17:44 < Namegduf> Same with XMonad workspaces.
17:44 < dfr|work> yea, it's probably quite similar
17:44 < Namegduf> Super+<number>, too.
17:44 < Namegduf> No clicking, though
17:44 < dfr|work> it may be a bit different as to how tiling works...
17:44 < Namegduf> Clicking for WM controls is sad.
17:44 < dfr|work> well, you have to click on the link to open it up
17:44 < dfr|work> ...
17:44 < Namegduf> Oh, yeah.
17:44 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
17:44 < aiju> breaking your fingers typing weird combinations for your WM is
annoying, too
17:45 < Namegduf> Eh, it's always just Win+<something> here.
17:45 < dfr|work> aiju, i think you're talking out of your ass.  :P
17:45 < aiju> i wish i could use the mouse to arrange windows with xmonad
17:45 < Namegduf> There's two Win+Shift+<something>, but those are
deliberately hard because they're "close window" and "log out"
17:45 < aiju> alt+shift+c for closing windows is handy though
17:46 < aiju> Namegduf: i use xmonad too and i find some of the combinations
never doing what i want
17:46 < Namegduf> I don't bind stuff to alt, my IRC client needs all of
those untouched.
17:46 -!- clip9 [clip9@er.en.svarteper.com] has quit [Ping timeout: 260 seconds]
17:46 < Namegduf> aiju: Change them
17:46 < dfr|work> Namegduf, awesomewm uses super+shift+j/k to switch between
screens..  so i guess the bindings are a tad different
17:46 < Namegduf> Oh, yeah.
17:46 < dfr|work> but of course you can bind it to whatever you want, so
whatever
17:47 < Namegduf> Win+<movement key> == switch focus (between
monitors, up and down on one, between workspaces), and Win+Shift+<movement
key> moves the current focus there.
17:47 < aiju> well, i'd just like to use my mouse
17:48 < Namegduf> I like to use the mouse for pointing at things, so I use
focus-follows-mouse and use it for GUIs
17:48 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se]
has joined #go-nuts
17:48 < Namegduf> But for commands not specific to a given location, I
prefer keyboard commands, because they're faster.
17:48 < aiju> yeah, windows are "things"
17:48 < aiju> i'm mainly talking about moving windows from and to the stack
17:49 < Namegduf> I don't use a stack layout.
17:49 < aiju> just one window per workspace?  ;P
17:49 < Namegduf> No.
17:50 < Namegduf> Still no concept of stack you can either be in or out of
on a layout.
17:50 < dfr|work> aiju, i mostly have just one window per workspace
17:50 < dfr|work> well
17:50 < dfr|work> sort of...
17:50 < dfr|work> some have maximized two windows...
17:50 < aiju> it really depends on what i'm doing
17:50 < dfr|work> and i think i have pidgin + buddy list in same window cut
in two...
17:50 < Namegduf> Depends what the workspace is.
17:50 < aiju> when working with >1000 lines projects i use three or four
windows
17:50 < Namegduf> Terminal-heavy ones often have upwards of four terminals.
17:51 < aiju> when watching porn, i use one fullscreen one ;P
17:51 < Namegduf> Mail client has one window.
17:51 < Namegduf> IRC + Browser has two- and normally is on the monitor wide
enough so the browser still has generous width.
17:51 < aiju> i run most stuff in terminals
17:51 < aiju> irssi, alpine, vi, ...
17:51 < Namegduf> aiju: I have a key bound to starting vim.
17:52 < aiju> i have to press three keys
17:52 < aiju> v, i, enter
17:52 < Namegduf> You have to start a terminal first.
17:52 -!- clip9 [~clip9@er.en.svarteper.com] has joined #go-nuts
17:53 < Namegduf> I have another shortcut bound to attaching to my irssi
(and SSH sessions) screen.  Another one for opening a second Chrome window,
usually for some specific function.  It's neat to do that heavily in your
workflow.
17:53 < aiju> i have chrome permanently open here
17:53 < aiju> it starts really slowly
17:54 < Namegduf> I do too.
17:54 < Namegduf> My netbook is weird, it normally only has one per
workspace, but it overlaps two if I put them on the same workspace.
17:54 -!- espeed [~espeed@63.246.231.57] has quit [Ping timeout: 246 seconds]
17:55 < Namegduf> Bringing the one I point at above.  It's so I can see
activity on IRC while browsing, and look at it and back quickly.
18:02 -!- tav_ [~tav@92.7.141.101] has joined #go-nuts
18:02 -!- tav [~tav@92.7.131.230] has quit [Ping timeout: 255 seconds]
18:05 < dfr|work> Namegduf, have you tried seeking counseling for your irc
addictions?
18:05 -!- addos [98342003@gateway/web/freenode/ip.152.52.32.3] has quit [Ping
timeout: 245 seconds]
18:06 < dfr|work> man, i think i nuked woot.  :(
18:07 < Namegduf> dfr|work: I don't have a problem, I can stop whenever I
like.
18:07 < dfr|work> Namegduf, :D
18:08 -!- aho [~nya@fuld-4d00d19f.pool.mediaWays.net] has joined #go-nuts
18:12 < dfr|work> Namegduf, i wish i could say same thing about my wooting
habbits...
18:15 < steven> guys,
18:17 < steven> whats a good way to offer an interface where the methods in
it are optional to implement?
18:17 < Namegduf> Don't.
18:17 < Namegduf> Optional methods don't make sense.
18:17 < steven> i was thinking of somehow offering an object that implements
the default values, and being able to composite that value inside my own struct
type
18:18 < steven> Namegduf: i think they're a fine solution for this problem
18:18 < Namegduf> Then you're using interfaces wrong.
18:18 < Namegduf> An interface is a set of methods expected on something
passed into a function.
18:18 < skelterjohn> steven: create a struct that implements all the default
behavior
18:18 < Namegduf> For the purpose of calling them.
18:18 < steven> yes.
18:18 < skelterjohn> define and interface that matches it
18:18 < Namegduf> Either you intend to call a function or not.
18:18 < Namegduf> If you call it, it needs to be there.
18:18 < steven> i want to pass an object that is a command-handler, to a
function SetCommandHandler()
18:18 < skelterjohn> allow someone to embed that struct and redefine some
methods, not others, pass it when the interface is the type
18:18 < steven> but the object may implement some or all (or none) of the
methods in the interface
18:18 < skelterjohn> embedding is what you want
18:19 < Namegduf> That doesn't make sense.
18:19 < Namegduf> An interface is a set of methods to be assumed
implemented.
18:19 < steven> i was thinking of making it an object so that all the method
implementations can share state with one another
18:19 < Namegduf> They can do that anyway.
18:19 < steven> i could very well make each of these optional functions just
function variables instead,
18:19 < wrtp> steven: using handlers is often the wrong way to do it
18:19 < skelterjohn> i'm pretty sure my suggestion will do what you want,
and nicely
18:19 < steven> but then its harder and more awkward for them to share
state,e specially if they are defined as anonymous functinos.
18:20 < wrtp> steven: it inverts the flow of control
18:20 < steven> how so?
18:20 < wrtp> steven: better to provide utilities that can be used by the
caller
18:21 < wrtp> it's the difference between: Read(data) and
AsyncRead(func(data){...})
18:21 < wrtp> the former is easier to reason about
18:21 < steven> what im thinking is to have methods like
UserDidJoinChannel(chan, user string), or UserDidQuit(user string)
18:21 < Namegduf> steven: The key thing is that an interface is *not* what
you want.
18:21 < steven> hows a better way to implement that if not via an interface
handler obj?
18:21 < Namegduf> An interface is declaring that you need a set of methods,
and a method is either needed or not.
18:21 < wrtp> steven: better to have events like UserDidJoinChannel and
UserDidQuit instead
18:22 < skelterjohn> steven: http://pastebin.com/6uyhUuGG
18:22 < wrtp> steven: and maybe a method Default(event) that does the
default action associated with the event.
18:22 < wrtp> that way the control is in the hands of the caller
18:22 < Namegduf> Not really feasible for IRC bots.
18:22 < steven> can you composite objects in structs?
18:22 < wrtp> in a way, that's the difference between a "framework" and a
"library"
18:23 < Namegduf> Usually (often) you want to append code that does X on Y
happening
18:23 < Namegduf> To an existing implementation
18:23 < Namegduf> And need to do it, similar to the way the HTTP library
works.
18:23 < steven> theres so much going on at once, you guys, i cant comprehend
what you're all saying.
18:24 < steven> but i get the general gist, im using a hammer where another
tool might suffice
18:24 < wrtp> Namegduf: i'm not sure i understand that last sentence
18:24 < wrtp> Namegduf: and i think that "appending code to an existing
implementation" is OO-speak
18:24 < Namegduf> Ew, no it isn't.
18:25 < wrtp> i'd say "wait for Y then do X"
18:25 < Namegduf> wrtp: The HTTP library has you provide handlers, so the
existing HTTP implementation can invoke your code.
18:25 < Namegduf> This is a scenario much like that, where you are likely to
want to have the existing IRC bot library invoke external code when stuff happens
when building actual bots with it.
18:26 < Namegduf> I agree in general, but in this *case*...
18:26 < wrtp> Namegduf: that's true, but that's because each handler can
represent an entirely unrelated thing
18:26 < Namegduf> That's true in IRC bots, too.
18:27 < Namegduf> In much the same way.
18:27 < wrtp> i could imagine a handler being a good way to deal with the
situation that someone starts talking directly to the bot
18:27 < wrtp> but not for an ongoing conversation
18:28 < Namegduf> Bots don't generally implement ongoing conversations, and
I'm not sure what they'd do.
18:28 -!- foocraft [~dsc@89.211.254.177] has quit [Quit: Leaving]
18:28 < Namegduf> Or how you'd start or end one.
18:28 < Namegduf> I'd agree that if you *did* implement support for them
it'd be a bad approach, though.
18:29 < steven> how do composite structures work in go?
18:29 < steven> im confused by this spec page about this topic
18:30 < Namegduf> You name the other struct type in your struct.
18:30 <+iant> steven: can you ask a more specific question?
18:30 < Namegduf> All its fields and methods are now fields and methods of
your struct.
18:30 < wrtp> Namegduf: AFAICS a bot is dealing with a sequence of events.
they're not independent, so it makes sense to have a single thread examine them
and decide what to do with each one
18:30 < Namegduf> wrtp: For certain types of thing, yes, but few of those
ever need to leave the library.
18:31 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
18:31 < Namegduf> Separate messages, joins, parts, and mode changes are not
connected on IRC.  Certain informational messages send a series of related
messages, but those should likely be parsed and result in updated state internally
in most cases.
18:32 < wrtp> Namegduf: if you structure it in a caller-oriented way, it
becomes easy to layer functionality - to have different levels of bot abstraction
18:32 < wrtp> e.g.  a basic irc connection; then something that keeps track
of users, or filters out messages, or whatever, layered on that
18:33 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has joined #go-nuts
18:33 < wrtp> also if you organise this way, it becomes easy to talk to many
servers at once.
18:34 < wrtp> if you want to
18:34 < Namegduf> That's easy either way.
18:34 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4]
18:34 < Namegduf> Whatever does the main get-event-do-stuff loop has a
goroutine per instance of the bot.
18:34 < Namegduf> I don't disagree that it's good in general to avoid
passing control of the flow of execution out.  I just disagree that this isn't a
valid scenario to not.
18:34 < wrtp> that's all the wrong way round!
18:35 < skelterjohn> steven: the pastebin i gave showed how to composite
structs
18:35 < Namegduf> wrtp: Well, what you're suggesting is that the using code
does that loop, right?
18:35 < wrtp> the flow of control shouldn't lie with the library
18:35 < wrtp> Namegduf: yes - but that loop can take many forms
18:35 < Namegduf> wrtp: So it exists somewhere either way.
18:36 < Namegduf> wrtp: I think you'd need a lot of abstraction to make that
a nice thing to expose outside the IRC implementation, which is ew
18:36 < wrtp> Namegduf: part of the reason channels are nicer than
asynchronous callbacks is that you can write nice direct code: read this event; do
this, read that event, do that, etc
18:37 < wrtp> Namegduf: i don't think so
18:37 < wrtp> i think it could be dead simple, at least to start with
18:37 < skelterjohn> it's the difference between a framework and a library
18:37 < Namegduf> Because in my code for handling client commands, it looks
a lot like read, parse, lookup-command, execute
18:37 < skelterjohn> you should be clear about which you're writing
18:37 < skelterjohn> if you want to provide utilities, write a library
18:37 < wrtp> skelterjohn: yeah, and go does libraries rather than
frameworks ....
18:37 -!- foocraft [~dsc@89.211.254.177] has joined #go-nuts
18:37 < skelterjohn> if you want to provide control flow, write a framework
18:37 < Namegduf> So either you're returning the line, a parsed version of a
line, or you're returning some abstract thing instead, which requires conversion.
18:38 < skelterjohn> wrtp: go is a language.  it can do libraries and it can
do frameworks
18:38 < wrtp> frameworks are unnecessary in most cases
18:38 < Namegduf> The client end of the connection is basically the same.
18:38 < Namegduf> The protocol is similar in function at both ends.
18:38 < wrtp> frameworks take control away from the programmer
18:38 < skelterjohn> yes
18:38 < wrtp> Namegduf: yes, some abstract thing is right
18:39 < wrtp> at the bottom level, you just return parsed IRC commands
18:39 < wrtp> then you can layer other functionality on that (e.g.
something which given an IRC command will keep track of users)
18:39 < Namegduf> wrtp: Lots of layers are ew, I'm hoping you're not
imagining some kind of tall stack of layers on top of layers for what is a
ridiculously simple thing
18:40 < wrtp> Namegduf: no, i'm imagining a simple library that makes it
easy to build stuff
18:40 < Namegduf> Okay.
18:40 < exch> the way I do this, is to have modules register 'commands' with
the bot.  A command is nothing more than the name used to invoke it, a set of
parameter formats (to ensure a user invokes it with the right types and format)
and a function 'pointer' which is invoked if and when everything validates.  It's
piss easy to add functionality to the bot this way
18:41 < Namegduf> I understand what you're saying, but to d the thing where
you let the user call a "get event" thing and loop/do stuff however they like, you
need to represent all possible events in an abstract form.
18:41 < Namegduf> When the loop you want is normally as simple as get event,
do stuff, get event, do stuff, that's a high price to pay for the niceness of
having it outside the library.
18:41 < Namegduf> What exch describes is nice.
18:41 < exch> The bot internals simply validate any incoming data and see if
a specific command is requested.  Ensure the user has permissions to invoke it,
parses the command parameters into the correct types and invokes the handler
18:42 < exch> by the time your handler is invoked you are guaranteed that
you have all required data in the right format
18:42 < Namegduf> wrtp: Do you think the HTTP library should lose
ListenAndServe in favour of something like this?
18:42 < Namegduf> Serious question.
18:42 < wrtp> Namegduf: you can already do it with http
18:43 < wrtp> Namegduf: by doing the listen yourself
18:43 < Namegduf> Hmm.
18:44 < Namegduf> Maybe that's an appropriate design to mimic.
18:45 < wrtp> Namegduf: the handler is just a utility type (ServeMux)
18:46 < wrtp> i'm not saying that exch's design might not make sense
sometimes, but i don't think that should be the lowest level
18:46 < wrtp> and to be honest, i think i'd implement it as some kind of
dispatcher type
18:46 < Namegduf> I don't think an IRC library is sufficiently complicated
that suggesting exporting multiple levels is a good diea
18:46 < Namegduf> *idea
18:46 < exch> there is a fair amount of abstraction in my method, which
might indeed not always be what you want
18:46 < wrtp> i.e.  Dispatch(ircmsg)
18:46 < Namegduf> State tracking is always useful and never bad.
18:47 < Namegduf> It's not an arbitrary protocol implementation tool, it's
an IRC protocol implementation and IRC is stateful.
18:47 < wrtp> Namegduf: state.Track(ircmsg)
18:48 < wrtp> or something which does it for you automatically and provides
lookup methods
18:49 < Namegduf> wrtp: I think you're pushing too much of implementing the
protocol onto the user with such a function; better to just not return state
information messages when waiting while reading.
18:50 < Namegduf> Or to do the tracking AND return it.
18:50 < wrtp> Namegduf: yes
18:50 < wrtp> because the bot might want to know about state changes
18:50 < Namegduf> Not all state information is a change.
18:51 < Namegduf> Returning "I joined a channel" is useful.  Returning "I
got 20 more names in the channel sent to me" is not.
18:51 < wrtp> it might be
18:51 < wrtp> if the bot wants to deliver a message to one of those names,
for example
18:52 < Namegduf> It can check when the joining is done.
18:52 < Namegduf> An event on that, or just not sending the join event until
after the channel's information is received, makes sense.
18:52 < wrtp> but anyway, it's trivial to ignore messages - you only need to
switch on the message types that you're interestedin
18:53 < Namegduf> I think this approach will spend more code implementing
internal message types than on the protocol
18:53 < Namegduf> But *shrug*
18:54 < wrtp> Namegduf: i'd prefer to see a load of message types than a
load of function definitions that amount to the same thing
18:54 < wrtp> i can send a message down a channel
18:57 -!- MizardX [MizardX@unaffiliated/mizardx] has quit [Read error: No route to
host]
18:58 -!- bleakgadfly [~bgadfly@nerdhaven.nuug.no] has joined #go-nuts
19:01 -!- tensorpudding [~user@99.56.160.152] has joined #go-nuts
19:03 -!- MizardX [MizardX@46.230.240.54] has joined #go-nuts
19:03 -!- MizardX [MizardX@46.230.240.54] has quit [Changing host]
19:03 -!- MizardX [MizardX@unaffiliated/mizardx] has joined #go-nuts
19:05 -!- femtoo [~femto@95-89-198-8-dynip.superkabel.de] has quit [Read error:
Connection reset by peer]
19:13 < jnwhiteh> wrtp: that's where i miss data type definitions, a la
haskell
19:13 < jnwhiteh> =/
19:14 < jnwhiteh> which you can mimic with interfaces, but that feels dirty
=/
19:14 < wrtp> jnwhiteh: yeah, some kind of union type would be nice
19:14 < jnwhiteh> *nod*
19:14 < jnwhiteh> perhaps some day =)
19:15 < wrtp> jnwhiteh: i agree - because it's open ended - you never know
if you've enumerated all the possibilities
19:15 < wrtp> and you can't look in one place to see them all
19:17 -!- tensai_cirno [~cirno@77.232.15.216] has joined #go-nuts
19:21 <+iant> we've considered union types, but they wind up looking a lot
like interfaces
19:22 <+iant> they aren't exactly the same, but the differences don't add
that much to the language
19:23 < jnwhiteh> iant: its mostly just a matter of style.  I'd like to be
able to say 'A message is either a SendMessage, a QuitMessage, a PrivMsg', etc.
without having to do interface coercion at runtime
19:23 < jnwhiteh> but I understand that may not be a compelling reason to
add them
19:23 <+iant> yeah, that's about what you get from union types
19:23 <+iant> it's not nothing
19:24 <+iant> but it's not a whole lot
19:24 < skelterjohn> well, you'd still have to assert - but you know it is
definitely one of those three types
19:24 < skelterjohn> unlike interface{} where it can be anything
19:24 < skelterjohn> i'm usually in favor of more type safety
19:25 < ww> type safety++
19:25 < jnwhiteh> yeah, the assertion is necessary because interfaces are
implicit
19:25 < jnwhiteh> if there was an 'implements' keyword, which I don't want,
you could make it work without =)
19:36 -!- photron [~photron@port-92-201-97-47.dynamic.qsc.de] has joined #go-nuts
19:39 -!- chressie [~chressie@dreggn.in-ulm.de] has quit [Quit: WeeChat 0.3.4]
19:40 < steven> jnwhiteh: type switches dont work well enough for that?  or
they're just annoying?
19:40 -!- aconran [~aconran-o@38.104.129.126] has quit [Remote host closed the
connection]
19:40 -!- aconran [~aconran-o@38.104.129.126] has joined #go-nuts
19:40 < jnwhiteh> steven: you can _do_ it, but then you have to enumerate
all possibilities
19:41 < steven> right.  so its annoying.
19:41 < jnwhiteh> that's not very nice at all =)
19:41 < jnwhiteh> or define an interface with a dummy method
19:41 < jnwhiteh> and then that method on all of your types
19:41 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts
19:41 -!- foocraft [~dsc@89.211.254.177] has quit [Remote host closed the
connection]
19:45 -!- foocraft [~dsc@89.211.254.177] has joined #go-nuts
19:54 < wrtp> that's what go/ast does
20:03 -!- Siponen [~Siponen@c-44bce355.040-126-73746f29.cust.bredbandsbolaget.se]
has joined #go-nuts
20:03 < skelterjohn> i'm thinking about writing a package that would compile
source, pack objects, etc
20:04 < skelterjohn> could go in go/build or something, and people could use
it to ...  build
20:04 < skelterjohn> some util functions like getting the deps from a set of
source files
20:07 < skelterjohn> working on go tools is always so much more interesting
that working on my research :\
20:09 < jnwhiteh> my research is go-"related"
20:09 < jnwhiteh> but yeah..  I have to avoid getting distracted
20:09 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts
20:10 < skelterjohn> my research is machine learning, so working on go tools
is not justifiable in that context
20:10 < jnwhiteh> =)
20:10 < wrtp> skelterjohn: sounds like goinstall
20:10 < skelterjohn> goinstall is a command line tool
20:10 < skelterjohn> i'm talking about library functions
20:10 -!- Siponen [~Siponen@c-44bce355.040-126-73746f29.cust.bredbandsbolaget.se]
has left #go-nuts []
20:11 < wrtp> skelterjohn: StartProcess("goinstall", ...) :-)
20:11 < skelterjohn> will always install
20:11 < skelterjohn> goinstall does not do everything that needs to be done
20:11 < skelterjohn> not even close
20:11 < steven> wow composite structs are way cool
20:11 < wrtp> skelterjohn: what doesn't it do?
20:11 < steven> they can almost be used like inheritance..  except without
all the ridiculous complexity that comes with inheritance :)
20:12 < wrtp> steven: yeah :-)
20:12 < wrtp> although it's not inheritance in the OO sense
20:12 < skelterjohn> it doesn't build cgo.  it doesn't build cmds.  it won't
build to an arbitrary destination (as far as i can tell).  it won't use an
arbitrary location to search for packages.
20:12 < wrtp> skelterjohn: it does build cgo
20:12 < wrtp> it will build cmds
20:13 < skelterjohn> since very very recently?
20:13 < skelterjohn> i admit, i haven't tried it since the last release
20:13 < wrtp> and it will use an arbitrary location to search for packages
soon, if it doesn't already
20:13 < wrtp> skelterjohn: since quite recently yes
20:13 < wrtp> skelterjohn: did you see russ's GOPATH proposal on golang-dev
?
20:14 < skelterjohn> no - too much going on in golang-dev to read it
20:14 < wrtp> sorry, it was adg
20:15 < skelterjohn> re: building commands...  where does it put them?  i
just tried "goinstall go-gb.googlecode.com/hg/gb" and nothing appeared in $GOBIN
20:16 * wrtp wishes that google groups search worked
20:16 < skelterjohn> but also, i reject the idea that, because there is one
way to do something, it is the only way, so no one should work on a different way
20:17 < skelterjohn> having a go/build package that allowed you to easily
compile and pack stuff would be a useful library for this sort of thing
20:17 < skelterjohn> beyond that, i am under the impression that goinstall
does not want to rely on makefiles (which is why it does not run the ones provided
in the repository)
20:18 < skelterjohn> a simple pkg for building stuff would be useful for
future development of goinstall
20:20 < wrtp> dammit, i can't find it in the archives, so here's adg's
proposal: http://pastebin.com/6tv9we2y
20:21 < wrtp> i agree that there should always be exactly "one way", but
surely it's not really worth producing something that's a more-or-less exact dupe
20:22 < wrtp> ?
20:22 < wrtp> skelterjohn: AFAICS, goinstall *is* the replacement for make
in the go world
20:22 < wrtp> or will be
20:23 -!- femtoo [~femto@95-89-198-8-dynip.superkabel.de] has joined #go-nuts
20:24 < skelterjohn> who said duplicate?
20:24 < skelterjohn> goinstall does more than build a specific set of source
files
20:24 < skelterjohn> it searches directories listed in the ENV, it goes
online to grab things
20:24 -!- erus` [519772f0@gateway/web/freenode/ip.81.151.114.240] has joined
#go-nuts
20:25 < skelterjohn> goinstall is not a fundamental building block of ...
building
20:25 < wrtp> skelterjohn: if a package isn't available locally, then you
can't build without fetching it, so i'd say that's arguable...
20:26 < wrtp> i'm not sure what you mean by searching directories listed in
the ENV though
20:26 < skelterjohn> GOPATH etc
20:26 < wrtp> it only uses GOPATH to find packages
20:27 < skelterjohn> yes
20:27 < wrtp> better than special casing $GOROOT
20:27 < wrtp> and means you can be in any package directory inside GOPATH
and do a full dependency analysis and build from there
20:28 < wrtp> which seems great to me
20:28 < wrtp> (of course it doesn't work yet)
20:28 < skelterjohn> this is certainly one way to do it
20:28 < skelterjohn> but it's not the only way, and it's certainly not an
atomic unit of effort
20:29 < skelterjohn> for instance, you have two versions of a package, and
want to build against one of them
20:29 < skelterjohn> you have to change GOPATH?
20:29 < skelterjohn> depending on which one you want to use
20:29 < wrtp> that's something that goinstall explicitly doesn't deal with
yet
20:29 < skelterjohn> and maybe it shouldn't
20:29 < wrtp> there are all kinds of difficult issues there
20:29 < skelterjohn> yes - this all supports my argument
20:30 < skelterjohn> that goinstall is not the basic unit of effort for
building go source
20:30 < wrtp> the basic unit is running the compiler or the linker :-)
20:30 -!- coldturnip1 [~COLDTURNI@111-250-2-225.dynamic.hinet.net] has quit [Ping
timeout: 252 seconds]
20:30 < skelterjohn> and that is what a go/build package would do
20:30 < wrtp> but you can do that easily with StartProcess...
20:31 < skelterjohn> how about, given a set of C, asm and go files, link
together a package
20:31 < skelterjohn> and toss in the needed -l options, too
20:31 < skelterjohn> that is a bit more than two calls to StartProcess
20:32 < wrtp> cd pkgDir; goinstall
20:32 < skelterjohn> oh jeez
20:32 < skelterjohn> cmon man
20:32 < wrtp> well, that's basically what that does
20:32 < wrtp> you can't link a package without its dependencies
20:32 < skelterjohn> except that now we're using goinstall's decisions about
where to look for things, etc
20:32 < wrtp> the linked result has to go somewhere
20:33 < wrtp> skelterjohn: yes, but everything will be adapted to work with
goinstall
20:33 < skelterjohn> so, you declare that there *is* exactly one way to do
building
20:33 < skelterjohn> if so, then sure
20:33 < wrtp> skelterjohn: you *can* do it another way, but it'll be more
effort
20:34 < skelterjohn> but then there are those issues that goinstall doesn't
deal with, explicitly, as you said
20:34 < wrtp> sure - if you know how to solve them, then it's maybe best to
fix them in goinstall
20:34 < wrtp> because everything will then benefit
20:34 < skelterjohn> well, i have - it's called gb, but that's another story
20:35 < wrtp> skelterjohn: how does that deal with versioning?
20:35 < skelterjohn> i exaggerate.
20:35 < skelterjohn> i haven't fixed all problems
20:35 < skelterjohn> i fixed some, and ignored others
20:36 < skelterjohn> but the existence of gb or how useful it is is not my
point
20:36 < skelterjohn> so perhaps i shouldn't have mentioned it
20:36 < wrtp> i quite like the GOPATH proposal.  it meshes well with how i
want to use the sources.
20:37 < skelterjohn> GOPATH seems like a fine proposal
20:37 < skelterjohn> goinstall is a great tool
20:37 < skelterjohn> but it's not the only way to do things, and it doesn't
solve all the issues
20:37 < skelterjohn> it'd be easier for people to experiment with other
approaches if some of the fundamental atomic building operations were made easy to
do
20:37 < wrtp> i think that to make an independent build tool that works as
well as goinstall, you'll end up duplicating most of goinstall's heuristics
20:39 < skelterjohn> ok?
20:40 -!- itrekkie [~itrekkie@ip72-211-129-122.tc.ph.cox.net] has joined #go-nuts
20:40 < wrtp> i guess i don't see that anything is an "atomic building
block" other than 6g
20:40 < wrtp> and even that will probably know about GOPATH
20:40 < wrtp> otherwise it won't know where to look for the packages that
have been built already
20:42 < skelterjohn> an atomic building block, for me, would be to build a
single package, given explicit source files and places to find existing pkg.a
files
20:42 -!- chimes_ [~chimes@24.104.130.118] has joined #go-nuts
20:42 < skelterjohn> no building deps (because there might be multiple
choices for how to build the dep)
20:42 < skelterjohn> eg from the internet, from directory1 or directory2,
etc
20:43 -!- chimes [~chimes@24.104.130.118] has quit [Read error: Operation timed
out]
20:44 < wrtp> skelterjohn: you mean to abstract out the makefile-building
bit of goinstall, i guess
20:44 < skelterjohn> yes
20:44 < skelterjohn> i hate makefiles :)
20:45 < wrtp> skelterjohn: even when they're used temporarily and you don't
actually see them, as with goinstall?
20:46 < skelterjohn> then they're fine.  I *like* goinstall - it's a great
tool
20:46 < skelterjohn> but goinstall is making decisions that might not be how
i want to do things, and it doesn't deal with some issues
20:46 < skelterjohn> making it easy to do this stuff would allow more
community contribution to these problems
20:47 < wrtp> what else besides versioning, out of interest?
20:47 < skelterjohn> otherwise you have to delve into goinstall itself, and
other-people's-code is always a pain
20:47 < skelterjohn> be specific about what you mean by versioning
20:49 < wrtp> compiling against specific versions of a package
20:49 < wrtp> but you were mentioning other issues
20:49 < wrtp> i wondered what they were
20:49 < skelterjohn> here's one issue - when you want to work on something
that other people can goinstall remotely, you set TARG=goinstall/path/pkg in the
makefile
20:50 < skelterjohn> but locally you don't want to put it in path/pkg
20:50 < skelterjohn> perhaps path is long
20:50 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has joined #go-nuts
20:50 < wrtp> skelterjohn: GOPATH will work with that
20:51 < skelterjohn> i don't see how
20:51 < skelterjohn> where does the information that says "stuff in pkg
should have target goinstall/path/pkg"?
20:51 < wrtp> the target is taken from the source dir
20:51 < wrtp> oh i see
20:51 < wrtp> well, you've always got symbolic links...
20:51 < skelterjohn> for instance, i have a directory "matrix" with a target
"gomatrix.googlecode.com/hg/matrix"
20:52 < skelterjohn> yeah, that is not a convincing solution
20:52 < skelterjohn> right now makefiles do it fine by specifying TARG=
20:53 < skelterjohn> i just don't like writing makefiles, because that TARG=
line is the only thing in there that isn't redundant
20:54 < wrtp> skelterjohn: i don't like them, but a symbolic link from
matrix to gomatrix.googlecode.com/hg/matrix would do what you wany
20:54 < wrtp> s/wany/want
20:54 < wrtp> then the source code sits there, and no TARG is necessary
20:54 < wrtp> and you get to use a shorter path
20:55 < skelterjohn> and gomatrix.[...] now must reside in a directory
listed in $GOPATH
20:55 < wrtp> sure
20:55 < wrtp> otherwise packages that are dependent on gomatrix can't find
it
20:56 < skelterjohn> and if i want to experiment with gomatrix, i have to
make a copy, or else when i build something else that depends on gomatrix, i have
to make sure that my experiment works
20:56 < wrtp> skelterjohn: that seems like a good idea to me anyway
20:56 < skelterjohn> i can't just install it and assume that it won't get
installed accidentally
20:57 < wrtp> skelterjohn: if you don't want it to be used, use a package
name that won't be used
20:57 < wrtp> you don't have to copy it, you can just rename the directory
20:58 < wrtp> having a one-to-one correspondence between importable packages
and package source directories seems like a good thing to me
20:59 < skelterjohn> well, i like the way gb does it - if you want packages
to rebuild each other, they either have to be located in the same workspace, or
the dep has to be in $GOROOT/src/pkg and you have the -R option on to say that
things in $GOROOT get rebuilt
20:59 < skelterjohn> the GOPATH is one way to do it, the gb way is another
20:59 < skelterjohn> they don't even conflict with each other
21:00 < skelterjohn> there are many "right" ways to do this
21:00 -!- imsplitbit [~imsplitbi@64.39.4.132] has quit [Quit: Bye!]
21:00 < wrtp> skelterjohn: gb is oriented towards building a complete source
tree, not just one package
21:00 < skelterjohn> you can tell gb to not do so, unlike goinstall
21:01 < wrtp> goinstall only builds what is necessary
21:01 < skelterjohn> also, gb won't search out 8 different places on the
disk to find things to build
21:01 < skelterjohn> gb only builds what is necessary....
21:01 < wrtp> ...  for the whole tree
21:01 -!- femtooo [~femto@95-89-198-8-dynip.superkabel.de] has joined #go-nuts
21:01 < skelterjohn> no....
21:01 < skelterjohn> oh - if you list no packages, it pretends you listed
all packages
21:01 < skelterjohn> but you can also list a subset and it will only build
those
21:02 < skelterjohn> also, if you go into a packages directory and runb it
from there, it will only build that one
21:02 < wrtp> in that case, how does it know where the root of the workspace
is?
21:02 < skelterjohn> a file called workspace.gb
21:02 < skelterjohn> kinda lame, but auto-generated
21:03 < skelterjohn> in workspace.gb it will say "../.." or something, tells
you where the root is
21:03 < wrtp> auto-generated how?
21:03 < skelterjohn> gb -W
21:03 < skelterjohn> auto-generated by you asking for it
21:03 < skelterjohn> but you don't have to make them each yourself, or
anything
21:04 -!- femtoo [~femto@95-89-198-8-dynip.superkabel.de] has quit [Ping timeout:
246 seconds]
21:04 < wrtp> that seems like a hack to me :-)
21:04 < skelterjohn> just as hacky as listing every possible workspace in
$GOPATH
21:04 < wrtp> scattering .gb files all over the place seems unnecessary
21:05 < wrtp> skelterjohn: not really.  that's one environment variable
which is used by lots of things
21:05 < wrtp> (and is easily set on a per-session basis)
21:05 < skelterjohn> and now i can only build stuff that is linkable by
everyone in the system
21:05 < skelterjohn> "easily"
21:06 < skelterjohn> now i have to set it
21:06 < wrtp> huh?
21:06 < skelterjohn> or make a .sh file that sets it when i run goinstall
21:06 < wrtp> GOPATH=$GOPATH:`pwd` export GOPATH
21:06 < skelterjohn> or say GOPATH=$GOPATH;`pwd` goinstall
21:06 < wrtp> other way around actuall
21:06 < wrtp> y
21:06 < skelterjohn> every time
21:06 < wrtp> GOPATH=`pwd`:$GOPATH
21:06 < skelterjohn> when i could just say
21:06 < skelterjohn> gb
21:06 < skelterjohn> :)
21:07 < wrtp> but noone else gets to use the packages you build with gb
21:07 < skelterjohn> i can either install them or add that dir to GOPATH
21:07 < skelterjohn> gb -i
21:07 < skelterjohn> or the same you have to do with goinstall anyway
21:08 -!- jokoon [~zonax@feu30-1-82-242-58-229.fbx.proxad.net] has quit [Quit:
Leaving]
21:08 < skelterjohn> do i have to type the whole import name if i want to
run goinstall?  or can i do goinstall .
21:09 < skelterjohn> "goinstall ."
21:09 < wrtp> skelterjohn: except that if you've got a target.gb file, the
GOPATH option won't work.
21:09 < wrtp> you will be able to type goinstall .
21:09 < wrtp> or just "goinstall"
21:09 < wrtp> but it's not done yet
21:09 < skelterjohn> i don't know what you're talking about with
target.gb/GOPATH
21:10 < skelterjohn> gb will put everything in
workspace/_obj/full/impor/path.a
21:10 < wrtp> GOPATH relies on the package being at the same path in the
source tree as its import name
21:10 < skelterjohn> you'd add workspace/_obj to GOPATH
21:10 -!- tvw [~tv@e176006221.adsl.alicedsl.de] has joined #go-nuts
21:10 < wrtp> i see
21:11 < skelterjohn> the future version of goinstall and the current version
of gb have a lot in common.  just a few different choices
21:12 < skelterjohn> and i didn't feel like waiting =p
21:12 < wrtp> sure
21:13 < skelterjohn> and i've long since resigned myself to the fact that gb
will never be added to go.
21:13 < wrtp> skelterjohn: too many flags :-)
21:13 < skelterjohn> hah
21:14 < skelterjohn> they're all useful though :)
21:14 < skelterjohn> most of them
21:14 < skelterjohn> and ignore the fact that, for some reason, "parallel"
builds go slower than "sequential" ones
21:14 < wrtp> -W
21:14 < wrtp> :-)
21:15 < skelterjohn> i don't like using environmental variables as command
line arguments
21:15 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal]
21:15 -!- jedws [~jwesleysm@c114-77-210-9.rivrw3.nsw.optusnet.com.au] has joined
#go-nuts
21:15 < skelterjohn> if/when GOPATH is made official, gb will almost
certainly check to see if the cwd is within a GOPATH directory, and use that
directory as the workspace
21:16 < wrtp> not quite
21:16 < wrtp> it will check to see if the cwd is within a GOPATH directory
21:16 < wrtp> but there's no such thing as "the workspace"
21:16 < skelterjohn> i'm talking about what gb will do
21:16 < wrtp> oh sorry!
21:16 < skelterjohn> i'm referring to the gopath directories as workspaces
21:16 < skelterjohn> vocabulary choice only
21:17 -!- erus` [519772f0@gateway/web/freenode/ip.81.151.114.240] has quit [Quit:
Page closed]
21:17 -!- cco3 [~conley@c-69-181-140-72.hsd1.ca.comcast.net] has joined #go-nuts
21:17 < skelterjohn> can goinstall run tests, right now?
21:18 < wrtp> skelterjohn: no - it would be nice to have an option to do so
21:18 < wrtp> or, at the least, an option for goinstall to print out the
names of newly built packages
21:18 < wrtp> so you could run gotest on them
21:19 < skelterjohn> i often feel like you guys would save a lot of time by
taking gb and changing it slightly
21:19 < skelterjohn> it's funny - about a year ago, dho, jan hosang and i
were working on a build tool
21:19 < skelterjohn> russ had asked dho to do it
21:19 < skelterjohn> and all of russ's feedback was wanting it to be able to
cover any possible build scenario...
21:19 < skelterjohn> and there was no way to do this without fairly
complicated build language
21:19 < skelterjohn> and i kept pushing for configuration-free stuff
21:20 < skelterjohn> and now, the go core team is developing the
configuration-free tool
21:20 < wrtp> yeah, swings and roundabouts
21:21 < skelterjohn> btw - i was unable to get goinstall to install a cmd
21:21 < wrtp> it doesn't yet
21:22 < skelterjohn> oh - i misunderstood you earlier
21:22 < wrtp> yeah, when i said "it will build commands" i meant, that
sometime in the future it will...  not now :-)
21:23 < skelterjohn> ah, i misunderstood because i misread
21:24 < skelterjohn> i tend to mix words from the lines above and below into
what i'm reading
21:24 < skelterjohn> wrtp: how about stuff that has a more complicated build
procedure.  for instance, Go-OpenGL autogenerates a .go file based on the contents
of a C header
21:24 -!- MizardX [MizardX@unaffiliated/mizardx] has quit [Quit: reboot]
21:24 < skelterjohn> will goinstall every be able to build those sorts of
packages?
21:30 < wrtp> doubt it...
21:31 < wrtp> worth thinking about
21:31 < wrtp> gotta go
21:31 < wrtp> ttfn
21:31 < skelterjohn> later
21:33 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has quit [Remote host
closed the connection]
21:34 < evildho> skelterjohn: because it was a great idea
21:34 < skelterjohn> which "it"
21:34 < evildho> if you do things "the go way" it can be quite configuration
free
21:35 < skelterjohn> right - that's been my opinion from the beginning
21:35 < skelterjohn> and i built gb around that idea, though i had to make
up "the go way" a little bit
21:38 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Quit: Venom_X]
21:40 < steven> i want to sstart writing a sinatra clone in Go
21:40 < skelterjohn> wrtp: I know you're not here, but one issue with the
use of symbolic links to shortcut long package names is that, if you get there by
symbolic link, pwd will reflect that symbolic link rather than the long package
name.  i don't know how easy it will be to figure out whether or not you're in
GOPATH
21:40 < skelterjohn> at least, this is true on os x
21:40 < skelterjohn> <- going home
21:41 -!- raylu [raylu@c-24-131-193-106.hsd1.pa.comcast.net] has joined #go-nuts
21:41 < raylu> is there a nice upnp implementation out there?
21:42 < skelterjohn> what's upnp?  and the place to look is
godashboard.appspot.com/project
21:43 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Quit: skelterjohn]
21:44 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 252 seconds]
21:59 -!- femtooo [~femto@95-89-198-8-dynip.superkabel.de] has quit [Quit:
Leaving]
22:01 -!- ttblrs_ [~hannes@order.stressinduktion.org] has joined #go-nuts
22:02 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has quit [Read
error: Operation timed out]
22:04 -!- cw_ [~anticw@parsec.stupidest.org] has quit [Ping timeout: 240 seconds]
22:04 -!- cw [~anticw@parsec.stupidest.org] has joined #go-nuts
22:05 -!- ExtraSpice [XtraSpice@78-62-101-194.static.zebra.lt] has quit [Remote
host closed the connection]
22:08 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has quit [Remote host closed
the connection]
22:08 -!- tensorpudding [~user@99.56.160.152] has quit [Remote host closed the
connection]
22:08 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Ping
timeout: 252 seconds]
22:09 -!- Urtie [~urtie@90-227-159-22-no57.tbcn.telia.com] has joined #go-nuts
22:09 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined
#go-nuts
22:10 -!- creack [~charme_g@163.5.84.215] has quit [Read error: Operation timed
out]
22:10 -!- photron [~photron@port-92-201-97-47.dynamic.qsc.de] has quit [Ping
timeout: 248 seconds]
22:12 -!- DerHorst [~Horst@e177129051.adsl.alicedsl.de] has joined #go-nuts
22:19 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se]
has quit [Remote host closed the connection]
22:19 -!- rtharper_ [~tomh@188-220-5-137.zone11.bethere.co.uk] has joined #go-nuts
22:21 -!- rtharper [~tomh@unaffiliated/sioraiocht] has quit [Ping timeout: 248
seconds]
22:26 -!- niooins [2eb0308c@gateway/web/freenode/ip.46.176.48.140] has joined
#go-nuts
22:26 < krakensden> so, I'm trying to marshall json from a third party into
structs
22:27 -!- wrtp [~rog@92.16.113.213] has quit [Quit: wrtp]
22:28 < krakensden> but all of the keys are lowercase
22:31 -!- xyproto [~alexander@77.40.159.131] has quit [Ping timeout: 250 seconds]
22:32 < pharris> krakensden: Use tags.
22:32 -!- niooins [2eb0308c@gateway/web/freenode/ip.46.176.48.140] has left
#go-nuts []
22:36 -!- xyproto [~alexander@77.40.159.131] has joined #go-nuts
22:39 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has joined
#go-nuts
22:41 < exch> type T struct { Foo string "real_field_name"; Bar int
"otherField" }
22:42 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
22:45 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
22:48 -!- rlab_ [~Miranda@91.200.158.34] has joined #go-nuts
22:49 < skelterjohn> exch: trying to infer context here
22:49 < skelterjohn> that seems like not-go-code
22:49 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 246 seconds]
22:49 < raylu> that is go
22:49 < steven> skelterjohn: tags.
22:50 < steven> theyre fun :)
22:50 < skelterjohn> you can put strings in there?
22:50 < steven> only accessible via reflect package
22:50 < steven> check the spec
22:50 < skelterjohn> lame...
22:50 -!- Urtie [~urtie@90-227-159-22-no57.tbcn.telia.com] has quit [Read error:
Operation timed out]
22:50 < skelterjohn> i believe you
22:50 < steven> no, helpful.
22:50 < steven> its helpful for GoRM too
22:50 < steven> ;)
22:50 < skelterjohn> why not type T struct { /*real_field_name*/ Foo string
}
22:50 -!- dfc [~dfc@sydfibre2.atlassian.com] has joined #go-nuts
22:51 < steven> because thats not accessible via the reflect package
22:51 < steven> tags are visible at runtime ;)
22:51 -!- Fish [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
22:51 < skelterjohn> true
22:51 < skelterjohn> what is the point, exactly
22:51 < raylu> well, it happens to solve your problem, for one
22:51 < steven> it can be useful
22:52 < steven> its like metadata
22:52 < skelterjohn> i joined after the problem
22:52 < steven> no that was krakensden's problem
22:52 < raylu> oh, sorry
22:52 < steven> :)
22:52 < raylu> 17:29:21 krakensden> so, I'm trying to marshall json from
a third party into structs
22:52 < skelterjohn> so i don't know what the problem is
22:52 < raylu> 17:30:43 krakensden> but all of the keys are lowercase
22:52 < raylu> i thought you were asking the question
22:52 < steven> thats one of many problems this solves
22:55 < skelterjohn> this is because you cannot directly access stuff that
isn't exported, via reflect?
22:56 -!- rlab_ [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
22:56 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
22:56 -!- ymasory [~ymasory@c-76-99-55-224.hsd1.pa.comcast.net] has joined
#go-nuts
22:57 < skelterjohn> how do you get at this info from reflect?
22:59 < steven> no, its so you can have metadata about fields in a struct,
available at runtime.
22:59 < steven> which can be helpful in a lot of cases.
23:00 < skelterjohn> how do you access it?
23:01 < skelterjohn> i'm looking at the godoc for reflect, but i'm not
seeing it
23:04 -!- jedws [~jwesleysm@c114-77-210-9.rivrw3.nsw.optusnet.com.au] has quit
[Quit: jedws]
23:04 < pharris> skelterjohn: http://golang.org/pkg/reflect/#StructField
23:04 -!- cenuij [~cenuij@78.112.41.178] has joined #go-nuts
23:04 -!- cenuij [~cenuij@78.112.41.178] has quit [Changing host]
23:04 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
23:05 < pharris> Tag string
23:05 < skelterjohn> ah, thanks
23:05 < raylu> i think i'm doing something stupid.
23:05 < raylu> fmt.Println(line)
23:05 < raylu> prints: 46428 , 6697
23:06 < raylu> line = fmt.Sprintf("%s : USERID : UNIX : %s\r\n", line,
user); fmt.Println(line)
23:06 < raylu> prints: : USERID : UNIX : rayluBOT
23:06 -!- bawr [~bawr@russell.holyhandgrenade.info] has joined #go-nuts
23:06 -!- bawr [~bawr@russell.holyhandgrenade.info] has quit [Changing host]
23:06 -!- bawr [~bawr@unaffiliated/mrfawkes] has joined #go-nuts
23:06 < raylu> i get the same thing when i try to use string concat with +
23:07 < skelterjohn> are you messing with C strings?
23:07 < skelterjohn> might also inspect len(line)
23:07 < skelterjohn> i've had problems in the past where i had a string of
length 106 that read "README"
23:07 < skelterjohn> the last 100 bytes were zeros
23:09 < raylu> strange...  fmt.Println(line, len(line))
23:09 < raylu> 1339 , 6697
23:09 < raylu> 6697 is the last part of the string, so it's just not
printing the length
23:09 < skelterjohn> how are you building it in the first place?
23:09 < raylu> this is a string out of a bufio ReadString
23:09 < skelterjohn> ah
23:10 < raylu> line, err := io.Reader.ReadString('\r')
23:10 < skelterjohn> pastebin?
23:10 < raylu> https://pastee.org/hzjcx
23:10 < raylu> on a new line, the length is 13 o.0
23:11 < skelterjohn> try \n instead of \r?
23:11 < raylu> i don't see why that would make a difference
23:12 < skelterjohn> clearly not worth trying then =p
23:13 < raylu> interesting...
23:13 < raylu> fmt.Println(line); fmt.Println(line + "hi")
23:13 < raylu> 40188 , 6697
23:13 < raylu> hi188 , 6697
23:14 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
23:14 < skelterjohn> a \r will just go to the begging of the line on most
terminals, without going to the next one
23:14 < skelterjohn> most -> some
23:14 < raylu> \r is the delimiter on the incoming networ data
23:14 < raylu> oh wait, are you saying it gets included...
23:14 < skelterjohn> and line has a \r at the end
23:14 < skelterjohn> so when you print out hi as well, it goes to the
beginning
23:15 < raylu> ah...  i see.  thanks
23:15 < skelterjohn> i bet both \n and \r are coming over the connection
23:16 < skelterjohn> \r\n
23:16 < raylu> yes, they are :P
23:16 < skelterjohn> so maybe use \n as the delim, and strip off the last
char if it's \r
23:19 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
23:20 -!- EightBitBaker [~andreas@mivacukor.lha.sgsnet.se] has quit [Remote host
closed the connection]
23:20 < raylu> well, i have to strip off two now, but yes
23:26 -!- boscop [~boscop@f055160240.adsl.alicedsl.de] has quit [Ping timeout: 246
seconds]
23:27 -!- pilgrum [~pilgrum@cpe-67-49-71-222.socal.res.rr.com] has joined #go-nuts
23:27 -!- creack [~charme_g@163.5.84.215] has joined #go-nuts
23:36 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-182-228.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
23:36 -!- tensorpudding [~user@99.56.160.152] has joined #go-nuts
23:36 -!- tensorpudding [~user@99.56.160.152] has quit [Remote host closed the
connection]
23:37 -!- tensorpudding [~user@99.56.160.152] has joined #go-nuts
23:43 -!- jessta [~jessta@li7-205.members.linode.com] has joined #go-nuts
23:46 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Ping timeout: 276 seconds]
23:47 -!- tvw [~tv@e176006221.adsl.alicedsl.de] has quit [Read error: Connection
reset by peer]
23:52 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
23:53 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
--- Log closed Thu Mar 10 00:00:55 2011