--- Log opened Sun Mar 27 00:00:50 2011 00:11 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com] has joined #go-nuts 00:11 -!- crawshaw [~crawshaw@216.239.45.130] has quit [Quit: crawshaw] 00:23 -!- tav [~tav@92.7.141.101] has quit [Quit: Hakuna Matata] 00:24 -!- tav [~tav@92.7.141.101] has joined #go-nuts 00:39 -!- zimsim [~simon@87.72.77.195] has quit [Remote host closed the connection] 00:48 -!- thebarberian [~Master_Co@216.252.79.105] has joined #go-nuts 00:48 -!- dju_ [dju@fsf/member/dju] has joined #go-nuts 00:48 < thebarberian> Anyone know if gccgo is worth the compilation time? Is it faster? What are the benefits? 00:49 -!- dju [dju@fsf/member/dju] has quit [Ping timeout: 246 seconds] 00:49 -!- dju__ [dju@fsf/member/dju] has joined #go-nuts 00:53 -!- dju_ [dju@fsf/member/dju] has quit [Ping timeout: 276 seconds] 00:53 < str1ngs> thebarberian: gccgo makes for smaller binaries 00:55 < str1ngs> and I would guess somethings would be better optimized 00:55 -!- wrtp [~rog@92.17.50.183] has quit [Quit: wrtp] 01:06 -!- rtharper [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed the connection] 01:06 < thebarberian> interesting... 01:12 < |Craig|> I believe gccgo handles go routines a bit different leading to some things being slower, and some being faster, but I havent tried it 01:13 < thebarberian> well hopefully in a few hours I will have it compiled and will try it... 01:13 < thebarberian> will try to compare afterwards and publish some benchmarks perhaps... 01:21 < str1ngs> thebarberian: I have played with gccgo some, not as much as I would like. something I noticed is when compiling multiple *.go files seems to have trouble. if you have a monolithic main.go seems ok 01:21 < str1ngs> however I'm sure this is more my issue, but I have not looked into enough 01:28 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-151-145.clienti.tiscali.it] has quit [Quit: E se abbasso questa leva che succ...] 01:29 -!- GoBIR [~gobir@c-24-130-224-186.hsd1.ca.comcast.net] has quit [Ping timeout: 246 seconds] 01:34 < str1ngs> I've made a .tar.gz and .tar.bz2 decompression https://gist.github.com/888816 . testGz and testBz are basically the same function. I would like to abstract this. but gzip.NewReader returns multiple where as bzip.NewReader does 01:34 < thebarberian> I can't even get the compiler working yet 01:34 < str1ngs> whould I pass a io.Reader to the function then type assert it? 01:34 < thebarberian> just failed 30min in the compile 01:35 < str1ngs> thebarberian: did you follow the gccgo instructions? 01:35 < thebarberian> of course! 01:35 < str1ngs> what error did you get 01:36 -!- GoBIR [~gobir@c-24-130-224-186.hsd1.ca.comcast.net] has joined #go-nuts 01:36 < thebarberian> configure-stage1-target-libgcc... 01:36 < str1ngs> if its a long error messge log maybe pastebin it 01:36 < thebarberian> checking for suffix of object files... 01:37 < thebarberian> good one one sec 01:39 < thebarberian> pastebin.com/05f7X4x5 01:39 -!- ajstarks [~ajstarks@pool-98-109-198-180.nwrknj.fios.verizon.net] has joined #go-nuts 01:40 < thebarberian> pastebin.com/05f7X4x5 01:42 < |Craig|> different error, but same outcome as when I tried to compile gcc go for mac. Failed 30 min in or so. I never did get it to work, but I didn't try too hard 01:42 < thebarberian> I am very close to taking the same decision branch as you 01:44 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Quit: Leaving.] 01:45 < str1ngs> /home/grafa/projects/objdir/x86_64-unknown-linux-gnu/libgcc should be a config.log file can you pastebin that? 01:46 < thebarberian> absolutely 01:47 -!- GoBIR [~gobir@c-24-130-224-186.hsd1.ca.comcast.net] has quit [Ping timeout: 252 seconds] 01:47 -!- boscop [~boscop@g230099063.adsl.alicedsl.de] has quit [Ping timeout: 250 seconds] 01:49 < thebarberian> pastebin.com/kHKxXixq 01:50 < thebarberian> could it be something as simple as arch/os definition? 01:55 < str1ngs> one sec let me check that log 01:56 < str1ngs> error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory 01:56 < str1ngs> what linux distro are you using? 01:58 < thebarberian> ubuntu 01:58 < thebarberian> that's strange... 01:58 < thebarberian> I definitely installed it 01:59 < thebarberian> gotta see if it's looking in the right place... 01:59 < str1ngs> you might need to install limpc-dev and gpmp-dev 01:59 < str1ngs> err gmp 01:59 < thebarberian> I definitely have libgmp-dev 02:00 < str1ngs> the names I'm just guessing you get the idea though 02:00 < thebarberian> and compiled the new one from scratch just before 5.something 02:00 < thebarberian> yeah.. 02:00 < str1ngs> if you still have problems you can overlay them into the gcc dir 02:01 < thebarberian> actually the configure was failing and then I installed the all 3 possible libs gmp mpc and some other one 02:01 < str1ngs> but try to avoid that and use your distro's dev packages 02:01 -!- echosystm [~echosystm@unaffiliated/echosystm] has joined #go-nuts 02:01 < str1ngs> also are you building gcc out side of the source tree? 02:01 < thebarberian> I will give it another try in a bit 02:02 < thebarberian> yes 02:02 < str1ngs> kk 02:02 < thebarberian> just like the gccgo_install.html says 02:02 < str1ngs> I would now that you have those headers etc. clean that build dir and start again 02:02 < thebarberian> ok thanks 02:03 < str1ngs> if you still have problems find the config.log and see what errors it fails with 02:03 < thebarberian> yeah good point 02:03 < echosystm> what exactly is the license for go? 02:04 < thebarberian> I gotta dash now but I will try it again in a few hours... 02:04 < str1ngs> I think there might have been some config cacheing from before you install mpc headers 02:04 < echosystm> i read "bsd-like", but what does that actually mean? 02:04 < thebarberian> oh....! 02:04 < thebarberian> that makes sense 02:04 < str1ngs> echosystm: bsd simplified iirc 02:04 < thebarberian> I will just delete and start again 02:04 < echosystm> is there a patent grant? 02:04 < thebarberian> thanks str1ngs 02:04 < str1ngs> thebarberian: np 02:05 < str1ngs> echosystm: see PATENTS in the go root 02:06 < echosystm> is there some equivalent of cpan/rubygems/pypi for go? 02:06 < str1ngs> yes goinstall 02:06 < echosystm> ok, thanks 02:07 < str1ngs> its still work in progress but its getting there 02:09 -!- aho [~nya@fuld-590c7df1.pool.mediaWays.net] has joined #go-nuts 02:14 -!- l00t [~i-i3id3r_@189.105.32.98] has joined #go-nuts 02:22 -!- echosystm [~echosystm@unaffiliated/echosystm] has left #go-nuts [] 02:31 -!- MX80 [~MX80@cust151.253.117.74.dsl.g3telecom.net] has quit [Read error: Operation timed out] 02:32 -!- MX80 [~MX80@cust151.253.117.74.dsl.g3telecom.net] has joined #go-nuts 02:32 -!- pothos_ [~pothos@111-240-167-52.dynamic.hinet.net] has joined #go-nuts 02:33 -!- hypertux [~hypertux@vps1.joelegasse.com] has quit [Read error: Operation timed out] 02:33 -!- hypertux [~hypertux@vps1.joelegasse.com] has joined #go-nuts 02:33 -!- pothos [~pothos@111-240-167-52.dynamic.hinet.net] has quit [Read error: Operation timed out] 02:38 -!- shvntr [~shvntr@116.26.134.53] has joined #go-nuts 03:11 -!- foocraft [~dsc@78.101.95.201] has quit [Read error: Connection reset by peer] 03:15 -!- ajstarks [~ajstarks@pool-98-109-198-180.nwrknj.fios.verizon.net] has left #go-nuts [] 03:16 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit: Verlassend] 03:23 -!- Stiletto [7f000001@69.195.144.4] has quit [Ping timeout: 240 seconds] 03:24 -!- Stiletto [7f000001@69.195.144.4] has joined #go-nuts 03:34 -!- Stiletto [7f000001@69.195.144.4] has quit [Ping timeout: 264 seconds] 03:34 -!- Stiletto [7f000001@69.195.144.4] has joined #go-nuts 03:39 -!- quotemstr [~quotemstr@173.224.210.52] has joined #go-nuts 03:39 < quotemstr> Err --- how is panic/recover any different from try/catch? 03:40 < Namegduf> quotemstr: It doesn't require special syntax, and it is considered equivalent to a crash to let a panic escape a package, so you can rely on not having to deal with unknown panics in other people's code- they're only in a package if that package is using them, and only so far as it does use them. 03:41 < quotemstr> Aside from the syntax bit (which reminds me more of Perl's die mechanism and setjmp), that's still not any different. 03:42 < Namegduf> Yes, aside from the part that IS the language, the language isn't any different. 03:42 < Namegduf> Also aside from the colour blue is pretty much the same as red. 03:42 < quotemstr> The semantics are the same though: the stack is unwound and cleanup functions (derferred ones in Go's case) are run. 03:43 < Namegduf> Yes. 03:43 < quotemstr> So why not use the terminology most other people use? 03:43 < Namegduf> Because Go would be using it differently. 03:43 < Namegduf> The syntax would be different and the idiomatically correct times and ways to use it are different. 03:44 < quotemstr> So when would you prefer to use panic instead of a return code? 03:44 < Namegduf> NEVER, in a public API. 03:44 < Namegduf> Internally, you would often use it to abort something complex, like parsing. 03:44 < Namegduf> And catch it at the top level, where you return an error. 03:44 < quotemstr> Sounds just like the way I use C++ exceptions. 03:45 < quotemstr> Exceptions shall not cross library boundaries. 03:45 < Namegduf> That's reasonable. Unfortunately, it isn't what exceptions mean in many other languages. 03:45 < Namegduf> And a lot of people would get confused. 03:45 < Namegduf> It also doesn't have special syntax like most other things called exceptions, and people would expect the syntax to look similar. 03:45 < quotemstr> You could have used setjmp and longjmp then. 03:46 < str1ngs> Namegduf: you are saying that all public api's should handle panics? where need 03:46 < Namegduf> It doesn't behave like those, either. 03:46 < Namegduf> Those don't unwind the stack. 03:46 < Namegduf> recover() also allows catching things which aren't manually initiated with a panic() 03:46 < quotemstr> Namegduf: They do on some platforms. :) But that's beside the point. I see what you mean. 03:46 < Namegduf> You can catch nil pointer dereferences 03:46 < Namegduf> Or array indexing faults 03:47 < Namegduf> THe other case to use recover() is where it isn't expressly paired with a panic(), and that's to catch errors resulting from programmer errors and stop them going any further. 03:48 < Namegduf> Similar to the way you'd have something catching "any exception" in Java or Python or whatever. 03:48 < Namegduf> Perhaps in a client connection handler or something. 03:49 < Namegduf> Defensive; if they do figure out how to crash your code somehow, all it does is abort their thing unless they manage to corrupt state elsewhere. 03:50 < quotemstr> COM does something similar by default for RPC servers. 03:50 < quotemstr> If some component dies horribly, COM catches it and just returns E_FAIL or somesuch. 03:50 < Namegduf> Yeah, you can do that. 03:50 < Namegduf> recover() is nice and general enough to cover that case, too. 03:50 * quotemstr is not in favor of that approach. 03:50 < Namegduf> And the name makes sense. 03:50 < quotemstr> It puts components into states they don't expect. 03:51 < Namegduf> Yeah, it's not perfect.. 03:51 < quotemstr> Does Go have lexical closures? 03:51 < Namegduf> Closures which can access variables in the outside function? Yes. 03:53 < quotemstr> e.g., in JavaScript, function() { var x = 4; return function() { return ++x; }; }; 03:53 < Namegduf> str1ngs: http://golang.org/doc/effective_go.html#panic 03:53 < Namegduf> str1ngs: It emphasises that panic() is "taking down the whole program" 03:53 < Namegduf> And discusses various cases (init issues) where that's appropriate 03:54 < Namegduf> The next section discusses recover() and has an example function. 03:54 < Namegduf> Which uses it internally. 03:54 < Namegduf> Then goes on to say: "Useful though this pattern is, it should be used only within a package. Parse turns its internal panic calls into os.Error values; it does not expose panics to its client. That is a good rule to follow." 03:55 < str1ngs> ah ok 03:55 < str1ngs> so the idea is a package will never stop another calling cmd or pkg 03:55 < Namegduf> When you are writing a package 03:55 < Namegduf> You only ever have to worry about panics you put there 03:56 < Namegduf> In *that* package 03:56 < str1ngs> ok gotcha 03:56 < quotemstr> Assuming everyone follows the convention. 03:56 -!- st-6308 [foobar@92.250.11.202] has joined #go-nuts 03:56 < Namegduf> If they break the convention, "their code crashes". 03:57 < Namegduf> People can write crashy code if they like, but it won't be very liked 03:57 < Namegduf> I don't think it's a real issue. 03:57 < Namegduf> It is a valid point, though. 03:58 < str1ngs> I really need to look into this some more. I have one cgo package. that I should make sure handles this 03:58 < Namegduf> Most of the time, you get the "unwind stack" ability to deal with throwing things up many levels, but don't get the horrible cost of dealing with random exceptions being thrown by everything. 03:58 < Namegduf> Well, if you don't panic() explicitly 03:58 < str1ngs> even more so due to the C pointers 03:59 < quotemstr> Well, a library author could just declade that errors are propagated via panic. 03:59 < quotemstr> Sure, that might give some people the vapors, but it'd work, yes? 03:59 < Namegduf> Then a panic() which goes up through your package is actually a programmer error and a crash 03:59 < Namegduf> They could, but it'd be bad. 03:59 < quotemstr> I never bought the argument that exceptions were bad things to be avoided at all costs. 03:59 < Namegduf> Then their users would need to deal with tracking pancis originating from foreign code. 03:59 < quotemstr> If throwing is expensive, fix throwing. Don't blame the feature. 04:00 < Namegduf> It isn't a matter of cost, it's a matter of safety. 04:00 < cbeck> It's not as simple as 'fix' throwing. There are engineering tradeoffs to be made 04:01 < Namegduf> You can add checked exceptions ala Java 04:01 < Namegduf> But those are painful 04:01 < cbeck> I mean the underlying mechanism 04:01 < Namegduf> quotemstr: The problem is that panics() are not part of the signature, and documentation on panics() it can generate is not compile-time checkd 04:02 < Namegduf> A mistake in ensuring all panics thrown up past an API will result in a crash and none of it is possible to verify. 04:02 < Namegduf> *past an API are handled 04:03 < Namegduf> Thus the trivial solution is to say that APIs do not panic() on purpose, ever 04:04 < Namegduf> Which cuts the problem of tracking all possible cases where a panic() is manually generated which should be caught, and a recover() exists to catch them, into a single package 04:04 < Namegduf> Which should be small enough for a human brain to handle okay. 04:05 < Namegduf> You *can* ignore it, but it's like taking interface{} parameters and then using reflect to figure out what they are, except there's actually uses for that. 04:05 < Namegduf> You're losing compile-time checking and a bunch of safety. 04:05 < Namegduf> Regardless of speed considerations. 04:06 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 04:07 -!- bpalmer` [~user@adsl-69-232-221-158.dsl.pltn13.pacbell.net] has joined #go-nuts 04:12 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 246 seconds] 04:18 -!- nettok [~quassel@200.119.190.184] has joined #go-nuts 04:23 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4] 04:23 -!- bugQ [~bug@c-67-171-127-76.hsd1.ut.comcast.net] has quit [Quit: but don't be sad.] 04:30 -!- st-6308 [foobar@92.250.11.202] has quit [Remote host closed the connection] 04:33 -!- st-6519 [foobar@92.250.11.202] has joined #go-nuts 04:36 -!- st-6519 [foobar@92.250.11.202] has quit [Remote host closed the connection] 04:40 -!- kanru [~kanru@kanru-1-pt.tunnel.tserv15.lax1.ipv6.he.net] has joined #go-nuts 04:47 -!- nettok [~quassel@200.119.190.184] has quit [Ping timeout: 248 seconds] 04:48 -!- iant [~iant@216.239.45.130] has joined #go-nuts 04:48 -!- mode/#go-nuts [+v iant] by ChanServ 04:55 < steven> <3 04:56 -!- yihuang [~yihuang@183.17.204.27] has joined #go-nuts 04:56 -!- yihuang [~yihuang@183.17.204.27] has left #go-nuts [] 05:01 -!- foocraft [~dsc@dyn-86-36-41-37.wv.qatar.cmu.edu] has joined #go-nuts 05:04 < str1ngs> my awesome tarball extractor https://gist.github.com/888927 05:07 < quotemstr> Namegduf: Fair enough. Not that it matters --- these days, I'm writing a lot of elisp and C, both of which are primitive in their own way. 05:07 < quotemstr> Night. 05:10 -!- pilgrum [~pilgrum@cpe-67-49-71-222.socal.res.rr.com] has joined #go-nuts 05:30 -!- krutcha1 [~krutcha@S010600045a27676a.vs.shawcable.net] has joined #go-nuts 05:31 -!- quotemstr [~quotemstr@173.224.210.52] has left #go-nuts [] 05:37 -!- foocraft [~dsc@dyn-86-36-41-37.wv.qatar.cmu.edu] has quit [Remote host closed the connection] 06:02 -!- pphalen [~patrick@66.92.11.149] has joined #go-nuts 06:09 -!- pphalen [~patrick@66.92.11.149] has left #go-nuts [] 06:15 -!- ExtraSpice [XtraSpice@88.118.35.153] has joined #go-nuts 06:26 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 06:31 -!- photron [~photron@port-92-201-133-223.dynamic.qsc.de] has joined #go-nuts 06:37 -!- aho [~nya@fuld-590c7df1.pool.mediaWays.net] has quit [Quit: EXEC_over.METHOD_SUBLIMATION] 06:39 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 246 seconds] 06:41 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined #go-nuts 06:47 -!- pilgrum [~pilgrum@cpe-67-49-71-222.socal.res.rr.com] has quit [Ping timeout: 240 seconds] 06:57 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts 06:57 -!- mode/#go-nuts [+v iant] by ChanServ 07:03 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|] 07:29 -!- tensorpudding [~user@99.148.205.193] has quit [Remote host closed the connection] 07:34 -!- ronnyy [~quassel@p4FF1C0A2.dip0.t-ipconnect.de] has joined #go-nuts 07:51 -!- huin [~huin@91.85.185.181] has joined #go-nuts 07:52 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se] has quit [Ping timeout: 240 seconds] 07:55 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se] has joined #go-nuts 07:55 -!- tensai_cirno [~cirno@77.232.15.216] has quit [Ping timeout: 246 seconds] 08:02 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se] has quit [Quit: No Ping reply in 180 seconds.] 08:02 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se] has joined #go-nuts 08:06 -!- tobier [~tobier@c-1e9de055.712-1-64736c11.cust.bredbandsbolaget.se] has quit [Read error: Operation timed out] 08:07 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se] has quit [Ping timeout: 250 seconds] 08:08 -!- tobier [~tobier@c-1e9de055.712-1-64736c11.cust.bredbandsbolaget.se] has joined #go-nuts 08:10 -!- rutkowski [~adrian@178235051224.walbrzych.vectranet.pl] has joined #go-nuts 08:13 -!- pilgrum [~pilgrum@cpe-67-49-71-222.socal.res.rr.com] has joined #go-nuts 08:15 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has joined #go-nuts 08:20 -!- ljs [~user@customer4523.pool1.Croydon-GLN2000-BAS0001.orangehomedsl.co.uk] has quit [Ping timeout: 264 seconds] 08:25 -!- pilgrum [~pilgrum@cpe-67-49-71-222.socal.res.rr.com] has quit [Quit: Leaving] 08:25 -!- tvw [~tv@e176000013.adsl.alicedsl.de] has joined #go-nuts 08:34 -!- krutcha1 [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Quit: Leaving] 08:36 -!- tensai_cirno [~cirno@77.232.15.216] has joined #go-nuts 08:40 -!- ronnyy [~quassel@p4FF1C0A2.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 08:40 -!- littlebobby [~bob@unaffiliated/littlebobby] has joined #go-nuts 08:40 -!- ronnyy [~quassel@p4FF1C0A2.dip0.t-ipconnect.de] has joined #go-nuts 08:43 -!- ronnyy [~quassel@p4FF1C0A2.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 08:46 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 08:46 -!- ronnyy [~quassel@p4FF1C0A2.dip0.t-ipconnect.de] has joined #go-nuts 08:47 < huin> what's generally regarded as more efficient: create a goroutine + syncronous channel to make a python-like generator, or allocate a slice and return, in terms of generating on the order of 400 items? 08:47 -!- ronnyy [~quassel@p4FF1C0A2.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 08:49 -!- rutkowski [~adrian@178235051224.walbrzych.vectranet.pl] has quit [Quit: WeeChat 0.3.3-dev] 08:57 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 09:00 < edsrzf> huin: Returning a slice is more efficient, but you'll use more memory. 09:00 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Quit: Lost terminal] 09:01 -!- ronnyy [~quassel@p4FF1C0A2.dip0.t-ipconnect.de] has joined #go-nuts 09:01 < huin> thanks :) 09:02 < huin> i guess i have to decide on CPU vs memory efficiency, but at this stage it's probably premature optimisation to do so 09:03 < edsrzf> Yeah, at 400 objects you can probably spare the memory, unless the objects are huge. 09:03 < huin> i think i can just code this "the nice way" and decide later what's best. changing this later would be easy as it's a confined section of code 09:04 < huin> given that goroutines probably use 4k or so each on startup (is that right?), then memory savings would likely be negated anyway 09:05 < edsrzf> No, I don't believe it's that much 09:11 -!- edsrzf [~chickench@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote host closed the connection] 09:14 -!- tobier [~tobier@c-1e9de055.712-1-64736c11.cust.bredbandsbolaget.se] has quit [Read error: Operation timed out] 09:15 -!- tobier [~tobier@c-1e9de055.712-1-64736c11.cust.bredbandsbolaget.se] has joined #go-nuts 09:21 -!- Count_Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has joined #go-nuts 09:23 -!- cw [~anticw@parsec.stupidest.org] has quit [Ping timeout: 248 seconds] 09:23 -!- cw [~anticw@parsec.stupidest.org] has joined #go-nuts 09:23 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has quit [Ping timeout: 248 seconds] 09:29 -!- ronnyy [~quassel@p4FF1C0A2.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 09:39 -!- tvw [~tv@e176000013.adsl.alicedsl.de] has quit [Remote host closed the connection] 09:40 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-166-18.clienti.tiscali.it] has joined #go-nuts 09:49 -!- rtharper [~tomh@unaffiliated/sioraiocht] has joined #go-nuts 10:16 -!- tensai_cirno [~cirno@77.232.15.216] has quit [Quit: Leaving] 10:16 -!- saturnfive [~saturnfiv@219.144.238.246] has joined #go-nuts 10:17 -!- saturnfive [~saturnfiv@219.144.238.246] has left #go-nuts [] 10:27 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has joined #go-nuts 10:42 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4] 10:45 -!- espeed [~espeed@63.246.231.57] has joined #go-nuts 10:59 -!- boscop [~boscop@g230087148.adsl.alicedsl.de] has joined #go-nuts 11:01 -!- waqas [~waqas@jaim.at] has joined #go-nuts 11:02 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has joined #go-nuts 11:04 -!- shvntr [~shvntr@116.26.134.53] has quit [Ping timeout: 246 seconds] 11:06 -!- Count_Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has quit [Ping timeout: 276 seconds] 11:43 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has joined #go-nuts 11:45 -!- shvntr [~shvntr@116.26.134.53] has joined #go-nuts 11:47 -!- littlebobby [~bob@unaffiliated/littlebobby] has quit [Quit: Ex-Chat] 11:58 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts 12:11 < xyproto> str1ngs: nice bzip2/gzip snippet. How about .xz as well? It is quickly becoming more widespread. :) 12:14 -!- ShadowIce [~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined #go-nuts 12:14 -!- ShadowIce [~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit [Changing host] 12:14 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 12:18 < str1ngs> xyproto: thats next on my list 12:19 < str1ngs> I could use a better test for file type something like /usr/bin/file 12:20 < str1ngs> but that might be overkill for now 12:25 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 12:26 < xyproto> str1ngs: maybe it's possible to just look at the two first bytes of the file? All tar.bz2 files I have lying around starts with 5a42, for example 12:27 < xyproto> str1ngs: and tar.gz files starts with 8b1f 12:27 < str1ngs> not sure 12:27 < xyproto> str1ngs: I think that's how file does it. 12:27 < xyproto> str1ngs: I've looked just briefly at the file sourcecode, and I am on the file mailinglist, but I'm not a file-expert 12:27 < str1ngs> I also need to figure out away to peek at the tar, get how many dir it contains 12:28 < str1ngs> most contain one dir. but I cant assume that. 12:29 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts 12:29 < str1ngs> actually what I might do is just do tmp/wget/wget-build tmp/wget/wget-stage untar to wget-stage and the get dir list 12:30 < str1ngs> thats saner. and I dont have to peek at the tar if I've already staged and just doing a rebuild 12:31 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts [] 12:31 -!- wrtp [~rog@92.17.50.183] has joined #go-nuts 12:31 < xyproto> str1ngs: sounds like a plan :) 12:32 < xyproto> hi wrtp 12:32 < wrtp> xyproto: hi 12:32 < str1ngs> xyproto: but I was thinking about making a gotar. and if I do that then ya it should have better filetype handling 12:34 < str1ngs> xyproto: if you want to play with it I can convert it to a pkg 12:35 < xyproto> str1ngs: sure, I'll try it out 12:35 < str1ngs> xyproto: ok I'll stick it on githup. 12:36 < str1ngs> something like libarchive I guess 12:36 < str1ngs> but to be honest I didnt do much work just pieced what stdlib together 12:37 < xyproto> it's fine, I'll give it a go :) 12:38 < nsf> iant: oh, I wanted to ask you.. in your constant eval code there is a thing for bit shifts (left shift op): "shift > 0x100000" is it just a protection from memory bloat? 12:39 -!- wrtp [~rog@92.17.50.183] has quit [Quit: wrtp] 12:40 -!- wrtp [~rog@92.17.50.183] has joined #go-nuts 12:40 < nsf> if user tries to shift more than 0x100000 bits, it's a shift overflow in your code 12:41 < aiju> Intel CPUs do something funny when you shift too much 12:41 < aiju> x <<= 32; is a nop 12:41 < nsf> aiju: it's in const eval code :) 12:41 < nsf> arbitrary precision math here 12:41 < aiju> sure, i'm just mentioning something related ;P 12:41 < nsf> and well, shifting MAX UINT bits doesn't make sense 12:41 < nsf> the resulting int will be 500 megs 12:42 < nsf> if no compression is used :) 12:42 < aiju> gzip in memory 12:42 < nsf> simple run length encoding is fine here 12:50 < str1ngs> xyproto: https://github.com/str1ngs/goarchive I reused the go license. it might not work without some tweaking. and the test framework is there but needs to be filled in 12:54 -!- yihuang [~yihuang@183.17.189.72] has joined #go-nuts 12:56 -!- gr0gmint [~quassel@87.61.162.99] has joined #go-nuts 13:08 -!- ccc_ [62cb062b@gateway/web/freenode/ip.98.203.6.43] has joined #go-nuts 13:14 -!- Project-2501 [~Marvin@82.84.70.6] has joined #go-nuts 13:15 < ww> rofl. these android people. 13:15 < ww> "The main point is, an insecure/public API bridge should only be 13:15 < ww> launch-able via direct user action. " 13:15 < aiju> wtf? 13:15 < ww> well... i can launch one with a shell command 13:15 < aiju> wtf is an "API bridge" after all? 13:15 < aiju> newspeak for wrapper? 13:16 < ww> and then look at netstat to find the port in a brute force way (ther are only a handful) 13:16 < ww> aiju: more or less. json over tcp <-> java stuff 13:16 < str1ngs> ww: andriod is really not bad iphone is way worst 13:16 < aiju> Hitler is worse than android, ergo android is good 13:16 < ww> there's some funny kool-aid thing going on though 13:17 * ww wishes openmoko had gotten more funding 13:17 < str1ngs> I'd still take the lesser of 2 evils every time :P 13:17 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-166-18.clienti.tiscali.it] has quit [Ping timeout: 250 seconds] 13:18 < ww> google just looked at openmoko and said, hey we can take that and make it shiny on the surface and screw it up underneath 13:18 < aiju> i remember openmoko to be fucked up as well 13:18 < str1ngs> ww: it might get worst before it get's better. if you really look at what apple is doing its scary 13:19 < ww> aiju: openmoko had the right idea, just not enough resources to do the work and clout with the manufacturers and carriers 13:19 < aiju> what is the "right idea"? 13:19 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 13:19 -!- shvntr [~shvntr@116.26.134.53] has quit [Quit: leaving] 13:19 < str1ngs> apple axed opera on iphone, stating it was not suitable for children under 18 13:19 < aiju> when all you have is a Linux, everything looks like a server 13:19 < ww> str1ngs: what? 13:20 < str1ngs> ww: because opera doesnt have some parental guidance thing. its not suitable for children under 18. according to apple 13:21 < ww> obviously they don't have children 13:21 < ww> if they did, they'd know that the first thing children learn how to do is subvert parental controls 13:22 < str1ngs> but I need to find this source. I saw it somewhere in passing 13:24 < xyproto> aiju: Godwin's law :P 13:24 < xyproto> str1ngs: I'll look at it :) 13:24 < aiju> Hitler would send you to concentration camp for mentioning Godwin's law 13:24 < xyproto> aiju: oh no, I have no defense for recurse Godwin! :D 13:24 < xyproto> *recursive 13:26 < xyproto> str1ngs: it compiles fine and the test says PASS here 13:26 < str1ngs> xyproto: test will pass because there is not logic 13:26 < str1ngs> no* 13:26 < xyproto> oh, ok 13:27 < str1ngs> I just put the framework together. I'll add a test to Untar 13:27 < str1ngs> might be easier to add a Tar then use that for testing Untar 13:28 -!- jokoon [~eio@feu30-1-82-242-58-229.fbx.proxad.net] has joined #go-nuts 13:28 < str1ngs> if you plan on doing alot of hacking on it I'll add you to github so you can just push and dont have to do pull requests. and I'll do some testing as you push 13:31 < str1ngs> also I dont Stat for dest dir. I need to add that. since my calling app does that 13:31 < str1ngs> thats kind important I guess .. 13:32 -!- tvw [~tv@e176000013.adsl.alicedsl.de] has joined #go-nuts 13:32 < nsf> iant: hehe, found the comment regarding that 0x100000, strangely enough not in a hg repo, but somewhere in the nowhere: http://patchwork.ozlabs.org/patch/83905/ 13:32 < xyproto> str1ngs: I could add the detection of .gz and .bz2 at least, if you want to. Feel free to add me, it would be fun. :) 13:33 < str1ngs> xyproto: sure no pressure though. xyproto on github? 13:34 < xyproto> str1ngs: yes 13:34 < xyproto> str1ngs: I haven't been that active on github, but I want use it more 13:35 < str1ngs> xyproto: like I said no pressure. 13:35 < nsf> iant: or I guess hg repo of the gofrontend was created from the gcc's svn repo, right? :) 13:35 < nsf> and that's the place where I should look for comments 13:35 < xyproto> str1ngs: no worries 13:37 < str1ngs> xyproto: ok added 13:39 < str1ngs> does gccgo require libffi. the maintainer of gcc on archlinux was asking about ti 13:39 < str1ngs> it* 13:40 < str1ngs> my guess is that gccgo uses libffi to interface with either C or C++ but I'm not sure 13:43 < nsf> str1ngs: I think it's very unlikely 13:43 < nsf> gccgo uses just gcc 13:43 < nsf> afaik 13:43 < nsf> although, I don't know 13:43 < nsf> ask iant 13:44 < str1ngs> readelf -a libgo.so | grep ffi .. seems to say yes 13:45 < nsf> hm.. 13:47 < str1ngs> meh probably not important he can ask on the mailing list if he needs to 13:52 -!- fabled [~fabled@mail.fi.jw.org] has quit [Quit: Ex-Chat] 13:53 < skelterjohn> morning 13:53 -!- schmrkc [~marcus@sxemacs/devel/schme] has quit [Ping timeout: 260 seconds] 14:10 < nsf> [nsf @ crawl]$ echo 'const X = 3.14 * 4 > 12.3 && (4*8)/24 == 1;' | ./crawl -no-ast 14:10 < nsf> const 'X': 1 14:10 < nsf> :P 14:10 < aiju> > is shift? 14:11 < nsf> no 14:11 < nsf> comparison 14:11 < aiju> shouldn't X be true then? 14:11 < nsf> greater than 14:11 < nsf> yes 14:11 < nsf> I use int for booleans 14:11 < aiju> oh you have integers as booleans? 14:11 < aiju> oic 14:11 < nsf> 1 and 0 14:11 < aiju> 2 should cause a segfault ;P 14:11 < nsf> but yeah, I should print type as well :) 14:13 < nsf> [nsf @ crawl]$ echo 'const X = (1 << 100) >> 98;' | ./crawl -no-ast 14:13 < nsf> const 'X': 4 14:14 < nsf> Go's shift example :) 14:14 < aiju> what's it written in? 14:14 < aiju> Go or C? 14:14 < nsf> uhm, crawl? 14:14 < nsf> in C++ 14:14 < aiju> why C++? D: 14:14 < nsf> uhm, for future tight integration with LLVM 14:14 < nsf> and libclang 14:15 < nsf> also a good bootstrap target as well 14:15 < aiju> doesn't llvm has a C api? 14:15 < nsf> also has std::vector and std::unordered_map 14:15 < aiju> *have 14:15 < nsf> it has, but it's incomplete 14:16 < nsf> [nsf @ crawl]$ echo 'const X = (7+8) / (4+16-20);' | ./crawl -no-ast 14:16 < nsf> stdin:1:17: error: division by zero 14:16 < nsf> const X = (7+8) / (4+16-20); 14:16 < nsf> ~~~~~ ^ ~~~~~~~~~ 14:16 < nsf> I have nice error messages as well :) 14:17 < nsf> or should I say as clang? lol 14:17 -!- yihuang [~yihuang@183.17.189.72] has left #go-nuts [] 14:17 < aiju> the UNIX assembler had the best error messages 14:17 < aiju> N0059 14:17 < aiju> no need to be any more verbose ;P 14:18 < exch> you had a lookup table printed out and stuck to the wall behind your desk? :p 14:18 < aiju> no, you knew them by heart 14:18 < exch> hardcore 14:18 < aiju> the number is the line number 14:18 < exch> ah 14:18 < aiju> most errors were "unknown label" and such 14:19 < aiju> http://man.cat-v.org/unix-6th/1/as 14:19 < aiju> oh it even printed the file name 14:19 < aiju> luxury 14:20 < aiju> the reason for those cryptic errors is probably the same as for ed: long error messages are just annoying on 10 char/sec terminals 14:21 < nsf> lol 14:42 -!- nettok [~quassel@200.119.188.116] has joined #go-nuts 15:09 < xyproto> I just discovered the package-name can not be "main" when having a something.go and something_test.go test. Why is that, I wonder? 15:10 < xyproto> make test fails when the first line of both is "package main" 15:11 < xyproto> strangeness, it works in a different directory. Maybe I've done something strange. 15:12 < str1ngs> I dont think there is a need to have main as a package name 15:12 < xyproto> when I have "package main" in both files, I get: _testmain.go:9: undefined: __main__ 15:12 < xyproto> and also "main redeclared in this block" 15:12 < str1ngs> is it a command package? 15:13 < xyproto> str1ngs: it's a little test application. The Makefile includes Make.pkg 15:13 < str1ngs> I'm not sure if testing works with command projects 15:13 < xyproto> str1ngs: it works if I change "package main" to something else, though 15:14 < str1ngs> whats happening is its creating as main() which conflicts with main from foo.go 15:14 < xyproto> Ah, since foo.go is not a package, it does have a main, hence the conflict. I see. 15:15 < xyproto> It just surprised me that the package name would cause a conflict, that's all. 15:15 < str1ngs> right thats why foot_test.go is used for testing packages since there is no main 15:15 < str1ngs> make test creates a main() etc 15:15 * ww has to have a look at how to test commands... 15:16 < ww> maybe it doesn't really matter that much 15:16 < str1ngs> I just make a test: target in the Make file and run make test. 15:16 < exch> If I'm not mistaken, gotest is set to work with commands as well as packages at some point. Not sure when that will occur or if it already has in the latest versions 15:16 < xyproto> "make test" works here without making a test target, just by including the go makefile includes 15:16 -!- jokoon [~eio@feu30-1-82-242-58-229.fbx.proxad.net] has quit [Quit: Leaving] 15:16 < skelterjohn> xyproto: gb can do testing for package main :) 15:16 < xyproto> skelterjohn: what is gb? :) 15:17 < skelterjohn> go-gb.googlecode.com 15:17 < xyproto> *checking* 15:17 < skelterjohn> build tool i created 15:17 < nsf> D has a special syntax construction: unittest {} 15:17 < nsf> what do you think about it? 15:17 < xyproto> nsf: sounds nice, but maybe a bit too helpful? :) 15:17 < exch> Not sure if a dedicated language construct is really necessary tbh 15:18 < nsf> well, why can't we have it? it's pretty much an orthogonal feature 15:18 < nsf> you can even use the language without knowing it exists 15:18 < nsf> but it makes testing simpler 15:18 < Namegduf> I don't think you can 15:18 < nsf> because every tester tool can recognize unittest clauses 15:18 < nsf> and execute the code 15:18 < Namegduf> A programmer needs to know all the stuff he can encounter and deal with when dealing with other people's code 15:18 < nsf> Namegduf: but then it's very simple 15:19 < nsf> even without reading the doc :) 15:19 < Namegduf> It's not a great complexity add but does it really provide a great deal of gain to efficency of writing code? 15:19 < Namegduf> *efficiency 15:19 < nsf> it affects culture a bit 15:20 < nsf> by showing that language supports unit testing as a known technique 15:20 < nsf> other than that 15:20 < nsf> I don't think there are any gains 15:20 -!- tvw [~tv@e176000013.adsl.alicedsl.de] has quit [Remote host closed the connection] 15:20 < ww> i guess it might be nice to be able to arrange to have unit tests near the code that they test... 15:20 < ww> they also serve as examples... 15:21 < ww> like python's doctests (that are underused in favour of much heavier test harneses) 15:21 < Namegduf> *_test.go accomplishes that as well, though. 15:21 < Namegduf> "near", if not next to. 15:21 < nsf> I think *_test.go is worse than unittest 15:21 < Namegduf> They are unit tests 15:21 < nsf> because it's an undocumented collection of some kind of conventions 15:21 < ww> Namegduf: sure. a bit farther than doctests, but still near 15:21 < nsf> I mean D's 'unittest' 15:21 < nsf> syntax 15:22 < Namegduf> I'm not sure trying to represent all conventions through syntax is a good approach for a simple language 15:22 < Namegduf> Or one that's feasible without stopping to be a simple language 15:22 < Namegduf> That's my opinion, anyway. 15:23 < ww> i guess it wouldn't be exceptionally difficult to extract tests from comments and generate *_test.go 15:23 < ww> that way examples would flourish in the documentation... 15:23 < Namegduf> Or visa versa 15:24 -!- tvw [~tv@e176000013.adsl.alicedsl.de] has joined #go-nuts 15:24 < Namegduf> Just search *_test.go for function calls and you have examples. 15:24 < xyproto> I would like quicktests, where calls and expected results are written in a short comment above the function declaration 15:24 < exch> tests will not always be a good example representation. Sometimes you want tests to fail deliberately 15:24 < Namegduf> I'm dubious of those providing enough completeness. 15:24 < Namegduf> Ah, fair point. 15:25 < exch> or rather, the tests should succeed in failing 15:25 < exch> :P 15:25 < Namegduf> Yeah. 15:25 * Namegduf is lazy about writing unit tests quickly. :( 15:26 < Namegduf> It's because I like to change semantics and provided functionality a lot while still in the "get version 0.1" phase. 15:26 < Namegduf> Try to look at the whole thing and come up with ways to provide what the actual code using a package is doing simpler and blah. 15:27 -!- xyproto [~alexander@77.40.159.131] has quit [Quit: WeeChat 0.3.4] 15:28 -!- xyproto [~alexander@cm-84.208.177.43.getinternet.no] has joined #go-nuts 15:28 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts 15:28 -!- waqas [~waqas@jaim.at] has left #go-nuts [] 15:31 < ww> ok... homebrew is quickly devolving into me just downloading stuff and doing ./configure && make && make install 15:32 < aiju> homebrew? 15:32 < ww> someone said ditch macports for homebrew 15:32 < ww> and homebrew devolves much more quickly into roll-your-own 15:32 < aiju> wtfi homebrew? are you playing with some console? 15:32 < ww> aiju: get a mac :p 15:33 < aiju> isn't there ports? 15:33 < aiju> homebrew is based on fucking ruby 15:34 < ww> yeah... i think this started when i was making a cross compiler and macports got in the way... 15:34 -!- Fish- [~Fish@9fans.fr] has quit [Ping timeout: 276 seconds] 15:34 * ww is feeling very anti-package-management now 15:35 < aiju> a friend of mine ported portage to OS X 15:35 < skelterjohn> I'm pretty sure the language a package manage is written is not its most important feature 15:35 < aiju> you actually have a sort of Gentoo subsystem with that 15:36 < aiju> yeah, because a package manager eating dozens of megs is such a good idea 15:37 < Namegduf> Dozens? 15:37 < aiju> Namegduf: being optimistic 15:37 < Namegduf> Don't be ridiculous. 15:37 < Namegduf> Hundreds! 15:37 < aiju> not to mention the speed 15:37 -!- nettok [~quassel@200.119.188.116] has quit [Ping timeout: 240 seconds] 15:37 < Namegduf> I don't really care, though 15:37 < aiju> portage dependency resolution can take longer than actual compilation <.< 15:38 * Namegduf understands macports to be about as reliable as portage and is all for homebrew 15:38 * ww rolls own 15:38 < Namegduf> Ah, OS X. 15:38 < ww> they all do the wrong thing 15:39 < aiju> are records a planned feature for Lion yet? 15:39 < Namegduf> Records? 15:39 < aiju> file records 15:39 < ww> you know, vinyl 15:39 < Namegduf> Lion has an App Store 15:40 < aiju> in the old days, everyone KNEW that files can't be byte streams 15:40 < ww> show your 33 1/3s to the camera and play them with itunes 15:40 < Namegduf> It's like package management but only for OS X programs without dependencies 15:40 < aiju> they have to be split into records 15:40 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 15:40 < Namegduf> aiju: That's what multiple files are for 15:40 < aiju> Namegduf: a record is more like a line 15:40 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts 15:40 < aiju> files aren't streams of bytes, they are streams of lines 15:41 < Namegduf> No they aren't 15:41 < aiju> UNIX got rid of that in favour of a more simple model 15:41 < Namegduf> Text files might be streams of lines 15:41 < Namegduf> But everything can be anything at all 15:41 < aiju> Namegduf: i'm telling you the situation on non-Unices 15:41 < aiju> another decision in UNIX was to allow only one stream per file 15:42 < aiju> OS X reintroduced multiple streams and hence i expect them to provide records, sooner or later ;P 15:42 -!- zimsim [~simon@87.72.77.195] has joined #go-nuts 15:42 < Namegduf> Ah. 15:49 -!- boscop_ [~boscop@g230087148.adsl.alicedsl.de] has joined #go-nuts 15:51 -!- boscop [~boscop@g230087148.adsl.alicedsl.de] has quit [Ping timeout: 240 seconds] 15:52 -!- boscop__ [~boscop@g230087148.adsl.alicedsl.de] has joined #go-nuts 15:53 -!- nettok [~quassel@200.119.188.116] has joined #go-nuts 15:54 -!- boscop_ [~boscop@g230087148.adsl.alicedsl.de] has quit [Ping timeout: 264 seconds] 15:55 -!- Fish- [~Fish@9fans.fr] has quit [Ping timeout: 250 seconds] 15:55 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts 15:56 -!- jrslepak [~jrslepak@24-247-40-178.dhcp.mrqt.mi.charter.com] has joined #go-nuts 15:56 -!- DerHorst [~Horst@e176098106.adsl.alicedsl.de] has joined #go-nuts 15:56 -!- jrslepak [~jrslepak@24-247-40-178.dhcp.mrqt.mi.charter.com] has quit [Client Quit] 15:58 -!- boscop__ [~boscop@g230087148.adsl.alicedsl.de] has quit [Read error: Connection reset by peer] 16:03 -!- jrslepak [~jrslepak@24-247-40-178.dhcp.mrqt.mi.charter.com] has joined #go-nuts 16:05 -!- jrslepak [~jrslepak@24-247-40-178.dhcp.mrqt.mi.charter.com] has quit [Client Quit] 16:06 -!- boscop [~boscop@g230087148.adsl.alicedsl.de] has joined #go-nuts 16:07 * aiju found a really nice use of channels 16:07 < aiju> iterating through the results of a recursive process like calculating all permutations 16:08 -!- boscop [~boscop@g230087148.adsl.alicedsl.de] has quit [Read error: Connection reset by peer] 16:09 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com] has quit [Read error: Connection reset by peer] 16:09 < exch> like so? https://github.com/jteeuwen/calculon/blob/master/mods/permute/word.go#L103 16:09 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com] has joined #go-nuts 16:09 < exch> it's not recursive though 16:09 -!- boscop [~boscop@g230087148.adsl.alicedsl.de] has joined #go-nuts 16:10 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts 16:10 < aiju> i have no clue how that one works ;P 16:10 < exch> black magic 16:11 < aiju> i calculated all cycle structures recursively 16:11 < aiju> and every new result is pushed down a channel 16:11 < exch> yea mine does that to 16:11 < aiju> http://aiju.phicode.de/up/a.html 16:11 < aiju> this table was calculated at basically constant memory 16:12 < skelterjohn> i have no idea what that is 16:12 < aiju> math 16:12 < exch> factorials galore 16:13 < skelterjohn> i'm ok at math, but your data isn't well labeled 16:13 < aiju> the numbers are only remotely related to factorials 16:13 < aiju> skelterjohn: "well labelled" would require several pages of introduction 16:14 < aiju> it lists all cycle structures occuring in S35 16:14 < aiju> with their counts, order and parity 16:14 < skelterjohn> what's S35 16:14 < aiju> the 35th symmetric group 16:14 -!- boscop [~boscop@g230087148.adsl.alicedsl.de] has quit [Ping timeout: 240 seconds] 16:15 -!- boscop [~boscop@g230087148.adsl.alicedsl.de] has joined #go-nuts 16:20 -!- boscop [~boscop@g230087148.adsl.alicedsl.de] has quit [Ping timeout: 250 seconds] 16:22 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has joined #go-nuts 16:27 -!- nettok [~quassel@200.119.188.116] has quit [Ping timeout: 276 seconds] 16:29 -!- zimsim [~simon@87.72.77.195] has quit [Remote host closed the connection] 16:47 -!- xyproto [~alexander@cm-84.208.177.43.getinternet.no] has quit [Quit: WeeChat 0.3.5-dev] 16:48 -!- xyproto [~alexander@77.40.159.131] has joined #go-nuts 16:49 -!- toyoshim_ [~toyoshim@y099101.dynamic.ppp.asahi-net.or.jp] has joined #go-nuts 16:51 -!- ronnyy [~quassel@p4FF1C0A2.dip0.t-ipconnect.de] has joined #go-nuts 16:56 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has quit [Remote host closed the connection] 17:01 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:d963:394:1870:b27d] has joined #go-nuts 17:09 -!- ronnyy [~quassel@p4FF1C0A2.dip0.t-ipconnect.de] has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.] 17:10 -!- tvw [~tv@e176000013.adsl.alicedsl.de] has quit [Read error: Connection reset by peer] 17:16 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4] 17:30 -!- bugQ [~bug@c-67-171-127-76.hsd1.ut.comcast.net] has joined #go-nuts 17:43 -!- pphalen [~pphalen@66.92.11.149] has joined #go-nuts 17:57 -!- zozoR [~Morten@56344e3e.rev.stofanet.dk] has joined #go-nuts 18:01 -!- bpalmer` [~user@adsl-69-232-221-158.dsl.pltn13.pacbell.net] has quit [Ping timeout: 252 seconds] 18:01 -!- bpalmer` [~user@adsl-69-232-221-158.dsl.pltn13.pacbell.net] has joined #go-nuts 18:09 < thebarberian> str1ngs: Deleting the objdir and running it again helped 18:09 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 18:10 -!- TheMue [~TheMue@p5DDF60EA.dip.t-dialin.net] has joined #go-nuts 18:12 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts 18:23 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-166-222.clienti.tiscali.it] has joined #go-nuts 18:25 -!- Project-2501 [~Marvin@82.84.70.6] has quit [Ping timeout: 250 seconds] 18:27 -!- ccc_ [62cb062b@gateway/web/freenode/ip.98.203.6.43] has quit [Quit: Page closed] 18:32 -!- bugQ [~bug@c-67-171-127-76.hsd1.ut.comcast.net] has quit [Ping timeout: 248 seconds] 18:46 -!- littlebobby [~bob@unaffiliated/littlebobby] has joined #go-nuts 18:53 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by peer] 19:04 < str1ngs> thebarberian: good stuff 19:08 -!- Tuller [~tuller@c-68-33-63-208.hsd1.va.comcast.net] has joined #go-nuts 19:09 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 19:11 -!- zozoR [~Morten@56344e3e.rev.stofanet.dk] has quit [Remote host closed the connection] 19:13 -!- foocraft [~dsc@89.211.195.128] has joined #go-nuts 19:15 -!- zimsim [~simon@87.72.77.195] has joined #go-nuts 19:19 -!- lmoura [~lauromour@187.113.121.19] has quit [Read error: Connection reset by peer] 19:20 -!- lmoura [~lauromour@187.113.125.71] has joined #go-nuts 19:26 < steven> does Go give us control over endianness? 19:26 -!- toyoshim_ [~toyoshim@y099101.dynamic.ppp.asahi-net.or.jp] has quit [Remote host closed the connection] 19:29 -!- gr0gmint [~quassel@87.61.162.99] has quit [Read error: Connection reset by peer] 19:29 < str1ngs> ww: you need via its written in go :P 19:30 -!- nettok [~quassel@200.119.151.202] has joined #go-nuts 19:33 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal] 19:34 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined #go-nuts 19:34 * ww looks at vIa just now 19:35 < str1ngs> ww: still alot of work to be donw 19:35 < str1ngs> done* 19:35 < steven> HELLO HOW ARE YOU DOING GOOD IM GLAD TO HEAR IT 19:36 < str1ngs> oh hi steven :P 19:38 < steven> :) 19:38 < steven> bbl 19:40 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has joined #go-nuts 20:02 < ww> str1ngs: where is via again? 20:02 < str1ngs> ww: github.. not very useable 20:03 < str1ngs> ww: but its alot like homebrew. would need some hacking. I plan on abstracing the OS ARCH stuff just not done yet 20:05 < str1ngs> ww: if you want to look at it give me some idea's might be helpful 20:10 -!- ljs [~user@customer4523.pool1.Croydon-GLN2000-BAS0001.orangehomedsl.co.uk] has joined #go-nuts 20:11 < steven> does Go give us control over endianness? 20:15 < str1ngs> ww: what problems are you haveing with homebrew? 20:16 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving] 20:17 < skelterjohn> steven: what do you mean "control" 20:17 < skelterjohn> it uses whichever endianness the architecture uses 20:17 < skelterjohn> though when you encode for network transfer, you can choose 20:18 < ww> oh, homebrew built python differently, anydbm using gdbm instead of bdb, they're not quite equivalent, different locking behaviour. some irritating loss of a time sorting it out... not very go related... 20:18 -!- Scorchin [~Scorchin@host109-156-219-102.range109-156.btcentralplus.com] has joined #go-nuts 20:19 < str1ngs> hmm have not heard of gdbm before 20:20 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 20:20 < str1ngs> I was hopeing to add osx support to via but its ways off. its kinda linux centric right now 20:21 -!- aho [~nya@fuld-590c7951.pool.mediaWays.net] has joined #go-nuts 20:21 < dforsyth> so in via you have to build all of the plans? 20:22 < ww> hmmm. so a package description is actually compiled into the binary? 20:22 < str1ngs> dforsyth: right now yes but I'm adding packaging eventually right now it installs to a chroot 20:22 < str1ngs> ww: yes which is not optimal but has some benefits 20:23 < dforsyth> it might be interesting to roll a dpkg clone complete with libdpkg in go 20:23 < ww> one of the more common things i do with package managers is change the build flags or configure arguments 20:23 < ww> would be harder if that meant i needed tp rebuild the package manager... 20:23 < str1ngs> dforsyth: I'd like to write a package manager in go that be great 20:24 < str1ngs> ww: let me push my changes so you can see how I handle flags 20:24 < dforsyth> i was thinking about rolling freebsd package tools in go 20:24 * ww is more of a bsd person as well 20:24 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:d963:394:1870:b27d] has quit [Quit: Leaving.] 20:24 < dforsyth> it wouldnt be very difficult. maybe ill do it next weekend if i dont feel like working on my editor 20:25 < str1ngs> ww: https://github.com/str1ngs/via/blob/devel/plans/ncurses.go 20:26 < str1ngs> ww: I have default gnuflags ie --prefix. but you can also add your own 20:27 -!- Tuller_ [~tuller@c-68-33-63-208.hsd1.va.comcast.net] has joined #go-nuts 20:27 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 20:28 < str1ngs> I'm worred though that compiling the meta data is not very scaleable 20:28 -!- krutcha1 [~krutcha@S010600045a27676a.vs.shawcable.net] has joined #go-nuts 20:30 -!- Tuller__ [~tuller@c-68-33-63-208.hsd1.va.comcast.net] has joined #go-nuts 20:30 -!- Tuller [~tuller@c-68-33-63-208.hsd1.va.comcast.net] has quit [Ping timeout: 246 seconds] 20:31 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 20:32 -!- bpalmer` [~user@adsl-69-232-221-158.dsl.pltn13.pacbell.net] has quit [Ping timeout: 264 seconds] 20:32 < ww> would tend to thnk that metadata should live elsewhere 20:32 < str1ngs> if I can figure out how to attach hooks and logic 20:32 < str1ngs> there is so many corner cases that you have to have some logic in the meta data 20:33 -!- Tuller_ [~tuller@c-68-33-63-208.hsd1.va.comcast.net] has quit [Ping timeout: 252 seconds] 20:33 < ww> that's why makefile based systems like ports are nice ... 20:33 < str1ngs> I agree but they have there limitations to 20:33 < ww> also provides clear separation between build system and package management 20:34 < str1ngs> this wont be a package manager 20:34 < str1ngs> if I use something it will be like pacman 20:35 < ww> i see 20:35 < str1ngs> with this all you need is make and gcc. nothing else. and away you go 20:35 < str1ngs> no I'm not saying this is perfect. its has aways to go. it more proof on concept right now 20:37 < str1ngs> if you can think of a meta format that is scriptable or I can attach hooks to . that might help 20:37 -!- krutcha1 [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Quit: Leaving] 20:38 < ww> so one way you could not build in all the build instructions is to make plans a bdb 20:38 -!- foocraft [~dsc@89.211.195.128] has quit [Quit: Leaving] 20:38 < ww> use gob and you have equivalent to python's shelve 20:38 < str1ngs> can gob handle functions though? 20:39 < ww> not directly 20:39 < str1ngs> and I"m worried about a db format. since you need an interface with it 20:39 < ww> but if you make methods on Plan... 20:39 < ww> could get ugly quickly though 20:39 < str1ngs> https://github.com/str1ngs/via/blob/master/plans/lsof.go here is a corner case for example 20:40 < str1ngs> this will change to . since I"m making helper functions to make corner cases easier to handly stuff like func ln() 20:40 < ww> right. so you'd have to resort to some registry of special functions... 20:41 < str1ngs> its not often most time's they fall under gnuBuild 20:41 -!- bpalmer` [~user@adsl-69-232-221-158.dsl.pltn13.pacbell.net] has joined #go-nuts 20:42 < ww> you should have a plan for go 20:42 < str1ngs> I had one. but I had to take it out. because I need to work on the gitDownload and hgDownload 20:42 < str1ngs> plus hgStage gitStage 20:43 -!- nighty__ [~nighty@tin51-1-82-226-147-104.fbx.proxad.net] has joined #go-nuts 20:43 -!- st-5426 [~st-5426@a89-154-147-132.cpe.netcabo.pt] has joined #go-nuts 20:44 < str1ngs> also maps is not a good idea. map keys are not unique lol 20:45 < str1ngs> well you change the value of one 20:45 < str1ngs> I guess I can just use a function and check for existing key 20:46 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts 20:49 -!- krutcha1 [~krutcha@S010600045a27676a.vs.shawcable.net] has joined #go-nuts 20:53 -!- virtualsue [~chatzilla@nat/cisco/x-btxvoreqdosakzsd] has joined #go-nuts 20:54 -!- ildorn [~ildorn@dslb-188-099-199-131.pools.arcor-ip.net] has joined #go-nuts 20:58 -!- ljs [~user@customer4523.pool1.Croydon-GLN2000-BAS0001.orangehomedsl.co.uk] has left #go-nuts ["ERC Version 5.3 (IRC client for Emacs)"] 21:01 -!- ildorn [~ildorn@dslb-188-099-199-131.pools.arcor-ip.net] has quit [Quit: Leaving.] 21:06 < ww> str1ngs: what about buIld depends? 21:08 < str1ngs> ww: have not started on that yet 21:09 -!- rtharper [~tomh@unaffiliated/sioraiocht] has quit [Read error: Connection reset by peer] 21:09 -!- rtharper [~tomh@unaffiliated/sioraiocht] has joined #go-nuts 21:09 < str1ngs> my plan so far was to use a shallow direct dependancy list of some kind 21:09 -!- crazy2be [~crazy2be@d209-89-248-73.abhsia.telus.net] has joined #go-nuts 21:10 < crazy2be> what is the format of envv? 21:10 < crazy2be> used when you call exec.Run or os.StartProcess 21:10 < str1ngs> []string iirc 21:11 < str1ngs> let me check though 21:11 < crazy2be> yeah but what does each string look like 21:11 < crazy2be> like []string{"FOO=BAR", "BLAR=FOO"}? 21:11 < str1ngs> /usr/bin/ls, []string{"ls","-l"} 21:12 < str1ngs> you need to pass the full binary PATH in then the arguements usually with the binary name 21:12 < ww> crazy2be: yes lIke that 21:12 < crazy2be> ww: ok, thanks! 21:12 -!- TheMue [~TheMue@p5DDF60EA.dip.t-dialin.net] has quit [Quit: TheMue] 21:12 < crazy2be> any reason they don't use a map[string]string? 21:13 < str1ngs> because arguments are not alwasy foo=bar see my ls example 21:13 < crazy2be> i mean for the enviroment 21:13 < crazy2be> argv is the args, envv is the enviroment :P 21:13 < str1ngs> gah sorry confusing the two 21:14 < ww> there is os.Getenv which is kind of like environ[key] 21:14 < ww> not sure why it isn't just a map... 21:14 < ww> it directly mirrors what the system call wants... 21:14 < str1ngs> you can use os.Environ() to inherit the existing enviroment 21:14 < str1ngs> most times thats all you need 21:15 < ww> i wonder what happens if you put something not of the form k=v in the environment... 21:16 < ww> it probably gets passed around happily... 21:16 < str1ngs> I normal use os.Setenv its more strict 21:16 < str1ngs> even more so if you use os.Clearenv 21:16 < ww> i think k=v is more of a widespread convention 21:16 < ww> but not entailed by the semantics of fork etc 21:17 < crazy2be> ww: If you don't do it, then what is the value of the variables? 21:17 < crazy2be> just that they are set? 21:17 < ww> they aren't variables, just strings 21:17 < ww> you have a string in the environment i guess 21:17 < ww> you can iterate over the array and see if your string is there.... 21:17 < crazy2be> wierd 21:17 < ww> just speculating... 21:18 < str1ngs> you can try nil which might give 0 enviroment variables 21:18 < crazy2be> but it's usually used as variables 21:18 < ww> crazy2be: yes, it is 21:19 < crazy2be> i do wish i didn't have to do exec.PassThrough, exec.PassThrough, exec.PassThrough tho 21:20 < crazy2be> it's kinda a pain to specify it three times when i don't want to customize it 21:20 < str1ngs> I made my own general Exec funtion with formating. ie Exec("ls -l %v","/usr/") 21:21 < crazy2be> str1ngs: that would run ls -l /usr/ ? 21:21 < str1ngs> crazy2be: right but. if you need to pipe and get data back you need access to the pipes 21:22 < str1ngs> crazy2be: https://github.com/str1ngs/via/blob/master/fork.go 21:22 < str1ngs> that wont be something you can just plug in and use though. 21:23 < str1ngs> goinstall also has another good example of a gen exec. see genRun 21:23 < str1ngs> which inspired me 21:25 -!- Tuller__ [~tuller@c-68-33-63-208.hsd1.va.comcast.net] has quit [Quit: Computer has gone to sleep.] 21:25 < crazy2be> huh 21:25 < crazy2be> i don't use it enough to justify a function like that 21:25 -!- DerHorst [~Horst@e176098106.adsl.alicedsl.de] has quit [Remote host closed the connection] 21:25 < crazy2be> but that's cool 21:25 < str1ngs> fair enough. just trying to be helpful 21:26 < dforsyth> my editor has a file browser \o/ 21:26 < crazy2be> just out of curiousity, why not accept a string and have the caller do fmt.Sprintf("format", args)? 21:26 < crazy2be> i suppose that's what you do internally anyway 21:27 < str1ngs> I guess this way I can format long commands 21:27 < crazy2be> dforsyth: so does mine :) kate is nice 21:27 < dforsyth> mine was also written by me :D 21:28 < crazy2be> is there any way to detect a particular error? 21:28 < crazy2be> it seems that the os.Error interface simply defines String() 21:28 < str1ngs> some times ie. err == os.EOF 21:28 -!- tvw [~tv@e176000013.adsl.alicedsl.de] has joined #go-nuts 21:30 < crazy2be> hmm 21:32 < crazy2be> what error corresponds to a non existant file? 21:32 -!- thebarberian [~Master_Co@216.252.79.105] has quit [Read error: Connection reset by peer] 21:32 < crazy2be> EBADF? 21:33 < str1ngs> check with os.Stat see what it returns 21:34 -!- thebarberian [~Master_Co@222-74-252-216.dsl.colba.net] has joined #go-nuts 21:34 < crazy2be> str1ngs: Err... how do i do that? 21:35 < str1ngs> _,err := os.Stat("/bogus/") 21:35 < crazy2be> yes but 21:35 < crazy2be> how do i check what that error code is? 21:35 < str1ngs> fmt.Printf("%T",err) 21:36 < crazy2be> oh it's a os.PathError 21:37 < crazy2be> but that still doesn't help me, it just has path, op, and error fields 21:37 < dforsyth> os.ReadDir doesnt give you '..'? 21:37 < crazy2be> hmm 21:38 < str1ngs> if err == os.PathError { blah } 21:38 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping timeout: 252 seconds] 21:38 < str1ngs> dforsyth: I dont think so 21:39 < crazy2be> str1ngs: Would be nice, but PathError is a type :/ 21:39 < crazy2be> and i could check that it is of that type 21:39 < crazy2be> but that doesn't really help me 21:39 < crazy2be> since os.Stat could return errors of that type for all kinds of reasons 21:39 < str1ngs> hmm os.EOF is compariable 21:41 < str1ngs> crazy2be: I guess you have to compare .String() or use general nil 21:41 -!- tvw [~tv@e176000013.adsl.alicedsl.de] has quit [Remote host closed the connection] 21:41 < crazy2be> :/ 21:41 < crazy2be> i'll just assume that all errors are does not exist errors 21:42 < str1ngs> well if its not nil then there is an error handle it either way 21:43 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts 21:45 < str1ngs> crazy2be: I think you can type assert with a switch 21:45 < crazy2be> yeah but the type won't help me 21:45 < crazy2be> i don't think 21:46 < crazy2be> hmm but Stat() uses Errno as well 21:46 < str1ngs> crazy2be: blind leading the lind here :P 21:46 < crazy2be> so it might be comparable 21:46 < crazy2be> the question is, to what? 21:46 < str1ngs> I saw that but it passed it of PathError 21:48 -!- photron [~photron@port-92-201-133-223.dynamic.qsc.de] has quit [Ping timeout: 240 seconds] 21:48 < str1ngs> http://golang.org/pkg/os/#PathError 21:48 -!- GoBIR [~gobir@c-24-130-224-186.hsd1.ca.comcast.net] has joined #go-nuts 21:49 -!- fabled [~fabled@83.145.235.194] has quit [Read error: Operation timed out] 21:50 < crazy2be> ah ENOENT 21:50 < str1ngs> from Op? 21:51 < dforsyth> wow all the dir readers explicitly skip "." and ".." 21:51 < str1ngs> yes why do you need them? 21:51 < str1ngs> if you need them just add them :P 21:51 < str1ngs> . is always redundant 21:52 < dforsyth> i will need to add them, but it would be convinient to already have them stat'd from a single ReadDir call 21:52 < dforsyth> its not redundant if i havent stat'd it yet 21:52 < str1ngs> how so though? 9/10 times you have to remove them 21:52 < crazy2be> :/ 21:52 < dforsyth> and 1/10 i need it 21:52 < crazy2be> comparing err to os.ENOENT didn't exist 21:52 < dforsyth> so why not let me skip it myself? 21:52 < crazy2be> *didn't work 21:52 < str1ngs> dforsyth: there is also the walker 21:52 < dforsyth> str1ngs: fn name? 21:53 < str1ngs> dforsyth: forget one sec 21:53 < crazy2be> dforsyth: path/filepaths/Walker 21:53 < crazy2be> or something 21:53 < crazy2be> i assume that's what he's talking about 21:53 < crazy2be> er, filepath 21:53 < dforsyth> oh thats like fts 21:54 < str1ngs> find it? 21:54 < dforsyth> yeah 21:54 < str1ngs> dunno if that will help I'm confused why you need . 21:54 < str1ngs> .. is handy but I"m sure all you need to know if you are at the root path or not 21:54 < dforsyth> i need .. 21:55 < dforsyth> i dont think either should be removed though 21:55 < str1ngs> sorry if I come of strong I find . and .. anoying 21:55 < str1ngs> for my shell thats another story 21:56 < crazy2be> it's mostly a political battle... but . and .. don't actually exist 21:56 < crazy2be> they are just created by the system 21:56 < crazy2be> what are you trying to do, anywya? 21:56 < crazy2be> *anyway 21:56 < str1ngs> there useful in a shell for relative movement. but for codeing 9/10 times I have to filter it out 21:56 < crazy2be> yeah 21:56 < dforsyth> it would just be convinient to get .. when i list this directory 21:56 < dforsyth> i agree its hardly useful 21:57 < dforsyth> but i think that should be my decision 21:57 < dforsyth> system language -> distort the system/ 21:57 < str1ngs> ok so stat the parent dir 21:57 < crazy2be> dforsyth: Call the syscall interface yourself? 21:58 < dforsyth> ? 21:58 < str1ngs> dforsyth: parent, child os.Split(thisPath) 21:58 < str1ngs> err path.Split my bad 21:59 < dforsyth> yes, i can stat is myself 21:59 < str1ngs> you need to becareful with that thisPath = / will cause issues 21:59 < dforsyth> thats not really the issue 22:00 < str1ngs> \o/ I give up :P 22:00 < crazy2be> pathWithDots := make([]string, len(pathWithoutDots)+2) 22:01 < crazy2be> pathWidthDots[len(pathWithDots)-2] = ".." 22:01 < crazy2be> etc 22:01 < dforsyth> why would you hide somethign like this with a system language though? 22:01 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit: Verlassend] 22:01 < str1ngs> its not hiding anything 22:01 < str1ngs> .. . are not real dir 22:02 < str1ngs> there just realative 22:02 < ww> str1ngs: actually they are real 22:02 < ww> you can infer that from the link count on the directories 22:03 < str1ngs> sure but useful to what end. 22:03 < crazy2be> it all depends on how you define real 22:03 < str1ngs> cd ../ <- useful 22:03 < str1ngs> os.Stat("../") I dont see the point 22:03 -!- wrtp [~rog@92.17.50.183] has quit [Quit: wrtp] 22:03 < crazy2be> i do 22:03 < ww> crazy2be: real meaning present in the directory structure in the filesystem 22:03 < crazy2be> but getting that in the output would be silly imo 22:04 < crazy2be> ww: Are they actually stored on disk? 22:04 < ww> yes 22:04 < steven> probaby as a doubly linked list or something 22:04 < ww> well, .. is . isn't 22:04 < str1ngs> lol steven 22:04 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts 22:04 < str1ngs> they need to add ... 22:04 < str1ngs> j/k 22:05 < steven> triply linked list. 22:06 < steven> . == self, .. == parent, child = child 22:06 < str1ngs> dforsyth: have you tried os.Stat("../" ? 22:06 < dforsyth> no, again stating the directory is not the problem 22:06 < str1ngs> because I'm pretty sure relative paths work 22:06 < str1ngs> ok whats the problem? 22:07 < dforsyth> it would be convinient to me if that entry was already in the results from os.ReadDir 22:07 < Rennex> yeah, this time 22:07 < dforsyth> its not like i dont know theyre there, or that theyre unreachable 22:07 < dforsyth> Rennex: yes, this time 22:07 < str1ngs> 9/10 times its not though is my point 22:07 < Rennex> what's convenient for you in one occasion isn't necessarily the wise thing to implement in a library ;) 22:08 < dforsyth> Rennex: its a system language, this shouldnt be something that is skipped 22:08 < Rennex> i don't agree 22:08 < dforsyth> okay 22:08 < Rennex> because they are not files in that dir 22:09 < crazy2be> here's why i don't agree 22:09 < Rennex> they are names for that dir and its parent 22:09 < crazy2be> because they always exist 22:09 < crazy2be> they are implicit 22:09 < str1ngs> yes be we all know they exist 22:09 -!- nighty__ [~nighty@tin51-1-82-226-147-104.fbx.proxad.net] has quit [Ping timeout: 260 seconds] 22:09 < crazy2be> so getting them from a directory listing function has no use 22:09 < crazy2be> since they are static 22:09 < crazy2be> known at the time of writing 22:10 < crazy2be> returning them in the map would be a waste of memory 22:10 < crazy2be> and a pain most of the time 22:10 < str1ngs> not only that but you have to filter them out 22:10 < dforsyth> theyre getting filtered anyway 22:10 < str1ngs> which would be more work in the long run for people. then you adding them to your file browser 22:11 < Rennex> even in a shell, i don't think "." and ".." should ever be included in a file listing, and especially the pattern ".*" shouldn't match ".." as well 22:11 < steven> ive seen .. used a lot in production code. 22:11 < steven> path = dirname(__FILE__) + "/../../../somefile" 22:12 < Rennex> that is a completely different matter though 22:12 < steven> and i have to tell ya, im not a fan. 22:12 < str1ngs> steven: or inclusion type languages that hard to get around ie ruby 22:13 < str1ngs> if they use absolute paths and you move the app it breaks 22:13 < skelterjohn> what you should do is have a APP_ROOT global variable 22:13 < skelterjohn> and do things like APP_ROOT+"/something else" 22:13 < skelterjohn> rather than ..s 22:13 < str1ngs> aye that cleaner 22:14 < skelterjohn> initialize APP_ROOT correctly at the beginning 22:14 < Rennex> steven: used like that they are doing what they're meant for, i.e. to signify "parent dir". When a file listing says "this dir contains the file 'foo' and the dir 'bar' and also itself and its parent", anyone would say "wtf?" if they hadn't gotten used to it :) 22:15 < dforsyth> you're assuming i want this done on the directory my app is in 22:15 < skelterjohn> just because they're using ".." as intended doesn't make it a good thing:) 22:16 < Rennex> that's true, they're quite unreadable. especially when you have more than one ".." - one i'm just about fine with 22:16 < str1ngs> filepath.Glob and profit 22:17 < str1ngs> Rennex: I was * would match .* thats annoying 22:22 -!- huin [~huin@91.85.185.181] has quit [Quit: leaving] 22:26 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts 22:30 -!- zimsim [~simon@87.72.77.195] has quit [Remote host closed the connection] 22:37 -!- kamaji [~kamaji@cpc2-aztw22-2-0-cust775.aztw.cable.virginmedia.com] has quit [Quit: leaving] 22:37 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org] 22:41 -!- boscop [~boscop@f055112013.adsl.alicedsl.de] has joined #go-nuts 22:42 -!- ukai [~ukai@nat/google/x-iyfodgmovgxvavgn] has quit [Ping timeout: 240 seconds] 22:45 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4] 22:45 -!- krutcha1 [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Quit: Leaving] 22:45 -!- dju__ [dju@fsf/member/dju] has quit [Quit: Quitte] 22:56 -!- Tuller [~tuller@c-68-33-63-208.hsd1.va.comcast.net] has joined #go-nuts 22:59 -!- virtualsue [~chatzilla@nat/cisco/x-btxvoreqdosakzsd] has quit [Ping timeout: 252 seconds] 23:01 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Excess Flood] 23:02 -!- Tuller [~tuller@c-68-33-63-208.hsd1.va.comcast.net] has quit [Quit: muffins] 23:07 < steven> skelterjohn: we have both. its kidna gross the way it works. 23:08 -!- rtharper [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed the connection] 23:08 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has joined #go-nuts 23:09 -!- ukai [~ukai@nat/google/x-txmogypglguivovp] has joined #go-nuts 23:10 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts 23:18 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-166-222.clienti.tiscali.it] has quit [Quit: E se abbasso questa leva che succ...] 23:18 -!- _Eko_ [~eko@c-24-130-224-186.hsd1.ca.comcast.net] has joined #go-nuts 23:19 -!- ExtraSpice [XtraSpice@88.118.35.153] has quit [Ping timeout: 276 seconds] 23:21 -!- GoBIR [~gobir@c-24-130-224-186.hsd1.ca.comcast.net] has quit [Ping timeout: 276 seconds] 23:21 -!- Eko [~eko@c-24-130-224-186.hsd1.ca.comcast.net] has quit [Ping timeout: 246 seconds] 23:23 -!- GoBIR [~gobir@c-24-130-224-186.hsd1.ca.comcast.net] has joined #go-nuts 23:33 -!- pphalen [~pphalen@66.92.11.149] has left #go-nuts [] 23:35 < steven> guys gusy gusy gsuyg usygsu gysu gusy guys guys!!!! 23:35 < steven> !!!! 23:35 < steven> quick!!!!!!! 23:35 < steven> i have a quesiton!! 23:35 < steven> oh wait nm. 23:36 < crazy2be> lol 23:37 < crazy2be> putting that many !!!!! makes me want to ignore your question :P 23:41 -!- tensorpudding [~user@99.148.205.193] has joined #go-nuts 23:42 < steven> btw, how do you recommend iterating over a directory's contents (to only one level, ie without delving into any subdirectories) in Go? 23:43 < crazy2be> os.Readdirnames? 23:43 < dforsyth> this FileInfo has no Name... 23:43 < steven> sure it does. just try harder. 23:46 -!- boscop [~boscop@f055112013.adsl.alicedsl.de] has quit [Ping timeout: 240 seconds] 23:47 < steven> what the heck! 23:48 < steven> os.Open's second 2 parameters are not documented. i dont know what valid values are. 23:48 < crazy2be> what? 23:48 < crazy2be> durp 23:48 < steven> name string, flag int, perm uint32 23:48 < crazy2be> flag is os.O_SOMEFLAG 23:48 < steven> oh 23:48 < crazy2be> perm is standard unix permissions 23:49 < steven> i do NOT like typing 0666 #sigh 23:49 < crazy2be> 0666? 23:49 < crazy2be> why? 23:49 < steven> ... 23:49 < crazy2be> you almost always want 0644, don't you? 23:49 < steven> havent read Revelation, have you? 23:49 < steven> probably. 23:50 < crazy2be> well i would assume you don't like it because it means it's world-writable 23:50 * steven can never remember how to translate unix permissions into those octal numbers 23:50 -!- Scorchin [~Scorchin@host109-156-219-102.range109-156.btcentralplus.com] has quit [Quit: Scorchin] 23:50 < crazy2be> which is enough to give anyone shivvers 23:50 < steven> ha 23:50 < dforsyth> is an empty name ever expected behavior from os.Stat? 23:52 < crazy2be> dforsyth: never happened to me... 23:52 < crazy2be> anyone know if there is an alternative to os/inotify for macs? 23:53 < steven> yes, there is. i dont think it's in Go though 23:53 < steven> but it exists in C on mac 23:53 < steven> its called, 23:53 < dforsyth> kqueue 23:53 < dforsyth> ? 23:53 < steven> noooo 23:54 < steven> FSEvents i think 23:54 < crazy2be> hmmm 23:54 < steven> yeah, FSEvents. ive used it in the past to be notified when a directory has changed. 23:54 < steven> (when its contents have changed rahter) 23:54 < steven> good C api 23:55 < steven> i think its the same api spotlight `mds` uses to recache for spotlight 23:55 < steven> (as opposed to kqueue) --- Log closed Mon Mar 28 00:00:50 2011