<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>
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.
<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]
<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
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]
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.]
<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]
<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?
<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.
<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]?
<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)
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
<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)]
<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.
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]
<apeiros_>
for some reason I don't know yet, "234 Ӆ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 "Ӆ" 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"
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]
<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
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
<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?
<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]
<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
<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]
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]
<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
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?
<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]
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]
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.
<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??
<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?
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)
<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.
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?