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

--- Log opened Tue Nov 24 00:00:30 2009
00:03 -!- ssmall [n=stuart@utdpat242007.utdallas.edu] has joined #go-nuts
00:03 -!- ssmall [n=stuart@utdpat242007.utdallas.edu] has left #go-nuts []
00:04 < fosho> bakkdoor: did you make install?
00:05 < bakkdoor> yeah did, now it worked
00:06 < bakkdoor> but is there no way to use them from within the project's
folder?
00:06 -!- skammer [n=skammer@79.139.142.29] has quit [Remote closed the
connection]
00:06 < Ibw> when you import, put a ./ in front of the package name
00:06 < Ibw> ie import "./mypackage"
00:07 < fosho> is it possible to use absolute paths like that also?
00:07 < Ibw> uh, it's worth a try
00:07 -!- franksalim [n=frank@adsl-76-221-202-115.dsl.pltn13.sbcglobal.net] has
joined #go-nuts
00:07 < Ibw> probably I would guess
00:07 < fosho> hehe
00:08 < Ibw> golang.org could really use a community wiki
00:08 < WalterMundt> Ibw: generally, I recommend using 6g -I.  and "import
foo" rather than "import ./foo"
00:08 < WalterMundt> we have gopaste, someone will write gowiki presently
00:09 < Ibw> WalterMundt: Sure, one could also do that.
00:10 < Ibw> WalterMundt: Huh, how does gopaste work?  Someone used the http
libs to write a server?
00:10 < Ibw> awesome
00:10 < WalterMundt> yeah, I'm pretty sure that's it
00:10 < WalterMundt> also I believe go-lang.org is hosted on a Go-based
webserver
00:10 < Ibw> That's so cool.  Someone should work on an MVC framework then
00:11 < WalterMundt> well, there's already the template module for
templating
00:11 -!- tomestla [n=tom@78.251.170.97] has quit [Read error: 110 (Connection
timed out)]
00:11 < WalterMundt> so building MVC-isms takes very little extra sauce
00:12 < Ibw> woah.  I am now very excited
00:14 -!- robot12__ [n=robot12@inferno.kgts.ru] has quit [Read error: 60
(Operation timed out)]
00:15 -!- rbohn [n=rbohn@192.206.100.4] has quit ["ChatZilla 0.9.85 [Firefox
3.0.15/2009101601]"]
00:15 < WalterMundt> Personally, I'm binding libidn's stringprep stuff right
now, after which I will have all I need to put together a Go SASL implementation
with basic features.  I think it should be an interesting exercise in writing an
API idiomatic to the language
00:19 < jordyd> What's so great about MVC?  I've only heard bad of it.
(I've not used it myself)
00:20 -!- ssmall [n=stuart@utdpat242007.utdallas.edu] has joined #go-nuts
00:20 < Ibw> jordyd: It's a well organized way to design an implement web
applications.  I don't know why you would have heard bad of it.  Google App engine
uses it (I think), so does Ruby on Rails
00:22 < jordyd> Ibw: Perhaps I'm confusing it for something else.  What does
it stand for?
00:22 < Ibw> Model View Controller
00:22 -!- scyth [n=scyth@rots.in.rs] has quit [Read error: 60 (Operation timed
out)]
00:22 < Ibw> jordyd:
00:22 -!- arquebus [n=sdf@201.139.156.133.cable.dyn.cableonline.com.mx] has joined
#go-nuts
00:22 -!- hackbench [n=hackbenc@78.179.182.49] has quit [Read error: 60 (Operation
timed out)]
00:23 < jessta> people often get View and Controller confused
00:23 < jessta> and put their view code in the controller
00:23 < jordyd> Ibw: Oh, I've only heard good things about that.  I was
thinking of some Microsoft technology, but I don't know what it's called, because
it doesn't have a Wikipedia page with the MVC acronym.
00:24 -!- lbrandy_ [n=lbrandy_@206.210.81.55] has quit ["Computer has gone to
sleep"]
00:24 -!- westymatt_ [n=westymat@173-17-254-31.client.mchsi.com] has joined
#go-nuts
00:24 -!- proto [n=Promethe@187.149.58.235] has joined #go-nuts
00:24 < jessta> jordyd: Microsoft also has asp.net MVC
00:25 < westymatt_> I basically need to have a "string" in a structure that
is required to be a certain value, should i use const for this?
00:25 < WalterMundt> jordyd: MFC I bet
00:25 < jordyd> WalterMundt: That was it.
00:25 -!- sliceofpi [n=Adium@c-98-194-205-176.hsd1.tx.comcast.net] has joined
#go-nuts
00:25 < WalterMundt> yeah, IME it's a uselessly thin OO layer on top of C
Win32 that abstracts nothing and gets in the way a lot
00:25 < WalterMundt> you can't use it unless you already understand the
underlying API pretty well
00:26 < WalterMundt> and if you do, you might as well just make the C calls
yourself in most cases
00:26 -!- Tuller [n=Tuller@pool-72-84-246-12.rcmdva.fios.verizon.net] has joined
#go-nuts
00:26 < WalterMundt> I haven't touched it since, oh, 2001 or so though; I
imagine it's pretty obsolete now
00:27 < Ibw> Any sample code that uses the http package?
00:27 < tor7> what's the point of gopack and .a files when packages have to
be compiled into a single object file?  is there something special going on there?
00:28 < jordyd> WalterMundt: So I was right about one thing: it is not
well-liked.
00:30 -!- arquebus [n=sdf@201.139.156.133.cable.dyn.cableonline.com.mx] has left
#go-nuts []
00:31 -!- snicket [n=Promethe@187.149.58.235] has quit ["Saliendo"]
00:32 -!- SRabbelier [n=SRabbeli@ip138-114-211-87.adsl2.static.versatel.nl] has
quit ["Leaving."]
00:32 < Ibw> Woah, you can type functions, so you can essentially create
function pointers-ish/callback functions.  I was looking forever for how to do
that.
00:33 < jordyd> Ibw: Pretty cool, isn't it?
00:34 < jordyd> Easy instant callbacks.  It's like buttered break all over
again.
00:34 -!- scyth [n=scyth@rots.in.rs] has joined #go-nuts
00:35 -!- itrekkie [n=itrekkie@ip72-200-106-163.tc.ph.cox.net] has quit []
00:36 -!- mkanat [n=mkanat@c-67-188-1-39.hsd1.ca.comcast.net] has joined #go-nuts
00:39 < WalterMundt> it's cooler than that
00:40 < WalterMundt> finally == defer (func() { x.Close(); })();
00:41 < WalterMundt> works even if x is a local, because the func has proper
lexical scope
00:41 < jordyd> How can you express something as cooler than butter on
bread?
00:41 < WalterMundt> you can emulate ruby-style bocks by having a call take
a func param, and then putting the code right in the parens
00:43 < WalterMundt> I recently saw the commit that builds a tolerable
exception mechanism on top of goroutines+channels+sched.Goexit()+closures...it's a
bit clunky but still impressive
00:43 -!- lilpenguina [n=penguina@adsl-71-141-127-179.dsl.snfc21.pacbell.net] has
quit ["Leaving."]
00:44 < Gracenotes> WalterMundt: interestingly, you don't even need the
parens around the func literal, which are required in JavaScript
00:44 < WalterMundt> I couldn't remember
00:44 < Gracenotes> as a minor syntactic note.  I think it looks pretty
clean, in go statements too :)
00:44 -!- jessicara [n=nya@unaffiliated/jessicara] has quit [Read error: 113 (No
route to host)]
00:45 -!- Garibaldi [n=adalton@173-16-117-14.client.mchsi.com] has quit ["Lost
terminal"]
00:46 < Gracenotes> you could also say defer x.Close(), with one statement
00:46 < Gracenotes> to trim it down possibly further :o
00:46 < WalterMundt> yeah, if that's all you want to do
00:46 < WalterMundt> I used the construct to send results down a reply
channel
00:46 < WalterMundt> so I didn't have to do it at any of 4 or 5 return
statements
00:46 < Ibw> Is there a limit to the number of LimitAndServe's that can be
called?  Do they stack, or do they just replace the previous call?
00:47 < Gracenotes> you mean defers?  they do stack, in a LIFO sense
00:49 < WalterMundt> no
00:49 < WalterMundt> perhaps http.ListenAndServe?
00:50 < WalterMundt> in that case, probably the limit is one
00:50 < WalterMundt> if you need to dispatch, see http.ServeMux
00:51 * Gracenotes should search source or something
00:51 -!- ssmall1 [n=stuart@utdpat242007.utdallas.edu] has joined #go-nuts
00:51 -!- teedex [n=teedex@204.14.155.161] has quit [Remote closed the connection]
00:51 < Gracenotes> haven't looked at http package yet.  so it does do
server stuff, then
00:51 < WalterMundt> server stuff and some VERY basic client stuff
00:52 -!- ssmall [n=stuart@utdpat242007.utdallas.edu] has quit ["Leaving."]
00:52 < WalterMundt> I had to hack it to be able to set request headers
00:52 < WalterMundt> they've got some of the API closed off in lowercase
until they get HTTP 1/1 pipelining/persistent connections in
00:53 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has quit [Read
error: 104 (Connection reset by peer)]
00:53 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has joined
#go-nuts
00:54 -!- rares_ [n=rares@c-69-143-38-77.hsd1.va.comcast.net] has joined #go-nuts
00:58 -!- skyfive [n=skyfive@74.1.186.114] has joined #go-nuts
00:58 < westymatt_> Can you have default values for parameters to a
function?
00:58 < jessta> westymatt_: nope
00:59 < westymatt_> jessta: this there some alternatives like with
enumerators?
00:59 -!- kota1111 [n=kota1111@210.251.90.241] has joined #go-nuts
01:00 -!- me___ [n=venkates@c-68-55-179-48.hsd1.md.comcast.net] has quit [Read
error: 60 (Operation timed out)]
01:01 -!- scyth [n=scyth@rots.in.rs] has quit [Read error: 60 (Operation timed
out)]
01:03 -!- Odemia [n=Odemia-D@207.47.143.154] has joined #go-nuts
01:04 -!- brrant [n=John@168-103-78-133.hlrn.qwest.net] has quit ["Leaving"]
01:04 < alexsuraci> woo, drastic performance boosts at gopaste
01:04 < alexsuraci> local benchmarks went from 2 seconds to <.2 seconds
01:04 < alexsuraci> back in a few
01:05 -!- me___ [n=venkates@c-68-55-179-48.hsd1.md.comcast.net] has joined
#go-nuts
01:05 < westymatt_> alexsuraci: where at on gopaste?
01:05 < alexsuraci> westymatt_: anywhere a pretty printer was involved
01:05 < alexsuraci> had some stupid code in, I remember thinking "meh I'll
fix it later", now it's fixed :P
01:05 < westymatt_> :) excellent!
01:06 < alexsuraci> basically I was collecting from Fprint in go/printer by
having a little collector struct with one attribute, a string
01:06 < alexsuraci> the Write method would just append to that string
01:06 < alexsuraci> I changed it to a StringVector that gets flattened into
a string at the end, that small change = 10x speed bump
01:07 < alexsuraci> it'd be nice if go/printer had something that would just
return rather than need a writer
01:07 < alexsuraci> back in a few though, movie watching
01:08 < westymatt_> ahh interesting, thanks for the insight
01:08 < Gracenotes> hm, I just realized what gopaste is an almost-anagram of
01:08 < Ibw> ?
01:09 -!- V1psta [i=Vipsta@unaffiliated/v1psta] has joined #go-nuts
01:09 -!- V1psta [i=Vipsta@unaffiliated/v1psta] has quit [Remote closed the
connection]
01:09 < Gracenotes> anyway, just dealing with traversing fake union types
(implemented via subtyping and type assertions) makes me really really really
really want sum/union types with pattern matching.  Please, soon :|
01:10 < Gracenotes> perhaps Go isn't so naturally declarative, but this is
just tedious..
01:11 -!- ssmall [n=stuart@utdpat242007.utdallas.edu] has joined #go-nuts
01:12 -!- ssmall1 [n=stuart@utdpat242007.utdallas.edu] has quit [Read error: 54
(Connection reset by peer)]
01:14 -!- ssmall [n=stuart@utdpat242007.utdallas.edu] has quit [Client Quit]
01:16 -!- alc [n=alc@114.245.254.17] has joined #go-nuts
01:16 -!- Intelliware [n=danielb@124-197-59-227.callplus.net.nz] has quit [Remote
closed the connection]
01:16 -!- gasreaa [n=atwong@nat/slide/x-rkqvayswoddlrejr] has left #go-nuts []
01:16 -!- StDan [n=danielb@124-197-59-227.callplus.net.nz] has joined #go-nuts
01:18 < Ibw> what was the anagram?  Postage?
01:18 -!- randomiser [n=james@nat-studcudn-172-24-62-0.fitz.cam.ac.uk] has quit
[Read error: 110 (Connection timed out)]
01:18 -!- rares_ [n=rares@c-69-143-38-77.hsd1.va.comcast.net] has quit
["Leaving..."]
01:18 -!- randomiser [n=james@78-105-103-158.zone3.bethere.co.uk] has joined
#go-nuts
01:19 -!- twhitbeck [n=tim@pool-74-109-232-37.pitbpa.fios.verizon.net] has joined
#go-nuts
01:20 -!- djanderson [n=dja@hltncable.pioneerbroadband.net] has joined #go-nuts
01:20 -!- triplez [n=triplez@218.212.225.52] has quit []
01:20 < jordyd> Ibw: He said it was /almost/ and anagram.
01:20 -!- moraes [n=moraes@187.39.148.176] has quit ["Leaving."]
01:21 < jordyd> an*
01:21 -!- alc [n=alc@114.245.254.17] has quit ["Ex-Chat"]
01:22 -!- alc [n=alc@114.245.254.17] has joined #go-nuts
01:22 < Ibw> Alright then, what was it?
01:23 -!- eno__ [n=eno@70.137.167.212] has joined #go-nuts
01:23 < s_mosher> Ibw, it doesn't have a P in it
01:23 -!- lambo4jos [n=chatzill@c-76-126-250-10.hsd1.ca.comcast.net] has joined
#go-nuts
01:24 < Ibw> stoppage?
01:26 < s_mosher> no no, the answer has no Ps
01:26 < s_mosher> actually
01:26 < s_mosher> I envy you for not arriving at it instantly
01:26 < Ibw> oh
01:26 < Ibw> wait
01:27 < Ibw> gopaste...
01:27 < Ibw> oh...
01:27 -!- Netsplit orwell.freenode.net <-> irc.freenode.net quits:
DJCapelis, mfb, hooopy, sfuentes, kuroneko, KiNgMaR, spikebike, chipdude, korfuri,
nigeltao, (+9 more, use /NETSPLIT to show all of them)
01:27 < Ibw> of course
01:27 < jordyd> I'm still lost :(
01:27 < s_mosher> I've never seen sudden realization cause a netsplit before
01:27 < s_mosher> ;)
01:27 -!- alexf [n=alexf@99.52.151.178] has quit ["Leaving"]
01:28 -!- Netsplit over, joins: stesla, spikebike, DJCapelis, sstangl, hooopy,
KiNgMaR, lstoll, chipdude, feenode, bengl (+9 more)
01:28 < Ibw> "almost" made me think "not quite there" so I was trying to see
what letter needed to be there that wasn't.  It was an extra letter
01:28 < Ibw> that shouldn't have been there
01:28 < Ibw> huh
01:28 < Ibw> heh
01:28 < Ibw> that's funny
01:28 < jordyd> lol
01:28 < Ibw> aw, I missed it.  I turned off system messages to avoid all the
people coming and going.  Now I don't get to see netsplits!
01:29 < jordyd> It was right before you said "of course"
01:30 -!- decriptor [n=decripto@137.65.132.26] has quit [Read error: 110
(Connection timed out)]
01:30 < Ibw> How would one get substrings?
01:31 < Gracenotes> slicing works
01:31 -!- WalterMundt [n=waltermu@twiki/developer/EtherMage] has quit ["Leaving."]
01:31 < Ibw> How do I convert a slice to a string?  Just a cast?
01:31 < Gracenotes> (although note: if you get it wrong, there's a runtime
exception and your program crashes)
01:31 < Ibw> That doesn't seem like it would work
01:31 < Gracenotes> @eval "string"[0:3]
01:31 < rndbot> str
01:31 < Gracenotes> @eval "string"[6:9]
01:32 < rndbot> PC=0x8048838 slice 6<6>9
01:32 < Ibw> huh
01:32 < Ibw> how does that work?
01:32 < Ibw> @eval int
01:32 < rndbot> <Error: type int is not an expression>
01:32 < Gracenotes> so it does keep the entire string in memory.  which can
be efficient for string-processing-heavy libraries, I suppose
01:32 < Ibw> @eval "int"
01:32 < rndbot> int
01:33 < Ibw> @eval "help"
01:33 < rndbot> help
01:33 -!- StDan [n=danielb@124-197-59-227.callplus.net.nz] has quit [Remote closed
the connection]
01:33 < Ibw> @help
01:33 < Ibw> @eval help
01:33 < rndbot> <Error: undefined: help>
01:33 < jordyd> @eval "int"[2]
01:33 < rndbot> 116
01:33 < Gracenotes> rndbot is my baby.  it can just "@eval" and ">" (run
statements) for now
01:33 < Ibw> what's with the "int"[2]
01:34 < jordyd> Err...  is that supposed to happen?
01:34 < Ibw> what does that do?
01:34 < Ibw> and where did 116 come from?
01:34 < Gracenotes> there is no difference between bytes (uint8) and chars
01:34 < Ibw> ohhh!
01:34 < jordyd> Well, you can access a string with an array-like notation.
01:34 < Ibw> I get the string one
01:34 < Gracenotes> > fmt.Printf("%c", "int"[2]);
01:34 < rndbot> t
01:34 -!- twhitbeck [n=tim@pool-74-109-232-37.pitbpa.fios.verizon.net] has quit
["Ex-Chat"]
01:34 -!- eno [n=eno@nslu2-linux/eno] has quit [Read error: 110 (Connection timed
out)]
01:35 < Gracenotes> I'm working on some extra go-related features, which has
brought me to writing a pretty-printer for go.ast
01:35 < Ibw> and..  116 is the ascii code for t?
01:35 < jordyd> > fmt.Printf("%d", "int"[2]);
01:35 < rndbot> 116
01:35 < Ibw> cool
01:35 < Gracenotes> not a source code pretty-printer, but a printer where
you can actually see what's going on in terms of the fields and whatnot
01:35 < Ibw> > "string"[0:2]
01:35 < rndbot> <Error: "string" not used>
01:35 < Ibw> hah
01:35 < Ibw> > var str string = "string"[0:2]
01:35 < rndbot> <no output>
01:36 < Ibw> > fmt.Printf("%s", str)
01:36 < rndbot> <Error: undefined: str>
01:36 < Ibw> aw
01:36 < Ibw> > var str string = "string"[0:2] ; fmt.Printf("%s", str)
01:36 < rndbot> st
01:36 < Ibw> cool
01:36 < jordyd> So, @eval tells you the value of an expression, and >
runs something?
01:36 < Ibw> shouldn't it be str though?
01:36 < Ibw> wait
01:36 < Ibw> no, the slice is from [a:b] a to b-1
01:37 < jordyd> @eval "string"[0:2]
01:37 < rndbot> st
01:37 < Ibw> yup
01:37 < Ibw> awesome
01:37 < Gracenotes> jordyd: essentially.  currently @main and > do the
same thing; I might have it so that @main runs statements as-is (as it works
currently), and > can detect whether the input is an expression, and print the
result, or a series of statements, and run them
01:37 < jordyd> @eval "string"[:2]
01:37 < rndbot> <Error: syntax error near "<string>">
01:38 < jordyd> That doesn't work?  :(
01:38 < jordyd> @eval "string"[2:]
01:38 < rndbot> <Error: syntax error near 2>
01:38 < Gracenotes> it might.  I haven't pulled from the compiler repository
in two days
01:38 < jordyd> Is there no shorthand like that in Go?
01:38 < Ibw> hmm
01:39 < Ibw> jordyd: You could add it
01:39 < Ibw> heh
01:39 < Gracenotes> I heard there was a commit for some kind of more
python-like slicing
01:39 < Ibw> mercurial is a pain
01:39 -!- randomiser [n=james@78-105-103-158.zone3.bethere.co.uk] has quit [Read
error: 113 (No route to host)]
01:40 < jordyd> Ibw: If I had any experience in writing compilers, I might.
01:40 -!- scyth [n=scyth@rots.in.rs] has joined #go-nuts
01:42 -!- randomiser [n=james@193.60.90.97] has joined #go-nuts
01:47 < nictuku> hi.  I'm writing a code where the default option for a
certain function should be different for darwin and linux.  where should I set the
correct value?  Makefile?
01:51 -!- triplez [n=triplez@bb116-14-64-30.singnet.com.sg] has joined #go-nuts
01:51 -!- jabb [i=475e1fa6@gateway/web/freenode/x-rkabrklumihychvk] has joined
#go-nuts
01:52 -!- smooge [n=smooge@int.smoogespace.com] has quit ["-ENOBRAIN"]
01:53 < alc> @eval 1<<2-1
01:53 < rndbot> 3
01:53 < Ibw> ooh, sqlite bindings?
01:54 < Ibw> anyone know of any?
01:54 < Gracenotes> yes, on http://go-lang.cat-v.org/library-bindings
01:54 < Ycros> how long before someone @eval's a fork bomb
01:55 -!- boscop [n=unknown@f055212029.adsl.alicedsl.de] has quit ["leaving"]
01:55 < alc> bit shift << >> has higher precedence than +-, hmm
this is so not C.. :p
01:56 < Ibw> hmm, it may be a good exercise to make sqlite bindings again
from scratch
01:58 < Gracenotes> Ycros: things are *reasonably* safe, but it is running
in an Arch Linux VirtualBox, so I'll be okay.
01:58 -!- alexf [n=alexf@adsl-99-52-151-178.dsl.klmzmi.sbcglobal.net] has joined
#go-nuts
01:58 -!- nullpo [n=nullpo@221x252x46x83.ap221.ftth.ucom.ne.jp] has quit [Read
error: 110 (Connection timed out)]
01:58 < Ycros> Gracenotes: aha!  smart.  :)
01:59 < tav> hmz, how are multi-variate return values defined ?
01:59 < Gracenotes> The channel #go-run exists specifically for playing with
the bot
01:59 < tav> i.e.  returning foo, ok vs.  return foo
02:00 * Gracenotes goes to get dinner quickly
02:00 -!- michaelh- [n=mux@66-169-117-157.dhcp.ftwo.tx.charter.com] has joined
#go-nuts
02:00 < tav> enjoy Gracenotes
02:00 < Gracenotes> :)
02:00 -!- decriptor [n=decripto@174-23-163-211.slkc.qwest.net] has joined #go-nuts
02:01 < Ibw> is there any blatant reason not to load a whole text file into
a string?
02:01 -!- General1337 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has
joined #go-nuts
02:02 < jordyd> So how does your bot deal with people running File-opening
functions?
02:02 -!- diltsman_ [n=diltsman@76.8.194.226] has joined #go-nuts
02:02 -!- mitchellh1 [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
02:04 -!- ako [n=nya@g226152094.adsl.alicedsl.de] has joined #go-nuts
02:04 -!- dju_ [i=dju@ip-39.net-80-236-37.suresnes.rev.numericable.fr] has joined
#go-nuts
02:04 -!- brunov [n=bruno@190.191.110.64] has quit [Read error: 110 (Connection
timed out)]
02:04 -!- sliceofpi1 [n=Adium@98.194.205.176] has joined #go-nuts
02:04 -!- StDan [n=danielb@124-197-59-227.callplus.net.nz] has joined #go-nuts
02:04 -!- michaelh| [n=mux@66.169.117.157] has joined #go-nuts
02:05 -!- aho [n=nya@g226152094.adsl.alicedsl.de] has quit [Read error: 104
(Connection reset by peer)]
02:05 -!- michaelh [n=mux@66-169-117-157.dhcp.ftwo.tx.charter.com] has quit [Read
error: 113 (No route to host)]
02:06 < Ibw> is a byte array castable to a string?
02:08 -!- zurh [n=ubux@unaffiliated/zurh] has joined #go-nuts
02:08 -!- mitchellh1 [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
["Leaving."]
02:09 < Ibw> does os.Error == nil mean no error?
02:11 -!- sliceofpi [n=Adium@c-98-194-205-176.hsd1.tx.comcast.net] has quit [Read
error: 113 (No route to host)]
02:12 < jordyd> > var tmp []byte = {'h','i'}; fmt.Printf("%s\n",
(string)(tmp));
02:12 < rndbot> <Error: syntax error near byte, empty top-level
declaration>
02:13 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has
quit [Remote closed the connection]
02:14 -!- mitchellh1 [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
02:14 -!- mitchellh1 [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
[Remote closed the connection]
02:14 -!- Sajukar [n=chatzill@pa3-84-90-211-51.netvisao.pt] has quit ["ChatZilla
0.9.85 [Firefox 3.5.2/20090729225027]"]
02:14 -!- StDan [n=danielb@124-197-59-227.callplus.net.nz] has quit [Remote closed
the connection]
02:16 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
[Read error: 110 (Connection timed out)]
02:16 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
02:18 -!- General13372 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has quit
[Connection timed out]
02:19 < jordyd> > tmp := []byte{'h','i'}; fmt.Printf("%s\n",
(string)(tmp));
02:19 < rndbot> hi
02:19 -!- drusepth [n=drusepth@174.32.154.79] has joined #go-nuts
02:21 -!- dju [i=dju@ip-39.net-80-236-37.suresnes.rev.numericable.fr] has quit
[Read error: 110 (Connection timed out)]
02:21 -!- blackmagik [n=blackmag@unaffiliated/blackmagik] has left #go-nuts
["Leaving"]
02:21 < directrixx> > a := 1; fmt.Printf("%T",a);
02:22 < rndbot> int
02:22 -!- michaelh- [n=mux@66-169-117-157.dhcp.ftwo.tx.charter.com] has quit [Read
error: 113 (No route to host)]
02:23 < Ibw> woah, %T
02:23 < Ibw> that's cool
02:23 < Ibw> > a := 1; b := &a; fmt.Printf("%T", b);
02:23 < rndbot> *int
02:24 < Ibw> > a := 1; b := &&a; fmt.Printf("%T", b);
02:24 < rndbot> <Error: syntax error near b>
02:24 < Ibw> > a := 1; b := &a; fmt.Printf("%T", b);
02:24 < rndbot> *int
02:25 < alc> > var tmp = []byte{'h','i'}; fmt.Printf("%s\n", tmp);
02:25 < rndbot> hi
02:26 -!- StDan [n=danielb@124-197-59-227.callplus.net.nz] has joined #go-nuts
02:26 -!- brunov [n=bruno@190.191.110.64] has joined #go-nuts
02:26 -!- jorendorff_ [n=jorendor@c-76-22-141-17.hsd1.tn.comcast.net] has joined
#go-nuts
02:26 < tav> is the code for rndbot up somewhere ?
02:27 < Ibw> psst Gracenotes
02:28 < Ibw> Does Go have modulo operator?
02:29 < Ibw> sure does
02:29 < Gracenotes> tav: hello..  working on it :) I had a Java project due
over the weekend that's grown to 2500 lines (and, for the end of the semester,
maybe 3000-3500) The IRC code is at http://go.pastebin.com/m3464c811 -- that is
more or less it, modulo future changes by adding more channels and means for not
dealing with the protocol directly
02:29 < directrixx> > a := 10; b := 3; fmt.Printf("%d",a%b);
02:29 < rndbot> 1
02:30 < alc> @eval 10%3
02:30 < rndbot> 1
02:30 < directrixx> touche
02:31 -!- smooge [n=smooge@int.smoogespace.com] has joined #go-nuts
02:33 < tav> Gracenotes: ah, i was actually hoping for the pseudo-repl bit
02:36 -!- lambo4jos [n=chatzill@c-76-126-250-10.hsd1.ca.comcast.net] has quit
["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
02:37 < jordyd> Wait...  so why doesn't []byte need an explicit cast to
string?  I thought Go was all about explicit casts...
02:37 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has joined #go-nuts
02:40 < Ibw> >
02:40 < Ibw> func SliceRemove(slice []byte, start int, end int) { // cuts
out data between (inclusive) start and end-1
02:40 < Ibw> for i := start; i < end; i++ {
02:40 < Ibw> for k := start; k < len(slice); k++ {
02:40 < Ibw> slice[i] = slice[i+1];
02:40 < Ibw> }
02:40 < Ibw> }
02:40 < Ibw> }
02:40 < Ibw> oopsies
02:40 < Ibw> (that probably doesn't even work)
02:40 -!- jorendorff [n=jorendor@c-76-22-141-17.hsd1.tn.comcast.net] has quit
[Read error: 110 (Connection timed out)]
02:42 -!- StDan [n=danielb@124-197-59-227.callplus.net.nz] has quit [Remote closed
the connection]
02:42 -!- drusepth [n=drusepth@174.32.154.79] has quit [Read error: 104
(Connection reset by peer)]
02:43 < Ibw> oh man, I think it does
02:43 < Ibw> that's exciting
02:43 < jordyd> > func SliceRemove(slice []byte, start int, end int) {for
i:= start; i < end; i++ { for l:= start; k < len(slice); k++ { slice[i] =
slice[i+1]; } } }
02:43 < rndbot> <Error: syntax error near SliceRemove, syntax error near
i, syntax error near k, syntax error near 1>
02:43 < jordyd> I just condensed it for you.
02:44 -!- ehird [n=ehird@91.105.114.252] has quit []
02:44 -!- drusepth [n=drusepth@174.32.154.79] has joined #go-nuts
02:44 < jordyd> I messed it up.  :p
02:45 -!- diatribes [n=diatribe@diatribes.net] has left #go-nuts []
02:45 < Ibw> the original didn't even work anyway
02:45 < Ibw> sort of, not quite
02:45 < jordyd> > func SliceRemove(slice []byte, start int, end int) {
for i := start; i < end; i++ { for k := start; k < len(slice); k++ {
slice[i] = slice[i+1]; } } }
02:45 < rndbot> <Error: syntax error near SliceRemove, syntax error near
i, syntax error near k, syntax error near 1>
02:46 < nictuku> @eval os.OS
02:46 < rndbot> <Error: undefined: os.OS>
02:46 < nictuku> this is not exposed, then?
02:47 < Gracenotes> tav: enjoy.  http://gopaste.org/view/C8l0w
02:48 < Gracenotes> sorry, it took me a few minutes to get that in a
module-ish form.  perhaps you can also determine from the code that it's more
ad-hoc than it should be ;)
02:48 -!- amuck [n=amuck@173.190.154.140] has joined #go-nuts
02:48 < tav> w00p!  thanks Gracenotes
02:48 -!- ejb [n=ejb@unaffiliated/ejb] has quit ["Leaving"]
02:48 < tav> any chance you could put it into the public domain?
02:49 < jordyd> Or a BSDish license, as is Go norm.
02:49 < Gracenotes> probably not, but I'm leaning towards a permissive
license.  yeah, like BSD
02:49 < tav> sure, that works too =)
02:49 < Ycros> BSD is a good choice, since that's what the project is in
02:50 < Gracenotes> after all, Go programs are statically linked
02:50 -!- tyler_wylie [n=tyler@67.223.237.146] has quit [Read error: 145
(Connection timed out)]
02:50 -!- skyfive [n=skyfive@74.1.186.114] has quit ["Leaving..."]
02:50 < jordyd> Are they going to implement dynamic linking in the future?
02:54 < Ibw> i got the slice cutting algorithm working, if anyone cares to
see
02:55 < Ibw> though it's a bit messy
02:56 -!- diltsman_ [n=diltsman@76.8.194.226] has quit []
02:58 -!- roto [n=roto@64.79.202.154] has quit [Read error: 113 (No route to
host)]
02:59 -!- akheron [n=akheron@lilja.asteriski.fi] has quit [Remote closed the
connection]
02:59 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has quit
["Leaving"]
03:00 < tav> Ibw: sure
03:00 -!- skyyy [n=caw@cpe-24-58-178-87.twcny.res.rr.com] has joined #go-nuts
03:00 < Ibw> http://gopaste.org/view/72dK6
03:01 < Ibw> I'm going to clean it up, finish a slice insert function and
submit them for code review in the strings package (wrapped for use with strings
of course)
03:01 -!- skyyy [n=caw@cpe-24-58-178-87.twcny.res.rr.com] has quit [Client Quit]
03:03 -!- ako [n=nya@g226152094.adsl.alicedsl.de] has quit
["EXEC_over.METHOD_SUBLIMATION"]
03:03 < tav> nice one, Ibw
03:03 < Ibw> thanks
03:06 < Gracenotes> you just have to be careful with slice arithmetic,
before the runtime system crashes your entire program because of an accidental
access to a[-1] >_>
03:08 -!- nictuku [n=nictuku@unaffiliated/nictuku] has quit []
03:08 < Ibw> ya, or going past the max length of the slice
03:08 < Ibw> which may be less likely than -1
03:10 -!- sliceofpi1 [n=Adium@98.194.205.176] has quit [Read error: 131
(Connection reset by peer)]
03:10 -!- sliceofpi [n=Adium@c-98-194-205-176.hsd1.tx.comcast.net] has joined
#go-nuts
03:12 -!- hstimer [n=hans@c-98-234-25-125.hsd1.ca.comcast.net] has joined #go-nuts
03:12 < Gracenotes> > str := "str"; for i := 0; i <= len(str); i++ {
fmt.Printf("%q ", str[0:i]) }
03:12 < rndbot> "" "s" "st" "str"
03:13 < hstimer> any word on https support?
03:14 < uriel> hstimer: TSL client support went in a couple of days ago
03:14 < uriel> hstimer: tsl server can't be far behind
03:14 < hstimer> really?  cool!
03:14 -!- tor7 [n=tor@213.113.122.152] has quit []
03:14 < spikebike> anyone know if sending something to a channel is
blocking?
03:14 < spikebike> (or not)
03:15 < spikebike> can it be used to synchronize multiple goroutines?
03:15 < uriel> exch: cool!  does that have any dependencies?
03:15 < uriel> spikebike: by default, yes, but you can have buffered
channels
03:15 < uriel> spikebike: channels work very well for synchronization indeed
03:16 < spikebike> excellent
03:16 < Gracenotes> channels that exist for just their communication
properties, can be made as just chan bools or something
03:16 -!- roto [n=roto@64.79.202.154] has joined #go-nuts
03:21 -!- me____ [n=venkates@c-68-55-179-48.hsd1.md.comcast.net] has joined
#go-nuts
03:21 -!- lenst [n=user@81-237-244-185-no52.tbcn.telia.com] has quit [Read error:
110 (Connection timed out)]
03:22 -!- brunov [n=bruno@190.191.110.64] has quit [Read error: 60 (Operation
timed out)]
03:24 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has quit [Read
error: 104 (Connection reset by peer)]
03:24 -!- drusepth [n=drusepth@174.32.154.79] has quit [Read error: 104
(Connection reset by peer)]
03:24 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has joined
#go-nuts
03:25 -!- drusepth [n=drusepth@174.32.154.79] has joined #go-nuts
03:25 -!- sliceofpi [n=Adium@c-98-194-205-176.hsd1.tx.comcast.net] has quit [SendQ
exceeded]
03:25 -!- Tuller [n=Tuller@pool-72-84-246-12.rcmdva.fios.verizon.net] has quit
["to the batcave?"]
03:25 -!- drusepth` [n=drusepth@174.32.154.79] has joined #go-nuts
03:26 -!- sliceofpi [n=Adium@c-98-194-205-176.hsd1.tx.comcast.net] has joined
#go-nuts
03:26 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts
03:29 < hstimer> uriel: i'm no seeing the https (tls) support anywhere.
03:30 < Ibw> hstimer: Did you check the latest repos?
03:30 < hstimer> Ibw: did a fresh checkout
03:31 < Ibw> hmm
03:31 < Ibw> what did you checkout?
03:31 < Ibw> dev or release?
03:31 < hstimer> hg pull -u
03:31 < hstimer> hmmm...  don't know
03:32 < hstimer> release
03:32 < hstimer> is it in dev?
03:32 < hstimer> to get the dev release is it?: hg clone -r dev
https://go.googlecode.com/hg/ $GOROOT
03:33 < Ibw> (i'm not actually sure if there is a repo called dev, but
there's something like that)
03:33 -!- teedex [n=teedex@204.14.155.161] has quit [Read error: 104 (Connection
reset by peer)]
03:34 -!- tsuwabuki [n=tsuwabuk@FLH1Abq140.kyt.mesh.ad.jp] has joined #go-nuts
03:34 -!- diltsman_ [n=diltsman@64.122.18.77] has joined #go-nuts
03:34 < hstimer> I'm new to mercurial: how do I find out what tag the dev
branch is named?
03:34 -!- Null-A [n=jason@c-76-21-4-0.hsd1.ca.comcast.net] has joined #go-nuts
03:35 < uriel> hstimer: http://golang.org/src/pkg/crypto/tls/
03:35 < Ibw> I've also got absolutely no idea how to use mercurial.  I would
appreciate an answer to hstimer's question as well
03:35 -!- Eridius [n=kevin@growl/Eridius] has quit ["back in a week"]
03:35 -!- Null-A [n=jason@c-76-21-4-0.hsd1.ca.comcast.net] has quit [Client Quit]
03:35 < Ibw> Also, how do I check what my current local version of the repo
is
03:35 < uriel> no, to get the latest code just don't include -r anything
03:36 -!- me___ [n=venkates@c-68-55-179-48.hsd1.md.comcast.net] has quit [Read
error: 110 (Connection timed out)]
03:36 < uriel> just hg clone http://go.code..
03:36 < uriel> if you did an hg clone -r release http://...
03:36 < uriel> you can pull the latest tip by simply doing hg pull -u
03:36 < Ibw> which is the same as hg sync, right?
03:37 < uriel> I'm not sure what hg sync does, and I'm not even sure it is
included by default
03:37 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts
03:37 < uriel> (I seem to remember it being an alias for hg pull -u, but my
memory is bad)
03:37 < uriel> (yup, I have hg 1.4, and there is no sync command)
03:38 < Ibw> That's what I'm reading right now.  Whatever though, hg pull -u
is more straightforward
03:38 < uriel> it is just three chars more ;P
03:38 < uriel> and you can do fn pull { hg pull -u } in your shell if you
are really lazy ;P (asuming rc shell there)
03:40 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has quit ["This
computer has gone to sleep"]
03:40 -!- Gracenotes_ [n=person@wikipedia/Gracenotes] has joined #go-nuts
03:41 < hstimer> ok, just to confirm: hg pull -u gives you the latest
development even if you started with the release tag?
03:41 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has quit [Connection
timed out]
03:42 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has joined #go-nuts
03:42 -!- rndbot [n=bot@wikipedia/Gracenotes] has quit [Nick collision from
services.]
03:42 -!- Gracenotes [n=person@wikipedia/Gracenotes] has quit [Nick collision from
services.]
03:44 -!- ssmall [n=stuart@129.110.242.7] has joined #go-nuts
03:44 -!- rndbot [n=bot@wikipedia/Gracenotes] has joined #go-nuts
03:45 -!- qbit_ [n=qbit_@c-75-71-160-106.hsd1.co.comcast.net] has quit
["WinPants!"]
03:45 < Ibw> the code submission process looks like a real pain
03:46 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
["Leaving."]
03:48 < Ibw> it doesn't even make any sense to me
03:49 < hstimer> uriel: it doesn't look like tls is hooked up to the http
lib yet
03:49 < uriel> Ibw: what doesn't make sense?
03:50 < uriel> hstimer: well, as I said, it is still just the client side of
things, and was comited two days ago or so..
03:50 < uriel> hstimer: have some patience people!
03:50 < Ibw> Mostly the code review process.  Who exactly reviews it?
Trusted members of Google?
03:50 -!- aa [n=aa@r190-135-212-130.dialup.adsl.anteldata.net.uy] has joined
#go-nuts
03:50 < uriel> Ibw: the Go developers, obviously
03:50 < Ibw> Aren't any contributers Go developers though?
03:50 < Ibw> whatever, I get it
03:51 < Ibw> But mostly I have no idea what any of these mercurial commands
mean.  I guess I'll just have to look through some docs or somethihng
03:52 < uriel> Ibw: so would you rather the project takes any change and
commit by any random person?  uhu?
03:52 < Ibw> no way.  I'm not saying I have a problem with it
03:53 < uriel> what problem?
03:53 -!- aaront [n=aaront@d24-141-25-171.home.cgocable.net] has joined #go-nuts
03:53 < tav> Ibw: there's nothing stopping you pushing your own repository
somewhere public...
03:53 < Ibw> ugh, stupid Hardy ubuntu has out of date everything.  My
mercurial from the ubuntu repos is too old for codereview plugin...
03:53 < Ibw> tav: heh, I'm not suggesting that either
03:53 < Ibw> I'm perfectly fine with how it's working right now
03:53 < tav> which brings me to a question — is there a git mirror somewhere
?
03:54 -!- andresambrois [n=aa@190.135.128.6] has joined #go-nuts
03:54 < uriel> oh dear people and their git fetish
03:55 < tav> heh
03:55 < uriel> tav: isn't there some git-hg plugin or something
03:55 < tav> uriel: yes
03:55 < uriel> and it is so fucking hard to learn to do hg clone, hg diff,
hg pull -u?
03:55 < uriel> isn't rocket science, even I can do it!
03:55 < tav> i was hoping someone was already running it and auto
maintaining a git mirror
03:55 < alexf> uriel: re updating Go, I followed the 'hg clone -r release
https://go.xxxx/hg/ $GOROOT' -- when trying 'hg pull -u https://go..xxx/hg/
$GOROOT it complains that there's no repo there -- what am I doing wrong?
03:56 < uriel> alexf: where do you run hg pull -u?
03:56 < uriel> you have to do it in $GOROOT
03:56 < tav> uriel: i was using mercurial before using git, so it's not for
lack of familiarity with hg — it's just to save time and hassle in terms of
maintaining both repositories
03:56 < tav> since i prefer to work with git, and don't really care where
the upstream comes from
03:56 < alexf> uriel: ahh, the in $GOROOT was my problem (I thought it would
follow wherever I had $GOROOT was set) - thanks :)
03:56 -!- drusepth` [n=drusepth@174.32.154.79] has quit [Read error: 104
(Connection reset by peer)]
03:56 -!- drusepth [n=drusepth@174.32.154.79] has quit [Read error: 104
(Connection reset by peer)]
03:57 < alexf> uriel: *run in $GOROOT
03:57 < hstimer> uriel: [in my most patient tone] when will tls be hooked up
to http?
03:57 < tav> so it makes sense for *one* person to do the mirroring to git
so that everyone else who is also using git doesn't have to do the same crap too
03:57 < uriel> alexf: do you expect hg to read your mind and to know which
repo to pull?  :P
03:57 < uriel> hstimer: I have no clue
03:57 -!- wooden [n=anon@user-387hrrg.cable.mindspring.com] has quit [Read error:
110 (Connection timed out)]
03:58 < uriel> hstimer: I only know what I see in the mailing list and the
commit lots ^_^
03:58 < hstimer> ah
03:58 -!- diltsman_ [n=diltsman@64.122.18.77] has quit []
03:59 -!- drusepth [n=drusepth@174.32.154.79] has joined #go-nuts
03:59 < uriel> btw, everyone please vote for this so we can have Go on App
Engine: http://code.google.com/p/googleappengine/issues/detail?id=2382 ;)
04:00 < Ibw> heh
04:00 < tav> done =)
04:01 < uriel> tav: cool :)
04:01 -!- goplexian [n=acombas@154.20.0.9] has joined #go-nuts
04:01 -!- drusepth [n=drusepth@174.32.154.79] has quit [Client Quit]
04:01 -!- diltsman_ [n=diltsman@64.122.18.77] has joined #go-nuts
04:03 -!- Ibw [n=isaac@cpe-67-241-42-134.twcny.res.rr.com] has quit [Read error:
104 (Connection reset by peer)]
04:03 -!- zerofluid [n=zeroflui@ip72-208-216-68.ph.ph.cox.net] has quit
["Leaving"]
04:04 -!- goplexian [n=acombas@154.20.0.9] has quit [Client Quit]
04:04 -!- goplexian [n=acombas@d154-20-0-9.bchsia.telus.net] has joined #go-nuts
04:04 < tav> heh, starring still suffers from csrf exploits
04:04 < Gracenotes> okay..  assignment rules for interfaces is more
complicated than I thought.  But I think I get the spec
04:04 < tav> i.e.  if one can get people to GET
http://code.google.com/p/googleappengine/issues/setstar.do?alt=js&issueid=2382&starred=1
— and if they happen to have a google account, then the issue will get starred ;p
04:05 < tav> <img
src="http://code.google.com/p/googleappengine/issues/setstar.do?alt=js&issueid=2382&starred=1"
width="0px" height="0px" alt="auto star go on app engine issue" />
04:06 < Gracenotes> for a struct S, there can be method sets declared to
apply to *S and those to S. For an interface U, the former can only be accessed
with a *U, but the latter can be accessed with *U or U.
04:07 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has quit []
04:07 -!- diltsman_ [n=diltsman@64.122.18.77] has quit []
04:07 < Gracenotes> and there's this thing about this only being true for
inheriting method sets if an anonymous field is used
04:07 < Gracenotes> because, for some reason, if you use a named field in a
struct it's like making your own type declaration for it
04:08 < uriel> tav: thanks for the tip ;P
04:08 < Gracenotes> which I suppose helps resolve ambiguities...  still..
04:09 -!- halfdan [n=halfdan@p57A9496A.dip.t-dialin.net] has joined #go-nuts
04:10 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has quit [Read
error: 104 (Connection reset by peer)]
04:12 -!- ssmall [n=stuart@129.110.242.7] has quit [Read error: 145 (Connection
timed out)]
04:12 -!- aa [n=aa@r190-135-212-130.dialup.adsl.anteldata.net.uy] has quit [Read
error: 110 (Connection timed out)]
04:12 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has joined
#go-nuts
04:14 < sliceofpi> hey
04:14 -!- Meidor [n=quassel@cl-936.ams-05.nl.sixxs.net] has quit [Operation timed
out]
04:15 -!- hyn [n=hyn@p0a38fe.tokyte00.ap.so-net.ne.jp] has joined #go-nuts
04:15 -!- hyn [n=hyn@p0a38fe.tokyte00.ap.so-net.ne.jp] has quit [Client Quit]
04:15 < Gracenotes> hello
04:18 -!- Wezz6400_ [n=Wezz6400@145-118-111-123.fttx.bbned.nl] has joined #go-nuts
04:18 -!- Gord1 [n=gord@CPE000d3a725498-CM001947577a2e.cpe.net.cable.rogers.com]
has joined #go-nuts
04:20 -!- drusepth [n=drusepth@174.32.154.79] has joined #go-nuts
04:20 < Gord1> would someone be able to point me in the correct direction on
how to configure a makefile for my test go project (now that I want to start
working on multifile compiles)
04:20 < tav> Gord1: http://golang.org/doc/contribute.html#New_package
04:21 < tav> hey sliceofpi
04:22 < sliceofpi> tv: go seems a nice language
04:22 -!- Clooth [n=Clooth@cs27062173.pp.htv.fi] has quit [Read error: 54
(Connection reset by peer)]
04:22 < sliceofpi> I'm trying to gain comprehenesion of the creation of
wrappers for libraries in other languages
04:22 -!- Clooth [n=Clooth@cs27062173.pp.htv.fi] has joined #go-nuts
04:24 -!- Clooth [n=Clooth@cs27062173.pp.htv.fi] has quit [SendQ exceeded]
04:24 -!- Clooth [n=Clooth@cs27062173.pp.htv.fi] has joined #go-nuts
04:25 -!- decriptor [n=decripto@174-23-163-211.slkc.qwest.net] has quit [Read
error: 110 (Connection timed out)]
04:26 -!- halfdan_ [n=halfdan@p57A94AFD.dip.t-dialin.net] has quit [Read error:
110 (Connection timed out)]
04:26 -!- StDan [n=danielb@124-197-59-227.callplus.net.nz] has joined #go-nuts
04:27 < tav> sliceofpi: the only thing i've seen in this regard is
http://github.com/jteeuwen/go-pkg-pcre/
04:27 -!- drusepth [n=drusepth@174.32.154.79] has quit [Read error: 131
(Connection reset by peer)]
04:27 -!- me____ [n=venkates@c-68-55-179-48.hsd1.md.comcast.net] has quit [Read
error: 60 (Operation timed out)]
04:27 < tav> although i have no idea where it gets its import "C" from
04:27 < fosho> sliceofpi: lots of examples
http://go-lang.cat-v.org/library-bindings
04:28 < uriel> tav: cgo
04:28 -!- sladegen [n=nemo@unaffiliated/sladegen] has quit [Nick collision from
services.]
04:28 -!- sladegen [n=nemo@unaffiliated/sladegen] has joined #go-nuts
04:29 -!- Wezz6400 [n=Wezz6400@145-118-111-123.fttx.bbned.nl] has quit [Read
error: 110 (Connection timed out)]
04:30 < tav> uriel: cgo being gccgo ?
04:30 < sliceofpi> i think i've decided to wrap the e17 libraries
04:30 < tav> e17 == enlightenment ?
04:30 < Gracenotes> cgo, tool for FFI
04:31 < tav> damn, is that project still ongoing ?
04:31 < uriel> tav: no, cgo being cgo
04:31 -!- me___ [n=venkates@68.55.179.48] has joined #go-nuts
04:31 < tav> Gracenotes: got a url i should be looking at ?
04:31 < uriel> tav: http://golang.org/cmd/cgo/
04:31 < Gracenotes> from command documentation
04:32 < Gracenotes> ..not much of a manual
04:32 < Gord1> Noob alert: ;) I just want to compile and link hello.go and
world.go together so hello.go can use a type from world.go.
04:32 < Gord1> I am a make n00B having only experienced development on
windows using msBuild
04:32 < tav> thanks uriel / Gracenotes
04:32 < tav> can one call back from C into Go or is it just one way for now
?
04:32 < Gracenotes> Gord1: they tend to be compiled separately, but linked
together, with the latter step specifying the main class
04:33 < Gracenotes> and..  with packages..  it is a bit more complicated..
haven't dealt with those so much
04:33 -!- Meidor [n=quassel@cl-936.ams-05.nl.sixxs.net] has joined #go-nuts
04:33 -!- wollw [n=wollw4@75.101.22.68] has quit [Remote closed the connection]
04:33 < Gracenotes> Make.pkg seems like it might take care of that
04:33 -!- wollw [n=wollw4@75-101-22-68.dsl.dynamic.sonic.net] has joined #go-nuts
04:34 -!- sm [n=sm@75.85.88.227] has joined #go-nuts
04:35 < goplexian> I know its pretty simple, but if anyone can see some
obvious go idiom to apply to this little example I'd love to learn, this solves
project euler #3, http://gopaste.org/view/Oij2M
04:37 < Gracenotes> Gord1: so, as a very basic use case compiling two pieces
of code in the same package "main", run "8g hello.go world.go", then "8l -o hello
hello.8 world.8", then "./hello" to run
04:39 < goplexian> or alternatively I made a blog just for solving euler
problems in Go, you can see the first three solutions here, and maybe post a
comment if I'm doing anything wrong http://www.goplexian.com
04:39 -!- snicket [n=Promethe@187.149.58.235] has joined #go-nuts
04:40 -!- McLovin [n=m@142.177.139.67] has joined #go-nuts
04:42 < Gracenotes> Gord1: actually, if they're in the same package...  eh..
you're better off reading the command documentation linked from the website
sidebar :)
04:42 -!- aaront [n=aaront@unaffiliated/aaront] has quit ["And that's all he
wrote..."]
04:43 < Gracenotes> if they're in the same package, only one .8 file will be
created.  if they're in separate packages, there are options for 8g to handle
that, but Make.pkg should be used to make packages in the first place.
04:43 < Gracenotes> and replace 8 with 6 or 5 as appropriate
04:44 -!- teedex [n=teedex@204.14.155.161] has quit [Remote closed the connection]
04:48 -!- tsuwabuki [n=tsuwabuk@FLH1Abq140.kyt.mesh.ad.jp] has quit [Read error:
60 (Operation timed out)]
04:50 -!- zurh [n=ubux@unaffiliated/zurh] has quit ["-"]
04:51 -!- ssmall [n=stuart@rrcs-97-77-53-108.sw.biz.rr.com] has joined #go-nuts
04:53 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has joined
#go-nuts
04:57 -!- super__ [n=super_@unaffiliated/lolsuper-/x-9881387] has joined #go-nuts
05:00 -!- pdusen [n=pdusen@68-188-190-192.dhcp.bycy.mi.charter.com] has joined
#go-nuts
05:00 -!- lolsuper_ [n=super_@unaffiliated/lolsuper-/x-9881387] has quit [Read
error: 60 (Operation timed out)]
05:05 < tav> hmz, so i'm trying to compile
http://www.cs.hmc.edu/~me/readline-go/Makefile
05:05 -!- cold-penguin [n=ben@92.12.177.241] has joined #go-nuts
05:05 < tav> however, i've got readline installed in
/Users/tav/work/environ/local/include/readline as opposed to /usr/
05:06 -!- cold-penguin [n=ben@92.12.177.241] has quit [Client Quit]
05:07 < tav> anyone know how one would set the include path in the makefile
?
05:08 -!- Wezz6400_ [n=Wezz6400@145-118-111-123.fttx.bbned.nl] has quit [Read
error: 60 (Operation timed out)]
05:08 < alc> goplexian: hmm, 600851475143 in comment but 600851575143 in
your code
05:11 < alc> goplexian: http://gopaste.org/view/kU1C1 -- my version, not
very go-ish, actually pretty C.
05:14 -!- pdusen [n=pdusen@68-188-190-192.dhcp.bycy.mi.charter.com] has quit [Read
error: 104 (Connection reset by peer)]
05:14 -!- pdusen [n=pdusen@68-188-190-192.dhcp.bycy.mi.charter.com] has joined
#go-nuts
05:14 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has joined #go-nuts
05:14 < drhodes> I don't know squat about ARM, does/will go run on the droid
phone?
05:15 < anticw> not yet
05:15 < reppie> drhodes from dragonflybsd?  xD
05:16 < drhodes> nope, I'm an imposter.
05:16 < reppie> ah
05:16 < drhodes> thanks anticw
05:16 -!- mikedee [n=quassel@91.111.24.173] has quit [Remote closed the
connection]
05:18 < gigatropolis> any editors that support Go syntax highlighting as of
yet?
05:18 < tav> emacs ;p
05:18 < uriel> gigatropolis: http://go-lang.cat-v.org/text-editors
05:18 < tav> http://go-lang.cat-v.org/text-editors/
05:19 < snicket> I use gedit http://go-lang.cat-v.org/text-editors/gedit/
05:19 < uriel> heh ")
05:19 < uriel> :)
05:19 < gigatropolis> cool thanks
05:19 -!- Wezz6400 [n=Wezz6400@145-118-111-123.fttx.bbned.nl] has joined #go-nuts
05:23 < Gracenotes> drhodes: not sure if it's possible to run raw ARM on it
05:23 < Gracenotes> Dalvik bytecode, for sure.  But I'm not sure to what
extent you can access lower-level hardware
05:23 -!- snake_ [n=snake@cardinal.sura.ru] has joined #go-nuts
05:23 -!- gigatropolis [n=chatzill@c-24-6-103-242.hsd1.ca.comcast.net] has quit
["ChatZilla 0.9.85 [Firefox 3.5.4/2009101600]"]
05:24 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has quit [Connection
timed out]
05:24 < goplexian> alc, wow nice version of #3, and thanks for catching that
typo in mine
05:25 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has joined #go-nuts
05:25 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has quit [Remote
closed the connection]
05:26 < uriel> Gracenotes: it is possible, somebody got Go code running on
android, but you have to 'jailbreak' it, or whatever it is called in android land
05:26 < Gracenotes> ah, I thought so
05:27 < anticw> right, a native process would work, but most people don't
have phones that allow that
05:27 < Gracenotes> I'm sure jailbreaking isn't as bad as it is for, say,
Apple.  But it must break the warranty anyway, since the point of Dalvik is
ensuring layers of security
05:27 < Gracenotes> (and also ensuring small bytecode size/memory footprint)
05:29 < goplexian> alc, mind if I throw that into a comment in my blog?  I
think it is educational, I learned a couple things from it anyway :P
05:29 < Gracenotes> actually, it seems Google actively tries to prevent
phones from being jailbroken
05:30 < alc> goplexian: not at all.  lets go nuts.  =)
05:31 -!- McLovin [n=m@142.177.139.67] has quit [Read error: 104 (Connection reset
by peer)]
05:31 -!- djanderson [n=dja@hltncable.pioneerbroadband.net] has quit [Connection
timed out]
05:32 -!- Wezz6400 [n=Wezz6400@145-118-111-123.fttx.bbned.nl] has quit [Remote
closed the connection]
05:32 -!- snicket [n=Promethe@187.149.58.235] has quit ["Saliendo"]
05:32 -!- swamy [n=chatzill@nat/sun/x-udxuxvndesbskzvb] has quit ["ChatZilla
0.9.85 [Firefox 3.5.3/20090824101458]"]
05:33 -!- Gord1 [n=gord@CPE000d3a725498-CM001947577a2e.cpe.net.cable.rogers.com]
has quit [Read error: 110 (Connection timed out)]
05:34 -!- Wezz6400 [n=Wezz6400@145-118-111-123.fttx.bbned.nl] has joined #go-nuts
05:36 -!- nigwil [n=chatzill@203.13.22.2] has quit ["ChatZilla 0.9.85 [Firefox
3.5.5/20091102152451]"]
05:38 -!- Wezz6400 [n=Wezz6400@145-118-111-123.fttx.bbned.nl] has quit [Read
error: 60 (Operation timed out)]
05:39 -!- Wezz6400 [n=Wezz6400@145-118-111-123.fttx.bbned.nl] has joined #go-nuts
05:39 -!- gigatropolis [n=chatzill@c-24-6-103-242.hsd1.ca.comcast.net] has joined
#go-nuts
05:40 < gigatropolis> sorry, can I get the link to the syntax highlighting
one more time?  just switched computers
05:41 < tav> http://go-lang.cat-v.org/text-editors/
05:41 < uriel> we need a bot that prints that every 30 seconds ;P
05:41 < gigatropolis> hehe
05:41 < gigatropolis> thanks
05:42 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts
05:42 < goplexian> alc thanks :)
05:43 < rndbot> http://go-lang.cat-v.org/text-editors/
05:43 < Gracenotes> >_>
05:43 -!- me____ [n=venkates@c-68-55-179-48.hsd1.md.comcast.net] has joined
#go-nuts
05:43 -!- droid0011 [n=g1@79.220.222.157] has joined #go-nuts
05:44 < alc> np
05:46 < tav> uriel: heh
05:46 -!- me___ [n=venkates@68.55.179.48] has quit [Read error: 145 (Connection
timed out)]
05:49 < Gracenotes> are packages allowed to be cyclic?
05:50 < Gracenotes> package a imports something from b, and vice versa
05:50 < anticw> no
05:51 -!- amacleod [n=amacleod@c-24-34-33-96.hsd1.ma.comcast.net] has joined
#go-nuts
05:51 -!- alexf [n=alexf@adsl-99-52-151-178.dsl.klmzmi.sbcglobal.net] has quit
[Read error: 110 (Connection timed out)]
05:51 < anticw> well, in so far as i don't see how you could ever compule
that
05:51 < Gracenotes> ah.  good to know.  not sure how that would work anyway
05:51 < Gracenotes> except, perhaps the linker could figure it out?  hrm
05:52 < kuroneko> anticw: it can be expressed in design-by-contract style or
explicit forward declaration systems.
05:52 < gigatropolis> ssssssssooooooooooooo.......after downloading the
go.lang syntax highlighting file.  Something I need to do for gedit to use it?
05:52 < rndbot> http://go-lang.cat-v.org/text-editors/
05:52 < Gracenotes> ^ there are directions on the gedit page >_>
05:52 < anticw> kuroneko: in go?
05:52 < kuroneko> and it's not as useless as it sounds - just if you're
going to do that, the two modules should probably be part of the same module
anyway >_>
05:52 < kuroneko> anticw: no, generically.
05:52 < anticw> oh sure
05:53 < Gracenotes> I'm just wondering if cycles are something I have to
worry about following types in the source tree.  that they form some kind of DAG.
05:53 -!- alexf [n=alexf@adsl-99-155-153-55.dsl.klmzmi.sbcglobal.net] has joined
#go-nuts
05:53 -!- Wezz6400 [n=Wezz6400@145-118-111-123.fttx.bbned.nl] has quit [Remote
closed the connection]
05:53 -!- Wezz6400 [n=Wezz6400@145-118-111-123.fttx.bbned.nl] has joined #go-nuts
05:54 < Gracenotes> from what I know about the compiler/linker, it's not
possible.  still.
05:54 < Gracenotes> hrm
05:54 < anticw> if a.go depends on b.go, a.go will look at b.6 not b.go
05:54 < Gracenotes> yeah.  but you do need to get b.6 in the first place.
05:54 < anticw> i.e.  deps are vacuumed up th ede
05:54 < anticw> gah
05:55 < Gracenotes> and an individual compilation can only yield one .6,
afaik
05:55 < anticw> i meant to say requirements are a absorbed up the dep tree
05:55 < Gracenotes> (for a single package)
05:55 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has quit
[Remote closed the connection]
05:56 -!- Esmil [n=esmil@4704ds1-gjp.0.fullrate.dk] has quit [Read error: 104
(Connection reset by peer)]
05:57 -!- shoafb [n=The_Doct@dhcp-168-105-232-71.wireless.manoa.hawaii.edu] has
joined #go-nuts
05:58 -!- droid001 [n=g1@p4FDCD3A2.dip.t-dialin.net] has quit [Success]
05:59 -!- al-maisan [n=al-maisa@f054170191.adsl.alicedsl.de] has joined #go-nuts
05:59 -!- jurdendurden [n=dude@70.250.37.35] has joined #go-nuts
06:00 -!- al-maisan [n=al-maisa@f054170191.adsl.alicedsl.de] has left #go-nuts
["Parting is tough.."]
06:00 -!- Esmil [n=esmil@90.185.33.90] has joined #go-nuts
06:01 < jurdendurden> who
06:01 < jurdendurden> who is awake in here?
06:01 < oklokok> i am
06:01 * tav .
06:01 * oklokok leaves
06:01 < tav> hrhr
06:02 * uriel isn't awake
06:02 < jurdendurden> lol
06:02 < jurdendurden> so everyone hard at work on the new google programming
language then ey?
06:03 < uriel> ken's new programming language
06:04 -!- gigatropolis [n=chatzill@c-24-6-103-242.hsd1.ca.comcast.net] has quit
[Read error: 104 (Connection reset by peer)]
06:05 < KirkMcDonald> Google?
06:05 < KirkMcDonald> Never heard of it.
06:07 -!- gigatropolis [n=chatzill@c-24-6-103-242.hsd1.ca.comcast.net] has joined
#go-nuts
06:08 < tav> btw, has anyone seen the go gopher ?
06:08 < tav> it's mentioned as the mascot in the FAQ, but i can't find an
image of it...
06:09 < tav> ehm, scratch that, i'm just blind ;p
06:09 < tav> http://golang.org/doc/logo-153x55.png
06:10 < Gracenotes> A not-so-subtle reference to a different logo
06:10 < Gracenotes> at least in shape and style
06:11 * spikebike pulls todays 6g/gccgo updates
06:11 -!- gigatropolis [n=chatzill@c-24-6-103-242.hsd1.ca.comcast.net] has quit
[Read error: 104 (Connection reset by peer)]
06:13 -!- Esmil [n=esmil@90.185.33.90] has quit [Connection reset by peer]
06:13 < tav> okay, i've setup a git mirror for anyone who wants to use it as
either a git submodule or just prefers git...  http://github.com/tav/go
06:16 < tav> i'm also putting together a twitter list —
http://twitter.com/tav/go — can you guys give me your twitter ids to add ?
06:16 < jurdendurden> git ~= cvs?
06:16 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has quit []
06:17 < jurdendurden> nm just answered my own question
06:17 -!- amuck [n=amuck@173.190.154.140] has quit [Read error: 145 (Connection
timed out)]
06:18 -!- Esmil [n=esmil@4704ds1-gjp.0.fullrate.dk] has joined #go-nuts
06:18 -!- gigatropolis [n=chatzill@c-24-6-103-242.hsd1.ca.comcast.net] has joined
#go-nuts
06:18 < uriel> tav: ArchangelUriel
06:19 < tav> uriel: you're there already, first on the list!  =)
06:19 < uriel> hah, thanks :)
06:20 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has quit
["Leaving"]
06:20 < Gracenotes> every so often I need to remind myself how hacky the
current way of doing sum/union types is >_>
06:21 -!- Meidor [n=quassel@cl-936.ams-05.nl.sixxs.net] has quit ["No Ping reply
in 180 seconds."]
06:21 -!- amuck [n=amuck@h124.153.190.173.ip.windstream.net] has joined #go-nuts
06:21 -!- Meidor [n=quassel@cl-936.ams-05.nl.sixxs.net] has joined #go-nuts
06:22 -!- shoafb [n=The_Doct@dhcp-168-105-232-71.wireless.manoa.hawaii.edu] has
quit [Read error: 110 (Connection timed out)]
06:22 -!- sm [n=sm@75.85.88.227] has quit [Read error: 131 (Connection reset by
peer)]
06:23 -!- alexf [n=alexf@adsl-99-155-153-55.dsl.klmzmi.sbcglobal.net] has quit
[Connection timed out]
06:23 -!- sm [n=sm@cpe-75-85-88-227.socal.res.rr.com] has joined #go-nuts
06:23 -!- Meidor [n=quassel@cl-936.ams-05.nl.sixxs.net] has quit [Read error: 60
(Operation timed out)]
06:23 -!- Meidor [n=quassel@cl-936.ams-05.nl.sixxs.net] has joined #go-nuts
06:25 -!- alexf [n=alexf@99.184.228.180] has joined #go-nuts
06:29 < uriel> tav: how do you keep the git mirror updated?
06:30 < tav> uriel: cron-ed hg pull -u && hg push ...  with hg-git
06:33 < uriel> aha
06:33 -!- amacleod [n=amacleod@c-24-34-33-96.hsd1.ma.comcast.net] has quit ["Bye
Bye"]
06:35 < tav> uriel: are you familiar with rst — restructuredtext ?
06:35 < uriel> yes, and don't lik eit
06:35 < uriel> it is ridiculously complex
06:35 < tav> any format that you do like ?
06:35 * uriel uses markdown, and even that is too damned complex
06:35 -!- mkanat [n=mkanat@c-67-188-1-39.hsd1.ca.comcast.net] has quit ["Bye!"]
06:36 < KirkMcDonald> It is almost as though text formatting is complicated.
:-)
06:38 < alc> > a:=1; println(1)
06:38 < rndbot> 1
06:38 -!- gigatropolis [n=chatzill@c-24-6-103-242.hsd1.ca.comcast.net] has quit
["ChatZilla 0.9.85 [Firefox 3.5.4/2009101600]"]
06:38 -!- alexf [n=alexf@99.184.228.180] has quit [Read error: 145 (Connection
timed out)]
06:39 < alc> > a:=1; println(a+1)
06:39 < rndbot> 2
06:40 < alc> go has builtin function print and println so dont have to
import "fmt" and use fmt.Print* for simple prints =)
06:42 < spikebike> how does one upload a competitor to shootout?
06:43 < spikebike> ah, found it
06:43 < Gracenotes> print is somewhat ad-hoc in the types it accepts
06:43 < uriel> KirkMcDonald: it isn't complicated, but programmers love to
make *everything* complicated
06:44 -!- Fl1pFl0p [n=FlipFlop@68.8.225.187] has left #go-nuts []
06:44 < Gracenotes> fmt.Print is ad-hoc in a sense as well, but...  it tries
harder :)
06:45 -!- ssmall [n=stuart@rrcs-97-77-53-108.sw.biz.rr.com] has left #go-nuts []
06:45 < alc> > println("Hello, 世界")
06:45 < rndbot> Hello, 世界
06:47 -!- plexdev [n=plexdev@arthur.espians.com] has joined #go-nuts
06:47 -!- r2p2 [n=billy@v32671.1blu.de] has joined #go-nuts
06:48 < tav> question...  will the following be useful to anyone at all?
i.e.  commit messages to the go repository...
06:48 < plexdev> http://is.gd/52moM by [Russ Cox] in go/src/pkg/json/ --
json: expose map in generic representation
06:48 < plexdev> http://is.gd/52moP by [Eden Li] in go/src/cmd/cgo/ -- cgo
translates empty function arguments into void instead of dying with 'unexpected
type: ...'.
06:48 < tav> i find it useful to keep track of what's being committed, but
not sure if it's worthwhile for the channel though?
06:49 < Gracenotes> that is neat.  how often do commits occur?
06:49 -!- goplexian [n=acombas@d154-20-0-9.bchsia.telus.net] has quit [Remote
closed the connection]
06:49 < tav> http://github.com/tav/go/commits/
06:50 < KirkMcDonald> Isn't there cia.vc already?
06:50 < Gracenotes> I guess you don't necessarily want an entire screenful
of commit messages interleaved with partings and joinings...
06:50 < tav> ^ seems to vary — but not too frequently
06:50 < uriel> tav: I did setup CIA
06:50 < uriel> but some people didn't like the idea
06:51 < tav> uriel: ah
06:51 < uriel> I'll leave it up to the go devs to enable or disable it in
the google code project
06:51 < Gracenotes> I probably wouldn't look at the messages otherwise
though.  hm.
06:51 < uriel> (all that is needed is to add a commmit hoock
06:51 < uriel> yea, IMHO it is a good idea
06:52 < Gracenotes> is there a tool for alerting when bugs of a certain
priority level or higher get fixed?
06:52 < tav> Gracenotes: if you star an issue on google code, you get
emailed when there's a status change or reply
06:52 < Gracenotes> I think machines might have a hard time sorting
"interesting" from "not interesting" commits :P but I'm open to it
06:53 -!- decriptor [n=decripto@53.250.sfcn.org] has joined #go-nuts
06:53 < tav> hehe
06:53 < Gracenotes> tav: yeah, but I mean, having the same purpose of a
commit bot
06:53 < Gracenotes> like CIA.  to alert people.  (few people active here
actually have commit access)
06:54 < tav> interesting idea
06:54 -!- alexf [n=alexf@adsl-99-155-155-151.dsl.klmzmi.sbcglobal.net] has joined
#go-nuts
06:54 < tav> none that i'm aware of
06:55 -!- decriptor [n=decripto@53.250.sfcn.org] has quit [Client Quit]
06:56 < tav> so would people be up for seeing if the commit messages are
useful — or shall i just pull the bot now?
06:57 < Gracenotes> fine by me.  not like "by me" is at all meaningful or
useful metric
06:59 < tav> cool, thx!  — well, i think our fearless leader uriel is
bringing a community together from all this chaos
06:59 < tav> so hopefully by the new year, achieving some form of rough
consensus within the community would be a lot easier!
06:59 < Gracenotes> I never voted for him!  j/k
06:59 < tav> hrhr
07:01 -!- blackmagik [n=blackmag@unaffiliated/blackmagik] has joined #go-nuts
07:01 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
07:01 < uriel> speaking of important issues, everyone should go vote for
this: http://code.google.com/p/googleappengine/issues/detail?id=2382
07:01 < uriel> !
07:02 -!- mitchellh1 [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
07:03 < alc> > var a = []int{1,2,3}; println(a)
07:03 < rndbot> [3/3]0xb76bc690
07:03 < tav> you should just put the img/iframe into
http://go-lang.cat-v.org/ ;p
07:03 < alc> > var a = []int{1,2,3}; fmt.Println(a)
07:03 < rndbot> [1 2 3]
07:03 < uriel> tav: hah, I'm not that evil :(
07:05 -!- path[l] [n=path@59.162.86.164] has joined #go-nuts
07:07 -!- snearch [n=olaf@e179129009.adsl.alicedsl.de] has joined #go-nuts
07:12 -!- amuck [n=amuck@h124.153.190.173.ip.windstream.net] has quit [Read error:
104 (Connection reset by peer)]
07:15 -!- Meowtimer [n=meowtime@vpn-ce242009.extern.uni-duisburg-essen.de] has
joined #go-nuts
07:15 -!- tsuwabuki [n=tsuwabuk@FLH1Abq140.kyt.mesh.ad.jp] has joined #go-nuts
07:17 -!- akheron [n=akheron@lilja.asteriski.fi] has joined #go-nuts
07:18 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
[Success]
07:19 -!- cpr420 [n=cpr420@67.165.199.143] has quit ["Vision[0.9.7-H-090423]: i've
been blurred!"]
07:20 -!- zhaozhou [n=zhaozhou@linfast76.bitnet.nu] has quit [Read error: 104
(Connection reset by peer)]
07:22 < KirkMcDonald> Go does not appear to have an obvious place to cram
third-party packages.
07:23 -!- zhaozhou [n=zhaozhou@linfast76.bitnet.nu] has joined #go-nuts
07:24 < Gracenotes> > type (Foo int; Bar int); fmt.Printf("%d %d",
Foo(4), Bar(7))
07:24 < rndbot> 4 7
07:24 < Gracenotes> huh.  general declarations really are quite general.
07:25 -!- Meowtimer_ [n=meowtime@132.252.242.9] has joined #go-nuts
07:26 -!- Meowtimer__ [n=meowtime@132.252.252.30] has joined #go-nuts
07:27 -!- Meowtimer__ [n=meowtime@132.252.252.30] has quit [Remote closed the
connection]
07:27 -!- Meowtimer__ [n=meowtime@132.252.242.9] has joined #go-nuts
07:27 < jurdendurden> so this irc window is also a 'go' interpreter?
07:27 < jurdendurden> how far can it interpret?
07:28 < jurdendurden> ie, can it interpret input from the user?
07:28 < jurdendurden> if i threw in a cin?  or some equivalent?
07:28 < spikebike> umm, no
07:28 < jurdendurden> sorry very new to go and really new to irc too :(
07:28 < KirkMcDonald> I expect reading from stdin would block, and then it
would time out.
07:28 < spikebike> oh heh
07:28 < spikebike> the bot is new
07:28 < blackmagik> thought that was a joke :)
07:29 < KirkMcDonald> > for {}
07:29 < jurdendurden> but i see people throwing out lines of code and
getting results
07:29 < alc> > type (Foo int; Bar int); fmt.Printf("%T %T", Foo(4),
Bar(7))
07:29 < rndbot> <killed> <no output>
07:29 < rndbot> main.Foo·1 main.Bar·2
07:29 < jurdendurden> hm so the rndbot is like a semi-compiler/interpreter?
07:29 < KirkMcDonald> jurdendurden: Starting a line with a '>' is what
prompts the bot to compile the code.
07:29 < jurdendurden> ahhhh
07:29 < jurdendurden> ok
07:30 < jurdendurden> so it CAN compile single lines of code.
07:30 < Gracenotes> KirkMcDonald: technically, I think I could make stdin
exec.PassThrough, and manually give it stuff :)
07:30 < jurdendurden> can it map strings to ints too?
07:30 < alc> is there a vim indent (not syntax) file for go?
07:30 < jurdendurden> i thought that was an excellent part of GO
07:30 < directrixx> > for { go func() { for { fmt.Print("WHAT"); } } };
<-make(chan bool);
07:30 < rndbot> <Error: syntax error near "<string>">
07:30 < jurdendurden> instead of making a table that linked ints to strings
07:30 < directrixx> > for { go func() { for { fmt.Print("WHAT"); } }();
}; <-make(chan bool);
07:31 < rndbot> <killed> <no output>
07:31 < jurdendurden> > fmt.Printf("99,99")
07:31 < rndbot> 99,99
07:32 < jurdendurden> hm
07:32 < blackmagik> fmt.Printf("", 10)
07:32 < blackmagik> > fmt.Printf("", 10)
07:32 < rndbot> ?(extra int=10)
07:32 < jurdendurden> that was odd.
07:33 < spikebike> > for i:=0;i<10;i++ { fmt.Printf("%d\n",i) }
07:33 < rndbot> 0 1 2 3 4 5 6 7 8 9
07:33 < spikebike> nice
07:33 < jurdendurden> > for i:=12;i>0;i-- { fmt.Printf(
07:33 -!- westymatt_ [n=westymat@173-17-254-31.client.mchsi.com] has quit
["Leaving"]
07:33 < rndbot> <Error: syntax error near Printf>
07:34 < jurdendurden> > for i:=12;i>0;i-- { fmt.Printf("%d\n",i) }
07:34 < rndbot> 12 11 10 9 8 7 6 5 4 3 2 1
07:34 < jurdendurden> muhahaha
07:34 < jurdendurden> that's freaking awesome
07:34 < jurdendurden> who implemented the bot?
07:34 < spikebike> and is it written in go?  ;-)
07:34 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has joined
#go-nuts
07:34 < blackmagik> spikebike, \n isn't flooding eh?  :)
07:34 < jurdendurden> do you need the \n?
07:34 < jurdendurden> > for i:=12;i>0;i-- { fmt.Printf("%d",i) }
07:34 -!- Meowtimer_ [n=meowtime@132.252.242.9] has quit [Read error: 145
(Connection timed out)]
07:34 < rndbot> 121110987654321
07:34 < blackmagik> > for i := 0; ; ++i { fmt.Printf("%d ", i) }
07:35 < rndbot> <Error: syntax error near 0>
07:35 < jurdendurden> ahh suppose you do for readability.
07:35 < jurdendurden> thought n = newline.
07:35 < spikebike> blackmagik: from the previous input I assumed it stripped
those
07:35 < jurdendurden> > for i:=12;i>0;i-- { fmt.Printf("%d\r\n",i) }
07:35 < rndbot> 12 11 10 9 8 7 6 5 4 3 2 1
07:35 < jurdendurden> ok i see.
07:35 < blackmagik> spikebike, ah
07:35 < directrixx> blackmagik, I believe only postfix ++ is supported
07:36 < spikebike> and it nicely produced one line as expected
07:36 < jurdendurden> right
07:36 < jurdendurden> so no uber spam for all
07:36 < blackmagik> > for i := 0; ; i++i { fmt.Printf("%d ", i) }
07:36 < rndbot> <Error: syntax error near i>
07:36 < blackmagik> > for i := 0; ; i++ { fmt.Printf("%d ", i) }
07:36 < rndbot> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 ...
07:36 < blackmagik> directrixx, yea good catch, i'm so used to using prefix
in other langs
07:36 < jurdendurden> heh
07:37 * spikebike resists bot torture
07:37 < jurdendurden> > for i:=12;i>0;--i { fmt.Printf("%d\r\n",i) }
07:37 < rndbot> <Error: syntax error near 0>
07:37 < jurdendurden> cant use prefix apparently.
07:37 < directrixx> blackmagik, it seems like most people always use one or
the other.  I always used postfix.
07:37 < directrixx> @eval 1+1
07:37 < rndbot> 2
07:37 < blackmagik> jurdendurden, like directrixx pointed out Go does not
have prefix unary operators
07:37 < jurdendurden> yeah i know i just had to try :)
07:37 < directrixx> @eval ++(1+1)
07:37 < rndbot> <Error: syntax error near Print>
07:38 < reppie> i never use prefix
07:38 < blackmagik> directrixx, for me it stemed from prefix being faster
than postfix but the compilers optimize those anyway so it's just a habit now i
guess
07:38 < reppie> i don't ilke the way it looks
07:38 < jurdendurden> i don't usually either it just looks weird.
07:38 < Gracenotes> all unary modifiers for expressions are prefix.  but x++
is a statement in Go
07:39 < directrixx> > i := 1; fmt.Printf("%V",i);
07:39 < rndbot> %V(int=1)
07:40 < directrixx> > i := "abc"; fmt.Printf("%V",i);
07:40 < rndbot> %V(string=abc)
07:40 < jurdendurden> name := "me"; fmt.Printf("%s),name);
07:40 < jurdendurden> > name := "me"; fmt.Printf("%s),name);
07:40 < rndbot> <Error: newline in string, syntax error near
"<string>">
07:40 < jurdendurden> > name := "me"; fmt.Printf("%V),name);
07:40 < rndbot> <Error: newline in string, syntax error near
"<string>">
07:40 < blackmagik> > fmt.Printf("\0")
07:40 < rndbot> <Error: non-oct character in escape sequence: ", non-oct
character in escape sequence: ">
07:41 < jurdendurden> > name := "me"; fmt.Printf("%s",name);
07:41 < rndbot> me
07:41 < jurdendurden> woops :P
07:41 < blackmagik> > fmt.Printf("\ta")
07:41 < rndbot> a
07:41 < jurdendurden> so is go the same as the andriod they spoke of before?
07:41 < blackmagik> > fmt.Printf("\u0378")
07:41 < rndbot> ͸
07:42 < blackmagik> > fmt.Printf("\u0060")
07:42 < rndbot> `
07:42 < alc> > fmt.Printf("%x", "hello, world")
07:42 < rndbot> 68656c6c6f2c20776f726c64
07:43 < blackmagik> > fmt.Printf("\u0040")
07:43 < rndbot> @
07:43 < blackmagik> > fmt.Printf("F")
07:43 < jurdendurden> > string := "hello, world!";
fmt.Printf("%s),string);
07:43 < rndbot> F
07:43 < rndbot> <Error: newline in string, syntax error near
"<string>">
07:43 < jurdendurden> > string := "hello, world!";
fmt.Printf("%s",string);
07:43 < rndbot> hello, world!
07:44 < jurdendurden> > string := "hello, world of GO programming, good
to be here!"; fmt.Printf("%s",string);
07:44 < rndbot> hello, world of GO programming, good to be here!
07:44 < blackmagik> i guess this bot is the REPL for Go, or was one included
with the binaries?
07:45 -!- Meowtimer [n=meowtime@vpn-ce242009.extern.uni-duisburg-essen.de] has
quit [Read error: 110 (Connection timed out)]
07:45 < blackmagik> > fmt.Printf("F")
07:45 < rndbot> F
07:45 < blackmagik> oh yea, forgot irc is ascii
07:45 < jurdendurden> so android is the SDK for google cell phones, does
anyone know if it is based on the GO language?  or is GO something completely
different?
07:45 -!- knave [n=kn4ve@41.240.171.194] has joined #go-nuts
07:46 < blackmagik> i believe android is all java
07:46 < blackmagik> at least the api
07:46 < jurdendurden> interesting.
07:46 < Gracenotes> it's possible to write something that compiles directly
to dalvik, but I'm not sure there's much activity there
07:47 < Gracenotes> blackmagik: here is the module that takes a string of
code and gives the bot output: http://gopaste.org/view/C8l0w
07:47 < Gracenotes> I wrote it (I'm running the bot from here, at the
moment)
07:48 < alc> > var a = []int{1,2}; print(a[2])
07:48 < rndbot> SIGTRAP: trace trap Faulting address: 0x0 PC=0x8048870
main·main+0x70 /tmp/arltvvynmpfwaybogen.go:4 main·main() mainstart+0x...
07:48 < Gracenotes> it may be possible to track it :)
07:48 < Gracenotes> *trick
07:48 < blackmagik> Gracenotes, sweet, now i can have my own little repl
instead of posting garbage in the channel
07:48 < jurdendurden> ok that answers my question of the capabilities of the
BOT :)
07:49 < Gracenotes> blackmagik: if you hook it up like that, sure.  there
are just one or two hard-coded things in the file, but it is specifically oriented
towards IRC, having a maximum output length and the like.  you might also be
interested in http://golang.org/pkg/exp/eval/
07:50 < Gracenotes> which is interpreting it; I'm not sure it compiles all
the way to ELF.  to be honest I haven't looked into it thatmuch.
07:50 < spikebike> hrm
07:51 < spikebike> I'm trying to split an array into 3 even slices
07:51 < spikebike> allocate 3 * maxsize then
07:51 < spikebike> x := ar[0:maxsize-1];
07:51 < spikebike> y := ar[maxsize:2*maxsize-1];
07:51 < spikebike> z := ar[2*maxsize:maxsize*3-1];
07:51 < spikebike> does that look right?
07:52 < alc> cut the trailing -1
07:52 < spikebike> oh oops
07:52 < spikebike> is the second number the length?
07:52 -!- JSharpe2 [n=jamie@5ad1d7f1.bb.sky.com] has joined #go-nuts
07:52 < spikebike> [offset:length]
07:53 < gl> no, it's the upper bound iirc
07:53 < Gracenotes> well, for 0-8, you'd have 0:3, 3:6, and 6:9
07:53 < Gracenotes> lower inclusive, upper exclusive
07:53 -!- Pete_27 [n=noname@115.64.1.61] has joined #go-nuts
07:53 < spikebike> 8 isn't a factor of 3
07:54 < spikebike> thus impossible
07:54 < spikebike> oh wait
07:54 < spikebike> if maxsize=10
07:54 < spikebike> that's 0-29
07:54 < spikebike> and the last slice is 20-29
07:55 < Gracenotes> I mean, if you have 9 elements, your indices will be
from 0 to 8, including both
07:55 -!- JSharpe [n=jamie@5ad1d7f1.bb.sky.com] has quit [Read error: 60
(Operation timed out)]
07:55 < spikebike> so if maxsize = 3 the array is 0-8
07:55 < spikebike> the nthe last slice is 6 to 8
07:56 < Gracenotes> the last slice is 6:9, as I said
07:56 < spikebike> er where do you get 9 from?
07:56 < KirkMcDonald> The end of a slice is one past the end.
07:56 < spikebike> z := ar[2*maxsize:maxsize*3-1];
07:56 < jurdendurden> oh good to know
07:57 < blackmagik> Gracenotes, how come 6g doesn't spit out an output file
when i try compiling it.  or am i doing something wrong?
07:57 < spikebike> 2*3:3*3-1
07:57 < Gracenotes> exclusive means 9 is on the boundary, but it's not part
of the slice.  So you get 6, 7, and 8 from [6:9]
07:57 < jurdendurden> so there is no true array in GO? just slices?
07:57 < spikebike> or 6:8
07:57 < KirkMcDonald> 0:3 refers to three elements.  But 0, 1, 2, 3 are four
numbers.
07:57 -!- trickie [n=trickie@94.100.112.225] has joined #go-nuts
07:57 < spikebike> jurdendurden: there are arrays as well
07:57 < jurdendurden> ok, so slices are just an option
07:57 < KirkMcDonald> jurdendurden: What do you mean by "true array"?
07:57 < jurdendurden> well not a portion :P
07:58 < jurdendurden> i know that a slice is a portion of an array
07:58 < KirkMcDonald> You can easily have a slice over the entirety of a
thing.
07:58 -!- path[l]_ [n=path@59.162.86.164] has joined #go-nuts
07:58 < Gracenotes> blackmagik: it is rather rough, currently configured for
my system and for IRC bot.  I have no guarantees about running it elsewhere,
sadly.  However, some things to note: in getDefaultConfig(), remove the "safe"
subdirectory.  finally, it is hardcoded to use 8g and 8l; these can be switched
out
07:58 < spikebike> oh so it is offset:length?
07:58 < KirkMcDonald> spikebike: No.
07:58 < KirkMcDonald> spikebike: It is a half-open range.
07:58 < jurdendurden> i mean...  is there any difference between an array
and a slice OTHER than that fact that a slice has the capability to be a portion
of an array?
07:58 < spikebike> ah
07:59 -!- nomism [n=nomism@e179240254.adsl.alicedsl.de] has joined #go-nuts
07:59 < KirkMcDonald> spikebike: The second number is the index after the
last one in the slice.
07:59 < spikebike> so I want 0:3, 3:6, 6:9
07:59 < spikebike> got it
07:59 -!- path[l]_ [n=path@59.162.86.164] has quit [Client Quit]
07:59 < KirkMcDonald> spikebike: a[0:len(a)] is a slice over the entirety of
a.
07:59 -!- path[l]_ [n=path@59.162.86.164] has joined #go-nuts
07:59 -!- directrixx [n=directri@ip68-231-189-247.tc.ph.cox.net] has quit [Read
error: 110 (Connection timed out)]
08:00 < Gracenotes> jurdendurden: it's covered in the specification more
clearly, but an array *type* is one where the length is known at compile time
08:00 < spikebike> x := ar[0:maxsize];
08:00 < spikebike> y := ar[maxsize:2*maxsize];
08:00 < spikebike> z := ar[2*maxsize:3*maxsize];
08:00 < Smergo> http://golang.org/doc/go_spec.html#Array_types
08:00 < spikebike> nice and clean
08:00 < jurdendurden> ok.  that makes perfect sense then.  a slice is simply
an array without a KNOWN length.
08:00 < jurdendurden> which could be a portion of an existing array or it's
own array?
08:00 < KirkMcDonald> spikebike: And this is why the slice goes one past the
end.  :-)
08:00 < spikebike> got it
08:01 < Gracenotes> jurdendurden: a slice *type* is one where it is not
known.  a slice dynamically creates an array and gives you the slice behind it
08:01 < Gracenotes> this might help:
http://golang.org/doc/go_spec.html#Array_types
08:01 < jurdendurden> thank you i hate to be an utter newb and all.
08:01 < spikebike> also: http://golang.org/doc/effective_go.html#slices
08:01 < jurdendurden> but seriously thanks for the help
08:04 -!- kaigan|work
[n=kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has joined
#go-nuts
08:04 < spikebike> so slices are some fraction of an underlying array which
can be dynamically generated
08:04 < spikebike> but don't auto size...  they have a max capacity
08:04 < spikebike> so you have to pass your maxsize to Make
08:05 < spikebike> then you can play with any subset of that via a slice
08:05 < spikebike> the nice thing is that you can pass a slice to a function
which can then decide it's too small, enlarge it, and return it back to you
08:05 < spikebike> which has a couple nice benefits
08:06 < spikebike> if the capacity is there it can resize with minimal
overhead
08:06 < spikebike> and if it's not you don't have to play pointer swapping
games
08:06 < Gracenotes> you can't get the underlying array from the slice :/ or
any part outside of its bounds
08:06 -!- [Pete_27] [n=noname@115.64.1.61] has quit [Read error: 110 (Connection
timed out)]
08:06 < JBeshir> Gracenotes: You can.
08:07 < JBeshir> You can get the capacity of the slice, and resize the slice
up to that.
08:07 -!- asmo [n=asmo@83.248.96.173] has joined #go-nuts
08:08 < Gracenotes> JBeshir: eh?  that is tricky.
08:08 < spikebike> JBeshir: well Gracenotes is calling capacity bounds
08:08 < spikebike> but capacity != lenght
08:08 < spikebike> well it doesn't have to be
08:08 < spikebike> booo
08:08 < spikebike> x,y,z arrays allocated indepedently is faster than 3
slices of the same array
08:08 < Gracenotes> JBeshir: how do you resize?  I forget
08:08 < JBeshir> Gracenotes: Me too, but I remember it being possible.
08:09 < spikebike> there is an example at
http://golang.org/doc/effective_go.html#slices
08:09 < spikebike> func: Append
08:09 < spikebike> they cover both cases there
08:09 < spikebike> (if fits or not)
08:10 -!- hackbench [n=hackbenc@78.179.182.49] has joined #go-nuts
08:10 < KirkMcDonald> Note that if you make a new slice extending off the
end of an existing slice, any other slices which already reference that memory
will see changes.
08:11 < Gracenotes> > hmm := make([]int, 10); hmm[6] = 1; eh := hmm[0:5];
fmt.Print(eh[3:8])
08:11 < rndbot> [0 0 0 1 0]
08:11 < Gracenotes> I see
08:12 < KirkMcDonald> The slice syntax will never allocate a new array.
08:12 -!- nomism [n=nomism@e179240254.adsl.alicedsl.de] has quit ["Verlassend"]
08:13 < spikebike> right
08:13 < spikebike> who wrote rndbot?
08:14 < Gracenotes> the worst it can do is..  uh..  cause your entire
program to crash..  meh.
08:14 < KirkMcDonald> If your array index is out of bounds, you probably
deserve it.  :-)
08:14 < Gracenotes> spikebike: I wrote it, running it from an Arch Linux
VirtualBox on this laptop
08:14 < spikebike> heh, cool
08:15 < spikebike> Gracenotes: it would make a great google wave bot
08:16 < Gracenotes> really?  I haven't played around much with Google Wave.
I don't even think my Google account is activated for it
08:16 -!- path[l] [n=path@59.162.86.164] has quit [Success]
08:17 -!- asmo [n=asmo@83.248.96.173] has quit ["Leaving..."]
08:17 < spikebike> that can be fixed ;-)
08:19 < Gracenotes> oh, do you have an invite, perchance?  If they have an
API for developers, that *is* pretty neat
08:20 -!- lenst [n=user@81-237-244-185-no52.tbcn.telia.com] has joined #go-nuts
08:21 < spikebike> they do
08:21 < spikebike> it's IMO the most promising part of google wave
08:21 < spikebike> would ya release the source to your bot if you got it to
work with google wave?
08:23 < Gracenotes> it is pretty much released, at least all of it except
the main method :) compiling+running: http://gopaste.org/view/C8l0w irc framework:
http://go.pastebin.com/m3464c811 both somewhat incomplete
08:24 < spikebike> heh
08:24 < spikebike> a yes would have sufficed ;-)
08:24 < Gracenotes> someone suggested earlier that I put is on Google Code.
that sounds like a plan
08:25 < spikebike> would to be able to have a real time discussion about go
where the bot could interpret anything intended for it would be really cool
08:25 < Gracenotes> spikebike: yeah, right now it's capable of running 3
concurrenct processes, each of size 64MB.  that won't scale well if I'm doing it
by my lonesone :)
08:25 < spikebike> might even remote the one line restriction
08:25 < Gracenotes> *m
08:25 < spikebike> well if you post the code you wouldn't have to host.
08:26 < Gracenotes> yeah, that is what you're getting at
08:26 < spikebike> send me the email you want to wave enable PM if you wish
08:27 -!- knave [n=kn4ve@41.240.171.194] has quit [Read error: 148 (No route to
host)]
08:27 < Gracenotes> all right
08:27 < spikebike> sent
08:27 < spikebike> well sent to google
08:27 < jurdendurden> gracenotes = pioneer GO programmer :)
08:27 < spikebike> they say "Invitations will not be sent immediately.  We
have a lot of stamps to lick."
08:27 < jurdendurden> lol
08:27 < jurdendurden> do they now?
08:27 < spikebike> but you should get it soonish
08:27 < Gracenotes> fair enough
08:28 < jurdendurden> they must be getting a lot of traffic lately with Wave
and GO coming out.
08:28 < Chris> it seems to take a day or two.
08:28 < Chris> (wave invites I've sent)
08:28 < spikebike> google's used to lots of traffic ;-)
08:28 < jurdendurden> yes, yes they are.
08:28 < KirkMcDonald> It's good to finally see Google getting some traffic.
08:28 < spikebike> yeah seems to be shortening as of late
08:28 < Gracenotes> I need to work on, generally, making the bot less ad-hoc
in that time
08:28 < plexdev> http://is.gd/52pSn by [Trevor Strohman] in 6 subdirs of
go/src/pkg/ -- Add benchmarks for commonly used routines.
08:28 < Gracenotes> heh
08:28 < jurdendurden> google deserves traffic.
08:29 < Gracenotes> I wouldn't mind it as my ISP.  at least, as things are
now.
08:29 < Gracenotes> anyhow.
08:30 < jurdendurden> the only two steps left for google are really ISP and
O/S (besides a cell phone os)
08:30 < jurdendurden> nm they have an isp :P http://www.google.com/tisp/
08:31 < scoopr> chromeos isn't really a cellphone os
08:31 * spikebike tries to convince go to be more L1 cache friendly
08:31 < scoopr> not really a desktop either though
08:31 < spikebike> scoopr: yeah it's more more limited
08:31 < jurdendurden> nod
08:31 < spikebike> cellphone OS's allow applications
08:31 < scoopr> chromeos allows application!  web applications!  ;)
08:32 < spikebike> My bet is going to fold, just like iphone did
08:32 < spikebike> originally apple was only going to allow web apps
08:32 < vegai> I wonder if the next gaming consoles'll be thin clients too
08:32 < vegai> without any way to locally start the programs
08:32 < spikebike> storage I can see being in the cloud
08:33 < spikebike> faster 3G chips gotta be local
08:33 < jurdendurden> well honestly clients are not in the hands of the
enemy...  if you program them correctly.
08:33 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has quit ["This
computer has gone to sleep"]
08:33 < spikebike> jurdendurden: thats less of an issue if they don't ahve
root
08:33 < jurdendurden> true
08:34 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has joined
#go-nuts
08:40 -!- Meowtimer [n=meowtime@132.252.242.9] has quit ["Arr"]
08:41 -!- knave [n=kn4ve@41.240.171.194] has joined #go-nuts
08:44 -!- shoafb [n=The_Doct@98.150.247.183] has joined #go-nuts
08:44 < nbaum> vegai: Seems likely.  Excellent excuse to force you to keep
your console online all the time.
08:45 < alc> hmm, how does one use 2-d array?
08:45 < alc> > var a = [2][2]int{{1,2},{3,4}} // doesnt work
08:45 < rndbot> <Error: syntax error near int>
08:48 < KirkMcDonald> > a := [2][2]int{[2]int{1, 2}, [2]int{3, 4}}
08:48 < rndbot> <no output>
08:48 < nbaum> What KirkMcDonald said.
08:48 < alc> > a := [2][2]int{[2]int{1, 2}, [2]int{3, 4}};
print(a[1][1]);
08:48 < rndbot> 4
08:49 < nbaum> Massive violation of no stuttering rule.
08:49 < alc> oh, got it, thanks; but looks ugly..
08:53 -!- emilh_ [i=emil@Amanita.Update.UU.SE] has joined #go-nuts
08:55 < tav> nbaum: no stuttering rule ?
08:56 -!- p0g0 [n=pogo@unaffiliated/p0g0] has quit [Read error: 110 (Connection
timed out)]
08:56 -!- p0g0 [n=pogo@unaffiliated/p0g0] has joined #go-nuts
08:57 < jurdendurden> part of the idea behind GO is no stuttering
08:58 < spikebike> heh, yeah I'm curious as well
08:58 < spikebike> oh heh
08:58 < spikebike> yeah foo *foo = foo ( foo foo foo foo ;-)
08:58 < jurdendurden> exactly.
08:58 < jurdendurden> lol
09:00 -!- alexf [n=alexf@adsl-99-155-155-151.dsl.klmzmi.sbcglobal.net] has quit
[Client Quit]
09:00 -!- snearch [n=olaf@e179129009.adsl.alicedsl.de] has quit ["Ex-Chat"]
09:03 -!- murodes1 [n=James@124.169.17.241] has quit [Read error: 145 (Connection
timed out)]
09:09 < alc> @eval 15 &^ 7
09:09 < rndbot> 8
09:10 < alc> > a,b := 15,7; fmt.Printf("%b %b %b", a, b, a &^ b)
09:10 < rndbot> 1111 111 1000
09:11 < alc> > a,b := 15,5; fmt.Printf("%b %b %b", a, b, a &^ b)
09:11 < rndbot> 1111 101 1010
09:12 < msbranco> hello,
09:12 < msbranco> a question
09:12 < msbranco> (having some fun with maps)
09:12 < msbranco> var k map[string]map[string]string;
09:12 < msbranco> k = make(map[string]map[string]string);
09:12 < msbranco> k["a"] = make(map[string]string);
09:13 < msbranco> k["a"]["b"] = "c";
09:13 < msbranco> fmt.Printf("value is %s\n", k["a"]["b"]); // all well
09:13 < msbranco> so let's try to delete elements...
09:13 < msbranco> k["a"]["b"] = "", false; // fine
09:13 < msbranco> k["a"] = nil, false; // fails with: 'cannot use nil as
type string'
09:13 -!- murodese [n=James@124.169.17.241] has joined #go-nuts
09:13 < msbranco> k["a"] = make(map[string]string), false; // maybe like
this?  not ideal, but..  anyway fails with 'cannot use make(map[string] string)
(type map[string] string) as type string'
09:13 < msbranco> k["a"] = "", false; // also fails with: 'cannot use ""
(type string) as type map[string] string in function argument'
09:14 < msbranco> k["a"] = nil; // fine, but doesn't really delete the
element..  remains present (just nil)
09:14 < msbranco> any idea?
09:14 < msbranco> basically I want to delete k["a"] ...
09:17 -!- grizzlysmit [n=grizzlys@123-243-91-241.tpgi.com.au] has joined #go-nuts
09:19 -!- grizzlysmit [n=grizzlys@123-243-91-241.tpgi.com.au] has left #go-nuts []
09:23 < KirkMcDonald> That sounds like a bug.
09:24 < msbranco> it does, doesn't it?...
09:24 < msbranco> well, i'll ask in the list
09:24 -!- lulzmonkey [n=lulzmonk@122.175.69.246] has quit [Read error: 110
(Connection timed out)]
09:30 * spikebike tries to warp his brain into thinking in go
09:30 * knave tries to warp his brain into thinking
09:30 < spikebike> page 41 of http://golang.org/doc/GoCourseDay3.pdf
09:30 * knave gives up
09:31 -!- m-takagi_ [n=m-takagi@linode.m-takagi.jp] has quit ["Tiarra
0.1+svn-29652: SIGINT received; exit"]
09:34 -!- mkanat [n=mkanat@67.188.1.39] has joined #go-nuts
09:37 < spikebike> I had examples snippets of code that are hard to turn
into working programs
09:40 < spikebike> er s/had/hate/
09:41 * spikebike tries to get the leaky bucket example working
09:41 -!- PaulOkopny [n=paul@79.142.86.161] has joined #go-nuts
09:43 < PaulOkopny> Can anyone tell how to join several arrays into one?
09:43 < KirkMcDonald> PaulOkopny: Allocate a new array with enough space to
hold all of them.
09:44 < KirkMcDonald> PaulOkopny: Then copy them into it.
09:46 < PaulOkopny> KirkMcDonald, copy element by element?  or is there an
unary operation?
09:48 -!- triplez [n=triplez@bb116-14-64-30.singnet.com.sg] has quit []
09:50 -!- Kashia [n=Kashia@port-92-200-24-186.dynamic.qsc.de] has joined #go-nuts
09:54 -!- crashR [n=crasher@62.212.121.29] has joined #go-nuts
09:55 -!- Sungem [n=Sungem@118-168-236-85.dynamic.hinet.net] has quit [Client
Quit]
10:01 -!- Anders__ [n=Anders@130.243.200.47] has joined #go-nuts
10:04 < poucet> PaulOkopny: I think he means copy element by element, and
you are using the term 'unary' completely wrong there.
10:05 < nbaum> PaulOkopny means "atomic", I presume.
10:05 < PaulOkopny> yes.  thank you
10:06 -!- hackbench [n=hackbenc@78.179.182.49] has quit [Read error: 145
(Connection timed out)]
10:08 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has
joined #go-nuts
10:08 -!- Lorthirk [n=cm0901@host70-37-dynamic.31-79-r.retail.telecomitalia.it]
has joined #go-nuts
10:09 -!- Lorthirk [n=cm0901@host70-37-dynamic.31-79-r.retail.telecomitalia.it]
has quit [Read error: 104 (Connection reset by peer)]
10:10 -!- Lorthirk [n=cm0901@host70-37-dynamic.31-79-r.retail.telecomitalia.it]
has joined #go-nuts
10:14 < TenOfTen> that sdl guy removed the opengl files....
http://github.com/banthar/Go-SDL
10:15 < jordyd> TenOfTen: They were causing compilation problems.
10:15 < TenOfTen> they were the only thing i wanted.  any other bindings
around?  perhaps to glfw?
10:18 -!- gjmilne [n=gjmilne@60-234-148-144.bitstream.orcon.net.nz] has joined
#go-nuts
10:19 < jordyd> Looks like he has this too:
http://github.com/banthar/Go-OpenGL . But it's not really on the Go bindings page,
so I don't know if he thinks it's in a usable state.
10:20 < TenOfTen> weird, but thanks
10:20 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has joined #go-nuts
10:20 -!- jA_cOp [n=yakobu@88.89.34.27] has joined #go-nuts
10:22 < TenOfTen> it didnt build here
10:24 -!- gjmilne [n=gjmilne@60-234-148-144.bitstream.orcon.net.nz] has quit
["Leaving"]
10:30 -!- shoafb [n=The_Doct@98.150.247.183] has quit ["Leaving..."]
10:31 -!- nullpo [n=nullpo@221.252.46.83] has joined #go-nuts
10:32 -!- robinduckett [n=root@70.32.107.230] has joined #go-nuts
10:33 < robinduckett> morning
10:34 < robinduckett> having difficulty installing go, it fails :/
10:34 < uriel> robinduckett: what error do you have
10:34 -!- mitchellh1 [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
["Leaving."]
10:34 < uriel> and see the url in the title about common problems
10:35 < robinduckett> It's Issue 84 on the google code site
10:35 -!- Lorthirk [n=cm0901@host70-37-dynamic.31-79-r.retail.telecomitalia.it]
has quit [Read error: 104 (Connection reset by peer)]
10:35 < robinduckett> I'm running CentOS
10:36 -!- Lorthirk [n=cm0901@host70-37-dynamic.31-79-r.retail.telecomitalia.it]
has joined #go-nuts
10:36 -!- Kashia [n=Kashia@port-92-200-24-186.dynamic.qsc.de] has quit [Read
error: 60 (Operation timed out)]
10:37 -!- salomon_ [n=quassel@proxy-socks-2.ig-iit.com] has joined #go-nuts
10:37 < robinduckett> 5.2
10:38 -!- Kashia [n=Kashia@port-92-200-24-186.dynamic.qsc.de] has joined #go-nuts
10:38 < salomon_> Hi every-one
10:38 < robinduckett> sigh
10:38 < robinduckett> it's because i'm installing as root
10:38 < robinduckett> surely this needs to be done on root?
10:38 < jordyd> Nope.  No root needed.
10:39 < jordyd> Unless you've got $GOBIN defined as something under root's
jurisdiction.
10:39 < robinduckett> $GOBIN is $HOME/bin
10:40 < jordyd> So you don't really need to be root, as long as $GOBIN is in
your PATH, you're fine.
10:40 < robinduckett> okay, but for the box I'm using I do need to be root,
as that's the only login available
10:40 < robinduckett> I know it sounds silly, don't get me started.
10:40 < robinduckett> I work for an odd company.
10:41 -!- Lorthirk [n=cm0901@host70-37-dynamic.31-79-r.retail.telecomitalia.it]
has quit [Read error: 104 (Connection reset by peer)]
10:41 < robinduckett> If I compile go on a normal user, can I use go via
root?
10:41 -!- Lorthirk [n=cm0901@host70-37-dynamic.31-79-r.retail.telecomitalia.it]
has joined #go-nuts
10:41 < salomon_> Is there a standard way to build go programs ?
10:41 < salomon_> I saw the gomake utility but I can't find any
documentation about it :(
10:42 <+danderson> the makefiles are pretty much all there is afaik
10:42 <+danderson> I don't know of anything more formal than that currently
10:42 < salomon_> Then what is gomake ? What is it's difference with the
standard make ?
10:42 < jordyd> robinduckett: Hrm...  I suppose as long as you make sure
roots has the correct variables and PATH, but I've never done it before, so I
can't be sure.
10:42 < jordyd> root*
10:44 < salomon_> The problem with makefiles is that it does not handle the
packages dependencies and therefore the build order...
10:45 < robinduckett> jordyd it has the correct paths and variables, it's
failing because one of the tests fails due to the fact that it is able to chmod a
file it wouldn't be able to due to running as root, and not an unprivilaged user.
I know why it's not working, I'm saying that test is flawed and halting the entire
build of the compiler in the process is stupid.
10:46 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has quit
[Remote closed the connection]
10:46 -!- afurlan [n=afurlan@200.160.16.18] has joined #go-nuts
10:48 -!- teedex [n=teedex@204.14.155.161] has quit [Remote closed the connection]
10:51 < salomon_> so...  No solution ?
10:54 < robinduckett> i thought the linker handled the dependancies
10:55 < salomon_> The linker does...  The compiler doesn't
10:56 < robinduckett> so...your problem is, essentially, that you don't know
how to write makefiles
10:57 < salomon_> I do know how to write makefiles
10:57 -!- GeoBSD [n=geocalc@lns-bzn-31-82-252-193-128.adsl.proxad.net] has joined
#go-nuts
10:57 < robinduckett> kk
10:57 < salomon_> I just don't want to set the packages dependancies
manually in the makefile
10:57 < robinduckett> why would you need to?
10:58 < salomon_> If I got A.go that depends on B.go, if I "make A.go", the
compiler will fail cause B.go has not been compiled yet
10:58 < robinduckett> will it?
10:58 < robinduckett> I watched the video and the way he explained it kind
of seemed like that wouldn't happen...
10:59 < nbaum> Sadly it will.
11:00 < salomon_> So I'd like an implicit rule that detects that A.go
depends on B.go and that automatically compiles B.go before
11:00 < robinduckett> well I'd love to help but I can't even get the
compiler compiled.
11:01 < salomon_> lool
11:01 < salomon_> That's a problem :p
11:01 < robinduckett> so looks like my trip down this avenue has wasted a
couple hours of my life for nothing, someone hit me an email when 1.0 is released.
11:01 < robinduckett> not really, I'll use something that works.
11:01 < robinduckett> like qbasic ;)
11:02 < robinduckett> ew okay I threw up a little
11:02 < salomon_> yeah, this really rocks !
11:02 -!- brunov [n=bruno@190.191.110.64] has joined #go-nuts
11:04 < snake_> a quick question: for data, ok:= <- mychan; ok {} will
iterate over all buffered data in the channel, or forever with the same data each
time?  I mean - the item before first semicolon should execute just once isn't it?
11:04 < robinduckett> is there syntax highlighting for vi yet?
11:04 -!- salomon_ [n=quassel@proxy-socks-2.ig-iit.com] has quit
["http://quassel-irc.org - Discuter simplement.  Partout."]
11:04 < snake_> I have my hand-made .syntax file for mc
11:04 < robinduckett> mc?
11:04 < snake_> yep
11:05 < robinduckett> what's that?
11:05 < snake_> http://www.midnight-commander.org/
11:07 < jordyd> robinduckett: Syntax highlighting is in $GOROOT/misc
11:11 < robinduckett> thanks jordyd
11:11 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit [Read error:
104 (Connection reset by peer)]
11:11 -!- Lorthirk [n=cm0901@host70-37-dynamic.31-79-r.retail.telecomitalia.it]
has quit [Remote closed the connection]
11:13 -!- robinduckett [n=root@70.32.107.230] has quit ["leaving"]
11:18 -!- triplez [n=triplez@124.155.195.7] has joined #go-nuts
11:18 -!- Wezz6400 [n=Wezz6400@145-118-111-123.fttx.bbned.nl] has quit [Read
error: 104 (Connection reset by peer)]
11:19 -!- Wezz6400 [n=Wezz6400@145-118-111-123.fttx.bbned.nl] has joined #go-nuts
11:19 -!- Netsplit orwell.freenode.net <-> irc.freenode.net quits: Anusko,
Zarutian
11:19 -!- Netsplit orwell.freenode.net <-> irc.freenode.net quits:
KragenSitaker, doublec, Meidor, dstien, huf, spb, jlouis, exitstate
11:20 -!- Netsplit over, joins: Anusko, Zarutian
11:23 -!- Meidor [n=quassel@cl-936.ams-05.nl.sixxs.net] has joined #go-nuts
11:23 -!- dstien [n=daniel@89.236.202.84.customer.cdi.no] has joined #go-nuts
11:23 -!- KragenSitaker [n=kragen@panacea.canonical.org] has joined #go-nuts
11:23 -!- exitstate [n=xorl@xorl.xen.prgmr.com] has joined #go-nuts
11:23 -!- spb [i=stephen@freenode/developer/exherbo.spb] has joined #go-nuts
11:23 -!- jlouis [i=jlouis@130.225.165.29] has joined #go-nuts
11:23 -!- huf [n=huf@mu.parawag.net] has joined #go-nuts
11:23 -!- doublec [n=doublec@li30-216.members.linode.com] has joined #go-nuts
11:28 -!- Anders__ [n=Anders@130.243.200.47] has quit ["Lämnar"]
11:29 -!- snearch_ [n=olaf@85.179.129.9] has joined #go-nuts
11:32 -!- clearscreen [n=clearscr@213.93.248.70] has joined #go-nuts
11:34 -!- PaulOkopny [n=paul@79.142.86.161] has left #go-nuts []
11:34 -!- clearscreen [n=clearscr@213.93.248.70] has quit [Read error: 104
(Connection reset by peer)]
11:39 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has quit
[Read error: 110 (Connection timed out)]
11:40 -!- m-takagi [n=m-takagi@linode.m-takagi.jp] has joined #go-nuts
11:40 -!- aarapov [n=aarapov@r11mq202.net.upc.cz] has joined #go-nuts
11:42 -!- afurlan [n=afurlan@200.160.16.18] has quit [Remote closed the
connection]
11:42 -!- afurlan [n=afurlan@200.160.16.18] has joined #go-nuts
11:42 -!- jA_cOp_ [n=yakobu@88.89.34.27] has joined #go-nuts
11:43 -!- afurlan [n=afurlan@200.160.16.18] has quit [Remote closed the
connection]
11:44 -!- afurlan [n=afurlan@200.160.16.18] has joined #go-nuts
11:44 -!- jA_cOp [n=yakobu@88.89.34.27] has quit [Read error: 145 (Connection
timed out)]
11:48 -!- snearch_ [n=olaf@85.179.129.9] has quit ["Ex-Chat"]
11:49 -!- afurlan [n=afurlan@200.160.16.18] has quit [Remote closed the
connection]
11:50 -!- afurlan [n=afurlan@200.160.16.18] has joined #go-nuts
11:52 -!- afurlan [n=afurlan@200.160.16.18] has quit [Remote closed the
connection]
11:52 -!- afurlan [n=afurlan@scorpion.mps.com.br] has joined #go-nuts
11:56 -!- afurlan [n=afurlan@scorpion.mps.com.br] has quit [Remote closed the
connection]
11:56 -!- afurlan [n=afurlan@scorpion.mps.com.br] has joined #go-nuts
11:58 -!- lotrpy [n=lotrpy@202.38.97.230] has joined #go-nuts
12:06 -!- triplez_ [n=triplez@124.197.92.42] has joined #go-nuts
12:10 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has joined
#go-nuts
12:11 -!- snearch [n=olaf@e179129009.adsl.alicedsl.de] has joined #go-nuts
12:13 < spikebike> I have a program using async communications...  which is
great
12:13 < spikebike> but main exits before it's done.
12:13 < spikebike> is there any way to check a channel to see if there's
anything pending in it/
12:14 < spikebike> preferably just block till it's sent
12:14 < jessta> spikebike: read from the channel, it will block until
something is sent
12:15 -!- triplez [n=triplez@124.155.195.7] has quit [Read error: 113 (No route to
host)]
12:16 < spikebike> well main is sending to a go routing through an async
channel
12:17 < spikebike> not sure what reading from a channel I only write to will
do
12:17 < Ycros> spikebike: have a channel that the goroutine will write on
when it's done
12:17 < nbaum> I would suggest having it not do that.
12:17 < spikebike> having it not do what?
12:18 < spikebike> Ycros: well the goroutine doest know when it's done
12:18 < spikebike> I have a variable amount of work, send it to workers, and
want to exit when done
12:19 < spikebike> I made the channel async so that writing a few values
wouldn't block and I could get some useful work done while it's spooling out
12:19 < uriel> ok := ch <- 3;
12:19 < uriel> ok will be true if the send worker
12:20 < uriel> well, you want the other way around:
12:20 < spikebike> any way to block on OK being false?
12:20 < uriel> if ok := x <- ch; ok { got x }
12:20 < uriel> blcking is the default behavior
12:20 < uriel> x <- ch
12:21 < uriel> that will block until something shows up in the channel
12:21 < spikebike> well the channel is buffered var writeChan = make(chan
int,pool)
12:21 < spikebike> so I want to be able to do buffered writes to writechan
from main
12:21 < uriel> well, it doesn't matter, a read from the channel will block
until something is there, buffered or not
12:21 < spikebike> but not exit main till writechan is done
12:22 < uriel> I have no clue what you mean
12:22 < Ycros> uriel: I'm guessing his program is terminating early because
main is finishing before his goroutines are done
12:22 < spikebike> make(chan int,pool) creates a channel I can make pool
writes to before blocking?
12:23 < uriel> reading from a chan is always blocking, unless you do what I
said and use the 'read' as an expression, which is true if it works, and false if
nothing is in the channel
12:23 < spikebike> Ycros: right
12:23 < uriel> Ycros: then use another channel, that the goruotines write to
when they are done
12:24 < spikebike> uriel: but you can't since the goroutines never know
12:24 < uriel> then when the hell do you want the program to end?
12:24 < Ycros> uriel: I already suggested that
12:24 < spikebike> it's up to the sender to decide when done
12:24 < uriel> I really have no clue what you are doing
12:24 < alexsuraci> are you spawning a known number of goroutines?
12:25 < alexsuraci> at least at runtime>
12:25 -!- Perberos [n=Perberos@190.49.53.219] has joined #go-nuts
12:25 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
12:26 < spikebike> say I want to send 100 ints to a goroutine via a buffered
channel
12:26 < alexsuraci> if so you can have them write to a channel, and after
they're all spawned in main just receive N number of items from that channel
before exitinh
12:26 < alexsuraci> *exiting
12:27 < spikebike> I basically want a MPI_Wait
12:27 < spikebike> (something pending is not finished)
12:27 < uriel> spikebike: maybe if you would tell us what *problem* you are
trying to solve, instead of how you are trying to solve, we could help you find a
way that fits Go
12:27 < spikebike> or a shell wait for that matter (background processes
haven't exited yet)
12:27 < uriel> MPI?  oh dear..
12:28 -!- ziyu_huang_ [n=ziyuhuan@114-137-119-190.dynamic.hinet.net] has joined
#go-nuts
12:28 < uriel> spikebike: Go is not MPI, don't try to do MPI in go, it makes
no sense
12:28 < uriel> learn how the Go concepts work, and then use that to solve
your problem, whatever that is
12:28 < spikebike> Ok, I have 4 workers working on uneven size blocks of
work 1..N
12:28 < alexsuraci> spikebike: * Multi-content pastes.
12:28 < alexsuraci> * Code tweaks.
12:28 < alexsuraci> * Moved jQuery to new gopaste dir.
12:28 < alexsuraci> er
12:28 < spikebike> but I must write those blocks out in order to a file
12:29 < alexsuraci>
http://github.com/vito/go-play/blob/master/gopaste/pretty.go#L145
12:29 < alexsuraci> pardon the spam, rogue middle click
12:29 < spikebike> So I have channels to the workers, they have channels to
me to report which block is done, then I want to send them out in order to a go
routing writing the file
12:30 < alexsuraci> spikebike: that bit may help; first loop spawns n number
of goroutines which send a signal when they're finished.  second loop collects N
number of things from the channel and finishes.
12:30 -!- afurlan [n=afurlan@scorpion.mps.com.br] has quit [Remote closed the
connection]
12:30 < spikebike> So if I have blocks 1-100.  I might get back 10, then 20,
then 1.  I want to start writing 1 to disk
12:31 -!- afurlan [n=afurlan@scorpion.mps.com.br] has joined #go-nuts
12:31 < spikebike> but I don't want main to exit till block 100 is written
to disk
12:31 -!- ziyu [n=ziyuhuan@114-137-119-190.dynamic.hinet.net] has quit ["Colloquy
for iPhone - http://colloquy.mobi"]
12:32 < spikebike> so the problem isn't the gorouting writing to disk not
knowing when to exit
12:32 < uriel> what is 'gorouting wirting'?
12:32 < alexsuraci> so have them send their "IDs" through the channel.  but
that all sounds like a synchronous problem being fitted into goroutines.
12:32 < uriel> nah!
12:32 < spikebike> it's that main exits because I already sent the last
block to the file writer
12:32 < uriel> just spawn the goroutines, hand each of them a channel, and
then read from the channels in whatever order you like to write stuff
12:33 < spikebike> heh, sorry, goroutine writing
12:33 < uriel> when you hit a spot where the correct goroutine is not done,
it will block, and the main 'thread' will just wait until that block is done, when
it is done it will get the data, and it can write it to a file
12:33 < uriel> if you have an array of channels, it is a simple foor loop
12:34 < uriel> er for
12:34 < uriel> or I'm missing something?
12:34 < uriel> (note, this assumes you spawn as many goroutines as the total
number of tasks/blocks, that should be fine as far as I can tell
12:34 -!- afurlan [n=afurlan@scorpion.mps.com.br] has quit [Remote closed the
connection]
12:35 < spikebike> whats the paste URL?
12:35 -!- afurlan [n=afurlan@scorpion.mps.com.br] has joined #go-nuts
12:35 < uriel> gopaste.org
12:36 < spikebike> http://gopaste.org/view/hh0Ec
12:37 < uriel> spikebike: don't use a 'pool'
12:37 < spikebike> well then everything blocks and gets slow
12:38 < uriel> do this: create an array of channels as big as the number of
tasks you want done, start one goroutine for each task, and pass it the
corresponding channel
12:38 -!- nictuku [n=nictuku@74.125.57.33] has joined #go-nuts
12:38 < spikebike> yeah I tried that, needed 10k+ tasks and the CPUs end up
50% busy ish
12:38 < uriel> no, because you start all the tasks in parallel, then iterate
in order over the channels, doing normal blocking reads
12:39 < uriel> 10k+ taks should not be a problem IMHO
12:39 < uriel> er tasks
12:40 < uriel> if you don't want to start all tasks at once, do it in
batches
12:40 < uriel> start ten, read those ten, start the next ten, read the next
ten
12:40 -!- jA_cOp_ [n=yakobu@88.89.34.27] has quit ["Leaving"]
12:41 < uriel> (you can re-use the goroutines by feeding them the next task
over a channel, but that might be over-engineering things, it is dirty cheap to
start a new task)
12:41 < spikebike> ew gopaste.org seems broken
12:41 < nickjohnson> Is there any reason you need n channels instead of just
one channel they all send to?
12:42 < alexsuraci> spikebike: in what way?
12:42 < uriel> also, it might be possible and make sense to break up the
work on bigger tasks if you want a smaller number of goroutines
12:42 < spikebike> code I see in the browser before I create it is invisible
in the result
12:42 < uriel> nickjohnson: so it can read in sequence from the first one,
the second one etc
12:42 < alexsuraci> spikebike: could you link it?
12:42 < spikebike> uriel yeah I tried that, but highly variable work units
makes it more complex
12:42 < uriel> nickjohnson: he said he needed the output ordered
12:42 < nickjohnson> If the results have to be collected in order, having n
tasks on the go seems like a better idea
12:43 < nickjohnson> Eg, 10 channels in a ring buffer.  Start 10 at the
beginning, and then receive/write/start-new in a loop
12:43 < spikebike> sounds much like a pool ;-)
12:44 < nickjohnson> No, because each goroutine only does a single operation
before exiting
12:45 < spikebike> using channels to let a goroutine do more than one thing
seems efficient
12:46 < spikebike> http://broadley.org/t.go
12:46 < spikebike> try pasting that into gopaste.org
12:46 < nickjohnson> As uriel points out, starting a new goroutine is
trivial
12:46 -!- drusepth [n=drusepth@174.32.154.79] has joined #go-nuts
12:46 < nickjohnson> Something like this: http://gopaste.org/view/zVhDu
12:46 < spikebike> I'll believe that after I see it ;-)
12:47 -!- Anders__ [n=Anders@nl119-200-47.student.uu.se] has joined #go-nuts
12:47 < nickjohnson> It's pretty much a basic premise of the language.
Starting one is certainly a lot cheaper than spawning a thread.
12:47 < alexsuraci> spikebike: works for me
12:47 < spikebike> nickjohnson: sure
12:47 < spikebike> nickjohnson: but is starting a goroutine cheaper than
sending an int through a channel?
12:47 < nickjohnson> Premature optimization, remember - don't complicate
your code unless you've tested the simpler version and it's not fast enouggh
12:48 -!- knave [n=kn4ve@41.240.171.194] has quit [Read error: 145 (Connection
timed out)]
12:48 < nickjohnson> spikebike: No, but is it enough more expensive that it
matters?  I doubt it.
12:48 < spikebike> nickjohnson: the easy version left 4 CPUs around 50% idle
12:48 < nickjohnson> spikebike: Did you specify GOMAXPROCS?
12:48 < spikebike> yeah, I'm using gccgo
12:49 < spikebike> it defaults to using all CPUs
12:49 < nickjohnson> In a more general observation, go seems to have trouble
with cpu-bound stuff
12:49 < nickjohnson> Presumably this is a temporary issue
12:49 -!- drusepth [n=drusepth@174.32.154.79] has quit [Read error: 131
(Connection reset by peer)]
12:49 < spikebike> well I'm really happy with
12:49 < nickjohnson> spikebike: Even so, jumping straight from simplest to
most complicated seems unwarranted.
12:49 < spikebike> http://broadley.org/bill/CvsGO.png
12:49 < spikebike> it's not that complicated
12:50 < spikebike> I'll try it though
12:50 -!- drusepth [n=drusepth@174.32.154.79] has joined #go-nuts
12:50 < spikebike> I think I'll just send a flag value to the worker
12:50 < spikebike> and have the worker reply
12:50 < spikebike> then I can block on the reply
12:50 < spikebike> (and still have async sends to that worker)
12:50 < nickjohnson> You need twice as many channels if you need to message
the goroutine after it's started
12:51 < spikebike> seems kinda silly that go will let me exit with pending
communications flying around
12:51 < spikebike> the file writer only has a single channel so that's not a
big deal
12:51 < uriel> spikebike: if you care about pending communication, read from
the relevant channel and you will block until the communication shows up
12:51 < nickjohnson> Also, counter-intuitively, using buffers can reduce
efficiency - goroutines are cooperatively scheduled, so it won't switch goroutines
unless the current one blocks
12:51 -!- simonz05 [n=simon@84.49.89.143] has joined #go-nuts
12:51 < nickjohnson> Have you tried using unbuffered channels with your
initial solution?
12:52 < spikebike> uriel: right but goroutines that consume data aren't
helped by sync reads
12:52 < spikebike> it's the main function that's doing async writes that can
exit before it's finished
12:53 < spikebike> nickjohnson: yeah, I was writing a few MB at a time, so a
single sync read cost me a decent fraction of a second
12:53 < spikebike> which seems silly, problem is it's really bursty
12:53 < spikebike> I might get 10,9,8,7,6,5 then finally I can start writing
so I queue 5,6,7,8,9,10
12:53 < spikebike> if it's sync then I get to wait a good while before I can
send more data to the cpu workers
12:54 < uriel> spikebike: how big is the data
12:54 < nickjohnson> spikebike: What do you mean?
12:55 < nickjohnson> You're only waiting on a sync read when you have no
data to write
12:57 -!- drusepth [n=drusepth@174.32.154.79] has quit [Read error: 104
(Connection reset by peer)]
12:57 < spikebike> nickjohnson right.  But if you have a loop keeping 4-16
workers busy you don't want to occasionally block while writing to a sync channel
which does a disk write
12:58 < spikebike> so say I want to send 1,2 to the disk writer and each
writes 500KB
12:58 < nickjohnson> spikebike: I'm not suggesting the write to disk has to
be synchronous - I mean the reads from the workers
12:58 < spikebike> the first one will likely finish write quick, but the
second will have to wait for the writer to write to the file before it will loop
and pick up the second number
12:59 < spikebike> reads from the works can't be sync because they have
different amounts of work
12:59 < nickjohnson> Why does that matter?  you need them in order, right?
12:59 < spikebike> so I assign 1,2,3,4 but 4 might be done first
12:59 < nickjohnson> So at any one time there's exactly one block you need
to read
12:59 < spikebike> I want to keep all cpus busy 100%
12:59 -!- lotrpy [n=lotrpy@202.38.97.230] has quit []
12:59 -!- ziyu [n=ziyuhuan@114.137.119.190] has joined #go-nuts
13:00 < spikebike> and the throughput of all the cpu workers is well less
than the disk, it's just tricky because the blocks I have available to write are
produced out of order
13:00 -!- ziyu [n=ziyuhuan@114.137.119.190] has quit [Client Quit]
13:01 -!- Anders__ [n=Anders@nl119-200-47.student.uu.se] has quit ["Lämnar"]
13:01 -!- rog [n=rog@89.240.136.210] has joined #go-nuts
13:01 < spikebike> ah, perfect it works
13:01 < nickjohnson> which one?
13:02 < spikebike> If I write a -1 to the file writer it sends me an all
finished signal
13:02 < spikebike> which I can then do a blocking read on
13:03 < spikebike> so N cpus wait on a 2*N buffer, I fire of N goroutines to
consume the work buffer
13:04 < spikebike> then I collect the results out of order, and buffer till
I have the next in order block I need
13:05 < spikebike> I still find it kind shocking that go will let you exist
with half send messages laying around in channels
13:05 < spikebike> s/exist/exit/
13:05 < spikebike> oops, s/send/sent/
13:07 < spikebike> seems like there should be a wait(channel) or similar
command
13:07 < spikebike> kinda like opening a file, doing a write, then not having
a close command
13:09 < rog> spikebike: you can do: {c := make(chan int, 1); c <- 1;} it
doesn't block.  the chan (and value) are GC'd.  is that a problem too?
13:10 -!- awishformore_ [n=awishfor@78.141.152.48] has joined #go-nuts
13:12 -!- double [n=double@host141-192-dynamic.52-79-r.retail.telecomitalia.it]
has joined #go-nuts
13:12 -!- mkanat [n=mkanat@67.188.1.39] has quit ["Bye!"]
13:13 -!- cryptobeacon [n=cryptobe@unaffiliated/cryptobeacon] has joined #go-nuts
13:13 -!- hackbench [n=hackbenc@88.242.151.136] has joined #go-nuts
13:13 -!- murodes1 [n=James@124.169.247.17] has joined #go-nuts
13:14 < spikebike> in that case is c <-1 blocking?
13:14 -!- ritolatu [n=ritolatu@84.251.84.201] has quit ["Leaving."]
13:15 -!- cryptobeacon [n=cryptobe@unaffiliated/cryptobeacon] has quit ["Leaving"]
13:16 < nickjohnson> Not if c is buffered and has space
13:16 -!- skammer [n=skammer@79.139.142.29] has quit [Read error: 110 (Connection
timed out)]
13:17 < spikebike> right, but you can't safely do c <-1 from main
13:17 < uriel> you can do go c <- 1
13:17 < spikebike> not sure which link you are talking about
13:17 -!- ritolatu [n=ritolatu@84.251.84.201] has joined #go-nuts
13:17 < uriel> if you don't want to block
13:18 -!- raichoo [n=raichoo@129.70.165.68] has joined #go-nuts
13:18 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
13:19 < spikebike> there's main giving out blocks to cpu workers as needed,
cpu workers returning blocks out of order, then the assignement of in order blocks
to the file writer
13:19 < spikebike> it's easiest if all are unblocking
13:20 < nickjohnson> spikebike: You could use a generator to give out blocks
13:20 -!- murodese [n=James@124.169.17.241] has quit [Read error: 145 (Connection
timed out)]
13:20 < nickjohnson> Eg, have a single channel with a goroutine writing
blocks (in order) to it.  Pass that channel to all the workers, and when they need
a new block, they read from it
13:20 -!- awishformore [n=awishfor@78.141.152.48] has quit [Read error: 113 (No
route to host)]
13:23 < spikebike> sensible
13:23 < uriel> actually it might be better if it is blocking, the generator
blocks on a write down the channel where everyone else reads from (well, it might
make sense to make the channel buffered, but maybe not)
13:24 -!- raichoo [n=raichoo@129.70.165.68] has quit []
13:26 -!- Kashia [n=Kashia@port-92-200-24-186.dynamic.qsc.de] has quit [Read
error: 110 (Connection timed out)]
13:26 < spikebike> ya
13:27 < spikebike> the tricky part is handling the out of order data from
the cpu workers and spooling it in order
13:27 < spikebike> but having the producer in it's own routing simplifies
that quite a bit
13:27 < nickjohnson> uriel: Yes, I should've clarified that the generator
should be unbuffered.
13:27 < spikebike> so then writes can be sync
13:28 < spikebike> and then no exit early issue
13:28 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has quit []
13:29 < nickjohnson> If you use one channel per block, and the worker-pool
model, you can make the writer task (in the main goroutine) simply read from the
channels in order and write them to disk
13:32 < spikebike> I'll have to create a few 10k channels and see what top
says
13:32 < spikebike> I don't really have a good feel for how big the window
will get because of the inequal work
13:32 < spikebike> (the window necessary to reorder the blocks)
13:33 < nickjohnson> What about memory limits?  Do you have a cap on how
much memory you can consume?
13:35 < spikebike> yeah, well, unfortunately I meed with a faculty designing
a workflow, they pull numbers out of their ass, I get it working, then they abuse
it with real workloads that may or may not resemble the numbers they discussed
13:35 < nickjohnson> Put it this way - are the output files likely to be
larger than the available memory?
13:37 < spikebike> well the data involved is TBs, but my impression is the
individual datasets should be well less than available ram
13:38 < spikebike> egads the sun is going to be up soon
13:41 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
13:42 < spikebike> the skeleton works, lots of promising printed messages,
the heavy lifting will have to be done tomorrow
13:43 < spikebike> nite all, thanks for the help
13:43 < uriel> good night spikebike
13:44 < spikebike> my sleep is losing to go, especially the channels.
13:44 * spikebike tears himself away from the keyboard
13:45 -!- alexsuraci` [n=alex@li71-127.members.linode.com] has joined #go-nuts
13:46 -!- skammer [n=skammer@79.139.142.29] has quit [Success]
13:46 -!- iant [n=iant@74.125.60.1] has joined #go-nuts
13:46 -!- mode/#go-nuts [+v iant] by ChanServ
13:47 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
13:52 < uriel> nickjohnson: lets see if you get better comments at hacker
news: http://news.ycombinator.com/item?id=958843
13:52 < uriel> good morning iant
13:52 <+iant> morning
13:57 -!- rickardm [n=dat99rmo@195.60.68.148] has joined #go-nuts
13:58 < rickardm> Anybody working on multicast?
13:59 -!- jeremyl [n=jeremyl@cpe-74-65-58-107.rochester.res.rr.com] has joined
#go-nuts
14:00 -!- ziyu [n=ziyuhuan@114-137-119-190.dynamic.hinet.net] has joined #go-nuts
14:00 < exch> i'm tweaking my packages a bit to make em cleaner and better
14:00 -!- jeremyl [n=jeremyl@cpe-74-65-58-107.rochester.res.rr.com] has quit
[Client Quit]
14:00 -!- General13372 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has
joined #go-nuts
14:01 -!- hackbench [n=hackbenc@88.242.151.136] has quit [Read error: 110
(Connection timed out)]
14:01 -!- ziyu [n=ziyuhuan@114-137-119-190.dynamic.hinet.net] has quit [Client
Quit]
14:08 < nickjohnson> uriel: heh
14:10 -!- r2p2 [n=billy@v32671.1blu.de] has left #go-nuts []
14:10 -!- r2p2 [n=billy@v32671.1blu.de] has joined #go-nuts
14:11 -!- fhs [n=fhs@pool-72-89-203-117.nycmny.east.verizon.net] has quit
["leaving"]
14:13 -!- lbrandy_ [n=lbrandy_@206.210.81.55] has joined #go-nuts
14:15 -!- Lorthirk [n=cm0901@host70-37-dynamic.31-79-r.retail.telecomitalia.it]
has joined #go-nuts
14:15 -!- snicket [n=Promethe@187.149.58.235] has joined #go-nuts
14:18 -!- General1337 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has quit
[Success]
14:22 < exch> is there a convenient way to convert an UTF8 rune into a
string?
14:22 -!- murodes1 [n=James@124.169.247.17] has quit [Read error: 104 (Connection
reset by peer)]
14:22 -!- Anders__ [n=Anders@90.230.227.144] has joined #go-nuts
14:23 < exch> nvm.  think i've got it
14:23 -!- murodese [n=James@124-169-247-17.dyn.iinet.net.au] has joined #go-nuts
14:26 -!- nullpo [n=nullpo@221.252.46.83] has quit [Read error: 145 (Connection
timed out)]
14:30 -!- tor7 [n=tor@213.113.122.152] has joined #go-nuts
14:31 -!- sm_ [n=sm@cpe-76-173-194-242.socal.res.rr.com] has joined #go-nuts
14:31 -!- tor7 [n=tor@213.113.122.152] has quit [Read error: 131 (Connection reset
by peer)]
14:31 -!- tor7_ [n=tor@213.113.122.152] has joined #go-nuts
14:32 -!- Anders__ [n=Anders@90.230.227.144] has quit ["Lämnar"]
14:36 -!- sm [n=sm@cpe-75-85-88-227.socal.res.rr.com] has quit [Read error: 60
(Operation timed out)]
14:38 -!- alc [n=alc@114.245.254.17] has quit [Read error: 60 (Operation timed
out)]
14:44 -!- msbranco [n=msbranco@64-172.61-188.cust.bluewin.ch] has quit [Read
error: 104 (Connection reset by peer)]
14:44 -!- skammer [n=skammer@79.139.142.29] has quit [Read error: 145 (Connection
timed out)]
14:47 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
14:49 -!- snearch [n=olaf@e179129009.adsl.alicedsl.de] has quit ["Ex-Chat"]
14:51 -!- raichoo [n=raichoo@129.70.164.148] has joined #go-nuts
14:52 < rog> spikebike: only just seen yr question.  the code i wrote is
fine because the make makes a chan with bufsize>0
14:52 -!- mikedee [n=quassel@91.111.24.173] has joined #go-nuts
14:52 -!- x2cast [n=alvaro@179.127.222.87.dynamic.jazztel.es] has joined #go-nuts
14:53 -!- x2cast [n=alvaro@179.127.222.87.dynamic.jazztel.es] has left #go-nuts []
14:53 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has joined
#go-nuts
14:55 < rog> is this channel archived anywhere?
14:55 -!- einsidan [n=einsidan@194-144-68-248.du.xdsl.is] has joined #go-nuts
14:56 -!- rakd [n=rakd@219.117.252.7.static.zoot.jp] has joined #go-nuts
14:57 < me____> rog: i believe cat-v.org has archives
14:57 -!- Nanoo [n=Nano@95.89.197.169] has joined #go-nuts
14:57 < rog> what's spikebike trying to do, BTW?
14:59 -!- triplez_ [n=triplez@124.155.195.7] has joined #go-nuts
15:02 < uriel> rog: apparently somehow recreate MPI :(
15:02 < uriel> there are irc logs in http://go-lang.cat-v.org/irc-logs/
15:04 < nictuku> is there a nicer way to write this?
http://gopaste.org/view/85i3o
15:06 < rog> > fmt.Println("test")
15:06 < rndbot> test
15:07 -!- skammer [n=skammer@79.139.142.29] has quit [Connection timed out]
15:08 < rog> > for i := 0; i < 10; i++ {j := i; go func(){time.Sleep(j
* 1e9); fmt.Println(j)}()}
15:08 < rndbot> <Error: cannot use j * 1000000000 (type int) as type
int64 in function argument>
15:08 < r2p2> >fmt.Println("mh is there a function to sort the chars in a
string?")
15:08 < rog> > for i := 0; i < 10; i++ {j := i; go
func(){time.Sleep(int64(j) * 1e9); fmt.Println(j)}()}
15:08 < rndbot> <no output>
15:09 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
15:09 -!- Lorthirk [n=cm0901@host70-37-dynamic.31-79-r.retail.telecomitalia.it]
has quit [Read error: 110 (Connection timed out)]
15:09 < rog> go func() {for i := 0; i < 10; i++ {j := i; go
func(){time.Sleep(int64(j) * 1e9); fmt.Println(j)}()}}(); time.Sleep(100 * 1e9);
15:09 <+iant> nictuku: networkTypes := []string{"unixgram", "unix"};
15:09 < nictuku> iant: thank you!
15:10 -!- brrant [n=John@168-103-78-133.hlrn.qwest.net] has joined #go-nuts
15:11 -!- alexsuraci` [n=alex@li71-127.members.linode.com] has quit ["Lost
terminal"]
15:11 -!- snicket [n=Promethe@187.149.58.235] has quit ["Saliendo"]
15:11 -!- alexsuraci` [n=alex@li71-127.members.linode.com] has joined #go-nuts
15:11 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has quit ["This
computer has gone to sleep"]
15:13 -!- raichoo [n=raichoo@129.70.164.148] has quit []
15:15 -!- triplez [n=triplez@124.197.92.42] has quit [Read error: 110 (Connection
timed out)]
15:18 < rog> spikebike: if you're still here, one answer to your question
could be: have a (exclusive access) count of the number of current workers; when
you start a worker, inc the count; when a worker completes, dec the count; when
the count is zero, send down a channel to main, which exits.
15:19 < uriel> hmm...  everyting has slowed down the last few days, everyone
away for the holyday?
15:20 < yiyus> what holyday?
15:20 -!- ssmall [n=stuart@rrcs-97-77-53-108.sw.biz.rr.com] has joined #go-nuts
15:20 <+iant> In the U.S.  this Thursday is Thanksgiving
15:21 <+iant> In any case I would expect this channel to slow down some what
over time, as some drop off and others dig into more complex programs
15:21 < yiyus> oh, *that* holyday...
15:21 < uriel> heh
15:21 < uriel> hey yiyus!
15:21 < uriel> iant: well, I was more worrying about the commits ;)
15:22 <+iant> Oh, yeah, we should be back in full force next week
15:22 < uriel> but I'm sure they are busy preparing to bring us a new
garbage collector for xmas ;P
15:23 < Ycros> uriel: and maybe generics :3
15:23 -!- triplez_ [n=triplez@124.155.195.7] has quit [Read error: 113 (No route
to host)]
15:23 * uriel is not convinced generics make sense in Go
15:23 < Ycros> of course they do.  Don't you want more static type safety?
15:23 < uriel> most people asking for generics don't seem to have fully
grasped how interfaces work (I know I still have quite a bit to learn)
15:24 < uriel> Ycros: that is just buzwording, doesn't mean anything
specific in the language
15:24 * danderson pokes at 9P and wonders if there is transport layer security
somewhere, as the spec doesn't talk about securing communication at all...
15:24 < uriel> I want the language to be simple and clean
15:24 < Ycros> uriel: it's not buzzwording, I don't like surrounding code
with runtime casts
15:24 < Ycros> which does not make for clean code
15:24 < uriel> danderson: that, like auth, is lef unspecified
15:25 < Ycros> I should be able to write types that are like map, which is
already generic
15:25 < uriel> danderson: you can run 9p over ssl, over ssh, over other
things..
15:25 < me____> danderson: feel free to run 9p over TLS
15:25 < exch> generics make a lot of sense really.  they prevent all the odd
type assertions
15:25 <+danderson> uriel: right, but presumably 9P servers already out there
do something or other.  Do they just run over plain TCP, assuming a trusted
network?
15:26 < uriel> (auth and transport independence is one of 9p's strengths)
15:26 <+danderson> (don't get me wrong, I love the fact that 9P doesn't
concern itself with transport issues, I just couldn't locate info on what
transports are in common use)
15:26 < uriel> danderson: well, 9p is (sadly) rarely used on the open
internet
15:26 < me____> some do.  just running over raw tcp is the most common game,
though.
15:26 -!- Lorthirk [n=cm0901@host198-216-dynamic.117-80-r.retail.telecomitalia.it]
has joined #go-nuts
15:26 < uriel> tsl I think is the main thing used
15:27 < uriel> (see http://man.cat-v.org/plan_9/2/pushtls )
15:28 < uriel> danderson: in plan9, using pushtls it is strivial to wrap any
connection on ssl, so the thing is much less of an issue as it would be for a unix
program to decide to use tls or not
15:28 <+danderson> right
15:28 <+danderson> man, I really want dial and pushtls for unix
15:28 <+danderson> finally a networking API as simple as it should be
15:29 -!- sm [n=sm@cpe-76-173-194-242.socal.res.rr.com] has quit []
15:29 < uriel> finally?  this stuff has been around for like twenty years!
blame the *nix folks for completely ignoring it and instead continue to build more
and more layers of absurd complexity
15:29 <+danderson> uriel: that's what I meant
15:30 < uriel> well, Go has a sane networking api :))
15:30 <+danderson> I mean "finally I found a networking API that looks
sane", not "finally someone has built it"
15:30 < uriel> ah :)
15:30 <+danderson> heh, you don't say :)
15:32 <+danderson> yeah, so maybe I should just write 9P servers in go
15:32 <+danderson> each time I try to do so in C++, I get tripped up on the
awful APIs
15:32 <+danderson> (or in C for that matter)
15:32 < emilh_> uriel: the reason why it has been stuck in plan9 was that it
cost license fees before?  no?
15:33 < uriel> emilh_: uhu?  it costs a license to implement a sane api?
15:33 <+danderson> the API has been visible for a good decade at least afaik
15:33 <+danderson> the implementation itself is not much use anyway
15:33 < emilh_> uriel: no, to steal it from plan9 :)
15:33 <+danderson> since it relies on, well, the rest of plan9 :)
15:33 < uriel> the api has been visible since the early 90's , the source
has been open since the late 90's
15:34 < uriel> danderson: exactly, although it is a beautiful implementation
too ;)
15:34 <+danderson> I'm sure it is.  I'm just not sure I'm ready to make the
leap over to plan9 just yet :)
15:34 < uriel> (although the stupid licenses are incompatible with most
other licenses, even being BSD-like, retarded lawyers had to justify their fees by
writting their own retarded licenses)
15:35 < uriel> danderson: nevermind plan9, go is the future, lets just make
sure it preserves all the good Plan 9 things, like the networking api ;) (when I
noticed Go had Dial()/Listen() I cried with joy)
15:35 < emilh_> danderson: try 9vx: http://swtch.com/9vx/ it is as easy it
can ever be
15:36 -!- Venom_X_ [n=pjacobs@66.54.185.131] has joined #go-nuts
15:36 <+danderson> ooh, fun.
15:36 <+danderson> emilh_: bookmarked for after work.  Thanks.
15:36 < emilh_> np :)
15:37 <+danderson> I was also looking at p9p to get the client side of 9P
mounts in linux, but the thing about transports confused me into not playing with
it yet.
15:38 -!- aa [n=aa@190.135.128.6] has quit [Read error: 131 (Connection reset by
peer)]
15:40 < uriel> danderson: the linux kernel has had 9p support for a while
now..
15:41 < uriel> not sure if it can handle encrypted connections (although
that could be handled via a wrapper program in user space)
15:41 -!- aanderse
[n=aanderse@CPE001b11cc67d3-CM0019475d7f5e.cpe.net.cable.rogers.com] has joined
#go-nuts
15:41 < alexsuraci`> do people still run plan 9 or mostly just reminisce?
i'd like to try it
15:42 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has joined #go-nuts
15:42 -!- skammer [n=skammer@79.139.142.29] has quit [Connection timed out]
15:42 < uriel> alexsuraci`: depends who you ask, there is at least one
company that uses it extensively in their infrastructure and actually ships quite
a bit of hardware running it (without its customers knowing ;))
15:43 < alexsuraci`> uriel: do you use it or is it kind of impractical now?
15:44 < nsz> i've yet to see an os that was not impractical
15:44 < uriel> I use it from time to time, but lets say that I have had my
disagrements with the 'community' (if you can call it that) and I'm trying to move
on
15:44 <+danderson> uriel: right, that is my main concern.  I can fully
imagine the 9P support just being "connect over TCP lol"
15:44 -!- aanderse
[n=aanderse@CPE001b11cc67d3-CM0019475d7f5e.cpe.net.cable.rogers.com] has quit
[Read error: 104 (Connection reset by peer)]
15:44 <+danderson> and my use case would be poking at servers over the
internet, so, eh
15:44 < alexsuraci`> ah
15:44 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
15:44 < uriel> hardware support is a pain, and I rather spend my time
dealing with other thigs too, I do run Plan 9 on a vm on all my boxes though,
there are always things where it is just so much nicer to use
15:45 < uriel> but with p9p, that need also is reduced
15:45 < uriel> (and acme-sac, that gives you acme and a reasonable
environment on windows)
15:45 < uriel> danderson: 9p on linux supports quite a few transports, some
rather essoteric developed by ibm and so on..
15:46 <+danderson> uriel: yeah, but this newfangled TLS thing?  May be too
cutting edge...
15:46 < me____> danderson: they support bluray, fwiw :)
15:46 <+danderson> bluray?  wtf?
15:46 < me____> (plan 9)
15:47 -!- snicket [n=Promethe@148.227.201.174] has joined #go-nuts
15:47 <+danderson> oh.
15:47 < me____> to use TLS with v9fs, you can use p9p and its 'srv' program.
it creates a unix domain socket connected & authed to a server
15:47 -!- sebastiandeutsch [n=sebastia@mue-88-130-102-064.dsl.tropolys.de] has
joined #go-nuts
15:47 <+danderson> so according...  Yeah, what you just said :)
15:47 < me____> so that v9fs doesn't need to think about auth.
15:47 < me____> *auth and security, i mean
15:48 < sebastiandeutsch> hello, is there somewhere a ready mysql bridge for
go?  doin' that gc thäng looks pritty voodoo to me.
15:48 <+danderson> right.  Good idea in general, though it does add a slight
amount of clunkiness to mounting the damn thing in linux
15:48 <+danderson> but hey, that's linux' problem :)
15:48 < uriel> sebastiandeutsch: http://go-lang.cat-v.org/library-bindings
and see also the pure Go libs page
15:48 < me____> it does, its tragic.
15:49 < uriel> danderson: to mount 9p on linux, use sqweek's 9mount
15:49 < uriel> there are links to it in http://9p.cat-v.org
15:49 < sebastiandeutsch> uriel: cool thank you
15:49 < uriel> and I think this is all a bit offtopic, best to take the
discussion to #plan9
15:49 < uriel> sebastiandeutsch: no problem
15:49 <+danderson> uriel: also noted, thanks
15:50 < uriel> sebastiandeutsch: there are various 9p bindings and even pure
Go client implementations, it is not clear how functional each is, so you will
have to try
15:50 -!- XniX23 [n=XniX23@89-212-10-29.dynamic.dsl.t-2.net] has joined #go-nuts
15:50 < sebastiandeutsch> generally it's hard to find ressources...  go is
an awful word search at google
15:50 < me____> it must be a security feature.
15:51 < uriel> sebastiandeutsch: http://go-lang.cat-v.org/go-search
15:55 -!- loureiro [n=loureiro@189.2.128.130] has joined #go-nuts
15:56 -!- rbohn [n=rbohn@192.206.100.4] has joined #go-nuts
15:57 -!- Adys [n=Adys@unaffiliated/adys] has quit [Remote closed the connection]
15:58 -!- p4p4 [n=P4p4@24.106.113.82.net.de.o2.com] has joined #go-nuts
15:58 -!- sebastiandeutsch [n=sebastia@mue-88-130-102-064.dsl.tropolys.de] has
quit []
16:00 -!- aa [n=aa@200.40.114.26] has joined #go-nuts
16:02 < XniX23> anyone tried the new sdl binding?
16:03 -!- skammer [n=skammer@79.139.142.29] has quit [Success]
16:05 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
16:05 < uriel> XniX23: which one is the 'new' sdl binding?
16:05 < uriel> and did the old one work?
16:05 -!- decriptor [n=decripto@137.65.132.26] has joined #go-nuts
16:06 < exch> I suppose there is no way to get a hex number printed as it's
equivalent unicode token?  eg: 2229 -> black magic -> "∩"
16:06 < XniX23> uriel: i had problems with the old one (Go bindings for SDL
and OpenGL by banthar.) but maybe i did something wrong, not sure...  because im
experiencing similar problem with the new one
16:07 < uriel> exch: cast it to a rune?  (just a guess)
16:07 < exch> yea I tried that.  not much luck
16:07 < uriel> well, not sure what you mean by 'hex number' though
16:07 < drhodes> XniX23: are you able to get sample to run?
16:07 -!- skammer [n=skammer@79.139.142.29] has quit [Client Quit]
16:07 < exch> it's the hexadecimal number of the unicode character
16:08 < uriel> XniX23: which one is the new one
16:08 < exch> as in \u2229
16:08 < uriel> ?
16:08 < drhodes> XniX23: sample.go, that is.
16:08 <+iant> exch: maybe something like utf8.EncodeRune(val, buf);
fmt.Println(string(buf));
16:08 < uriel> exch: yes, but where do you have it, it is a constant, or
what?
16:08 < XniX23> uriel: gosdl i think?
16:08 < uriel> XniX23: link?
16:08 -!- double [n=double@host141-192-dynamic.52-79-r.retail.telecomitalia.it]
has quit [Remote closed the connection]
16:08 < XniX23> uriel: i think you already have it on your website :o
16:08 < exch> uriel: nope.  not a constant.  it's a variable.  iant, i'll
try that again
16:09 < XniX23> drhodes: i ran make, everything was fine...  and tried to
compile sample.go and got error that it cant find import sdl
16:09 < uriel> XniX23: heh, ok then :)
16:09 < drhodes> XniX23: yeah same here
16:09 < uriel> XniX23: maybe you need the -dev package?
16:09 < XniX23> drhodes: i found out that sdl.a was in _obj directory so i
changed import to "./_obj/sdl"
16:09 < uriel> (on debian or whatever you usually need libsdl-dev or
whatever)
16:10 < exch> iant: EncodeRune() takes an utf8 rune as first argument.  the
Unicode numer (2229) is not compatible with utf8 runes
16:10 < drhodes> XniX23: thanks for the tip,
16:10 < XniX23> and it compiled and linked, but when i run ./6.out i get:
./6.out: error while loading shared libraries:
/home/phyro/go/pkg/linux_amd64/sdl_sdl.so: cannot open shared object file: No such
file or directory
16:11 <+iant> exch: a rule is just an integer, though
16:11 < XniX23> uriel: i have libsdl-dev up to date
16:11 < exch> yes, but it seems it uses a custom mapping for those rune
values.  using 2229 (or the decimal equivalent) as a rune throws an index out of
range error on EncodeRune()
16:11 < uriel> XniX23: ok, sorry, just was something that has tripped me
over in the past
16:12 < XniX23> uriel: game developer?  :P
16:12 < exch> So the real problem is converting unicode values to utf8 runes
16:12 <+iant> exch: what are you passing as the second argment to
EncodeRune?
16:12 < uriel> XniX23: no
16:12 < uriel> exch: what is an 'utf8 rune'?
16:12 < exch> a byte slice of size 4
16:12 < XniX23> drhodes: if you make it work, let me know ;)
16:13 < exch> uriel: Go uses runes as integer indices into a character table
for UTF8
16:13 < drhodes> 10 - 4
16:13 <+iant> exch: and utf8.EncodeRune is failing with an out of bounds
index error?
16:13 < exch> iant: yup
16:13 <+iant> that does not make sense, the code is very simple
16:14 -!- Venom_X [n=pjacobs@cpe-67-9-131-167.austin.res.rr.com] has joined
#go-nuts
16:15 < uriel> exch: yes, but runes are just an integer, representing the
unicode codepoint, there are no 'utf-8 runes'
16:15 < uriel> exch: does it work for other numbers?
16:15 -!- dju [i=dju@80.236.37.39] has joined #go-nuts
16:15 < exch> lower numbers, yes.  but the resulting token is not correct
16:15 <+iant> exch: this seems to work: var a [4]byte; utf8.EncodeRune(2229,
&a); fmt.Println(string(&a));
16:16 -!- dju_ [i=dju@ip-39.net-80-236-37.suresnes.rev.numericable.fr] has quit
[Read error: 110 (Connection timed out)]
16:16 < exch> hmm.  lemme fiddle with this a bit more then
16:17 -!- Adys [n=Adys@unaffiliated/adys] has joined #go-nuts
16:21 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
16:22 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has quit []
16:23 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has joined #go-nuts
16:24 < exch> righty.  working now.  thanks
16:25 < exch> works better with the plain old base-10 number instead of hex
16:28 -!- r2p2 [n=billy@v32671.1blu.de] has left #go-nuts []
16:29 -!- Nanoo [n=Nano@95.89.197.169] has quit ["Leaving"]
16:32 -!- Venom_X_ [n=pjacobs@66.54.185.131] has quit [Connection timed out]
16:35 -!- hstimer [n=hans@c-98-234-25-125.hsd1.ca.comcast.net] has quit [Read
error: 110 (Connection timed out)]
16:36 < mikedee> I was planning on changing the http module so that when you
set up a server you can specify a callback for when each connection is made
(before it is passed to the handler)
16:36 -!- alexsuraci` [n=alex@li71-127.members.linode.com] has quit ["Lost
terminal"]
16:36 < mikedee> Is it better to extend one of the existing functions or add
a new RegisterCallback function?
16:36 < mikedee> and is it something that would be acceptable
16:37 -!- crashR [n=crasher@62.212.121.29] has quit ["Leaving."]
16:38 -!- i3d [n=i3dmaste@74.125.59.73] has joined #go-nuts
16:41 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has joined
#go-nuts
16:41 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has quit [Remote closed the
connection]
16:42 -!- Guest9229 [n=chatzill@bb116-14-32-24.singnet.com.sg] has quit [Read
error: 104 (Connection reset by peer)]
16:43 -!- chrelad [n=chrelad@76.164.12.11] has joined #go-nuts
16:45 -!- sm [n=sm@pool-71-104-89-201.lsanca.dsl-w.verizon.net] has joined
#go-nuts
16:47 -!- trickie [n=trickie@94.100.112.225] has quit [Read error: 148 (No route
to host)]
16:48 -!- lenst [n=user@81-237-244-185-no52.tbcn.telia.com] has quit [Remote
closed the connection]
16:49 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has quit []
16:51 -!- ssmall1 [n=stuart@utdpat242007.utdallas.edu] has joined #go-nuts
16:51 -!- Raziel2p [n=Raziel2p@ti0032a380-dhcp0316.bb.online.no] has quit [Read
error: 145 (Connection timed out)]
16:52 -!- LifeH2O [n=lifeh2o@116.71.166.254] has joined #go-nuts
16:52 -!- kaigan|work
[n=kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has quit []
16:52 < LifeH2O> How can i install Go on windows, is there any IDE
available?
16:52 < Smergo> No.
16:53 < Smergo> Someone put some windows binaries somewhere.
16:53 < Smergo> Don't remember the URL though.
16:53 < Smergo> :)
16:53 -!- ssmall [n=stuart@rrcs-97-77-53-108.sw.biz.rr.com] has quit [Read error:
110 (Connection timed out)]
16:53 < LifeH2O> than how can i use it on windows, i use dev c++ for c++
16:54 -!- snicket [n=Promethe@148.227.201.174] has quit [Remote closed the
connection]
16:54 <+iant> LifeH2O: there is a very preliminary Windows port of Go at
http://code.google.com/p/go-windows/
16:54 <+iant> LifeH2O: there is no particular IDE support at present
16:54 -!- mertimor [n=mertimor@p4FE75214.dip.t-dialin.net] has joined #go-nuts
16:55 < XniX23> iant: is that hector's work or official?
16:55 < LifeH2O> ok, what is mingw in environment variable
16:55 <+iant> XniX23: that is Hector's work
16:55 < jurdendurden> > a,b:= 20,1; for i:= a; i > b; i-- {
fmt.Printf("%d", i) }
16:55 < rndbot> 201918171615141312111098765432
16:55 < jurdendurden> > a,b:= 20,1; for i:= a; i > b; i-- {
fmt.Printf(" %d ", i) }
16:55 < rndbot> 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2
16:55 < jurdendurden> > a,b:= 20,1; for i:= a; i >= b; i-- {
fmt.Printf(" %d ", i) }
16:55 < rndbot> 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
16:56 < XniX23> later
16:57 -!- hipe [n=hipe@c-24-11-83-170.hsd1.mi.comcast.net] has joined #go-nuts
16:57 < sladegen> > for a := 20 in range a { print(a) }
16:57 < rndbot> <Error: syntax error near in>
16:57 -!- melba [n=blee@unaffiliated/lazz0] has joined #go-nuts
16:57 < sladegen> > for a := 20 range a { print(a) }
16:57 < rndbot> <Error: syntax error near range>
16:58 -!- XniX23 [n=XniX23@89-212-10-29.dynamic.dsl.t-2.net] has quit [Remote
closed the connection]
16:59 < jurdendurden> > for i := range 10 { fmt.Printf ("%d", i) }
16:59 < rndbot> <Error: cannot range over 10 (type ideal), fatal error:
typecheck loop>
17:00 < jurdendurden> > for i := range 5 { fmt.Printf ("%d", i) }
17:00 < rndbot> <Error: cannot range over 5 (type ideal), fatal error:
typecheck loop>
17:02 < p4p4> now, where again was the go online-compiler ?
17:02 < sladegen> > for a := 20 range a.Iter() { print(a) }
17:02 < rndbot> <Error: syntax error near range>
17:02 < sladegen> gofmt.com/compile.html
17:02 -!- aarapov [n=aarapov@r11mq202.net.upc.cz] has quit ["Leaving."]
17:02 < p4p4> sladegen: thank you!
17:03 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts
17:04 -!- scyth [n=scyth@rots.in.rs] has quit [Excess Flood]
17:04 -!- scyth [n=scyth@213.198.241.212] has joined #go-nuts
17:06 -!- Kashia [n=Kashia@port-92-200-24-186.dynamic.qsc.de] has joined #go-nuts
17:06 < rbohn> > for t := range *new([20]int) {fmt.Println(t)}
17:06 < rndbot> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
17:07 <+iant> > for t := range [20]int {fmt.Println(t)}
17:07 < rndbot> <Error: syntax error near t>
17:08 <+iant> > for t := range [20]int{} { fmt.Println(t) }
17:08 < rndbot> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
17:08 -!- Venom_X [n=pjacobs@cpe-67-9-131-167.austin.res.rr.com] has quit [Read
error: 60 (Operation timed out)]
17:08 < anticw> iant: gcc (c) roduces asm for for loops that actually
adjusts the pointer to an object being iterated over
17:08 -!- Venom_X_ [n=pjacobs@66.54.185.131] has joined #go-nuts
17:09 < anticw> iant: i assume this won't happen for gccgo or else it would
break gc?
17:09 < anticw> (unless the gc long term can detect reference inside a range
not just the base of the allocation)
17:09 -!- shambler [i=kingrat@mm-4-193-84-93.dynamic.pppoe.mgts.by] has joined
#go-nuts
17:10 <+iant> anticw: the GC works with a reference inside a range
17:10 -!- lux` [n=lux@151.54.240.211] has joined #go-nuts
17:12 < rbohn> for t := range "google google google" { fmt.Println(t) }
17:12 < rbohn> > for t := range "google google google" { fmt.Println(t) }
17:12 < rndbot> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
17:12 <+iant> oy
17:13 -!- raichoo [n=raichoo@i577BB4B4.versanet.de] has joined #go-nuts
17:14 < anticw> iant: i thought there was no gc (yet) for gccgo?
17:14 -!- LifeH2O [n=lifeh2o@116.71.166.254] has left #go-nuts []
17:14 <+iant> anticw: that is true, but the memory allocator that it uses
can work out a reference in the middle of a range
17:14 <+iant> this is necessary because you might take the address of an
array index
17:14 -!- ShadowIce [n=pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
17:15 -!- path[l] [n=path@59.162.86.164] has quit []
17:16 -!- msbranco [n=msbranco@64-172.61-188.cust.bluewin.ch] has joined #go-nuts
17:17 < nickjohnson> Is there any way to convert a list of type
[]interface{} to a concrete type?
17:17 < nickjohnson> Short of copying all the values
17:17 <+iant> nickjohnson: no, I don't think so
17:19 -!- p0g0 [n=pogo@unaffiliated/p0g0] has quit [Read error: 113 (No route to
host)]
17:20 -!- ssmall [n=stuart@rrcs-97-77-53-108.sw.biz.rr.com] has joined #go-nuts
17:20 -!- ssmall1 [n=stuart@utdpat242007.utdallas.edu] has quit [Read error: 110
(Connection timed out)]
17:21 < nickjohnson> Is there an easy way to iterate over an iterable that
I'm missing?
17:21 -!- tsuwabuk_ [n=tsuwabuk@FLH1Abx014.kyt.mesh.ad.jp] has joined #go-nuts
17:21 <+iant> nickjohnson: use range?
17:22 < nickjohnson> iant: range works on iterables?  I thought it only
worked on arrays and slices
17:22 <+iant> nickjohnson: it also works on channels
17:22 < nickjohnson> ah, okay
17:22 -!- amacleod [n=amacleod@c-24-34-33-96.hsd1.ma.comcast.net] has joined
#go-nuts
17:23 -!- Venom_X_ [n=pjacobs@66.54.185.131] has quit []
17:24 -!- tsuwabu__ [n=tsuwabuk@60.237.202.124] has joined #go-nuts
17:25 -!- ni| [n=ni|@c-24-34-220-147.hsd1.ma.comcast.net] has joined #go-nuts
17:25 -!- bennabi [n=bennabi@41.104.81.201] has joined #go-nuts
17:26 < ni|> out of school for the term -- its golang time :D
17:27 < nickjohnson> Anyone know why I get these odd errors using range with
iter?  http://gopaste.org/view/s3UZ9
17:27 -!- skammer [n=skammer@79.139.142.29] has quit [Read error: 110 (Connection
timed out)]
17:27 <+iant> nickjohnson: range over a channel only returns a single value
17:27 < nickjohnson> iant: Oh. :(
17:28 < nickjohnson> What a pain
17:29 -!- yaroslav [n=yaroslav@ppp91-78-212-204.pppoe.mtu-net.ru] has joined
#go-nuts
17:30 < nickjohnson> So there's no simple way to do this, is there?  Either
I have to get the channel outside the loop, or I need to initialize and increment
the counter separately
17:30 <+iant> nickjohnson: yes, I think that is true, sorry
17:30 -!- nomism [n=nomism@vpn-s-8d3a31a6.campus.uni-stuttgart.de] has joined
#go-nuts
17:31 -!- nomism [n=nomism@vpn-s-8d3a31a6.campus.uni-stuttgart.de] has left
#go-nuts ["Verlassend"]
17:32 -!- hagna [n=hagna@70.102.57.178] has quit ["Lost terminal"]
17:33 -!- WalterMundt [n=waltermu@twiki/developer/EtherMage] has joined #go-nuts
17:33 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
17:34 -!- Venom_X [n=pjacobs@66.54.185.131] has joined #go-nuts
17:38 -!- tsuwabuki [n=tsuwabuk@FLH1Abq140.kyt.mesh.ad.jp] has quit [Read error:
110 (Connection timed out)]
17:40 -!- tsuwabu__ [n=tsuwabuk@60.237.202.124] has quit ["Leaving..."]
17:41 -!- directrixx [n=directri@ip68-231-189-247.tc.ph.cox.net] has joined
#go-nuts
17:41 -!- tsuwabuk_ [n=tsuwabuk@FLH1Abx014.kyt.mesh.ad.jp] has quit [Read error:
110 (Connection timed out)]
17:41 -!- Perberos [n=Perberos@190.49.53.219] has quit ["Ex-Chat"]
17:43 < uriel> allowing that might be a reasonable change to iter...  (no
clue, just guessing)
17:43 < uriel> although the benefit feels a bit marginal...
17:44 -!- ni| [n=ni|@c-24-34-220-147.hsd1.ma.comcast.net] has quit [Read error:
110 (Connection timed out)]
17:46 -!- lux` [n=lux@151.54.240.211] has quit [Read error: 145 (Connection timed
out)]
17:47 < nickjohnson> Anyone know what would cause "rpc: client encode error:
(0x355a80,0x3b1070)" using the RPC client module?
17:47 -!- skammer [n=skammer@79.139.142.29] has quit [Read error: 60 (Operation
timed out)]
17:49 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
17:49 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed
out)]
17:50 -!- trvbldn [n=trvbldn@c-98-218-95-154.hsd1.dc.comcast.net] has quit [Remote
closed the connection]
17:50 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
17:51 -!- rog [n=rog@89.240.136.210] has quit []
17:52 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts
17:52 -!- hackbench [n=hackbenc@88.242.151.136] has joined #go-nuts
17:53 -!- brrant [n=John@168-103-78-133.hlrn.qwest.net] has quit ["Leaving"]
17:54 -!- elmar [n=elmar@188.107.219.76] has joined #go-nuts
17:56 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
17:56 -!- __ed [i=bitch@62.147.134.58] has joined #go-nuts
17:57 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has joined #go-nuts
17:57 -!- lux` [n=lux@151.54.240.211] has joined #go-nuts
17:58 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
joined #go-nuts
17:59 -!- melba [n=blee@unaffiliated/lazz0] has quit ["MICROSOFT WORD IS A FUN
GAME"]
18:00 -!- hipe [n=hipe@c-24-11-83-170.hsd1.mi.comcast.net] has quit [Remote closed
the connection]
18:01 -!- Lorthirk [n=cm0901@host198-216-dynamic.117-80-r.retail.telecomitalia.it]
has quit [Remote closed the connection]
18:02 -!- hipe [n=hipe@c-24-11-83-170.hsd1.mi.comcast.net] has joined #go-nuts
18:03 -!- __ed [i=bitch@62.147.134.58] has quit ["changing servers"]
18:03 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
18:05 -!- blackmagik [n=blackmag@unaffiliated/blackmagik] has quit ["Leaving"]
18:05 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed
out)]
18:05 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
18:08 -!- ptrb [i=pb@cpe-174-106-116-076.nc.res.rr.com] has quit [Read error: 110
(Connection timed out)]
18:08 -!- cpr420 [n=cpr420@67.165.199.143] has joined #go-nuts
18:11 -!- Associat0r [n=Associat@h163153.upc-h.chello.nl] has joined #go-nuts
18:11 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
18:11 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
18:14 -!- snicket [n=Promethe@148.227.201.174] has joined #go-nuts
18:15 -!- hipe [n=hipe@c-24-11-83-170.hsd1.mi.comcast.net] has quit [Remote closed
the connection]
18:17 -!- me____ [n=venkates@c-68-55-179-48.hsd1.md.comcast.net] has quit ["Lost
terminal"]
18:17 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
18:18 -!- __ed [i=bitch@62.147.134.58] has joined #go-nuts
18:20 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has quit
["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
18:20 -!- teedex [n=teedex@204.14.155.161] has quit [Remote closed the connection]
18:20 -!- scandal [n=nobody@unaffiliated/scandal] has joined #go-nuts
18:20 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has joined
#go-nuts
18:20 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has quit
[Client Quit]
18:21 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has joined #go-nuts
18:22 -!- skammer [n=skammer@79.139.142.29] has quit [Read error: 110 (Connection
timed out)]
18:23 -!- shambler_ [i=kingrat@mm-4-193-84-93.dynamic.pppoe.mgts.by] has joined
#go-nuts
18:23 -!- shambler [i=kingrat@mm-4-193-84-93.dynamic.pppoe.mgts.by] has quit [Read
error: 54 (Connection reset by peer)]
18:23 -!- ShadowIce` [i=pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
18:24 < nickjohnson> Hm, gob or RPC seems to be broken for arrays:
http://gopaste.org/view/t3QL4
18:24 -!- __ed [i=bitch@62.147.134.58] has quit ["changing servers"]
18:24 -!- __ed [i=bitch@62.147.134.58] has joined #go-nuts
18:24 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
18:24 -!- Makavel [n=eddw@hoasb-ff08dd00-36.dhcp.inet.fi] has joined #go-nuts
18:24 < nickjohnson> Or rather, http://gopaste.org/view/4cZQo
18:28 < olegfink> iant: offtopic question: how much effort and time did it
take to implement gccgo?  Would you suggest going this route (gcc frontend) for
yet another not-quite-c?
18:28 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has joined #go-nuts
18:28 -!- ShadowIce [n=pyoro@unaffiliated/shadowice-x841044] has quit [Read error:
60 (Operation timed out)]
18:29 <+iant> olegfink: It wasn't too hard; one problem was that the
frontend interface to gcc is not at all documented
18:29 -!- JPascal1 [n=jpascal@78-106-172-210.broadband.corbina.ru] has joined
#go-nuts
18:29 <+iant> I think it was a reasonable approach, certainly much easier
than writing a compiler from scratch
18:29 < JPascal1> Hello all
18:30 -!- __ed [i=bitch@62.147.134.58] has quit ["changing servers"]
18:30 < JPascal1> How I can make a null terminated string.  C++: "sseee\n"
18:30 -!- __ed [i=bitch@62.147.134.58] has joined #go-nuts
18:30 <+iant> JPascal1: "sseee\n\0"
18:31 < JPascal1> non-oct character in escape sequence: "
18:31 -!- leitaox [n=leitaox@189.20.94.66] has joined #go-nuts
18:31 < JPascal1> :-\
18:31 <+iant> JPascal1: sorry, "sseee\n\000"
18:31 < JPascal1> =)
18:31 < JPascal1> thx )
18:32 < p4p4> i'm trying out the win32 port, but get
errors:http://codepad.org/JJgh89ab
18:32 < olegfink> iant: thanks, do you have a diff handy?  or I guess I can
just checkout trunk and branches/gccgo and do a diff -r -- I just am not sure
where to look in the branch itself.  :-)
18:32 <+iant> p4p4: you should probably e-mail problems back to Hector
18:33 <+iant> olegfink: I don't have a diff handy; you can actually use svn
diff without checking anything out; the frontend is all in the gcc/go directory
18:33 < olegfink> ah, thanks.
18:33 < hector> p4p4: hello
18:34 < uriel> ok, I got trolled, sorry :(
18:35 < p4p4> hector: anything wrong in the paste?
18:35 < hector> p4p4: i just compiled the hello.go program without errors
18:35 -!- flyfish [n=flyfish@pixout.appriss.com] has joined #go-nuts
18:36 -!- __ed [i=bitch@62.147.134.58] has quit ["changing servers"]
18:36 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
18:38 < uriel> haha, poor rob, he has been spoiled by acme's beautiful color
scheme!  :))
18:38 < hector> iant: i'm having trouble using codereview in windows
18:39 < hector> it says *** failed to import extension codereview from
c:/users/hector/code/go/lib/codereview/codereview.py: No module named HTMLParser
18:39 <+iant> hector: which version of hg are you running?
18:39 < uriel> alexsuraci: you see, it is better to have a single style, but
get it right, rob is right that comments are quite hard to read..
18:39 < uriel> hector: you need hg 1.4
18:39 <+iant> hector: hg --version
18:39 < exch> would it be possible to do something like this?  func foo(t
reflect.Type) { nt := new(t); } foo(reflect.Typeof(MyStruct);
18:39 < uriel> (IIRC)
18:39 <+iant> I think 1.3 is sufficient
18:39 <+iant> but 1.4 should also work
18:39 < hector> i have 1.3.1
18:39 <+iant> OK, that shouldn't be the problem....
18:40 < uriel> I think I had some issues with 1.3.x...  but maybe I was just
confused
18:40 -!- skammer [n=skammer@79.139.142.29] has quit [Read error: 145 (Connection
timed out)]
18:40 <+iant> hector: HTMLParser is a standard Python library, perhaps you
just need to get that?
18:40 -!- aho [n=nya@g227091211.adsl.alicedsl.de] has joined #go-nuts
18:40 < hector> i ran python -c "from HTMLParser import HTMLParser" without
error
18:41 < alexsuraci> uriel: haha
18:41 <+iant> Unfortunately I don't have any other ideas
18:41 < alexsuraci> again, i just ported twilight for now
18:41 < hector> i'll try 1.4
18:41 < alexsuraci> quirks and all
18:42 < uriel> hector: what python version are you using, and is it from
cygwin or native?  (and is hg native or cygwin) I have had strange problems
depending on the combination
18:42 < alexsuraci> uriel: I suppose now that I'm on break I'll work on a
theme selector ;) although I think I'll have to get into cookies, which as far as
I can tell aren't in the http package
18:42 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
18:43 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
18:43 < hector> uriel: python 2.6.4, 64 bit version, native.  hg is native
too
18:43 < uriel> (actually ended up using cygwin hg with cygwin python because
had strange problems with window's native hg with window's python)
18:44 < uriel> hector: if you have cygwin around, I'd give it's hg a shot,
that should probably work, although obviously native should work too, but might
require more effort
18:44 < uriel> alexsuraci: and you have to waste the users time forcing them
to select a theme, and then eventually find out if it has issues like unreadable
text etc ;P
18:45 < uriel> just lighten up the comments a bit, simpler solution, hassle
free for users
18:45 < dho> good afternoon
18:45 < uriel> hey dho
18:46 < alexsuraci> uriel: eh?  theme select has been in the pipeline for
ages, two clicks is not as "hassle" especially if it remembers their choice
18:46 < alexsuraci> i may lighten up the comments as well or even switch the
default theme if something else I port looks better
18:47 < dho> I don't suppose anyone has an smp freebsd/i386 machine laying
around?
18:47 -!- KindOne [n=lol@h58.45.28.71.dynamic.ip.windstream.net] has joined
#go-nuts
18:47 < dho> or a vmware install that lets them have that <_<
18:48 < uriel> alexsuraci: er, it is a hassle, I don't know how different
themes will be, only way to find out is to try them, and to see every change
caused by a theme change is non-trieival
18:48 < uriel> alexsuraci: anyway, this is offotpic, I will shut up and not
fill the channel with arguments over user interface design ;P
18:49 -!- tomestla [n=tom@78.251.183.251] has joined #go-nuts
18:49 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
18:49 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
18:49 -!- snearch_ [n=olaf@92.225.60.63] has joined #go-nuts
18:49 < alexsuraci> uriel: unreadable text and the ability to switch themes
are mutually exclusive.  again, I may tweak themes to increase readability but
that doesn't affect anything else.  stop associating something that's bad with
something completely unrelated, other people think differently from you.
18:50 < uriel> alexsuraci: no, they are not mutually exclusive, all themes
might have some text that is unreadable or some other issue, and no theme,
optional or not, should have hard to read text, ever
18:50 < antarus> go argue in /query ;)
18:50 < uriel> dho: god bless the garbage collector!
18:50 < uriel> antarus: sorry :(
18:50 < dho> uriel: i keep forgetting reply all
18:51 < dho> uriel: but yeah.  mmap would be good to have, and there's no
reason other than that (that i can think of) not to have it
18:51 < uriel> antarus: I better go sleep, I get trolled very easily when
I'm tired...
18:52 < uriel> dho: was my sarcasm not obvious enough?  :(
18:52 < dho> it was, i was just reiterating here.
18:52 < nickjohnson> Hm. How do I update my hg checkout?  'hg sync' does
nothing.  :/
18:53 <+iant> nickjohnson: hg sync ought to work if you have the codereview
plugin installed; does it not print anything at all?
18:53 < nickjohnson> iant: I don't, but why do I need the codereview plugin
to sync?
18:53 < uriel> nickjohnson: hg pull -u should do
18:53 < dho> nickjohnson: alternatively, you can hg pull -u
18:54 < nickjohnson> thanks
18:54 < dho> if you don't plan on contributing
18:54 <+iant> nickjohnson: "sync" is one of the commands which the
codereview plugin provides
18:54 < nickjohnson> ah
18:54 -!- nictuku [n=nictuku@unaffiliated/nictuku] has quit []
18:54 < nickjohnson> What does "hg update" do, then?
18:54 < uriel> dho: hg pull -u will force you to merge if you have local
changes, it wont discard anything
18:54 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
18:54 < uriel> nickjohnson: the -u is an implicit call to update
18:54 < uriel> nickjohnson: pull -u is the same as hg pull; hg update
18:54 < dho> nickjohnson: hg pull fetches changes but does not apply them
18:55 < dho> nickjohnson: update applies them
18:55 -!- XniX23 [n=XniX23@89-212-10-29.dynamic.dsl.t-2.net] has joined #go-nuts
18:55 < exch> Could this be doable somehow?  http://gopaste.org/view/w902N
18:55 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
18:55 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
18:56 < nickjohnson> ah
18:56 < nickjohnson> This is the reverse of git, then
18:56 < exch> the issue is with new(t).
18:56 < nickjohnson> ...but the current head appears to be broken.  :(
18:56 < plexdev> http://is.gd/52N5j by [Rob Pike] in go/src/pkg/rpc/ --
print error's string when panicking.
18:57 <+iant> exch: I think you are looking for reflect.MakeZero
18:57 < exch> mm could try that
18:57 -!- Fl1pFl0p [n=FlipFlop@ip68-8-225-187.sd.sd.cox.net] has joined #go-nuts
18:57 < KirkMcDonald> There.  I think I've hammered out an equivalent to
Python's subprocess.Popen.communicate().
18:58 < uriel> nickjohnson: broken in what way?
18:58 < nbaum> And what does that do?
18:59 < KirkMcDonald> Given a running subprocess, it writes a given []byte
to its stdin pipe, and reads all of the data from its stdout and stderr pipes, all
without deadlocking when the buffers are full.
18:59 < dho> impossible!
18:59 < KirkMcDonald> Well, it tries, at least.  :-)
18:59 -!- snicket [n=Promethe@148.227.201.174] has quit ["Saliendo"]
19:00 < KirkMcDonald> If the subprocess emits an endless amount of data,
then of course you'll have to take that into consideration.
19:00 < dho> hehe
19:00 * dho points to yes
19:01 < nbaum> Does it produce two Readers?
19:01 < KirkMcDonald> It returns two []byte slices.
19:01 -!- ssmall [n=stuart@rrcs-97-77-53-108.sw.biz.rr.com] has quit [Read error:
110 (Connection timed out)]
19:01 < KirkMcDonald> One with the stdout data, one with the stderr data.
19:01 -!- lmoura [n=lauromou@200.184.118.130] has quit [Remote closed the
connection]
19:01 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
19:01 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:01 -!- vihor [n=vihor@cl-254.mbx-01.si.sixxs.net] has joined #go-nuts
19:02 < KirkMcDonald> Or nil if you weren't using a pipe.
19:03 < KirkMcDonald> func communicate(p *exec.Cmd, input []byte) ([]byte,
[]byte)
19:04 -!- yaroslav [n=yaroslav@ppp91-78-212-204.pppoe.mtu-net.ru] has quit []
19:04 -!- hagna [n=hagna@70.102.57.178] has joined #go-nuts
19:05 -!- KindOne [n=lol@h58.45.28.71.dynamic.ip.windstream.net] has quit [Remote
closed the connection]
19:07 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
19:08 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:08 -!- KindOne [n=lol@71.28.45.58] has joined #go-nuts
19:08 -!- aho [n=nya@g227091211.adsl.alicedsl.de] has quit
["EXEC_over.METHOD_SUBLIMATION"]
19:09 -!- skammer [n=skammer@79.139.142.29] has quit [SendQ exceeded]
19:09 < dho> Meh, I'm bored
19:09 < uriel> dho: no bugs left to fix on the fbsd port?  ;P
19:10 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed
out)]
19:10 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
["Leaving."]
19:10 < dho> there are but i don't have a freebsd/i386 machine
19:10 < dho> er, smp freebsd/i386 machine
19:10 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:10 < uriel> ah :/
19:11 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has quit []
19:11 < uriel> dho: did you say you were going to do the obsd port?  or whas
it the dfbsd port?  ;P
19:11 < dho> or an internet connection at the new place
19:11 < dho> oh, yeah, openbsd
19:11 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts
19:12 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has joined #go-nuts
19:12 -!- yaroslav [n=yaroslav@ppp91-78-212-204.pppoe.mtu-net.ru] has joined
#go-nuts
19:14 -!- yaroslav [n=yaroslav@ppp91-78-212-204.pppoe.mtu-net.ru] has quit [Client
Quit]
19:15 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has joined
#go-nuts
19:16 -!- ssmall [n=stuart@utdpat242007.utdallas.edu] has joined #go-nuts
19:16 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
19:16 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:17 -!- hagna [n=hagna@70.102.57.178] has quit ["leaving"]
19:17 -!- shoafb [n=The_Doct@cpe-98-150-247-183.hawaii.res.rr.com] has joined
#go-nuts
19:19 < WalterMundt> what is the difference in semantics of declaring a
method on *foo vs foo?
19:20 -!- flyfish [n=flyfish@pixout.appriss.com] has quit []
19:20 < KirkMcDonald> WalterMundt: The latter passes a copy of the struct
in.
19:20 < KirkMcDonald> WalterMundt: That is, the is the same as the
difference between *foo and foo as a function parameter.
19:20 < WalterMundt> okay, makes sense
19:20 < KirkMcDonald> s/the is/it is/
19:21 < WalterMundt> I was trying to parse that out of the language
specification but wasn't successful
19:22 < KirkMcDonald> It is implicit in the fact that it is the type of the
receiver.
19:22 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
19:22 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:23 -!- ssmall1 [n=stuart@utdpat242007.utdallas.edu] has joined #go-nuts
19:23 -!- ssmall [n=stuart@utdpat242007.utdallas.edu] has quit [Read error: 104
(Connection reset by peer)]
19:26 < dho> eh, i'll deal with openbsd in a bit
19:26 * dho has to go to the new place and do some cleaning and whatnot
19:26 -!- tomestla [n=tom@78.251.183.251] has quit [Read error: 110 (Connection
timed out)]
19:29 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
19:29 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:30 -!- Nanoo [n=Nano@95-89-198-45-dynip.superkabel.de] has joined #go-nuts
19:30 -!- Gord1 [n=gord@CPE000d3a725498-CM001947577a2e.cpe.net.cable.rogers.com]
has joined #go-nuts
19:30 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has quit []
19:30 < uriel> dho: ah, I feel your missery of moving!  ;P
19:31 * uriel is almost done settling down on his new home, but *what a pain it
was*
19:31 -!- aa [n=aa@200.40.114.26] has quit [Read error: 148 (No route to host)]
19:32 -!- aa [n=aa@r200-40-114-26.ae-static.anteldata.net.uy] has joined #go-nuts
19:32 < XniX23> uriel: so you just moved to swe?
19:34 < anticw> iant: it's not clear to me how you can efficiently do range
checking for in-core references/pointers
19:34 -!- xjih78 [i=z0r0@90.154.213.217] has quit [Read error: 104 (Connection
reset by peer)]
19:34 -!- xjih78 [i=z0r0@90.154.213.217] has joined #go-nuts
19:34 <+iant> anticw: you mean, for the garbage collector?
19:35 -!- illya77 [n=illya77@199-84-112-92.pool.ukrtel.net] has joined #go-nuts
19:35 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
19:35 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:36 -!- Nanoo [n=Nano@95-89-198-45-dynip.superkabel.de] has quit ["Leaving"]
19:37 -!- Zaba [n=zaba@about/goats/billygoat/zaba] has quit [Read error: 60
(Operation timed out)]
19:37 < uriel> XniX23: no, I just moved to a new place
19:38 -!- brunov [n=bruno@190.191.110.64] has quit [Read error: 110 (Connection
timed out)]
19:40 -!- muntasir [n=muntasir@202.72.235.202] has joined #go-nuts
19:40 -!- SRabbelier [n=SRabbeli@ip138-114-211-87.adsl2.static.versatel.nl] has
joined #go-nuts
19:41 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
19:41 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:43 < plexdev> http://is.gd/52OEP by [Michael Elkins] in go/ -- Adding
myself to AUTHORS/CONTRIBUTORS as a result of http://codereview.appspot.com/156079
19:43 < plexdev> http://is.gd/52OER by [Michael Elkins] in
go/src/pkg/exp/iterable/ -- add Take, TakeWhile, Drop, DropWhile to exp/iterable
19:43 < plexdev> http://is.gd/52OEX by [Russ Cox] in go/ -- add Roger Peppe
to AUTHORS/CONTRIBUTORS
19:43 -!- saml [n=sam@h-66-134-168-26.nycmny83.static.covad.net] has joined
#go-nuts
19:43 < saml> hola back
19:43 < saml> can someone build this on mingw on ubuntu so that i can
install windows binary?
19:44 < KirkMcDonald> saml: http://code.google.com/p/go/issues/detail?id=107
19:45 < saml> KirkMcDonald, thanks.  i vote for paline too
19:45 <+danderson> what?
19:46 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
19:46 < KirkMcDonald> What the what?
19:46 -!- crashR [n=crasher@codextreme.pck.nerim.net] has joined #go-nuts
19:47 < saml> is there irc bot for go?
19:47 -!- Zaba [n=zaba@ip102.148.adsl.wplus.ru] has joined #go-nuts
19:47 < uriel> saml: yes
19:47 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
19:47 < saml> > import "fmt"; fmt.Printf("Hello")
19:47 < rndbot> <Error: syntax error near import>
19:47 < saml> coolz
19:47 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:48 < uriel> there are a couple of irc libs too
19:48 < saml> > data Foo a = Nothing | Foo a;
19:48 < rndbot> <Error: syntax error near Foo>
19:48 < uriel> saml: see here for at least two irc libs for go to write bots
with: http://go-lang.cat-v.org/pure-go-libs
19:48 < uriel> (I think one of them even includes some bots)
19:49 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has quit ["KVIrc
Insomnia 4.0.0, revision: , sources date: 20090520, built on: 2009/06/06 11:44:47
UTC http://www.kvirc.net/"]
19:49 < uriel> saml: to play with rndbot there is a #go-run channel
19:49 < saml> uriel, thanks
19:50 < uriel> no problem
19:50 < saml> no, i'm not problem.  i'm sorry.
19:52 < djm> dho: do you have freebsd/i386 stuff working on uniprocessor
systems then?  (I assume you know that there's no freebsd/386/defs.h in the
repository at the moment)
19:52 < drhodes> XniX23: got sdl working with the library @
http://github.com/banthar/Go-SDL - it just worked.
19:52 -!- ShadowIce_ [i=pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
19:53 -!- chachan [n=chachan@200.62.25.156] has joined #go-nuts
19:54 < XniX23> drhodes: it seems banthar removed gl, so maybe it would work
for me too :p
19:54 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
19:54 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:55 -!- diltsman [n=diltsman@64.122.18.77] has joined #go-nuts
19:55 -!- skammer [n=skammer@79.139.142.29] has quit [Read error: 60 (Operation
timed out)]
19:56 -!- sliceofpi [n=Adium@c-98-194-205-176.hsd1.tx.comcast.net] has quit
["Leaving."]
19:56 -!- afurlan [n=afurlan@scorpion.mps.com.br] has quit ["Leaving"]
19:56 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed
out)]
19:56 < diltsman> Why does x := &`asdf` give a compile error?  I can see a
numeric const giving an error, but I don't understand why a string literal does.
19:56 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:56 -!- leitaox [n=leitaox@189.20.94.66] has quit [Client Quit]
19:57 < Gracenotes> I'm not sure you're allowed to make literals into
pointers
19:57 -!- ritolatu [n=ritolatu@84.251.84.201] has left #go-nuts []
19:57 < Gracenotes> however, if you assign a literal to a variable, you are
allowed to reference that
19:58 < Gracenotes> some space does need to be allocated, after all, to have
space to refer to into the first place
19:58 < Gracenotes> *in the
19:59 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has quit []
19:59 < plexdev> http://is.gd/52PdZ by [Roger Peppe] in go/test/bench/ --
chameneosredux test modified, bug fixed, faster
19:59 < plexdev> http://is.gd/52Ped by [Russ Cox] in go/src/pkg/http/ --
http: redirect to correct URL
19:59 -!- ShadowIce` [i=pyoro@unaffiliated/shadowice-x841044] has quit [Read
error: 60 (Operation timed out)]
20:01 < diltsman> It just seems, since strings are immutable, that it would
be possible to take the address of a string literal.  Since numerics are mutable
it doesn't make sense to take the address ofa litera.
20:01 < diltsman> *of a literal.
20:01 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
quit ["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
20:01 -!- armence [n=armence@67.188.229.128] has joined #go-nuts
20:02 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
20:02 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
20:02 < Gracenotes> diltsman: numerics are mutable?  I'm pretty sure they're
immutable in the same way strings are
20:02 < diltsman> well, int is mutable.  string is immutable.
20:03 -!- Raziel2p [n=Raziel2p@ti0032a380-dhcp0316.bb.online.no] has joined
#go-nuts
20:03 < Gracenotes> suppose you have a word of memory.  If you have a string
in there, you can twiddle the bits and change the string it represents (to another
string in memory).  If you have an int in there, you can twiddle the bits and
change the number it represents to a different value
20:04 -!- WalterMundt1 [n=waltermu@tercviewstation.terc.edu] has joined #go-nuts
20:04 < i3d> after each client sync, do I have to rebuild the compiler
binaries?
20:04 < diltsman> Yes, but the string type is immutable.  There is no way,
or should be no way, to change the content of it.
20:04 < Gracenotes> I don't see how mutability has much to do with the
behavior of words in memory.  whether it refers to a pointer or primitive value is
the important distinction
20:05 -!- WalterMundt1 [n=waltermu@tercviewstation.terc.edu] has quit [Client
Quit]
20:05 < Gracenotes> but you need a word in memory in the first place, which
is what a pointer is.  Where in memory does the string come from?
20:06 < diltsman> The way I'm seeing memory (and this might not be the way
it is actually layed out) is that there is a chunck of memory that has a string
object, and so it can be referenced and have the address taken of it, so long as
you don't try to mutate it.
20:06 < Gracenotes> if it comes from a constant pool, well, I think you
might have a good argument there
20:06 < rhc> doesn't necessarily have to be "in memory" if its immutable, it
can be inlined by the compiler or something
20:06 < rhc> which might be a rationale for preventing taking the address of
a string litearl
20:06 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed
out)]
20:06 < rhc> also, since go doesn't support a const pointer, what would
happen if someone tried to modify the string the pointer was pointing to?
20:07 < diltsman> rhc: That makes sense.
20:07 < Gracenotes> I am coming at it from the point of view of what the
compiler has to do if it allowed pointers to string literals
20:07 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
20:08 -!- googlethat [i=545b7b8f@gateway/web/freenode/x-wfchcccjaqgxciei] has
joined #go-nuts
20:08 < diltsman> I don't have that much experience with compilers (other
than using them) so I was wondering why it wouldn't work, since I was thinking
that it kept a pool of the string literals that could be used.
20:08 < diltsman> If there is a chance of inlining them, then the behavior
makes perfect sense.
20:09 < KirkMcDonald> Note that the type of &"foo" would be *string, that
is, a pointer to a reference.
20:10 < diltsman> Right.  *string is what I want, at this point.
20:10 < googlethat> No official answer @ issue 9?
20:10 < Gracenotes> yes, a reference to a string might point to the constant
pool.
20:10 < KirkMcDonald> ptr := new(string); *ptr = "foo";
20:10 < Gracenotes> actually, no a string points to the constant pool.  a
reference to a string points to a variable containing the string
20:10 < Gracenotes> which in turn points to the constant pool (if one
exists; I haven't studied go so in depth)
20:11 < Gracenotes> perhaps I should stop thinking aloud, heh.
20:11 < KirkMcDonald> In C, at least, string literals live in the .data
segment.
20:11 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed
out)]
20:11 -!- Fl1pFl0p [n=FlipFlop@unaffiliated/fl1pfl0p] has left #go-nuts []
20:11 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
20:11 -!- p4p4__ [n=P4p4@24.106.113.82.net.de.o2.com] has joined #go-nuts
20:12 < General13372> hey, i'm trying to retrieve data from XML, however I'm
not sure how to actually retrieve the webpage itself, it says to use Reader so I
tried something like xmlparserlink, error := net.Dial("tcp", "", "linktoXML:80");
20:13 -!- alathon [n=Martin@h59ec0ac9.dkkoyno.dyn.perspektivbredband.net] has
joined #go-nuts
20:13 < Gracenotes> hmm.  so the address of the string (at least, relative
to the top of the .c file) is known at compile time.  If you want a mutable
pointer to that string, you do need to specifically create and allocate a new
variable for that, either by specifically doing &, or passing it to a function,
etc.
20:13 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
20:13 < General13372> &{true [] map[] 0xf764b8d0 {[] 0 []} <nil>
<nil> false { } <nil> -1 map[] <nil> 1 [0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]}
20:13 < General13372> thats what it shows when I print it
20:14 -!- diltsman [n=diltsman@64.122.18.77] has quit []
20:14 -!- djanderson [n=dja@hltncable.pioneerbroadband.net] has joined #go-nuts
20:14 < Gracenotes> General13372: use the methods on the Reader.  it just
creates a connection; no data is transferred (besides DNS lookup and lower-level
stuff..)
20:15 < anticw> iant: yeah, im just saying if you have GiBs of core and a
pointer to a range can be anywhere in there; it seems hard to reliably find what's
in use or free
20:15 -!- WalterMundt [n=waltermu@twiki/developer/EtherMage] has quit [Read error:
110 (Connection timed out)]
20:15 < Gracenotes> okay, I need to go to class and contemplate this.
>_>
20:16 <+iant> anticw: see pkg/runtime/malloc.h for the data structures we
currently use
20:16 < alathon> Has anyone experimented with the drawing library(ies)
enough to know whether they're somewhat reliable for very basic, non-performance
sensitive stuff?  (i.e.  playing around)
20:17 < Gracenotes> iant: incidentally, does Go have any sort of built-in
heap limit?
20:17 < Gracenotes> and a simple way to set it?
20:17 <+iant> Gracenotes: no, it will keep allocating until the OS stops it
20:17 < Gracenotes> ah.  so I suppose I'll have to keep using rlimit
20:18 < nbaum> Is there some way to quickly recompile 8g without cleaning
and making everything?  i.e.  without having to use make.bash?
20:19 -!- brunov [n=bruno@190.191.110.64] has joined #go-nuts
20:20 -!- belkiss [n=belkiss@78.235.168.105] has joined #go-nuts
20:21 -!- ssmall1 [n=stuart@utdpat242007.utdallas.edu] has quit [Read error: 104
(Connection reset by peer)]
20:21 -!- ssmall [n=stuart@utdpat242007.utdallas.edu] has joined #go-nuts
20:21 -!- belkiss [n=belkiss@78.235.168.105] has quit [Remote closed the
connection]
20:22 -!- skammer [n=skammer@79.139.142.29] has quit [Read error: 60 (Operation
timed out)]
20:23 < General13372> Gracenotes I just tried something like that and it
just crashes
20:23 < General13372> maybe it's not retrieving the link?
20:24 < General13372> oh yep, I just got the error .nevermind
20:25 -!- KindOne [n=lol@71.28.45.58] has quit [Read error: 131 (Connection reset
by peer)]
20:25 -!- KindOne [n=lol@h58.45.28.71.dynamic.ip.windstream.net] has joined
#go-nuts
20:25 -!- leitaox [n=leitaox@189.20.94.66] has joined #go-nuts
20:26 -!- leitaox [n=leitaox@189.20.94.66] has quit [Read error: 104 (Connection
reset by peer)]
20:27 -!- p4p4 [n=P4p4@24.106.113.82.net.de.o2.com] has quit [Success]
20:29 -!- monkfish [n=chatzill@pc4231.stdby.hin.no] has quit ["ChatZilla 0.9.85
[Firefox 3.5.5/20091102152451]"]
20:30 < General13372> I'm trying to get information from pages that are
generated for XML
20:30 -!- JPascal1 [n=jpascal@78-106-172-210.broadband.corbina.ru] has left
#go-nuts []
20:30 -!- vz_ [n=vz@static133-147.adsl.no] has joined #go-nuts
20:30 < General13372> so I use xmlparserlink, error := net.Dial("tcp", "",
"XMLArea:80");
20:30 < General13372> that doesn't work, however if I use it for a regular
site, it works
20:32 < uriel> General13372: the resolver does not check the /etc/hosts file
20:32 < uriel> there is an issue filled about that
20:32 < uriel> (go has its own dns resolver)
20:32 < uriel> (I'm assuming 'XMLArea' is not a valid dns name)
20:33 < General13372> no
20:33 < General13372> hold on
20:33 < General13372> xmlparserlink, error := net.Dial("tcp", "",
"services.tvrage.com/feeds/full_search.php?show=buffy:80");
20:33 -!- sladegen [n=nemo@unaffiliated/sladegen] has quit [Nick collision from
services.]
20:33 < uriel> uhu?
20:33 -!- sladegen [n=nemo@unaffiliated/sladegen] has joined #go-nuts
20:33 < uriel> er, ther eis a difference between a domain name and an url
20:34 < uriel> if you want ot make an http request, use the http package
20:34 < General13372> hmm
20:34 < uriel> 'services.tvrage.com/feeds/full_search.php?show=buffy' is not
a valid or reasonable domain name last I checked
20:34 < General13372> no it isn't
20:34 < uriel> exactly
20:35 < General13372> but to parse the XML it wants a reader
20:35 < uriel> so?
20:35 < uriel> what does that have to do?
20:35 < uriel> dial wants a host name
20:36 < uriel> (well, it wants a dial string, which for tcp, consist of a
host name and a port)
20:36 < General13372> so I would dial the domain
20:36 < uriel> yes,
20:36 < General13372> and use the http library to request the xml output?
20:36 < uriel> 'services.tvrage.com/feeds/full_search.php?show=buffy' is
clearly *not* the domain
20:36 < General13372> package*
20:36 < General13372> tvrage.com would be the domain
20:36 < General13372> and that works
20:36 < GeoBSD> when go for *bsd ?
20:37 < uriel> no, services.tvrage.com would be the domain
20:37 < uriel> GeoBSD: there is already Go for bsd
20:37 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
20:37 < GeoBSD> ohhh
20:37 < GeoBSD> i missed it
20:37 < General13372> so retrieving the XML output would require me to use
the http package?
20:38 < mikedee> General13372: You probably want http.Client
20:39 < uriel> General13372: apparently the http package doesn't know how to
make requests, from what I can see
20:39 -!- skammer [n=skammer@79.139.142.29] has quit [Client Quit]
20:39 < General13372> http.Client
20:39 < General13372> where is that in the package
20:39 < uriel> well, that
20:39 -!- illya77 [n=illya77@199-84-112-92.pool.ukrtel.net] has quit [Read error:
104 (Connection reset by peer)]
20:39 < uriel> er, yes
20:39 < General13372> I don't even see it :|
20:39 < uriel> I don't see it either
20:40 -!- KindOne [n=lol@h58.45.28.71.dynamic.ip.windstream.net] has quit [Read
error: 104 (Connection reset by peer)]
20:40 -!- p4p4__ [n=P4p4@24.106.113.82.net.de.o2.com] has quit [Client Quit]
20:40 < mikedee> http://golang.org/src/pkg/http/client.go - Sorry it is
actually just http.Get you will need
20:40 -!- KindOne [n=lol@h58.45.28.71.dynamic.ip.windstream.net] has joined
#go-nuts
20:42 < uriel> yea, just found that, somehow things from pkg/http/client.go
are missing from the docs..
20:42 < uriel> strange
20:42 < uriel> or maybe I'm not awake, nevermind, ignore me
20:42 -!- vz [n=vz@static133-147.adsl.no] has quit [Read error: 110 (Connection
timed out)]
20:42 -!- KindOne [n=lol@h58.45.28.71.dynamic.ip.windstream.net] has quit [Read
error: 104 (Connection reset by peer)]
20:43 -!- ssmall [n=stuart@utdpat242007.utdallas.edu] has quit [Read error: 110
(Connection timed out)]
20:45 < uriel> ah, now I get it(pun not intended)
20:46 -!- Popog [n=Adium@66.192.186.101] has joined #go-nuts
20:46 < uriel> http://golang.org/pkg/http/#Response.Get
20:47 < uriel> the indentation of functions in the index really confused me
(I'm an idiot)
20:48 < exch> meh.  I give up -.- http://gopaste.org/view/00rOv
20:48 < nbaum> To whom does one submit code for review?  The website gives
r@ and rsc@ as examples, but I don't know that they've asked to be sent random
submissions.
20:49 < exch> if they are listed on the site, then they've implicitly
volunteered to receive random submissions :)
20:49 < Popog> Does Go have a roadmap yet?
20:49 < uriel> iant: some guidance regarding who to set as reviewer is
really needed in the contribute instructions page
20:50 -!- flyfish [n=flyfish@pixout.appriss.com] has joined #go-nuts
20:50 -!- Fish [n=Fish@78.238.225.114] has joined #go-nuts
20:50 < uriel> Popog: some of it has been announced in various places
(really, watch rob's presentation!  most common questions are answered there)
among other things are a new garbage collector
20:50 < uriel> more libraries
20:50 < uriel> optimizations
20:51 < uriel> I'm sure I'm missing something important
20:52 < uriel> nbaum: you can also set golang-dev@googlegroups.com
20:52 < Popog> uriel: danke
20:53 < msbranco> yes, i've also sent to the list and now wait for replies;
but perhaps a few more notes in the contribute page will help save some questions
(mine included ;)
20:53 < uriel> a new concurrent garbage collector is from what I have heard
so far probably the biggest item on the TODO list (assuming there is such a thing)
20:54 < uriel> msbranco: yes, I agree the contribute page needs to clarify
this point, pretty much everyone I have seen was confused by it
20:54 < General13372> ok
20:54 < General13372> this is weird, some of the stuff isnt documented
20:54 < uriel> General13372: what isn't documented?
20:54 < General13372> that http.Get
20:55 -!- googlethat [i=545b7b8f@gateway/web/freenode/x-wfchcccjaqgxciei] has quit
[Ping timeout: 180 seconds]
20:55 < General13372> if mikedee didn't mention it, I wouldnt have seen it
20:55 < General13372> oh wait, it is
20:55 < rbohn> We're still at a point where browsing the source is a good
idea.
20:56 < uriel> Popog: oh, a windows port is not in the 'roadmap' AFAIK, but
it is in a 'wishlist', and hector already has it working
20:56 < uriel> he is getting ready to merge his changes...
20:56 < uriel> General13372: I posted a link to it!
20:56 < uriel> and yes, I had trouble finding it too
20:56 < General13372> yeah I saw uriel lol
20:57 < uriel> the way the index is built is a bit confusing
20:57 < General13372> I didn't see it, it was right in front of me
20:57 < General13372> after u posted it, I went up and saw it
20:57 < nickjohnson> Hm. There's no 'set' type, is there?
20:57 < uriel> I did see it, but parsed it out as a method of Request, not
as a function
20:57 < General1337> oh
20:57 < nickjohnson> Or search facilities on a sorted vector?
20:57 -!- lmoura [n=lauromou@200.184.118.130] has joined #go-nuts
20:58 < uriel> ok, now really good night
20:58 < General1337> how would this work though, all the XML parsing stuff
requires the reader
20:58 < mikedee> its not a method of request but for some reason it is in
that section
20:58 < General1337> so how would it know to go through what I retrieve from
http.Get
20:58 < mikedee> it would be func (*Response) Get if it were a method
20:58 -!- armence [n=armence@67.188.229.128] has quit [Connection timed out]
20:58 < mikedee> but it is just func Get
20:59 < General1337> func NewParser(r io.Reader) *Parser
20:59 -!- directrixx [n=directri@ip68-231-189-247.tc.ph.cox.net] has quit [Read
error: 110 (Connection timed out)]
20:59 < uriel> mikedee: I know, it is just a bit confusing in the index
where you don't see the signature
20:59 < General1337> I would be using the reader though, not what the
http.Get retrieves
20:59 < JBeshir> What I like is that it's relatively easy in Go to split
code into two blocks of statements, which while logically related and entirely
combined, within a function, call both as gorountines, and wait on both completing
via a channel, to split things into parallel tasks.
21:00 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has
joined #go-nuts
21:00 < uriel> General1337: what is Response.Body?
21:00 < uriel> (rhetorical question)
21:01 < General1337> what
21:01 < General1337> I dont understand :\
21:01 -!- geocalc [n=geocalc@lns-bzn-37-82-253-36-191.adsl.proxad.net] has joined
#go-nuts
21:01 < uriel> JBeshir: go has closures, you can define two functions right
where you use 'go' to create a new goroutine, and use a channel you made in the
enclosing function
21:02 < uriel> General1337: http://golang.org/pkg/http/#Response
21:02 < uriel> Body io.ReadCloser; <------------ HERE
21:02 < JBeshir> uriel: Yeah, that was the first model without sugar I
mentioned.
21:02 < uriel> JBeshir: what sugar do you want?!?
21:02 < JBeshir> uriel: It has a few lines or so of spam, but works very
nicely.
21:03 < General1337> oh durr
21:03 < General1337> thanks uriel
21:03 -!- aa [n=aa@r200-40-114-26.ae-static.anteldata.net.uy] has quit [Remote
closed the connection]
21:03 < uriel> can you paste it and tell me what lines are spam ?
21:03 < Popog> Does Go plan to optimize pass by value if there are no
modifications made in the function, or should I pass by pointer in these cases?
21:03 < JBeshir> uriel: The "wait until all the functions complete" part
being innate, so it could be a very heavily used construct to make many things
parallelise.
21:03 < JBeshir> Well, any involving the channels, for instance.
21:03 -!- flyfish [n=flyfish@pixout.appriss.com] has quit []
21:03 < JBeshir> Probably not worth the 'cost' in terms of adding complexity
to the language.
21:03 < uriel> JBeshir: ??  just read from the channel, when the channel
unblocks, you are done
21:04 < JBeshir> uriel: Right.
21:04 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
21:04 < uriel> JBeshir: again, can you even post the code, and tell me what
part is spam, and how would you rewrite it?
21:04 <+iant> Popog: I don't think there are any current plans for such an
optimization
21:05 < Popog> iant: So about your post here
http://groups.google.com/group/golang-nuts/browse_thread/thread/2fabaa48211f9c29/f0ea29aeda202724?lnk=gst&q=address+of+temporary#f0ea29aeda202724
21:05 < nickjohnson> JBeshir: You could define helper functions that
'waitall' on channels pretty simply
21:06 < Popog> Is naming temporaries and passing their address to functions
that take interfaces (assuming the pointer to the type implements the interface)
the solution?
21:06 -!- chid_ [n=mqqlbtis@c122-106-95-175.rivrw1.nsw.optusnet.com.au] has quit
[Connection timed out]
21:06 -!- GeoBSD [n=geocalc@lns-bzn-31-82-252-193-128.adsl.proxad.net] has quit
[Read error: 60 (Operation timed out)]
21:07 <+iant> Popog: What about my post?
21:07 -!- Cyanure [n=cyanure@212.198.164.142] has joined #go-nuts
21:08 <+iant> Yes, if the method takes a pointer, and you have a value, then
giving the value a name is the straightforward way to call the method
21:09 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has joined
#go-nuts
21:09 -!- aaront [n=aaront@mc-122-183.IPReg.McMaster.CA] has joined #go-nuts
21:10 < Popog> To me, this is way too much typing when I'm dealing with
Vector math, which involves a lot of temporaries.
21:10 < Popog> And dynamic allocation seems a might slow for so many
temporaries as well
21:10 -!- qvp [n=dale@99-197-219-136.cust.wildblue.net] has joined #go-nuts
21:11 < Popog> I mean, passing by value probably won't be too costly for
such a small class, but that depends on how many dimensions your Vector is.
21:11 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has
joined #go-nuts
21:11 -!- werdan7 [n=w7@freenode/staff/wikimedia.werdan7] has quit [SendQ
exceeded]
21:13 < General1337> if I use 2 net.Dials
21:13 < General1337> would I need to create channels or run them
concurrently?
21:14 < Popog> I mean, naming temporaries, while straightforward, seems a
bit silly, don't you think?
21:14 -!- Ibw [n=isaac@cpe-67-241-42-134.twcny.res.rr.com] has joined #go-nuts
21:15 -!- filgood [n=filip@87.194.33.18] has joined #go-nuts
21:15 < Popog> Temporaries are lesser beings that only deserve to be
manipulated by the cruel will of the programmer.  Giving them names gives them too
much of a sense of identity, they might revolt.
21:15 <+iant> Popog: the current rule makes sense; your suggestion for a
compiler optimization makes sense; I'm not sure what needs to change here
21:16 -!- aaront [n=aaront@unaffiliated/aaront] has quit [Remote closed the
connection]
21:16 -!- Cyanure [n=cyanure@212.198.164.142] has quit [Connection timed out]
21:16 -!- WalterMundt [n=waltermu@twiki/developer/EtherMage] has joined #go-nuts
21:17 < Popog> Iant: Also, thanks for putting up with my numerous
misunderstandings so far, I'm sure I'll have plenty more over the evolution of
this programming language.
21:17 <+iant> no worries
21:17 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has joined
#go-nuts
21:17 < WalterMundt> given a reflect.InterfaceType instance, is there a
straightforward way to see if a type implements the interface?  The type in
question can be hardcoded so it doesn't need to be wrapped in a reflect.* object
21:17 -!- flyfish [n=flyfish@pixout.appriss.com] has joined #go-nuts
21:18 -!- snearch_ [n=olaf@92.225.60.63] has quit ["Ex-Chat"]
21:19 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has quit [SendQ
exceeded]
21:19 -!- existsec [n=existsec@yosemite.yosemite.edu] has quit [Read error: 104
(Connection reset by peer)]
21:19 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit ["Leaving."]
21:20 -!- r2p2 [n=billy@v32671.1blu.de] has joined #go-nuts
21:20 < Popog> I don't actually understand the problem with taking the
address of a temporary.
21:21 <+iant> if a pointer method modifies the value, then if you pass in
the address of a temporary the changes will be lost; the fear is that that will be
confusing; it's similar to the C++ rule that you can't pass a temporary to a
function which takes a non-const reference
21:22 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has quit [Remote
closed the connection]
21:22 -!- subat_qn [n=subat_qn@78.236.214.16] has joined #go-nuts
21:23 -!- Daminvar [n=Daminvar@cpe-67-241-129-149.buffalo.res.rr.com] has joined
#go-nuts
21:23 -!- subat_qn [n=subat_qn@78.236.214.16] has quit [Client Quit]
21:23 -!- aaront [n=aaront@mc-122-183.IPReg.McMaster.CA] has joined #go-nuts
21:23 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
["Leaving."]
21:23 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has joined
#go-nuts
21:25 < Daminvar> Hi everyone, I have a question about the FFI.
21:25 -!- dD0T [n=dD0T@unaffiliated/dd0t] has quit ["ZNC -
http://znc.sourceforge.net"]
21:27 < Popog> So it's an issue of confusion, not an issue of safety?
21:27 -!- bennabi [n=bennabi@41.104.81.201] has left #go-nuts []
21:28 -!- fosho [n=afitz@adsl-190-192-105.asm.bellsouth.net] has quit ["Peace and
Protection 4.22"]
21:28 < Popog> Because the function you pass the pointer to could cause the
pointer to leave the stack frame, thus making it allocated on the heap, and the
changes would thus, then remain and be purposeful.
21:28 <+iant> Popog: yes, so there is also a question of hidden inefficiency
21:29 < Popog> But how is it any more or less hidden then if you named the
temporary in a scope, passed it to a function by pointer, and then closed the
scope?
21:30 <+iant> if you name a temporary and takes it address the efficiency
issue is not being hidden from you
21:30 < plexdev> http://is.gd/52SuC by [Michael Hoisie] in go/src/pkg/json/
-- A quick fix to ensure that json.Marshal returns errors correctly, as well as
some error-related tests
21:30 < plexdev> http://is.gd/52SuH by [Russ Cox] in go/src/cmd/godoc/ --
godoc: plug file descriptor leak
21:31 < scandal> WalterMundt: hrm, i don't see a way to directly do that.  I
think maybe you have to construct a zero value of the type and then try a type
assertion?
21:31 < Popog> But just because it takes an address doesn't mean it's going
to be dymanically allocated
21:31 < Popog> *dynamically
21:31 <+iant> Popog: currently it does, but hopefully that will be fixed as
the compiler improves
21:31 < Popog> Right, right, I was speaking about in the future
21:32 < Popog> But then that's a hidden efficiency issue right there, when
you fix it
21:32 < Popog> Is it not?
21:33 < Daminvar> I'm trying to bind a function that takes a pointer to a C
struct, but when I try to compile the package it gives an error about an expected
struct-qualifier-list.  (http://pastebin.com/m148e28da).
21:33 <+iant> Popog: I don't think so, the possible inefficiency comes when
you take the address of the temporary; exposing that in the code means that there
is no hidden inefficiency; the address is going to be taken either way
21:33 < Popog> There's no indication of whether or not a function that takes
by pointer will escape your frame of allocation.
21:34 <+iant> And there is still the user confusion issue to consider
21:34 < Popog> I almost think it's more confusing the way it is.
21:34 <+iant> Daminvar: that error is coming from gcc when compiling C code,
so that is what you need to check
21:34 < Popog> And I'm a C++ programmer
21:35 <+iant> Daminvar: in particular, everything in the comment will go
into the C code, make sure there are no extraneous characters there
21:35 <+iant> Popog: what do you find confusing?
21:35 -!- rrr_ [i=rrr@gateway/gpg-tor/key-0x9230E18F] has joined #go-nuts
21:35 < Daminvar> Ah, okay.  I'll look into that.  Thank you.
21:35 < Popog> Perhaps I misunderstand, what is "the possible inefficiency
comes when you take the address of the temporary"
21:35 -!- Gord1 [n=gord@CPE000d3a725498-CM001947577a2e.cpe.net.cable.rogers.com]
has quit [Read error: 110 (Connection timed out)]
21:36 < Popog> *get rid of the "comes"
21:36 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has joined
#go-nuts
21:36 <+iant> Popog: the possible inefficiency is when taking the address
moves the temporary onto the heap
21:37 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has quit [SendQ
exceeded]
21:37 < WalterMundt> scandal: can you even do a type assertion with a
reflect.Type object?
21:37 < Popog> Currently, that would be the case, yes.  Is it not planned
for this to not be the case?
21:38 < Popog> Taking the address of anything currently forces it to be
allocated on the heap
21:38 < Popog> But I was under the impression that is planned for this not
to be the case in the future.
21:39 <+iant> Popog: I think we are going in circles; that would be a useful
optimization, but I'm not aware of any current plans for it; doing it when calling
a method is noticeably harder than doing it if the pointer is not passed to
another function
21:39 < sstangl> I'm getting a build error in cmd/cgo: "exec-Run: undefined:
runtime-arrawtoslice \n hash_remove_n: undefined: mmov".
21:40 <+iant> sstangl: I don't know what causes that, but running all.bash
again fixes it
21:40 -!- muntasir [n=muntasir@202.72.235.202] has left #go-nuts []
21:40 -!- Fish [n=Fish@78.238.225.114] has quit [Remote closed the connection]
21:41 < scandal> WalterMundt: hrm, apparently not..  weird.
21:42 < Popog> Iant: Eric Rannaud believes there are plans (or so it is my
understanding)
http://groups.google.com/group/golang-nuts/browse_thread/thread/5714b8214ab25f2
21:42 < KirkMcDonald> WalterMundt: I think you need to imlpement this
comparison yourself.  Get the Type object for the type.  Iterate through the
methods of the interface.  Verify that the type has a method whereby method.Name
and method.Type are equal to the interface method.
21:42 < XniX23> Daminvar: u working on sdl?
21:42 < Popog> I have no idea who Eric Rannaud is, but he seemed like he
know what he was talking about
21:42 <+iant> Popog: All I see him saying is that it could be done, not that
it will be done
21:43 -!- qvp [n=dale@99-197-219-136.cust.wildblue.net] has quit ["Lost terminal"]
21:43 -!- aaront [n=aaront@unaffiliated/aaront] has quit [Remote closed the
connection]
21:43 <+iant> and note that calling a method on the pointer is "escaping the
frame of the allocation"
21:43 < Ibw> Do I need an account with codereview.appspot.com to send code
for codereview?
21:44 < Ibw> wait, no.  I just read the sentence before
21:44 < Ibw> All good
21:44 < Daminvar> XniX23: Yeah.
21:44 < WalterMundt> KirkMcDonald: ahh.  That's more trouble than it's worth
I think.  I'll build the API differently to avoid having to reimplement that logic
21:45 < Popog> Iant: Hmm… I assumed planned in-lining might have dealt with
my particular needs.  But yes, reading his post more closely it doesn't in fact
claim there is a plan
21:45 < WalterMundt> ...and pine for Python where types are a subset of
values and can be passed around at runtime with ease
21:46 < KirkMcDonald> WalterMundt: And this is why I miss templates in Go
21:46 < KirkMcDonald> Although interfaces do indeed help.
21:46 < WalterMundt> I want to be able to have an "user store" object, and
be able to ask it "do your users suport this interface?"
21:46 < Daminvar> XniX23: I've been contributing a bit to Banthar's SDL
bindings.  I added some of SDL_ttf, but I've hit a temporary roadblock with
TTF_GetFontStyle.  =(
21:46 < WalterMundt> or rather, a "user store" interface
21:47 < plexdev> http://is.gd/52T0i by [Ian Lance Taylor] in go/doc/ --
Mention golang-dev as a default code review destination.
21:47 <+iant> WalterMundt: you could use MakeZero to get a Value of your
InterfaceType, and then call Set with your value
21:47 < plexdev> http://is.gd/52T0n by [Robert Griesemer] in 19 subdirs of
go/ -- Change to container/vector interface:
21:47 < XniX23> Daminvar: im having a problem with ttf, look private
21:47 < WalterMundt> iant: hmm, intriguing
21:48 <+iant> WalterMundt: but I don't see a way to conditionally call Set;
it seems like it will crash if the value doesn't match the method; that seems like
an omission; you may want to open an issue for it
21:48 <+iant> I mean, if the value doesn't match the interface
21:48 < WalterMundt> ahh, okay
21:48 < kuroneko> bad iant, you broke tip ;)
21:48 < WalterMundt> yeah, I think reflect really ought to expose both
conditional sets and some of the type-matching logic in the runtime
21:48 <+iant> I did?  What happened?
21:49 < kuroneko> actually, sorry, it was probably the other patch
21:49 <+iant> Probably, my patch just patched the docs a bit
21:49 < kuroneko> but none the less, it's broken
21:49 < kuroneko> gimme a tic
21:50 -!- ShadowIce` [i=pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
21:50 < Popog> iant: So… how is it confusing for temporaries to be heap
allocated if their address is taken, if every other time in code you see an
address of operator, you think dynamically allocate.
21:50 < kuroneko> http://www.pastebin.ca/1686059
21:50 < gl> nice dots
21:51 < JBeshir> Hmm.
21:51 < Ibw> hg pull -u to grab the latest repo?
21:51 < kuroneko> failure is at 186/187
21:51 <+iant> Popog: I am talking about two different things
21:51 < Popog> But if the address of operator is already associated with the
performance consideration, it's basically a Pavlovian response.
21:51 < WalterMundt> what's the difference between InterfaceValue.Set and
InterfaceValue.SetValue?
21:52 < JBeshir> Maybe there could be a way of requesting a really really
small stack when spawning a goroutine, or is there other overhead that precludes
it being a useful optimisation for the case of spawning many, many goroutines
(perhaps per connection or similar)
21:52 < JBeshir> I say this because I know of cases where "a few k" is more
than software normally tracks per connection.
21:52 <+iant> Popog: we're talking about the case where the compler
automatically creates a temporary and takes it address in order to pass a value to
a pointer method
21:52 <+iant> Popog: the confusion is that any changes which the pointer
method makes will be silently lost
21:52 <+iant> Popog: The hidden inefficiency is that the address is taken,
possibly causing a dynamic allocation, and the user doesn't see that
21:53 < KirkMcDonald> WalterMundt: From the source code: func (v
*InterfaceValue) SetValue(x Value) { v.Set(x) }
21:53 < WalterMundt> ok
21:53 < kuroneko> [yes, I have go building under hudson]
21:53 -!- Anders__ [n=Anders@c83-253-2-206.bredband.comhem.se] has joined #go-nuts
21:53 <+iant> WalterMundt: There is no different between Set and SetValue,
SetValue exists to meet the Value interface
21:53 < kuroneko> [both 386 and amd64]
21:53 < kuroneko> [both fail]
21:53 <+iant> Ibw: yes, hg pull -u will bring you up to date
21:53 -!- amacleod [n=amacleod@c-24-34-33-96.hsd1.ma.comcast.net] has quit ["Bye
Bye"]
21:54 -!- Adys [n=Adys@unaffiliated/adys] has quit [Read error: 60 (Operation
timed out)]
21:54 < Amaranth> Ibw: Hey if you get started on GTK+ bindings I'd love to
help out
21:54 < TheDracle> Hm..  I don't see anything on how to deal with Multicast
sockets in the net package.
21:54 < Popog> iant: but the effects of the function aren't necessarily lost
21:54 -!- keeto [n=keeto@121.54.92.149] has quit [Remote closed the connection]
21:54 < KirkMcDonald> iant: It would perhaps be nice if the documentation
explicitly mentioned that one was an alias for the other.
21:54 <+iant> JBeshir: if we can run with a smaller stack, we should just
allocate a smaller stack to start with
21:54 -!- keeto [n=keeto@121.54.92.149] has joined #go-nuts
21:54 < Ibw> Amaranth: I had some trouble figuring out come caveats of cgo.
But It would be really cool to start a google code project or something.  Wanna do
it?
21:54 < kuroneko> and yup, it was changset 4211:d52c4400bd9c
21:54 <+iant> Popog: they won't be around in the temporary that the user
passed in, even though they may live on somewhere else
21:55 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has joined
#go-nuts
21:55 < Amaranth> Ibw: I'd rather be a contributor than the lead
21:55 -!- keeto [n=keeto@121.54.92.149] has quit [Remote closed the connection]
21:55 -!- keeto [n=keeto@121.54.92.149] has joined #go-nuts
21:55 -!- gasreaa [n=atwong@nat/slide/x-gmbggpufyfccaczj] has joined #go-nuts
21:55 < Amaranth> iant: Well can the stack be dynamically adjusted?
21:55 < Ibw> Amaranth: Sure.  Let me get some work done, then I'll put out a
message or something
21:56 -!- snicket [n=Promethe@187.149.58.235] has joined #go-nuts
21:56 <+iant> Amaranth: I don't understand what you are asking
21:56 -!- ShadowIce_ [i=pyoro@unaffiliated/shadowice-x841044] has quit [Read
error: 60 (Operation timed out)]
21:57 < Amaranth> iant: Can you start with a smaller stack and grow it if
needed?
21:57 <+iant> Amaranth: yes
21:57 <+iant> that is how Go works
21:57 < Amaranth> So start it with a smaller value ;)
21:58 <+iant> right--it needs to be big enough to run the stack segmentation
code itself, but I think it could be smaller than it is today
21:58 < JBeshir> How big is that, as a matter of curiosity?
21:58 <+iant> of course there is a tradeoff--if every goroutine immediately
allocates a new stack segment, that is not very useful
21:58 < JBeshir> Yeah.
21:58 -!- ni| [n=ni|@c-24-34-220-147.hsd1.ma.comcast.net] has joined #go-nuts
21:58 < JBeshir> That said, if every goroutine spawned to do a separate job
allocates a new one
21:58 <+iant> JBeshir: I don't know, it should be less than 1K anyhow
21:59 <+iant> maybe as low as 256 byte
21:59 < JBeshir> But every goroutine spawned per connection or something
spawned one less...
21:59 < JBeshir> That could be a 100-to-1 gain or something silly.
21:59 < Popog> iant: The changes not living around for ever is not a
performance concern though, the user already understands that because they don't
have a name to reference the variable.  Plus the user had to call the method
explicitly, meaning they're probably more concerned with the return of the
function, not what goes in.  The heap allocation is not even better explained
because they just name it using := and call with the .
21:59 < JBeshir> (In terms of ones improved vs ones made worse, not extent)
21:59 < Popog> operator
21:59 < JBeshir> iant: That sounds nice.
22:00 -!- gasreaa [n=atwong@nat/slide/x-gmbggpufyfccaczj] has left #go-nuts []
22:01 <+iant> Popog: we are just going around in circles
22:01 < Popog> iant: I know.
22:01 < Popog> I have no idea what we're even talking about any more
22:02 < Popog> Or where we are
22:02 -!- nullpo [n=nullpo@221x252x46x83.ap221.ftth.ucom.ne.jp] has joined
#go-nuts
22:02 < kuroneko> iant: oh, and I'm sorry - it seems my cgo diff spread
wider than I thought >_<
22:03 -!- diltsman_ [n=diltsman@64.122.18.77] has joined #go-nuts
22:04 -!- XniX23 [n=XniX23@89-212-10-29.dynamic.dsl.t-2.net] has quit [Read error:
104 (Connection reset by peer)]
22:05 -!- XniX23 [n=XniX23@89.212.10.29] has joined #go-nuts
22:06 < diltsman_> is the trunk of the repository supposed to compile?
22:07 < geocalc> hg trunk ?
22:07 <+iant> diltsman_: it is accidentally a temporarily broken
22:07 <+iant> s/a/and/
22:07 < diltsman_> I do hg pull && hg update.
22:07 < kuroneko> their record is pretty good
22:08 <+iant> it should be fixed momentarily
22:08 -!- drusepth [n=drusepth@adsl-75-34-64-210.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
22:08 < diltsman_> Ok, so it should work, but it is broken?  Good to know.
I was thiking it was just me.
22:08 < kuroneko> I think my hudson has only picked up on 3 or 4 breakages
on tip
22:08 < geocalc> pull -u diltsman_
22:08 -!- drusepth [n=drusepth@adsl-75-34-64-210.dsl.spfdmo.sbcglobal.net] has
quit [Client Quit]
22:08 < kuroneko> if I had a amd64 box on the public innurwebs, I'd actualy
move the hudson out to there so the results were visible.
22:09 < kuroneko> but I don't right now
22:09 < diltsman_> geocalc: Thanks, I'm not a Mercurial user.
22:10 < geocalc> me too diltsman_
22:10 -!- trutkin [n=trutkin@64.1.25.210.ptr.us.xo.net] has quit ["Leaving"]
22:10 -!- loureiro [n=loureiro@189.2.128.130] has quit ["Quit"]
22:10 -!- ShadowIce_ [i=pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
22:11 <+iant> diltsman_: I think the fix was just submitted
22:12 -!- fosho [n=afitz@adsl-190-192-105.asm.bellsouth.net] has joined #go-nuts
22:12 < WalterMundt> iant: http://code.google.com/p/go/issues/detail?id=327
22:13 < diltsman_> iant: I'm still getting the same error.
22:14 < diltsman_> %%%% making cmd/cgo %%%%
22:14 < diltsman_> 6g -o _go_.6 ast.go gcc.go main.go out.go util.go
22:14 < diltsman_> 6l -o cgo _go_.6
22:14 < diltsman_> exec·Run: undefined: runtime·arraytoslice
22:14 < diltsman_> hash_remove_n: undefined: mmov
22:14 < diltsman_> make: *** [cgo] Error 1
22:14 <+iant> diltsman_: oh, that's a different problem, I think; do another
build and it should go away; I don't know what causes that
22:14 <+iant> somehow something doesn't get cleaned
22:16 < XniX23> it works now
22:17 < diltsman_> iant: Weird, thanks.  That seems to have worked.
22:17 -!- ShadowIce` [i=pyoro@unaffiliated/shadowice-x841044] has quit [Read
error: 60 (Operation timed out)]
22:18 < plexdev> http://is.gd/52U0w by [Rob Pike] in go/doc/ -- change the
rules for maintaining AUTHORS and CONTRIBUTORS files.
22:18 < plexdev> http://is.gd/52U0A by [Robert Griesemer] in
go/src/pkg/debug/proc/ -- fix for broken build (built-in new was invisible due to
a parameter called 'new')
22:18 -!- brunov [n=bruno@190.191.110.64] has quit [Read error: 145 (Connection
timed out)]
22:19 -!- lenst [n=user@81-237-244-185-no52.tbcn.telia.com] has joined #go-nuts
22:19 < kuroneko> 386 build showing as OK.
22:19 < sstangl> is anyone aware of opengl bindings for Go?
22:19 < XniX23> yes, but i dont know if they work, sec
22:19 -!- randomiser [n=james@193.60.90.97] has quit ["Ex-Chat"]
22:20 -!- randomiser [n=james@nat-studcudn-172-24-62-0.fitz.cam.ac.uk] has joined
#go-nuts
22:20 < XniX23> http://github.com/banthar/Go-OpenGL
22:20 < sstangl> XniX23: thanks.
22:20 -!- snicket [n=Promethe@187.149.58.235] has quit ["Saliendo"]
22:22 -!- teedex [n=teedex@204.14.155.161] has quit [Remote closed the connection]
22:22 < kuroneko> amd64 just built OK.
22:23 -!- sr [n=sr@vangberg.name] has left #go-nuts []
22:24 < XniX23> sstangl: let me know if it works
22:24 -!- biosed [i=biosed@2001:770:188:0:7171:8f10:4d7a:4fc3] has joined #go-nuts
22:24 -!- Anders__ [n=Anders@c83-253-2-206.bredband.comhem.se] has quit
["Leaving"]
22:24 < Ibw> Anyone know what dwarf.Type GData reports unknown size means
with cgo?
22:25 < kuroneko> Ibw: use tip.
22:25 < kuroneko> that was fixed in tip a few days ago
22:25 -!- elmar [n=elmar@188.107.219.76] has quit ["Leaving"]
22:25 < biosed> hey, having issue with $GOBIN, can find it or not set, same
result when manually set, any suggestions?
22:25 < Ibw> kuroneko: Thanks
22:26 -!- fosho_ [n=afitz@adsl-190-192-105.asm.bellsouth.net] has joined #go-nuts
22:26 < XniX23> lbw: update your go
22:26 -!- fosho [n=afitz@adsl-190-192-105.asm.bellsouth.net] has quit [Read error:
54 (Connection reset by peer)]
22:26 <+iant> biosed: make sure $GOBIN is on PATH
22:26 -!- ShadowIce` [i=pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
22:26 -!- hstimer [n=hans@70.90.170.37] has joined #go-nuts
22:26 < Ibw> do I need to clean.bash before I all.bash when I building a new
tip?
22:26 -!- directrixx [n=directri@ip68-231-189-247.tc.ph.cox.net] has joined
#go-nuts
22:27 -!- ni| [n=ni|@c-24-34-220-147.hsd1.ma.comcast.net] has quit [Remote closed
the connection]
22:27 <+iant> Ibw: it is safer but nobody will prosecute you if you don't
22:27 < Ibw> iant: Will my build break if I don't though?
22:27 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has quit
[Connection timed out]
22:27 <+iant> Ibw: sometimes it could; the Makefiles do not express all
cross-directory dependencies
22:28 -!- chid_pingedout [n=ppwryktv@c122-106-95-175.rivrw1.nsw.optusnet.com.au]
has joined #go-nuts
22:28 < Ibw> Alright, so all.bash and if it breaks, clean.bash then all.bash
again.  Easy
22:28 < rhc> geordi: -w struct A { A() { this->foo(); } virtual ~A() {}
virtual void foo() = 0; }; struct B : virtual A { void foo() { BARK; } }; int
main() { B b; }
22:28 < rhc> whoops, wrong channel
22:30 < biosed> thanks iant, handy if the dir exsisted in the first place,
my bad
22:30 -!- msbranco [n=msbranco@64-172.61-188.cust.bluewin.ch] has quit [Read
error: 60 (Operation timed out)]
22:31 -!- slowriot [n=kclancy@66.211.10.10] has quit []
22:31 -!- chachan [n=chachan@200.62.25.156] has quit ["KVIrc Insomnia 4.0.0,
revision: , sources date: 20090520, built on: 2009/06/06 11:44:47 UTC
http://www.kvirc.net/"]
22:32 -!- ShadowIce [i=pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
22:33 -!- ShadowIce_ [i=pyoro@unaffiliated/shadowice-x841044] has quit [Read
error: 60 (Operation timed out)]
22:33 < mikedee> How can you tell if a http.Conn has been disconnected by
the client?
22:34 < Ibw> How do I check what the latest tip is?
22:34 < plexdev> http://is.gd/52Utu by [Rob Pike] in go/test/bench/ --
timing log update for new version of chameneos
22:36 -!- gnibbler_ [n=duckman@210-84-4-209.dyn.iinet.net.au] has joined #go-nuts
22:37 < Ibw> Still getting the dwarf.Type GData reports unknown size error
22:37 < Ibw> hmm...
22:38 -!- ShadowIce` [i=pyoro@unaffiliated/shadowice-x841044] has quit [Read
error: 60 (Operation timed out)]
22:38 -!- decriptor [n=decripto@137.65.132.26] has quit [Read error: 110
(Connection timed out)]
22:39 -!- diltsman_ [n=diltsman@64.122.18.77] has quit []
22:40 -!- shambler_ [i=kingrat@mm-4-193-84-93.dynamic.pppoe.mgts.by] has quit
["What you have been is not on boats."]
22:40 -!- mkanat [n=mkanat@c-67-188-1-39.hsd1.ca.comcast.net] has joined #go-nuts
22:42 -!- h4xOr [n=prudhvi@aldebaran.surapaneni.in] has quit [Read error: 60
(Operation timed out)]
22:43 < Ibw> What caused the dwarf.Type GData reports unknown size error?
22:43 < Ibw> (Before it was fixed)
22:43 -!- h4xOr [n=prudhvi@aldebaran.surapaneni.in] has joined #go-nuts
22:44 < XniX23> i got it because of cgo i think?
22:44 < Ibw> ah, the typedefs
22:44 < Ibw> Yes, cgo
22:45 -!- armence [n=armence@67.188.229.128] has joined #go-nuts
22:45 < Ibw> maybe cgo is stuttering with gobject
22:45 < Ibw> (which gtk uses)
22:46 < alus> haha gobject and gint
22:46 -!- armence [n=armence@67.188.229.128] has quit [SendQ exceeded]
22:46 < alus> glib is so funny
22:46 -!- filgood [n=filip@87.194.33.18] has quit [Connection timed out]
22:46 < XniX23> rofl funny situation
22:46 < Ibw> ergh, very annoying
22:47 -!- iant [n=iant@74.125.60.1] has quit ["Leaving."]
22:48 -!- gnibbler [n=duckman@124-168-32-15.dyn.iinet.net.au] has quit [Read
error: 101 (Network is unreachable)]
22:49 -!- lbrandy_ [n=lbrandy_@206.210.81.55] has quit [Read error: 113 (No route
to host)]
22:50 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts
22:52 -!- Omei [n=chatzill@99-178-130-115.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
22:52 -!- aaront [n=aaront@mc-191-150.IPReg.mcmaster.ca] has joined #go-nuts
22:53 -!- snicket [n=Promethe@148.227.201.174] has joined #go-nuts
22:54 -!- directrixx [n=directri@ip68-231-189-247.tc.ph.cox.net] has quit [Read
error: 110 (Connection timed out)]
22:54 -!- r2p2 [n=billy@v32671.1blu.de] has left #go-nuts []
22:58 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts
23:00 -!- saml [n=sam@h-66-134-168-26.nycmny83.static.covad.net] has quit
["Leaving"]
23:00 -!- cbus [n=cbus@83.140.181.59] has left #go-nuts []
23:03 -!- flyfish [n=flyfish@pixout.appriss.com] has quit []
23:03 -!- chrelad [n=chrelad@76.164.12.11] has quit ["[Q] 0.2.6.3"]
23:06 < plexdev> http://is.gd/52Vto by [Ken Thompson] in go/src/pkg/math/ --
bad sin/cos for large angles.
23:07 < General1337> how do the Tokens, startelement and endelement work in
the XML package?
23:07 -!- jshriver [n=jshriver@cblmdm24-53-165-86.buckeyecom.net] has quit
[Connection reset by peer]
23:07 < General1337> http://golang.org/pkg/xml/#StartElement
23:08 -!- jshriver [n=jshriver@cblmdm24-53-165-86.buckeyecom.net] has joined
#go-nuts
23:08 < General1337> I'm able to retrieve the whole XML document
23:08 -!- ni| [n=ni|@c-24-34-220-147.hsd1.ma.comcast.net] has joined #go-nuts
23:08 < General1337> but I need to parse it now, I don't understand how the
package works though with StartElement and EndElement
23:08 -!- jshriver [n=jshriver@cblmdm24-53-165-86.buckeyecom.net] has quit [Read
error: 104 (Connection reset by peer)]
23:10 -!- Omei [n=chatzill@99-178-130-115.lightspeed.sndgca.sbcglobal.net] has
quit [Read error: 60 (Operation timed out)]
23:10 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has quit ["Leaving"]
23:11 -!- ShadowIce [i=pyoro@unaffiliated/shadowice-x841044] has quit
["Verlassend"]
23:13 -!- jshriver [n=jshriver@24.53.165.86] has joined #go-nuts
23:13 -!- simonz05 [n=simon@84.49.89.143] has quit ["Ex-Chat"]
23:13 < Ibw> I don't even know where GData is.  glib makes no mention of it.
The only thing I can find is some Google api
23:13 < Ibw> Which has absolutely nothing to do with my code
23:13 < Ibw> so huh
23:14 < General1337> type StartElement struct {
23:14 < General1337> Name Name;
23:14 < General1337> Attr []Attr;
23:14 < General1337> }
23:14 < General1337> err didnt meant o paste that
23:15 -!- vihor [n=vihor@cl-254.mbx-01.si.sixxs.net] has quit []
23:16 -!- ni| [n=ni|@c-24-34-220-147.hsd1.ma.comcast.net] has quit [Remote closed
the connection]
23:16 < XniX23> is there a way i can use int16 and uint16 in go?
23:17 -!- jshriver [n=jshriver@24.53.165.86] has quit [Connection reset by peer]
23:17 < Ibw> um, int16 and uint16
23:17 < Ibw> ?
23:17 < Ibw> XniX23: What are you asking?
23:17 < Ibw> You can just write those
23:17 < General1337> how does StartElement and EndElement work
23:18 < General1337> http://golang.org/pkg/xml/#StartElement
23:18 -!- jshriver [n=jshriver@24.53.165.86] has joined #go-nuts
23:19 < XniX23> lbw: ok, i guess i need to read the whole tutorial, sorry
23:19 < XniX23> thanks btw
23:19 -!- jdp [n=justin@ool-435238c0.dyn.optonline.net] has quit [Read error: 113
(No route to host)]
23:20 -!- teedex [n=teedex@204.14.155.161] has quit [Remote closed the connection]
23:21 -!- willdye [n=willdye@fern.dsndata.com] has joined #go-nuts
23:22 -!- brrant [n=John@168-103-78-133.hlrn.qwest.net] has joined #go-nuts
23:27 < Ibw> If anyone cares, theres a bug right now in cgo preventing any
work on a Gtk+ wrapper.  I filed an issue and hopefully it will be resolved soon.
23:28 -!- hipe [n=hipe@c-24-11-83-170.hsd1.mi.comcast.net] has joined #go-nuts
23:29 * spikebike got his go bug fixed!
23:29 -!- hackbench [n=hackbenc@88.242.151.136] has quit ["Leaving"]
23:29 < General1337> good help me with my problem
23:29 < General1337> :|
23:29 < spikebike> gccgo had a split stack issue..  no more
23:30 < mikedee> General1337: Depending on what you want to do, you need
either xml.Parser.Token() or xml.Unmarshal() - I think...
23:31 < General1337> well I think according to this, to use both of those
you need to specify StartElement and EndElement
23:31 < General1337> which I'm guessing is <whatever></whatever>
23:31 < General1337> and I have no idea how to set those
23:32 -!- mertimor [n=mertimor@p4FE75214.dip.t-dialin.net] has quit []
23:32 < mikedee> they are just basic structs, they are Tokens
23:33 < fosho> Ibw: out of curiosity, which issue
23:33 < General1337> what do you mean mikedee
23:33 < mikedee> http://golang.org/pkg/xml/#Token
23:34 < mikedee> If you just want to parse an XML file without marshalling
into an object then set up a parser
23:34 < General1337> I have that
23:34 < mikedee> http://golang.org/pkg/xml/#Parser.NewParser
23:34 < General1337> I have a parser setup
23:34 < Ibw> fosho: I am getting an error dwarf.Type GData reports unknown
size.  I am updated to the latest tip though, so the previous, similar issue is
not the same
23:34 < mikedee> Then keep calling Token()
23:34 < Ibw> fosho:
23:34 < General1337> tokenreader, _ := xmlparser.Token();
23:35 < General1337> fmt.Println(tokenreader);
23:35 < General1337> this displays <nil> constnatly
23:35 -!- XniX23 [n=XniX23@89.212.10.29] has quit [Remote closed the connection]
23:35 < mikedee> check that ioreader is properly initialized and that it is
valid xml
23:36 < mikedee> if you are getting the xml from the wire then you might
have buffer problems
23:36 -!- brunov [n=bruno@190.191.110.64] has joined #go-nuts
23:36 < mikedee> you can create an io.Reader from a string if you want
23:36 < mikedee> for testing
23:36 < General1337> thats what I have right now
23:36 < General1337> ok
23:36 < General1337> when I take it directly from the reader
23:37 < General1337> it displays the xml just fine, but when I put it in the
parser.  it doesn't work
23:37 < alexsuraci> neat, I guess slice[A:] was recently added
23:37 < General1337> I just tried displaying the parser itself
23:37 < mikedee> http://golang.org/src/pkg/xml/xml.go#L105
23:37 < alexsuraci> just tried updating gopaste and some new code uses it,
time to update go on my vps :P
23:37 < mikedee> some more comments in the source
23:39 < mikedee> General1337: assigning error to _ is not a good idea if you
are looking for errors
23:39 < mikedee> or ever tbh..
23:39 < General1337> I had it before
23:39 < General1337> im just using it right now so I can parse it
23:39 < General1337> all that would do is show whether or not it retrieved
the data
23:39 < General1337> for the reader
23:40 < General1337> hmm
23:40 < alexsuraci> hm, vector.NewStringVector moved.  /me searches around
23:40 < General1337> nope, the xml parser itself isn't displaying anything
23:40 < General1337> or the tokens
23:41 < mikedee> try fmt.Printf("%v", token);
23:41 < General1337> nope
23:41 < General1337> heres what it displays
23:42 < General1337> <nil>&{true [] map[] 0xf7698780 {[] 0 []}
<nil> <nil> false { } <nil> -1 map[] EOF 1 [0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]}
23:42 < mikedee> can you put something on pastebin?  it should only be short
23:42 < General1337> <airday>Tuesday</airday> is what the reader
displays
23:42 < General1337> yeah sure
23:43 < General1337> http://allofthem.pastebin.com/m74e0cbee
23:43 < scandal> alexsuraci: the comment for type Vector seems to indicate
the New function is no longer required.
23:44 < scandal> // The zero value for Vector is an empty vector ready to
use.
23:44 < alexsuraci> scandal: yep, just saw
23:44 -!- alexf [n=alexf@99.35.10.35] has joined #go-nuts
23:44 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit [Remote closed
the connection]
23:45 < mikedee> you create a buffered io reader, but then use the non
buffered one for the NewParser call
23:46 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has quit
[Read error: 110 (Connection timed out)]
23:46 < General1337> i'm taking it directly from the retrieval of data, I
can actually remove the buffered one
23:46 < General1337> cause I don't need that
23:47 < mikedee> it needs to be buffered or it will read EOF if the data is
still in transmission
23:47 < General1337> hmm
23:47 < General1337> ok
23:47 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts
23:47 < alexsuraci> gopaste now has a theme selector :D http://gopaste.org/
23:47 < General1337> xmlparser := xml.NewParser(readerxml);
23:47 < General1337> so the NewParser would read from the buffer?
23:47 < mikedee> still, I would not try to debug / learn the xml at the same
time as working with the bufio and http
23:48 < mikedee> yep
23:48 < mikedee> somewhere in the docs it says about creating an io.Reader
from a local string
23:48 < mikedee> download your test xml and then paste it into the code to
start with
23:48 < mikedee> once that is working, get it from the network
23:50 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit [Client Quit]
23:50 < General1337> hmm
23:51 -!- ment_ [i=thement@ibawizard.net] has quit [Client Quit]
23:51 -!- ment [i=thement@ibawizard.net] has joined #go-nuts
23:52 -!- directrixx [n=aleksand@68.231.189.247] has joined #go-nuts
23:52 < Ibw> Just made string cutting, inserting, sub string finding and
replacing algorithms.  Think I should send them in for consideration in the
strings package?
23:52 < plexdev> http://is.gd/52WEn by [Ken Thompson] in go/src/pkg/math/ --
test case for large angles in trig functions
23:52 < Ibw> plexdev: Are you a user ot a bot?
23:52 < Ibw> *or
23:52 < Ibw> A bot I guess
23:53 < Ibw> > fmt.Printf("I'm a bot")
23:53 < rndbot> I'm a bot
23:54 < mikedee> General1337: This might be handy for you later, it shows
using reflect to see if Token is StartElement, EndElement etc
23:54 -!- zhaozhou [n=zhaozhou@linfast76.bitnet.nu] has quit [Read error: 104
(Connection reset by peer)]
23:54 < mikedee> http://golang.org/src/pkg/xml/read.go#L139
23:57 -!- h4xOr_ [n=prudhvi@aldebaran.surapaneni.in] has joined #go-nuts
23:57 < mikedee> Delete line 6 too, you dont need that xmldata,_ :=
readerxml.ReadString('\n');
23:58 < General1337> why
23:58 < General1337> that lets me see the input from the buffer itself
23:58 < General1337> well
23:58 < General1337> I tried using unmarshal as well and it didn't work
23:58 < mikedee> but it moves the cursor
23:59 -!- zhaozhou [n=zhaozhou@linfast76.bitnet.nu] has joined #go-nuts
23:59 < General1337> oh
--- Log closed Wed Nov 25 00:00:14 2009