<volty>
it is allo about my nose (that usually captures smells quite well) and about statistics on ppl asking questions that I find to be a bit 'too vague', 'too vergin-like'
<s2013>
muahhahaha :-\
mojjojo has quit [Quit: Leaving]
<volty>
s2013: no, it's about typing, women do not like to be 'typed'
<s2013>
hehehe
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dec>
the thing I'm really struggling with, with Ruby, is - where are the official docs that define these basics? i.e. how do modules, classes, namespaces, etc. work?
<volty>
there are plenty of tutorials and books around
DrOwl has quit [Read error: Connection reset by peer]
<s2013>
how does ruby know which file a class is in
<volty>
shevy (that is now after the damn «caller» :) ) has good urls for beginners
Soda has joined #ruby
bean__ has joined #ruby
predator217 has joined #ruby
tkuchiki has joined #ruby
Naoe-Kanno has quit [Quit: ネウロイを負かさなきゃならないね]
<dec>
so I've looked through a bunch of tutorials - but they're all interpretations. Is there a Ruby spec that defines how this works?
freezey has quit [Ping timeout: 245 seconds]
<volty>
ah! here we are! You are kinda scientist.
<volty>
pleased to meet you :)
predator117 has quit [Ping timeout: 245 seconds]
DrOwl has joined #ruby
`Chris`_ has joined #ruby
julian-delphiki has quit [Ping timeout: 272 seconds]
narcan has joined #ruby
pen has quit [Remote host closed the connection]
Flashmasterson has joined #ruby
<Flashmasterson>
i'm not sure why the variable 'likes' and 'lives' have to be plural but the variable 'computer' doesn't, in order for this gist to work https://gist.github.com/Flashmasterson/7189439
`Chris` has quit [Ping timeout: 268 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
hiroyuki has quit [Read error: Connection reset by peer]
<popl>
Flashmasterson: I'm not sure I understand your question.
<Flashmasterson>
shouldn't it be 'like' and 'live'? to match the questions?
<Flashmasterson>
i'll try to rephrase it...
<popl>
your variables are likes, lives, and computer
<volty>
likes is third person, not plural
<popl>
your variables are not like, live, nor computers
<Flashmasterson>
i know
<volty>
(he is asking grammar questions :) )
<Flashmasterson>
forget the computer question
<volty>
the likes is plural (noun), he likes is singular, third person (verb)
<Flashmasterson>
why aren't the variables 'like' and 'live' instead of 'likes' and 'lives'? that would match the puts'
<ShellFu>
So I did some refactoring on my method based off some comments this morning. Functionally the same, but am curious if I has properly refactored using the extract method. Original: >http://pastebin.com/ZjQGfKVJ< New: >http://pastebin.com/sqDDBHzL<
SilverKey has quit [Quit: Sleep now]
<popl>
because you didn't call them like and live
<ShellFu>
More comments welcome before I carry this through to the rest of my methods
jonathanwallace has quit [Ping timeout: 260 seconds]
nazty has quit [Ping timeout: 245 seconds]
baroquebobcat has joined #ruby
<popl>
s/call/name/
<Flashmasterson>
popl: right but when i do, the gist doesn't work
<popl>
Flashmasterson: what do you mean by "doesn't work"?
<volty>
could we have entered another dimension, a kind of broken matrix ? :)
<Flashmasterson>
crap, no i messed with another detail by mistake - sorry about that. changing them to 'like' and 'likes' work too, which is odd to me
<popl>
:P
kvirani has quit [Remote host closed the connection]
<Flashmasterson>
popl: yeah...
<volty>
Odd New World
thesheff17 has joined #ruby
SilverKey has joined #ruby
<Flashmasterson>
ok, a clearer question: why does the program work when the variables don't match exactly with what's in the puts'? likes and lives for example
SteveBen_ has quit [Remote host closed the connection]
<popl>
volty: now you're trolling.
pr0ggie has joined #ruby
<Flashmasterson>
voltty: people keep recommending i try that before going into the well grounded rubyist
<volty>
ah! thx davidcelis // no book there 'Learn Ruby The Easy Way'?
<popl>
maybe you'd like why's guide. that is a more gentle introduction to some of the basic concepts of programming in general.
<davidcelis>
why's guide is an awful learning guide
pdimitrov has quit [Ping timeout: 248 seconds]
<Flashmasterson>
terrific
<davidcelis>
great literature, but far too obtuse to be a real learning tool
pen has quit [Ping timeout: 240 seconds]
jonathanwallace has joined #ruby
pdimitrov has joined #ruby
mercwithamouth has quit [Ping timeout: 265 seconds]
mixel has quit [Quit: mixel]
<volty>
popl: we go in turn, ahahah
<popl>
volty: we might as well exist on different planes. :P
mercwithamouth has joined #ruby
pherryman_ has quit [Ping timeout: 240 seconds]
matchaw has joined #ruby
ninegrid has joined #ruby
<volty>
of course, i'm open for all possibilities -- nothing is excluded
agjacome has quit [Quit: leaving]
pherryman_ has joined #ruby
baroquebobcat has quit [Ping timeout: 240 seconds]
<volty>
(except the scientist)
<volty>
but where's shevy?
<popl>
Flashmasterson: In any programming language, when you use an identifier (also called a variable), you must remember that it's just a symbol. if you change one part of that symbol (e.g. change «like» to «likes») then the computer is utterly lost.
<popl>
computers are dumb.
goleldar has quit [Remote host closed the connection]
<popl>
Flashmasterson: Do you mean something different? Do you understand that text inside a string is generally just treated as data?
<Flashmasterson>
ah! no i don't
<Flashmasterson>
i thought that was important if there is a variable or identifier with the same phrase
sepp2k1 has quit [Quit: Leaving.]
baroquebobcat has joined #ruby
<popl>
not unless you are doing a substitution like you are in MESSAGE, e.g. «#{likes}» in which case it _must_ match the name of the variable you are using
<popl>
otherwise it's just text
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
dbruns has joined #ruby
<popl>
because in that substitution, you are inserting the _contents_ of the variable likes into that heredoc
dec has left #ruby [#ruby]
baroquebobcat has quit [Client Quit]
<Flashmasterson>
hmm
ninegrid has quit [Ping timeout: 252 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
jonathanwallace has quit [Ping timeout: 246 seconds]
ninegrid has joined #ruby
<popl>
>> name = "Flashmasterson"; msg = "My name is #{name} as I am so named."; puts msg # #{name} is the only thing that is associated with "Flashmasterson" inside of msg
<eval-in>
popl => My name is Flashmasterson as I am so named. ... (https://eval.in/57921)
jhn has joined #ruby
<popl>
&
popl has quit [Quit: We must make an idol of our fear, and call it God.]
starfox21 has quit [Quit: starfox21]
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
gr33n7007h has quit [Ping timeout: 252 seconds]
samfisher has quit [Ping timeout: 251 seconds]
<davidcelis>
>> name = 'davidcelis'; puts "My name is #{my_name}";
<eval-in>
davidcelis => undefined local variable or method `my_name' for main:Object (NameError) ... (https://eval.in/57922)
Nilium has joined #ruby
<Flashmasterson>
popl: that makes more sense
danshultz has joined #ruby
<Flashmasterson>
davidcelis' just confused me again, because the variable is 'name', which doesn't match the identifier 'my_name'
<popl>
which is why you get the error
<davidcelis>
exactly. that's why it raised an error
<Flashmasterson>
oh oh ok
<davidcelis>
i never defined something called "my_name", so you get "undefined local variable or method `my_name' "
<popl>
I have to go watch Walking Dead now.
<volty>
>> like = "What have I done to you, oh the mightiest of the mightiests?"; p [defined? like, defined? likes, :hell]
<Guest76733>
It's giving me an error: uninitialized constant Upload::Telnyx
sergicles_ has joined #ruby
TheMoonMaster has quit [Excess Flood]
ewokchewy has quit [Client Quit]
danshultz has quit [Remote host closed the connection]
sergicles has quit [Ping timeout: 245 seconds]
sergicles_ is now known as sergicles
sergicles has quit [Remote host closed the connection]
danshultz has joined #ruby
TheMoonMaster has joined #ruby
dkamioka has quit [Remote host closed the connection]
<Guest76733>
The module I'm using is under /lib/Telnyx/comparison.rb and I've tried editing application.rb under config to set config.autoload_paths += %W(#{config.root}/lib)
dkamioka has joined #ruby
petey_ has quit [Ping timeout: 272 seconds]
Guest76733 is now known as swash
earthquake has joined #ruby
Domon has joined #ruby
danshult_ has joined #ruby
danshultz has quit [Ping timeout: 268 seconds]
sergicles has joined #ruby
dkamioka has quit [Ping timeout: 245 seconds]
frustrum has joined #ruby
<swash>
Any thoughts? I'm a little new to Rails and Googling didn't turn up much
Soda has quit [Read error: Connection reset by peer]
sergicles has quit [Ping timeout: 245 seconds]
sergicles has joined #ruby
sevenseacat1 has joined #ruby
julweber_ has joined #ruby
nfk has quit [Quit: yawn]
astrobunny has joined #ruby
<ecksit>
yeah, i have seen a couple of examples like that.
<ecksit>
cheers again
sevenseacat has quit [Ping timeout: 245 seconds]
julweber has quit [Ping timeout: 245 seconds]
brennanMKE has joined #ruby
tatsuya_o has joined #ruby
w4pm has joined #ruby
iamjarvo has quit [Remote host closed the connection]
brennanMKE has quit [Ping timeout: 245 seconds]
iamjarvo has joined #ruby
tatsuya_o has quit [Ping timeout: 272 seconds]
Mr_Wharfsnort has quit [Quit: Leaving]
Mr_Wharfsnort has joined #ruby
mary5030 has joined #ruby
iamjarvo has quit [Ping timeout: 260 seconds]
Senjai has joined #ruby
Hanmac1 has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Spami has joined #ruby
Hanmac has quit [Ping timeout: 272 seconds]
ewnd9 has quit [Remote host closed the connection]
ewnd9 has joined #ruby
xperement has quit [Read error: Connection reset by peer]
danshultz has joined #ruby
fgo has joined #ruby
Mr_Wharfsnort has quit [Ping timeout: 260 seconds]
kaspergr_ has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
astrobunny has quit [Ping timeout: 272 seconds]
v0n has joined #ruby
danshultz has quit [Ping timeout: 265 seconds]
timonv has joined #ruby
rehat has joined #ruby
sevenseacat has joined #ruby
Levin_22 has joined #ruby
sevenseacat1 has quit [Ping timeout: 268 seconds]
saarinen has joined #ruby
judd7 has quit [Quit: judd7]
kaspergrubbe has quit [Ping timeout: 260 seconds]
kil0byte has joined #ruby
astrobunny has joined #ruby
timonv has quit [Ping timeout: 248 seconds]
echevemaster has joined #ruby
kobain has joined #ruby
Senjai has quit [Remote host closed the connection]
<sam113101>
I need to install ruby, how should I do it? rvm? something else?
Senjai has joined #ruby
saarinen has quit [Quit: saarinen]
astrobunny has quit [Ping timeout: 272 seconds]
<sevenseacat>
ruby-install?
<jrobeson>
sam113101, rvm, rbenv, and chruby (+ ruby-install) are popular choices to manage installed ruby versions
michael_mbp is now known as zz_michael_mbp
<jrobeson>
i think rvm is too hacky
allaire has joined #ruby
<sevenseacat>
with all the time you've been here, you've never installed ruby? :(
<bnagy>
go chruby / ruby-install
<bnagy>
rvm be tripping
saarinen has joined #ruby
<bnagy>
I like rbenv, and can't be bothered switching, but if I started from now I'd go chruby
nisstyre has joined #ruby
saarinen has quit [Client Quit]
ewnd9 has quit [Ping timeout: 240 seconds]
astrobunny has joined #ruby
kaspergrubbe has joined #ruby
nism-pi has joined #ruby
Mr_Wharfsnort has joined #ruby
mrapple is now known as MonsieurApple
mneorr has joined #ruby
MonsieurApple is now known as mrapple
ninegrid has quit [Ping timeout: 272 seconds]
ninegrid has joined #ruby
pen has quit [Remote host closed the connection]
mneorr has quit [Ping timeout: 245 seconds]
petey_ has joined #ruby
pen has joined #ruby
kil0byte has quit [Ping timeout: 265 seconds]
devoldmx3 has quit [Ping timeout: 265 seconds]
Spami has quit [Quit: This computer has gone to sleep]
rjhunter has joined #ruby
Hganavak has quit [Quit: Leaving]
Spami has joined #ruby
yfeldblum has joined #ruby
freezey has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
freezey has joined #ruby
petey_ has quit [Ping timeout: 240 seconds]
Flashmasterson has quit [Quit: Leaving.]
earthquake has quit [Quit: earthquake]
tkuchiki has quit [Remote host closed the connection]
freezey has quit [Ping timeout: 246 seconds]
narcan has joined #ruby
<|jemc|>
oh no; just discovered preprocessor token concatenation in c and I'm thinking up all sorts of evil metaprogramming ideas for my c extension...
cads has joined #ruby
pen has quit []
osvico has quit [Ping timeout: 245 seconds]
kaspergrubbe has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
radic_ has joined #ruby
radic has quit [Disconnected by services]
earthquake has joined #ruby
astrobun_ has joined #ruby
brennanMKE has joined #ruby
KobraKao has left #ruby ["Leaving"]
tatsuya_o has joined #ruby
osvico has joined #ruby
astrobunny has quit [Ping timeout: 252 seconds]
petey_ has joined #ruby
ninegrid has quit [Ping timeout: 260 seconds]
tk___ has joined #ruby
kreeves has quit [Ping timeout: 245 seconds]
kaspergrubbe has quit [Ping timeout: 245 seconds]
ninegrid has joined #ruby
Mr_Wharfsnort has quit [Quit: Leaving]
mobileblue has quit [Ping timeout: 245 seconds]
brennanMKE has quit [Ping timeout: 245 seconds]
petey_ has quit [Client Quit]
tatsuya_o has quit [Ping timeout: 260 seconds]
endash has quit [Quit: endash]
mobileblue has joined #ruby
burgess has quit [Quit: ^zzz]
yfeldblum has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
<sam113101>
sevenseacat: I'm on a fresh install of ubuntu, and I never liked the way rvm poluted my shell rc files… so I'm just asking for opinions, really
<sevenseacat>
cool :) i like chruby, and im still rocking an old version of ruby-build because i set this machine up before ruby-install came out
kvirani has joined #ruby
jonr22 has joined #ruby
kil0byte has joined #ruby
WickedAtMelb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kvirani_ has joined #ruby
allaire has quit []
kvirani has quit [Read error: Connection reset by peer]
ninegrid has quit [Ping timeout: 245 seconds]
astrobun_ has quit [Ping timeout: 252 seconds]
ninegrid has joined #ruby
jonr22 has quit [Ping timeout: 245 seconds]
Spami has quit [Quit: This computer has gone to sleep]
pr0ggie has quit [Ping timeout: 252 seconds]
pdimitrov has quit [Ping timeout: 272 seconds]
pr0ggie has joined #ruby
Ox6abe has joined #ruby
pdimitrov has joined #ruby
astrobunny has joined #ruby
kobain has quit [Ping timeout: 268 seconds]
Ox6abe has quit [Ping timeout: 245 seconds]
<Nilium>
Hahahaha, ruby-ffi is dead, I made the right choice
capicue has quit [Quit: Leaving...]
hiyosi has quit [Ping timeout: 245 seconds]
postmodern has quit [Quit: Leaving]
<sevenseacat>
it apparently is indeed
astrobunny has quit [Ping timeout: 265 seconds]
<Nilium>
I remember someone telling me I should've used it instead of fiddle, so ha.
<RubyPanther>
sam113101: I use rbenv because it does things the simple unix symlink way
MrPoT4tO has joined #ruby
<RubyPanther>
(with ruby-build)
mrpot4to_ has joined #ruby
kstephens has quit [Ping timeout: 272 seconds]
kobain has joined #ruby
kobain has quit [Excess Flood]
Guest27688 has joined #ruby
ageis has joined #ruby
Guest27688 has quit [Excess Flood]
kobain_ has joined #ruby
<ageis>
I can't compile nokogiri gem. can someone look at my mkmf.log and tell me whats up?
fuleo has quit [Remote host closed the connection]
<RubyPanther>
of course, I still have a line of crud in .profile, but it is probably avoidable just by adding the dir to PATH
kobain_ has quit [Excess Flood]
noop has quit [Ping timeout: 248 seconds]
kobain_ has joined #ruby
kobain_ has quit [Excess Flood]
Guest34552 has joined #ruby
fuleo has joined #ruby
Guest34552 is now known as kobain99
s3itz has joined #ruby
lukec has quit [Quit: lukec]
astrobunny has joined #ruby
mrapple is now known as MonsieurApple
MonsieurApple is now known as mrapple
nutella has joined #ruby
nutella is now known as Guest30128
justsee has joined #ruby
Heero has quit [Ping timeout: 240 seconds]
Heero has joined #ruby
ph8 has joined #ruby
astrobunny has quit [Ping timeout: 246 seconds]
Levin_22 has quit [Quit: Levin_22]
mneorr has joined #ruby
thepumpkin has quit [Remote host closed the connection]
narcan has quit [Ping timeout: 240 seconds]
mneorr has quit [Ping timeout: 246 seconds]
astrobunny has joined #ruby
Guest30128 has quit [Ping timeout: 252 seconds]
ngoldman has quit []
end_guy has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
fridim_ has quit [Ping timeout: 240 seconds]
capicue has joined #ruby
bassclef has quit [Ping timeout: 272 seconds]
ntzrmtthihu777 has joined #ruby
larissa has quit [Quit: Leaving]
<ntzrmtthihu777>
hey. writing some java code for jruby, needa figure out how to create an instance variable in java; so to that interest could someone point me at a core ruby class/method with them so I can look at the jruby analog
<|jemc|>
take your pick of a core object source to find in the jruby source
timonv has quit [Ping timeout: 245 seconds]
MisutoWolf has quit [Quit: Leaving]
<|jemc|>
but isn't there jruby documentation to look through?
Ripp__ has joined #ruby
fredjean has quit [Quit: Computer has gone to sleep.]
kaspergrubbe has quit [Ping timeout: 272 seconds]
postmodern has joined #ruby
<|jemc|>
(that's an honest qeustion, I've never used jruby or tried to write a java extension for it)
aagdbl has joined #ruby
tabolario has joined #ruby
kil0byte has quit [Remote host closed the connection]
zeade has quit [Quit: Leaving.]
dawkirst has joined #ruby
kil0byte has joined #ruby
<ntzrmtthihu777>
|jemc|: there is, but it seems to be few and far between
c0rn has quit [Ping timeout: 245 seconds]
<ntzrmtthihu777>
|jemc|: you now what, lets put it this way. if I use the code @foo = foo, this creates the instance variable foo right on the spot, right
<ntzrmtthihu777>
?
<|jemc|>
in ruby, yes, it creates/assigns to the instance variable @foo
<sam113101>
I like the chruby + ruby-install combo so far
<ntzrmtthihu777>
yeah, that takes the format setInstanceVariabl("@foo", foo) using our prior example
<|jemc|>
yup
thesheff17 has quit [Ping timeout: 245 seconds]
<ntzrmtthihu777>
I was just wondering about something javaside. you declare a variable like this: "int num" or "RubyFixnum foo", I was wondering if i had to do anything strange there to make an instance variable of the type RubyFixnum
mary5030 has quit [Remote host closed the connection]
hiyosi has joined #ruby
BinJoy has joined #ruby
fredjean has joined #ruby
c0rn has joined #ruby
mary5030 has joined #ruby
<|jemc|>
as I said, I've never dealt with jruby until just now, but with the knowledge I have
mary5030 has quit [Read error: Connection reset by peer]
<|jemc|>
I'd say that the foo in your setInstanceVariable("@foo", foo) would just be of type RubyFixnum
mary5030 has joined #ruby
<|jemc|>
and that's how-it-know
<ntzrmtthihu777>
|jemc|: so between "RubyFixnum foo" and setInstanceVariable("@foo", foo) I should be fine, then?
<|jemc|>
heh, with all my expert jruby knowledge I declare it shall work!
capicue has quit [Ping timeout: 260 seconds]
<ntzrmtthihu777>
XD
<ntzrmtthihu777>
hey, my knowledge is pretty sparce XD
<ntzrmtthihu777>
sparse*
havenwood has joined #ruby
wizard` has joined #ruby
yacks has quit [Quit: Leaving]
<ntzrmtthihu777>
|jemc|: also, prolly a stupid rookie question, but is '0' a fixnum?
<|jemc|>
might want to verify that in your jruby irb, though
Ox6abe has joined #ruby
<ntzrmtthihu777>
because I have a method 'set' that takes 4 fixnums (x, y, height, width) and I'd like to create an 'empty' method that runs set(0, 0, 0, 0), but java doesn't like it :/
mary5030 has quit [Remote host closed the connection]
DanKnox_away is now known as DanKnox
<|jemc|>
meh, might want to /join #jruby
mary5030 has joined #ruby
<ntzrmtthihu777>
|jemc|: I'm alredy there, but its dead silent :/
ninegrid has quit [Ping timeout: 260 seconds]
burgess has joined #ruby
ninegrid has joined #ruby
Ox6abe has quit [Ping timeout: 272 seconds]
fredjean has quit [Quit: Computer has gone to sleep.]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030 has quit [Ping timeout: 246 seconds]
ananthakumaran has joined #ruby
Monie has joined #ruby
hashtd has joined #ruby
kvirani_ has quit [Remote host closed the connection]
ejfinneran has joined #ruby
Ox6abe has joined #ruby
ninegrid has quit [Ping timeout: 240 seconds]
rehat has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
ninegrid has joined #ruby
dawkirst has quit [Ping timeout: 272 seconds]
platypine has quit [Ping timeout: 268 seconds]
mneorr has joined #ruby
SteveBenner9 has joined #ruby
burgess has quit [Quit: ^zzz]
mneorr has quit [Ping timeout: 245 seconds]
nwertman_ has quit [Ping timeout: 245 seconds]
Ox6abe has quit [Remote host closed the connection]
Ox6abe has joined #ruby
astrobunny has quit [Ping timeout: 245 seconds]
tk___ has quit [Quit: ばいばい]
c0rn has quit [Ping timeout: 272 seconds]
capicue has joined #ruby
dawkirst has joined #ruby
mary5030 has joined #ruby
WickedAtMelb has joined #ruby
Ox6abe has quit [Ping timeout: 252 seconds]
mary5030 has quit [Remote host closed the connection]
WickedAtMelb has quit [Max SendQ exceeded]
mary5030 has joined #ruby
Nanuq has quit [Ping timeout: 245 seconds]
tkuchiki has joined #ruby
astrobunny has joined #ruby
kevinykchan has joined #ruby
c0rn has joined #ruby
mary5030 has quit [Ping timeout: 252 seconds]
Monie has quit [Ping timeout: 245 seconds]
jonr22 has joined #ruby
WickedAtMelb has joined #ruby
WickedAtMelb has quit [Max SendQ exceeded]
ntzrmtth1hu777 has joined #ruby
tkuchiki has quit [Ping timeout: 245 seconds]
brennanMKE has joined #ruby
julweber_ has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
julweber has joined #ruby
ntzrmtthihu777 has quit [Ping timeout: 248 seconds]
jonr22 has quit [Ping timeout: 245 seconds]
Nanuq has joined #ruby
rahulkmr has joined #ruby
aspires has quit [Quit: sudo making a sandwich]
fredjean has joined #ruby
brennanMKE has quit [Ping timeout: 268 seconds]
ph8 has quit [Ping timeout: 268 seconds]
Shidash has quit [Quit: Leaving.]
julweber has quit [Ping timeout: 265 seconds]
tatsuya_o has quit [Ping timeout: 272 seconds]
DanKnox is now known as DanKnox_away
Shidash has joined #ruby
kobain99 has quit []
earthquake has quit [Quit: earthquake]
Monie has joined #ruby
astrobunny has quit [Ping timeout: 252 seconds]
earthquake has joined #ruby
huttan has joined #ruby
arturro has joined #ruby
ph8 has joined #ruby
krz has joined #ruby
ntzrmtth1hu777 has quit [Ping timeout: 248 seconds]
fgo has quit [Remote host closed the connection]
astrobunny has joined #ruby
huttan has quit [Ping timeout: 252 seconds]
aspires has joined #ruby
fgo has joined #ruby
DanKnox_away is now known as DanKnox
vpretzel has quit [Remote host closed the connection]
vpretzel has joined #ruby
eject_ck has joined #ruby
osvico has quit [Ping timeout: 245 seconds]
Tearan has quit [Quit: Sleepy Badger....]
`Chris` has joined #ruby
hiyosi has joined #ruby
awarner has joined #ruby
Jeticus has quit []
pdimitrov has quit [Ping timeout: 252 seconds]
pr0ggie has quit [Ping timeout: 252 seconds]
capicue has quit [Ping timeout: 246 seconds]
pr0ggie has joined #ruby
pdimitrov has joined #ruby
sergicles has quit [Quit: sergicles]
awarner_ has quit [Ping timeout: 268 seconds]
WillAmes has quit [Remote host closed the connection]
`Chris`_ has quit [Ping timeout: 272 seconds]
hiyosi has quit [Read error: Operation timed out]
WillAmes has joined #ruby
filipski has quit [Remote host closed the connection]
dayepa has quit [Quit: dayepa]
Spami has joined #ruby
dayepa has joined #ruby
Abs has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby
cads has quit [Ping timeout: 245 seconds]
cohron has joined #ruby
Shidash has quit [Quit: Leaving.]
Shidash1 has joined #ruby
Abs has quit [Client Quit]
c0rn has quit [Quit: Computer has gone to sleep.]
BinJoy has quit [Quit: 离开]
Shidash1 has quit [Read error: Connection reset by peer]
brtdv has joined #ruby
dawkirst has quit [Quit: Leaving]
habanany has joined #ruby
habanany has quit [Client Quit]
relix has joined #ruby
thepumpkin has joined #ruby
mneorr has joined #ruby
timonv has joined #ruby
hiyosi has joined #ruby
ewnd9 has joined #ruby
ewnd9 has quit [Remote host closed the connection]
ewnd9 has joined #ruby
wereHams1er has joined #ruby
wereHams1er has quit [Changing host]
wereHams1er has joined #ruby
wereHams1er is now known as wereSheep
DonRichie has joined #ruby
cads has joined #ruby
wereSheep is now known as wereHamster|work
thepumpkin has quit [Ping timeout: 272 seconds]
mneorr has quit [Ping timeout: 272 seconds]
tagrudev has joined #ruby
hiyosi has quit [Read error: Operation timed out]
rahulkmr has quit [Ping timeout: 272 seconds]
vpretzel has quit [Remote host closed the connection]
noop has joined #ruby
vpretzel has joined #ruby
falood has joined #ruby
pherryman_ has quit [Read error: No route to host]
pherryman_ has joined #ruby
vpretzel has quit [Ping timeout: 260 seconds]
aspires has quit [Quit: sudo making a sandwich]
tjad has quit [Ping timeout: 260 seconds]
nisstyre has quit [Quit: Leaving]
t_p has joined #ruby
Ox6abe has joined #ruby
kil0byte has joined #ruby
burgess has joined #ruby
rahulkmr has joined #ruby
brennanMKE has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
tatsuya_o has joined #ruby
sayan has joined #ruby
brennanMKE has quit [Read error: Connection reset by peer]
zoee has joined #ruby
Ox6abe has quit [Ping timeout: 268 seconds]
brennanMKE has joined #ruby
brtdv has quit []
DanKnox is now known as DanKnox_away
zz_michael_mbp is now known as michael_mbp
caitp has quit [Ping timeout: 246 seconds]
tatsuya_o has quit [Ping timeout: 252 seconds]
apeiros_ has quit [Remote host closed the connection]
pr0ggie has quit [Read error: Operation timed out]
timonv has quit [Remote host closed the connection]
apeiros has joined #ruby
brennanMKE has quit [Ping timeout: 265 seconds]
michael_mbp is now known as zz_michael_mbp
pdimitrov has quit [Ping timeout: 248 seconds]
apeiros has quit [Ping timeout: 272 seconds]
Vaibhav_Rajput has quit [Ping timeout: 252 seconds]
Vaibhav_Rajput has joined #ruby
kleinerdrache has joined #ruby
roadt__ has quit [Ping timeout: 260 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
cohron has quit [Remote host closed the connection]
terlar has joined #ruby
wallerdev has quit [Quit: wallerdev]
s2013 has quit [Quit: Leaving]
vpretzel has joined #ruby
tolman has joined #ruby
Vaibhav_Rajput has quit [Ping timeout: 246 seconds]
Vaibhav_Rajput has joined #ruby
Fire-Dragon-DoL has left #ruby [#ruby]
nfk has joined #ruby
astrobunny has quit [Ping timeout: 268 seconds]
w4pm has quit [Ping timeout: 245 seconds]
tolman has quit [Remote host closed the connection]
Vaibhav_Rajput has quit [Remote host closed the connection]
tonni_ has quit [Remote host closed the connection]
tonni has joined #ruby
earthquake has quit [Quit: earthquake]
arturro is now known as achru
nkts has quit [Quit: x]
wildroman has quit [Remote host closed the connection]
pyrac has joined #ruby
wildroman has joined #ruby
eject_ck has left #ruby [#ruby]
Astralum has joined #ruby
rahulkmr has quit [Read error: Connection reset by peer]
tonni has quit [Ping timeout: 252 seconds]
mneorr has joined #ruby
pranny has joined #ruby
astrobunny has quit [Ping timeout: 246 seconds]
wildroman has quit [Ping timeout: 272 seconds]
tharindu has joined #ruby
newbiehacker has joined #ruby
kstephens has joined #ruby
hiyosi has joined #ruby
mneorr has quit [Ping timeout: 245 seconds]
jonr22 has joined #ruby
bigkevmcd has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
astrobunny has joined #ruby
hiyosi has quit [Ping timeout: 263 seconds]
Senjai has quit [Remote host closed the connection]
tonni has joined #ruby
bricker`LA has quit [Ping timeout: 240 seconds]
tjad has quit [Quit: No Ping reply in 180 seconds.]
jonr22 has quit [Ping timeout: 245 seconds]
tjad has joined #ruby
tonni has quit [Read error: Connection reset by peer]
rahulkmr has joined #ruby
aganov has joined #ruby
vpretzel has quit [Ping timeout: 268 seconds]
tjad has quit [Remote host closed the connection]
adambeynon has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
LarsSmit has joined #ruby
huttan has joined #ruby
juniour1 has joined #ruby
<juniour1>
hi guys u all there .ruby.bin eats my all cpu resources plz help??
tboerger has joined #ruby
tziOm has joined #ruby
tharindu has quit [Quit: Leaving...]
<canton7>
...are you running a ruby program which is eating your CPU? Try reading your question back to yourself - it contains nothing which might help us help you
user258467 has joined #ruby
<juniour1>
canton7 it starts at start up. i alwasy need to kill it. i need it stop it from starup
`Chris` has quit [Read error: Connection reset by peer]
_jery has joined #ruby
<canton7>
go on then :)
`Chris` has joined #ruby
tatsuya_o has joined #ruby
<canton7>
windows or linux?
<Hanmac1>
or Mac?
Hanmac1 is now known as Hanmac
brennanMKE has joined #ruby
huttan has quit [Ping timeout: 272 seconds]
tonni has joined #ruby
kleinerdrache has quit [Quit: Ex-Chat]
brtdv has joined #ruby
fgo has quit [Remote host closed the connection]
tatsuya_o has quit [Ping timeout: 272 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brennanMKE has quit [Ping timeout: 246 seconds]
zz_michael_mbp is now known as michael_mbp
Papipo has joined #ruby
tkuchiki has joined #ruby
<Papipo>
Hi there
gr33n7007h has joined #ruby
Xeago has joined #ruby
<Papipo>
Do you know if there is any ruby/rack implementation of a HTTP API based on JSON Schema models?
tatsuya_o has joined #ruby
zigomir has joined #ruby
fgo has joined #ruby
tkuchiki has quit [Ping timeout: 245 seconds]
bigmac_ has joined #ruby
kil0byte_ has joined #ruby
sbos99 has joined #ruby
ctp has joined #ruby
h_kon has joined #ruby
dabos has joined #ruby
i8igmac has quit [Ping timeout: 272 seconds]
sbos99 has quit [Client Quit]
kil0byte has quit [Ping timeout: 248 seconds]
jhaals has joined #ruby
|jemc| has quit [Ping timeout: 240 seconds]
tonni has quit [Read error: Connection reset by peer]
kleinerdrache has joined #ruby
ctp_ has joined #ruby
ctp has quit [Read error: Connection reset by peer]
bigmac_ is now known as i8igmac
kleinerdrache has quit [Read error: No route to host]
tharindu has joined #ruby
OdNairy has joined #ruby
jmoeller has joined #ruby
ctp_ has quit [Client Quit]
einarj has joined #ruby
achru has quit [Remote host closed the connection]
crus` has joined #ruby
achru has joined #ruby
crus has quit [Ping timeout: 245 seconds]
drumusician has joined #ruby
tonni has joined #ruby
achru has quit [Ping timeout: 240 seconds]
blaxter_ has joined #ruby
robbyoconnor has quit [Ping timeout: 268 seconds]
robbyoconnor has joined #ruby
coderhs has joined #ruby
dangerousdave has joined #ruby
achru has joined #ruby
burgess has quit [Quit: ^zzz]
leonidlm has joined #ruby
tesuji has joined #ruby
kevinykchan has quit [Ping timeout: 272 seconds]
camilasan has joined #ruby
aapzak has joined #ruby
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
justsee has quit [Ping timeout: 272 seconds]
thepumpkin has joined #ruby
roadt__ has joined #ruby
julweber has joined #ruby
astrobunny has quit [Ping timeout: 268 seconds]
sergicles has joined #ruby
sergicles has quit [Client Quit]
mneorr has joined #ruby
svennidal has joined #ruby
ehaliewi` has joined #ruby
claymore has joined #ruby
hiyosi has joined #ruby
krz has quit [Quit: krz]
kaspergrubbe has joined #ruby
ehaliewicz has quit [Remote host closed the connection]
vpretzel has joined #ruby
tonni has quit [Read error: Connection reset by peer]
vpretzel has quit [Read error: Connection reset by peer]
barratt has joined #ruby
vpretzel has joined #ruby
drumusician has joined #ruby
tjaco has quit [Read error: Connection reset by peer]
julweber has joined #ruby
mneorr has quit [Ping timeout: 272 seconds]
jrhe has quit [Quit: jrhe]
hiyosi has quit [Read error: Operation timed out]
wildroman has joined #ruby
spider-mario has joined #ruby
wildroman has quit [Remote host closed the connection]
Deele has joined #ruby
huttan has quit [Ping timeout: 252 seconds]
wildroman has joined #ruby
jmoeller has quit []
<pixiebit>
For square!, I can't use self = self.square, right?
vpretzel has quit [Ping timeout: 272 seconds]
pyrac has quit [Quit: pyrac]
<apeiros>
you can't assign to self, no
Jabberish has quit [Ping timeout: 246 seconds]
jmoeller has joined #ruby
<artmann_>
Is there any tutorials for making changed to existing gems? Is the correct approach: Fork -> Do Changes -> build localy -> test -> push -> pullrequest ?
<Papipo>
usually the changes are pushed on a separate branch
<pixiebit>
omg ? im so sorry
drumusician has quit [Ping timeout: 245 seconds]
jmoeller has joined #ruby
burgess has quit [Quit: ^zzz]
jmoeller has quit [Client Quit]
ybart has joined #ruby
samfisher has joined #ruby
samfisher has joined #ruby
samfisher has quit [Changing host]
<artmann_>
Papipo: oh yeah I forgot that step
troessner has joined #ruby
lkba has quit [Ping timeout: 272 seconds]
mengu has quit [Read error: Connection reset by peer]
drumusician has joined #ruby
workmad3 has joined #ruby
heftig has quit [Quit: Quitting]
jlebrech has joined #ruby
astrobunny has quit [Ping timeout: 245 seconds]
brennanMKE has joined #ruby
michael_mbp is now known as zz_michael_mbp
it_tard has quit [Read error: Connection reset by peer]
it_tard has joined #ruby
it_tard has joined #ruby
it_tard has quit [Changing host]
pixiebit has left #ruby [#ruby]
_jery has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
rdark has joined #ruby
leonidlm has quit [Read error: Connection reset by peer]
Davey has quit [Quit: Computer has gone to sleep.]
burgess has joined #ruby
brennanMKE has quit [Ping timeout: 272 seconds]
xk_id has quit [Quit:
Ripp__ has quit []
AlSquire has joined #ruby
threesome has joined #ruby
nari has quit [Ping timeout: 245 seconds]
_jery has joined #ruby
jhaals has joined #ruby
falood has quit [Remote host closed the connection]
mrpot4to_ has quit [Read error: Connection reset by peer]
MrPoT4tO has quit [Remote host closed the connection]
ephemerian has joined #ruby
polysics has joined #ruby
<polysics>
hi!
<polysics>
Guard users: why is guard not running all after pass if I have all_after_pass set to true? :)
<polysics>
guard :rspec, all_after_pass: true, all_on_start: true do
leonidlm has joined #ruby
lkba has joined #ruby
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
jibi has joined #ruby
sniffingcats has joined #ruby
Squarepy has joined #ruby
vpretzel has joined #ruby
starfox21 has joined #ruby
kirun has joined #ruby
sayan has quit [Ping timeout: 240 seconds]
wudofyr has quit [Ping timeout: 272 seconds]
rubyminer has joined #ruby
einarj has joined #ruby
vpretzel has quit [Ping timeout: 268 seconds]
pyrac has joined #ruby
lessless has left #ruby ["Ухожу я от вас (xchat 2.4.5 или старше)"]
aagdbl has quit [Quit: Leaving.]
kil0byte has joined #ruby
kil0byte_ has quit [Ping timeout: 246 seconds]
rjhunter has quit [Remote host closed the connection]
thepumpkin has joined #ruby
ecksit has quit [Quit: Laters.]
banisterfiend has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby
Al_ has joined #ruby
burgess has quit [Quit: ^zzz]
mercwithamouth has joined #ruby
banisterfiend has quit [Client Quit]
mneorr has joined #ruby
lkba has quit [Ping timeout: 240 seconds]
LarsSmit has quit [Quit: Leaving.]
heftig has joined #ruby
hiyosi has joined #ruby
sniffingcats has quit [Quit: Til rivido Idisti!]
thepumpkin has quit [Ping timeout: 245 seconds]
LarsSmit has joined #ruby
ybart has quit [Read error: Connection reset by peer]
ybart has joined #ruby
mneorr has quit [Ping timeout: 245 seconds]
juniour1 has left #ruby [#ruby]
wudofyr has joined #ruby
hiyosi has quit [Ping timeout: 240 seconds]
lkba has joined #ruby
rickmasta has quit [Quit: Leaving...]
gr33n7007h has quit [Changing host]
gr33n7007h has joined #ruby
LarsSmit has quit [Quit: Leaving.]
t_p has quit [Quit: Computer has gone to sleep.]
<shevy>
is it possible to generate methods dynamically, that also accept a variable amount of arguments, some of them being optional because they get set default values?
<shevy>
in other words:
justsee has quit [Quit: leaving]
<shevy>
def foo(a,b,c='',d='')
Domon has quit [Remote host closed the connection]
<shevy>
but dynamically
h_kon has quit [Remote host closed the connection]
Nilium has quit [Disconnected by services]
<canton7>
define_method :foo do |a, b=3| .... works for me
ldnunes has joined #ruby
<shevy>
hmm lemme test
ybart has quit [Read error: Connection reset by peer]
ybart has joined #ruby
<shevy>
cool
<shevy>
works for me as well
<shevy>
could swear it did not work yesterday... :¿
helpa has quit [Remote host closed the connection]
Astralum has quit [Read error: Connection reset by peer]
Astralum has joined #ruby
svennidal has quit [Remote host closed the connection]
veleno has joined #ruby
LarsSmit has joined #ruby
pyrac has quit [Quit: pyrac]
`Chris` has quit [Read error: Connection reset by peer]
`Chris` has joined #ruby
drumusician has quit [Ping timeout: 260 seconds]
benregn has joined #ruby
sepp2k has joined #ruby
<benregn>
hey, does anyone know if I can config thin to not run daemonized?
<benregn>
in code, not yml
ewnd9_ has joined #ruby
heftig has quit [Quit: Quitting]
Ox6abe has joined #ruby
jrhe has quit [Quit: jrhe]
nateberkopec has quit [Quit: Leaving...]
Zai00 has quit [Read error: No route to host]
ewnd9 has quit [Ping timeout: 252 seconds]
derebos has joined #ruby
AndChat| has joined #ruby
nateberkopec has joined #ruby
jonr22 has joined #ruby
Liothen has quit [Quit: System of a down……]
Zai00 has joined #ruby
jrhe has joined #ruby
LLckfan2 has joined #ruby
<LLckfan2>
I have an android tablet that I have put youtube app on. When I try to sign into youtubr it says an error occurred. Is there anything I can do to fix this? I did not get the app from Google Play as Google Play does not support my brand of tablet
sergicles has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 245 seconds]
gr33n7007h has quit [Remote host closed the connection]
matchaw has quit [Remote host closed the connection]
huttan has joined #ruby
heftig has joined #ruby
adambeynon has joined #ruby
ehaliewi` has quit [Ping timeout: 272 seconds]
Bofu2U has quit [Quit: I outta here.]
platypine has joined #ruby
matchaw has joined #ruby
vpretzel has quit [Ping timeout: 240 seconds]
amacgregor has joined #ruby
kaspergr_ has quit [Remote host closed the connection]
ludar has quit [Ping timeout: 252 seconds]
sayan has joined #ruby
wildroman has quit [Remote host closed the connection]
nowthatsamatt has quit [Quit: nowthatsamatt]
Bofu2U has joined #ruby
huttan has quit [Ping timeout: 245 seconds]
platypine has quit [Ping timeout: 272 seconds]
nari has joined #ruby
pherryman has joined #ruby
amacgregor has quit [Ping timeout: 245 seconds]
benregn has left #ruby [#ruby]
matchaw has quit [Remote host closed the connection]
h_kon has quit [Remote host closed the connection]
pherryman_ has quit [Ping timeout: 245 seconds]
jamblack has joined #ruby
allsystemsarego has joined #ruby
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
mneorr has joined #ruby
atmosx has joined #ruby
<atmosx>
hello
matchaw has joined #ruby
<atmosx>
I am writing a script for mysqldump and I'm using if system("which mysqldump") .. works fine but it ouputs in STOUT the path of the file. I just need the true/false which comes after... Any ideas?
<atmosx>
on how to silence it?
includex has joined #ruby
includex has quit [Max SendQ exceeded]
<tobiasvl>
the true/false is the return value
matchaw has quit [Remote host closed the connection]
mneorr has quit [Ping timeout: 260 seconds]
<atmosx>
tobiasvl: yes but I want use only that
pyrac has quit [Quit: pyrac]
<tobiasvl>
well then just pipe the output to another place than STDOUT
<tobiasvl>
system("which mysqldump > /dev/null")
<tobiasvl>
should work?
<atmosx>
that's dirty
<LLckfan2>
Hello
<LLckfan2>
I have an android tablet that I have put youtube app on. When I try to sign into youtubr it says an error occurred. Is there anything I can do to fix this? I did not get the app from Google Play as Google Play does not support my brand of tablet
hogeo_ has joined #ruby
h_kon has joined #ruby
codelette has joined #ruby
matchaw has joined #ruby
<Hanmac>
atmosx: are you sure you dont what `which mysqldump` ?
<tobiasvl>
LLckfan2: that doesn't sound like a Ruby question
judd7 has joined #ruby
h_kon has quit [Remote host closed the connection]
jkamenik has joined #ruby
hogeo__ has joined #ruby
hogeo has quit [Ping timeout: 240 seconds]
LLckfan2 has left #ruby [#ruby]
matchaw has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
wak3r has joined #ruby
einarj has quit [Ping timeout: 248 seconds]
hogeo_ has quit [Ping timeout: 272 seconds]
<shevy>
hehe
matchaw has joined #ruby
mojjojo has joined #ruby
hogeo__ has quit [Read error: Connection reset by peer]
hogeo has joined #ruby
srji has joined #ruby
Asher1 has joined #ruby
postmodern has quit [Quit: Leaving]
<atmosx>
Hanmac: tried exec `` and system on irb, only system returns true/false
<atmosx>
redirecting stderr to /dev/null works though
kaspergr_ has joined #ruby
Asher has quit [Read error: Connection reset by peer]
mist has quit [Quit: leaving]
casheew has quit [Read error: Operation timed out]
bier has quit [Read error: Operation timed out]
thelamest has quit [Read error: Operation timed out]
soukihei has quit [Read error: Connection reset by peer]
vadviktor_ has quit [Read error: Operation timed out]
Desert_eagle has quit [Read error: Operation timed out]
matchaw has quit [Remote host closed the connection]
Desert_eagle_ has joined #ruby
casheew has joined #ruby
soukihei_ has joined #ruby
kaspergrubbe has quit [Read error: Connection reset by peer]
bier has joined #ruby
<Hanmac>
atmosx: !`which mysqldump`.empty? returns also true/false ..
vadviktor_ has joined #ruby
SilverKey has quit [Ping timeout: 252 seconds]
Ox6abe has quit [Remote host closed the connection]
pyrac has joined #ruby
<Hanmac>
atmosx: if you want system with redirect, why not this? system("which mysqldump",:out => IO::NULL)
matchaw has joined #ruby
SilverKey has joined #ruby
judd7 has quit [Quit: judd7]
<atmosx>
Hanmac: hmmm that would be awesome to get rid of the mysql password in cli error message actually :D
<atmosx>
and I had the feeling that I can use the system redirect, didn't find anything in the documentation though :-/
<atmosx>
how did you knew that?
brennanMKE has joined #ruby
kitak_ has quit [Remote host closed the connection]
allanm has quit [Read error: Connection reset by peer]
kaspergr_ has quit [Read error: Operation timed out]
RicFlair has joined #ruby
<Hanmac>
atmosx: i asked "the great and mighty ri" ;P
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kaspergrubbe has joined #ruby
amacgregor has joined #ruby
jhaals has joined #ruby
<Hanmac>
atmosx:
<Hanmac>
ri system: "The hash arguments, env and options, are same as exec and spawn. See Kernel.spawn for details."
<Hanmac>
ri spawn: redirection: FD is one of follows :out => string redirect to file
<atmosx>
mmm not working as expected in this scenario though
<atmosx>
anyone not much time now, I'll work it out when I come back. Thanks for the tip :-) I never use 'ri'
brennanMKE has quit [Ping timeout: 272 seconds]
vidyashankar_ has joined #ruby
vidyashankar_ has quit [Client Quit]
ravster has joined #ruby
Papipo has quit [Quit: Leaving.]
atmosx has quit [Quit: Lost in trance]
Soda has joined #ruby
pyrac has quit [Quit: pyrac]
polysics has left #ruby [#ruby]
thelamest has joined #ruby
allanm has joined #ruby
amacgregor has quit [Ping timeout: 272 seconds]
OdNairy has quit [Ping timeout: 260 seconds]
mephux has quit [Ping timeout: 260 seconds]
kil0byte has quit [Remote host closed the connection]
blackmesa has joined #ruby
chiel has joined #ruby
mephux has joined #ruby
chiel has quit [Client Quit]
OdNairy has joined #ruby
nowthatsamatt has joined #ruby
chiel has joined #ruby
Banistergalaxy has joined #ruby
mrmist has joined #ruby
Beoran__ has joined #ruby
mrmist is now known as mist
michael_mbp is now known as zz_michael_mbp
Papipo has joined #ruby
Papipo has quit [Client Quit]
Beoran_ has quit [Ping timeout: 240 seconds]
wildroman has joined #ruby
janiz has joined #ruby
h_kon has joined #ruby
vpretzel has joined #ruby
mikecmpbll has joined #ruby
h_kon has quit [Remote host closed the connection]
pyrac has joined #ruby
jrhe has quit [Quit: jrhe]
mark_locklear has joined #ruby
janiz has left #ruby [#ruby]
elaptics is now known as elaptics`away
achru has quit [Remote host closed the connection]
wald0 has joined #ruby
<wald0>
can be ruby a good bash (scripting) replacement ? specially for administrative purposes/scripts
achru has joined #ruby
<tobiasvl>
sure, i use it for that all the time
vpretzel has quit [Ping timeout: 245 seconds]
`Chris` has quit [Remote host closed the connection]
<tobiasvl>
it's more of a perl replacement though
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
`Chris` has joined #ruby
`Chris` has quit [Remote host closed the connection]
`Chris` has joined #ruby
newbiehacker has quit [Quit: Leaving]
rahulkmr has quit [Ping timeout: 268 seconds]
achru has quit [Ping timeout: 260 seconds]
zz_michael_mbp is now known as michael_mbp
sayan has quit [Ping timeout: 246 seconds]
elaptics`away is now known as elaptics
thepumpkin has joined #ruby
veleno has quit [Quit: veleno]
nowthatsamatt has quit [Quit: nowthatsamatt]
dangerousdave has quit [Read error: Connection reset by peer]
vpretzel has joined #ruby
dangerousdave has joined #ruby
forced_request has joined #ruby
sunnymolini has joined #ruby
jrhe has joined #ruby
JeanMertz has joined #ruby
lbwski has quit [Quit: leaving]
lbwski has joined #ruby
Soda has quit [Ping timeout: 268 seconds]
thepumpkin has quit [Ping timeout: 272 seconds]
breakingthings has joined #ruby
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
tharindu has quit [Quit: Leaving...]
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
Olipro has joined #ruby
kaldrenon has joined #ruby
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
decoponio has joined #ruby
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
rahulkmr has joined #ruby
ewnd9_ has quit [Ping timeout: 240 seconds]
Coolhand has joined #ruby
burlyscudd has joined #ruby
burlyscudd has quit [Client Quit]
dkamioka has joined #ruby
OdNairy has quit [Ping timeout: 265 seconds]
burlyscudd has joined #ruby
OdNairy has joined #ruby
gja has joined #ruby
goshakkk has joined #ruby
mengu has quit [Remote host closed the connection]
dkamioka has quit [Remote host closed the connection]
<wald0>
tobiasvl: nice, so im searching something more powerful than bash for admin stuff but that stills friendly/handly
<wald0>
unfortunately all the books that i see are more oriented to objects, data structre, and powerful applications
heftig has quit [Read error: Connection reset by peer]
<wald0>
tobiasvl: do you know where i can find some source codes to use as example for get ideas?
brennanMKE has joined #ruby
<tobiasvl>
hmm, not really, but there's probably lots on the web
Xeago has quit [Remote host closed the connection]
<wald0>
mmh, nice examples, fileutils looks nice
nowthatsamatt has joined #ruby
Soda has joined #ruby
Uranio has joined #ruby
brennanMKE has quit [Ping timeout: 268 seconds]
jonr22 has joined #ruby
Uranio has quit [Client Quit]
dkamioka has joined #ruby
Uranio has joined #ruby
dunderline has joined #ruby
Astral_ has joined #ruby
dkamioka has quit [Remote host closed the connection]
zxq9 has joined #ruby
<wald0>
tobiasvl: did you have some "small scripts" in ruby that you can share, maybe?
Astralum has quit [Ping timeout: 272 seconds]
BizarreCake has joined #ruby
<dunderline>
quick question on dynamically loading classes. I want to require all the ruby classes inside a directory and then instantiate the class and call a method on each of them.
<dunderline>
Is this a really dumb idea, or is there a better way?
werries has quit [Remote host closed the connection]
<dunderline>
Also thinking of making each class inside of the directory inherit from another class and I can find all the children of that class to then process them.
ludar has joined #ruby
rurban has joined #ruby
angusiguess has joined #ruby
ninegrid_ has joined #ruby
jerius has joined #ruby
olivier_bK has joined #ruby
huttan has joined #ruby
ninegrid has quit [Ping timeout: 272 seconds]
nateberkopec has quit [Quit: Leaving...]
nari has quit [Ping timeout: 272 seconds]
AndChat- has joined #ruby
SilverKey has quit [Quit: Sleep now]
rickmasta has joined #ruby
huttan has quit [Ping timeout: 272 seconds]
pyrac has joined #ruby
nari has joined #ruby
geekbri has joined #ruby
ph8 has joined #ruby
achru has joined #ruby
Banistergalaxy has quit [Ping timeout: 245 seconds]
pen has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
achru has quit [Client Quit]
olivier_bK has quit [Read error: No route to host]
thesheff17 has joined #ruby
ph8 has quit [Ping timeout: 272 seconds]
lukec has joined #ruby
asobrasil has joined #ruby
snovak has joined #ruby
allaire has joined #ruby
stringoO has joined #ruby
ludar has quit [Ping timeout: 272 seconds]
rurban has quit [Quit: Leaving.]
newbiehacker has joined #ruby
tomzx_mac has joined #ruby
fredjean has quit [Quit: Computer has gone to sleep.]
rahulkmr has quit [Ping timeout: 246 seconds]
Banistergalaxy has joined #ruby
Clooth has joined #ruby
<ravster>
Hey all, how do I find out if a string is already urlencoded?
burlyscudd has quit [Quit: Leaving.]
jlast has joined #ruby
wildroman has quit [Remote host closed the connection]
wildroman has joined #ruby
AndChat- has quit [Ping timeout: 248 seconds]
sailias has joined #ruby
AlSquire has quit [Ping timeout: 252 seconds]
wildroman has quit [Remote host closed the connection]
freerobby has joined #ruby
<Radar>
ravster: How do you even urlencode a string?
AlSquire has joined #ruby
burlyscudd has joined #ruby
wildroman has joined #ruby
<ravster>
URI.escape?
<wald0>
Is the packaging of gems (for debian) something not very supported? im thinking about the portability of use my ruby code in other debian computers
<ravster>
Radar: URI.escape(foo) or URI.encode(foo)
nowthatsamatt has left #ruby [#ruby]
wesside has quit [Quit: Computer has gone to sleep.]
mneorr has joined #ruby
xk_id has quit [Quit:
eka has joined #ruby
joonty has joined #ruby
sayan has joined #ruby
vindictive27 has joined #ruby
pothibo has joined #ruby
pothibo has quit [Client Quit]
mneorr has quit [Ping timeout: 245 seconds]
larissa has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
pranny has quit [Quit: Leaving.]
devdazed has joined #ruby
sayan has quit [Ping timeout: 272 seconds]
tyleretters has joined #ruby
fridim_ has joined #ruby
<andrewvos>
ravster: Are you doing this yourself? Why do you need to know if it is already encoded? Sounds like a design issue there
iamjarvo has joined #ruby
<ravster>
andrewvos: yeah, I think I need to figure out a different set of checks for my data.
iamjarvo has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
nateberkopec has joined #ruby
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
rahulkmr has joined #ruby
theRoUS has joined #ruby
rurban has joined #ruby
Azulinho has quit [Ping timeout: 245 seconds]
kil0byte has joined #ruby
cba has joined #ruby
burlyscudd has quit [Read error: Connection reset by peer]
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
tonni has quit [Remote host closed the connection]
<dunderline>
How can I get a list of classes that have inherited from another class?
jkamenik has quit [Quit: Leaving.]
mrsolo has joined #ruby
iamjarvo has quit [Remote host closed the connection]
tonni has joined #ruby
<dunderline>
If I put the following into a class method it works, "ObjectSpace.each_object(Class).select { |klass| klass < self }"
jbpros has joined #ruby
<dunderline>
but it doesn't work from an instance
iamjarvo has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
dkamioka has joined #ruby
bean has joined #ruby
voodoofish has quit [Quit: Leaving]
vindictive27 has quit [Quit: vindictive27]
brennanMKE has quit [Ping timeout: 272 seconds]
Xeago has joined #ruby
momomomomo has joined #ruby
burlyscudd1 has quit [Quit: Leaving.]
Al_ has joined #ruby
tonni has quit [Ping timeout: 245 seconds]
tkuchiki has joined #ruby
Soda has quit [Remote host closed the connection]
fmcgeough has joined #ruby
iamjarvo has quit [Ping timeout: 272 seconds]
burlyscudd has joined #ruby
ybart has quit [Quit: ybart]
<wald0>
Is the packaging of gems (for debian) something not very supported? im thinking about the portability of use my ruby code in other debian computers
VTLob has joined #ruby
jojosch has joined #ruby
kil0byte_ has joined #ruby
freerobby has quit [Quit: Leaving.]
tkuchiki has quit [Ping timeout: 272 seconds]
huttan has joined #ruby
kil0byte has quit [Ping timeout: 252 seconds]
dkamioka has quit [Remote host closed the connection]
iamjarvo has joined #ruby
tomzx_mac has quit [Ping timeout: 252 seconds]
jojosch has quit [Client Quit]
dkamioka has joined #ruby
anderson has quit [Quit: Leaving]
lukec has quit [Quit: lukec]
<joelio>
wald0: I'd just use native gems with bundler
mahlon_ is now known as mahlon
robbyoconnor has quit [Ping timeout: 248 seconds]
SilverKey has quit [Quit: Sleep now]
tris has quit [Excess Flood]
eichenwald has joined #ruby
tris has joined #ruby
dkamioka has quit [Ping timeout: 245 seconds]
lfox has joined #ruby
dkamioka has joined #ruby
drag00n has joined #ruby
ravster has quit [Quit: Leaving.]
ninegrid_ has quit [Remote host closed the connection]
mlpinit has quit [Remote host closed the connection]
nari has quit [Ping timeout: 268 seconds]
mlpinit has joined #ruby
<wald0>
yeah but i wonder more about the compatiblity over "system" (not user), like packaging and install the package so that will work out of the box
<_maes_>
this is because ruby does not support multiple inheritance
RORgasm has joined #ruby
<_maes_>
afaiu
rahulkmr has quit [Ping timeout: 265 seconds]
hogeo has quit [Remote host closed the connection]
<hashpuppy>
you see how on lines 14-25 he includes Venues, Events, etc... and then defines "def venues" and "def events" in each of those modules
hogeo has joined #ruby
jrhe has quit [Quit: jrhe]
seekwill has joined #ruby
thepumpkin has joined #ruby
wallerdev has joined #ruby
fridim_ has quit [Read error: Operation timed out]
maZtah has quit [Changing host]
maZtah has joined #ruby
burlyscudd has quit [Read error: Connection reset by peer]
burlyscudd has joined #ruby
<Hanmac>
yeah, is there a problem?
rickmasta has quit [Quit: Leaving...]
jbpros has joined #ruby
mneorr has joined #ruby
fredjean has joined #ruby
hogeo has quit [Ping timeout: 240 seconds]
headius has joined #ruby
xxpor__ has quit [Ping timeout: 248 seconds]
thepumpkin has quit [Ping timeout: 272 seconds]
<Hanmac>
im i would try to make the methods auto-generated ... i mean there is always an *single*(id), add_*single*(), search_*plural* and *single*_venues or something like that?
gja has quit [Quit: This computer has gone to sleep]
boxmein has joined #ruby
mneorr has quit [Ping timeout: 245 seconds]
Monie has joined #ruby
Monie has quit [Client Quit]
JMcAfreak has joined #ruby
kevind has joined #ruby
krawchyk has joined #ruby
iamjarvo_ has joined #ruby
nouitfvf has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
burlyscudd has quit [Quit: Leaving.]
zz_jrhorn424 is now known as jrhorn424
freerobby has joined #ruby
kvirani has joined #ruby
freezey has quit [Remote host closed the connection]
freezey has joined #ruby
iamjarvo has quit [Ping timeout: 260 seconds]
h_kon has joined #ruby
lharms has joined #ruby
lharms has quit [Client Quit]
rickmasta has joined #ruby
lmickh has joined #ruby
jonr22 has joined #ruby
zipper has joined #ruby
ReachingFarr has joined #ruby
<ReachingFarr>
I'm having some trouble loading gems installed in my home directory (~/.gem). Right now when I try and run a script like Rake I get a LoadError.
brennanMKE has joined #ruby
freezey has quit [Ping timeout: 240 seconds]
ybart has joined #ruby
noop has quit [Ping timeout: 252 seconds]
blackmesa has quit [Quit: WeeChat 0.4.2]
<workmad3>
ReachingFarr: any idea on ruby version?
interactionjaxsn has joined #ruby
<ReachingFarr>
I've set GEM_HOME to ~/.gem, as well as added the path to gemhome and gempath in .gemrc.
<ReachingFarr>
2.0.0p247
iamjarvo_ has quit [Remote host closed the connection]
jonr22 has quit [Ping timeout: 252 seconds]
jrhorn424 is now known as zz_jrhorn424
iamjarvo has joined #ruby
<end_guy>
What's your favorite thing about Ruby?
freezey has joined #ruby
tonni has joined #ruby
zipper_ has joined #ruby
<banisterfiend>
end_guy good question
zipper is now known as Guest68572
<banisterfiend>
end_guy in my case it would be executable class bodies i think
thepumpkin has joined #ruby
<banisterfiend>
love that shit
<finnomenon>
end_guy: modulo
zipper_ is now known as zipper
SilverKey has joined #ruby
Guest68572 has quit [Ping timeout: 240 seconds]
<end_guy>
:)
d2dchat_ has joined #ruby
<ReachingFarr>
workmad3: Any ideas?
pherryman has quit [Ping timeout: 263 seconds]
<workmad3>
ReachingFarr: not from the info so far... what's inside ~/.gem though?
JRizzle has joined #ruby
RicFlair has quit [Read error: Connection reset by peer]
<ReachingFarr>
workmad3: bin, build_info, cache, doc, gems, specifications, and specs. All directories.
iamjarvo_ has joined #ruby
RicFlair has joined #ruby
<workmad3>
ReachingFarr: ok, that sounds about right... could you gist the exact commands and output you're getting then please?
iamjarvo has quit [Read error: Operation timed out]
velCzupa has joined #ruby
velCzupa has quit [Client Quit]
ph8 has joined #ruby
wald0 has quit [Quit: Lost terminal]
tesuji has quit [Read error: Connection reset by peer]
<banisterfiend>
end_guy i also love all the introspection/reflection APIs
tesuji has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
<end_guy>
I really like how easy meta programming is with class_eval
<banisterfiend>
class_eval is often abused
<banisterfiend>
IMO
kil0byte has joined #ruby
<end_guy>
absolutely, but when used properly it gives me warm fuzzies
failshell has joined #ruby
dabos has quit [Quit: Leaving]
ph8 has quit [Max SendQ exceeded]
<banisterfiend>
:))
<Hanmac>
banisterfiend: eval is more abused ;P
danshultz has quit [Remote host closed the connection]
h_kon has quit [Remote host closed the connection]
<end_guy>
eval(gets) <-- the famous ruby calculator
sambao21 has joined #ruby
JeanMertz has quit [Ping timeout: 268 seconds]
danshultz has joined #ruby
<banisterfiend>
end_guy loop { p eval(gets).inspect }
<banisterfiend>
but i think we're talking at cross purposes some how
larissa has joined #ruby
xeon_ has joined #ruby
ph8 has joined #ruby
svector has quit [Max SendQ exceeded]
<banisterfiend>
you're right it changes self from the surrounding scope, but it doesn't change self from the receiver
xeon_ has quit [Max SendQ exceeded]
<workmad3>
banisterfiend: yeah, it changes self from the surrounding scope to the receiver (of instance_eval) :)
xeon_ has joined #ruby
xeon_ has quit [Max SendQ exceeded]
mikepack has joined #ruby
xeon_ has joined #ruby
<banisterfiend>
in this case he should be using class_eval, rather than instance_eval too
zoee has quit [Quit: zoee]
<banisterfiend>
or just use your define_method trick
<workmad3>
banisterfiend: however, I think you may be right in that 'def response(responding_obj = self, options)' may be correct
ph8 has quit [Max SendQ exceeded]
coderhs has quit [Quit: Leaving]
xeon_ has quit [Max SendQ exceeded]
danshultz has joined #ruby
xeon_ has joined #ruby
<banisterfiend>
yeah either: send(:define_method) or class_eval { def response.. }
dkamioka has joined #ruby
mikepack has quit [Remote host closed the connection]
<workmad3>
end_guy: so, it's entirely possible that you can drop that included hook and just do 'def response(responding_obj = self, options={}); ...; end' in your module there ;)
aapzak has quit [Ping timeout: 245 seconds]
dkamioka has quit [Remote host closed the connection]
dkamioka has joined #ruby
hiroyuki has joined #ruby
mikepack has joined #ruby
kil0byte has quit [Remote host closed the connection]
<banisterfiend>
end_guy well that's equivalent to your last code sample :)
<end_guy>
that's what I thought...
<andrewvos>
it still has an eval in there
<andrewvos>
/captain obvious
* andrewvos
slinks back into the shadows
<end_guy>
thanks, andrewvos :)
<Hanmac>
hm the bad thing is that neigher class_eval nor instance_eval can add a class to an singleton_class :( ... you need class << self on the object, you cant use the #singleton_class method for that
failshell has quit []
<end_guy>
banisterfiend: you mentioned I should use class eval?
ananthakumaran has joined #ruby
snovak_ has quit [Remote host closed the connection]
tonni has joined #ruby
blackmesa has joined #ruby
<end_guy>
Hanmac: well I'm not trying to add a class, just define a method in a class instance
<banisterfiend>
end_guy well it makes more sense to use class_eval than instance_eval, but as to whether you should be using any of the *_evals is another issue
baroquebobcat has joined #ruby
momomomomo has joined #ruby
lmickh has quit [Quit: lmickh]
gja has joined #ruby
snovak_ has joined #ruby
burlyscudd has quit [Quit: Leaving.]
danshultz has quit [Remote host closed the connection]
aapzak has quit [Ping timeout: 265 seconds]
Liquid-- has joined #ruby
<workmad3>
Hanmac: class_eval and instance_eval don't touch Module.nesting :)
danshultz has joined #ruby
<banisterfiend>
Hanmac what do u mean by "bad thing is that neigher class_eval nor instance_eval can add a class to an singleton_class"
aapzak has joined #ruby
maycon has joined #ruby
maycon has joined #ruby
maycon has quit [Changing host]
danshultz has quit [Read error: Connection reset by peer]
<workmad3>
>> class << Object; class Foobar; end; end; Object.singleton_class::Foobar
<Methylated>
What's the best way to go about refactoring this?
breakingthings has quit [Ping timeout: 245 seconds]
<Methylated>
another thing: I cannot run it
TheMoonMaster has quit [Excess Flood]
<dkamioka>
Methylated: by refactor, what do you mean? Make it run as it is, or migrate to rails or something like that?
breakingthings has joined #ruby
<Methylated>
well I need to encapsulate it in a "main" method in a class, remove dependence on global variables, and be able to extend this class to add method hooks
endash has joined #ruby
ewnd9_ has joined #ruby
wald0 has joined #ruby
tagrudev has quit [Remote host closed the connection]
newbiehacker_ has joined #ruby
<wald0>
if i do dirp = Dir.open("."), why i need to dirp.close later?
TheMoonMaster has joined #ruby
newbiehacker has quit [Read error: Connection reset by peer]
<Methylated>
dkamioka: also, there are many comments, I'd like to create a doc from these comments but they are arbitrary (not rdoc, yard, etc)
<Methylated>
What solutions are available for this?
lmickh has joined #ruby
<dkamioka>
... so you intend to stick with the legacy code?
terrellt has quit [Ping timeout: 272 seconds]
s_e has quit [Excess Flood]
<bean>
wald0: so you dont leave file descriptors sitting around :)
pyrac has quit [Quit: pyrac]
s_e has joined #ruby
jonathanwallace has quit [Ping timeout: 272 seconds]
<wald0>
bean: mmh, like a c pointer? i think that i dont have read about this yet in my ruby books
shaunbaker has quit [Read error: Connection reset by peer]
<andrewvos>
It's not ruby
<andrewvos>
It's the file system
<bean>
that
<dkamioka>
Methylated: well I dont know any solution of legacy code managing...
<Methylated>
dkamioka: the legacy code is being rewritten from scratch but it wont be done until next week. right now we just need to benchmark this monster
Czupa has quit [Remote host closed the connection]
rahulkmr has joined #ruby
<Methylated>
basically I want to add a before/after benchmark hook to every one of these hundreds of methods
Czupa has joined #ruby
pyrac has joined #ruby
Ox6abe has joined #ruby
<wald0>
mmh, im trying to switch from bash, in bash you dont need to close it
cads has quit [Ping timeout: 245 seconds]
<dkamioka>
I'd recommend exactly that, re-write everything. But first thing, I'd try to re-write the tests in a way that it could validate the new code.
bricker`LA has joined #ruby
<dkamioka>
Methylated: as in ruby, I'd recommend rspec, if it's a more abstract or top level test cucumber with capybara (as you said it's a web app)
jonathanwallace has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
<dkamioka>
cucumber+capybara is a nice way to make functional/product test. not unit tests...
<Methylated>
dkamioka: the tests are laughable. It's a perl app written in Ruby.. regex, $ vars …
shaunbaker has joined #ruby
<Methylated>
the new stack is using cuke/capybara/rspec
ph8 has joined #ruby
interactionjaxsn has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
maycon has quit [Read error: Connection reset by peer]
iamjarvo_ has quit [Ping timeout: 272 seconds]
<wald0>
so how i can know when i need to close things?
interactionjaxsn has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
cads has joined #ruby
wildroman has quit [Remote host closed the connection]
mneorr has joined #ruby
<bean>
wald0: if you .open a File (dir, etc) you should close it. Chances are that the GC will cover it for you but you dont want to run into a situation where your user can't ipen any more FDs
wildroman has joined #ruby
<dkamioka>
Methylated: well, sorry i think I can't be of much help other than this tips...
lotherk has joined #ruby
<bean>
open*
xk_id has joined #ruby
<wald0>
i see
<dkamioka>
Methylated: I think it's a case of more elbow grease than a "methodology", or "solution"...
<wald0>
how i can know then if my script has "garbage" that i have not closed correctly?
<Methylated>
dkamioka: it's alright, thanks. I just wanted to avoid doing it the hard way since this is being thrown out. http://ghendry.net/refactor.html is good enough. I was hoping for an analysis tool or some sort of shortcuts
maycon has joined #ruby
maycon has quit [Changing host]
maycon has joined #ruby
<shevy>
wald0 dont think there is an easy way to check this. there is the GC module though
ph8 has quit [Max SendQ exceeded]
jonathanwallace has quit [Ping timeout: 240 seconds]
Voodoofish430 has joined #ruby
<shevy>
wald0 File.open accepts a block, if you use the block form, you never have to apply .close again
mary5030 has quit [Ping timeout: 248 seconds]
camilasan has quit [Remote host closed the connection]
OdNairy has quit [Read error: Connection reset by peer]
<wald0>
andrewvos: thx, sandwitch reading was informative :), "ensure" looks very nice, i like ruby because i think that my code can be readed and modified by humans lol
<shevy>
olivier_bK when does this error happen?
<shevy>
I mean, in seconds
<wald0>
bean: ruby shell? mmh, could be nice if i use that instead of bash, just to be familiarized
<bean>
wald0: i mean, pry and irb do exist.
<wald0>
i think that i learned bash because i used the terminal (than reading how to programm it) lol
<bean>
they're more of a REPL though
jbpros has quit [Quit: jbpros]
theoretick has joined #ruby
<wald0>
shevy: bad option why ? well maybe i would need to play with Dir.chdir for some time to learn/assimilate a bit of ruby code in my head :)
<olivier_bK>
shevy, this error happend when i execute the script
<shevy>
wald0 not bad option... but my example does not work :(
<shevy>
alias cd Dir.chdir is a syntax error... :(
<eval-in>
shevy => undefined method `chdir' for class `Dir' (NameError) ... (https://eval.in/58038)
<shevy>
hmm no...
<shevy>
this makes me angry
<|jemc|>
olivier_bK: the IRC server wants an ident response
<wald0>
bean: yes, pry is nice, but i dont think that i can use it as a shell system, mmh... or maybe yes ?
<|jemc|>
olivier_bK: I don't remember the exact form of it
tylersmith has quit [Remote host closed the connection]
<bean>
I doubt you can, wald0
<wald0>
chsh pry :)
<|jemc|>
olivier_bK: but it's some string including your nick
kevind_ has joined #ruby
<bean>
I don't know how well a shell written in ruby would work.
pyrac has joined #ruby
<olivier_bK>
|jemc|, okai i going to search thanks
jamblack has left #ruby [#ruby]
<|jemc|>
olivier_bK: good luck
<olivier_bK>
|jemc|, thanks :)
maZtah is now known as maztah
chrisja has joined #ruby
<shevy>
wald0 pry only wants valid ruby code as input, so you would be limited if you want a replacement for bash
maztah is now known as maZtah
srji has quit [Quit: leaving]
<shevy>
like you can do ... sed -bla /something/something/, or that in bash
<shevy>
and it wouldn't be valid in pry or irb
<wald0>
bean: why not ? well, maybe you dont have the full optimization/speed as other shells but could be something really nice for "practice ruby code while you use your shell" :)
<shevy>
or was it awk, I dont remember. those ugly things are so awful...
<shevy>
yah, a hybrid shell would be nice
<|jemc|>
if you want it hybrid, just use backticks to invoke bash
sayan has quit [Read error: Connection reset by peer]
rubyminer has quit [Remote host closed the connection]
<wald0>
shevy: mmh, this makes me think, would be really nice a shell that when you try to use sed (so you type it like unconscious), the shell tells you the "ruby equivalent of sed to use" :)
<|jemc|>
although I don't actually think it would be useful to do so
kevind has quit [Ping timeout: 272 seconds]
kevind_ is now known as kevind
failshell has joined #ruby
<shevy>
wald0 hmm... is possible... but first we'd need to have a project that does this sed->ruby translation
froy has joined #ruby
Authenti1ator is now known as Authenticator
<wald0>
shevy: well, it can be much simpler, something like "the ruby equivalent of sed is gsub, you have also foo and bar, run Xcommand to view the doc of it"
aspires has joined #ruby
nari has joined #ruby
MrZYX|off is now known as MrZYX
sambao21 has quit [Quit: Computer has gone to sleep.]
Liquid-- has joined #ruby
jrhe has joined #ruby
kevinykchan has joined #ruby
snovak_ has quit [Remote host closed the connection]
avril14th has quit [Remote host closed the connection]
JohnBat26 has joined #ruby
<wald0>
i wonder if there's around some article/doc like "from bash to ruby" with a list of equivalent things to use
bartj3 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
derebos has quit [Ping timeout: 260 seconds]
OdNairy has joined #ruby
kpshek has joined #ruby
moted has joined #ruby
ybart has quit [Quit: ybart]
CocoStorm has joined #ruby
sguselnikov has quit [Client Quit]
lfox has quit [Quit: ZZZzzz…]
lfox has joined #ruby
MrZYX is now known as MrZYX|off
polaco_zZz is now known as polaco
nari has quit [Ping timeout: 272 seconds]
spider-mario has quit [Remote host closed the connection]
MrZYX|off is now known as MrZYX
juarlex has quit [Remote host closed the connection]
ybart has joined #ruby
whunt has quit [Write error: Broken pipe]
andikr has joined #ruby
jonr22 has joined #ruby
mneorr has joined #ruby
deegen has joined #ruby
<Morrolan>
wald0: Forget everything you know from Bash, and start with a Ruby tutorial? :P
CocoStorm has left #ruby [#ruby]
<wald0>
yuck, i would like to have printed the pixaxe book but is 50 bucks :/
caitp has joined #ruby
ace has quit [Ping timeout: 250 seconds]
<wald0>
Morrolan: well, this is good and bad, i have learned a lot of things over the years so its not nice to forget these things, for example, i use a lot of variable="$( command | awk '{print $1}' )", its just like handy and without think for me (since i used it too much)
slash_nick has joined #ruby
drumusician has joined #ruby
RicFlair has joined #ruby
ananthakumaran1 has joined #ruby
<shevy>
gr33n7007h what do you mean with evaluate
burlyscudd has quit [Quit: Leaving.]
ananthakumaran has quit [Read error: Connection reset by peer]
<shevy>
wald0 this is a bit difficult because... do you mean only bash-internal commands, or also external things like sed and awk?
brtdv has quit []
<Morrolan>
That awk command prints the first column, split by whitespace, iirc? Stuff like this is done slightly different in Ruby. You'd call the split method on the string, and then access the first element of the resulting array.
mneorr has quit [Ping timeout: 245 seconds]
<shevy>
hehe
jbpros has joined #ruby
<shevy>
the long explanation is much longer in english than in ruby code :)
<Morrolan>
True. :)
jonr22 has quit [Ping timeout: 268 seconds]
polaco is now known as polaco_zZz
<Morrolan>
And probably less clear. ^.^
mrsolo has quit [Quit: This computer has gone to sleep]
<Morrolan>
That's probably why I'm a coder and not a poet. ;)
lfox has quit [Quit: ZZZzzz…]
aganov has quit [Quit: aganov]
drumsrgr8forn8 has joined #ruby
<havenwood>
Morrolan: Coder poet.
drumsrgr8forn8 has quit [Remote host closed the connection]
drumsrgr8forn8 has joined #ruby
mrsolo has joined #ruby
<havenwood>
reminds me of Black Perl
<havenwood>
"BEFOREHAND: close door, each window & exit; wait until time."
* Morrolan
proceeds to write his code in Limmericks
<havenwood>
wald0: Then with Enumerable and Array you'll have enough to really do some damage. :)
Spami has joined #ruby
kevind has joined #ruby
pyrac has quit [Quit: pyrac]
noname001 has quit [Ping timeout: 272 seconds]
Ripp__ has joined #ruby
<havenwood>
wald0: To get an Array #split a String, and to get back to a String #join the Array.
burlyscudd has joined #ruby
_jery has quit [Ping timeout: 248 seconds]
<gr33n7007h>
shevy, Just test a statement but eval-in responded rather late most probably my connection that is all ;)
kevind_ has joined #ruby
adeponte has joined #ruby
zigomir has quit [Quit: zigomir]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
terrellt has joined #ruby
sambao21 has quit [Read error: Connection reset by peer]
kpshek has quit []
goleldar has joined #ruby
bigkevmcd has quit [Quit: Ex-Chat]
failshe__ has joined #ruby
bigkevmcd has joined #ruby
failshell has quit [Ping timeout: 248 seconds]
mneorr has joined #ruby
maZtah has quit [Remote host closed the connection]
g0bl1n has joined #ruby
kevind has quit [Ping timeout: 272 seconds]
kevind_ is now known as kevind
Clooth has joined #ruby
<wald0>
variable = `command`.split.first heh, sounds simple, by other side i dont like much the `` way of call, i had lots of problems with that in the past on bash, i dont remember what exactly
`Chris` has quit [Read error: Connection reset by peer]
<shevy>
wald0 he just shells out that way
failshe__ is now known as failshell
<shevy>
in bash you could just type: sed, in ruby you would have to do: `sed`
`Chris` has joined #ruby
Es0teric has joined #ruby
<havenwood>
wald0: Similar in looks to bash's backticks, and similar caveats (can't nest em without escaping).
<shevy>
wald0 in theory you could use pure ruby for everything
<shevy>
so, someone replace sed please!!!
sambao21 has joined #ruby
gyzmodo has joined #ruby
zastern has joined #ruby
<wald0>
shevy: yeah, im trying to asimilate that lol
saarinen has joined #ruby
<havenwood>
wald0: But no $() preffered way, back-ticks are all good and you can %x|| if you need to.
<MrZYX>
what can sed do that ruby can't?
burlyscudd has quit [Quit: Leaving.]
p8952 has quit [Ping timeout: 248 seconds]
kirun has quit [Ping timeout: 272 seconds]
<billiam>
run without ruby installed.
<shevy>
hehehe
chihhsin has joined #ruby
<MrZYX>
well, ruby can run without sed installed
<havenwood>
sed can't run without sed installed, at least not unless they've added that feature recently
<havenwood>
>.>
ffranz has quit [Ping timeout: 265 seconds]
<wald0>
havenwood: well, i have read some exacmples about how to run commands in ruby, the optimal way that i have found was popen4 (yes, 4, not less), but by other side is much longer to code than `` lol
aspiers has quit [Ping timeout: 252 seconds]
<havenwood>
wald0: Totally depends what you're doing.
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
momomomomo has joined #ruby
anderson has joined #ruby
kpshek has joined #ruby
<wald0>
havenwood: yeah, why so many popen, idk, i just have see that popen4 is the more complete one (with features that I may need)
<havenwood>
wald0: Think `` for running and returning to parent process with the value, system for returning to parent process with `true` or `false`, exec for not returning to parent process at all just replacing
momomomomo has quit [Client Quit]
<havenwood>
wald0: and yeah, popen or popen4 when you need more
bartj3 has joined #ruby
rickmasta has quit [Quit: Leaving...]
iamjarvo has joined #ruby
pyrac has joined #ruby
p8952 has joined #ruby
hashpuppy has quit [Quit: hashpuppy]
mrsolo has quit [Quit: This computer has gone to sleep]
s_e has quit [Excess Flood]
leonidlm has quit [Ping timeout: 245 seconds]
zastern has quit [Remote host closed the connection]
s_e has joined #ruby
mrsolo has joined #ruby
Monie has joined #ruby
Verbatino has joined #ruby
ninegrid has quit [Ping timeout: 260 seconds]
mrsolo has quit [Client Quit]
<cwong2012>
i have an array hosts[host1, host2, host3], array ports[111, 222, 333]. i want to do a each loop to go thru the hosts list, then i would like to display the port number for that current element, as in ports[0], ports[1], and so on. not sure what the syntax..
nowthatsamatt has joined #ruby
Stygia has quit [Quit: Leaving]
mikepack has quit [Ping timeout: 245 seconds]
ghr has quit [Quit: Computer has gone to sleep.]
mrsolo has joined #ruby
failshell has quit [Remote host closed the connection]
<havenwood>
wald0: I guess IO.open being in core is nice, And then Open3.popen3 in stdlib is honestly the most I've needed, just a require away. I can't remember what exactly the POpen4 gem adds, looks like something about exit statuses.
<havenwood>
ReachingFarr: gem install rake
<havenwood>
or `bundle`
<MrZYX>
cwong2012: where does that data come from? can't you build a hash instead?
<MrZYX>
or an array of two element arrays?
<havenwood>
wald0: Might consider using popen3 and drop a dependency, dunno.
Ripp__ has quit []
<cwong2012>
MrZYX: if its possible i would like to have it in 2 arrays.
zigomir has joined #ruby
<MrZYX>
okay, so the ugly way is to use #each_with_index on one, another option is to #zip them together
gawaine has joined #ruby
<workmad3>
ReachingFarr: oh bleh, how did you install ruby?
<havenwood>
cwong2012: The zip way MrZYX mentioned.
<havenwood>
^
<wald0>
havenwood: i dont remember what makes me research in popen4 that was not in 3 but yeah, maybe exit status (very needed)
sepp2k has quit [Quit: Konversation terminated!]
<havenwood>
wald0: can still get with $:.exitstatus, but yeah maybe popen4 handles it more elegantly
kpshek has quit []
olivier_bK has quit [Ping timeout: 245 seconds]
<havenwood>
$?.exitstatus**
<ReachingFarr>
workmad3: This is on a Fedora 19 machine, so "sudo yum install ruby"
blackmesa has quit [Quit: WeeChat 0.4.2]
<havenwood>
asking $LOAD_PATH for an exitstatus isn't going to work, confused on Perl gibberish ftl :P
lukec has joined #ruby
<havenwood>
$? $? $?
g0bl1n has quit [Quit: g0bl1n]
<wald0>
havenwood: $:.exitstatus? mmh, i think that i still need to read more ruby, btw what book you recommend me ?
fgo_ has joined #ruby
<havenwood>
wald0: for this type stuff, Jesse Storimer
<workmad3>
ReachingFarr: :(
OdNairy has joined #ruby
mary5030 has quit [Remote host closed the connection]
<|jemc|>
ReachingFarr: I'm on Fedora - the distro like many others doesn't keep up quickly with new releases of ruby
<|jemc|>
use rbenv or rvm or somesuch
<|jemc|>
I use rbenv
<havenwood>
Far as i heard, latest Fedora ships with 2.0.0-p247.
<havenwood>
chruby.
mary5030 has joined #ruby
<havenwood>
You guys just aren't using latest Fedora! :P
fgo has quit [Ping timeout: 268 seconds]
<|jemc|>
Fedora 20 isn't released yet
<|jemc|>
afaik
<havenwood>
19
Shidash has quit [Quit: Leaving.]
<havenwood>
has 2.0.0-p247 no?
<havenwood>
latest stable*
lfox has joined #ruby
<workmad3>
|jemc|: the bigger problems I tend to see with package-installed rubies aren't to do with keeping up to date (although there can be a problem there)
<MrZYX>
havenwood: yup
<workmad3>
|jemc|: the problem is that they tend to mangle the hell out of the ruby installs :(
<havenwood>
ReachingFarr: What Ruby do you have? Which gem?: command -v ruby; ruby -v; gem -v
boxmein has quit [Quit: [02:26.00] <Ristovski> mozzarella filofax fadget]
<ReachingFarr>
havenwood: Ruby is 2.0.0-p247
<havenwood>
I think Fedora did a great job, user gem installs, latest Ruby.
<workmad3>
ReachingFarr: the times I've seen that particular thing happen, it's because the system environment was screwed up and the binaries created when installing gems got really messed up paths to the ruby version to use
<shevy>
I wear a shirt wald0
<shevy>
but no trousers when I code
tharindu has joined #ruby
<shevy>
wald0 just taking a stab at the name of the project ;)
<havenwood>
ReachingFarr: They used to ship separate gem back in 1.8 when it didn't come with Ruby.
<workmad3>
ReachingFarr: and it's been a toss-up between it being something messed up by a package installed ruby/rubygems and a system ruby messing up with something like chruby or rvm :)
<shevy>
ruby has so many awful names for projects... "shoes" ... "god" ... "unicorn" ...
DrShoggoth has quit [Remote host closed the connection]
<shevy>
"prawn"
<havenwood>
ReachingFarr: I stick with ruby-install and chruby so I don't have to know these things. :P
Verbatino has quit [Ping timeout: 240 seconds]
arturro has joined #ruby
<havenwood>
ReachingFarr: But you should use a version of RubyGems that is safe to update.
<ReachingFarr>
havenwood: Yeah, it is a separate package.
<havenwood>
ReachingFarr: Whew! I was worried there for a sec. :)
<wald0>
shevy: is a ruby shell! :)
<shevy>
wald0 that code is not easy to understand, there are lots of lambdas
<workmad3>
havenwood: ^^ that's part of what I mean with 'package managers mess it up' :)
<cwong2012>
its super simple but i am new to ruby.
<ReachingFarr>
workmad3: It fails on `gem 'rake, version`. It can successfully find rubygems, but rubygems doesn't appear to be searching the include path correctly.
`Chris` has joined #ruby
<shredding>
havenwood: It extends Array, doesn't array include Enumerable?
<Hanmac>
shredding: what kind of object does accounts return??
<Hanmac>
extending Array itself is a shitty idea ...
<workmad3>
ReachingFarr: yeah... can you gist that file please?
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<wald0>
havenwood: maybe a bit "too focused on unix", im looking to something more global (but not novice) about learning/use ruby for apps, daemons, scripts, etc
<shredding>
hu, havenwood , Hanmac : if i do to_enum() it works!
<shredding>
Somewhat counterintuitive, but okay.
zastern has joined #ruby
<workmad3>
ReachingFarr: and GEM_PATH and GEM_HOME are both set correctly?
krawchyk_ has joined #ruby
<havenwood>
shredding: maybe define #each yourself: loop do; yield pop end
<shredding>
havenwood: what's wrong with to_enum?
<havenwood>
shredding: nothing
<shredding>
:)
barratt has quit [Ping timeout: 248 seconds]
<workmad3>
ReachingFarr: or rather, is GEM_PATH set correctly to both the system and your home gem repo? as iirc, GEM_PATH is the important one when loading gems (GEM_HOME is where gems are installed to, GEM_PATH is where gems are looked for)
<ReachingFarr>
workmad3: I'm beginning to suspect not. What is the distinction between those two?
popl_ is now known as popl
<workmad3>
ReachingFarr: and no, ~/.gem won't be on $:, it never is :)
<havenwood>
ReachingFarr: GEM_PATH is a colon-separated list of gem repository directories and GEM_HOME is the default repository location for gem installation.
<workmad3>
ReachingFarr: rubygems will activate a gem and then add the directories in that gem to $:
ananthakumaran1 has quit [Quit: Leaving.]
<ReachingFarr>
workmad3: Right.
<ReachingFarr>
havenwood: Thanks. Let me see if this fixes things.
rbennacer has joined #ruby
<rbennacer>
hey guys
<rbennacer>
anyone here>
<rbennacer>
?
<workmad3>
rbennacer: nope
krawchyk has quit [Ping timeout: 265 seconds]
sepp2k has joined #ruby
* workmad3
always wonders what answer people expect to that
kevinykchan has quit [Ping timeout: 272 seconds]
axl_ has joined #ruby
<shevy>
42
jlebrech has quit [Quit: Konversation terminated!]
<MrZYX>
23
<shevy>
rbennacer are you using ruby?
<rbennacer>
yesss
<rbennacer>
i love ruby
jlebrech has joined #ruby
kevinykchan has joined #ruby
<havenwood>
ReachingFarr: chruby and its manpage are a nice reference for how to set everything up correctly, even if you don't opt to use chruby: https://github.com/postmodern/chruby#readme
<shevy>
\o/
<shredding>
havenwood: This enumerable module was the point where i fall in love with ruby, so i'll be using to_enum :)
<havenwood>
<3
<ReachingFarr>
OK, fixed.
<ReachingFarr>
It was the mixup between GEM_PATH and GEM_HOME
<shevy>
enumerable is really cool
Lewix has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
<rbennacer>
i was wondering if there is some sort of ruby gem that would help me to extract topics from a tweet
<ReachingFarr>
Oddly, those don't seem to be getting set through .gemrc, or the environment variables are overriding them.
<shevy>
rbennacer sounds a bit specialized. what kind of tweet? twitter?
<rbennacer>
general idea of what the tecxt is about
m8 has joined #ruby
<shevy>
rbennacer, often though when these projects stink, they may still have some useful content, so you could perhaps build your own if these suck
<MrZYX>
the twitter gem is pretty much a one to one API wrapper, last time I checked
<rbennacer>
MrZYX, this is not what i am looking for though
kidoz has joined #ruby
<ReachingFarr>
Thanks for the help everyone. Got to run.
<rbennacer>
i am able to get the tweets and then i want to parse them and extract the topics so i can build a realtime heatmap
<MrZYX>
yeah, I think you want to research general algorithms for that problem first, makes it easier to search for implementations of that algorithms in ruby
<a1ph4g33k>
shevy, as long as it is only 1 char you care about, no.
Verbatino has left #ruby [#ruby]
<a1ph4g33k>
otherwise, the group allows for : /foo( and more|$)/
Xeago has joined #ruby
<havenwood>
next, next, finish :)
<a1ph4g33k>
I'm all 2.0 @ this point.
camilasan has quit []
bassclef has joined #ruby
momomomomo has joined #ruby
<goleldar>
anyone know how to disable cookies in a cucumber test using phantomjs?
c0rn has joined #ruby
<a1ph4g33k>
other than normal pry functionality does the integration with the rails console provide any other benefits ( not that the normal functionality isn't enough ) ... just wanting to know if there are any bonus' features beyond the expected.
sambao21 has quit [Quit: Computer has gone to sleep.]
bassclef is now known as Guest68577
Notte has joined #ruby
<andrewvos>
Given a path /one/two/three.file how do I safely get /two/three.file?
<shevy>
I did hear the word greedy quite often, but that is one of the few times I actually read about a lazy regex :)
<andrewvos>
Seems to have the codez
osvico has quit [Ping timeout: 262 seconds]
<shevy>
thanks, the regex seems to work now finally
<shevy>
how or where did you guys learn about regexes?
sambao21 has joined #ruby
<MrZYX>
the internet :P
cina has joined #ruby
<a1ph4g33k>
lots of study.
<a1ph4g33k>
... and I don't believe lazy is the correct term ...
DonRichie has quit [Quit: Verlassend]
<a1ph4g33k>
but ... after checking ... I'm wrong.
<shevy>
MrZYX really?
<MrZYX>
yeah
<shevy>
hmm... I read a perl book once... but never finished... like 10 years ago. I feel as if I need to read something again, I struggle way too much :(
<a1ph4g33k>
I've also heard reluctant and sadly "ungreedy"
<MrZYX>
I think it helps to read through a sort of reference a few times, like http://www.regular-expressions.info, so you have an idea of what's there and then come back to it with actual problems you need to solve
arietis has quit [Quit: Computer has gone to sleep.]
<a1ph4g33k>
shevy, a copy of "Mastering Regular Expressions" can take you a long way.
<dorei>
aint regexes equivelant with deterministic automata?
jkline has quit [Quit: jkline]
<a1ph4g33k>
many regex engines use finite automata.
ahawkins has joined #ruby
troessner has quit [Quit: Leaving]
noop has joined #ruby
gchristensen has joined #ruby
carraroj has quit [Ping timeout: 240 seconds]
<a1ph4g33k>
brb
a1ph4g33k has quit [Quit: Leaving]
ph8 has joined #ruby
dkamioka has quit [Ping timeout: 240 seconds]
geekbri has quit [Remote host closed the connection]
iamjarvo_ has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
arietis has joined #ruby
interactionjaxsn has joined #ruby
endash has quit [Quit: endash]
dkamioka has joined #ruby
<havenwood>
>> class File; def self.container filename; basename, dirname = File.split(filename); File.join(File.split(basename).last, dirname) end end; File.container "/one/two/three.file"
<apeiros>
I'd love to say "you learn that stuff when you have to process thousands of filenames and need it FAST" - but tbh I'm just lazy and that's the shortest code I could come up with in a reasonable time :D
jonahR has quit [Client Quit]
Senjai has joined #ruby
Senjai has quit [Changing host]
Senjai has joined #ruby
brennanMKE has quit [Remote host closed the connection]
<shevy>
hmm with .include? we can check on a string for one argument, like '[', but is there a simple way to check a string for containing both two characters at the same time, '[' and ']' (closing tag for '['? I could use two separate .include? but that feels a bit cumbersome
jonr22 has joined #ruby
goleldar has quit []
carraroj has joined #ruby
tylersmith has quit [Remote host closed the connection]
snovak_ has quit [Read error: Connection reset by peer]
fgo_ has quit [Remote host closed the connection]
Sauvin has quit [Remote host closed the connection]
snovak has joined #ruby
Lewix has quit [Remote host closed the connection]
failshell has joined #ruby
<shevy>
hehe
<shevy>
I used to patch everything like that
<shevy>
but when distributing to others, it becomes annoying to have to ensure that they also have all my modifications :(
zeropx has quit [Quit: has left the room … Or did he?]
<havenwood>
refinements ftw?
<banisterfiend>
shevy can i beat u around a bit
<banisterfiend>
just a lil
snovak_ has joined #ruby
zeropx has joined #ruby
<shevy>
I still have not truly understood refinements
aspires has quit [Quit: sudo making a sandwich]
<banisterfiend>
they are a bit confusing
IceDragon has quit [Ping timeout: 240 seconds]
<banisterfiend>
so is 'prepend' though
caitp has left #ruby ["Leaving"]
<havenwood>
shevy: think a locally scoped monkeypatch, just applies in the module within the file it is actually in
failshell has quit [Remote host closed the connection]
failshell has joined #ruby
<havenwood>
shevy: they change in 2.1 a bit, in a somewhat annoying way, as for the moment they don't work in top level
axl_ has quit [Quit: axl_]
klaus_ has quit [Quit: Verlassend]
<banisterfiend>
havenwood what happens if you refine 'string' within a file, and then pass out that string to another method (defined in another file), i guess those refinements no longer apply?
<banisterfiend>
so the same object behaves differently in two different contexts?
<havenwood>
banisterfiend: yup, doesn't apply at all
mary5030 has joined #ruby
<havenwood>
i want it back on top level
wildroman has quit []
<havenwood>
don't make me go inside modules for include and using to work!!
ephemerian has quit [Quit: Leaving.]
mary5030 has quit [Remote host closed the connection]
axl_ has joined #ruby
snovak has quit [Ping timeout: 272 seconds]
kevind has joined #ruby
mary5030 has joined #ruby
tatsuya_o has joined #ruby
pr0ggie has joined #ruby
pdimitrov has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
<havenwood>
now if someone would fix `using` to work likewise...
<havenwood>
i need to learn C better (read 'at all')
pyrac has quit [Quit: pyrac]
<banisterfiend>
havenwood so
<banisterfiend>
havenwood if i pass a string created elsewhere into a module defined in a file that has a refined String class, then methods appear miraculously on the passed-in string?
<havenwood>
sec phone, i need whole brain to try to think about this lol - back in a min
Lewix has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
brennanMKE has joined #ruby
rahulkmr has quit [Ping timeout: 265 seconds]
Lewix has quit [Remote host closed the connection]
<shevy>
hehe
Al_ has quit [Quit: Al_]
Tamae has quit [Ping timeout: 248 seconds]
felixjet has quit [Read error: Connection reset by peer]
pyrac has joined #ruby
einarj has joined #ruby
tharindu has quit [Quit: Leaving...]
achru has quit [Remote host closed the connection]
barratt has quit [Quit: Leaving...]
achru has joined #ruby
habanany has quit [Ping timeout: 240 seconds]
kleinerdrache has quit [Read error: No route to host]
anderson has quit [Ping timeout: 240 seconds]
mengu has quit [Remote host closed the connection]
IceDragon has joined #ruby
dkamioka has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
achru has quit [Read error: Operation timed out]
dkamioka has joined #ruby
awc737 has quit [Excess Flood]
kleinerdrache has joined #ruby
zeade has quit [Quit: Leaving.]
awc737 has joined #ruby
einarj has quit [Ping timeout: 272 seconds]
Karpuragauram has joined #ruby
hiyosi has quit [Ping timeout: 245 seconds]
zeade has joined #ruby
blaxter_ has quit [Quit: foo]
blackratdog has joined #ruby
chrisja has quit [Quit: leaving]
rdark has quit [Quit: leaving]
a1ph4g33k has joined #ruby
mengu has quit [Ping timeout: 256 seconds]
snovak_ has quit [Remote host closed the connection]
snovak has joined #ruby
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
bartj3 has quit [Quit: quit]
ybart has quit [Quit: ybart]
rahulkmr has joined #ruby
pyrac has quit [Quit: pyrac]
denken has quit [Quit: leaving]
bartj3 has joined #ruby
Karpuragauram has quit [Quit: Ex-Chat]
Vivekananda has quit [Quit: Ex-Chat]
Vivekananda has joined #ruby
kleinerdrache has quit [Read error: Operation timed out]
soheil has quit [Remote host closed the connection]
Liquid-- has quit [Ping timeout: 272 seconds]
soheil has joined #ruby
bartj3 has quit [Client Quit]
pyrac has joined #ruby
brtdv has quit []
bartj3 has joined #ruby
Vivekananda is now known as helloWorld
Ox6abe has quit [Remote host closed the connection]
helloWorld is now known as VivekanandaIndia
Ox6abe has joined #ruby
VivekanandaIndia is now known as Vivekananda
soheil has quit [Read error: Connection reset by peer]
soheil has joined #ruby
jkline has quit [Quit: jkline]
danshultz has quit [Remote host closed the connection]
goleldar has joined #ruby
danshultz has joined #ruby
burlyscudd has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
gyzmodo has quit [Remote host closed the connection]
carif has quit [Ping timeout: 272 seconds]
danshultz has joined #ruby
bartj3 has quit [Client Quit]
c0rn has quit [Quit: Computer has gone to sleep.]
Ox6abe has quit [Ping timeout: 241 seconds]
<ageis>
can someone look at my mkmf.log and tell me why nokogiri is not building
sambao21 has quit [Quit: Computer has gone to sleep.]
bartj3 has joined #ruby
<|jemc|>
not if you don't post it somewhere for us to see
<popl>
^
kleinerdrache has joined #ruby
<popl>
well unless he gives someone remote access to his machine
<|jemc|>
I don't work at the NSA, so I don't
mlpinit has quit [Remote host closed the connection]
<Hanmac>
ageis: did you have ruby-full package installed? and also make? (you also need C and maybe C++ compiler)
sambao21 has joined #ruby
Papipo has quit [Quit: Leaving.]
<popl>
ageis: There's a pastebin URL in the topic. :)
yfeldblum has joined #ruby
<Hanmac>
popl: wrong its a gist URL ;P
bartj3 has quit [Client Quit]
brennanMKE has quit [Remote host closed the connection]
<havenwood>
banisterfiend: they've gone and confused the bejesus out of me with 2.1. :P I need to forget what i know and start over, lol.
yfeldblum has quit [Remote host closed the connection]
burlyscudd has quit [Ping timeout: 260 seconds]
brennanMKE has joined #ruby
<popl>
Hanmac: I typed pastebin, not Pastebin.
mrsolo has quit [Quit: This computer has gone to sleep]
sambao21 has quit [Client Quit]
<Senjai>
What should I set my max line length in my editor too again? Isn't the standard 80 characters?
<Senjai>
iirc
<popl>
there is no standard
<|jemc|>
80 is most common
<ageis>
Hanmac: got all that mang. I've don this before. I'm downright perplexed. Will paste.
<havenwood>
banisterfiend: at least they've already updated the documentation, i have a place to start :)
<jblack>
Yeah, 80 is very common.
<a1ph4g33k>
Senjai, the "standard" was defined when we were all using text terminals that were 80x25 ...
<havenwood>
banisterfiend: " if you require or load a file or call a method that is defined outside the current scope the refinement will be deactivated"
<|jemc|>
havenwood: ugh, I looked at refinements, thought they were cool at first, then started to think they were a bad idea
<Senjai>
a1ph4g33k: right, but it's still a best practice isn't it
<a1ph4g33k>
many people try to still adhere to it, but it is an artifact of a time long ago.
bartj3 has joined #ruby
<|jemc|>
havenwood: but maybe my opinion will flip again
<a1ph4g33k>
whatever your team wants to be the standard is best practice.
<havenwood>
|jemc|: I think it is great, personally. I mean I don't have to implement it, so as just a lazy user i'm thrilled. :P
<|jemc|>
the scoping of it throws me for a loop
<jblack>
senjai: It's generally a good practice to keep your line complexity down, and that implies shorter lines.
<havenwood>
|jemc|: i like the lexical scoping, while refined it is your thing, leave the class or even file, poof gone
tonni has joined #ruby
felixjet has joined #ruby
aspires has quit [Quit: sudo making a sandwich]
<|jemc|>
I'm probably just being crochety
<|jemc|>
need to give it a third look
mlpinit has joined #ruby
bartj3 has quit [Client Quit]
magbeat has joined #ruby
<havenwood>
i like giving myself sugar without worrying about trampling, would be like if we'd never had local variables and they just got introduced :P
<jblack>
Who wants to parse a 180 character line of code. The code would likely be more clear if it were moved into a descriptive subruotine
<popl>
jblack: some people use large monitors in conjunction with higher resolutions.
<|jemc|>
havenwood: yeah, I think it's addressing a very real need in Ruby - I can agree there
<a1ph4g33k>
but ... it is very common for folks to use 80. ( for both the "long lines are harder to visualize" and the "some people don't like change" reasons )
<ageis>
Hmac: I don't have ruby-full
<|jemc|>
havenwood: monkey patching has some terrible consequences sometimes
<Senjai>
I remember reading somewhere that line-lenghth also reduces stress for readers at the 80 - 120 character level
pyrac has quit [Quit: pyrac]
<|jemc|>
havenwood: so have they nailed down the implementation of it yet, or is it still up in the air?
<ageis>
Hmac: installed ruby-full, still same problem
<Hanmac>
ageis: hm did you try nokogiri version 1.6.0 ?
<havenwood>
|jemc|: yeah, nailed down, at least dropped the experimental bit
<|jemc|>
havenwood: I thought I read that it was probably going to be different in the final release of 2.1
<|jemc|>
havenwood: ah okay
<ageis>
Hanmac: i suspect it's my gcc version
goleldar has quit [Remote host closed the connection]
<popl>
ageis: "You have to install development tools first."
<|jemc|>
havenwood: well, then it sounds like I need to go back to it then
<ageis>
Hanmac: will now
<ageis>
popl: everything is installed, trust me
<ageis>
all ibraries, dependencies
<jblack>
popl: I'm not even considering linewrapping. I'm thinking simple code complexity. if (this and that and theother and somelong_thing_here and hash[:this][:that] is far less readable than verify_valid(state)
<ageis>
been over that
goleldar has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
aspires has joined #ruby
shredding has quit [Quit: shredding]
<Hanmac>
ageis, hm yeah that maybe too ... i mean why is your GCC version only 4.4.7 ?
<jblack>
I'm sure there's plenty of occasions where a long line is the most readable code, but as a rule of thumb, short is sweet
<popl>
ageis: That phrase is silly. :P
<ageis>
hanmac: I'm on a mixed- squeeze/wheezy system here, that's why I think this is happening. some of the shit got installed with the old gcc, and now its getting mixed w the new
<|jemc|>
I like 80 columns, it fits just about right with two panes on my portrait mode display
<jblack>
A line that is 200 characters long is trying to do more than one thing at once, and that's definitely a code smell.
<ageis>
nokogiri 1.6.0 is compiling right now though
<havenwood>
|jemc|: everyone says monkey-patching has terrible consequences sometimes but i've never seen the mayhem happen, i wish people would monkeypatch more until i get to see it
bartj3 has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
<popl>
We were not talking about lines that long were we?
<popl>
Oh, 180 character. I see.
bartj3 has quit [Client Quit]
mrapple is now known as MonsieurApple
<popl>
Were we counting whitespace? :P
<Hanmac>
ageis: i upated my os on saucy ... it is fun .. you should test newer software if possible
<havenwood>
|jemc|: nnoooooess, i'm already overriding Array.split, you too?! chaos!!!
goleldar has quit [Read error: No route to host]
<jblack>
I made up 180 characters arbitrarily too. I was picking something "long". I suppose 83 characters is > 80 as well, and if 80 is good, then surely 83 is ok too....
<ageis>
Hanmac: sucks because the server needs to be spec'd to host websites that depend on PHP 5.3
<|jemc|>
havenwood: I think ruby is in need of a standard way to override a function while still calling the old one within - the current "standard" of aliasing it to some unique name before overriding is too clumsy
<jblack>
for what it's worth, my console is 80 characters to this day. =)
weirdpercent has joined #ruby
<popl>
I have colorcolumn=81 in ~/.vimrc
baordog_ has joined #ruby
goleldar has joined #ruby
<havenwood>
|jemc|: hmm
<popl>
I'm old, though.
<a1ph4g33k>
... I tend to use very small fonts on screen ... so 80 chars some times feels about as wide as most people keep their IM buddy list ...
<Hanmac>
ageis: be happy its not php4 ;D
<a1ph4g33k>
but I have my "warning" line @ 79 chars because 80 is the team standard here too.
rbennacer has left #ruby ["Leaving"]
<|jemc|>
havenwood: it'd be great to be able to just override, and then call something like "super" within
shredding has joined #ruby
<|jemc|>
havenwood: but not "super"
bartj3 has joined #ruby
<|jemc|>
havenwood: otherwise, you have to worry about uniqueness of your alias name
<banisterfiend>
havenwood how does it work in an instance_eval
efrainolivares has joined #ruby
<ageis>
ok 1.6.0 success
<jblack>
I prefer lines less than 40 characters as a rule of thumb
hiyosi has joined #ruby
jibi has joined #ruby
<ageis>
but <1.6.0 is whats demanded by my Gemfile
<weirdpercent>
I'm getting an error when starting any of the ruby webservers (rack, thin, unicorn) htts://gist.github.com/weirdpercent/7202891
<|jemc|>
havenwood: you can also capture the Method object before overriding, but you have to store that object with some name too
<|jemc|>
havenwood: so that name has to be unique as well
<ageis>
just edited and did bundle update hope that will work out
kevinykchan has quit [Quit: Computer has gone to sleep.]
mityaz has joined #ruby
<Hanmac>
ageis: it should work too... the big difference is that nokogiri 1.6 ships with own xml lib ... so it does not access your system libs if not wanted
<|jemc|>
havenwood: and by unique, I mean something that no other programmer that comes after you will pick, so aliasing :foo with :_old_foo doesn't cut it
<|jemc|>
havenwood: it has to be something like :_old_foo_replaced_by_{my_gem}
Xeago has joined #ruby
Metal_01 has joined #ruby
lachesis has joined #ruby
<|jemc|>
havenwood: it'd be super cool if ruby just tracked the whole definition history by itself, so that earlier definitions could be called from within the new ones
<banisterfiend>
|jemc| you have something against that?
<havenwood>
banisterfiend: best i can get from the docs :P You may activate refinements in a string passed to Kernel#eval that is evaluated at top-level. Refinements are active until the end of the file or the end of the eval string, respectively.
<weirdpercent>
lachesis: ruby supports closures using proc and lambda
<havenwood>
^ forgot quotes
rahulkmr has quit [Read error: Connection reset by peer]
<banisterfiend>
|jemc| i typically define a decorator that manages all that complexity for me
yacks has joined #ruby
<|jemc|>
banisterfiend: yeah, that's pretty much what I've been using lately
`Chris` has quit [Read error: Connection reset by peer]
raphaelivan has joined #ruby
astrobunny has joined #ruby
`Chris` has joined #ruby
iamjarvo has joined #ruby
pixelgremlins has joined #ruby
ravster has joined #ruby
danshultz has quit [Remote host closed the connection]
jayne_ is now known as jayne
aspires has quit [Quit: sudo making a sandwich]
danshultz has joined #ruby
ehaliewicz has joined #ruby
lfox has joined #ruby
burlyscudd has quit [Ping timeout: 240 seconds]
nixterrimus has joined #ruby
<a1ph4g33k>
... I know I asked this recently .. but in documentation ... Foo#bar <- Instance Method ? and Foo.bar <- Class Method ?
<Banistergalaxy>
Yes
<a1ph4g33k>
thanks again.
alex__c2022 has joined #ruby
kevinykchan has joined #ruby
<Hanmac>
a1ph4g33k: PS: Foo.bar may be ambigous ... Foo::bar is better
havenwood has joined #ruby
<Banistergalaxy>
Don't believe hanmac
<a1ph4g33k>
heh.
<a1ph4g33k>
I thought :: was inheritance ... as in Module::Class.method
<Banistergalaxy>
:: should only be used for constants
<Banistergalaxy>
;)
<Banistergalaxy>
:: is more ambiguous
<Hanmac>
ask ri ... File.size shows both methods
danshultz has quit [Ping timeout: 272 seconds]
axl_ has quit [Quit: axl_]
cody-- has quit [Quit: derp]
<Hanmac>
File::size shows only the class method, and File#size shows only the instance method
<|jemc|>
I thought they were trying to phase out Foo::bar for methods - it definitely seems more ambiguous than Foo.bar
anderson has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
achru has joined #ruby
ebetancourt has joined #ruby
jrhe has quit [Quit: jrhe]
slash_nick has quit [Ping timeout: 252 seconds]
<Hanmac>
|jemc|: it could be worse.. "[Array]" is the constant, "[Array(obj)]" is a method "[Array obj]" is a method too "[Array,obj]" is a constant again
drag00n has quit [Ping timeout: 246 seconds]
vpretzel has quit [Remote host closed the connection]
tonni has quit [Ping timeout: 246 seconds]
slash_nick has joined #ruby
vpretzel has joined #ruby
tonni has joined #ruby
`Chris` has quit [Read error: No route to host]
jonr22 has joined #ruby
coderhs has joined #ruby
`Chris` has joined #ruby
mengu has joined #ruby
ewnd9_ has quit [Remote host closed the connection]
mrsolo has joined #ruby
wak3r has quit [Ping timeout: 272 seconds]
alex__c2022 has quit [Quit: alex__c2022]
timonv has quit [Ping timeout: 272 seconds]
ldnunes has quit [Quit: Leaving]
nucatus has joined #ruby
nucatus has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
nucatus has joined #ruby
hiyosi has joined #ruby
lmadrigal has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
vpretzel has quit [Ping timeout: 265 seconds]
jonr22 has quit [Ping timeout: 265 seconds]
krawchyk_ has quit []
Jabberish has joined #ruby
amacgregor has joined #ruby
alex__c2022 has joined #ruby
dabos has joined #ruby
alex__c2022 has quit [Client Quit]
jzinedine has joined #ruby
wak3r has joined #ruby
alex__c2022 has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
jzinedine has quit [Client Quit]
Uranio has quit [Quit: while you reading this, a kitty dies]
atmosx has quit [Quit: Lost in trance]
jroes has joined #ruby
jrhe has joined #ruby
`Chris` has quit [Read error: Connection reset by peer]
hiyosi has quit [Ping timeout: 272 seconds]
jeer_ has joined #ruby
jeer_ has quit [Client Quit]
jzinedin_ has joined #ruby
<jroes>
running a long-running import script and I'm watching the available memory on the server slowly creep toward OOM-land. is there anything I can do to prod the running ruby process and free up some space?
vpretzel has joined #ruby
Notte has joined #ruby
`Chris` has joined #ruby
<jroes>
pretty sure it doesn't need 7gb of memory
jzinedin_ has quit [Client Quit]
vpretzel has quit [Remote host closed the connection]
sbos99 has quit [Ping timeout: 264 seconds]
vpretzel has joined #ruby
soheil has quit [Remote host closed the connection]
<|jemc|>
GC should have triggered by now. you should make sure you let unused objects go out of scope
<|jemc|>
that is, make sure nothing holds a reference to them anymore
soheil has joined #ruby
<|jemc|>
GC will never deallocate an object if something is still holding a reference to it
bricker`1ork has joined #ruby
<|jemc|>
keep closures and such in mind as well - closures can hold onto objects that should by other accounts be dead
c0rn has joined #ruby
vpretzel has quit [Ping timeout: 265 seconds]
bricker`work has quit [Ping timeout: 260 seconds]
randomnick_ has quit [Ping timeout: 248 seconds]
randomnick_ has joined #ruby
mklappstuhl has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
soheil has quit [Ping timeout: 265 seconds]
noop is now known as noopq
nutella has joined #ruby
nutella is now known as Guest37413
Astral_ has quit [Ping timeout: 240 seconds]
iamjarvo has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
apeiros has joined #ruby
`Chris`_ has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
`Chris` has quit [Ping timeout: 240 seconds]
nfk has quit [Quit: yawn]
Alina-malina has joined #ruby
cpruitt has joined #ruby
ephemerian has joined #ruby
lsmola has quit [Ping timeout: 272 seconds]
amacgregor has quit [Ping timeout: 246 seconds]
mrsolo has joined #ruby
bricker`1ork is now known as bricker
jzinedine has joined #ruby
nixterrimus has left #ruby [#ruby]
tspike has joined #ruby
nism-pi has quit [Remote host closed the connection]
soheil has joined #ruby
Jabberish has quit [Remote host closed the connection]
Guest37413 has quit [Ping timeout: 260 seconds]
shredding has quit [Quit: shredding]
aspires has joined #ruby
mark_locklear has quit [Ping timeout: 265 seconds]
nixterrimus has joined #ruby
shredding has joined #ruby
mikepack has quit [Ping timeout: 272 seconds]
soheil has quit [Remote host closed the connection]
<shevy>
Hanmac I am bored
lsmola has joined #ruby
<Hanmac>
download a big lib and compile something ;P
geekbri has quit [Remote host closed the connection]
rezzack1 has quit [Quit: Leaving.]
jzinedine has left #ruby [#ruby]
rezzack has joined #ruby
soheil has joined #ruby
mary5030 has quit [Remote host closed the connection]
Jabberish has joined #ruby
mary5030 has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
Ox6abe has joined #ruby
Dave has joined #ruby
Methylated1 has joined #ruby
nutella_ has joined #ruby
Dave is now known as Guest92620
achru has quit []
Naoe-Kanno has joined #ruby
<ShellFu>
Hey all. I need some assistance simplifying this method. I have way to many if/then/else going on, and im not sure how to clean it up. >http://pastebin.com/QkaE7NRz<
chvnx has joined #ruby
<ShellFu>
Ive been messing around with a recursive method to try and replace it, but I havent achieved the desired result
moted_ has joined #ruby
<chvnx>
I want to start learning ruby. I know some python 2 and 3, a bit of perl, and know my way around bash and other shell scripting languages. Where should I begin with ruby? does anyone have suggestions for tutorials or books?
noopq has quit [Ping timeout: 260 seconds]
<chvnx>
Also comfortable wrting lua, if that matters.
magbeat_ has joined #ruby
spike|spiegel| has joined #ruby
<ShellFu>
chvnx, Solve a problem you would normally solve with bash. That would get your feet wet at least.
SHyx0rmZ has quit [Ping timeout: 246 seconds]
pothibo has quit [Ping timeout: 246 seconds]
spike|spiegel has quit [Ping timeout: 246 seconds]
magbeat has quit [Ping timeout: 246 seconds]
jhaals has joined #ruby
mrsolo_ has joined #ruby
moted has quit [Ping timeout: 246 seconds]
dangerousdave has quit [Ping timeout: 246 seconds]
Methylated has quit [Ping timeout: 246 seconds]
moted_ is now known as moted
<superscott[8]>
: if i Thread.new a FileUtils.mkdir, would i be saving any time? or since i'm only creating one folder, it won't matter.
user258467 has quit [Ping timeout: 246 seconds]
mary5030 has quit [Ping timeout: 256 seconds]
ffranz has quit [Ping timeout: 246 seconds]
user258467 has joined #ruby
<apeiros>
superscott[8]: you're probably wasting time and introducing a race condition
<shevy>
is there any project that generates html tags?
vpretzel has joined #ruby
nutella_ has quit [Ping timeout: 264 seconds]
<shevy>
chvnx if you know perl, ruby is very similar to it but with less line noise. there are some tutorials but honestly, the best is if you just start porting code like shell scripts into ruby and ask lots of questions here.
<superscott[8]>
apeiros: thanks
<shevy>
chvnx this is the best tutorial, work through it even though it is meant for a ruby, afterwards you will know how to use "yield" http://pine.fm/LearnToProgram/?Chapter=01
<Hanmac>
apeiros: hm what about an new extension like rbz or similar for zip/gzip compressed ruby scripts? ;P
<shevy>
*is meant for a newbie
nixterrimus1 has joined #ruby
<shevy>
not for a ruby... I should multitask less :(
`Chris` has joined #ruby
vpretzel_ has joined #ruby
amacgregor has joined #ruby
vpretzel has quit [Read error: Connection reset by peer]
timonv has joined #ruby
<chvnx>
shevy: That's what I had in mind; rewriting a few of my python scripts. However, I want to learn some basic best practices before I jus start putting anything down that will be time consuming.
efrainolivares has quit [Quit: efrainolivares]
Davey has quit [Quit: Computer has gone to sleep.]
<sweeper>
chvnx: make a neat interface to something with rdialog
error404 has joined #ruby
jroes has left #ruby [#ruby]
nixterrimus has quit [Ping timeout: 256 seconds]
`Chris`_ has quit [Ping timeout: 240 seconds]
bricker_ has joined #ruby
bricker_ is now known as bricker`work
<apeiros>
Hanmac: why not just .rb.gz?
bricker has quit [Disconnected by services]
bricker`work is now known as bricker
pkrnj has joined #ruby
<chvnx>
sweeper: thanks for the link.
chvnx has left #ruby ["WeeChat 0.3.8"]
sambao21 has quit [Quit: Computer has gone to sleep.]
classix has quit [Ping timeout: 245 seconds]
motto has joined #ruby
pr0ggie has quit [Ping timeout: 240 seconds]
angusiguess has quit [Ping timeout: 245 seconds]
pdimitrov has quit [Ping timeout: 272 seconds]
Czupa has quit [Quit: Wychodzi]
pr0ggie has joined #ruby
gr33n7007h has quit [Ping timeout: 240 seconds]
pdimitrov has joined #ruby
m8 has quit [Ping timeout: 248 seconds]
<Hanmac>
apeiros: that is possible too, i just thought about rbz as short form
kaspergrubbe has joined #ruby
gr33n7007h has joined #ruby
Zai00 has joined #ruby
mklappstuhl has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
kaldrenon has quit [Remote host closed the connection]
DrCode has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
vpretzel_ has quit [Ping timeout: 265 seconds]
Mitchellvanw has joined #ruby
gr33n7007h has quit [Changing host]
gr33n7007h has joined #ruby
kaldrenon has joined #ruby
c0rn_ has joined #ruby
ffranz has joined #ruby
yfeldblum has joined #ruby
adambeynon has joined #ruby
shredding has quit [Quit: shredding]
aspires has quit [Quit: sudo making a sandwich]
c0rn has quit [Ping timeout: 246 seconds]
Davey has joined #ruby
Tuxist has joined #ruby
tspike has quit [Quit: leaving]
zarubin has joined #ruby
slash_nick has quit [Changing host]
slash_nick has joined #ruby
Xiti` has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
kaldrenon has quit [Ping timeout: 260 seconds]
timonv has joined #ruby
aspires has joined #ruby
butblack has joined #ruby
soheil has quit [Remote host closed the connection]
barratt has joined #ruby
mixel has joined #ruby
sepp2k has quit [Ping timeout: 240 seconds]
erinb has joined #ruby
<sweeper>
apeiros: he eventually wants to progress to gz'd Delphi
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sweeper>
so he can have lots of .dbz files...
zeade has joined #ruby
navyant24 has joined #ruby
timonv has quit [Ping timeout: 264 seconds]
sambao21 has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AlSquire has quit [Quit: This computer has gone to sleep]
elux has quit [Quit: Bye!]
hiyosi has joined #ruby
sepp2k has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
sepp2k has joined #ruby
<a1ph4g33k>
... ugh ... trying to rebind an UnboundMethod object from within a call to define_method ... from within a call to instance_eval ...
<a1ph4g33k>
any ideas ?
<a1ph4g33k>
( alternatively ... trying to do the same within a call to class_eval ) ...
blueOxigen has quit [Ping timeout: 268 seconds]
<|jemc|>
what's your problem?
navyant24 has quit [Quit: navyant24]
<|jemc|>
or rather, I should say: put what you have so far in a pastebin
heidi_ramen is now known as heidi
<a1ph4g33k>
... I am having trouble with the nested nature of calling define_method within instance_eval ...
hiyosi has quit [Read error: Operation timed out]
kleinerdrache has quit [Read error: No route to host]
<|jemc|>
yeah, just show me what you have so far
aspires has quit [Quit: sudo making a sandwich]
astrobunny has quit [Ping timeout: 272 seconds]
<a1ph4g33k>
can't really ... it's the last hiccup in a submission I need to provide along with my CV ...
<a1ph4g33k>
I will keep working on it...
<|jemc|>
so are you trying to define the method for just a single instance of the object?
<sweeper>
that's pretty meta for a job application o.O
jkline has quit [Quit: jkline]
xk_id has quit [Quit:
<a1ph4g33k>
no, I have a method I retrieved via ObjectSpace.const_get( klass ).instance_method( method_name_sym )
sepp2k has quit [Ping timeout: 260 seconds]
<|jemc|>
oh, ha. it's for a job application?
mary5030 has quit [Ping timeout: 272 seconds]
<a1ph4g33k>
... so, now I am trying to call that method from within a instance_eval block.
<|jemc|>
just send me the application heheheh
jkline has joined #ruby
<a1ph4g33k>
yeah, I was just looking for hints regarding unboundmethod ... that's all.
<|jemc|>
on which object are you calling instance_eval?
<a1ph4g33k>
I'm not asking anybody to do the work for me.
<|jemc|>
yeah, I'm just kidding
<a1ph4g33k>
it's ok ... it was probably not the brightest idea to try to get help on it.
<a1ph4g33k>
( plus this irc is logged ).
<|jemc|>
ha
<|jemc|>
true that
<matled>
and you have an awesome name
<popl>
pfft
<a1ph4g33k>
i try.
<a1ph4g33k>
;)
<popl>
too hard
<|jemc|>
I wish I had an employer that knew what an IRC log was...
<popl>
Do you really?
<banisterfiend>
a1ph4g33k weird firkin interview if you have to resort to magic like that ;) (but fun)
<a1ph4g33k>
banisterfiend, I'll explain offline. It's a very meta job.
<banisterfiend>
a1ph4g33k but you should bind the 'self' you want to a variable outside the instance_eval
astrobunny has joined #ruby
<banisterfiend>
assuming i get what u're trying to do
<|jemc|>
popl: yeah, I wouldn't be screwing around on IRC if I had an employer savvy enough to give me engaging work
<popl>
yes you would
<popl>
:P
breakingthings has quit []
Jetchisel has joined #ruby
Metal_01 has joined #ruby
<|jemc|>
but yeah, if the startup I'm working on ever happens, there'll totally be meta-magic in the interview process
tatsuya_o has quit [Remote host closed the connection]
nixterrimus1 has quit [Quit: Leaving.]
<banisterfiend>
don't make the question is too strange or you'll have Hanmac as your only employee ;)
mary5030 has joined #ruby
tatsuya_o has joined #ruby
<|jemc|>
heh
<a1ph4g33k>
I've got the solution mostly in the bag ... just this one final gotcha ... Already fought off a pile of others ( 4th version of the solution for me ).
mmitchell has quit [Remote host closed the connection]
<a1ph4g33k>
anyways ... thanks for talking sense into me.
mmitchell has joined #ruby
<|jemc|>
still willing to help if you want it, but yeah, I understand you not wanting it
dkamioka has quit [Remote host closed the connection]
interactionjaxsn has quit [Remote host closed the connection]
aspires has joined #ruby
zarubin has quit [Ping timeout: 264 seconds]
interactionjaxsn has joined #ruby
nomenkun has quit [Remote host closed the connection]
Xiti has joined #ruby
tatsuya_o has quit [Ping timeout: 265 seconds]
mklappstuhl has joined #ruby
aapzak has quit [Ping timeout: 272 seconds]
mmitchell has quit [Ping timeout: 248 seconds]
<Hanmac>
banisterfiend: did you just use my name as a clinic condition ? ;P
<banisterfiend>
Hanmac metaprogramitis
Tamal has joined #ruby
<banisterfiend>
Hanmac did u have an amiga as a kid?
aapzak has joined #ruby
<Hanmac>
nah, my first pc was a 386er with Win3.1
interactionjaxsn has quit [Ping timeout: 260 seconds]
`Chris` has quit [Remote host closed the connection]
<banisterfiend>
Hanmac oh too bad, you missed that strange phase when there were more computers on offer than just the pc
<samfisher>
banisterfiend: won't exactly explain what i'm looking for
c0rn has quit [Read error: Operation timed out]
<popl>
or is that the previous thing prompting the "again?" from andrewvos?
pdimitrov has quit [Ping timeout: 264 seconds]
<andrewvos>
popl: Well that's why I said "again". But might be the same
pr0ggie has quit [Ping timeout: 272 seconds]
<|jemc|>
popl: no idea
pr0ggie has joined #ruby
hiyosi has joined #ruby
pdimitrov has joined #ruby
<popl>
this sort of thing is so gossipy
headius has quit [Quit: headius]
<zipper>
Hey is there a "short" way of checking if several values are equal? Like a == b == c? Except that raises a SyntaxError
<|jemc|>
that's the notion I was trying to evoke with my comment about Matz
headius has joined #ruby
<zipper>
I want to check if 3 or more numbers are equal
<popl>
Some Perl dev got accused of assaulting some lady and people were buzzing about that.
<popl>
Then someone put his mugshot up on this website that lists the mugshot and charges, then asks you to pay a fee to remove it.
<volty>
zipper: [a,b,c].uniq.length == 1
<popl>
volty++
<Eiam>
whats that got to do with rubby
Notte has quit [Remote host closed the connection]
brennanMKE has quit [Ping timeout: 265 seconds]
<zipper>
volty: and that checks no matter what the variable holds?
<popl>
My implication was that some developers are a gossipy bunch
<zipper>
volty: that's new
Notte has joined #ruby
<volty>
don't know what is new and what is old --- for me it would be enough to not classify it as a 'pattern' :)
pr0ggie has quit [Read error: Operation timed out]
hiyosi has quit [Ping timeout: 272 seconds]
julweber has joined #ruby
<volty>
yap, i don't know much about the world of developers, but have the impression that there are many with verbal diarrea problems :)
mixel has quit [Quit: mixel]
<|jemc|>
heh
pr0ggie has joined #ruby
<volty>
(i was commenting on popl's comment)
ravster has quit [Quit: Leaving.]
<zipper>
volty: uh do you have a place that I can read more on uniq.length?
<popl>
I think that's a function of the base class that hasn't been overridden.
pdimitrov has quit [Ping timeout: 256 seconds]
<zipper>
I didn't know .length was used for anything other than counting.
<zipper>
It worked fine btw
<popl>
it is used for counting
<volty>
zipper: ([a,b,c].uniq).length
<Eiam>
for a site that depends 100% on data from an external supplier, whats the best approach to unit testing my code?
<Eiam>
since my code only operates on data from an external site
Notte has quit [Ping timeout: 246 seconds]
<Eiam>
stub out some mock responses?
<popl>
you are finding the unique elements of the array. if the elements are all the same, there will be one unique element zipper.
<popl>
thus the length will be 1
efrainolivares_ has joined #ruby
<andrewvos>
What about just `a == b && b == c`
<Eiam>
Anarch: that doesn't scale well
<Eiam>
what if you have 15 checks
snovak has quit [Remote host closed the connection]
<Eiam>
shitty logic block to read
<andrewvos>
Then you are not a very good developer
<Eiam>
err andrewvos
<andrewvos>
You have 15 variables?
<popl>
and here we go with the 120 character lines again
polaco_zZz is now known as polaco
<Eiam>
andrewvos: doing it in an array is much nicer, its easy to add in and you don't have to keep checking what logic operator is used for each statement, or worry about order
randomnick_ has quit [Quit: Leaving]
<zipper>
andrewvos: man that has too much replication.
<banisterfiend>
Eiam but it's not clear what's going on
efrainolivares has quit [Ping timeout: 272 seconds]
<banisterfiend>
Eiam you have to put a comment explaining what your' doing
<banisterfiend>
you're*
<banisterfiend>
unless you wrap it in a method: all_equal?(a, b, c)
sepp2k has quit [Quit: Leaving.]
<banisterfiend>
zipper DRY that impedes comprehensibility is bad
<zipper>
It's best to prepare for the "largest" possible situation within logical limits of course.
<volty>
i don't beleive so: 10 secs are enough to realize that it just reduces to 1 element if all equal
<Eiam>
banisterfiend: I don't think it needed a comment
<popl>
also it doesn't have to be all on one line. you can do like a && b &&\ b && c &&\ c && d &&\ …
<Eiam>
its looking at the number of unique elements in an array
<andrewvos>
If I have three variables I am not going to create an array and compare each one to each other one.
<zipper>
does uniq.length really reduce comprehensibility?
<banisterfiend>
zipper code that is not easily grokkable is bad code
pkrnj has joined #ruby
polaco is now known as polaco_zZz
<Eiam>
seriously, whats not understandable about that code, saying .uniq and .length are confusing is.. pretty odd
vpretzel has joined #ruby
<popl>
I'm not confused.
<zipper>
Come on it made me learn about the uniq method
<zipper>
It's a good thing
<Eiam>
popl: andrewvos and banisterfiend seem to indicate its confusing
<popl>
Where?
<popl>
Oh
<popl>
I see.
<zipper>
Eiam: it isn't
mixel has joined #ruby
<zipper>
I figured it out after asking
<popl>
If it's a small number of variables then I would prefer andrewvos' method.
zz_jrhorn424 is now known as jrhorn424
<banisterfiend>
right so, in order to just check whether three things are equal you introduce an array, and 2 methods
<popl>
if it's a huge collection then that would be better.
<zipper>
popl: what about scaling?
<Eiam>
if its basically TWO, yeah
<zipper>
debugging?
<banisterfiend>
seems incidental complexity in the solution is significantly overriding the complexity of the actual problem
<andrewvos>
I have node.js and the cloud for scaling
* Eiam
banisterfiend: I personally would have just done ([] & [])
Fire-Dragon-DoL has joined #ruby
<|jemc|>
!ary.find{|x| x!=ary[0]}
<popl>
zipper: it scales
<Eiam>
banisterfiend: if the set contains the same number of items, then it was the same data =)
<|jemc|>
but I would probably use .uniq.size
<popl>
why?
<Eiam>
banisterfiend: are we trying to prematurely optimize here?
<volty>
good point! [a,b,c].uniq == [a]
<|jemc|>
there you go volty
<banisterfiend>
Eiam yeah, but if you really did think you might need to compare more things in the future then at the lease wrap it in a method with a descriptive name, like def all_equal?(*args)
<andrewvos>
If you require "rails" you can use uniq.one?
<zipper>
popl: I am writing a method to check the number of sides a polygon has
rurban has joined #ruby
ctp has joined #ruby
<zipper>
and I find that the one with length works best because all I change is the length == foo
<|jemc|>
sounds like you should have a dedicated method then
jlast has quit [Remote host closed the connection]
vpretzel has quit [Ping timeout: 272 seconds]
<|jemc|>
encapsulate it in your polygon object or wherever
jkline has quit [Quit: jkline]
<zipper>
|jemc|: I do.
allaire has quit []
<|jemc|>
then... everybody's happy, right?
<|jemc|>
:P
mary5030 has quit [Remote host closed the connection]
Jeticus has quit []
spider-mario has quit [Remote host closed the connection]
mikepack has joined #ruby
fredjean has quit [Quit: Computer has gone to sleep.]
mary5030 has joined #ruby
pdimitrov has joined #ruby
mikeg has joined #ruby
Methylated1 has left #ruby [#ruby]
mikeg has quit [Remote host closed the connection]
<zipper>
Too bad I missed the talk on the assault yet again
<zipper>
Just as I logged on to twitter too late
<popl>
Google it, man.
ephemerian has quit [Quit: Leaving.]
<zipper>
I'll shut up about that
petey_ has quit [Remote host closed the connection]
<zipper>
popl: mmmhh woman assulted at tech convention ruby
<ShellFu>
Hey all. I need some assistance simplifying this method. I have way to many if/then/else going on, and im not sure how to clean it up. >http://pastebin.com/QkaE7NRz<
Ox6abe has quit [Ping timeout: 264 seconds]
c0rn_ has quit [Quit: Computer has gone to sleep.]
dkamioka has quit [Remote host closed the connection]
dkamioka has joined #ruby
blackratdog has quit [Quit: Leaving]
Ox6abe has joined #ruby
<zipper>
There really are sexists in this world. I just read this:
<zipper>
A prominent man in the tech community was hired by a large computer manufacturer to be its master of ceremonies at a customer summit, where he said things like, “Men have invented everything worthwhile. All we can thank women for is the rolling pin.”
mikepack has quit [Remote host closed the connection]
<zipper>
Ada Lovelace?
mikepack has joined #ruby
dkamioka_ has joined #ruby
<zipper>
Marie Curie
dkamioka has quit [Read error: Connection reset by peer]
<|jemc|>
yeah, men suck; so do white people; I'm both of those things, but I'm not being sarcastic here.
<volty>
ShellFu: imo you should post your question starting with your input and the desired output -- because it would be much easier for those willing to help you write it from scratch
<ShellFu>
point understood. Ill rephrase the question
<|jemc|>
you can gripe about how much affirmative action hurts you as a talented young white man, but the truth is we need a little compensation in this world until we advance to the point where averyone actual has equal opportunity to advance their talent
<zipper>
|jemc|: I am male and black and African. I bet there are much fewer africans in tech especially african females. So I guess I know what it half feels like.
jrhorn424 is now known as zz_jrhorn424
<zipper>
For example I got a computer late last year
<zipper>
My very first
<banisterfiend>
zipper cool, which country are you from?
<zipper>
I expect people in developed nations get them as kids.
mikepack_ has joined #ruby
<zipper>
banisterfiend: Kenya
<|jemc|>
yeah, we don't live in a post-racial or post-ethnic or post-gender world. not by a long shot. it irks me when people claim that we do
<shevy>
zipper but when they were young it was like 1970 ... those computers kinda sucked
mikepack has quit [Read error: Connection reset by peer]
<banisterfiend>
zipper cool :))
<shevy>
though BASIC was fun
<zipper>
Anyway I have learnt a load of stuff in just a year and I'm glad.
<terrellt>
zipper: I've heard that lots of people in Africa are totally skipping desktop computers and going right to smart phones for internet access. True?
<zipper>
I had/have to be super moticated though.
<shevy>
terrellt are you describing people everywhere now :P
<zipper>
terrellt: very true
<terrellt>
shevy: No, there's a difference. -Literally- skipping.
<shevy>
ah ok
<zipper>
Same for the fixed line phones
sergicles has joined #ruby
<zipper>
They barely exist
Shidash has joined #ruby
<terrellt>
zipper: We were working on a mobile application to crowd-source translate children's books into local african dialects. It had to be a mobile website for just that reason.
<zipper>
terrellt: are you african?
<volty>
|jemc|: we need the humankind of Homo Sapiens's 2.0 for that to come // so just wait for the slow self-enhancement or hope that our Mighty will send a Service Pack
<terrellt>
zipper: No, just work at a university library.
<zipper>
true the best way to reach africans is mobile
zxq9 has quit [Quit: Konversation terminated!]
<zipper>
I believe two factor auth would totally be the thing here
<zipper>
:D
jonr22 has quit [Ping timeout: 256 seconds]
tylersmith has quit [Remote host closed the connection]
<volty>
mobile: send photos of ice-cream with a mobile // Brave New World ! :)
<|jemc|>
well, 1 year with a computer and already on IRC is a pretty good pace ;)