--- Log opened Mon Aug 02 00:00:05 2010 00:20 < napsy> gccgo 00:21 -!- Makoryu [~vt920@pool-71-174-191-10.bstnma.fios.verizon.net] has quit [Remote host closed the connection] 00:23 -!- boscop [~boscop@g226249058.adsl.alicedsl.de] has joined #go-nuts 00:24 < nickaugust> whats the difference between list and &list? *list would be a pointer right? 00:25 < KirkMcDonald> & is the address-of operator. 00:27 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined #go-nuts 00:28 < nickaugust> so I've read a dirctory with ioutils.ReadDir into var 'list' and now im looping over it with "for i:= range list" should I use 'list[i]' or '&list[i]' to refer to that iteration? 00:31 < xb95> can't you just do "for _, val := range list { do something with val }" 00:31 < xb95> and ignore the index entirely? 00:31 < xb95> unless you want it 00:32 < xb95> also, I assume list[i] returns the thing that is at position i in the list 00:33 < xb95> whereas &list[i] returns the pointer to that position 00:33 < nickaugust> xb95: oh sweet that looks good. i'll do it that way 00:33 < nickaugust> so the addres-of operator & is the same as a pointer? 00:33 < nickaugust> then whats *variable 00:33 < cbeck> Just remember that if you do _, val := range list, val will be a copy of the item, not a reference to the item 00:33 < xb95> cbeck: oh, that's great to know, thanks. 00:33 < KirkMcDonald> nickaugust: Unary * is the dereference operator. 00:34 < nickaugust> ah 00:34 * nickaugust googles derefrence operator 00:34 < xb95> nickaugust: where dereference means 'take this address, turn it back into the thing that I'm talking about' 00:34 < KirkMcDonald> nickaugust: Say you have this variable: var foo int 00:34 < nickaugust> so the oposite of a pointer? 00:34 < KirkMcDonald> nickaugust: &foo gives you the address of foo, and gives you a value whose type is *int. 00:34 < KirkMcDonald> That is, a pointer. 00:35 < KirkMcDonald> So say you have: bar := &foo 00:35 < nickaugust> yes 00:35 < nickaugust> ok 00:35 < cbeck> nickaugust: The meaning depends on context 00:35 < KirkMcDonald> bar is a *int. 00:35 < KirkMcDonald> *bar dereferences the pointer, and gives you an int. 00:35 < nickaugust> yes ok i get it 00:35 < nickaugust> interesting 00:36 < KirkMcDonald> There is a distinction here between * as a type modifier and * as a unary operator. 00:37 < nickaugust> how would it be used as a type modifier? 00:37 < KirkMcDonald> *int 00:37 < KirkMcDonald> The * modifies the int type. 00:38 < KirkMcDonald> Giving a new type: *int 00:38 < KirkMcDonald> Pointer-to-int 00:38 < nickaugust> ah yes. as opposed to the return value of &foo which would be *foo 00:38 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 00:39 < KirkMcDonald> The return value of &foo is the address of foo, whose type is *int. 00:39 < KirkMcDonald> *foo is not a thing. 00:40 -!- qIIp [~qIIp@72-173-157-34.cust.wildblue.net] has joined #go-nuts 00:41 -!- qIIp [~qIIp@72-173-157-34.cust.wildblue.net] has quit [Read error: Connection reset by peer] 00:42 < nickaugust> KirkMcDonald: ok i think ive got it. thanks man :) 00:56 -!- qIIp [~qIIp@72-173-157-34.cust.wildblue.net] has joined #go-nuts 00:59 -!- mikespook [~mikespook@219.137.73.218] has joined #go-nuts 01:02 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined #go-nuts 01:09 -!- qIIp [~qIIp@72-173-157-34.cust.wildblue.net] has quit [Quit: Lost terminal] 01:10 -!- smw [~smw@pool-71-183-88-124.nycmny.fios.verizon.net] has joined #go-nuts 01:11 < smw> just curious: is there any ways to make plugins with go? 01:11 < exch> various 01:11 < smw> plugins == loadable pieces of code 01:11 < smw> how? 01:12 < exch> Go doesn't do dynamic linking, but you can use the IPC approach. plugins as independant processes that communicate with the main app over a unix socket 01:12 < smw> ok 01:12 < smw> I guess you would use netchans for sending data? 01:13 < exch> You can do that, yes 01:13 < smw> ok 01:13 < smw> I guess latency is not an issue on localhost? lol 01:14 < exch> Not particularly. But (de)serialization of the data may cause some slowdown. Take care when designing the protocol 01:15 < smw> well, wouldn't netchans serialize it well? 01:16 < exch> Yes, but if you are sending more data than is necessary, it'll still be slow than needed 01:16 < smw> ok 01:16 < smw> bottom line is, send as little data as possible 01:16 < exch> yup 01:17 -!- MizardX- [~MizardX@unaffiliated/mizardx] has joined #go-nuts 01:17 < smw> exch, thanks :-) 01:17 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection reset by peer] 01:18 -!- genbat [~genbat@125-239-208-148.jetstream.xtra.co.nz] has left #go-nuts [] 01:18 < nickaugust> hey i'm trying to get some user input so im using scan like this: "input, input_err := fmt.Scan()" but its not waiting for the input before proceeding. is this not the right way to use fmt.Scan? 01:19 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Ping timeout: 248 seconds] 01:21 < exch> I think you need to use Scanln() for that. Not sure though. I've never used any of the scan functions 01:22 < nickaugust> ok i'll check that one out thx 01:28 -!- Bombe [~droden@weltgehirnmaschine.de] has quit [Excess Flood] 01:29 -!- Bombe [~droden@weltgehirnmaschine.de] has joined #go-nuts 01:36 < xb95> okay, now that's fancy. interface doesn't JUST declare methods... Foo interface { Name string } is satisfied by BarFoo struct { Name string }... just a struct with a field, not a method 01:37 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts 01:39 < xb95> BazFoo { name String }; func (self *BazFoo) Name() (string) { return self.name } ....... also satisfies ... but now you can do BarFoo.Name = xx; but you can't do BazFoo.Name = xx; .. maybe I should avoid that on the grounds that it might be confusing later and limit use of interfaces arbitrarily by assuming the structure of the underlying object 01:42 < nickaugust> what does it mean that Scanln takes "a ...inferface{}" as an arg? func Scanln(a ...interface{}) (n int, err os.Error) 01:43 < xb95> that means it takes 0 or more arguments of type interface{} 01:43 < xb95> and by type I mean, things that fulfill the 'interface{}' declaration 01:43 < xb95> in reality this means 'give me 0 or more of anything. doesn't matter what it is.' 01:44 < nickaugust> im trying to get some user input... im calling Scanl with no args and its waiting for the input then when i hit enter it gives error "expecting newline" 01:46 < xb95> you have to give it arguments 01:46 < xb95> that's where it puts the data 01:47 < nickaugust> i guess i need to read about interfaces 01:47 < exch> var a, b string; fmt.Scanln(a, b); <- user inputs "foo bar".. a will be "foo", b will be "bar" 01:47 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 01:48 < nickaugust> exch: ah, ill try that. thanks 01:48 < exch> Might have to pass &a and &b instead of straight up a and b 01:53 -!- Byron [~Byron@cpe-98-155-138-202.hawaii.res.rr.com] has joined #go-nuts 01:54 < nickaugust> exch: yeah the pinters work. thanks again man. 01:54 < nickaugust> s/pinters/pointers 01:54 -!- aho [~nya@fuld-4d00d3de.pool.mediaWays.net] has quit [Quit: EXEC_over.METHOD_SUBLIMATION] 01:56 -!- boscop [~boscop@g226249058.adsl.alicedsl.de] has quit [Ping timeout: 265 seconds] 01:56 -!- boscop [~boscop@g227139238.adsl.alicedsl.de] has joined #go-nuts 01:58 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 02:11 < xb95> so typically I'm used to writing single-threaded servers using epoll. the mailing list seems to say that using one (or more?) goroutines per client is fine. Go holds up OK even with 20,000+ goroutines? I'd never even consider making that many threads in any other environment :) 02:12 < smw> goroutines are much smaller than threads 02:12 < smw> of course I have no idea if it can handle 20,000 :-P 02:12 < Namegduf> Goroutines are about 4KB of stack and not much else. 02:13 < exch> goroutines != threads 02:13 < xb95> yeah, I know they're different. 02:17 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 260 seconds] 02:17 < nickaugust> so its seems silly to be doing this http://sprunge.us/aQKD can I not just define the array as var input []string and then just pass &input to fmt.Scanln. I mean I know I cant do that because I tried, but somthing similar ;) 02:22 < exch> the values don't have to be strings, It should be able to do float, int, bool, etc in mixed order 02:24 < nickaugust> well the input is just names or comany names so strings shuold work 02:24 < nickaugust> i just mean becaue i dont know how many search terms there are ahead of time 02:28 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the connection] 02:31 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 02:34 -!- Makoryu [~vt920@pool-71-174-191-10.bstnma.fios.verizon.net] has joined #go-nuts 03:03 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds] 03:03 -!- allengeorge [~allengeor@74.12.150.7] has joined #go-nuts 03:06 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the connection] 03:07 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 03:08 < xb95> hmm, I can't seem to find a way to convert a string to []byte. searching shows strings.Bytes but that seems to have been removed since these posts were made. 03:09 < xb95> []byte(string) maybe 03:09 * xb95 tries 03:09 < exch> that works 03:09 < xb95> heh 03:09 < xb95> it's the simple thing things. 03:10 < exch> reverse works as well 03:10 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote host closed the connection] 03:16 -!- mattikus [~mattikus@47.sub-97-199-33.myvzw.com] has joined #go-nuts 03:17 -!- mattikus [~mattikus@47.sub-97-199-33.myvzw.com] has quit [Client Quit] 03:23 -!- mattikus [~mattikus@47.sub-97-199-33.myvzw.com] has joined #go-nuts 03:26 < nickaugust> hey is there a function to concat arrays? 03:26 < smw> nickaugust, I don't think so 03:26 < nickaugust> or append to an array 03:26 < smw> nickaugust, you can use copy to append to an array 03:27 < nickaugust> like i have an array i need to append to the end of another array 03:27 -!- ptimothyp [~timothy@203.17.221.171] has joined #go-nuts 03:27 < nickaugust> smw: ok thanks i'll check that out 03:27 -!- mattikus [~mattikus@47.sub-97-199-33.myvzw.com] has quit [Ping timeout: 245 seconds] 03:28 -!- mattikus [~mattikus@10.sub-97-193-185.myvzw.com] has joined #go-nuts 03:32 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has quit [Quit: derferman] 03:33 -!- mattikus [~mattikus@10.sub-97-193-185.myvzw.com] has quit [Ping timeout: 265 seconds] 03:33 -!- ukai [~ukai@nat/google/x-ojbrwcvbpzfkjvii] has joined #go-nuts 03:39 -!- angasule [~angasule@190.2.33.49] has quit [Read error: Operation timed out] 03:46 < nickaugust> how come I cant just do "search_words[len(search_words)] = word" to append to an array? it says list out of range 03:48 < smw> nickaugust, look into vectors 03:48 < nickaugust> smw: thx 03:48 < Makoryu> nickaugust: Probably because extending the length of an array entails reallocating it. 03:48 < smw> container/vector I believe is the name of the package 03:48 < smw> it automates extending slices and reissuing arrays 03:48 < Namegduf> nickaugust: Because that isn't how computers work. 03:49 < Namegduf> You can't just write "after" a block of memory to make it longer. 03:49 < Namegduf> There could be other stuff there. 03:49 < nickaugust> Namegduf: i understand that but there should be an append function for arrays 03:49 < Namegduf> And a slice is a pointer (with length and capacity) to a continuous block of memory. 03:50 < Namegduf> You can't append to a block of memory, so they don't have an append function. 03:50 -!- allengeorge [~allengeor@74.12.150.7] has quit [Quit: allengeorge] 03:50 < Namegduf> You can only emulate append, by reallocation 03:50 < smw> nickaugust, http://golang.org/pkg/container/vector/ 03:50 < nickaugust> smw: im there now thx 03:50 < smw> nickaugust, np ;-). 03:51 < Namegduf> A vector is what you want, not a slice or array, basically. 03:52 < nickaugust> smw: Namegduf: ah yes, here is my push and pop and all the good stuff. thanks! :) 04:01 < Makoryu> nickaugust: You're coming from Python or Ruby, I take it? 04:03 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 04:05 < nickaugust> ah, ive done a little of a lot of different languages.. none too exstensivly. i've actually been re-writing the same application in different languages of the past couple years. but yes a good amount of python. i like python. i also heard someone say he thought Go is what python should have been. so we'll see i guess :) 04:05 < nickaugust> Makoryu: ^ 04:06 < Namegduf> Go does not have all of Python's goals 04:07 < nickaugust> well i assume Go is a lot more effecient because it doesnt try to do all the pythonic stuff 04:07 < Namegduf> Particularly, it favours high performance over additional capabilities that require less efficient structures. 04:07 < Namegduf> Yeah. 04:07 < nickaugust> yeah. 04:07 < nickaugust> heh 04:08 < nickaugust> thats good though. i mean, theres going to be a learning curve with any language. might as well be a learning curve that makes you think closer to what the machine is doing 04:08 < Namegduf> Yeah. 04:08 < nickaugust> weve just been abstracting on abstraction and were all up in the frickin clouds with this shit. time to get back to something simple. 04:54 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2] 04:57 -!- vegai [vegai@archlinux/developer/vegai] has quit [Ping timeout: 276 seconds] 05:03 -!- scm [justme@d057245.adsl.hansenet.de] has quit [Ping timeout: 265 seconds] 05:04 -!- scm [justme@d019048.adsl.hansenet.de] has joined #go-nuts 05:06 -!- Xenith [~xenith@xenith-2-pt.tunnel.tserv3.fmt2.ipv6.he.net] has quit [Ping timeout: 260 seconds] 05:10 -!- vegai [vegai@archlinux/developer/vegai] has joined #go-nuts 05:12 -!- Xenith [~xenith@xenith-2-pt.tunnel.tserv3.fmt2.ipv6.he.net] has joined #go-nuts 05:16 -!- Byron [~Byron@cpe-98-155-138-202.hawaii.res.rr.com] has quit [Ping timeout: 260 seconds] 05:23 -!- path[l] [UPP@120.138.102.50] has quit [Ping timeout: 258 seconds] 05:24 -!- genbat [~genbat@125-239-208-148.jetstream.xtra.co.nz] has joined #go-nuts 05:32 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 05:47 -!- Makoryu [~vt920@pool-71-174-191-10.bstnma.fios.verizon.net] has quit [Remote host closed the connection] 05:52 -!- Sacho [~sacho@95-42-108-60.btc-net.bg] has quit [Remote host closed the connection] 06:01 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has joined #go-nuts 06:01 -!- mode/#go-nuts [+v iant] by ChanServ 06:04 -!- roop [~roop@122.167.234.183] has joined #go-nuts 06:33 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has quit [Quit: Leaving.] 06:36 -!- Sacho [~sacho@213.91.244.15] has joined #go-nuts 06:38 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 265 seconds] 06:40 -!- ptimothyp [~timothy@203.17.221.171] has quit [Quit: Leaving.] 06:41 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has joined #go-nuts 06:41 -!- mode/#go-nuts [+v iant] by ChanServ 06:53 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has quit [Ping timeout: 260 seconds] 06:57 -!- bmizerany [~bmizerany@c-24-6-37-113.hsd1.ca.comcast.net] has quit [Remote host closed the connection] 07:00 -!- scm [justme@d019048.adsl.hansenet.de] has quit [Read error: Connection reset by peer] 07:01 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 07:04 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Ping timeout: 276 seconds] 07:05 -!- scm [justme@d135011.adsl.hansenet.de] has joined #go-nuts 07:12 -!- bmizerany [~bmizerany@c-24-6-37-113.hsd1.ca.comcast.net] has joined #go-nuts 07:13 -!- nettok [~quassel@200.119.181.121] has quit [Ping timeout: 264 seconds] 07:21 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 07:22 -!- chaosclown [~whitenois@unaffiliated/chaosclown] has quit [Ping timeout: 265 seconds] 07:24 -!- iant [~iant@62-20-124-50.customer.telia.com] has joined #go-nuts 07:24 -!- mode/#go-nuts [+v iant] by ChanServ 07:27 -!- ExtraSpice [~XtraSpice@88.118.32.225] has joined #go-nuts 07:29 -!- chaosclo1n [~whitenois@24.179.65.0] has joined #go-nuts 07:33 < xb95> hm, can't seem to find a way to coerce an interface{} to an arbitrary type? 07:33 < KirkMcDonald> xb95: x.(T) 07:34 < KirkMcDonald> http://golang.org/doc/go_spec.html#Type_assertions 07:35 < xb95> yeah, that doesn't seem to do the trick... it says, 07:35 < xb95> lib/BasicPipeline.go:98: invalid type assertion: req.(http.Request) (non-interface type *Parcel on left) 07:35 < xb95> Parcel interface { 07:35 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has joined #go-nuts 07:35 < KirkMcDonald> xb95: It would seem you have a *Parcel, not a Parcel. 07:35 < xb95> oh hm, might have gotten it with some C-style extra parens 07:35 < xb95> (*foo).(http.Request) 07:36 < xb95> yeah, I was trying *foo.(http.Request) and that didn't work 07:36 < xb95> didn't think to try adding the extra parens 07:36 < KirkMcDonald> You probably want foo.(*http.Request) 07:37 < KirkMcDonald> Well, (*foo).(*http.Request) 07:37 < KirkMcDonald> Why are you using a pointer to an interface? That seems odd. 07:37 < xb95> Yeah, it's a terrible design. 07:37 < xb95> In this case, I'm going to restart the design, but I was experimenting. 07:38 < xb95> panic: runtime error: invalid memory address or nil pointer dereference 07:39 < xb95> good times. 07:40 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 07:49 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error: Connection timed out] 07:50 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 08:22 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has joined #go-nuts 08:23 -!- tvw [~tv@212.79.9.150] has joined #go-nuts 08:50 -!- roop [~roop@122.167.234.183] has quit [Ping timeout: 245 seconds] 08:51 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has joined #go-nuts 08:52 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit: slashus2] 08:54 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts 09:02 -!- bmizerany [~bmizerany@c-24-6-37-113.hsd1.ca.comcast.net] has quit [Remote host closed the connection] 09:04 -!- path[l] [UPP@120.138.102.50] has quit [Quit: path[l]] 09:07 -!- ExtraSpice [~XtraSpice@88.118.32.225] has quit [Quit: Leaving] 09:23 -!- scoeri [~jdekoste@soft.vub.ac.be] has quit [Ping timeout: 260 seconds] 09:24 -!- scoeri [~jdekoste@mail.ssel.vub.ac.be] has joined #go-nuts 09:26 -!- saschpe [~saschpe@mgdb-4d0cfab9.pool.mediaWays.net] has joined #go-nuts 09:30 < araujo> is it possible to convert/cast an interface{} type that contains an 'int' type, to a float ? 09:31 -!- ptrb [~peter@archimedes.bourgon.org] has joined #go-nuts 09:34 < exch> you'll have to turn it into and int first, then a float 09:38 -!- roop [~roop@122.167.234.183] has joined #go-nuts 09:47 -!- mikespook [~mikespook@219.137.73.218] has quit [Quit: Leaving.] 09:47 < araujo> exch, the question is how? .... here it complains that I cannot 'int(interfaceValue)' 09:47 < araujo> that I need a type assertion 09:47 < araujo> and with atype assertion, it turns into 0 09:47 < araujo> ... 09:48 < exch> If the interface value contains an int, v.(int) should work.. 10:01 < vrtical> araujo: float(v.(int)) doesn't work? (I haven't tried it) 10:03 -!- genbat [~genbat@125-239-208-148.jetstream.xtra.co.nz] has left #go-nuts [] 10:07 -!- alvin-x [5d7ce22e@gateway/web/freenode/ip.93.124.226.46] has joined #go-nuts 10:08 -!- path[l] [~path@59.162.86.164] has joined #go-nuts 10:15 -!- path[l]_ [~path@59.162.86.164] has joined #go-nuts 10:15 -!- path[l] [~path@59.162.86.164] has quit [Read error: Connection reset by peer] 10:21 -!- lmoura [~lauromour@200.184.118.130] has joined #go-nuts 10:34 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Read error: Connection reset by peer] 10:35 -!- MizardX [~MizardX@unaffiliated/mizardx] has joined #go-nuts 10:39 -!- lmoura [~lauromour@200.184.118.130] has quit [Ping timeout: 258 seconds] 10:45 -!- fuzzybyte [~fuzzybyte@a47.org] has quit [Ping timeout: 265 seconds] 10:51 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 245 seconds] 10:56 -!- lmoura [~lauromour@200.184.118.136] has joined #go-nuts 11:10 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has quit [Quit: WeeChat 0.3.3-dev] 11:18 -!- path[l] [~path@59.162.86.164] has quit [Remote host closed the connection] 11:18 -!- path[l] [~path@122.182.0.38] has joined #go-nuts 11:28 -!- Project_2501 [~Marvin@82.84.72.104] has joined #go-nuts 11:29 * Project_2501 si back \o/ 11:38 -!- Netsplit *.net <-> *.split quits: dionysiac, Innominate, Paradox924X, ukai, Adys 11:39 -!- Paradox924X [~Paradox92@178.119.188.72.cfl.res.rr.com] has joined #go-nuts 11:39 -!- ukai [~ukai@nat/google/x-qskobdogswruxawa] has joined #go-nuts 11:40 -!- thiago__ [~thiago@189.107.227.111] has joined #go-nuts 11:41 -!- path[l]_ [~path@59.162.86.164] has joined #go-nuts 11:42 -!- path[l]_ [~path@59.162.86.164] has quit [Remote host closed the connection] 11:42 -!- path[l] [~path@122.182.0.38] has quit [Read error: Connection reset by peer] 11:42 -!- path[l] [~path@59.162.86.164] has joined #go-nuts 11:46 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 11:46 -!- dionysiac [~dionysiac@S01060013102db8c7.cg.shawcable.net] has joined #go-nuts 11:52 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 11:54 -!- ikaros [~ikaros@dslb-094-219-223-133.pools.arcor-ip.net] has joined #go-nuts 11:56 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has joined #go-nuts 12:06 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping timeout: 240 seconds] 12:08 -!- ikaros [~ikaros@dslb-094-219-223-133.pools.arcor-ip.net] has quit [Ping timeout: 260 seconds] 12:11 -!- angasule [c80571ea@gateway/web/freenode/ip.200.5.113.234] has joined #go-nuts 12:20 -!- alehorst [~alehorst@200.146.80.63.dynamic.adsl.gvt.net.br] has joined #go-nuts 12:33 -!- manveru [~manveru@b08s28ur.corenetworks.net] has joined #go-nuts 12:33 < manveru> heya 12:37 < manveru> how would you implement a sort function for a struct? 12:38 < nsf> make that struct implement sort.Interface 12:39 < napsy> manveru: here's an example http://golang.si/doku.php?id=naiven_quicksort 12:39 < manveru> right now i have something like http://pastie.org/1070908 12:41 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts 12:42 < manveru> it's... ugly :) 12:42 < napsy> it's a naive quicksort implementation 12:42 < manveru> not the quicksort 12:42 < manveru> my code 12:42 < napsy> oh 12:43 < napsy> what's that buublesort? 12:44 < manveru> no, a simple Person.lt(Person) 12:44 < manveru> i'll make sure to implement Sortable, but this function still irks me 12:45 < manveru> 17: func (a Person) Less(b Sortable) bool { /* struktura Person sedaj implementira vmesnik Sortable. */ 12:45 < manveru> 18: if a.age < b.(Person).age { 12:45 < manveru> why does it take Sortable when it casts to Person afterwards? 12:45 -!- nickaugust [~nickaugus@114.232.121.70.cfl.res.rr.com] has quit [Ping timeout: 245 seconds] 12:46 < napsy> because it has to implement my Sortable interface 12:47 < manveru> but it would give runtime errors when used on something else? 12:48 -!- nickaugust [~nickaugus@114.232.121.70.cfl.res.rr.com] has joined #go-nuts 12:48 < napsy> yes 12:48 < napsy> the Less method is only for the Person structure 12:48 < napsy> you cant compare two incompatible objects anyway 12:49 < manveru> ok, makes sense :) 12:49 < napsy> can't * 12:49 -!- wrtp [~rog@92.16.112.156] has joined #go-nuts 12:50 -!- sladegen [~nemo@unaffiliated/sladegen] has quit [Ping timeout: 245 seconds] 12:56 -!- ExtraSpice [~XtraSpice@88.118.32.225] has joined #go-nuts 12:56 -!- napsy [~luka@212.235.174.112] has quit [Read error: Operation timed out] 12:57 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 13:03 -!- ronnyy [~quassel@p4FF1D7E8.dip.t-dialin.net] has joined #go-nuts 13:16 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has joined #go-nuts 13:31 -!- roop [~roop@122.167.234.183] has quit [Ping timeout: 265 seconds] 13:45 -!- alvin-x [5d7ce22e@gateway/web/freenode/ip.93.124.226.46] has left #go-nuts [] 13:47 -!- path[l]_ [~path@59.162.86.164] has joined #go-nuts 13:48 -!- gr0gmint [~joebiden@87.60.23.38] has joined #go-nuts 13:50 -!- path[l] [~path@59.162.86.164] has quit [Ping timeout: 260 seconds] 13:53 -!- thiago__ [~thiago@189.107.227.111] has quit [Quit: bye] 14:03 -!- path[l] [~path@59.162.86.164] has quit [Remote host closed the connection] 14:04 -!- path[l] [~path@59.162.86.164] has joined #go-nuts 14:06 -!- lmoura [~lauromour@200.184.118.136] has quit [Ping timeout: 260 seconds] 14:06 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2] 14:07 -!- kashif [~kashif@imp050163.vpn.mi.fu-berlin.de] has joined #go-nuts 14:11 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 14:13 -!- kashif [~kashif@imp050163.vpn.mi.fu-berlin.de] has quit [Quit: Ex-Chat] 14:14 -!- 45PAAYNIV [~kashif@imp050163.vpn.mi.fu-berlin.de] has joined #go-nuts 14:15 -!- anym0us3_work [~Any@unaffiliated/anym0us3] has joined #go-nuts 14:15 -!- 45PAAYNIV [~kashif@imp050163.vpn.mi.fu-berlin.de] has quit [Client Quit] 14:16 -!- delroybrown [~kashif@imp050163.vpn.mi.fu-berlin.de] has joined #go-nuts 14:16 -!- delroybrown [~kashif@imp050163.vpn.mi.fu-berlin.de] has quit [Client Quit] 14:17 -!- delroybrown_ [~kashif@imp050163.vpn.mi.fu-berlin.de] has joined #go-nuts 14:17 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 14:18 -!- lmoura [~lauromour@200.184.118.130] has joined #go-nuts 14:18 -!- anym0us3_work [~Any@unaffiliated/anym0us3] has left #go-nuts ["Leaving"] 14:20 -!- delroybrown_ [~kashif@imp050163.vpn.mi.fu-berlin.de] has left #go-nuts [] 14:20 -!- delroybrown_ [~kashif@imp050163.vpn.mi.fu-berlin.de] has joined #go-nuts 14:22 -!- delroybrown_ [~kashif@imp050163.vpn.mi.fu-berlin.de] has quit [Remote host closed the connection] 14:27 -!- delroybrown [~kashif@imp050163.vpn.mi.fu-berlin.de] has joined #go-nuts 14:27 -!- delroybrown [~kashif@imp050163.vpn.mi.fu-berlin.de] has quit [Client Quit] 14:29 -!- delroybrown_ [~kashif@imp050163.vpn.mi.fu-berlin.de] has joined #go-nuts 14:29 -!- delroybrown_ [~kashif@imp050163.vpn.mi.fu-berlin.de] has left #go-nuts [] 14:29 -!- delroybrown_ [~kashif@imp050163.vpn.mi.fu-berlin.de] has joined #go-nuts 14:29 < delroybrown_> hello 14:29 < jessta> hello 14:30 < delroybrown_> was wondering if I can get some help with cgo 14:31 < delroybrown_> in particular if my C function takes an int pointer... 14:32 < exch> go ahead and ask. If someone can help, I'm sure they will 14:33 < delroybrown_> so I have: func DriverGetVersion(driverVersion *C.int) int { return int(C.cuDriverGetVersion(driverVersion)) } 14:33 -!- scm [justme@d135011.adsl.hansenet.de] has quit [Ping timeout: 260 seconds] 14:33 < delroybrown_> so now how do i go about testing this? 14:34 < delroybrown_> how can i declare a C pointer in my test.go? 14:35 < exch> With a function like that, you'll want to use Go types as parameters.. So *int instead of *C.int. Perform the conversions in the function itself 14:36 < exch> external packages/apps will not be able to deal with the C. bit 14:36 < delroybrown_> ah ok... 14:36 < exch> your test code can then simply pass the pointer to regular old go int and not have to worry about what goes on behind the scenes 14:37 < delroybrown_> yes i see 14:37 < delroybrown_> ok let me try that then... 14:38 < plexdev> http://is.gd/dYpkg by [Nigel Tao] in go/src/pkg/image/png/ -- image/png: use image-specific methods for checking opacity. 14:39 -!- roop [~roop@122.172.190.168] has joined #go-nuts 14:40 -!- awidegreen [~quassel@62.176.237.78] has joined #go-nuts 14:42 < delroybrown_> just trying to find how to to convert *int to *C.int ... 14:42 < exch> http://pastebin.com/g9vdNkE3 14:43 < delroybrown_> ah great thanks! 14:49 -!- nickaugust [~nickaugus@114.232.121.70.cfl.res.rr.com] has quit [Ping timeout: 265 seconds] 14:57 -!- anym0us3_work [~Any@unaffiliated/anym0us3] has joined #go-nuts 15:02 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 240 seconds] 15:02 -!- anym0us3_work [~Any@unaffiliated/anym0us3] has left #go-nuts ["Leaving"] 15:05 < delroybrown_> so the other question i have is regarding C enums... 15:06 < delroybrown_> my C function actually returns a CUresult cuDriverGetVersion(int *driverVersion); 15:07 < delroybrown_> where CUresult is an enum... typedef enum cudaError_enum {CUDA_SUCCESS = 0,...} CUresult; 15:08 < exch> That would just be an int or uint then 15:08 < delroybrown_> and I am just converting the the result to int in my go func... is this the correct way to do things... 15:08 < exch> yup 15:08 < delroybrown_> ok great 15:09 < exch> It's probably a good idea to check out some existing cgo prjects to get a feel for what's going on. Faster and probably clearer than explaining it over irc :) There's a few here http://go-lang.cat-v.org/library-bindings 15:09 < delroybrown_> BTW just working on getting cuda bindings for go 15:09 < delroybrown_> ok will have a look 15:09 -!- gid [~gid@220-253-29-69.VIC.netspace.net.au] has quit [Quit: Leaving.] 15:10 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts 15:10 < delroybrown_> thanks again for all the help 15:10 < exch> np 15:11 -!- mduft [~mduft@gentoo/developer/mduft] has quit [Remote host closed the connection] 15:13 -!- iant [~iant@62-20-124-50.customer.telia.com] has quit [Read error: Operation timed out] 15:24 -!- nickaugust [~nickaugus@rrcs-97-79-25-103.se.biz.rr.com] has joined #go-nuts 15:25 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 15:32 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has quit [Quit: skelterjohn] 15:33 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has quit [Quit: Leaving] 15:41 -!- delroybrown_ [~kashif@imp050163.vpn.mi.fu-berlin.de] has left #go-nuts ["Ex-Chat"] 15:43 -!- scm [justme@d135011.adsl.hansenet.de] has joined #go-nuts 15:49 -!- scm [justme@d135011.adsl.hansenet.de] has quit [Ping timeout: 252 seconds] 15:54 -!- daredavil [4eaddf9a@gateway/web/freenode/ip.78.173.223.154] has joined #go-nuts 16:02 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts 16:04 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 16:07 -!- roop [~roop@122.172.190.168] has quit [Ping timeout: 260 seconds] 16:07 < nickaugust> is there a way to scan into a StringVector? 16:10 -!- daredavil [4eaddf9a@gateway/web/freenode/ip.78.173.223.154] has quit [Ping timeout: 252 seconds] 16:12 < araujo> nickaugust, you mean ... ?? 16:13 -!- ikaros [~ikaros@188.107.218.71] has joined #go-nuts 16:13 -!- scm [justme@d165176.adsl.hansenet.de] has joined #go-nuts 16:17 -!- path[l]_ [~path@122.182.0.38] has joined #go-nuts 16:18 < nickaugust> araujo: "Scan: can't handle type: *vector.StringVector" 16:19 -!- roop [~roop@122.172.190.168] has joined #go-nuts 16:19 < jessta> nickaugust: yeah, you can't 16:19 < nickaugust> so i'm having to do like this: fmt.Scanln(&input[0], &input[1], &input[3], ...) 16:19 < nickaugust> when i dont know how many terms will be in the input from the user 16:20 -!- path[l] [~path@59.162.86.164] has quit [Ping timeout: 265 seconds] 16:20 < jessta> nickaugust: are they all strings? 16:21 < jessta> you could just read the the whole line and strings.Split() it 16:22 < nickaugust> so if the user only puts in less than the predefined number of search terms it sets err to "error: unexpected newline" and if they enter more than the predifned number it sets err to "error: expected newline". 16:22 < nickaugust> doesnt crash the program but still not very pretty 16:22 < nickaugust> yes all strings 16:22 < nickaugust> so im defining it as a [10]string 16:22 < nickaugust> and using fmt.Scanln() to get the input 16:23 < nickaugust> i wasnt able to make Scan() work so i'm assuming Scanln() is the proper way 16:23 < jessta> so, use bufio.ReadString('\n') instead 16:23 < nickaugust> jessta: ah, ok let me try that 16:23 < nickaugust> i didnt know about bufio 16:26 -!- path[l] [~path@122.182.0.38] has quit [Quit: path[l]] 16:28 -!- ronnyy [~quassel@p4FF1D7E8.dip.t-dialin.net] has quit [Remote host closed the connection] 16:28 -!- ronnyy [~quassel@p4FF1D7E8.dip.t-dialin.net] has joined #go-nuts 16:29 -!- path[l] [~path@59.162.86.164] has joined #go-nuts 16:30 -!- Sacho [~sacho@213.91.244.15] has quit [Ping timeout: 258 seconds] 16:32 -!- Fish [~Fish@9fans.fr] has joined #go-nuts 16:36 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts 16:38 -!- ronnyy [~quassel@p4FF1D7E8.dip.t-dialin.net] has quit [Remote host closed the connection] 16:41 -!- millertimek1a2m3 [~Adam@m395636d0.tmodns.net] has joined #go-nuts 16:41 < millertimek1a2m3> hey anyone there? 16:41 < millertimek1a2m3> let me know if you guys are receiving this 16:42 < exch> millertimek1a2m3: yup 16:42 < skelterjohn> your messages are getting through 16:42 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts 16:42 < millertimek1a2m3> ah! thanks for telling me. alright, so can anyone give me a breif description of how well the windows support is going? 16:43 < millertimek1a2m3> brief* 16:43 < millertimek1a2m3> as in, does it work, and work completely orno 16:43 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 16:43 < skelterjohn> i certainly cannot 16:43 < millertimek1a2m3> or no* 16:43 < skelterjohn> search the mailing list 16:43 -!- timmcd [~Timothy@174-23-142-201.slkc.qwest.net] has joined #go-nuts 16:43 < timmcd> Hey 16:43 < skelterjohn> hi 16:43 < millertimek1a2m3> yea... the last I saw about the gomingw in the mailing list was just a recent post on the new build... 16:44 < timmcd> Im trying to modify the 'go-readline' bindings, so that I can have access to the rl_reset_line_state() function in readline/readline.h 16:44 -!- sladegen [~nemo@unaffiliated/sladegen] has joined #go-nuts 16:44 < millertimek1a2m3> I'd really like to be able to develop go on both windows and linux 16:44 < skelterjohn> millertimek1a2m3: I bet if you tried what's available and wrote about your experience, it would help the people who are developing it a great deal 16:44 < smw> As far as I know, you would more be developing go on windows than your program 16:45 < millertimek1a2m3> skelterjohn: ok, i will :) 16:45 < smw> although I think they have made alot of progress 16:45 < timmcd> So, when I try: http://gist.github.com/504928 16:45 < timmcd> I get the error that is also in that gist 16:45 -!- hstimer [~hstimer@70.90.170.37] has joined #go-nuts 16:46 < timmcd> However, according to the gnu libreadline docs, rl_reset_line_state is in fact a function, and its found in readline/readline.h (which I include) via grep. 16:46 < smw> what command are you using to compile that program? 16:48 < timmcd> I'm just using the other guys Makefile (the one that came with go-readline) 16:48 < timmcd> If you look at the gist again, I posted a comment 16:48 < timmcd> showing the makefile 16:50 -!- Sacho [~sacho@95-42-108-60.btc-net.bg] has joined #go-nuts 16:50 < timmcd> http://gist.github.com/504928 tjere 16:50 < timmcd> *there 16:56 -!- path[l] [~path@59.162.86.164] has quit [Quit: path[l]] 16:56 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit: slashus2] 17:00 < timmcd> No idea? :( 17:02 -!- path[l] [~path@59.162.86.164] has joined #go-nuts 17:06 -!- timmcd [~Timothy@174-23-142-201.slkc.qwest.net] has quit [Quit: timmcd] 17:09 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 17:10 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 17:12 -!- timmcd [~Timothy@174-23-142-201.slkc.qwest.net] has joined #go-nuts 17:13 -!- Damn3d [damn3d@unaffiliated/morpheus/x-0931003] has quit [Quit: Shutting down.] 17:14 < timmcd> I'm trying to add onto the go-readline binding, but this function doesn't work. I get the error shown in the gist. Also, you can see the makefile used in the comments for the gist. http://gist.github.com/504928 17:14 -!- Damn3d [damn3d@bimbrownia.org] has joined #go-nuts 17:14 < timmcd> rl_reset_line_state is in fact a function in readline/readline.h (which I am including) 17:14 -!- Damn3d [damn3d@bimbrownia.org] has quit [Changing host] 17:14 -!- Damn3d [damn3d@unaffiliated/morpheus/x-0931003] has joined #go-nuts 17:15 -!- ikaros [~ikaros@188.107.218.71] has quit [Quit: Leave the magic to Houdini] 17:18 < wrtp> timmcd: my machine can't resolve gist.github.com. any chance of putting it on another server? 17:18 -!- path[l] [~path@59.162.86.164] has quit [Quit: path[l]] 17:19 < timmcd> Sure, uno momento por favor. 17:19 < timmcd> http://pastie.org/1071288 17:20 < timmcd> Thats the function I added onto the end of go-readline 17:20 < timmcd> (which just wraps readline() and add_history()) 17:21 < timmcd> Does that work for you? 17:21 -!- saschpe [~saschpe@mgdb-4d0cfab9.pool.mediaWays.net] has quit [Remote host closed the connection] 17:23 < wrtp> readline.h on this machine doesn't seem to have rl_reset_line_state 17:24 < wrtp> timmcd: have you checked that it exists on yours? 17:24 < skelterjohn> that would do it :) 17:24 < timmcd> Yeah, I have. 17:24 < wrtp> :-) 17:24 < timmcd> At least, it shows up to a grep xD 17:24 < wrtp> hmm, not here. 17:25 < skelterjohn> sometimes there can be multiple copies of a single header on a particular machine 17:25 < timmcd> extern int rl_reset_line_state PARAMS((void)); 17:25 < wrtp> the header says it's version 1.18 17:25 < timmcd> on line 372 17:25 < skelterjohn> maybe check that go isn't looking at a different version of the header 17:25 < timmcd> How would i do that? 17:26 < timmcd> (new to the whole compiler/linker scene, usually a scripting guy}) 17:26 < timmcd> I'm using Readline 6.0 17:26 < skelterjohn> not sure what the best way is, actually 17:26 < timmcd> sayeth the header 17:26 < wrtp> hmm, this readline doesn't mention PARAMS, and only has 207 lines 17:26 < timmcd> '#define RL_READLINE_VERSION 0x0600 /* Readline 6.0 */' 17:26 < skelterjohn> could try moving the header to somewhere else temporarily, and seeing if that breaks other stuff 17:27 < nickaugust> hm to define a new bufio.Reader i do this "var reader bufio.Reader" right? then the call is "input, err := reader.ReadString('\n')" but I get this runtime panic http://sprunge.us/jjGY 17:27 < nickaugust> "panic: runtime error: invalid memory address or nil pointer dereference" 17:27 < wrtp> looks like this is netbsd readline 17:27 < skelterjohn> nickaugust: bufio.Reader is an interface 17:27 < skelterjohn> you have to put something into it in order to read from it 17:28 < timmcd> nickaugust: try in := bufio.NewReader(os.Stdin); 17:28 < nickaugust> skelterjohn: ok thanks man i'll read more about interfaces. i think thats what im not understanding. 17:28 < timmcd> Thats what I've used before. THen: input, _ := in.ReadString('\n'); 17:28 < skelterjohn> nickaugust: for instance, what is your reader supposed to be reading from? 17:29 < nickaugust> just stdin 17:29 < skelterjohn> then you need to do what timmcd suggested 17:29 < timmcd> hmm 17:29 < nickaugust> im just trying to get some input from the user.. i tried using fmt.Scanln but that didnt work they way i wanted 17:29 < skelterjohn> because saying "var reader bufio.Reader" doesn't say anything about what you're reading from 17:29 < timmcd> It seems like this whole library is having an issue now 17:29 < timmcd> 'undefined _C_char' 17:29 < timmcd> from 17:29 < skelterjohn> a reader can be tied to a file, or stdin, or a network socket 17:30 < timmcd> var p *_C_char; 17:30 < nickaugust> skelterjohn: yeah i was thinking that... i thought it might default to stdin 17:30 < skelterjohn> nickaugust: sorry, nope :) it defaults to "nil", as your code indicates 17:30 < wrtp> timmcd: looks like rl_reset_line_state is non-portable. if you added it, then i wouldn't be able to use it on my machine... 17:30 < timmcd> Thats a shame. 17:30 < timmcd> See, the main problem is this: I'd like to have readline support (very nifty indeeed), minimum of just add_history and readline(), which I have. 17:31 < wrtp> skelterjohn: actually, it doesn't - nickaugust was using a value instance. it was probably an internal variable that was giving the panic 17:31 < timmcd> However, I am sending cursor movement terminal codes all over the place in order to get a decent interface for my MUD client 17:31 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts 17:31 < timmcd> and readline doesn't seem to like that very much xD 17:31 < skelterjohn> wrtp: you're right - i made a bad assumption 17:31 < wrtp> timmcd: ah i see. 17:32 < timmcd> To see the code I was using before: github.com/timmcd/goclient 17:32 < wrtp> your mud client is leaving the tty in a state that readline doesn't expect 17:32 < timmcd> http://github.com/timmcd/goclient 17:32 < skelterjohn> down with muds that have complex curses interfaces =p 17:32 < wrtp> +1 :-) 17:32 < wrtp> down with curses full stop. 17:33 < timmcd> Not using curses 17:33 < timmcd> Using codes such as '\x1B[52;1H' 17:33 < timmcd> and such 17:33 < skelterjohn> ok, down with terminals trying to be GUIs 17:33 < timmcd> lol 17:33 < timmcd> Well, im simply trying to emulate tintin++ 17:33 < wrtp> well, there's not much in the way of state in a tty. 17:34 < vrtical> wut, curses rocks! No one here is using a *graphical* IRC client are they? 17:34 < wrtp> just as long as you leave the cursor in the same place you should be ok 17:34 < timmcd> http://www.google.com/imgres?imgurl=http://i221.photobucket.com/albums/dd257/penquincoder/g1-tintin3.png&imgrefurl=http://forums.achaea.com/lofiversion/index.php/t38548.html&usg=__v0ALSAwrUxnYZ4ukCjOBbyvUb08=&h=320&w=480&sz=30&hl=en&start=0&tbnid=ZcrUNSuHS2bQHM:&tbnh=143&tbnw=215&prev=/images%3Fq%3Dtintin%252B%252B%26um%3D1%26hl%3Den%26client%3Dsafari%26sa%3DN%26rls%3Den%26biw%3D1086%26bih%3D872%26tbs%3Disch:10%2C21&um=1&itbs=1&iact=rc&dur=2 17:34 < timmcd> qwFXTJfOL9CDngfXnu3WBQ&page=1&ndsp=16&ved=1t:429,r:11,s:0&tx=71&ty=66&biw=1086&bih=872 like that, with the little split bar at the bottom 17:34 < timmcd> lol thats a huge link 17:34 < timmcd> sorry xD 17:34 < wrtp> vrtical: i haven't used a vt100 clone for years 17:35 < wrtp> big URL for tiny image! 17:38 < timmcd> So hmm 17:38 < timmcd> Does readline work well with ncurses/curses? Or is there a similar library that allows for nice movement (left-right arrows plus emacs-like movement) and history? 17:39 < nsf> timmcd: readline should work well with ncurses, but it depends on current terminal mode, etc. 17:40 < timmcd> mm 17:40 < timmcd> thanks 17:41 < nsf> unfortunatelly readline is the only library of that kind :( I wish there was a lib like readline but untied from input and output 17:41 < timmcd> yeah 17:43 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has joined #go-nuts 17:44 < nsf> btw 17:44 < nsf> curses sucks 17:44 < nsf> :) 17:44 < timmcd> xD 17:44 < timmcd> Well, what else do you suggest for a terminal-based mudclient? 17:44 < wrtp> timmcd: maybe you could use rl_forced_update_display 17:44 < timmcd> or writing a mudclient in Go at all? lol 17:44 < timmcd> wrtp: The plan of using reset_line_state 17:44 < nsf> http://code.google.com/p/termbox/ 17:44 < ptrb> timmcd: go has ncruses bindings that were recently updated 17:44 < timmcd> Was to reset the line when input came in 17:44 < timmcd> so it didn't get all garbled 17:44 < ptrb> oh, I did not read the history 17:44 < nsf> but this one won't work with readline at all 17:44 < timmcd> ptrb: I know, I updated them ;) 17:45 < ptrb> <- d'oh 17:45 < timmcd> lol 17:45 < nsf> and of course I'm suggesting it because I wrote it 17:45 < nsf> (has Go bindings) :D 17:45 < timmcd> lol 17:45 < timmcd> How difficult/easy would it be to implement my own text-editing nifties? 17:46 < timmcd> such as moving back and forth on the line with custom bindings 17:46 < ptrb> most curses UIs do it (in C[++]) with a little effort 17:46 < nsf> well termbox works as a dumb gui toolkit 17:46 < wrtp> nsf: how does termbox cope when the cursor has been moved without its knowledge? 17:46 < skelterjohn> timmcd: it's just a matter of sending the right character to the terminal, isn't it? 17:46 < wrtp> or does it always use absolute cursor positioning? 17:46 < nsf> it has event on input and you draw characters on the screen wherever you want 17:46 < nsf> you can as termbox to show cursor somewhere too 17:46 < nsf> or hide it 17:47 < nsf> ask* 17:47 < timmcd> hrm 17:47 < nsf> wrtp: it grabs terminal fully 17:47 < nsf> uses raw mode 17:47 < timmcd> Is it possible, then, to detect just when the user hits a combination of keys in the terminal (esp. with termbox?) 17:47 < timmcd> not just when they hit enter 17:47 < timmcd> ? 17:47 < wrtp> nsf: what happens if you wanna use it with readline? 17:47 < nsf> so you can't move cursor without termbox knowing that 17:47 < nsf> wrtp: I said earlier 17:47 < nsf> it won't work with readline 17:48 < nsf> timmcd: nope, but it's fairly easy to write that kind of thing 17:48 < nsf> especially in Go 17:48 < timmcd> Oh? How so? 17:48 < nsf> termbox is very dumb and small 17:48 < nsf> timmcd: use a buffer and a timer 17:48 < timmcd> it looks like your keyboard demo there (the screenshot atleast) captures key presses, not just on enter 17:48 < nsf> or what do you mean by combination? 17:48 < nsf> alt+ctrl+y? 17:48 < timmcd> as in, shift-k 17:49 < timmcd> ctrl-a 17:49 < timmcd> etc. 17:49 < nsf> terminal itself has a lot of problems with that 17:49 < nsf> you see it doesn't recognize key presses and such 17:49 -!- eikenberry [~jae@ivanova.zhar.net] has joined #go-nuts 17:49 < nsf> terminal works with stream of input characters 17:49 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts 17:49 < nsf> some of them form special sequences that can be recognized as weird combinations 17:49 < nsf> like shift+space 17:49 < nsf> but not all terminals support that 17:50 < timmcd> yeah 17:50 < wrtp> timmcd: basically, AFACS the answer is: character-addressing libraries don't combine well 17:50 < nsf> I have a file explaining what works with termbox 17:50 < nsf> one sec 17:50 < wrtp> s/AFACS/AFAICS/ 17:50 < nsf> http://github.com/nsf/termbox/blob/master/NOTES 17:50 < nsf> here it is 17:51 < nsf> I didn't go ncurses way (support everything and let user know if something is available or not) 17:51 < nsf> I've gathered major part of keys and combos that work on all popular terminals 17:52 < nsf> as well as displaying capabilites 17:52 < nsf> capabilities* 17:52 < nsf> and I think it's enough to build a good interface of any kind :) 17:52 < timmcd> Hmm 17:52 -!- path[l] [UPP@120.138.102.50] has quit [Read error: Connection reset by peer] 17:52 < timmcd> It looks like termbox does do what I was asking... tb_poll_event/peek_event? 17:52 < timmcd> They sit and wait for a keyboard event? 17:53 < Namegduf> Yes. 17:53 < nsf> yes 17:53 < timmcd> What I was asking is... is it possible to detect keypresses when they happen, not till they hit enter. 17:53 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts 17:53 < nsf> and check the go bindings 17:53 < nsf> http://github.com/nsf/termbox/blob/master/go/example.go 17:53 < nsf> you can do that in a separate goroutine actually 17:53 -!- photron [~photron@port-92-201-38-67.dynamic.qsc.de] has joined #go-nuts 17:53 < timmcd> Ok nice 17:53 < timmcd> termbox may actually be what I use. 17:54 < nsf> well it will be nice if it will work for you 17:54 < timmcd> Does it support scrolling text regions? 17:54 < nsf> it's not really a popular lib, so maybe it will have some issues 17:54 < nsf> like portability 17:54 < nsf> timmcd: nope 17:54 < timmcd> hrm 17:54 < timmcd> that could be an issue 17:54 < nsf> you'll have to implement it by yourself 17:55 < nsf> it's not that hard with fixed-width-character layout 17:55 < nsf> well.. and height :) 17:55 < timmcd> lol 17:56 < nsf> and frankly without having a notion of pixel at all 17:56 < nsf> :D 17:56 < nickaugust> what 'unicode codepoint' do i pass to strings.TrimRight() to trim new line char? I tried U+2028 and the string '\n\.. any ideas? 17:58 < nickaugust> thats "\n" not "\n\ of course :) 17:58 < nickaugust> oh nevermind "\n" does work. 17:58 < nsf> \n should work, but different OSes use different characters of newline 17:59 < nsf> like \r\n or simply \r 17:59 < nsf> ah.. ok :) 17:59 < nsf> the best part of utf-8 is that it is backwards compatible with ascii 17:59 -!- Fish [~Fish@9fans.fr] has quit [Ping timeout: 246 seconds] 18:00 < nickaugust> nsf: oh did you write termbox? i've been looking at that it seems much for fun than writing for ncurses! 18:00 < nsf> nickaugust: yep, it's me 18:00 < nsf> although I've never written any app with it 18:00 < timmcd> nsf: Would you say termbox is capable of writing a roguelike in? 18:00 < nsf> and I think I can't consider library as "done" if there is no app which uses that lib 18:01 < nsf> timmcd: sure, why not 18:01 < timmcd> nsf: groovy 18:01 < nickaugust> im all about the command line interfaces.. i usually just 'let it scroll' as they say because I never wanted to deal with ncurses.. so terbox is exciting 18:02 < nickaugust> xwindows, the framebuffer, ncurses... that stuffs so complicated 18:02 < nsf> nickaugust: not sure what you mean, but yeah, I like simplicity too 18:03 < nsf> in fact termbox is inspired (surprise!) by console window in MS Windows 18:03 < nsf> :) 18:03 < nickaugust> is there any framebuffer libs for go? 18:03 < nickaugust> ms windows yikes :P 18:03 < nsf> windows, yes.. but their console window API is very nice :) 18:04 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Quit: (◣_◢) BigBrowser is watching ⓎⓄⓊ] 18:06 -!- allengeorge [~allengeor@74.12.150.7] has joined #go-nuts 18:07 -!- allengeorge_ [~allengeor@74.12.150.7] has joined #go-nuts 18:07 -!- allengeorge [~allengeor@74.12.150.7] has quit [Read error: Connection reset by peer] 18:09 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has joined #go-nuts 18:09 -!- mode/#go-nuts [+v iant] by ChanServ 18:13 -!- Project_2501 [~Marvin@82.84.94.242] has joined #go-nuts 18:13 < nickaugust> ok sweet everying is working perfect and looking pretty with bufio instead of fmt.Scanln :) 18:13 < nickaugust> is there a way to watch for ^[[A, ect to load command history? 18:13 < nickaugust> err an input history 18:14 < nickaugust> however youd say 18:15 < timmcd> Readline ;) 18:15 -!- nekschot [bla@212-123-134-143.ip.telfort.nl] has joined #go-nuts 18:16 -!- Zombiecalypse [~Marvin@82.84.72.104] has quit [Ping timeout: 265 seconds] 18:16 < nickaugust> im reading like this reader.ReadString('\n')... which is watching for \n obviously... can I have multiple readers listining to stdin at the same time? 18:17 < nickaugust> maybe im getting ahead of myself 18:18 -!- Fish [~Fish@9fans.fr] has joined #go-nuts 18:19 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-159-77.clienti.tiscali.it] has joined #go-nuts 18:22 -!- Project_2501 [~Marvin@82.84.94.242] has quit [Ping timeout: 276 seconds] 18:25 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-157-148.clienti.tiscali.it] has joined #go-nuts 18:25 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has quit [Ping timeout: 260 seconds] 18:26 < skelterjohn> nickaugust: i think that having multiple readers on stdin is asking for trouble 18:27 < skelterjohn> if you want to split it, do so explicitly by having a single reader on stdin that will then do the splitting for the other things that want it 18:27 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 246 seconds] 18:28 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-159-77.clienti.tiscali.it] has quit [Ping timeout: 252 seconds] 18:30 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts 18:31 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-182-56.clienti.tiscali.it] has joined #go-nuts 18:31 < skelterjohn> for instance, the splitter could send every message to each of the recipients, or send each message to only one recipient, chosen by some method 18:32 < wrtp> nickaugust: you could easily create a function that takes a Reader and a Writer and returns a Reader. Every time data is read, it is also written to the Writer. 18:32 < wrtp> then you could create a Writer to do whatever you want with the data 18:32 < wrtp> look at io.MultiReader for inspiration 18:33 < skelterjohn> wrtp: did you ever have any luck with my os x/X11 issue? 18:33 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection] 18:33 < skelterjohn> it turns out it can be recreated with a two line program that just tries to call x11.NewWindow() 18:34 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-157-148.clienti.tiscali.it] has quit [Ping timeout: 245 seconds] 18:34 < skelterjohn> i created an issue, and they said that os X's x11 implementation is kinda janky (my words) and that if I find someone else with the problem i should re-open the issue 18:34 -!- alehorst [~alehorst@200.146.80.63.dynamic.adsl.gvt.net.br] has quit [Remote host closed the connection] 18:36 -!- alehorst [~alehorst@200.146.80.63.dynamic.adsl.gvt.net.br] has joined #go-nuts 18:36 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 18:37 -!- roop [~roop@122.172.190.168] has quit [Remote host closed the connection] 18:37 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-182-56.clienti.tiscali.it] has quit [Ping timeout: 260 seconds] 18:38 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has quit [Quit: Leaving.] 18:42 -!- timmcd [~Timothy@174-23-142-201.slkc.qwest.net] has quit [Quit: timmcd] 18:52 < nickaugust> how can I print columns that will line up correctly? i'm tyring to add '\t's with fmt.Printf but its not working out 18:52 < nickaugust> is there a package for printing columns or tables 18:52 < nickaugust> ? 18:52 < skelterjohn> fmt.Printf abides by all the width restrictions that the C function printf abides by 18:53 < nickaugust> skelterjohn: ok thx 18:53 < nickaugust> ill see if i can find some info on that 18:53 < skelterjohn> so you can specify the width of format parameters 18:53 < skelterjohn> something like %7d would be a digit taking up 7 spots 18:53 < skelterjohn> but it might not be that exactly 18:53 < skelterjohn> i don't have it committed to memory 18:54 < nickaugust> gotcha. thanks man 18:55 -!- ericvh [~ericvh@32.97.110.63] has joined #go-nuts 18:59 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts 19:00 -!- millertimek1a2m3 [~Adam@m395636d0.tmodns.net] has quit [Quit: Leaving.] 19:01 < KirkMcDonald> Does %*d work? 19:01 * KirkMcDonald checks. 19:02 < KirkMcDonald> Hmm, docs don't mention it. 19:07 < skelterjohn> works, though. just checked. 19:09 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 19:10 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 19:12 < nickaugust> ok this is looking sweet now :) is it simple to add color when printing to stdout? what should i research to do that? 19:12 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 19:13 < skelterjohn> http://lmgtfy.com/?q=terminal+color+codes :) 19:13 < nickaugust> skelterjohn: thx 19:13 * skelterjohn waits for it 19:14 < nickaugust> hehe 19:14 -!- quag [~quag@121-98-81-61.bitstream.orcon.net.nz] has joined #go-nuts 19:14 < nickaugust> i dont see any advertisments though because im using links2 :) 19:15 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 19:15 < skelterjohn> not sure what you're talking about with advertisments 19:15 < nickaugust> or js :/ but i get the point 19:15 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 19:15 < skelterjohn> ah 19:15 < nickaugust> oh 'let me google that for you'... hehe ive seen that before.. an animation of typing in the google box right? 19:16 -!- Paradox924X [~Paradox92@178.119.188.72.cfl.res.rr.com] has quit [Changing host] 19:16 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has joined #go-nuts 19:16 < nickaugust> hmm.. i dosnt even forward me to the google results. 19:16 < nickaugust> damnit skelterjohn 19:16 < nickaugust> i guess ill do it myself ;) 19:16 < skelterjohn> haha 19:18 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has joined #go-nuts 19:20 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 19:20 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 19:25 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts 19:25 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 19:27 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 19:30 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 19:30 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 19:35 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 19:35 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 19:40 < nickaugust> wrtp: ah thats a good idea. then i can monitor every keypress. thanks man! 19:40 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 19:41 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 19:42 < raylu> nickaugust: it does forward you to the google results after a bit 19:42 < skelterjohn> raylu: not if javascript is disabled 19:42 < raylu> oh =\ 19:45 < nickaugust> javascript. blah. 19:51 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has joined #go-nuts 19:51 -!- mode/#go-nuts [+v iant] by ChanServ 19:51 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 19:52 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 19:53 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has quit [Ping timeout: 240 seconds] 19:56 -!- artefon [~thiagon@150.164.2.20] has quit [Quit: Leaving] 19:56 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 19:56 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has quit [Ping timeout: 240 seconds] 19:57 -!- rlab_ [~Miranda@91.200.158.34] has joined #go-nuts 19:57 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 19:58 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 252 seconds] 19:59 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has joined #go-nuts 20:01 -!- hippondog [~user@unaffiliated/yesudeep] has joined #go-nuts 20:03 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts 20:05 -!- hippondog [~user@unaffiliated/yesudeep] has quit [Remote host closed the connection] 20:08 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2] 20:08 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 20:10 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 20:11 -!- bmizerany [~bmizerany@208.66.27.62] has joined #go-nuts 20:14 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 20:15 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 20:15 < nickaugust> how can I create a reader for stdin that will fire on every keypress rather than \n? 20:16 -!- ni| [~nil@users.vu.union.edu] has joined #go-nuts 20:17 -!- rlab_ [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org] 20:17 < nickaugust> or does it not work like that 20:17 < skelterjohn> os.stdin is an instance of *os.File, which a receiver to a method "func (file *File) Read(b []byte) (n int, err Error)" 20:18 < skelterjohn> if you pass it a byte slice with length 1, maybe it would read one byte 20:18 < skelterjohn> i haven't tried this 20:18 < nickaugust> hm i'll try that 20:19 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 20:19 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 20:21 < skelterjohn> i'm interested to know if that works like you want 20:24 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 20:25 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 20:35 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 240 seconds] 20:36 -!- ni| [~nil@users.vu.union.edu] has left #go-nuts [] 20:36 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 20:38 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 20:39 -!- Daryonius [~david@dslb-088-066-052-201.pools.arcor-ip.net] has joined #go-nuts 20:40 < nickaugust> skelterjohn: hm it looks like it might work but it doesnt pause and wait for the input 20:41 -!- Daryonius [~david@dslb-088-066-052-201.pools.arcor-ip.net] has quit [Client Quit] 20:41 < skelterjohn> so it will return (0, nil) many times? 20:42 -!- Daryonius [~david@dslb-088-066-052-201.pools.arcor-ip.net] has joined #go-nuts 20:42 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 20:42 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 20:42 -!- Daryonius [~david@dslb-088-066-052-201.pools.arcor-ip.net] has quit [Remote host closed the connection] 20:43 -!- iant1 [~iant@81-233-149-58-no82.tbcn.telia.com] has joined #go-nuts 20:43 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has quit [Read error: Connection reset by peer] 20:44 < nickaugust> its hard to tell.. it actually prints %v 20:44 -!- Daryonius [~david@dslb-088-066-052-201.pools.arcor-ip.net] has joined #go-nuts 20:44 < nickaugust> EOF0 20:44 < nickaugust> %v then EOF0 on a newline 20:44 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 20:44 < skelterjohn> that doesn't make sense to me 20:45 < skelterjohn> calling .Read causes EOF0 to be printed? 20:45 < nickaugust> hehe.. hold on let me look closer 20:46 -!- Bartorynard [~Adium@dslb-088-066-052-201.pools.arcor-ip.net] has joined #go-nuts 20:46 < skelterjohn> are you writing: fmt.Printf("%v", stdin.Read(myBuffer)) 20:46 < nickaugust> maybe thats my error catch screwing up. im calling os.Stdin.Read(arrayOfOne)... 20:46 < skelterjohn> because stdin.Read has a multiple return value 20:47 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 20:48 -!- angasule [c80571ea@gateway/web/freenode/ip.200.5.113.234] has quit [Quit: Page closed] 20:48 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 20:48 -!- ShadowIce` [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 20:48 < nickaugust> skelterjohn: yeah i was doing this: if input_int, err = os.Stdin.Read(arrayOfOne); err != nil { 20:49 -!- Bartorynard [~Adium@dslb-088-066-052-201.pools.arcor-ip.net] has quit [Client Quit] 20:49 < nickaugust> but then i think my error handling is not right 20:49 < nickaugust> fmt.Fprint(os.Stderr, "%v\n", err) 20:49 < nickaugust> i think thats where that %v is coming from 20:49 -!- Bartorynard [~Adium@dslb-088-066-052-201.pools.arcor-ip.net] has joined #go-nuts 20:49 -!- ShadowIce_ [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 20:49 < skelterjohn> Fprintf is what you need, maybe 20:50 < skelterjohn> instead of Fprint 20:50 < skelterjohn> the last 'f' is for 'formatted' 20:50 -!- Bartorynard [~Adium@dslb-088-066-052-201.pools.arcor-ip.net] has quit [Client Quit] 20:51 -!- Daryonius [~david@dslb-088-066-052-201.pools.arcor-ip.net] has quit [Quit: Daryonius] 20:51 < nickaugust> see if I add os.Exit(1) to the error catching it just prints: Contact Search: %v and then exits 20:51 < nickaugust> let met try Fprintf 20:51 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Ping timeout: 265 seconds] 20:52 -!- Bartorynard [~Adium@dslb-088-066-052-201.pools.arcor-ip.net] has joined #go-nuts 20:52 < nickaugust> just by replacing Fprint with Fprintf I get: "Contact Search: EOF " and then exits 20:52 -!- Bartorynard [~Adium@dslb-088-066-052-201.pools.arcor-ip.net] has left #go-nuts [] 20:53 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 20:53 < skelterjohn> then stdin gave you an eof for whatever reason 20:53 -!- ShadowIce` [~pyoro@unaffiliated/shadowice-x841044] has quit [Ping timeout: 245 seconds] 20:53 < nickaugust> yeah so its returning error: EOF 20:53 < skelterjohn> (end of file). it's telling you there is no more data to read in stdin 20:54 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts 20:54 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 20:54 < nickaugust> yeah... i need it to pause so i can give it some! 20:54 < nickaugust> bloody thing :) 20:54 < skelterjohn> not sure what the best way is to do this 20:54 < skelterjohn> busy waiting is bad form 20:54 < nickaugust> yeah 20:55 < skelterjohn> maybe someone else in the channel will have a suggestion. 20:55 < nickaugust> hmm ok i'm going to play with this some more in the mean time 20:55 < nickaugust> skelterjohn: thanks for all your help 20:55 < skelterjohn> my pleasure 20:55 < skelterjohn> takes my mind off of grading this very large pile of stupid in front of me 20:55 -!- iant1 [~iant@81-233-149-58-no82.tbcn.telia.com] has quit [Quit: Leaving.] 20:55 < skelterjohn> ie undergrad midterms 20:57 < nickaugust> ah youre a prof?? computer sciences? 20:58 < skelterjohn> grad student 20:58 < skelterjohn> profs don't grade midterms here ;) 20:58 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 20:58 -!- gr0gmint [~joebiden@87.60.23.38] has quit [Quit: leaving] 20:58 < nickaugust> aaah :) 20:59 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 20:59 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Quit: (◣_◢) BigBrowser is watching ⓎⓄⓊ] 21:00 -!- Heronyus [~david@dslb-088-066-052-201.pools.arcor-ip.net] has joined #go-nuts 21:01 -!- Heronyus [~david@dslb-088-066-052-201.pools.arcor-ip.net] has quit [Client Quit] 21:01 -!- cbt [~nil@users.vu.union.edu] has joined #go-nuts 21:01 -!- Daryonius [~david@dslb-088-066-052-201.pools.arcor-ip.net] has joined #go-nuts 21:03 -!- Daryonius [~david@dslb-088-066-052-201.pools.arcor-ip.net] has quit [Client Quit] 21:03 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has quit [Quit: Morten. Desu~] 21:04 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 21:04 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 21:08 -!- ronnyy [~quassel@p4FF1D7E8.dip.t-dialin.net] has joined #go-nuts 21:09 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 21:10 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 21:10 < nickaugust> yeah it would also be nice to watch for \t to do autocompletion 21:10 < nickaugust> and ^[[ for history 21:15 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 21:15 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 21:19 -!- ckennelly [~ckennelly@beryllium.caltech.edu] has left #go-nuts [] 21:19 -!- ckennelly [~ckennelly@beryllium.caltech.edu] has joined #go-nuts 21:21 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 21:21 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 21:24 -!- gnuvince [~vince@70.35.168.119] has quit [Quit: Lost terminal] 21:26 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 21:26 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 21:31 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 21:33 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 21:37 -!- gnuvince [~vince@70.35.168.119] has joined #go-nuts 21:38 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 21:38 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 21:41 -!- qIIp [~qIIp@134.29.57.70] has joined #go-nuts 21:43 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit: slashus2] 21:43 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 21:44 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 21:44 -!- ShadowIce_ [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit: Verlassend] 21:46 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 21:48 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 21:48 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 21:52 -!- ericvh [~ericvh@32.97.110.63] has quit [Quit: ericvh] 21:54 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has quit [Quit: carllerche] 22:00 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 22:02 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 22:05 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 22:06 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 22:10 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 22:10 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 22:18 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 22:18 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 22:18 < plexdev> http://is.gd/dZ24N by [Rob Pike] in go/src/pkg/io/ -- io: consolidate multi_reader and multi_writer into a single file, multi.go 22:20 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 22:23 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 22:26 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 22:27 -!- ptimothyp [~timothy@203.17.221.171] has joined #go-nuts 22:27 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 22:30 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection] 22:31 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 22:31 -!- awidegreen [~quassel@62.176.237.78] has quit [Remote host closed the connection] 22:32 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed the connection] 22:34 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 22:39 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 22:40 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 22:41 -!- ZincSaucier [~quassel@c-76-126-34-217.hsd1.ca.comcast.net] has quit [Ping timeout: 240 seconds] 22:42 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has joined #go-nuts 22:46 -!- wrtp [~rog@92.16.112.156] has quit [Quit: wrtp] 22:46 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 22:49 -!- ZincSaucier [~quassel@c-76-126-34-217.hsd1.ca.comcast.net] has joined #go-nuts 22:49 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 22:49 -!- rbraley [~rbraley@ip72-222-128-78.ph.ph.cox.net] has joined #go-nuts 22:49 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 260 seconds] 22:49 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 22:51 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 22:56 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 22:58 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 22:59 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 23:03 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 23:03 -!- ZincSaucier_ [~quassel@c-76-126-34-217.hsd1.ca.comcast.net] has joined #go-nuts 23:03 -!- ZincSaucier [~quassel@c-76-126-34-217.hsd1.ca.comcast.net] has quit [Ping timeout: 240 seconds] 23:04 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 23:07 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has quit [Ping timeout: 248 seconds] 23:08 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 23:08 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 23:08 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts 23:10 -!- nickaugust [~nickaugus@rrcs-97-79-25-103.se.biz.rr.com] has quit [Quit: WeeChat 0.2.6] 23:13 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 23:14 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 23:18 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 23:19 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 23:22 -!- path[l] [UPP@120.138.102.50] has quit [Quit: path[l]] 23:23 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 23:23 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 23:23 -!- aho [~nya@fuld-4d00d166.pool.mediaWays.net] has joined #go-nuts 23:31 -!- dju [dju@fsf/member/dju] has quit [Quit: Quitte] 23:33 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 23:33 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 23:35 -!- cbt [~nil@users.vu.union.edu] has left #go-nuts [] 23:37 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org] 23:38 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts 23:38 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 23:40 -!- ronnyy [~quassel@p4FF1D7E8.dip.t-dialin.net] has quit [Remote host closed the connection] 23:40 -!- dju [dju@fsf/member/dju] has joined #go-nuts 23:42 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 23:43 -!- dju [dju@fsf/member/dju] has quit [Max SendQ exceeded] 23:44 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 23:44 -!- dju [dju@fsf/member/dju] has joined #go-nuts 23:44 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Ping timeout: 240 seconds] 23:44 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 23:45 -!- artefon [~thiago@189.107.227.111] has joined #go-nuts 23:49 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 23:51 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has quit [Read error: Connection reset by peer] 23:52 -!- photron [~photron@port-92-201-38-67.dynamic.qsc.de] has quit [Ping timeout: 276 seconds] 23:52 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 245 seconds] 23:54 -!- ampleyfly [~ampleyfly@h-148-139.A163.priv.bahnhof.se] has joined #go-nuts 23:59 -!- qIIp [~qIIp@134.29.57.70] has quit [Quit: Lost terminal] --- Log closed Tue Aug 03 00:00:00 2010