--- Log opened Fri Jun 24 00:00:54 2011
00:19 -!- bjarneh [~bjarneh@24.80-203-20.nextgentel.com] has joined #go-nuts
00:23 -!- Tv [~Tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
00:24 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
00:27 -!- Dazedit [~Adium@c-71-59-39-204.hsd1.ga.comcast.net] has joined #go-nuts
00:48 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 264 seconds]
00:55 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
01:04 -!- franciscosouza [~francisco@187.105.24.41] has quit [Read error:
Connection reset by peer]
01:05 -!- franciscosouza [~francisco@187.105.24.41] has joined #go-nuts
01:13 -!- nutate [~rseymour@cacsag4.usc.edu] has joined #go-nuts
01:19 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Read
error: Connection reset by peer]
01:21 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
01:34 -!- Nisstyre [~nisstyre@109.74.204.224] has quit [Ping timeout: 250 seconds]
01:38 -!- Nisstyre [~nisstyre@109.74.204.224] has joined #go-nuts
01:52 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
01:56 -!- KBme [~KBme@2001:470:cabe:666:666:666:666:666] has joined #go-nuts
02:01 -!- Dazedit [~Adium@c-71-59-39-204.hsd1.ga.comcast.net] has quit [Quit:
Leaving.]
02:12 -!- Crnobog [~crnobog@cpc3-nmal12-0-0-cust48.croy.cable.virginmedia.com] has
quit [Ping timeout: 252 seconds]
02:13 -!- Crnobog [~crnobog@cpc3-nmal12-0-0-cust48.croy.cable.virginmedia.com] has
joined #go-nuts
02:24 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 255 seconds]
02:31 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 244 seconds]
02:35 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
02:36 -!- ccc1 [~Adium@140.109.98.187] has joined #go-nuts
02:44 -!- alexandere [~alexander@eijg.xs4all.nl] has quit [Quit: alexandere]
02:58 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
03:06 -!- acuozzo [4a6b7e58@gateway/web/freenode/ip.74.107.126.88] has joined
#go-nuts
03:08 < acuozzo> Is freestanding Go possible at this point in time?
03:09 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
03:12 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Quit: Leaving]
03:17 -!- nutate [~rseymour@cacsag4.usc.edu] has quit [Quit: I'm outta heee-eere]
03:19 < chomp> meaning?
03:22 -!- veritos [~veritos@c-71-227-251-109.hsd1.wa.comcast.net] has joined
#go-nuts
03:24 < veritos> Hey folks....most of the documentation online says that
64-bit Go's compiler is somewhat better maintained than the 32-bit version (e.g.
the optimiser is better).  Are the differences great enough that I should actually
care?  (I am not doing scientific computing or anything; just boring stuff.)
03:25 < str1ngs> veritos: should be fine then
03:25 < veritos> Probably the main issue I would hit is the dearth of
registers?
03:26 < str1ngs> I'm not sure where the speed limitations were.  I didnt
notice it when I was on 32bit
03:26 < str1ngs> atleast not with my code
03:30 -!- veritos [~veritos@c-71-227-251-109.hsd1.wa.comcast.net] has left
#go-nuts ["Leaving"]
03:35 < jessta> acuozzo: there was a runtime/tiny package for running Go on
bare metal, but I don't think it's been updated for a while
03:52 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
03:53 -!- Bigbear1 [~Cody@d75-158-128-4.abhsia.telus.net] has joined #go-nuts
03:57 -!- Queue29_ [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
03:57 -!- ijknacho [~goofy@cpe-72-190-64-3.tx.res.rr.com] has quit [Remote host
closed the connection]
04:05 -!- keithcascio [~keithcasc@nat/google/x-wixjzgxtzpnsbxzd] has quit [Quit:
Leaving]
04:06 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
04:07 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services]
04:08 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:11 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
04:14 -!- vpit3833 [~user@203.111.33.203] has joined #go-nuts
04:19 -!- Zola [~Zola@76.91.53.83] has joined #go-nuts
04:19 < Zola> hi how do I do ordered map?
04:20 < exch> You make one.  Go's map is inherently unordered
04:21 -!- mikespook [~mikespook@183.47.224.238] has quit [Ping timeout: 244
seconds]
04:21 < Zola> I want one in a standard library cause I don't want to make a
perfect one
04:22 -!- creack [~charme_g@163.5.84.203] has quit [Ping timeout: 258 seconds]
04:22 < exch> I want a big yacht with barely clothed women and nice tropical
drinks with umbrellas
04:22 < Zola> ok but
04:22 < Zola> look at gcc's implementation its pretty long
04:23 < exch> I'm sure someone has written one.  I recall there being a
package with a number of more advanced data structures around
04:24 < exch> If there is one, it'll probably be listed here somewhere
http://go-lang.cat-v.org/
04:25 -!- Queue29_ [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has
joined #go-nuts
04:26 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
04:27 -!- ancientlore [~ancientlo@ip68-110-238-176.dc.dc.cox.net] has joined
#go-nuts
04:28 -!- mikespook [~mikespook@183.47.230.175] has joined #go-nuts
04:28 < ccc1> THX for your sharing.
04:38 -!- ancientlore [~ancientlo@ip68-110-238-176.dc.dc.cox.net] has quit [Remote
host closed the connection]
04:41 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 240
seconds]
04:42 -!- mikespook [~mikespook@183.47.230.175] has quit [Ping timeout: 240
seconds]
04:42 < chomp> Zola, https://github.com/petar/GoLLRB
04:43 < chomp> that is exactly what you'll want to use
04:43 < Zola> thank you
04:44 -!- karlom [~yangdongb@211.156.184.10] has joined #go-nuts
04:44 < Zola> whys their code so short
04:45 < Zola> 542 lines lol
04:45 -!- bjarneh [~bjarneh@24.80-203-20.nextgentel.com] has quit [Quit: leaving]
04:45 < chomp> seems about right to me
04:46 < chomp> what are you comparing it to, gcc's std::map implementation?
04:47 < chomp> to be fair this is one of the most readable rb tree
implementations i've come across :)
04:47 < Zola> yes chomp
04:47 < Zola> i am comparing to libstdc++ std::map impl
04:47 < Zola> which is fast one
04:47 < Zola> i am wondering if GoLLRB cheat
04:48 < chomp> no
04:48 < chomp> llrb is llrb.  how would it cheat?  it's a proper
implementation of a well-established data structure.
04:49 < Zola> ok well i mean cheat by not writing for optimization.  like
for instance if you were really over cheating you'd just use two regular unordered
maps and map an order onto the elements.  etc there's varying degrees of cheating
and using lang features
04:49 < Zola> but that doesnt mean it would be fast like a impl that's
coding at the memory lvl
04:49 < chomp> i see; well that is not what's happening here
04:50 < chomp> c++ is an exceptionally verbose language
04:51 < chomp> it is absolutely no surprise that a similarly complex
implementation would be nearly twice as long in c++ than it is in go
04:51 < Zola> ok but most of the code in that impl is not really about
expressing the logic of a map its just expressing optimization at low lvl
04:51 < chomp> no, most of the code is comments and verbose template
declarations
04:52 < Zola> templates are part of optimization
04:52 < Zola> templates in that lang are used for inlining static
04:53 < chomp> why don't you compare the performance and then worry about it
05:02 -!- codeo4 [~karlomgg@211.156.184.10] has joined #go-nuts
05:03 -!- karlom [~yangdongb@211.156.184.10] has quit [Quit: 离开]
05:04 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 264 seconds]
05:13 -!- Tv [~Tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Remote host closed
the connection]
05:13 -!- franciscosouza [~francisco@187.105.24.41] has quit [Quit:
franciscosouza]
05:13 -!- Tv [~Tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
05:13 -!- Tv [~Tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Client Quit]
05:15 -!- acuozzo [4a6b7e58@gateway/web/freenode/ip.74.107.126.88] has left
#go-nuts []
05:19 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
05:19 -!- mikespook [~mikespook@116.21.153.199] has joined #go-nuts
05:22 < Zola> chomp which file did you look at in gcc that is only double of
542 lines
05:22 < Zola> gcc's impl is 3000 line
05:22 < Zola> it uses
05:23 < Zola> stl_tree.h
05:23 < chomp> well actually i should have said about 3 times.  the core of
the implementation is stl_tree
05:23 < chomp> nothing else really counts since you're comparing it to an rb
tree implementation
05:24 < chomp> but i really don't see anything to suggest that it's more
highly optimized
05:24 < Zola> stl_map.h + stl_tree.h i am counting, and the allocator
template base
05:24 < chomp> or at least not significantly so
05:28 -!- bakedb [~kel@cpc4-lea21-0-0-cust755.6-3.cable.virginmedia.com] has
joined #go-nuts
05:32 -!- Bigbear1 [~Cody@d75-158-128-4.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
05:44 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
05:49 -!- tvw [~tv@e176006144.adsl.alicedsl.de] has joined #go-nuts
05:56 -!- ExtraSpice [XtraSpice@78-57-204-104.static.zebra.lt] has joined #go-nuts
06:05 -!- bakedb [~kel@cpc4-lea21-0-0-cust755.6-3.cable.virginmedia.com] has quit
[Ping timeout: 255 seconds]
06:06 -!- chomp [~chomp@c-67-186-35-69.hsd1.pa.comcast.net] has quit [Quit:
Leaving]
06:11 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
06:16 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-148-108.clienti.tiscali.it] has
joined #go-nuts
06:38 -!- fvbommel [~fvbommel_@86.86.15.250] has quit [Ping timeout: 276 seconds]
06:39 -!- photron [~photron@port-92-201-2-49.dynamic.qsc.de] has joined #go-nuts
06:40 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
06:43 -!- noodles775 [~michael@canonical/launchpad/noodles775] has joined #go-nuts
06:49 -!- tvw [~tv@e176006144.adsl.alicedsl.de] has quit [Remote host closed the
connection]
06:59 -!- iwinulose_ [~charlesdu@c-67-188-13-8.hsd1.ca.comcast.net] has joined
#go-nuts
07:09 -!- kfmfe04_ [~kfmfe04@60-251-136-139.HINET-IP.hinet.net] has joined
#go-nuts
07:12 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 255 seconds]
07:15 -!- ijknacho [~goofy@cpe-72-190-64-3.tx.res.rr.com] has joined #go-nuts
07:16 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
07:19 -!- piranha [~piranha@adsl-ull-233-41.41-151.net24.it] has joined #go-nuts
07:24 -!- piranha [~piranha@adsl-ull-233-41.41-151.net24.it] has quit [Quit:
Computer has gone to sleep.]
07:25 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
07:27 -!- Queue29_ [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
07:33 < iwinulose_> use case for unary +?
07:45 -!- bakedb [~kel@188.29.64.85.threembb.co.uk] has joined #go-nuts
07:45 -!- codeo4 [~karlomgg@211.156.184.10] has quit [Ping timeout: 264 seconds]
08:00 < jessta> iwinulose_: what unary +?
08:00 < iwinulose_> jessta: go has a unary + operator
08:01 < iwinulose_> according to the language spec +x means 0 + x
08:01 < iwinulose_> i guess its to feel more like oberon?
08:02 < |Craig|> iwinulose: I assume its for symmetry with -.  There might
be some odd case with signed 0 I don't know about though
08:03 < |Craig|> if you have a bunch of numbers, some of which are negative,
allowing + on them might be nice for formatting
08:03 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has joined #go-nuts
08:03 -!- fvbommel [~fvbommel_@dyn069053.nbw.tue.nl] has joined #go-nuts
08:05 -!- Pathin [~root@gladsheim.nullbytestudios.net] has joined #go-nuts
08:06 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:11 -!- Adys [~Adys@unaffiliated/adys] has quit [Read error: Connection reset by
peer]
08:23 < iwinulose_> is it "idiomatic" to setup argument parsing inside the
Init() of your main package?
08:24 -!- cenuij [~cenuij@184.15.8.109.rev.sfr.net] has joined #go-nuts
08:24 -!- cenuij [~cenuij@184.15.8.109.rev.sfr.net] has quit [Changing host]
08:24 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
08:24 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
hcatlin]
08:35 < iwinulose_> hmm
08:35 < iwinulose_> that might be a good reason
08:35 < iwinulose_> if flag.Parse() comes in Init(), then the usage output
is empty
08:35 < iwinulose_> (htough the flags are all set correctly)
08:37 < iwinulose_> oh htat's false, if the setup happens in Init() the
arguments arent added into flag's tables.  Interesting...
08:38 < iwinulose_> a side effect of a GC pass?  after init and before main
nothing references whatever's inside the flag module so it gets GCed before main
is called?
08:43 -!- Transformer [~Transform@ool-4a59e397.dyn.optonline.net] has joined
#go-nuts
08:45 -!- Transformer [~Transform@ool-4a59e397.dyn.optonline.net] has quit [Excess
Flood]
08:51 < zippoxer> how to remove from array?
08:52 < zippoxer> should I use a list?
08:54 < zozoR> use append
08:55 < zozoR> i think array = append(array[0:3], array[4:len(array)])
08:55 < zozoR> play with it on the goplayground
08:56 < fvbommel> zozoR: s/)/...)/
08:56 -!- message144 [~message14@cpe-75-83-155-145.socal.res.rr.com] has quit
[Remote host closed the connection]
08:58 < fvbommel> iwinulose_: Could it be that your flag definitions are
being run after your flag.Parse() call?  (That could maybe happen if they're
initializers of globals, or if they're in a different init() function)
08:59 < fvbommel> iwinulose_: Also, the special function is called init(),
not Init().  If it's actually called Init() in your code, it won't be called
unless you do so explicitly somewhere.
08:59 < iwinulose_> fvbommel: xV
09:00 < iwinulose_> it got called, unless I'm mistaken...
09:00 < iwinulose_> lemme go check rq
09:02 < iwinulose_> fvbommel: hmm...tired me can't reproduce the behavior I
was getting...it was probably user error xD
09:03 < kfmfe04_> noobie question: how do I make Go do RAII without
constructors and destructors?  what's the right way to do it?
09:03 < iwinulose_> regardless it seems to work now (getting called from
*i*nit())
09:03 < aiju> kfmfe04_: there is no RAII
09:03 < aiju> period
09:03 < iwinulose_> kfmfe04_:
09:04 < kfmfe04_> so how do you do automatic cleanup in Go?
09:04 < aiju> defer
09:04 < kfmfe04_> excellent!  tyvm
09:04 < iwinulose_> kfmfe04_: defer *whatever*
09:04 < iwinulose_> (like defer unlock(x))
09:04 < kfmfe04_> I guess it has to be done at the function scope, then?
09:05 < kfmfe04_> that's fine - I can refactor
09:05 < aiju> lock(x) ; defer unlock(x)
09:05 < aiju> for example
09:06 < kfmfe04_> yup - after you mentioned it, I recall the example of
defer for files and mutexes - defer works great at the function/method level - was
just wondering if there is an equivalent construct for the struct level, but if
not, I'll refacter around it
09:07 < aiju> actually there is such a thing at the runtime level
09:07 < aiju> it is used to cleanup channels
09:07 < kfmfe04_> how does that work?  sounds interesting
09:07 < aiju> there is a C routine addfinalizer()
09:07 < aiju> or so i remember
09:07 < kfmfe04_> when is the finalizer executed?
09:08 < aiju> when the object is garbage collected
09:08 < kfmfe04_> that could be very convenient
09:08 < aiju> http://golang.org/pkg/runtime/#SetFinalizer
09:08 < kfmfe04_> that's fantastic - tyvm - just what I was looking for :)
09:09 < aiju> i wouldn't recommend you to use it
09:09 < kfmfe04_> breaks Go paradigms?
09:09 < aiju> yeah
09:09 < kfmfe04_> ok - I will do my best to refactor - ty
09:09 < iwinulose_> what do people use for build automation?
09:09 < aiju> iwinulose_: make
09:09 < iwinulose_> I wrote a really simple makefile for my toy program but
it recompiles every target every time
09:09 < zippoxer> zozoR: using append(array[0:3], array[4:len(array)]) I
need to know the index of the element, do I have to loop over the array?
09:09 < aiju> iwinulose_: there are templates for Go programs
09:10 < aiju> iwinulose_:
http://p.remotehost.co/pastes/2011-06-24T05:15:59.raw
09:10 < aiju> might be wrong in some details
09:12 < iwinulose_> aiju:yeah completely did not do the right thing xD
09:13 < iwinulose_> (maybe I'm somehow being un-go-like
09:13 < aiju> what happens?
09:13 < aiju> are you writing 9001 packages for a simple go program?
09:13 < iwinulose_> http://www.pastie.org/2115271
09:14 < aiju> yes you are
09:14 < mpl> vejeta wouldn't be happy.
09:14 < iwinulose_> there's exactly 1 package and a main file
09:14 < aiju> iwinulose_: usually programs are just one package
09:15 < aiju> think of packages more as libraries
09:15 < aiju> if you *are* writing a library, there is the Make.pkg template
09:16 -!- kfmfe04_ [~kfmfe04@60-251-136-139.HINET-IP.hinet.net] has quit [Quit:
kfmfe04_]
09:16 < zippoxer> so you don't recommend writing packages often?
09:16 < aiju> yes
09:16 < zippoxer> you're right
09:16 < zippoxer> I already did in my program
09:16 < zippoxer> and it's terribly hard to keep developing with all these
09:17 < iwinulose_> yeah, modularity sucks.  global namespaces are good
09:17 < zippoxer> building the structure took so many time..
09:18 < aiju> no clue why people get such a hardon on modularity
09:18 < zippoxer> nah for bigger programs you'll want to have package
09:18 < aiju> true
09:18 < zippoxer> but independent programmers often don't get their programs
that big..
09:19 < zippoxer> independent I mean those who work alone
09:19 < iwinulose_> zippoxer: how big is big enough?
09:19 < aiju> iwinulose_: depends
09:19 < zippoxer> the true word is complex, not big :P
09:19 < aiju> "big enough" can be very small
09:19 < iwinulose_> what happens when you hit that point?  do you do a code
freeze, branch, repackage everything, then go back?
09:19 < zippoxer> yeah
09:20 < aiju> my biggest programs are 3 KLOC
09:20 -!- virtualsue [~chatzilla@host81-148-52-109.in-addr.btopenworld.com] has
joined #go-nuts
09:20 < zippoxer> 3 KLOC = what?
09:20 < iwinulose_> lol.  maybe I'm verbose; my biggest range at around 45
09:20 < aiju> zippoxer: three thousand lines of code
09:20 < iwinulose_> zippoxer: kilo lines of code
09:20 < iwinulose_> (no whitespace, comments, etc)
09:20 < zippoxer> wow :P
09:21 < aiju> i count everything
09:21 < aiju> but my current program has 9 comments and 2.2 KLOC
09:21 < iwinulose_> that's about what i'd expect
09:21 < aiju> so it doesn't affect figures that much?  ;P
09:21 < aiju> -?
09:21 < aiju> 11:26 < iwinulose_> lol.  maybe I'm verbose; my biggest
range at around 45
09:21 < aiju> can you give an example?
09:22 < iwinulose_> aiju: two things for work I can't talk about
09:22 < aiju> heh
09:22 < aiju> http://aiju.de/misc/sloc
09:22 < iwinulose_> usb stack for a Beagleboard microcontroller
09:22 < aiju> lines of code of various programs
09:22 < aiju> USB is madness.
09:22 < iwinulose_> (that's only about 15k)
09:22 < iwinulose_> uhm
09:22 < iwinulose_> my pthread wq is nice and short
09:22 < iwinulose_> about
09:22 < iwinulose_> 300
09:22 < aiju> "wq"?
09:23 < iwinulose_> aiju: pthread_wq api
09:23 < aiju> the Plan 9 USB implementation is maybe 8 KLOC total
09:23 < aiju> and that's just the host controller
09:24 < aiju> that's about as much as _all_ video drivers together (9 KLOC)
09:24 < aiju> it sure is madness :)
09:25 < iwinulose_> idk i might be exaggerating that one a bit...15k sounds
like a lot now that I thinka bout it.  It a stack + custom driver, but probably
not that long...idk havent touched it in about a year...
09:26 -!- virtualsue [~chatzilla@host81-148-52-109.in-addr.btopenworld.com] has
quit [Ping timeout: 255 seconds]
09:26 < aiju> my linux sandbox is 785 lines
09:26 < aiju> and 300 of that is autogenerated
09:26 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
09:26 < aiju> yet another 50 stolen from p9p
09:31 -!- virtualsue [~chatzilla@nat/cisco/x-jhfiiwjkzhnnnveq] has joined #go-nuts
09:53 -!- i__ [~none@unaffiliated/i--/x-3618442] has quit [Remote host closed the
connection]
09:55 -!- i__ [~none@unaffiliated/i--/x-3618442] has joined #go-nuts
10:18 < jnwhiteh> We're making decent progress on the Go re-implementation
of a minecraft server for anyone who wants an excuse to play more with Go =)
10:19 < aiju> hehe
10:19 < aiju> now rewrite the client
10:19 < jnwhiteh> heh =)
10:19 < jnwhiteh> that would be much much easier
10:19 < jnwhiteh> *all* of the logic is in the server
10:19 < aiju> i'd really appreciate a client in Go
10:20 < aiju> notch sucks as a programmer
10:20 < jnwhiteh> =)
10:21 < jnwhiteh> https://github.com/huin/chunkymonkey for those who want to
play
10:21 < jnwhiteh> It uses godag to build =/
10:21 < ijknacho> why =/ ?
10:21 -!- sebastianskejoe [~sebastian@188.114.142.217] has joined #go-nuts
10:21 < jnwhiteh> because the source is kind of all thrown together
10:21 < jnwhiteh> I need to try and sort it out
10:22 < jnwhiteh> they want to avoid installing each of the libraries
involved..  so you need to alter the lib/include paths or change the imports to
nasty relative imports
10:22 < jnwhiteh> but its one of my next projects =)
10:24 -!- iwinulose_ [~charlesdu@c-67-188-13-8.hsd1.ca.comcast.net] has quit
[Quit: iwinulose_]
10:25 < jnwhiteh> does anyone have an example of setting -L for the linker
when building via Makefile?
10:26 -!- sf` [~user@2a00:1398:2:4006:21f:16ff:fe28:b064] has joined #go-nuts
10:27 < jnwhiteh> hrm, apparently GCIMPORTS and LDIMPORTS work
10:37 -!- sf` [~user@2a00:1398:2:4006:21f:16ff:fe28:b064] has left #go-nuts ["ERC
Version 5.3 (IRC client for Emacs)"]
10:38 -!- ccc1 [~Adium@140.109.98.187] has quit [Quit: Leaving.]
10:51 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Ping
timeout: 246 seconds]
10:54 -!- kfmfe04_ [~kfmfe04@NK219-91-91-190.adsl.dynamic.apol.com.tw] has joined
#go-nuts
10:57 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
10:57 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote
host closed the connection]
10:59 -!- icy [~icy@lighttpd/icy] has joined #go-nuts
11:00 < icy> I have a map[string]int64, how can I get a pointer to one of
those ints?  &m["foo"] does not compile
11:00 < ijknacho> you can't, I don't think
11:02 < icy> weird
11:02 < ijknacho> icy:
http://groups.google.com/group/golang-nuts/browse_thread/thread/ed0085a6953b8818/08a306f8ad5355b1?pli=1
11:03 < ijknacho> discussion on the issue with some reasons why.
11:04 -!- arun [~arun@unaffiliated/sindian] has quit [Ping timeout: 255 seconds]
11:04 < icy> ijknacho: thx
11:07 -!- alsvidr [~user@2a00:1398:2:4006:21f:16ff:fe28:b064] has joined #go-nuts
11:17 < zippoxer> having b *bool
11:17 < zippoxer> b = true
11:17 < zippoxer> panics
11:17 < zippoxer> how can I assign a value to the pointer b?
11:17 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
11:17 < vegai> you should perhaps make it point an something first
11:17 < vegai> at something
11:18 < zippoxer> b2 := truel b = &b2
11:18 < zippoxer> ?
11:18 < zippoxer> oops
11:18 < aiju> maps are hashtables
11:18 < aiju> &m["foo"] is tricky to evaluate with a hashtable
11:18 < icy> zippoxer: b := new(bool)
11:18 < zippoxer> yeah but
11:19 < zippoxer> new(bool) is false no?
11:19 < vegai> zippoxer: *b = true ?
11:19 < zippoxer> can it work?  :P sec
11:19 < aiju> as hash
11:19 < aiju> tables in general exhibit poor locality of reference
11:19 < ampleyfly> vegai: bad if it doesn't point to anything though
11:20 < aiju> haha
11:20 < zippoxer> yeah if it's nil :P
11:20 < aiju> teaching people about caches was a bad idea
11:20 < vegai> why did the compiler let you even do b = true if b is *bool?
11:20 < zippoxer> it didn't let me.
11:20 < vegai> oh, good
11:20 < zippoxer> the error raised by the compiler
11:20 < vegai> I thought you meant runtime panic when you said "panics"
11:21 < zippoxer> a mistake :P
11:21 < aiju> panic == runtime panic
11:21 < zippoxer> = false
11:21 < zippoxer> kidding
11:24 < zippoxer> so a pointer to bool is not awesome.
11:25 < vegai> it's fabulous
11:34 -!- babali [~babali@2a01:e35:2e0d:ecc0:210:a7ff:fe05:7b50] has joined
#go-nuts
11:38 < kfmfe04_> damn, I absolutely love googletest for C++ - I hope one
day, google will create something as rich for Go (if not, I may have to start an
open-source project to clone it for Go)
11:38 < aiju> "googletest"?
11:38 < kfmfe04_> unit-testing on C++ by google
11:39 < kfmfe04_> very feature rich (but with just useful stuff - not
cluttered at all)
11:39 < kfmfe04_> http://code.google.com/p/googletest/
11:39 < kfmfe04_> I recently found gocheck for Go which is pretty good
11:40 < kfmfe04_> maybe gocheck will do what I need - if not, I will attempt
to clone googletest (open-source wise)
11:41 < aiju> unit tests, eh
11:41 < aiju> but does it play minecraft?
11:41 -!- Project-2501 [~Marvin@82.84.94.104] has joined #go-nuts
11:42 < kfmfe04_> doh :P
11:43 -!- ijknacho [~goofy@cpe-72-190-64-3.tx.res.rr.com] has quit [Ping timeout:
276 seconds]
11:43 < kfmfe04_> hahaha - never saw minecraft until you mentioned it -
looks decent - might be interesting as a multi-player community game
11:43 < zippoxer> there's a minecraft server written in go no?
11:44 < zippoxer> I remember I saw it once
11:44 < jnwhiteh> zippoxer: yes there is, I linked our work earlier =)
11:44 < zippoxer> relink?  :P
11:44 < jnwhiteh> https://github.com/huin/chunkymonkey
11:44 < aiju> kfmfe04_: what, you haven't heard of minecraft?
11:44 < aiju> are you kidding?
11:45 < kfmfe04_> unfortunately, I haven't until you mentioned it - been
"coding in a cave" lately (unfortunate side-effect of coding in C++)
11:45 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-148-108.clienti.tiscali.it] has
quit [Ping timeout: 258 seconds]
11:45 < zippoxer> jnwhiteh: wow - alot of code to learn from, thanks :)
11:46 < jnwhiteh> you're welcome, lots to do :P
11:46 < jnwhiteh> so its fu
11:46 < jnwhiteh> fun, rather =)
11:48 < kfmfe04_> is there a multi-player version of minecraft?
11:48 < aiju> yes
11:48 < aiju> multi-player is supported "natively"
11:48 < aiju> but it's buggy as hell
11:48 < kfmfe04_> ahh...  ...too bad - looks like a multi-player version
would be a total blast
11:49 < kfmfe04_> *ucking around with other people's builds, etc..  hehehe
11:49 < uriel> the
11:49 < uriel> Go minecraft server IIRC was intended to be multiplayer :)
11:49 -!- PortatoreSanoDiI [~Marvin@82.84.68.26] has joined #go-nuts
11:50 < jnwhiteh> it is
11:50 < jnwhiteh> and it works fine =)
11:50 < jnwhiteh> its just not as clean as single player due to coding
issues :p
11:50 < uriel> jnwhiteh: awesome
11:50 < jnwhiteh> skelterjohn: if I use gb -M to make some makefiles, I
still need to run sh build to make them all or invoke them manually?
11:50 < uriel> jnwhiteh: how usable is chunky monkey so far?
11:50 < jnwhiteh> you can connect
11:50 < jnwhiteh> =)
11:50 < zippoxer> why?  the code looks fine structured
11:51 < jnwhiteh> I just implemented item persistence in a chunk
11:51 < uriel> (I haven't tested, because I refuse to install java on any of
my systems, hence no minecraft for me)
11:51 < jnwhiteh> you can place blocks (sometimes)
11:51 < jnwhiteh> its a work in progress :p
11:52 < uriel> aiju: maybe we should write a minecraft in Go? then I could
find out what all this buzz about minecraft is about ;P
11:52 < uriel> er, +client
11:52 < aiju> heh
11:52 < kfmfe04_> I would think multi-player minecraft server would be a
fine use of goroutines/message-passing
11:53 < jnwhiteh> its a very very complicated model
11:53 < jnwhiteh> we're in the process of trying to abstract it back out
11:53 -!- Project-2501 [~Marvin@82.84.94.104] has quit [Ping timeout: 264 seconds]
11:53 < jnwhiteh> but things are so closely intertwined due to the protocol
that its a bit rough, but yes, that's the idea.
11:53 -!- angasule [~angasule@190.2.33.49] has quit [Quit: Konversation
terminated!]
11:54 < uriel> how bad is the protocol?
11:54 < kfmfe04_> ahh - protocol wasn't as clean as it could've been,
perhaps - ic
11:54 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
11:54 < jnwhiteh> not nice, but its HOW things are communicated that's the
issue
11:54 < jnwhiteh> and the file format, etc.
11:54 < jnwhiteh> that's all handled in chunkymonkey
11:54 < jnwhiteh> its just a very complicated model =)
11:54 < aiju> i expect nothing less from notch
11:54 < aiju> a guy who calls git a "pile of crap"
11:54 < aiju> and prefers svn
11:54 < zippoxer> y...
11:55 < jnwhiteh> for example, the server inititates the user picking up an
item, since it has the location of the player and the location of the item..  but
the play may not be able to pick up the item due to the inventory being full
11:55 < jnwhiteh> so you'd need two channels to communicate that, which is
just emulating method calls
11:55 < jnwhiteh> and that's just a simple example :p
11:56 < uriel> aiju: wow, didn't know anyone could be so retarded, but then,
he picked Java to code in...
11:56 < uriel> anyone who willfully picks java as a programming language of
choice should be locked up for the good of mankind
11:56 < zippoxer> I prefer svn only because googlecode supports it
11:56 < aiju> googlecode supports hg
11:57 < zippoxer> yeah I prefer hg over svn, but haven't tried it so far :\
11:57 < zippoxer> but I know that it's closer to git
11:57 < aiju> hg is like git, just everything has a different name
11:57 < uriel> I preffer sticks and sand over svn
11:59 < kfmfe04_> I wouldn't blame the language (unless it's C++) - I would
blame the programmer
11:59 < zippoxer> go vs c++ similar to git vs svn
11:59 < aiju> kfmfe04_: haha
11:59 < aiju> kfmfe04_: i always blame the programmer, in this case for
choosing the language
11:59 < kfmfe04_> good one!
12:02 < kfmfe04_> is git that much better than svn?  (I haven't tried git
yet) do the advantages come mostly when there are multiple developers for a
project?  be forewarned - I've been using this stuff since RCS and CVS days, for
me, svn is already unbelievably good d:) - always open to new/better software, tho
12:02 < aiju> YES
12:02 < kfmfe04_> how is it better for a single user?
12:02 < aiju> i used svn for years and switched to git
12:02 < aiju> git is so much better, it's hard to put into words
12:03 < aiju> even with one user
12:03 < kfmfe04_> easier to use?  more intuitive?  more robust?
12:03 < jessta> kfmfe04_: offline access is nice
12:03 < aiju> i find the workflow much nicer
12:03 < kfmfe04_> ahh - that could be a good one - the offline access
12:03 < aiju> less fiddling with version control
12:03 < aiju> i repressed most what i know about svn
12:03 < kfmfe04_> how's the learning curve switching from svn to git?
12:03 < aiju> so i can't give any details
12:03 < aiju> kfmfe04_: not so nice
12:03 < kfmfe04_> crap
12:04 < aiju> you have to forget everything you believe to know about
version control ;P
12:04 < kfmfe04_> let me ask it another way - how many commands do you
regularly use in git (on a weekly basis)?
12:04 < aiju> they use the same terms for different things
12:04 < aiju> kfmfe04_: not so many
12:04 < aiju> currently working with hg, where the situation is similar
12:05 < kfmfe04_> so it sounds like the issue is forgetting the old
terminology
12:05 < aiju> yeah
12:05 < aiju> and learning new workflows
12:05 < kfmfe04_> git > hg or other way around?
12:05 < aiju> i'd say they're equal
12:05 < jlaffaye> kfmfe04_: commit, pull, push, log, checkout, branch
12:06 < kfmfe04_> I know Torvalds did git - anyone famous do hg?
12:06 < kfmfe04_> jlaffaye - those are the basic git commands I need to
learn?
12:06 < jlaffaye> yes
12:06 < kfmfe04_> excellent - ty for the list - I will study this weekend
12:06 < aiju> kfmfe04_: just look at a tutorial
12:07 < kfmfe04_> ok - will do - will rtfm before I use - lest I step in doo
doo from similar terminology
12:08 < jlaffaye> the only disadvantage of git is the inability to do sparse
checkout
12:08 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-148-132.clienti.tiscali.it] has
joined #go-nuts
12:08 < kfmfe04_> you mean you can only checkout the entire tree?
12:08 < aiju> yeah
12:08 < kfmfe04_> ic - so the workaround is to create separate trees?
12:08 < aiju> git/hg repos are meant to be smaller
12:09 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
12:09 < jessta> yeah, you can import other trees as submodules
12:10 < jlaffaye> but you cant move files across submodules :)
12:10 < uriel> I rarely (if ever) had need for submodules with hg
12:10 < uriel> unless your project is in the hundreds of thousands of lines
of code, I don't see the point
12:10 < uriel> and even then
12:11 < aiju> 9front is maybe 2.5 million lines
12:11 < uriel> haha
12:11 -!- PortatoreSanoDiI [~Marvin@82.84.68.26] has quit [Ping timeout: 255
seconds]
12:11 < jlaffaye> we tries to convert the freebsd ports tree (22000 ports,
so 22k subdirs, ~4files per port) and it is not usable
12:12 < jlaffaye> that's not the number of lines but the number of files
which is the problem
12:12 < kfmfe04_> ouch
12:12 < aiju> don't you bsd guys still use cvs?  ;P
12:12 < jlaffaye> yes :(
12:12 < uriel> cvs is still better than svn
12:12 < aiju> true
12:12 < uriel> simpler and more reliable
12:12 < jlaffaye> the svn repo size was 4 times the size of the cvs repo
12:12 < aiju> haha
12:13 < uriel> jlaffaye: I'm sure it was fun when it got corrupted
12:13 < jlaffaye> the fun part is what we call "repocopy"
12:13 < jlaffaye> ie.  an admin do some hacks to move a file in the repo
12:19 < zippoxer> I never got that thing: if few people edit the same file
and commit
12:19 < kfmfe04_> I always found it annoying that you couldn't remove a file
from the repo for real from most SCMs (through normal methods) - but I guess it's
somewhat analogous to DBAs who won't let you remove columns from a table
12:19 < zippoxer> I heard there's no lock in git
12:19 < zippoxer> so what do they do?  :P
12:20 < kfmfe04_> good question - what does git do in the case of a merge
conflict?
12:20 < aiju> panic
12:20 < kfmfe04_> hahaha
12:20 < zippoxer> lol..
12:20 < aiju> not really ;P
12:20 < aiju> it spits out that it conflicted
12:20 < kfmfe04_> to the guy who is slower, I suppose?
12:21 < aiju> yes
12:21 < kfmfe04_> makes sense
12:21 < zippoxer> how does it know who's currently editing that file?
12:21 < aiju> zippoxer: who commited it?
12:21 < zippoxer> ok got it :P
12:21 < aiju> with hg you have changesets with parents
12:21 < aiju> so you have a long line of changesets
12:21 < aiju> if two people start comitting on top of one changeset, it will
split
12:22 < zippoxer> and then someone must merge them manually?
12:22 < aiju> then the slower one has to pull and add a merge changeset
12:22 < zippoxer> nice!
12:22 < aiju> usually automatic
12:22 < aiju> % hg pull ; hg merge ; hg commit ; hg push
12:22 < zippoxer> much more organized than svn
12:23 < aiju> http://code.google.com/p/plan9front/source/list
12:23 < kfmfe04_> so, aiju, since I haven't used hg or git, which one do you
recommend?
12:23 < aiju> note the splits
12:23 < aiju> kfmfe04_: i locally use git
12:23 < kfmfe04_> ok - will go for git then - ty
12:23 < ww> maybe i'm dumb but i always seem to get into trouble with merges
12:24 < aiju> merges with hg are troublesome
12:24 < aiju> because you have to commit all changes
12:24 < aiju> i often have changes i don't want to commit
12:24 < aiju> so i push the commits somewhere else and merge there ;P
12:25 < zippoxer> wait - but why would anybody use git / whatever locally?
12:26 < aiju> because svn sucks?
12:26 < zippoxer> no I mean svn too
12:26 < zippoxer> all version control things
12:26 < aiju> to be able to roll ack
12:26 < aiju> +b
12:26 < zippoxer> my question was fucked up, I mean if ur alone in a repo
12:26 < zippoxer> nobody else with you
12:26 < aiju> yes, i understood
12:27 < zippoxer> ohh
12:27 < aiju> to be able to roll back, if you noticed that you fucked up
12:27 < aiju> or find out what change introduced a bug
12:27 < zippoxer> :P
12:27 -!- antihero [~james@0xf.nl] has left #go-nuts []
12:27 < aiju> and you can just push it somewhere and have other grab it
12:27 < zippoxer> ur right
12:27 < kfmfe04_> aye - extremely useful - for one person - if I have
committed my code, I'm much more confident making drastic changes ( can always
roll back to previous version )
12:28 < aiju> with Plan 9 basically the entire file system is under
primitive version control
12:28 < aiju> every day all modified fs blocks are copied to some secondary
hard disk (or just a partition)
12:28 < aiju> so you can always look how stuff were, say, five days ago
12:29 < zippoxer> takes much more space?
12:29 < aiju> it's not for free
12:29 < aiju> a daily dump is just a few KB if you didn't change much
12:29 < zippoxer> ofcourse but for every change it takes only few additional
bytes?
12:29 < aiju> yeah
12:30 < zippoxer> cool, with todays hardware
12:30 < aiju> bell labs used it into 90s
12:30 < zippoxer> they had todays hardware :P
12:30 < aiju> with 40 GB of hard disk for the cache (literally a cache, also
contains today's changes) and 350 GB of optical media
12:30 < aiju> they didn't manage to fill it in a few years with 50 users
12:31 < zippoxer> wow
12:31 < kfmfe04_> we used to have SAs who wrote scripts to do hourly and
daily snapshots (like what Plan 9 seems to do automagically) - they're lifesavers
when you delete something by accident
12:32 < kfmfe04_> can save hours of work from being lost
12:32 < zippoxer> most software doesn't delete to recycle bin
12:33 < kfmfe04_> I know they usually exist on the disk physically, but is
there a way to recover from a rm in a *nix system?
12:35 < kfmfe04_> aiju, do you know what happened to Plan 9?  they should
release the software to open-source - sounds useful
12:37 -!- iwinulose_ [~charlesdu@c-67-188-13-8.hsd1.ca.comcast.net] has joined
#go-nuts
12:37 < virtualsue> plan 9, the mythical never was genius OS :-)
12:38 < aiju> kfmfe04_: it is open source
12:38 < aiju> kfmfe04_: http://code.google.com/p/plan9front/ our fork
12:39 < kfmfe04_> what's the name of that caching functionality?  maybe
other OSes have packages that adopted it...
12:40 < kfmfe04_> hmm...  ...maybe this will do something similar:
http://www.mikerubel.org/computers/rsync_snapshots/ will have to read
12:40 -!- robteix [~robteix@192.55.54.36] has joined #go-nuts
12:42 < aiju> kfmfe04_: they call it a "Cached WORM file system"
12:43 < aiju> on my laptop the WORM is 10% full
12:44 < aiju> 10 GB WORM, i think
12:44 < skelterjohn> jnwhiteh: you can use gb -m to have gb invoke the
makefiles
12:45 < jnwhiteh> I don't recall what I asked you now =)
12:45 < jnwhiteh> but I found that
12:46 < jnwhiteh> just sorting out my last few issues and pushing it to the
repo
12:47 < skelterjohn> you asked if you used -M to make makefiles, did you
have to use build.sh to invoke them
12:47 -!- tvw [~tv@e176006144.adsl.alicedsl.de] has joined #go-nuts
12:47 < jnwhiteh> ah yes
12:47 < jnwhiteh> thanks =)
12:47 < skelterjohn> np
12:48 < skelterjohn> pushing what to what repo?
12:48 < jnwhiteh> chunkymonkey
12:48 < skelterjohn> what's chunkymonkey?
12:48 < jnwhiteh> minecraft server
12:49 < aiju> why "chunkymonkey"?
12:49 < jnwhiteh> because blocks in minecraft are stored in 'chunks'
12:49 < jnwhiteh> I'd assume
12:49 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
12:51 < jnwhiteh> skelterjohn: https://github.com/jnwhiteh/chunkymonkey and
https://github.com/huin/chunkymonkey/issues/63 if you want to follow along =)
12:51 < jnwhiteh> if you have suggestions for making things easier, please
let me know!
12:53 < aiju> haha
12:53 < aiju> who write that "contributing" part?
12:54 -!- creack [~charme_g@163.5.84.203] has joined #go-nuts
12:57 -!- zippoxer [~zippoxer@bzq-109-64-192-110.red.bezeqint.net] has quit
[Remote host closed the connection]
13:01 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has
joined #go-nuts
13:03 < mdxi> is there going to be a client rewrite that throws out notch's
terrible ideas?  :D
13:03 < aiju> haha
13:04 < aiju> the worst one (using motherfucking java) will be fixed
13:04 < aiju> not sure if you can throw out garbage like the nether ;P
13:05 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
13:09 -!- virtualsue [~chatzilla@nat/cisco/x-jhfiiwjkzhnnnveq] has quit [Quit:
ChatZilla 0.9.87 [Firefox 4.0.1/20110413222027]]
13:11 -!- virtualsue [~chatzilla@nat/cisco/x-kdkrrzowmayiouso] has joined #go-nuts
13:12 -!- jbooth1 [~jay@209.249.216.2] has joined #go-nuts
13:12 < skelterjohn> jnwhiteh: gb doesn't require anything about pkg or cmd
directories...
13:13 < icy> if I iterate over a map, can I safely remove items from it?
13:13 < skelterjohn> i believe so
13:14 < aiju> icy: i think not
13:15 < skelterjohn> should really say in the spec, but i don't see it in
there
13:16 < skelterjohn> "The iteration order over maps is not specified.  If
map entries that have not yet been reached are deleted during iteration, the
corresponding iteration values will not be produced.  If map entries are inserted
during iteration, the behavior is implementation-dependent, but the iteration
values for each entry will be produced at most once."
13:16 < icy> "If map entries that have not yet been reached are deleted
during iteration, the corresponding iteration values will not be produced"
13:16 < skelterjohn> jinx
13:16 < icy> :)
13:16 < skelterjohn> sounds like it's safe
13:17 < icy> from that I gather that deleting the current item is safe
13:20 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Ping
timeout: 276 seconds]
13:22 -!- ArgonneIntern [82ca0251@gateway/web/freenode/ip.130.202.2.81] has joined
#go-nuts
13:28 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 252 seconds]
13:35 -!- tvw [~tv@e176006144.adsl.alicedsl.de] has quit [Remote host closed the
connection]
13:37 -!- robteix [~robteix@192.55.54.36] has quit [Quit: Leaving]
13:37 -!- babali [~babali@2a01:e35:2e0d:ecc0:210:a7ff:fe05:7b50] has quit [Quit:
Leaving]
13:40 -!- iant [~iant@67.218.104.187] has joined #go-nuts
13:40 -!- mode/#go-nuts [+v iant] by ChanServ
13:40 < jnwhiteh> skelterjohn: aye, but I did that to make them logically
separate
13:40 < jnwhiteh> you should see what it looked like before i moved
everything around
13:41 < kfmfe04_> factoring OPC (other people's code) can be very painful
13:41 < kfmfe04_> without unit-tests in place, it can be even tougher
13:42 < jnwhiteh> skelterjohn:
https://github.com/jnwhiteh/chunkymonkey/tree/bb282fae8b8b49689cd60839aca8bca25bd026d0/src/chunkymonkey
13:42 < jnwhiteh> there's like 8 packages in that directory
13:42 < jnwhiteh> and I don't mean within teh subdirectories, I mean within
that directory
13:42 < jnwhiteh> and they were just using godag to sort it out
13:47 -!- robteix [~robteix@192.55.54.36] has joined #go-nuts
13:48 -!- arun [~arun@unaffiliated/sindian] has joined #go-nuts
13:52 -!- frobnitz [~ian@king.bitgnome.net] has joined #go-nuts
13:54 -!- sebastia1skejoe [~sebastian@188.114.142.217] has joined #go-nuts
13:56 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Ping
timeout: 240 seconds]
13:58 -!- sebastianskejoe [~sebastian@188.114.142.217] has quit [Ping timeout: 276
seconds]
14:01 < kfmfe04_> btw, how many klocs is the java server/client?  just
wondering how big this app is...
14:01 < kfmfe04_> (I'm refering to minecraft, btw...)
14:02 < aiju> mein kraft
14:04 < jnwhiteh> kfmfe04_: we don't have access to the source
14:04 < kfmfe04_> :)
14:04 < kfmfe04_> damn - so you are reverse-engineering a client?
14:05 < mdxi> a lot of the modders use decompiling tools
14:05 < kfmfe04_> ic
14:06 < jnwhiteh> and we're working on the server mainly
14:06 < kfmfe04_> someone should crank out an open-source alternative - it
seems so popular, you might be able to get enough people involved - could be
faster than reverse engineering
14:06 < jnwhiteh> its easy enough to use the stock client, but the
multi-player server is less than awesome :P
14:06 < kfmfe04_> I mean, alternative with a cleaner protocol
14:06 < jnwhiteh> meh
14:06 < jnwhiteh> it's be a massive IP/Asset violation
14:06 < jnwhiteh> and we all support the game
14:06 < jnwhiteh> so not sure that's likely
14:07 < kfmfe04_> ? and reverse-engineering isn't an IP/Asset violation?
hmm...
14:07 < jnwhiteh> we're just replacing the back-end server component
14:08 < aiju> at least in germany reverse engineering is legal for that kind
of things
14:08 < jnwhiteh> which isn't required to run the game, just multi-player
14:08 < kfmfe04_> ic
14:08 < skelterjohn|work> jnwhiteh: aha - then i misread the chunkymonkey
issue you linked to
14:08 < jnwhiteh> he gives us a .jar that we can use to host servers
14:08 < jnwhiteh> skelterjohn|work: yeah what I have now is a massive
improvement :P
14:08 < skelterjohn|work> how many people work on the project?
14:09 -!- iwinulose_ [~charlesdu@c-67-188-13-8.hsd1.ca.comcast.net] has quit
[Quit: iwinulose_]
14:09 < jnwhiteh> 3-4 that I see, I'm fairly new to it
14:09 -!- iwinulose_ [~charlesdu@c-67-188-13-8.hsd1.ca.comcast.net] has joined
#go-nuts
14:15 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
14:16 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
14:16 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
14:17 -!- virtualsue [~chatzilla@nat/cisco/x-kdkrrzowmayiouso] has quit [Quit:
ChatZilla 0.9.87 [Firefox 4.0.1/20110413222027]]
14:19 -!- ancientlore [~ancientlo@63.76.22.10] has joined #go-nuts
14:21 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 264 seconds]
14:24 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has joined
#go-nuts
14:25 < ArgonneIntern> having a problem here, so I write json data to a
file.  When this data changes in my program I rewrite it to the file.  Sometimes
the data ends up being shorter than the data already in the file, and it leaves
the extra bytes at the end.  Does file.Write() not clear the file before writing?
14:25 < ArgonneIntern> I guess it's obvious it doesn't, but can I ask why
14:26 < jnwhiteh> because that's not how the posix model for file operations
works
14:26 < skelterjohn|work> truncate
14:26 < jnwhiteh> you can get that by specifying O_TRUNC
14:26 < jnwhiteh> or calling file.Truncate()
14:26 < ArgonneIntern> ahh
14:26 < ArgonneIntern> tyvm
14:27 < ArgonneIntern> took like 3 hours to track down that bug lol
14:27 < ArgonneIntern> upon a couple of passes I was getting json unmarshal
errors
14:27 < skelterjohn|work> i had the same issue once
14:27 < aiju> s/posix/unix/
14:27 < skelterjohn|work> it was very frustrating until i figured it out
14:28 < jnwhiteh> aiju: it was adopted into the posix model, wasn't it (of
course it goes back further as you say)
14:28 -!- gnuvince [~vince@ip-96-43-233-174.dsl.netrevolution.com] has joined
#go-nuts
14:28 < aiju> and posix is evil.
14:28 < ArgonneIntern> in c++ it always truncates on an ifstream...I'm
pretty sure.  This is why I need to learn other languages lol
14:28 < jnwhiteh> =)
14:28 < ArgonneIntern> well i guess it would be an ofstream
14:28 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
14:29 < aiju> it's actually not just limited to unix / posix
14:29 < aiju> even CP/M and DOS work that way
14:29 < aiju> except that annoying ^Z stuff
14:30 < ArgonneIntern> so just truncate to 0 and then write?
14:30 < skelterjohn|work> open with the O_TRUNC flag
14:30 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 244 seconds]
14:31 < aiju> isn't there a special function to call files for writing?
14:31 < ArgonneIntern> yes
14:31 < ArgonneIntern> OpenFile
14:31 < aiju> no
14:31 < ArgonneIntern> as opossed to Open for reading
14:31 < aiju> there's a third one
14:31 < aiju> os.Create
14:31 < skelterjohn|work> use os.Create
14:31 < skelterjohn|work> that will create a new file, or truncate an
existing one
14:31 < skelterjohn|work> either way giving you an empty file for writing
14:32 < ArgonneIntern> so for openFile would I just or the flags together?
14:32 < aiju> no, you use os.Create
14:32 < skelterjohn|work> that wasn't quite a sentence
14:33 < skelterjohn|work> oh logical or
14:33 < skelterjohn|work> haha
14:33 < ArgonneIntern> os.O_ RDWR | os.O_TRUNC
14:33 < skelterjohn|work> yes you could do that, but use os.Create
14:33 < ArgonneIntern> is it faster?
14:34 < aiju> os.RDWR | os.O_TRUNC | os.O_CREAT
14:34 < aiju> you make less mistakes ;P
14:34 < skelterjohn|work> use os.Create and don't over-optimize =p
14:34 -!- fvbommel [~fvbommel_@dyn069053.nbw.tue.nl] has quit [Ping timeout: 276
seconds]
14:34 < skelterjohn|work> write assembly code if you want everything to
scream
14:34 -!- zippoxer [~zippoxer@109.64.192.110] has joined #go-nuts
14:37 < ArgonneIntern> rofl just for fun I tried logic or and it didn't have
the desired effect ><
14:37 < aiju> it should have
14:38 < skelterjohn|work> probably didn't compile if you used ||
14:38 < skelterjohn|work> which is the desired effect ;)
14:38 < ArgonneIntern> oh you need two?
14:38 < aiju> no
14:38 < ArgonneIntern> I used one
14:38 < skelterjohn|work> || is logical or, | is bitwise or
14:38 < skelterjohn|work> bitwise or is for flags
14:38 < skelterjohn|work> logical or is for booleans
14:38 < ArgonneIntern> yeah
14:38 < ArgonneIntern> databaseFile, error :=
os.OpenFile("ResourceDatabase", os.O_RDWR | os.O_TRUNC, 0777)
14:38 < skelterjohn|work> os.Create
14:38 < aiju> what happens?
14:38 < ArgonneIntern> after writing to it it is still size 0
14:39 < aiju> that's odd
14:39 < aiju> are you closing the file?  ;P
14:39 < ArgonneIntern> yes
14:39 < skelterjohn|work> are you checking the error
14:39 < ArgonneIntern> yes
14:39 < skelterjohn|work> are you calling databaseFile.Truncate() after you
write everything
14:39 < ArgonneIntern> http://www.pastie.org/2116343
14:40 < skelterjohn|work> try os.Create and see what happens
14:40 < ArgonneIntern> ok
14:41 < ArgonneIntern> that works
14:41 < ArgonneIntern> interesting
14:42 < ArgonneIntern> bug?
14:42 -!- Queue29_ [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has
joined #go-nuts
14:42 < aiju> ArgonneIntern: try adding O_CREAT?
14:42 < skelterjohn|work> dunno
14:42 < skelterjohn|work> probably not, since these flags are just forwarded
to a C function
14:43 < ArgonneIntern> O_TRUNC int = syscall.O_TRUNC // if possible,
truncate file when opened.  )
14:43 < ArgonneIntern> that should work..
14:44 < ArgonneIntern> O_CREATE int = syscall.O_CREAT // create a new file
if none exists.
14:44 < ArgonneIntern> so that won't work since the file already exists
14:44 < aiju> ArgonneIntern: no
14:44 < aiju> O_CREATE is a nop if the file already exists
14:45 < ArgonneIntern> what I meant to say was that it won't have the
desired effect
14:45 < aiju> ArgonneIntern: try strace
14:46 < ArgonneIntern> I don't care that much honestly
14:47 < ArgonneIntern> I wish os.O_trunc worked
14:47 < ArgonneIntern> but I'll just use create
14:47 -!- fvbommel [~fvbommel_@ip212-238-67-156.hotspotsvankpn.com] has joined
#go-nuts
14:47 -!- Venom_X_ [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
14:47 < skelterjohn|work> report an issue, but i bet this will get a
WorkingAsIntended
14:48 < ArgonneIntern> which is why I'm not reporting it
14:48 < aiju> go lacks the cool 9front issue statuses
14:48 < ArgonneIntern> Id on't know enough to say whether or not it's a bug
or not
14:48 < aiju> we call that a "WorksForMe" or "Invalid"
14:48 < skelterjohn|work> go has Invalid
14:48 -!- arun [~arun@unaffiliated/sindian] has quit [Ping timeout: 252 seconds]
14:48 < skelterjohn|work> but that's for like "i tried to open a file but it
won't run the GC - this is a bug!"
14:49 < aiju> we use Invalid for everything which isn't a bug
14:49 < aiju> and WorksForMe for something which is a bug, but can't be
fixed
14:49 < aiju> eh reproduced
14:50 -!- Queue29_ [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
14:51 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
14:52 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
14:53 -!- arun [~arun@unaffiliated/sindian] has joined #go-nuts
14:54 -!- iant [~iant@67.218.104.187] has quit [Quit: Leaving.]
14:54 < ArgonneIntern> I reported it.  On the off chance it is a bug.  If
not, nothing lost
14:54 -!- TheMue [~TheMue@p5DDF5E55.dip.t-dialin.net] has joined #go-nuts
14:59 < skelterjohn|work> except you get to join the club of people who
report non-bugs, with me
14:59 -!- crodjer [~rohanjain@122.169.156.120] has joined #go-nuts
14:59 -!- kfmfe04_ [~kfmfe04@NK219-91-91-190.adsl.dynamic.apol.com.tw] has quit
[Quit: kfmfe04_]
14:59 < crodjer> what is the port on which the docs (htmlgen) run
15:00 < skelterjohn|work> ??
15:00 < skelterjohn|work> are you talking about godoc?
15:00 < skelterjohn|work> i've never heard of htmlgen
15:00 < crodjer> in the go source code
15:01 < crodjer> the docs dir there is this makehtml (which probably builds
docs) and generate htmlgen
15:01 < skelterjohn|work> if you're talking about the documentation server
you specify it on the command line: godoc -http :6060
15:01 < skelterjohn|work> source documentation is done using godoc
15:02 < crodjer> skelterjohn|work: k, thanks
15:02 < skelterjohn|work> htmlgen seems to be a tool to turn plain text into
html
15:02 -!- fvbommel [~fvbommel_@ip212-238-67-156.hotspotsvankpn.com] has quit [Ping
timeout: 276 seconds]
15:03 < crodjer> yeah
15:03 < skelterjohn|work> but it doesn't serve anything
15:03 < crodjer> I thought earlier godoc was a code documentation generator
15:04 < crodjer> (I am just starting to look into code so may be sounding
silly)
15:04 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
15:05 -!- iant [~iant@nat/google/x-vloihyidrdghqobx] has joined #go-nuts
15:05 -!- mode/#go-nuts [+v iant] by ChanServ
15:05 -!- angasule [~angasule@190.2.33.49] has quit [Remote host closed the
connection]
15:06 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
15:09 -!- shvntr [~shvntr@113.84.88.149] has joined #go-nuts
15:14 < ArgonneIntern> skelterjohn|work: I just talked with my boss, and he
looked it over and he agrees that it should indeed have the effect I'm looking for
15:14 < ArgonneIntern> so there is some legitimacy to the report
15:14 < ArgonneIntern> the buffer gets cleared on the Close()
15:14 < ArgonneIntern> so it should have data in it
15:15 < skelterjohn|work> did adding O_CREAT help?
15:15 < ArgonneIntern> Im' just using the Create function
15:15 < ArgonneIntern> thatw orks perfectly for now
15:15 < skelterjohn|work> so, you didn't try it?  :)
15:15 < ArgonneIntern> there was no point
15:15 < ArgonneIntern> O_CREATE int = syscall.O_CREAT // create a new file
if none exists.
15:15 < skelterjohn|work> to better understand why the code didn't behave as
expected?
15:16 < ArgonneIntern> it's a noop on my case
15:16 < ArgonneIntern> in aiju pointed out
15:16 < skelterjohn|work> so you "know" it wouldn't help
15:16 < ArgonneIntern> ok I'll try it.  Assuming the comment is correct it
shouldn't help
15:17 < skelterjohn|work> on another note, it seems like there are a lot
more _platform.go flags in the os package than there used to be
15:17 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
15:17 < skelterjohn|work> _plan9.go, _posix.go
15:17 < ArgonneIntern> yes it's a noop
15:18 < ArgonneIntern> so the comment is correct :)
15:18 -!- Queue29_ [~Queue29@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
15:20 -!- shvntr [~shvntr@113.84.88.149] has quit [Ping timeout: 244 seconds]
15:20 < zippoxer> can I use reflect to get structs in the current scope
(package)?
15:21 < skelterjohn|work> you mean, list them?
15:21 < zippoxer> yeah
15:21 < zippoxer> or get by name
15:21 < skelterjohn|work> i don't think so - this would be source analysis
15:21 < zippoxer> it's fine for me too
15:21 < skelterjohn|work> you can't get by name - that's something that's on
the wishlist
15:21 < zippoxer> ok so atleast I can get struct's fields
15:22 < skelterjohn|work> yeah
15:22 -!- mrsrikanth [~mrsrikant@59.92.11.58] has joined #go-nuts
15:23 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 240 seconds]
15:27 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
15:27 -!- Halavanja [~chatzilla@anlextwls002-095.wl.anl-external.org] has joined
#go-nuts
15:27 -!- bakedb [~kel@188.29.64.85.threembb.co.uk] has quit [Ping timeout: 252
seconds]
15:27 -!- skelterjohn|work [~skelterjo@dice.rutgers.edu] has left #go-nuts
["Leaving"]
15:27 -!- skelterjohn|work [~skelterjo@dice.rutgers.edu] has joined #go-nuts
15:30 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts
15:30 -!- arun_ [~arun@unaffiliated/sindian] has quit [Read error: Connection
reset by peer]
15:30 -!- noodles775 [~michael@canonical/launchpad/noodles775] has quit [Quit:
leaving]
15:31 -!- arun [~arun@unaffiliated/sindian] has quit [Remote host closed the
connection]
15:34 < skelterjohn|work> can anyone verify something for me?  with the
latest weekly goinstall -clean doesn't seem to actually clean
15:35 < aiju> 17:20 < ArgonneIntern> the buffer gets cleared on the
Close()
15:35 < aiju> there is no buffer
15:35 < aiju> os.Open does unbuffered I/O
15:35 -!- arun [~arun@2001:610:110:4e2:280:5aff:fe69:e130] has joined #go-nuts
15:36 -!- arun [~arun@2001:610:110:4e2:280:5aff:fe69:e130] has quit [Changing
host]
15:36 -!- arun [~arun@unaffiliated/sindian] has joined #go-nuts
15:36 -!- arun_ [~arun@82-204-53-218.dsl.bbeyond.nl] has joined #go-nuts
15:36 -!- arun_ [~arun@82-204-53-218.dsl.bbeyond.nl] has quit [Changing host]
15:36 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts
15:36 < skelterjohn|work> actually, no it's cleaning...something else is the
matter
15:36 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.]
15:40 < skelterjohn|work> ah - goinstall -a stops when it has an error
building pkgs...rather than building all the ones it can
15:44 < gnuvince> What's the proper way to mix cmd and pkg Makefiles?  I am
writing a small program, and I'd like to properly separate the application form
its library.
15:45 -!- Queue29_ [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
15:45 < skelterjohn|work> don't mix them?  put each target (a cmd or a pkg)
in its own directory
15:46 < skelterjohn|work> if you have multiple targets in a directory, the
standard makefiles will have problems because they'll all use _go_.6/8/5 as an
intermediate binary
15:46 -!- bakedb [~kel@188.29.67.54.threembb.co.uk] has joined #go-nuts
15:47 -!- Queue29_ [~Queue29@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
15:47 < gnuvince> skelterjohn|work: what I mean is, how do I organize my
Makefiles such that in my pkg, I do import "mylib/mypackage" and with a simple
make command, all packages are compiled and the cmd compiled and linked?
15:48 < skelterjohn|work> i see - you have a few choices
15:48 < skelterjohn|work> first, if you want to continue using the standard
makefiles, you can use relative import paths
15:49 < skelterjohn|work> so if you are compiling a cmd in directory X, and
there is a package in directory Y called Z, then you can import "../Y/_obj/Z"
15:49 < skelterjohn|work> you could also add a -I flag to the makefile by
adding the line GCFLAGS := -I ../Y/_obj, and then just import "Z"
15:49 < gnuvince> This seems reasonable
15:49 < skelterjohn|work> second, you can try to use goinstall by setting
$GOPATH to your root workspace directory
15:50 -!- replore [~replore@ntkngw256114.kngw.nt.ftth.ppp.infoweb.ne.jp] has
joined #go-nuts
15:50 < skelterjohn|work> then if your pkg Z is in $GOPATH/src/Z, you will
be able to import "Z" if you compile with goinstall
15:51 -!- iant [~iant@nat/google/x-vloihyidrdghqobx] has quit [Quit: Leaving.]
15:51 < skelterjohn|work> you can also use gb (http://go-gb.googlecode.com),
a 3rd party tool made for this sort of thing
15:51 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-183-8.clienti.tiscali.it]
has joined #go-nuts
15:52 < skelterjohn|work> disclosure: when i say "made" i really meant "I
made"
15:54 * skelterjohn|work goes to lunch
15:54 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Quit: Leaving...]
15:55 -!- fvbommel [~fvbommel_@86.86.15.250] has joined #go-nuts
15:55 -!- yiyus [2383vince@je.je.je] has quit [Remote host closed the connection]
15:55 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-148-132.clienti.tiscali.it] has
quit [Ping timeout: 276 seconds]
15:56 -!- arun_ [~arun@unaffiliated/sindian] has quit [Ping timeout: 255 seconds]
15:57 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
16:08 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
16:12 -!- sl [none@sp.inri.net] has joined #go-nuts
16:16 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has joined
#go-nuts
16:18 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Quit: pjacobs]
16:26 -!- alsvidr [~user@2a00:1398:2:4006:21f:16ff:fe28:b064] has left #go-nuts
["ERC Version 5.3 (IRC client for Emacs)"]
16:29 -!- alsvidr [~user@2a00:1398:2:4006:21f:16ff:fe28:b064] has joined #go-nuts
16:31 -!- yiyus [1242712427@server1.bouncer4you.de] has joined #go-nuts
16:31 -!- niemeyer [~niemeyer@200.248.123.132] has joined #go-nuts
16:32 -!- babali [~babali@2a01:e35:2e0d:ecc0:210:a7ff:fe05:7b50] has joined
#go-nuts
16:32 < babali> hi
16:33 < babali> is there stuff to parse ~/.ssh/id_rsa.pub in go's crypto
package ? Thanks.
16:34 < aiju> "i can has ssh key parser?  kthxbai"
16:35 < babali> =]
16:38 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
16:38 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
hcatlin]
16:43 < justinlilly> what's to parse?  just split on the single space, and
you get protocol, key.
16:43 < mkb218> try this package: http://bit.ly/mUADQM
16:43 < mkb218> ;)
16:47 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has quit [Quit:
pyrhho]
16:52 -!- franciscosouza [~francisco@187.105.24.41] has joined #go-nuts
16:55 < babali> thanks but you have to validate the data, for exemple check
for well encoded data and then check the magic, extract the number, compute the
fingerprint etc...  ?
16:56 < babali> get the key size
16:57 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Ping
timeout: 255 seconds]
16:59 -!- Zolla [~Zola@76.91.53.83] has joined #go-nuts
17:00 < jlaffaye> interesting post about pprof :)
17:01 < babali> jlaffaye, which one ?
17:02 < babali> jlaffaye, ok got it on the blog
17:02 < jlaffaye> ;)
17:02 -!- Zola [~Zola@76.91.53.83] has quit [Ping timeout: 250 seconds]
17:04 -!- bakedb [~kel@188.29.67.54.threembb.co.uk] has quit [Ping timeout: 255
seconds]
17:04 -!- alsvidr [~user@2a00:1398:2:4006:21f:16ff:fe28:b064] has left #go-nuts
["ERC Version 5.3 (IRC client for Emacs)"]
17:06 -!- Zolla [~Zola@76.91.53.83] has quit [Ping timeout: 276 seconds]
17:10 -!- arun_ [~arun@e71020.upc-e.chello.nl] has joined #go-nuts
17:10 -!- arun_ [~arun@e71020.upc-e.chello.nl] has quit [Changing host]
17:10 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts
17:12 -!- sebastia1skejoe [~sebastian@188.114.142.217] has quit [Quit: Lost
terminal]
17:17 -!- iant [~iant@nat/google/x-gxtlmenspjejwtgr] has joined #go-nuts
17:17 -!- mode/#go-nuts [+v iant] by ChanServ
17:22 < zippoxer> do people really spend their time to write things like
this?  http://monoc.mo.funpic.de/go-rant/
17:22 < skelterjohn|work> at least one person does
17:22 < kevlar_work> Clearly.
17:22 < zippoxer> don't like?  don't use.
17:23 < skelterjohn|work> at the same time, don't like their opinion?  don't
read it
17:23 < zippoxer> right :P
17:23 < kevlar_work> Most people will stop reading when he calls UNIX a
virus.
17:23 < skelterjohn|work> i see nothing wrong with writing about things that
you run across
17:23 < kevlar_work> I find it enlightening to see the reasons why people
hate the things I love.
17:23 < zippoxer> yeah, but it seems that he want people to not use it
17:23 < mpl> skelterjohn|work: you've just invalidated 99% of youtube and
blogposts comments.  you're mean.  ;)
17:23 < skelterjohn|work> if the only published opinions out there were good
ones, it would be pointless
17:24 < zippoxer> he didn't wrote what he think about the language, he wrote
what he thinks bad about the language
17:24 -!- jemeshsu [~jemeshsu@bb220-255-88-127.singnet.com.sg] has joined #go-nuts
17:24 < zippoxer> didn't write..
17:25 < skelterjohn|work> i wouldn't be surprised if those two things were
one and the same
17:25 < skelterjohn|work> and he last sentence answers your basic question
17:25 < skelterjohn|work> his
17:26 < zippoxer> honestly he suprised me :)
17:26 < zippoxer> he's not that blind about what he's doing..
17:27 < zippoxer> saying*
17:27 < kfmfe04> the guy writes like a big fan of C++ (his opinions seem to
be made through C++ colored glasses)
17:28 -!- niemeyer [~niemeyer@200.248.123.132] has quit [Ping timeout: 240
seconds]
17:28 < kevlar_work> yeah
17:28 < kevlar_work> and he seems to ignore some key things like panic
17:28 < kfmfe04> I personally like Go for all the unnecessary complexity
that has been left out
17:29 < kevlar_work> +1
17:30 < kevlar_work> and wtf, where did he dig up `s :=
sum(&[...]int{1,2,3});`
17:30 < kevlar_work> that would normally be s := sum([]int{1,2,3})
17:31 < skelterjohn|work> it's not an exported function, so it came from
example code
17:31 < skelterjohn|work> not a library
17:31 < skelterjohn|work> he is pointing out that there are silly ways to do
things, even in go
17:31 -!- sacho [~sacho@95-42-99-223.btc-net.bg] has joined #go-nuts
17:31 < skelterjohn|work> not sure how useful that observation is
17:32 < kevlar_work> he also doesn't like if init; test {} even though he
appears to have no problem with for init; check; inc {}
17:33 < kevlar_work> and he also doesn't appear to like the channel syntax
though he appears to like channels.
17:33 < kevlar_work> or goroutine sytax.
17:33 < kevlar_work> so he combined both channel send, recieve, and a
goroutine all into a single line and called it 'ugly go"
17:35 -!- niemeyer [~niemeyer@189.96.244.141] has joined #go-nuts
17:36 < kevlar_work> though to be fair, this was written in 2009, and I for
one can't remember what Go looked like back then.
17:36 < kevlar_work> I looked at it once because I was in school and heard
people talk about it, but I didn't use it hardcore until about a year later.
17:36 < skelterjohn|work> it had semi-colons all over the place
17:37 -!- pjacobs [~pjacobs@rrcs-24-73-248-196.sw.biz.rr.com] has joined #go-nuts
17:39 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
17:40 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
17:40 -!- pjacobs [~pjacobs@rrcs-24-73-248-196.sw.biz.rr.com] has quit [Client
Quit]
17:41 -!- iwinulose_ [~charlesdu@c-67-188-13-8.hsd1.ca.comcast.net] has quit [Ping
timeout: 252 seconds]
17:41 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
17:43 < jessta> kevlar_work: yeah, no recover() in 2009
17:43 -!- pjacobs [~pjacobs@rrcs-24-73-248-196.sw.biz.rr.com] has joined #go-nuts
17:44 < aiju> 19:27 < zippoxer> do people really spend their time to
write things like this?  http://monoc.mo.funpic.de/go-rant/
17:44 < aiju> i like how he has no clue what he's talking about
17:44 < aiju> "I just think UNIX is vastly overrated as a modern OS"
17:44 < aiju> UNIX is dead and it's starting to smell really bad -- Rob Pike
17:44 -!- iwinulose_ [~charlesdu@c-67-188-13-8.hsd1.ca.comcast.net] has joined
#go-nuts
17:45 < kevlar_work> aiju, lol
17:45 < aiju> "Exceptions (or some form of non-local transfer of control)"
17:45 <+iant> Do people really spend their writing things like that?  I
would say: yes, they do
17:45 < aiju> does he want goto?
17:45 <+iant> he probably wrote that before panic was added
17:46 < skelterjohn|work> so basically "do it perfectly from day one or
don't bother"
17:46 < aiju> iant: it's not his main argument
17:46 < aiju> much of it still applies, i'd say
17:46 <+iant> agreed
17:47 < aiju> Seriously?  There's goto but no exceptions?  Really?!
17:47 < aiju> hahahahahaha
17:47 < aiju> I like how he ridicules the Go syntax
17:48 < aiju> there is no bad syntax, only syntax you're not used to
17:48 < aiju> and Haskell.
17:48 < dforsyth> theres video of some guy asking andrew gerrand who go
could be designed so badly after a talk.  which means the guy sat through the
entire talk seemingly just to ask his question.  some people just have too much
time.
17:49 < dforsyth> s/who/how/
17:49 < chomp> hey haskell syntax is perfect
17:49 < chomp> you take that back
17:49 < aiju> chomp: that was a joke
17:49 < chomp> :)
17:49 < aiju> i don't like haskell's syntax, i guess i'm just not used to it
17:49 < aiju> i'd prefer it if it was more like LISP
17:50 < chomp> idontknow $ what you mean
17:51 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-151-38.clienti.tiscali.it] has
joined #go-nuts
17:51 < ArgonneIntern> aiju: you are so humble.
17:52 < aiju> chomp: it's more stuff like
17:52 < aiju> f (3 + 4) (6 + (5 * 4)) (g (h l) (d c))
17:53 < skelterjohn|work> that seems like half C and half LISP
17:53 < chomp> i tend to prefer it over lisp
17:53 < chomp> but yeah it's a matter of familiarity above all else i guess
17:53 < skelterjohn|work> oh, no i parsed it now
17:53 < aiju> (f (+ 3 4) (+ 6 (* 5 4)) (g (h l) (d c)))
17:53 < aiju> LISP
17:53 < aiju> f(3+4, 6+5*4, g(h(l),d(c)))
17:53 < aiju> C
17:53 < chomp> both probably look like nonsense to someone familiar with
only C
17:53 < skelterjohn|work> i looked at "(g (h l) (d c))" and parsed it
without context
17:54 < skelterjohn|work> when i looked at the statement as awhole it made
more sense
17:54 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-183-8.clienti.tiscali.it]
has quit [Ping timeout: 264 seconds]
17:54 < aiju> chomp: C still looks the most natural to me
17:54 < aiju> but i have written at least 20 KLOC of C in my life, and maybe
2 KLOC of LISP
17:54 < aiju> and maybe 200 LOC Haskell
17:55 < chomp> it's also probably due to the form of C expressions and
function paramterization most closely resembles common mathematical notation
17:55 < chomp> nevermind my total grammar fail there
17:55 < aiju> chomp: have you seen books by LISPers?
17:55 < skelterjohn|work> what do you code in, mostly?
17:55 < zippoxer> aiju: u recommend haskell or u had bad time with it?
17:55 < aiju> they write stuff like (O (exp n 2))
17:55 < aiju> zippoxer: haskell has interesting ideas, but i have no clue
what to use it for in practice
17:56 < zippoxer> like me :P
17:56 < aiju> skelterjohn|work: C and Go
17:57 < exch> 'c d l h g 5 4 * 6 + 3 4 + f' <- thats what that thing
looks like in languages like Factor :)
17:58 < aiju> i've written some FORTH
17:58 < aiju> anything remotely serious is basically a huge stack shuffling
orgy
17:59 < exch> nice isn't it?  ^^
17:59 < exch> Factor abstracts all that away with combinators and other
fancy stuff
17:59 < aiju> i've heard
18:00 < aiju> forth has lots of elegant simplicity
18:01 < skelterjohn|work> "at least" 20 kloc of C seems low
18:01 < aiju> skelterjohn|work: i have no clue
18:01 < aiju> i never counted
18:01 < skelterjohn|work> i've had single projects larger than that
18:01 < skelterjohn|work> ah
18:01 < chomp> i think i've written 20 kloc this year
18:01 < skelterjohn|work> that sounds more normal
18:02 < chomp> maybe even low.  1 kloc/month even feels low to me
18:02 < chomp> errr
18:02 < chomp> per week
18:02 < aiju> i think i have written 1 kloc/day on some days
18:02 < aiju> then i spend one week debugging
18:02 < ArgonneIntern> skelterjohn|work: it wasn't a bug
18:02 < aiju> to notice that a '|' was missing
18:02 < jessta> aiju: yeah, leanred some haskell and decided that other
people would have the same difficultity that I had with it so I didn't imagine it
would get much a of community
18:02 < chomp> hah, that happens too
18:03 < skelterjohn|work> ArgonneIntern: what was the issue?
18:03 < aiju> but then again
18:03 < ArgonneIntern> skelterjohn|work: I had it in an infinate loop, the
file open, and it was opening and truncating so fast that anytime I opened it, it
was empty
18:03 < skelterjohn|work> hah
18:03 < skelterjohn|work> there you go :)
18:03 < chomp> if i only ever had to write hypothetical programs i think
haskell would be my favorite language
18:03 < ArgonneIntern> skelterjohn|work: yea...
18:03 < aiju> Measuring software progress by lines of source is like
measuring aircraft building progress by weight.  -- Bill Gates
18:03 < ArgonneIntern> skelterjohn|work: so that took me roughly 4 hours to
diagnose
18:04 < skelterjohn|work> i know the feeling
18:04 < aiju> ArgonneIntern: that's NOTHING
18:04 < aiju> ArgonneIntern: i just spend ONE WEEK debugging something which
turned out to be a 'd' instead of a 'm' at some place
18:04 < chomp> bet you won't make that mistake again :)
18:04 < ArgonneIntern> so humble!
18:04 < ArgonneIntern> although that is funny
18:04 < skelterjohn|work> your face is funny
18:05 < ArgonneIntern> that hurts
18:05 < chomp> aiju, perhaps you should consider a new profession.  maybe
coding isn't for you
18:05 < chomp> maybe management!
18:05 < ArgonneIntern> LMAO
18:05 < aiju> hahahaha
18:05 * aiju gets out his gun
18:05 < chomp> well that's one way to ship a project
18:05 < chomp> "SHIP IT OR I KILL THE ENGINEERS"
18:06 < ArgonneIntern> one of my friends in webdev is trying to convince his
boss that he doesn't need duplicate data on the server.  His boss isn't hearing it
18:06 < ArgonneIntern> gotta love management
18:06 -!- aweber [~mam@p5491D24C.dip.t-dialin.net] has joined #go-nuts
18:06 < skelterjohn|work> your friend doesn't like backups?
18:06 < ArgonneIntern> his boss wants gim to duplicate data and keep both of
the peices of data synced with each other, over 10's of thousands of forms
18:06 < aiju> haha
18:06 < ArgonneIntern> we aren't talking backups
18:07 < ArgonneIntern> we talking data
18:07 < chomp> wat.
18:07 < ArgonneIntern> yea..
18:07 < aiju> 20:10 < chomp> aiju, perhaps you should consider a new
profession.  maybe coding isn't for you
18:07 < ArgonneIntern> he complains about it everyday
18:07 < chomp> i mean, backups are of data.  so wat.
18:07 < aiju> it's just funny to find a single wrong char in 2200 lines of
code
18:07 < ArgonneIntern> no you're not getting it
18:07 < chomp> aiju, i keed
18:07 < ArgonneIntern> I understand backups are good
18:07 < chomp> maybe not getting it because you aren't actually explaining
what you mean
18:08 < ArgonneIntern> these peices of data are the same but being oeprated
on in seperate places, but need to be synced
18:08 < chomp> got it
18:08 < ArgonneIntern> and this needs to be done for 10's of thousands of
data
18:08 < ArgonneIntern> my friend is about to give his boss the finger lol
18:09 < chomp> eh if he really can't talk sense into the guy and there's no
way to impose a better approach, he should probably gtfo
18:09 < chomp> because that's an awful situation to be in
18:10 < chomp> of course maybe he just needs to make a better case
18:10 < chomp> certainly the truth would be on his side
18:10 -!- kinofcain [~KinOfCain@h-64-105-141-42.snvacaid.static.covad.net] has
joined #go-nuts
18:10 < exch> A manager doesnt understand why things are inefficient or just
unwieldy.  What speaks to them is cost.  Your friend should explain to him why
having 2 copies is more expensive.
18:10 < ArgonneIntern> he is socially impaired so I'm leaning towards that
18:10 < chomp> what exch said, exactly
18:11 < chomp> it's not always easy to prove definitively that dumb and lazy
is also expensive, but then again definitive proof isn't always necessary.  just
persuasive argument
18:16 -!- replore [~replore@ntkngw256114.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Read error: Connection reset by peer]
18:16 -!- replore_ [~replore@ntkngw256114.kngw.nt.ftth.ppp.infoweb.ne.jp] has
joined #go-nuts
18:17 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has quit [Quit:
wallerdev]
18:19 < uriel> nice:
http://blog.golang.org/2011/06/profiling-go-programs.html
18:20 < zippoxer> uriel: thanks for updating here
18:20 -!- kfmfe04_ [~kfmfe04@host-58-114-183-56.dynamic.kbtelecom.net] has joined
#go-nuts
18:20 -!- niemeyer [~niemeyer@189.96.244.141] has quit [Ping timeout: 240 seconds]
18:21 < aiju> i hope valgrind profiling works with Go some time
18:22 < aiju> (might even work now, haven't tried in a long time)
18:22 < skelterjohn|work> remind me what valgrind is?
18:22 < aiju> it does some crazy JIT stuff to do all kind of runtime
analysis
18:22 < aiju> finding memleaks, profiling etc.
18:23 < aiju> the profiler shows per-function, per-line and per-instruction
statistics
18:23 < aiju> this is *really* handy
18:23 < skelterjohn|work> what i think would be cool is if the runtime could
rewrite some code, in certain circumstances
18:23 < skelterjohn|work> for instance, if GOMAXPROCS = 1, no locking is
needed for channels
18:24 < skelterjohn|work> that's about the only one i can think of
18:24 < skelterjohn|work> i'm not super clever
18:25 < aiju> garbage collection is one of the things which amazingly annoys
you indepedently whether you have it or not
18:28 < uriel> aiju: I don't think it will work, but I think the techniques
Russ shows should be more than enough
18:28 < uriel> (I mean, I don't think it works now, eventually valgrind will
work, I just find using it a bit daunting some times)
18:29 < aiju> uriel: actually, last time i tried, it worked "good enough"
18:29 < aiju> it helped my track down some bottlenecks in my gameboy
emulator
18:29 < uriel> aiju: ah, interesting, I remember hearing that it didn't work
at all long ago, but didn't hear anything on the topic since, so I assumed it
would still not work
18:29 < uriel> aiju: nice
18:29 < aiju> i find per function profiling useless in many cases
18:30 < aiju> it usually tells you something along "the engine uses the most
fuel"
18:30 < uriel> hah
18:30 < uriel> I disagree, and I think the way Russ shows how to use it is
quite neat
18:30 < aiju> there are good cases
18:33 < aiju> there are some really awkward performance traps ..
18:33 < aiju> i once sped up a program by a factor of two by replacing
18:33 < aiju> a %= b;
18:34 < aiju> with while(a >= b) a -= b;
18:34 < skelterjohn|work> very interesting
18:34 < aiju> because in most cases a was less than 2*b
18:34 < skelterjohn|work> yes
18:34 < skelterjohn|work> makes sense
18:34 < aiju> of course this will kill your prrformance if a ever reaches
100000000*b or similar
18:35 < skelterjohn|work> if a > 2*b { a %=b } else { ...  }
18:35 < aiju> heh
18:35 < aiju> but actually it's usually predictable from the algorithm
18:36 < aiju> (a+1)%b vs.  (a*c)%b
18:36 < skelterjohn|work> most of my uses of % are to make indices wrap with
lists
18:36 < skelterjohn|work> that could could benefit from this replacement
18:38 < mtrichardson> I'm updating a stale module and was hoping somebody
could help me understand some unfamiliar syntax.
18:38 < mtrichardson> v :=
reflect.Indirect(reflect.ValueOf(cm)).(*reflect.StructValue)
18:38 < mtrichardson> What's the last part of that, the .(*ref...) doing?
18:38 < aiju> mtrichardson: type assertion
18:39 < aiju> "i think this interface is a *reflect.StructValue, let me
treat it as such"
18:39 < mtrichardson> aiju: okay, that definitely makes sense.
18:39 < aiju> panics if the assertion turns out to be wrong
18:39 < exch> Indirect() returns an interfacevalue..  the type assertion
'casts' to its concrete type
18:40 -!- rcrowley_ [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Read
error: Operation timed out]
18:41 < Halavanja> what datatypes implement the io.writer interface?
18:42 < aiju> many.
18:42 < Halavanja> okay good answer
18:42 < aiju> i mean, what do you want to hear?
18:42 < aiju> anything what has a Write() method
18:42 < Halavanja> how about ones that implement a byte array or a string
18:42 < aiju> *os.File, for one
18:42 < aiju> strings.Buffer or so
18:43 < aiju> there is also something along bytes.Buffer
18:43 < uriel> Halavanja: look at the definition of io.writer, and see what
types fulfil it, as aiju said, pretty much anything with a Write() method
18:43 < exch> all the compress packages, the xml thing, etc
18:44 < cenuij> uriel: yeah nice, also queue the haters on proggit ;)
18:45 < uriel> cenuij: I'm surprised they have not come out of the woodowork
yet: http://www.reddit.com/r/programming/comments/i885m/profiling_go_programs/
18:48 < Halavanja> Okay so I am trying to implement the template package
18:48 < Halavanja> and I have no idea how to print out what is stored in an
io.writer buffer to something like a string or as a byte array as it is stored in
the writer anyway
18:48 < ArgonneIntern> http://www.pastie.org/2117385 is this correct syntax
for appending to a pointer to an array
18:49 < ArgonneIntern> it seems to do the slice operation first and need the
paren
18:50 < exch> Halavanja: an io.Writer doesnt necessarily have a String() or
Byte() method.  You can copy its contents to a bytes.Buffer and then do
buffer.Bytes()
18:51 < exch> You can first test if it has a String() method of its own: if
v, ok := r.(Stringer); ok { content := v.String() } Provided that 'Stringer' is an
interface with a single String() method defined in it
18:51 < exch> If not, you can always go with the copy approach I mentioned
before
18:52 < skelterjohn|work> if v, ok := r.(interface{ String() string }); ok {
content = v.String() }
18:52 < skelterjohn|work> :)
18:52 < exch> or that :p
18:52 -!- sergio_101 [~user@rrcs-24-106-142-62.central.biz.rr.com] has joined
#go-nuts
18:52 < ArgonneIntern> rofl so I see Halavanja ask a question my coworker
asked and I turn around, and behold it's him
18:52 < ArgonneIntern> sneakky sob
18:52 < exch> hehe
18:52 < Halavanja> :)
18:53 < ArgonneIntern> but yeah he has had that problem for 2 days now
18:53 < ArgonneIntern> so any help is nice
18:54 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
18:56 < jessta> Halavanja: you could just use os.Stdout as your io.Writer
18:57 -!- sacho [~sacho@95-42-99-223.btc-net.bg] has quit [Read error: Connection
reset by peer]
18:57 < Halavanja> Thats actually the only thing that is working reliably
18:58 < jessta> you could also put another io.writer in there too with
http://golang.org/pkg/io/#Writer.MultiWriter
18:58 < skelterjohn|work> what is backing your io.Writer?
18:58 < skelterjohn|work> if you have it backed by a bytes.Buffer, you can
inspect that
18:58 < exch> A file or a network stream should work the same way
18:58 -!- Queue29_ [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
18:59 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
18:59 -!- iant [~iant@nat/google/x-gxtlmenspjejwtgr] has quit [Ping timeout: 276
seconds]
18:59 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
19:00 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
19:00 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
19:00 < Halavanja> what exactly is a bytes.Buffer
19:00 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
19:00 < Halavanja> I'm looking in the bytes package and see no buffer type
19:00 < ArgonneIntern> http://golang.org/pkg/bytes/#Buffer
19:03 < skelterjohn|work> it's a subtype of []byte that defines io.Reader
and Writer methods to work on it
19:04 < skelterjohn|work> hmm, what's the right way to say "type A B"...  A
is a type of B?
19:04 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
19:04 < skelterjohn|work> rather than subtype
19:04 < skelterjohn|work> bytes.Buffer is a type of []byte :)
19:04 < aiju> bytes.Buffer is a fancy []byte
19:04 < Halavanja> That makes more sense
19:04 < skelterjohn|work> but it's not actually - it's a struct with
unexported things
19:05 < skelterjohn|work> so that's too bad
19:05 < Halavanja> Didn't see the type declaration in the package on the web
then I say where I wasnt looking
19:05 < Halavanja> :P
19:05 < skelterjohn|work> probably has an index for the "beginning" when you
read stuff from it
19:06 < aiju> off, runeBytes, bootstrap, lastRead
19:06 < aiju> runeBytes and bootstrap are optimization
19:06 < aiju> lastRead is a read operation
19:06 < aiju> eh
19:06 < aiju> the last read operation, for Unread
19:06 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has joined
#go-nuts
19:07 < aiju> off is just what skelterjohn|work figured
19:08 < chomp> according to the specification i'd say the right expression
is that bytes.Buffer is a type which has []byte as its underlying type
19:09 -!- mrsrikanth [~mrsrikant@59.92.11.58] has quit [Quit: Leaving]
19:09 < chomp> >.>
19:10 -!- piranha [~piranha@adsl-ull-233-41.41-151.net24.it] has joined #go-nuts
19:10 < skelterjohn|work> that's a bit wordy
19:11 < skelterjohn|work> i'm going to say "is a type of"
19:11 < exch> "It just works" <- better
19:11 < skelterjohn|work> or better yet, "types"
19:11 < skelterjohn|work> type A B -> A types B
19:12 < aiju> And the Lord created bytes.Buffer to be an embelished []byte.
19:12 < aiju> And he saw that it was good.
19:14 < skelterjohn|work> aiju can write the go bible, and i can just say A
is unto B as aiju 4.20
19:14 < aiju> hahaha
19:14 -!- Dazedit [~Adium@c-71-59-39-204.hsd1.ga.comcast.net] has joined #go-nuts
19:15 -!- arun_ [~arun@unaffiliated/sindian] has quit [Ping timeout: 255 seconds]
19:15 < aiju> And thus the archangel uriel descended from heaven to watch
over the Garden of Go with a fiery sword
19:16 < chomp> and the fiery sword accidentally the whole garden
19:16 -!- franciscosouza [~francisco@187.105.24.41] has quit [Read error:
Connection reset by peer]
19:17 < skelterjohn|work> lol
19:17 -!- iant [~iant@nat/google/x-semgfegvzpxkwdkq] has joined #go-nuts
19:17 -!- mode/#go-nuts [+v iant] by ChanServ
19:18 < skelterjohn|work> and skelterjohn busily strove to make that one go
library that someone, somewhere might actually use
19:18 < ArgonneIntern> make a geometry library
19:18 -!- franciscosouza [~francisco@187.105.24.41] has joined #go-nuts
19:18 < iwinulose_> is there a built in map() function?  (the one referenced
in
http://groups.google.com/group/golang-nuts/browse_thread/thread/9d95f628d65ae707/0793ae3c62ec89a8
doesn't seem to exist anymore)
19:18 < sisyphus> ArgonneIntern: uh - i am
19:18 < skelterjohn|work> interesting that you say that
19:18 -!- wchicken [~chicken@c-66-31-200-20.hsd1.ma.comcast.net] has joined
#go-nuts
19:19 < ArgonneIntern> someone will definately use that
19:19 < aiju> definitely.
19:19 < ArgonneIntern> heh, well I hate java because it has geometry
functions and the kids who know how to use them kill us at ACM
19:19 < skelterjohn|work> iwinulose_: nope
19:19 < chomp> i'm really stuck on determining the best single word to
describe the relationship between A and B in "type A B" :/
19:19 < ArgonneIntern> IMO java is almost cheating at a programming comp.
19:19 < skelterjohn|work> A types B!
19:19 < chomp> perhaps this is a worthless endeavor
19:19 < aiju> http://www.d-e-f-i-n-i-t-e-l-y.com/
19:20 < aiju> best web page ever
19:20 < chomp> no type is not a verb except for what i'm doing now!
19:20 < aiju> any noun can be verbed
19:20 < skelterjohn|work> i've verbed a noun
19:20 < aiju> the power of english!
19:20 < ArgonneIntern> unfortunately I don't have noscript installed so I
won't be visiting
19:20 < chomp> ha, fair enough.
19:20 < aiju> ArgonneIntern: just plain HTML
19:20 < chomp> but does A type B or does B type A
19:20 < ArgonneIntern> oh I spelled it wrong, I see.  Congratulations
19:20 < chomp> A types B i guess
19:21 < chomp> []byte types bytes.Buffer?
19:21 < skelterjohn|work> B is just sitting there doing nothing
19:21 < skelterjohn|work> A is the active party with "type A B"
19:21 < chomp> well no, it's like putting on some makeup and stuff
19:21 < skelterjohn|work> so A types B
19:21 < chomp> IM AN A!
19:21 < skelterjohn|work> A and B are two different types
19:21 < chomp> yes but only because B is wearing a hat
19:21 < skelterjohn|work> this is a silly conversation
19:22 < chomp> those aren't even proper keep left signs.
19:22 * skelterjohn|work smacks himself
19:22 < ArgonneIntern> aiju: be sure to have www.dictionary.com open for
everytime I say something.  you wouldn't want to miss any chance you get
19:23 < ArgonneIntern> I mean after all, what is the alternative...letting
it pass...unacceptable
19:23 < aiju> ArgonneIntern: haha
19:23 < Halavanja> Thanks for the help guys.  That worked
19:23 < Halavanja> Somehow I felt like I should have known that already
19:23 < aiju> ArgonneIntern: i don't correct people too much, actually
19:23 < aiju> ArgonneIntern: just "definately" is getting on my nerves
sometimes
19:23 < ArgonneIntern> pftt that's an understatement
19:24 < chomp> aiju, ...  i never knew that site existed
(d-e-f-i-n-i-t-e-l-t-y.com) but now i will probably use it all the time
19:24 < skelterjohn|work> it's definately a good cite
19:24 < ArgonneIntern> lmao
19:24 < chomp> definently
19:24 < ArgonneIntern> I like it two
19:24 < skelterjohn|work> joak ruined
19:24 < Halavanja> lol
19:25 < chomp> my only problem with there site is that their not insulting
enough.
19:25 < chomp> ok ok
19:25 < ArgonneIntern> lol
19:25 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
19:25 < skelterjohn|work> i've got a great insulting enough
19:25 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
19:25 < chomp> that's funny, i think i just had an aneurysm
19:25 < ArgonneIntern> better get that checked out
19:27 < skelterjohn|work> i just checked to see if aneurysm is the correct
spelling
19:27 < skelterjohn|work> i lose
19:28 -!- kfmfe04 [~kfeng@host-58-114-183-56.dynamic.kbtelecom.net] has quit
[Quit: kfmfe04]
19:28 < chomp> :)
19:28 < ArgonneIntern> aiju: is there anything incorrect that isn't getting
on your nerves?  So I can do it enough to put it there
19:28 < aiju> hahaha
19:28 < aiju> not sure ;P
19:28 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts
19:28 < chomp> i was more referring to the internal parser segfault that
happened when i tried to read "i've got a great insulting enough"
19:29 < chomp> it was a very "i accidentally" moment
19:31 < aiju> good god
19:31 < aiju> the only thing worse than locks are lock-free algorithms
19:31 < jlaffaye> why?
19:31 < chomp> lock-free algorithms are the bees' knees
19:31 < chomp> locks can go right to hell imho
19:31 < aiju> they are REALLY hard to design and verify
19:32 < skelterjohn|work> don't know much about them - do they depend on
atomicity of certain operations?
19:32 < chomp> yeah
19:32 < aiju> skelterjohn|work: yes, they use atomic operations
19:32 < chomp> they are pretty hard to get right
19:32 -!- GoTest [~gotest@72.11.82.226] has joined #go-nuts
19:32 < skelterjohn|work> like, unlinking part of a LL the correct way won't
mess up anyone iterating over it
19:32 -!- GoTest [~gotest@72.11.82.226] has quit [Remote host closed the
connection]
19:32 < iwinulose_> chomp: for the most part fine-grained locking is faster
in real-world situations
19:32 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has quit [Quit:
wallerdev]
19:33 < aiju> and fine-grained locking is about thousand times easier to
design and verify
19:33 < skelterjohn|work> do we have any atomicity guarantees with go?
like, a word write?
19:33 < skelterjohn|work> or is that an architecture guarantee
19:33 < skelterjohn|work> silly question
19:33 < skelterjohn|work> retracted
19:33 < chomp> heh
19:33 < iwinulose_> skelterjohn|work: I mean a language runtime could
provide such guarantees.  Id on't think go does
19:34 < chomp> architectures do though
19:34 -!- iant [~iant@nat/google/x-semgfegvzpxkwdkq] has quit [Ping timeout: 240
seconds]
19:34 < skelterjohn|work> a jvm could do that, but go's runtime is a
different kind of runtime
19:34 < iwinulose_> chomp: can you inline asm or otherwise specify use of
atomic instructions in Go?
19:35 < iwinulose_> (you could always link in some C that does this)
19:35 < chomp> not that i know of, but i have to imagine that an integer
assignment compiles down to a single mov instruction
19:35 < aiju> iwinulose_: you can link to asm
19:35 < chomp> or something like that
19:35 < aiju> iwinulose_: there is a package with atomic operations
19:35 < chomp> and yeah there are compare-and-swap and atomic add
implementations
19:35 < iwinulose_> aiju: don't talk to me talk to skelterjohn|work
19:35 < chomp> in the stdlib
19:36 < aiju> iwinulose_: you asked about inline asm
19:36 < iwinulose_> fair
19:36 -!- replore_ [~replore@ntkngw256114.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
19:36 < skelterjohn|work> you can't specify that the asm you inline is
atomic, though
19:36 < skelterjohn|work> unless it's a single instruction, i guess
19:37 < skelterjohn|work> if GOMAXPROCS=1, it's atomic :)
19:37 < chomp> if memory reads and writes on primitive integral types
-don't- compile to atomic operations, i'd be shocked
19:37 < iwinulose_> chomp: they dont.  I guarantee it
19:37 < iwinulose_> (for x86 anyway..I don't know shit about mips, arm,...)
19:37 < chomp> how do you split up a 32-bit read from memory into more than
one instruction.
19:38 < chomp> sure maybe it gets moved around in registers
19:38 < chomp> but memory is read once.
19:38 < aiju> iwinulose_: there is no MIPS go compiler
19:38 < chomp> that read is atomic
19:38 < aiju> chomp: i don't think single instructions are atomic
19:38 < chomp> yes they are
19:38 < chomp> otherwise lockless algorithms would be impossible to
implement
19:38 < chomp> well
19:38 < skelterjohn|work> *some* are
19:39 < chomp> ^
19:39 < aiju> lockless algorithms use atomic instructions
19:39 < iwinulose_> chomp: processors reorder stuff all the time to achieve
greater paralellism/performance/register allocation, SIMD saturation
19:39 < aiju> "inc [x]" is not atomic
19:39 < aiju> and it's just one x86 instruction
19:40 < iwinulose_> "instructions" aren't run directly--they're further
decomposed into microops and assigned to functional units on the processor
19:40 < iwinulose_> pipelining, etc
19:40 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
19:40 < chomp> i guess you would have to prefix lock for a mov to be atomic
19:40 < iwinulose_> you are guaranteed that a write to location x and a read
from location x will happen atomically on one core
19:41 < chomp> right
19:41 < chomp> but no guarantee that there wont be a race condition on a
single address from two cores
19:41 < iwinulose_> but multiple cores are free to do what they want unless
the atomic versions of those instructions are used
19:41 < iwinulose_> and multiple reads may happen in any order
19:42 < iwinulose_> writes to different locations may happen in any order
19:42 < iwinulose_> so long as there isn't a data dependency
19:42 -!- rutkowski [~adrian@078088214197.walbrzych.vectranet.pl] has joined
#go-nuts
19:42 < skelterjohn|work> the go memory model talks about that
19:44 -!- zippoxer [~zippoxer@109.64.192.110] has left #go-nuts []
19:44 -!- zippoxer [~zippoxer@109.64.192.110] has joined #go-nuts
19:48 -!- iant [~iant@nat/google/x-lanhbhpdoghepfae] has joined #go-nuts
19:48 -!- mode/#go-nuts [+v iant] by ChanServ
19:55 -!- piranha [~piranha@adsl-ull-233-41.41-151.net24.it] has quit [Quit:
Computer has gone to sleep.]
19:55 < jnwhiteh> skelterjohn|work: ping at your leisure
19:55 < jnwhiteh> :P
19:56 -!- rutkowski [~adrian@078088214197.walbrzych.vectranet.pl] has quit [Quit:
WeeChat 0.3.3-dev]
19:58 -!- pjacobs [~pjacobs@rrcs-24-73-248-196.sw.biz.rr.com] has quit [Ping
timeout: 264 seconds]
19:59 -!- tvw [~tv@e176006144.adsl.alicedsl.de] has joined #go-nuts
20:00 < uriel> oh, made it to the Hacker News frontpage already:
http://news.ycombinator.com/item?id=2692705
20:04 < skelterjohn|work> jnwhiteh: what's up
20:05 < jnwhiteh> skelterjohn|work: I'm wondering if there's any way to
invoke gb on a subdirectory (so I can run it from outside src) and to have my cmds
compiled to a specific location
20:06 < skelterjohn|work> yes - two ways
20:06 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
20:06 < skelterjohn|work> one you can use $GOPATH in the same way as
goinstall (if it works differently from how goinstall does, that's a bug and let
me know)
20:06 < skelterjohn|work> two you can add a file workspace.gb in the
directory you want to build in
20:06 < jnwhiteh> ah, yes, I could do that
20:06 < skelterjohn|work> telling it where the source root is
20:06 < uriel> adg: there is a 'typo'/encoding corruption in the last
paragraph of http://blog.golang.org/2011/06/profiling-go-programs.html
20:06 < jnwhiteh> oh, okay
20:06 < jnwhiteh> i'll look at the documentation on that
20:06 < skelterjohn|work> gb -W will make workspace.gb files for each target
20:07 < skelterjohn|work> then you can run gb from wherever in there, and it
will build cmds to the cwd (as well as the workspace's bin directory)
20:07 < skelterjohn|work> also if GOPATH is set, gb -i will install into it
rather than GOROOT
20:08 < jnwhiteh> interesting, I'll have to play with this a it
20:08 -!- alsvidr [~alvidr@dslb-188-099-240-157.pools.arcor-ip.net] has joined
#go-nuts
20:08 < skelterjohn|work> just like goinstall
20:08 < jnwhiteh> thanks
20:08 < skelterjohn|work> np
20:08 < jnwhiteh> I may have more questions, but I'll try to formulate them
a bit better in the future
20:08 < skelterjohn|work> sure
20:08 < skelterjohn|work> btw i've fixed a few bugs today
20:09 < skelterjohn|work> w/r/t gopath
20:09 -!- alsvidr [~alvidr@dslb-188-099-240-157.pools.arcor-ip.net] has left
#go-nuts []
20:09 < skelterjohn|work> probably don't affect you, but they're in the repo
20:09 -!- crazy2be [~crazy2be@S01060012171a573b.cg.shawcable.net] has joined
#go-nuts
20:11 -!- ArgonneIntern [82ca0251@gateway/web/freenode/ip.130.202.2.81] has quit
[Quit: Page closed]
20:11 -!- wchicken [~chicken@c-66-31-200-20.hsd1.ma.comcast.net] has quit [Ping
timeout: 240 seconds]
20:12 -!- ArgonneIntern [82ca0251@gateway/web/freenode/ip.130.202.2.81] has joined
#go-nuts
20:12 -!- alsvidr [u800@gateway/web/irccloud.com/x-bolkyvkjptprcxjc] has joined
#go-nuts
20:13 -!- alsvidr [u800@gateway/web/irccloud.com/x-bolkyvkjptprcxjc] has left
#go-nuts []
20:13 -!- sjbrown [~sjbrown@adsl-99-189-162-6.dsl.pltn13.sbcglobal.net] has joined
#go-nuts
20:14 -!- alsvidr [~user@dslb-188-099-240-157.pools.arcor-ip.net] has joined
#go-nuts
20:15 -!- Venom_X_ [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
20:18 -!- wchicken [~chicken@c-66-31-200-20.hsd1.ma.comcast.net] has joined
#go-nuts
20:19 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Quit: Leaving]
20:19 -!- sergio_101 [~user@rrcs-24-106-142-62.central.biz.rr.com] has quit [Quit:
df]
20:23 -!- message144 [~message14@cpe-75-83-155-145.socal.res.rr.com] has joined
#go-nuts
20:25 -!- alsvidr [~user@dslb-188-099-240-157.pools.arcor-ip.net] has left
#go-nuts ["ERC Version 5.3 (IRC client for Emacs)"]
20:29 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
20:29 -!- zcram [~zcram@78-28-72-8.cdma.dyn.kou.ee] has joined #go-nuts
20:31 -!- crodjer [~rohanjain@122.169.156.120] has quit [Quit: leaving]
20:37 -!- sjbrown [~sjbrown@adsl-99-189-162-6.dsl.pltn13.sbcglobal.net] has quit
[Read error: Connection reset by peer]
20:40 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Quit: No Ping reply in
180 seconds.]
20:45 < crazy2be> cool but ugly: https://github.com/crazy2be/gojs
20:45 < crazy2be> the original author had abandoned it
20:46 -!- babali [~babali@2a01:e35:2e0d:ecc0:210:a7ff:fe05:7b50] has quit [Quit:
Leaving]
20:46 < skelterjohn|work> nice thing about github
20:46 < skelterjohn|work> super easy to fork and update
20:46 < crazy2be> well, they used bitbucket
20:46 < skelterjohn|work> ah
20:46 < crazy2be> but I installed some hg-git thing
20:46 < crazy2be> so their history is all still there
20:46 < crazy2be> just as "invalid-email-address"
20:47 < crazy2be> and I give them credit in the README
20:47 < crazy2be> since they did most of the work
20:47 < crazy2be> it's not mine, although I'm hoping to polish it up a bit
20:47 < crazy2be> i'm sure there's plenty of people who would love to use it
20:47 < skelterjohn|work> what can you do with it, exactly?
20:48 < crazy2be> javascript seems to pracitally be a buzzword these days
20:48 < ancientlore> I guess you coulde make a gnode.js out of it
20:48 < skelterjohn|work> i don't know what that means
20:48 < crazy2be> skelterjohn: Heard of node.js?
20:48 < skelterjohn|work> heard of it
20:48 < skelterjohn|work> some kind of speedy web server framework
20:48 < crazy2be> heh
20:48 < crazy2be> dunno about speedy
20:49 < crazy2be> but threadless with entirely async i/o
20:49 < zippoxer> skelterjohn|work: whenever I run gb -s it says: gb
error:Cycle detected: [http]
20:49 < os_Args[0]> http://www.pastie.org/2117902 if I comment out the
time.Sleep() it will deny clients http requests, if I leave it in, it
doesn't...anyonek now why?  Can go routines on the same thread cause each other to
not execute?
20:49 < zippoxer> and the http directory contains one http.go file only
20:49 < crazy2be> and allows you to write applications in javascript
20:49 < skelterjohn|work> zippoxer: pastebin that file
20:49 < zippoxer> sec
20:50 < skelterjohn|work> os_Args[0], time.Sleep() will grab the thread
you're in for the duration of the sleep
20:50 < crazy2be> ancientlore: how's winnotify coming?  :P
20:50 < zippoxer> http://www.pastie.org/2117910
20:50 < ancientlore> haa, no time yet, have to do the real job too :-/
20:50 < crazy2be> yeah
20:50 < skelterjohn|work> the solution i suggest is to 1) set GOMAXPROCS=
something other than 1, and 2) use "<-time.After(x)" instead of "time.Sleep(x)"
20:50 < os_Args[0]> skelterjohn|work: I don't see why it would deny an http
request without a sleep
20:51 < skelterjohn|work> os_Args[0]: because your entire app is asleep
20:51 < os_Args[0]> I don't want a sleep in there at all
20:51 < ancientlore> which right not is converting 32-bit activex objects to
64-bit.  joy.
20:51 < skelterjohn|work> oh i misunderstood
20:51 < skelterjohn|work> it only doesn't deny if you *do* sleep
20:51 < os_Args[0]> with the sleep in the go funcs work, without it the http
func won't accept requests
20:51 < crazy2be> ancientlore: sounds like fun
20:51 < skelterjohn|work> then it's because your one goroutine is hogging
the CPU
20:51 < skelterjohn|work> replace time.Sleep() with runtime.Gosched()
20:51 < os_Args[0]> ok that's what I thought
20:51 < crazy2be> but wait, who uses activex?
20:51 < skelterjohn|work> that causes the current goroutine to yield to
another
20:52 < ancientlore> crazy2be - have you tried running a JS engine on
different goroutines?  does it handle that?  afaik, JS tends be to
thread-unfriendly
20:52 < os_Args[0]> ahh so everytime I loop I yield
20:52 < skelterjohn|work> os_Args[0]: you could also set GOMAXPROCS=several
20:52 < skelterjohn|work> that way you could have goroutines running in
parallel
20:52 < crazy2be> *who uses activex in a way that requires it to be 64 bit?
20:52 < os_Args[0]> skelterjohn|work: so set the environment variable and
compile?
20:52 < crazy2be> ancientlore: No, but I imagine it's fine as long as they
execute in different contexts
20:52 < skelterjohn|work> but if a goroutine does nothing to yield (io, a
syscall, or runtime.Gosched()) it will...  never yield :)
20:53 < skelterjohn|work> os_Args[0]: you don't need to compile - just set
the env
20:53 < crazy2be> within one context, almost certainly not
20:53 < crazy2be> there's pointers everywhere
20:53 < crazy2be> pointers into c code that is
20:53 < skelterjohn|work> zippoxer: as i thought - your package imports
itself
20:53 < skelterjohn|work> as far as gb can tell
20:54 < skelterjohn|work> a package in a directory http will get the target
"http"
20:54 < zippoxer> lol I forgot that this package was called xxx/http
20:54 < skelterjohn|work> which you are importing
20:54 < ancientlore> re: active X, old site in ASP that needs more RAM.
20:54 < zippoxer> target.gb?
20:54 < crazy2be> skelterjohn: what is gb?
20:54 < skelterjohn|work> go-gb.googlecode.com
20:54 < crazy2be> ancientlore: what are you *doing* with that activex
control?
20:54 < skelterjohn|work> zippoxer: if you dont want to rename the directory
you have to change the target either with target.gb or a
//target:<newtarget> commend before the package statement
20:55 < crazy2be> that needs more than 2GB of ram
20:55 < crazy2be> video editing?
20:55 < skelterjohn|work> zippoxer: but i suggest renaming the directory
20:55 < os_Args[0]> that worked thanks skelterjohn|work, I suspected that
was the issue with the main routine clobbering the other ones, but without deep
knowledge in go routines I could not be sure
20:55 < crazy2be> skelterjohn: Cool
20:55 < skelterjohn|work> os_Args[0]: no problem.  i still recommend putting
in a runtime.Gosched() in there
20:55 < skelterjohn|work> then it will work with any GOMAXPROCS setting
20:55 < crazy2be> although it might be replaced by goinstall when they get
it working properly
20:56 < os_Args[0]> skelterjohn|work: I likely will, as this will go on
systems without that ENV variable set
20:56 < os_Args[0]> skelterjohn|work: exactly
20:56 < skelterjohn|work> crazy2be: goinstall is based on the GOPATH env
var, which i find extremely clunky
20:56 < skelterjohn|work> but, yes, the potential is there
20:57 < os_Args[0]> skelterjohn|work: so is this to say that if that env
variable is not set it will only use 1 processor?
20:57 < skelterjohn|work> gb does a bunch of other nice things that
goinstall won't want to do, though
20:57 < zippoxer> skelterjohn|work: ok, but the packages are installed?
20:57 -!- piranha [~piranha@adsl-ull-233-41.41-151.net24.it] has joined #go-nuts
20:57 < skelterjohn|work> os_Args[0]: yes - currently.  one day it might be
different
20:57 < os_Args[0]> skelterjohn|work: I hope so
20:57 < skelterjohn|work> as in, one day GOMAXPROCS might be ignored
20:57 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts
20:57 < ancientlore> crazy2be - asp actually tops out around 700mb due to
memory fragmentation.  anyway, back to go...
20:57 < skelterjohn|work> and it will do something clever
20:57 < skelterjohn|work> zippoxer: i don't understand the question
20:58 < os_Args[0]> if MPICH can do it go can ;)
20:58 < zippoxer> I mean if gb installs the packages to my go compiler, so
every compilation I'll ever do, I'll have access to the packages
20:58 < skelterjohn|work> zippoxer: if you run gb -i, yes
20:58 < zippoxer> every compilation outside gb I mean
20:58 < zippoxer> so good, I don't want this :P
20:58 < zippoxer> thanks for help
20:58 < skelterjohn|work> "gb -i" is equivalent to "make install"
20:59 < skelterjohn|work> if you only do "gb", it won't be accessible
outside that tiny project
20:59 < zippoxer> how do you know it's tiny ;)
20:59 -!- robteix [~robteix@192.55.54.36] has quit [Ping timeout: 240 seconds]
20:59 < skelterjohn|work> this conversation just took a nose dive
21:00 < skelterjohn|work> i kind of want to submit that to bash.org
21:00 < os_Args[0]> I don't think it would be accepted
21:00 < skelterjohn|work> probably not
21:00 < os_Args[0]> it's funny, but not that funny
21:01 < crazy2be> get up...
21:01 < os_Args[0]> I will never forget "I put on my robe and wizards hat"
21:01 < skelterjohn|work> i repladced "that tiny project" with "your tiny
project"
21:01 < skelterjohn|work> so a bit funnier
21:01 < os_Args[0]> the dude who did that on bash is brilliant
21:02 -!- jbooth1 [~jay@209.249.216.2] has quit [Quit: Leaving.]
21:02 < skelterjohn|work> i didn't think that was a bash quote
21:02 < skelterjohn|work> oh, there it is
21:02 < os_Args[0]> bash.org/?104383
21:02 < os_Args[0]> i think that's it
21:02 < os_Args[0]> my work blocks it
21:02 < skelterjohn|work> http://bash.org/?104383
21:02 < skelterjohn|work> oh that's what you put
21:02 < os_Args[0]> it's halarious though
21:03 < os_Args[0]> I cried for like 5 straight minutes after reading it
21:03 < os_Args[0]> my work also blocks all ntp servers cause...they want to
hack my times you know
21:03 < aiju> haha
21:03 < os_Args[0]> ntp servers are scary
21:03 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has quit
[Quit: Lost terminal]
21:12 -!- Fish [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
21:14 -!- mfoemmel [~mfoemmel@chml01.drwholdings.com] has quit [Remote host closed
the connection]
21:17 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
21:17 -!- niekie [~niek@CAcert/Assurer/niekie] has joined #go-nuts
21:21 -!- franciscosouza [~francisco@187.105.24.41] has quit [Read error:
Connection reset by peer]
21:22 -!- franciscosouza [~francisco@187.105.24.41] has joined #go-nuts
21:23 < zippoxer> skelterjohn|work: gb builds twice?  I have one binary in
./ (where main.go is) is, and another in ./bin
21:24 -!- os_Args[0] [82ca0251@gateway/web/freenode/ip.130.202.2.81] has quit
[Quit: I'm going 127.0.0.1]
21:33 -!- TheMue [~TheMue@p5DDF5E55.dip.t-dialin.net] has quit [Quit: TheMue]
21:34 -!- niemeyer [~niemeyer@187.88.154.191] has joined #go-nuts
21:35 < kevlar_work> zippoxer, it probably builds and then installs (copies)
21:38 -!- piranha [~piranha@adsl-ull-233-41.41-151.net24.it] has quit [Quit:
Computer has gone to sleep.]
21:39 < iwinulose_> Is there an equivalent of perror/strerror?
21:39 < iwinulose_> (every function I find already takes a syscall.Error or
os.Error--none that take an int and return one of those types :-/)
21:40 -!- photron [~photron@port-92-201-2-49.dynamic.qsc.de] has quit [Ping
timeout: 260 seconds]
21:47 < kevlar_work> iwinulose, where do you get an int that needs to be
turned into an os.Error?
21:47 < edsrzf> iwinulose_: See os.Errno?
21:49 < iwinulose_> edsrzf: takes a syscall.Error, which is interface {
String() string} :-/
21:49 < iwinulose_> kevlar_work: syscall.Kqueue
21:50 < kevlar_work> iwinulose, syscall.Errstr
21:51 < iwinulose_> kevlar_work: brilliant!  thanks.  Sorry I looked for
quite a while but missed it :-/
21:51 < kevlar_work> if errno != nil { return os.NewError("kqueue: " +
syscall.Errstr(errno)) }
21:51 < kevlar_work> yeah, took me a bit to find as well.
21:51 < kevlar_work> er errno != 0 or whatever.
21:53 -!- Halavanja [~chatzilla@anlextwls002-095.wl.anl-external.org] has quit
[Quit: ChatZilla 0.9.87 [Firefox 5.0/20110622232440]]
21:55 < jnwhiteh> zippoxer: I've seen the same problem
21:55 < jnwhiteh> not sure why
21:56 < iwinulose_> xD
21:56 < kevlar_work> didn't the maintainer for gb say he's only in
keep-it-compiling mode until gomake++ rolls out?
21:56 < kevlar_work> or was I dreaming
21:58 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Quit: pjacobs]
21:58 -!- Venom_X_ [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
22:03 -!- slang [~slang@chml01.drwholdings.com] has quit [Ping timeout: 250
seconds]
22:04 < iwinulose_> Is there something like a destructor/finalizer for
structs?
22:05 < kevlar_work> iwinulose_, yes, but don't use it.
22:05 < kevlar_work> why do you need it?
22:05 -!- wchicken [~chicken@c-66-31-200-20.hsd1.ma.comcast.net] has quit [Ping
timeout: 252 seconds]
22:05 < Namegduf> There is, but it is unreliable and not guaranteed to ever
trigger.
22:05 < iwinulose_> kevlar_work: I have an fd (the kqueue) that needs to get
closed if its enclosing struct goes away s.t.  we don't leak fds
22:06 < Namegduf> Manage it manually
22:06 < iwinulose_> Namegduf: yup guess that's what has to happen :-/
22:06 < Namegduf> iwinulose_: Are you familiar with defer?
22:06 < kevlar_work> iwinulose, is there a reason your package doesn't make
a global kqueue that it keeps reusing for the life of the program?
22:06 < iwinulose_> Namegduf: yeah
22:07 < Namegduf> If it's only around for a single function, opening, then
after a check, immediately deferring a close, is common.
22:07 < kevlar_work> iwinulose, I also assume that you realize that kqueue
is not portable?
22:07 < Namegduf> If not, then yeah, manual work.
22:07 < iwinulose_> kevlar_work: yeah--neither is inotify or anything else
nice
22:07 < Namegduf> Usually that's not too complex.
22:07 < iwinulose_> I'm just playing around w/ Go right now
22:07 < Namegduf> Last "you know" check:
22:08 < kevlar_work> iwinulose, inotify is working on a cross-platform
compatible interface
22:08 < Namegduf> You know that Go will use select/poll to implement IO for
you by default, right?
22:08 < kevlar_work> because all operating systems have comparable
functionality
22:09 < iwinulose_> kevlar_work: yeah I was hoping there'd be a go
wrapper--at least for OSX the case is "no" :-(
22:09 < iwinulose_> Namegduf: I did not
22:09 < Namegduf> i.e.  reads/writes in Go don't actually map to blocking
syscalls, but non-blocking ones, followed by blocking that goroutine on a
runtime-managed select/epoll/kqueue thing
22:09 < kevlar_work> iwinulose, for casual programming you should really not
be reaching into "unsafe" or "syscall"
22:09 < kevlar_work> anything using those is hackish and not really Go style
22:09 < kevlar_work> they're typically used only to implement things that
will be used by other Go style code.
22:10 < Namegduf> Well, now you do.  I don't know if that impacts on your
usecase or not at all, I just thought it was worth mentioning.
22:10 < kevlar_work> s/anything using those is/anything using those usually
ends up/
22:10 < iwinulose_> kevlar_work: which is what I'm trying to do (wrap kqueue
to present an inotify-like interface--though I'm not going to repack into the
inotify structure)
22:10 < kevlar_work> iwinulose_, woah, hold on then
22:11 < kevlar_work> iwinulose_, you do realize that the code already
exists, right?
22:11 < iwinulose_> kevlar_work: not really.  If its not in the docs and I
cant import it and google doesn't come up with an answer
22:12 < iwinulose_> I don't know it xD
22:12 < iwinulose_> (plus I asked ~2days ago here and no one mentioned
anything)
22:12 < kevlar_work> iwinulose, the net package already has a cross-platform
infrastructure for that
22:12 < kevlar_work> there have been discussions on exposing it and someone
may be working on it
22:13 < iwinulose_> kevlar_work: e.g.  its private API for now?
22:13 < kevlar_work> iwinulose, at present, yeah
22:13 < iwinulose_> kk
22:13 < kevlar_work> well, what do you mean by "private"
22:14 < kevlar_work> it's not private in the Apple sense of private, in that
you shouldn't use it
22:14 < kevlar_work> it's private in the sense that it's not exported.
Search on golang-dev for "poll servers"
22:15 -!- huin [~huin@91.85.188.1] has joined #go-nuts
22:15 -!- kfmfe04 [~kfmfe04@host-58-114-183-56.dynamic.kbtelecom.net] has quit
[Quit: kfmfe04]
22:15 < kevlar_work> two of the main Go developers said they see no issues
with exposing the net pollserver for wider use, and I'm sure they'd welcome CLs in
that vein
22:16 < crazy2be> so much cool stuff in the std library that is private :(
22:16 < crazy2be> lol
22:16 < iwinulose_> kevlar_work: CLs?
22:16 < kevlar_work> iwinulose, change lists.  It's how you make a change to
Go.
22:17 -!- zcram [~zcram@78-28-72-8.cdma.dyn.kou.ee] has quit [Quit: Leaving]
22:17 < kevlar_work> you download the code, change it, and submit a CL, then
the community goes at it with red marker, and if there's anything left, it gets
submitted and everyone in the world uses your code :)
22:17 < kevlar_work> (I elided a few steps for brevity ^_^)
22:19 < iwinulose_> kevlar_work: (think the go maintainers would appreciate
a CL changing unused variables from hard error to warning?)
22:20 < kevlar_work> search golang-dev for ["Compile error: val declared and
not used" as default vs optional compiler behavior]
22:20 < kevlar_work> (and many other threads).
22:21 < kevlar_work> TL;DR: you're free to submit the CL, they're free to
reject it.
22:21 < iwinulose_> I figured as much--that's the kind of thing that only
comes about when at least one person is very committed to this sort of annoying
"feature"
22:22 < kevlar_work> actually, there are a lot of people who really like it,
and I am one.
22:22 < iwinulose_> is there the equivalent of (void)variable;
22:22 < aiju> iwinulose_: _ = variable
22:22 < iwinulose_> aiju++
22:22 < kevlar_work> iwinulose_, I highly recommend you go through the
tutorial and/or Effective Go.
22:22 < kevlar_work> lots of these questions are addressed ;-).
22:23 < aiju> iwinulose_: i find it's a manner of habit
22:23 < aiju> iwinulose_: after some time you will get used to these errors
22:23 < aiju> the only one I find still annoying is unused package
22:23 < iwinulose_> kevlar_work: ive read the tutorial, and whenever I have
a question about functionality I usually grep the spec first; a question of
practice, effective go
22:23 < aiju> because it requires me to do a non-local chang
22:24 -!- Dazedit [~Adium@c-71-59-39-204.hsd1.ga.comcast.net] has quit [Quit:
Leaving.]
22:24 < kevlar_work> aiju, you can always locally say _ = fmt.Printf ;-)
22:25 < iwinulose_> I don't find effective go super useful--its an awkward
middle ground between the tutorial and the spec (and I don't really have a problem
reading ebnf
22:26 < kevlar_work> in vim, it's not really a huge deal:
`ma:/"fmt"d<CR>'a`
22:26 < aiju> skiming it ..  the go introductory material is still as
awkward as it used to be
22:26 < aiju> kevlar_work: hahaha
22:26 < aiju> kevlar_work: granted, i could do something similar with sam
22:26 < aiju> ,x/fmt/+-d or so
22:27 < aiju> kevlar_work: vim reminds me of K
(http://aiju.de/code/k/tictactoe)
22:27 < kevlar_work> I <3 vim
22:27 < kevlar_work> people watch me work in vim and they're like "Wtf,
how'd you do that?"
22:27 < aiju> I </3 vim
22:27 < kevlar_work> usually right after I did a macro or a global replace
or multi-buffer copy/paste
22:27 < aiju> i never mastered it
22:28 < aiju> i'm already programming the code
22:28 < aiju> i don't want to program an editor at the same time
22:28 < iwinulose_> I <3 vim but despite using it as my primary editor
for about 2 years now I'm a complete moron
22:28 < aiju> and vim is motherfucking HUGE
22:29 < kevlar_work> one of my favorites is writing a macro that
systematically composes code bit-by-bit into a buffer and then at the end all I
have to do is `p` and paste (e.g.  ) an entire C++ class's worth of code stubs.
22:29 < aiju> vim has adopted every single bad feature of emacs
22:29 < kevlar_work> aiju, like what?
22:29 < aiju> being huge and slow
22:29 < kevlar_work> the best arguments I've heard against vim are the
vi-incompatibilities it introduces.
22:29 -!- franciscosouza [~francisco@187.105.24.41] has quit [Read error:
Connection reset by peer]
22:29 < aiju> VIM has two turing complete languages built in
22:30 < aiju> vi is full of bugs
22:30 < aiju> vi incompability is a good stat
22:30 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
22:30 -!- franciscosouza [~francisco@187.105.24.41] has joined #go-nuts
22:30 < kevlar_work> what lots of people call "bugs" turn out to be really
useful to a practiced vi user
22:30 -!- ancientlore [~ancientlo@63.76.22.10] has quit [Quit: ~ Trillian Astra -
www.trillian.im ~]
22:30 < kevlar_work> so I'm not sure they are really bugs.
22:31 < aiju> like what?
22:31 < iwinulose_> kevlar_work: where can I find the pollserver stuff:q
22:31 -!- huin [~huin@91.85.188.1] has quit [Quit: bedtime]
22:31 < iwinulose_> xD didn't mean to send that yet,w as poking around the
net package before asking dumb quesitons
22:31 < kevlar_work> iwinulose, read the thread I referenced ;-)
22:32 < aiju> and pasting into vim always fucks up
22:32 < kevlar_work> the OP tells you almost exactly what to do.
22:32 < kevlar_work> aiju, :set paste
22:32 < aiju> yeah, but it's annoying
22:32 -!- aweber [~mam@p5491D24C.dip.t-dialin.net] has quit [Quit: Verlassend]
22:32 < kevlar_work> aiju, then turn on mouse support
22:32 < aiju> i'm now using sam and i like it
22:33 < kevlar_work> all of the gripes people have about vim are usually the
result of something else being misconfigured (their terminal) or a bad distro-set
default
22:33 < kevlar_work> s/all/most/
22:33 < kevlar_work> I just can't help the people who don't like a modal
editor.
22:34 < crazy2be> modal editor?
22:34 < kevlar_work> crazy2be, insert mode, replace mode, visual mode,
command mode
22:34 < aiju> vi has two modes, one in which it destroy the text and one in
which it beeps
22:34 < kevlar_work> aiju, rofl.
22:34 < crazy2be> aiju: that's my experience :P
22:34 < kevlar_work> that's more modes than you have: critic ;-)
22:34 < aiju> nah
22:35 < aiju> code, critic, sleep, eat
22:35 < kevlar_work> lol.
22:35 < crazy2be> i never understood the advantage of vi(m) over something
like kate
22:35 < kevlar_work> can I quote you on that two modes thing (or did it come
from somewhere)?
22:35 < crazy2be> or notepad++ for windows users
22:35 < aiju> kevlar_work: translated version of a quote on german-bash.org
22:36 < kevlar_work> nice.
22:36 -!- ExtraSpice [XtraSpice@78-57-204-104.static.zebra.lt] has quit [Remote
host closed the connection]
22:36 < aiju> crazy2be: a command language is nice
22:36 < kevlar_work> crazy2be, I don't have to touch the mouse ever when I'm
coding and it has lots of crazy powerful features like macros that work far better
with typed commands
22:36 < crazy2be> hm
22:37 < crazy2be> How do you know what line you are on?  How long the file
is?
22:37 < crazy2be> how do you quickly switch to a related file?
22:37 < aiju> are you confusing ed and vi?
22:37 < kevlar_work> I have line numbers and the bottom of the window shows
me what line/col/percent I am in
22:37 < aiju> crazy2be: there is stuff called "a window system" :)
22:37 < kevlar_work> oh, maybe he is
22:38 < aiju> with vim i just open ten terminals
22:38 < aiju> works fine with tiling
22:38 < kevlar_work> I have one giant terminal that I usually have split
four or five ways
22:38 < aiju> sam has this awesome popup menu
22:38 < aiju> it's like tabbing, except it's local, just right click and
select a file to work on
22:39 < aiju> i think lack of locality is one of the worst things about
windows-style UI
22:39 < kevlar_work> aiju, why don't you use acme?
22:39 < aiju> i can't stand acme
22:39 < KirkMcDonald> I use tabs in vim, typically.
22:39 < aiju> it's much more awkward
22:40 -!- Dazedit [~Adium@c-71-59-39-204.hsd1.ga.comcast.net] has joined #go-nuts
22:40 < kevlar_work> ah.  I thought most sam users upgraded to it.
22:40 < aiju> and it requires 1px accurate targetting with your mouse ;P
22:40 < aiju> haha
22:40 < crazy2be> isn't it a pain to manage ten terminals?
22:40 < aiju> crazy2be: ten might even be one, say six
22:40 < crazy2be> and re splitting 4 ways: what if you want code one one
side an a refererence (webpage or w/e) on the other?
22:40 < iwinulose_> wait...you can optionally accept or ignore additional
return values?
22:40 < kevlar_work> crazy2be, I frequently have ten panes in screen, at
least 4 of which have vim running, usually with 4+ files open at once
22:41 < aiju> iwinulose_: _, x := foo()?
22:41 < kevlar_work> and on top of that I also have six desktops on which I
have windows
22:41 < kevlar_work> iwinulose, seriously, these questions are in effective
go or the tutorials...
22:41 < aiju> 00:46 < crazy2be> and re splitting 4 ways: what if you
want code one one side an a refererence (webpage or w/e) on the other?
22:41 < aiju> i use two computers
22:41 < crazy2be> kvelar_work: How do you manage all of that?
22:41 < crazy2be> don't you loose track of windows?
22:41 < kevlar_work> crazy2be, key combinations
22:41 < kevlar_work> and no
22:41 < kevlar_work> screen allows labeling of windows
22:42 < kevlar_work> and vim labels files
22:42 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
22:42 < kevlar_work> and my command-line tells me what directory and git
branch I'm in/on
22:42 < kevlar_work> and I have one desktop per application I'm using
22:42 < iwinulose_> aiju: no more like x := myMap["hello"] vs x, ok :=
myMap["hello"] boht work.
22:42 < kevlar_work> terminal, xchat, chrome, etc
22:42 < aiju> iwinulose_: that's special
22:42 < aiju> kevlar_work: yeah, i do the same with xmonad
22:43 < kevlar_work> iwinulose, in the second case ", ok" is not a return
value, it indicates success or failure of an action
22:43 < kevlar_work> thus you can't expect x, ok, y, ok := map["a"],
map["b"] to work
22:43 < crazy2be> Hm, i usually only have one desktop, although sometimes I
use all 4 i have allocated
22:43 < aiju> i have 9
22:43 < iwinulose_> kevlar_work: that question isn't answered in the
tutorial or effective go other than by example.  the inotify question is obviously
not there.  I was trolling about the unused thing, it's obviously not there...
22:44 < iwinulose_> kevlar_work: nothing about indicating success or
faillure via a pseudoreturn either...
22:44 < aiju> my window management on Plan 9 is crazy
22:44 < kevlar_work> iwinulose_, you could try searching the mailing lists
for things that aren't FAQ.
22:44 < crazy2be> aiju: Ah, you're one of them crazies :P
22:45 < aiju> i have tons of windows open and still manage to work
22:45 < aiju> but once in a while i have to garbage collect
22:45 < crazy2be> of course, you have a script to do that for you
22:45 < aiju> haha no ;P
22:45 < crazy2be> based on last-activated time for the windows
22:45 < aiju> few things in my workflow are automated
22:46 -!- Nisstyre [~nisstyre@109.74.204.224] has quit [Quit: Leaving]
22:46 < crazy2be> aiju: then why use plan 9?
22:46 < aiju> plumbing is really handy
22:46 < crazy2be> other than for the geek cred :P
22:46 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 240 seconds]
22:46 < aiju> if you have something like "file:lineno" somewhere, you can
just middleclick -> plumb
22:46 < kevlar_work> iwinulose_, and as to whether they are in effective go,
they definitely are (with the exception of inotify, which is in the mailing lists)
22:46 < sl> most geeks just say plan 9 is useless.
22:47 < aiju> and the editor will highlight that line
22:47 < kevlar_work> !goego maps
22:47 < GoBIR> kevlar_work: Effective Go maps -
http://golang.org/doc/effective_go.html#maps
22:47 < kevlar_work> there's definitely discussion in there about blank
identifier and comma-okay if nowhere else.
22:47 < aiju> sl: "i pity Plan 9 users" -- sun guy
22:47 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Read
error: Operation timed out]
22:47 < aiju> 00:51 < crazy2be> aiju: then why use plan 9?
22:47 < aiju> i really have to write a page about that one
22:48 -!- chomp [~chomp@c-67-186-35-69.hsd1.pa.comcast.net] has joined #go-nuts
22:48 < aiju> the whole system is just really fucking *nice*
22:48 < kevlar_work> echo "paint" > /party/friend/*/sleeping
22:48 < kevlar_work> s!^!/face!
22:51 < skelterjohn> are you using plan9 now?  that is, your irc client?
22:51 < aiju> no
22:51 < skelterjohn> not a true believer, then
22:51 < sl> irc7.
22:53 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has quit [Read error:
Connection reset by peer]
22:53 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
22:57 < crazy2be> 'later
23:01 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-151-38.clienti.tiscali.it] has
quit [Ping timeout: 240 seconds]
23:01 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
23:02 < chomp> i've been meaning to take a peek at plan9
23:02 -!- crazy2be [~crazy2be@S01060012171a573b.cg.shawcable.net] has quit [Ping
timeout: 240 seconds]
23:03 < chomp> wonder if it runs in virtualbox
23:03 < chomp> looks like it's doable
23:04 < mpl> just run 9vx
23:04 < mpl> if you want to give it a try without going native.
23:04 < mpl> easier than any other virt solution.
23:04 < chomp> even better
23:07 -!- vinisterx [~ryan@74-128-48-122.dhcp.insightbb.com] has joined #go-nuts
23:07 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
23:08 -!- Venom_X_ [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
quit [Quit: Venom_X_]
23:10 < chomp> errr it requires an X display?  D:
23:12 -!- iant [~iant@nat/google/x-lanhbhpdoghepfae] has quit [Quit: Leaving.]
23:14 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
23:14 < mpl> chomp: -g to run headless afair, but there's not much point to
that, except for running a fossil or something like that.
23:16 -!- vinisterx [~ryan@74-128-48-122.dhcp.insightbb.com] has quit [Quit:
WeeChat 0.3.5]
23:19 < chomp> meh got the install cd up and running in vbox in no time at
all, looks like i'll just do that for now
23:21 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
23:21 -!- schmichael [~schmichae@gir.lofiart.com] has joined #go-nuts
23:22 < schmichael> is there a uuid package?
23:23 < mpl> chomp: does not mean the install itself will run fine
afterwards.  but good for your for testing it and giving feedback to 9fans :)
23:23 < chomp> mpl, pretty smooth so far.  we'll see :)
23:24 < mpl> last time I tried it was a no go with vbox but it was a long
time ago.  since then 9vx happened and I haven't had the need for anything else :)
23:24 < chomp> schmichael, definitely not in stdlib, and i can't find
-anything- looking around in all the usual sources
23:25 < schmichael> chomp: same.  is there an easy ffi?
23:25 < chomp> cgo is quite a breeze to use
23:25 < schmichael> runtime/cgo?
23:25 < chomp> though you can probably implement a simple native uuid
generator with little effort
23:25 < schmichael> sorry, i'm quite new to go :)
23:25 < chomp> in native go
23:25 < kevlar_work> schmichael,
https://groups.google.com/d/topic/golang-nuts/owCogizIuZs/discussion
23:26 < kevlar_work> schmichael,
https://groups.google.com/d/topic/golang-nuts/d0nF_k4dSx4/discussion
23:26 < kevlar_work> etc.
23:26 < chomp> re that first link aren't interface addresses in uuids
considered a security flaw anyway?
23:27 -!- sulume [~sulume@113x36x246x118.ap113.ftth.ucom.ne.jp] has joined
#go-nuts
23:27 < chomp> ah nvm
23:27 < chomp> good stuff at the bottom
23:27 < kevlar_work> the solutions rsc suggestions in both are entirely
random.
23:27 < chomp> that's what i've done, use crypto random stuff.  it's super
simple
23:27 < kevlar_work> I was just pointing out that searching the mailing list
for uuid works great ;-)
23:27 < schmichael> chomp, kevlar_work: thanks, looking now.  i need to go
from a uuid to bytes
23:28 < kevlar_work> then just crypto.Random.Read(buf)
23:28 < kevlar_work> or whatever it is.
23:28 < chomp> kevlar_work, :) surprising to me is that a google search for
golang uuid produce no (zero zilch nada) results D:
23:28 < chomp> just "did you mean erlang uuid" which made me chuckle
23:28 < schmichael> hm, lots of stuff on generating uuids, not on parsing
23:28 < kevlar_work> gotta search the mailing lists directly, go isn't old
enough yet to have a lot of signal to drown out the noise.
23:29 < chomp> gotcha
23:29 < kevlar_work> cat-v.org and the go-dashboard also have lots of good
links.
23:29 < kevlar_work> (and the codesearch on golang.org too)
23:30 < schmichael> ah, i guess i can just strip the dashes and convert from
a hex string to bytes
23:30 < chomp> schmichael, parsing a uuid is simple stuff
23:30 < chomp> yep
23:31 < schmichael> nothing is simple when you're new to a language :)
23:31 < chomp> im not sure how fmt.Sscanf works in this regard but i know
printf et al with %x will format a []byte as a string of hex values
23:31 < chomp> that might be something to look into
23:31 -!- iant [~iant@67.218.104.187] has joined #go-nuts
23:31 -!- mode/#go-nuts [+v iant] by ChanServ
23:32 < schmichael> thanks
23:33 < chomp> yeah that works
23:33 < chomp> here
23:33 -!- tvw [~tv@e176006144.adsl.alicedsl.de] has quit [Ping timeout: 250
seconds]
23:33 < chomp> http://pastie.org/2118488
23:34 < schmichael> chomp: thanks!
23:36 -!- tvw [~tv@e176006144.adsl.alicedsl.de] has joined #go-nuts
23:37 -!- tvw [~tv@e176006144.adsl.alicedsl.de] has quit [Remote host closed the
connection]
23:45 -!- wchicken [~chicken@c-66-31-200-20.hsd1.ma.comcast.net] has joined
#go-nuts
23:46 * cenuij prefers using system device for uuid's
23:46 < cenuij> using haveged on most boxen these days
23:46 < cenuij> http://freshmeat.net/projects/haveged
23:50 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
--- Log closed Sat Jun 25 00:00:54 2011