Topic for #ruby is now Ruby programming language || ruby-lang.org || RUBY SUMMER OF CODE! rubysoc.org/ || Paste >3 lines of text in http://pastie.org || Para a nossa audiencia em portugues http://ruby-br.org/
_whitelogger has joined #ruby
_whitelogger0 has joined #ruby
_whitelogger has joined #ruby
glosoli has joined #ruby
glosoli has joined #ruby
stenno has joined #ruby
stenno has joined #ruby
kenny__ has joined #ruby
kenny__ has joined #ruby
geoffw8_ has quit [#ruby]
geoffw8_ has quit [#ruby]
speggey has joined #ruby
speggey has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
nari has joined #ruby
nari has joined #ruby
sspiff has joined #ruby
sspiff has joined #ruby
eighty4 has joined #ruby
eighty4 has joined #ruby
alem0lars has joined #ruby
alem0lars has joined #ruby
visof has joined #ruby
visof has joined #ruby
philcrissman has joined #ruby
philcrissman has joined #ruby
M- has joined #ruby
M- has joined #ruby
csherin_ has joined #ruby
csherin_ has joined #ruby
justinmcp has joined #ruby
justinmcp has joined #ruby
safetyscissors has joined #ruby
safetyscissors has joined #ruby
johanhsfy has joined #ruby
johanhsfy has joined #ruby
tayy has joined #ruby
tayy has joined #ruby
Liothen has joined #ruby
Liothen has joined #ruby
Helius has joined #ruby
Helius has joined #ruby
sacarlson has joined #ruby
sacarlson has joined #ruby
virunga has joined #ruby
virunga has joined #ruby
Foxandxss has joined #ruby
Foxandxss has joined #ruby
theishi has joined #ruby
theishi has joined #ruby
<theishi> I am trying to write a ruby program that interacts with another ascii based program. For some reason as long as the other program is running, the output of my put statements are misaligned and I cannot get any input from the user
<theishi> I am not really sure where to go from here... any ideas on how to deal with this? I am using IO.popen
Richmond has joined #ruby
Richmond has joined #ruby
dazoakley has joined #ruby
dazoakley has joined #ruby
azbarcea has joined #ruby
azbarcea has joined #ruby
IAD has joined #ruby
IAD has joined #ruby
sspiff has joined #ruby
sspiff has joined #ruby
chimkan___ has joined #ruby
chimkan___ has joined #ruby
zackattack has joined #ruby
zackattack has joined #ruby
emdub has joined #ruby
emdub has joined #ruby
undersc0re has joined #ruby
undersc0re has joined #ruby
davidpk has joined #ruby
davidpk has joined #ruby
<emdub> if i have a hash {"one" => 1, "two" => 2, "three" => 1} and i want to get a list of all the keys that have a value of 1, what's the best way to do that? i'd expect the output of the hash to be ["one", "three"]
<apeiros_> you'll have to go through hash.each_value
<apeiros_> or actually hash.each, since you need the key…
<emdub> ah, okay
<apeiros_> 1.8 or 1.9?
<emdub> figured there might be an easier way
<apeiros_> in 1.9: hash.select { |k,v| v == 1 }.keys
<apeiros_> in 1.8: hash.select { |k,v| v == 1 }.map(&:first)
<apeiros_> actually, the latter is 1.8.7
<apeiros_> 1.8.6 and before: hash.select { |k,v| v == 1 }.map { |k,v| k }
<emdub> ah cool
<emdub> thank you sir!
jmeeuwen has joined #ruby
jmeeuwen has joined #ruby
banyan_ has joined #ruby
banyan_ has joined #ruby
Richmond_ has joined #ruby
Richmond_ has joined #ruby
acekiller has joined #ruby
acekiller has joined #ruby
visof has joined #ruby
visof has joined #ruby
glosoli has joined #ruby
glosoli has joined #ruby
ikaros has joined #ruby
ikaros has joined #ruby
tvo has joined #ruby
tvo has joined #ruby
tvo has joined #ruby
tvo has joined #ruby
kushal124 has joined #ruby
kushal124 has joined #ruby
wookiehangover has joined #ruby
wookiehangover has joined #ruby
sspiff has joined #ruby
sspiff has joined #ruby
emdub has quit ["."]
emdub has quit ["."]
Sliker has joined #ruby
Sliker has joined #ruby
sdwrage has joined #ruby
sdwrage has joined #ruby
fearoffish has joined #ruby
fearoffish has joined #ruby
iocor has joined #ruby
iocor has joined #ruby
phantomfakeBNC has joined #ruby
phantomfakeBNC has joined #ruby
frishi has joined #ruby
frishi has joined #ruby
<Tasser> The default location of gem installs has changed to $HOME/.gem/ruby
<Tasser> nice :-)
kushal124 has joined #ruby
kushal124 has joined #ruby
acekiller has joined #ruby
acekiller has joined #ruby
rfloriano has joined #ruby
rfloriano has joined #ruby
thone_ has joined #ruby
thone_ has joined #ruby
ph^ has joined #ruby
ph^ has joined #ruby
neutrino has joined #ruby
neutrino has joined #ruby
Seisatsu has joined #ruby
Seisatsu has joined #ruby
sdwrage has joined #ruby
sdwrage has joined #ruby
malditogeek has joined #ruby
malditogeek has joined #ruby
malditogeek has quit [#ruby]
malditogeek has quit [#ruby]
malditogeek has joined #ruby
malditogeek has joined #ruby
dv310p3r has joined #ruby
dv310p3r has joined #ruby
undersc0re has joined #ruby
undersc0re has joined #ruby
tvw has joined #ruby
tvw has joined #ruby
rfloriano has joined #ruby
rfloriano has joined #ruby
STP has quit [#ruby]
STP has quit [#ruby]
tomzx has joined #ruby
tomzx has joined #ruby
nari has joined #ruby
nari has joined #ruby
abhishekkr has joined #ruby
abhishekkr has joined #ruby
glosoli has joined #ruby
glosoli has joined #ruby
banisterfiend has joined #ruby
banisterfiend has joined #ruby
BiHi has joined #ruby
BiHi has joined #ruby
phantomfakeBNC has joined #ruby
phantomfakeBNC has joined #ruby
neurodrone has joined #ruby
neurodrone has joined #ruby
neurodrone has joined #ruby
neurodrone has joined #ruby
sacarlson has joined #ruby
sacarlson has joined #ruby
nanderoo has joined #ruby
nanderoo has joined #ruby
rfloriano has joined #ruby
rfloriano has joined #ruby
tk has joined #ruby
tk has joined #ruby
raluxgaza has joined #ruby
raluxgaza has joined #ruby
fr0gprince_mac has joined #ruby
fr0gprince_mac has joined #ruby
malditogeek1 has joined #ruby
malditogeek1 has joined #ruby
looopy has joined #ruby
looopy has joined #ruby
banisterfiend has joined #ruby
banisterfiend has joined #ruby
jbc22 has quit [#ruby]
jbc22 has quit [#ruby]
Indian has joined #ruby
Indian has joined #ruby
<dominikh> Tasser: source?
virunga has joined #ruby
virunga has joined #ruby
gokul has joined #ruby
gokul has joined #ruby
pu22l3r has joined #ruby
pu22l3r has joined #ruby
KucukMubasir has joined #ruby
KucukMubasir has joined #ruby
<KucukMubasir> gosh, I can't join an array of string with ' \ '. I tried ' \\ ' but in this case it puts double \\ instead of one \ . help!
McGo has joined #ruby
McGo has joined #ruby
<dominikh> KucukMubasir: it does not. you're probably trying it in irb and seeing the \\ in what it prints? that's because the output is escaped
<dominikh> KucukMubasir: use puts to see what it actually is.
<KucukMubasir> no, I see it on Console window
<KucukMubasir> thanks dominikh
looopy has joined #ruby
looopy has joined #ruby
<Tasser> dominikh, archlinux update
<dominikh> Tasser: ah, so it's a custom patch of theirs?
<Tasser> dominikh, I'll take a look
<Tasser> dominikh, http://sprunge.us/FhRA
<dominikh> so yeah, Arch-specific thing. awesome...
<dominikh> $distribution: Changing how your Ruby works since $date.
<Tasser> dominikh, well, you can create that gemrc yourself
Willejs has joined #ruby
Willejs has joined #ruby
<dominikh> Tasser: I know, and I do. my problem is that they are actually changing the defaults
<dominikh> Tasser: so whenever you have to help someone debug a problem, you have to first remember the oddities of each and every distribution.
MasterIdler__ has joined #ruby
MasterIdler__ has joined #ruby
<Tasser> welcome to linux
cdepue has joined #ruby
cdepue has joined #ruby
darthdeus has joined #ruby
darthdeus has joined #ruby
Helius has joined #ruby
Helius has joined #ruby
<Tasser> dominikh, you could also say the gem defaults are opposed to distributions
<dominikh> Tasser: eh... right, now it's the projects fault that others change its behaviou
fbernier has joined #ruby
fbernier has joined #ruby
Helius has joined #ruby
Helius has joined #ruby
Helius has joined #ruby
Helius has joined #ruby
<Tasser> if there's a bug in your context, you fix it, therefore you change the behaviour
berkes has joined #ruby
berkes has joined #ruby
`brendan has joined #ruby
`brendan has joined #ruby
iocor has joined #ruby
iocor has joined #ruby
jesly has joined #ruby
jesly has joined #ruby
glosoli has joined #ruby
glosoli has joined #ruby
notjohn has joined #ruby
notjohn has joined #ruby
MrGando has joined #ruby
MrGando has joined #ruby
malditogeek has joined #ruby
malditogeek has joined #ruby
porco has joined #ruby
porco has joined #ruby
provideal has quit [#ruby]
provideal has quit [#ruby]
speggey has joined #ruby
speggey has joined #ruby
red13 has joined #ruby
red13 has joined #ruby
chaitanya has joined #ruby
chaitanya has joined #ruby
wroathe has joined #ruby
wroathe has joined #ruby
ccapndave has joined #ruby
ccapndave has joined #ruby
rflorianobr has joined #ruby
rflorianobr has joined #ruby
wroathe_ has joined #ruby
wroathe_ has joined #ruby
Bartzy has joined #ruby
Bartzy has joined #ruby
<Bartzy> Hi
Jackneill has joined #ruby
Jackneill has joined #ruby
<ccapndave> Hey
<Bartzy> /var/lib/gems/1.8/bin/ is not on my PATH (I installed rubygems on debian via apt-get) - This is on purpose ? Should I just add it to my path ?
<ccapndave> bartzy: I think so, or use rvm which will do it automatically
denom has joined #ruby
denom has joined #ruby
ryannielson has joined #ruby
ryannielson has joined #ruby
<dominikh> and yes, it's on purpose.
imsplitbit has joined #ruby
imsplitbit has joined #ruby
JonSchuff has joined #ruby
JonSchuff has joined #ruby
david` has joined #ruby
david` has joined #ruby
jds has joined #ruby
jds has joined #ruby
c_ellis_ has joined #ruby
c_ellis_ has joined #ruby
<c_ellis_> Hi, I get a segfault on one of the tests for ruby 1.9.3 on solaris 10
<c_ellis_> 64 bit build. All tests pass on 32 bit one
sspiff has joined #ruby
sspiff has joined #ruby
geekbri has joined #ruby
geekbri has joined #ruby
Sliker has joined #ruby
Sliker has joined #ruby
LMolr has joined #ruby
LMolr has joined #ruby
enroxorz has joined #ruby
enroxorz has joined #ruby
LMolr has joined #ruby
LMolr has joined #ruby
enroxorz has quit [#ruby]
enroxorz has quit [#ruby]
<c_ellis_> would anyone have any idea on how to report this issue?
emmanuelux has joined #ruby
emmanuelux has joined #ruby
csexton has joined #ruby
csexton has joined #ruby
v0n has joined #ruby
v0n has joined #ruby
jlebrech has joined #ruby
jlebrech has joined #ruby
dv310p3r has joined #ruby
dv310p3r has joined #ruby
looopy has joined #ruby
looopy has joined #ruby
sspiff has joined #ruby
sspiff has joined #ruby
CannedCorn has joined #ruby
CannedCorn has joined #ruby
<apeiros_> c_ellis_: ruby-lang.org, on the bugtracker
LMolr has joined #ruby
LMolr has joined #ruby
lorenzo has joined #ruby
lorenzo has joined #ruby
lorenzo_ has joined #ruby
lorenzo_ has joined #ruby
a_meba has joined #ruby
a_meba has joined #ruby
rfloriano has joined #ruby
rfloriano has joined #ruby
vraa has joined #ruby
vraa has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
malditogeek has quit [#ruby]
malditogeek has quit [#ruby]
bbttxu_ has joined #ruby
bbttxu_ has joined #ruby
cantbecool has joined #ruby
cantbecool has joined #ruby
cantbecool has quit [#ruby]
cantbecool has quit [#ruby]
will_b has joined #ruby
will_b has joined #ruby
<v0n> hi
<v0n> Does '.' matchs the current directory on Windows?
td123 has joined #ruby
td123 has joined #ruby
will_b has joined #ruby
will_b has joined #ruby
<apeiros_> I don't use windows, but I'd expect that . is the current working directory in windows too…
<ccapndave> Yes, it doe
<ccapndave> *does*
<v0n> (portability question)
<v0n> thanks
bglusman has joined #ruby
bglusman has joined #ruby
<ccapndave> v0n Its all pretty much the same as *nix except the slashes are the other way around
djbpython has joined #ruby
djbpython has joined #ruby
<v0n> ccapndave, doesn't Ruby handle 'path/like/this' on Windows?
<ccapndave> Yes, I think Ruby deals with it if you always use forward slashes
<v0n> hum, I don't think so, otherwise File.join & co wouldn't exist...
<ccapndave> Its doing the conversion under the hood somewhere
<ccapndave> Sorry, I was talking in general, not about Ruby particularly :)
<apeiros_> technically it's even the windows API that does the handling (AFAIK)
NotMyself has joined #ruby
NotMyself has joined #ruby
PragCypher has joined #ruby
PragCypher has joined #ruby
mdw has joined #ruby
mdw has joined #ruby
iocor has joined #ruby
iocor has joined #ruby
tweeKula has joined #ruby
tweeKula has joined #ruby
Sailias has joined #ruby
Sailias has joined #ruby
phantasm66 has joined #ruby
phantasm66 has joined #ruby
glosoli has joined #ruby
glosoli has joined #ruby
steg132 has joined #ruby
steg132 has joined #ruby
wyhaines has joined #ruby
wyhaines has joined #ruby
genexp__ has joined #ruby
genexp__ has joined #ruby
KL-7 has joined #ruby
KL-7 has joined #ruby
cdepue_ has joined #ruby
cdepue_ has joined #ruby
frerich has joined #ruby
frerich has joined #ruby
djbpython has joined #ruby
djbpython has joined #ruby
<frerich> Hiya; I'm tinkering with Ruby right now and hit a small problem which some googling didn't seem to answer for me. Maybe somebody here knows better: How can I call a singleton method of some class (as given by 'C.singleton_methods') given an object of that class? Say, if I have a singleton method 'C.s', should 'o = C.new \n o.s' work?
mgraham has joined #ruby
mgraham has joined #ruby
iocor has joined #ruby
iocor has joined #ruby
<apeiros_> o.class.s
<apeiros_> @ frerich
straind has joined #ruby
straind has joined #ruby
andywww has joined #ruby
andywww has joined #ruby
<andywww> hi, i want to check that 3 strings are the same, can i do this on one statement? like one.eql?(two.eql?(three))?
apok has joined #ruby
apok has joined #ruby
cdepue has joined #ruby
cdepue has joined #ruby
<frerich> apeiros_: Aaaah!
<frerich> apeiros_: Thanks a ton!
<frerich> apeiros_: I guess it makes sense now that I think about it; I was too spoiled by other languages to consider this. :-)
waxjar has joined #ruby
waxjar has joined #ruby
<apeiros_> andywww: a == b && b == c
<andywww> and that'll give me a true or false won't it
<andywww> that'll do nicely, thanks
<stenno> andywww, your example wouldn't work, as two.eql?(three) would return true, and one would compare with true and thus fails
<andywww> yeah thats the problem i was having
<andywww> thanks
<andywww> i was trying to cut it down too much
<stenno> one.eql?(two) and one.eql?(three)
<stenno> that would work too and maybe looks nicer :)
<apeiros_> [a,b,c].uniq.size == 1 # but that's less efficient…
rippa has joined #ruby
rippa has joined #ruby
kpshek has joined #ruby
kpshek has joined #ruby
mdw_ has joined #ruby
mdw_ has joined #ruby
francisfish has joined #ruby
francisfish has joined #ruby
<stenno> b + c == 2 * a
<stenno> :D
<apeiros_> o0
<Tasser> stenno, a*2
denom has joined #ruby
denom has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
<stenno> oh >_>"
<stenno> right
apok has joined #ruby
apok has joined #ruby
<stenno> works for int and string!!
<stenno> and float
<Tasser> stenno, b = "aa" c = "" a = "a"
<stenno> hmpf
<stenno> fine
geekbri_ has joined #ruby
geekbri_ has joined #ruby
mtfk has joined #ruby
mtfk has joined #ruby
<stenno> [b,c].inject(true){|x, res| res &&= (a == x)}
<apeiros_> …
<Tasser> _wtf_
<stenno> [b,c].inject(true){|x, res| res and (a == x)}
<stenno> would be enough i guess
<CannedCorn> guys, what does ~> mean
<stenno> huh
<stenno> i know -> from 1.9.x
<apeiros_> CannedCorn: context rules, you know?
<rippa> it's for gem versions
<stenno> o_O"
<stenno> there is no ~> operator in ruby that i know of
<stenno> at least not in <1.9
<CannedCorn> right
<CannedCorn> but its in gemspecs
<CannedCorn> im having a hard time figuring out what it means
<apeiros_> let me guess - in a *string*?
<apeiros_> then see what rippa said
<CannedCorn> i get the gist of it
<CannedCorn> does it mean it needs to be exactly that version
ascarter has joined #ruby
ascarter has joined #ruby
<mtfk> any one have good advice how to create game where user decide what dependencis should be requried for example which adtapter he want to include in his app ?
<mtfk> CannedCorn: is a bundler thing
LBRapid has joined #ruby
LBRapid has joined #ruby
pradeepto has joined #ruby
pradeepto has joined #ruby
<mtfk> check here there is explanation what it mean
<CannedCorn> perfect, thank you!
<CannedCorn> >=
<CannedCorn> nice
<stenno> i wonder why they didn't use >= then o_O"
<mtfk> because is not the same
snip_it has joined #ruby
snip_it has joined #ruby
<mtfk> ~> mean >= x.y and < Y.x
<stenno> aah i see
<mtfk> so higher then this version but lower then new release
<apeiros_> higher *than
<mtfk> because for exampel >= 2.1 could be not compatible with 3.1
<mtfk> so You use the higher number in that tree
pi3r has joined #ruby
pi3r has joined #ruby
<stenno> so ~> 2 would get ever 2.x.x ?
<stenno> every*
<mtfk> yes but not 3.x.x
<stenno> yeah
bob_f has joined #ruby
bob_f has joined #ruby
Shamgar has joined #ruby
Shamgar has joined #ruby
djbpython has joined #ruby
djbpython has joined #ruby
somnium has joined #ruby
somnium has joined #ruby
mpereira has joined #ruby
mpereira has joined #ruby
statix has joined #ruby
statix has joined #ruby
namidark has joined #ruby
namidark has joined #ruby
rippa has joined #ruby
rippa has joined #ruby
vermiciousKnid has joined #ruby
vermiciousKnid has joined #ruby
moshee has joined #ruby
moshee has joined #ruby
apeiros_ has joined #ruby
apeiros_ has joined #ruby
Mekkis has joined #ruby
Mekkis has joined #ruby
pu22l3r has joined #ruby
pu22l3r has joined #ruby
kloeri has joined #ruby
kloeri has joined #ruby
undersc0re has joined #ruby
undersc0re has joined #ruby
dju has joined #ruby
dju has joined #ruby
dross has joined #ruby
dross has joined #ruby
codespectator has joined #ruby
codespectator has joined #ruby
Tick-Tock has joined #ruby
Tick-Tock has joined #ruby
csherin has joined #ruby
csherin has joined #ruby
<KL-7> hello, everyone
albemuth has joined #ruby
albemuth has joined #ruby
<shevy> dumdedum
<KL-7> can someone explain while in ruby error messages like "NameError: undefined local variable or method `asdf' for #<Object:0x866a94c>" variable name is surrounded with backtick and singlequote?
<KL-7> and not two single quotes, for example
<shevy> I think that is a convention
<shevy> the linux man pages also have that
<shevy> I guess it defines the beginning, and end, of an important word
<KL-7> any practical reason behind that?
<shevy> I myself use two `` within strings instead
<shevy> no idea but honestly I also don't care about it
<shevy> perhaps it was used for parsers
jesly has joined #ruby
jesly has joined #ruby
<KL-7> shevy, neither do I, just curious
<shevy> I also don't use man pages
KucukMubasir_ has joined #ruby
KucukMubasir_ has joined #ruby
<c_ellis_> it's fixed in trunk.. just having a hard time tracking down which changeset fixed it :)
<shevy> hmm when you want to make a .gem ... how do you layout the structure of the program?
jrist has joined #ruby
jrist has joined #ruby
<shevy> right now I dump pretty every .rb file into lib/
<shevy> but that leaves out the yaml files
<shevy> does anyone have a .gem spec where the yaml files are explicitely mentioned?
lkba has joined #ruby
lkba has joined #ruby
Drewch has joined #ruby
Drewch has joined #ruby
macmartine has joined #ruby
macmartine has joined #ruby
red13 has joined #ruby
red13 has joined #ruby
<KL-7> shevy, thanks, at least now I know that's not ruby-only practice
MrGando has joined #ruby
MrGando has joined #ruby
<shevy> yeah I think it originated somewhere in the Unix world
ConstantineXVI has joined #ruby
ConstantineXVI has joined #ruby
<shevy> if someone knows the name for it... :)
<shevy> I never found out so far (but I also did not research)
asobrasil has joined #ruby
asobrasil has joined #ruby
<KL-7> looks like it came from latex
<shevy> cool
luckman212 has joined #ruby
luckman212 has joined #ruby
<mtfk> try this one :)
<MrGando> Hey guys, I'm trying to do a basic delete_if operation but for some reason is working in a weird way for me, could anyone help me a bit ? https://gist.github.com/cce1ff6bf5cca01ccf5d
<KL-7> mtfk, thanks
<shevy> hmm different opinions mtfk, I am confused :(
ascarter has joined #ruby
ascarter has joined #ruby
<shevy> though I suppose
<KL-7> shevy, why different?
<shevy> it's a slight difference between the ` and the ``
<mtfk> shevy: is the same opinion
<shevy> KL-7, one mentions tex, but it shows two `` it does not explain the ` does it?
KucukMubasir_ has joined #ruby
KucukMubasir_ has joined #ruby
<KL-7> as I understand ` and ' were used to distinguish opening and closing quotes in latex
<KL-7> that's how it came to unix world
<shevy> hmm
<KL-7> and the reason behind is expalined in the answer to the question mtfk linked
<shevy> ok
<mtfk> yes and this was because encoding in past of computing era
<mtfk> so not only tex had that thing
<shevy> "in order to cheaply achieve improved typographic effects on the screen"
<MrGando> What's the return value of delete_if ?
stringoO has joined #ruby
stringoO has joined #ruby
<shevy> I would assume it returns all elements that return true for the block
<shevy> or vice versa :P
<MrGando> shevy I would assume that too
<mtfk> just check it in console :P
<MrGando> Could you tell me why this work this way ? https://gist.github.com/cce1ff6bf5cca01ccf5d
carlyle has joined #ruby
carlyle has joined #ruby
carlyle has joined #ruby
carlyle has joined #ruby
<shevy> MrGando did you output counter?
<MrGando> shevy yeah, it's in my gist
<diago> hello, Are general rack questions ok here?
tayy has joined #ruby
tayy has joined #ruby
<shevy> well MrGando you have a special array
<apeiros_> MrGando: not the source of your issue, but you shouldn't use #count when you mean #size
<shevy> I can not reproduce the code on the gist
<shevy> because you use m.subject and I dont know what that returns. a string?
<MrGando> shevy really ?
<shevy> the code works or?
<shevy> it removes all elements that include "perdida"
<MrGando> shevy I know it's actually deleting the elements with the word 'perdida' in it, if I 'puts emails.size' I get a 3 after running the delete_if
<shevy> well that is what it should do right? because 6 elements contain that word
<shevy> you should be able to negate with a !
<shevy> ! m.include? ('perdida')
<shevy> ! m.subject.include? ('perdida')
<shevy> btw dont put space after the "?"
ckrailo has joined #ruby
ckrailo has joined #ruby
<shevy> or, omit the ()
<MrGando> shevy so, this emails.delete_if { |m| m.subject.include? ('perdida') }.size is equivalent to emails.size (after applying the delete_if) ?
PragCypher has joined #ruby
PragCypher has joined #ruby
<shevy> sure
<shevy> you can split up chunks of code blocks if you want to
<shevy> deleted_emails = emails.delete_if { |m| m.subject.include? ('perdida') }
<shevy> n_emails = deleted_emails.size
<shevy> n_emails.should eq 9 #
<MrGando> shevy that could should output 9 right ?
<shevy> or with the ! respectively
<shevy> no of course not
ipsifendus has joined #ruby
ipsifendus has joined #ruby
<shevy> just look at what m.subject.include? does
<shevy> it requires if the element includes that word
<shevy> and if it does, it gets deleted
<MrGando> shevy thanks for the help mate
<shevy> and the result of the overall operation gets assigned to deleted_emails
tayy_ has joined #ruby
tayy_ has joined #ruby
<shevy> if you want the alternative, just use the !
ePirat has joined #ruby
ePirat has joined #ruby
<shevy> it's just one char :D
Sliker has joined #ruby
Sliker has joined #ruby
daniel_hinojosa has joined #ruby
daniel_hinojosa has joined #ruby
mikepack has joined #ruby
mikepack has joined #ruby
Targen has joined #ruby
Targen has joined #ruby
hasrb has joined #ruby
hasrb has joined #ruby
alex__c2022 has joined #ruby
alex__c2022 has joined #ruby
csherin has joined #ruby
csherin has joined #ruby
<diago> I need to setup some default headers for all Rack::Test::Method get, post, delete, put requests
<diago> Would anyone know how to go about this?
frerich has quit [#ruby]
frerich has quit [#ruby]
<shevy> not me
headius has joined #ruby
headius has joined #ruby
emocakes has joined #ruby
emocakes has joined #ruby
n3m has joined #ruby
n3m has joined #ruby
TaTonka has joined #ruby
TaTonka has joined #ruby
Silowyi has joined #ruby
Silowyi has joined #ruby
banister_ has joined #ruby
banister_ has joined #ruby
Sliker has joined #ruby
Sliker has joined #ruby
CheeToS has joined #ruby
CheeToS has joined #ruby
KucukMubasir_ has joined #ruby
KucukMubasir_ has joined #ruby
robert_ has joined #ruby
robert_ has joined #ruby
robert_ has joined #ruby
robert_ has joined #ruby
d2s has joined #ruby
d2s has joined #ruby
havenn has joined #ruby
havenn has joined #ruby
emocakes has joined #ruby
emocakes has joined #ruby
kidoz has joined #ruby
kidoz has joined #ruby
ascarter has joined #ruby
ascarter has joined #ruby
tayy has joined #ruby
tayy has joined #ruby
davidpk has joined #ruby
davidpk has joined #ruby
Targen has joined #ruby
Targen has joined #ruby
PragCypher has joined #ruby
PragCypher has joined #ruby
DrShoggoth has joined #ruby
DrShoggoth has joined #ruby
enherit has joined #ruby
enherit has joined #ruby
banseljaj has joined #ruby
banseljaj has joined #ruby
KucukMubasir_ has joined #ruby
KucukMubasir_ has joined #ruby
KucukMubasir_ has joined #ruby
KucukMubasir_ has joined #ruby
phantomfakeBNC has joined #ruby
phantomfakeBNC has joined #ruby
neurodrone has joined #ruby
neurodrone has joined #ruby
neurodrone has joined #ruby
neurodrone has joined #ruby
phantomfakeBNC has joined #ruby
phantomfakeBNC has joined #ruby
notjohn_ has joined #ruby
notjohn_ has joined #ruby
phantomfakeBNC has joined #ruby
phantomfakeBNC has joined #ruby
PragCypher has joined #ruby
PragCypher has joined #ruby
CannedCorn has joined #ruby
CannedCorn has joined #ruby
notjohn has joined #ruby
notjohn has joined #ruby
artOfWar has joined #ruby
artOfWar has joined #ruby
fayimora has joined #ruby
fayimora has joined #ruby
robert_ has joined #ruby
robert_ has joined #ruby
sefiu has joined #ruby
sefiu has joined #ruby
phantomfakeBNC has joined #ruby
phantomfakeBNC has joined #ruby
<sefiu> it's possible that some gem author or hacker upload an line to the last gem that "zip all source code and send to an email" to steal the source code and every app using this gem gets affected?
<robert_> shevy: hiii. :D
<shevy> hey robert_
<shevy> still doing boring webstuff? :D
ryan0x2 has joined #ruby
ryan0x2 has joined #ruby
kenperkins has joined #ruby
kenperkins has joined #ruby
bwlang has joined #ruby
bwlang has joined #ruby
<ePirat> Hello, today I've tried to run a git project called Showbot (https://github.com/mutewinter/Showbot) with ubuntu 11.10 and rvm ruby 1.9.3 but i keep getting following error http://pastebin.com/19yXUc0q It worked before with ruby 1.9.2 on ubuntu 10.10 perfectly… anyone has an idea what's happening?
artOfWar has joined #ruby
artOfWar has joined #ruby
kevinbond has joined #ruby
kevinbond has joined #ruby
ed_hz_ has joined #ruby
ed_hz_ has joined #ruby
<robert_> shevy: I ping-pong around a handful of different projects. :D
<robert_> I'm doing automagic file importer work right now. :D
iocor has joined #ruby
iocor has joined #ruby
<shevy> hmm
<shevy> robert_ I am still rewriting my largest project
<shevy> 18 .rb files rewritten so far, about 80 more to do
<robert_> oh boy.
<robert_> I'm using FSSM to watch my files.. I think.
sroy2 has joined #ruby
sroy2 has joined #ruby
sroy2 has quit [#ruby]
sroy2 has quit [#ruby]
zomgbie has joined #ruby
zomgbie has joined #ruby
savage- has joined #ruby
savage- has joined #ruby
davidcelis has joined #ruby
davidcelis has joined #ruby
apeiros_ has joined #ruby
apeiros_ has joined #ruby
blueadept has joined #ruby
blueadept has joined #ruby
luxurymode has joined #ruby
luxurymode has joined #ruby
pedm has joined #ruby
pedm has joined #ruby
eldariof has joined #ruby
eldariof has joined #ruby
twqla has joined #ruby
twqla has joined #ruby
neutrino1 has joined #ruby
neutrino1 has joined #ruby
denom has joined #ruby
denom has joined #ruby
hasrb has joined #ruby
hasrb has joined #ruby
bwlang_ has joined #ruby
bwlang_ has joined #ruby
sroy2 has joined #ruby
sroy2 has joined #ruby
jwang has joined #ruby
jwang has joined #ruby
ryanf has joined #ruby
ryanf has joined #ruby
CodeZombie has joined #ruby
CodeZombie has joined #ruby
<banseljaj> hi all
<banseljaj> hi shevy and canton7
<ePirat> anyone?
<apeiros_> anyone what?
<ckrailo> everyone!
<ePirat> whops wrong window
<robert_> Does anyone know if FSSM can glob for multiple file extensions in a single path?
PragCypher has joined #ruby
PragCypher has joined #ruby
<rippa> robert_: try it
<rippa> and tell us
<rippa> looks like it sure can
ipsifendus has joined #ruby
ipsifendus has joined #ruby
shellox has joined #ruby
shellox has joined #ruby
maletor has joined #ruby
maletor has joined #ruby
pdtpatr1ck has joined #ruby
pdtpatr1ck has joined #ruby
ConstantineXVI has joined #ruby
ConstantineXVI has joined #ruby
anotherkeebler has joined #ruby
anotherkeebler has joined #ruby
briankbuckley has joined #ruby
briankbuckley has joined #ruby
punkrawkR has joined #ruby
punkrawkR has joined #ruby
jgrevich has joined #ruby
jgrevich has joined #ruby
bwlang_ has joined #ruby
bwlang_ has joined #ruby
adeponte has joined #ruby
adeponte has joined #ruby
emocakes has joined #ruby
emocakes has joined #ruby
phantomfakeBNC has joined #ruby
phantomfakeBNC has joined #ruby
Mac_ has joined #ruby
Mac_ has joined #ruby
khakimov has joined #ruby
khakimov has joined #ruby
ben225 has joined #ruby
ben225 has joined #ruby
glosoli has joined #ruby
glosoli has joined #ruby
badabim has joined #ruby
badabim has joined #ruby
<plato> hello all
<plato> question: i put a test.rb file in my lib/ directory, then did require '../dashboard.rb' at the top of test.rb
<plato> inside dashboard.rb, i have $LOAD_PATH << './lib' ; require 'trustcore'
<plato> trustcore.rb is located in lib/
<plato> when i run ruby test.rb, i get a loaderror because dashboard can't find trustcore
<plato> how should I structure my files and/or requires to fix this?
<ePirat> how it's posible that the path says ruby1.9.1 when i don't habe ruby 1.9.1 even installed O_O http://dl.dropbox.com/u/45544504/Screenshots/-miqj~o68n_1.png
cantbecool has joined #ruby
cantbecool has joined #ruby
eka has joined #ruby
eka has joined #ruby
cantbecool has quit [#ruby]
cantbecool has quit [#ruby]
t0mmyvyo has joined #ruby
t0mmyvyo has joined #ruby
bwlang_ has joined #ruby
bwlang_ has joined #ruby
<td123> ruby lib/abi version
<td123> 1.9.3 also uses 1.9.1
<td123> ePirat: ruby1.9.1 -v
airstream66 has joined #ruby
airstream66 has joined #ruby
daglees has joined #ruby
daglees has joined #ruby
daglees has joined #ruby
daglees has joined #ruby
cbuxton has joined #ruby
cbuxton has joined #ruby
darthdeus has joined #ruby
darthdeus has joined #ruby
burgestrand has joined #ruby
burgestrand has joined #ruby
cloke has joined #ruby
cloke has joined #ruby
kenichi has joined #ruby
kenichi has joined #ruby
maxamillion has joined #ruby
maxamillion has joined #ruby
Araxia has joined #ruby
Araxia has joined #ruby
<maxamillion> is there a way to "inspect" an object in ruby from within irb?
<burgestrand> maxamillion: many ways, depending on what you want to inspect of it
<rippa> object.inspect
<maxamillion> burgestrand: I basically just want to see what methods it has, etc.
<maxamillion> rippa: ah, that would make sense
<rippa> maxamillion: object.methods
<maxamillion> also, is there a way to pass functions as first class datatypes? .... I assume I'm missing something
<maxamillion> rippa: oh ... nice
<rippa> object.constants
<canton7> p myobject.methods, also
<canton7> ah, too late
<burgestrand> maxamillion: you can create lambda {} and proc {} objects, but you can also retrieve methods by object.method(:methodname); these you can then pass around like you wish
<rippa> object.instance_variables
<burgestrand> maxamillion: unfortunately, you can’t call them like regular methods, but they respond to .call
<maxamillion> burgestrand: hrmm... ok, that's interesting
* maxamillion is just learning :)
<maxamillion> rippa: ah, awesome
codespectator has joined #ruby
codespectator has joined #ruby
<robacarp> you know...ruby is just damn cool.
skipper has joined #ruby
skipper has joined #ruby
<burgestrand> maxamillion: if you use pry instead of irb, it helps you with a lot of these inspection things, and also cleans away things you don’t care about
<maxamillion> burgestrand: oh? I'm not familiar with pry
<burgestrand> maxamillion: here’s a good starting point: http://pry.github.com/ :)
<burgestrand> maxamillion: you can use it just like you use IRB, but it also has a bunch of additional features
<maxamillion> ah, looks kinda like ipython for ruby (I will apologize in advance, I come from a python background and am trying to learn ruby ... my moments of comparison are not in any attempt to start a holy war of languages)
<johndbritton> I'm using resque to queue calls to a rate limited api. What is the preferred way to stop working when the limit is reached and then start working again after more requests are available
bwlang_ has joined #ruby
bwlang_ has joined #ruby
phantomfakeBNC has joined #ruby
phantomfakeBNC has joined #ruby
<burgestrand> maxamillion: don’t worry, we don’t have many language war idiots in here :)
<maxamillion> burgestrand: cool, I just felt the need to lay down the disclaimer ... I've been flamed for far less on different topics in other channels before ;)
mrsolo has joined #ruby
mrsolo has joined #ruby
baroquebobcat has joined #ruby
baroquebobcat has joined #ruby
lorandi has joined #ruby
lorandi has joined #ruby
<maxamillion> so .... is there an alternative method to create closures in ruby if you can't pass functions?
flagg0204 has joined #ruby
flagg0204 has joined #ruby
<sunaku> create closures and pass functions are two very different things
<yxhuvud> pass a block.
<maxamillion> sunaku: right, but in languages like javascript they tend to go together
<sunaku> okay. function(aaa) {bbb} in JS is equivalent to proc{|aaa| bbb } in RB
johnkpaul has joined #ruby
johnkpaul has joined #ruby
<maxamillion> ah ok
<maxamillion> cool
khouse has joined #ruby
khouse has joined #ruby
<johnkpaul> In java, there is the servlet api, in python, there is mod wsgi, is there an equivalent idea in ruby?
jergason has joined #ruby
jergason has joined #ruby
<sunaku> in both cases, aaa are optional for the caller of the function
<yxhuvud> maxamillion: the usual way to do it is to pass a block though.
<johnkpaul> an abstraction layer for web applcations?
dv_ has joined #ruby
dv_ has joined #ruby
<yxhuvud> maxamillion: like #each or File.open
timonv has joined #ruby
timonv has joined #ruby
etehtsea has joined #ruby
etehtsea has joined #ruby
<maxamillion> ah
lkba has joined #ruby
lkba has joined #ruby
<sunaku> yes. ruby has a habit of implicit parameters: (1) implicit hash as last parameter, (2) block passed to a method call
sarkis has joined #ruby
sarkis has joined #ruby
<sunaku> some_func({callback: function(aaa){bbb}}) in JS would be simplified into some_func do |aaa| bbb end in RB
nemesit has joined #ruby
nemesit has joined #ruby
<sunaku> ruby lets you reduce line noise, if you choose to
<maxamillion> gotchya
shadoi has joined #ruby
shadoi has joined #ruby
adamkittelson has joined #ruby
adamkittelson has joined #ruby
<maxamillion> just trying to learn
triptec has joined #ruby
triptec has joined #ruby
<sunaku> it doesn't prevent you from writing JS/Perl/whatever style though. some_func({callback: proc{|aaa| bbb}}) or some_func(callback: proc{|aaa| bbb})
<sunaku> in the old days, reading the pickaxe was the best way to learn ruby
<sunaku> there's a newer book by matz himself on ruby 1.9
<plato> anyone have a recommendation for how I can fix my require problem
sacarlson has joined #ruby
sacarlson has joined #ruby
<sunaku> maxamillion: yes
<maxamillion> awesome
<maxamillion> purchasing now
<maxamillion> thanks, I'm off to hit the books! :)
maxamillion has quit [#ruby]
maxamillion has quit [#ruby]
<sunaku> plato: what is the require problem? (how ironic. answering plato by asking him a question)
<diago> plato: what was your isses?
jgarvey has joined #ruby
jgarvey has joined #ruby
<yxhuvud> there is always the eloquent guide if you have a mind that appreciates the bizarre.
<plato> pastebinned from half an hour ago
MasterIdler_ has joined #ruby
MasterIdler_ has joined #ruby
<diago> that should be require_relative if using 1.9
<sunaku> yxhuvud: you mean poignant guide?
<yxhuvud> err, yes.
<yxhuvud> gah, thought of eloquent ruby just before.
francisfish has joined #ruby
francisfish has joined #ruby
<sarkis> is the poignant guide better for developers of other languages coming to ruby?
bwlang_ has joined #ruby
bwlang_ has joined #ruby
choffstein has joined #ruby
choffstein has joined #ruby
<plato> Cool thanks diago
<shadoi> it's better for entertainment
<sunaku> well said shadoi!
<plato> i liked the poignant guide but it doesn't have a good index of where to find topics
<jlebrech> has anyone used httparty here?
<yxhuvud> sarkis: it is not a book that you read to get any deep knowledge, though it is pretty good at showing what is possible
<plato> sarkis: i thought the koans were a really slick way of walking you through ruby syntax and capabilities
<plato> kinda long though and i dunno if you can do them out of order
Russell^^ has joined #ruby
Russell^^ has joined #ruby
Azure has joined #ruby
Azure has joined #ruby
Azure has joined #ruby
Azure has joined #ruby
skipper has joined #ruby
skipper has joined #ruby
<Eiam> I have a item.collect thats returning the last line of the collect.. i'd like to return 'nothing' in a specific case.. basically skip
<Eiam> i don't want to ret urn nil, or an empty array
danishkhan has joined #ruby
danishkhan has joined #ruby
Husel has joined #ruby
Husel has joined #ruby
<stenno> 'nil' comes pretty close to nothing :)
<Eiam> yeah but its still something
<stenno> no
<Eiam> and nil.each no worky
<plato> hey diago, require_relative '../dashboard.rb' still gives me a load error
airstream66 has quit [#ruby]
airstream66 has quit [#ruby]
<Eiam> stenno: yes, it is. nil is an object, which is something.
neohunter has joined #ruby
neohunter has joined #ruby
<stenno> uhm
<stenno> so _what_ do you want?
<rippa> you can't return nothing
<Eiam> nothing!
<skipper> Eiam: You must return something.
<rippa> nil is the closest thing
<skipper> Eiam: You could return Object.new, if you wanted. >.>
<dominikh> which would be way worse than returning nil
<stenno> that would be beside the point
<stenno> yeah
munx has joined #ruby
munx has joined #ruby
NotMyself has joined #ruby
NotMyself has joined #ruby
<sunaku> plato: require_relative() doesn't use __FILE__, it uses the Kernel#caller array to determine current file
<sunaku> it's really a hack IMHO
<havennn> Eiam: Wrap your nothing.each in a: unless nothing.nil? Would that serve your purpose? nil is the nothing
<dominikh> the hell?
<sunaku> havenn: reduce that further: nothing.each if nothing
<stenno> :|
<plato> sunaku: well i could probably avoid it by refactoring somehow. i just would prefer to keep my test code in a subdirectory, but still test the functionality of the script in the parent directory
<stenno> how about just using nil
<stenno> what is the problem
<havennn> stenno: was assuming nothing.each do (so the if nothing no worky)
philcrissman has joined #ruby
philcrissman has joined #ruby
<havennn> stenno: Oh, nevermind. You mean after the block?
<stenno> no
<stenno> what i mean is
<Eiam> well, the array isn't nothing
<Eiam> just a single item in the array would be nothing
<stenno> o_O"
<Eiam> so it'll loop 30 times, then item 31 is nil
nfluxx has joined #ruby
nfluxx has joined #ruby
<stenno> whatever
<sunaku> plato: add your parent directory to LOAD_PATH and just require the parent-dir file normally
<Eiam> so i just need to remove the nil from the array
<plato> Eiam: does the array sometimes contain nil as the last object
<dominikh> Eiam: what are you actually trying to achieve?
<stenno> what dominikh asked
<Eiam> compact it is
<sunaku> Array#compact
<plato> sunaku: can I do that without absolute paths?
<stenno> there must be a better solution for that
<Eiam> dominikh: well, my data source decided to stop returning data when it should be returning data. so until they can fix their data feed, i have to work around them returning nothing
<Eiam> when the agreement is to return something =)
<sunaku> plato: if you really want to use absolute paths, try: require File.expand_path('../../some_parent_file.rb', __FILE__)
<plato> Eiam: array.pop if array[-1].is_a?(NilClass)
<sarkis> good stuff, ruby koans is nice...
<plato> maybe?
<sunaku> plato: beware that absolute paths mostly defeat the purpose of require()
<Eiam> plato: yeah its not always the last object. just going to try array.compact!
<sarkis> any other resources recommended for developers?
<plato> sunaku: i want to avoid them :)
cjs226 has joined #ruby
cjs226 has joined #ruby
<Eiam> and poof, problem worked around for now
* plato wipes hands on pants
<sunaku> plato: put your parent code in lib/ and your test code in test/ or spec/ . then ruby -I lib:test:spec test/your_test.rb and inside your_test.rb: require 'your_code' # looks for lib/your_code.rb
<sunaku> that's the *standard* approach
<plato> the -I flag specifies folders that require will search in?
<sunaku> yup. it defines the $LOAD_PATH
apok has joined #ruby
apok has joined #ruby
anotherkeebler has quit [#ruby]
anotherkeebler has quit [#ruby]
<plato> OK good enough, thanks!
bwlang_ has joined #ruby
bwlang_ has joined #ruby
perlsyntax has joined #ruby
perlsyntax has joined #ruby
voodoofish430 has joined #ruby
voodoofish430 has joined #ruby
<ph^> Anyone got ruby-opencv working correctly? I'm having trouble loading jpegs
sungji has joined #ruby
sungji has joined #ruby
wmoxam has joined #ruby
wmoxam has joined #ruby
CacheMoney has joined #ruby
CacheMoney has joined #ruby
hadees has joined #ruby
hadees has joined #ruby
codespectator has joined #ruby
codespectator has joined #ruby
phantomfakeBNC has joined #ruby
phantomfakeBNC has joined #ruby
Vejuotas has joined #ruby
Vejuotas has joined #ruby
Willejs has joined #ruby
Willejs has joined #ruby
<Vejuotas> Hello guys! :)
<Vejuotas> anybody here?
<Vejuotas> Really no one?
xkws49er has joined #ruby
xkws49er has joined #ruby
andrewhl has joined #ruby
andrewhl has joined #ruby
<wmoxam> nooooooboooodddyyyyy
<Vejuotas> that's funny :)
hooper has joined #ruby
hooper has joined #ruby
<stenno> easily to amuse as it seems :)
<Vejuotas> ok, have one question :)
Jay_Levitt has joined #ruby
Jay_Levitt has joined #ruby
<Vejuotas> i am beginner
<Vejuotas> started in ruby
<Vejuotas> tutorials
phantomfakeBNC has joined #ruby
phantomfakeBNC has joined #ruby
<Vejuotas> and so on, do i need other interface for coding, like VIMP? :)
<jesly> Vejuotas: so??
<stenno> i recommend vim
<jesly> like vim??
<Vejuotas> should i use vim for learning in ruby?
<stenno> you should use irb to learn ruby
<rippa> or pry
<shevy> you should use your brain to learn ruby
<Vejuotas> :D
<Vejuotas> ok, i'll try :)
<shevy> vim is very complicated
<shevy> it takes 50 years to master it
<stenno> ...
<stenno> '<shevy> emacs, on the other hand'
<shevy> stenno here thinks you will master vim in one day
<shevy> I can't compare an OS to an editor man
<stenno> sadly, this isn't even a joke
<shevy> hehe
<shevy> to be fair, I used emacs only twice
<shevy> vim for a few years and still use it now and then
<wmoxam> Vejuotas: only use vim if you are already familiar with it
<jesly> shevy: which editor u use??
<banseljaj> hi shevy
<shevy> jesly bluefish
<wmoxam> Vejuotas: otherwise you'll be learning an editor AND a language
<stenno> sublime_text
<shevy> on my todo list is to continue with my ruby-gtk based editor
<stenno> D:
<jesly> shevy: i didnt like bluefish interface
<jesly> for sublime
<shevy> but I am lazy and slow :(
<wmoxam> shevy: Ver is a good editor written in Ruby
phantomfakeBNC has joined #ruby
phantomfakeBNC has joined #ruby
<shevy> jesly I am using bluefish 1.0.7, I dont like how they changed things in 2.x :(
<shevy> Ver?
<wmoxam> shevy: nice nd hackable too
<shevy> never heard that name before
Talvino has joined #ruby
Talvino has joined #ruby
<wmoxam> shevy: gem install ver
<wmoxam> ver <somefile>
<wmoxam> :D
<shevy> oh
<shevy> manveru :D
<wmoxam> shevy: just be sure to have Tk installed
<wmoxam> I've been using it lately for fun. I like it
<shevy> argh
<shevy> Tk!
<stenno> LD
<stenno> :D*
<banseljaj> shevy: How good is Tk for ruby GUI development?
<shevy> every time I tried Tk it was ugly
<shevy> dunno banseljaj ask someone who likes it. I hate it
<stenno> i remember Tk when i used it with python
<Vejuotas> wmoxam: dont wanna learn two things, the first thing (ruby) is complicated enough.
phantomfakeBNC has joined #ruby
phantomfakeBNC has joined #ruby
<jesly> shevy: is there a beginners irc node for ruby :P
<banseljaj> shevy: D:
<wmoxam> Vejuotas: exactly
<shevy> jesly yeah. #ruby on freenode
<shevy> :)
<wmoxam> Vejuotas: so just use the editor you're most familiar with
* banseljaj suggests redcar for editing ruby
cdepue has joined #ruby
cdepue has joined #ruby
<jesly> shevy: am there
<jesly> :)
sdwrage has joined #ruby
sdwrage has joined #ruby
phantomfakeBNC has joined #ruby
phantomfakeBNC has joined #ruby
<banseljaj> shevy: I need to make a gui for the project I showde you, but i can't find a good enough tutorial. :(
<Vejuotas> wmoxam: have nothing tryied at all, so no familiar editors, except irb
<wmoxam> Vejuotas: Ruby is your first programming language then?
tewecske has joined #ruby
tewecske has joined #ruby
<banseljaj> Vejuotas: If you want a very simple editor, try scite
<jesly> csherin: you are in here too.. my mentor :)
<shevy> banseljaj I use ruby-gtk
<Vejuotas> wmoxam: Exactly! :)
<shevy> it comes with around 200 .rb files examples if you download the official source
headius has joined #ruby
headius has joined #ruby
<banseljaj> shevy: I can't get ruby-gtk to work on my ubuntu
<wmoxam> Vejuotas: oh, ok. Then yeah, use something simple liek Scite or gedit or whatever
<shevy> why not?
<shevy> you just need the -dev headers
<banseljaj> I installed it, but it doesn't run
geekbri has joined #ruby
geekbri has joined #ruby
<banseljaj> okay, i think i have those
<shevy> and what does "pkg-config gtk+-2.0 --libs" return
<diago> plato: sorry I went AFK, u get it sorted out?
<banseljaj> shevy: nothing. returns nothing.
<Vejuotas> wmoxam: Thanks, going to tutorials right now, learning is good, practising is better :)
<banseljaj> I might be doing an ID10T error. :(
<wmoxam> Vejuotas: :D
<Progster> Vejuotas: that's what she said
tewecske has joined #ruby
tewecske has joined #ruby
coreydaley has joined #ruby
coreydaley has joined #ruby
<plato> diago: yep! ty
ank has joined #ruby
ank has joined #ruby
<shevy> banseljaj then you do not have the various gtk*.pc files installed
<banseljaj> Yeah.
<shevy> banseljaj the idiot error is that ubuntu cripples things
<banseljaj> Installing
<ePirat> when trying to run a ruby app i get following error: /home/epirat/.rvm/gems/ruby-1.9.2-head/gems/dm-core-1.2.0/lib/dm-core/associations/relationship.rb:226:in `rescue in parent_model': Cannot find the parent_model Suggestion for Vote in suggestion (NameError)
<shevy> I dont know how to uncripple it. for .h headers you can usually use aptitude or apt-get
<shevy> for .pc files, I have no idea
<banseljaj> so far, i have the ruby-gnome2 package
<shevy> the official one?
<shevy> I mean
<banseljaj> yeah
<shevy> the source one from the homepage
<banseljaj> I also have ruby-gnome2-dev
the_ace has joined #ruby
the_ace has joined #ruby
<banseljaj> No, I am just using the one from the repository
<shevy> hmm
the_ace has quit [#ruby]
the_ace has quit [#ruby]
<shevy> that one I don't know
<shevy> so I have no idea where the examples will be
<banseljaj> I'll just pull the latest source and compile myself. :)
<banseljaj> the ruby-gnome2 package *should* potentially have everything I need, right?
<shevy> the one from the official webpage from the ruby-gnome2 tarball - yes
<shevy> but it requires some .h files and so on in order to compile the things
<shevy> atk, glib, gtk, pango are the four most important ones
<shevy> you will definitely have the .so libraries, otherwise gtk based programs would not work on ubuntu
<shevy> but the headers are usually missing and the user has to decripple the system first
KL-7 has joined #ruby
KL-7 has joined #ruby
<shevy> I think with the atk, glib, gtk and pango bindings you can run the hello_world.rb ruby-gtk program
<shevy> you can associate ALL your ruby code with methods, and GUI things :)
<banseljaj> shevy: How hard is it, overall?
<banseljaj> I want a skill i can use later, and GTK is cross-platform and multilingual
<shevy> well
<shevy> it is quite easy but
<shevy> it takes a while to build things
<shevy> :\
<shevy> if you just have to finish one App it is ok
<shevy> if it is a complicated app with lots of different actions, widgets and so on, it's kinda annoying
<shevy> this also explains why my ruby-gtk based editor is unfinished :/
<banseljaj> It's a single app. The one i showed you before.
<shevy> I think it may be easier to have several people work together on big projects, and let them all finish sub-projects that are useful on their own already
<shevy> yeah, seems very simple
<banseljaj> I'll build from there, working my way up slowly
<shevy> remember to make things work first, before making them beautiful
<shevy> and the less code, the better
<banseljaj> Understood boss.
<banseljaj> Also, what bout glade?
<banseljaj> I can use glade to visualaly generate GUIs, right?
idletom has joined #ruby
idletom has joined #ruby
<shevy> hehe yeah
<shevy> some people use that
<shevy> I could not stand it though so I cant help you much with it
<shevy> perhaps it works for you, you have to find out
<shevy> for me it did not work
kirun has joined #ruby
kirun has joined #ruby
<banseljaj> *nod*
fayimora has joined #ruby
fayimora has joined #ruby
adman65 has joined #ruby
adman65 has joined #ruby
<raluxgaza> Hey guys how do I create a method to_string in a class that I can call like this Cat.new("felix").to_string # => "felix"
mikeric has joined #ruby
mikeric has joined #ruby
snip_it has joined #ruby
snip_it has joined #ruby
<banseljaj> shevy: I found the package with examples. :D
<shevy> good!
<shevy> there is a general example-file
<shevy> that combines them all together
<shevy> where you can then just click on a button, and that example loads
badabim_ has joined #ruby
badabim_ has joined #ruby
<shevy> it was somewhere in the gtk*/*sam*/ subfolder I think... in the gtk subfolder
Sliker has joined #ruby
Sliker has joined #ruby
bwlang_ has joined #ruby
bwlang_ has joined #ruby
<banseljaj> shevy: Also, This will integrate with rvm, right? Because it indtslled system ruby on my system.
<shevy> raluxgaza, http://pastie.org/3482193
<shevy> banseljaj no idea, I dont use rvm hehe. BUT, it should work just fine.
<CacheMoney> I have an array of strings. I want to iterate through each string and compare it to every other string in the array. How can I do this without using a for loop?
<raluxgaza> shevy: Sweet, thanks buddy.
fcoury has joined #ruby
fcoury has joined #ruby
SegFaultAX|work has joined #ruby
SegFaultAX|work has joined #ruby
<xkws49er> What does this line of code mean? @messages ||=[]
<xkws49er> Specifically what does ||= do in Ruby
<ged> xkws49er: It initializes a variable only if it's nil or false.
<rippa> CacheMoney: a.each_with_index {|s, i| a[i..-1].each_with_object(s) {|s2, s| p s <=> s2}}
<xkws49er> ged: I see. Thank you.
savage- has joined #ruby
savage- has joined #ruby
workmad3 has joined #ruby
workmad3 has joined #ruby
<CacheMoney> rippa: Thanks!
callenb has joined #ruby
callenb has joined #ruby
sarkis has quit [#ruby]
sarkis has quit [#ruby]
audy has joined #ruby
audy has joined #ruby
coreydaley has joined #ruby
coreydaley has joined #ruby
ZeepZop has joined #ruby
ZeepZop has joined #ruby
skitrees has joined #ruby
skitrees has joined #ruby
tvw has joined #ruby
tvw has joined #ruby
<CacheMoney> rippa: but doesn't that not compare any of the s2's that came before s?
<rippa> yes
<rippa> why would you campare them second time?
<rippa> *o
<rippa> also, there's an easier way
<rippa> that I just remembered
<rippa> a.permutation(2) {|a, b| a <=> b}
<CacheMoney> let me mess around with that...
<rippa> this checks twice
<rippa> #combination checks once
ephemerian has joined #ruby
ephemerian has joined #ruby
thecreators has joined #ruby
thecreators has joined #ruby
bwlang_ has joined #ruby
bwlang_ has joined #ruby
eywu has joined #ruby
eywu has joined #ruby
axl_ has joined #ruby
axl_ has joined #ruby
demet8 has joined #ruby
demet8 has joined #ruby
demet8 has quit [#ruby]
demet8 has quit [#ruby]
neohunter has joined #ruby
neohunter has joined #ruby
undersc0re has joined #ruby
undersc0re has joined #ruby
undersc0re has joined #ruby
undersc0re has joined #ruby
adeponte has joined #ruby
adeponte has joined #ruby
<CharlieSu> Is there a way to do a 1liner like this? array << Range.new(1,20).each {|x| "Client#{x}"}
<audy> CharlieSu: see Enumerable#collect
choffstein has joined #ruby
choffstein has joined #ruby
sako has joined #ruby
sako has joined #ruby
<CharlieSu> audy: thanks bud.. exactly what I needed..
<apeiros_> CharlieSu: Range.new(1,20) --> 1..20
notjohn has joined #ruby
notjohn has joined #ruby
Tearan has joined #ruby
Tearan has joined #ruby
<apeiros_> then: array = (1..20).map { |x| "Client#{x}" }
<apeiros_> also - it was a 1-liner to begin with…
<Vejuotas> Tryied Scite, some youtube russian guy shows tutorial, everything fine, thanks for answering :)
<diago> Anyone have any advice for getting sessions working from within tests?
<rippa> hey guys
<rippa> look
<rippa> a = % %s % % foo ;
<rippa> cool, no?
Progster has joined #ruby
Progster has joined #ruby
<shevy> perl!
<diago> to test flash messages
<apeiros_> rippa: gett'n old, bt yes, fun obfuscation
<CharlieSu> apeiros_: yeah i just needed that collect.. thanks..
<CharlieSu> apeiros_: i had a brain fart
<apeiros_> s/collect/map/ - instant code beauty improvement :-p
sdwrage has joined #ruby
sdwrage has joined #ruby
<apeiros_> rippa: !!?!???:!??
<rippa> that's cool too
<rippa> gives two warnings though
snip_it has joined #ruby
snip_it has joined #ruby
<shevy> man
pedm has joined #ruby
pedm has joined #ruby
kinzze has joined #ruby
kinzze has joined #ruby
Squarepy has joined #ruby
Squarepy has joined #ruby
iocor has joined #ruby
iocor has joined #ruby
shruggar has quit [#ruby]
shruggar has quit [#ruby]
lorandi has joined #ruby
lorandi has joined #ruby
sdwrage has joined #ruby
sdwrage has joined #ruby
Squarepy has joined #ruby
Squarepy has joined #ruby
Squarepy has joined #ruby
Squarepy has joined #ruby
virunga has joined #ruby
virunga has joined #ruby
Platz has quit [#ruby]
Platz has quit [#ruby]
vraa has joined #ruby
vraa has joined #ruby
lucidstudios has joined #ruby
lucidstudios has joined #ruby
<lectrick> I've got a new Lion install and a new Xcode 4.2 install from the App Store and I'm having gcc/clang/etc type issues with building RVM, MySQL and rubies via RVM. Any tips?
macmartine has joined #ruby
macmartine has joined #ruby
<lectrick> I installed XCode 4.2 via the App Store and manually installed the dev tools via Prefs > Downloads within Xcode.
Willejs has joined #ruby
Willejs has joined #ruby
ryanlabouve has joined #ruby
ryanlabouve has joined #ruby
Sailias_ has joined #ruby
Sailias_ has joined #ruby
ghanima has joined #ruby
ghanima has joined #ruby
cdepue has joined #ruby
cdepue has joined #ruby
glosoli has joined #ruby
glosoli has joined #ruby
adeponte has joined #ruby
adeponte has joined #ruby
notjohn has joined #ruby
notjohn has joined #ruby
qianz has joined #ruby
qianz has joined #ruby
mischko has joined #ruby
mischko has joined #ruby
<mischko> I'm brand new to ruby and having to modify some code. I'm a python developer. Someone please explain this syntax for a has to determine if it has a key: if !params.has_key?(:results) Why the colon and not quotes around 'results'?
sungji has joined #ruby
sungji has joined #ruby
<mischko> for a hash
sacarlson has joined #ruby
sacarlson has joined #ruby
<plato> i'm concerned that my exception handling code might itself raise an error
<plato> can i nest begin..rescue..end blocks inside each other?
<canton7> mischko, rube makes the distinction between symbols and strings. They're kind of alike, but symbols are more suited to use as keys, etc
<canton7> mischko, symbols start with a colon, eg :my_variable
badabim_ has joined #ruby
badabim_ has joined #ruby
<mischko> canton7, thanks. I'll keep tinkering.
davidpk has joined #ruby
davidpk has joined #ruby
mattonrails has joined #ruby
mattonrails has joined #ruby
coucher has joined #ruby
coucher has joined #ruby
mrake has joined #ruby
mrake has joined #ruby
adeponte has joined #ruby
adeponte has joined #ruby
jxpx777 has joined #ruby
jxpx777 has joined #ruby
denom has joined #ruby
denom has joined #ruby
silky has joined #ruby
silky has joined #ruby
the_hack has joined #ruby
the_hack has joined #ruby
ilyam has joined #ruby
ilyam has joined #ruby
blischalk has joined #ruby
blischalk has joined #ruby
libertyp1ime has joined #ruby
libertyp1ime has joined #ruby
xnm has joined #ruby
xnm has joined #ruby
Azure has joined #ruby
Azure has joined #ruby
undersc0re has joined #ruby
undersc0re has joined #ruby
undersc0re has joined #ruby
undersc0re has joined #ruby
<atmosx> hello
pdtpatr1ck_ has joined #ruby
pdtpatr1ck_ has joined #ruby
<atmosx> anyone has experience with heroku? What can I do for free? I have a script. If I write a sinatra interface, can I run it on heroku for free?
<la_pedycti> atmosx: Hi
<atmosx> it's just one task (theoritically speaking)
aibo has joined #ruby
aibo has joined #ruby
mdw has joined #ruby
mdw has joined #ruby
the_hack has joined #ruby
the_hack has joined #ruby
minijupe has joined #ruby
minijupe has joined #ruby
bwlang_ has joined #ruby
bwlang_ has joined #ruby
wefawa has joined #ruby
wefawa has joined #ruby
<wefawa> Is assignation a method call? is if a method call?
Bartzy has joined #ruby
Bartzy has joined #ruby
<ryannielson> wedawa? Assiging is a method call yes
undersc0re has joined #ruby
undersc0re has joined #ruby
<ryannielson> wedawa: I believe if is a language construct
timonv has joined #ruby
timonv has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
<ryannielson> atmosx: Yes, you can push a simple app to heroku for free. Visit their site and it lists out what is offered. For something simple, it should have more than enough
luckyruby has joined #ruby
luckyruby has joined #ruby
mxweas_ has joined #ruby
mxweas_ has joined #ruby
igel has joined #ruby
igel has joined #ruby
zaargy has joined #ruby
zaargy has joined #ruby
<igel> in the following, the argument to pack is wrong. ["ff884220"].pack("H").unpack("H").should == "ff884220"
<igel> what am i doing wrong?
francisfish has joined #ruby
francisfish has joined #ruby
sacarlson has joined #ruby
sacarlson has joined #ruby
scientes has joined #ruby
scientes has joined #ruby
<scientes> how do i get the BYTE length of a string?
<gate> igel: ["ff884220"].pack("H*").unpack("H*")
<scientes> in 1.9
<igel> gate: ah, thanks! :)
havenn has joined #ruby
havenn has joined #ruby
<sunaku> scientes: String#bytesize
<zaargy> i'm using rvm to manage my ruby versions. i installed ruby 1.9.2 and did rvm use 1.9.2. i then tried to install rspec version 1.2.1. with gem install rspec -v 1.2.1 but it seems to install version 2.8.0. what gives?
Redjack1964 has joined #ruby
Redjack1964 has joined #ruby
philcrissman has joined #ruby
philcrissman has joined #ruby
<sunaku> zaargy: try asking in #rvm
<wefawa> <ryannielson> wedawa? Assiging is a method call yes ---> who's the receiver?
glosoli has joined #ruby
glosoli has joined #ruby
j3r0m3 has joined #ruby
j3r0m3 has joined #ruby
briankbuckley has joined #ruby
briankbuckley has joined #ruby
<zaargy> sunaku: okay, thanks
s0ber_ has joined #ruby
s0ber_ has joined #ruby
y3llow_ has joined #ruby
y3llow_ has joined #ruby
pantsman has joined #ruby
pantsman has joined #ruby
pantsman has joined #ruby
pantsman has joined #ruby
the_hack has joined #ruby
the_hack has joined #ruby
Prometheus has joined #ruby
Prometheus has joined #ruby
bwlang_ has joined #ruby
bwlang_ has joined #ruby
Evixion has joined #ruby
Evixion has joined #ruby
y3llow has joined #ruby
y3llow has joined #ruby
cdepue_ has joined #ruby
cdepue_ has joined #ruby
pantsman has quit [#ruby]
pantsman has quit [#ruby]
nanderoo has quit [#ruby]
nanderoo has quit [#ruby]
y3llow has joined #ruby
y3llow has joined #ruby
<CoverSli1e> when the pantsman's testifyin', the shirtless man believes
tyman_ has joined #ruby
tyman_ has joined #ruby
<tshirtman> CoverSli1e: wut? heretic!
y3llow has joined #ruby
y3llow has joined #ruby
danishkhan has joined #ruby
danishkhan has joined #ruby
<wefawa> <ryannielson> wedawa? Assiging is a method call yes ---> who's the receiver?
NotMyself has joined #ruby
NotMyself has joined #ruby
Sliker has joined #ruby
Sliker has joined #ruby
y3llow has joined #ruby
y3llow has joined #ruby
y3llow has joined #ruby
y3llow has joined #ruby
matti has joined #ruby
matti has joined #ruby
danishkhan has joined #ruby
danishkhan has joined #ruby
ilyam_ has joined #ruby
ilyam_ has joined #ruby
Sigma00 has joined #ruby
Sigma00 has joined #ruby
Kiall has joined #ruby
Kiall has joined #ruby
y3llow_ has joined #ruby
y3llow_ has joined #ruby
ezra has joined #ruby
ezra has joined #ruby
<xkws49er> how do you set up a function to be memoized?
sacarlson has joined #ruby
sacarlson has joined #ruby
<madhatter> Good evening. Can somebody help me with the twitter gem? I have some issues to understand the returned result. I would like to fake it for a rspec stub.
savage-_ has joined #ruby
savage-_ has joined #ruby
<atmosx> is there any gem that can be used to find the RSS feed (if any) of a specific url?
ben225 has joined #ruby
ben225 has joined #ruby
<canton7> atmosx, nokogiri, or even regex (probably just about ok for parsing ok a single tag)
danishkh_ has joined #ruby
danishkh_ has joined #ruby
<atmosx> canton7: hmm you mean by searching through the html source?
<canton7> look for <link rel="alternate" type="application/rss+xml" title="Title" href="http://whatever" />
<canton7> ...with the properties in any order, of course
<sungji> Is there another way for sorting the letters of a word than processing it with each_char and a tmp array?
<canton7> sungji, you could use .split(''), but that returns an array instead of an enumerator, so your'e probably best off with "hello".each_char.sort.join
<atmosx> canton7: thanks for th hint.
<sungji> canton7, mhm ok. thanks for your time
sebastian has joined #ruby
sebastian has joined #ruby
cjs226 has joined #ruby
cjs226 has joined #ruby
tatsuya_o has joined #ruby
tatsuya_o has joined #ruby
daglees__ has joined #ruby
daglees__ has joined #ruby
savage-_ has joined #ruby
savage-_ has joined #ruby
matti_ has joined #ruby
matti_ has joined #ruby
rramsden has joined #ruby
rramsden has joined #ruby
bwlang has joined #ruby
bwlang has joined #ruby
shadoi has joined #ruby
shadoi has joined #ruby
Kiall has joined #ruby
Kiall has joined #ruby
Sliker has joined #ruby
Sliker has joined #ruby
cdepue_ has joined #ruby
cdepue_ has joined #ruby
Evixion has joined #ruby
Evixion has joined #ruby
Prometheus has joined #ruby
Prometheus has joined #ruby
s0ber has joined #ruby
s0ber has joined #ruby
zaargy has joined #ruby
zaargy has joined #ruby
igel has joined #ruby
igel has joined #ruby
luckyruby has joined #ruby
luckyruby has joined #ruby
minijupe has joined #ruby
minijupe has joined #ruby
aibo has joined #ruby
aibo has joined #ruby
libertyp1ime has joined #ruby
libertyp1ime has joined #ruby
denom has joined #ruby
denom has joined #ruby
mrake has joined #ruby
mrake has joined #ruby
coucher has joined #ruby
coucher has joined #ruby
mattonrails has joined #ruby
mattonrails has joined #ruby
badabim has joined #ruby
badabim has joined #ruby
mischko has joined #ruby
mischko has joined #ruby
qianz has joined #ruby
qianz has joined #ruby
macmartine has joined #ruby
macmartine has joined #ruby
lucidstudios has joined #ruby
lucidstudios has joined #ruby
vraa has joined #ruby
vraa has joined #ruby
Squarepy has joined #ruby
Squarepy has joined #ruby
Progster has joined #ruby
Progster has joined #ruby
Tearan has joined #ruby
Tearan has joined #ruby
skitrees has joined #ruby
skitrees has joined #ruby
ZeepZop has joined #ruby
ZeepZop has joined #ruby
audy has joined #ruby
audy has joined #ruby
SegFaultAX|work has joined #ruby
SegFaultAX|work has joined #ruby
kirun has joined #ruby
kirun has joined #ruby
idletom has joined #ruby
idletom has joined #ruby
KL-7 has joined #ruby
KL-7 has joined #ruby
ank has joined #ruby
ank has joined #ruby
phantomfakeBNC has joined #ruby
andrewhl has joined #ruby
phantomfakeBNC has joined #ruby
codespectator has joined #ruby
andrewhl has joined #ruby
hadees has joined #ruby
codespectator has joined #ruby
hadees has joined #ruby
CacheMoney has joined #ruby
CacheMoney has joined #ruby
wmoxam has joined #ruby
wmoxam has joined #ruby
Russell^^ has joined #ruby
Russell^^ has joined #ruby
adamkittelson has joined #ruby
adamkittelson has joined #ruby
lkba has joined #ruby
lkba has joined #ruby
Guest43698 has joined #ruby
Guest43698 has joined #ruby
dv_ has joined #ruby
dv_ has joined #ruby
khouse has joined #ruby
khouse has joined #ruby
johnkpaul has joined #ruby
johnkpaul has joined #ruby
kenichi has joined #ruby
kenichi has joined #ruby
burgestrand has joined #ruby
burgestrand has joined #ruby
cbuxton has joined #ruby
cbuxton has joined #ruby
khakimov has joined #ruby
khakimov has joined #ruby
emocakes has joined #ruby
emocakes has joined #ruby
jgrevich has joined #ruby
jgrevich has joined #ruby
punkrawkR has joined #ruby
punkrawkR has joined #ruby
maletor has joined #ruby
maletor has joined #ruby
shell0x_ has joined #ruby
shell0x_ has joined #ruby
jwang has joined #ruby
jwang has joined #ruby
luxurymode has joined #ruby
luxurymode has joined #ruby
blueadept has joined #ruby
blueadept has joined #ruby
apeiros_ has joined #ruby
apeiros_ has joined #ruby
ed_hz_ has joined #ruby
ed_hz_ has joined #ruby
kevinbond has joined #ruby
kevinbond has joined #ruby
neurodrone has joined #ruby
neurodrone has joined #ruby
enherit has joined #ruby
enherit has joined #ruby
DrShoggoth has joined #ruby
DrShoggoth has joined #ruby
Targen has joined #ruby
Targen has joined #ruby
ascarter has joined #ruby
ascarter has joined #ruby
d2s has joined #ruby
d2s has joined #ruby
mikepack has joined #ruby
mikepack has joined #ruby
jrist has joined #ruby
jrist has joined #ruby
Tick-Tock has joined #ruby
Tick-Tock has joined #ruby
dross has joined #ruby
dross has joined #ruby
dju has joined #ruby
dju has joined #ruby
Mekkis has joined #ruby
Mekkis has joined #ruby
statix has joined #ruby
statix has joined #ruby
mpereira has joined #ruby
mpereira has joined #ruby
somnium has joined #ruby
somnium has joined #ruby
djbpython has joined #ruby
djbpython has joined #ruby
Shamgar has joined #ruby
Shamgar has joined #ruby
pradeepto has joined #ruby
pradeepto has joined #ruby
LBRapid has joined #ruby
LBRapid has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
kpshek has joined #ruby
kpshek has joined #ruby
waxjar has joined #ruby
waxjar has joined #ruby
wyhaines has joined #ruby
rfloriano has joined #ruby
wyhaines has joined #ruby
v0n has joined #ruby
rfloriano has joined #ruby
emmanuelux has joined #ruby
v0n has joined #ruby
c_ellis_ has joined #ruby
emmanuelux has joined #ruby
jds has joined #ruby
c_ellis_ has joined #ruby
jds has joined #ruby
JonSchuff has joined #ruby
JonSchuff has joined #ruby
speggey has joined #ruby
speggey has joined #ruby
`brendan has joined #ruby
`brendan has joined #ruby
fbernier has joined #ruby
fbernier has joined #ruby
Indian has joined #ruby
fr0gprince_mac has joined #ruby
Indian has joined #ruby
raluxgaza has joined #ruby
fr0gprince_mac has joined #ruby
Seisatsu has joined #ruby
raluxgaza has joined #ruby
Seisatsu has joined #ruby
acekiller has joined #ruby
acekiller has joined #ruby
kushal124 has joined #ruby
kushal124 has joined #ruby
Liothen has joined #ruby
Liothen has joined #ruby
justinmcp has joined #ruby
justinmcp has joined #ruby
M- has joined #ruby
M- has joined #ruby
eighty4 has joined #ruby
eighty4 has joined #ruby
nixmaniack has joined #ruby
nixmaniack has joined #ruby
akem has joined #ruby
akem has joined #ruby
Spockz has joined #ruby
Spockz has joined #ruby
deryldoucette has joined #ruby
deryldoucette has joined #ruby
Apocalypse has joined #ruby
Apocalypse has joined #ruby
heftig has joined #ruby
heftig has joined #ruby
johndbritton has joined #ruby
johndbritton has joined #ruby
mfridh has joined #ruby
mfridh has joined #ruby
bier has joined #ruby
bier has joined #ruby
yxhuvud has joined #ruby
yxhuvud has joined #ruby
x0F_ has joined #ruby
x0F_ has joined #ruby
preller has joined #ruby
preller has joined #ruby
gentz has joined #ruby
gentz has joined #ruby
gianlucadv has joined #ruby
gianlucadv has joined #ruby
stenno has joined #ruby
stenno has joined #ruby
radic_ has joined #ruby
radic_ has joined #ruby
shtirlic has joined #ruby
shtirlic has joined #ruby
parse has joined #ruby
parse has joined #ruby
minsa has joined #ruby
minsa has joined #ruby
libertyprime has joined #ruby
libertyprime has joined #ruby
duard has joined #ruby
duard has joined #ruby
eeadc has joined #ruby
eeadc has joined #ruby
jbhewitt has joined #ruby
jbhewitt has joined #ruby
tommyvyo has joined #ruby
tommyvyo has joined #ruby
shevy has joined #ruby
shevy has joined #ruby
sergeykish has joined #ruby
sergeykish has joined #ruby
dwon has joined #ruby
dwon has joined #ruby
sonkei has joined #ruby
sonkei has joined #ruby
ceej has joined #ruby
ceej has joined #ruby
beernutz has joined #ruby
beernutz has joined #ruby
Sou|cutter has joined #ruby
Sou|cutter has joined #ruby
_obiJuan has joined #ruby
_obiJuan has joined #ruby
omry_ has joined #ruby
omry_ has joined #ruby
Norrin has joined #ruby
Norrin has joined #ruby
lectrick has joined #ruby
lectrick has joined #ruby
diago has joined #ruby
diago has joined #ruby
Eiam has joined #ruby
Eiam has joined #ruby
dnyy has joined #ruby
dnyy has joined #ruby
alek_b has joined #ruby
alek_b has joined #ruby
designated has joined #ruby
designated has joined #ruby
DeeJayTwo has joined #ruby
DeeJayTwo has joined #ruby
nacengineer has joined #ruby
nacengineer has joined #ruby
FlyingFoX has joined #ruby
FlyingFoX has joined #ruby
sj26 has joined #ruby
sj26 has joined #ruby
patricksroberts has joined #ruby
patricksroberts has joined #ruby
avandendorpe has joined #ruby
avandendorpe has joined #ruby
denysonique__ has joined #ruby
denysonique__ has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
DuoSRX has joined #ruby
DuoSRX has joined #ruby
sunaku has joined #ruby
sunaku has joined #ruby
manizzle has joined #ruby
manizzle has joined #ruby
cableray has joined #ruby
cableray has joined #ruby
mayfield has joined #ruby
mayfield has joined #ruby
cespare has joined #ruby
SegFaultAX has joined #ruby
cespare has joined #ruby
SegFaultAX has joined #ruby
kapowaz has joined #ruby
kapowaz has joined #ruby
kaichanvong has joined #ruby
kaichanvong has joined #ruby
relix has joined #ruby
relix has joined #ruby
pvh has joined #ruby
pvh has joined #ruby
MoMo has joined #ruby
MoMo has joined #ruby
dotemacs has joined #ruby
dotemacs has joined #ruby
ElderFain has joined #ruby
ElderFain has joined #ruby
KitsuneDrag0n has joined #ruby
KitsuneDrag0n has joined #ruby
epochwolf has joined #ruby
epochwolf has joined #ruby
robacarp has joined #ruby
robacarp has joined #ruby
xeno has joined #ruby
xeno has joined #ruby
iaj has joined #ruby
iaj has joined #ruby
nyuszika7h has joined #ruby
nyuszika7h has joined #ruby
samuelk|away has joined #ruby
samuelk|away has joined #ruby
esmaxwill has joined #ruby
esmaxwill has joined #ruby
Azure|netbook has joined #ruby
Azure|netbook has joined #ruby
TheTFEF has joined #ruby
hackeron has joined #ruby
TheTFEF has joined #ruby
Aaaarg has joined #ruby
hackeron has joined #ruby
vandemar has joined #ruby
Aaaarg has joined #ruby
vandemar has joined #ruby
end3r- has joined #ruby
end3r- has joined #ruby
cynosure has joined #ruby
cynosure has joined #ruby
tomb has joined #ruby
tomb has joined #ruby
leex has joined #ruby
leex has joined #ruby
UdontKnow has joined #ruby
UdontKnow has joined #ruby
nicksmith has joined #ruby
nicksmith has joined #ruby
Koshian____ has joined #ruby
Koshian____ has joined #ruby
Quadlex has joined #ruby
Quadlex has joined #ruby
benwoody has joined #ruby
benwoody has joined #ruby
dominikh has joined #ruby
dominikh has joined #ruby
parus has joined #ruby
parus has joined #ruby
acidjazz has joined #ruby
acidjazz has joined #ruby
abrookins has joined #ruby
abrookins has joined #ruby
yawniek has joined #ruby
yawniek has joined #ruby
Caius has joined #ruby
Caius has joined #ruby
RubyPanther has joined #ruby
RubyPanther has joined #ruby
justfielding has joined #ruby
justfielding has joined #ruby
rcs has joined #ruby
rcs has joined #ruby
MIST_` has joined #ruby
MIST_` has joined #ruby
grieve[a] has joined #ruby
grieve[a] has joined #ruby
mtkd has joined #ruby
mtkd has joined #ruby
ged has joined #ruby
ged has joined #ruby
Kyle__ has joined #ruby
Kyle__ has joined #ruby
drizz has joined #ruby
drizz has joined #ruby
ping-pong has joined #ruby
ping-pong has joined #ruby
fred has joined #ruby
fred has joined #ruby
brjannc has joined #ruby
brjannc has joined #ruby
rtl has joined #ruby
rtl has joined #ruby
xybre_ has joined #ruby
xybre_ has joined #ruby
plato has joined #ruby
tectonic has joined #ruby
plato has joined #ruby
linduxed has joined #ruby
tectonic has joined #ruby
Natch| has joined #ruby
linduxed has joined #ruby
Schmidt has joined #ruby
Natch| has joined #ruby
Nisstyre has joined #ruby
Schmidt has joined #ruby
Nisstyre has joined #ruby
doomviking has joined #ruby
doomviking has joined #ruby
ddv has joined #ruby
ddv has joined #ruby
caveat- has joined #ruby
caveat- has joined #ruby
kuranai has joined #ruby
kuranai has joined #ruby
rcj_ has joined #ruby
rcj_ has joined #ruby
cgk_ has joined #ruby
cgk_ has joined #ruby
Muz has joined #ruby
Muz has joined #ruby
msch has joined #ruby
kaktus has joined #ruby
msch has joined #ruby
kaktus has joined #ruby
patronus has joined #ruby
patronus has joined #ruby
vereteran has joined #ruby
vereteran has joined #ruby
d-snp has joined #ruby
d-snp has joined #ruby
peterhil has joined #ruby
peterhil has joined #ruby
schlecht has joined #ruby
schlecht has joined #ruby
Shrink has joined #ruby
Shrink has joined #ruby
dhruvasagar has joined #ruby
Emmanuel_Chanel has joined #ruby
dhruvasagar has joined #ruby
vitoravelino has joined #ruby
Emmanuel_Chanel has joined #ruby
sayakb has joined #ruby
vitoravelino has joined #ruby
sayakb has joined #ruby
Guest10371 has joined #ruby
Guest10371 has joined #ruby
jeekl has joined #ruby
jeekl has joined #ruby
Drakx has joined #ruby
Drakx has joined #ruby
dnordstrom has joined #ruby
dnordstrom has joined #ruby
ChloeD has joined #ruby
ChloeD has joined #ruby
remink has joined #ruby
remink has joined #ruby
nw has joined #ruby
nw has joined #ruby
chellomere has joined #ruby
chellomere has joined #ruby
examancer has joined #ruby
examancer has joined #ruby
aef has joined #ruby
marienz has joined #ruby
aef has joined #ruby
joschi has joined #ruby
marienz has joined #ruby
joschi has joined #ruby
froy has joined #ruby
froy has joined #ruby
Drakevr has joined #ruby
thomasfedb has joined #ruby
Drakevr has joined #ruby
Veejay has joined #ruby
thomasfedb has joined #ruby
Veejay has joined #ruby
tshirtman has joined #ruby
tshirtman has joined #ruby
ec has joined #ruby
ec has joined #ruby
tomaw has joined #ruby
tomaw has joined #ruby
milkshakes has joined #ruby
milkshakes has joined #ruby
Fraeon has joined #ruby
Fraeon has joined #ruby
khem_ has joined #ruby
indeterminate has joined #ruby
khem_ has joined #ruby
indeterminate has joined #ruby
jbpros has joined #ruby
jbpros has joined #ruby
dfr has joined #ruby
dfr has joined #ruby
voodoofish has joined #ruby
voodoofish has joined #ruby
andman has joined #ruby
andman has joined #ruby
orospakr has joined #ruby
orospakr has joined #ruby
dmn001 has joined #ruby
dmn001 has joined #ruby
oddraisin has joined #ruby
oddraisin has joined #ruby
Jb___ has joined #ruby
Jb___ has joined #ruby
ReinH has joined #ruby
ReinH has joined #ruby
jeedey_ has joined #ruby
jeedey_ has joined #ruby
r126l_ has joined #ruby
r126l_ has joined #ruby
WanderingGlitch has joined #ruby
WanderingGlitch has joined #ruby
sernin has joined #ruby
sernin has joined #ruby
pschneider_ has joined #ruby
pschneider_ has joined #ruby
y_matsu_ has joined #ruby
LowKey has joined #ruby
y_matsu_ has joined #ruby
smgt has joined #ruby
LowKey has joined #ruby
stepnem has joined #ruby
smgt has joined #ruby
stepnem has joined #ruby
SJr has joined #ruby
SJr has joined #ruby
ada2358 has joined #ruby
ada2358 has joined #ruby
musl has joined #ruby
musl has joined #ruby
Pcboy____ has joined #ruby
swills has joined #ruby
Pcboy____ has joined #ruby
flu- has joined #ruby
swills has joined #ruby
RobbieAB has joined #ruby
flu- has joined #ruby
RobbieAB has joined #ruby
SirFunk has joined #ruby
SirFunk has joined #ruby
snapcase has joined #ruby
snapcase has joined #ruby
CK_afk has joined #ruby
CK_afk has joined #ruby
crazed has joined #ruby
crazed has joined #ruby
dkr has joined #ruby
dkr has joined #ruby
mikekelly has joined #ruby
mikekelly has joined #ruby
jhunter has joined #ruby
niko has joined #ruby
jhunter has joined #ruby
sixteneighty has joined #ruby
niko has joined #ruby
regedarek has joined #ruby
sixteneighty has joined #ruby
crodas has joined #ruby
regedarek has joined #ruby
kivi has joined #ruby
crodas has joined #ruby
ohcibi has joined #ruby
kivi has joined #ruby
lbotos has joined #ruby
ohcibi has joined #ruby
Stefunel has joined #ruby
lbotos has joined #ruby
nuba has joined #ruby
Stefunel has joined #ruby
RichGuk has joined #ruby
nuba has joined #ruby
krisfremen has joined #ruby
RichGuk has joined #ruby
PhilK has joined #ruby
krisfremen has joined #ruby
yeltzooo has joined #ruby
PhilK has joined #ruby
Radar has joined #ruby
yeltzooo has joined #ruby
jmaister has joined #ruby
Radar has joined #ruby
Ttech has joined #ruby
jmaister has joined #ruby
Ttech has joined #ruby
jimmy has joined #ruby
jimmy has joined #ruby
sejo has joined #ruby
sejo has joined #ruby
swistak35 has joined #ruby
tommyblue has joined #ruby
swistak35 has joined #ruby
Jck_true has joined #ruby
tommyblue has joined #ruby
_root_ has joined #ruby
Jck_true has joined #ruby
affix has joined #ruby
_root_ has joined #ruby
mephux has joined #ruby
affix has joined #ruby
mephux has joined #ruby
mackid has joined #ruby
mackid has joined #ruby
zz_chrismcg has joined #ruby
zz_chrismcg has joined #ruby
nimred has joined #ruby
nimred has joined #ruby
johnduhart has joined #ruby
ekaleido has joined #ruby
johnduhart has joined #ruby
ekaleido has joined #ruby
d_roge has joined #ruby
d_roge has joined #ruby
danheberden has joined #ruby
mattp_ has joined #ruby
danheberden has joined #ruby
mattp_ has joined #ruby
epitron has joined #ruby
Utkarsh has joined #ruby
epitron has joined #ruby
jshsu has joined #ruby
Utkarsh has joined #ruby
mikalv has joined #ruby
jshsu has joined #ruby
mikalv has joined #ruby
momo- has joined #ruby
momo- has joined #ruby
gate has joined #ruby
gate has joined #ruby
OnResolve has joined #ruby
OnResolve has joined #ruby
Jelco has joined #ruby
Jelco has joined #ruby
cola_zero has joined #ruby
cola_zero has joined #ruby
tdmackey has joined #ruby
tdmackey has joined #ruby
Uni has joined #ruby
Uni has joined #ruby
mbreit has joined #ruby
mbreit has joined #ruby
tessi has joined #ruby
tessi has joined #ruby
Seppman has joined #ruby
Seppman has joined #ruby
__main__ has joined #ruby
__main__ has joined #ruby
wayne[mobile] has joined #ruby
wayne[mobile] has joined #ruby
theoros has joined #ruby
theoros has joined #ruby
TheMoonMaster has joined #ruby
TheMoonMaster has joined #ruby
trebaum has joined #ruby
trebaum has joined #ruby
erenrich has joined #ruby
erenrich has joined #ruby
elektronaut has joined #ruby
elektronaut has joined #ruby
Companion has joined #ruby
Companion has joined #ruby
Joelio has joined #ruby
Joelio has joined #ruby
phrame has joined #ruby
phrame has joined #ruby
DarthGandalf has joined #ruby
DarthGandalf has joined #ruby
yellow5 has joined #ruby
yellow5 has joined #ruby
m4rcu5 has joined #ruby
m4rcu5 has joined #ruby
jhulten has joined #ruby
jhulten has joined #ruby
mlue has joined #ruby
mlue has joined #ruby
nebiros has joined #ruby
nebiros has joined #ruby
ccooke has joined #ruby
ccooke has joined #ruby
g0r_ has joined #ruby
g0r_ has joined #ruby
Bish has joined #ruby
welterde has joined #ruby
Bish has joined #ruby
jsaak has joined #ruby
welterde has joined #ruby
andynu has joined #ruby
jsaak has joined #ruby
softarn_ has joined #ruby
andynu has joined #ruby
dubellz has joined #ruby
softarn_ has joined #ruby
dubellz has joined #ruby
deryl has joined #ruby
deryl has joined #ruby
KillerFox has joined #ruby
KillerFox has joined #ruby
felipe has joined #ruby
felipe has joined #ruby
koivula has joined #ruby
koivula has joined #ruby
pygmalion has joined #ruby
pygmalion has joined #ruby
RegEchse has joined #ruby
RegEchse has joined #ruby
matled has joined #ruby
matled has joined #ruby
thebastl has joined #ruby
thebastl has joined #ruby
brian- has joined #ruby
brian- has joined #ruby
psino has joined #ruby
psino has joined #ruby
babinho has joined #ruby
babinho has joined #ruby
pigoz has joined #ruby
pigoz has joined #ruby
marcin_m has joined #ruby
marcin_m has joined #ruby
destructure has joined #ruby
Y_Ichiro has joined #ruby
destructure has joined #ruby
Gm4n has joined #ruby
Y_Ichiro has joined #ruby
Gm4n has joined #ruby
nick_h has joined #ruby
nick_h has joined #ruby
epochwolf|vps has joined #ruby
epochwolf|vps has joined #ruby
G has joined #ruby
G has joined #ruby
drPoggs has joined #ruby
drPoggs has joined #ruby
mrmist has joined #ruby
mrmist has joined #ruby
any-key has joined #ruby
any-key has joined #ruby
__null has joined #ruby
__null has joined #ruby
duey has joined #ruby
duey has joined #ruby
er1c_ has joined #ruby
er1c_ has joined #ruby
Sp4rKy has joined #ruby
Sp4rKy has joined #ruby
vdvluc has joined #ruby
vdvluc has joined #ruby
akl has joined #ruby
akl has joined #ruby
ichilton has joined #ruby
ichilton has joined #ruby
shaman42 has joined #ruby
shaman42 has joined #ruby
Tasser has joined #ruby
Tasser has joined #ruby
xea_ has joined #ruby
xea_ has joined #ruby
ozzloy has joined #ruby
ozzloy has joined #ruby
sgronblo has joined #ruby
sgronblo has joined #ruby
lupine_85 has joined #ruby
lupine_85 has joined #ruby
glacius has joined #ruby
glacius has joined #ruby
fahadsadah has joined #ruby
fahadsadah has joined #ruby
nate_h has joined #ruby
nate_h has joined #ruby
ampex has joined #ruby
ampex has joined #ruby
David_Miller has joined #ruby
David_Miller has joined #ruby
wallerdev has joined #ruby
wallerdev has joined #ruby
visof has joined #ruby
visof has joined #ruby
visof has joined #ruby
visof has joined #ruby
y3llow has joined #ruby
y3llow has joined #ruby
Richmond_ has joined #ruby
Richmond_ has joined #ruby
<luckyruby> is there something similar to ||= but applies also if left hand side is empty?
bbttxu_ has joined #ruby
bbttxu_ has joined #ruby
Sigma00 has joined #ruby
Sigma00 has joined #ruby
Zolrath has joined #ruby
Zolrath has joined #ruby
<luckyruby> I guess foo = 'bar' if foo.blank? isn't too bad.
<canton7> var = blah if blah.empty? || !blah maybe?
<canton7> yeah
<canton7> oops, s/blah/var for most of those
matti has joined #ruby
matti has joined #ruby
matti has joined #ruby
matti has joined #ruby
y3llow has joined #ruby
y3llow has joined #ruby
<Mon_Ouie> Do you mean empty or if it's nil/false?
jimmy has joined #ruby
jimmy has joined #ruby
fukushima has joined #ruby
fukushima has joined #ruby
bwlang_ has joined #ruby
bwlang_ has joined #ruby
the_hack has joined #ruby
the_hack has joined #ruby
seitensei has joined #ruby
seitensei has joined #ruby
bradhe has joined #ruby
bradhe has joined #ruby
philcrissman has joined #ruby
philcrissman has joined #ruby
y3llow has joined #ruby
y3llow has joined #ruby
ben225 has joined #ruby
ben225 has joined #ruby
<gate> luckyruby: var = value if var.blank?
<bradhe> erm, this is a total noob question. I'd like to pass a block as a callback to a handler (on_body on a Curl::Easy obj from Curb). How would I do that?? do I need to yield it? I'm using 1.9.3.
<heftig> Proc.new { ... } gets you a object to pass
<heftig> or proc { ... }
<heftig> or lambda { ... } for something more method-like
<bradhe> so I'd need to do, say curl_request.on_body { |data| Proc.new { blk.call(data) } }?
<bradhe> basically wrap it in a proc?
y3llow has joined #ruby
y3llow has joined #ruby
Indian has joined #ruby
Indian has joined #ruby
<canton7> bradhe, what's wrong with just curl_request.on_body{ |body_data| your code to process body_data goes here } ?
Jan_ has joined #ruby
Jan_ has joined #ruby
<bradhe> canton7: a bunch of legacy code doesn't pass a block, and body data is collected and parsed elsewhere in that case.
y3llow has joined #ruby
y3llow has joined #ruby
<canton7> badabim, on_body{ |body_data| my_fancy_function(body_data) } ?
tilde` has joined #ruby
tilde` has joined #ruby
workmad3 has joined #ruby
workmad3 has joined #ruby
Mission-Critical has joined #ruby
Mission-Critical has joined #ruby
<canton7> bradhe, ^^
matti has joined #ruby
matti has joined #ruby
matti has joined #ruby
matti has joined #ruby
Drewch has joined #ruby
Drewch has joined #ruby
jbw_ has joined #ruby
jbw_ has joined #ruby
Indian has joined #ruby
Indian has joined #ruby
Sliker has joined #ruby
Sliker has joined #ruby
niko has joined #ruby
niko has joined #ruby
tsd_usa has joined #ruby
tsd_usa has joined #ruby
thecreators has joined #ruby
thecreators has joined #ruby
<tsd_usa> Hi just to confirm: Is "." included in load_path in Ruby 1.9???
<tsd_usa> I tried to run a rb file, but always get a "can not load such file" error
<tsd_usa> only in ruby 1.9
moshef has joined #ruby
moshef has joined #ruby
<gate> tsd_usa: no, I think they removed it
havenn has joined #ruby
havenn has joined #ruby
<gate> tsd_usa: I believe that there is a require_relative, and you can add it to your load path
<tsd_usa> So every time I run the file I must run it with option -I. ???
<gate> you can alter the script to overcome that
<tsd_usa> gate: Thank you, I will try
tvw has joined #ruby
tvw has joined #ruby
asobrasil has joined #ruby
asobrasil has joined #ruby
bwlang_ has joined #ruby
bwlang_ has joined #ruby
Drewch has joined #ruby
Drewch has joined #ruby
banseljaj has joined #ruby
banseljaj has joined #ruby
matti has joined #ruby
matti has joined #ruby
<Zolrath> Anyone have any idea why tork wouldn't be reabsorbing any changes to my code?
<scientes> require './filename'
<scientes> i like that
<Mon_Ouie> Except that's wrong
sdwrage has joined #ruby
sdwrage has joined #ruby
<Zolrath> It detects that the code has changed and runs the associated test, but it runs the test against a cached version of the code
<Mon_Ouie> It depends on what's the working directory at the moment of the call to require
<Mon_Ouie> Not on where the file is located
<Mon_Ouie> (which is why . isn't part of $LOAD_PATH anymore)
libertyprime has joined #ruby
libertyprime has joined #ruby
<moshef> how do I sort a hash that look something like {key=>{some_key=>some_value}, key2=>{some_key2=>some_value2}} ? want to sort based on some_value
libertyp1ime has joined #ruby
libertyp1ime has joined #ruby
<moshef> and i don't want to turn this into an array
supergiantrobot has joined #ruby
supergiantrobot has joined #ruby
<Boohbah> h.sort_by { |k,v| v }
libertyp1ime has joined #ruby
libertyp1ime has joined #ruby
<lectrick> So... Sublime Text 2 text editor is wooing me away from Textmate!
<moshef> tried that, but then I'm getting an array
Rorgo has joined #ruby
Rorgo has joined #ruby
<Zolrath> sunaku: I assume I'm not supposed to have to manually trigger reabsorb overhead files every time I change anything that isn't a _spec.rb file?
<Mon_Ouie> Yes, sort_by always returns an array
matti has joined #ruby
matti has joined #ruby
<moshef> i want to keep it a hash
<Mon_Ouie> You can use Hash.[]
<moshef> it means i will have to convert it back?
<moshef> Hash.[] ?
bwlang_ has joined #ruby
bwlang_ has joined #ruby
<Mon_Ouie> although relying on order when using a hash table doesn't sound like such a good idea
<moshef> well
<Mon_Ouie> Hash[array]
<moshef> I'm pulling some info
jrist has joined #ruby
jrist has joined #ruby
<moshef> and i need it to be in a specific order
libertyprime has joined #ruby
libertyprime has joined #ruby
libertyp1ime has joined #ruby
libertyp1ime has joined #ruby
<shevy> moshef sounds as if you want to keep it in array then
<shevy> the array counts at 0 1 2 3 4 5 6 7
<moshef> well i made some data structure using a hash that is quite complex
<shevy> the has contains other hashes and arrays?
<shevy> *hash
<moshef> i don't want to start making the adjustments in the view to fit as array
<moshef> yeah
<shevy> hmm
<moshef> just hashes
<moshef> key being some object and value being another object
<moshef> and then in the view i combine both
niko has joined #ruby
niko has joined #ruby
<moshef> don't get why the new items added to the hash are not in the end of it
<moshef> since i do start with the items in the order i want
<Mon_Ouie> When you have many nested structures, you usually should consider creating a class
<moshef> but when i finish adding them all, the order is messed up
<moshef> i wouldn't go as far as that. its not that complicated
<moshef> just a bit tricket..
<moshef> trickey*
choffstein has joined #ruby
choffstein has joined #ruby
<moshef> how about orderings it by it's keys?
<Mon_Ouie> Creating a class isn't an extreme solution in an object oriented language
<moshef> i don't think its extreme, i just don't see how i will go about it with a class
<moshef> it could very well be what i need when i think about it
DDAZZA has joined #ruby
DDAZZA has joined #ruby
mdw has joined #ruby
mdw has joined #ruby
Sigma00 has joined #ruby
Sigma00 has joined #ruby
xnm has joined #ruby
xnm has joined #ruby
eka has joined #ruby
eka has joined #ruby
tommyvyo has joined #ruby
tommyvyo has joined #ruby
zackattack has joined #ruby
zackattack has joined #ruby
danishkhan has joined #ruby
danishkhan has joined #ruby
artie has joined #ruby
artie has joined #ruby
dd2284 has joined #ruby
dd2284 has joined #ruby
thecreators has joined #ruby
thecreators has joined #ruby
M- has joined #ruby
M- has joined #ruby
bwlang has joined #ruby
bwlang has joined #ruby
Prometheus has joined #ruby
Prometheus has joined #ruby
Dave has joined #ruby
Dave has joined #ruby
mxweas_ has joined #ruby
mxweas_ has joined #ruby
havenn has joined #ruby
havenn has joined #ruby
wefawa has quit [#ruby]
wefawa has quit [#ruby]
glosoli has joined #ruby
glosoli has joined #ruby
snearch has joined #ruby
snearch has joined #ruby
DamienDeVille has joined #ruby
DamienDeVille has joined #ruby
iocor has joined #ruby
iocor has joined #ruby
ascarter has joined #ruby
ascarter has joined #ruby
the_hack has joined #ruby
the_hack has joined #ruby
emocakes has joined #ruby
emocakes has joined #ruby
<Russell^^> if i have a BigDecimal object that prints out the value 1000.0 when I do .to_s('F'), is there a way to trim off the decimal place so it just returns 1000?
liluo has joined #ruby
liluo has joined #ruby
<Russell^^> aha, there's a to_i method
stringoO has joined #ruby
stringoO has joined #ruby
ascarter has joined #ruby
ascarter has joined #ruby
albemuth has joined #ruby
albemuth has joined #ruby
tsd_usa has joined #ruby
tsd_usa has joined #ruby
mikepack has joined #ruby
mikepack has joined #ruby
mgraham has joined #ruby
mgraham has joined #ruby
mikepack has joined #ruby
mikepack has joined #ruby
libertyprime has joined #ruby
libertyprime has joined #ruby
M- has joined #ruby
M- has joined #ruby
TheTFEF has joined #ruby
TheTFEF has joined #ruby
Helius has joined #ruby
Helius has joined #ruby
libertyprime has joined #ruby
libertyprime has joined #ruby
aers has joined #ruby
aers has joined #ruby
libertyprime has joined #ruby
libertyprime has joined #ruby
robbyoconnor has joined #ruby
robbyoconnor has joined #ruby
Jay_Levitt has joined #ruby
Jay_Levitt has joined #ruby
kyledrake has joined #ruby
kyledrake has joined #ruby
DamienDeVille has joined #ruby
DamienDeVille has joined #ruby
`damien has joined #ruby
`damien has joined #ruby
zakwilson has joined #ruby
zakwilson has joined #ruby
sonkei has joined #ruby
sonkei has joined #ruby
sacarlson has joined #ruby
sacarlson has joined #ruby
tsd_usa has joined #ruby
tsd_usa has joined #ruby
DamienDeVille has joined #ruby
DamienDeVille has joined #ruby
fayimora has joined #ruby
fayimora has joined #ruby
visof has joined #ruby
visof has joined #ruby
sdwrage has quit [#ruby]
sdwrage has quit [#ruby]
libertyprime has joined #ruby
libertyprime has joined #ruby
Karmaon has joined #ruby
Karmaon has joined #ruby
etank has joined #ruby
etank has joined #ruby
Sirune has joined #ruby
Sirune has joined #ruby
khakimov has joined #ruby
khakimov has joined #ruby
tsd_usa has joined #ruby
tsd_usa has joined #ruby
jergason has joined #ruby
jergason has joined #ruby
libertyprime has joined #ruby
libertyprime has joined #ruby
Foxandxss has joined #ruby
Foxandxss has joined #ruby
<CacheMoney> I'm writing a script and I've written a module in a seperate file -- both in the same folder. I want to use that module in my current script, how do I do this? I tried require 'file_name.rb' but I'm getting an error: "no such file to load".
<jergason> CacheMoney: try `require './file_name'`
<jergason> what version of Ruby are you on
<jergason> ?
DamienDeVille has joined #ruby
DamienDeVille has joined #ruby
<atmosx> CacheMoney: worked for me. There's a gem though that handles this... much better than you ever will.
<CacheMoney> jergason: v 1.9.2p290. I tried that too, although I got an error message this time: "undefined local variable or method"
mxweas_ has joined #ruby
mxweas_ has joined #ruby
<Zolrath> require_relative 'filename'
<jergason> CacheMoney: that might be an error in your module then
jnh has joined #ruby
jnh has joined #ruby
Faris has joined #ruby
Faris has joined #ruby
Faris has quit [#ruby]
Faris has quit [#ruby]
<jnh> Anyone here familiar with Treetop?
<jergason> if it can't find the file to require, it will yell at you about that
<CacheMoney> Zolrath: error message stated: "undefined local variable or method"
libertyprime has joined #ruby
libertyprime has joined #ruby
<CacheMoney> jergason: I was using this module in the irb just a second ago. I'm working through the Learn Ruby the Hard Way lessons 25 and 26
apeiros_ has joined #ruby
apeiros_ has joined #ruby
<Zolrath> jergason is right, that doesn't sound like a require error
<CacheMoney> Zolrath: you're right. WHen I used require_relative it worked, however, I didn't call the module by the correct name
<CacheMoney> Thanks for the help
<CacheMoney> jergason: thanks for the help as well
havenn has joined #ruby
havenn has joined #ruby
td123 has joined #ruby
td123 has joined #ruby
Indian has joined #ruby
Indian has joined #ruby
vraa has joined #ruby
vraa has joined #ruby
yawniek has joined #ruby
yawniek has joined #ruby
Jarred has joined #ruby
Jarred has joined #ruby
Jarred has quit [#ruby]
Jarred has quit [#ruby]
aantix has joined #ruby
aantix has joined #ruby
wroathe has joined #ruby
wroathe has joined #ruby
libertyprime has joined #ruby
libertyprime has joined #ruby
jxpx777 has joined #ruby
jxpx777 has joined #ruby
libertyprime has joined #ruby
libertyprime has joined #ruby
davidd``` has joined #ruby
davidd``` has joined #ruby
libertyprime has joined #ruby
libertyprime has joined #ruby
jergason has joined #ruby
jergason has joined #ruby
nemesit has joined #ruby
nemesit has joined #ruby
cantbecool has joined #ruby
cantbecool has joined #ruby
Guest23751 has joined #ruby
Guest23751 has joined #ruby
axl_ has joined #ruby
axl_ has joined #ruby
libertyprime has joined #ruby
libertyprime has joined #ruby
Guest23751 has joined #ruby
Guest23751 has joined #ruby
shevy2 has joined #ruby
shevy2 has joined #ruby
briankbuckley has joined #ruby
briankbuckley has joined #ruby
<CacheMoney> A new Anonymous video is out http://news.ycombinator.com/item?id=3645610
macmartine has joined #ruby
macmartine has joined #ruby
libertyprime has joined #ruby
libertyprime has joined #ruby
tayy has joined #ruby
tayy has joined #ruby
cjs226 has joined #ruby
cjs226 has joined #ruby
libertyprime has joined #ruby
libertyprime has joined #ruby
sroy2 has joined #ruby
sroy2 has joined #ruby
dcutting has joined #ruby
dcutting has joined #ruby
dcutting_ has joined #ruby
dcutting_ has joined #ruby
rushed has joined #ruby
rushed has joined #ruby
sullx has joined #ruby
sullx has joined #ruby
jesly has joined #ruby
jesly has joined #ruby
<sullx> i have a page parsed with nokogiri, there are 100 elements that each have 4 pieces of data I need to save. how can I do this in one pass? currently I am looping through the page four times, each time using a different xpath for the different piece of data for each element
<axl_> if i have a string and a regular expression
undersc0re has joined #ruby
undersc0re has joined #ruby
<axl_> what operator do i use to check if the regular expression matches the string?
<axl_> (ie all of the string an not parts of it)
undersc0re has joined #ruby
undersc0re has joined #ruby
<td123> CacheMoney: calling war against the US government.. this is going to be fun to watch...
<axl_> !~ is the exact opposite of what i want
libertyprime has joined #ruby
libertyprime has joined #ruby
<CacheMoney> td123: just what the US needs... another war
<undersc0re> oh my
<undersc0re> politics in a programming language channel
<undersc0re> fun!
havenn has joined #ruby
havenn has joined #ruby