Topic for #ruby is now Ruby programming language || ruby-lang.org || RUBY SUMMER OF CODE! rubysoc.org/ || Paste >3 lines of text in http://pastie.org || Para a nossa audiencia em portugues http://ruby-br.org/
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@113x33x226x118.ap113.ftth.ucom.ne.jp] has joined #ruby
banisterfiend [banisterfiend!~baniseter@115.189.57.66] has joined #ruby
peterwald [peterwald!~peterwald@75-130-159-178.dhcp.spbg.sc.charter.com] has joined #ruby
`brendan [`brendan!~b@64-121-18-195.c3-0.upd-ubr1.trpr-upd.pa.cable.rcn.com] has joined #ruby
niko [niko!~niko@freenode/staff/ubuntu.member.niko] has joined #ruby
badabim_ [badabim_!~badabim@17.245.88.88] has joined #ruby
tomzx [tomzx!~tomzx@dsl-59-207.aei.ca] has joined #ruby
zalesz [zalesz!~zalesz@user-188-33-218-83.play-internet.pl] has joined #ruby
rpowell [rpowell!~rpowell@58.165.184.209] has joined #ruby
peterwal_ [peterwal_!~peterwald@75-130-159-178.dhcp.spbg.sc.charter.com] has joined #ruby
blaenk [blaenk!~blaenk@unaffiliated/blaenkdenum] has joined #ruby
wyhaines_ [wyhaines_!~wyhaines@65.39.118.15] has joined #ruby
sethetter [sethetter!~sethetter@ip98-186-171-21.ks.ks.cox.net] has quit [#ruby]
ontehfritz [ontehfritz!~ontehfrit@CPE0020a6543eed-CM0026f399f8dd.cpe.net.cable.rogers.com] has joined #ruby
phantasm66 [phantasm66!~phantasm6@146-115-132-39.c3-0.nwt-ubr1.sbo-nwt.ma.cable.rcn.com] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
yfeldblum [yfeldblum!~Jay@c-68-34-107-252.hsd1.md.comcast.net] has joined #ruby
Nisstyre [Nisstyre!~yours@infocalypse-net.info] has joined #ruby
looopy [looopy!~looopy@pool-141-156-47-88.washdc.btas.verizon.net] has joined #ruby
randym [randym!~randym@113x33x226x118.ap113.ftth.ucom.ne.jp] has joined #ruby
chilversc [chilversc!~chris@about/csharp/regular/KeeperOfTheSoul] has joined #ruby
rgs_ [rgs_!~rgs@serendipity.sugarlabs.org] has joined #ruby
replore [replore!~replore@203.152.213.161.static.zoot.jp] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
j3r0m3 [j3r0m3!~j3r0m3@76-217-192-160.lightspeed.frokca.sbcglobal.net] has joined #ruby
apucacao [apucacao!~apucacao@thelevel.com] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
cyri__ [cyri__!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby
mr-green [mr-green!~mr-green@122.164.225.59] has joined #ruby
pootpoot [pootpoot!~pootpoot@38.108.250.130] has quit [#ruby]
dankest [dankest!~dankest@wsip-174-75-64-190.sb.sd.cox.net] has joined #ruby
btanaka [btanaka!~textual@17.245.91.3] has joined #ruby
bloopletech [bloopletech!~blooplete@115.128.15.181] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@67.139.75.158] has joined #ruby
<bloopletech> I'm having some issues with regexps in 1.9.3: my case boils down to "\xA0".gsub("\xA0", " ") raising a RegexpError: invalid multibyte character: /\xA0/
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has quit [#ruby]
<bloopletech> however "\xA0" on its own doesn't raise an exception
<bloopletech> "\xA0".encoding is UTF-8, Encoding.default_internal and Encoding.default_external are all UTF-8
dv310p3r [dv310p3r!~dv310p3r@adsl-74-161-99-192.mia.bellsouth.net] has joined #ruby
<bloopletech> And U+00A0 is a valid UTF-8 character
Skaag [Skaag!~skaag@107.57.135.101] has joined #ruby
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
mr-green [mr-green!~mr-green@122.164.225.59] has quit ["Leaving"]
wmoxam_ [wmoxam_!~wmoxam@75-119-252-238.dsl.teksavvy.com] has joined #ruby
dotnull [dotnull!~DotNull@173-31-158-182.client.mchsi.com] has joined #ruby
<bloopletech> I can't really find any decent docs on regexes and encoding in 1.9.3 either
<banisterfiend> bloopletech: google for james edward gray's docs on encoding
<bloopletech> banisterfiend, I've read them mostly
<bloopletech> wil have another scan
<banisterfiend> ok
<bloopletech> this is a 1.9.3 specific change, it works in 1.9.2, so I don't think his articles will help
<csmrfx> did you try setting the string encoding first
<csmrfx> oh ok
<bloopletech> I'll double check that it works in 192
<bloopletech> wait
<bloopletech> bloody hell now it's failing in 1.9.2, but why did my spec pass in 1.9.2? need to check this out
crescendo [crescendo!~eric@unaffiliated/crescendo] has joined #ruby
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby
IrishGringo [IrishGringo!~chatzilla@c-71-229-99-200.hsd1.fl.comcast.net] has joined #ruby
<bloopletech> OK I'll try to solve my actual problem. I have an ostensibly UTF-8 encoded string, containing the byte hex sequence A0. I need to change all instances of the sequence to an ordinary space
<bloopletech> (space being hex 20)
<ged> bloopletech: "\u00A0".gsub("\u00A0", ' ')
<bloopletech> ged the string I'm processing is "\xA0"
<bloopletech> I think there may be a difference between the two escapes
<bloopletech> "\xA0".valid_encoding? => false
<bloopletech> isn't the vm supposed to throw an error if you try to make an invalid sequence in a string?
sdwrage [sdwrage!~sdwrage@cpe-184-57-123-50.columbus.res.rr.com] has joined #ruby
<bloopletech> I'm confused ;)
<bloopletech> right, I'm pretty sure now that nokogiri is force_encoding or somesuch, so I'm being handed a string that is utf-8 encoded but contains invalid byte sequences
<bloopletech> so I probably need to force it to ascii-8bit, remove the byte sequences, then transcode it back to utf-8
<mksm> bloopletech, String#encode
<mksm> it has some options to replace/remove invalid chars
<ged> [16] pry(main)> [ "\u00A0".bytes.to_a, "\xA0".bytes.to_a ]
<ged> => [[194, 160], [160]]
dhodgkin [dhodgkin!~dhodgkin@cpe-76-179-199-112.maine.res.rr.com] has joined #ruby
<ged> \u00A0 will definitely give you a UTF-8 non-breaking space.
<bloopletech> all: thanks
<rjbs> It's a custom Vim on Solaris. Right now, though, Vim isn't in the equation. I'm trying to compile the helper which I'll later use with Vim.
_whitelogger1 [_whitelogger1!~whitelogg@kaunan.whitequark.org] has joined #ruby
_whitelogger1 [_whitelogger1!~whitelogg@kaunan.whitequark.org] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
sarkis [sarkis!~sarkis@unaffiliated/sako] has joined #ruby
apeiros_ [apeiros_!~apeiros@77-58-115-24.dclient.hispeed.ch] has joined #ruby
thRoUS [thRoUS!KenCoar@nat/redhat/x-ssqezxkaaiekjvft] has joined #ruby
Jake232 [Jake232!~textual@5e049611.bb.sky.com] has joined #ruby
bier [bier!~bier@p57999BC6.dip.t-dialin.net] has joined #ruby
davidcelis [davidcelis!~david@70-89-180-6-smc-or.hfc.comcastbusiness.net] has joined #ruby
Hellojere [Hellojere!~Hellojere@89.7.90.160] has joined #ruby
<Zal> I read one tutorial that recommends a 2-space indent. My editor (vim --usually pretty smart) wants to use 4 space indent by default. Which is more common?
<csavola> Zal: 2 for ruby
<Zal> cool, thanks
<Zal> guess I still have some startup configuration leftover for python
nonotza [nonotza!~nonotza@66.246.94.130] has joined #ruby
nowthatsamatt [nowthatsamatt!~nowthatsa@rrcs-71-43-23-18.se.biz.rr.com] has joined #ruby
p0y_ [p0y_!~p0y@121.96.188.176] has joined #ruby
dondani [dondani!5aa4472d@gateway/web/freenode/ip.90.164.71.45] has joined #ruby
<dondani> what options are there for generating documentation from ruby code?
<dondani> the github guys say rdoc sucks
badabim [badabim!~badabim@17.245.88.88] has joined #ruby
<dondani> I've been trying their tomdoc format, but it's ignoring half of my methods
<dondani> don't know why
zerdman [zerdman!~zerdman@71.255.123.66] has quit [#ruby]
cbuxton [cbuxton!~Adium@nat/partnerpedia/x-gqxqmiwmevgqjegg] has joined #ruby
btanaka [btanaka!~textual@17.245.91.3] has joined #ruby
leehambley [leehambley!~leehamble@pd956c64f.dip0.t-ipconnect.de] has joined #ruby
<shevy> dondani, I think there is also YARD
<leehambley> I know "i'm doing it wrong" - but I have to parse this file in Ruby, it's about 1.6Gb total, so manual work, and getting replacement input is out of the question…
IrishGringo [IrishGringo!~chatzilla@c-71-229-99-200.hsd1.fl.comcast.net] has joined #ruby
<shevy> dondani, http://yardoc.org/
<leehambley> how can I process CSV with newlines in Ruby ?
zerdman [zerdman!~textual@71.255.123.66] has joined #ruby
<leehambley> (I'm on 1.9, can't find any way to make it handle the embedded newlines)
wmoxam_ [wmoxam_!~wmoxam@76.9.195.38] has joined #ruby
kW [kW!~kW@unaffiliated/kw] has joined #ruby
<dondani> shevy: looks nice, I'll try it; thanks!
<kW> Hello! Is it possible to write a statement within an required .rb file which stops loading this .rb file but continues otherwise?
stringoO [stringoO!~JLstring@CPE001346cbe31b-CM00111ae502a8.cpe.net.cable.rogers.com] has joined #ruby
rramsden [rramsden!~rramsden@s64-180-62-209.bc.hsia.telus.net] has joined #ruby
dazoakley [dazoakley!~dazoakley@hocuspokus.vm.bytemark.co.uk] has quit [#ruby]
zerdman [zerdman!~textual@71.255.123.66] has quit [#ruby]
omry_ [omry_!~omry@DSL212-235-83-63.bb.netvision.net.il] has joined #ruby
<apeiros_> kW: um, if false then … rest of the file … end
<kW> apeiros_: thank you (that's what I'm doing currently)
wmoxam_ [wmoxam_!~wmoxam@206-248-153-55.dsl.teksavvy.com] has joined #ruby
chrismcg [chrismcg!~chrismcg@pdpc/supporter/active/chrismcg] has joined #ruby
beginner [beginner!b4953181@gateway/web/freenode/ip.180.149.49.129] has joined #ruby
<apeiros_> it's rather uncommon to have that need, kW. why do you?
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
<beginner> s.entities.urls => [<#Hashie::Mash display_url="espncricinfo.com/ci/content/sto…" expanded_url="http://www.espncricinfo.com/ci/content/story/545355.html" indices=[79, 99] url="http://t.co/yhHtDoBE">] How can I access particular field like extended_url?
<kW> apeiros_: well, I have a file "lib/tasks/rspec.rake" in a rails-2.3 app, but I've upgraded to rspec-2 (i suppose this file is from rspec-1), and when executing rake (without rspec-1 installed), there are exceptions "cannot load such file -- spec/rake/spectask", so I though I just disable the whole file
<kW> without deleting it at this point in time
<apeiros_> kW: you can outcomment the section
<apeiros_> or use __END__
<kW> well, I like "if false" more :-)
<apeiros_> beginner: you have an array there. you probably want s.entities.urls[0] first
raluxgaza [raluxgaza!~raluxgaza@host-78-146-236-164.as13285.net] has joined #ruby
thone [thone!~thone@e179080081.adsl.alicedsl.de] has joined #ruby
<apeiros_> kW: outcommenting is quite more telling, though. but I'd leave a comment explaining the situation anyway.
omry_ [omry_!~omry@DSL212-235-83-63.bb.netvision.net.il] has joined #ruby
Evixion [Evixion!Evixion@67.235.65.134] has joined #ruby
<beginner> apeiros_: Ohh :|. Thanks for the help :)
<apeiros_> beginner: s.entities.urls.class # <-- use .class to figure what you've got
<mattp_> I think mkmf uses globals, so in extconf.rb you can append your custom include dir to $CPPFLAGS
<beginner> apeiros_: yes. got it :)
<Mon_Ouie> Literal if false in code looks like a bug or something someone forgot to remove from a debugging session
dannybtran [dannybtran!~digisyndi@gige.bur.digisynd.com] has joined #ruby
<seejohnrun> randy: not losing it, just have a bunch of contacts that are totally blank (except for photo and name)
<rjbs> mattp_: poking around with it.
tar_ [tar_!~tar@d118-75-81-132.try.wideopenwest.com] has joined #ruby
wilmoore [wilmoore!~wilmoore@70-89-165-49-ISTS-co.hfc.comcastbusiness.net] has joined #ruby
Jrz [Jrz!~jrz@d152222.upc-d.chello.nl] has joined #ruby
Optimis [Optimis!~Optimis@cpe-98-149-171-51.socal.res.rr.com] has joined #ruby
thRoUS [thRoUS!KenCoar@nat/redhat/x-owxkpxexiackdekp] has joined #ruby
nate_h [nate_h!~husimon@c73-208.rim.net] has joined #ruby
<rjbs> mattp_: It was much stupider...
tomhsx [tomhsx!~tomhsx@c-76-109-169-195.hsd1.fl.comcast.net] has joined #ruby
<rjbs> mattp_: the extconf.rb only reported "ruby.h" missing, but what it meant to say was "cc not in $PATH"
tomhsx [tomhsx!~tomhsx@c-76-109-169-195.hsd1.fl.comcast.net] has quit [#ruby]
Dangr_ [Dangr_!~sseellff@mail.theatomgroup.com] has joined #ruby
<Na_Klar> How can I find out the error code (number) of e.g. Errno::EWOULDBLOCK. I resuce the exeption with resuce => detail. But cannot figure out how to get detail to the errno
<rjbs> mattp_: Once I catted mkmf.log and tried running its test by hand (because its output was not logged), I got the useful error of "wtf is gcc?"
Araxia [Araxia!~Araxia@173-164-68-213-Oregon.hfc.comcastbusiness.net] has joined #ruby
<kW> Hello! Is there any standard way to determine the amount of physical RAM of the machine the Ruby VM is running on?
<apeiros_> Na_Klar: ruby ain't C, Errno::EWOULDBLOCK is not a number but a class
<apeiros_> so detail.class would be Errno::EWOULDBLOCK
<glacius> hi guys is there a way when copying a file to a location to create the top level directories on the target location
<apeiros_> you can limit your rescue to specific classes too.
<mattp_> rjbs: haha oh. well problem solved atleast
<zaarg> i can't find this ruby app i read about a while ago. it lets you select a piece of ruby in any app and execute the interpreter on it which will then replace the selected text with the result
<zaarg> i think is was an os x app
<Na_Klar> apeiros_, okay ... then how can I determine the class e.g. in a switch statement, without parsing the class name as a string?
<rjbs> mattp_: Yup, thanks for the help. :)
<apeiros_> Na_Klar: best way, do it in the rescue statement directly as you're supposed to :-p
<Na_Klar> apeiros_ yeah .. that might be wise .. since resuce also can do "else" :P
<apeiros_> Na_Klar: begin …code… rescue ClassA, ClassB; …handle ClassA and ClassB…; rescue ClassC; …handle C… end
<apeiros_> Na_Klar: else means "if no exception occurred"
<Na_Klar> oh
<Na_Klar> k
<Zal> Quick code review of a single function anyone? The function works, but is it idiosyncratic? Suggestions? http://pastie.org/3016656
<Na_Klar> apeiros_ so what would be the syntax for "all other classes"?
<apeiros_> if you mean "all other exceptions", leave out the exception class (that'll cause it to use the default, which is StandardError)
<apeiros_> you *can* use Exception itself. but you really shouldn't unless you know *precisely* what you do (and - no offense intended - you don't seem to be there right now)
<Na_Klar> apeiros_ can I rescue standarderror? And will a e.g. block error be a standarderror when I do not resuce it?
jonathanwallace [jonathanwallace!~jonathanw@99-11-165-168.lightspeed.tukrga.sbcglobal.net] has joined #ruby
<apeiros_> Na_Klar: rescue Foo means rescue all exceptions that are an instance of Foo or an instance of any descendant of Foo
<davidcelis> Zal: What are you even trying to do?
rjbs [rjbs!~rjbs@cancer.codesimply.com] has quit [#ruby]
<apeiros_> since almost all exceptions are supposed to inherit from StandardError, it should rescue all exceptions.
<apeiros_> (almost all)
<Zal> davidcelis, score a dice game (ruby koan exercise). The scoring is correct, just wondering about my ruby
<davidcelis> Zal: It looks like spaghetti code. Do you really need all of those conditionals?
eldariof [eldariof!~CLD@81.200.24.247] has joined #ruby
<Na_Klar> apeiros_ yea I see that. I actually just want to recv from a socket nonblocking. I have to rescue EWOULDBLOCK but want to "ignore" all other socker-related errors. ... it's just that
<Zal> davidcelis, not sure. I can't think of way to group it better, but maybe there's a cleaner way to write the conditionals?
<davidcelis> Zal: which koan?
<Zal> davidcelis, I'll add the instructions
<davidcelis> thanks. brb
<apeiros_> examples of exceptions that are NOT rescued by StandardError: Interrupt (raised when you do ctrl-c), NoMemoryError, SyntaxError
<apeiros_> Na_Klar: then only `rescue Errno::EWOULDBLOCK`
<Na_Klar> ^^ resuing interrupt would be kind of mean :?
<Zal> davidcelis, et al, with instructions: http://pastie.org/3016678
<apeiros_> there's times where it's meaningful. but yes, you normally don't want to rescue Interrupt with a catch-all.
<Na_Klar> apairos_ yea, ruby also extends that with IO::WaitReadable for this purpose
<apeiros_> Na_Klar: you know you can tab-complete nicknames in most irc clients?
flexd [flexd!~flexd@dev.flexd.net] has joined #ruby
<apeiros_> Na_Klar: then I don't see your problem :)
<apeiros_> or is it solved?
<Na_Klar> well ..
SegFaultAX|work [SegFaultAX|work!~mkbernard@173.228.45.162] has joined #ruby
<Na_Klar> tab
<Na_Klar> problem sovled. thanks for the tab hint apeiros_
<apeiros_> ;-)
jay_zawrotny [jay_zawrotny!~Jay@12.139.190.186] has joined #ruby
azbarcea__ [azbarcea__!~quassel@79.114.115.37] has joined #ruby
p1d [p1d!~p1d@ns1.vonaffenfels.de] has joined #ruby
<davidcelis> Zal: what gets passed to this method?
<davidcelis> An array of Fixnums?
<failshell> anyone around who used stream with sinatra and views/templates? i would need some help
<Zal> davidcelis, a list of die rolls, like [1,2,2,4,5]
<Zal> yes
ascarter [ascarter!~ascarter@67-42-84-171.tukw.qwest.net] has joined #ruby
<Zal> (sorry, I'm still trying to stop speaking in Python)
adeponte [adeponte!~adeponte@67.110.253.162.ptr.us.xo.net] has joined #ruby
<davidcelis> So, given the instructions, this is actually OK
<davidcelis> There are some things that could be done differently
<davidcelis> Are you familiar with the ternary operator, Zal?
<Zal> davidcelis, yes, though I'm not used to using it much
eignerchris [eignerchris!~eignerchr@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
<Zal> I'll see what I can do with it
Hellojere [Hellojere!~Hellojere@89.7.90.160] has joined #ruby
ne0_ [ne0_!~ne0_@192.Red-88-15-70.dynamicIP.rima-tde.net] has joined #ruby
<ne0_> hello peoples
<ne0_> how can I find the "\xCC" character in bash shell?
<xissburg> huh
raythecat [raythecat!~raythecat@adsl-108-81-52-145.dsl.sndg02.sbcglobal.net] has joined #ruby
amerine [amerine!~mturner@208-100-137-147.bendbroadband.com] has joined #ruby
<ne0_> I have a problem in rails when running assets:precompile that says ""\xCC" from ASCII-8BIT to UTF-8"
<ne0_> the trace doesn't show more
<ne0_> in #rubyonrails don't know
<ne0_> i need to find that character
<ne0_> but i don't know how
<shevy> always those encoding problems
pestouille [pestouille!~adrien@pth77-2-78-225-108-217.fbx.proxad.net] has joined #ruby
<ne0_> I will really appreciate if somebody gives me a hit about that
<ne0_> just want to find that character
<ne0_> remove it and deploy?. :(
ghanima [ghanima!~ghanima@alexander.nat.trb.com] has joined #ruby
<Zal> Is there a way to write the ternary operator using "if" and "else" instead of "?" and ":" ?
<tommylommykins> if a then b else c ?
<tommylommykins> Ruby is expression based, so you can take the value of it
<JonnieCache> you need an end
<Na_Klar> ne0_ CC is hex for 204, and it is actually just a part of a utf-8 char. e.g. U+0300 would be \xcc\x80 in literal
<JonnieCache> if a then b else c end
<Zal> ah, I see. I can do it one line, but still need end.
thatryan [thatryan!~thatryan@c-24-4-167-46.hsd1.ca.comcast.net] has quit ["Linkinus - http://linkinus.com"]
<Zal> Thanks, I think I'll stick with ? and :
<JonnieCache> yeah its probably to keep the grammar simpler
<Zal> <nod>
* tommylommykins has never particularly been a fan of : ?
<tommylommykins> especially since ruby does it with "if" "then" "end" syntax
<JonnieCache> ruby has the occasional compromise like that to stop the grammar getting any more insane than it already is
<Zal> tommylommykins, you like if/else/end ?
<tommylommykins> Indeed
<Zal> ok
<ne0_> Na_Klar, im getting "\xCC" from ASCII-8BIT to UTF-8
quest88 [quest88!~quest88@12.181.53.99] has joined #ruby
j3r0m3 [j3r0m3!~j3r0m3@76-218-204-151.lightspeed.sntcca.sbcglobal.net] has joined #ruby
<ne0_> isn't a way to know where this character is?
<Zal> well, I'll look at both ways. I generally English words to punctuation myself.
<Na_Klar> ne0_ what does "from ascii to utf" mean? are you converting it?
<JonnieCache> Zal: in that case, beware that while ruby has `and`, `or` as well as `&&` `||` they arent the same
<Zal> JonnieCache, understood, thanks
<Zal> still not getting it right: "mult = 1000 if die == 1 else 100 * die end" is what I'm trying. What's wrong?
<JonnieCache> so dont get tempted to use the english ones everywhere without understanding it, they have different prescedence and can cause nasty bugs
<Zal> JonnieCache, gotcha, thanks
<davidcelis> Zal: Don't do if-else statements in one line
<davidcelis> That is what the ternary is for
<Zal> davidcelis, ok, fine then! :-)
<Zal> the ternary version works fine
<tommylommykins> mult = if die == 1 then 1000 else 100 * die end
adamkittelson [adamkittelson!~adamkitte@50.0.132.2] has joined #ruby
<JonnieCache> yeah he's right, nobody does that and just because you can do it, doesnt mean you should
* tommylommykins likes it D:
<JonnieCache> thats an important thing to learn in ruby. it will let you do a *lot* of things you shouldnt really do
<davidcelis> tommylommykins: That is arguably worse than... die == 1 ? 1000 : 100
<ne0_> Na_Klar: nope it's the commnd "rake assets:precompile" which precompile my assets and the assets of the plugins
<rippa> I invented new paradigm
stayarrr [stayarrr!~olivererx@dslb-178-009-059-241.pools.arcor-ip.net] has joined #ruby
<rippa> do <stuff> or else
* tommylommykins personally disagrees :P
<ne0_> it can't precompile them because in some place there is that character
<burgestrand> ne0_: \xCC by itself ain’t valid UTF-8
<ne0_> and I can't trace it
<Zal> tommylommykins, I see where I went wrong with it. Thanks
<ne0_> exactly
<JonnieCache> rippa: lol so youre just threatening the interpreter now?
<ne0_> I'm trying to found that character
<rippa> yep
<Na_Klar> ne0_ \xCC is neither a UTF-8 char nor an ASCII char ...
<rippa> just he try not doing what I want
<ne0_> ok so how can I find it?
<Zal> tommylommykins, not used to "if" providing a return value. Kinda neat.
<Na_Klar> ne0_ you will not find it probably.
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
<ne0_> ........
<JonnieCache> rippa: reminds me of INTERCAL with its `PLEASE` statements
<ne0_> so hasn't solution?
<tommylommykins> Zal: Yeah. It's part of the everything-is-an-expression style inherited from functiional programming :)
<JonnieCache> Zal: in ruby everything provides a return value. everything is an expression. (well, almost everything)
<burgestrand> Read all files as UTF-8 and check if they have a valid encoding, it’ll return false for the bad file
<Na_Klar> ne0_ it looks like a multibyte char which got cutted and therefore ends as a char zombie
<Zal> tommylommykins, JonnieCache excellent stuff.
<burgestrand> Either that or remove one file at a time and see when it stops breaking
<tommylommykins> "puts if bar then 1 else 2" is is a very lispy way of writing ruby
<burgestrand> Na_Klar: it could be any valid character from an ISO-8559-X character set, which would be quite common too
luckyruby [luckyruby!~luckyruby@125-187.96-97.tampabay.res.rr.com] has joined #ruby
<burgestrand> trying to read that as UTF8 would error in the same way
<ne0_> the question is
<Na_Klar> burgestrand, as I read there are only ascii and utf-8 involved. but otherwise you are right
<ne0_> is any way to know where is that error being called or something that allows me to continue my work?
<JonnieCache> ne0_: go into the folder where the file is, and run `file -I *`
<burgestrand> Na_Klar: ASCII-8BIT, ruby’s equivalent of BINARY, so probably something assuming UTF-8 but it’s not :)
<JonnieCache> that will attempt to display the encoding of all files, and hopefully you will see an odd one out
jonathanwallace [jonathanwallace!~jonathanw@99-11-165-168.lightspeed.tukrga.sbcglobal.net] has joined #ruby
closedbracket [closedbracket!~closedbra@smtp.goodmortgage.com] has joined #ruby
<Na_Klar> burgestrand, yea since ascii itself is usually 7bit ;-)
dexcs [dexcs!~dexcs@HSI-KBW-109-193-252-135.hsi7.kabel-badenwuerttemberg.de] has joined #ruby
kenichi [kenichi!~kenichi@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
Russell^^ [Russell^^!~Russell^^@88.97.51.87] has joined #ruby
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby
jgarvey [jgarvey!~jgarvey@cpe-174-097-248-211.nc.res.rr.com] has joined #ruby
<Na_Klar> so 0xCC would be "╠" but that is not \xCC at all ..
<ne0_> JonnieCache I don't know whats the problematic file
<ne0_> JonnieCache how how can I display the encoding of all files?
dankest [dankest!~dankest@ip68-108-246-82.sb.sd.cox.net] has joined #ruby
omry_ [omry_!~omry@DSL212-235-83-63.bb.netvision.net.il] has joined #ruby
voodoofish430 [voodoofish430!~mtorres@NAT5.pas.idealab.com] has joined #ruby
codefriar [codefriar!~codefriar@ip-200.it.rdu.bandwidth.com] has joined #ruby
<codefriar> is there a way to tell gem to compile native extensions statically ?
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
jay_zawrotny [jay_zawrotny!~Jay@12.139.190.186] has joined #ruby
dhodgkin [dhodgkin!~dhodgkin@cpe-76-179-199-112.maine.res.rr.com] has joined #ruby
looopy [looopy!~looopy@pool-141-156-47-88.washdc.btas.verizon.net] has joined #ruby
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
nanoyak [nanoyak!~nanoyak@50-0-164-69.dsl.dynamic.sonic.net] has joined #ruby
mostlygeek [mostlygeek!~mostlygee@li323-34.members.linode.com] has joined #ruby
<mostlygeek> what does this mean in ruby: someVar ||= begin ... end
Amirh [Amirh!~amir@2.181.28.193] has joined #ruby
<codefriar> mostlygeek: it's an assignment operation where somevar, if it has a value is returned, else, it's set equal to the return value of that block
vipaca [vipaca!~vipaca@unaffiliated/vipaca] has joined #ruby
xpot [xpot!~xpot@166-70-100-198.ip.xmission.com] has joined #ruby
<apeiros_> if it has a value +other than nil/false
Cervajz [Cervajz!~Cervajz@93.99.93.150] has joined #ruby
Cervajz [Cervajz!~Cervajz@opensuse/member/Cervajz] has joined #ruby
<mostlygeek> oh, so if it doesn't have a value, assign it to the return of the code block
<vipaca> Any pointers on setting up a private npm registry?
skinnymuch [skinnymuch!~skinnymuc@static-173-61-113-6.cmdnnj.fios.verizon.net] has joined #ruby
zamolxis [zamolxis!5c5497eb@gateway/web/freenode/ip.92.84.151.235] has joined #ruby
libertyprime [libertyprime!~libertypr@122-59-8-223.jetstream.xtra.co.nz] has joined #ruby
<zamolxis> Can anyone tell me how I can make the option parser not throw out errors when some arguments are not passed to a certain switch? At least print out a message. Thanks!
<vipaca> nm found it at http://github.com/isaacs/npmjs.org
daniel_hinojosa [daniel_hinojosa!~danno@c-68-35-182-153.hsd1.nm.comcast.net] has joined #ruby
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
Ch4rAzZz [Ch4rAzZz!~jiri@HSI-KBW-149-172-143-236.hsi13.kabel-badenwuerttemberg.de] has joined #ruby
chrishuntis [chrishuntis!~chrishunt@83-223-112-244.as29017.net] has joined #ruby
pantsman [pantsman!~pantsman@2.27.109.168] has joined #ruby
pantsman [pantsman!~pantsman@pdpc/supporter/active/pantsman] has joined #ruby
GreaseMonkey [GreaseMonkey!~gm@unaffiliated/greasemonkey] has joined #ruby
araujo [araujo!~araujo@190.73.44.29] has joined #ruby
araujo [araujo!~araujo@gentoo/developer/araujo] has joined #ruby
zommi [zommi!~quassel@HSI-KBW-078-042-009-093.hsi3.kabel-badenwuerttemberg.de] has joined #ruby
tomhsx [tomhsx!~tomhsx@c-76-109-169-195.hsd1.fl.comcast.net] has joined #ruby
tomhsx [tomhsx!~tomhsx@c-76-109-169-195.hsd1.fl.comcast.net] has quit [#ruby]
dodops [dodops!~douglas@gw05.infotec.psi.br] has joined #ruby
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby
drd2 [drd2!53a0482e@gateway/web/freenode/ip.83.160.72.46] has joined #ruby
<Zal> how do I negate a conditional? "if ! <expression>" ?
<danheberden> if !false
<shevy> or unless
axl_ [axl_!~axl@173-11-52-113-Minnesota.hfc.comcastbusiness.net] has joined #ruby
<Zal> great, thanks
minijupe [minijupe!~benlieb@adsl-068-213-050-110.sip.ard.bellsouth.net] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
Dangr_ [Dangr_!~sseellff@mail.theatomgroup.com] has joined #ruby
bosphorus [bosphorus!~bosphorus@88.234.11.106] has joined #ruby
flagg0204 [flagg0204!~ianderson@sea02-v600-nat.marchex.com] has joined #ruby
kennethreitz [kennethreitz!~kennethre@c-24-127-96-129.hsd1.va.comcast.net] has joined #ruby
Tuxist64bit [Tuxist64bit!~quassel@dyndsl-091-096-126-113.ewe-ip-backbone.de] has joined #ruby
nonotza [nonotza!~nonotza@66.246.94.130] has joined #ruby
Danielpk [Danielpk!Danielpk@s8.rdlbnc.com] has joined #ruby
<Danielpk> Free paid account at GitHub for life at AppSumo: http://migre.me/79by0
Danielpk [Danielpk!Danielpk@206.217.206.246] has joined #ruby
Danielpk [Danielpk!Danielpk@206.217.206.246] has quit [#ruby]
larsx_ [larsx_!~larsx@85.19.221.250] has joined #ruby
<JonnieCache> ah its a competition and i have to spam my social accounts
<JonnieCache> fuck 'em
<JonnieCache> bastards took my email address before they told me that too
<davidcelis> God I hate these contests
<davidcelis> spamming social accounts is fucking lame
<deryldoucette> ehh i did it. not like i got a bunch of followers :)
<JonnieCache> yeah those appsumo emails are awful. i was signed up for a bit but they were indistinguishable from spam
<JonnieCache> WHATS THAT? HALF PRICE WORDPRESS THEMES? WHERE'S MY CREDIT CARD, THIS IS AN EMERGENCY!
dasfugufish [dasfugufish!~Adium@68-170-39-205.mammothnetworks.com] has joined #ruby
<ne0_> Hi
<ne0_> I'm executing RAILS_ENV=production rake --trace db:seed and getting this error https://gist.github.com/1477994
<zamolxis> JonnieCache: don't look for it, you may end up with a "cache" miss :)
<ne0_> any idea whats going on?
<JonnieCache> i hated the tone they were written in as well, they put me very much in mind of http://www.youtube.com/watch?v=Qi_AAqi0RZM
bitrot [bitrot!~smd@rrcs-50-84-14-82.sw.biz.rr.com] has joined #ruby
paissad [paissad!~paissad@89-92-16-151.hfc.dyn.abo.bbox.fr] has joined #ruby
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
eldariof [eldariof!~CLD@81.200.24.170] has joined #ruby
libertyprime [libertyprime!~libertypr@182.236.125.102] has joined #ruby
roadze [roadze!~roadze@119.224.137.97] has joined #ruby
Jrz [Jrz!~jrz@d152222.upc-d.chello.nl] has joined #ruby
mehryar [mehryar!~user@2001:470:0:11a::1e] has joined #ruby
jbpros [jbpros!~jbpros@87.66.47.159] has joined #ruby
luckyruby [luckyruby!~luckyruby@125-187.96-97.tampabay.res.rr.com] has joined #ruby
Manhose [Manhose!~Manhose@a94-132-167-54.cpe.netcabo.pt] has joined #ruby
dankest [dankest!~dankest@ip68-108-246-82.sb.sd.cox.net] has joined #ruby
mehryar [mehryar!~user@2001:470:0:11a::1e] has quit ["ERC Version 5.3 (IRC client for Emacs)"]
libertyp1ime [libertyp1ime!~libertypr@182.236.125.102] has joined #ruby
d3vic3 [d3vic3!~quimzed@197.1.174.135] has joined #ruby
ciunix [ciunix!~ciunix@151.65.182.153] has joined #ruby
gearaholic [gearaholic!~gearaholi@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby
shadoi [shadoi!~Adium@gw.sfo.cloudscaling.com] has joined #ruby
omry_ [omry_!~omry@DSL212-235-83-63.bb.netvision.net.il] has joined #ruby
My_Hearing [My_Hearing!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby
raluxgaza [raluxgaza!~raluxgaza@host-78-146-236-164.as13285.net] has joined #ruby
R3dy [R3dy!~rdavis@unaffiliated/r3dy] has joined #ruby
<R3dy> rvm do gem list
<R3dy> ERROR: Only 'do' action is allowed.
<R3dy> is this broekn?
<R3dy> sorry
macabre^ [macabre^!~macabre@63.133.215.18] has joined #ruby
incluye [incluye!~incluye@LO1-ESR-74-215-187-208.fuse.net] has joined #ruby
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
zul_ [zul_!~ciunix@151.65.170.254] has joined #ruby
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
moted [moted!~ryan@c-98-246-106-150.hsd1.or.comcast.net] has joined #ruby
EddieBluh [EddieBluh!~EddieBluh@host-84-13-216-56.opaltelecom.net] has joined #ruby
Amirh [Amirh!~amir@2.181.28.193] has joined #ruby
sean_m [sean_m!~sean@c-76-111-4-53.hsd1.va.comcast.net] has joined #ruby
omry_ [omry_!~omry@DSL212-235-83-63.bb.netvision.net.il] has joined #ruby
QKO_ [QKO_!~reaVer@banzai.speedxs.nl] has joined #ruby
tvw [tvw!~tv@e176013090.adsl.alicedsl.de] has joined #ruby
Dangr_ [Dangr_!~sseellff@mail.theatomgroup.com] has joined #ruby
colint [colint!~ColinT@74.198.151.11] has joined #ruby
moted [moted!~ryan@c-98-246-106-150.hsd1.or.comcast.net] has joined #ruby
Optimis [Optimis!~Optimis@cpe-98-149-171-51.socal.res.rr.com] has joined #ruby
tziOm [tziOm!~bjornar@ti0099a340-dhcp0566.bb.online.no] has joined #ruby
<tziOm> How can I install thin with bundle?
<shadoi> Add it to you Gemfile...?
<shadoi> your*
bafilius [bafilius!~lee@wsip-174-75-64-190.sb.sd.cox.net] has joined #ruby
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby
jgrimes_ [jgrimes_!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
omry_ [omry_!~omry@DSL212-235-83-63.bb.netvision.net.il] has joined #ruby
atmosx [atmosx!~atmosx@191.116.broadband5.iol.cz] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
Spockz` [Spockz`!~Spockz@21pc198.sshunet.nl] has joined #ruby
NinoScript [NinoScript!~Adium@nat-wifi-voip.campus.utfsm.cl] has joined #ruby
danneu [danneu!~dan@c-98-200-231-154.hsd1.tx.comcast.net] has joined #ruby
rickmasta [rickmasta!~rickmasta@pool-108-21-213-102.nycmny.fios.verizon.net] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
jgrimes [jgrimes!~jg@cpe-071-070-140-012.nc.res.rr.com] has joined #ruby
colint [colint!~ColinT@69-11-97-130.regn.static.sasknet.sk.ca] has joined #ruby
Synthead [Synthead!~max@173-165-179-126-atlanta.hfc.comcastbusiness.net] has joined #ruby
Blackhold [Blackhold!~Blackhold@33.Red-213-98-143.staticIP.rima-tde.net] has joined #ruby
<Blackhold> hi
azbarcea___ [azbarcea___!~quassel@79.114.115.37] has joined #ruby
<Blackhold> I'm trying to run a ruby based web program with apache2
<Blackhold> I have installed libapache2-mod-ruby and ruby
<Blackhold> and defined the dir as a cgi but still it appears the program as text
<Blackhold> could someone give me some help?
<Blackhold> and restarted apache!
v4n_ [v4n_!~v4n@207.96.182.162] has joined #ruby
Blazento [Blazento!~john@rrcs-184-74-225-230.nyc.biz.rr.com] has joined #ruby
ilyam [ilyam!~ilyam@eng.nat.mtv.ooyala.com] has joined #ruby
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby
omry_ [omry_!~omry@DSL212-235-83-63.bb.netvision.net.il] has joined #ruby
cjk101010 [cjk101010!~ckruse@painkiller.defunced.de] has joined #ruby
MAD [MAD!~MAD@labs.madsgraphics.com] has joined #ruby
sepp2k [sepp2k!~sexy@g224097220.adsl.alicedsl.de] has joined #ruby
csavola [csavola!~csavola@76-10-149-67.dsl.teksavvy.com] has joined #ruby
kennethreitz [kennethreitz!~kennethre@c-24-127-96-129.hsd1.va.comcast.net] has joined #ruby
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
tshauck [tshauck!~tshauck@184.78.124.24.cm.sunflower.com] has joined #ruby
austinbv [austinbv!~austinbv@rrcs-24-73-203-202.se.biz.rr.com] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
michaelh [michaelh!~Michael@c-98-213-112-209.hsd1.il.comcast.net] has joined #ruby
<shadoi> Blackhold: I highly recommend using passenger instead of mod_ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
airhorns [airhorns!~airhorns@76-10-159-19.dsl.teksavvy.com] has joined #ruby
<Blackhold> ok
<Blackhold> ruby install passenger ?
<shadoi> google ftw
<Blackhold> :P
austinbv [austinbv!~austinbv@rrcs-24-73-203-202.se.biz.rr.com] has joined #ruby
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby
<Blackhold> shadoi: it tells me to install lots of packages
<Blackhold> should not run with mod_ruby?
<shadoi> It's just a pain in the ass for anything other than a simple script, if you use any frameworks or do anything at all that runs a server, mod_ruby becomes a massive hassle
moted [moted!~ryan@c-98-246-106-150.hsd1.or.comcast.net] has joined #ruby
<shadoi> btw, there maybe a package for passenger on your distro/OS
<shadoi> it wants you to install a bunch of stuff just so it can compile it.
<Blackhold> shadoi: I'm on debian
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
<Blackhold> there's a package for apache
<shadoi> definitely something in sid for passenger, not sure about stable
jergason [jergason!~jergason@208.97.56.66] has joined #ruby
Zanacross [Zanacross!~Serenity@adsl-87-102-126-62.karoo.KCOM.COM] has joined #ruby
<shadoi> ubuntu 11.04 has libapache2-mod-passenger
moted [moted!~ryan@c-98-246-106-150.hsd1.or.comcast.net] has joined #ruby
Skaag [Skaag!~skaag@static-155-212-109-50.nj.onecommunications.net] has joined #ruby
winux [winux!winux@174-28-233-179.albq.qwest.net] has joined #ruby
<Blackhold> wait phone
xhubert [xhubert!~alex@213-21-78-58.customer.t3.se] has joined #ruby
rpowell [rpowell!~rpowell@CPE-60-229-137-64.lns4.ken.bigpond.net.au] has joined #ruby
enroxorz [enroxorz!~enroxorz@65-117-22-130.dia.static.qwest.net] has joined #ruby
enroxorz [enroxorz!~enroxorz@unaffiliated/enroxorz] has joined #ruby
<Blackhold> shadoi: it tells to install build-essential
<Blackhold> why to install this package?
<austinbv> is there an array method to remove duplicates
<apeiros_> .uniq
<Blackhold> sorry if I feel you stupid
<shadoi> Blackhold: to compile the module.
<austinbv> ah duh
<Blackhold> I'm trying to understand why
<shadoi> Blackhold: so that the module is correct for the exact build of apache you have.
omry_ [omry_!~omry@DSL212-235-83-63.bb.netvision.net.il] has joined #ruby
<Blackhold> ok, so then to install passenger module I download it uncompiled
<Blackhold> and then ruby compiles it
<shadoi> or use a debian package if there is one for your version.
<Blackhold> sorry, I'm not familiar on ruby
<shadoi> try: apt-cache search passenger
<Blackhold> the apache mod
<Blackhold> que documentation
<Blackhold> and other stuff simutrans
iocor [iocor!~textual@87.194.167.19] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
<shadoi> no comprende
RoUS [RoUS!KenCoar@apache/committer/coar] has joined #ruby
Guest14952 [Guest14952!~KenCoar@dsl093-240-159.ral1.dsl.speakeasy.net] has joined #ruby
<Blackhold> well...
<Blackhold> I think I have no more option to install that
<Blackhold> thanks shadoi
<DeeJayTwo> what does it means when I see blah[:name] ?
<shadoi> it's a hash, :name is a key in the hash
<shadoi> it's a symbol
<DeeJayTwo> ok
<DeeJayTwo> So I don't need to double quote it...
<shadoi> nope
<DeeJayTwo> thanks
<apeiros_> most likely, doesn't have to be a hash
Blackhold [Blackhold!~Blackhold@33.Red-213-98-143.staticIP.rima-tde.net] has quit [#ruby]
LittleBill902_ [LittleBill902_!smith@c-71-197-103-184.hsd1.ca.comcast.net] has joined #ruby
<shadoi> only 93.25% of the time I suppose.
Kazii [Kazii!~Kazii@unaffiliated/kazii] has joined #ruby
j3r0m3 [j3r0m3!~j3r0m3@50-0-128-33.dsl.dynamic.sonic.net] has joined #ruby
apok_ [apok_!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
manizzle [manizzle!~manizzle@dsl081-053-082.sfo1.dsl.speakeasy.net] has joined #ruby
headius [headius!~headius@71-210-151-185.mpls.qwest.net] has joined #ruby
ilyam [ilyam!~ilyam@eng.nat.mtv.ooyala.com] has joined #ruby
azbarcea_____ [azbarcea_____!~quassel@79.118.7.231] has joined #ruby
crexx [crexx!aod@078088239019.lubin.vectranet.pl] has joined #ruby
amacgregor [amacgregor!~amacgrego@CPE00222dcb0a53-CM00222dcb0a4f.cpe.net.cable.rogers.com] has joined #ruby
Helius [Helius!~Adium@93-35-226-112.ip57.fastwebnet.it] has joined #ruby
eerdogan [eerdogan!~eerdogan@user-12ld1jv.cable.mindspring.com] has joined #ruby
<kuzushi> anyone know of good places to look for ruby work-- specifically ruby security engineering work?
<Zal> craigslist?
<kuzushi> I thought that craigslist was just a good place to get murdered for showing up for a job?
<Zal> that too
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
<Zal> (bring your glock)
mengu [mengu!~mengu@78.184.201.123] has joined #ruby
ascarter [ascarter!~ascarter@67-42-84-171.tukw.qwest.net] has joined #ruby
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
<havenn> kuzushi: http://toprubyjobs.com/
Morkel [Morkel!~Morkel@xdsl-87-78-205-136.netcologne.de] has joined #ruby
KarlHungus [KarlHungus!~relax@unaffiliated/adj] has joined #ruby
kes [kes!bc862c04@gateway/web/freenode/ip.188.134.44.4] has joined #ruby
<KarlHungus> is this an appropriate forum to discuss gems and the ~> operator?
<kes> is it possible to use syntax like that: ::FileUtils.cp "file/#{filename}.ini", "~/dir/dir2/#{new_filename}.ini" ?
<kes> i'm getting error that dst file don't exist
fridim_ [fridim_!~fridim@2a01:e35:2ece:f2d0:223:4eff:fe6c:c754] has joined #ruby
<KarlHungus> why does tilt 1.3.3 not meet the dependency restrictions in sprockets when they are listed as tilt (!= 1.3.0, ~> 1.1)
<KarlHungus> my understanding of this operator (from the sources) is that the above comparison is equivilant to ( ( v != 1.3.0 ) && ( v >= 1.1 && v < 2.0 ) )
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby
benlangfeld [benlangfeld!~ben@host109-148-248-117.range109-148.btcentralplus.com] has joined #ruby
benlangfeld [benlangfeld!~ben@unaffiliated/benlangfeld] has joined #ruby
Lord-Harlot [Lord-Harlot!~Serenity@adsl-87-102-126-62.karoo.KCOM.COM] has joined #ruby
<kes> KarlHungus: because 1.3.3 != 1.3.0 i think
<KarlHungus> kes: clearly 1.3.3 != 1.3.0. therefore the test should return true and accept 1.3.3 as a valid dependency
tar_ [tar_!~tar@d118-75-81-132.try.wideopenwest.com] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
ujkanovic [ujkanovic!~Ser@78.157.22.14] has joined #ruby
stkowski [stkowski!~stkowski@ns25.8x8.com] has joined #ruby
<Harzilein> hmm
<Harzilein> what can i do when stuff depends on "Ruby/DL"?
<Harzilein> ruby-1.9.2-p290 :001 > require "xattr"
<Harzilein> NameError: uninitialized constant DL::Importable
<ujkanovic> i need ruby help can some one help me
jadoe [jadoe!~jadoe@84.200.211.204] has joined #ruby
mostlygeek [mostlygeek!~mostlygee@li323-34.members.linode.com] has quit [#ruby]
v0id [v0id!~v0id@nat/hp/x-cwulratnmbyxfagx] has joined #ruby
<ujkanovic> i need help
<ujkanovic> S:
<ujkanovic> need help
berserkr [berserkr!~david@212.122.111.205.dyn.user.ono.com] has joined #ruby
minijupe [minijupe!~benlieb@adsl-74-243-183-162.ard.bellsouth.net] has joined #ruby
Sailias [Sailias!~jonathan@69.158.82.233] has joined #ruby
cpruitt [cpruitt!~cpruitt@pool-173-65-251-92.tampfl.fios.verizon.net] has joined #ruby
godotow [godotow!~godot@afam147.neoplus.adsl.tpnet.pl] has joined #ruby
<havenn> ujkanovic: your SheBang seems odd, I'm used to: #!/usr/bin/env ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
bosphorus [bosphorus!~bosphorus@85.102.54.255] has joined #ruby
<kuzushi> why cant it be called a hebang?
siezer [siezer!siezer@dtmf.org] has joined #ruby
<kuzushi> I feel as though it's not male favored enough.
<Zal> I want to perform an operation <count> times. Would the cleanest way to write this be a while loop that increments the counter?
<siezer> is there a way to query rubygems.org to find out which gems have a requirement in their gemspec?
<Zal> I feel like I want to write a range expression somehow
<siezer> "give me a list of all gems that require ruby 1.9.3"
erneze [erneze!55abc199@gateway/web/freenode/ip.85.171.193.153] has joined #ruby
<erneze> minitest/benchmark isn't in the 1.9.2 build ?
Squee-D [Squee-D!~Squee-D@static.visfleet.com] has joined #ruby
Amirh [Amirh!~amir@2.181.27.13] has joined #ruby
<kenichi> Zal: Integer#times
NinoScript [NinoScript!~Adium@186-106-167-142.baf.movistar.cl] has joined #ruby
NinoScript [NinoScript!~Adium@186-106-167-142.baf.movistar.cl] has quit [#ruby]
KarlHungus [KarlHungus!~relax@unaffiliated/adj] has quit [#ruby]
Spockz` [Spockz`!~Spockz@21pc198.sshunet.nl] has joined #ruby
dark3rdre4ms [dark3rdre4ms!~Ethan@99.102.186.14] has joined #ruby
dark3rdre4ms [dark3rdre4ms!~Ethan@unaffiliated/eth4n] has joined #ruby
Spockz` [Spockz`!~Spockz@21pc198.sshunet.nl] has joined #ruby
<v4n_> hi
Synthead [Synthead!~max@173-165-179-126-atlanta.hfc.comcastbusiness.net] has joined #ruby
nanderoo [nanderoo!~nanders@38.124.137.226] has quit [#ruby]
<v4n_> is there a ruby equivalent for this mysql command? TIME_TO_SEC(TIME(FROM_UNIXTIME(#{Time.now.to_i})))
incluye [incluye!~incluye@LO1-ESR-74-215-187-208.fuse.net] has joined #ruby
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby
<Zal> kenichi, thanks!
<Brozilla> v4n_ strftime?
Amirh [Amirh!~amir@2.181.27.13] has joined #ruby
<Brozilla> Time.now.strftime("%s")
<Zal> Can I declare an instance variable outside of a method? Like "class Foo @thing = something end" ?
ascarter [ascarter!~ascarter@67-42-84-171.tukw.qwest.net] has joined #ruby
Greed [Greed!47fbe588@gateway/web/freenode/ip.71.251.229.136] has joined #ruby
<Greed> Oi!
incluye [incluye!~incluye@LO1-ESR-74-215-187-208.fuse.net] has joined #ruby
<Greed> In a statement like 'Dir['idea-*.txt'].each do |file_name|', what does the variable file_name serve as?
<Greed> Does it function as an argument of sorts?
Amirh [Amirh!~amir@2.181.27.13] has joined #ruby
<v4n_> Brozilla, can you explain what this mysql command does?
<Zal> Greed, it is a loop variable
<Greed> Can you link me to a ruby reference or summat?
Araxia_ [Araxia_!~Araxia@173-164-68-213-Oregon.hfc.comcastbusiness.net] has joined #ruby
<Zal> eh, not me, I'm just a googler
<Greed> Gross
* Greed puts his clothes on
<Brozilla> not sure, actually v4n_ :p
jay_zawrotny [jay_zawrotny!~Jay@c-68-43-28-43.hsd1.mi.comcast.net] has joined #ruby
QaDeS [QaDeS!~mklaus@frbg-4d029531.pool.mediaWays.net] has joined #ruby
yekta_ [yekta_!~yekta@r74-192-21-77.bcstcmta01.clsttx.tl.dh.suddenlink.net] has joined #ruby
tobym [tobym!~tobym@pool-173-56-80-136.nycmny.fios.verizon.net] has joined #ruby
luxurymode [luxurymode!~luxurymod@rrcs-184-75-21-18.nyc.biz.rr.com] has joined #ruby
<aces1up> hey guys, found this code online, does it seem thread safe to you? Its just a basic thread pool that reuses threads for work. http://burgestrand.se/code/ruby-thread-pool/
BrianE [BrianE!~brian@46.208.45.23] has joined #ruby
<shadoi> god I hate that style of documentation.
rbanffy [rbanffy!~rbanffy@187.31.77.7] has joined #ruby
<shadoi> aces1up: looks fine to me, Queue was created specifically to do this.
<kenichi> v4n_: from what i can tell, that mysql statement returns the number of seconds into a day that the given time is a.
quest88 [quest88!~quest88@12.181.53.99] has joined #ruby
<v4n_> kenichi, Brozilla yep, I've just figured out that it returns the number of seconds of a day. e.g. any day at 1am => 3600
<v4n_> now I have to make this in Ruby
Spockz` [Spockz`!~Spockz@21pc198.sshunet.nl] has joined #ruby
<kenichi> v4n_: if you're given a Time objec in variable `time`, you could do something really simple like `time.hour*60 + time.sec`
<kenichi> oops
<Brozilla> *3600 instead of 60, right?
<kenichi> i mean something like `time.hour*3600 + time.min*60 + time.sec`
<kenichi> or something
<v4n_> kenichi, yep I see
<v4n_> good point ;)
Greed [Greed!47fbe588@gateway/web/freenode/ip.71.251.229.136] has quit [#ruby]
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
<Zal> Working on koans. My DiceSet class fails this test when running "ruby <testrunner>", but the same test works fine in irb. Why?
<Zal> Any tips appreciated
<Zal> That is, in the testrunner, I get the same values for subsequent rolls. But they are always different when I run the same code manually in irb
<v4n_> hum, kenichi why TIME_TO_SEC(TIME(FROM_UNIXTIME(1323900983))) returns 58583 while t = 1323900983; t.hour * 3600 + t.min * 60 + t.sec returns 62183 ?
<workmad3> Zal: in irb, do first_roll = dice.roll(5); second_roll = dice.roll(5); p first_roll; p second_roll
phantomfake [phantomfake!~whats_in_@pool-71-190-229-236.nycmny.fios.verizon.net] has joined #ruby
<Zal> workmad3, hm, that's what I did, except for the puts. I will try again
Spockz` [Spockz`!~Spockz@21pc198.sshunet.nl] has joined #ruby
<workmad3> Zal: it's an important step ;)
raythecat [raythecat!~raythecat@adsl-108-81-52-145.dsl.sndg02.sbcglobal.net] has joined #ruby
<Zal> workmad3, here are my results: http://pastie.org/3017970
<workmad3> Zal: no... do the puts after you've done *both* rolls
pabloh [pabloh!~pablo@186.22.82.39] has joined #ruby
<Zal> oh
<Brozilla> v4n_, i think it's because your converting to a unix time first in the first example
<kenichi> v4n_: the difference there is 3600 aka 1 hour, so my guess is time zone issues
<pabloh> does anyone knows a visual class browser for ruby?
<pabloh> something ala-smalltalk
<workmad3> Zal: which is why you store the result and puts after you've done both rolls
jamiejackson [jamiejackson!~jamie@unaffiliated/jamiejackson] has joined #ruby
<Zal> workmad3, oh I get it now. Thanks. What's the best way to return a copy of an Array?
<Zal> (I assume that's what my values method needs to do)
<Zal> or maybe I should just reassign @dice instead of clearing it. That makes more sense.
<zamolxis> Array2 = Array1.clone ?
<Zal> Hm, I didn't see #clone in the ref
<Zal> re-assinging it did work. Thanks again workmad3
<Zal> zamolxis, do all objects have #clone?
<workmad3> Zal: personally, I'd have suggested you created another DiceRoll object :)
<workmad3> Zal: but also, .clone or .dup the array before passing it out of the class... don't accidentally expose your internal state
<zamolxis> Zal: it seems all objects have .clone. I just tested.
<Zal> workmad3, hm, ok, will do. As for another DiceRoll, I don't disagree, but the the goal is to satisfy the pre-written tests :-)
<Zal> zamolxis, thank you
<zamolxis> no problem :-)
burgestrand [burgestrand!~burgestra@h-163-174.a155.priv.bahnhof.se] has joined #ruby
mikalv [mikalv!~mikalv@login.11s.no] has joined #ruby
dhodgkin [dhodgkin!~dhodgkin@cpe-76-179-199-112.maine.res.rr.com] has joined #ruby
cousine [cousine!~cousine@196.221.61.89] has joined #ruby
statarb3 [statarb3!~CoreD@unaffiliated/statarb3] has joined #ruby
ascarter [ascarter!~ascarter@67-42-84-171.tukw.qwest.net] has joined #ruby
ilyam [ilyam!~ilyam@eng.nat.mtv.ooyala.com] has joined #ruby
raluxgaza [raluxgaza!~raluxgaza@host-78-146-236-164.as13285.net] has joined #ruby
TomJ [TomJ!~TomJ@unaffiliated/tomj] has joined #ruby
apok_ [apok_!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
<Zal> Hm, looks like "modules" in ruby are something like abstract classes.
Spockz` [Spockz`!~Spockz@21pc198.sshunet.nl] has joined #ruby
<Zal> eh, more like an abstract superclass I guess
wedgeV [wedgeV!~wedge@static-96-239-100-26.nycmny.fios.verizon.net] has joined #ruby
<Zal> And a file full of ruby modules and classes is a "gem"?
<samuelkadolph> Zal: gems can have any number of files
<Zal> samuelkadolph, ok, I'll have to look into what makes a group of files into a gem
<samuelkadolph> The rubygems library will do that for you if you make a gemspec
<Zal> it seems that the .rb suffix is enough for a single file gem
thatryan [thatryan!~thatryan@c-24-4-167-46.hsd1.ca.comcast.net] has joined #ruby
<samuelkadolph> gem install bundler && bundle gem foo will get you started with a basic gem
amacgregor [amacgregor!~amacgrego@CPE00222dcb0a53-CM00222dcb0a4f.cpe.net.cable.rogers.com] has joined #ruby
<Zal> samuelkadolph, ok, thanks, I'll check that out eventually. (Still at a more remedial stage)
randym [randym!~randym@EM114-48-35-42.pool.e-mobile.ne.jp] has joined #ruby
<Zal> samuelkadolph, would foo be, say, a directory of .rb files in that case?
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
<samuelkadolph> It's the name of your gem
<Zal> samuelkadolph, hm, so that command is useful prior to any code being written?
<samuelkadolph> Yes, it gets a basic structure for your gem
<Zal> gotcha, thank you
<samuelkadolph> gets you*
thismat [thismat!~thismat@99-9-71-34.lightspeed.ftwotx.sbcglobal.net] has joined #ruby
ikaros [ikaros!~ikaros@dslb-084-059-073-057.pools.arcor-ip.net] has joined #ruby
cwd1 [cwd1!~cwd1@cpe-76-176-105-158.san.res.rr.com] has joined #ruby
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby
<Na_Klar> x[y[0]] is not valid in ruby?
<Na_Klar> x[y[0]] = value
<davidcelis> if y[0] evaluates to a number and x is an Array
<davidcelis> or if x is a Hash
<Na_Klar> oh
<Na_Klar> so there are no associative array-keys in ruby?
<davidcelis> what?
<Na_Klar> y['string']
macabre [macabre!~macabre@63.133.215.18] has joined #ruby
<Zal> Na_Klar, yes, called hashes
<davidcelis> that's for hashes
<Na_Klar> aha
Evixion` [Evixion`!Evixion@67.235.65.134] has joined #ruby
ontehfritz [ontehfritz!~ontehfrit@CPE0020a6543eed-CM0026f399f8dd.cpe.net.cable.rogers.com] has joined #ruby
andrewpthorp [andrewpthorp!~andrewpth@c-98-244-88-92.hsd1.va.comcast.net] has joined #ruby
looopy [looopy!~looopy@pool-141-156-47-88.washdc.btas.verizon.net] has joined #ruby
tar_ [tar_!~tar@d118-75-81-132.try.wideopenwest.com] has joined #ruby
<Na_Klar> when I "Thread.start(server.accept)" will there be a new thread started for each CLIENT or for each REQUEST?
rook_flood [rook_flood!~textual@3.d3bed1.client.atlantech.net] has joined #ruby
chessguy [chessguy!~chessguy@pool-74-96-111-119.washdc.fios.verizon.net] has joined #ruby
closedbracket [closedbracket!~closedbra@smtp.goodmortgage.com] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
tsykoduk [tsykoduk!~tsykoduk@ec2-50-17-190-196.compute-1.amazonaws.com] has joined #ruby
pen [pen!~pen@2001:288:1001:28:185:37b3:23c9:2b51] has joined #ruby
Manhose_ [Manhose_!~Manhose@a94-132-167-54.cpe.netcabo.pt] has joined #ruby
danneu [danneu!~dan@c-98-200-231-154.hsd1.tx.comcast.net] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@27-142-96-128.rev.home.ne.jp] has joined #ruby
jbhewitt [jbhewitt!~jbhewitt@ppp59-167-157-127.static.internode.on.net] has joined #ruby
QKO [QKO!~reaVer@banzai.speedxs.nl] has joined #ruby
mads- [mads-!~mads@2808ds1-by.0.fullrate.dk] has joined #ruby
norex [norex!~quassel@41-135-90-128.dsl.mweb.co.za] has joined #ruby
_numbers [_numbers!~xxxxxx@unaffiliated/numbers/x-253875] has joined #ruby
Saturn_ [Saturn_!~Melli@188-220-36-141.zone11.bethere.co.uk] has joined #ruby
<mads-> Hi. If I have a <tr> object with mechanize can I then somehow say I want the third td-object from that?
<SaturnMoth> hullo!
SaturnMoth [SaturnMoth!~Melli@188-220-36-141.zone11.bethere.co.uk] has quit [#ruby]
akem [akem!~akem@127.147.12.93.rev.sfr.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
nanoyak [nanoyak!~nanoyak@50-0-164-69.dsl.dynamic.sonic.net] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@67.139.75.158] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has quit [#ruby]