--- Log opened Mon Feb 28 00:00:29 2011 00:00 < SmoothPorcupine> So os.Status would be preferable to os.Exit, yes? 00:01 < nickbp> neither would be preferable to proper panics 00:01 < Namegduf> That does not force that convention. 00:01 -!- ako [~nya@fuld-4d00d200.pool.mediaWays.net] has quit [Ping timeout: 240 seconds] 00:02 < SmoothPorcupine> Okay, I can't tell if either of you is saying yes or no. 00:03 < nickbp> theyre both bad ideas 00:03 < Namegduf> You failed to prove that claim. It doesn't prove whether it's true or false. 00:04 -!- aho [~nya@fuld-4d00d206.pool.mediaWays.net] has joined #go-nuts 00:05 -!- Scorchin [~Scorchin@host109-156-11-12.range109-156.btcentralplus.com] has quit [Quit: Scorchin] 00:05 < SmoothPorcupine> Again, I'm not able to deduce, or induce, for that matter, your opinions on Status vs. Exit. 00:07 < Namegduf> I've not yet seen a full analysis of the pros vs cons of each. So I don't have one that'll stand up for discussion. 00:08 < SmoothPorcupine> I'm not asking you to decide the fate of Go. 00:08 < Namegduf> Aw. 00:09 < SmoothPorcupine> Personally, when I'm reading code, I'd like to be able to be certain that any given function I'm reading is going to complete. 00:10 < SmoothPorcupine> If I see a return, I know it completes there. 00:11 < SmoothPorcupine> If there's an underlying os.Exit or panic in one of the functions that I haven't read the source to yet, it takes that much longer to understand the code. 00:11 < SmoothPorcupine> It probably doens't help that the last thing I read the source code of is an init program in C. <_< 00:11 < Namegduf> I agree. This is solved by conventions against them outside of the current package. 00:12 < Namegduf> (Or at all, in the case of os.Exit) 00:12 < SmoothPorcupine> God that flow control there is a pain in the ass. 00:12 < SmoothPorcupine> doesn't* 00:13 < SmoothPorcupine> So it's okay to confuse me in intrapackage source? 00:14 < SmoothPorcupine> See, I don't think conventions solve anything. 00:15 < Namegduf> There's no such thing as intrapackage source. 00:15 < Namegduf> Source is either in one package or another. 00:15 < SmoothPorcupine> Intra, not inter. 00:15 < Namegduf> If you are editing code in one package, and it uses panics, you should be aware of it. 00:16 < Namegduf> A package is the unit of encapsulation in Go, you should be aware of what all the functions in one you're working on do and any panics used. 00:16 < SmoothPorcupine> Yes, obviously. 00:16 < Namegduf> So you shouldn't be confused there, either. 00:17 < SmoothPorcupine> So what you're saying is, within any given package, the source code can be as obfuscated as it wants and that's not a problem at all on any level whatsoever? 00:19 < Namegduf> No. 00:19 -!- shvntr [~shvntr@116.26.128.97] has joined #go-nuts 00:20 < SmoothPorcupine> If it were possible, code wouldn't need documentation because it is easier and faster to read the code. This would be ideal, yes? 00:21 < SmoothPorcupine> And I stress, if it were possible. 00:26 < |Craig|> its not that the code does not need documentation, but rather the code is the documentation 00:27 -!- artefon [~thiago@189.59.178.97.dynamic.adsl.gvt.net.br] has joined #go-nuts 00:31 < SmoothPorcupine> Yes, but if you don't mind reading code, that possibility is always open. 00:32 < SmoothPorcupine> Ideally, the code is so straighforward that no natural language can get you a grasp of the code with less effort than simply reading the code. 00:33 -!- deso_ [~deso@x0561a.wh30.tu-dresden.de] has quit [Remote host closed the connection] 00:55 -!- boscop [~boscop@f055197020.adsl.alicedsl.de] has quit [Ping timeout: 240 seconds] 00:57 -!- artefon [~thiago@189.59.178.97.dynamic.adsl.gvt.net.br] has quit [Quit: bye] 01:01 < mdxi> hah! i just barely saved myself from asking a really stupid question, at the last second! 01:01 < fzzbt> is anyone familiar with the template package? i always get warnings like "name not exported: title in type main.dBase". Is there anyway to avoid exporting all my struct fields to get template use them or should i just export every field? 01:01 < mdxi> so now i'll share it with the group: 'fmt.Printf("%x", time.Nanoseconds)' is completely valid, executable code, but almost certainly doesn't do what you want 01:02 < fzzbt> did you forget () 01:04 < fzzbt> i like how in scala, for example, you can leave () out and things actually work like one would expect 01:07 < mdxi> yes, it should be 'time.Nanoseconds()'. and that works in Perl as well, because it's obvious that you're making a method call, and not wanting to know where the coderef lives in memory 01:07 < mdxi> the part i'm actually surprised by is being handed a function's address. i would have expected that to be a compile error. 01:10 -!- vsayer [~vivek@c-76-102-205-58.hsd1.ca.comcast.net] has quit [Read error: Connection reset by peer] 01:11 -!- vsayer [~vivek@c-76-102-205-58.hsd1.ca.comcast.net] has joined #go-nuts 01:11 < mdxi> i was thinking in Perl because i'm writing something in Perl5 and then planning to turn around and implement it in Go as well, adn i was doing a tiny little benchmark in both languages (generating 10,000 UUIDs) 01:12 < mdxi> they're both the same speed for all practical purposes, but that makes sense. reading from urandom and formatting bytes as a string are gonna boil down the same code in both runtimes, i imagine 01:12 < Namegduf> Perl isn't compiled, so it won't generate code. 01:12 < Namegduf> But your example is probably dominated by time to do I/O. 01:12 < mdxi> i'm well aware of how perl is implemented :) 01:12 < SmoothPorcupine> Yeah it's amazing how insignificantly little functions are ever needed as first class objects. 01:13 -!- saturnfive [~saturnfiv@210.74.155.131] has joined #go-nuts 01:14 < mdxi> Perl scripts aren't compiled (to native code). Perl itself *is*, and the code to read from files lives in the Perl runtime itself. 01:16 < Namegduf> Well, it doesn't live in the Go runtime. 01:16 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 01:16 < Namegduf> It'll be going through the syscall and os implementations. 01:16 < Namegduf> But it doesn't matter much. 02:02 -!- freetz [~fritz@r74-195-233-91.stl1cmta01.stwrok.ok.dh.suddenlink.net] has joined #go-nuts 02:11 -!- kkress [~kkress@2001:470:1:41::403e:ad36] has quit [Remote host closed the connection] 02:14 < mdxi> oh wow. i just built the new release and now it takes roughly 0.9 seconds instead of 0.6 :( 02:19 < mdxi> and 0.5 instead of 0.3 on another machine 02:36 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|] 02:39 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts 02:43 -!- freetz [~fritz@r74-195-233-91.stl1cmta01.stwrok.ok.dh.suddenlink.net] has quit [Ping timeout: 276 seconds] 02:54 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error: Connection reset by peer] 02:56 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 02:58 -!- napsy [~luka@88.200.96.18] has quit [Quit: leaving] 03:11 -!- nettok [~quassel@200.119.188.129] has quit [Ping timeout: 252 seconds] 03:29 -!- ako [~nya@fuld-590c6913.pool.mediaWays.net] has joined #go-nuts 03:31 -!- aho [~nya@fuld-4d00d206.pool.mediaWays.net] has quit [Ping timeout: 240 seconds] 03:43 -!- adu [~ajr@softbank220043139062.bbtec.net] has joined #go-nuts 03:47 -!- adu [~ajr@softbank220043139062.bbtec.net] has quit [Client Quit] 03:49 -!- nettok [~quassel@200.119.188.129] has joined #go-nuts 04:08 -!- edsrzf_ [~kelvan@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts 04:17 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 246 seconds] 04:29 -!- joatmon54 [~engest@cpe-98-155-50-70.san.res.rr.com] has joined #go-nuts 04:32 -!- adu [~ajr@softbank220043139062.bbtec.net] has joined #go-nuts 04:43 -!- adu [~ajr@softbank220043139062.bbtec.net] has quit [Quit: adu] 04:45 < plexdev`> http://is.gd/8JnUSo by [Russ Cox] in go/src/pkg/runtime/ -- runtime: idle goroutine 04:48 -!- adu [~ajr@softbank220043139062.bbtec.net] has joined #go-nuts 04:49 -!- nettok [~quassel@200.119.188.129] has quit [Ping timeout: 276 seconds] 04:55 -!- ako [~nya@fuld-590c6913.pool.mediaWays.net] has quit [Quit: EXEC_over.METHOD_SUBLIMATION] 04:56 -!- exch [~exch@h78233.upc-h.chello.nl] has quit [Read error: Connection reset by peer] 05:14 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Read error: Connection reset by peer] 05:14 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined #go-nuts 05:18 -!- SmoothPorcupine [~smooth@207.224.112.146] has left #go-nuts ["The lesson here is that prematurely unwinding the stack is okay."] 05:19 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has joined #go-nuts 05:24 -!- itrekkie [~itrekkie@ip72-211-129-122.tc.ph.cox.net] has joined #go-nuts 05:28 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Read error: Connection reset by peer] 05:28 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined #go-nuts 05:31 -!- adu [~ajr@softbank220043139062.bbtec.net] has quit [Quit: adu] 05:32 -!- itrekkie [~itrekkie@ip72-211-129-122.tc.ph.cox.net] has quit [Quit: itrekkie] 05:39 -!- coldturnip [~COLDTURNI@111-250-25-45.dynamic.hinet.net] has quit [Read error: Connection reset by peer] 05:40 -!- coldturnip [~COLDTURNI@111-250-25-45.dynamic.hinet.net] has joined #go-nuts 05:46 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving] 05:47 -!- ronnyy [~quassel@p4FF1C65D.dip0.t-ipconnect.de] has joined #go-nuts 05:50 -!- franksalim [~frank@99-123-5-179.lightspeed.sntcca.sbcglobal.net] has quit [Ping timeout: 264 seconds] 05:56 -!- dario [~dario@domina.zerties.org] has quit [Ping timeout: 264 seconds] 05:56 -!- dario [~dario@domina.zerties.org] has joined #go-nuts 06:00 -!- ronnyy [~quassel@p4FF1C65D.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 06:09 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has quit [Remote host closed the connection] 06:10 -!- dario [~dario@domina.zerties.org] has quit [Ping timeout: 276 seconds] 06:10 -!- fabled [~fabled@mail.fi.jw.org] has joined #go-nuts 06:10 -!- dario [~dario@domina.zerties.org] has joined #go-nuts 06:18 -!- vice_virtue [~vice@220-253-155-109.VIC.netspace.net.au] has joined #go-nuts 06:19 < vice_virtue> Does anyone know the current status of possible plans to implement generics in Go? 06:25 < vice_virtue> I suppose that's a 'no' 06:39 -!- joatmon54 [~engest@cpe-98-155-50-70.san.res.rr.com] has quit [Quit: Ex-Chat] 06:40 -!- adu [~ajr@softbank220043138128.bbtec.net] has joined #go-nuts 06:41 -!- raylu [raylu@c-24-131-193-106.hsd1.pa.comcast.net] has left #go-nuts [] 06:51 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has joined #go-nuts 06:57 -!- shvntr [~shvntr@116.26.128.97] has quit [Ping timeout: 240 seconds] 06:58 -!- shvntr [~shvntr@116.26.128.97] has joined #go-nuts 07:04 -!- femtoo [~femto@95-89-248-242-dynip.superkabel.de] has joined #go-nuts 07:11 -!- ExtraSpice [XtraSpice@78-62-101-194.static.zebra.lt] has joined #go-nuts 07:14 -!- tensai_cirno [~cirno@nat.canmos.ru] has joined #go-nuts 07:19 -!- piranha [~piranha@5ED4B890.cm-7-5c.dynamic.ziggo.nl] has joined #go-nuts 07:33 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts 07:38 -!- pothos [~pothos@111-240-167-156.dynamic.hinet.net] has quit [Remote host closed the connection] 07:39 -!- pothos [~pothos@111-240-167-156.dynamic.hinet.net] has joined #go-nuts 07:47 -!- piranha [~piranha@5ED4B890.cm-7-5c.dynamic.ziggo.nl] has quit [Quit: Computer has gone to sleep.] 07:59 -!- wrtp [~rog@92.17.33.100] has joined #go-nuts 08:01 -!- femtoo [~femto@95-89-248-242-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 08:09 -!- mbernstein [~michael@cpe-70-113-7-72.austin.res.rr.com] has quit [Read error: Operation timed out] 08:10 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts 08:15 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has joined #go-nuts 08:17 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts 08:23 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts 08:28 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has quit [Remote host closed the connection] 08:32 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal] 08:37 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|] 08:52 -!- photron [~photron@port-92-201-122-75.dynamic.qsc.de] has joined #go-nuts 08:52 -!- dju_ [dju@fsf/member/dju] has joined #go-nuts 08:52 -!- dju [dju@fsf/member/dju] has quit [Ping timeout: 240 seconds] 09:00 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has joined #go-nuts 09:12 -!- gstrock [~gstrock@adsl-75-38-17-164.dsl.irvnca.sbcglobal.net] has joined #go-nuts 09:17 -!- serbaut1 [~joakims@88.80.182.68] has quit [Read error: Connection reset by peer] 09:17 -!- dshep [~user@24.130.32.125] has quit [Ping timeout: 246 seconds] 09:24 -!- serbaut [~joakims@88.80.182.68] has joined #go-nuts 09:36 -!- rlab [~Miranda@226-106-113-92.pool.ukrtel.net] has joined #go-nuts 09:39 < str1ngs> I'm creating some bindings to libalpm . and I'm working on the _test.go file. for some of the tests I need to init libalpm . is there away to not have to do that for each method test? 09:43 < edsrzf_> If initializing is a one-time thing, you could put it in the init function in the _test.go file. 09:43 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-170-138.clienti.tiscali.it] has joined #go-nuts 09:46 < str1ngs> edsrzf_: ok thanks I was thinking that. only issue is how to I test the Init() function then? 09:46 < edsrzf_> What do you mean? 09:47 < str1ngs> well Init() is one of the methods I need to test 09:47 < str1ngs> if I put it in init() and it fails 09:47 < str1ngs> also I need to release after 09:48 < edsrzf_> Ah, yeah, that's what I was wondering. If you need to release it, then maybe init isn't the way to go. 09:49 < str1ngs> ok what I'm doing now is I call Init then run test. and defer Release 09:49 < edsrzf_> I'm not sure if there's a very good way to do things without just calling the Init method at the beginning of each test that needs it. 09:50 < str1ngs> hold on I'll post some code will help 09:50 < vice_virtue> you could use a separate test file to test the initialisation 09:51 < str1ngs> https://gist.github.com/847142 09:51 < str1ngs> vice_virtue: ah that's a good idea 09:51 < str1ngs> vice_virtue: still not sure how I'd handle Release though useing init() 09:52 < edsrzf> I think you'd have no choice but to leak. 09:52 < vice_virtue> or put the code in init() into a function by another name, and write a test case with a different signature (not (TestXXX, something else) and test it in a separate execution 09:52 < edsrzf> And if you put the Init test in a separate file your init in the other file will still run, giving you double Init calls. I don't know if that's a problem or not. 09:53 < str1ngs> edsrzf: ya I'd have to check the C code see if it is 09:53 < vice_virtue> that's true 09:53 < str1ngs> imo probably beset to make each test function isolated 09:54 < str1ngs> its more typing but.. imo safer 09:55 < str1ngs> ya think I'll keep is this way for now. thanks for the help 09:58 < str1ngs> also does this cast seem right (*[0]uint8)(C.alpm_list_getdata(i)) C.alpm_list_getdata returns a unsafe.Pointer 10:00 -!- photron [~photron@port-92-201-122-75.dynamic.qsc.de] has quit [Ping timeout: 264 seconds] 10:01 -!- edsrzf [~kelvan@122-61-221-144.jetstream.xtra.co.nz] has quit [Ping timeout: 252 seconds] 10:02 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 10:10 -!- tvw [~tv@212.79.9.150] has joined #go-nuts 10:18 -!- saturnfive [~saturnfiv@210.74.155.131] has quit [Read error: Connection reset by peer] 10:22 -!- boscop [~boscop@f055002005.adsl.alicedsl.de] has joined #go-nuts 10:30 -!- tensorpudding [~user@99.23.127.179] has quit [Read error: Connection reset by peer] 10:32 -!- snearch [~snearch@f053013016.adsl.alicedsl.de] has joined #go-nuts 10:32 -!- jokoon [~zonax@feu30-1-82-242-58-229.fbx.proxad.net] has joined #go-nuts 10:36 < jokoon> question: in theory, is go as equally fast compared to C/C++, or is it still in the same order of magnitude ? 10:36 < jokoon> I mean on the big picture 10:37 < str1ngs> jokoon: from what I have read. and my experience go is not optimized at this time. but.. that does make it slow either 10:38 < jokoon> at this time, but in theory, with maturity it will be 10:38 < str1ngs> yes 10:40 < vice_virtue> With maturity, go should be as quick as a C++ program using concurrency well and making use of RTTI. 10:40 < str1ngs> jokoon: how are there are something that are on a order faster then C. ie with out tests you can build the go tree in about 40s 10:41 < jokoon> str1ngs yes but that's because go doesn't use headers 10:42 < str1ngs> and handles dependancies alot better. some would call that a feature 10:42 < str1ngs> ever have to build a gcc toolchain? 10:42 < jokoon> and I mean execution time, not compile time, even if such quick compile time is very interesting though 10:43 -!- snearch [~snearch@f053013016.adsl.alicedsl.de] has quit [Quit: Verlassend] 10:43 < jokoon> sadly I'm more a MSVC user at the current time, but I'm becoming sick of C++ 10:44 < jokoon> it's so easy to write good c, but so harder to write good C++ 10:45 < vice_virtue> I'm rewriting in Go a distributed system I wrote in C++ . There's not a lot I miss from C++ 10:45 < jokoon> I installed go on a C++ eclipse 10:45 < jokoon> how do I use it ? 10:45 < vice_virtue> But there are things I miss from other languages. Namely, list comprehensions, generics (for zip, map, fold, etc) 10:46 < jokoon> found it 10:46 -!- artefon [~thiago@189.59.178.97.dynamic.adsl.gvt.net.br] has joined #go-nuts 10:47 < jokoon> vice_virtue well there are not very present in native executable compiled languages 10:47 < jokoon> I don't know about C# 10:47 < jokoon> but my guess is that they will come one day :) 10:48 < jokoon> maybe not list comprehension 10:48 < jokoon> what are fold ? 10:49 < vice_virtue> I know, but most natively compiled languages are ancient. Haskell has them, though 10:49 < jokoon> is haskell compiled ? 10:49 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has quit [Quit: Caught signal 15, Terminated] 10:49 < vice_virtue> Yes 10:54 < vice_virtue> foldl (left fold) takes a list (xs), a function (f(a,b)->a), and an initial value (x). I'm finding it hard to describe in one line 10:55 < vice_virtue> calls to f(a,b) are performed, initially f(x, <head of xs>), and the result of each call is substituted for 'a' in the next call 10:56 < fzzbt> using the template package, how can you have delimiter characters in your template without causing the template to think that they are template variables? 10:56 < vice_virtue> http://www.haskell.org/haskellwiki/Fold does a much better job of explaining it 10:56 < Rennex> aka inject or reduce 11:00 * vice_virtue wishes SCTP was more well supported by operating systems and household routers 11:01 < vice_virtue> Wishing doesn't make things happen, though. 11:03 * ww has seen pretty little use of sctp outside the lab 11:04 < Rennex> gotta love reduce in ruby.. if you don't give it an initial value, it starts with the first two values of the list. And for simple cases you don't need to give it a code block, the name of a method suffices. so array.reduce(:*) would multiply all the values together :) 11:07 < vice_virtue> Rennex, there's a form of foldl in Haskell which does the same 11:09 < Rennex> yeah 11:10 < vice_virtue> But do you remember what it's called? I forget... 11:11 < vice_virtue> ah foldl1 11:11 < vice_virtue> (great name) 11:11 < Rennex> heh 11:13 < Rennex> i still haven't delved properly into Go, but it seems like interfaces would be the perfect way to support generics and it's a shame if they aren't already available as standard :I 11:14 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the connection] 11:15 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has joined #go-nuts 11:16 < vice_virtue> I'm not sure I fully understand, Rennex, do you mean akin to type classes in Haskell (where you can say that any Num, or Ord can be used as an certain argument?), or in having functions which take the empty interface as arguments/return values 11:18 -!- Fish [~Fish@exo3753.pck.nerim.net] has quit [Ping timeout: 250 seconds] 11:18 < vice_virtue> I think they're fairly similar to type classes, more so if operator overloading was supported. But apparently there's a fair bit of boilerplate in checking the consistency of types in arguments.. and I think I remember reading that reflect cannot be used to construct types 11:20 < Rennex> err, hmm. i only thought about a generic container that you could iterate over, but didn't think about handling the actual values that come out, and the need for polymorphism there.. but i'm sleepy and a go noob :) 11:20 -!- Fish [~Fish@exo3753.pck.nerim.net] has joined #go-nuts 11:32 < wrtp> go interfaces are more akin to hakell's Type.Dynamic than type classes 11:32 < wrtp> sorry, i meant Data.Dynamic 11:33 < wrtp> except they're more powerful than Data.Dynamic because of the subset/superset semantics 11:33 < wrtp> go doesn't support the usual lists operations, mainly i think because they make it very easy to write inefficient code 11:34 < wrtp> s/lists/list/ 11:34 < wrtp> doing generics right in go is a hard problem 11:39 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Ping timeout: 272 seconds] 11:41 -!- visof [~visof@unaffiliated/visof] has quit [Quit: Leaving] 11:45 -!- shvntr [~shvntr@116.26.128.97] has quit [Quit: leaving] 11:47 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has quit [Quit: Caught signal 15, Terminated] 11:48 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has joined #go-nuts 11:53 -!- vice_virtue [~vice@220-253-155-109.VIC.netspace.net.au] has quit [Ping timeout: 240 seconds] 11:53 -!- cenuij [~cenuij@78.112.41.178] has joined #go-nuts 11:53 -!- cenuij [~cenuij@78.112.41.178] has quit [Changing host] 11:53 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts 11:58 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts 12:00 -!- rlab [~Miranda@226-106-113-92.pool.ukrtel.net] has quit [Ping timeout: 240 seconds] 12:01 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts 12:06 -!- adu [~ajr@softbank220043138128.bbtec.net] has quit [Quit: adu] 12:09 -!- aiju [~aiju@phicode.de] has quit [Quit: ZNC - http://znc.sourceforge.net] 12:10 -!- aiju [~aiju@unaffiliated/aiju] has joined #go-nuts 12:12 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has quit [Quit: Caught signal 15, Terminated] 12:12 -!- saturnfive [~saturnfiv@219.144.170.129] has joined #go-nuts 12:13 -!- saturnfive [~saturnfiv@219.144.170.129] has left #go-nuts [] 12:14 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has joined #go-nuts 12:21 -!- adu [~ajr@softbank220043138128.bbtec.net] has joined #go-nuts 12:38 -!- rlab [~Miranda@125-236-95-178.pool.ukrtel.net] has joined #go-nuts 13:00 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the connection] 13:02 -!- tensai_cirno [~cirno@nat.canmos.ru] has quit [Quit: Leaving] 13:21 -!- foocraft [~dsc@78.101.228.183] has joined #go-nuts 13:22 -!- jokoon [~zonax@feu30-1-82-242-58-229.fbx.proxad.net] has quit [Quit: Leaving] 13:32 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has joined #go-nuts 13:42 -!- adu [~ajr@softbank220043138128.bbtec.net] has quit [Quit: adu] 13:42 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4] 13:58 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts 14:00 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts [] 14:03 -!- mbernstein [~michael@cpe-70-113-7-72.austin.res.rr.com] has joined #go-nuts 14:12 -!- KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] has quit [Excess Flood] 14:13 -!- KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] has joined #go-nuts 14:13 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal] 14:16 -!- shvntr [~shvntr@116.26.128.97] has joined #go-nuts 14:16 -!- plainhao [~plainhao@208.75.85.237] has joined #go-nuts 14:18 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts 14:24 -!- femtoo [~femto@95-89-196-177-dynip.superkabel.de] has joined #go-nuts 14:29 -!- saturnfive [~saturnfiv@219.144.170.129] has joined #go-nuts 14:29 -!- saturnfive [~saturnfiv@219.144.170.129] has left #go-nuts [] 14:32 -!- adu [~ajr@softbank220043139062.bbtec.net] has joined #go-nuts 14:32 -!- visof [~visof@unaffiliated/visof] has quit [Quit: Leaving] 14:43 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has joined #go-nuts 14:44 < foocraft> http://www.amazon.com/Happy-Hacking-Keyboard-Lite2-Black/dp/B0000U1DJ2/ref=sr_1_1?ie=UTF8&s=electronics&qid=1298904350&sr=8-1 14:46 < rm445> spam? 14:54 -!- jeng [~jeng@74.194.1.28] has joined #go-nuts 14:54 < skelterjohn> he probably found his buckling-spring keyboard 14:55 < rm445> ah okay, apologies 14:57 < skelterjohn> not buckling spring, but one review says it is comparable to the IBM Model M he was lusting after 14:58 -!- artefon [~thiago@189.59.178.97.dynamic.adsl.gvt.net.br] has quit [Read error: Connection reset by peer] 15:00 -!- qjcg [~qjcg@208.88.110.46] has joined #go-nuts 15:00 -!- qjcg [~qjcg@208.88.110.46] has left #go-nuts [] 15:03 < jumzi> pfft typematrix is the shait 15:05 -!- sacho [~sacho@87-126-37-121.btc-net.bg] has joined #go-nuts 15:08 < skelterjohn> enter key in the middle? 15:08 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 15:10 -!- shvntr [~shvntr@116.26.128.97] has quit [Ping timeout: 240 seconds] 15:10 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has quit [Quit: skelterjohn] 15:11 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has quit [Read error: Connection reset by peer] 15:11 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has joined #go-nuts 15:16 < foocraft> yes!! 15:16 < foocraft> rm445, it's alright :) 15:17 < foocraft> I believe that kb would be useful for long sessions on a laptop as well. 1) put laptop on high level 2) attach happy hacking 3) Go! 15:18 < fzzbt> at least get pro model, not that membrane crap. 15:23 < foocraft> on happiness at a time :p 15:23 < foocraft> what's crappy about that one though? 15:27 < fzzbt> foocraft: the lite models have membrane switches, professionals have capacitive ones. 15:27 < foocraft> and the effect of that would be? 15:28 < fzzbt> foocraft: touch is better, lasts longer. 15:28 < plexdev`> http://is.gd/6jZ6is by [Mikio Hara] in go/src/pkg/syscall/ -- syscall: regenerate zerrors_freebsd_amd64.go 15:31 < foocraft> fzzbt, so it's more or less the same touch, but less durability, I take it. 15:35 < fzzbt> foocraft: maybe. I'd try to test it myself before buying if possible though. 15:37 < foocraft> my options are diminished anyway, cuz over here there are no such things available. I'll go full board on buying the pro version if the Lite edition is nice 15:38 -!- mattn_jp [~mattn@112-68-60-2f1.hyg1.eonet.ne.jp] has joined #go-nuts 15:40 -!- emjayess [~emjayess@pix1.i29.net] has joined #go-nuts 15:45 < adu> membrane? 15:55 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts 16:00 -!- ronnyy [~quassel@p4FF1C65D.dip0.t-ipconnect.de] has joined #go-nuts 16:06 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 16:07 < foocraft> is there any way I can use := assignment and specify that the number on the right is a unit64? 16:08 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 264 seconds] 16:08 < foocraft> adu, I think fzzbt would know more about that 16:09 < adu> oh 16:09 < adu> foocraft: yes, id := uint64(#) 16:10 < adu> or maybe id := #.(uint64) 16:10 < adu> i don't actually know which would be better 16:10 < rm445> the first one definitely works 16:10 < aiju> .(foo) is for interfaces and only for interfaces 16:11 < adu> foocraft: of what type is 'id'? 16:11 < foocraft> it should be a unint64 16:12 < foocraft> so id := uint64() worked 16:12 < adu> then you don't need anything 16:12 < foocraft> thanks adu 16:12 < adu> yw 16:12 < fzzbt> adu: there's lots of info here for example: http://geekhack.org/showwiki.php?title=START+HERE+--+The+Geekhack+Mechanical+Keyboard+Guide+-+Includes+Glossary+and+Links 16:12 < adu> the funny thing is I've never used Go 16:12 < adu> I'm just a language lawyer 16:13 < fzzbt> language lawyer? 16:13 < aiju> hahahaha 16:13 < foocraft> hehehe you serious? 16:13 < adu> yes 16:13 < foocraft> so you're from the functional programming and type theory land? 16:13 -!- fabled [~fabled@mail.fi.jw.org] has quit [Quit: Ex-Chat] 16:13 < adu> foocraft: yes, I've written dozens of things in Haskell 16:14 < foocraft> yeah recently I've been playing with these langs; scheme, haskell mostly and it seems like haskell can be a win 16:14 < foocraft> not sure if they would be useful for some real time system though 16:15 < foocraft> but that's because maybe I'm thinking too much about how badly haskell/scheme could've been implemented, given the high level nature of these langs 16:15 < adu> for RT i would go with C 16:15 < aiju> why do people always talk about RT 16:15 < adu> Go's GC has the potential to get in the way of RT guarantees 16:16 < foocraft> Java has been nice for a lot of things, surprisingly 16:16 < aiju> are you all busy designing pacemakers? 16:16 < foocraft> we're using it for a robotics course and it has not let us down... 16:16 < aiju> or w/e the applications for RT are 16:16 < foocraft> robotics, servers, games, etc. 16:17 -!- lmoura [~lauromour@186.215.0.3] has joined #go-nuts 16:17 < foocraft> these are all RT applications; pacemakers might use ada heh 16:17 < aiju> games? 16:17 < aiju> srsly? 16:17 < adu> games is the opposite of RT 16:17 < aiju> with games nobody gives a shit whether your timing is 1% off 16:17 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 16:17 < adu> RT is the kind of application where the difference between 30ms and 20ms can mean the difference between life and death 16:18 < adu> not the difference between playing and respawning 16:18 < foocraft> hmm isn't that a bit too restricted? 16:18 < foocraft> like in games you still want to be fast, or your FPS will drop and that would be not nice 16:18 < aiju> fast != RT 16:19 < aiju> RT is 20 ms or BUST 16:19 < aiju> where you in advance *exactly* what your timing has to be 16:19 -!- ymasory_ [~ymasory@c-76-99-55-224.hsd1.pa.comcast.net] has quit [Quit: Leaving] 16:19 < adu> right 16:20 < foocraft> oh okay, now I get it. so in this case what would be some good examples 16:20 < aiju> pacemakers 16:20 < foocraft> heh 16:20 < aiju> industrial machines 16:20 < aiju> I/O processors (bitbanging) 16:21 < foocraft> so a server isn't in that mix, because things don't really stop working if you're a bit late in giving a reply 16:21 < aiju> yeah 16:21 < aiju> at least most servers 16:21 < foocraft> robotics is RT though 16:21 < aiju> nobody gives a shit if your request is 50 ms late 16:22 < aiju> occasionally, that is 16:22 < aiju> robotics .. idk really 16:24 < rm445> Doesn't seem very productive to point out that a young, garbage-collected language is unsuited to real-time programming. Like, duh. 16:24 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.] 16:24 < aiju> hahaha 16:24 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts 16:24 -!- mode/#go-nuts [+v iant] by ChanServ 16:24 < aiju> rm445: i don't either why people are so obsessed with it 16:24 < aiju> +know 16:25 < aiju> i suppose they take the "general purpose" too seriously 16:25 < adu> i think RT is special purpose 16:25 < aiju> exactly 16:28 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping timeout: 240 seconds] 16:29 -!- iant [~iant@216.239.45.130] has joined #go-nuts 16:29 -!- mode/#go-nuts [+v iant] by ChanServ 16:29 < wrtp> hard real time vs soft real time 16:29 < wrtp> it would be good if go could get some way towards the latter 16:30 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has quit [Quit: Leaving.] 16:30 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has joined #go-nuts 16:33 < rm445> people come along and write special garbage collectors after a time, don't they, ones with known-bounded behaviour or whatever - but new languages tend to get something basic unless that's the specific thrust of the project. 16:34 -!- artefon [~thiagon@150.164.2.20] has joined #go-nuts 16:34 -!- viirya [~viirya@cml506-25.csie.ntu.edu.tw] has quit [Ping timeout: 252 seconds] 16:39 < aiju> return (x & ^((1 << uint64(n)) - 1)) == 0 16:39 < aiju> fuck yeah 16:40 < foocraft> this reminds me of how people deal with hashCode() in java :p 16:40 < foocraft> they take the hashCode of internal things then screw it a bit and return that 16:42 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has quit [Quit: Leaving.] 16:42 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has joined #go-nuts 16:42 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 16:44 < aiju> it actually justs checks whether a number fits into n bits 16:45 -!- femtoo [~femto@95-89-196-177-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 16:46 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts 16:47 -!- DerHorst [~Horst@e176096125.adsl.alicedsl.de] has joined #go-nuts 16:50 < aiju> ugh the weird inheritance in Go got me a few times 16:51 -!- Natch [~natch@c-6dcde155.25-4-64736c10.cust.bredbandsbolaget.se] has joined #go-nuts 16:53 < aiju> funnily enough i can't seem to find it in the language specs 16:54 < aiju> ah found it under "struct types", nm 16:54 -!- Natch| [~natch@c-6dcde155.25-4-64736c10.cust.bredbandsbolaget.se] has quit [Read error: Operation timed out] 16:55 < skelterjohn> you mean embedded types? 16:55 < aiju> the method set of structs contains all the methods of anonymous fields 16:55 < skelterjohn> right 16:55 < skelterjohn> anonymous fields = embedded types 16:55 < skelterjohn> i don't know if i made up that term or not 16:55 < aiju> i used to think of anonymous fields as fields which just happen to have the same name as the type 16:56 < skelterjohn> ah, no 16:56 < skelterjohn> though you can use them like that 16:56 < skelterjohn> if there is ambiguity 16:56 < aiju> this has caused problems in the past 16:56 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Quit: Computer has gone to sleep.] 16:59 -!- jokoon [~zonax@feu30-1-82-242-58-229.fbx.proxad.net] has joined #go-nuts 17:01 -!- Venom_X_ [~pjacobs@66.54.185.131] has joined #go-nuts 17:07 -!- adu [~ajr@softbank220043139062.bbtec.net] has quit [Quit: adu] 17:09 -!- imsplitbit [~imsplitbi@64.39.4.132] has joined #go-nuts 17:09 -!- cco3 [~conley@c-69-181-140-72.hsd1.ca.comcast.net] has quit [Ping timeout: 260 seconds] 17:12 -!- adu [~ajr@softbank220043139062.bbtec.net] has joined #go-nuts 17:13 -!- keithcascio [~keithcasc@nat/google/x-rbrslrilzrvangkf] has joined #go-nuts 17:18 -!- exch [~exch@h78233.upc-h.chello.nl] has joined #go-nuts 17:18 -!- piranha [~piranha@5ED4B890.cm-7-5c.dynamic.ziggo.nl] has joined #go-nuts 17:19 < wrtp> aiju: what kind of problems? 17:19 < wrtp> it's always worked very well for me :-) 17:23 < jokoon> btw GoClipse is telling me it couldnot do something when I create a new project 17:24 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection] 17:26 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se] has joined #go-nuts 17:28 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 264 seconds] 17:36 < aiju> wrtp: i didn't knew about it 17:36 < aiju> and i presumed it wouldn't allow passing a type to an interface 17:37 < wrtp> aiju: i'm not sure what you mean by that 17:40 < wrtp> i guess you mean "i didn't know the language, so i had problems with it"... :-) 17:42 < skelterjohn> that's what he's saying, yeah 17:44 -!- aconran [~aconran-o@38.104.129.126] has joined #go-nuts 17:45 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts 17:45 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 17:50 < aiju> haha 17:50 < wrtp> i thought maybe there was another pitfall somewhere which is why i was interested 17:50 < aiju> no, just my wrong assumptions 17:50 < aiju> i'll just refrain from using anonymous fields, then 17:53 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 246 seconds] 17:55 < wrtp> anonymous fields are really useful! 17:55 < wrtp> no need to refrain from using them, in general... 17:56 < aiju> duh 17:56 < aiju> type EIndex struct { Exp; I, J int } 17:57 < aiju> that's what i had 17:57 < aiju> and methods came out of nothing :D 17:58 -!- bXi [bluepunk@irssi.co.uk] has quit [Ping timeout: 264 seconds] 17:58 -!- saulhoward [~saulhowar@ip-87-82-198-146.easynet.co.uk] has joined #go-nuts 17:58 < wrtp> aiju: that's what anonymous fields are good for... 17:59 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 17:59 < wrtp> unrelated rant: how the *#!@ are you meant to use pthread condition variables correctly?! 17:59 < aiju> hahahahaha 17:59 < aiju> pthread is a pile of crap 18:00 < wrtp> i can't see how it's possible to use safely 18:01 < wrtp> the wakeup can always come between the mutex unlock and the pthread_cond_wait, and then the signal is lost so you block forever 18:01 < wrtp> i'm not surprised people don't like thread programming :-) 18:02 < __gilles> private memory space <3 18:02 -!- femtoo [~femto@95-89-196-177-dynip.superkabel.de] has joined #go-nuts 18:03 < wrtp> __gilles: ?! 18:04 -!- saulhoward [~saulhowar@ip-87-82-198-146.easynet.co.uk] has quit [Ping timeout: 240 seconds] 18:04 -!- qjcg [~qjcg@208.88.110.46] has joined #go-nuts 18:04 < wrtp> thread programming is just fine with channels. 18:04 < wrtp> it's just that pthreads make it almost impossible. 18:05 < wrtp> as far as i can see 18:09 -!- kkress [~kkress@kkress2.xen.prgmr.com] has joined #go-nuts 18:09 < __gilles> wrtp: im not a big fan of thread programming, i tend to do multi-process designs with ipc :p 18:10 < wrtp> yeah. 18:10 < wrtp> i 18:10 < wrtp> n 18:10 < wrtp> in this case, though, i've got to use pthread stuff 18:10 < wrtp> those are the only primitives i've got to work with (this is in a thread that's been started behind the scenes in a Go program) 18:12 < wrtp> there *must* be a way of using pthread_cond so that you can't miss a wakeup, but i can't work out how. 18:12 < aiju> mutexes are spawn of hell 18:12 < skelterjohn> if you have atomic variable read/writes, you can roll your own mutex 18:12 < skelterjohn> and forget about pthread utils 18:14 < wrtp> mutexes are fine 18:14 < wrtp> it's condition variables which are harder 18:14 < wrtp> because you need some way of blocking without spinningh 18:14 < wrtp> s/ingh/ing 18:14 < aiju> channels or GTFO 18:14 < wrtp> i can't use channels 18:14 < wrtp> that's the whole point 18:15 -!- visof [~visof@unaffiliated/visof] has quit [Quit: Leaving] 18:15 < tobier> wrtp: what's the problem with pthread condition variables? 18:15 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts 18:16 < wrtp> there's no problem, i've just realised that i'm very stupid 18:16 < wrtp> :-) 18:17 < wrtp> there, it works now. doh. 18:18 < wrtp> sorry about the unnecessary rant. 18:19 < skelterjohn> I know the feeling. 18:19 < nsf> condition variables in linux are kind of easy 18:19 < nsf> there is a thing called futex in linux 18:19 < nsf> http://gustedt.wordpress.com/2011/01/28/linux-futexes-non-blocking-integer-valued-condition-variables/ 18:20 < nsf> well.. not that easy 18:20 < nsf> but ok :) 18:24 < aiju> i shadow len all the tim 18:24 < aiju> *time 18:25 < aiju> you should never underestimate the time it takes to become accostumed to new reserved keywords :D 18:29 -!- deso_ [~deso@x0561a.wh30.tu-dresden.de] has joined #go-nuts 18:29 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts 18:31 < aiju> pointers to slices are awkward 18:32 < skelterjohn> i find that to be the case too 18:32 < skelterjohn> i avoid it 18:32 < plexdev`> http://is.gd/qv5iTg by [Rob Pike] in go/src/pkg/template/ -- template: document the delimiters better 18:34 < skelterjohn> being forced to write a little java, for one reason or another 18:34 < skelterjohn> i'm finding it very difficult 18:34 < skelterjohn> i keep forgetting semicolons 18:34 < skelterjohn> and putting the type after the variable 18:35 < skelterjohn> took me a while to realize that the for loop didn't compile because i wasn't parenthesizing it 18:37 -!- dshep [~dss@24.130.32.125] has joined #go-nuts 18:47 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-159-123.clienti.tiscali.it] has joined #go-nuts 18:48 -!- DerHorst [~Horst@e176096125.adsl.alicedsl.de] has quit [Remote host closed the connection] 18:50 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-170-138.clienti.tiscali.it] has quit [Ping timeout: 252 seconds] 18:51 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the Fish] 18:51 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts 18:52 < aiju> *r = (*r)[:len(*r)-1] 18:52 < aiju> almost feels like writing C 18:53 -!- femtoo [~femto@95-89-196-177-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 18:54 -!- adu [~ajr@softbank220043139062.bbtec.net] has quit [Quit: adu] 18:56 < rm445> (((*)(void *))0)(); etc :-) 18:56 < aiju> ee, ok := v.val.Fold(nil, o.syms).(arch.ENumber) 18:57 < aiju> now this feels like Java 18:57 < aiju> so many dots! 18:59 < skelterjohn> whenever i want to have a function with a slice as a receiver, i either put the slice inside a struct and do it that way, or have no receiver but return the new slice 18:59 < skelterjohn> much easier for me to mentally track 18:59 < KBme> oh yay http://seclists.org/bugtraq/2011/Feb/253 18:59 -!- Scorchin [~Scorchin@host86-150-163-45.range86-150.btcentralplus.com] has joined #go-nuts 18:59 < skelterjohn> KBme: yay? heh 19:00 < KBme> ;) 19:00 -!- belkiss [~kvirc@drn13-1-78-235-168-105.fbx.proxad.net] has joined #go-nuts 19:02 -!- dshep [~dss@24.130.32.125] has quit [Quit: leaving] 19:02 -!- dshep [~dss@24.130.32.125] has joined #go-nuts 19:04 -!- visof [~visof@unaffiliated/visof] has quit [Remote host closed the connection] 19:09 < str1ngs> I'm currently creating go bindings to libalpm. I used a cast.(*[0]uint8)(C.alpm_list_getdata(i)) but I'm not 100% if this ok or not? 19:09 < str1ngs> C.alpm_list_getdat() returns an unsafe.Pointer 19:09 < skelterjohn> i'm not sure i understand your snippet 19:09 < skelterjohn> that is valid go? 19:10 < skelterjohn> what is "cast.(*[0]uint8)" 19:10 < str1ngs> ya that was pasted wrong 19:10 < str1ngs> let me pastbin some code will be easier to understand 19:11 < str1ngs> https://gist.github.com/847834 19:12 < str1ngs> line 22 is what I'm worried about 19:12 < skelterjohn> what is the unsafe.Pointer returnedsuppose to be 19:12 < skelterjohn> a char**? 19:13 < str1ngs> no should return a struct let me check the C could 19:13 < rm445> why a pointer to an array of size zero of uint8? 19:13 < str1ngs> code* 19:14 < str1ngs> because thats all alpm_pkg_get_name will take 19:14 < skelterjohn> rm445: he is passing it right back to C, so it's a pointer to a pointer to a uint8 19:14 < str1ngs> my C weaker sorry 19:14 < str1ngs> why I'm asking here 19:15 < skelterjohn> it's hard to answer the question "is this ok?" 19:15 < skelterjohn> it all depends on what the C code does 19:15 < skelterjohn> and i've never heard of alpm 19:16 < rm445> skelterjohn: I haven't really done any unsafe stuff, sorry if I'm getting in the way, but I don't understand. He gets an unsafe.Pointer (pointing to a struct of some kind), then passes it back to C - what's the cast to *[0]uint8 about? 19:17 < skelterjohn> he says that is the type that alpm_pkg_get_name() wants for the parameter 19:17 < str1ngs> const char is char** ? 19:17 < skelterjohn> const char is const char 19:17 < skelterjohn> const is something that is applied to a type 19:17 < skelterjohn> char and char** are two different types 19:17 < jokoon> any 3D engine embryo in go ? :x 19:18 < skelterjohn> str1ngs: it would help if you could show me the function signatures for alpm_pkg_get_name and alpm_list_getdata 19:18 < str1ngs> skelterjohn: ya just doing that now 19:18 < skelterjohn> jokoon: not really, just some stuff for graphics 19:18 -!- tvw [~tv@e176004093.adsl.alicedsl.de] has joined #go-nuts 19:18 < skelterjohn> you should start one :) 19:18 < str1ngs> skelterjohn: const char SYMEXPORT *alpm_pkg_get_name(pmpkg_t *pkg) 19:19 < str1ngs> skelterjohn: do you want the header def 19:19 < skelterjohn> no 19:19 < skelterjohn> what does alpm_list_getdata return 19:20 < plexdev`> http://is.gd/n3fzBM by [Chris Dollin] in go/src/pkg/xml/ -- xml: permit nested directives 19:21 < skelterjohn> ? 19:21 < str1ngs> skelterjohn: https://gist.github.com/847851 19:22 < skelterjohn> lol, whatever a SYMEXPORT is 19:22 < skelterjohn> probably a macro 19:22 < str1ngs> I'll have to check what node->data is 19:22 < str1ngs> alpm_list_t is a type 19:22 < skelterjohn> when i google alpm_list_getdata, i see things like alpm_pkg_get_name(alpm_list_getdata(x)) 19:22 < skelterjohn> makes me think the types match 19:23 < skelterjohn> so just say, eg, thing := C.alpm_list_getdata(i); C.alpm_pkg_get_name(thing) 19:23 < skelterjohn> and don't worry about what the go type should look like 19:24 < str1ngs> aye but.. that didnt work in this guess which worried me 19:24 < str1ngs> s/guess/case 19:24 < skelterjohn> oh 19:24 < str1ngs> alpm_list_it is a list of lists 19:24 < str1ngs> this is the back end for pacman the package manager 19:25 < skelterjohn> for building stuff? 19:25 < str1ngs> ok let me do that and I post the error that will be better I think 19:26 < str1ngs> cannot use pkg (type unsafe.Pointer) as type *[0]uint8 in function argument 19:27 < skelterjohn> k, well, as long as you know that what is returned from alpm_list_getdata() should be passed to alpm_pkg_get_name(), i'd go ahead and do it like you're doing it 19:28 < str1ngs> skelterjohn: no for installing system packages. its used in Archlinux 19:28 < str1ngs> skelterjohn: ok. thanks 19:32 -!- PortatoreSanoDiI [~Marvin@82.84.90.91] has joined #go-nuts 19:35 -!- wtfness [~dsc@78.101.228.183] has joined #go-nuts 19:36 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-159-123.clienti.tiscali.it] has quit [Ping timeout: 272 seconds] 19:38 -!- PortatoreSanoDiI [~Marvin@82.84.90.91] has quit [Quit: E se abbasso questa leva che succ...] 19:46 -!- freetz [~fritz@nero.ceat.okstate.edu] has joined #go-nuts 19:56 -!- photron [~photron@port-92-201-122-75.dynamic.qsc.de] has joined #go-nuts 20:07 < plexdev`> http://is.gd/gYEtO4 by [Russ Cox] in go/src/ -- build: move $GOBIN ahead of /bin, /usr/bin in build $PATH 20:14 -!- evildho [~dho@onager.omniti.com] has joined #go-nuts 20:14 < evildho> iant: You happen to be around? 20:17 -!- thiago__ [~thiago@189.59.178.97.dynamic.adsl.gvt.net.br] has joined #go-nuts 20:19 -!- belkiss [~kvirc@drn13-1-78-235-168-105.fbx.proxad.net] has left #go-nuts ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"] 20:21 < skelterjohn> evildho? lol 20:21 < skelterjohn> are you sporting a goatee, now? 20:22 < evildho> heh, haven't had one for a little while 20:22 * evildho is having issues understanding why gcc can't find a general register in this asm 20:22 < skelterjohn> too low level for me 20:22 * evildho shakes fist at -fPIC 20:23 -!- dju_ [dju@fsf/member/dju] has quit [Quit: Quitte] 20:24 < skelterjohn> i don't know what -fPIC does 20:24 < skelterjohn> i just know it shows up in command lines a lot 20:24 < evildho> position independent code 20:25 < evildho> for e.g. dynamic libraries. you can't turn it off on darwin 20:25 < evildho> but how it's implemented is that it uses %ebx 20:25 < evildho> except fucking x86-32 is so register anemic that you basically have 3 other registers to use. so you have to push ebx, load ebx from memory, lock cmpxchg8b, pop ebx 20:26 < skelterjohn> sucks 20:26 < skelterjohn> i guess 20:27 < evildho> which is working fine in other places, but for some reason in this one place esi and edi are also used, and for some reason even though I have only memory, eax, edx, and ecx used, it is complaining that it can't find another register 20:27 < evildho> i don't know what it thinks it needs it for 20:28 < evildho> all the memory arguments can be offsets of ebp :( 20:29 < skelterjohn> i'm glad there are people who can think about these sorts of problems, so i don't have to 20:32 < aiju> x86-32 3 registers? 20:32 < aiju> more like 6 20:32 < evildho> with fPIC you have 5 20:32 <+iant> evildho: around 20:32 < aiju> why the fuck do people even TRY to write PIC on x86 20:32 < evildho> I'm saying that apparently edi/esi are being used for something 20:32 < evildho> aiju: I have to support it. Blame apple. 20:33 < evildho> iant: Mind looking at this code snippet and perhaps pointing out why esi/edi might be unavailable for gcc? 20:33 <+iant> sure, I can try 20:34 -!- jokoon [~zonax@feu30-1-82-242-58-229.fbx.proxad.net] has quit [Quit: Leaving] 20:34 < evildho> iant: http://dhobsd.pastebin.com/SmT23kFx 20:35 < evildho> iant: the first one seems to compile just fine (with / without -fPIC), the second one compiles fine without fPIC (as you'd guess), but with fPIC for some reason runs out of anything in GENERAL_REGS, and I can't figure out why it would complain there, and not in ck_pr_cas_64 20:36 < evildho> i wonder if it would stop complaining if I did a store_64 in cas_32_2. 20:37 < evildho> the thing is, I have no idea what's eating up edi/esi, making it think that it can't use them. 20:37 <+iant> what is the error message? you don't seem to be asking for anything in GENERAL_REGS at all 20:37 < evildho> i'm not! 20:37 < evildho> ../../../include/gcc/x86/ck_pr.h: In function ‘ck_pr_cas_32_2’: 20:37 < evildho> ../../../include/gcc/x86/ck_pr.h:530: error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’ 20:37 < aiju> inline assembly? 20:38 <+iant> I guess it must be for the z, the =m constraint 20:38 <+iant> it's having a hard time building the address 20:38 < evildho> wouldn't surprise me. 20:38 < evildho> I had that =q before 20:38 < evildho> but gcc would happily compile that to sete %bl 20:39 <+iant> really? even with -fpic? 20:39 <+iant> that sounds like a bug 20:39 < evildho> yeah 20:40 <+iant> why are you passing s[0] with an "m" constraint? 20:40 < evildho> because i can't put it in ebx 20:40 <+iant> oh yeah, I see 20:40 <+iant> does it help if you give that an "r" constraint? 20:41 < evildho> that complains about Q_REGS 20:41 <+iant> OK, a "q" constraint 20:41 < evildho> same 20:42 < evildho> by "that" you're referring to s[0] right? 20:42 < evildho> not z 20:42 <+iant> yes 20:42 <+iant> OK, what about making (z) be something like =adc 20:42 <+iant> you don't really care about overwriting those values at that point 20:42 < evildho> that still complains about GENERAL_REGS. 20:43 < evildho> so maybe the confusion is really about s[0] 20:43 <+iant> well, it's everything put together 20:43 <+iant> you have tied up three regs, and then you want three memory addresses 20:44 < aiju> what's this even about, gccgo? 20:44 <+iant> this isn't really Go related at all 20:44 < evildho> it's non-go related, really. iant's just the only person i know with knowledge on teh topic 20:44 < evildho> sorry 20:44 <+iant> If you e-mail me a standalone test case I'll try to take a look 20:44 <+iant> otherwise I'm just guessing 20:44 <+iant> also, which version of gcc? 20:45 < evildho> 4.1.2 20:45 < aiju> gcc does the weirdest things with inline assembly 20:45 < aiju> references to %dil on x86 machines are funny 20:51 -!- thiago__ [~thiago@189.59.178.97.dynamic.adsl.gvt.net.br] has quit [Ping timeout: 264 seconds] 20:52 < evildho> iant: http://dhobsd.pastebin.com/my6BXhGW 20:52 < evildho> compile with cc -fPIC -fomit-frame-pointer test.c -o test -m32 20:52 < evildho> expected output is 1 1 / 1 1 / 3 3\n3 3 / 1 1 / 3 3\n 20:53 < evildho> (which you get if you get rid of the -f*) 20:54 <+iant> works fine with current mainline and with gcc 4.4.3 20:54 < evildho> great. 20:55 <+iant> fails with gcc 4.1.3, but does work if I use -O 20:55 <+iant> fails with gcc 4.2.4 20:56 <+iant> I don't have 4.3.5 built 20:56 -!- tensorpudding [~user@99.23.127.179] has joined #go-nuts 20:56 < evildho> http://old.nabble.com/Inline-assembler-for-cmpxchg8b-on-x86-%2B-PIC-%2B-frame-pointer-td19669157.html is the closest thing i can find, which doesn't actually have a solution 20:57 < evildho> oh well 20:57 < evildho> I guess we can release with a compiler caveat on x86-32 20:59 < skelterjohn> what are you working on, dho? 21:00 < evildho> www.concurrencykit.org 21:01 <+iant> evildho: try this version: http://dhobsd.pastebin.com/jtfpkwDp 21:02 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has quit [Remote host closed the connection] 21:02 < evildho> huh. that works. why? 21:02 * evildho unfamiliar with the p constraint 21:02 <+iant> the 'p' constraint takes a pointer to memory 21:02 <+iant> it is coupled with the %a modifier which turns it into an address 21:02 < evildho> oh shit 21:03 <+iant> since the asm is clobbering memory anyhow, this is safe 21:03 < evildho> that's a(one) 21:03 * evildho was reading it %al and being like wtf 21:03 <+iant> ah, yeah 21:03 < evildho> ok, that's a nifty trick. 21:05 -!- viirya [~viirya@cml506-25.csie.ntu.edu.tw] has joined #go-nuts 21:06 < evildho> iant: thank you. that rocks. 21:06 <+iant> sure 21:06 < evildho> ...and that wraps up the port. 21:08 <+iant> wow, pastebin.com is showing me a Cosmopolitan ad, that seems like really poor targeting 21:13 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts 21:15 < evildho> lol 21:16 -!- roto [~roto@S010600215a08cecc.cg.shawcable.net] has quit [Ping timeout: 250 seconds] 21:17 -!- aho [~nya@fuld-590c7828.pool.mediaWays.net] has joined #go-nuts 21:24 -!- tensorpudding [~user@99.23.127.179] has quit [Read error: Connection reset by peer] 21:24 -!- mutt_d [~niranj@5356C868.cm-6-7d.dynamic.ziggo.nl] has joined #go-nuts 21:25 -!- rlab [~Miranda@125-236-95-178.pool.ukrtel.net] has quit [Read error: Connection reset by peer] 21:25 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has quit [Remote host closed the connection] 21:32 -!- mattn_jp [~mattn@112-68-60-2f1.hyg1.eonet.ne.jp] has quit [Quit: Ex-Chat] 21:33 -!- photron [~photron@port-92-201-122-75.dynamic.qsc.de] has quit [Ping timeout: 240 seconds] 21:34 -!- mutt_d [~niranj@5356C868.cm-6-7d.dynamic.ziggo.nl] has left #go-nuts ["Ex-Chat"] 21:46 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4] 21:48 -!- bren2010 [~bren2010@24-179-18-179.dhcp.ahvl.nc.charter.com] has joined #go-nuts 21:49 -!- wrtp [~rog@92.17.33.100] has quit [Quit: wrtp] 21:57 -!- jeng [~jeng@74.194.1.28] has quit [Quit: ChatZilla 0.9.86 [Firefox 3.6.8/20100722155716]] 22:00 < bren2010> Could anybody help me with defining a function that takes a pointer to net.Conn.Dial() as a named parameter? 22:00 < bren2010> I've looked around the site and can't figure it out myself. 22:01 -!- deso_ [~deso@x0561a.wh30.tu-dresden.de] has quit [Read error: Connection reset by peer] 22:05 < KBme> what do you mean named parameter? 22:05 < KBme> all parameters are named afaik 22:06 < bren2010> Ah. I just meant that I wanted to be able to reference it by a name I choose. Like within the function, it can be referenced just like a variable. 22:12 < KBme> bren2010: this works fine for me: http://dpaste.com/459639/ 22:12 < KBme> bren2010: and it's net.Dial eventhough it's under conn in docs because it returns a connection 22:14 < KBme> this works aswell http://dpaste.com/459643/ no need for the extra parenthesis 22:16 -!- plainhao [~plainhao@208.75.85.237] has quit [Quit: plainhao] 22:17 -!- Scorchin [~Scorchin@host86-150-163-45.range86-150.btcentralplus.com] has quit [Ping timeout: 240 seconds] 22:20 < bren2010> Thank you! :) 22:20 -!- Scorchin [~Scorchin@host86-145-220-239.range86-145.btcentralplus.com] has joined #go-nuts 22:20 -!- Scorchin [~Scorchin@host86-145-220-239.range86-145.btcentralplus.com] has quit [Client Quit] 22:21 < KBme> that's not a pointer but i'm guessing a pointer is just as easy 22:21 < KBme> add a * here, a & there and done ;) 22:24 < plexdev`> http://is.gd/Q0er5V by [Russ Cox] in 2 subdirs of go/ -- gc: bug325 / issue 1566 22:25 < plexdev`> http://is.gd/W8k4Rk by [Dave Cheney] in 2 subdirs of go/src/ -- build: convert src/cmd to use make directly and simplify src/make.bash 22:26 -!- binarypie [~binarypie@adsl-99-37-227-229.dsl.pltn13.sbcglobal.net] has joined #go-nuts 22:29 -!- ExtraSpice [XtraSpice@78-62-101-194.static.zebra.lt] has quit [Read error: Connection reset by peer] 22:29 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Ping timeout: 240 seconds] 22:31 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Quit: skelterjohn] 22:31 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se] has quit [Remote host closed the connection] 22:37 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal] 22:38 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal] 22:41 -!- jokoon [~zonax@feu30-1-82-242-58-229.fbx.proxad.net] has joined #go-nuts 22:41 -!- imsplitbit [~imsplitbi@64.39.4.132] has quit [Quit: Bye!] 22:43 -!- Venom_X [~pjacobs@75.92.43.21] has joined #go-nuts 22:45 -!- sjd [~sjd@4.78.243.126] has joined #go-nuts 22:46 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts 22:47 -!- sjd [~sjd@4.78.243.126] has quit [Client Quit] 22:48 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit: Verlassend] 22:50 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts 22:51 -!- piranha [~piranha@5ED4B890.cm-7-5c.dynamic.ziggo.nl] has quit [Quit: Computer has gone to sleep.] 22:54 -!- qjcg [~qjcg@208.88.110.46] has quit [Quit: qjcg] 22:56 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the Fish] 22:58 -!- plexdev [~plexdev@arthur.espians.com] has joined #go-nuts 23:00 -!- yebyen_ [~yebyen@martyfunkhouser.csh.rit.edu] has joined #go-nuts 23:00 -!- bluet_ [mastensg@knuth.ping.uio.no] has joined #go-nuts 23:00 -!- jokoon [~zonax@feu30-1-82-242-58-229.fbx.proxad.net] has quit [Quit: Leaving] 23:00 -!- zeroXten_ [~zeroXten@0x10.co.uk] has joined #go-nuts 23:01 -!- KirkMcDo1ald [~Kirk@24.143.227.33] has joined #go-nuts 23:02 -!- drhodes_ [~none@drhodes.xen.prgmr.com] has joined #go-nuts 23:02 -!- tav_ [~tav@92.7.95.171] has joined #go-nuts 23:03 -!- freetz_ [~fritz@nero.ceat.okstate.edu] has joined #go-nuts 23:03 -!- araujo_ [~araujo@190.38.51.34] has joined #go-nuts 23:05 -!- d_m_ [d6@SDF.ORG] has joined #go-nuts 23:05 -!- Netsplit *.net <-> *.split quits: zeroXten, yebyen, bluet, drhodes, arun_, dfr|mac, tvw, plexdev`, d_m, KirkMcDonald, (+6 more, use /NETSPLIT to show all of them) 23:08 -!- araujo_ [~araujo@190.38.51.34] has quit [Client Quit] 23:08 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts 23:09 -!- araujo [~araujo@190.38.51.34] has joined #go-nuts 23:09 -!- araujo [~araujo@190.38.51.34] has quit [Changing host] 23:09 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 23:11 -!- arun_ [~arun@i172010.upc-i.chello.nl] has joined #go-nuts 23:11 -!- arun_ [~arun@i172010.upc-i.chello.nl] has quit [Changing host] 23:11 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts 23:11 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 23:12 -!- KirkMcDonald [~Kirk@24.143.227.33] has quit [Changing host] 23:12 -!- KirkMcDonald [~Kirk@python/site-packages/KirkMcDonald] has joined #go-nuts 23:15 -!- rupert_ [~rupert@deathknight.net] has joined #go-nuts 23:20 -!- emjayess [~emjayess@pix1.i29.net] has quit [Quit: Leaving] 23:27 -!- tensorpudding [~user@99.23.127.179] has joined #go-nuts 23:51 < enferex> Are there any go summits/workshops/conferences being devised? --- Log closed Tue Mar 01 00:00:29 2011