--- Log opened Tue Jul 19 00:00:01 2011
00:03 < magn3ts> kevlar_work, yeah, the PacketSender as a light wrapper
around a channel was one of my thoughts.  For the library I'm using, I'm just not
sure if using interfaces makes sense :s
00:08 -!- tavis_rain [~tavisb@24-104-129.146.hfc.mediarain.com] has quit [Read
error: Connection reset by peer]
00:11 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Read error:
Connection reset by peer]
00:16 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
00:17 -!- chomp [~chomp@c-67-186-35-69.hsd1.pa.comcast.net] has joined #go-nuts
00:22 -!- Urtie [~kim@90-227-159-22-no57.tbcn.telia.com] has joined #go-nuts
00:34 -!- anticw [~anticw@c-98-210-108-13.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
00:34 -!- anticw [~anticw@c-98-210-108-13.hsd1.ca.comcast.net] has joined #go-nuts
00:41 -!- telexicon_ [~telexicon@c-67-160-124-195.hsd1.wa.comcast.net] has joined
#go-nuts
00:44 -!- telexicon [~telexicon@unaffiliated/chowmeined] has quit [Ping timeout:
252 seconds]
00:52 -!- tvw [~tv@e176002180.adsl.alicedsl.de] has quit [Ping timeout: 255
seconds]
00:52 -!- tvw [~tv@e176005238.adsl.alicedsl.de] has joined #go-nuts
01:08 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has quit
[Quit: Computer has gone to sleep.]
01:15 -!- magn3ts_ [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has joined #go-nuts
01:18 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has quit [Ping timeout:
264 seconds]
01:22 -!- tvw [~tv@e176005238.adsl.alicedsl.de] has quit [Remote host closed the
connection]
01:22 -!- franciscosouza [~francisco@187.105.25.184] has joined #go-nuts
01:25 -!- meling [~meling@cse-dhcp-10-91.ucsd.edu] has quit [Remote host closed
the connection]
01:29 -!- Loonacy [~loonacy@c-67-172-248-248.hsd1.ut.comcast.net] has quit [Ping
timeout: 240 seconds]
01:35 -!- telexicon_ [~telexicon@c-67-160-124-195.hsd1.wa.comcast.net] has quit
[Ping timeout: 252 seconds]
01:38 -!- Loonacy [~loonacy@c-67-172-248-248.hsd1.ut.comcast.net] has joined
#go-nuts
01:39 -!- jmil [~jmil@2001:468:1802:e148:223:32ff:feb1:9dfc] has quit [Quit: jmil]
01:44 < ajray-fh> whats an ideomatic way to do a compile time check of a
variable value
01:45 < ajray-fh> in C what i would want is #if foo <= 1 ;; #error foo
must be greater than 1 ;; #endif
01:45 < exch> Go doesnt have macro stuff I'm afraid
01:46 < ajray-fh> i want to generate a compile-time error (instead of a
runtime one) for this
01:46 < ajray-fh> not possible?
01:46 < jessta_> not possible
01:46 < ajray-fh> hmm
01:46 < exch> I'm not sure you can wthout writing your own macro
pre-processor
01:47 < ajray-fh> i'd image something like a compile time check special
function
01:47 < ajray-fh> like error(conditional)
01:47 < jessta_> you can make a tool to detect the issue, or panic(), or use
types to do it
01:48 < ajray-fh> i think this could fit in well with the language
01:48 < ajray-fh> provides a tool for detecting bugs at compiletime instead
of runtime
01:49 < str1ngs> ajray-fh: is it a arch related check?
01:49 < ajray-fh> str1ngs: nope, simple global var.  i want compile to fail
if its less than 2
01:49 < str1ngs> ajray-fh: also you can possibly use init() for this.  not
compile time of course.
01:49 < ajray-fh> exactly
01:49 < str1ngs> ah maybe init is better then
01:51 < ajray-fh> maybe
01:51 < ajray-fh> go was made to scale well to large codebase projects (like
in the "thinking about go" recent thread)
01:51 < ajray-fh> i think this would be good for those, because you could
halt a bad compile midway through
01:51 < ajray-fh> instead of going through everything, going into testing
and getting caught there
01:52 < str1ngs> the test framework is pretty simple and easy.  you could
make one test just for this :P
01:53 < str1ngs> all: test
01:53 -!- chomp [~chomp@c-67-186-35-69.hsd1.pa.comcast.net] has quit [Quit:
Leaving]
01:53 -!- Adys [~Adys@unaffiliated/adys] has quit [Read error: Connection reset by
peer]
01:56 < ajray-fh> str1ngs: granted i'm not too familiar with the test
framework, just cursory
01:57 < ajray-fh> also init is close to the solution, but AFAICT its still
runtime
01:59 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
02:00 -!- hargettp [~hargettp@pool-71-174-140-162.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
02:01 < str1ngs> so test might be better for your use case.
02:02 < str1ngs> ajray-fh: http://golang.org/doc/code.html#Testing
02:02 < str1ngs> test framework primer.
02:04 -!- niemeyer [~niemeyer@201-25-35-2.pltce701.dsl.brasiltelecom.net.br] has
quit [Ping timeout: 240 seconds]
02:08 < ajray-fh> str1ngs: thanks, and maybe thats the solution i'm looking
for
02:09 < ajray-fh> if i have 3 go files: a.go b.go c.go and three test files
a_test.go b_test.go c_test.go
02:09 < ajray-fh> and i make test, will it wait to compile all 3 go files
before testing them, or will it test in parallel?
02:12 -!- keithcascio [~keithcasc@nat/google/x-rwluupxkzlfhwzid] has quit [Quit:
Leaving]
02:13 -!- Adys [~Adys@ppp089210010122.dsl.hol.gr] has joined #go-nuts
02:13 -!- Adys [~Adys@ppp089210010122.dsl.hol.gr] has quit [Changing host]
02:13 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
02:14 < str1ngs> ajray-fh: not sure, you'll have to test that.
02:14 < str1ngs> I generally use one test file.  but none of my projects are
that large.
02:15 < jessta_> ajray-fh: you don't test files, you test packages
02:15 -!- crazy2be [~crazy2be@d75-152-167-124.abhsia.telus.net] has joined
#go-nuts
02:15 < crazy2be> how do you test if two slices are equal?
02:16 < vsmatck> crazy2be: The reflect package has a function called
"DeepEqual" which can do that.
02:16 < jessta_> crazy2be: also, a for loop will do that
02:16 < str1ngs> crazy2be: are they strings?
02:16 < vsmatck> I'd bet the for loop would be faster if that matters to
you.
02:16 < str1ngs> crazy2be: because I have a insane way to test them :P
02:17 -!- jmil [~jmil@c-68-81-252-40.hsd1.pa.comcast.net] has joined #go-nuts
02:17 < crazy2be> []string
02:18 < jessta_> crazy2be: also if you just want to compare the slices and
not it's contains you can just use ==
02:18 < crazy2be> jessta_: What does that compare?
02:18 < crazy2be> != wasn't working
02:18 < crazy2be> invalid operation: tp != ex (slice can only be compared to
nil)
02:18 < str1ngs> crazy2be: what I do is sort.SliceString(a).Sort();
sort.SliceString(b).Sort() then Join them both
02:19 < str1ngs> ie strings.Join(a," ") != strings.Join(b," ")
02:20 < jessta_> crazy2be: ah, so apparently you can't do that, hmmm..weird
02:21 < jessta_> i guess it's not that useful and more likely to be used
incorrectly
02:22 < crazy2be> reflect.DeepEqual is exactly what I was looking for, since
it's only testing code
02:22 < crazy2be> performance doesn't matter
02:22 < crazy2be> much at all
02:31 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 258 seconds]
02:32 < crazy2be> it's also the same problem with []byte, which is why
bytes.Equal exists
02:36 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
02:37 < crazy2be> this program i'm writing has a lot of recursion
02:37 < crazy2be> i'm afraid that there's a stack overflow somewhere waiting
to happen
02:37 < crazy2be> or rather, an infinitely growing stack
02:39 < jessta_> perhaps use more for loops
02:40 -!- angasule [~angasule@190.2.33.49] has quit [Remote host closed the
connection]
02:41 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
02:41 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Read
error: Connection reset by peer]
02:41 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has joined #go-nuts
02:41 < vsmatck> crazy2be: Be bold.  Go big.  Crash hard.
02:42 < crazy2be> vsmatck: I've done that a few times with other go programs
:P
02:42 < crazy2be> the inf stack is nice in theory
02:42 < crazy2be> but ends up blowing up in your face during testing
sometimes
02:42 < crazy2be> requiring a reboot or patience
02:43 < crazy2be> perhaps on other OSes the memory is managed better
02:43 < crazy2be> so the rest of the OS doesn't die when one program wants
RAM
02:44 < crazy2be> (better from a desktop persepective)
02:46 < vsmatck> ya I've had that happen on occasion.  Start hitting the
disk and it takes a minute to switch to a terminal to kill the thing.
02:48 < crazy2be> I only have a gig of ram
02:48 < crazy2be> so it takes it a matter of seconds (if that) to fill all
available memory
02:48 < crazy2be> after that point, I can't do anything really
02:51 < crazy2be> vsmatck: specs/os?
02:52 < vsmatck> I got 4gB memory.  Two dual core opterons.  Running debian
stable.  Picked up two dual core 2.6ghz opterons on ebay for 27$ a month ago.  :)
You?
02:53 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Quit:
Leaving...]
02:53 -!- Kami_ [~kami@unaffiliated/kami-/x-9078513] has quit [Quit: Off]
02:54 < Boney> crazy2be: in linux (more generally *nix) use rlimit
02:54 < Boney> it will protect against either stack/heap overflows.
02:55 -!- Kami_ [~kami@unaffiliated/kami-/x-9078513] has joined #go-nuts
02:56 -!- nicka2 [~lerp@142.176.0.21] has joined #go-nuts
02:56 < crazy2be> vsmatck: 1GB ram, 1.66Ghz Centrino processor, 160GB HD
02:56 < crazy2be> 1.66 dual core that is
02:57 < crazy2be> the ram is the biggest limiter
02:57 < crazy2be> I was supposed to get more
02:57 < crazy2be> but someone gave me the wrong sticks
02:57 -!- sniper506th [~sniper506@cpe-098-122-099-052.sc.res.rr.com] has joined
#go-nuts
02:57 -!- sniper506th [~sniper506@cpe-098-122-099-052.sc.res.rr.com] has quit
[Client Quit]
02:57 < crazy2be> 512MB sticks in a 1GB package :P
02:57 -!- nicka1 [~lerp@142.176.0.21] has quit [Ping timeout: 240 seconds]
02:57 < crazy2be> i'm pretty sure it was an accident
02:59 < Bigbear1> this is a new computer?
02:59 -!- squeese [~squeese@h51580273.semamkb.dyn.perspektivbredband.net] has
joined #go-nuts
03:02 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 246 seconds]
03:03 -!- Peet__1 [~Peet__@blk-222-42-163.eastlink.ca] has joined #go-nuts
03:04 -!- Peet__ [~Peet__@unaffiliated/peet--/x-2416233] has quit [Read error:
Operation timed out]
03:05 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
03:08 -!- Broady [~b@unaffiliated/broady] has left #go-nuts []
03:11 < crazy2be> Bigbear1: My computer is old (three years)
03:15 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
03:21 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
03:24 -!- qeed [~qeed@adsl-98-85-41-7.mco.bellsouth.net] has quit [Quit: Leaving]
03:24 -!- elephants [~elephants@173-230-160-81.cable.teksavvy.com] has joined
#go-nuts
03:27 < Bigbear1> I need to get a graphics card
03:27 < Bigbear1> and power supply I guess
03:32 < crazy2be> ugh option parsing with bash is awful
03:33 < crazy2be> I just want to set some environment variables from
commandline options or something
03:33 < crazy2be> like $ARGS_SRC for -src="foobar"
03:35 < askhader> What are some of your favorite db and storage libraries?
03:35 < crazy2be> filesystem + json :P
03:35 < askhader> =P
03:35 < askhader> What's the performance like on a setup like that?
03:35 < crazy2be> depends
03:36 < crazy2be> how many users are you planning to have?
03:36 < crazy2be> i'm not sure how well it scales
03:36 < askhader> Users of?
03:36 < vsmatck> Yeah.  DB choice is relative to what you're doing.
03:36 < askhader> I'm goin to be doing a lot of writes and reads.  I need a
databse methinks.
03:36 < askhader> This is true.
03:36 < crazy2be> but I can tell you it runs fine for a couple users on a
233 Mhz with 128MB ram
03:36 < crazy2be> askhader: it really does depend on what you are doing
03:37 < crazy2be> sql is great if the relationships are really important
03:37 < askhader> I'm going to be basically parsing and logging some rss
feeds quite actively.
03:37 < crazy2be> but a filesystem is better if you only are ever
referencing something by ID
03:37 < crazy2be> or almost always only
03:37 < askhader> Relationships are nice to be honest.  I was hoping to use
mysql's foreign keys.
03:37 < askhader> But I can infer relationships by storing id's.
03:38 < vsmatck> Is this going to be a web service or desktop application?
03:39 < askhader> This is going to populate a database that will be accessed
by a web service.
03:39 < askhader> Certainly.
03:39 < askhader> Sorry I shouldn't say database.
03:39 < crazy2be> anyone know of a FormStruct() function that populates the
fields of a struct based on form input?
03:41 < crazy2be> askhader: accessed in what way?
03:41 < crazy2be> what bits are important?
03:41 -!- benjack [~benjack@58.185.142.18] has joined #go-nuts
03:42 < askhader> crazy2be: There are two web access points to this data.
First, infrequently but resource intensively by administrators and second
extremely frequently by users.
03:42 < vsmatck> redis and mongodb are two popular options for stuff that
scales.  They're both quite different from eachother.
03:42 < askhader> I
03:42 < askhader> II'd sat 70% of the data is valuable to both stages.
03:43 < askhader> Interesting.
03:43 < vsmatck> If the amount of data is sure to exceed the amount of main
memory you have in the server then you shouldn't use redis.
03:43 < askhader> Yes, I was given this advice today.
03:44 < askhader> Does redis consequently perform much faster?
03:45 < vsmatck> Mongo is fast up to the point where your data set fits
entirely in memory.  It's also good for situations where the dataset doesn't fit
entirely in memory, but where the dataset has just a few hot spots.
03:46 -!- benjack [~benjack@58.185.142.18] has quit [Ping timeout: 250 seconds]
03:46 < askhader> Hmm, which of the two have superior golang support?
03:46 < vsmatck> Redis doesn't have a good way of ehh "swapping" to disk.
03:46 -!- elephants [~elephants@173-230-160-81.cable.teksavvy.com] has quit
[Remote host closed the connection]
03:46 < vsmatck> Both of them have high quality clients available in Go.
03:46 < askhader> vsmatck: That's alarming
03:46 < askhader> I'd be concerned about data loss.
03:47 < vsmatck> Ah. Redis does persistence with a append only file.  You
can adjust how often it appends.  People generally do once a minute or so.
03:47 < vsmatck> Mongo also has better cluster support right now.
03:48 < vsmatck> But I'm not sure if that's an issue for you.
03:48 < askhader> Not yet ;)
03:48 < vsmatck> heh.  It's good to keep these things in mind.  Don't want
your service falling over if people start using it.
03:49 < askhader> Indeed.
03:49 < vsmatck> The author of redis is sitting by the ocean in italy
working on cluster support right now.  His clustering plan is higher performance.
03:49 < askhader> I'm not surprised.
03:49 < askhader> It's an important feature.
03:49 < vsmatck> Probably not an issue for a web service tho.
03:51 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
04:01 -!- vsayer [~vsayer@2001:470:1f04:1a6b::9] has quit [Ping timeout: 260
seconds]
04:03 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services]
04:03 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz]
04:03 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:04 < askhader> I am presented with the following compilation errors when
installing the gomongo library...  http://pastebin.com/B6Mxp8Kf
04:06 < vsmatck> gomongo is not very up to date.  You may want to try out
mgo.
04:07 < vsmatck> I personally know that the gomongo bson implementation is a
bit spotty.
04:08 -!- jlaffaye [~jlaffaye@abydos.jlaffaye.net] has quit [Ping timeout: 240
seconds]
04:09 -!- dju [dju@fsf/member/dju] has quit [Ping timeout: 264 seconds]
04:09 -!- mpl [~mpl@sd-18712.dedibox.fr] has quit [Ping timeout: 258 seconds]
04:09 -!- dju [dju@fsf/member/dju] has joined #go-nuts
04:09 -!- crazy2be [~crazy2be@d75-152-167-124.abhsia.telus.net] has quit [Ping
timeout: 258 seconds]
04:10 -!- mpl [~mpl@sd-18712.dedibox.fr] has joined #go-nuts
04:13 -!- jlaffaye [~jlaffaye@abydos.jlaffaye.net] has joined #go-nuts
04:15 < askhader> mgo is also giving me compilation errors =./
04:15 -!- arun_ [~arun@e71020.upc-e.chello.nl] has joined #go-nuts
04:15 -!- arun_ [~arun@e71020.upc-e.chello.nl] has quit [Changing host]
04:15 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts
04:17 < vsmatck> Sometimes stuff needs to be gofix'd.
04:18 < jessta_> askhader: using release or tip?  a lot of third party
packages only update for releases
04:19 < askhader> vsmatck: Good point.
04:19 < askhader> I was go-installing.
04:19 < askhader> But I'll try another method.
04:21 -!- kergoth__ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Quit:
Computer has gone to sleep.]
04:23 < vsmatck> Hm. goinstall is the way to go.  jessta had good question.
04:23 < askhader> Hmm
04:23 < askhader> Them I'm not sure I understand the question.
04:25 < vsmatck> You'd want to make sure you have the latest release checked
out with mercurial.  If you use tip and rely upon third party libraries you'll see
breakage often.
04:26 < askhader> Latest version of go?
04:27 < jessta_> askhader: there is release, weekly and tip
04:27 < askhader> I see.
04:27 < askhader> I probably want weekly.
04:27 < vsmatck> Ya. The tip is the absolute latest version.  Every once in
a while they specify a verion to be "release".  Generally third party packages
stay sync'd up to release.
04:27 < askhader> How can I determine which repo I've built?
04:28 < askhader> I have weekly of 6g...
04:28 < askhader> 6g version weekly.2011-07-07 9144
04:28 -!- vsayer [~vsayer@2001:470:1f04:1a6b::9] has joined #go-nuts
04:29 -!- vsayer [~vsayer@2001:470:1f04:1a6b::9] has quit [Read error: Connection
reset by peer]
04:29 -!- vsayer [~vsayer@2001:470:1f04:1a6b::9] has joined #go-nuts
04:29 < jessta_> askhader: you might want to try, hg update release
04:29 < askhader> and then /src/bash.all ?
04:29 < jessta_> yeah
04:30 -!- vsayer [~vsayer@2001:470:1f04:1a6b::9] has quit [Client Quit]
04:30 < askhader> That actually did pull in updates.
04:30 -!- vsayer [~vsayer@2001:470:1f04:1a6b::9] has joined #go-nuts
04:31 -!- vsayer [~vsayer@2001:470:1f04:1a6b::9] has quit [Client Quit]
04:31 -!- vsayer [~vsayer@2001:470:1f04:1a6b::9] has joined #go-nuts
04:32 -!- benjack [~benjack@bb121-6-51-10.singnet.com.sg] has joined #go-nuts
04:34 -!- jlaffaye [~jlaffaye@abydos.jlaffaye.net] has quit [Read error:
Connection reset by peer]
04:34 -!- mpl [~mpl@sd-18712.dedibox.fr] has quit [Read error: Operation timed
out]
04:34 -!- mpl [~mpl@sd-18712.dedibox.fr] has joined #go-nuts
04:34 -!- jlaffaye [~jlaffaye@abydos.jlaffaye.net] has joined #go-nuts
04:35 -!- Kami_ [~kami@unaffiliated/kami-/x-9078513] has quit [Excess Flood]
04:37 < askhader> jessta_: this did not recitfy the problem
04:37 -!- Kami_ [~kami@unaffiliated/kami-/x-9078513] has joined #go-nuts
04:38 < askhader> http://pastebin.com/nu27w5wS
04:39 -!- Natch| [~natch@178.73.216.126] has quit [Ping timeout: 276 seconds]
04:42 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
04:45 -!- Natch| [~natch@178.73.216.126] has joined #go-nuts
04:46 < jessta_> askhader: looks like you've got some permissions problems
04:47 < vsmatck> Weird.  Maybe permissions are messed up on that directory
such that your user can't write it.  Maybe do ls -l on it to see what's up.
04:47 < vsmatck> Doh.  Redundant sorry.
04:47 -!- remy_o [~babar@archlinux/developer/remy-o] has joined #go-nuts
04:49 < vsmatck> Reminds me of this.
http://www.somethingofthatilk.com/index.php?id=135
04:49 < vsmatck> Under unix shell.  :)
05:00 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
05:01 -!- Bigbear1 [~Cody@d75-158-132-172.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
05:06 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
05:06 -!- krolaw [~krolaw@port165-235.ubs.maxnet.co.nz] has quit [Quit: krolaw]
05:28 -!- millergarym__ [~chatzilla@203-219-89-242.static.tpgi.com.au] has joined
#go-nuts
05:32 -!- ronnyy [~quassel@p4FF1C45C.dip0.t-ipconnect.de] has joined #go-nuts
05:35 -!- jmil [~jmil@c-68-81-252-40.hsd1.pa.comcast.net] has quit [Quit: jmil]
05:35 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
05:35 -!- chrisdothall [~chris@segfault.net.nz] has quit [Quit: leaving]
05:45 -!- chrisdothall [~chris@segfault.net.nz] has joined #go-nuts
05:51 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
05:54 -!- millergarym__ [~chatzilla@203-219-89-242.static.tpgi.com.au] has quit
[Quit: ChatZilla 0.9.87 [Firefox 3.6.18/20110614230723]]
06:07 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Quit:
Computer has gone to sleep.]
06:15 -!- remy_o [~babar@archlinux/developer/remy-o] has quit [Ping timeout: 258
seconds]
06:19 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has joined
#go-nuts
06:26 -!- noodles775 [~michael@g225135209.adsl.alicedsl.de] has joined #go-nuts
06:26 -!- noodles775 [~michael@g225135209.adsl.alicedsl.de] has quit [Changing
host]
06:26 -!- noodles775 [~michael@canonical/launchpad/noodles775] has joined #go-nuts
06:29 -!- garym [~garym@203-219-89-242.static.tpgi.com.au] has joined #go-nuts
06:33 -!- fotang [~fotang@41.206.11.5.vgccl.net] has joined #go-nuts
06:41 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
06:41 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout:
612 seconds]
06:46 -!- niemeyer [~niemeyer@201-25-35-2.pltce701.dsl.brasiltelecom.net.br] has
joined #go-nuts
06:47 -!- ronnyy [~quassel@p4FF1C45C.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
07:00 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
07:01 -!- preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
07:02 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 252 seconds]
07:06 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 276 seconds]
07:19 -!- fotang [~fotang@41.206.11.5.vgccl.net] has quit [Ping timeout: 258
seconds]
07:20 -!- noodles775 [~michael@canonical/launchpad/noodles775] has quit [Read
error: Operation timed out]
07:23 -!- noodles775 [~michael@e178252120.adsl.alicedsl.de] has joined #go-nuts
07:23 -!- noodles775 [~michael@e178252120.adsl.alicedsl.de] has quit [Changing
host]
07:23 -!- noodles775 [~michael@canonical/launchpad/noodles775] has joined #go-nuts
07:27 -!- napsy [~luka@193.2.66.6] has joined #go-nuts
07:34 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: sudo rm -R /]
07:38 -!- sacho [~sacho@87.126.39.0] has quit [Ping timeout: 255 seconds]
07:43 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Read error:
Connection reset by peer]
07:47 -!- fvbommel [~fvbommel_@86.86.15.250] has quit [Ping timeout: 240 seconds]
07:52 -!- fvbommel [~fvbommel_@86.86.15.250] has joined #go-nuts
07:53 -!- sacho [~sacho@95-42-118-162.btc-net.bg] has joined #go-nuts
07:55 -!- ronnyy [~quassel@p4FF1C45C.dip0.t-ipconnect.de] has joined #go-nuts
08:02 -!- erus` [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
08:04 -!- virtualsue [~chatzilla@nat/cisco/x-xwzainhckwvudnmb] has joined #go-nuts
08:08 -!- Kami_ [~kami@unaffiliated/kami-/x-9078513] has quit [Quit: Off]
08:08 -!- Kami_ [~kami@unaffiliated/kami-/x-9078513] has joined #go-nuts
08:10 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has quit [Quit:
Leaving.]
08:11 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
08:13 -!- ronnyy [~quassel@p4FF1C45C.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
08:15 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has joined #go-nuts
08:16 -!- yogib [~yogib@131.234.59.64] has joined #go-nuts
08:23 -!- stalled [~stalled@unaffiliated/stalled] has quit [Ping timeout: 252
seconds]
08:29 -!- photron_ [~photron@port-92-201-77-33.dynamic.qsc.de] has joined #go-nuts
08:33 -!- karl_ [~karl@76.5.136.186] has joined #go-nuts
08:34 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
08:38 -!- ronnyy [~quassel@p4FF1C45C.dip0.t-ipconnect.de] has joined #go-nuts
08:53 -!- fotang [~fotang@41.191.110.237] has joined #go-nuts
08:54 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 258 seconds]
08:56 -!- vmil86 [~vmil86@78.57.227.12] has joined #go-nuts
09:08 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Read error:
Connection timed out]
09:10 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has joined
#go-nuts
09:10 -!- d2biG [p@bofh.edu.pl] has quit [Ping timeout: 276 seconds]
09:10 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
09:20 -!- heatxsink [u956@gateway/web/irccloud.com/x-pqhtodecfemgmmpt] has joined
#go-nuts
09:21 < heatxsink> hi is there a preferred config lib there's ....
https://github.com/msbranco/goconfig and http://code.google.com/p/goconf/
09:25 -!- karl_ [~karl@76.5.136.186] has quit [Quit: Leaving]
09:29 < aiju> strings.Split(configline, "=", -1)
09:29 < aiju> my preferred config lib
09:29 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 258
seconds]
09:32 < mpl> I just make a json config file
09:33 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
09:41 -!- Phelps [~benphelps@2001:470:1f0f:2fa:223:dfff:fe86:95ae] has joined
#go-nuts
09:41 -!- Phelps [~benphelps@2001:470:1f0f:2fa:223:dfff:fe86:95ae] has quit
[Client Quit]
09:53 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has left #go-nuts []
09:57 -!- benjack [~benjack@bb121-6-51-10.singnet.com.sg] has quit [Quit:
Leaving.]
09:57 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
10:04 -!- hargettp [~hargettp@pool-71-174-140-162.bstnma.east.verizon.net] has
joined #go-nuts
10:16 < jessta_> I write my config in Go and compile it in
10:18 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has quit [Ping timeout: 260
seconds]
10:19 -!- wrtp [~rog@92.30.166.101] has joined #go-nuts
10:19 -!- fotang [~fotang@41.191.110.237] has quit [Ping timeout: 252 seconds]
10:20 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has joined #go-nuts
10:24 -!- ronnyy [~quassel@p4FF1C45C.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
10:25 -!- ccc1 [~Adium@222-151-136-129.jp.fiberbit.net] has joined #go-nuts
10:29 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has quit [Quit:
Leaving.]
10:37 -!- dRbiG [p@bofh.edu.pl] has joined #go-nuts
10:52 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
10:53 < erus`> i write my config in C and then use cgo to compile it in
10:53 < aiju> haa
10:53 < aiju> my config is in SQL databases which are then accessed via
shared memory
10:54 < erus`> i give out the hex addresses to clients so they can change
the config
10:55 < erus`> software must be adaptable today
10:56 -!- alehorst [~alehorst@201.47.26.52.dynamic.adsl.gvt.net.br] has joined
#go-nuts
11:02 < ww> w
11:02 * ww oops
11:03 -!- fotang [~fotang@41.191.110.237] has joined #go-nuts
11:08 -!- hargettp [~hargettp@pool-71-174-140-162.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
11:10 -!- hargettp [~hargettp@pool-71-174-140-162.bstnma.east.verizon.net] has
joined #go-nuts
11:13 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
11:24 -!- fotang [~fotang@41.191.110.237] has quit [Remote host closed the
connection]
11:29 -!- napsy [~luka@193.2.66.6] has quit [Ping timeout: 260 seconds]
11:29 -!- hargettp [~hargettp@pool-71-174-140-162.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
11:29 -!- fotang [~fotang@41.191.110.237] has joined #go-nuts
11:43 -!- fotang [~fotang@41.191.110.237] has quit [Remote host closed the
connection]
11:47 -!- alehorst [~alehorst@201.47.26.52.dynamic.adsl.gvt.net.br] has quit
[Remote host closed the connection]
11:47 -!- alehorst [~alehorst@201.47.26.52.dynamic.adsl.gvt.net.br] has joined
#go-nuts
11:47 < str1ngs> aiju: strings.Split(configline, "=") :P
11:48 -!- fotang [~fotang@41.191.110.237] has joined #go-nuts
11:52 -!- miker2 [~miker2@64.55.31.190] has joined #go-nuts
11:53 -!- jyxent [~jyxent@129.128.191.96] has quit [Ping timeout: 252 seconds]
11:53 -!- ccc1 [~Adium@222-151-136-129.jp.fiberbit.net] has quit [Quit: Leaving.]
11:53 -!- jyxent [~jyxent@129.128.191.96] has joined #go-nuts
11:57 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has joined #go-nuts
12:04 -!- alehorst [~alehorst@201.47.26.52.dynamic.adsl.gvt.net.br] has quit
[Remote host closed the connection]
12:12 < hokapoka> str1ngs: on saturday I was asking about passing []string
to Printf("$0 $1", mySlice) but was dragged away before you asked if it was just a
plain []string, yes it is.
12:12 < hokapoka> Is there a way to pass it to printf as the ...interface{}
arg?
12:13 < hokapoka> where, s[0], s[1], ...  s[n] are passed as seperate
arguments?
12:14 -!- franciscosouza [~francisco@187.105.25.184] has quit [Quit:
franciscosouza]
12:15 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Quit: ZNC -
http://znc.sourceforge.net]
12:15 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has joined #go-nuts
12:17 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Client
Quit]
12:19 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
12:19 < str1ngs> hokapoka: sure something like this . fmt.Printf("%s",i...)
12:19 -!- alehorst [~alehorst@201.47.26.52.dynamic.adsl.gvt.net.br] has joined
#go-nuts
12:19 < hokapoka> Both the string that's passed to Sprintf, and the []string
are not known until runtime.  Currently I'm examining the string and locating the
indexes that are passed and then building the string "manually".
12:20 < str1ngs> hokapoka: but you can also us slice notation.  so
fmt.Printf("%v %v",i[2:], i[:len(i-1)])
12:21 < str1ngs> not tested syntax but you get the idea
12:22 -!- prip [~foo@host250-123-dynamic.32-79-r.retail.telecomitalia.it] has quit
[Quit: Leaving]
12:22 < str1ngs> hokapoka: the first example you might have to dynamically
create the formatter.  ie format := strings.Repeat(len(i),"%s ")
12:24 -!- prip [~foo@host54-134-dynamic.42-79-r.retail.telecomitalia.it] has
joined #go-nuts
12:26 < hokapoka> Right, the formatter is defined, and it accompanies a
RegExp.
12:26 < str1ngs> I
12:26 < str1ngs> I'd have to get a better idea though, can you break it down
to a simple test case?
12:26 < str1ngs> then paste it to a paste service.  but my guess is you want
to use slice notation
12:28 < hokapoka> For example, the expression : ([a-z]+).([0-9]+).(ext)
returns 4 Matches for "foo.123.ext" And the user might then like to convert it to
"foo.ext" or "foo.ext?id=123"
12:30 < hokapoka> So the position of the Submatch will be passed as the
formatter, "$1.$3" for "foo.ext" and "$1.$3?=$2";
12:31 < hokapoka> ATM I've got it working by examining the formatter for
indexes and then generating the string by concatinating the Submatches and the
rest of the formatter.
12:32 < hokapoka> I was just wondering if it was possible to pass indexes to
the Sprintf.
12:32 < str1ngs> you can but in the form of slice notation
12:33 < str1ngs> which you can print out with say %v then strip [ ]
12:33 < str1ngs> but that does not help your ordering so you might have to
create a new slice that orders they way you want
12:34 < str1ngs> there is also the exp/datafmt package . but it was pretty
complex when I looked at it.
12:34 < str1ngs> but..  you can attach a formatter to things so there might
be a way to do it that way.
12:35 < hokapoka> Okay, well I've got it working this "manual" way ATM.
12:36 < hokapoka> I'll crack on with the rest of my stuff and come back to
it another day if I find it causes trouble
12:37 < hokapoka> Basically it just trying to replicate some of the
mod_rewrite functionality that's avaliable for apache.
12:38 < str1ngs> I know this probably doesnt help much.  more like just
giving you options.  I'd have to see some code to be more helpful.
12:38 -!- serialhex [~quassel@99-101-148-183.lightspeed.wepbfl.sbcglobal.net] has
quit [Remote host closed the connection]
12:39 < hokapoka> Okay, just pulled weekly by mistake I'll paste it once
I've gone through the changes
12:40 < hokapoka> Also trying to replace gnome shell with my old WM
12:42 < str1ngs> ya they removed the gconf keys for that.  ie they use dconf
now
12:42 < str1ngs> what wm btw?
12:42 < hokapoka> xmonad
12:42 < str1ngs> ah you are in luck I have a link for you then.
12:43 < hokapoka> ooh
12:43 < str1ngs> linux?
12:43 < hokapoka> aye
12:43 < str1ngs> if so what distro?
12:43 < hokapoka> arch
12:43 < str1ngs> https://wiki.archlinux.org/index.php/GNOME#Xmonad
12:44 < str1ngs> would work for other distro's
12:44 < hokapoka> heh, just been reading through that.
12:44 < nicka2> I love xmonad
12:44 < str1ngs> I have another method
12:45 < str1ngs> hokapoka: I just use gnome backends, and launch with
consolekit.  for wmfs.
12:46 < str1ngs> its not as good as gconf keys , still tweaking it.
12:48 -!- alehorst [~alehorst@201.47.26.52.dynamic.adsl.gvt.net.br] has quit
[Remote host closed the connection]
12:49 -!- alehorst [~alehorst@201.47.26.52.dynamic.adsl.gvt.net.br] has joined
#go-nuts
12:49 < hokapoka> I quite like Gnome Shell, but the task switching is a real
pain.
12:49 -!- alehorst [~alehorst@201.47.26.52.dynamic.adsl.gvt.net.br] has quit
[Remote host closed the connection]
12:50 < hokapoka> If you have 2 terminals open you can't switch between them
easily it automaticaly selects another applicaiton, say Chrome.
12:51 < str1ngs> ya it has potential but I have the same issue with it.  you
can beat a tiler for moving around without a mouse.
12:51 < str1ngs> can not*
12:52 < str1ngs> my mac runs gnome-shell and I tried to emulate my dwm style
bindings on it..  what a pita.
12:53 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 240
seconds]
12:56 < str1ngs> I really need a vim macro or something for if err != nil {
return err }
12:56 < hokapoka> Indeed, I thought I would sick with it for a while, been
about a month and my efficency must have dropped significantly
12:56 -!- alehorst [~alehorst@201.47.26.52.dynamic.adsl.gvt.net.br] has joined
#go-nuts
12:56 -!- garym [~garym@203-219-89-242.static.tpgi.com.au] has quit [Read error:
Connection reset by peer]
12:56 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
12:57 < str1ngs> ya thats why I only use it on my mac, which is basically a
media machine where I dont mind useing a mouse with.
12:57 -!- alehorst [~alehorst@201.47.26.52.dynamic.adsl.gvt.net.br] has quit
[Remote host closed the connection]
12:57 -!- garym [~garym@203-219-89-242.static.tpgi.com.au] has joined #go-nuts
12:57 -!- alehorst [~alehorst@201.47.26.52.dynamic.adsl.gvt.net.br] has joined
#go-nuts
12:59 < hokapoka> heh, yeah.  I've opted for :r <some_snippit> I used
it especially for when doing stuff with a new persistant data type that's getting
written to mongodb.  Normally swiflty followed by s/TYPE/myType/gi
12:59 < hsoj> grrr, can't figure out why this goinstall is still using an
invalid dependency
13:00 -!- fotang [~fotang@41.191.110.237] has quit [Remote host closed the
connection]
13:00 < aiju> 13:53 < str1ngs> aiju: strings.Split(configline, "=") :P
13:00 < aiju> they changed the interface?
13:00 < aiju> jesus christ
13:01 < str1ngs> aiju: ya thought I'd give you a heads up
13:01 < str1ngs> there is a strings.SplitN now
13:01 < str1ngs> iirc
13:02 < str1ngs> hsoj: what package?
13:02 < aiju> they probably pick each day a library function
13:02 < aiju> and randomly remove an argument
13:02 < hsoj> str1ngs: it's one that I had to fork to resolve some bugs
13:02 < str1ngs> aiju: I dont mind this change.  actually not many changes I
dont mind.
13:03 -!- fotang [~fotang@41.191.110.237] has joined #go-nuts
13:03 < hsoj> I had to resolve issues w/ 2 packages on github, 1 of which is
a dep to the other.  the one that is a dep is still pulling from the invalid fork
even though there are no references to it in the pkg
13:03 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
13:03 < str1ngs> hsoj: do you have some errors?  or a link I can try with.
13:03 < hsoj> github.com/hsoj/asn1-ber is the correct pkg,
github.com/hsoj/ldap is what fails w/ goinstall
13:03 < hsoj> it's still trying to pull from mmitton's branch
13:04 < str1ngs> ah I know why
13:04 < hsoj> the only thing that I can think is going on, is my branch for
asn1-ber isn't tagged 'Release'?
13:05 < hsoj> do tell
13:05 < str1ngs> try with goinstall -nuke
13:05 < str1ngs> or maybe with -u
13:05 < str1ngs> -nuke probably better in this case though.
13:05 < hsoj> -nuke doesn't exist
13:06 < hsoj> am on stable for this project
13:06 < str1ngs> maybe manually clean it then
13:06 < hsoj> looks like -u worked
13:06 -!- alehorst [~alehorst@201.47.26.52.dynamic.adsl.gvt.net.br] has quit
[Remote host closed the connection]
13:06 -!- franciscosouza [~francisco@201.7.186.67] has joined #go-nuts
13:07 < str1ngs> nuke fixes everthing :P
13:07 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has quit
[Remote host closed the connection]
13:08 -!- alehorst [~alehorst@201.47.26.52.dynamic.adsl.gvt.net.br] has joined
#go-nuts
13:10 < str1ngs> hmm wonder if go runs on hurd
13:10 < hsoj> str1ngs: ty for the advice, been banging my head on that one
for a lil while
13:10 < crest> *gg*
13:10 < hsoj> hate when productivity gets ceased by something silly like
that
13:11 < str1ngs> hsoj: np
13:18 -!- ronnyy [~quassel@p4FF1C45C.dip0.t-ipconnect.de] has joined #go-nuts
13:19 -!- vmil86 [~vmil86@78.57.227.12] has quit [Ping timeout: 276 seconds]
13:24 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
13:26 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 264 seconds]
13:33 -!- Dr_Who [~tgall_foo@206.9.88.154] has joined #go-nuts
13:33 -!- Dr_Who [~tgall_foo@206.9.88.154] has quit [Changing host]
13:33 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts
13:38 -!- ronnyy [~quassel@p4FF1C45C.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
13:39 -!- iant [~iant@67.218.106.217] has joined #go-nuts
13:39 -!- mode/#go-nuts [+v iant] by ChanServ
13:39 -!- ccc1 [~Adium@222-151-136-129.jp.fiberbit.net] has joined #go-nuts
13:49 < aiju> 15:16 < str1ngs> hmm wonder if go runs on hurd
13:49 < aiju> you just open /go://yourcodegoeshere
13:50 -!- jmil [~jmil@2001:468:1802:e148:223:32ff:feb1:9dfc] has joined #go-nuts
13:54 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
13:54 < erus`> wow
13:54 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has joined
#go-nuts
13:55 < erus`> i hope hurd get more attention now
13:55 < aiju> hahaahha
13:55 < ww> does the hurd still have that silly 1Gb partition limit?
13:55 < ww> (kinda like go slices)
13:56 < aiju> haha
13:57 < aiju> some amd64 cpu have a 2 GB string limit
13:57 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has
joined #go-nuts
13:57 < aiju> weird things happen when you use the string instructions on
larger strings
13:57 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 246 seconds]
13:58 < aiju> reading intel cpu errata is awkward
13:58 -!- foocraft [~ewanas@89.211.137.241] has quit [Ping timeout: 250 seconds]
14:01 < crest> aiju: OMFG
14:01 < crest> they fucked up the rep instructions?
14:01 < aiju> yes
14:02 < aiju> not all amd64 cpus
14:03 < crest> i pitty the poor compilier writers having to put up with this
kind of crap
14:04 < aiju> heh
14:04 < aiju> i wonder if anybody cares
14:06 < crest> does crypto/x509 or crypto/tls include a function to check
certificates against a crl?
14:07 < aiju> ah even better
14:07 < aiju> strings longer than 4 GB lock up the system
14:07 < aiju> completely
14:08 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
14:08 < dario> nice
14:08 < crest> aiju: defien "lock up the system"
14:08 < aiju> affected are at least intel pentium d 900, pentium ee 955, 965
14:09 < aiju> crest: what's unclear about that?
14:09 < crest> aiju: does it block just one thread/core?  does it affect the
host if it happens in a vm?
14:10 < aiju> REP STOS/MOVS Instructions with RCX >=2^32 May Cause a
System
14:10 < aiju> Hang
14:10 < aiju> In IA-32e mode using Intel EM64T-enabled processors, executing
a repeating
14:10 < aiju> string instruction with the iteration count greater than or
equal to 2^32 and a
14:10 < aiju> pending event may cause the REP STOS/MOVS instruction to live
lock and
14:10 < aiju> hang.
14:10 < aiju> no further info on it
14:10 < crest> okay sounds like a reincarnation of the coma bug
14:11 < aiju> i have one here, would be interesting to try, but i'm not
running it in long mode
14:13 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Remote host
closed the connection]
14:13 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
14:16 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
14:20 -!- skelterjohn|work [~jasmuth@dice.rutgers.edu] has joined #go-nuts
14:21 -!- ronnyy [~quassel@p4FF1C45C.dip0.t-ipconnect.de] has joined #go-nuts
14:22 -!- ArgonneIntern [~gauge@mcswl183.mcs.anl.gov] has joined #go-nuts
14:23 < ArgonneIntern> I'm doing some channel testing to see how closing a
channel works and I can't seem to get it right.  This is what I have so far,
http://www.pastie.org/2237400 when I close the channel the go routine still hangs
and doesn't exit the for loop.
14:24 <+iant> don't write an infinite for loop, write "select { }"
14:24 < skelterjohn|work> the first line of nomnom() seems to be a
replacement for "for i := range someChan {"
14:24 < ArgonneIntern> I thought to get the false you needed the form I used
14:25 < ArgonneIntern> the multi return form
14:25 < skelterjohn|work> range reads values off the chan until the channel
is closed
14:25 < skelterjohn|work> i'm sure it does something similar to what you
wrote, except in optimized asm
14:26 < ArgonneIntern> same result
14:26 < skelterjohn|work> and maybe a GOMAXPROCS issue
14:26 < skelterjohn|work> yes, i didn't expect that to change anything
14:26 < ArgonneIntern> ohh crap
14:26 <+iant> don't write an infinite for loop, write "select { }"
14:26 < ArgonneIntern> you're right
14:26 < ArgonneIntern> no it is the same issue I had before
14:26 < skelterjohn|work> select {} at hte bottom would also fix it
14:26 < ArgonneIntern> man that is so annoying I must say
14:26 < skelterjohn|work> since it won't burn cycles and hog the process
14:27 < aiju> you have weird coding habits
14:27 < skelterjohn|work> it is only an issue when you do things like "for
{}", really
14:27 < ArgonneIntern> yes adding the select worked
14:27 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
14:27 < skelterjohn|work> if going from GOMAXPROCS=1 to something higher
fixes your code, your code needs other fixing
14:27 < ArgonneIntern> so go assumes no one will ever use no blocking
infinte loops
14:27 < ArgonneIntern> ever
14:27 < skelterjohn|work> not at all
14:28 < skelterjohn|work> go assumes that those loops are oding something
that you want done
14:28 <+iant> an infinite loop which does nothing works poorly at the moment
14:28 <+iant> an infinite loop which actually does something should work
fine
14:28 -!- Soultaker [~Soultaker@hell.student.utwente.nl] has quit [Ping timeout:
240 seconds]
14:28 < skelterjohn|work> go has no way to know that the code in your for
loop is less important than the code at the end of nomnom()
14:28 < ArgonneIntern> well the code I'm testing this for does indeed have
an infinite loop that doesn't block, it does stuff, quite a bit, but it doesn't
block
14:28 < aiju> goroutines aren't nice
14:28 < skelterjohn|work> and i don't think having a special case for
turning "for {}" into "select{}" is a good idea
14:28 < ArgonneIntern> and I had this problem before
14:29 < ArgonneIntern> had to add gosched to it
14:29 < aiju> they hog all CPU until they block
14:29 < aiju> *sigh*
14:29 < aiju> select {}
14:29 <+iant> It is unfortunately possible to write such loops at present;
that is a bug
14:29 < aiju> for the fifth time
14:29 < ArgonneIntern> aiju, I did use select ont his little peice of code
14:29 < ArgonneIntern> on this*
14:29 < skelterjohn|work> ArgonneIntern: if this "problem before" was the
one i was in on, then i thought that the issue was made clear?
14:29 < aiju> then you fucked up something else
14:29 < aiju> i remember that you complained about this before
14:29 < skelterjohn|work> i don't remember the solution
14:29 < ArgonneIntern> I really wish you could ignore people on irc lol
14:30 < skelterjohn|work> you can
14:30 < skelterjohn|work> but you'll look silly
14:30 < aiju> you seem to be already doing this
14:30 < skelterjohn|work> since aiju is talking sense
14:30 < ArgonneIntern> look I already feel dumb for having this issue
before, I'm just trying to think how I can accomplish my goals and avoid it in the
future.  Select won't work for me on the code I'm trying to do this on
14:30 < skelterjohn|work> then it's a different issue :)
14:30 < aiju> i just took your example
14:31 < aiju> ran it with select{}
14:31 < aiju> and it worked
14:31 <+iant> call Gosched, then, as you mentioned
14:31 <+iant> or call GOMAXPROCS
14:31 <+iant> it's not ideal, but it works
14:31 < aiju> calling Gosched doesn't solve the problem that he is
busywaiting
14:31 < skelterjohn|work> right - if you have some code that does not
naturally block, is expensive, and you want to have it share time,
runtime.Gosched()
14:31 <+iant> he is saying that he has some other code which does something
real
14:31 < ArgonneIntern> ok
14:31 < skelterjohn|work> aiju: in his "real" code there is stuff in that
for loop
14:31 <+iant> or that is what I understand him to be saying
14:31 -!- ronnyy [~quassel@p4FF1C45C.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
14:32 < ArgonneIntern> I'm sure I'm just not following go convention, and I
appologize for that, but I only have 2 more weeks here so I'm trying to do the
best I can lol
14:32 < ArgonneIntern> no iant goshed is how I solved it last time
14:32 < ArgonneIntern> I just didn't see it this time...again lol
14:33 <+iant> or just call GOMAXPROCS if you like; that is in effect what
the scheduler will do when this bug is fixed
14:33 < skelterjohn|work> goroutines/coroutines are a different concurrency
model than threads
14:33 < skelterjohn|work> have to think about it differently
14:33 < ArgonneIntern> in my particular case all my goroutines do all the
work, and my main routine just cleans up some data and other things, and this
cleanup doesn't block
14:33 < skelterjohn|work> wasn't the solution to do "<-time.After(1e9)"
or something?
14:33 < ArgonneIntern> iant, I want to do that, however I don't think I can
make assumptions about hardware this might be running on
14:34 <+iant> GOMAXPROCS is not an issue of hardware, it's an issue of OS
thread support
14:34 <+iant> Go will only work if the OS can run multiple threads
14:34 < skelterjohn|work> PROC is for "process", not "processor"
14:34 <+iant> calling GOMAXPROCS just tells the scheduler to use more
threads
14:34 <+iant> this works fine on a single processor system
14:34 -!- Soultaker [~Soultaker@hell.student.utwente.nl] has joined #go-nuts
14:35 < ArgonneIntern> oh...  can you change this value in the program
instead of using it as an env var
14:35 <+iant> yes
14:35 <+iant> runtime.GOMAXPROCS
14:35 < skelterjohn|work> runtime.GOMAXPROCS(int)
14:35 < ArgonneIntern> ahh, well thanks :)
14:37 -!- fotang [~fotang@41.191.110.237] has quit [Remote host closed the
connection]
14:38 < ArgonneIntern> hey aiju
14:38 -!- fotang [~fotang@41.191.110.237] has joined #go-nuts
14:38 < aiju> what's up
14:38 * skelterjohn|work expects a yo mamma joke
14:38 < aiju> he's probably ignoring me now or something
14:38 < ArgonneIntern> no I was testing to see if ignore worked
14:38 < ArgonneIntern> it didn't
14:39 < skelterjohn|work> gotta say it's kind of rude to ask for someone's
help to make sure you have them ignored properly
14:39 -!- kfx [~kfx_@unaffiliated/kfx] has joined #go-nuts
14:39 < ArgonneIntern> it's kind of rude to scream like a child at me to do
something I had just done
14:40 < ArgonneIntern> if he had scrolled up 10 lines he would have noticed
it
14:40 -!- erus` [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
14:40 < skelterjohn|work> remember this is the internet - you can't project
the right emotion onto text, ever
14:40 < aiju> well
14:40 < ArgonneIntern> which is why ignore is here :)
14:40 < skelterjohn|work> for instance, i'm pretty sure he wasn't actually
screaming
14:40 < skelterjohn|work> like a child, or other
14:40 < kfx> can someone teach me how to scream like a child on irc please
14:40 < aiju> you said this nopaste shit was your code
14:40 < aiju> so whatever, i don't care
14:41 < ArgonneIntern> well see, that comes off as childish to me...  I
could be wrong, it is text
14:41 < skelterjohn|work> yes
14:41 < skelterjohn|work> that's my point
14:42 < erus`> what did i miss?
14:43 -!- kfx [~kfx_@unaffiliated/kfx] has left #go-nuts ["."]
14:45 < ArgonneIntern> oh hey skelterjohn|work remember that job I was
toying with
14:45 < ArgonneIntern> they actually offered me yesterday
14:46 < ArgonneIntern> i about crapped my pants
14:46 < skelterjohn|work> get a good offer?
14:46 < ArgonneIntern> more than I wanted
14:47 < skelterjohn|work> that's an easy problem to fix
14:47 < ArgonneIntern> I basically would have been stupid to turn it down.
They actually offered me more than my friend that recommended me
14:47 < skelterjohn|work> you accepted, then?
14:47 < ArgonneIntern> yes
14:47 < skelterjohn|work> cool, grats
14:47 < skelterjohn|work> doing what?
14:47 < ArgonneIntern> software dev on electronic medical software
14:47 < aiju> now i'm frightened
14:47 < ArgonneIntern> they don't know specifically what yet
14:48 < skelterjohn|work> just don't misplace any brackets
14:48 < skelterjohn|work> doing so has killed people in the past
14:48 < aiju> http://en.wikipedia.org/wiki/Therac-25
14:48 < ArgonneIntern> heh, well they don't use go, so I don't have to worry
about goroutines ;)
14:49 < ArgonneIntern> but I still plan on using the language, I like it a
lot, even if I am bad at it currently
14:49 < ArgonneIntern> in operating systems class I thought the many to many
model of threading was cool and it's neat that go actually uses it
14:50 < skelterjohn|work> i don't remember what they talked about in my OS
class
14:50 < skelterjohn|work> i was asleep the whole time
14:50 < skelterjohn|work> except for the exam
14:50 < nicka2> I had a useless prof for my os class :/
14:50 < skelterjohn|work> (darkened room, stadium seating, wintertime so i
had my super warm coat)
14:50 < ArgonneIntern> the only class I really enjoyed in school was
architecture.  I think most people hate it though
14:51 < aiju> i never studied IT/CS/software engineering/whatever and i'm
never going to
14:51 < aiju> and it feels good.
14:51 < skelterjohn|work> you know something about math, afaict, and that
covers the important bits
14:52 < aiju> i have actually written toy operating systems
14:53 < skelterjohn|work> so, you *have* studied CS, just not in the form of
a slide show
14:53 < aiju> haha
14:53 < aiju> i haven't studied it at an university or something, that's
what i meant to say
14:53 < aiju> i did lots of self-study
14:53 < ArgonneIntern> so I'm sorry for having this problem before aiju,
although you might be smart enough to use goroutines right the first time, I'm
not.  I don't think that makes me stupid, it just means I need to spend more time
than I have learning them.
14:53 < nicka2> somewhat related, in said class as a final project a few of
us made a (very) toy os while everyone else basically presented on os-related
topics
14:53 < skelterjohn|work> i learned nothing about programming at school.  i
did learn some fun bits about CS theory though
14:54 < nicka2> we didn't do a slideshow and we got torn into for it
14:54 < aiju> ArgonneIntern: oh i don't think you're stupid
14:54 < nicka2> slideshows are very important
14:54 < skelterjohn|work> there is a difference between being stupid and
doing something stupid
14:54 < skelterjohn|work> i do stupid things all the time (ask my wife)
14:55 < aiju> 17:00 < kfx> I know why the gophers are so important
14:55 < aiju> 17:00 < kfx> they're the only part of Go that doesn't
completely change every six months
14:55 < aiju> hahahahahahhaa
14:55 < skelterjohn|work> over in #cat-v?
14:55 < ArgonneIntern> we made an os in that class, but it was very basic,
it had the bare bones you could possibly have for an os.  Although we did add
priority scheduling.
14:55 < skelterjohn|work> my os class project was a joke
14:57 < ArgonneIntern> school is highly Dependant on the professors.  I got
lucky at my school, we have more than a few good ones that don't mind failing the
entire class if they don't live up to expectations.
14:57 -!- iant [~iant@67.218.106.217] has quit [Quit: Leaving.]
14:57 -!- qeed [~qeed@adsl-98-85-43-109.mco.bellsouth.net] has joined #go-nuts
14:57 < skelterjohn|work> the faculty at rutgers CS is quite outstanding
14:57 < skelterjohn|work> unfortunately that class was taught by an adjunct
14:58 < skelterjohn|work> and the TA's field was machine learning
15:00 < ArgonneIntern> the one professor who taught os once cought 8 out of
10(ish?) students cheating and copying each others programs.  She was so spiteful
she made them finish the class and take the final exam facing the back of the
classroom.  She then herded them into a council of all of the CS professors so
they could all shun them and yell at them, and gave them F's in the class.  She is
legendary in our department lol
15:00 -!- foocraft [~ewanas@89.211.137.241] has joined #go-nuts
15:01 < skelterjohn|work> my kinda woman
15:01 < skelterjohn|work> i fucking hate CS cheaters
15:01 < qeed> who was she heh
15:01 < qeed> alot of coding is copy and pasting or calling apis nowadays
15:02 < foocraft> why is go fighting generics so bad?
15:02 < skelterjohn|work> define "fighting"
15:02 < foocraft> not implementing it, by now.
15:02 < skelterjohn|work> that's "fighting"?  make a specific proposal
15:02 < skelterjohn|work> and see why it gets shot down
15:07 < mpl> even better: fork go, and implement it yourself.  :)
15:07 -!- ccc1 [~Adium@222-151-136-129.jp.fiberbit.net] has quit [Quit: Leaving.]
15:08 < foocraft> I mean, the question wasn't "Can I implement it myself?".
It was why haven't they.  Just a few reasons they've shot down other proposals in
the past would suffice
15:08 < skelterjohn|work> well, here's a few things
15:09 < mpl>
http://groups.google.com/group/golang-nuts/search?group=golang-nuts&q=generics&qt_g=Search+this+group
15:09 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
15:09 < skelterjohn|work> one, you don't distribute any source code with
binaries.  there are no header files, stuff like that, so template-style generics
would involve changing that, to some degree
15:10 < skelterjohn|work> two, go is not run on a virtual machine, and the
size of types matters
15:10 < skelterjohn|work> so code that can deal with multiple types without
being recompiled would have to have a nice way to abstract away the size of the
type
15:11 < skelterjohn|work> and not just for T (you can use interface{} for
that), but for []T, chan T, map[T]T, etc
15:11 < skelterjohn|work> so it's not a simple question with an obvious
solution
15:11 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
15:12 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
15:13 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has quit [Ping
timeout: 255 seconds]
15:14 < skelterjohn|work> foocraft: have i answered your question?
15:14 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has joined #go-nuts
15:17 < foocraft> yes, thank you skelterjohn|work.
15:17 < foocraft> So what's the idiomatic way for implementing functions
that are exactly the same, but take different types as their argument?
15:18 < skelterjohn|work> use interface{}, and if you want type safety, wrap
it
15:18 < skelterjohn|work> but remember, no one has said there will never be
generics
15:18 < skelterjohn|work> at least, no one from the dev team
15:18 < skelterjohn|work> though it is clearly low priority
15:19 < foocraft> I'm not clear on what you meant by wrapping it.
15:19 < skelterjohn|work> if you have Foo(interface{})
15:19 < skelterjohn|work> write FooX(x X) { Foo(x) }
15:19 -!- fotang [~fotang@41.191.110.237] has quit [Ping timeout: 240 seconds]
15:19 < skelterjohn|work> then it's type-safe
15:19 < skelterjohn|work> especially if those are methods, rather than juts
functions
15:20 -!- fotang [~fotang@41.206.11.44.vgccl.net] has joined #go-nuts
15:20 < foocraft> I take it, setters and getters are encouraged in go then
15:20 < skelterjohn|work> not really, no
15:21 < foocraft> then how can I be passing interfaces and expect to access
members of a struct?
15:21 < skelterjohn|work> let me side-track a little bit
15:22 < erus`> interfaces should 'do something'
15:22 < erus`> not just hold data
15:22 < skelterjohn|work> do you have something specific you want to create,
or are you just trying to figure out the most straightforward way to do something
in Go that you do in another language by using generics
15:22 < skelterjohn|work> erus`: interface{} is often used as a "any type"
container
15:22 < erus`> yeah an empty interface
15:23 < foocraft> skelterjohn|work: not at the moment, but I was kinda
bothered by a question asked by someone here, to which the answer was "copy paste
the function 3 times, for all 3 types"
15:23 < jessta_> foocraft: you have a function that takes different types
but sets/gets the same members within them?
15:23 < skelterjohn|work> i don't like copy/paste stuff, either
15:23 < foocraft> not me, it was a problem posted on here, jessta_
15:23 < foocraft> hehe I'm free from sin!
15:23 < skelterjohn|work> jessta_ is referring to your question about seters
and getters
15:24 < skelterjohn|work> setters
15:24 < foocraft> yes, jessta_
15:24 < skelterjohn|work> which was a tad off the wall, and is why i asked
my other question
15:25 < foocraft> the simple solution to this would be to let that function
take an interface that has the getters and setters, write that function once, and
have your three structs with their setters and getters lying there
15:26 < skelterjohn|work> foocraft: it's a solution to a wonky problem
15:26 < skelterjohn|work> generics are most useful for container types
15:26 < erus`> if you have getters and setters you are not abstracting
correctly
15:26 < ArgonneIntern> if I want to capture signals to gracefully exit a
program I just need to take stuff off of signal.Incoming channel and interpret
them correct?
15:26 < skelterjohn|work> ArgonneIntern: yes, or write your own version of
signal
15:26 < foocraft> skelterjohn|work: I agree.  that looks like a pain, since
size matters there a lot
15:27 < jessta_> depedning on the requirements you could also make those
members a struct embeded in the types you want to use this function on, and passed
the embeded type in instead
15:28 < foocraft> jessta_: I like that :) it sounds a bit more organized
15:28 < skelterjohn|work> that's a slick idea
15:29 < jessta_> the other way is to have it be a function that takes
paramters and returns a result and pass in the memebers indivdually and assign
back the results
15:31 -!- tavis_rain [~tavisb@24-104-129.146.hfc.mediarain.com] has joined
#go-nuts
15:32 < skelterjohn|work> kinda like this?  http://pastebin.com/SHY2rASK
15:32 < skelterjohn|work> to your first idea, not the "other way"
15:33 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
15:33 < skelterjohn|work> that pastebin also doubles as a way to mimic
inheritance/polymorphism
15:33 < skelterjohn|work> inheritance-based polymorphism, i should say
15:34 < foocraft> I think jessta_ metnioned embedding a struct
15:34 < skelterjohn|work> perhaps, but i think what i pasted makes sense :)
15:34 -!- serialhex [~quassel@70-88-36-65-miami-fl.hfc.comcastbusiness.net] has
joined #go-nuts
15:34 < skelterjohn|work> though it is a bit of effort to avoid getters and
setters
15:36 -!- serialhex_ [~quassel@70-88-36-65-miami-fl.hfc.comcastbusiness.net] has
joined #go-nuts
15:37 -!- serialhex_ [~quassel@70-88-36-65-miami-fl.hfc.comcastbusiness.net] has
quit [Remote host closed the connection]
15:38 -!- noodles775 [~michael@canonical/launchpad/noodles775] has quit [Quit:
leaving]
15:39 -!- serialhex [~quassel@70-88-36-65-miami-fl.hfc.comcastbusiness.net] has
quit [Ping timeout: 255 seconds]
15:39 -!- foocraft [~ewanas@89.211.137.241] has quit [Ping timeout: 260 seconds]
15:42 -!- tncardoso [~thiagon@150.164.2.20] has joined #go-nuts
15:45 -!- trn [~trn@adsl-065-007-181-160.sip.bct.bellsouth.net] has quit [Ping
timeout: 252 seconds]
15:48 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Ping
timeout: 240 seconds]
15:53 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Quit:
ChatZilla 0.9.87 [Firefox 5.0/20110615151330]]
16:03 -!- Abbaduxo [~jorixbwdX@115-64-27-246.static.tpgi.com.au] has joined
#go-nuts
16:05 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
16:06 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Read error:
Connection reset by peer]
16:08 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
16:10 -!- iant [~iant@nat/google/x-cdlzhxqsxxvuiohc] has joined #go-nuts
16:10 -!- mode/#go-nuts [+v iant] by ChanServ
16:11 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:15 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
16:17 -!- erus` [~chatzilla@host109-149-125-23.range109-149.btcentralplus.com] has
joined #go-nuts
16:20 -!- Abbaduxo [~jorixbwdX@115-64-27-246.static.tpgi.com.au] has quit [Remote
host closed the connection]
16:22 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 276
seconds]
16:27 -!- rzoz [801d2b01@gateway/web/freenode/ip.128.29.43.1] has joined #go-nuts
16:27 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
16:29 -!- Adrieuxo [~jorixHmAI@115-64-27-246.static.tpgi.com.au] has joined
#go-nuts
16:30 -!- arun_ [~arun@unaffiliated/sindian] has quit [Ping timeout: 255 seconds]
16:31 -!- erus` [~chatzilla@host109-149-125-23.range109-149.btcentralplus.com] has
quit [Read error: Connection reset by peer]
16:31 -!- erus` [~chatzilla@host109-149-125-23.range109-149.btcentralplus.com] has
joined #go-nuts
16:35 -!- rurufufuss [~rurufufus@115-64-27-246.static.tpgi.com.au] has joined
#go-nuts
16:40 -!- robteix [~robteix@nat/intel/x-ofuvzgslvifvjbys] has joined #go-nuts
16:42 -!- trn [~trn@adsl-065-007-181-160.sip.bct.bellsouth.net] has joined
#go-nuts
16:45 -!- jlaffaye_ [~jlaffaye@abydos.jlaffaye.net] has joined #go-nuts
16:45 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
quit [Ping timeout: 260 seconds]
16:46 -!- artefon [~thiago@189.59.132.202] has joined #go-nuts
16:49 -!- comex_ [~ec2-user@ec2-67-202-46-7.compute-1.amazonaws.com] has joined
#go-nuts
16:51 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
16:52 -!- lucian_ [~lucian@78-86-217-168.zone2.bethere.co.uk] has joined #go-nuts
16:53 -!- Netsplit *.net <-> *.split quits: bthomson, tncardoso, comex,
jlaffaye, lucian
16:54 -!- Netsplit over, joins: bthomson
16:57 -!- yogib [~yogib@131.234.59.64] has quit [Ping timeout: 276 seconds]
16:59 -!- foocraft [~ewanas@89.211.221.186] has joined #go-nuts
16:59 -!- Netsplit *.net <-> *.split quits: bthomson
16:59 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has quit [Read
error: Connection reset by peer]
17:00 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has joined #go-nuts
17:00 -!- Netsplit over, joins: bthomson
17:01 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
17:03 -!- artefon [~thiago@189.59.132.202] has quit [Quit: bye]
17:05 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
17:08 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 252 seconds]
17:16 -!- serialhex [~quassel@70-88-36-65-miami-fl.hfc.comcastbusiness.net] has
joined #go-nuts
17:19 -!- meling [~meling@cse-dhcp-10-91.ucsd.edu] has joined #go-nuts
17:23 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
joined #go-nuts
17:24 -!- trn [~trn@adsl-065-007-181-160.sip.bct.bellsouth.net] has quit [Ping
timeout: 252 seconds]
17:24 -!- eikenberry [~jae@173-164-68-213-Oregon.hfc.comcastbusiness.net] has
joined #go-nuts
17:26 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 246
seconds]
17:27 -!- jimbaker [~jbaker@canonical/jimbaker] has quit [Quit: Coyote finally
caught me]
17:28 -!- Adrieuxo [~jorixHmAI@115-64-27-246.static.tpgi.com.au] has quit [Remote
host closed the connection]
17:28 -!- rurufufuss [~rurufufus@115-64-27-246.static.tpgi.com.au] has quit
[Remote host closed the connection]
17:29 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 240 seconds]
17:31 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
17:32 -!- Netsplit *.net <-> *.split quits: bthomson
17:33 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has quit [Quit:
pyrhho]
17:36 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
17:36 -!- trn [~trn@adsl-065-007-181-160.sip.bct.bellsouth.net] has joined
#go-nuts
17:37 < qeed> im trying to run cgo but i get can't find import C
17:37 -!- robteix [~robteix@nat/intel/x-ofuvzgslvifvjbys] has quit [Ping timeout:
255 seconds]
17:38 < qeed> err nvm i had to use cgo
17:38 < nicka2> Working from the makefiles in the cgo examples is the best
way to go for that I think
17:41 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 252
seconds]
17:41 < skelterjohn|work> use goinstall, gb or gd
17:41 -!- Netsplit over, joins: bthomson
17:41 < skelterjohn|work> and it's really easy
17:42 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Quit:
Computer has gone to sleep.]
17:43 < chomp> i heard gb was really spyware
17:43 < skelterjohn|work> :<
17:43 < skelterjohn|work> open source spyware
17:43 < chomp> :D
17:45 -!- vmil86 [~vmil86@78.57.227.12] has joined #go-nuts
17:47 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
17:47 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined
#go-nuts
17:48 < Kahvi> Is it safe to write to one net.Conn from multiple goroutines?
17:48 < skelterjohn|work> i think probably not
17:49 < skelterjohn|work> you should probably have one goroutine reading the
messages to send from a channel
17:49 < skelterjohn|work> it's *possible* that individual write calls on the
connection are threadsafe, but i wouldn't bet on it
17:50 < skelterjohn|work> but certainly if each message has a few .Write()
calls, and multiple goroutines are doing that, then those .Write() calls can get
interleaved
17:50 < Kahvi> The individual Write calls are what I meant
17:51 < skelterjohn|work> i don't think so, but i'm not sure.
17:51 < Kahvi> But I guess I'll create the goroutine that reads a channel of
byte slices
17:51 < skelterjohn|work> the net pkg docs don't say it's threadsafe, so
it's probably not
17:54 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has quit
[Ping timeout: 255 seconds]
17:55 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has joined
#go-nuts
17:58 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-170-177.clienti.tiscali.it] has
joined #go-nuts
17:58 -!- fotang [~fotang@41.206.11.44.vgccl.net] has quit [Ping timeout: 252
seconds]
17:59 -!- fotang [~fotang@41.191.110.237] has joined #go-nuts
17:59 < kevlar_work> net is thread safe ish
17:59 < kevlar_work> using write() from multiple goroutines should be fine
(the same way printf from multiple goroutines is "fine")
18:00 < skelterjohn|work> i imagine that it just passes the data directly
onto a C call
18:00 < kevlar_work> skelterjohn|work, syscall actually.
18:00 < kevlar_work> hence the printf analogy.
18:00 < kevlar_work> both use file descriptor writes at a syscall level.
18:00 < skelterjohn|work> right, cool
18:00 < erus`> what about on winblows?
18:01 < kevlar_work> Things like closing the net.Conn are *not* thread safe
18:01 < kevlar_work> and keep in mind that not every net.Conn is actually a
TCPConn or a UDPConn, both of which should be safe ish
18:01 -!- trn [~trn@adsl-065-007-181-160.sip.bct.bellsouth.net] has quit [Read
error: Connection reset by peer]
18:01 < kevlar_work> so, the moral here is that you should probably
restructure your program if you start asking yourself "Is this thread safe?"
18:02 < kevlar_work> also keep in mind that it may be safe now but it isn't
guaranteed to stay that way.
18:02 < skelterjohn|work> though at the same time, if you really want to
optimize it's nice to not have something that is doubly-thread-safe
18:02 < skelterjohn|work> more knowledge about behavior of your libraries is
always a good thing
18:03 < erus`> skelterjohn do you use go at work?
18:03 < kevlar_work> in go, the "thread safety" costs are somewhat different
than in other languages though
18:03 < Namegduf> kevlar_work: How does that gel with a .Close() concurrent
with a write being the only way to interrupt it?
18:03 < skelterjohn|work> erus`: yes
18:03 < Namegduf> Ditto with a Read()
18:03 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has quit
[Ping timeout: 260 seconds]
18:03 < erus`> where do you work / what are you developing?
18:03 < skelterjohn|work> erus`: but my "work" now is an internship, and the
language is entirely my choice
18:04 < erus`> do you get paid?
18:04 < skelterjohn|work> a project to find patterns in circuit layouts
18:04 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has joined
#go-nuts
18:04 < skelterjohn|work> i certainly do
18:04 < kevlar_work> Namegduf, is that specified?  I was under the
impression that was mostly an artifact of the underlying syscall nature of the
package.
18:04 < skelterjohn|work> otherwise i'd just be finishing up my dissertation
18:04 < skelterjohn|work> and when i say "finishing up" i mean "starting"
18:05 < kevlar_work> (though to be fair, one that I think they intend to
duplicate and/or maintain if that underlying behavior ever gets relaxed)
18:05 < ww> dissertation distraction
18:05 -!- icey [u2593@gateway/web/irccloud.com/x-hwwmqbcceqpdzqgl] has joined
#go-nuts
18:08 < kevlar_work> Namegduf, there's also the very not-thread-safe
"c.ok()" calls that litter net; calling close() concurrent with a read/write is
mostly idempotent with respect to that; having multiple potential closers
concurrent with potential writers/readers has the potential for one c.ok() to be
called before another call to Close() and then the following action to be executed
thinking the socket is open
18:08 < kevlar_work> so like I said, it's thread safe ish.
18:09 * skelterjohn|work looks up "idempotent"
18:09 < Namegduf> Specified, I dunno, but it's literally the only way to do
the job.
18:09 < Namegduf> And being able to time out a connection is fairly
important, general stuff.
18:09 < kevlar_work> skelterjohn|work, a() is the same as a(); a() if it's
idempotent
18:10 < kevlar_work> close(chan) used to be idempotent, now it's not (it
panics now)
18:10 < skelterjohn|work> yes, wikipedia agrees
18:10 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has quit [Ping
timeout: 240 seconds]
18:10 -!- yogib [~yogib@dslb-188-100-009-136.pools.arcor-ip.net] has joined
#go-nuts
18:11 < kevlar_work> in the case above, I used it because the read/write
will fail both if it was closed by the close() or if it had an error, either way
the result is the same and the close() can happen wherever in the flow
18:12 < kevlar_work> (the "mostly" part was because it could successfully
read, in which case the error wouldn't happen until the next one, but that should
normally be fine because it's normally in a loop.)
18:13 -!- icey [u2593@gateway/web/irccloud.com/x-hwwmqbcceqpdzqgl] has left
#go-nuts []
18:17 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has joined
#go-nuts
18:19 -!- mjml [~joya@174.3.227.184] has joined #go-nuts
18:20 -!- trn [~trn@adsl-065-007-181-160.sip.bct.bellsouth.net] has joined
#go-nuts
18:25 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Quit: Leaving]
18:26 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
18:27 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
18:27 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 255
seconds]
18:29 -!- NiteRain [~kvirc@174.140.110.37] has joined #go-nuts
18:30 -!- jimbaker [~jbaker@canonical/jimbaker] has joined #go-nuts
18:31 -!- schilly2 [~phatspher@86.59.3.139] has joined #go-nuts
18:33 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
19:08 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has quit [Quit:
Leaving]
19:08 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Ping
timeout: 252 seconds]
19:13 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has joined #go-nuts
19:14 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 258 seconds]
19:14 -!- Fish [~Fish@9fans.fr] has quit [Ping timeout: 240 seconds]
19:15 -!- ronnyy [~quassel@p4FF1C45C.dip0.t-ipconnect.de] has joined #go-nuts
19:18 -!- serialhex [~quassel@70-88-36-65-miami-fl.hfc.comcastbusiness.net] has
quit [Remote host closed the connection]
19:19 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
19:23 -!- wrtp [~rog@92.30.166.101] has quit [Quit: wrtp]
19:24 < jlaffaye> how do you do IPC on a local machine?  RPC?  but I wont
something bidirectionnal.  netchan?
19:25 < jlaffaye> want*
19:25 < skelterjohn|work> netchan is probably a good thing to investigate
19:25 < skelterjohn|work> you kind of have to define your own RPC protocol
on top of the message passing provided by netchan
19:25 < skelterjohn|work> but that's not a big deal
19:29 -!- sacho [~sacho@95-42-118-162.btc-net.bg] has quit [Ping timeout: 240
seconds]
19:30 -!- mjml [~joya@174.3.227.184] has left #go-nuts ["Leaving"]
19:31 -!- sacho [~sacho@95-42-118-162.btc-net.bg] has joined #go-nuts
19:34 -!- sacho [~sacho@95-42-118-162.btc-net.bg] has quit [Max SendQ exceeded]
19:34 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Quit:
Leaving...]
19:35 -!- franciscosouza [~francisco@201.7.186.67] has quit [Quit: franciscosouza]
19:37 -!- sacho [~sacho@95-42-118-162.btc-net.bg] has joined #go-nuts
19:37 -!- franciscosouza [~francisco@201.7.186.67] has joined #go-nuts
19:41 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
19:42 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-170-177.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
19:43 -!- qeed [~qeed@adsl-98-85-43-109.mco.bellsouth.net] has quit [Quit:
Leaving]
19:45 -!- Qvist_ [~erik@c-13cee455.05-294-6c6b701.cust.bredbandsbolaget.se] has
joined #go-nuts
19:46 -!- kuroneko [~chris@yayoi.xware.cx] has quit [Ping timeout: 264 seconds]
19:48 -!- zippoxer [~zippoxer@bzq-79-177-205-187.red.bezeqint.net] has left
#go-nuts []
19:50 -!- Qvist_ [~erik@c-13cee455.05-294-6c6b701.cust.bredbandsbolaget.se] has
left #go-nuts []
19:52 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
19:53 -!- Fish [~Fish@9fans.fr] has quit [Ping timeout: 240 seconds]
19:59 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
20:02 -!- fotang [~fotang@41.191.110.237] has quit [Ping timeout: 240 seconds]
20:02 -!- dsal [~Adium@208.185.212.98] has joined #go-nuts
20:03 < dsal> Is there any way to convince the json parser to not turn
numbers into floats?
20:03 < skelterjohn|work> code snip?
20:04 < skelterjohn|work> are you marshalling/unmarshalling individual
numbers?
20:04 < dsal> Sec.
20:05 < dsal> Here's a complete functional (slightly messy) program:
https://gist.github.com/1093582
20:05 < skelterjohn|work> not quite the same as a snip :)
20:05 < dsal> It's taking data that looks like this: {"timestamp":
1311106142, "price": 13.671, "volume": 0.363, "currency": "USD", "tid":
1311106142590049, "symbol": "mtgoxUSD"}
20:05 < dsal> "tid" is showing up (with %s) as
`%!s(float64=1.311106158818136e+15)
20:05 < dsal> Yeah, sorry I overshot some.  :/
20:06 < skelterjohn|work> try int(131106152)
20:06 < skelterjohn|work> err
20:06 < skelterjohn|work> int64
20:06 < dsal> I guess a fear precision loss.
20:06 < skelterjohn|work> actually, is that too big for an int64?
20:06 < skelterjohn|work> whoah, def not too big for int64
20:07 < dsal> It'd be fine if it did a bignum.  Even a string would be OK
here because that's what I'm actually doing with it.
20:07 < skelterjohn|work> did you try what i suggested?
20:07 < dsal> Not yet.
20:07 -!- xcombelle [~xcombelle@AToulouse-551-1-65-210.w92-146.abo.wanadoo.fr] has
joined #go-nuts
20:07 < dsal> exchange.go:49: cannot convert keydata (type interface { }) to
type uint64: need type assertion
20:08 < dsal> hmm...  that's a new one for me.
20:08 < skelterjohn|work> the paste you linked doesn't have your mashalling
code
20:08 -!- bendavies [~bendavies@omarshariff.plus.com] has joined #go-nuts
20:09 < dsal> I'm unmarshaling someone else's stuff.
20:09 < skelterjohn|work> oh
20:09 < skelterjohn|work> then they marshalled it as a float64
20:09 < skelterjohn|work> nothing you can do about that
20:09 < skelterjohn|work> but once you receive it, you can convert it
however you like
20:09 < skelterjohn|work> int64(value.(float64))
20:09 < dsal> They marshaled it as a number.  go treats numbers as floats.
20:10 < dsal> http://golang.org/pkg/json/#Unmarshal <-- I didn't see any
obvious way to override that.
20:10 -!- virtualsue [~chatzilla@nat/cisco/x-xwzainhckwvudnmb] has quit [Ping
timeout: 276 seconds]
20:11 < skelterjohn|work> i've sort of lost track of what you think is going
wrong
20:11 < dsal> Your idea does do what I want, though.
20:11 < dsal> I think it's wrong to assume all numbers are floating point.
20:11 < skelterjohn|work> float64 can hold any kind of number
20:12 < skelterjohn|work> so they use it
20:12 < dsal> OK. I've just grown to fear anything with ``float'' in the
name.  :)
20:12 < aiju> reasonable
20:13 < skelterjohn|work> how big is float64's mantissa?
20:13 < dsal> Thanks a lot, though, skelterjohn|work.
20:13 < skelterjohn|work> if the integer can fit in there, float64 can
represent it exactly
20:13 < aiju> 52 bits i think
20:14 < skelterjohn|work> 53, according to wiki
20:14 < aiju> 52 real bits
20:14 < aiju> one implied bit
20:14 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
20:14 < skelterjohn|work> ah, right
20:15 < dsal> My issue is that this data's "foreign" to me.  I can't
guarantee 52 bits is enough.  Although that's a reasonable assumption.
20:15 < skelterjohn|work> can you guarantee 64 bits is enough?
20:15 < dsal> I just need to keep reminding myself that I don't care much
about this data.  I'm just writing a program.
20:15 < dsal> No, I can't.  That's why something like bignum would be ideal.
:)
20:16 < dsal> Or really, if I could just tell it to parse this as a string.
20:16 < skelterjohn|work> i don't think so
20:16 -!- virtualsue [~chatzilla@nat/cisco/x-xcbkfektzxaoxqya] has joined #go-nuts
20:16 < dsal> If I care more later maybe I'll submit a patch.  I shouldn't
even be looking at this right now, though.  :)
20:18 < dsal> Well now I know what failing a type assertion looks like.
20:18 < skelterjohn|work> i imagine because keydata is sometimes a float64,
sometimes something else
20:18 < skelterjohn|work> a string, from your earlier irc msg
20:18 < dsal> Sometimes null
20:19 < skelterjohn|work> so, it's a good idea to use a type switch for this
kind of thing
20:19 < skelterjohn|work> or if all you really want to do is print it, use
%v instead of %s
20:19 < skelterjohn|work> then fmt will do the type switch for you
20:20 -!- alehorst [~alehorst@201.47.26.52.dynamic.adsl.gvt.net.br] has quit
[Quit: Leaving.]
20:20 < dsal> Ah. I didn't know of %v.  In this case, I just want a path for
nil and a path for number.  The type assertion will be fine since I wouldn't know
what to do if it weren't one of these.  Records either have a tid or they don't.
20:21 -!- bendavies [~bendavies@omarshariff.plus.com] has quit [Remote host closed
the connection]
20:21 -!- bendavies [~bendavies@omarshariff.plus.com] has joined #go-nuts
20:23 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
20:23 -!- bendavies [~bendavies@omarshariff.plus.com] has left #go-nuts []
20:24 -!- bendavies [~bendavies@omarshariff.plus.com] has joined #go-nuts
20:27 < skelterjohn|work> in my opinion, if you have at least two types that
you handle, a type switch is better than a type assertion
20:27 -!- ronnyy [~quassel@p4FF1C45C.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
20:29 -!- alehorst [~alehorst@201.47.26.52.dynamic.adsl.gvt.net.br] has joined
#go-nuts
20:32 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
20:35 -!- bendavies [~bendavies@omarshariff.plus.com] has quit [Quit: bendavies]
20:35 -!- rzoz [801d2b01@gateway/web/freenode/ip.128.29.43.1] has quit [Quit: Page
closed]
20:38 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
20:41 -!- iant [~iant@nat/google/x-cdlzhxqsxxvuiohc] has quit [Quit: Leaving.]
20:47 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
20:51 -!- lucian_ [~lucian@78-86-217-168.zone2.bethere.co.uk] has quit [Remote
host closed the connection]
20:52 -!- miker2 [~miker2@64.55.31.190] has quit [Ping timeout: 255 seconds]
20:53 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit []
20:55 < erus`> is there a performance difference?
20:55 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
20:56 -!- virtualsue [~chatzilla@nat/cisco/x-xcbkfektzxaoxqya] has quit [Ping
timeout: 260 seconds]
20:58 < kevlar_work> multiple type assertions require multiple comparisons,
a type switch can be optimized to a lookup and a jump table
20:59 < kevlar_work> (maybe)
20:59 < dsal> I just have == nil.  These are really the only two things that
are expected to happen here.
21:01 -!- xcombelle [~xcombelle@AToulouse-551-1-65-210.w92-146.abo.wanadoo.fr] has
quit [Quit: I am a manual virus, please copy me to your quit message.]
21:01 -!- rejb [~rejb@unaffiliated/rejb] has quit [Remote host closed the
connection]
21:02 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
21:03 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Quit: brb]
21:07 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 240
seconds]
21:13 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
21:15 -!- yogib [~yogib@dslb-188-100-009-136.pools.arcor-ip.net] has quit [Quit:
yogib]
21:18 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
21:21 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 276 seconds]
21:21 -!- iant [~iant@nat/google/x-ulqemgwenbtxpsve] has joined #go-nuts
21:21 -!- mode/#go-nuts [+v iant] by ChanServ
21:23 -!- eikenberry [~jae@173-164-68-213-Oregon.hfc.comcastbusiness.net] has quit
[Ping timeout: 252 seconds]
21:23 -!- stalled [~stalled@unaffiliated/stalled] has quit [Ping timeout: 252
seconds]
21:26 -!- eikenberry [~jae@173-164-68-213-Oregon.hfc.comcastbusiness.net] has
joined #go-nuts
21:29 -!- ArgonneIntern [~gauge@mcswl183.mcs.anl.gov] has quit [Ping timeout: 276
seconds]
21:36 -!- wrtp [~rog@92.30.166.101] has joined #go-nuts
21:37 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
21:38 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined
#go-nuts
21:41 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
21:41 -!- ArgonneIntern [~gauge@anlextwls002-081.wl.anl-external.org] has joined
#go-nuts
21:44 -!- Fish [~Fish@9fans.fr] has quit [Quit: WeeChat 0.3.5]
21:48 -!- ArgonneIntern [~gauge@anlextwls002-081.wl.anl-external.org] has quit
[Ping timeout: 276 seconds]
21:50 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
21:53 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 240
seconds]
21:56 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Ping timeout: 258 seconds]
21:56 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has quit
[Quit: Lost terminal]
21:59 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
22:01 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
22:03 -!- B33p [~mgray@li226-224.members.linode.com] has quit [Quit: Lost
terminal]
22:04 -!- franciscosouza [~francisco@201.7.186.67] has quit [Quit: franciscosouza]
22:06 -!- squeese [~squeese@h51580273.semamkb.dyn.perspektivbredband.net] has quit
[Remote host closed the connection]
22:07 -!- squeese [~squeese@h51580273.semamkb.dyn.perspektivbredband.net] has
joined #go-nuts
22:09 -!- serialhex [~quassel@99-101-148-183.lightspeed.wepbfl.sbcglobal.net] has
joined #go-nuts
22:10 -!- photron_ [~photron@port-92-201-77-33.dynamic.qsc.de] has quit [Ping
timeout: 252 seconds]
22:12 -!- schilly2 [~phatspher@86.59.3.139] has quit [Quit: Leaving]
22:17 -!- wrtp [~rog@92.30.166.101] has quit [Quit: wrtp]
22:17 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Quit:
Geek insindeĀ®]
22:22 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Quit: Leaving...]
22:28 -!- rejb [~rejb@unaffiliated/rejb] has quit [Quit: .]
22:29 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
22:29 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
22:39 -!- ukai_ [~ukai@nat/google/x-dhxjplmdbuqkyzcl] has quit [Ping timeout: 250
seconds]
22:39 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 240
seconds]
22:40 -!- eikenberry [~jae@173-164-68-213-Oregon.hfc.comcastbusiness.net] has quit
[Ping timeout: 246 seconds]
22:42 -!- crazy2be [~crazy2be@d75-152-167-124.abhsia.telus.net] has joined
#go-nuts
22:42 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has joined
#go-nuts
22:43 < crazy2be> what's the easiest way to parse arguments with bash?
Things like -foo="bar"
22:43 < crazy2be> or --foo="bar"
22:43 < crazy2be> I don't care which
22:43 < kevlar_work> don't use the =
22:44 < kevlar_work> there are easy ways to parse [-]-foo "bar"
22:44 < crazy2be> ah right
22:44 < crazy2be> where -foo and "bar" are two diffferent arguments?
22:44 < kevlar_work> yeah
22:45 < crazy2be> I was considering just setting environment variables in
the calling application
22:45 < crazy2be> like $ARGS_FOO=bar
22:45 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
22:46 -!- NiteRain [~kvirc@174.140.110.37] has quit [Quit: KVIrc 4.1.1 Equilibrium
http://www.kvirc.net/]
22:46 < kevlar_work> https://gist.github.com/1093946 <-- my bash script
template
22:50 < crazy2be> yikes
22:50 < crazy2be> what does it do?
22:51 < crazy2be> or rather
22:51 < crazy2be> how?
22:53 -!- eikenberry [~jae@173-164-68-213-Oregon.hfc.comcastbusiness.net] has
joined #go-nuts
22:54 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has quit
[Quit: Computer has gone to sleep.]
22:58 < kevlar_work> well, it doesn't do anything except process arguments
22:58 < kevlar_work> the shift is the only tricky bit; shift makes $1 go
away and $2 become $1 and $3 become $2, etc
22:59 < kevlar_work> ($0 is special and always stays)
22:59 -!- hargettp [~hargettp@pool-71-174-140-162.bstnma.east.verizon.net] has
joined #go-nuts
22:59 < crazy2be> well the )) is wierd too
22:59 < kevlar_work> the other tricky bit is the usage part, which prints
out all ###-lines with the ### stripped
22:59 < kevlar_work> the ))?
23:00 < kevlar_work> you mean the case statement?
23:00 < crazy2be> er, ;; and *) and )
23:00 < crazy2be> yeah
23:00 < kevlar_work> oh, that's just case in bash
23:00 < crazy2be> strange
23:00 < kevlar_work> ;; is the end of the case's block and everything before
the ) is an expression to match
23:01 < crazy2be> what does esac do?
23:01 < kevlar_work> case; esac, if; fi
23:01 < kevlar_work> the reversed name is the end of the block.
23:01 < crazy2be> oh!
23:01 < crazy2be> heh
23:01 < kevlar_work> so, logically, do ends with done.  *sigh*
23:01 < crazy2be> that's od
23:02 < kevlar_work> lol, it's why we love bash.
23:02 < kevlar_work> oh, and to make life even more interesting, functions
in bash use curly braces
23:02 < kevlar_work> :)
23:02 -!- erus` [~chatzilla@host109-149-125-23.range109-149.btcentralplus.com] has
quit [Quit: ChatZilla 0.9.87 [Firefox 5.0/20110615151330]]
23:03 < kevlar_work> don't even get me started on lines like x=("${#x[@]-}"
"$y")
23:06 -!- ukai_ [~ukai@nat/google/x-cbevdzfmnceloveq] has joined #go-nuts
23:10 -!- qeed [~qeed@adsl-98-85-43-109.mco.bellsouth.net] has joined #go-nuts
23:11 < qeed> i have a directory of files like this
http://pastie.org/2239898 where inside lib is c go files, how would I make a
Makefile that handles it tried specifying CGOFILES and GOFILES didnt work, don't
know how to use godag to build it
23:11 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz]
23:11 < qeed> and if i do import "./lib/package_here" it says package not
found in main.go
23:13 < kevlar_work> qeed, you should have src/binary/main.go and
src/libname/*.go
23:13 < kevlar_work> and both should have their own makefiles
23:13 < qeed> i see so no one makefile
23:13 < kevlar_work> one makefile per directory and one package OR one
binary per directory
23:14 < kevlar_work> that is len(Makefile) == 1 && (len(package) == 1 ||
len(binary) == 1)
23:15 < qeed> well i have one binary i guess you cant use c functions in a
binary have to make it a lib?
23:15 < qeed> *want one binary
23:15 < kevlar_work> c should work fine in a binary
23:15 < qeed> how does one do build that?
23:16 < str1ngs> think cgo only works with packages.
23:16 < kevlar_work> CGOFILES=blah.c blah2.c GOFILES=main.go
23:16 < kevlar_work> str1ngs, orly?
23:16 < kevlar_work> it didn't used to
23:16 < qeed> well i mean calling C functions in go
23:16 < kevlar_work> either that or gofr was able to do it and I only
assumed Make could do it as well.
23:16 < qeed> cant just build that into one binary?
23:17 < kevlar_work> qeed, I'm pretty certain you can
23:17 < kevlar_work> show us your makefile
23:17 < str1ngs> unless you put the C in only CGOFILES?
23:17 < qeed> i tried something like this http://pastie.org/2239919
23:17 -!- vmil86 [~vmil86@78.57.227.12] has quit [Remote host closed the
connection]
23:18 < kevlar_work> doesn't CGOFILES only take the C files?
23:18 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has joined
#go-nuts
23:19 < qeed> really?
23:19 < qeed> i didnt know
23:19 < qeed> so go files that do import C should be put in GOFILES?
23:19 < str1ngs> yes but CGOFILES gets ignored in a cmd package.
23:19 < kevlar_work> ah.
23:19 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 258 seconds]
23:19 < kevlar_work> qeed, put all of your files in one directory and use gb
23:19 < kevlar_work> and see if it can figure it out :)
23:19 < kevlar_work> if not, make a library.
23:19 < qeed> no it says can't find import: C
23:20 < kevlar_work> gb does?
23:20 < str1ngs> imo package is better design.
23:20 < qeed> gb?  is that godag
23:20 < kevlar_work> no.
23:20 < kevlar_work> just make it a package, then.
23:22 < qeed> i get (in .) cannot have a cgo cmd
23:24 -!- dsal [~Adium@208.185.212.98] has quit [Quit: Leaving.]
23:27 -!- jsj [~johan@c83-252-31-169.bredband.comhem.se] has quit [Quit:
Leaving...]
23:31 -!- pbgc [~pbgc@195-23-115-137.static.net.novis.pt] has joined #go-nuts
23:31 < brandini> waddup nerds
23:33 < qeed> ugh is there a nice tutorial that covers package creation with
all cases using C or not etc.
23:33 -!- foocraft [~ewanas@89.211.221.186] has quit [Ping timeout: 255 seconds]
23:34 < brandini> I keep hearing from folks that go isn't low level enough
to do some things, and it isn't high level enough to do other things...  well
isn't that the point????
23:36 < crazy2be> brandini: All languages have those two restrictions
23:36 < crazy2be> well, except assembly and lisp :P
23:37 -!- AndrewBC [~andrewbc@scarlet.andrewbc.net] has joined #go-nuts
23:41 < brandini> yeah, and lisp doesn't do any cool things with
threads/pipes/etc
23:42 -!- tavis_rain [~tavisb@24-104-129.146.hfc.mediarain.com] has quit [Read
error: Connection reset by peer]
23:47 -!- foocraft [~ewanas@178.152.90.79] has joined #go-nuts
23:58 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has joined
#go-nuts
--- Log closed Wed Jul 20 00:00:01 2011