apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p286: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com
<shevy> yaymukund: yeah it works on windows too
dnstbr has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<yaymukund> shevy: ty
<banisterfiend> apeiros_: steveklabnik is a bigger dick that i guessed
<apeiros_> maybe he's mooning
<shevy> yaymukund: it is usually better to rely on what is inbuilt into ruby than on system()
<apeiros_> oh, wait, that doesn't mean what I thought it would :-S
<banisterfiend> than*
jonathanwallace has joined #ruby
<yaymukund> yeah, I just found an SO answer that suggests similarly. I'll replace as much as I can with FileUtil equivalents
reinaldob has quit [Remote host closed the connection]
_alejandro has quit [Remote host closed the connection]
anachronistic has joined #ruby
anachronistic has quit [Client Quit]
<apeiros_> well, what I meant - maybe it's just some temporal thing. but yes, I agree, his line of "argumentation" was rather dickish.
<mrkris> It's best practice to avoid system calls if the app is going to be cross platform
mascool has joined #ruby
axl_ has quit [Quit: axl_]
daniel_-_ has quit [Ping timeout: 264 seconds]
<Spaceghostc2c> banisterfiend: We're all mostly dicks.
<Spaceghostc2c> It just happens that some of our dicks are bigger than others.
<blazes816> and some people can't deal with they're small dick and pick fights about oop on irc
<blazes816> the world is a crazy place
BeLucid has quit [Read error: Connection reset by peer]
<apeiros_> Spaceghostc2c: up until "where did you hear about OO" it was an argument. that one line was ad-hominem, and I should have called it out right there and walked off.
axl_ has joined #ruby
<shevy> whoa... never saw that before
<apeiros_> at least chris2 apologized for it
<shevy> class Hoe
<shevy> def self.files= x
BeLucid has joined #ruby
<shevy> is that common to see? no () ?
slainer68 has joined #ruby
<Jdubs> Can someone please help me fix an error. says unexpected expected end http://pastie.org/5348509
<shevy> Jdubs you forgot an "end"
<blazes816> shevy: unfortunately
<Jdubs> Shevy: O.o
<shevy> Jdubs: I see that you do not use constistent layout on that pastie
<Jdubs> Shevy: Yeah i counted everything that should open a bracket and how many ends i have...it was the same number
<shevy> *consistent
<apeiros_> Jdubs: indent 'else' on the same level as the 'if'
<mrkris> he didn't forget, he has too many ends
<shevy> look at the "else" on line 6
<apeiros_> you should see the superfluous ifs then
awaage has quit [Quit: awaage]
<apeiros_> meh, the superfluous end's, I mean
<shevy> so many loose ends!!! Jdubs why do you torture ruby that way
<apeiros_> there's 3 of them
<Spaceghostc2c> Well honestly, I'm pretty sure no one really understands OO.
<Jdubs> hmmmm
<Jdubs> Why are they extra?
<apeiros_> I'd say many people understand OO. but there are different ways to look at it. tradeoffs again.
<shevy> Spaceghostc2c: well depends on the definition, it's just a model after all. I like Alan Kay's original definition more than the C++ definition
awaage has joined #ruby
mrkris has quit [Quit: 'MURICA!]
punkrawkR has quit [Read error: Connection reset by peer]
SuperrMann has quit [Quit: Computer has gone to sleep.]
<shevy> Jdubs: no no just fix your indent first, then 85% of your problems there are gone
<apeiros_> i.e. what I understand under OO doesn't necessarily match with what you understand under OO
mmorsi_mobile has quit [Ping timeout: 265 seconds]
<shevy> Jdubs: right in that pastie of yours there :)
<Spaceghostc2c> shevy: I just can't really say that I know any one person who really understands it so much as has some semblance of a notion of how it is.
<apeiros_> and that doesn't mean that your or my understanding was wrong. just different.
<shevy> Spaceghostc2c: man, this is the PERFECT topic to talk about while having some beer!
freakazoid0223 has quit [Read error: Connection reset by peer]
* apeiros_ agree's with shevy
<Jdubs> shevy: the indents look just fine on my computer :/
<shevy> ok but look at the pastie
<Jdubs> unless you mean the indented elses? I thought elses required an end, that's why they are indented
<shevy> your if/else/end are not on the same vertical lines
<shevy> I mean those belonging to the same level that is
<shevy> ah that explains it
Girls_Escort_Clu has joined #ruby
<shevy> Jdubs: "else" can not be used standalone like that
<Jdubs> Shevy: I thought an else statement was to be indented, and required an end. Are both of those things wrong?
<shevy> "if" or "unless" could
<shevy> if foo
<shevy> else bar
<shevy> end
<Jdubs> oic
<shevy> but not ...
<shevy> if foo
<shevy> else bar
<shevy> end
mmitchell has joined #ruby
<apeiros_> gah, pastie down
<shevy> like my pants!!!
<Spaceghostc2c> Personally, I think java, c++ and other less 'fun' languages have a better grasp of OO and put it into practice better than any ruby developer.
<shevy> hmm
<apeiros_> Jdubs: your code correctly indented: https://gist.github.com/b6077d09b062499714b8
<blazes816> interesting
<shevy> well, that may be, they enforce their world view more rigidly than ruby does
<shevy> ruby even allows redefining constants :\
<Spaceghostc2c> The whole ruby community feels like it's too entrenched in 'lol roobee ith fun' to think about design, let alone the last 20 years of OO knowledge.
<shevy> ruby is fun!
<blazes816> I think that's been changing the past couple of years
Nanuq has joined #ruby
<shevy> yeah
<Spaceghostc2c> blazes816: It's still shit.
<shevy> all the test-code changed ruby
<blazes816> for sure
<blazes816> for now?
<shevy> "You must write unit tests."
<Spaceghostc2c> Hopefully it'll change where people not only teach ruby, but they teach design and OO basics.
<Jdubs> @Apeiros_ but why did you take my last if statement out of the class?
<blazes816> my boss started programming with ruby. he just learned about trees last week
<Spaceghostc2c> It's almost sad that only the fringe and super pro rubyists seem to be onto it.
<shevy> trees?
<apeiros_> Jdubs: I didn't, you did ;-) I took exactly your code and only indented it properly.
<blazes816> the data structure
<blazes816> yeah
<shevy> the green ones?
ffranz has quit [Quit: Leaving]
<blazes816> unfortunately not
<Spaceghostc2c> shevy: Those things you look at from inside when you're coding.
slainer68 has quit [Ping timeout: 240 seconds]
<shevy> hehe
<blazes816> he did claim once he "blew his tree", which got an office-wide snicker
<apeiros_> Jdubs: I did not add any code or correct anything. I'm just making the mistakes in your code obvious, so you see what is to fix
pkrnj has joined #ruby
tbrock_ has joined #ruby
<shevy> blazes816: ok still not quite getting it... he started with ruby, and learns about ... what exactly? arrays? or you mean tree-like node structures? i.e. hash? kinda weird way to learn ruby I think...
<shevy> lol
<shevy> naughty tree
<shevy> you are having too much fun in your office apparently
<Spaceghostc2c> Sexually active trees. Gosh gosh.
<blazes816> what I mean is that ruby was his first lang (he's been programming ~5 years). he's just learning about tree data structures this week
<blazes816> not enough fun man
<Spaceghostc2c> Data structures making wee data structures with other data structures.
<shevy> oh
<Spaceghostc2c> "Oh, I'm gonna datum, I'm gonna datum."
<blazes816> lmao
<shevy> hmm 5 years
<blazes816> yeah, it's sad
<Spaceghostc2c> Is he illiterate? Cause I am, and shit it takes forever to learn things. :(
awestroke has quit [Remote host closed the connection]
centipedefarmer has quit [Remote host closed the connection]
<blazes816> ah, that's sad
horofox has quit [Quit: horofox]
<blazes816> no, he's just a 'computer science major', if you know what I mean
<apeiros_> blazes816: wah?
<apeiros_> I can understand 5y of programming without knowing trees
<apeiros_> but cs major?
<blazes816> lol, yeah, I know
<apeiros_> I mean… that's like 1st semester in CS classes around here…
<blazes816> but if his university was anything like mine I understand
<blazes816> it was awful
<apeiros_> s/like//
<apeiros_> :-S
<blazes816> students at my school didn't "learn how to install linux" to start learning c until last semester of the 2nd year
horofox has joined #ruby
awaage has left #ruby [#ruby]
Michael_ has joined #ruby
<shevy> hmm
<apeiros_> with what did you guys start off then? all the math, so most poor lads got scared away? o0
<shevy> they started with parties
thinkdevcode has quit [Remote host closed the connection]
<shevy> and recruit math majors from abroad
<shevy> :)
<blazes816> haha
<blazes816> they started with basic electrical engineering
<shevy> cool
<blazes816> the first year, literally, was entirely learning boolean algebra
<Spaceghostc2c> I think they should have to perform calculus on an abacus before they should even touch a computer.
<blazes816> and gen eds
centipedefarmer has joined #ruby
<Jdubs> Apeiros_: I got my battle class working :)
<apeiros_> cool! :)
<Jdubs> bed time now, you should probably go to bed too eh :P
<apeiros_> and I really should get some sleep… damn… 0130 again…
<Jdubs> LOL nice
<Jdubs> gnight man
* apeiros_ is on 3h average for this week…
<apeiros_> horrible, and I have no idea why I'm not yet a total wreck
<apeiros_> (normally even 2 nights with <5h render me utterly destroyed…)
<Spaceghostc2c> apeiros_: I mostly average 4 a night.
<apeiros_> doesn't sound healthy :) I usually sleep around 7h/night
thinkit2 has joined #ruby
bitZero__ has joined #ruby
<Jdubs> Apeiros_: why don't you go to bed then?!
<Jdubs> lol
<Jdubs> LEAVE, go SLEEP
<Spaceghostc2c> apeiros_: I'm young. For some reason, it's okay for now.
<apeiros_> heh
<apeiros_> enjoy it while you can, I guess ;-)
<Jdubs> shit, it doesn't matter how many hours i sleep, i'm exhausted when I wake up
<Jdubs> :/
<Jdubs> could sleep 5 or 12 hours
<apeiros_> oh, that's normal
<Jdubs> either way, tired when i wake up
<apeiros_> sport helps with that
<apeiros_> even as little as 5min
<Jdubs> yeah...i usually exercise a lot
<Jdubs> haven't been doing it lately
<Jdubs> been way too busy
<apeiros_> just do it right after waking up
<Jdubs> and it's been way too rainy outside for cycling
<Jdubs> :/
<apeiros_> just like 10 push ups or something
<Jdubs> yay, wales, rainiest country ever
<Jdubs> 10 pushups doesn't do much for me, i go cycling in the mountains for 2-3 hours at a time :P
<Jdubs> just haven't been on my bike in a month or two
<Jdubs> starting to feel tired all the time
<apeiros_> it's not about doing much
<apeiros_> it's about getting your circulation flowing and stop feeling tired
clj_newb has quit [Ping timeout: 245 seconds]
moshee has quit [Ping timeout: 248 seconds]
<apeiros_> it's not meant to be a workout
elaptics is now known as elaptics`away
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<Jdubs> oic
<Jdubs> xD
<Jdubs> I wish I was one of those morning people that wakes up refreshed
joshman_ has quit [Ping timeout: 265 seconds]
<Jdubs> i would pay serious money to wake up refreshed every morning
jrist is now known as jrist-afk
<Jdubs> and my back not hurt
<Spaceghostc2c> Jdubs: You could be. If you just moved morning to about noonish.
sebastorama has quit [Read error: Connection reset by peer]
<Jdubs> @Spaceghostc2c I have sleep apnea, and a really uncomfortable bed that hurts my back...I think i just don't get restful sleep honestly
tomzx_ has joined #ruby
<Jdubs> but you could be right
<Jdubs> i might just need to move around more
<Jdubs> Anyways, TIME TO SAY GOOD NIGHT TO MY PROGRAMMING ADDICTION
<Jdubs> and you probably should to apeiros
jake__ is now known as jhgaylor
<Jdubs> good night all o/
<apeiros_> right, right
<apeiros_> n8 all
<Jdubs> quit
Jdubs has quit [Quit: Jdubs]
apeiros_ has quit [Remote host closed the connection]
strangeworks has joined #ruby
ddd has quit [Ping timeout: 245 seconds]
axl_ has quit [Quit: axl_]
rellin has quit [Ping timeout: 246 seconds]
ddd has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
Tearan has joined #ruby
nari has joined #ruby
Girls_Escort_Clu has quit []
CaptainJet has joined #ruby
jenrzzz has joined #ruby
ij has quit [Read error: Connection reset by peer]
vickaita has quit [Ping timeout: 240 seconds]
medik has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
codespectator has quit [Quit: Computer has gone to sleep.]
erichmenge has joined #ruby
charliesome has joined #ruby
ABK has quit [Read error: Connection reset by peer]
banjara has quit [Quit: Leaving.]
kiyoura has joined #ruby
ABK has joined #ruby
ddd has quit [Quit: Leaving.]
pkrnj has quit [Quit: Computer has gone to sleep.]
Juul has joined #ruby
artOfWar has quit [Remote host closed the connection]
tomsthumb has joined #ruby
fyolnish has joined #ruby
steffes has joined #ruby
hsbt_away is now known as hsbt
centipedefarmer has joined #ruby
Kyril has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
Agis__ has joined #ruby
arya_ has joined #ruby
bigmac has joined #ruby
ABK has quit [Read error: Connection reset by peer]
Roa has quit [Ping timeout: 252 seconds]
ABK has joined #ruby
Agis__ is now known as eeer
<eeer> i'm kinda confused about VMs and Ruby
<eeer> so Ruby 1.9 uses YARV, right?
<eeer> so the ruby vm is basically a compiler? or more?
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
centiped_ has joined #ruby
maxer has quit [Quit: maxer]
ABK has quit [Read error: Connection reset by peer]
osvico has quit [Ping timeout: 240 seconds]
tomsthumb has quit [Quit: Leaving.]
codecaster has quit [Read error: Connection reset by peer]
ABK has joined #ruby
joeycarmello has quit [Remote host closed the connection]
centipedefarmer has quit [Ping timeout: 252 seconds]
codecaster has joined #ruby
<Spaceghostc2c> eeer: Um, it produces and executes bytecode.
<eeer> so when I do a ruby myprogram.rb on my shell, i'm essentially using the ruby vm?
stkowski has quit [Quit: stkowski]
erichmenge has quit [Read error: Connection reset by peer]
erichmenge has joined #ruby
centiped_ has quit [Remote host closed the connection]
eph3meral has left #ruby [#ruby]
yshh has joined #ruby
`brendan has joined #ruby
<eeer> eg. YARV?
piotr has joined #ruby
SCommette has quit [Quit: SCommette]
<piotr> hi
<swarley_> eeer; a VM is something that handles bytecode, or the garbage collection of objects. Any scripted language requires the use of one
<swarley_> That definition by the way, is a very bad one. And i should be beaten for it
<eeer> heh
<swarley_> But yes
<swarley_> if you run a ruby script, you are using the VM
<eeer> I see
<eeer> i thought it was only an interpreter
twinturbo has quit [Quit: twinturbo]
davidcelis has quit [Quit: K-Lined.]
tUze has quit [Ping timeout: 240 seconds]
<swarley_> if you use JRuby you are using JVM, if you use Rubinius i think they use LLVM
<swarley_> MRI uses YARV
<piotr> dialog.setItems(R.array.difficulty) do |dialogInterface, i| <-- what exactly is this? call to setItems with two args?
<swarley_> 1.8 uses nothing but a syntax tree
moshee has quit [Ping timeout: 240 seconds]
<piotr> is the do blcok an argument?
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<eeer> i just searched for VMs on wiki and I didn't understand much of it
<eeer> :/
<swarley_> piotr; the block is technically considered a block. But you can think of it as an argumenyt
<swarley_> -y
emmanuelux has quit [Remote host closed the connection]
<piotr> I tried to assign a block to a variable but I'm not able
h4mz1d has joined #ruby
<piotr> like a = do |v|; puts "hi"; end
<swarley_> Oh, you cant just do something like, x = do ... end
<piotr> why?
<swarley_> you have to use the proc, lambda, or stabby lambda keyword
<swarley_> proc { ... } lambda { ... } -> { ... }
<Spaceghostc2c> swarley_: It's still an argument.
<swarley_> lambdas and procs are different, but in general, both will suit you
<piotr> how come in mirah, there are those setOnclik do |v| ...
<piotr> I don't get what's going on
<swarley_> Spaceghostc2c; try to put it in parentheses
<Spaceghostc2c> swarley_: That doesn't mean it's not an argument.
<piotr> the value of a do block is not a callable?
joeycarmello has joined #ruby
<swarley_> Its a block. Not an argument
<Spaceghostc2c> I don't use parentheses unless I absolutely have to.
<Spaceghostc2c> swarley_: But a block is an argument to the message.
yshh has quit [Remote host closed the connection]
<piotr> a block is like a function pointer?
carlyle has joined #ruby
<swarley_> piotr; you can think of it as one, like an annoynmous function
<swarley_> I'm just saying. Blocks have to come AFTER and argument list
<Spaceghostc2c> swarley_: So do hashes.
<swarley_> an*
<Spaceghostc2c> They have to be on the end.
<Spaceghostc2c> That doesn't mean a block isn't an argument.
<swarley_> Yes? Only if you want to use inline style
<eeer> is ruby actively developed on this account? https://github.com/ruby/ruby
<eeer> or they use something else and this is just a port?
<Spaceghostc2c> eeer: It's a mirror.
<eeer> oh ok
<swarley_> you can still do foo(1,{:bar => 12}, "hi")
<eeer> where I can find the official?
<Spaceghostc2c> swarley_: And splatting.
<Spaceghostc2c> eeer: Google.
<Spaceghostc2c> Use more google.
<eeer> ok ty
b26 has joined #ruby
bricker_ has quit [Quit: leaving]
`brendan has quit [Ping timeout: 246 seconds]
b26 is now known as `brendan
kaneda__ has quit [Ping timeout: 276 seconds]
<swarley_> Splats are just arrays. You're really just arguing to argue at this point. Blocks just aren't the same as a general listed argument
bricker has joined #ruby
jjang has quit [Remote host closed the connection]
<Spaceghostc2c> swarley_: They are the same, sorry. They have particular limitations, but they're still arguments.
<Spaceghostc2c> It doesn't make sense that they aren't. They are, they're just special.
<swarley_> Blocks are blocks
<Spaceghostc2c> Strings are strings.
<Spaceghostc2c> Both can be arguments.
<swarley_> Yes? But you can put a string in parens
<swarley_> Put a do ... end in parens
<Spaceghostc2c> swarley_: I can put a block in parens.
<swarley_> [2] pry(main)> [1,2,3].each(do |x|; puts x; end)
<swarley_> SyntaxError: unexpected keyword_end, expecting $end
<swarley_> [1,2,3].each(do |x|; puts x; end)
<Spaceghostc2c> swarley_: What do parens have to do with being arguments?
Juul has quit [Quit: Leaving]
yshh has joined #ruby
<eeer> so yarv is written in C
<eeer> right?
joeycarmello has quit [Remote host closed the connection]
<Spaceghostc2c> eeer: Google.
<Spaceghostc2c> swarley_: I think that if that's your argument, none of my ruby methods use arguments, because I don't use parens unless I have to.
nari has quit [Ping timeout: 245 seconds]
arubin_ has joined #ruby
<Spaceghostc2c> I think that saying that if it can't go in parens that it's not an argument is pretty ass backwards thinking.
<jhgaylor> swarley_: heaven forbid you check out objective c. your world *blown*
<Spaceghostc2c> jhgaylor: If the syntax were cooler, I'd like it a lot more. Managing and being aware of your objects, the whole ecosystem, it's pretty slick.
apok has joined #ruby
<swarley_> Spaceghostc2c; I'm saying, that you cannot possibly place it in an argument list, it MUST COME AFTER the arguments you pass to the method
<jhgaylor> Spaceghostc2c: i'm still iffy on it. I like the idea, but I don't know how I feel about using it
<Spaceghostc2c> swarley_: It's still an argument. It just has to come at the end of the list.
<blazes816> it's just the last argument
<Spaceghostc2c> You can insist it isn't, but it really is.
<swarley_> blazes816; if its the last then you can put a comma
<blazes816> wat
<Spaceghostc2c> swarley_: I think your reasoning is backwards.
freakazoid0223 has joined #ruby
ephemerian has quit [Quit: Leaving.]
<Spaceghostc2c> swarley_: How does it get passed to the receiver without it being an argument?
<Spaceghostc2c> Splain that, Lucu.
<Spaceghostc2c> Splain that, Lucy.
hackerdu_ has quit [Remote host closed the connection]
<blazes816> commy
viktor_ has quit [Ping timeout: 265 seconds]
kaneda__ has joined #ruby
apok_ has quit [Ping timeout: 240 seconds]
Juul has joined #ruby
aantix_ has joined #ruby
<kaiyin> hi, I am trying to extract some info from a webpage, in the div#content part, using every h2 as a key and every p following as the corresponding value of the key. How can I do this? The link is here: http://nihes.nl/courses/snps-and-human-diseases/
<Spaceghostc2c> Also, you can pass a reference to a block to a method.
centipedefarmer has joined #ruby
aantix_ has quit [Client Quit]
<Spaceghostc2c> If you have a reference to a block &block_bro, you can do receiver.method(arg, arg, block_bro)
<Spaceghostc2c> Proofed.
<Spaceghostc2c> swarley_: You're wrong.
hackerdude has joined #ruby
<blazes816> kaiyin: use nokogiri, and use mechanize if you're spidering this site
xid has joined #ruby
<blazes816> don't forget the comma!
<Spaceghostc2c> blazes816: Did I miss it?
<blazes816> swarley_: blazes816; if its the last then you can put a comma
<blazes816> i'm mostly just goofin
<Spaceghostc2c> U so goofy, bro.
<blazes816> oh tell me about it
aantix has quit [Ping timeout: 255 seconds]
<Spaceghostc2c> blazes816: Should I? I might have to prepare a sonnet.
<blazes816> i do not object
<xid> if /Library/Ruby/Gems/1.8 is in my gems path, is it going to find /Library/Ruby/Gems/1.8/gems/rghost-0.8.7.9/lib/rghost.rb when I do require 'rghost'
<Spaceghostc2c> xid: Yes.
<xid> because all I get is `require': no such file to load -- rghost (LoadError)
<Spaceghostc2c> xid: You inspected the path?
<xid> i did ruby env
<xid> and it output my gems paths
<xid> there are three
<xid> er, gem env
<kaiyin> blazes816: I am using nokogiri, and I can extract headings and paragraphs separately, but I don't know how to define the mapping between one h2 and its following p.
<t0rc> I'm using JSON files to denote some logical groupings (packages of sorts). Is it better though to rename the package.json to something else more relevant despite adhering to package.json specs? or should I leave it?
viktor_ has joined #ruby
<piotr> can't I access self inside a block?
<tjbiddle> is it possible to verify the order of steps in an rspec test? (make sure method1 was called before method2)
<Spaceghostc2c> piotr: There is always self always. Your job is to know what self is.
tomzx_ has quit [Ping timeout: 246 seconds]
<kaiyin> suppose i have this object x = doc.css['div#content h2'][0], how can I get the paragraph immediately after it?
mrsolo has quit [Quit: Leaving]
enderx86 has joined #ruby
<xid> hm my ruby and gem aliases in /usr/bin point to two different places
<xid> maybe that's it
swarley has quit []
<jhgaylor> idk if this helps but the css rul is div#content h2 > p:first-child
<blazes816> kaiyin: something to the effect of: info = Hash.new[*doc.css('#content>h2, #content>p').each_with_object([]){|el, list| list << el}]
swarley_ is now known as swarley
elico has quit [Quit: elico]
<blazes816> s/el/el.text()/
<piotr> can't I access self inside a block?
<piotr> ups, sorry
vickaita has joined #ruby
brianpWins has quit [Quit: brianpWins]
pkrnjevi_ has joined #ruby
stw has quit [Read error: Connection reset by peer]
<piotr> funny that this doesn't work:
<piotr> b.setOnClickListener do |v|
<piotr> end
<piotr> self.click(v)
<Spaceghostc2c> piotr: Of course you can. There is always a notion of self.
<piotr> but this does:
<Spaceghostc2c> piotr: gist.github.com
<piotr> this = self
<piotr> b.setOnClickListener do |v|
<piotr> this.click(v)
<piotr> end
<piotr> Spaceghostc2c: ok, sorry
<Spaceghostc2c> piotr: go inspect what self is at the moment.
pkrnjevi_ is now known as pkrnj
osvico has joined #ruby
DemeGeek has joined #ruby
<blazes816> kaiyin: get it?
<xid> hm that didn't fix it
<xid> why would it fail to load a gem that's there in my gems path?
banisterfiend has quit [Ping timeout: 252 seconds]
<xid> maybe there's another more reliable gem i can test instead of rghost
<xid> any suggestions?
otters has quit [Ping timeout: 251 seconds]
minijupe has quit [Quit: minijupe]
<t0rc> I'm going to use git from Ruby. Is ruby-git still the way to go for wrappers or is there a better one? ruby-git doesn't seem to have seen updates in a long time.
arya_ has quit [Ping timeout: 244 seconds]
h4mz1d has quit [Ping timeout: 246 seconds]
<xid> Spaceghostc2c: the path doesn't need to be in my bash $PATH does it?
<xid> the gems path?
<blazes816> no
<xid> i gem installed haml
<xid> and it doesn't find it even after i require 'haml'
<xid> `require': no such file to load -- haml (LoadError)
<xid> even though the gems path is correct when i type gem env
sn0wb1rd has joined #ruby
<Spaceghostc2c> xid: $LOAD_PATH I think is the variable.
<Spaceghostc2c> xid: In ruby itself.
Michael_ has quit [Remote host closed the connection]
<xid> I guess that's what is printed by the gem env command
arya_ has joined #ruby
<blazes816> it is not
<blazes816> open irb
<Spaceghostc2c> No.
<Spaceghostc2c> Do what blazes816 says, he's reasonably cogent.
<blazes816> :) …………… :(
<xid> it loads it from irb
<xid> just not from my script...
<Spaceghostc2c> Sorry, can't help you. You're resistant to trying things.
<xid> i did what you suggested
<xid> open irb, right? k, done
joofsh has joined #ruby
<xid> i did irb -r haml
<xid> no error message
<xid> success, right? It loaded the gem?
<blazes816> if it's fine and irb but not your script, then: echo "puts $LOAD_PATH" >> paths.rb; ruby paths.rb
savage- has quit [Remote host closed the connection]
<Spaceghostc2c> blazes816: ruby -e 'puts $LOAD_PATH'
<blazes816> Assuming irb is different for some reason, i would assume it'd be the same via that way
<blazes816> but idk
RantriX has joined #ruby
<xid> undefined local variable or method `paths' for main:Object (NameError)
<xid> On Mac Lion, shouldn't this be configured already?
<blazes816> lol
<xid> I guess I have to set $LOAD_PATH explicitly in every script
<Spaceghostc2c> xid: Depends.
<Spaceghostc2c> What ruby are you using?
<xid> 1.8 it says
<Spaceghostc2c> And why is it macruby?
dmiller has quit [Ping timeout: 246 seconds]
<xid> the one it came with
<xid> afaik
<blazes816> there was a ruby 1.8?
<Spaceghostc2c> Why>
<Spaceghostc2c> ?
<Spaceghostc2c> blazes816: Lol.
viktor_ has quit [Quit: This computer has gone to sleep]
<xid> no reason
<xid> other than I haven't downloaded and built a new one
<Spaceghostc2c> Get a reason or get ruby 1.9.
<xid> are you suggesting I do that?
<Spaceghostc2c> xid: USe rvm.
<xid> k
<Spaceghostc2c> rvm.io
<Spaceghostc2c> You'll need homebrew and a beer.
nari has joined #ruby
<enderx86> so i notice, from working with web app frameworks in python and java, that java's are far more verbose... and from working with maven, that python documentation is far more succinct. my question is, how does ruby fit into the picture? how verbose is rails? how much documentation do you have to read, compared to java and python, before you deploy your first rails application?
<Spaceghostc2c> It's rather expressive.
<Spaceghostc2c> And imo, better than both java frameworks for the web as well as python.
<blazes816> enderx86: depends what that application does
<Spaceghostc2c> enderx86: the gettingstarted guide should be enough.
<blazes816> but in general, quicker
<Spaceghostc2c> Then the guides themselves.
<Spaceghostc2c> It took me 30 minutes to go from guides to a craigslist clone back in the day.
<enderx86> in rails?
<blazes816> i bet it had a sweet yellow fading effect when shit changed
jxriddle has quit [Quit: Leaving...]
eignerchris has quit [Remote host closed the connection]
cdehaan has joined #ruby
<enderx86> Spaceghost: is that website a joke?
<cdehaan> Hello! I'm trying to execute the command "ruby filter.rb track", and I'm seeing this error: /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- bundler/setup (LoadError). However, I have bundler installed. What can I do?
gabrielrotbart has quit [Remote host closed the connection]
<Spaceghostc2c> enderx86: It's the big new thing, this magical COBOL. Didn't you know?
ttt has joined #ruby
tjbiddle_ has joined #ruby
tjbiddle_ has quit [Client Quit]
apok has quit [Quit: apok]
hbpoison has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
tjbiddle_ has joined #ruby
tjbiddle has quit [Ping timeout: 246 seconds]
tjbiddle_ is now known as tjbiddle
tjbiddle has quit [Client Quit]
eeer has quit [Quit: eeer]
hsbt is now known as hsbt_away
Serial_Killer_C has joined #ruby
vickaita has quit [Ping timeout: 260 seconds]
dogweather has joined #ruby
<xid> brew install libksba - curl: (18) transfer closed with 439213 bytes remaining to read
<dogweather> Octopress vs Jekyll Bootstrap? I only discovered Octopress after building a whole site with JB. :-P
Astral has joined #ruby
Michael_ has joined #ruby
Astral is now known as Guest45224
Guest89414 has quit [Ping timeout: 246 seconds]
<kaiyin> blazes816: I got an error: ArgumentError: wrong number of arguments(24 for 1)
<blazes816> kaiyin: get rid of the '.new'
<blazes816> just "Hash[*"
hbpoison has quit [Ping timeout: 245 seconds]
joeycarmello has joined #ruby
hbpoison has joined #ruby
<kaiyin> blazes816: got it. but it's not what I wanted.
<kaiyin> i want something like this: {'h2_a'=>'p_a', 'h2_b'=>'p_b'}
<Spaceghostc2c> dogweather: Rake tasks is what you get with octopress.
<Spaceghostc2c> A workflow.
carlyle has quit [Remote host closed the connection]
<kaiyin> i am also interested in extracting a passage right after an h2, and if the passage is missing, let the value be nil.
linoj has joined #ruby
<kaiyin> or 'NA'
<kaiyin> but thank you all the same.
<fir_ed> I have to generate an html table given a hash with format {"r4c4"=>"asdkokasd", "r4c5" => "asdjadklj"} where r4 = row 4, c4 = column 4. Anyone way to approach this?
butblack has left #ruby [#ruby]
JonnieCache has joined #ruby
nomenkun has quit [Ping timeout: 252 seconds]
<Spaceghostc2c> fir_ed: Write some tests. :)
dmerrick has joined #ruby
<fir_ed> Spaceghostc2c, I actually don't know how to approach writing this algorithm
<fir_ed> I've got test
<fir_ed> s
<dogweather> Spaceghostc2c: Interesting. JB does have 3 or 4 simple ones, to create a skeleton page and post.
TechCel has joined #ruby
tvw has quit [Ping timeout: 246 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
Michael_ has quit [Remote host closed the connection]
tvw has joined #ruby
dmerrick has quit [Client Quit]
kaiyin has quit [Quit: leaving]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
ckrailo has quit [Quit: Computer has gone to sleep.]
kbeddingfield has quit [Remote host closed the connection]
JonnieCache has quit [Read error: Operation timed out]
hsbt_away is now known as hsbt
kaiyin has joined #ruby
alexim has quit [Quit: sleep]
rakl has quit [Quit: sleeping]
BrianJ has joined #ruby
otters has joined #ruby
brianpWins has joined #ruby
Serial_Killer_C has quit [Remote host closed the connection]
dmerrick has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
nari has quit [Ping timeout: 256 seconds]
drbawb has quit [Quit: WeeChat 0.3.9]
hackerdude has quit [Read error: Connection reset by peer]
rakl has joined #ruby
codecaster has quit [Quit: Leaving.]
DemeGeek has quit [Ping timeout: 245 seconds]
Araxia has quit [Quit: Araxia]
kaiyin has quit [Quit: leaving]
dmiller has joined #ruby
jenrzzz has joined #ruby
steffes has quit [Remote host closed the connection]
nari has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
skcin7 has joined #ruby
horofox has quit [Quit: horofox]
judd7 has quit [Ping timeout: 255 seconds]
_alejandro has joined #ruby
hbpoison_ has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
Dreamer3 has joined #ruby
crackfu has joined #ruby
kaneda__ has quit [Ping timeout: 248 seconds]
carlzulauf has joined #ruby
hbpoison_ has quit [Ping timeout: 256 seconds]
hbpoison has joined #ruby
Hanmac1 has joined #ruby
<carlzulauf> I am trying to read a file and the last few characters show as "12v1 \"\r\n\u001A" on the console. Is that last \u001A a unicode identifier or something?
<carlzulauf> where can I find out exactly what that character is in unicode or ascii?
Hanmac has quit [Ping timeout: 264 seconds]
kbeddingfield has joined #ruby
erichmenge is now known as erichmenge_
bradhe has quit [Remote host closed the connection]
savage- has joined #ruby
becom33 has quit [Remote host closed the connection]
yaymukund has quit [Ping timeout: 252 seconds]
Guest41156 has quit [Quit: restarting client because for the lulz]
yaymukund has joined #ruby
zzyybb has joined #ruby
deadalus has left #ruby [#ruby]
Musfuut has joined #ruby
Musfuut is now known as Guest26813
dmerrick has quit [Quit: dmerrick]
steffes has joined #ruby
mascool has quit [Ping timeout: 268 seconds]
steffes has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 245 seconds]
steffes has joined #ruby
<carlzulauf> oh, its the Substitute character... acts as an EOF indicator in DOS systems, and this is a DOS format file, so makes sense.
beachandbytes has joined #ruby
haxrbyte has joined #ruby
kbeddingfield has quit [Ping timeout: 264 seconds]
KhanThoR has joined #ruby
KhanThoR has quit [Client Quit]
Ruler_Of_Heaven_ has quit [Read error: Connection reset by peer]
wroathe has joined #ruby
<wroathe> Stupid question: With minitest what's the difference between a spec and a test (besides syntax)
dakine has joined #ruby
ZubKonst has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
haxrbyte has quit [Remote host closed the connection]
SCommette has joined #ruby
haxrbyte has joined #ruby
pipopopo has joined #ruby
t0rc has quit [Quit: WeeChat 0.3.9]
reset has quit [Ping timeout: 264 seconds]
gabrielrotbart has joined #ruby
u89 has quit [Remote host closed the connection]
hsbt is now known as hsbt_away
xpen has joined #ruby
_adeponte has quit [Remote host closed the connection]
sn0wb1rd has quit [Ping timeout: 265 seconds]
LouisGB has quit [Ping timeout: 248 seconds]
dakine has quit [Quit: Leaving]
kaneda__ has joined #ruby
erichmenge has joined #ruby
savage- has quit [Quit: savage-]
djbpython has joined #ruby
nari has quit [Ping timeout: 246 seconds]
tvw has quit [Remote host closed the connection]
<beachandbytes> wroathe a test, ensures your code is meeting the spec
<beachandbytes> and should usually involve edge cases and invalid data
erichmenge_ has quit [Remote host closed the connection]
alvaro_o has quit [Quit: Ex-Chat]
<beachandbytes> edge cases and invalid data probably won't be in the spec
savage- has joined #ruby
vickaita has joined #ruby
whomp_ has quit [Quit: This computer has gone to sleep]
mmitchell has quit [Remote host closed the connection]
davidcelis has joined #ruby
havenn has joined #ruby
BoomCow has quit [Quit: This computer has gone to sleep]
beneggett has quit [Ping timeout: 255 seconds]
erichmenge_ has joined #ruby
erichmenge_ has quit [Client Quit]
dmiller has quit [Remote host closed the connection]
erichmenge_ has joined #ruby
ilyam has quit [Quit: ilyam]
vickaita has quit [Ping timeout: 245 seconds]
erichmenge has quit [Ping timeout: 252 seconds]
erichmenge_ is now known as erichmenge
beneggett has joined #ruby
judd7 has joined #ruby
mengu has quit [Remote host closed the connection]
ottbot has quit [Ping timeout: 246 seconds]
sn0wb1rd has joined #ruby
gyre007 has quit [Ping timeout: 260 seconds]
carlyle has joined #ruby
gyre007 has joined #ruby
carlzulauf has quit [Read error: Operation timed out]
phantasm66 has joined #ruby
phantasm66 has quit [Client Quit]
kbeddingfield has joined #ruby
whomp_ has joined #ruby
jipiboily has joined #ruby
freakazoid0223 has quit [Quit: Leaving]
jipiboily has quit [Client Quit]
judd7_ has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
ottbot has joined #ruby
carlzulauf has joined #ruby
emptyflask has joined #ruby
Todd has quit [Ping timeout: 246 seconds]
judd7 has quit [Ping timeout: 276 seconds]
judd7_ is now known as judd7
Vert has quit [Remote host closed the connection]
TechCel has quit [Ping timeout: 246 seconds]
djbpython has quit [Ping timeout: 246 seconds]
joeycarmello has quit [Remote host closed the connection]
ilyam has joined #ruby
kil0byte has joined #ruby
wroathe has quit [Ping timeout: 252 seconds]
rellin has joined #ruby
bricker has quit [Quit: Lost terminal]
SCommette has quit [Quit: SCommette]
ddd has joined #ruby
cj3kim has joined #ruby
cj3kim has joined #ruby
arya_ has quit [Ping timeout: 244 seconds]
bigmcq77 has quit [Quit: Computer has gone to sleep.]
bigmcq77 has joined #ruby
pothibo has quit [Quit: pothibo]
axl_ has joined #ruby
jadon has joined #ruby
erichmenge has quit [Quit: ZNC - http://znc.in]
erichmenge has joined #ruby
arya_ has joined #ruby
<jadon> Hello, I'm having an issue using net-http after switching to jruby 1,7.  I continue to get SSLErrors:Socket Closed but the same script works fine in using MRI. Please help if you can. I've looked everywhere.
ABK has quit [Ping timeout: 255 seconds]
BoomCow has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
erichmenge has quit [Client Quit]
steffes has quit [Remote host closed the connection]
cakehero has quit [Quit: Leaving...]
erichmenge has joined #ruby
crackfu has quit [Remote host closed the connection]
beachandbytes has quit [Ping timeout: 252 seconds]
crackfu has joined #ruby
tomsthumb has joined #ruby
kbeddingfield has quit [Remote host closed the connection]
DarthGandalf has quit [Ping timeout: 260 seconds]
ananthakumaran has joined #ruby
cdehaan has quit [Quit: cdehaan]
ABK has joined #ruby
djbpython has joined #ruby
statarb3 has quit [Ping timeout: 246 seconds]
jonathanwallace has joined #ruby
arubin_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
judd7 has quit [Ping timeout: 246 seconds]
niklasb has quit [Ping timeout: 240 seconds]
beachandbytes has joined #ruby
steffes has joined #ruby
DarthGandalf has joined #ruby
radic has joined #ruby
Tombar has joined #ruby
plains has quit [Ping timeout: 260 seconds]
plains has joined #ruby
radic_ has quit [Ping timeout: 264 seconds]
hsbt_away is now known as hsbt
<BoomCow> have you guys ever worked for equity
<BoomCow> and cash to follow later
ryanf has joined #ruby
<davidcelis> No
<davidcelis> that's just crazy to me
joofsh has quit [Remote host closed the connection]
savage- has quit [Quit: savage-]
RantriX has quit [Remote host closed the connection]
savage- has joined #ruby
SCommette has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
minijupe has joined #ruby
fir_ed has quit [Quit: Leaving]
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
<Edward__> How do I create a method that accepts an options hash?
dakine has joined #ruby
krz has joined #ruby
<erichmenge> Edward__: What do you mean? a hash is no different than anything else you'd pass to a method
<Edward__> erichmenge, so it'd be like def function(options={})?
freeayu has quit [Ping timeout: 246 seconds]
<erichmenge> Edward__: Yeah
<Edward__> ok
<Edward__> ty
arya_ has quit []
ryanf has quit [Read error: Connection reset by peer]
<erichmenge> Edward__: A common thing is to use http://www.ruby-doc.org/core-1.9.3/Hash.html#method-i-fetch the fetch method of the hash so you could use default values if you want.
ryanf has joined #ruby
<havenn> Edward__: Or use Ruby 2.0.0 named arguments: http://www.ruby-forum.com/topic/3725714
<Edward__> ty for leading me to the right way
<erichmenge> havenn: Wasn't aware of that, looks good.
carlzulauf has quit [Ping timeout: 260 seconds]
crackfu has quit [Remote host closed the connection]
<havenn> erichmenge: My link was bad, but named params are nice! https://gist.github.com/3966916
DarthGandalf has quit [Ping timeout: 272 seconds]
yshh has quit [Ping timeout: 265 seconds]
medik has quit [Quit: medik has no reason]
skaczor has quit [Remote host closed the connection]
yaymukund has quit [Ping timeout: 246 seconds]
<erichmenge> havenn: yeah that's okay, I found it :)
<erichmenge> I haven't really been up on all the 2.0 goodies. I should take some time to do some exploring.
DarthGandalf has joined #ruby
nari has joined #ruby
carlzulauf has joined #ruby
GeekOnCoffee has quit [Ping timeout: 246 seconds]
havenn has quit [Remote host closed the connection]
dnyy has quit [Remote host closed the connection]
havenn has joined #ruby
carlyle has quit [Remote host closed the connection]
steffes has quit [Remote host closed the connection]
freakazoid0223 has joined #ruby
havenn has quit [Ping timeout: 246 seconds]
JonnieCache has joined #ruby
SCommette has quit [Quit: SCommette]
nari has quit [Read error: Operation timed out]
arielpts has quit [Ping timeout: 246 seconds]
hsbt is now known as hsbt_away
Danielpk has quit [Ping timeout: 276 seconds]
judd7 has joined #ruby
fyolnish_ has joined #ruby
fyolnish has quit [Read error: Connection reset by peer]
hbpoison_ has joined #ruby
GeekOnCoffee has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
emptyflask has quit [Remote host closed the connection]
havenn has joined #ruby
savage- has quit [Quit: savage-]
hsbt_away is now known as hsbt
GeekOnCoffee has quit [Read error: Connection reset by peer]
freeayu has joined #ruby
savage- has joined #ruby
judd7 has quit [Client Quit]
JonnieCache has quit [Ping timeout: 255 seconds]
arielpts has joined #ruby
GeekOnCoffee has joined #ruby
Danielpk has joined #ruby
hbpoison_ has quit [Ping timeout: 276 seconds]
hbpoison has joined #ruby
swarley has quit [Ping timeout: 240 seconds]
Xabarus has joined #ruby
idzuna has joined #ruby
Liothen has quit [Ping timeout: 244 seconds]
jadon has quit [Ping timeout: 264 seconds]
aetcore has quit [Remote host closed the connection]
bigmcq77 has quit [Quit: Computer has gone to sleep.]
GeekOnCoffee has quit [Ping timeout: 244 seconds]
jadon has joined #ruby
kbeddingfield has joined #ruby
brianpWins has quit [Quit: brianpWins]
aetcore has joined #ruby
nemish_ has joined #ruby
Xabarus is now known as Liothen
Liothen has quit [Changing host]
Liothen has joined #ruby
<nemish_> hi does anyone know how to pass a value (here object) in?
Cultofmetatron has quit [Remote host closed the connection]
<nemish_> s3image = AWS::S3::S3Object.value "[object]/components/versions/secured/main-v01.jpg", 'docs'
Tombar has quit [Remote host closed the connection]
<Spaceghostc2c> nemish_: WHERE?
<Spaceghostc2c> Sorry for the caps.
bigmcq77 has joined #ruby
<nemish_> i have value set from get '/:object'
<nemish_> i want to pass that value here
<nemish_> see the [object]
joeycarmello has joined #ruby
tbrock_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
kbeddingfield has quit [Ping timeout: 240 seconds]
<nemish_> s3image = AWS::S3::S3Object.value '[object]/components/versions/secured/main-v01.jpg', 'docs'
GeekOnCoffee has joined #ruby
nari has joined #ruby
ABK has quit [Ping timeout: 276 seconds]
whomp_ has quit [Quit: Leaving]
SCommette has joined #ruby
tbrock_ has joined #ruby
Guest10501 has joined #ruby
tbrock_ has quit [Client Quit]
rohit_ has joined #ruby
dhruvasagar has joined #ruby
<nemish_> having a problem where the value of object isn't being passed
<nemish_> it's literally passing the word "object"
tbrock_ has joined #ruby
dogweather has quit [Remote host closed the connection]
minijupe has quit [Quit: minijupe]
SCommette has quit [Quit: SCommette]
GeekOnCoffee has quit [Ping timeout: 244 seconds]
havenn has quit [Remote host closed the connection]
adeponte has joined #ruby
butblack has joined #ruby
butblack has quit [Client Quit]
linoj has quit [Quit: linoj]
yshh has joined #ruby
CaptainJet has quit []
<burgestrand> nemish_: #{object}, assuming you have an object method or variable available.
<burgestrand> nemish_: so "#{object}/components/…", but don’t use single quotes or you’ll get #{object} instead of what is inside the object.
dhruvasagar has quit [Read error: Connection reset by peer]
GeekOnCoffee has joined #ruby
haxrbyte_ has joined #ruby
<nemish_> burgestrand: undefined local variable object... but the get should be setting it no?
<nemish_> 19 get '/:object' do |object| 20 s3image = AWS::S3::S3Object.value "#{object}/components/versions/secured/main-v01.jpg", "docs.
<burgestrand> nemish_: no. Are you using sinatra?
<nemish_> yes
<burgestrand> nemish_: actually, yes, I’d expect it to be available there.
dhruvasagar has joined #ruby
adamdonahue has joined #ruby
<adamdonahue> Q
<nemish_> burgestrand: me too
<nemish_> burgestrand: test.rb:15:in `<class:ImageServer>': undefined local variable or method `object' for ImageServer:Class (NameError)
butblack has joined #ruby
<adamdonahue> What is the best practice for instantiating a class from an array where one wants to copy the array, not use a reference?
<burgestrand> nemish_: it works fine for me: http://pastie.org/private/wkimxjlyfn3cqus6fcjxa
<adamdonahue> e.g., def initialize(array) @array = array.dup? (or clone)?
wroathe has joined #ruby
<burgestrand> adamdonahue: yup, dup. It won’t make a deep copy of the array, only a shallow one.
haxrbyte has quit [Ping timeout: 246 seconds]
<adamdonahue> Thanks. New to Ruby from a Python world, and although the language is straight-forward to pick up, writing "Rubythonic" (what's the correct term here?) is the tricky part.
freeayu has quit [Ping timeout: 240 seconds]
havenn has joined #ruby
<burgestrand> adamdonahue: idiomatic ruby is something you receive by getting accustomed to the language and community, not something you can pick up like syntax. :)
<adamdonahue> yeah
aces1up has joined #ruby
<adamdonahue> reading lots of code should help
<burgestrand> And it takes a few weeks.
pnbeast has quit [Ping timeout: 252 seconds]
<aces1up> hey all I have a multi level tree I'm trying to get enumerable working on.. can someone take a look at this code and see what i'm doing wrong?
<rking> adamdonahue: Rubyish
<adamdonahue> rking: thanks.
<burgestrand> adamdonahue: how does the python community view tabs vs. spaces (and how many spaces, if spaces)?
nari has quit [Ping timeout: 248 seconds]
<adamdonahue> burgestrand: thanks.
<rking> burgestrand: AFAIK Guido himself regrets having ever supported tabs.
<adamdonahue> burgestrand: can't speak for the python community as a whole, but i prefer spaces (four spaces) to tabs. personally i set tabstop=4 and expandtab in my .vimrc file
<adamdonahue> and yes, i use vi :)
<nemish_> burgestrand: it will rackup but when you actually try a get you'll get the variable not set
<Spaceghostc2c> adamdonahue: vi or vim?
<burgestrand> nemish_: no, I whatever I used as a route, /lawl returns "lawl".
<adamdonahue> whichever is available
pnbeast has joined #ruby
<adamdonahue> vim is nice because syntax highlighting, etc.
<jadon> Anyone here use jruby?
<burgestrand> Probably someone.
<rking> burgestrand: http://www.yaml.org/faq.html
<burgestrand> rking: hah, there you go!
<burgestrand> adamdonahue: just asking because, for most people new to ruby, their indentation is usually the first thing that triggers people off. Idiomatic ruby typically use two-space indentation.
<adamdonahue> i see -- interesting
<burgestrand> There are some rebels, of course.
freeayu has joined #ruby
<adamdonahue> i'm sure there have been studies showing two vs four ;-) but if it's 2, i'll modify accordingly
xpen has quit [Ping timeout: 252 seconds]
<adamdonahue> see, look how much i'm learning here in a few minutes :)
SCommette has joined #ruby
<burgestrand> adamdonahue: use whatever suits you, but be prepared anything else than two spaces will raise some eyebrows. :)
<adamdonahue> haha ok
<jadon> some places will require you to use 2 spaces when working with other devs
<jadon> you should be using 2 spaces.
nachooo has left #ruby [#ruby]
yaymukund has joined #ruby
psycho_one has joined #ruby
<burgestrand> aces1up: "can't convert Symbol into Integer" is common when trying to use something other than an integer to address a value in an array.
aetcore has quit []
<burgestrand> aces1up: are you sure the error is raised from your #each method, and not somewhere else, like in your #processed method?
ananthakumaran has quit [Quit: Leaving.]
<burgestrand> aces1up: e.g. [1, 2, 3, 4][:makes_no_sense] # => crash
bjeanes has quit [Ping timeout: 245 seconds]
LooChao has joined #ruby
bjeanes has joined #ruby
osvico has quit []
<aces1up> burgestrand what is the diff between .find and .find_all when including enumerable, becuase it works find with .find so I was thinking there is something needed by enumerable to make .find_all other than the .each method?
nemish_ has quit [Ping timeout: 245 seconds]
nari has joined #ruby
<aces1up> min_by doesn't work either does that require <=> method?
<aces1up> burgestrand I think if I understood what block[self] does I would be better to fix this. what is that exactly doing? how is a block referenced with [] looks weird.
eldariof has quit [Ping timeout: 240 seconds]
superSlumbo has joined #ruby
_bart has joined #ruby
<superSlumbo> very very newb question
<superSlumbo> when i type in rib in terminal it returns '-bash: irb: command not found'
<burgestrand> aces1up: I have to go, no time to answer properly. But Proc#[] is aliased to Proc#call, #min probably requires #<=> yes.
<superSlumbo> sorry *irb
<superSlumbo> when i type in irb
<undersc0re97> have you installed irb?
tbrock_ has quit [Quit: Computer has gone to sleep.]
<davidcelis> have you installed _ruby_?
adeponte has quit [Remote host closed the connection]
luckyruby has joined #ruby
shammancer has quit [Remote host closed the connection]
ilyam has quit [Quit: ilyam]
<adamdonahue> how do i get a particular instance variable, initialized within initialize, to be private? 
shammancer has joined #ruby
<adamdonahue> and then i'll stop asking stupid questions :)
nemish_ has joined #ruby
zaargy has joined #ruby
<nemish_> burgestrand: thanks... it seems my issue now is actually MiniMagick
<nemish_> does anyone know MiniMagick?
<nemish_> ;)
<reactormonk> how do you forward #each the right way?
<adamdonahue> oh, guess it's private by default :)
<zaargy> is there a better way to do this than some_array.grep(/foo/)[/foo\s+(\S+)/, 1]?
justsee has quit [Quit: Linkinus - http://linkinus.com]
<zaargy> e.g. do the capture same time as teh grep?
strangeworks has quit [Quit: Leaving]
<superSlumbo> undersc0re97: sorry, yeh i have and it was working before
maletor has joined #ruby
<superSlumbo> undersc0re97: for some reason it just stopped working
Whackatre has left #ruby ["Cya."]
tjbiddle has joined #ruby
tjbiddle has quit [Read error: Connection reset by peer]
kbeddingfield has joined #ruby
tjbiddle has joined #ruby
Guest10501 has quit [Read error: Connection reset by peer]
<superSlumbo> when i put in 'ruby -v' it says
<superSlumbo> ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0]
<superSlumbo> but irb doesn't work. anyone know whats going on here? does IRB just not work on my computer anymore
<havenn> superSlumbo: 1.8.7 is dead. Use 1.9.3+.
dmiller has joined #ruby
dmiller has quit [Remote host closed the connection]
<superSlumbo> havenn: how do i change from 1.8.7 to 1.9.3?
dmiller has joined #ruby
<TTilus> superSlumbo: i recommend you get familiar with rben
<havenn> superSlumbo: What OS?
<TTilus> rbenv even
<nemish_> does anyone know MiniMagick? trying to determine why this isn't working
<nemish_> image = MiniMagick::Image.read((AWS::S3::S3Object.value "#{object}/components/versions/secured/main-v01.jpg", "docs.core.prod"))
<superSlumbo> havenn: mac
<havenn> superSlumbo: rvm, rbenv, or rbfu
<havenn> superSlumbo: Using Homebrew?
<TTilus> superSlumbo: rbenv, no brew
hsbt is now known as hsbt_away
<nemish_> havenn: homebrew = FTW ;)
<superSlumbo> havenn: no i don't think I'm using homebrew
<adamdonahue> Rubyish question: let's say i have a lambda i want to call stored in an array. the syntax x[item][p1,p2] seems kinda confusing. it would read more naturally, i'd think, as x[item].call(p1,p2)
<havenn> superSlumbo: I'm using rbfu + rubu-build
<adamdonahue> is there a preference?
emergion has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<havenn> superSlumbo: You *should* use homebrew. Install it! http://mxcl.github.com/homebrew/
ananthakumaran has joined #ruby
<havenn> superSlumbo: Paste this in Terminal: ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
sn0wb1rd has quit [Quit: sn0wb1rd]
<TTilus> adamdonahue: id .call in that case, it is unambiguous
<adamdonahue> yeah, that's what i did. thanks :)
<superSlumbo> havenn: I'm currently trying rvm
<superSlumbo> i think it worked
<TTilus> adamdonahue: or you could .()
cantonic_ has joined #ruby
<superSlumbo> the last thing it said to me was
<adamdonahue> .()?
<superSlumbo> oh scratch that
Trioke has quit [Ping timeout: 252 seconds]
<TTilus> adamdonahue: new call
<superSlumbo> it didn't work it said
<superSlumbo> "Error running 'env CFLAGS=-I/Users/stefan/.rvm/usr/include LDFLAGS=-L/Users/stefan/.rvm/usr/lib ./configure --enable-shared --disable-install-doc --prefix=/Users/stefan/.rvm/rubies/ruby-1.9.3-p286', please read /Users/stefan/.rvm/log/ruby-1.9.3-p286/configure.log
<adamdonahue> i see
<adamdonahue> thx
Paradox has quit [Ping timeout: 240 seconds]
RandyInLA has joined #ruby
<superSlumbo> havenn: i guess ill try homebrew
sn0wb1rd has joined #ruby
<superSlumbo> wish me luck!
<havenn> superSlumbo: It is an excellent package manager. Good luck!
<superSlumbo> havenn: thanks
<havenn> brew list
nari has quit [Ping timeout: 252 seconds]
hsbt_away is now known as hsbt
sn0wb1rd has quit [Client Quit]
<superSlumbo> havenn: ok so install was successful
<superSlumbo> does that mean ruby was installed?
cantonic has quit [Ping timeout: 255 seconds]
cantonic_ is now known as cantonic
<postmodern> superSlumbo, im using ruby-build + chruby btw
<postmodern> superSlumbo, however you probably don't care about 1.8.7, so i'd just install ruby 1.9.3 via homebrew
<superSlumbo> postmodern: how do i do that
<superSlumbo> postmodern: sorry I'm terrible
<postmodern> superSlumbo, brew install ruby
<havenn> superSlumbo: No. Now start with something like: brew install coreutils openssl automake git curl
<superSlumbo> postmodern: just type that into terminal
<superSlumbo> havenn: what does that do?
<havenn> superSlumbo: like they said, 'brew install ruby' installs ruby. What I pasted installs some basic packages
<superSlumbo> ok
_bart has quit [Quit: _bart]
<superSlumbo> havenn: ill start with yours and then do a ruby instal
rohit_ has quit [Quit: Leaving]
<havenn> superSlumbo: I'd recommend using rbenv/rvm/rbfu instead of ruby install though
<havenn> superSlumbo: E.g., rbenv you'd: brew install ruby-build rbenv
djdb has joined #ruby
<havenn> superSlumbo: rbfu you'd: brew install ruby-build rbfu
<postmodern> havenn, i dont think rbfu is in homebrew yet
CamonZ has quit [Ping timeout: 244 seconds]
<postmodern> superSlumbo, actually I'd recommend going the route of RVM, they have an awesome support channel #rvm
Gm4n has quit [Read error: Operation timed out]
<havenn> postmodern: oops! You're right: brew install http://git.io/rbfu
rohit has joined #ruby
Gm4n has joined #ruby
areil has joined #ruby
psycho_one has quit [Remote host closed the connection]
BoomCow has quit [Ping timeout: 256 seconds]
<postmodern> superSlumbo, https://rvm.io/rvm/install/
yxhuvud has joined #ruby
<havenn> superSlumbo: Or do all of the above, and use the one you prefer! They are all very nice.
<superSlumbo> i ended up going brew install ruby
<superSlumbo> its working right now
<superSlumbo> *crosses fingers**
<havenn> superSlumbo: Nice. If you want One True Ruby and have no need for switching, that is prolly the way to go! :O
iamjarvo has quit [Quit: Computer has gone to sleep.]
BoomCow has joined #ruby
<superSlumbo> havenn: its been patching for a long time I'm kinda worried
centipedefarmer has quit [Remote host closed the connection]
<havenn> superSlumbo: Takes a while. Might be normal.
Tearan has quit [Quit: Sleepy Badger....]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
<superSlumbo> wooooah
<superSlumbo> i think it worked
<superSlumbo> wait
<superSlumbo> ok so it deficiently worked
<superSlumbo> but
<superSlumbo> when i type ruby -v
<superSlumbo> it still says 1.87
tonini has joined #ruby
<superSlumbo> Here's what it said after brew install ruby finished: You may want to add this to your PATH.
<superSlumbo> ==> Summary
alem0lars has joined #ruby
<superSlumbo> ?usr/local/Cellar/ruby/1.9.3-p286: 14350 files, 71M, built in 4.6 minutes
<havenn> superSlumbo: brew install rbenv ruby-build; rbenv install 2.0.0.-dev CONFIGURE_OPTS=--with-openssl-dir=brew --prefix openssl``
RandyInLA has quit [Quit: RandyInLA]
<superSlumbo> havenn: i wonder if this has something to do with it: my terminal says "Stefans-MacBook-Pro:~ stefan$ "
<havenn> superSlumbo: Or: \curl -L https://get.rvm.io | bash -s stable --ruby; rvm install ruby-head
<superSlumbo> befoe I type a command
<superSlumbo> am in the wrong directory or something
thinkdevcode has joined #ruby
<havenn> superSlumbo: If you're not into zsh, I'd recommend bash-it: git clone http://github.com/revans/bash-it.git ~/.bash_it; ~/.bash_it/install.sh
hackerdude has joined #ruby
<nemish_> superSlumbo: export PATH=/usr/local/bin:$PATH
<nemish_> then ruby -v
<superSlumbo> nemish_: ahhhhhhH! it worked
<nemish_> you'll have to add that to your .bash_profile
RandyInLA has joined #ruby
<superSlumbo> nemish_: what did that
<superSlumbo> "export PATH=/usr/local/bin:$PATH" do exactly
<nemish_> put /usr/local/bin first in your path
gabrielrotbart has quit [Remote host closed the connection]
<superSlumbo> nemish_: do i have to do that each time i enter terminal?
<nemish_> as i just said put that in your .bash_profile and it will load as you open terminal
<nemish_> otherwise yes you'd have to manually run that every time you open terminal window/tab
<superSlumbo> nemish_: sorry, i actually have never used terminal before how do i do that (sorry to keep bugging yuou)
havenn has quit [Ping timeout: 248 seconds]
pnbeast has quit [Quit: = Let's blow this popsicle stand.]
<nemish_> do you know how to use vi?
<nemish_> nevermind... probably not
<nemish_> type cd to go back to your home directory
<nemish_> then type
<superSlumbo> nemish_: no
<nemish_> open .bash_profile
<superSlumbo> ok
ryanf has quit [Ping timeout: 264 seconds]
Rizzle has joined #ruby
<nemish_> at the bottom of that file add the line above I gave you
<nemish_> and save the file
lxsameer has joined #ruby
nari has joined #ruby
<superSlumbo> sorry… which line (i don't wanna like mess this up and brick my computer)
palyboy has quit [Ping timeout: 244 seconds]
<nemish_> last line of that file is fine
<lxsameer> is there any documents system like sphinx for ruby ?
<superSlumbo> nemish_: no what text do I ad
eignerchris has joined #ruby
<nemish_> export PATH=/usr/local/bin:$PATH
dmiller_ has joined #ruby
ViperMaul|_ has quit [Ping timeout: 256 seconds]
<superSlumbo> nemish_: ok i did that and quit out of terminal and it seems to be working
<nemish_> good
<superSlumbo> nemish_: thanks so much
<nemish_> np
<nemish_> gnite all... maybe tomorrow someone will know MiniMagick :)
<superSlumbo> nemish_: sleep tire, don't let the bed bugs bigth
SilSila has joined #ruby
dmiller has quit [Read error: Operation timed out]
nemish_ has left #ruby [#ruby]
<lxsameer> rking: what is it exactly ?
rakm has joined #ruby
rakm has quit [Max SendQ exceeded]
nari has quit [Ping timeout: 252 seconds]
rakm has joined #ruby
rakm has quit [Max SendQ exceeded]
Tania has quit [Quit: :p]
francisfish has quit [Ping timeout: 252 seconds]
rakm has joined #ruby
<rking> lxsameer: Hehe, not what you were asking.
rakm has quit [Max SendQ exceeded]
<lxsameer> rking: :)
rakm has joined #ruby
rakm has quit [Max SendQ exceeded]
Paradox has joined #ruby
<rking> lxsameer: http://yardoc.org/ ?
rakm has joined #ruby
rakm has quit [Max SendQ exceeded]
gabrielrotbart has joined #ruby
rakm has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
wroathe has quit [Quit: leaving]
pen has quit [Remote host closed the connection]
kbeddingfield has quit [Remote host closed the connection]
SCommette has quit [Quit: SCommette]
<lxsameer> rking: let me check
uuair has joined #ruby
dmiller_ has quit [Ping timeout: 246 seconds]
casheew has quit [Read error: Connection reset by peer]
SilSila has left #ruby [#ruby]
pyx has quit [Quit: Leaving]
casheew has joined #ruby
rohit has quit [Ping timeout: 246 seconds]
dnyy has joined #ruby
answer_42 has joined #ruby
plu has quit [Quit: ZNC - http://znc.sourceforge.net]
butblack has quit [Quit: butblack]
bigmcq77 has quit [Ping timeout: 252 seconds]
enderx86 has quit [Remote host closed the connection]
plu has joined #ruby
Shrink has quit [Ping timeout: 252 seconds]
ryanf has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
bigmcq77 has joined #ruby
kiyoura has quit [Quit: Leaving]
tchebb has quit [Ping timeout: 246 seconds]
<superSlumbo> so I'm trying to install the rubylabs gem from this site
Dreamer3 has quit [Quit: Computer has gone to sleep.]
<superSlumbo> and its not letting me
<BoomCow> are you on windows?
adeponte has joined #ruby
swex has joined #ruby
caleb_io has joined #ruby
<superSlumbo> postmodern: no I'm on mac
<superSlumbo> BoomCow: oh sorry, I'm on mac
<BoomCow> what's the problem
<superSlumbo> when i run the gem install
<superSlumbo> this is what i get back
<superSlumbo> WARNING: You don't have /Users/stefan in your PATH,
<superSlumbo> gem executables will not run.
<superSlumbo> ERROR: While executing gem ... (Errno::EACCES)
<superSlumbo> Permission denied - /Users/stefan/.gem/ruby/1.9.1
<superSlumbo> WARNING: You don't have /Users/stefan in your PATH,
<superSlumbo> gem executables will not run.
<superSlumbo> ERROR: While executing gem ... (Errno::EACCES)
<superSlumbo> Permission denied - /Users/stefan/.gem/ruby/1.9.1
<superSlumbo> BoomCow: what could it be
<superSlumbo> i think my ruby is installed in a weird path
<BoomCow> lol I'm googling it
<BoomCow> give me a min
<BoomCow> I've never had this problem before
<superSlumbo> BoomCow: thanks sorry i am so new to this ruby & terminal thing
<BoomCow> but I also didn't use an installer
kbeddingfield has joined #ruby
<BoomCow> superSlumbo, did you try executing your command with sudo
<BoomCow> sudo gem install [gemname]
_bart has joined #ruby
rohit has joined #ruby
<superSlumbo> o
<superSlumbo> ah
<superSlumbo> she's working
<superSlumbo> ahhh!
<BoomCow> :)
nari has joined #ruby
<superSlumbo> BoomCow: is a hero
<superSlumbo> BoomCow: i'd kiss your feet if you were by me
caleb_io has quit [Quit: caleb_io]
<BoomCow> I Just googled it :)
<BoomCow> or stackoverflow
dnyy has quit [Remote host closed the connection]
<superSlumbo> BoomCow: hahah but you know what to google. you are a master
<superSlumbo> BoomCow 2016
<superSlumbo> you have my vote
<BoomCow> that seals it
<BoomCow> I'm quitting my job in 2016
<BoomCow> and running for president of murica
<superSlumbo> BoomCow: If you need someone to vote for you (or sacrifice for a pagan ritual) I'm your man
xpen has joined #ruby
eignerchris has quit [Remote host closed the connection]
Shrink has joined #ruby
icooba has joined #ruby
topek has joined #ruby
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
zzyybb has quit [Ping timeout: 268 seconds]
luckyruby has quit [Remote host closed the connection]
JonnieCache has joined #ruby
nari has quit [Ping timeout: 260 seconds]
codespectator has joined #ruby
und3f has joined #ruby
JonnieCache has quit [Ping timeout: 276 seconds]
<superSlumbo> how do you switch between 1.9.3 & 1.8.7
awarner has joined #ruby
adeponte has quit [Remote host closed the connection]
zzyybb has joined #ruby
rakl has quit [Quit: sleeping]
fixl has joined #ruby
<superSlumbo> BoomCow: ok somethings not working with the specific module I'm trying to load
<superSlumbo> heres a screenshot
<BoomCow> superSlumbo, don't user 1.8.7
<BoomCow> and also
<BoomCow> what module is it
hsbt is now known as hsbt_away
<superSlumbo> when i'm in IRB I'm supposed to type 'include RandomLab
adeponte has joined #ruby
<superSlumbo> its part of the RubyLabs gem i downloaded
joeycarmello has quit [Remote host closed the connection]
<superSlumbo> (its for a cs class)
adamdonahue has left #ruby [#ruby]
<superSlumbo> i'm not using 1.8.7 tho, i thought that might be the problem but i guess its not
amd has joined #ruby
<amd> t
mahmoudimus has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
jadon has quit [Remote host closed the connection]
<BoomCow> next time you can just gist or pastie it
<BoomCow> :)
<BoomCow> hmm
<BoomCow> let me look into the documentaiton
Hanmac1 is now known as Hanmac
ezkl has joined #ruby
superSlumbo has quit [Read error: Connection reset by peer]
<BoomCow> try running the script and seeing if it runs automatically?
<BoomCow> ruby ./lab-setup.rb
BoomCow has left #ruby ["Leaving"]
adeponte has quit [Remote host closed the connection]
dhruvasagar has quit [Read error: Connection reset by peer]
superSlumbo has joined #ruby
<tjbiddle> If I have a method that I am testing that is calling "git.lib.branch_current" how would i mock that in rspec?
<superSlumbo> Hey sorry my internet went donw
artOfWar has joined #ruby
senny has joined #ruby
<superSlumbo> any idea whats going on?
SmoothSage has joined #ruby
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
kbeddingfield has quit [Remote host closed the connection]
monkegji_ has joined #ruby
adeponte has joined #ruby
rellin has quit [Ping timeout: 255 seconds]
aganov has joined #ruby
elentras has joined #ruby
lushious has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
Eiam has quit [Read error: Connection reset by peer]
jaygen has quit [Remote host closed the connection]
eldariof has joined #ruby
awestroke has joined #ruby
lushious has joined #ruby
adeponte has quit [Remote host closed the connection]
maesbn has joined #ruby
thinkdevcode has quit [Remote host closed the connection]
ij has joined #ruby
lushious has quit [Excess Flood]
lushious has joined #ruby
psycho_one has joined #ruby
lukeholder has joined #ruby
dr_bob has joined #ruby
ABK has joined #ruby
joeycarmello has joined #ruby
rakl has joined #ruby
beachandbytes has quit [Ping timeout: 246 seconds]
<lukeholder> i have an array of hashes. every has has a key. Some keys are the same, and I want to add a flag to the hash if it is a duplicate. How could i do this?
<lukeholder> *every hash has a key
rohit has quit [Quit: Leaving]
NsOmNiAc has joined #ruby
NsOmNiAc has quit [Client Quit]
Morkel has joined #ruby
swex has quit [Read error: Connection reset by peer]
NsOmNiAc has joined #ruby
Luminda has joined #ruby
swex has joined #ruby
hackerdude has quit [Remote host closed the connection]
Luminda has quit [Client Quit]
<Hanmac> lukeholder: array.group_by {|h| h[key]}.each {|k,v| v.each_with_index {|o,i| o[dup_key]= true if i > 0}}}
hackerdude has joined #ruby
dr_bob has quit [Ping timeout: 246 seconds]
<lukeholder> thanks Hanmac trying now.
joeycarmello has quit [Ping timeout: 240 seconds]
JustinCampbell has quit [Remote host closed the connection]
dr_bob has joined #ruby
rakl has quit [Ping timeout: 240 seconds]
rakl has joined #ruby
hackerdude has quit [Ping timeout: 240 seconds]
hotovson has joined #ruby
BrianJ has quit [Quit: BrianJ]
<lukeholder> Hanmac what do you think I am doing wrong here? http://d.pr/n/KLtN
<lukeholder> Hanmac better link https://gist.github.com/4044349
xsbeats has quit [Read error: Connection reset by peer]
<Hanmac> the all_files.group_by need to be after the end of the     files.sort.each do |file|
wf2f has quit []
xsbeats has joined #ruby
<lukeholder> ahh crap
<lukeholder> yep
<lukeholder> haha checking for dups on every cycle.
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
superSlumbo has quit [Quit: superSlumbo]
FlyingFoXy has quit [Ping timeout: 246 seconds]
<lxsameer> i have a license header in all of my ruby files, how can i force rdoc to forget about them ?
codespectator has quit [Quit: Computer has gone to sleep.]
qwerxy has joined #ruby
uuair has quit [Quit: uuair]
NsOmNiAc has quit [Quit: Leaving]
<lukeholder> hanmac still no giving expected results
<lukeholder> anyone see anything i cant?
<lukeholder> does group_by return a new hash?
<Hanmac> group_by makes an new hash but this should not be the problem
<lukeholder> ah
<lukeholder> ok
<lukeholder> looks like it works but doesn't tag the first duplicate only additions
<lukeholder> Hanmac thats for that great start
<lukeholder> As its looks working, but only marks the second duplicate
<lukeholder> see
<Hanmac> ... i thought that the first doesnt need the dup flag?
filipe has joined #ruby
monkegji_ has quit [Read error: No route to host]
monkegji_ has joined #ruby
<lukeholder> I suppose not
<lukeholder> makes sense
<lukeholder> just need to place a delete button next to ones that are duplicates
<lukeholder> not the original
<Hanmac> array.group_by {|h| h[key]}.each {|k,v| v.each{|o| o[dup_key]= true} if v.size > 1 }} <<< this is the code if everyone should have the dup flag in the group
<lukeholder> wow nice
ABK has quit [Ping timeout: 248 seconds]
<lukeholder> how come this is not in enumerable module? there should be a dup with a proc to make changes to a dup object
Nanuq has quit [Ping timeout: 246 seconds]
awestroke has quit [Remote host closed the connection]
khakimov has quit [Quit: Computer has gone to sleep.]
<lukeholder> like array.dup { |d| d[:dup] = true }
<lukeholder> Hanmac could monkey enumerable i suppose?
Chryson has quit [Quit: Leaving]
Shrink has quit [Ping timeout: 240 seconds]
FlyingFoX has joined #ruby
hoelzro|away is now known as hoelzro
cj3kim has quit [Quit: This computer has gone to sleep]
ephemerian has joined #ruby
<lukeholder> thanks again Hanmac really appreciate it
<tjbiddle> If I have a method that I am testing that is calling "git.lib.branch_current" how would i mock that in rspec?
<Hanmac> something like array.dup { |d| d[:dup] = true } would not be easy possible because it needs more blocks than one ...
mmikeym has quit [Ping timeout: 246 seconds]
joeycarmello has joined #ruby
codespectator has joined #ruby
ZubKonst has joined #ruby
adeponte has joined #ruby
jgrevich has quit [Quit: jgrevich]
LooChao has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
joeycarmello has quit [Ping timeout: 240 seconds]
wallerdev has quit [Quit: wallerdev]
Nanuq has joined #ruby
d3vic3 has joined #ruby
cezar-b has joined #ruby
zigomir has joined #ruby
palyboy has joined #ruby
wreckimnaked has joined #ruby
margle has joined #ruby
Shrink has joined #ruby
Grieg has quit [Quit: laterz! :D]
Girls_Escort has joined #ruby
ilyam has joined #ruby
havenn has joined #ruby
mroh has joined #ruby
<mroh> !help
mroh has left #ruby [#ruby]
beneggett has quit [Ping timeout: 252 seconds]
FlyingFoX has quit [Ping timeout: 246 seconds]
beneggett has joined #ruby
<havenn> d3x
lukeholder has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
havenn has quit [Remote host closed the connection]
mroh has joined #ruby
<mroh> DCC SEND irc.tddirc.net#hackerthreads 0 0 0
mroh has left #ruby [#ruby]
<reactormonk> I do I tell String#delete to delete literal, without ranges?
xorigin has joined #ruby
artOfWar has quit [Remote host closed the connection]
srji has joined #ruby
Girls_Escort has quit [K-Lined]
FlyingFoX has joined #ruby
Elhu has quit [Read error: Connection reset by peer]
Elhu has joined #ruby
casheew has quit [Read error: Connection reset by peer]
znake has joined #ruby
<Hanmac> reactormonk "abba" remove "ab" => "ba" ?
jimeh has joined #ruby
xpen has quit [Ping timeout: 246 seconds]
hbpoison has quit [Quit: leaving]
ilyam has quit [Quit: ilyam]
<Hanmac> "abba".gsub("ab","") #=> "ba"
maxer has joined #ruby
k610 has joined #ruby
casheew has joined #ruby
blacktulip has joined #ruby
<reactormonk> Hanmac, thanks
qwerxy has quit [Quit: offski]
cdt has joined #ruby
awarner has quit [Read error: Connection reset by peer]
awarner has joined #ruby
icooba has quit [Ping timeout: 260 seconds]
sterNiX has quit [Ping timeout: 260 seconds]
Mon_Ouie has quit [Ping timeout: 246 seconds]
k610 has quit [Ping timeout: 246 seconds]
polymar has joined #ruby
sh1nji has quit [Ping timeout: 260 seconds]
icooba has joined #ruby
k610 has joined #ruby
slainer68 has joined #ruby
rakl has quit [Quit: sleeping]
TheFuzzball has quit [Ping timeout: 246 seconds]
jhgaylor has quit [Read error: Connection reset by peer]
jhgaylor has joined #ruby
J-_-L has joined #ruby
TheFuzzball has joined #ruby
k610 has quit [Ping timeout: 240 seconds]
qwerxy has joined #ruby
k610 has joined #ruby
sterNiX has joined #ruby
Jdubs has joined #ruby
<Jdubs> Hello!
<Jdubs> o/
twinturbo has joined #ruby
<Jdubs> Anyone want to take a look at my github and tell me if a very simple IRC program (from prompt, not GUI) would be a reasonable goal for me atm?
Averna has joined #ruby
joeycarmello has joined #ruby
<Jdubs> Anyone?
<Jdubs> lol
robbyoconnor has quit [Ping timeout: 240 seconds]
skum has joined #ruby
Jork1 has joined #ruby
d3vic3 has quit [Ping timeout: 248 seconds]
JonnieCache has joined #ruby
<Jdubs> is anyone here?
<ryanf> I think a simple IRC client/bot is probably a reasonable goal for anyone, given enough time
<ryanf> I didn't look at your github though
<Jdubs> let me link it sec
xpen has joined #ruby
joeycarmello has quit [Ping timeout: 260 seconds]
colinbm has joined #ruby
manizzle has quit [Ping timeout: 240 seconds]
elaptics`away is now known as elaptics
kil0byte has quit [Ping timeout: 268 seconds]
chussenot has joined #ruby
<clocKwize> Jdubs, make a rails app.
morf has joined #ruby
chussenot has quit [Remote host closed the connection]
chussenot has joined #ruby
<Jdubs> Don't really know how yet, just barely looked at rails guides yet
<Jdubs> Wouldn't it be easier to learn/do in ruby?
codespectator has quit [Quit: Computer has gone to sleep.]
ryanf has quit [Ping timeout: 256 seconds]
Xeago has joined #ruby
<JonnieCache> Jdubs: are you after another project?
<reactormonk> Jdubs, ye play magic?
workmad3 has joined #ruby
<JonnieCache> writing an irc bot, perhaps with EventMachine, is a decent suggestion
baphled has joined #ruby
fyolnish_ has quit [Remote host closed the connection]
<reactormonk> yet another one? :D
<Jdubs> JonnieCache: yeah, thinking of practicing some networking with an irc client, a really basic one
<Jdubs> reactormonk, I used to, how did you know?
codespectator has joined #ruby
<reactormonk> Jdubs, just asking
<Jdubs> reactormonk, it's too expensive of a hobby XD
<Jdubs> and then I quit and tried to save money playing online, spent a lot of money on there too...lol
<JonnieCache> surely the Magic world is rife with piracy
<reactormonk> Jdubs, not if you pull a Jace of 40$ from a 12$ booster draft :D
<JonnieCache> theyre paper cards man
<reactormonk> JonnieCache, it's not that easy I think
<reactormonk> you need high-quality gear
d3vic3 has joined #ruby
adeponte has quit [Read error: Connection reset by peer]
<JonnieCache> surely you can get a torrent with scans of every card and play with your friends using any cards you want
adeponte has joined #ruby
<reactormonk> JonnieCache, known, called 'proxy', in certain game format, you can have % of your cards proxies
ezkl has quit [Quit: Textual IRC Client: www.textualapp.com]
<reactormonk> Jdubs, http://ompldr.org/vZzdhdw have fun running it.
<reactormonk> it's just a hack, but a good start
<reactormonk> need sleep
<clocKwize> wtf is this magic stuff
adambeynon has joined #ruby
Guest78730 has quit []
manizzle has joined #ruby
<Jdubs> thx
<JonnieCache> clocKwize: its basically pokemon for people whove convinced themselves theyre not children anymore
<clocKwize> heh
rakl has joined #ruby
TechCel has joined #ruby
<Jdubs> Jonnie: -_-
reinaldob has joined #ruby
elaptics is now known as elaptics`away
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
xpen has quit [Ping timeout: 276 seconds]
J-_-L has quit [Quit: Leaving.]
<workmad3> mmm, magic the gathering
<workmad3> I still have a box full of M:tG cards
arkiver has joined #ruby
<Jdubs> they might be worth money lol
<Jdubs> my friend had an old box of early edition cards
<Jdubs> UNOPENED
<Jdubs> worth about 16k
<Jdubs> in his attic
<Jdubs> :O
zzyybb has quit [Remote host closed the connection]
fantazo has quit [Remote host closed the connection]
arturaz has joined #ruby
apeiros_ has joined #ruby
Iszak has joined #ruby
Iszak has quit [Changing host]
Iszak has joined #ruby
<JonnieCache> its a strange world we live in
<JonnieCache> holy shit why have i not been listening to buena vista social club.
<JonnieCache> how did i forget about them? maybe i have a brain tumor...
_bart has left #ruby [#ruby]
<Jdubs> wat
<JonnieCache> sorry its the morning im still in nonsense mode
<JonnieCache> but seriously you should listen to buena vista social club
xpen has joined #ruby
Criztian has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<Jdubs> Jonnie: how do I run two loops simultaneously?
nilg has joined #ruby
<Jdubs> i wrote a simple tcp server, and it waits for a connection, but locally i want it to hav a prompt that can be used to input commands while it runs
seich has quit [Ping timeout: 246 seconds]
timmow has joined #ruby
<JonnieCache> run each of them in their own thread
seich- has joined #ruby
<JonnieCache> but you should be warned, youre heading into the complicated/powerful/fun territory of concurrency
<JonnieCache> you should do some research into what that means for things like data structures etc
* Hanmac has found an nice magic clone ... just google after "forge magic"
qwerxy has quit [Quit: offski]
amd has quit [Quit: amd]
Virunga has joined #ruby
mahmoudimus has joined #ruby
swex has quit [Remote host closed the connection]
elaptics`away is now known as elaptics
alem0lars has quit [Ping timeout: 246 seconds]
rohit has joined #ruby
roadt has joined #ruby
swex has joined #ruby
<roadt> hi, can a class mixin to another class ?
<Jdubs> yes
Shrink has quit [Ping timeout: 260 seconds]
<JonnieCache> yep. Class is a subclass of Module donchaknow
<Jdubs> roadt: yes
<apeiros_> no
<Jdubs> you can include attributes from a previous class like this
<Jdubs> apeiros: no?
<apeiros_> you can only inherit from a class
<roadt> Jdubs, how, use 'include ' , same as module?
<Jdubs> class Thisclass < Parentclass
<roadt> apeiros_, yeah, fail here.
<apeiros_> Class is a subclass of Module, but it loses the ability to be included or extended
<JonnieCache> bummer
<apeiros_> indeed
<roadt> apeiros_, any why?
<apeiros_> I don't know
<roadt> apeiros_, that mean i only have single inheritance.
<Jdubs> Hmm, what's the difference from a mixin and doing an inherit?
<apeiros_> roadt: it means all you want to have multiple inheritable, you have to move to modules
<JonnieCache> multiple inheritance would make ruby utterly insane. its bad enough as it is
<roadt> apeiros_, make it a module.
<apeiros_> Jdubs: inherit only works with classes, include only works with modules
<roadt> apeiros_, indeed.
<apeiros_> but both work on the ancestor chain
<JonnieCache> mixins are good enough. better a lot of the time
mahmoudimus has quit [Quit: Computer has gone to sleep.]
BobAnon has joined #ruby
fyolnish has joined #ruby
<roadt> why? background..background..
<roadt> don't see any problem to do that. or partial mixin.i know, class mixin of py.
<roadt> i bet there is a story. anyway.
L0L0L0L0L has quit [Ping timeout: 246 seconds]
<roadt> apeiros_, thanks for confirmation.
znake has quit [Quit: Linkinus - http://linkinus.com]
polymar has quit [Read error: Connection reset by peer]
polymar_ has joined #ruby
mengu has joined #ruby
margle has quit [Quit: Computer has gone to sleep.]
Axsuul has quit [Ping timeout: 276 seconds]
lkba has quit [Ping timeout: 252 seconds]
davorb has quit [Ping timeout: 276 seconds]
rohit has quit [Ping timeout: 246 seconds]
EPIK has quit [Ping timeout: 255 seconds]
rohit has joined #ruby
davorb has joined #ruby
EPIK has joined #ruby
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
elico has joined #ruby
berserkr has joined #ruby
tvw has joined #ruby
levicole has quit [Ping timeout: 268 seconds]
vlad_starkov has quit [Remote host closed the connection]
srji has quit [Quit: leaving]
yellow5 has quit [Quit: time to go!]
levicole has joined #ruby
joeycarmello has joined #ruby
elico has quit [Remote host closed the connection]
yellow5 has joined #ruby
alem0lars has joined #ruby
werdnativ has quit [Quit: werdnativ]
dogweather has joined #ruby
joeycarmello has quit [Ping timeout: 255 seconds]
g_bleezy_ has quit [Remote host closed the connection]
shiin has joined #ruby
rakl has quit [Quit: sleeping]
arkiver has quit [Quit: Leaving]
qwerxy has joined #ruby
TechCel has quit [Ping timeout: 276 seconds]
lxsameer has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
tonini has quit [Remote host closed the connection]
lxsameer has quit [Read error: Connection reset by peer]
rohit has quit [Ping timeout: 264 seconds]
binaryplease has joined #ruby
polymar has joined #ruby
polymar_ has quit [Read error: Connection reset by peer]
rakl has joined #ruby
cascalheira has joined #ruby
nilg has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
lxsameer is now known as Guest93993
yshh has quit [Ping timeout: 246 seconds]
rohit has joined #ruby
<shevy> hmm
<shevy> what was the name of that ruby WM again?
Guest93993 has quit [Read error: Connection reset by peer]
<apeiros_> yarv?
<Hanmac> what do you mean?
<apeiros_> maglev?
<apeiros_> jruby?
<apeiros_> err, jvm
<apeiros_> oh, WM, not VM
<apeiros_> you should probably say what you mean… there's like a thousand things that are abbreviated to WM…
fermion has joined #ruby
twinturbo has quit [Quit: twinturbo]
swex_ has joined #ruby
swex has quit [Ping timeout: 246 seconds]
<shevy> yeah that windowmanager hmm
<shevy> googling for "ruby wm" brings me to "Showing results for rugby WM" :\
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
cdt has quit [Quit: Ex-Chat]
radic has quit [Quit: Verlassend]
bluenemo has quit [Read error: Connection reset by peer]
rakl has quit [Quit: sleeping]
cdt has joined #ruby
radic has joined #ruby
<hoelzro> shevy: subtle
<shevy> ah yes, thanks!
beiter has joined #ruby
horofox has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
margle has joined #ruby
krz has quit [Quit: krz]
arturaz has quit [Read error: Connection reset by peer]
arturaz has joined #ruby
thinkit2 has quit [Read error: Connection reset by peer]
thinkit2 has joined #ruby
Jellyg00se has quit [Ping timeout: 246 seconds]
arturaz has quit [Read error: Connection reset by peer]
arturas_ has joined #ruby
beiter has quit [Read error: Connection reset by peer]
beiter_ has joined #ruby
arturas_ has quit [Read error: Connection reset by peer]
arturaz has joined #ruby
sterNiX has quit [Excess Flood]
und3f has quit [Ping timeout: 246 seconds]
sterNiX has joined #ruby
freeayu has quit [Ping timeout: 240 seconds]
larissa has joined #ruby
cdt has quit [Quit: Ex-Chat]
cdt has joined #ruby
joeycarmello has joined #ruby
Paradox has quit [Ping timeout: 268 seconds]
Jellyg00se has joined #ruby
joeycarmello has quit [Ping timeout: 260 seconds]
beiter_ has quit [Read error: Connection reset by peer]
beiter has joined #ruby
nomenkun has joined #ruby
samphippen has joined #ruby
bluenemo has joined #ruby
staafl has joined #ruby
bidek has joined #ruby
xpen has quit [Remote host closed the connection]
bidek has quit [Client Quit]
Criztian has quit [Remote host closed the connection]
bier has quit [Ping timeout: 252 seconds]
sysop2 has joined #ruby
und3f has joined #ruby
<sysop2> hi. how can I call cairo from the current directory instead of the lib path.
adeponte has quit [Remote host closed the connection]
<workmad3> sysop2: do you mean 'current directory' as in the directory that a user started your script from, or 'current directory' as in 'the same directory as this file'?
foobar293 has joined #ruby
foobar293 has quit [Client Quit]
<sysop2> either, I dont have permission to install new ruby modules system wide, but I am allowed to do it in my directory. and I want to run something that needs cairo and its not installed.
arturaz has quit [Remote host closed the connection]
<workmad3> sysop2: why not install it as a gem in your local directory?
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<workmad3> sysop2: does the system have bundler installed? as that would be the easiest
<sysop2> ok. is there a howto on that somewhere.
<sysop2> no it doesnt have bundler.
<workmad3> sysop2: then you're going to need to play around with GEM_PATH and GEM_HOME environment variables... I'm sure there's stuff on google about it
<sysop2> ok thats a good start thanks!
arturaz has joined #ruby
elico has joined #ruby
LouisGB has joined #ruby
jprovazn has joined #ruby
jprovazn has quit [Client Quit]
fyolnish has quit [Remote host closed the connection]
freeayu has joined #ruby
asuka has quit [Ping timeout: 246 seconds]
bier has joined #ruby
asuka has joined #ruby
maesbn_ has joined #ruby
Paradox has joined #ruby
maesbn has quit [Ping timeout: 246 seconds]
fyolnish has joined #ruby
<shevy> hmm should one use "colour" or "color"? it seems as if the first is much less common
<workmad3> colour is UK english spelling, color is US english spelling
jprovazn has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
<Hanmac> colour sounds/looks like hidden France
<shevy> hehehe
<shevy> well the UK folks do pronounce things a bit differently than the US folks, but what I am thinking is this... if 80% out there use the simpler variant, I myself could switch too, simply because it is the more common variant of the two
samphippen has quit [Quit: Computer has gone to sleep.]
<workmad3> shevy: the pronunciation is the same there, just the spelling is different ;)
vlad_starkov has joined #ruby
<workmad3> shevy: I believe the 'colour' spelling has some french roots, the US spelling doesn't
<Hanmac> the pronunciation is not 100% the same ... you could hear a little difference ...
<workmad3> Hanmac: I've always put the difference down to accent rather than a difference in the pronunciation of the word
<shevy> well I am really beginning to lean towards the simpler variant
<shevy> (a) more people use it (b) less characters to type ... hmm
<shevy> we had to use the UK spelling in school
<shevy> what would you use for .rb files anyway?
<shevy> def disable_colours
<shevy> def disable_colors
jenrzzz has joined #ruby
<apeiros_> I use AE for code
<workmad3> depends on whether I'm dealing with something that's already been 'infected' with AE
<apeiros_> actually I think I started using AE for all my english. but I'm probably inconsistent
Jdubs has quit [Read error: Connection reset by peer]
<shevy> cool
<workmad3> I tend to use 'color' for stuff related to web apps, for example, because CSS styles use 'color', infecting the entire stack
<shevy> if the swiss use AE then I can switch too :D
Edward__ has quit [Read error: Operation timed out]
<rohit> define one, make an alias for the other spelling so both can use? :D
<workmad3> I'm not exactly consistent either though, sometimes I type 'colour' automatically
<shevy> rohit: yeah, I am doing that now... would rather prefer to use just one though
<sysop2> our evil plan to infect the world with misspellings of colour is working quite nicley.
* sysop2 evil laugh
<Xeago> I type colour automatically, but everywhere I type it it gets autocompleted/corrected to color..
<shevy> quite "nicley"? :)
<shevy> true, CSS uses "color", I used to wonder once or twice why colour: blue did not work
<workmad3> shevy: end of the day, consistency trumps 'correctness', IMO :)
<apeiros_> shevy: well, we get BE taught at school
<apeiros_> and yeah, what workmad3 just said
<workmad3> shevy: at least when dealing with interfaces
spanx has joined #ruby
<shevy> okay
sterNiX has quit [Ping timeout: 252 seconds]
robbyoconnor has joined #ruby
chussenot has quit [Quit: chussenot]
hoelzro is now known as hoelzro|away
robbyoconnor has quit [Client Quit]
slainer68 has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 260 seconds]
Agis__ has joined #ruby
rohit has quit [Quit: Leaving]
carloslopes has joined #ruby
elsifaka has joined #ruby
anildigital_work has quit [Read error: Connection reset by peer]
samphippen has joined #ruby
anildigital_work has joined #ruby
Mkman has joined #ruby
reisl has joined #ruby
larissa has quit [Read error: Connection reset by peer]
flip_digits has joined #ruby
fyolnish has quit [Remote host closed the connection]
answer_42 has quit [Ping timeout: 276 seconds]
arietis has joined #ruby
sterNiX has joined #ruby
joeycarmello has joined #ruby
flip_digits has quit [Client Quit]
srji has joined #ruby
psycho_one has quit [Remote host closed the connection]
rvince has joined #ruby
vlad_starkov has quit [Ping timeout: 240 seconds]
joeycarmello has quit [Ping timeout: 268 seconds]
geekbri has joined #ruby
g_bleezy has joined #ruby
daniel_- has quit [Ping timeout: 246 seconds]
tk___ has joined #ruby
fermion has quit [Ping timeout: 255 seconds]
answer_42 has joined #ruby
g_bleezy has quit [Ping timeout: 245 seconds]
dogweather has quit [Remote host closed the connection]
fyolnish has joined #ruby
jipiboily has joined #ruby
Luceo has quit [Ping timeout: 276 seconds]
vlad_starkov has joined #ruby
Agis__ has quit [Quit: Agis__]
vickaita has joined #ruby
gener1c has joined #ruby
gener1c has quit [Changing host]
gener1c has joined #ruby
ffranz has joined #ruby
<gener1c> "234 &#1221;234".scan(/(?<!&#)\d+(?!;)/) #=> ["234","22","234"]
<gener1c> wanted result: ["234","234"]
<gener1c> what am i doing wrong :'(
dhruvasagar has quit [Ping timeout: 276 seconds]
jipiboily has left #ruby [#ruby]
dhruvasagar has joined #ruby
beachandbytes has joined #ruby
beachandbytes has quit [Client Quit]
slainer68 has joined #ruby
nateberkopec has joined #ruby
<apeiros_> hey, I know that regex from somewhere :D
nanderoo has joined #ruby
tbrock_ has joined #ruby
<apeiros_> the problem is that in '&#1221;', when you reach '22', you have indeed a "not &#" in front of it, since there's a 1 in front of it too…
Luceo has joined #ruby
<apeiros_> didn't think of that when I came up with the expression
<apeiros_> and the problem is, that look-behinds must be fixed size :-/
<apeiros_> might cheat, though
g-ram has quit [Quit: Computer has gone to sleep.]
<apeiros_> gener1c: "234 &#1221;234".scan(/(?<!&#|\d)\d+(?!;|\d)/)
postmodern has quit [Quit: Leaving]
<apeiros_> for some reason I don't know yet, "234 &#1221;234".scan(/(?<!&#|\d)\d+(?!;)/) works too (shouldn't IMO, since it should e.g. match 122 from 1221, since it isn't followed by a ;)
neersighted has quit [Read error: Operation timed out]
slainer68 has quit [Ping timeout: 240 seconds]
ttt has quit [Remote host closed the connection]
<gener1c> apeiros_: is it called conditional regex?
<gener1c> why does it work?
<apeiros_> no
<apeiros_> (?<! … ) is called look-behind
<apeiros_> (negative look-behind even)
<apeiros_> and (?! … ) is a negative look-ahead
x0F has quit [Disconnected by services]
<gener1c> yeah i know those
x0F_ has joined #ruby
<gener1c> but why does the or help
<gener1c> OR*
x0F_ is now known as x0F
<apeiros_> because as I told you, the "22" in "&#1221" is matched, because "22" is not preceeded by "&#"
<apeiros_> thus fulfilling the negative look-behind
<apeiros_> but it is preceeded by either &# or \d, namely, it is preceeded by 1, which matches the \d part
u89 has joined #ruby
<gener1c> but basically all the numbers except the first one are preceeded by a number so they will all match the negative look behind's OR part
<Xeago> why doesn't Hash implement #+?
<apeiros_> yes
<apeiros_> Xeago: what would it do? merge?
Paradox has quit [Ping timeout: 268 seconds]
<Xeago> yea ;)
<apeiros_> hm, I think | would be more appropriate than +
<apeiros_> but yeah, good question. no idea.
<gener1c> apeiros_: is there a whitepaper on this subject? because its not covered well anywhere i looked
<gener1c> and right now i dont really fully understand what you said
<apeiros_> >> {a: 1} | {b: 2} # => {:a=>1, :b=>2}
<apeiros_> nice :)
<Xeago> | NoMethodError: undefined method `|' for {:a=>:d}:Hash
<apeiros_> Xeago: class Hash; alias | merge; end
<Xeago> burp..
sepp2k has joined #ruby
<txdv> there is a ruby class which produces something like "2 days 20 minutes" from timespan instances, how is it called?
<apeiros_> gener1c: get yourself a copy of "Mastering regular expressions"
<gener1c> thank you
reinaldob has quit [Ping timeout: 255 seconds]
<gener1c> hoot hoot
mmikeym has joined #ruby
yshh has joined #ruby
<Xeago> there was a new tool for regular expressions that could construct a regex from examples and known patterns
<Xeago> came out mid 2012'ish
<Xeago> anyone recognize/remember?
<JonnieCache> Xeago: http://regex.inginf.units.it/ maybe?
arya has joined #ruby
srji has quit [Ping timeout: 244 seconds]
<JonnieCache> it uses genetic programming (!)
<Xeago> yup!
dhruvasagar has quit [Read error: Connection reset by peer]
<Xeago> ah I thought it was machinelearning
<Xeago> that's why ddg didn't help..
<JonnieCache> i searched hacker news because i knew id seen it ther
<JonnieCache> e
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<Xeago> yea now you mention it, should've searched there aswell!
dhruvasagar has joined #ruby
k610 has quit [Ping timeout: 255 seconds]
rafter has joined #ruby
chussenot has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
<Xeago> I seem to be unable to change the types? training/validation
invisime has joined #ruby
Paradox has joined #ruby
invisime has left #ruby [#ruby]
invisime has joined #ruby
k610 has joined #ruby
fbernier has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
haxrbyte has joined #ruby
Guest10501 has joined #ruby
[Neurotic] has quit [Remote host closed the connection]
aetcore has joined #ruby
flip_digits has joined #ruby
vickaita has quit [Ping timeout: 268 seconds]
jrist-afk is now known as jrist
chussenot_ has joined #ruby
slainer68 has joined #ruby
jeffreybaird has joined #ruby
mark_locklear has joined #ruby
pestouille has joined #ruby
enderx86 has joined #ruby
enderx86 has quit [Remote host closed the connection]
aetcore has quit [Ping timeout: 246 seconds]
chussenot has quit [Ping timeout: 246 seconds]
chussenot_ is now known as chussenot
joeycarmello has joined #ruby
krawchyk has joined #ruby
_Null has joined #ruby
fbernier has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
cpruitt has joined #ruby
monkegji_ has quit [Remote host closed the connection]
Vert has joined #ruby
joeycarmello has quit [Ping timeout: 240 seconds]
haxrbyte_ has joined #ruby
enderx86 has joined #ruby
enderx86 has quit [Remote host closed the connection]
haxrbyte has quit [Ping timeout: 246 seconds]
Balthek has quit [Quit: Connection closed for inactivity]
ananthakumaran has quit [Quit: Leaving.]
Morkel has quit [Quit: Morkel]
srji has joined #ruby
sterNiX has quit [Ping timeout: 255 seconds]
gmci has joined #ruby
gmci is now known as Guest26286
pothibo has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
sterNiX has joined #ruby
sterNiX has quit [Changing host]
sterNiX has joined #ruby
joofsh has joined #ruby
k610 has quit [Ping timeout: 252 seconds]
nitti has joined #ruby
ReBa_ has joined #ruby
Cultofmetatron has joined #ruby
Cultofmetatron has quit [Remote host closed the connection]
k610 has joined #ruby
sterNiX has quit [Max SendQ exceeded]
clocKwize has quit [Remote host closed the connection]
muckerr has joined #ruby
sterNiX has joined #ruby
linoj has joined #ruby
<_Null> asdf
kil0byte has joined #ruby
_Null has quit [K-Lined]
Elhu has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
erichmenge_ has joined #ruby
binaryplease has quit [Quit: WeeChat 0.3.9]
freeayu has joined #ruby
samphippen has joined #ruby
seanyo has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
arya has quit [Ping timeout: 244 seconds]
Jork1 has quit [Quit: Jork1]
csaunders has joined #ruby
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Danielpk has quit [Ping timeout: 276 seconds]
arielpts has quit [Ping timeout: 255 seconds]
clocKwize has joined #ruby
nari has joined #ruby
<clocKwize> best way to generate a temporary filename (without creating a file)?
chussenot has quit [Remote host closed the connection]
arya has joined #ruby
chussenot has joined #ruby
tommyvyo has joined #ruby
chussenot has quit [Remote host closed the connection]
chussenot has joined #ruby
erichmenge has quit [Disconnected by services]
erichmenge_ is now known as erichmenge
Serial_Killer_C has joined #ruby
muckerr has quit [Ping timeout: 245 seconds]
Jork1 has joined #ruby
enderx86 has joined #ruby
tommyvyo has quit [Ping timeout: 246 seconds]
jbw has quit [Ping timeout: 260 seconds]
tpe11etier has joined #ruby
tpe11etier has left #ruby [#ruby]
u89 has quit [Remote host closed the connection]
tommyvyo has joined #ruby
u89 has joined #ruby
Servidorv has joined #ruby
<Servidorv> hey guys
<Servidorv> good morning
<Servidorv> how are you all??
<arturaz> clocKwize, (Time.now.to_f * 1000).to_i.to_s(36)
<arturaz> + rand(100000).to_s
<arturaz> + rand(100000).to_s(36)
<arturaz> if you want
JonnieCa1he has joined #ruby
JonnieCache has quit [Ping timeout: 260 seconds]
vickaita has joined #ruby
macabre has joined #ruby
csaunders has quit [Quit: Computer has gone to sleep.]
<Servidorv> hey guys you knwo i have a question, i have a date range, and i need to get all the dates in the middle, more specificly the monts, year is there any way fast to do so??
bier_ has joined #ruby
<Servidorv> by the way the dates are in unix stamp
zigomir has quit [Ping timeout: 264 seconds]
tomsthumb has quit [Read error: Connection reset by peer]
enderx86 has quit [Remote host closed the connection]
tomsthumb has joined #ruby
robotmay has joined #ruby
GoGoGarrett has joined #ruby
srji has quit [Ping timeout: 244 seconds]
psycho_one has joined #ruby
elico has quit [Quit: elico]
tommyvyo has quit [Ping timeout: 255 seconds]
Kyril has quit [Quit: Quitte]
srji has joined #ruby
moshee has quit [Ping timeout: 255 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
uris has joined #ruby
<atmosx> servidorv: I use time_diff
<atmosx> its' a gem that handles with these matters ina very user-friendly way
pavilionXP has quit [Ping timeout: 268 seconds]
jbw has joined #ruby
bbttxu has joined #ruby
CptPicard has joined #ruby
<CptPicard> hey... does ruby have a handy way of getting and setting properties of some x that may either be an object or a hash?
<CptPicard> like, x.prop vs x[:prop]
manizzle has quit [Ping timeout: 255 seconds]
<GeekOnCoffee> anybody familiar with https://github.com/pluginaweek/state_machine ? We're running into an issue where an action where an event has a "before_transition :from" that can impact which conditional path it should take
tommyvyo has joined #ruby
<apeiros_> CptPicard: take a look at openstruct
<GeekOnCoffee> it's calculating it's transition path before doing the before_transition as far as we can tell
<Servidorv> thanks atmosx
<Servidorv> i did it with (Date.parse(from)..Date.parse(till)).to_a
francisfish has joined #ruby
nari has quit [Ping timeout: 252 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
rails has joined #ruby
daniel_- has joined #ruby
ReBa_ has quit [Ping timeout: 245 seconds]
ddd has quit [Quit: Leaving.]
niklasb has joined #ruby
ddd has joined #ruby
awarner has quit [Remote host closed the connection]
macabre has quit [Remote host closed the connection]
rippa has joined #ruby
enderx86 has joined #ruby
tjasko has joined #ruby
mmikeym has quit [Ping timeout: 260 seconds]
ddd has left #ruby [#ruby]
Cultofmetatron has joined #ruby
samphippen has joined #ruby
joeycarmello has joined #ruby
ddd has joined #ruby
francisfish has quit [Ping timeout: 246 seconds]
ddd has left #ruby [#ruby]
ddd has joined #ruby
jeffreybaird has joined #ruby
statarb3 has quit [Quit: Leaving]
rvince has quit [Ping timeout: 240 seconds]
joeycarmello has quit [Ping timeout: 265 seconds]
ananthakumaran has joined #ruby
skum has quit [Quit: Leaving...]
Amirh has joined #ruby
sailias has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
Serial_Killer_C has quit [Remote host closed the connection]
jbw has quit [Ping timeout: 246 seconds]
Amirh1 has joined #ruby
reisl has quit [Quit: Leaving]
macabre has joined #ruby
codecaster has joined #ruby
dmerrick has joined #ruby
Amirh has quit [Ping timeout: 256 seconds]
<Servidorv> hey guys,
<Servidorv> will .push!({'month' => key, 'year' => value}) make a new array in the array im pushing too??
<Hanmac> no
<Servidorv> what will??
<Servidorv> so it will make an array for each month and year
<Servidorv> range = {}
<Servidorv> time_parse = (Date.parse(from)..Date.parse(till)).to_a
<Servidorv> range.push!({'month' => key, 'year' => value})
<Servidorv> time_parse.each{|key, value|
<Servidorv> }
<apeiros_> servidorv: {} are still hashes
jenrzzz has joined #ruby
<apeiros_> servidorv: also, paste >3 lines on a pastebin, not in this channel
<apeiros_> [] are arrays. arrays are not hashes.
<Servidorv> ok sorry
Rockford has joined #ruby
<Servidorv> oh ok,
flip_digits has quit [Read error: Connection reset by peer]
<apeiros_> there's no Hash#push! either as far as I'm aware
maesbn_ has quit [Remote host closed the connection]
margle has quit [Quit: Computer has gone to sleep.]
<Servidorv> it was working, but only with one of the dates, since the key is the same it will update the value
jonathanwallace has joined #ruby
<atmosx> servidorv: type on irb/pry: puts Hash.new.methods.sort.join(', ')
<Servidorv> ok
<atmosx> and see what are the availabel methods
<Servidorv> ok thanks
<workmad3> apeiros_: there isn't even an array .push! :)
<Servidorv> you are right, only merge
<atmosx> then consult rdoc, using: gem server -p 8080
<atmosx> lycos did block me after 678 requests from my ip
d3vic3 has quit [Ping timeout: 260 seconds]
cj3kim has joined #ruby
<atmosx> every search engine is so 'fucked up crazy' about it's search API blah.
<atmosx> google has insanelly small numbers for free usage of it's API... 100 requests per day per app/ip. Blah
d3vic3 has joined #ruby
<clocKwize> you're expecting them to give you something for nothing?
mityaz has joined #ruby
jbw has joined #ruby
centipedefarmer has joined #ruby
cj3kim has quit [Quit: Leaving]
wallerdev has joined #ruby
carloslo_ has joined #ruby
carlyle has joined #ruby
sh1nji has joined #ruby
carlosl__ has joined #ruby
aquaranto has joined #ruby
mityaz has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
nilg has joined #ruby
Guest40891 has joined #ruby
clj_newb has joined #ruby
carloslopes has quit [Ping timeout: 276 seconds]
carloslo_ has quit [Ping timeout: 246 seconds]
mmitchell has joined #ruby
Mon_Ouie has joined #ruby
hoelzro|away is now known as hoelzro
Connecti0n has joined #ruby
xpen has joined #ruby
cpruitt has quit [Quit: cpruitt]
vlad_starkov has quit [Remote host closed the connection]
tomsthumb has quit [Quit: Leaving.]
mercwithamouth has joined #ruby
morf has quit [Quit: eof]
Sou|cutter has joined #ruby
cakehero has joined #ruby
monkegjinni has quit [Remote host closed the connection]
monkegjinni has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
Neomex has joined #ruby
topek has quit [Quit: Leaving.]
stopbit has joined #ruby
Neomex has quit [Client Quit]
monkegji_ has joined #ruby
Rockford is now known as Rockfordal
cakehero has quit [Client Quit]
monkegjinni has quit [Ping timeout: 246 seconds]
tbrock_ has quit [Quit: Computer has gone to sleep.]
mikepack has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
JeanMertz has joined #ruby
fmcgeough has joined #ruby
tbrock_ has joined #ruby
<Xeago> Can anyone explain /(?:^|\s)#(\S+)/ ?
<apeiros_> ^ is begin of line
<apeiros_> \s is whitespace
Morkel has joined #ruby
werdnativ has joined #ruby
<DefV> ?: is "do not use these parentheses as matchers"
<DefV> # is #
<DefV> \S+ is multiple non-space characters
<apeiros_> so: (begin of line OR whitespace) followed by the char '#' followed by one or more non-whitespace chars
<DefV> and we're done
<DefV> yeah, 1 or more
<apeiros_> "many" :)
<apeiros_> and yes, () means group + capture, (?:) means group + no capture
enderx86 has quit [Remote host closed the connection]
<apeiros_> (captures are those things you can access via $1-$9 and/or MatchData#[], #captures)
tbrock_ has quit [Client Quit]
<Xeago> aight, so that is /#(\S+)/ but does not require flattening?
Criztian has joined #ruby
pskosinski has joined #ruby
headius has joined #ruby
<apeiros_> it still captures, so it still needs flattening
<apeiros_> assuming you use it with scan
<Xeago> hmm, okay
<Xeago> so what is the difference between the two?
<pskosinski> a = File.open(path).readlines; b = File.open(path).mtime; Why a = b?
<apeiros_> scan will yield nested arrays the very moment you have capturing groups in your regex
codecaster has quit [Read error: Connection reset by peer]
<apeiros_> the difference between /(?:^|\s)#(\S+)/ and /#(\S+)/ is that the former requires the # to be either at the start of a line or to be preceded by a whitespace
baphled has quit [Quit: Lost terminal]
<apeiros_> pskosinski: bad style, you leave filehandles open
<apeiros_> use blockform of open, or use the class method File.readlines
<Xeago> aight, so "no#tag"
<Xeago> thanks!
codecaster has joined #ruby
skaczor has joined #ruby
<pskosinski> apeiros_: ty :)
<apeiros_> pskosinski: also your question makes no sense…
<apeiros_> I quite doubt that File#mtime will == the contents of a file…
Tombar has joined #ruby
Appineer has joined #ruby
<pskosinski> Seconds instruction overwritten value of first variable too, so a and b = File.open(path).mtime
<apeiros_> assuming you meant: a = File.open(path); a.readlines; b = File.time(path); a.mtime == b, then it's probably because you query at the same time
jonathanwallace has quit [Remote host closed the connection]
samphippen has joined #ruby
<apeiros_> also mtime is modification time
centipedefarmer has quit [Remote host closed the connection]
<apeiros_> reading is not modifying afaik
bluenemo has quit [Remote host closed the connection]
<apeiros_> did you want atime?
<pskosinski> No, mtime. Thanks. :)
olivererxleben has joined #ruby
<apeiros_> then I don't see why it should change due to reading
frem has joined #ruby
<pskosinski> No... I mean…
joshman_ has joined #ruby
freeayu has quit [Remote host closed the connection]
<pskosinski> a = File.open(path).readlines;
<pskosinski> # a = [first_line, second, …]
<pskosinski> # b = Time.new(something)
<pskosinski> b = File.open(path).mtime;
<pskosinski> # a = Time.new(something)
vlad_starkov has joined #ruby
<apeiros_> you mean the content of a gets replaced?
<pskosinski> Yes
<apeiros_> that's definitively not the case
<apeiros_> you're doing something wrong elsewhere
<pskosinski> hm...
baphled has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
arietis has quit [Read error: Connection reset by peer]
<apeiros_> paste reproducable example code
<frem> when using begin … rescue … end, the o'reilly book says that variables defined in rescue are accessible outside the block. but are variables defined in begin supposed to be accessible in rescue?
<apeiros_> frem: yes
<apeiros_> begin; a=1; raise "foo"; rescue; p a; end
bigmac has quit [Quit: Leaving]
<shevy> poor foo
<shevy> is always raised
samuelj has joined #ruby
<shevy> cuddle "foo"
SCommette has joined #ruby
<frem> so variables defined in begin are accessible outside also. nice, thanks.
<apeiros_> frem: do you know irb?
<samuelj> Hey, can anyone recommend a good 2d graphics library for ruby? I need to knock out some visualisations pretty quick. They have to be live updating, mainly based around manipulation of 2d shapes. Anything spring to mind?
arietis has joined #ruby
<Xeago> what are you using for ui samuelj?
vlad_sta_ has joined #ruby
<JonnieCa1he> samuelj: you probably want something based around svg
<Xeago> if html, d3 is nice
<JonnieCa1he> like d3
<JonnieCa1he> or raphael, also in the browser
<frem> apeiros_: yeah. i wasn't sure if this was behavior i could rely on across multiple implementations/platforms though.
<pskosinski> apeiros_: Ah… I see problem, thank you. :)
BrianJ has joined #ruby
<samuelj> If it helps, I'm actually using JRuby. I render stuff in JFrames atm.
C0deMaver1ck has joined #ruby
Serial_Killer_C has joined #ruby
tomsthumb has joined #ruby
<JonnieCa1he> samuelj: cant you just use swing's 2d graphics stuff?
<JonnieCa1he> ive definitely drawn lots of 2d shit in java before, its pretty easy
<samuelj> I wondered if there was anything nicer in Ruby that meant I wouldn't have to use swing etc
Banistergalaxy has joined #ruby
<samuelj> could always use swing i suppose!
<frem> does monkey bars wrap the 2D graphics bits of swing?
<JonnieCa1he> youre already using swing though, JFrame is a swing class
<samuelj> JonnieCa1he, I know but I'm not averse to abandoning it.
<samuelj> I don't want to move to HTML though
<samuelj> ie d3
<JonnieCa1he> i like swing tbh. i have no idea if its efficiently implemented, but for the simple stuff ive done with it, it was very simple and never pissed me off
<JonnieCa1he> or maybe ive just blocked out the bad memories
AndChat- has quit [Ping timeout: 268 seconds]
tomsthumb has quit [Ping timeout: 264 seconds]
jozefk has joined #ruby
jozefk has quit [Changing host]
jozefk has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros_> frem: mri is the benchmark
<apeiros_> any implementation deviating from mri is buggy
mengu has quit [Read error: Operation timed out]
strangeworks has joined #ruby
strangeworks has quit [Max SendQ exceeded]
strangeworks has joined #ruby
CamonZ_ has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
lenovodroid has joined #ruby
eldariof has quit []
chussenot has quit [Quit: chussenot]
<samuelj> Actually, I have a quick side question: I'm using rvm, jruby and unbuntu. My project depends on jruby 1.6.8 (which i've installed) but the system default for jruby is 1.5.x. Is there a way to set a jruby default version in rvm, without forcing the default ruby to be jruby?
horofox has quit [Quit: horofox]
marlonandrade has joined #ruby
marlonandrade has quit [Client Quit]
headius has quit [Quit: headius]
Guest40891 is now known as _mityaz
beiter has joined #ruby
_mityaz is now known as mityaz_
cpruitt has joined #ruby
mityaz_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
apeiros_ has quit [Remote host closed the connection]
chussenot has joined #ruby
dnyy has joined #ruby
CamonZ_ has left #ruby ["Linkinus - http://linkinus.com"]
CamonZ has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
dnstbr has joined #ruby
pu22l3r has joined #ruby
<Xeago> samuelj: you can set the default version of jruby which only gets applied if your shell gets loaded
awarner has joined #ruby
headius has joined #ruby
<Xeago> system scripts should call systemruby anyways
<Servidorv> hey guys how can i do a .push but with a key on it
tommyvyo_ has joined #ruby
<Servidorv> so for example each push comes back with [key']
<Servidorv> Ñkey]
nemesit has joined #ruby
<Servidorv> [key]
JeanMertz has quit []
philcrissman has joined #ruby
mengu has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
minijupe has joined #ruby
trevortwining has joined #ruby
F1skr has joined #ruby
philcrissman has quit [Remote host closed the connection]
trevortwining has quit [Client Quit]
JustinCampbell has joined #ruby
trevortwining has joined #ruby
csaunders has joined #ruby
headius has quit [Ping timeout: 252 seconds]
wallerdev has joined #ruby
butblack has joined #ruby
mmikeym has joined #ruby
cezar-b has quit [Remote host closed the connection]
savage- has quit [Quit: savage-]
jonathanwallace has joined #ruby
savage- has joined #ruby
hotovson has quit [Remote host closed the connection]
xpen_ has joined #ruby
Ry_ has joined #ruby
philcrissman has joined #ruby
lenovodroid has quit [Read error: Connection reset by peer]
lenovodroid has joined #ruby
dstywho has joined #ruby
Guedes0 has joined #ruby
xpen has quit [Ping timeout: 246 seconds]
Gue______ has joined #ruby
srji_ has joined #ruby
csgui has joined #ruby
srji has quit [Ping timeout: 244 seconds]
margle has joined #ruby
blischalk has joined #ruby
<Servidorv> guys i cant find the solution on google
<Servidorv> how can i add a key to each array in a push
<DefV> OH NOES
<DefV> a what to each what in a what?
<Servidorv> i have loyalty_users.push(find_loyaltys(range[:month], range[:year], page_id))
<Servidorv> and i want to add a key to each push
<Servidorv> is there a way to do it??
<DefV> are you a PHP developer?
<Servidorv> yeap
<DefV> figured as much
<Servidorv> how??
<Servidorv> the way of thinking right??
<DefV> only PHP developers think Array's and Hash'es are the same
<Servidorv> true
<DefV> if you want something be key-value, you're looking for an Hash instead of an Array
Zai00 has joined #ruby
<DefV> Array is only pushing and popping and getting it by their index
tnk1 has quit [Ping timeout: 252 seconds]
<DefV> hashes have meaningful keys
Xeago has quit [Remote host closed the connection]
centipedefarmer has joined #ruby
pu22l3r has quit [Ping timeout: 255 seconds]
<Ry_> DefV: Hash's are basically associative arrays, so on a level.. not so untrue :P
xpen has joined #ruby
darthdeus has joined #ruby
<darthdeus> is there a 1.9 patch for this? http://bugs.ruby-lang.org/issues/7158
lenovodroid has quit [Ping timeout: 248 seconds]
<Servidorv> so i can't do it so it looks like array: [ 1:[bla, bla], 2:[bla, bla]]
<clocKwize> servidorv, no, hash uses {} instead
mityaz has joined #ruby
<clocKwize> so its {key1: value, key2: value} or {:key1 => value, :key2 => value}
xpen_ has quit [Ping timeout: 246 seconds]
<Servidorv> oh ok
rampantmonkey has joined #ruby
<Servidorv> so i will use loyalty_users = {} loyalty_users.merge([range[:month], range[:year]] => find_loyaltys(range[:month], range[:year], page_id))
<mityaz> Hi all. Can anybody explain to me such a concept: numbers are immutable in Ruby? I understand it with strings (as in Java). But what about numbers? What does there immatability mean?
tnk1 has joined #ruby
havenn has joined #ruby
<mityaz> and strings are mutable in Ruby, btw
tomsthumb has joined #ruby
aganov has quit [Remote host closed the connection]
rmcafee has joined #ruby
tnk1 has quit [Read error: Connection reset by peer]
tnk1 has joined #ruby
<Servidorv> how can i make it so [1,1] looks like [11]
<Servidorv> ??
d3vic3 has quit [Quit: leaving]
<clocKwize> servidorv, as in, convert each element in the array to a string and put it in an array of its own?
<clocKwize> erm, convert each element to a string, then join them together
ij has quit [Ping timeout: 265 seconds]
<Ry_> mityaz: It means they're immutable? Do anything interesting to them.. get a new object instance in return? Or are you asking something else?
<clocKwize> then put that in an array
<clocKwize> Ry_, can you not put unpritables in my IRC please
<Servidorv> someone told me yesterday something about [1,1].merge or something
<Servidorv> i don't really remember thats why im asking now
<Ry_> What was unprintable in that?
<DefV> the \\
<DefV> char after instance :-)
<rampantmonkey> servidorv merge is a hash method not an array method
<Ry_> :/ on my screen it's 'in'
<mityaz> Ry_: just asking about the concept of immutability for nums. I guess they are *always* immutable, ain't they?
<Ry_> mityaz: Fixnum stuff is, Bignum isn't afaik
beiter has quit [Quit: beiter]
ottbot has quit [Ping timeout: 260 seconds]
horofox has joined #ruby
cdehaan has joined #ruby
<cdehaan> Hello! I'm trying to start an app doing "rails s," and I'm getting no clear error messages, but just a string of lines starting like this: from /var/lib/gems/1.9.1/gems/railties-3.2.1/lib/rails/rack/log_tailer.rb:8:in `initialize'. Any ideas where to begin?
<Servidorv> thanks rampantmonkey
<mityaz> Ry_: maybe, it's that I can: if (5[0] == 0), but not 5[0] = 1
ilyam has joined #ruby
<Ry_> mityaz: that's accessing the number at the bit level, if you want to change the bit, use &
tbrock_ has joined #ruby
<Ry_> cdehaan: can you post the trace somewhere?
<cdehaan> Ry_: Sure thing! One second.
elsifaka has quit [Quit: Veloma e!]
hakunin_ has joined #ruby
davidcelis has quit [Quit: K-Lined.]
<cdehaan> Ry_: Ah, now I feel stupid! 'screen' was not allowing me to scroll back so it was cutting off the beginning of the error. Got it now. Thanks! :)
<Ry_> :)
<Servidorv> guys so how can i take the , from [1,1]
Appineer has quit [Remote host closed the connection]
<Servidorv> ??
<Servidorv> so it looks like [11]
Uranio has joined #ruby
samuelj has quit [Quit: Leaving]
hakunin has quit [Read error: Connection reset by peer]
<clocKwize> servidorv, tell us what you are trying to do, not what you want
<clocKwize> as what you want doesn't make sense
<Ry_> servidorv: clocKwize asked you to clarify what you meant by that, you're being vague
baroquebobcat has joined #ruby
<Servidorv> sorry
<Servidorv> im doing this
<Servidorv> loyalty_users.merge!([range[:month], range[:year]] => find_loyaltys(range[:month], range[:year], page_id))
codecaster has quit [Quit: Leaving.]
<Ry_> don't care what you are doing, we care what you want to achieve
margle has quit [Quit: Computer has gone to sleep.]
<clocKwize> servidorv, stop showing us code and explain what you are trying to do
<clocKwize> and we'll possibly tell you the right code to do it
<Servidorv> so what i want to achieve is to to make the key [range[:month], range[:year]] to be together, not separate with a ,
<clocKwize> why
<Servidorv> so after i can call array[11][value]
<clocKwize> gist us some data
margle has joined #ruby
<Ry_> [range[:month], range[:year]].join ' ' when you're instantiating .. but it sounds like you're doing something really odd.
savage- has quit [Quit: savage-]
<Servidorv> join did the trick
<Servidorv> thanks guys
<Servidorv> sorry for my vage explenation, i'm not so use to ruby, and i'm trying to lear, plus i live in argentina so my english is not that good
<Ry_> servidorv: when setting the key, use what i typed above but remove the space between the quotes
<Ry_> should do what you desire
ottbot has joined #ruby
<Servidorv> yeah it worked, i just used .join and it worked perfectly, thanks guys, now i have to compare the arrays. lol thanks
clocKwize has quit [Quit: Leaving]
xpen has quit [Remote host closed the connection]
cmarques has joined #ruby
und3f has quit [Quit: Leaving.]
xpen has joined #ruby
aa10123 has joined #ruby
tk___ has quit [Quit: ばいばい]
d2dchat has joined #ruby
daniel_- has quit [Read error: Operation timed out]
alem0lars_ has joined #ruby
alem0lars has quit [Ping timeout: 255 seconds]
arya has quit [Ping timeout: 244 seconds]
cmarques has quit [Quit: Changing server]
tk___ has joined #ruby
hackerdude has joined #ruby
k610 has quit [Ping timeout: 240 seconds]
vlad_sta_ has quit [Remote host closed the connection]
rampantmonkey has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
sailias has quit [Quit: Leaving.]
neersighted has joined #ruby
khakimov has joined #ruby
arya has joined #ruby
blischalk has quit [Quit: blischalk]
joofsh has quit [Remote host closed the connection]
CptPicard has quit [Ping timeout: 264 seconds]
xpen_ has joined #ruby
xpen_ has quit [Remote host closed the connection]
<Servidorv> i have an array that has arrays inside is there a way to compare the inside arrays?? 2 of them specifictly??
wgriffa has joined #ruby
joofsh has joined #ruby
xpen__ has joined #ruby
cmarques has joined #ruby
cdehaan has quit [Quit: cdehaan]
vlad_starkov has joined #ruby
xpen has quit [Ping timeout: 246 seconds]
butblack has quit [Quit: butblack]
butblack has joined #ruby
djbpython has quit [Read error: Operation timed out]
delimax has joined #ruby
cakehero has joined #ruby
pu22l3r has joined #ruby
LucidDreamZzZ has quit [Ping timeout: 276 seconds]
mityaz has quit [Read error: Connection reset by peer]
workmad3 has quit [Quit: Lost terminal]
Jellyg00se has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
<shevy> servidorv: define "compare". compare how exactly? what should be the target result?
<shevy> you can always run .flatten on an array
bradhe has joined #ruby
<Servidorv> look here is the array
xpen has joined #ruby
chussenot has quit [Quit: chussenot]
<Servidorv> if the same id comes out in the both of the arrays, 102012 and 112012 then return that
Uranio has quit [Remote host closed the connection]
geggam has joined #ruby
arubin has joined #ruby
dross has quit [Ping timeout: 256 seconds]
ilyam has quit [Quit: ilyam]
sailias has joined #ruby
<arietis> how do i check if string contains cyrillic chars?
aa10123 has quit [Quit: Quit]
mityaz has joined #ruby
sn0wb1rd has joined #ruby
xpen__ has quit [Ping timeout: 260 seconds]
LucidDreamZzZ has joined #ruby
dross has joined #ruby
n_blownapart has joined #ruby
pestouille has quit [Quit: pestouille]
<arietis> if s =~ /\p{Cyrillic}/ ?
Trioke has joined #ruby
arubin has left #ruby [#ruby]
chussenot has joined #ruby
xpen has quit [Remote host closed the connection]
arubin has joined #ruby
darthdeus has quit [Quit: Leaving...]
<n_blownapart> http://pastie.org/5351970 - how does the interpreter choose to return self for the regexp and super for #reverse! ? Is this a matter of operator precedence?
asobrasil has quit [Read error: Operation timed out]
<n_blownapart> thanks
carlyle has quit [Remote host closed the connection]
tenmilestereo has joined #ruby
<n_blownapart> i.e. operator precedence in line 3
axl_ has quit [Quit: axl_]
invapid has joined #ruby
tommyvyo has quit [Ping timeout: 260 seconds]
tommyvyo_ is now known as tommyvyo
Guedes0 is now known as Guedes[pgday-sp]
tommyvyo_ has joined #ruby
jgrevich has joined #ruby
Jellyg00se has joined #ruby
axl_ has joined #ruby
arturaz has quit [Remote host closed the connection]
dreinull has joined #ruby
seanyo has quit [Ping timeout: 246 seconds]
<dreinull> how do I compile the ruby source docs? I'm patching them a bit and need to check if they look ok.
delimax has quit [Quit: Leaving.]
davidcelis has joined #ruby
sterNiX has quit [Ping timeout: 246 seconds]
ChampS666 has joined #ruby
pu22l3r has quit [Ping timeout: 245 seconds]
jozefk has quit [Quit: by-bye]
n_blownapart has quit [Remote host closed the connection]
<shevy> <dreinull> perhaps with --enable-install-doc
jadon has joined #ruby
<dreinull> shevy: just the docs for a single file would be sufficient
Connecti0n has quit [Quit: Connecti0n]
colinbm has quit [Quit: colinbm]
mercwithamouth has quit [Ping timeout: 255 seconds]
Connecti0n has joined #ruby
sterNiX has joined #ruby
viktor has joined #ruby
x82_nicole has joined #ruby
<jadon> Good Morning. I'm having a problem when using jruby and openssl that works fine with mri… i get hit with socket closed errors. Anyone come across this issue before?
nitti has quit [Remote host closed the connection]
asobrasil has joined #ruby
nitti has joined #ruby
bbttxu has quit [Quit: bbttxu]
mercwithamouth has joined #ruby
<jadon> I should note that the only logical explanation is something is being sent/not being sent via jruby openssl as opposed to mri openssl
<x82_nicole> Why does this give me a blank hash? Hash.new(:hello => 'world')
ltsstar has joined #ruby
<ccooke> x82_nicole: Hash.new( obj ) means "Return a new hash, with obj as the default object"
viktor is now known as Guest9000
tjbiddle has quit [Quit: tjbiddle]
<ccooke> x82_nicole: so if you tried to access a nonexistant key in your new hash, you would get { hello: 'world' } back
<ccooke> (Instead of the usual nil)
<x82_nicole> Do I have the correct syntax? Or can you not create a new key/value pair with Hash.new? Only a value?
sterNiX has quit [Max SendQ exceeded]
philcrissman has quit [Remote host closed the connection]
ltsstar has quit [Client Quit]
alvaro_o has joined #ruby
<ccooke> x82_nicole: To create a new hash, you just use { hello: 'world' }
aantix has joined #ruby
burgestrand has quit [Quit: Leaving.]
iamlacroix has joined #ruby
burgestrand has joined #ruby
<ccooke> x82_nicole: Using Hash.new only allows you to set the default value.
sterNiX has joined #ruby
polymar has quit [Remote host closed the connection]
<burgestrand> x82_nicole: http://www.ruby-doc.org/core-1.9.3/Hash.html#method-c-new would answer your question.
<jadon> b = Hash.new; b = {}
rakl has joined #ruby
thinkit2 has quit []
Amirh1 has quit [Quit: Leaving.]
adeponte has joined #ruby
senny has quit [Remote host closed the connection]
<Ry_> could also use Hash[] or try_convert if you're trying to ensure a given object is a hash to play with
Mkman has quit [Quit: Lost terminal]
<Ry_> if you're just defining it pretty statically in code, just use {} cause why not! ;P
filipe has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
ltsstar has joined #ruby
sterNiX has quit [Max SendQ exceeded]
Appineer has joined #ruby
Appineer has left #ruby [#ruby]
sn0wb1rd has quit [Quit: sn0wb1rd]
sterNiX has joined #ruby
ryanlecompte has joined #ruby
philcrissman has joined #ruby
emptyflask has joined #ruby
tomaw has quit [Quit: Quitting]
tomaw has joined #ruby
olivererxleben has quit [Quit: Leaving...]
<arietis> invalid character property name {Cyrillic}: /\p{Cyrillic}/
<arietis> any ideas?
<arietis> docs clearly says it's supported
dr_bob has quit [Quit: Leaving.]
hoelzro is now known as hoelzro|away
Amirh has joined #ruby
<arietis> i'm using 1.9.3
<jblack> Hi. This should probably be obvious, but I can't seem to find it. what's the proper way to shift_each an array?
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
JustinCampbell has quit [Remote host closed the connection]
slainer68 has quit [Remote host closed the connection]
jadon has quit [Quit: jadon]
JustinCampbell has joined #ruby
JustinCampbell has quit [Read error: Connection reset by peer]
djbpython has joined #ruby
JustinCampbell has joined #ruby
maletor has joined #ruby
sterNiX has quit [Ping timeout: 252 seconds]
<arietis> #encoding: utf-8 is the key
<arietis> :)
<burgestrand> jblack: what would it do?
<pskosinski> How to kill object using its method...? I created a class with a method checking something and in a case I want to destroy object, stop executing it.
Iszak has quit [Quit: User has gone to sleep.]
<jblack> I want start off with an array of values, perform an action on each item, and end up with an empty array when done.
<yaymukund> the best I can come up with is a.times.do { el = a.unshift; ... }
mpereira has joined #ruby
<jblack> the best I have is "until a.empty? b = a.shift ; puts b; end
jeff_sebring has joined #ruby
<yaymukund> s/unshift/shift/
<jblack> just seems like there should be a... a.shift_each { |b| do_something_with_b } and making sure.
butblack has quit [Quit: butblack]
<burgestrand> I know of no method like that. Looking at the docs.
<burgestrand> Sounds awfully situational.
anoNxeRo has joined #ruby
Mon_Ouie has quit [Ping timeout: 264 seconds]
My_Hearing has joined #ruby
dross has quit [Ping timeout: 246 seconds]
<jblack> I could also do the gramattically correct version of a.each { |b| do_something_with_b| } a.delete
Tuxist has joined #ruby
tbrock_ has quit [Quit: Computer has gone to sleep.]
<burgestrand> Hm, I wonder…
butblack has joined #ruby
emptyflask has quit [Remote host closed the connection]
<jblack> a for me is an array of sleeping threads. I'm waking up the threads from this sleeping list, thus not wanting them in the array any more
<burgestrand> jblack: reject! works in that way, assuming you always return true. :P
emptyflask has joined #ruby
blazes816 has quit [Quit: blazes816]
anoNxeRo has quit [Max SendQ exceeded]
JustinCampbell has quit [Ping timeout: 240 seconds]
<jblack> a.reject! { |b| b.wakeup }
<jblack> ?
Eiam has joined #ruby
<burgestrand> jblack: yeah, assuming b.wakeup returns true.
<jblack> I'll double check. if not, then a ! b.wakeup =)
<burgestrand> jblack: but frankly, it’s kind of weird. ;)
Monie has joined #ruby
mahmoudimus has joined #ruby
blazes816 has joined #ruby
<burgestrand> jblack: hm, in ruby 1.9.2 it doesn’t appear to work like that either.
baphled has quit [Ping timeout: 255 seconds]
<jblack> so, I'm Doing It Rong.
apeiros_ has joined #ruby
ctwiz has joined #ruby
<burgestrand> jblack: I’d probably do something more like array.each(&:wakeup).clear
tommyvyo_ has quit [Ping timeout: 246 seconds]
hotovson has joined #ruby
rakm has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<jblack> I take it that & is an itrator?
<pskosinski> Ok, nvm, I modified some code and now I don't need it…
<jblack> I'm not familiar with that particular construct. Not sure how to google the meaning
<burgestrand> jblack: it is two things combined. When you do method(&something) in ruby, ruby will run something.to_proc, and it expects a proc (lambda, block) as a result from that call.
<burgestrand> jblack: the resulting block is then passed to the method as it’s block.
dross has joined #ruby
yaymukund has quit [Ping timeout: 240 seconds]
<burgestrand> jblack: the default implementation of Symbol#to_proc is a block that invokes the method with the same name as the value represents on it’s first argument, with any arguments following it
blazes816 has quit [Ping timeout: 255 seconds]
mwillhite has joined #ruby
tommyvyo_ has joined #ruby
<burgestrand> jblack: like this: http://pastie.org/private/gviw6bdwnutkem5wqwq
<mwillhite> anyone know how to run capistrano from rake?
<mwillhite> like Capistrano.invoke or something?
<burgestrand> jblack: so, array.each(&:wakeup) becomes array.each(&:wakeup.to_proc) which becomes array.each { |thread, *args, &block| thread.send(:wakeup, *args, &block) }
<davidcelis> run capistrano from rake...?
<davidcelis> why
BoomCow has joined #ruby
robert_ has joined #ruby
robert_ has joined #ruby
<burgestrand> It’s probably public_send and not send.
<burgestrand> Oh well.
<mwillhite> jenkins
<mwillhite> rake jenkins -> should deploy my shiz
<burgestrand> mwillhite: you could shell out?
nyuszika7h has quit [Quit: Upgrading WeeChat]
<burgestrand> mwillhite: sh "command to execute"
<jblack> Thanks much burgestrand. It's a little over me, but I can resolve that by reading about code blocks a bit closer.
tbrock_ has joined #ruby
<jblack> I really appreciate the hepl
xorigin has quit [Quit: leaving]
shiin has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<mwillhite> right, thanks burgestrand
<x82_nicole> I'm trying to do password = 'fksd
JustinCampbell has joined #ruby
philcrissman has quit [Remote host closed the connection]
JustinCampbell has quit [Remote host closed the connection]
JustinCa_ has joined #ruby
<x82_nicole> Erm, I'm trying to do password = 'cdsf8(#"SDF'DF', but the quotes prevent the string from instantiating. How do I set the variable to it, if the password contains single/double quotes?
Servidorv has quit [Quit: I couldn't repair your brakes, so I made your horn louder.]
tk___ has quit [Quit: ばいばい]
nyuszika7h has joined #ruby
robert_ has quit [Ping timeout: 240 seconds]
<My_Hearing> x82_nicole: You escape them first
<My_Hearing> Using a backslash, like so: puts "foo\"bar"
My_Hearing is now known as Mon_Ouie
<x82_nicole> Yeah, that only works once. What if I have more? I have to escape them by hand too?
srji_ has quit [Ping timeout: 244 seconds]
<Sou|cutter> x82_nicole: use %Q{Your String Here}
<arietis> how do i make it so i iterate thru lines of string and get new one?
clj_newb has quit [Ping timeout: 240 seconds]
<arietis> each_line doesn't return modified string
tjbiddle has joined #ruby
sepp2k1 has joined #ruby
samphippen has joined #ruby
Virunga is now known as LennyLinux
Nisstyre has quit [Ping timeout: 240 seconds]
sepp2k has quit [Ping timeout: 240 seconds]
arturaz has joined #ruby
srji has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
<Mon_Ouie> arietis: You'd need to use #map and #join or #each_with_object to build a new string
<Mon_Ouie> All each_line does is iterating
sn0wb1rd has joined #ruby
adeponte has quit [Remote host closed the connection]
xsbeats has quit [Ping timeout: 265 seconds]
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
tbrock_ has quit [Quit: Computer has gone to sleep.]
butblack is now known as NewNick
<arietis> Mon_Ouie: or i could just concat
<arietis> :)
Nisstyre has joined #ruby
codespectator has quit [Ping timeout: 260 seconds]
lushious has quit [Remote host closed the connection]
ghanima has joined #ruby
<ghanima> hello all
<Mon_Ouie> each_with_object would make you do that, it just saves one line to declare a variable
ananthakumaran1 has joined #ruby
<ghanima> quick question... Need to scrape a website for content and I normally use mechanize for this, but this site looks like it deals with a lot of javascript and I was wondering if someone could recommend a gem that can interpret javascript and show the data that is generated
ananthakumaran has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 240 seconds]
lushious has joined #ruby
Guedes[pgday-sp] has quit [Ping timeout: 246 seconds]
Amirh has quit [Quit: Leaving.]
Gue______ is now known as shellox
<shevy> go ruby goooo
jrajav has joined #ruby
wreckimnaked has quit [Read error: Operation timed out]
BoomCow has quit [Ping timeout: 245 seconds]
lushious has quit [Remote host closed the connection]
NewNick is now known as ebbflowgo
carlyle has joined #ruby
BoomCow has joined #ruby
apok has joined #ruby
amacgregor_osx has quit [Remote host closed the connection]
lushious has joined #ruby
answer_42 has quit [Quit: WeeChat 0.3.9]
gumonshoe has joined #ruby
JustinCa_ has quit [Remote host closed the connection]
icooba has quit [Quit: Computer has gone to sleep.]
pkrnjevi_ has joined #ruby
apok has quit [Remote host closed the connection]
<tjbiddle> could someone help clarify what i'm doing wrong here? (rspec) - i'm mocking the project improperly since i'm not getting what i want "branch_current' to return. http://pastebin.com/tBesCMQ8
chriskk has joined #ruby
mascool has joined #ruby
apok has joined #ruby
FlyingFoX has quit [Remote host closed the connection]
FlyingFoX has joined #ruby
ebbflowgo is now known as NewNick
bradhe has quit [Remote host closed the connection]
ctwiz has quit [Quit: ctwiz]
pkrnjevi_ is now known as pkrnj
NewNick is now known as ebbflowgo
margle has quit [Quit: Computer has gone to sleep.]
__miha__ has quit [Ping timeout: 276 seconds]
Mon_Ouie has quit [Ping timeout: 246 seconds]
jbw has quit [Ping timeout: 265 seconds]
__miha__ has joined #ruby
ilyam has joined #ruby
mrsolo has joined #ruby
ebbflowgo has left #ruby [#ruby]
ViperMaul|_ has joined #ruby
codespectator has joined #ruby
DrShoggoth has joined #ruby
timmow has quit [Quit: has left the building]
skcin7 has quit [Quit: Computer has gone to sleep.]
voodoofish430 has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
stkowski has joined #ruby
Rizzle has quit [Ping timeout: 276 seconds]
alexim has joined #ruby
mmikeym has quit [Ping timeout: 252 seconds]
beiter has joined #ruby
jrajav has quit []
philcrissman has joined #ruby
hoelzro|away is now known as hoelzro
c0rn has joined #ruby
cmarques has quit [Quit: leaving]
stayarrr has joined #ruby
sailias has quit [Quit: Leaving.]
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
qwerxy has quit [Quit: offski]
banjara has joined #ruby
pkrnj has joined #ruby
Edward_ has joined #ruby
jbw has joined #ruby
bbttxu has joined #ruby
alem0lars_ has quit [Read error: Connection reset by peer]
<Edward_> Need to build an html table with given inputs, any ideas?
alem0lars_ has joined #ruby
<Edward_> Specific tags need to have IDs and Classes
<Edward_> Would appreciate any input
seanyo has joined #ruby
yaymukund has joined #ruby
areil has quit [Remote host closed the connection]
g_bleezy has joined #ruby
bradhe has joined #ruby
chussenot_ has joined #ruby
chussenot_ has quit [Client Quit]
apeiros_ has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
<reactormonk> edward_, haml?
beiter has quit [Ping timeout: 246 seconds]
invapid has quit [Ping timeout: 260 seconds]
apok_ has joined #ruby
minijupe has quit [Read error: Connection reset by peer]
minijupe_ has joined #ruby
minijupe_ is now known as minijupe
<Edward_> reactormonk: Has to be returned as a string
<Edward_> the entire html table
<reactormonk> edward_, so what
thinkdevcode has joined #ruby
<Edward_> reactormonk: What do you mean?
<reactormonk> edward_, why would that be a problem?
rakl has quit [Quit: sleeping]
<arietis> how do i make it so gsub(regexp1|regexp2) wont iterate 2 times for each string?
g_bleezy has quit [Ping timeout: 276 seconds]
<Edward_> reactormonk: I'll look into haml then. Ty
twinturbo has joined #ruby
chussenot has quit [Ping timeout: 246 seconds]
apok has quit [Ping timeout: 264 seconds]
apok_ is now known as apok
<arietis> looks like it's cause regexp2 is part of regexp 1
mwillhite has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
pu22l3r has joined #ruby
maxer has quit [Quit: maxer]
csgui has quit [Quit: Page closed]
bricker has joined #ruby
banisterfiend has joined #ruby
JustinCampbell has joined #ruby
apeiros has quit [Ping timeout: 264 seconds]
<gener1c> rbenv?
Xabarus has joined #ruby
<gener1c> anybody heared of rbenv?
apeiros_ has joined #ruby
cdt has quit [Quit: Ex-Chat]
Liothen has quit [Read error: Operation timed out]
rampantmonkey has joined #ruby
apeiros has joined #ruby
artOfWar has quit [Remote host closed the connection]
apeiros has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
mikepack has quit [Remote host closed the connection]
apeiros has joined #ruby
<havenn> gener1c: people actually use rbenv so I switched to rbfu. =P
pestouille has joined #ruby
apeiros_ has quit [Ping timeout: 248 seconds]
<gener1c> lol
<Hanmac> i dont need rvm or rbenv because my system is shipped with 1.9.3 per default :D
JustinCampbell has quit [Ping timeout: 246 seconds]
Connecti0n has quit [Remote host closed the connection]
<gener1c> rbfu sounds cool
beiter has joined #ruby
<gener1c> oh and an mit guy made it
<reactormonk> gemsets? isn't that what bundler is for?
<pskosinski> eval "['yes', 'no'].sample" is just displaying text. What is wrong?
<reactormonk> pskosinski, what else should it do?
BoomCow has quit [Quit: This computer has gone to sleep]
<pskosinski> Choose randomly one element…
bbttxu has quit [Quit: bbttxu]
<apeiros> that's what it does
<apeiros> but… why eval?
<reactormonk> apeiros, nice one, didn't see that
<reactormonk> apeiros, just found a lib that does mangle its arguments...
<apeiros> reactormonk: yeah, sadly it's a widespread disease :(
<pskosinski> Oh… I used quotes one time to much… ok, fixed, ty
<reactormonk> pskosinski, seriously, why eval?
Tuxist_ has joined #ruby
psycho_one has quit [Remote host closed the connection]
<pskosinski> I am writing an IRC bot and want to add/remove commands using an external file… Just add tehre/remove commands
<pskosinski> there *
daniel_- has joined #ruby
adamdonahue has joined #ruby
<pskosinski> Is there better solution, not complicated like this? :P
<reactormonk> yet another? :D
<arietis> https://gist.github.com/0a3bce5a4fbb6a87ecb1 why do i get wrong s value at the end of this block?
adamdonahue is now known as amd
<pskosinski> reactormonk: Yes, beacuse all which I found suck.
<reactormonk> arietis, because it actually cares about what the block returns?
BoomCow has joined #ruby
<arietis> reactormonk: but block returns str
<pskosinski> reactormonk: Or in other words… are much to complicated…
centipedefarmer has quit [Remote host closed the connection]
<reactormonk> pskosinski, cinch?
<reactormonk> arietis, you sure?
margle has joined #ruby
headius has joined #ruby
<arietis> reactormonk: yes, latest puts sub printed proper result but "puts s" after this block returns wrong value
Tuxist has quit [Ping timeout: 255 seconds]
<reactormonk> arietis, `puts` returns nil
<arietis> so?
<arietis> should i use return sub?
<reactormonk> just put sub somewhere at the end
<arietis> weird
<arietis> reactormonk: thanks, it works
<pskosinski> reactormonk: It's one of those much too much complicated for me. :P
niklasb has quit [Ping timeout: 268 seconds]
<reactormonk> arietis, all about the return value
<pskosinski> My has ~100 sloc and has everything what I need. <3
beiter has quit [Quit: beiter]
Amirh has joined #ruby
Jork1 has quit [Quit: Jork1]
Axsuul has joined #ruby
kareem has joined #ruby
headius has quit [Ping timeout: 246 seconds]
bbttxu has joined #ruby
beiter has joined #ruby
beiter has quit [Client Quit]
beiter has joined #ruby
headius has joined #ruby
apok has quit [Remote host closed the connection]
apok has joined #ruby
beiter has quit [Client Quit]
tvw has quit [Remote host closed the connection]
vitor-br has quit [Read error: Connection reset by peer]
vickaita_ has joined #ruby
vickaita has quit [Ping timeout: 252 seconds]
tommyvyo_ has joined #ruby
hoelzro is now known as hoelzro|away
imami|afk is now known as banseljaj
SmoothSage has quit [Quit: Leaving]
straind has quit [Read error: Connection reset by peer]
mmikeym has joined #ruby
phantasm66 has joined #ruby
rakl has joined #ruby
<reactormonk> pskosinski, yeah, apeiros did that for a testframework once *cough*
TheFuzzball has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
<pskosinski> He created it? :o
<apeiros> reactormonk: I did what?
* apeiros too lazy for scrollback…
robotmay has quit [Remote host closed the connection]
thone_ has joined #ruby
jrist is now known as jrist-afk
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<Edward_> I need to build an HTML options hash and put it into html tags, how do I proceed?
kareem has quit [Quit: Page closed]
<apeiros> edward_: I suggest you come up with a solution yourself and show it off here
<apeiros> we gladly offer assistance, but we're very reluctant to solve your problems for you
centipedefarmer has joined #ruby
thone has quit [Ping timeout: 252 seconds]
<brendan`> ugh, annoying
dmerrick has quit [Read error: Connection reset by peer]
dmerrick has joined #ruby
<amd> In Python one can access strings like arrays: "abc"[1] -> b
Norrin has left #ruby ["Textual IRC Client: www.textualapp.com"]
<amd> or abc[1:] -> "bc"
Tombar has quit [Remote host closed the connection]
<amd> er
<amd> "abc"[1:]
<amd> In Ruby it seems this is the same except that you have to pass in a range?
<amd> "abc"[1..-1] -> bc
<amd> "abc"[1..1] -> b
<amd> this feels wrong, the second case at least
<apeiros> amd, yes, check the docs on String#[]
<amd> "abc"[1] -> Int
<apeiros> you're running an outdated ruby
<apeiros> 1.8 is ~4y old
<apeiros> you should upgrade to 1.9
<havenn> ^
<amd> oh, good to know
<amd> thanks
slainer68 has joined #ruby
headius has quit [Ping timeout: 246 seconds]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
Tombar has joined #ruby
Edward_ has quit [Quit: Page closed]
Mon_Ouie has joined #ruby
pkrnj has joined #ruby
jeff_sebring has quit [Quit: Leaving]
beiter has joined #ruby
Guedes[pgday-sp] has joined #ruby
rampantmonkey has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
rafter has quit [Remote host closed the connection]
jonathanwallace has quit [Ping timeout: 268 seconds]
jgarvey has joined #ruby
pkrnj has quit [Client Quit]
jonathanwallace has joined #ruby
pkrnj has joined #ruby
wmoxam has quit [Ping timeout: 260 seconds]
Guedes[pgday-sp] has quit [Client Quit]
JoeJulian has joined #ruby
jonathan_ has joined #ruby
SJr has quit [Excess Flood]
mahmoudimus has joined #ruby
Tearan has joined #ruby
SJr has joined #ruby
iamlacroix has left #ruby [#ruby]
jonathanwallace has quit [Ping timeout: 246 seconds]
ananthakumaran1 has quit [Quit: Leaving.]
vickaita has joined #ruby
<JoeJulian> Is there a way to get semver to match multiple ranges? I have a need where I need to match a range from >=2.6.0 in the 2.* branch or >=3.2.0 in the 3.* branch.
jonathanwallace has joined #ruby
Uranio has joined #ruby
ryanf has joined #ruby
niklasb has joined #ruby
chriskk has quit [Quit: chriskk]
vickaita_ has quit [Ping timeout: 240 seconds]
adeponte has joined #ruby
chriskk has joined #ruby
carlosl__ has quit [Remote host closed the connection]
jonathan_ has quit [Ping timeout: 260 seconds]
jonathanwallace has quit [Read error: No route to host]
mikepack has joined #ruby
jonathanwallace has joined #ruby
hotovson has quit [Remote host closed the connection]
Rockfordal has quit [Ping timeout: 276 seconds]
Mkman has joined #ruby
punkrawkR has joined #ruby
yshh has quit [Remote host closed the connection]
baroquebobcat has quit [Read error: Connection reset by peer]
baroquebobcat has joined #ruby
vickaita_ has joined #ruby
kkh has quit [Quit: WeeChat 0.3.8]
mercwithamouth has quit [Ping timeout: 264 seconds]
shellox has quit [Ping timeout: 240 seconds]
<gener1c> whats modruby.com?
<gener1c> whats modruby.net
nitti_ has joined #ruby
Juul has quit [Quit: lunch]
aquaranto has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
Prudhvi has joined #ruby
JustinCampbell has joined #ruby
havenn has joined #ruby
<Prudhvi> Hi, is there a difference between %w[A B] and ["A","B"] ?
vickaita has quit [Ping timeout: 256 seconds]
pavilionXP has joined #ruby
nitti__ has joined #ruby
<invisime> prudhvi: there's a syntactic difference.
vickaita has joined #ruby
vickaita_ has quit [Ping timeout: 246 seconds]
tenmilestereo has quit [Quit: Leaving]
nitti has quit [Ping timeout: 240 seconds]
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
<Prudhvi> invisime: i have a 3rd party api that works fine when calling a function with the later. But, throws an exception if i pass in the named former
<invisime> prudhvi: hm. are you sure your spaces are in all the right places? (and there aren't any where there aren't supposed to be any?)
wmoxam has joined #ruby
havenn has quit [Ping timeout: 246 seconds]
nitti_ has quit [Ping timeout: 246 seconds]
nitti has joined #ruby
friskd has joined #ruby
<Prudhvi> invisime: ah! my bad. i was passing %w[A, B]
Servidorv has joined #ruby
<Servidorv> hey guys
phantasm66 has quit [Quit: *poof*]
<Servidorv> how are you
<Servidorv> ??
<Servidorv> i have a question
<Prudhvi> invisime: thanks
<Servidorv> how can i take one month off this date 2012-11-06T20:28:34+0000
olrrai has joined #ruby
rippa has quit [Ping timeout: 245 seconds]
skcin7 has joined #ruby
swex_ has quit [Remote host closed the connection]
pu22l3r has quit [Ping timeout: 245 seconds]
<wgriffa> hello
alanp_ is now known as alanp
<wgriffa> Take that date variable i.e. mydate - 1.month
fumduq has joined #ruby
olrrai has quit [Client Quit]
Morkel_ has joined #ruby
nitti__ has quit [Ping timeout: 276 seconds]
G________ has joined #ruby
<Servidorv> thanks bro
G________ has left #ruby [#ruby]
<Prudhvi> isn't 1.month only available in Rails and not in Pure Ruby?
<bricker> yes
Morkel has quit [Ping timeout: 248 seconds]
Morkel_ is now known as Morkel
<Prudhvi> so, 1.month is a rails solution and not a ruby solution then
<bricker> correct
swex has joined #ruby
<Servidorv> oh
<wgriffa> oops. you are right. Been rails too long
<Servidorv> thats why it was sending me errors
<Servidorv> what will be the plain ruby solution for this??
<bricker> correct ruby solution is Time.now - 60*60*24*7*4. That's 4 weeks
<wgriffa> they should make that part of ruby
<wgriffa> check rails code to see how they do it.
<bricker> wgriffa: the problem with it is that it pollutes the integer class with date functionality.
vlad_starkov has quit [Remote host closed the connection]
<bricker> wgriffa: okay for a webapp framework, but probably not something that should be standard in Ruby
Tearan has quit [Quit: Sleepy Badger....]
<Servidorv> bricker not i already have the date, isnt Time.now the date for today??
<bricker> servidorv: ... yes, just substitute that with your date.
SJr has quit [Excess Flood]
<Servidorv> oh ok thanks
niklasb has quit [Ping timeout: 246 seconds]
Dreamer3 has joined #ruby
dstywho has quit [Quit: Leaving]
<Servidorv> hey bricker this for some reason didnt't work
<Servidorv> Date.parse(from) - 60*60*24*7*4
xandy has joined #ruby
mikepack has quit [Remote host closed the connection]
Rockfordal has joined #ruby
SJr has joined #ruby
who1dd2 has joined #ruby
who1dd2 has quit [Client Quit]
whowantstolivefo has joined #ruby
bradhe has quit [Remote host closed the connection]
hackerdude has quit [Remote host closed the connection]
<apeiros> lol
<apeiros> servidorv: take a look at Date#- docs
<apeiros> you might see that it states something about subtracting *days*
<apeiros> Time != Date, Time uses seconds. Date uses days.
sterNiX has joined #ruby
<apeiros> and 4 weeks != 1 month
kkh has joined #ruby
<bricker> apeiros: 1 month != anything
cakehero has quit [Quit: Computer has gone to sleep.]
<bricker> 1 month is an abstract measurement of time that can't be defined except by "a month"
kkh has quit [Client Quit]
<apeiros> yes, it can
<bricker> apeiros: hit me
<apeiros> it's not without issues
<bricker> ah.
<apeiros> but yyyy-mm-dd + 1 month is yyyy*12+mm+1
<apeiros> and then divmod and whatnot to get year & month again
alem0lars_ has quit [Quit: quit]
<apeiros> you have to decide how you deal with overflowing day, though (that'd be the issue)
<bricker> apeiros: I mean the division of a month.
bigmcq77 has quit [Quit: Computer has gone to sleep.]
<apeiros> but yes, the abstract "a month" is ill defined. a specific month however is defined
NsOmNiAc has joined #ruby
havenn has joined #ruby
<apeiros> e.g. 2012-12 has a defined duration
<bricker> apeiros: you're right, a *specific* month can be defined, but not "a month"
<Servidorv> so 4 weeks is better??
<bricker> not sure exactly how Rails implements "1.month" but I'm sure it's not pretty
<apeiros> but as for "a month", as long as you can specify how to deal with overflowing days, you can work with it
emptyflask has quit [Remote host closed the connection]
<whowantstolivefo> hiya
<bricker> servidorv: I guess it depends on what you want
djbpython has quit [Ping timeout: 246 seconds]
<Servidorv> i just want to take 30 days off the date that i already have
codespectator has quit [Quit: Computer has gone to sleep.]
<bricker> servidorv: then use 60*60*24*30
<Servidorv> ok thanks guys
<apeiros> bricker: seems like it is defined as 30 days
<bricker> apeiros: I guess so :)
<apeiros> ActiveSupport::Duration.new(self * 30.days, [[:months, self]])
Tuxist has joined #ruby
bradhe has joined #ruby
<apeiros> and yeah, fugly
<bricker> apeiros: yeah
wgriffa has quit []
maletor has quit [Quit: Computer has gone to sleep.]
t0rc has joined #ruby
Tuxist_ has quit [Ping timeout: 252 seconds]
codespectator has joined #ruby
whowantstolivefo has quit [Remote host closed the connection]
blazes816 has joined #ruby
whowantstolivefo has joined #ruby
BobAnon has quit [Ping timeout: 252 seconds]
array_ is now known as array
Guest10501 has quit [Quit: Guest10501]
havenn has quit [Read error: Connection reset by peer]
freakazoid0223 has quit [Read error: Connection reset by peer]
JustinCampbell has quit [Remote host closed the connection]
slainer68 has quit [Remote host closed the connection]
L0L0L0L0L has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
slainer68 has joined #ruby
kirun has joined #ruby
tomsthumb has quit [Quit: Leaving.]
fmcgeough has quit [Quit: fmcgeough]
pestouille has quit [Quit: pestouille]
carlyle_ has joined #ruby
Nisstyre has quit [Quit: Leaving]
beiter has quit [Quit: beiter]
jaygen has joined #ruby
codezombie has quit [Quit: Linkinus - http://linkinus.com]
carlyle has quit [Ping timeout: 245 seconds]
whitedawg has joined #ruby
havenn has joined #ruby
cakehero has joined #ruby
bradhe has quit [Remote host closed the connection]
tvw has joined #ruby
katherinem13 has quit [Ping timeout: 246 seconds]
cmarques has joined #ruby
<reactormonk> is there a must_be_true in minitest/spec?
bigmcq77 has joined #ruby
cmarques has quit [Client Quit]
seanyo has quit [Ping timeout: 246 seconds]
cmarques has joined #ruby
ctwiz has joined #ruby
kkh has joined #ruby
Ry_ has quit [Ping timeout: 246 seconds]
ctwiz has quit [Client Quit]
Tuxist has quit [Read error: Connection reset by peer]
yshh has joined #ruby
Servidorv has quit [Quit: Given the choice between you, I'll take the sea-sick crocodile.]
pkrnj has quit [Quit: Computer has gone to sleep.]
forced_request has joined #ruby
u89 has quit [Remote host closed the connection]
RandyInLA has quit [Read error: Connection reset by peer]
<havenn> reactormonk: Plain vanilla #assert tests truthiness. Or if you really want true itself, something like: assert_kind_of TrueClass
RandyInLA has joined #ruby
swex_ has joined #ruby
swex has quit [Ping timeout: 246 seconds]
<reactormonk> havenn, assert_equal true/false
u89 has joined #ruby
ghanima has quit [Ping timeout: 240 seconds]
NsOmNiAc has quit [Quit: Leaving]
fumduq has quit [Quit: Linkinus - http://linkinus.com]
fumduq has joined #ruby
artOfWar has quit [Remote host closed the connection]
artOfWar has joined #ruby
Servidorv has joined #ruby
<Servidorv> is ther a way i can covert [10,2012] to plain 10/2012 ???
sterNiX has quit [Ping timeout: 252 seconds]
<reactormonk> servidorv, hum?
<Servidorv> yeah i have this [element[0]['month'], element[0]['year']] and that makes [10, 2012]
<cmarques> servidorv: [10,2012].map(&:to_s).join("/")
<Servidorv> thanks
<havenn> servidorv: [10,2012].join '/'
<otters> [10,2012] * '/'
<GeekOnCoffee> otters: nice!
adeponte has quit [Ping timeout: 246 seconds]
<cmarques> otters: what! I didn't know about that, nice!
<GeekOnCoffee> otters: that being said, it's less obvious than join
<havenn> $,='/';[10,2012].join
<GeekOnCoffee> but a nice trick for golf at the very least
adeponte has joined #ruby
<otters> not if you've ever read part of the standard library
<otters> kinda like that T_PAMAAYIM_NEKUDOTAYIM PHP error that people try to make a big deal out of
emptyflask has joined #ruby
katherinem13 has joined #ruby
Tania has joined #ruby
invisime has quit [Quit: Leaving.]
<GeekOnCoffee> I knew the repetition half of Array.* but not the join
Roa has quit [Ping timeout: 264 seconds]
monkegji_ has quit [Ping timeout: 246 seconds]
sterNiX has joined #ruby
jslowe has joined #ruby
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
adeponte has quit [Remote host closed the connection]
yshh has quit [Remote host closed the connection]
Servidorv has quit [Quit: Don't push the red button!]
hackerdude has joined #ruby
tomsthumb has joined #ruby
mpereira has quit [Ping timeout: 240 seconds]
jonan has joined #ruby
bradhe has joined #ruby
NsOmNiAc has joined #ruby
Amirh has quit [Quit: Leaving.]
c0rn has quit [Quit: Computer has gone to sleep.]
jrist-afk is now known as jrist
<t0rc> Does anyone have a fix for JSON.parse not working correctly if you parse something like {"a" => {"b" => "c"}} when using :symbolize_names => true ?
ilyam_ has joined #ruby
c0rn has joined #ruby
chriskk has quit [Quit: chriskk]
pkrnj has joined #ruby
Ry_ has joined #ruby
cmarques has quit [Ping timeout: 252 seconds]
chussenot has joined #ruby
wmoxam_ has joined #ruby
<t0rc> nevermind
chriskk has joined #ruby
<t0rc> it's doing it's default behavior it just mangles all keys if one has a space
t0rc has quit [Quit: WeeChat 0.3.9]
rakl has quit [Quit: sleeping]
chussenot has quit [Client Quit]
ilyam has quit [Ping timeout: 255 seconds]
ilyam_ is now known as ilyam
nanderoo has quit [Quit: Leaving.]
rmcafee has quit [Quit: rmcafee]
codespectator has quit [Quit: Computer has gone to sleep.]
ilyam has quit [Read error: Connection reset by peer]
gift has joined #ruby
postmodern has joined #ruby
ilyam has joined #ruby
Nanuq has quit [Ping timeout: 246 seconds]
answer_42 has joined #ruby
tommyvyo_ has quit [Ping timeout: 265 seconds]
sdk has joined #ruby
apeiros_ has joined #ruby
codespectator has joined #ruby
codespectator has quit [Client Quit]
Tombar has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
gift has left #ruby [#ruby]
whitedawg has quit [Quit: Leaving.]
PragCypher has joined #ruby
Tombar has joined #ruby
tommyvyo_ has joined #ruby
abrotman has joined #ruby
<abrotman> What's the simple way to change the LOAD_PATH ?
<abrotman> or is there?
<reactormonk> abrotman, .unshift
<abrotman> i'd need a bit of an example .. i'm not a ruby dev
apeiros has quit [Ping timeout: 240 seconds]
<reactormonk> abrotman, are you a dev?
<abrotman> you're saying in the main 'binary, after the #!/usr/bin/ruby , put a line such as .unshift
lucianosousa has joined #ruby
<abrotman> reactormonk: not for anything ruby :)
jrajav has joined #ruby
pothibo has quit [Quit: pothibo]
<abrotman> reactormonk: if you want to point me at docs, go for it :)
<abrotman> on the scond line of a the main script, $LOAD_PATH.unshift(<path>) ?
krawchyk has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 246 seconds]
<reactormonk> abrotman, exactly
<abrotman> let's see how this goes .. say your prayers .. if i mess up .. things explode
Tombar has quit [Read error: Connection reset by peer]
rakl has joined #ruby
csaunders has quit [Quit: Computer has gone to sleep.]
Gu_______ has joined #ruby
codecaster has joined #ruby
<abrotman> reactormonk: got much further .. appreciated .. now i get to debug the rest :)
<abrotman> this app was clearly meant for 1.8
carl_ has joined #ruby
carl_ has quit [Client Quit]
artOfWar has quit [Ping timeout: 240 seconds]
rampantmonkey has joined #ruby
Tombar has joined #ruby
Gu_______ has quit [Client Quit]
rampantmonkey has quit [Client Quit]
Zolrath has joined #ruby
geekbri has quit [Remote host closed the connection]
katherinem13_ has joined #ruby
iaj_ has quit [Ping timeout: 265 seconds]
Morkel has quit [Quit: Morkel]
iaj has joined #ruby
havenn has quit [Remote host closed the connection]
Nanuq has joined #ruby
havenn has joined #ruby
jgrevich_ has joined #ruby
katherinem13 has quit [Ping timeout: 276 seconds]
katherinem13_ is now known as katherinem13
elaptics is now known as elaptics`away
apeiros_ has quit [Remote host closed the connection]
arturaz has quit [Remote host closed the connection]
jgrevich has quit [Ping timeout: 264 seconds]
jgrevich_ is now known as jgrevich
Bosma has quit [Quit: leaving]
caleb_io has joined #ruby
havenn has quit [Ping timeout: 276 seconds]
gumonshoe has quit [Quit: leaving]
havenn has joined #ruby
dmerrick has quit [Ping timeout: 240 seconds]
freakazoid0223 has joined #ruby
wmoxam has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
tjasko has quit [Ping timeout: 255 seconds]
workmad3 has quit [Client Quit]
Ry__ has joined #ruby
Ry_ has quit [Read error: Connection reset by peer]
Juul has joined #ruby
csaunders has joined #ruby
mikepack has joined #ruby
NsOmNiAc has quit [Ping timeout: 260 seconds]
otters has quit [Quit: WeeChat 0.3.9]
shiin has joined #ruby
mark_locklear has quit [Quit: Leaving]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
uris has quit [Quit: Leaving]
hotovson has joined #ruby
otters has joined #ruby
Mkman has quit [Ping timeout: 252 seconds]
apok_ has joined #ruby
Mkman has joined #ruby
kkh has quit [Changing host]
kkh has joined #ruby
Criztian has quit [Read error: Connection reset by peer]
Criztian has joined #ruby
wroathe has joined #ruby
havenn has quit [Remote host closed the connection]
apok has quit [Ping timeout: 246 seconds]
apok_ is now known as apok
ChampS666 has quit []
<wroathe> Hey all :) How do I access the information in my gemspec within other files in my gym (such as a rake task)
<wroathe> specifically gem.test_files
havenn has joined #ruby
<wroathe> Does Gem provide an interface for this?
<banisterfiend> wroathe: yeah it does
<wroathe> Any idea where I should start my search?
Mkman has quit [Ping timeout: 255 seconds]
Mkman has joined #ruby
<banisterfiend> wroathe: Gem::Specification.find_by_name("pry")
mattsgarrison has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 260 seconds]
caleb_io has quit [Quit: caleb_io]
<wroathe> Thanks man!
<wroathe> Really appreciate it
<banisterfiend> for example
<banisterfiend> wroathe: that returns an insance of Gem::Specification
<banisterfiend> wroathe: you can then call methods like: spec.test_files
<banisterfiend> or spec.description ec
roadt has quit [Ping timeout: 260 seconds]
adeponte has joined #ruby
havenn has joined #ruby
adeponte has quit [Read error: Connection reset by peer]
Roa has quit [Read error: Operation timed out]
nitti has quit [Remote host closed the connection]
<Spaceghostc2c> banisterfiend: Mister, was that channel not quite the sort of place you like?
carlyle_ has quit [Remote host closed the connection]
adeponte has joined #ruby
locriani_ has joined #ruby
locriani has quit [Read error: Operation timed out]
<banisterfiend> Spaceghostc2c: it's pretty cool, but i mostly just hang out on #pry and occasionally join this one and #ruby-lang
Neomex has joined #ruby
<Spaceghostc2c> banisterfiend: Oh gotcha! I just wanted to make sure we didn't upset you.
jeffreybaird has quit [Quit: jeffreybaird]
<banisterfiend> nah
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
<banisterfiend> Spaceghostc2c: what was it called again?
TheFuzzball has joined #ruby
_bart has joined #ruby
<banisterfiend> Roa: were you from #philosophy2 on undernet?
Uranio has quit [Quit: WeeChat 0.3.8]
baphled has joined #ruby
qwerxy has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
<arietis> what's better {} or do...end?
<banisterfiend> arietis: {} for one-liners do/end for multi-line
<arietis> kk, thanks
NsOmNiAc has joined #ruby
csaunders has quit [Quit: Computer has gone to sleep.]
Jasko has joined #ruby
sterNiX has quit [Ping timeout: 251 seconds]
jonathanwallace has quit []
jrajav has quit []
jonathanwallace has joined #ruby
juha_ has quit [Ping timeout: 268 seconds]
Slivka has joined #ruby
sterNiX has joined #ruby
linoj has quit [Quit: linoj]
nateberkopec has quit [Read error: Connection reset by peer]
maletor has joined #ruby
nateberkopec has joined #ruby
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Steppen has joined #ruby
BrianJ has quit [Quit: BrianJ]
jenrzzz has joined #ruby
dreinull has quit [Remote host closed the connection]
sterNiX has quit [Max SendQ exceeded]
adamblac1well has quit [Read error: Connection reset by peer]
sterNiX has joined #ruby
Steppen has left #ruby ["Leaving"]
<Spaceghostc2c> arietis: Also, depends.
lucianosousa has quit [Quit: lucianosousa]
CaptainJet has joined #ruby
Cultofmetatron has quit [Remote host closed the connection]
sailias has joined #ruby
sterNiX has quit [Max SendQ exceeded]
clj_newb has joined #ruby
arya has quit []
monokrome1 has joined #ruby
mmitchell has quit [Remote host closed the connection]
sterNiX has joined #ruby
Cultofmetatron has joined #ruby
<havenn> Yeah, usually {} for one-liners and do/end for multiline. On the other hand, the Weirich way is {} for blocks that return values and do/end for blocks used for their side-effects.
Cultofmetatron has quit [Remote host closed the connection]
Neomex has quit [Quit: Neomex]
und3f has joined #ruby
Jasko has quit [Ping timeout: 252 seconds]
juha_ has joined #ruby
BrianJ has joined #ruby
swarley has joined #ruby
stayarrr has quit [Quit: Leaving...]
sterNiX has quit [Ping timeout: 256 seconds]
Jasko has joined #ruby
<Spaceghostc2c> ^
havenn has quit [Remote host closed the connection]
<dakine> space ghost motherfucking coast to coast
<dakine> mah childhood
<swarley> ok
emmanuelux has joined #ruby
<Spaceghostc2c> Motherfucking hello to you, motherfucker. :D
<dakine> :)
<Spaceghostc2c> swarley: Did you catch that proof that blocks are arguments in ruby?
<dcope> spaceghostpurp?
<swarley> Spaceghostc2c; yeah.
<Spaceghostc2c> Bitchin'
und3f has quit [Ping timeout: 246 seconds]
<Spaceghostc2c> dcope: Spacetwerp, even!
jonathanwallace has quit [Remote host closed the connection]
sterNiX has joined #ruby
<dcope> \o/
niklasb has joined #ruby
answer_42 has quit [Ping timeout: 252 seconds]
adeponte has quit [Remote host closed the connection]
bigkevmcd has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
senj has joined #ruby
sterNiX has quit [Max SendQ exceeded]
Edward__ has joined #ruby
sterNiX has joined #ruby
<Hanmac> SpaceGhost ... jet another old TV show, and jet another where the "in Space" meme fits
Tania has quit [Quit: :p]
twopoint718 has joined #ruby
dnyy has quit [Remote host closed the connection]
vickaita has quit [Ping timeout: 246 seconds]
sailias has quit [Quit: Leaving.]
khakimov has joined #ruby
amacgregor_osx has joined #ruby
wroathe has quit [Ping timeout: 240 seconds]
apeiros_ has joined #ruby
rhuber has joined #ruby
rhuber has left #ruby ["WeeChat 0.3.7"]
tommyvyo has quit [Quit: Computer has gone to sleep.]
medik has joined #ruby
Xabarus is now known as Liothen
Liothen has quit [Changing host]
Liothen has joined #ruby
apeiros_ has quit [Ping timeout: 252 seconds]
RandyInLA has quit [Read error: Connection reset by peer]
jgarvey has quit [Quit: Leaving]
RandyInLA has joined #ruby
horofox has quit [Quit: horofox]
Norrin has joined #ruby
und3f has joined #ruby
Norrin has left #ruby [#ruby]
Neomex has joined #ruby
staafl has quit [Ping timeout: 260 seconds]
thiran29303a has joined #ruby
<thiran29303a> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- .util/systemUtils.rb (LoadError)
<thiran29303a> anyone know what i gotta do to fix this error
<thiran29303a> C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- .util/systemUtils.rb (LoadError)
codecaster has quit [Quit: Leaving.]
theRoUS has quit [Ping timeout: 248 seconds]
qwerxy has quit [Quit: offski]
joshman_ has quit [Ping timeout: 246 seconds]
Mkman has quit [Ping timeout: 255 seconds]
senj has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
senj has joined #ruby
Mkman has joined #ruby
philcrissman has quit [Remote host closed the connection]
<davidcelis> not nearly enough info
<davidcelis> we aren't mind readers
strangeworks has quit [Read error: Connection reset by peer]
<thiran29303a> what info do you need
siefca has joined #ruby
<siefca> ehlo
philcrissman has joined #ruby
<davidcelis> thiran29303a: gist the code you're trying to run, and the full backtrace
dnyy has joined #ruby
mercwithamouth has joined #ruby
philcrissman has quit [Remote host closed the connection]
<shevy> thiran29303a: this is a very uncommon error
<shevy> I never saw a leading '.' before
pskosinski has left #ruby ["Whatever"]
minijupe has quit [Quit: minijupe]
<thiran29303a> oh
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
<davidcelis> shevy: never seen a dotfile?
adeponte has joined #ruby
<arietis> how do i fix this "uninitialized constant Encoding::UTF_8"?
<davidcelis> don't reference the constant? because it's uninitialized?
<shevy> davidcelis: hmm in $HOME dir yeah... not in a require in a .rb file yet though
<arietis> but i wanna use it
Tearan has joined #ruby
<davidcelis> arietis: what ruby version
staafl has joined #ruby
<arietis> i dunno, i'm using shoes
sterNiX has quit [Ping timeout: 246 seconds]
<shevy> arietis: require 'pp';pp Encoding does not give you UTF?
Xeago has joined #ruby
<shevy> oops
<shevy> pp Encoding.constants
adeponte has quit [Remote host closed the connection]
<shevy> man those are strange Encodings... :MacCroatian
<shevy> :MacJapanese
<shevy> :BigMac
<Hanmac> MacTurkish :D
chriskk has quit [Quit: chriskk]
rakl has quit [Quit: sleeping]
twopoint718 has quit [Quit: leaving]
rakl has joined #ruby
<arietis> >> pp Encoding.constants
<arietis> NameError: uninitialized constant Encoding
sterNiX has joined #ruby
codezombie has joined #ruby
<davidcelis> lol
<davidcelis> are you using ruby 1.8 or some shit
Xeago has quit [Remote host closed the connection]
<arietis> 1.9.3
<arietis> :S
<davidcelis> lies
<Hanmac> pp RUBY_VERSION
<arietis> ok, found it
<arietis> it works in console
<arietis> but not in shoes
RantriX has joined #ruby
<arietis> can i force shoes to use specific ruby version?
wroathe has joined #ruby
Xeago has joined #ruby
chriskk has joined #ruby
thinkdevcode has quit [Remote host closed the connection]
amacgregor_osx has quit [Read error: Operation timed out]
alanp_ has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]
alanp_ has joined #ruby
stat1x has quit []
haxrbyte has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
visof has joined #ruby
staafl has quit [Ping timeout: 246 seconds]
wroathe has quit [Ping timeout: 260 seconds]
idletom has joined #ruby
baphled has quit [Ping timeout: 264 seconds]
iamjarvo has quit [Ping timeout: 246 seconds]
Mkman has quit [Quit: Lost terminal]
alanp has quit [Ping timeout: 248 seconds]
strangeworks has joined #ruby
beneggett has quit [Ping timeout: 260 seconds]
emptyflask has quit [Ping timeout: 276 seconds]
<davidcelis> shooooees
Serial_Killer_C has quit [Remote host closed the connection]
Guest9000 has quit [Ping timeout: 260 seconds]
<idletom> can someone help me why i get this error
PythonGirl has joined #ruby
mahmoudimus has quit [Ping timeout: 264 seconds]
postmodern has quit [Quit: Leaving]
PythonGirl has left #ruby [#ruby]
<arietis> idletom: what are you trying to achieve?
<idletom> replace characters in a string
<arietis> each_char already makes iterator for you
<idletom> if they are a certain value
c0rn has quit [Ping timeout: 240 seconds]
<davidcelis> idletom: if you're trying to replace, use gsub
<idletom> ok i will look it up
beneggett has joined #ruby
daniel_-_ has joined #ruby
amacgregor_osx has joined #ruby
daniel_- has quit [Read error: Operation timed out]
<idletom> davidcelis, this takes a regex?
alexim has quit [Quit: bye]
<davidcelis> or a string
Neomex has quit [Quit: Neomex]
<davidcelis> though i can't imagine why you'd want to use a string when you can use a motherfucking regular expression
iamjarvo has joined #ruby
<idletom> :)
<idletom> ok thx
<siefca> I have some problems with singleton class, it seems to drop my instance variables randomly
mahmoudimus has joined #ruby
ozzloy has quit [Ping timeout: 240 seconds]
chriskk has quit [Quit: chriskk]
mahmoudimus has quit [Read error: Connection reset by peer]
swex_ has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
mahmoudimus has joined #ruby
nomenkun_ has joined #ruby
viktor has joined #ruby
<siefca> I have a setter and a getter, and when I call a getter it does not reads instance variable (or it reads some other instance variable), the provblem dissolves when I explicitly call it on self
und3f has quit [Quit: Leaving.]
fantazo has joined #ruby
viktor is now known as Guest37737
nomenkun has quit [Ping timeout: 255 seconds]
ablankfield has joined #ruby
<davidcelis> gist
und3f has joined #ruby
und3f has quit [Client Quit]
timonv has quit [Remote host closed the connection]
macabre has quit [Remote host closed the connection]
Cultofmetatron has joined #ruby
jeffreybaird has joined #ruby
ablankfield has quit [Ping timeout: 265 seconds]
jeffreybaird_ has joined #ruby
<Spaceghostc2c> siefca: Slap it and tell it to do a better job.
<siefca> :)
c0rn has joined #ruby
qwerxy has joined #ruby
qwerxy has quit [Client Quit]
<siefca> i think i'm doing it wrong by creating instance while being in eigenclass, but that's just first assumption
<davidcelis> you set it to be nil...
arubin has quit [Read error: Operation timed out]
sterNiX has quit [Read error: Connection timed out]
<siefca> davidcelis: but the condition is always false
<davidcelis> yeah...
<siefca> sorry
arubin has joined #ruby
<siefca> no
<siefca> don't know
jeffreybaird has quit [Ping timeout: 240 seconds]
jeffreybaird_ is now known as jeffreybaird
banisterfiend has quit [Ping timeout: 246 seconds]
sterNiX has joined #ruby
<siefca> config_file = cfile shouldn't be evaluated since the condition is false
monokrome1 has quit [Ping timeout: 268 seconds]
<siefca> or it should
<swarley> config_file = cfile if false
tchebb has joined #ruby
<swarley> why?
<siefca> that's just a test
blacktulip has quit [Remote host closed the connection]
fbernier has quit [Read error: Connection reset by peer]
<swarley> if false will never be evaluated
<swarley> You're better off just commenting it
<siefca> that's just an example, in the real code there is a real test
joshman_ has joined #ruby
baphled has joined #ruby
<siefca> what's interesting is why config_file is nil
Grieg has quit [Quit: laterz! :D]
<siefca> that's not the condition problem
asobrasil has left #ruby [#ruby]
<siefca> that's probably the context problem
DrShoggoth has quit [Quit: Leaving]
<siefca> wrong example
<siefca> one sec
<rking> I wonder why `require` takes only one arg. ☹
stopbit has quit [Quit: Leaving]
awaage has joined #ruby
<swarley> rking; we should mod
<swarley> it
<swarley> require PerlShit, LoL, Hi
<swarley> require "library" :as => :Lib
chriskk has joined #ruby
<swarley> require "library" :hiding => [:stupid_method]
<rking> Hehe
<rking> I don't even want any specific meaning. I just want the files to be able to interpret the args somehow.
<rking> require 'pry-here', binding
<swarley> hm
<rking> require 'capistrano', application: 'foo', repository: '…'
<rking> etc.
<swarley> we could probably do something like
<swarley> Package :hurrdurr do ... end
<swarley> load it, parse the arguments, and throw away what we dont need
<rking> Yeah.
<rking> I just kind of wonder the history of it not taking args… I'll look it up at some point.
<swarley> I might make that package thing work or something
<swarley> I dunno, i think it would be interesting
<swarley> But it would consume resources
<swarley> Probably not too bad if you migrate it to C or do some inline
d2dchat has quit [Remote host closed the connection]
codezombie has quit [Quit: Linkinus - http://linkinus.com]
nemesit has quit [Quit: Leaving...]
<rking> Hrm, I don't follow re: resources.
<swarley> Like, it could be expensive as far as time goes
<rking> I guess I'm not picturing your mechanism.
<swarley> Slower than the standard require
<swarley> But then again, you're doing more with it. So the time spent would not be lost
<rking> require 'pry-here', binding could be as simple as setting $RARGV = {binding: <that-binding>}
<swarley> well what i was thinking was
<rking> Actually, I mean more like: load 'pry-here', binding # Because I don't mean for it to only happen once
kirun has quit [Quit: Client exiting]
<swarley> class Foo < Package
ffranz has quit [Ping timeout: 256 seconds]
Jasko has quit [Read error: Connection reset by peer]
<swarley> and then, have methods generated on Package#extended
Juul has quit [Ping timeout: 260 seconds]
Jasko has joined #ruby
<swarley> but Package :foo do ... would allow for the use of a global variable accessed via a internal DSL
<swarley> so that may be easier
<siefca> ok, got the right example
Slivka has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
unXus has joined #ruby
frem has quit [Quit: Computer has gone to sleep.]
<rking> siefca: self.config_file = "lalalala"
<rking> siefca: Without a receiver it thinks you mean to name a local variable that.
Criztian has quit [Remote host closed the connection]
geggam has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
<rking> A bit wonky but without that you'd be unable to ever name a local var the same as a method name.
h4mz1d has joined #ruby
<siefca> rking: i tried, and it's working that way, but shouldn't it work without explicit receiver?
<rking> Nope
ffranz has joined #ruby
<siefca> what is happening internally?
<siefca> why the instancje doesn't have the context of an instance?
visof has quit [Remote host closed the connection]
tyfighter has joined #ruby
monbro has joined #ruby
ozzloy has joined #ruby
<monbro> hi, i uninstalled rvm, now i get this error: "sh: /usr/local/rvm/rubies/ruby-1.9.3-p286/bin/ruby: not found" (from some tool calling ruby) anyone has a idea?
<davidcelis> how did you uninstall rvm
h4mz1d has quit [Ping timeout: 240 seconds]
<monbro> rvm implode
dnstbr has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
bbttxu has quit [Quit: bbttxu]
nomenkun has joined #ruby
maxer has joined #ruby
swarley has quit [Ping timeout: 240 seconds]
rakl has quit [Quit: sleeping]
thinkdevcode has joined #ruby
ffranz has quit [Quit: Leaving]
emmanuelux has quit [Remote host closed the connection]
rakl has joined #ruby
nomenkun_ has quit [Ping timeout: 246 seconds]
kiyoura has joined #ruby
kil0byte has quit [Remote host closed the connection]
whowantstolivefo has quit [Ping timeout: 246 seconds]
fyolnish has quit [Remote host closed the connection]
hotovson has quit [Remote host closed the connection]
Jdubs has joined #ruby
nitti has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
jeffreybaird has quit [Quit: jeffreybaird]
postmodern has joined #ruby
bradhe has quit [Remote host closed the connection]
rellin has joined #ruby
nitti has quit [Ping timeout: 240 seconds]