apeiros changed the topic of #ruby to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
<bnagy> ok if it will always be only two arrays it's simple then - you were talking about splatting before, which is spooky
<TorpedoSkyline> yes, I was just curious
<bnagy> >> a=[1,2]; b=[1,2,3]; (a+b) - a
<eval-in> bnagy => [3] (https://eval.in/69554)
<bnagy> you can do it with set if you want, the methods are the same but they also have longer aliases like union / difference etc
macmartine has quit [Remote host closed the connection]
kindjal has quit [Quit: Computer has gone to sleep.]
<bnagy> but 'what is unique in only me' is a fiddly problem with multiple sets
<bnagy> well.. not fiddly, just slow
<Eiam> anyone have a VM image/vagrant that they use to setup their CI? (like travis?)
aarkerio has quit [Quit: Verlassend]
macmartine has joined #ruby
h0rrorvacui has quit [Quit: Leaving]
coffeina has quit [Quit: Wychodzi]
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
momomomomo has joined #ruby
justsee has joined #ruby
nomenkun has quit [Remote host closed the connection]
bigmac has joined #ruby
bigmac is now known as i8igmac
momomomomo has quit [Client Quit]
gyre007 has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
i8igmac has quit [Remote host closed the connection]
venk has joined #ruby
nowthatsamatt has joined #ruby
jkhwan has quit [Ping timeout: 272 seconds]
dagnachew has joined #ruby
gyre007 has quit [Ping timeout: 265 seconds]
nfk has quit [Read error: Operation timed out]
burlyscudd1 has joined #ruby
kaspergrubbe has joined #ruby
predator217 has joined #ruby
nari has joined #ruby
burlyscudd has quit [Ping timeout: 245 seconds]
falood has quit [Remote host closed the connection]
diegoviola has joined #ruby
diegoviola has quit [Changing host]
diegoviola has joined #ruby
diegoviola has quit [Client Quit]
burlyscudd1 has quit [Client Quit]
zz_jrhorn424 is now known as jrhorn424
diegoviola has joined #ruby
N00D is now known as zz_N00D
predator117 has quit [Ping timeout: 272 seconds]
lfox has joined #ruby
jkhwan has joined #ruby
dagnachew has quit [Quit: Leaving]
zz_N00D is now known as CripperZ
zxq9 has joined #ruby
mikepack has quit [Remote host closed the connection]
gyre007 has joined #ruby
jrhorn424 is now known as zz_jrhorn424
nwertman has quit [Ping timeout: 272 seconds]
elben has quit [Quit: elben]
jkhwan has quit [Remote host closed the connection]
elben has joined #ruby
jkhwan has joined #ruby
aryaching has joined #ruby
mojjojo has left #ruby [#ruby]
phinfone_ has joined #ruby
mrj has joined #ruby
justsee has quit [Quit: leaving]
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
sepp2k has quit [Quit: Leaving.]
phinfonet has quit [Ping timeout: 246 seconds]
dnyy_ has joined #ruby
jeffreyio has joined #ruby
dnyy has quit [Read error: Connection reset by peer]
Soda has quit [Read error: Connection reset by peer]
mansi has joined #ruby
johnnyfuchs has quit [Quit: Leaving.]
jeffreyio has quit [Read error: Connection reset by peer]
gadgetoid has quit [Ping timeout: 260 seconds]
jkhwan has quit [Ping timeout: 272 seconds]
gyre007 has quit [Remote host closed the connection]
zz_jrhorn424 is now known as jrhorn424
ValicekB has quit [Ping timeout: 245 seconds]
einarj has joined #ruby
k-man has joined #ruby
nanoyak has quit [Ping timeout: 272 seconds]
<k-man> how can i convert an integer to a string with commas as thousands seperators?
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nanoyak has joined #ruby
<banister> k-man if you believe in yourself you can do anything
<k-man> smarty
ckinni has joined #ruby
macmartine has quit [Remote host closed the connection]
weszlem has quit []
einarj has quit [Ping timeout: 245 seconds]
<shevy> are many of you guys on 2.x.x ?
hogeo has joined #ruby
<havenwood> shevy: i am. it has had a quick uptake in the community i think. people just realize their stuff still works, just better.
baroquebobcat has joined #ruby
CripperZ is now known as zz_CripperZ
blackmesa has quit [Ping timeout: 240 seconds]
tylersmi_ has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby
thesheff17 has joined #ruby
jonathanwallace has quit [Ping timeout: 265 seconds]
kaldrenon has joined #ruby
<havenwood> >> 54321.to_s.reverse.each_char.each_slice(3).map(&:join).join(',').reverse
<eval-in> havenwood => "54,321" (https://eval.in/69555)
<havenwood> k-man: ^ that is one way
elben has quit [Ping timeout: 272 seconds]
fgo has joined #ruby
elben has joined #ruby
ValicekB has joined #ruby
bricker`work has quit [Quit: leaving]
<xibalba> what's the <=> operator do? object to object comparison?
bricker has joined #ruby
<havenwood> xibalba: oft referred to as the 'spaceship operator'
<shevy> xibalba it looks like an UFO
<xibalba> wondering why Matz > Guido
volty has quit [Quit: Konversation terminated!]
<xibalba> why is p1 > p2 == true
valesk has joined #ruby
<havenwood> xibalba: it return -1, 0, or 1, but often it is used to get >, < , =>, =<, ==, and between? for free not to be called directly
tvw has quit []
h0rrorvacui has joined #ruby
<havenwood> xibalba: are you trying to alphabetize?
<xibalba> just going through the Pragmatic Programmers Book for Ruby seciton 5.3
tsykoduk is now known as zz_tsykoduk
saarinen has quit [Ping timeout: 265 seconds]
osvico has quit [Ping timeout: 264 seconds]
asteros has quit [Quit: asteros]
Nanuq has joined #ruby
robustus has quit [Ping timeout: 245 seconds]
InFlames has quit [Ping timeout: 245 seconds]
pdimitrov has quit [Ping timeout: 264 seconds]
pr0ggie has quit [Ping timeout: 264 seconds]
rickruby has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
robustus has joined #ruby
mikeric has quit []
asteros has joined #ruby
mr`spock has joined #ruby
sevenseacat has joined #ruby
cgore has joined #ruby
mjs2600 has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
<Kamuela> I don't understand. Why do people think of Ruby as "more difficult" than PHP? I honestly haven't ever messed with PHP, but I can't imagine there to be anything that fundamentally makes PHP easier to get into, work with, etc than Ruby and a framework like Rails
<sevenseacat> PHP has a lot lower barrier to entry.
<Kamuela> sevenseacat, in what way? It was simpler to install rails with a built-in server than it would have been to install LAMP, imo
<sevenseacat> well no
<sevenseacat> php is a one-click installer
ValicekB has quit [Read error: Operation timed out]
nwertman has joined #ruby
<shevy> php is a zero-brain installer
tkuchiki has joined #ruby
<shevy> though, I concur with the statement that PHP has a low barrier to entry
bricker has quit [Quit: leaving]
<shevy> Kamuela ruby as a language can be rather complex initially. try to explain to a newcomer what is yield, a block, a lambda
gadgetoid has joined #ruby
<Kamuela> shevy, i still have no idea what a lambda is lol
<shevy> Kamuela rails is also not that simple. you need to understand that MVC pattern
<Kamuela> but to be fair, i've never looked into it
<shevy> with PHP you are ready to go to build websites in .php
<shevy> with pure ruby, you have ... .cgi
capicue has quit [Quit: Leaving...]
asteros has quit [Ping timeout: 264 seconds]
<sevenseacat> also, you cant compare a framework like rails, with straight php
<Kamuela> shevy, i can sorta see that. but at the same time, i think a lot of this assumes you have a particular path of web development... html, then css, then maybe some javascript, and now you need to learn to work with some kind of db logic
tylersmith has quit [Read error: Connection reset by peer]
<Kamuela> whereas when i was like screw it i barely know anything, how-to full-stack, rails was right there ready to take me from the ground up
<shevy> the web indeed requires quite a bit of knowledge these days
<shevy> I liked the 1997ies more :(
i_s has quit [Remote host closed the connection]
tylersmith has joined #ruby
<sevenseacat> rails doesnt abstract the need to know html, css, javascript, and db logic
<shevy> Kamuela ok but people should also understand ruby if they use rails
<sevenseacat> you still need to know all of those things
i_s has joined #ruby
<sevenseacat> you just dont get the option to learn them one at a time
<shevy> Kamuela so with PHP the barrier at the entry level is lower. of course ruby is the more elegant language
i_s has quit [Read error: Connection reset by peer]
<plotter> yeah the best idea to explain yield to someone is that dolphin method
<sevenseacat> why am i getting sucked into these stupid arguments with Kamuela again
<shevy> the what?
i_s has joined #ruby
<shevy> is a dolphin in ruby like a monad in haskell?
<plotter> where the dolphin swims in and out of the block with yield
<shevy> lol wtf
<plotter> lol
i_s has quit [Read error: Connection reset by peer]
<plotter> let me find it one sec
asteros has joined #ruby
<shevy> so Kamuela, now you get it... yield is like a swimming dolphin
i_s has joined #ruby
elben has quit [Quit: elben]
<shevy> apparently it has an affinity for blocks
i_s has quit [Read error: Connection reset by peer]
pragmatism has quit [Remote host closed the connection]
<shevy> sevenseacat, man... look at python documentation... I really think it is so much better than ruby documentation: http://docs.python.org/3/library/stdtypes.html#str.rsplit
i_s has joined #ruby
i_s has quit [Read error: Connection reset by peer]
<sevenseacat> the ruby documentation can be... a bit hard, especially after things like mixins
i_s has joined #ruby
i_s_ has joined #ruby
i_s has quit [Read error: Connection reset by peer]
<k-man> oh, thanks havenwood
i_s has joined #ruby
i_s_ has quit [Read error: Connection reset by peer]
plotter has quit [Ping timeout: 245 seconds]
sevenseacat has left #ruby [#ruby]
sevenseacat has joined #ruby
ssvo has quit [Ping timeout: 246 seconds]
ValicekB has joined #ruby
dfish has joined #ruby
tylersmith has quit [Remote host closed the connection]
iliketurtles has quit [Quit: zzzzz…..]
larissa has quit [Quit: Leaving]
Vivekananda has quit [Quit: Ex-Chat]
pr0ggie has joined #ruby
pdimitrov has joined #ruby
i_s has quit [Ping timeout: 272 seconds]
ericx2x has quit [Remote host closed the connection]
kaspergrubbe has quit [Remote host closed the connection]
codeFiend has joined #ruby
pragmatism has joined #ruby
RichardBaker has quit [Ping timeout: 246 seconds]
jrhe has quit [Read error: Connection reset by peer]
jrhe_ has joined #ruby
pothibo has quit [Quit: pothibo]
atrocita_ has joined #ruby
plotter has joined #ruby
plotter has quit [Changing host]
plotter has joined #ruby
Apane has quit [Ping timeout: 252 seconds]
btanaka has quit [Remote host closed the connection]
<Kamuela> shevy, the dolphin thing cleared up a lot. it just reinforces the fact that Ruby is C
<shevy> wat
Apocalypse has quit [Quit: Input/Output Error]
<shevy> death to all dolphins
dhruvasagar has joined #ruby
<shevy> did you watch the simpson episode in where the dolphins came to power?
atrocitas has quit [Ping timeout: 240 seconds]
aryaching_ has joined #ruby
My_Hearing has joined #ruby
Apocalypse has joined #ruby
Apocalypse has quit [Changing host]
Apocalypse has joined #ruby
Mon_Ouie has quit [Ping timeout: 246 seconds]
aryaching has quit [Ping timeout: 245 seconds]
freezey has quit [Ping timeout: 248 seconds]
Lewix has quit [Remote host closed the connection]
codeFiend has quit [Quit: codeFiend]
upp3r has quit [Ping timeout: 272 seconds]
dhruvasagar has quit [Read error: Operation timed out]
justsee has quit [Ping timeout: 272 seconds]
dallasm has quit [Remote host closed the connection]
Jetchisel has joined #ruby
Mars` has quit [Read error: Connection reset by peer]
Mars` has joined #ruby
Vivekananda has joined #ruby
funburn has quit [Ping timeout: 245 seconds]
dallasm has joined #ruby
momomomomo has joined #ruby
funburn has joined #ruby
Shidash has quit [Ping timeout: 264 seconds]
momomomomo has quit [Client Quit]
ringaroses has joined #ruby
momomomomo has joined #ruby
momomomomo has quit [Client Quit]
dreamchaser has quit [Quit: ZNC - http://znc.in]
Reach has joined #ruby
<Reach> is codeschool worth it for learning ruby?
axl_ has joined #ruby
<Reach> I'm kind of slowly going through rubymonk but I want something more
dreamchaser has joined #ruby
dreamchaser has quit [Changing host]
dreamchaser has joined #ruby
<banister> Reach codeschool is awesome
i_s has joined #ruby
simoz has quit [Ping timeout: 240 seconds]
simoz has joined #ruby
axl_ has quit [Client Quit]
<Reach> well I'm doing a math degree and want to learn how to program for when I graduate and start searching for a job. I thought ruby looks cool, but I have no real experience making complicated software.
<Reach> usually just ~100 lines of code to do a computation or something
amacgregor has joined #ruby
jrhe_ has quit [Quit: jrhe_]
amacgregor__ has joined #ruby
lukec has quit [Quit: lukec]
zjdriver has quit [Quit: Leaving]
benwoody has quit [Quit: benwoody]
amacgregor_ has quit [Ping timeout: 246 seconds]
vpretzel has quit [Quit: Adios!]
Apane has joined #ruby
dfish has quit [Ping timeout: 245 seconds]
justsee has joined #ruby
amacgregor has quit [Ping timeout: 246 seconds]
zz_CripperZ is now known as CripperZ
iliketurtles has joined #ruby
ValicekB has quit [Ping timeout: 245 seconds]
<Kamuela> shevy, no but it sounds worth a good viewing
i_s has quit [Ping timeout: 245 seconds]
vpretzel has joined #ruby
<shevy> Kamuela it is the horror episode, the dolphins fight against the people of springfield in order to rule over them
phinfone_ has quit [Quit: exitiing]
<shevy> it totally changed the image I had of dolphins after Flipper
raphaelivan1 has quit [Quit: Leaving.]
zeade has quit [Quit: Leaving.]
marr has quit [Ping timeout: 245 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
aryaching_ has quit [Ping timeout: 245 seconds]
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
araujo has quit [Ping timeout: 265 seconds]
araujo has joined #ruby
vlad_starkov has joined #ruby
jonathanwallace has joined #ruby
CripperZ is now known as N00D
vlad_starkov has quit [Read error: Connection reset by peer]
xbshift has quit [Quit: xbshift]
s2013 has joined #ruby
newUser1234 has joined #ruby
Davey has joined #ruby
Mars` has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
CaptainJet has quit []
mj12albert has joined #ruby
xbshift has joined #ruby
nanoyak has quit [Ping timeout: 240 seconds]
daxroc has quit [Quit: Leaving.]
Voodoofish430 has quit [Quit: Leaving.]
simoz has quit [Ping timeout: 265 seconds]
nobitanobi has joined #ruby
xbshift has quit [Ping timeout: 252 seconds]
maroloccio has joined #ruby
simoz has joined #ruby
Hanmac has joined #ruby
fennec has joined #ruby
<fennec> hi
aspires has quit [Quit: sudo making a sandwich]
g0bl1n has joined #ruby
psyl0n has quit [Remote host closed the connection]
Jetchisel has joined #ruby
kaspergrubbe has joined #ruby
drim has joined #ruby
<drim> any idea why im getting double resume (FiberError) https://gist.github.com/anonymous/2dc61fc261ad237673ef ?
Hanmac1 has quit [Ping timeout: 272 seconds]
tarella has joined #ruby
mj12albert has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yeboot has joined #ruby
dfish has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
wallerdev has quit [Quit: wallerdev]
mercwithamouth has joined #ruby
sailias has joined #ruby
dallasm has quit [Remote host closed the connection]
<yeboot> how do I get proper ssl certificates for ruby's openssl implementation
amacgregor__ has quit [Ping timeout: 246 seconds]
rjhunter has joined #ruby
<yeboot> I'm getting an ssl auth error with twitter, which I am 90% sure has a valid ssl cert
s2013 has quit [Remote host closed the connection]
nvrch_ has joined #ruby
<bnagy> I think this depends how you installed ruby - afaik ruby doesn't have an 'implementation' it just wraps the lib
asteros has quit [Quit: asteros]
<bnagy> but there was a big period of weirdness where people ended up with their openssl not being able to see correct root certs
ValicekB has joined #ruby
<bnagy> which breaks more or less everything
estebistec has joined #ruby
nvrch has quit [Ping timeout: 248 seconds]
nvrch_ is now known as nvrch
valesk has quit [Ping timeout: 240 seconds]
nobitanobi has quit [Read error: Connection reset by peer]
<bnagy> some installations are using custom openssl libs and linking to their own little copies and all kinds of awfulness
cgore has quit [Remote host closed the connection]
nobitanobi has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lukec has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 272 seconds]
sambao21 has joined #ruby
Monie has joined #ruby
Takehiro has joined #ruby
tylersmith has joined #ruby
pragmatism has quit [Ping timeout: 272 seconds]
dhruvasagar has joined #ruby
<shevy> hehe
<shevy> I am going to start to collect famous bnagy quotes... "there was a big period of weirdness"... awesome :)
eka has quit [Quit: Textual IRC Client: www.textualapp.com]
fschuindt has joined #ruby
macmartine has joined #ruby
<nobitanobi> hello!
kaspergrubbe has quit [Remote host closed the connection]
<shevy> hi samurai
<yeboot> thanks bnagy
<nobitanobi> so.. I just found out I have asthma
<nobitanobi> how cool is that?
<yeboot> bnagy I'm in a now-lts ubuntu computer, so a lot of the packages are backported a ways
sayan has joined #ruby
<bnagy> yeboot: how did you install?
iliketurtles has joined #ruby
sambao21 has quit [Ping timeout: 272 seconds]
tylersmith has quit [Ping timeout: 246 seconds]
hogeo has quit [Remote host closed the connection]
<Kamuela> nobitanobi, will it away. it doesn't serve you
hogeo has joined #ruby
<nobitanobi> :)
<Kamuela> i'm trying to figure out how to write the migrations to include association attributes
Maarius has quit [Ping timeout: 250 seconds]
mj12albert has joined #ruby
s2013 has joined #ruby
macmartine has quit [Remote host closed the connection]
aley has quit [Quit: aley]
kitak_ has quit [Read error: Connection reset by peer]
kitak has joined #ruby
IceDragon has quit [Quit: Space~~~]
capicue has joined #ruby
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
reset has quit [Quit: Leaving...]
lethjakman has quit [Ping timeout: 272 seconds]
danman has joined #ruby
capicue_ has joined #ruby
dhruvasa1ar has joined #ruby
danman has quit [Client Quit]
fennec has left #ruby [#ruby]
estebistec has quit [Remote host closed the connection]
dnyy_ is now known as dnyy
jrhorn424 is now known as zz_jrhorn424
zxq9 has quit [Quit: Konversation terminated!]
zz_jrhorn424 is now known as jrhorn424
dhruvasagar has quit [Ping timeout: 252 seconds]
snuffeluffegus has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
macmartine has joined #ruby
mmitchell has joined #ruby
havenwood has quit [Ping timeout: 272 seconds]
capicue has quit [Ping timeout: 240 seconds]
jrhorn424 is now known as zz_jrhorn424
havenwood has joined #ruby
Hanmac1 has joined #ruby
macmartine has quit [Remote host closed the connection]
kaldrenon has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
Hanmac has quit [Ping timeout: 272 seconds]
intuxicated has quit [Ping timeout: 272 seconds]
udon has joined #ruby
<yeboot> bnagy: using apt
<yeboot> but my ruby version is like
diegoviola has quit [Ping timeout: 248 seconds]
<yeboot> 1.8 still
mercwithamouth has quit [Ping timeout: 245 seconds]
aryaching has joined #ruby
macmartine has joined #ruby
ringaroses has quit [Quit: Leaving]
diegoviola has joined #ruby
emocakes has joined #ruby
diegoviola has quit [Changing host]
diegoviola has joined #ruby
reset has joined #ruby
Alina-malina has quit [Ping timeout: 265 seconds]
braincrash has joined #ruby
macmartine has quit [Remote host closed the connection]
vpretzel has quit [Quit: Adios!]
hashpuppy has quit [Quit: Textual IRC Client: www.textualapp.com]
dhruvasa1ar has quit [Ping timeout: 245 seconds]
Alina-malina has joined #ruby
reset has quit [Ping timeout: 248 seconds]
braincra- has quit [Ping timeout: 252 seconds]
asteros has joined #ruby
amritanshu_RnD has joined #ruby
nobitanobi has quit [Ping timeout: 245 seconds]
<jrobeson> yeboot, most people use rbenv,chruby for just that reason
vlad_starkov has joined #ruby
dallasm has joined #ruby
kaspergrubbe has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
daxroc has joined #ruby
h0rrorvacui has quit [Quit: Leaving]
DanKnox is now known as DanKnox_away
drim has quit [Quit: drim]
i_s has joined #ruby
Xuerian has joined #ruby
yfeldblum has joined #ruby
cafhacker has joined #ruby
hololeap has joined #ruby
kaspergrubbe has quit [Ping timeout: 246 seconds]
mansi has quit [Ping timeout: 245 seconds]
valesk has joined #ruby
cburyta_ has joined #ruby
rickruby has joined #ruby
cburyta__ has joined #ruby
dhruvasagar has joined #ruby
i_s has quit [Remote host closed the connection]
heidi has quit [Quit: Leaving.]
polaco is now known as polaco_zZz
cburyta has quit [Ping timeout: 252 seconds]
mansi has joined #ruby
daxroc has quit [Ping timeout: 264 seconds]
mansi has quit [Remote host closed the connection]
cburyta_ has quit [Ping timeout: 245 seconds]
osvico has joined #ruby
justsee has left #ruby [#ruby]
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
valesk has quit [Ping timeout: 240 seconds]
Mars` has joined #ruby
dallasm has quit [Remote host closed the connection]
whunt has quit [Quit: Computer has gone to sleep.]
mary5030 has joined #ruby
i_s has joined #ruby
emocakes has quit [Quit: Leaving...]
pyreal has quit [Quit: pyreal]
Mars` has quit [Ping timeout: 272 seconds]
dhruvasagar has quit [Ping timeout: 272 seconds]
drim has joined #ruby
finnomenon has quit [Remote host closed the connection]
halfie has quit [Quit: I'll be back ;)]
simoz has quit [Ping timeout: 245 seconds]
ravster has quit [Quit: Leaving.]
hogeo has quit [Remote host closed the connection]
nullsign has left #ruby [#ruby]
yfeldblu_ has joined #ruby
newUser1234 has quit [Remote host closed the connection]
hogeo has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
Mars` has joined #ruby
hogeo has quit [Ping timeout: 246 seconds]
yfeldblum has quit [Ping timeout: 272 seconds]
yfeldblu_ has quit [Ping timeout: 240 seconds]
musl_ has joined #ruby
musl has quit [Read error: Operation timed out]
ejnahc has quit [Read error: Operation timed out]
ejnahc has joined #ruby
fridim_ has joined #ruby
newUser1234 has joined #ruby
macmartine has joined #ruby
mr`spock has quit [Quit: Leaving]
Mars` has quit [Ping timeout: 245 seconds]
Lewix has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
<shevy> anyone of you guys here use bioruby?
jonathanwallace has quit [Ping timeout: 272 seconds]
paul_k has quit [Quit: ZNC - http://znc.in]
fschuindt has quit [Quit: Textual IRC Client: www.textualapp.com]
macmartine has quit [Remote host closed the connection]
kobain has joined #ruby
kobian has quit [Ping timeout: 272 seconds]
* rjhunter googles for "bioruby"
paul_k has joined #ruby
cafhacker has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rjhunter> cool. most of the bio science stuff i've seen is python, java or C++
<rjhunter> (or R, i guess)
<shevy> rjhunter you are into science-related stuff?
<shevy> R is pretty cool
noyb has joined #ruby
<rjhunter> shevy: in a hobbyist, armchair fashion -- i helped judge a recent bio hack day <http://healthhackmelb.com/>
endash has quit [Quit: endash]
<rjhunter> it's funny how people using R don't necessarily realise they're programming
<shevy> cool
<Kamuela> R. now that's trendy
<Kamuela> and R is even MORE like C
h0rrorvacui has joined #ruby
<shevy> well I could see that. a mathematician using R may find R very easy for statistic analysis and display
macmartine has joined #ruby
valesk has joined #ruby
justsee has joined #ruby
justsee has left #ruby [#ruby]
mmitchell has quit [Remote host closed the connection]
sailias has quit [Ping timeout: 246 seconds]
ananthakumaran has joined #ruby
delinquentme has quit [Read error: Connection reset by peer]
varfoo has joined #ruby
hogeo has joined #ruby
delinquentme has joined #ruby
maletor has joined #ruby
Takehiro has quit [Quit: Leaving...]
Fezzler has joined #ruby
rfennec has joined #ruby
mweshi has joined #ruby
wallerdev has joined #ruby
ananthakumaran has quit [Client Quit]
Fezzler has quit [Client Quit]
jkhwan has joined #ruby
asteros has quit [Quit: asteros]
rfennec has quit [Client Quit]
diegoviola has quit [Ping timeout: 246 seconds]
rfennec has joined #ruby
macmartine has quit [Remote host closed the connection]
g0bl1n has quit [Ping timeout: 248 seconds]
rickruby has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
Guest24023 has joined #ruby
rfennec has quit [Client Quit]
Guest24023 has quit [Changing host]
Guest24023 has joined #ruby
Guest24023 is now known as diegoviola
vlad_starkov has joined #ruby
ezkl has quit [Quit: QUIT!]
udon has quit [Quit: Leaving]
vlad_starkov has quit [Read error: Connection reset by peer]
sputnik13 has joined #ruby
paul_k has quit [Remote host closed the connection]
paul_k has joined #ruby
kindjal has joined #ruby
kindjal has quit [Client Quit]
i_s has quit [Remote host closed the connection]
porco has joined #ruby
kitak_ has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
capicue_ has quit [Quit: Leaving...]
Bira has quit []
capicue has joined #ruby
banister has quit [Ping timeout: 246 seconds]
i_s has joined #ruby
daxroc has joined #ruby
dmiller has joined #ruby
ananthakumaran has joined #ruby
ner0x has quit [Quit: Leaving]
kitak has quit [Ping timeout: 246 seconds]
soba has joined #ruby
daxroc has quit [Ping timeout: 272 seconds]
mary5030 has quit [Remote host closed the connection]
nwertman has quit [Ping timeout: 245 seconds]
mary5030 has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
i_s has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
simoz has joined #ruby
Rickmasta has quit [Ping timeout: 252 seconds]
mary5030 has quit [Remote host closed the connection]
benlieb has joined #ruby
mary5030 has joined #ruby
<delinquentme> is there a way to force printf to make each interpreted object a set number of characters?
i_s has joined #ruby
<rjhunter> >> printf "[%10s]", "cat"
<eval-in> rjhunter => [ cat]nil (https://eval.in/69580)
<rjhunter> >> printf "[%10s]", "archaeopteryx"
<eval-in> rjhunter => [archaeopteryx]nil (https://eval.in/69581)
Mars` has joined #ruby
<rjhunter> delinquentme: does that help?
<delinquentme> yeah actually I found it just as you posted :D
<jrobeson> i used that to give me an 8 digit hex in my code.. worked nicely
yourmysin has quit [Read error: Connection reset by peer]
<bnagy> >> "%10.10s" % "asdfgkwertyuiosdfghj"
<eval-in> bnagy => "asdfgkwert" (https://eval.in/69583)
mary5030 has quit [Ping timeout: 264 seconds]
jerius has joined #ruby
<bnagy> you can just generally google printf, ruby's impl is pretty standard
xybre has quit [Read error: Operation timed out]
Xuerian has quit [Read error: Operation timed out]
the_mentat has quit [Read error: Operation timed out]
onewheelskyward has quit [Read error: Operation timed out]
forced_request has joined #ruby
machuga has quit [Read error: Operation timed out]
EHLOVader has quit [Read error: Operation timed out]
philtr has quit [Read error: Operation timed out]
i_s has quit [Remote host closed the connection]
robonerd has quit [Read error: Connection reset by peer]
xcess_denied has joined #ruby
<delinquentme> and what about only running a particular part of the ruby script ONLY when the script is called directly ... IE not from an include
<delinquentme> so I want say .. the main loop of a ruby script ... to not run when I simply include that script
xybre has joined #ruby
robonerd has joined #ruby
philtr has joined #ruby
fuhgeddaboudit has joined #ruby
Xuerian has joined #ruby
machuga has joined #ruby
<rjhunter> delinquentme: the idiom is testing `__FILE__ == $0`, although there are some pitfalls to it
EHLOVader has joined #ruby
onewheelskyward has joined #ruby
cafhacker has joined #ruby
<delinquentme> rjhunter, are they easily explained?
the_mentat has joined #ruby
cafhacker has quit [Client Quit]
dnyy has quit []
<rjhunter> delinquentme: ehh, i'm just curmudgeonly. obviousness and testability are the big ones. just personal taste more than anything. ignore me ;-)
yfeldblum has joined #ruby
macmartine has joined #ruby
capicue has quit [Quit: Leaving...]
squidBits has joined #ruby
Kiba has joined #ruby
<Kiba> hi
yfeldblum has quit [Remote host closed the connection]
<Kiba> I want to know how long a file is in term of line number. Any way I can do that?
amacgregor has joined #ruby
ehaliewicz has joined #ruby
yfeldblum has joined #ruby
kobain has quit [Ping timeout: 252 seconds]
<rjhunter> kiba: sure there is. you don't even need ruby to do it -- plain Unix command line tools have a line counter built in. what have you tried so far?
tonni has joined #ruby
<squidBits> wc -l
deryl has joined #ruby
hololeap has quit [Ping timeout: 240 seconds]
deryl is now known as ddd
zeade has joined #ruby
araujo has quit [Quit: Leaving]
mary5030 has joined #ruby
tonni_ has quit [Ping timeout: 252 seconds]
MattStratton has joined #ruby
k-man has left #ruby ["WeeChat 0.4.2"]
paul_k has quit [Remote host closed the connection]
h0rrorvacui has quit [Quit: Leaving]
iliketurtles has joined #ruby
lfox has quit [Quit: ZZZzzz…]
havenwood has quit [Remote host closed the connection]
axl_ has joined #ruby
sgnl has joined #ruby
havenwood has joined #ruby
simoz2 has joined #ruby
weems has joined #ruby
nobitanobi has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
simoz has quit [Ping timeout: 265 seconds]
weems has quit [Client Quit]
weems has joined #ruby
weems has joined #ruby
weems has quit [Changing host]
rezzack has quit [Ping timeout: 248 seconds]
daxroc has joined #ruby
ddd has quit [Quit: Leaving]
jeremywrowe has quit [Ping timeout: 246 seconds]
dcope has quit [Quit: leaving]
macmartine has quit [Read error: Connection reset by peer]
zz_jrhorn424 is now known as jrhorn424
ddd has joined #ruby
vlad_starkov has joined #ruby
macmartine has joined #ruby
daxroc has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
JonahR has joined #ruby
echevemaster has quit [Quit: Leaving]
echevemaster has joined #ruby
<havenwood> kiba: `cat #{filename_here} | parallel --pipe wc -l`
baroquebobcat has joined #ruby
mary5030 has quit [Remote host closed the connection]
<havenwood> (if the file is real big and you wanna use multiple cores with wc)
mary5030 has joined #ruby
<yeboot> rbenv? chruby?
<havenwood> chruby!
<yeboot> jrobeson: that sounds like jailing ruby
ananthakumaran has quit [Quit: Leaving.]
<yeboot> which sounds kinda cool
* Kiba is doing research on the life cycle of gems using survival analysis
dallasm has joined #ruby
<jrobeson> yeboot, this is what folks use to a) get a modern version of ruby on a system that doesn't provide a modern ruby or b) manage different ruby based libraries/applications that each depend on different rubies
<havenwood> kiba: I mean if it isn't massively huge, you can just: File.readlines('filename').size
macmartine has quit [Read error: Connection reset by peer]
<havenwood> heck, even if it is massive :P just wont be as fast as a parallelized wc
<Kiba> havenwood: it's going to be massively huge..60K lines
MattStratton has quit [Quit: Textual IRC Client: www.textualapp.com]
<yeboot> jrobeson sounds nice, actually
<havenwood> kiba: That should be small enough for a quick File.readlines, try it i'd say.
<Kiba> for every line, I am gathering data for a gem
<havenwood> what kind of data?
<Kiba> once that is done, I need to collate the data into something usable for a survival analysis
macmartine has joined #ruby
<Kiba> havenwood: the data I get from using the Gems API
<havenwood> yeboot: I like ruby-install with chruby, but other options include ruby-build with rbenv or rvm.
mary5030_ has joined #ruby
mary5030 has quit [Ping timeout: 264 seconds]
<sgnl> I'm working on an assignment, basically rebuild the .reverse method. I got that part down but I can't figure out to how recreate the .reverse! version. Any articles or Doc that would lead me to find the answer would be appreciated.
<Kiba> work in progress essay of course
<Kiba> this is my first statistical analysis project
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
funburn has quit [Read error: Connection reset by peer]
simoz2 has quit [Ping timeout: 265 seconds]
Apane has quit [Ping timeout: 248 seconds]
<havenwood> kiba: Using File#readline on my machine seems to take about 5ms per 10,000 lines parsed to readline array and counted.
<havenwood> ^ just for some point of reference
funburn has joined #ruby
<Kiba> havenwood: I just did File#each_line and count
fijimunkii has quit [Ping timeout: 246 seconds]
<jrobeson> kiba, your site gave me inspiration.. thanks
<Kiba> that essay?
<Kiba> or the whole site?
<jrobeson> no.. that's cool tho :)
<havenwood> kiba: Yeah, should be plenty fast. I doubt that part will need optimization. The network call stuff you may want to thread or do concurrently in some fashion.
<Kiba> how does it inspires you?
<jrobeson> i mean the essay and statistics is cool, but how you laid out your project and random ideas
<jrobeson> that is the part that inspired me.. seeing somebody organize topics i'm also interested in.. and how they chose to categorize it
<Kiba> random ideas as in notes and thoughts page?
ddd has quit [Quit: Leaving]
<jrobeson> yep
ddd has joined #ruby
phansch has joined #ruby
lukec has quit [Quit: lukec]
simoz has joined #ruby
<Kiba> jrobeson: well, my focus right now is the survival analysis project
io_syl has quit [Ping timeout: 272 seconds]
<Kiba> which by the way took about 15 hours last week
<Kiba> that's studying, replicating somebody's code, getting confused
dallasm has quit [Read error: Connection reset by peer]
<Kiba> writing and rewriting
<jrobeson> where are you from kiba?
<Kiba> where do I live?
<shevy> kiba used to be a heavy gamer
dallasm has joined #ruby
<Kiba> heavy gaming is an unwholesome activity
<Kiba> it sucks money and time
<RubyPanther> kiba: grep -e '^\s*[^\#[:space:]]\{4,\}' file | wc -l
<jrobeson> kiba, well if where you live and where you're from is the same then sure..
<Kiba> USA
maletor has joined #ruby
dhruvasagar has joined #ruby
<Kiba> jrobeson: if you like what I am doing, consider a weekly donation
<RubyPanther> throw in find and xargs, and you can just wait for it
fgo has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<Kiba> although it isn't guarantee that I will accomplish my goal of finishing the essay
ValicekB has quit [Read error: Operation timed out]
<Kiba> but I am giving the project roughly 50% of my time each week
<havenwood> kiba: You can get all the gem names through Gem in Ruby by the way.
<havenwood> >> Gem::Specification.all.map &:name
<eval-in> havenwood => NOTE: Specification.all called from /tmp/execpad-d60ae1ee1b42/source-d60ae1ee1b42:2:in `<main>' (https://eval.in/69604)
<havenwood> Well, eval-in can't.
jerius has quit [Quit: Computer has gone to sleep.]
<Kiba> havenwood: I already have a list of all the gems name
kevinykchan has joined #ruby
<havenwood> kiba: was just looking at your: gem list -r | sed -r "s/\(.+\)//" > gems
dfish has quit [Quit: WeeChat 0.4.0]
<havenwood> kiba: oh, remote
<Kiba> I don't have any incentive to replace it with anything
<Kiba> that part of the code is done and accomplish what I need
ddd has left #ruby ["Leaving"]
ddd has joined #ruby
<shevy> Gem::Specification.all.map &:name lists the installed gems?
<havenwood> shevy: yup
delinquentme has quit [Quit: Leaving]
<shevy> cool
<shevy> havenwood, you are like a living knowledgebase when it comes to ruby
<havenwood> shevy: I'm trying to learn all I can! :)
dhruvasagar has quit [Ping timeout: 246 seconds]
<shevy> hehe
dhruvasagar has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
capicue has joined #ruby
rickruby has joined #ruby
porco has quit [Quit: Leaving...]
vlad_starkov has joined #ruby
falood has joined #ruby
asteros has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
sgnl has quit [Quit: Textual IRC Client: www.textualapp.com]
_maes_ has joined #ruby
rickruby has quit [Ping timeout: 248 seconds]
lethjakman has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
bugsinlights has joined #ruby
hamakn has joined #ruby
robbyoconnor has joined #ruby
tonni_ has joined #ruby
aagdbl has joined #ruby
tonni has quit [Ping timeout: 252 seconds]
ValicekB has joined #ruby
dallasm has quit [Remote host closed the connection]
capicue has quit [Quit: Leaving...]
bugsinlights has quit [Remote host closed the connection]
funburn has quit [Ping timeout: 264 seconds]
tommyvyo has joined #ruby
tommyvyo has joined #ruby
newUser1234 has quit [Remote host closed the connection]
fuhgeddaboudit has quit [Ping timeout: 272 seconds]
porco has joined #ruby
funburn has joined #ruby
funburn has quit [Read error: Connection reset by peer]
axl_ has quit [Quit: axl_]
closures999 has joined #ruby
bugsinlights has joined #ruby
Hanmac has joined #ruby
InFlames has joined #ruby
InFlames has quit [Max SendQ exceeded]
baroquebobcat has quit [Quit: baroquebobcat]
nowthatsamatt has quit [Quit: nowthatsamatt]
InFlames has joined #ruby
Hanmac1 has quit [Ping timeout: 241 seconds]
nazty has quit [Ping timeout: 245 seconds]
closures999 has quit [Client Quit]
closures999 has joined #ruby
funburn has joined #ruby
Soliah has joined #ruby
<shevy> anyone of you using rmagick? is it easy to write text into an image with it?
funburn has quit [Read error: Connection reset by peer]
jlast has quit [Remote host closed the connection]
mary5030_ has quit [Remote host closed the connection]
mary5030 has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
funburn has joined #ruby
mary5030 has quit [Ping timeout: 272 seconds]
daxroc has joined #ruby
dmiller has quit [Quit: Leaving...]
Reach has quit [Ping timeout: 272 seconds]
daxroc has quit [Ping timeout: 248 seconds]
phansch has quit [Quit: Leaving]
<nobitanobi> shevy, I'm using minimagick
bluOxigen has joined #ruby
<nobitanobi> with my current project..
<nobitanobi> and it's "easy" to write text
<shevy> hmm
fgo has joined #ruby
<shevy> never heard of that
<nobitanobi> nah?
<nobitanobi> it avoids memory leaks
<shevy> do you think I can use it to easily write into a "shield"? a picture of a medieval shield
<shevy> my memory often leaks ;)
<nobitanobi> yeah
Monie has joined #ruby
<nobitanobi> minimagick is a wrapper around a command line tool
<nobitanobi> pretty neat
<nobitanobi> and yeah, you can do that easily
<jalcine> easy in relation to what?
* jalcine is curious
<nobitanobi> it's as easy as putting the coords and size of font
<nobitanobi> color.
mrj has quit [Read error: Connection reset by peer]
fgo_ has joined #ruby
<havenwood> shevy: A bit longer to fetch all the names of all gems: Gem::SpecFetcher.new.available_specs(:latest).first.values.flatten.map &:name
tkuchiki has quit [Ping timeout: 245 seconds]
FDj has quit [Ping timeout: 245 seconds]
<shevy> ugh, that is long
fgo has quit [Ping timeout: 245 seconds]
<havenwood> shevy: 66,000 and change
sayan has quit [Ping timeout: 252 seconds]
<havenwood> shevy: change :latest to :released and it goes to 350,000+
fgo_ has quit [Ping timeout: 272 seconds]
simoz has quit [Ping timeout: 272 seconds]
h0rrorvacui has joined #ruby
funburn has quit [Remote host closed the connection]
subbyyy has joined #ruby
funburn has joined #ruby
tkuchiki has joined #ruby
xcess_denied has quit [Quit: Leaving...]
yacks has quit [Quit: Leaving]
Reach has joined #ruby
FDj has joined #ruby
xcess_denied has joined #ruby
zeade has quit [Quit: Leaving.]
zeade has joined #ruby
jlast has joined #ruby
dnyy has joined #ruby
Aryasam has joined #ruby
Shidash has joined #ruby
ehaliewicz has quit [Ping timeout: 272 seconds]
sergicles has quit [Quit: sergicles]
timonv has joined #ruby
sbos99 has joined #ruby
BraddPitt has quit [Quit: Leaving]
ddd has quit [Quit: Leaving]
Es0teric has joined #ruby
BraddPitt has joined #ruby
lethjakm1 has joined #ruby
subbyyy has quit [Ping timeout: 252 seconds]
EvanR__ has joined #ruby
jrhorn424 is now known as zz_jrhorn424
lethjakman has quit [Ping timeout: 248 seconds]
osvico has quit [Ping timeout: 272 seconds]
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
_409_ has joined #ruby
Ox6abe has quit [Remote host closed the connection]
Aryasam has quit [Ping timeout: 272 seconds]
jlast has quit [Ping timeout: 245 seconds]
asteros has quit [Quit: asteros]
aryaching has quit [Ping timeout: 265 seconds]
kaspergrubbe has joined #ruby
Mars` has quit [Ping timeout: 240 seconds]
Fire-Dragon-DoL has left #ruby [#ruby]
macmartine has quit [Remote host closed the connection]
_409_ has quit [Quit: Linkinus - http://linkinus.com]
bugsinlights has quit [Remote host closed the connection]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kaspergrubbe has quit [Ping timeout: 248 seconds]
rjhunter has quit [Remote host closed the connection]
mengu has joined #ruby
io_syl has joined #ruby
jkhwan has quit [Remote host closed the connection]
mweshi has quit [Quit: mweshi]
bradhe has joined #ruby
jkhwan has joined #ruby
tagrudev has joined #ruby
s2013 has quit [Ping timeout: 265 seconds]
godd2 has joined #ruby
axilla has quit [Ping timeout: 248 seconds]
iliketurtles has quit [Quit: zzzzz…..]
amacgregor has quit [Ping timeout: 245 seconds]
zipper has joined #ruby
jkhwan has quit [Ping timeout: 272 seconds]
nfk has joined #ruby
zoee has joined #ruby
rjhunter has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
varfoo has quit [Quit: WeeChat 0.4.0]
kevinykchan has quit [Quit: Computer has gone to sleep.]
krz has joined #ruby
newUser1234 has joined #ruby
nbrosnahan has joined #ruby
Vivekananda has quit [Quit: Ex-Chat]
iliketurtles has joined #ruby
yugui_zzz is now known as yugui
timonv has quit [Read error: No route to host]
newUser1234 has quit [Ping timeout: 245 seconds]
varfoo has joined #ruby
EvanR__ has quit [Ping timeout: 264 seconds]
aspires has joined #ruby
valesk has quit [Ping timeout: 240 seconds]
aspires has quit [Client Quit]
zoee has quit [Quit: This computer has gone to sleep]
daxroc has joined #ruby
chihhsin has quit [Quit: Lost terminal]
DonRichie has joined #ruby
hellome has quit [Read error: Connection reset by peer]
iliketurtles has quit [Quit: zzzzz…..]
chihhsin has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
thesheff17 has quit [Ping timeout: 245 seconds]
noyb has quit [Ping timeout: 265 seconds]
i_s has joined #ruby
asteros has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
daxroc has quit [Ping timeout: 246 seconds]
nobitanobi has quit [Quit: Leaving]
nobitanobi has joined #ruby
apeiros has quit [Ping timeout: 272 seconds]
noop has joined #ruby
fgo has joined #ruby
Mars` has joined #ruby
nobitanobi has quit [Remote host closed the connection]
InFlames has quit [Read error: Connection reset by peer]
jbpros has joined #ruby
nwertman has joined #ruby
Lewix has quit [Remote host closed the connection]
porco has quit [Quit: Leaving...]
brtdv has joined #ruby
Hanmac has joined #ruby
porco has joined #ruby
Lewix has joined #ruby
sayan has joined #ruby
mengu has quit [Remote host closed the connection]
asteros has quit [Quit: asteros]
godd2 has quit [Quit: Page closed]
kung has joined #ruby
jbpros has quit [Quit: jbpros]
nwertman has quit [Ping timeout: 272 seconds]
sheap has joined #ruby
tonni_ has quit [Remote host closed the connection]
tonni has joined #ruby
funburn has quit [Quit: funburn]
brtdv has quit []
tnk1 has quit [Ping timeout: 265 seconds]
user258467 has joined #ruby
mengu has joined #ruby
tonni has quit [Ping timeout: 252 seconds]
tarella has quit [Remote host closed the connection]
blaxter_ has joined #ruby
malley has joined #ruby
sivoais has quit [Ping timeout: 240 seconds]
iliketurtles has joined #ruby
amoli has joined #ruby
shredding has joined #ruby
sheap has quit [Quit: Lost terminal]
<amoli> Hi. I get a no method error when when executing this: http://pastebin.com/raw.php?i=wTaWsmRh anyone can give me a hint?
Mars` has quit [Remote host closed the connection]
Mars` has joined #ruby
yfeldblum has quit [Remote host closed the connection]
sandeepk has joined #ruby
yfeldblum has joined #ruby
sivoais has joined #ruby
<jrobeson> amoli, why this? def Definition.something .. shoudln't it be def self.someting ?
vlad_starkov has joined #ruby
araujo has joined #ruby
wallerdev has quit [Quit: wallerdev]
apeiros has joined #ruby
<jrobeson> but you should also be more clera about what you did that gave you a no method error
pierre1 has joined #ruby
tnk1 has joined #ruby
<amoli> jrobeson, get_definition can't call define, hence the no method error.
<amoli> Sorry for that.
jprovazn has joined #ruby
Mars` has quit [Ping timeout: 264 seconds]
<jrobeson> make the change i suggested
<amoli> Did so.
capicue has joined #ruby
<amoli> Still the same result.
yfeldblum has quit [Ping timeout: 272 seconds]
<jrobeson> show the code again
<jrobeson> fixed that is..
fridim_ has quit [Read error: Operation timed out]
i_s has quit [Remote host closed the connection]
falood has quit [Remote host closed the connection]
psyl0n has joined #ruby
maroloccio has quit [Ping timeout: 240 seconds]
Ox6abe has joined #ruby
h0rrorvacui has quit [Quit: Leaving]
fgo has quit [Ping timeout: 272 seconds]
lsmola_ has joined #ruby
anderse has joined #ruby
echevemaster has quit [Quit: Leaving]
falood has joined #ruby
<jrobeson> so how exactly are you calling it now?
i_s has joined #ruby
bradhe has quit [Remote host closed the connection]
<jrobeson> and paste the full error also
psyl0n has quit [Remote host closed the connection]
lsmola_ has quit [Client Quit]
Ox6abe has quit [Ping timeout: 246 seconds]
lsmola has joined #ruby
Guest52506 has quit [Read error: Operation timed out]
threesome has joined #ruby
<amoli> jrobeson, http://pastebin.com/cnFT8BSb undefined local variable or method 'query' for Definition:Module <NameError> in 'get_definition'
<jrobeson> well look at your code. where does query come from
<amoli> After removing the 'define' method and whatever associated with it, it worked and works just fine.
<jrobeson> uhm ok?
<jrobeson> there is no query method or variable being set n the code you pasted
lethjakm1 has quit [Ping timeout: 245 seconds]
<jrobeson> shouldn't it be the same as the arguemnt you are passing int?
dangerousdave has joined #ruby
<jrobeson> you're passing in word, but using query
timonv has joined #ruby
brtdv has joined #ruby
dagobah has joined #ruby
<amoli> Haha, I really am an idiot. Thanks jrobeson --a variable naming mistake after an attempt to organise the mess the code was in it was.
akonny has joined #ruby
phinfonet has joined #ruby
pierre1 has quit [Quit: Leaving]
agent_white has quit [Quit: nightall]
dnyy has quit []
beermouse has joined #ruby
daxroc has joined #ruby
beermouse has quit [Client Quit]
drumusician has joined #ruby
i_s has quit [Remote host closed the connection]
zigomir has joined #ruby
daxroc has quit [Ping timeout: 246 seconds]
parduse is now known as Guest22439
Guest22439 has quit [Killed (sendak.freenode.net (Nickname regained by services))]
parduse has joined #ruby
beermouse has joined #ruby
fgo has joined #ruby
phinfonet has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
<shevy> careful guys
<shevy> snake on the loose
<shevy> I have identified it
Xeago_ has joined #ruby
<shevy> CRUSH IT!!!
phinfonet has joined #ruby
<Xeago_> ?
zoee has joined #ruby
parduse is now known as Guest39754
Guest39754 has quit [Killed (card.freenode.net (Nickname regained by services))]
parduse has joined #ruby
fgo has quit [Ping timeout: 265 seconds]
Xeago has quit [Ping timeout: 246 seconds]
watermel0n has joined #ruby
nwertman has joined #ruby
<rjhunter> Xeago_: I think shevy was making a Python vs Ruby language wars joke
<rjhunter> Xeago_: and you joined in the middle of it
<rjhunter> Xeago_: in other words, "nothing to see here, move along..." ;-)
h_kon has joined #ruby
<shevy> his ? demands an answer
<shevy> !
<rjhunter> .
claymore has joined #ruby
malley has quit [Remote host closed the connection]
bradhe has joined #ruby
relix has joined #ruby
andikr has joined #ruby
nwertman has quit [Ping timeout: 272 seconds]
bradhe has quit [Read error: Connection reset by peer]
capicue has quit [Quit: Leaving...]
bradhe has joined #ruby
cek has joined #ruby
kammel has joined #ruby
ahawkins has joined #ruby
phinfonet has quit [Quit: exitiing]
ahawkins_ has joined #ruby
ahawkins_ has quit [Client Quit]
tonni has joined #ruby
ahawkins_ has joined #ruby
My_Hearing is now known as Mon_Ouie
bradhe has quit [Ping timeout: 272 seconds]
kaspergrubbe has joined #ruby
noname001__ has joined #ruby
cek has quit [Ping timeout: 272 seconds]
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mrfoto has joined #ruby
fixl has joined #ruby
kammel has quit [Remote host closed the connection]
<Xeago_> hoelzro: you be on hn?
alup has joined #ruby
aganov has joined #ruby
jbpros has joined #ruby
ahawkins has quit [Disconnected by services]
ahawkins_ is now known as ahawkins
benet has joined #ruby
nari has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
beermouse has quit [Quit: beermouse]
ph8 has quit [Ping timeout: 252 seconds]
io_syl has quit []
vlad_starkov has quit [Remote host closed the connection]
einarj has joined #ruby
<Kamuela> Good night everyone
jkhwan has joined #ruby
Kamuela has quit [Quit: Leaving]
Davey has joined #ruby
vlad_starkov has joined #ruby
ph8 has joined #ruby
aapzak has quit [Ping timeout: 264 seconds]
aapzak has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.2]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
Mars` has joined #ruby
cek has joined #ruby
amacgregor has joined #ruby
sandeepk has quit [Quit: Leaving...]
Hanmac1 has joined #ruby
Mars` has quit [Ping timeout: 240 seconds]
Hanmac has quit [Ping timeout: 252 seconds]
beermouse has joined #ruby
weszlem has joined #ruby
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
xk_id has quit [Quit:
camilasan has joined #ruby
blackmesa has joined #ruby
jkhwan has quit [Ping timeout: 272 seconds]
iliketurtles has quit [Quit: zzzzz…..]
troessner has joined #ruby
jbpros has quit [Quit: jbpros]
olivier_bK has joined #ruby
sandeepk has joined #ruby
aef has quit [Remote host closed the connection]
aef has joined #ruby
n1x has joined #ruby
daxroc has joined #ruby
<hoelzro> Xeago_: yeah
<hoelzro> I mean, I read it
nari has joined #ruby
greenrose has quit [Ping timeout: 245 seconds]
beermouse has quit [Quit: beermouse]
decoponio has joined #ruby
daxroc has quit [Ping timeout: 246 seconds]
fgo has joined #ruby
filemon_CZ has joined #ruby
noop has quit [Ping timeout: 265 seconds]
jhaals has joined #ruby
beermouse has joined #ruby
dawkirst has joined #ruby
bradhe has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
jhaals has quit [Ping timeout: 248 seconds]
gja has joined #ruby
Lewix has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
jhaals has joined #ruby
rrichardsr3 has joined #ruby
rrichardsr3 has quit [Max SendQ exceeded]
bradhe has quit [Ping timeout: 272 seconds]
beermouse has quit [Ping timeout: 264 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
timonv has joined #ruby
greenrose has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
DoNcK has joined #ruby
Kneferilis has quit [Quit: Leaving]
stetho has joined #ruby
Advocation has joined #ruby
sevenseacat has quit [Quit: Leaving.]
dita has joined #ruby
Squarepy has joined #ruby
Squarepy has quit [Changing host]
Squarepy has joined #ruby
kevinfagan has joined #ruby
rh1n0 has joined #ruby
noop has joined #ruby
marr has joined #ruby
adambeynon has joined #ruby
filemon_CZ has quit [Remote host closed the connection]
raar has joined #ruby
Astralum has joined #ruby
raar is now known as Guest33767
zipper has quit [Ping timeout: 246 seconds]
InFlames has joined #ruby
cina has joined #ruby
xcess_denied has quit [Quit: Leaving...]
wildroman has joined #ruby
wildroman has quit [Remote host closed the connection]
funburn has joined #ruby
wildroman has joined #ruby
TMM has joined #ruby
TMM has quit [Changing host]
TMM has joined #ruby
Kneferilis has joined #ruby
zoee has quit [Quit: This computer has gone to sleep]
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
stetho has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Douglish has left #ruby ["Die bitch, he said and died!"]
shaunbak_ has joined #ruby
fgo has quit [Ping timeout: 264 seconds]
TripleDES has joined #ruby
rickruby has joined #ruby
raphaelivan has joined #ruby
tonni has quit [Remote host closed the connection]
stetho has joined #ruby
rickruby has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
tonni has joined #ruby
mklappstuhl has joined #ruby
sandeepk has quit [Quit: Leaving...]
zoee has joined #ruby
tonni has quit [Read error: Connection reset by peer]
w4pm has quit [Ping timeout: 265 seconds]
rdark has joined #ruby
w4pm has joined #ruby
workmad3 has joined #ruby
parduse has quit [Killed (barjavel.freenode.net (Nickname regained by services))]
parduse has joined #ruby
dita has left #ruby [#ruby]
Hanmac has joined #ruby
Hanmac1 has quit [Ping timeout: 265 seconds]
phansch has joined #ruby
Apane has joined #ruby
zipper has joined #ruby
msuszczy has quit [Quit: Lost terminal]
colonolGron has joined #ruby
vlad_starkov has joined #ruby
rickruby has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
kitak_ has quit [Remote host closed the connection]
closures999 has quit []
xcess_denied has joined #ruby
sandeepk has joined #ruby
Apane has quit [Ping timeout: 272 seconds]
Davey has joined #ruby
Grundell has joined #ruby
kalleth has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
kalleth has joined #ruby
closures999 has joined #ruby
fgo has joined #ruby
lkba has quit [Ping timeout: 272 seconds]
ephemerian has joined #ruby
daxroc has joined #ruby
phansch has quit [Read error: Connection reset by peer]
zeeraw has joined #ruby
timonv has joined #ruby
phansch has joined #ruby
w4pm has quit [Ping timeout: 272 seconds]
hogeo has quit [Remote host closed the connection]
w4pm has joined #ruby
bradhe has joined #ruby
kitak has joined #ruby
phansch has quit [Remote host closed the connection]
daxroc has quit [Ping timeout: 246 seconds]
ayaz has joined #ruby
phansch has joined #ruby
obs has joined #ruby
jglauche has left #ruby [#ruby]
Advocation has quit [Quit: Advocation]
bradhe has quit [Ping timeout: 272 seconds]
closures999 has quit []
stetho has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TaxmanBD has joined #ruby
<TaxmanBD> hello
aspiers has joined #ruby
<TaxmanBD> anyone here? I need some help :(
<mrfoto> sure
<TaxmanBD> great just a sec I'll post the code
<mrfoto> !gist
falood has quit [Remote host closed the connection]
tonni has joined #ruby
bradhe has joined #ruby
<tobiasvl> mrfoto: not gist?
<mrfoto> use gist
<mrfoto> on #rubyonrails this gives instructions :P
sepp2k has joined #ruby
<TaxmanBD> here you go sir
Ripp__ has quit []
<TaxmanBD> is my included method wrong, I tried putting a planet in it returned that its not in the array
rickruby has quit [Remote host closed the connection]
<mrfoto> i was just about to ask you why do you even use it
Xeago has joined #ruby
bradhe has quit [Ping timeout: 246 seconds]
<TaxmanBD> yes, I just started ruby
<mrfoto> `solarPlanets.include? planet` is much more readable
<TaxmanBD> ok thanks, but why doesn't this work though
<mrfoto> because you have 'e' instead of e
<tobiasvl> 'e'
<shaileshg__> Hi, I am going through some code and it says that if you have a class (say, Person) and you further do Class.new Person do; end, you are creating a subclass Person of parent class Person
<TaxmanBD> ah ok
<mrfoto> so you are asking array if it includes string 'e' instead of var e
<TaxmanBD> I see, silly me
<shaileshg__> What is don't understand is how you can create a subclass of a class with the same Name
lsmola has quit [Ping timeout: 272 seconds]
<shaileshg__> *name
jprovazn has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Remote host closed the connection]
ldnunes has joined #ruby
<mrfoto> TaxmanBD: but dont use abstraction methods this simple, when ruby implementation would be much cleaner and understandable
Hanmac has quit [Ping timeout: 245 seconds]
<shaileshg__> mrfoto: any suggestion to my question pls
<mrfoto> shaileshg__: where are you reading that?
Xeago_ has quit [Ping timeout: 252 seconds]
<TaxmanBD> mrfoto, thank you for the help cheers
<shaileshg__> mrfoto: Dave Thomas' lecture on ruby metaprogramming, episode 5
tonni has quit [Remote host closed the connection]
beermouse has joined #ruby
nisstyre has quit [Read error: Operation timed out]
<shaileshg__> sharing a gist for you
neonlex has joined #ruby
Hanmac has joined #ruby
<shevy> shaileshg__ that is not possible
<workmad3> shaileshg__: 'Class.new(Person)' creates an anonymous class which is a subclass of Person
<shaileshg__> workmad3: how? can you please explain why it will create anonymous class which is a subclass of person
<workmad3> shaileshg__: because 'Class.new' creates an anonymous, unnamed class
jrhe has joined #ruby
Xeago has quit [Remote host closed the connection]
<shaileshg__> ohk.. and why subclass of person
<shaileshg__> *Person
<workmad3> shaileshg__: because you passed in 'Person' as the superclass
vlad_starkov has joined #ruby
Xeago has joined #ruby
<workmad3> >> Class.new.name
<eval-in> workmad3 => nil (https://eval.in/69747)
<shevy> well
<workmad3> >> class Person; end; Class.new(Person).name
<eval-in> workmad3 => nil (https://eval.in/69748)
<apeiros> >> Class.new { def self.name; "Weeee!"; end }.name
<eval-in> apeiros => "Weeee!" (https://eval.in/69749)
<workmad3> shaileshg__: ^^ as you can see, Class.new(Person) doesn't give the new class the name 'Person' :)
<shevy> cheating!
<workmad3> apeiros: :D
tonni has joined #ruby
<apeiros> if I had one of those libs to draw random emoticons I'd have called my class <<emoticon of the guy throwing a table over>>
<shevy> it must be early in the morning for apeiros because he is totally not-apeiros right now ;-)
aagdbl has quit [Quit: Leaving]
<workmad3> >> Class.new{define_method :class {"I'm an array. Honest!"}}.new.class
<eval-in> workmad3 => /tmp/execpad-50e9b3b7dc7a/source-50e9b3b7dc7a:2: syntax error, unexpected '{', expecting '}' ... (https://eval.in/69752)
<workmad3> heh, oops
<shevy> SYNTAX ERROR!!!
aagdbl has joined #ruby
<apeiros> how am I not apeiros?
<workmad3> >> Class.new{define_method(:class){"I'm an array. Honest!"}}.new.class
<eval-in> workmad3 => "I'm an array. Honest!" (https://eval.in/69753)
blaxter_ is now known as blaxter
<shevy> "Wheee! emoticons" - that's not apeiros!
<apeiros> workmad3: I like how rails does that all the time.
<shevy> what have you done to the real one
<shevy> let's wait how work transforms you
<workmad3> apeiros: 'like' as in "I 'like' the way decaf coffee tastes like shit"?
Advocation has joined #ruby
<Hanmac> asigning a anoymous class to a constant does do magic ,P
<workmad3> apeiros: I especially 'like' explaining to people that no, an association doesn't give you back an Array, it's really something like a HasManyAssociationProxy
<shaileshg__> Hanmac: yes, that case i know.. i was unable to understand this case where you don't assign it to a constant
<shaileshg__> i guess class Person; end also does something similar in the background? Person = Class.new; end
aagdbl has quit [Client Quit]
<Hanmac> shaileshg__:
<Hanmac> >> c = Class.new; n = c.name; Person = c; [n,c.name]
<eval-in> Hanmac => [nil, "Person"] (https://eval.in/69754)
<workmad3> Hanmac: hmm, rules for constant initialization seem to be different from local variable initialization
jhaals_ has joined #ruby
<workmad3> Person = Class.new(Person) gives an uninitialized constant error, while a = Class.new(a) gives a 'superclass must be of type Class (NilClass given)'
<Hanmac> for some magic, a anon class does "know" when its a asigned to a constant *yeah finally i have a name* ;P
sayan has quit [Ping timeout: 245 seconds]
lsmola has joined #ruby
ayaz has quit [Ping timeout: 272 seconds]
<workmad3> Hanmac: some part of constant initialization will do something like 'lhs.name = const_name if lhs.is_a?(Class) && lhs.name.nil?' I suspect :)
jhaals has quit [Ping timeout: 245 seconds]
<Hanmac> yeah ... but its still funky magic ;P
<workmad3> Hanmac: and as it seems like constant initialization is run after the rhs is evaluated, rather than in the case of local vars where the local is initialized before the rhs is evaluated...
TigerWolf has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<workmad3> oh, and that should have been 'rhs' where I put 'lhs' previously :)
<workmad3> Hanmac: it's only magic if you can't see how its done ;) otherwise it's just funky :)
Guest56227 has quit [Ping timeout: 248 seconds]
brandon has joined #ruby
DouweM has quit [Ping timeout: 246 seconds]
<Hanmac> its still cool, like the case when regex literals can create local variables
brandon is now known as Guest34176
ua_ has joined #ruby
benlieb has quit [Quit: benlieb]
zz_jrhorn424 is now known as jrhorn424
TaxmanBD has quit [Ping timeout: 245 seconds]
ua has quit [Ping timeout: 264 seconds]
jbpros has joined #ruby
rickruby has joined #ruby
TaxmanBD has joined #ruby
bigkevmcd has quit [Remote host closed the connection]
jprovazn has joined #ruby
cina has quit [Ping timeout: 272 seconds]
sayan has joined #ruby
kaldrenon has joined #ruby
bigkevmcd has joined #ruby
inad922 has joined #ruby
<inad922> hello
nomenkun has joined #ruby
<inad922> What does the ":" prefix mean in ruby?
<apeiros> inad922: you mean in e.g. :foo ?
<tobiasvl> symbol
<apeiros> it's part of the rest and means it is a Symbol literal
Davey_ has joined #ruby
kevinykchan has joined #ruby
lsmola has quit [Quit: Leaving]
<apeiros> like in "foo" the " belong to the String and mean it's a String literal
eka has joined #ruby
<inad922> apeiros: What's the difference between a symbol and a variable? Symbols have no value?
Davey has quit [Ping timeout: 252 seconds]
<apeiros> inad922: a Symbol is an Object, like a String
lsmola has joined #ruby
<apeiros> a variable is a variable. different concepts.
<tobiasvl> inad922: a symbol IS a value
<tobiasvl> variable = :symbol
<apeiros> Symbols are to be compared with other objects like Strings, Integers, Arrays etc. (you don't ask "what's the difference between a String and a variable?" either)
vlad_sta_ has joined #ruby
<Hanmac> symbols are like fixed strings, working similar to enums in other languages, use String when the content is important, use Symbol when the meaning is important (or something like that)
<inad922> tobiasvl: So it's a constructor syntactic sugar for a special class?
timonv has quit [Read error: Connection reset by peer]
<apeiros> inad922: it's a *literal*
<apeiros> that's what that word means.
<apeiros> like 12 is a literal, or "foobar" is a literal.
<tobiasvl> inad922: "this is a string literal" vs :"this is a symbol literal"
<tobiasvl> or :this_is_a_symbol_literal
timonv has joined #ruby
<apeiros> literal means the value is written directly in the code, it is not the result of a method call or otherwise constructed.
<Hanmac> inad922: yes and no ... like some other classes like Fixnum or Bignum, the Symbol class does not have a constructor
<inad922> So mainly these are string literals only to point to something.
<tobiasvl> not sure what you mean by "point to something"
kaldrenon has quit [Ping timeout: 264 seconds]
<tobiasvl> but yes, they are like immutable string literals in a way
maroloccio has joined #ruby
zipper has quit [Ping timeout: 248 seconds]
<apeiros> inad922: no. they are NOT string literals.
Guest30088 is now known as ageis
robertjpayne has joined #ruby
<apeiros> they are *Symbol* literals.
<apeiros> >> :foo.class
<eval-in> apeiros => Symbol (https://eval.in/69765)
<apeiros> >> "foo".class
<eval-in> apeiros => String (https://eval.in/69766)
<robertjpayne> Is it possible to catch missing methods on the class level?
<apeiros> robertjpayne: yes
<robertjpayne> apeiros: is it the same method_missing? just self.method_missing?
<workmad3> robertjpayne: bingo :)
vlad_starkov has quit [Ping timeout: 245 seconds]
zipper has joined #ruby
ewnd9 has joined #ruby
<robertjpayne> Will it fire in a parent class? Having trouble getting it to work =\
<inad922> tobiasvl: So from the document you linked I see that Symbols are just syntactic sugar for globally defined immutable strings.
<apeiros> robertjpayne: it's subject to all the normal method inheritance mechanics as any other method.
* apeiros gives up telling inad922 that Symbols are *not* Strings
<Hanmac> hihi good that i didnt show the new one the hybird of symbol and string ... the frozen string literals ;P
<apeiros> inad922: Symbols are as much "syntactic sugar for globally defined immutable Strings" as Integers are "syntactic sugar for globally defined immutable Strings"
hogeo has joined #ruby
<apeiros> (which means they're not)
<Grundell> so i have this text that i want to fetch... http://data.riksdagen.se/dokument/H00310/ do i use regex in order to take out the data or do i do something else ?
<inad922> apeiros: They are strings. Even the explanation page says that. They are just immutable and global(aka pointing to the same memory address)
<apeiros> inad922: NO.
<apeiros> a symbol has a string representation.
<apeiros> just as an integer does.
<apeiros> but neither is a symbol a string, nor is an integer a string.
<workmad3> Hanmac: one minor difference... you can dup a frozen string to get an unfrozen string :)
* apeiros off for lunch
tonni has quit [Remote host closed the connection]
tonni has joined #ruby
<inad922> apeiros: I really don't see any difference in usage from the observation I've made based on the page.
<Hanmac> workmad3: yeah right, i should make a compare table about "string <-> fstring <-> symbol" whats the difference and what they have common
<apeiros> inad922: do you consider integers to be globally defined immutable strings?
<apeiros> if not: why not? apply same reasoning to symbols.
<apeiros> I'm done here.
jb41 has joined #ruby
<robertjpayne> gah programmer error :P
<workmad3> Hanmac: well, a frozen string is still just a string, but with .freeze called on it
<workmad3> Hanmac: in the same way that random_thing.freeze is still a random thing, just frozen ;)
<Hanmac> workmad3: no i mean the fstring literals ... they share object ids with other fstring literals with the same content
<workmad3> Hanmac: or does the interpreter intern frozens string literals?
<workmad3> *frozen
vlad_sta_ has quit [Remote host closed the connection]
hogeo_ has joined #ruby
hogeo has quit [Read error: Connection reset by peer]
tonni has quit [Read error: Connection reset by peer]
<Hanmac> >> a = "fstring"f; b = "fstring"f; a.object_id == b.object_id
<eval-in> Hanmac => /tmp/execpad-7af23fdccf3e/source-7af23fdccf3e:2: syntax error, unexpected tIDENTIFIER, expecting keyword_end ... (https://eval.in/69767)
<Hanmac> workmad3: that returns true in 2.1+
ValicekB has quit [Ping timeout: 248 seconds]
<tobiasvl> there you go
<workmad3> Hanmac: ah, so similar to bigints :)
<workmad3> >> a = 1000000000000000000.object_id; b = 1000000000000000000.object_id; a == b
<eval-in> workmad3 => false (https://eval.in/69768)
<workmad3> heh :) I just got true for that in irb
cina has joined #ruby
aa47f8 has joined #ruby
vlad_starkov has joined #ruby
<Hanmac> workmad3: hm maybe its because of flonum too? what ruby version does your irb has? and you need to be remember that:
<Hanmac> >> require "rbconfig"; RbConfig::CONFIG["host"]
<eval-in> Hanmac => "i686-pc-linux-gnu" (https://eval.in/69769)
<Hanmac> evalin runs on 64 bit ... so flonum and similar is disabled there
<Hanmac> i mean it does not
<workmad3> I'm running on 64 bit OS X
<workmad3> ruby-installed 2.0.0
<workmad3> Hanmac: ah, so it's not something that's done in 32 bit ruby? :)
ExxKA has joined #ruby
sergicles has joined #ruby
porco has quit [Quit: Linkinus - http://linkinus.com]
stetho has joined #ruby
zoee has quit [Quit: This computer has gone to sleep]
<inad922> tobiasvl: I see. I come from the python word so for me it's natural to interpret it this way. I understand that the class of the symbol is different but based on the use cases I classify it in the way I already mentioned.
<Hanmac> workmad3: https://bugs.ruby-lang.org/issues/6763 there is flonum ... its for Float, but i think its similar to bignum at this place
amacgregor_ has joined #ruby
bradhe has joined #ruby
banister has joined #ruby
<Hanmac> workmad3: Flonum is also the reason why compiled gems from 1.9 does not work with 2.0+
amacgregor has quit [Ping timeout: 246 seconds]
<workmad3> :)
TaxmanBD has quit [Ping timeout: 245 seconds]
<tobiasvl> inad922: okay, i don't know if python has symbols or not, but as you can see from that wikipedia article they're far from a ruby-specific type.
aagdbl has joined #ruby
andrewh has joined #ruby
<inad922> tobiasvl: Yes, but what do you use them for? I mean other than keys in hashes and maybe storing values that need to be accessed on a global level?
<inad922> + don't change
postmodern has quit [Quit: Leaving]
blackmesa has quit [Ping timeout: 240 seconds]
ValicekB has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
<Hanmac> inad922: its also because of the memory and the access ... a million times the same string takes a million times the same size in memory ... an million times the same symbol only takes the size of one
<andrewh> Who knows what the Data class is there for? It appers to be just a thin wrapper around Object.
<tobiasvl> inad922: oh, lots! for example labels. see for example this idiom: http://stackoverflow.com/questions/1961030/ruby-ampersand-colon-shortcut
kaspergrubbe has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
cibs has quit [Quit: leaving]
<tobiasvl> and one thing you'll see symbols in a lot is attr: http://www.ruby-doc.org/core-2.0.0/Module.html#method-i-attr_accessor
zeeraw has joined #ruby
<Hanmac> andrewh its a failsafe for objects from combiled bindings when you try to bind an C(++) object against a ruby class that does not exist ... (then it gets the DATA class) ... that that i have seen
jibi has joined #ruby
noop has quit [Ping timeout: 265 seconds]
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
falood has joined #ruby
<inad922> tobiasvl: Hmm can I do something like :symbol = { |i| puts " #{i}" }
hololeap has joined #ruby
yjmsf20 has joined #ruby
<inad922> ah nah
<inad922> ok it's a value I'm confused again
<Hanmac> inad922: in newer ruby you can use symbols also in methods:
<Hanmac> >> def plus(a: nil,b: nil); a + b;end; plus(b: 1, a: 3)
<eval-in> Hanmac => 4 (https://eval.in/69776)
DoNcK has quit [Quit: Leaving.]
khushildep has joined #ruby
LiquidIn1ect has quit [Ping timeout: 268 seconds]
LiquidInsect has joined #ruby
stetho has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jeremywrowe has joined #ruby
neonlex has quit [Ping timeout: 246 seconds]
zipper is now known as rusty
rusty is now known as rusty_
cina has quit [Ping timeout: 240 seconds]
beermouse has quit [Quit: beermouse]
cibs has joined #ruby
amritanshu_RnD has quit [Quit: Leaving]
Hanmac1 has joined #ruby
Guest34176 has quit [Ping timeout: 272 seconds]
funburn has quit [Quit: funburn]
noop has joined #ruby
Hanmac has quit [Ping timeout: 246 seconds]
tommyvyo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kaspergrubbe has joined #ruby
brtdv has quit []
mercwithamouth has joined #ruby
DaniG2k has joined #ruby
sichardrtallman has joined #ruby
<andrewh> Hanmac1 / Hanmac: cheers :)
Grundell has quit [Read error: Connection reset by peer]
zoee has joined #ruby
aagdbl has quit [Quit: Leaving.]
guest544 has joined #ruby
drumusician has quit [Ping timeout: 245 seconds]
drumusician has joined #ruby
TaxmanBD has joined #ruby
Hanmac has joined #ruby
N00D is now known as zz_N00D
zarubin has joined #ruby
guest544 has quit [Remote host closed the connection]
Hanmac1 has quit [Ping timeout: 246 seconds]
amacgregor has joined #ruby
aagdbl has joined #ruby
amacgregor_ has quit [Ping timeout: 245 seconds]
brtdv has joined #ruby
brandon has joined #ruby
brandon is now known as Guest6648
amacgregor has quit [Ping timeout: 246 seconds]
popl has quit [Quit: And then there are people who prefer to look their fate in the eye.]
axilla has joined #ruby
beermouse has joined #ruby
timonv has quit [Remote host closed the connection]
sichardrtallman has quit [Quit: leaving]
beermouse_ has joined #ruby
beermouse has quit [Ping timeout: 240 seconds]
beermouse_ is now known as beermouse
barratt has joined #ruby
beermouse has quit [Client Quit]
<shevy> when you use .add_dependency
<shevy> in .gemspec
<shevy> you only specify external dependencies right?
<shevy> not things like 'fileutils' or 'pp'
beermouse has joined #ruby
Soda has joined #ruby
jbpros has quit [Quit: jbpros]
Ox6abe has joined #ruby
mojjojo has joined #ruby
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
daxroc has joined #ruby
bradhe has joined #ruby
danshultz has joined #ruby
beermouse has quit [Quit: beermouse]
jalcine has quit [Excess Flood]
newUser1234 has joined #ruby
ewnd9 has quit [Ping timeout: 252 seconds]
atrocita_ has quit [Remote host closed the connection]
mojjojo has quit [Client Quit]
lkba has joined #ruby
havenwood has quit [Ping timeout: 252 seconds]
beermouse has joined #ruby
LiquidInsect has quit [Ping timeout: 264 seconds]
bradhe has quit [Ping timeout: 248 seconds]
daxroc has quit [Ping timeout: 264 seconds]
Liothen has quit [Ping timeout: 252 seconds]
mojjojo has joined #ruby
LiquidInsect has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
tonni has joined #ruby
TaxmanBD has quit [Ping timeout: 245 seconds]
newUser1234 has quit [Ping timeout: 272 seconds]
MattStratton has joined #ruby
rickruby has quit [Remote host closed the connection]
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
Ox6abe has quit [Remote host closed the connection]
Bry8Star{T2 has joined #ruby
hogeo_ has quit [Remote host closed the connection]
emocakes has joined #ruby
akonny has quit [Quit: akonny]
ValicekB has quit [Ping timeout: 248 seconds]
rdark has quit [Ping timeout: 272 seconds]
weszlem has quit []
Asher1 has quit [Quit: Leaving.]
lemonsparrow has joined #ruby
rdark has joined #ruby
funburn has joined #ruby
polaco_zZz is now known as polaco
Hanmac1 has joined #ruby
jalcine has joined #ruby
timonv has joined #ruby
cina has joined #ruby
Hanmac has quit [Ping timeout: 245 seconds]
mklappstuhl has quit [Remote host closed the connection]
xk_id has joined #ruby
tvw has joined #ruby
xcess_denied has quit [Quit: Leaving...]
Grundell has joined #ruby
aagdbl has quit [Quit: Leaving.]
fedalto has joined #ruby
TaxmanBD has joined #ruby
fedalto has quit [Client Quit]
cina has quit [Ping timeout: 264 seconds]
dhruvasagar has quit [Read error: Operation timed out]
<Grundell> So i have a bunch of files that looks like this one http://data.riksdagen.se/dokument/H00312/text i want to make them indaxeble and searchable... my idea is to use som type of regex in order to get the information that i want out... is anyone able to tell me where to start ?
zarubin has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby
coderhs has joined #ruby
sandeepk has quit [Quit: Leaving...]
flops has joined #ruby
drumusician has quit [Ping timeout: 272 seconds]
dhruvasagar has quit [Ping timeout: 264 seconds]
funburn has quit [Quit: funburn]
ValicekB has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
danshultz has joined #ruby
weszlem has joined #ruby
pskosinski has joined #ruby
jeremywrowe has quit [Ping timeout: 265 seconds]
jeremywrowe has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Asher has joined #ruby
jibi has quit [Quit: Reconnecting]
jrhe has quit [Quit: jrhe]
jibi has joined #ruby
ValicekB has quit [Ping timeout: 252 seconds]
<Grundell> anyone onlie?
supergeek has joined #ruby
Astralum has quit [Read error: Connection timed out]
konrads has joined #ruby
<tobiasvl> Grundell: what info are you trying to get out?
<tobiasvl> what have you thought up so far?
<tobiasvl> it's hard to help you when all you have is the input :)
<konrads> Hello. I am writing a client program using eventmachine and I need to maintain state - know where the program is in terms of progressing with the messages
n1x has quit [Ping timeout: 265 seconds]
<konrads> e.g. has it logged on, does it need to retry login, etc
MattStratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Grundell> Give me a sec... ill show a rubular of what im trying to get...
<konrads> is there an EM way of doing this?
sevenseacat has joined #ruby
DoNcK has joined #ruby
Asher has quit [Ping timeout: 264 seconds]
Asher has joined #ruby
soba has quit [Ping timeout: 245 seconds]
<Grundell> tobiasvl: http://rubular.com/r/NSHFa5Q7CB so to start im trying to cature the fallowing...
raphaelivan has quit [Quit: Leaving.]
<Grundell> tobiasvl: I've written what i want to capture within <this> ..... </this> so you'll understand
rdark has quit [Ping timeout: 245 seconds]
Hanmac1 is now known as Hanmac
bradhe has joined #ruby
jeremywrowe has quit [Ping timeout: 245 seconds]
<Grundell> I assume that i should like take out parts and make chop it up to smaller reg exes... since the original file is huge... but by starting with this I can understand better how i match the patterns when it comes to larger text masses...
rdark has joined #ruby
<Grundell> text bodies**
mklappstuhl has joined #ruby
ValicekB has joined #ruby
konrads has quit [Ping timeout: 272 seconds]
jeremywrowe has joined #ruby
<tobiasvl> well, some of these are easy. if <prep> is always the first line, just take that. <ID> is just /\((\d{4}\/\d{2}:\d{2})\)/
<tobiasvl> but how will you match on the names in <who>?
<tobiasvl> what separates them?
<tobiasvl> you need to think about your body of text and classify the things you want to extract
osvico has joined #ruby
<Grundell> Well for example with the <who> its a line Break
<Grundell> and it comes after the date, before the department that is within () always...
bradhe has quit [Ping timeout: 265 seconds]
<tobiasvl> great! then work with that
<Grundell> Yeah, but how do i do to capture something that is after this but before that in regex ?=
mojjojo has quit [Quit: mojjojo]
Bry8Star{T2_ has joined #ruby
godd2 has joined #ruby
mklappstuhl has quit [Ping timeout: 264 seconds]
joonty_ has joined #ruby
mojjojo has joined #ruby
daxroc has joined #ruby
obs has quit [Remote host closed the connection]
<godd2> I know that 3.method(:+).call(2) is the same as 3 + 2, but what is the same as class MyClass < ParentClass ? Anyone know where I can find out what's -actually- happening in the syntactic sugar of subclassing?
jibi has quit [Quit: .]
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
joonty has quit [Ping timeout: 272 seconds]
<apeiros> godd2: those two are not the same. 3.method(:+).call(2) does a lot more than plain 3 + 2
akonny has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
<Hanmac> godd2: MyClass = Class.new(ParentClass)
<apeiros> godd2: an alternative way to write class MyClass < ParentClass is MyClass = Class.new(ParentClass), but that too does different things
Xeago has joined #ruby
skaflem has joined #ruby
<godd2> noted
<godd2> and thank you for that alternative form
zz_N00D is now known as CripperZ
<godd2> Is there a way to trick MRI into letting me subclass Class?
<apeiros> probably not
Soda has quit [Remote host closed the connection]
CripperZ is now known as N00D
pixelgremlins has joined #ruby
<Hanmac> apeiros: what do you think of this?
<Hanmac> >> class Bla < Module; end; b= Bla.new; Object.new.extend(b)
<eval-in> Hanmac => #<Object:0x418590e4> (https://eval.in/69810)
<Hanmac> now i need to find a usecase ,P
Apane has joined #ruby
emocakes has quit [Quit: Leaving...]
<Grundell> tobiasvl: why can't i even catch the first line ?
<apeiros> there was a blog post which showed some use cases for inheriting module
Kneferilis has quit [Quit: Leaving]
<beermouse> sounds like abuse cases :)
Astralum has joined #ruby
Reach has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
MetaCosm has quit [Quit: ZNC - http://znc.in]
<hololeap> Grundell: is that the actual input you will be working with? why is the <prep> element closed with </prep-name> and why is <ID> closed with <ID> (and not </ID>)?
robbyoconnor has quit [Ping timeout: 264 seconds]
zodiak has quit [Ping timeout: 272 seconds]
nvrch has quit [Read error: Operation timed out]
<godd2> haha, I thought "TypeError: can't make subclass of Class" was grumpy enough, but trying to redefine Class::new(super_class) makes IRB crash on site
<hololeap> Grundell: http://rubular.com/r/rxkWIdXwPe
xk_id has quit [Quit:
nvrch has joined #ruby
jeremywrowe has quit [Quit: Lost terminal]
mojjojo has quit [Quit: mojjojo]
supergeek has quit [Quit: Leaving]
zoee has quit [Quit: This computer has gone to sleep]
drumusician has joined #ruby
Kneferilis has joined #ruby
aganov has quit [Ping timeout: 245 seconds]
Asher has quit [Quit: Leaving.]
tagrudev has quit [Ping timeout: 272 seconds]
aganov has joined #ruby
jlast has joined #ruby
inad922 has quit [Ping timeout: 260 seconds]
hashpuppy has joined #ruby
mmitchell has joined #ruby
MattStratton has joined #ruby
mklappstuhl has joined #ruby
zoee has joined #ruby
TaxmanBD has quit [Ping timeout: 245 seconds]
jlast has quit [Ping timeout: 272 seconds]
stetho has joined #ruby
MattStratton has quit [Read error: Connection reset by peer]
osvico has quit [Ping timeout: 245 seconds]
Astralum has quit [Read error: Connection timed out]
ravster has joined #ruby
BizarreCake has joined #ruby
xk_id has joined #ruby
tziOm has joined #ruby
daxroc has quit [Ping timeout: 248 seconds]
mrfoto has quit []
kaspergrubbe has quit [Remote host closed the connection]
tagrudev has joined #ruby
Morkel has joined #ruby
<Morkel> Is it possible to acces websockets with ruby?
Davey has joined #ruby
stringoO has joined #ruby
Davey_ has quit [Ping timeout: 240 seconds]
kaspergrubbe has joined #ruby
pixelgremlins has quit [Ping timeout: 252 seconds]
<_br_> Morkel: Faye is nice.
jrhe has joined #ruby
<Morkel> _br_: i need a client for a websocket api
Astralum has joined #ruby
falood has quit [Remote host closed the connection]
falood has joined #ruby
falood has quit [Remote host closed the connection]
beermouse has quit [Quit: beermouse]
konrads has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
mklappst_ has joined #ruby
sailias has joined #ruby
zodiak has joined #ruby
PPH has quit [Quit: Quitte]
Mattx has joined #ruby
<Mattx> Hi
sambao21 has joined #ruby
mklappstuhl has quit [Ping timeout: 246 seconds]
<Mattx> what's the problem with the following regexp? "foo -bar xux".scan /(?<=(^|\s))(\w+)(?=(\s|$))/
<Mattx> I want to get foo and xux but not bar
bradhe has joined #ruby
<Mattx> ERROR: SyntaxError: (irb):100: invalid pattern in look-behind: /(?<=(^|\s))(\w+)(?=(\s|$))/
<Mattx> the look-ahead pattern is fine though
kaldrenon has joined #ruby
drumusician has quit [Remote host closed the connection]
<_br_> Morkel: Whats wrong then with libwebsocket or websocket gem?
ananthakumaran has quit [Quit: Leaving.]
<_br_> Mattx: Try rubular.
sambao21 has quit [Client Quit]
Macaveli has joined #ruby
<Mattx> same error
<apeiros> Mattx: look-behind must not have alternations, must not have quantifiers either.
<Mattx> oh, why is that?
drumusician has joined #ruby
<Mattx> it's boring without alternations :P
<apeiros> you want me to reproduce regex automata theory? :)
<Mattx> I suppose it's expensive to compute
beermouse has joined #ruby
Asher has joined #ruby
<apeiros> it's because this engine can't deal with it.
<apeiros> or because this engine doesn't allow it.
<Mattx> well, I could have guessed that but that's not a "reason"
sambao21 has joined #ruby
<Mattx> anyway, it doesn't allow it, so I need to rewrite it
<jwest> Mattx: Also, if that's a good example string, why not use split?
<Mattx> "foo -bar xux".scan /\b(\w+)\b/
Astralum has quit [Ping timeout: 240 seconds]
<Mattx> this is what I'm trying to do, but \b must be a space or the beginning/end of the string
bradhe has quit [Ping timeout: 272 seconds]
<Mattx> not - as in "-bar"
<rjhunter> >> "foo -bar xux".split.grep /\b(\w+)\b/
<eval-in> rjhunter => ["foo", "-bar", "xux"] (https://eval.in/69814)
<rjhunter> oops
<Mattx> I guess the best I can do is: "foo -bar xux".scan /(^|\s)(\w+)(?=(\s|$))/
mjs2600 has joined #ruby
<Mattx> >> "foo -bar xux".scan /(^|\s)(\w+)(?=(\s|$))/
<eval-in> Mattx => [["", "foo", " "], [" ", "xux", ""]] (https://eval.in/69815)
<Mattx> this is the expected result ^
<Mattx> never mind, I'm going to use /(^|\s)(\w+)(?=(\s|$))/, it's fine
<Mattx> oh, I have another question. is there a modifier to match special chars like spanish accents with \w ?
vpretzel has joined #ruby
jonathanwallace has joined #ruby
<Mattx> I don't want to list all spacial cases, áéíóúñü etc
robbyoconnor has joined #ruby
hashpuppy has quit [Quit: Computer has gone to sleep.]
cody-- has joined #ruby
Al_ has joined #ruby
Squarepy has quit [Ping timeout: 272 seconds]
hashpuppy has joined #ruby
<rjhunter> Mattx: \p{Alpha}
<apeiros> \p{Letter}
<apeiros> is IMO closer to \w
<apeiros> Mattx: ri Regexp
<apeiros> it has a good list
Apane has quit [Ping timeout: 245 seconds]
<Hanmac> you can also use [[:Alpha:]] or [[:Letter:]], its similar to the \p{} variant
<Hanmac> or?
mojjojo has joined #ruby
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
jrhe has quit [Quit: jrhe]
<Mattx> let me check
<Mattx> [:alnum:] seems to be the closest
relix has joined #ruby
<Mattx> or \p{Alnum}
jrhe has joined #ruby
anderse has quit [Quit: anderse]
<Mattx> thank you!
<rjhunter> >> foo -bar pána xux".split.grep /^[[:alnum:]]+$/
<eval-in> rjhunter => /tmp/execpad-16c9fe415b6f/source-16c9fe415b6f:2: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '(' ... (https://eval.in/69818)
<rjhunter> works for me :-)
<rjhunter> >> "foo -bar pána xux".split.grep /^[[:alnum:]]+$/
<eval-in> rjhunter => ["foo", "pána", "xux"] (https://eval.in/69819)
<rjhunter> if i could paste properly
nowthatsamatt has joined #ruby
kindjal has joined #ruby
relix has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
relix has joined #ruby
Squarepy has joined #ruby
jmimi has joined #ruby
benet has quit [Remote host closed the connection]
pixelgremlins has joined #ruby
konrads1 has joined #ruby
timonv has quit [Remote host closed the connection]
konrads1 has left #ruby [#ruby]
mengu has quit [Remote host closed the connection]
timonv has joined #ruby
joonty_ is now known as joonty
ayaz has joined #ruby
ayaz has quit [Changing host]
ayaz has joined #ruby
fijimunkii has joined #ruby
Advocation has quit [Quit: Advocation]
konrads has quit [Ping timeout: 272 seconds]
kristofers has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
JonahR has quit [Quit: jonahR]
Apane has joined #ruby
kreantos has joined #ruby
salmonax has joined #ruby
krawchyk has joined #ruby
elux has joined #ruby
Astralum has joined #ruby
cafhacker has joined #ruby
weszlem has quit []
weszlem has joined #ruby
_maes_ has joined #ruby
inad922 has joined #ruby
jtzero has joined #ruby
jtzero has left #ruby [#ruby]
fuhgeddaboudit has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
mikecmpbll has joined #ruby
finnomenon has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
mercwithamouth has joined #ruby
kcombs has joined #ruby
dhruvasagar has joined #ruby
robbyoconnor has quit [Write error: Connection reset by peer]
bklane has joined #ruby
jrhe has quit [Quit: jrhe]
s2013 has joined #ruby
MrPot4to has joined #ruby
MrPotato has joined #ruby
blaskovicz has joined #ruby
<blaskovicz> so with ruby, i can define a class, instantiate an object of that class, and then define a mixin and the class that was instantiated will hav eit?
kindjal has quit [Quit: Computer has gone to sleep.]
jlast has joined #ruby
hashpuppy has left #ruby ["Textual IRC Client: www.textualapp.com"]
nari has quit [Ping timeout: 241 seconds]
<Grundell> How do I make it to be one or more of the <person> ? http://rubular.com/r/ZBHYpNH34J
newUser1234 has joined #ruby
mlpinit has joined #ruby
jibi has joined #ruby
bradhe has joined #ruby
randomnick_ has joined #ruby
bean has joined #ruby
jlast has quit [Ping timeout: 248 seconds]
ezkl has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
fgo has quit [Remote host closed the connection]
tkuchiki has joined #ruby
newUser1_ has joined #ruby
newUser1234 has quit [Read error: No route to host]
endash has joined #ruby
kristofers has quit [Remote host closed the connection]
jkamenik has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.4.1]
bradhe has quit [Ping timeout: 248 seconds]
jkamenik has left #ruby [#ruby]
eka has quit [Quit: Textual IRC Client: www.textualapp.com]
jkamenik has joined #ruby
eka has joined #ruby
yfeldblum has joined #ruby
jonathanwallace has joined #ruby
Thanatermesis has joined #ruby
Thanatermesis has quit [Changing host]
Thanatermesis has joined #ruby
newUser1_ has quit [Ping timeout: 240 seconds]
duggiefresh has joined #ruby
s2013 has quit [Remote host closed the connection]
aloshkarev has joined #ruby
mengu has quit [Read error: No route to host]
mengu has joined #ruby
Vivekananda has joined #ruby
tannerburson has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
h_kon has quit [Remote host closed the connection]
Snugug has joined #ruby
h_kon has joined #ruby
aloshkarev has quit [Client Quit]
jlebrech has joined #ruby
<Snugug> Hey, I'm trying to write a custom test runner following the instructions http://endofline.wordpress.com/2008/02/11/a-custom-testrunner-to-scratch-an-itch/ (can't find anything newer online and it's really bugging me) and when I try and run it, I'm getting `uninitialized constant Test::Unit::AutoRunner::RUNNERS (NameError)`. Can anyone help me out? I'm on Ruby ruby 2.0.0p247
Kilo`byte has quit [Ping timeout: 272 seconds]
Gwyxx has joined #ruby
vlad_starkov has joined #ruby
DoNcK1 has joined #ruby
h_kon has quit [Ping timeout: 245 seconds]
daxroc has joined #ruby
sandeepk has joined #ruby
DoNcK has quit [Ping timeout: 245 seconds]
hiroyuki has joined #ruby
hiroyuki has quit [Remote host closed the connection]
sbos99 has quit [Quit: Leaving]
sevenseacat has quit [Remote host closed the connection]
Kilo`byte has joined #ruby
camilasan has quit [Remote host closed the connection]
baordog has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
h_kon has joined #ruby
jacobsmith has joined #ruby
daxroc has quit [Ping timeout: 246 seconds]
camilasan has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
evenix has joined #ruby
tonni has quit [Remote host closed the connection]
tonni has joined #ruby
interactionjaxsn has joined #ruby
hopkin has joined #ruby
camilasan has joined #ruby
camilasan has quit [Read error: No route to host]
jacobsmith has quit [Quit: leaving]
freezey has joined #ruby
danshultz has quit [Remote host closed the connection]
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
lukec has joined #ruby
danielcharles has joined #ruby
danshultz has joined #ruby
Hanmac1 has joined #ruby
Thanatermesis has joined #ruby
s2013 has joined #ruby
danshult_ has joined #ruby
pothibo has joined #ruby
kindjal has joined #ruby
johnnyfuchs has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
shredding has quit [Quit: shredding]
iamjarvo has quit [Remote host closed the connection]
tonni has quit [Ping timeout: 252 seconds]
Hanmac has quit [Ping timeout: 265 seconds]
camilasan has joined #ruby
iamjarvo has joined #ruby
h_kon has quit [Remote host closed the connection]
jacobsmith has joined #ruby
jacobsmith has left #ruby [#ruby]
jerius has joined #ruby
newbiehacker has joined #ruby
claymore has quit [Quit: Leaving]
msuszczy has joined #ruby
newUser1234 has joined #ruby
Ox6abe has joined #ruby
h_kon has joined #ruby
fmcgeough has joined #ruby
kcantwel has joined #ruby
newUser1234 has quit [Read error: Connection reset by peer]
konrads has joined #ruby
newUser1234 has joined #ruby
w4pm has quit [Ping timeout: 248 seconds]
w4pm has joined #ruby
sriehl has joined #ruby
krawchyk has quit []
g0bl1n has joined #ruby
g0bl1n has joined #ruby
ValicekB has quit []
claymore has joined #ruby
cafhacker has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
h_kon has quit [Ping timeout: 246 seconds]
MetaCosm has joined #ruby
jelle has joined #ruby
jelle has quit [Client Quit]
rusty_ has quit [Quit: Lost terminal]
DouweM has joined #ruby
newUser1234 has quit [Ping timeout: 272 seconds]
aagdbl has joined #ruby
jerius has quit [Quit: Computer has gone to sleep.]
Advocation has joined #ruby
timonv has joined #ruby
DoNcK1 has quit [Ping timeout: 245 seconds]
amund_ has joined #ruby
newUser1234 has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
MrPot4to has quit [Remote host closed the connection]
MrPotato has quit [Read error: Connection reset by peer]
kindjal has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Remote host closed the connection]
Ox6abe has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 264 seconds]
ewnd9 has joined #ruby
amund_ has quit [Quit: Textual IRC Client: www.textualapp.com]
marr has quit [Ping timeout: 272 seconds]
amund_ has joined #ruby
Rickmasta has joined #ruby
jacobsmith has joined #ruby
xcess_denied has joined #ruby
macmartine has joined #ruby
vlad_starkov has joined #ruby
kaspergrubbe has joined #ruby
typicalbender has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
beermouse has quit [Quit: beermouse]
i_s has joined #ruby
Soda has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
sandeepk has quit [Read error: Connection reset by peer]
macmartine has quit [Remote host closed the connection]
sambao21 has quit [Ping timeout: 264 seconds]
rdark has quit [Ping timeout: 246 seconds]
corehook has joined #ruby
<_br_> Snugug: Not very familiar with the libs use use, but the error seems to indicate that you might be missing some libs, or maybe the libs changed and the example code you are using is out of date.
corehook has left #ruby [#ruby]
Ox6abe has joined #ruby
sambao21 has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
lfox has joined #ruby
Macaveli has joined #ruby
wildroman has quit []
<Snugug> _br_: The example code is most definitely out of date, from 2008, but there doesn't seem to be better documentation anywhere for creating a custom task runner for unit testing.
<Snugug> And it fails to tell us what version of Ruby it's using (the site)
DoNcK has joined #ruby
wallerdev has joined #ruby
Mattx has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
noop has quit [Ping timeout: 245 seconds]
jerius has joined #ruby
Squarepy has quit [Ping timeout: 246 seconds]
jkamenik has quit [Ping timeout: 240 seconds]
<_br_> Snugug: well its its from 2008 probably 1.8 MRI
<Snugug> Yah :\
mmitchell has quit [Remote host closed the connection]
<_br_> Snugug: Ok, that means then that you are using the lib maybe wrong since the example is out of date.
mmitchell has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
_maes_ has quit [Read error: Connection reset by peer]
asobrasil has joined #ruby
<_br_> Snugug: You might need to crawl around in the source to understand how to update the example you have
lfox has quit [Ping timeout: 248 seconds]
Macaveli has joined #ruby
CaptainJet has joined #ruby
Kilo`byte has quit [Ping timeout: 272 seconds]
<Snugug> Yah, thanks
deception has joined #ruby
corehook has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
corehook has quit [Max SendQ exceeded]
ckinni has joined #ruby
i_s has quit [Remote host closed the connection]
corehook has joined #ruby
corehook has quit [Max SendQ exceeded]
sayan has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
i_s has joined #ruby
corehook has joined #ruby
corehook has quit [Max SendQ exceeded]
kindjal has joined #ruby
corehook has joined #ruby
corehook has quit [Max SendQ exceeded]
Davey has quit [Read error: Connection reset by peer]
Kilo`byte has joined #ruby
corehook has joined #ruby
thesheff17 has joined #ruby
ananthakumaran has joined #ruby
Soda has quit [Read error: Connection reset by peer]
aagdbl has quit [Quit: Leaving.]
axilla has quit [Ping timeout: 264 seconds]
awarner_ has joined #ruby
ValicekB has joined #ruby
corehook has quit [Client Quit]
lukec has quit [Quit: lukec]
matled- has joined #ruby
awarner has quit [Read error: Operation timed out]
i_s has quit [Remote host closed the connection]
patronus_ has joined #ruby
jerius has quit [Quit: Computer has gone to sleep.]
TheHodge_ has joined #ruby
artm has joined #ruby
Davey has joined #ruby
ffranz has joined #ruby
enebo has joined #ruby
sguselnikov has joined #ruby
ce_afk is now known as cescalante
amoli has quit [Ping timeout: 272 seconds]
wuest_ has joined #ruby
kaichanvong___ has joined #ruby
shaman42_ has joined #ruby
parus_ has joined #ruby
kpmjf has joined #ruby
Weazy_ has joined #ruby
Skelz0r_ has joined #ruby
Jb___ has joined #ruby
Jamo_ has joined #ruby
rtl_ has joined #ruby
Rydekull_ has joined #ruby
zaycheno1 has joined #ruby
bnagy_ has joined #ruby
Sourcele1s_ has joined #ruby
peteyg__ has joined #ruby
monomyth_ has joined #ruby
kristofers has joined #ruby
NexSeven has joined #ruby
Sp4rKy_ has joined #ruby
XenoWolf_ has joined #ruby
ReinH_ has joined #ruby
shredding has joined #ruby
axl_ has joined #ruby
thelorax123 has quit [Remote host closed the connection]
jacobsmith has left #ruby [#ruby]
ringaroses has joined #ruby
jacobsmith has joined #ruby
thelorax123 has joined #ruby
Mattx has joined #ruby
Astralum has quit [Ping timeout: 252 seconds]
bretolius has joined #ruby
Tobarja_yikes has joined #ruby
erichmenge_ has joined #ruby
erichmenge_ has quit [Changing host]
erichmenge_ has joined #ruby
Azure|dc has joined #ruby
stetho has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x0nic_ has joined #ruby
mikemar10_ has joined #ruby
cjk101010_ has joined #ruby
edwardly_ has joined #ruby
Azure|dc has quit [Changing host]
Azure|dc has joined #ruby
shredding has quit [Client Quit]
jso_ has joined #ruby
Atlantic778 has joined #ruby
blotchy has quit [*.net *.split]
shevy has quit [*.net *.split]
bret has quit [*.net *.split]
edwardly has quit [*.net *.split]
peteyg_ has quit [*.net *.split]
parus has quit [*.net *.split]
Skelz0r has quit [*.net *.split]
TheHodge has quit [*.net *.split]
XenoWolf has quit [*.net *.split]
DanielRb has quit [*.net *.split]
kaichanvong has quit [*.net *.split]
rtl has quit [*.net *.split]
geggam_ has quit [*.net *.split]
Atlantic777 has quit [*.net *.split]
Tobarja has quit [*.net *.split]
yosafbridge has quit [*.net *.split]
Jelco has quit [*.net *.split]
Weazy has quit [*.net *.split]
Sp4rKy has quit [*.net *.split]
x0nic has quit [*.net *.split]
monomyth has quit [*.net *.split]
andrewvos has quit [*.net *.split]
kpmjf_ has quit [*.net *.split]
erichmenge has quit [*.net *.split]
zaychenok has quit [*.net *.split]
bnagy has quit [*.net *.split]
Azure has quit [*.net *.split]
jso has quit [*.net *.split]
dominikh has quit [*.net *.split]
matled has quit [*.net *.split]
Nex7 has quit [*.net *.split]
cjk101010 has quit [*.net *.split]
mikemar10 has quit [*.net *.split]
Jb____ has quit [*.net *.split]
wuest has quit [*.net *.split]
optikal has quit [*.net *.split]
ReinH has quit [*.net *.split]
Sourceless has quit [*.net *.split]
patronus has quit [*.net *.split]
Rydekull has quit [*.net *.split]
Jamo has quit [*.net *.split]
shaman42 has quit [*.net *.split]
jso_ is now known as jso
kaichanvong___ is now known as kaichanvong
bretolius is now known as bret
matled- is now known as matled
erichmenge_ is now known as erichmenge
Tobarja_yikes is now known as Tobarja
yosafbridge` has joined #ruby
Atlantic778 is now known as Atlantic777
Atlantic777 has quit [Changing host]
Atlantic777 has joined #ruby
Azure|dc is now known as Azure
akonny has quit [Quit: akonny]
s2013 has quit [Ping timeout: 272 seconds]
TheHodge_ is now known as TheHodge
patronus_ has quit [Excess Flood]
sguselnikov has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
patronus has joined #ruby
artm has quit [Quit: artm]
dallasm has joined #ruby
beermouse has joined #ruby
rippa has joined #ruby
pedda has joined #ruby
Jelco has joined #ruby
Jelco has joined #ruby
Wixy has joined #ruby
mengu has quit []
Squarepy has joined #ruby
waflessnet has joined #ruby
<Wixy> can you do multiple string substitutions at once?
Ox6abe has quit [Remote host closed the connection]
<Wixy> >> "a b c".gsub(/a/, "b").gsub(/b/, "c")
<eval-in> Wixy => "c c c" (https://eval.in/69853)
<Wixy> I want to obtain "b c c"
Astralum has joined #ruby
konrads has quit [Quit: Leaving.]
cjk101010_ is now known as cjk101010
arietis has joined #ruby
mikepack has joined #ruby
<_br_> Whats wrong with chained gsub's ?
shevy has joined #ruby
_bart has joined #ruby
<Wixy> well, it doesn't return what I expect..
<Wixy> chaining gsubs is not the same as appling them together
beermouse has quit [Ping timeout: 246 seconds]
<_br_> Ok, I get your point now.
andrewvos has joined #ruby
<jacobsmith> Wixy: youre first gsub turns it to "b b c" and then you gsub "b" again, leaving you with "c c c"
geggam_ has joined #ruby
apeiros has quit [Remote host closed the connection]
<jacobsmith> Wixy: "a b c".gsub(/b/, "c").gsub(/a/, "b") should work
apeiros has joined #ruby
Elhu has joined #ruby
stetho has joined #ruby
<jacobsmith> Wixy: it's always evaluated left to right in stages, not all at once
dominikh has joined #ruby
beermouse has joined #ruby
<Wixy> jacobsmith, I'm not asking why it happens, I'm asking how to do it so that the order doesn't matter :P
<Hanmac1> jacobsmith: Wixy what about that?
<Hanmac1> >> "a b c".gsub(/[a|b]/, "b" => "c", "a" => "b")
<eval-in> Hanmac1 => "b c c" (https://eval.in/69854)
iamjarvo_ has joined #ruby
Hanmac1 is now known as Hanmac
Lewix has joined #ruby
<Wixy> >> "a b c".gsub(/[a|b]/, "a" => "b", "b" => "c")
<eval-in> Wixy => "b c c" (https://eval.in/69855)
<Wixy> cool!
iamjarvo has quit [Read error: Operation timed out]
<_br_> Nice golfing Hanmac :)
blaxter has quit [Quit: foo]
<Hanmac> >> "a b c".gsub(/[a|b]/, &:next)
<eval-in> Hanmac => "b c c" (https://eval.in/69858)
tylersmith has joined #ruby
fridim_ has joined #ruby
mojjojo has quit [Quit: mojjojo]
benwoody has joined #ruby
<existensil> hmm. didn't know about String#next. thanks Hanmac
mojjojo has joined #ruby
<Hanmac> >> "a b c".gsub(/[a|b]/, &:succ)
<eval-in> Hanmac => "b c c" (https://eval.in/69859)
<Wixy> >> "foo bar yada".gsub(/(foo|bar|yada)/, "foo" => "bar", "bar" => "yada")
<eval-in> Wixy => "bar yada " (https://eval.in/69860)
beermouse has quit [Client Quit]
<Wixy> something went wrong :P
<Wixy> I'm sorry
<existensil> you searched for yada but provided nothing to replace it with
<Wixy> >> "foo bar yada".gsub(/(foo|bar)/, "foo" => "bar", "bar" => "yada")
<eval-in> Wixy => "bar yada yada" (https://eval.in/69861)
<Wixy> alright, thanks
SloggerKhan has quit [Quit: Leaving.]
pothibo has quit [Quit: pothibo]
ValicekB has quit [Ping timeout: 272 seconds]
apeiros has quit [Ping timeout: 264 seconds]
<Wixy> I love ruby's built in functions :P
psyl0n has joined #ruby
nbrosnahan has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Sp4rKy_ is now known as Sp4rKy
Sp4rKy has quit [Changing host]
Sp4rKy has joined #ruby
iamjarvo_ has quit [Ping timeout: 272 seconds]
macmartine has joined #ruby
binaryplease has joined #ruby
Kilo`byte has quit [Ping timeout: 265 seconds]
ahawkins has quit [Quit: leaving]
pothibo has joined #ruby
zoee has quit [Quit: This computer has gone to sleep]
paul_k has joined #ruby
paul_k has quit [Client Quit]
d45h has joined #ruby
jhaals_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
axl_ has quit [Quit: axl_]
cafhacker has joined #ruby
Davey has quit [Ping timeout: 272 seconds]
marr has joined #ruby
shredding has joined #ruby
Squarepy has quit [Read error: Operation timed out]
Kilo`byte has joined #ruby
pskosinski_ has joined #ruby
Macaveli has quit [Quit: Computer has gone to sleep.]
Squarepy has joined #ruby
macmartine has quit [Remote host closed the connection]
Davey has joined #ruby
subbyyy has joined #ruby
macmartine has joined #ruby
mikesplain has joined #ruby
macmartine has quit [Read error: Connection reset by peer]
macmartine has joined #ruby
tziOm has quit [Ping timeout: 248 seconds]
pskosinski has quit [Ping timeout: 252 seconds]
tziOm has joined #ruby
pedda has quit [Quit: Textual IRC Client: www.textualapp.com]
robertjpayne has quit []
brahman_work has joined #ruby
altivec has joined #ruby
crus has quit [Read error: Connection reset by peer]
mklappst_ has quit [Remote host closed the connection]
tkuchiki_ has joined #ruby
macmartine has quit [Read error: Connection reset by peer]
pskosinski_ is now known as pskosinski
<brahman_work> Hi, I would like to capture multiple regx matches in a similar way to perl ($name,$version) =~ /^(.*)?_(.*)?_.*\.deb$/ in ruby I have: (name,version) = pkg.match(/^(.*)?_(.*)?_.*\.deb$/) this doesn't work
nwertman has joined #ruby
macmartine has joined #ruby
beermouse has joined #ruby
<DaniG2k> brahman_work: whats an example string you want to match?
tkuchiki has quit [Ping timeout: 245 seconds]
tonni has joined #ruby
tonni has quit [Remote host closed the connection]
tonni has joined #ruby
<brahman_work> Hi so I want to capture the package name and version from packagename_0.1_.deb
<DaniG2k> brahman_work: the one you wrote will match something_something_.deb
<DaniG2k> brahman_work: that works in ruby
<DaniG2k> brahman_work: works fine
<brahman_work> DaniG2k: the regex works fine. I want to capture in 1 go the match data.
<brahman_work> assign it to 2 diff variables.
wr0ngway has joined #ruby
<brahman_work> in perl I would do this: ($name,$version) =~ /^(.?_(.?_.*\.deb$/
altivec has left #ruby ["Textual IRC Client: www.textualapp.com"]
<brahman_work> bloody emoticons...
<DaniG2k> brahman_work: ^(.*)?_(.+)?\.(.+)?_.*\.deb$
Monie has joined #ruby
danshultz has joined #ruby
jlast has joined #ruby
<brahman_work> ($name,$version) =~ /^(.*)?_(.*)?_.*\.deb$/
wallerdev has quit [Quit: wallerdev]
<DaniG2k> brahman_work: that will give you name maj, min version
<DaniG2k> captures three things
<DaniG2k> you only want the major version?
Danielss89 has left #ruby [#ruby]
lethjakm1 has joined #ruby
<DaniG2k> brahman_work: if you only want the major version number then do
<DaniG2k> ^(.*)?_(.+)?\.(?:.+)_.*\.deb$
<DaniG2k> that way, it will not capture the second number ;)
tagrudev has quit [Ping timeout: 264 seconds]
<DaniG2k> note the difference is (?: )
kaspergrubbe has quit [Ping timeout: 246 seconds]
<DaniG2k> as opposed to ()?
<DaniG2k> ()? captures, (?: ) is non-capturing
tkuchiki_ has quit [Ping timeout: 252 seconds]
iamjarvo has joined #ruby
<brahman_work> the regex works fine. I want to assign the matchdata to 2 vars in 1 go.
sandeepk has joined #ruby
<workmad3> DaniG2k: ()? captures but is optional ;)
<brahman_work> in a similar fashion to perl.
tkuchiki has joined #ruby
danshult_ has quit [Ping timeout: 248 seconds]
<brahman_work> in perl ()? means it's not greedy. I would assume it's the same in Ruby regex.
valesk has joined #ruby
jhaals has joined #ruby
einarj has quit [Remote host closed the connection]
<brahman_work> DaniG2k: is there a way to do the assignment in 1 go?
havenwood has joined #ruby
einarj has joined #ruby
<sandeepk> yes, consider your first try as your last one.....then you can do it one go
IceDragon has joined #ruby
<Hanmac> brahman_work: do you want something like that?
<Hanmac> >> /^(?<name>.*)?_(?<version>.*)?_.*\.deb$/ =~ "this_v123_blabit.deb"; [name,version]
<eval-in> Hanmac => ["this", "v123"] (https://eval.in/69862)
fschuindt has joined #ruby
jbpros has joined #ruby
<brahman_work> Hanmac: Thanks for this. Are you namiung the captures in your example?
<Hanmac> brahman_work: yeah, i named them because like this they create the variables in the end
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<brahman_work> Thanks man.
<DaniG2k> brahman_work: you dont really need assignment...you can just do something like match = pkg.match(/^(.*)?_(.+)?\.(?:.+).*\.deb$/) and then access its elements with match[1] or match[2]
svennidal has joined #ruby
Speed has joined #ruby
<Hanmac> brahman_work: thats the unnamed variant
<Hanmac> >> /^(.*)?_(.*)?_.*\.deb$/ =~ "this_v123_blabit.deb"; [$1,$2]
<eval-in> Hanmac => ["this", "v123"] (https://eval.in/69864)
blueOxigen has joined #ruby
macmartine has quit [Remote host closed the connection]
<brahman_work> >> version,name = pkg.match(/^(.*)?_(.*)?_.*\.deb$/).captures
<brahman_work> => ["foobar", "0.1-99"]
<eval-in> brahman_work => undefined local variable or method `pkg' for main:Object (NameError) ... (https://eval.in/69865)
ValicekB has joined #ruby
jhaals has quit [Ping timeout: 264 seconds]
bradhe has joined #ruby
<Hanmac> yeah that would work too but you need to be careful ... match can return nil
acrussell has joined #ruby
<brahman_work> Thanks both of you. :)
einarj has quit [Ping timeout: 272 seconds]
<brahman_work> I do like the named capture method you showed me first. :)
axl_ has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
rdark has joined #ruby
<Hanmac> you can missuse =~ also as condition:
lmickh has joined #ruby
<Hanmac> >> /^(?<name>.*)?_(?<version>.*)?_.*\.deb$/ =~ "this_v123_blabit.deb" ? [name,version] : "nothing"
<eval-in> Hanmac => ["this", "v123"] (https://eval.in/69868)
jhaals has joined #ruby
<Hanmac> >> /^(?<name>.*)?_(?<version>.*)?_.*\.deb$/ =~ "thisv123blabit.deb" ? [name,version] : "nothing"
<eval-in> Hanmac => "nothing" (https://eval.in/69869)
bluOxigen has quit [Ping timeout: 246 seconds]
Squarepy_ has joined #ruby
<inad922> Is there a library that enables running cucumber tests in parallel?
coderhs has quit [Ping timeout: 272 seconds]
i_s has joined #ruby
i_s has quit [Remote host closed the connection]
i_s has joined #ruby
freezey has quit [Remote host closed the connection]
noname001__ has quit [Ping timeout: 248 seconds]
tylersmith has quit [Remote host closed the connection]
danshultz has quit [Read error: Connection reset by peer]
nbrosnahan has joined #ruby
bradhe has quit [Ping timeout: 245 seconds]
Squarepy has quit [Ping timeout: 245 seconds]
danshultz has joined #ruby
mojjojo has quit [Quit: mojjojo]
JonahR has joined #ruby
ringaroses has quit [Ping timeout: 264 seconds]
ringaroses has joined #ruby
d45h has quit []
getpissedoff has joined #ruby
bondar has joined #ruby
d45h has joined #ruby
bklane has quit [Remote host closed the connection]
nbrosnahan has quit [Client Quit]
<_br_> inad922: Spork ?
bklane has joined #ruby
getpissedoff has quit [Quit: Textual IRC Client: www.textualapp.com]
stetho has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Apane has quit [Ping timeout: 252 seconds]
Reach has joined #ruby
fschuindt has quit [Quit: Computer has gone to sleep.]
Squarepy has joined #ruby
wald0 has joined #ruby
Squarepy_ has quit [Read error: Connection reset by peer]
zeade has quit [Quit: Leaving.]
<wald0> im checking a video about tmux + vim + ruby, but i see syntax like "describe" and "subject" which i have not readed yet about, is this ruby-on-rails specific topic or it is really ruby syntax ?
apeiros has joined #ruby
bklane_ has joined #ruby
<Mon_Ouie> It's probably valid Ruby syntax (can't be sure without seeing the code), those would just be method calls
<Mon_Ouie> RSpec, which is just a library, uses such syntax
bondar has quit [Ping timeout: 272 seconds]
mikecmpbll has joined #ruby
sandeepk has quit [Read error: Connection reset by peer]
bklane has quit [Read error: Connection reset by peer]
mikepack has quit []
<wald0> in fact it doesn't seems to work on my "pry"
cescalante is now known as ce_afk
<Mon_Ouie> Well, the methods do have to be defined before they can be called
mmitchell has quit [Remote host closed the connection]
sambao21 has quit [Ping timeout: 272 seconds]
mikepack has joined #ruby
maletor has joined #ruby
sriehl has quit [Quit: Leaving...]
Squarepy has quit [Read error: Connection reset by peer]
rudisimo has joined #ruby
sambao21 has joined #ruby
d45h has quit []
timonv has quit [Remote host closed the connection]
weszlem has quit []
camilasan has quit []
theRoUS has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
<Hanmac> Mon_Ouie: hm i wanted to write an helper for classes/modules that when you define an specific method it automatic includes a specific module into the class ... like :<=> => Comparable, :each => Enumerable ... but the problem that are the only modules i know where that makes sense ,P
nomenkun has quit [Ping timeout: 246 seconds]
d45h has joined #ruby
bean has quit [Remote host closed the connection]
jrhorn424 is now known as zz_jrhorn424
bean has joined #ruby
wallerdev has joined #ruby
yacks has joined #ruby
lukec has joined #ruby
mklappstuhl has joined #ruby
saarinen has joined #ruby
mikesplain1 has joined #ruby
akonny has joined #ruby
TaxmanBD has joined #ruby
cascalheira has joined #ruby
coderhs has joined #ruby
zz_tsykoduk is now known as tsykoduk
mikesplain has quit [Ping timeout: 245 seconds]
lethjakm1 has quit [Ping timeout: 264 seconds]
<olivier_bK> i have a littel problem i try to remove " and ' and ; of that => "'lioplaza';"
<olivier_bK> i cant find the good regex
dallasm has quit []
<olivier_bK> grrr...
RichardBaker has joined #ruby
<apeiros> olivier_bK: you're aware that that string does not contain any " ?
<apeiros> also, please show what you've tried so far
Ripp__ has joined #ruby
saarinen has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Read error: Operation timed out]
cina has joined #ruby
saarinen has joined #ruby
DoNcK has quit [Read error: Connection reset by peer]
pskosinski has quit [Quit: Til rivido Idisti!]
DoNcK has joined #ruby
stetho has joined #ruby
<olivier_bK> @to.scan(([^']+)'/)
<Mon_Ouie> Also see String#delete, rather than using a Regexp (although the syntax would still be very similar)
<bean> >> "'lioplaza';".delete(";'\"")
<eval-in> bean => "lioplaza" (https://eval.in/69889)
<olivier_bK> bean, i didn't know that
d45h has quit []
simoz has joined #ruby
jkamenik has joined #ruby
mmitchell has joined #ruby
binaryplease has quit [Ping timeout: 248 seconds]
<apeiros> olivier_bK: scan is not supposed for replacements
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
mklappstuhl has quit [Remote host closed the connection]
<apeiros> String#delete as suggested by Mon_Ouie and shown by bean is IMO the best choice.
Ripp__ has quit [Client Quit]
sepp2k has quit [Quit: Konversation terminated!]
<apeiros> if you need regex based replacement, it's String#gsub, #sub, #gsub! and #sub!
relix has joined #ruby
freezey has joined #ruby
jkhwan has joined #ruby
<Grundell> Hello - In my regex i have two names that i want to capture after each other http://rubular.com/r/YWurx7AfNF how do i do this ?
jhaals has quit [Read error: Operation timed out]
<Hanmac> []= can work like sub! if you want ;P
mklappstuhl has joined #ruby
mansi has joined #ruby
<Grundell> (its not always two names but it can be between 2 and 10 )
pel_daniel has joined #ruby
<bean> that is quite the regex there Grundell
ssvo has joined #ruby
beermouse has quit [Quit: beermouse]
Advocation has quit [Quit: Advocation]
theRoUS has joined #ruby
sandeepk has joined #ruby
<Grundell> bean: you think ?
<apeiros> Grundell: A-Ö will most likely not do what you expect it to do
<apeiros> why didn't you use \p{Letter} or \p{Alpha} as suggested?
yfeldblum has quit [Remote host closed the connection]
<Grundell> actually that is just a part of all the regexes that im going to use...
<apeiros> great, so you have a bug in all the regexes :)
yfeldblum has joined #ruby
<jlebrech> would you use a webbrowser that you can only interface with by writing steps?
<Grundell> apeiros: the a-ö is because i want to use make it possible to go all the way to ö..
<apeiros> Grundell: yes. it does not work this way.
<apeiros> it's not abc…xyzäöü
<Grundell> apeiros: how do you mean \p{Letter} ?
<Grundell> apeiros: its not ? seams like it's working for me at the moment... ?
bluenemo has quit [Remote host closed the connection]
<apeiros> >> "äöü" =~ /\p{Letter}/
<eval-in> apeiros => 0 (https://eval.in/69890)
<apeiros> Grundell: emphasis on "seems"
stetho has quit [Ping timeout: 245 seconds]
<Grundell> okay :)
kristofers has quit [Remote host closed the connection]
kcantwel has quit [Quit: Computer has gone to sleep.]
Voodoofish430 has joined #ruby
Czupa has joined #ruby
brtdv has quit []
<Grundell> But first my original question. how do i make it read the two names or more ?
mikesplain2 has joined #ruby
<apeiros> >> Array.new(256){|i|i}.pack("U*").scan(/[A-Ö]/).join
<eval-in> apeiros => "ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u007F\u0080\u0081\u0082\u0083\u0084…\u0086\u0087\u0088\u0089\u008A\u008B\u008C\u008D\u008E\u008F\u0090\u0091\u0092\u0093\u0094\u0095\u00 ... (https://eval.in/69892)
<apeiros> this is what your A-Ö matches
mikesplain1 has quit [Read error: Operation timed out]
<apeiros> somehow I think that's not what you wanted.
maletor has quit [Quit: Computer has gone to sleep.]
<Grundell> Not really :P
<apeiros> >> Array.new(256){|i|i}.pack("U*").scan(/\p{Letter}/).join
<eval-in> apeiros => "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzªµºÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ" (https://eval.in/69893)
aspires has joined #ruby
blackmesa has joined #ruby
nathancahill has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
<Grundell> But is there a way to actually see of this type of string shows one or more times for the name ?
<apeiros> I don't understand that question
DanKnox_away is now known as DanKnox
tnk1 has quit [Ping timeout: 252 seconds]
Fire-Dragon-DoL has joined #ruby
<Grundell> well i have two names that i want to capture in person... first There is | Fredrik Reinfeldt | then | Hillevi Engström |
saarinen has quit [Quit: saarinen]
<Grundell> how do i make it to capture both of them ?
intuxicated has joined #ruby
porco has joined #ruby
intuxicated has quit [Max SendQ exceeded]
tnk1 has joined #ruby
intuxicated has joined #ruby
andikr has quit [Remote host closed the connection]
<apeiros> you use e.g. scan
yfeldblum has joined #ruby
yfeldblu_ has joined #ruby
aganov has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
yfeldblu_ has quit [Remote host closed the connection]
s2013 has joined #ruby
casheew has quit [Read error: Connection reset by peer]
yfeldblum has quit [Read error: Connection reset by peer]
casheew has joined #ruby
yfeldblum has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
jbpros has quit [Quit: jbpros]
ephemerian has quit [Quit: Leaving.]
mklappstuhl has joined #ruby
zigomir has quit [Quit: zigomir]
Advocation has joined #ruby
yfeldblu_ has joined #ruby
dagobah has quit [Remote host closed the connection]
maletor has joined #ruby
Vivekananda has quit [Quit: Ex-Chat]
sebastianb has quit [Quit: Changing server]
sebastianb has joined #ruby
Ripp__ has joined #ruby
Reach has quit [Remote host closed the connection]
pskosinski has joined #ruby
tsykoduk is now known as zz_tsykoduk
cafhacker has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Soda has joined #ruby
olivier_bK has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
VTLob has joined #ruby
bradhe has joined #ruby
dweeb_ has joined #ruby
zz_tsykoduk is now known as tsykoduk
jbpros has joined #ruby
kevinfagan has quit [Ping timeout: 264 seconds]
kreantos has quit [Remote host closed the connection]
d45h has joined #ruby
kreantos has joined #ruby
kevinfagan has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
axl_ has joined #ruby
phansch has quit [Remote host closed the connection]
alup has quit [Quit: Leaving]
kreantos has quit [Ping timeout: 246 seconds]
CaptainJet has quit [Ping timeout: 248 seconds]
paul_k has joined #ruby
paul_k has quit [Client Quit]
shredding has quit [Quit: shredding]
ItSANgo has quit [Read error: Connection reset by peer]
paul_k has joined #ruby
sepp2k has joined #ruby
banister has joined #ruby
Ox6abe has joined #ruby
jbpros has quit [Quit: jbpros]
drim has quit [Quit: drim]
kaspergrubbe has joined #ruby
ItSANgo_ has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
duggiefresh has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
ghr has quit [Quit: Computer has gone to sleep.]
bradhe has quit [Remote host closed the connection]
d45h has quit []
jbpros has joined #ruby
jbpros has quit [Client Quit]
d45h has joined #ruby
troessner has quit [Quit: Leaving]
s2013 has quit [Ping timeout: 265 seconds]
zigomir has joined #ruby
kaspergrubbe has quit [Ping timeout: 252 seconds]
drag00n has joined #ruby
DaniG2k has quit [Quit: leaving]
drag00n has quit [Max SendQ exceeded]
danielcharles has quit [Ping timeout: 246 seconds]
bklane_ has quit [Quit: Leaving...]
varfoo has quit [Quit: WeeChat 0.4.0]
AltGrendel has joined #ruby
Liothen has joined #ruby
drim has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
pothibo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
mlpinit has quit [Remote host closed the connection]
danielcharles has joined #ruby
mlpinit has joined #ruby
pskosinski has quit [Ping timeout: 246 seconds]
aa47f8 has left #ruby [#ruby]
Davey has quit [Quit: Computer has gone to sleep.]
pskosinski has joined #ruby
KevinSjoberg has quit [Ping timeout: 245 seconds]
lethjakm1 has joined #ruby
xcv has joined #ruby
freezey has quit [Remote host closed the connection]
moted has joined #ruby
Advocation has quit [Quit: Advocation]
hippyphysicist has joined #ruby
Eightamrock has joined #ruby
hippyphysicist has quit [Read error: Connection reset by peer]
h0rrorvacui has joined #ruby
spike|spiegel has quit [Quit: WeeChat 0.4.2]
freezey has joined #ruby
KevinSjoberg has joined #ruby
mlpinit has quit [Ping timeout: 240 seconds]
simoz has quit [Ping timeout: 240 seconds]
kristofers has joined #ruby
d45h has quit []
kindjal has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
sandeepk has quit [Ping timeout: 248 seconds]
danielcharles has quit [Ping timeout: 272 seconds]
iamjarvo has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
jerius has joined #ruby
asteros has joined #ruby
iamjarvo has joined #ruby
krz has quit [Quit: krz]
dhruvasa1ar has joined #ruby
kaspergrubbe has joined #ruby
ce_afk is now known as cescalante
cina has quit [Ping timeout: 245 seconds]
cina has joined #ruby
d45h has joined #ruby
bradhe has joined #ruby
porco has quit [Quit: Leaving...]
iamjarvo has quit [Ping timeout: 272 seconds]
s2013 has joined #ruby
dhruvasagar has quit [Ping timeout: 272 seconds]
benwoody has quit [Quit: benwoody]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lukec has quit [Quit: lukec]
Elhu has quit [Quit: Computer has gone to sleep.]
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
<Aloysius1> Hello! I have a simple gem that only requires net/smtp. Do I need (or should I have) a Gemfile?
mojjojo has joined #ruby
shaunbak_ has quit [Remote host closed the connection]
shaunbaker has joined #ruby
<havenwood> Aloysius1: Are you creating the gem?
<Eightamrock> Are you making a gem, or using a gem
<Aloysius1> Sorry, yeah, I'm writing a simple gem.
Es0teric has joined #ruby
nobitanobi has joined #ruby
noop has joined #ruby
<Eightamrock> if you want it to be a gem you will need a .gemspec file
Soda has quit [Read error: Connection reset by peer]
<havenwood> Aloysius1: So yes you should have a Gemfile, but it should only contain two lines: source 'https://rubygems.org'; gemspec
<havenwood> Aloysius1: And yeah, put your dependencies in your gem_name_here.gemspec file.
Es0teric has quit [Client Quit]
<Aloysius1> OK, right. So...
benwoody has joined #ruby
Es0teric has joined #ruby
<apeiros> Aloysius1: um, to clarify on what havenwood says: you don't need a Gemfile. but if you want one, that's what it should be like.
<Aloysius1> I guess since I'm using just net/smtp, I was wondering if that was part of the default packages. (I guess not, since I needed to require it.)
<apeiros> Aloysius1: the *only* thing you don't need to require is stuff in ruby core.
<Aloysius1> apeiros: Thanks. I don't think I need one. I had just "source https:/blah" and it looked weird.
<Aloysius1> like, what am I sourcing here?
<Eightamrock> you can just require net/smtp in your code and list it as a dependency in gemspec
<havenwood> Aloysius1: Yeah, stdlib doesn't need to be in Gemfile or .gemspec file, just `require` it once.
<havenwood> oh, smtp
<havenwood> still stdlib
pwh has quit []
<Aloysius1> So... I don't need a Gemspec either? (I did another gem a few months ago and the Gemfile only had testing stuff in it, which I don't think I needed, either.)
shaunbaker has quit [Ping timeout: 252 seconds]
cescalante is now known as ce_afk
<havenwood> Aloysius1: Might be good to look at what bundler generates for a gem scaffolding: bundle gem your_geme_name_here
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Aloysius1> (And it had no gemspec.)
io_syl has joined #ruby
<Aloysius1> havenwood: Thanks, yeah...clarification is helpfu.
<Eightamrock> In order to put it on rubygems.org it needs a spec
<Eightamrock> otherwise not
<Eightamrock> I think**
<apeiros> making stuff a gem is useful even without releasing it to rubygems.org
d45h has quit []
pragmatism has joined #ruby
<apeiros> we have a couple of non-public gems at work
aspires has quit [Quit: sudo making a sandwich]
<havenwood> Aloysius1: You *need* a gem_name.gemspec to distribute via RubyGems. I'd recommend a Gemfile that simply points to your gem_name.gemspec.
yfeldblum has joined #ruby
<Eightamrock> truth, apeiros
<apeiros> havenwood: why'd you want a Gemfile for/in a gem?
io_syl has quit [Read error: Connection reset by peer]
mojjojo has quit [Quit: mojjojo]
Czupa has quit [Remote host closed the connection]
<havenwood> apeiros: Mostly as a convenience to devs. When someone forks or clones, they just `bundle` for development dependences.
jacobsmith has quit [Ping timeout: 272 seconds]
<apeiros> havenwood: that's what gemspec's add_development_dependency is there for, no?
<havenwood> Then a Rakefile, so you can run the test suite.
<havenwood> apeiros: Yeah, bundle triggers those to install.
<apeiros> as does rubgems itself just fine? :)
aspires has joined #ruby
petey has joined #ruby
yfeldblu_ has quit [Ping timeout: 272 seconds]
_whitelogger has joined #ruby
inad922 has quit [Quit: ChatZilla 0.9.90.1 [Firefox 25.0.1/20131112160018]]
<havenwood> apeiros: So i clone, then `bundle` and `rake` to run the tests. What would your workflow be for that?
sambao21 has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
duggiefresh has joined #ruby
Grundell has quit [Remote host closed the connection]
<havenwood> apeiros: You install deps by pointing `gem` to the .gemspec? What is the command for that, i'm not familiar?
cina has quit [Remote host closed the connection]
<apeiros> rm -f *.gem && gem build *.gemspec && gem install *.gem # builds and installs the gem and dependencies
<apeiros> then run the tests
<havenwood> I did see the new `gem install -g Gemfile` which is pretty sweet.
TaxmanBD has quit [Ping timeout: 245 seconds]
Xeago_ has joined #ruby
fmcgeough has quit [Read error: Operation timed out]
khushildep has quit [Ping timeout: 264 seconds]
thelorax123 has quit [Remote host closed the connection]
<havenwood> apeiros: ah, gotcha, kk
<apeiros> I'm too lazy to add a `rake install` :)
banister has joined #ruby
<Aloysius1> I think one of y'all here referred to the "version.rb" practice as a "cargo cult". Am I recalling correctly?
<apeiros> (yes, I'm a horrible person)
<apeiros> Aloysius1: well, downside is that there's no clean rule
<havenwood> apeiros: I'm so lazy i have bundler generate a Rakefile and Gemfile for me, though i do edit a line in the Rakefile so tests are wired up.
luke_ has joined #ruby
luke_ has quit [Client Quit]
<apeiros> havenwood: I'm so lazy I wrote a gem to generate gem skeletons for me
<havenwood> apeiros: Yeah, i've been meaning to be that lazy, but been too lazy.
thelorax123 has joined #ruby
sheepman has joined #ruby
<Aloysius1> apeiros: Clean rule for...? I've noticed that in my case, I forget to update the version number, 'cause it's all tucked away in that file.
<Aloysius1> (Also, I'm lazy.)
<havenwood> apeiros: i'm about tired or repeating myself setting up gems, time to automate
<apeiros> Aloysius1: version.rb stuff
w4pm has quit [Ping timeout: 252 seconds]
<apeiros> Aloysius1: I like it, but the practical purpose of it is severely limited
zxq9 has joined #ruby
Xeago has quit [Ping timeout: 245 seconds]
deception has quit [Remote host closed the connection]
<apeiros> due to there not being a clear rule. it might be Foo::VERSION, it might be Foo::Version, it might be Foo::VERSION::STRING etc.
wedgeV has quit [Quit: wedgeV]
<sheepman> hi all, im using httpclient to interact with an API however I'm noticing a lot of "CLOSE_WAIT" conditions a long time after the web request has been sent. Is there anyway of dealing with these properly? Or should I just let the server kill them off?
Ripp__ has quit []
<apeiros> then the version itself might be any format
<havenwood> Aloysius1: So i follow the convention of lib/gem_name/version.rb, then i release my gems with the gem-release gem command: gem bump --tag --release
w4pm has joined #ruby
<apeiros> personally I use the pattern of Foo::Version, where Foo::Version is a Gem::Version instance
Bry8Star{T2_ has quit [Ping timeout: 240 seconds]
<havenwood> Aloysius1: Which bumps the minor version of the version, tags the release, pushes it, and releases the gem.
pwh has joined #ruby
duggiefresh has quit [Read error: Connection reset by peer]
<Aloysius1> apeiros: Ahhh. Got it. Wow, you really ARE lazy. I can only aspire to be that lazy, which is part of the problem.
duggiefresh has joined #ruby
<Aloysius1> Heh.
<havenwood> apeiros: I do Foo::VERSION.
<apeiros> havenwood: heathen!
nathancahill has quit [Quit: nathancahill]
cina has joined #ruby
barratt has quit [Ping timeout: 246 seconds]
<Aloysius1> (I've always wanted to get that question in a job interview: "What are you strengths and weaknesses?" "Well, I'm lazy and easily bored. And, I'm lazy and easily bored."
<havenwood> YELLING_SNAKES_FTW
<Aloysius1> lol
matchaw_ has joined #ruby
<Aloysius1> I guess you can't have sHOUTINGcAMELS.
iamjarvo has joined #ruby
lukec has joined #ruby
theRoUS has quit [Ping timeout: 248 seconds]
<apeiros> Aloysius1: the proper quote would be "I'm lazy, hubristic and impatient" (twice)
xcess_denied has quit [Read error: Connection reset by peer]
manoj_ has joined #ruby
nathancahill has joined #ruby
<Aloysius1> apeiros: I don't know that quote.
<apeiros> sHOUTING_sNAKE_cAMELS
<apeiros> Aloysius1: google larry wall, qualities of a programmer
<havenwood> hobbitses
matchaw has quit [Ping timeout: 252 seconds]
<apeiros> and if you don't know larry wall, google him too :-)
bradhe has quit [Remote host closed the connection]
<Hanmac> "snake camels" oO make on the day when god was drunk ... or in australia
nathancahill has quit [Client Quit]
<Aloysius1> Perl may actually take that too far.
Bry8Star{T2 has joined #ruby
ExCa|iBuR has joined #ruby
<popl> Take what too far?
paul_k has quit [Remote host closed the connection]
lfox has joined #ruby
typicalbender has quit [Quit: Leaving.]
<popl> Camels?
manoj_ has quit [Read error: Connection reset by peer]
<apeiros> wouldn't it actually be cAmEl cAsEs?
xcess_denied has joined #ruby
ewnd9 has quit [Ping timeout: 272 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
<havenwood> ʎɐp‾sǝʇᴉsoddo‾ǝʞɐus‾ƃuᴉɯɐǝɹɔs
krz has joined #ruby
krz has quit [Changing host]
krz has joined #ruby
<Aloysius1> You can't take camels too far. They're meant for long travel.
sambao21 has quit [Ping timeout: 272 seconds]
<Aloysius1> Perl takes the lazy, impatient and hubristic too far. Perhaps. Or perhaps I haven't perfected my own LIH enough.
newUser1234 has quit [Read error: Connection reset by peer]
cina has quit [Quit: leaving]
<Hanmac> apeiros: this
newUser1234 has joined #ruby
matchaw has joined #ruby
<popl> Or maybe you're just talking out of your ass.
<popl> :P
brtdv has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
<apeiros> I talk out of my ass a couple of times a day
<apeiros> it's very articulate
Kilo`byte has quit [Ping timeout: 272 seconds]
matchaw_ has quit [Ping timeout: 272 seconds]
sambao21 has joined #ruby
lukec has quit [Remote host closed the connection]
jprovazn is now known as jprovazn_afk
maletor has joined #ruby
mattp_ has quit [Ping timeout: 246 seconds]
aspires has quit [Remote host closed the connection]
<Hanmac> apeiros: is tat a new art of ventriloquism? ;P
aspires has joined #ruby
tylersmith has joined #ruby
mlpinit has joined #ruby
<popl> Burroughs wrote something about that.
polaco is now known as polaco_zZz
Eightamrock has quit []
polaco_zZz is now known as polaco
tylersmith has quit [Remote host closed the connection]
Kilo`byte has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ox6abe has quit [Remote host closed the connection]
nobitanobi has quit [Read error: Connection reset by peer]
TMM has quit [Quit: Ex-Chat]
drim has quit [Ping timeout: 252 seconds]
tylersmith has joined #ruby
moted has quit [Remote host closed the connection]
jonahR has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
wr0ngway has quit [Remote host closed the connection]
kristofers has quit [Read error: Operation timed out]
moted has joined #ruby
jrhe has joined #ruby
d45h has joined #ruby
RichardBaker has quit [Remote host closed the connection]
zeade has joined #ruby
CreativeEmbassy has joined #ruby
d45h has quit [Client Quit]
Morkel has quit [Ping timeout: 272 seconds]
jrhe has quit [Read error: Connection reset by peer]
enebo has quit [Ping timeout: 240 seconds]
jrhe has joined #ruby
Snugug has quit [Remote host closed the connection]
spike|spiegel has joined #ruby
heidi has joined #ruby
dweeb_ has quit [Quit: Computer has gone to sleep.]
spike|spiegel has quit [Client Quit]
saarinen has joined #ruby
Dave has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
sambao21 has quit [Ping timeout: 246 seconds]
paul_k has joined #ruby
akonny has quit [Read error: Connection reset by peer]
spike|spiegel has joined #ruby
Dave is now known as Guest68627
mklappstuhl has joined #ruby
akonny has joined #ruby
spike|spiegel has quit [Client Quit]
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
phansch has joined #ruby
nanoyak has joined #ruby
axl_ has quit [Remote host closed the connection]
nobitanobi has joined #ruby
jerius has quit [Ping timeout: 248 seconds]
dangerousdave has joined #ruby
Guest68627 has quit [Read error: Connection reset by peer]
mattp_ has joined #ruby
Al_ has quit [Remote host closed the connection]
asteros has quit [Quit: asteros]
<Hanmac> "
stringoO has quit [Read error: No route to host]
sambao21 has joined #ruby
SJr has quit [Max SendQ exceeded]
dnyy has joined #ruby
spike|spiegel has joined #ruby
SJr has joined #ruby
iliketurtles has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
iajrz has joined #ruby
enebo has joined #ruby
wuest_ is now known as wuest
<havenwood> It indeed appears to me to be a blue circle.
RichardBaker has joined #ruby
<havenwood> Hanmac: What do you think it is?
kaspergrubbe has quit [Remote host closed the connection]
Ripp__ has joined #ruby
<Hanmac> "
sheepman has quit [Quit: ZNC - http://znc.in]
kreantos has joined #ruby
<havenwood> Hanmac: You are indeed color blind (or you need a new monitor).
jbpros has joined #ruby
xibalba has left #ruby ["Leaving"]
<Hanmac> or its a problem with my "font" ;P
<havenwood> ha
whunt has joined #ruby
<Hanmac> shevy you asking me when my bindings are documented? i found the answer: "
<iajrz> anyone here completed the RubyMonk thingie?
yacks has quit [Quit: Leaving]
kreantos has quit [Remote host closed the connection]
kreantos has joined #ruby
blackmes1 has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 240 seconds]
kristofers has joined #ruby
mojjojo has joined #ruby
io_syl has joined #ruby
iamjarvo has quit [Remote host closed the connection]
matchaw_ has joined #ruby
terlar has quit [Remote host closed the connection]
terlar has joined #ruby
Monie has joined #ruby
benlieb has joined #ruby
paul_k has quit [Remote host closed the connection]
matchaw has quit [Ping timeout: 272 seconds]
claymore has quit [Ping timeout: 272 seconds]
ph8 has quit [Ping timeout: 252 seconds]
rdark has quit [Remote host closed the connection]
claymore has joined #ruby
kreantos has quit [Ping timeout: 245 seconds]
rdark has joined #ruby
<Hanmac> havenwood: what is your irc client and what is your os?
<havenwood> Hanmac: Mavericks and LimeChat
iamjarvo has joined #ruby
nonamehero has quit [Ping timeout: 240 seconds]
<Hanmac> ahh its something that OSX does
zxq9 has quit [Remote host closed the connection]
dayepa1 has quit [Ping timeout: 246 seconds]
pskosinski has quit [Quit: Til rivido Idisti!]
closures999 has joined #ruby
<havenwood> Hanmac: What do you think about #zero? and #nonzero? return values? Or just irrelevant? https://bugs.ruby-lang.org/issues/9123
timmow has quit [Ping timeout: 260 seconds]
ReinH_ is now known as ReinH
<Hanmac> imo i would prefer is ? methods return only true and false ... it would make much more sense
momomomomo has joined #ruby
Thanatermesis has left #ruby ["ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ"]
SJr has quit [Max SendQ exceeded]
KevinSjoberg has quit [Ping timeout: 264 seconds]
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dayepa has joined #ruby
manoj_ has joined #ruby
xcess_denied has quit [Read error: Connection reset by peer]
closures999 has quit [Client Quit]
falten has quit [Ping timeout: 264 seconds]
SJr has joined #ruby
dettoaltrimenti has joined #ruby
mojjojo has quit [Quit: mojjojo]
jacobsmith has joined #ruby
ph8 has joined #ruby
timmow has joined #ruby
<Hanmac> havenwood: what do you think about that Enumerable#to_a should make the array of the currect size before assigning objects to it? https://bugs.ruby-lang.org/issues/9118
falten has joined #ruby
SJr has quit [Excess Flood]
bahar has quit [Ping timeout: 246 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
moneydouble has joined #ruby
bahar has joined #ruby
KevinSjoberg has joined #ruby
zxq9 has joined #ruby
SJr has joined #ruby
Reach has joined #ruby
<havenwood> Hanmac: pretty interesting, hrm
kindjal has joined #ruby
paul_k has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
<Hanmac> #size maybe not the right method, but there are other interesting ways
ananthakumaran has quit [Quit: Leaving.]
nonamehero has joined #ruby
Apane has joined #ruby
mojjojo has joined #ruby
Elhu has joined #ruby
reset has joined #ruby
echevemaster has joined #ruby
candelabra has joined #ruby
jerius has joined #ruby
jerius has quit [Client Quit]
bricker has joined #ruby
timonv has joined #ruby
decoponio has quit [Quit: Leaving...]
carraroj has joined #ruby
SJr has quit [Max SendQ exceeded]
asteros has joined #ruby
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 264 seconds]
SJr has joined #ruby
ckinni has joined #ruby
DonRichie has quit [Quit: Verlassend]
cafhacker has joined #ruby
jerius has joined #ruby
jerius has quit [Client Quit]
typicalbender has joined #ruby
nvrch has quit [Ping timeout: 248 seconds]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shadoi has joined #ruby
jbpros has quit [Quit: jbpros]
DonRichie has joined #ruby
lethjakm1 has quit [Quit: WeeChat 0.4.0]
fmcgeough has joined #ruby
workmad3 has quit [Ping timeout: 272 seconds]
<candelabra> can someone explain to me the use of && in this code exceprt https://gist.github.com/anonymous/7550493
blaskovicz has quit [Ping timeout: 245 seconds]
blaskovicz has joined #ruby
kaspergrubbe has joined #ruby
zeeraw has joined #ruby
Xeago_ has quit [Ping timeout: 264 seconds]
ExCa|iBuR has quit [Ping timeout: 245 seconds]
jbpros has joined #ruby
Drakevr has quit [Ping timeout: 260 seconds]
jalcine has quit [Excess Flood]
jbpros has quit [Client Quit]
rdark has quit [Quit: leaving]
tiglog has joined #ruby
scientes has joined #ruby
xk_id has quit [Quit:
Drakevr has joined #ruby
<scientes> how do i pass ARGV to Kernel.spawn()?
jbpros has joined #ruby
jprovazn_afk is now known as jprovazn
<scientes> aka, how do i pass arguments by array rather than many arguments
colonolGron has quit [Quit: Lost terminal]
jerius has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
mikesplain3 has joined #ruby
jbpros has quit [Client Quit]
<Hanmac> candelabra: use each_with_object
fuhgeddaboudit has quit [Ping timeout: 264 seconds]
ce_afk is now known as cescalante
<candelabra> Hanmac, I'm more wondering just about the use of &&
beermouse has joined #ruby
jbpros has joined #ruby
mikesplain2 has quit [Ping timeout: 272 seconds]
<Hanmac> candelabra: i think thats the better code: each_with_object({}){|c,hash| hash[c.respond_to?(:name) ? c.name : c['name']] = c }
postmodern has joined #ruby
mikesplain3 has quit [Read error: Connection reset by peer]
cascalheira has quit [Quit: Leaving...]
pel_daniel has quit [Quit: Leaving.]
scientes has quit [Ping timeout: 264 seconds]
Monie has joined #ruby
phinfonet has joined #ruby
zxq9 has quit [Remote host closed the connection]
bricker has quit [Ping timeout: 252 seconds]
Ox6abe has joined #ruby
freezey has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
bricker has joined #ruby
sergicles has quit [Ping timeout: 272 seconds]
Drakevr has quit [Ping timeout: 260 seconds]
claymore has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
barratt has joined #ruby
el_cristobal has joined #ruby
<joshu> hi i'm using nokogiri to parse the anchor tags of an html file (local) with over 3000 links and outputting the links in CSV format. I can't explain why the script finishes successfully but the CSV only has < 400 lines when it should be over 3000. Here's my script https://gist.github.com/anonymous/0f5648bfe6c8ecd93ce0
freezey has joined #ruby
subbyyy has quit [Ping timeout: 252 seconds]
sambao21 has joined #ruby
vlad_starkov has joined #ruby
moneydouble has quit [Quit: Leaving.]
claymore has joined #ruby
fuhgeddaboudit has joined #ruby
Kamuela has joined #ruby
edwardly_ has quit [Quit: ZNC - http://znc.in]
cafhacker has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xcv has quit [Remote host closed the connection]
sambao21 has quit [Client Quit]
edwardly has joined #ruby
xcv has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
<joshu> it seems as if nokogiri isn't loading the complete html file
ua_ has quit [Quit: Leaving]
ua has joined #ruby
danshult_ has joined #ruby
sambao21 has joined #ruby
yokel has joined #ruby
tonni has quit [Remote host closed the connection]
<jkamenik> joshu: you may want to use the SAX parser
tonni has joined #ruby
moneydouble has joined #ruby
<joshu> jkamenik is there something wrong in my code or is the issue with nokogiri handling such a large file?
Ox6abe has quit [Remote host closed the connection]
carraroj has joined #ruby
xcv has quit [Ping timeout: 240 seconds]
mjs2600 has quit [Remote host closed the connection]
<jkamenik> the code looks fine
magoo has joined #ruby
zxq9 has joined #ruby
carraroj has quit [Client Quit]
danshultz has quit [Ping timeout: 245 seconds]
danielcharles has joined #ruby
reset has quit [Quit: Leaving...]
<jkamenik> But if you aren't seeing the whole file it could be a memory issue
<jkamenik> or it could be a malformed html page issue
krz has quit [Ping timeout: 240 seconds]
xk_id has joined #ruby
Drakevr has joined #ruby
<jkamenik> but in general, if you are scanning an XML document for then use SAX
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
smathieu has joined #ruby
carraroj has joined #ruby
mikecmpbll has quit [Quit: Computer has gone to sleep.]
pothibo has joined #ruby
phus1on has joined #ruby
<joshu> jkamenik this is an html document generated by safari…it's safari bookmarks export file
tonni has quit [Ping timeout: 246 seconds]
jalcine has joined #ruby
johhny111 has quit [Remote host closed the connection]
pwh has quit []
kirun has joined #ruby
ssvo has quit [Ping timeout: 252 seconds]
w4pm has quit [Ping timeout: 272 seconds]
jbpros has quit [Quit: jbpros]
Nenor has joined #ruby
mikesplain has joined #ruby
deviantlinux has joined #ruby
w4pm has joined #ruby
<deviantlinux> I can't figure out how to get "log_dir" to output. I keep getting test2.rb:83: undefined local variable or method `log_dir' for main:Object (NameError) --- http://pastebin.com/796tisB0
mjs2600 has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
nobitanobi has joined #ruby
mjs2600 has quit [Remote host closed the connection]
blaskovicz has quit [Quit: Leaving.]
diegoviola has joined #ruby
ssvo has joined #ruby
newbiehacker has quit [Ping timeout: 252 seconds]
Drakevr has quit [Ping timeout: 260 seconds]
Drakevr has joined #ruby
zz_jrhorn424 is now known as jrhorn424
kreantos has joined #ruby
aMoniker has joined #ruby
<aMoniker> What's the best way of checking that an environment variable is set before trying to access it?
<jacobsmith> deviantlinux: make log_dir an instance varaible (@log_dir)
jhamon has joined #ruby
mikepack has quit [Remote host closed the connection]
<jacobsmith> aMoniker: have you looked at the gem dotenv? I think it has something in there for that
<deviantlinux> jacobsmith: @log_dir = line_arr.last
sparrovv has joined #ruby
pwh has joined #ruby
timonv has quit [Ping timeout: 264 seconds]
<deviantlinux> jacobsmith: that did not work, same ish error.
subbyyy has joined #ruby
<jacobsmith> deviantlinux: hmm...gimme a sec to test it on my machine
asteros has quit [Quit: asteros]
<aMoniker> jacobsmith: What type of variable is ENV? I'm wondering if there's a general way of checking the existence of a key in a hashmap/array
<aMoniker> or whatever data structure ENV is
Advocation has joined #ruby
lkba has quit [Ping timeout: 240 seconds]
d45h has joined #ruby
<dkastner> aMoniker: ENV is a plain ol' hash
<jacobsmith> deviantlinux: did you change both inside the loop and in your puts statement?
<deviantlinux> jacobsmith: puts "Dir is #{@log_dir}"
<deviantlinux> jacobsmith: when I do that it seems to work
<deviantlinux> thanks!
<aMoniker> dkastner: ok cool, so how do I check for the existence of a key in a hash?
`MArceLL` has quit [Ping timeout: 246 seconds]
<jacobsmith> jacobsmith: no problem! (when you created it without the @, it only existed within the loop, not outside of it)
<jacobsmith> oops, deviantlinux, not jacobsmith, haha
mjs2600 has joined #ruby
<dkastner> aMoniker: `ENV.keys.include?('FOO')` or you can just check that ENV['FOO'] is not nil
<sparrovv> oMnokier: ENV.key? 'KEY'
<dkastner> sparrovv aMoniker: yeah that too
cek has quit [Quit: жопа диридай диридиридай]
<aMoniker> so I could do: if ENV.key? && ENV['key']
geggam_ has quit [Quit: Leaving]
<aMoniker> to test that the key exists and it contains a truthy value?
jhamon has quit [Ping timeout: 246 seconds]
<bricker> What is the standard error to raise to say, "You need to override this method in your subclass"? Like in Java you just add @Override, and it's enforced. I see Rails using `NotImplementedError`, but that always seemed like the wrong error to me.
<sparrovv> aMoniker: kinda, you have to ask for the key `if ENV.key?('key') && ENV['key']`
<bricker> I know I can make my own error, just wondering if something already exists
<aMoniker> sparrovv: oh oops, that makes sense, thanks
<sparrovv> aMoniker: np
<dkastner> aMoniker: beware that ENV values will always be strings, so if ENV['FOO'] is set to 'false' a check of its truthiness will always be true
derebos has joined #ruby
<aMoniker> dkastner: good to know, thank you
noop has quit [Ping timeout: 272 seconds]
deviantlinux has left #ruby [#ruby]
jhamon has joined #ruby
aspires has quit [Quit: sudo making a sandwich]
jkamenik has quit [Ping timeout: 272 seconds]
jmccune has quit [Ping timeout: 272 seconds]
Vivekananda has joined #ruby
zeeraw has quit [Quit: Textual IRC Client: www.textualapp.com]
dettoaltrimenti has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
subbyyy has quit [Ping timeout: 264 seconds]
atmosx has joined #ruby
<atmosx> hello
vadviktor_ has quit [Quit: No Ping reply in 180 seconds.]
vadviktor_ has joined #ruby
drumusician has quit [Remote host closed the connection]
<Kamuela> welcome back, atmosx
<atmosx> how are you Kamuela ?
coderhs has quit [Ping timeout: 264 seconds]
drumusician has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
RichardBaker has quit [Quit: RichardBaker]
<Kamuela> pretty good, trying to figure out how to get my user auth working in Rails
<Kamuela> likely going to be using the devise gem
mojjojo has quit [Quit: mojjojo]
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
popl has quit [Quit: And then there are people who prefer to look their fate in the eye.]
nomenkun has joined #ruby
nobitanobi has quit [Ping timeout: 264 seconds]
mjs2600 has quit [Remote host closed the connection]
<atmosx> Kamuela: Oh I see.
Elhu has quit [Quit: Computer has gone to sleep.]
blaskovicz has joined #ruby
mojjojo has joined #ruby
d45h has quit []
ckinni has joined #ruby
mudmaster has joined #ruby
Hanmac1 has joined #ruby
mudmaste_ has quit [Ping timeout: 252 seconds]
mudmaste_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
Hanmac has quit [Ping timeout: 252 seconds]
ffranz has quit [Quit: Leaving]
tvw has quit []
skaflem has quit [Quit: Leaving]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
derebos has quit [Quit: Leaving]
ehaliewicz has joined #ruby
lightswitch05 has joined #ruby
sparrovv has quit [Remote host closed the connection]
nobitanobi has joined #ruby
mjs2600 has joined #ruby
<lightswitch05> any interest in a feature to allow `Array#include?` to accept a block?
mudmaster has quit [Ping timeout: 252 seconds]
maletor has joined #ruby
<nobitanobi> morning guys
jbpros has joined #ruby
<Hanmac1> lightswitch05: isnt that like #any?
<Kamuela> morning nobitanobi
<nobitanobi> Kamuela, hi baby
<shaileshg__> Hi, can anyone explain what does $! means in https://eval.in/69756
<Kamuela> not all that glitters is goldddd, only shootin starrs breakkk tha mowooo-old
<shaileshg__> and what is programmer trying to achieve thr
<lightswitch05> crap, I knew something so common had to of already been implemented. thanks
jrhe has quit [Quit: jrhe]
banister has joined #ruby
weszlem has joined #ruby
Kilo`byte has quit [Ping timeout: 272 seconds]
Advocation has quit [Quit: Advocation]
<shaileshg__> ?
Xeago has joined #ruby
BizarreCake has quit [Quit: Leaving]
yacks has joined #ruby
<apeiros> shaileshg__: $! is the last raised exception
allanm_ has joined #ruby
coderhs has joined #ruby
<shaileshg__> apeiros: oh okay. where can i read more about it
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shaileshg__> and such other idioms in ruby
mikepack has joined #ruby
phrozen77 has quit [Ping timeout: 252 seconds]
aspires has joined #ruby
lightswitch05 has left #ruby [#ruby]
g0bl1n has quit [Ping timeout: 252 seconds]
freezey has quit [Remote host closed the connection]
tessi has quit [Ping timeout: 252 seconds]
momomomomo has joined #ruby
<Hanmac1> shevy: http://i.imgur.com/W7W24rO.jpg << "i wish my company has"
brahman_work has quit [Read error: Connection reset by peer]
brahman_work has joined #ruby
allanm has quit [Ping timeout: 252 seconds]
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
jmeeuwen has quit [Ping timeout: 252 seconds]
krnflake has quit [Ping timeout: 252 seconds]
jerius has quit [Quit: Computer has gone to sleep.]
jhamon has quit [Quit: jhamon]
yekta has joined #ruby
MrZYX|off is now known as MrZYX
tessi has joined #ruby
<joshu> so I'm still trying to understand my problem with nokogiri. I don't understand if I'm encountering a memory issue as the file is not fully loaded, what does the SAX parser do differently? never used nokogiri before, so I'd like to understand what's worng.
ldnunes has quit [Quit: Leaving]
krnflake has joined #ruby
phrozen77 has joined #ruby
Tarential has quit [Excess Flood]
mikepack has quit [Ping timeout: 246 seconds]
Tarential has joined #ruby
<shaileshg__> apeiros: got some links.. thanks btw :)
tiglog has quit [Quit: Leaving]
petey has quit [Remote host closed the connection]
jhaals has joined #ruby
<nobitanobi> joshu, explain further
freezey has joined #ruby
Elhu has joined #ruby
<joshu> nobitanobi i'm using nokogiri to parse the anchor tags of an html file (local) with over 3000 links and outputting the links in CSV format. I can't explain why the script finishes successfully but the CSV only has < 400 lines when it should be over 3000. Here's my script https://gist.github.com/anonymous/0f5648bfe6c8ecd93ce0
<joshu> [20:19:49] <joshu> it seems as if nokogiri isn't loading the complete html file
Ripp__ has quit []
RichardBaker has joined #ruby
sparrovv has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
randomnick_ has quit [Read error: Connection reset by peer]
<nobitanobi> have you tried to getting those <a>, put them in an array (@my_array) and do puts @my_array.size?
axilla has joined #ruby
<nobitanobi> just to make sure you are actually getting all the <a> that you think are over 3000 ?
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mojjojo has quit [Quit: mojjojo]
<nobitanobi> so..don't use CSV first. Just try to see if you are actually getting the <a> correctly.
Ox6abe has joined #ruby
<Hanmac1> nobitanobi: no its "OVER 9000!!" ;D
dangerousdave has quit [Quit: Linkinus - http://linkinus.com]
bradhe has joined #ruby
Hanmac1 is now known as Hanmac
Elhu has quit [Client Quit]
drumusician has quit [Ping timeout: 272 seconds]
<joshu> nobitanobi right I haven't done that but I have compared the output of "doc" with my html file and can confirm that all anchor tags are not loaded.
barratt has quit [Quit: Linkinus - http://linkinus.com]
spider-mario has joined #ruby
xcv has joined #ruby
<nobitanobi> is your HTML valid?
randomnick_ has joined #ruby
ckinni has joined #ruby
<nobitanobi> can you show the HTML? so I can try in my machine?
mklappstuhl has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Advocation has joined #ruby
`MArceLL` has joined #ruby
rezzack has joined #ruby
Ox6abe has quit [Ping timeout: 245 seconds]
Tearan has joined #ruby
<joshu> the html is valid. it has been generated by Safari with the export bookmarks feature. I can't show the HTML but as a test I've deleted some anchor tag entries and when I ran my script it would process the same amount of tags, but obviously different ones. In other words the HTML file is fine. The problem is with nokogiri loading all of it. jkamenik suggested SAX, so I'm googling that and trying to understand the problem
<joshu> nobitanobi sorry can't share the html
benwoody has quit [Quit: benwoody]
petey has joined #ruby
mojjojo has joined #ruby
<nobitanobi> joshu, I work with Nokogiri in a daily basis. Huge HTML/XML files, and I haven't had these kind of problems
<nobitanobi> But, go ahead and try SAX. I hope that helps :)
jacobsmith has quit [Ping timeout: 248 seconds]
reset has joined #ruby
<joshu> nobitanobi do you see anything wrong in my code?
Ripp__ has joined #ruby
IceDragon has quit [Ping timeout: 246 seconds]
benlieb has quit [Quit: benlieb]
<joshu> nobitanobi stupid question but can it have something to do with the doctype, e.g. "<!DOCTYPE NETSCAPE-Bookmark-file-1>"
IceDragon has joined #ruby
<nobitanobi> no questions are stupid man!
Kamuela has quit [Quit: Leaving]
<nobitanobi> joshu, I don't think so. But you might want to change it and see.
sriehl has joined #ruby
nisstyre has joined #ruby
<nobitanobi> I am gonna try your code. one min
benwoody has joined #ruby
cody-- has quit [Quit: derp]
<joshu> nobitanobi do you use Mac and can try exporting your own bookmarks from Safari?
<nobitanobi> I use Ubuntu :/
reset has quit [Ping timeout: 240 seconds]
<nobitanobi> joshu, are you sure all your links have 'content' and 'href' ?
jonathanwallace has quit [Ping timeout: 265 seconds]
<nobitanobi> I believe your code looks ok.
<nobitanobi> if you could share the HTML, I could try to help you further
<joshu> yeah all links have two two attributes. Even when I run just doc = Nokogiri::HTML(open("#{dir}/bookmarks.html"))
<joshu> puts doc
<joshu> "doc" is not the complete file before I even parse it.
theRoUS has quit [Ping timeout: 272 seconds]
<nobitanobi> what do you mean
<nobitanobi> is not the complete file?
pwh has quit []
fmcgeough has quit [Ping timeout: 272 seconds]
freakazoid0223 has quit [Quit: Leaving]
Ox6abe has joined #ruby
freakazoid0223 has joined #ruby
kristofers has quit [Remote host closed the connection]
jerius has joined #ruby
<nobitanobi> joshu, try to minimize the problem you are facing. Reduce the size of the HTML to say, 50 anchors. See if you get them all.
<joshu> nobitanobi ok let me try now
<nobitanobi> I am pretty confident the problem is not Nokogiri, but the HTML is not well formed
banister has joined #ruby
<nobitanobi> I have to go. good luck
asteros has joined #ruby
`MArceLL` has quit [Ping timeout: 246 seconds]
<s2013> i have a string ["start", "end", "close"] i want to turn this into an array of start, end, close, how would i do it?
`MArceLL` has joined #ruby
<s2013> i tried using regular expression but it doesnt work
<s2013> only selects the first character
banister has quit [Client Quit]
jonahR has joined #ruby
<s2013> [^\"\[\]] <-- regex i tried
mikepack has joined #ruby
banister has joined #ruby
<apeiros> s2013: why do you have that kind of string?
<apeiros> did you generate it?
fmcgeough has joined #ruby
<s2013> no i didnt. its in the db
i_s has quit [Remote host closed the connection]
<s2013> its an array saved as a string
<s2013> now i need to convert it to an array, modify it and save it back
<apeiros> the easy solution is to use LiteralParser (doesn't use eval) or to use eval (bad idea IMO)
<apeiros> did you save it into the db?
<s2013> i dont want to use eval
<s2013> no i didnt save it
Ox6abe has quit [Ping timeout: 272 seconds]
<Hanmac> >> '["start", "end", "close"]'.scan(/"(\w+)"/).map(&:first)
<eval-in> Hanmac => ["start", "end", "close"] (https://eval.in/69910)
<apeiros> well, if you can't change how it's being saved, I'd suggest using LiteralParser
michael_mbp is now known as zz_michael_mbp
<s2013> whats literalparser
<Hanmac> s2013: next time i sugest storing it as json or similar
<s2013> dude im not the one that stored it
<s2013> this is old data im converting to correct format
asteros has quit [Client Quit]
jerius has quit [Quit: Computer has gone to sleep.]
blueOxigen has quit [Ping timeout: 246 seconds]
<s2013> let me try scan
fmcgeough has quit [Client Quit]
Nenor has left #ruby [#ruby]
freezey has quit [Remote host closed the connection]
<joshu> nobitanobi that worked fine 50 out of 50
pwh has joined #ruby
<joshu> ok nobitanobi thanks for your help ;)
vlad_starkov has quit [Remote host closed the connection]
<s2013> also Hanmac wouldnt flatten work the same or no?
<s2013> instead of map(&:first)
<Hanmac> hm yeah would work too
<s2013> cool. thanks
phansch has quit [Quit: Leaving]
macmartine has joined #ruby
nobitanobi has quit [Ping timeout: 245 seconds]
<Hanmac> better regex:
<Hanmac> >> '["start", "end", "close"]'.scan(/(?<=")\w+(?=")/)
<eval-in> Hanmac => ["start", "end", "close"] (https://eval.in/69911)
mikepack has quit [Ping timeout: 264 seconds]
<s2013> hmm
<s2013> how so
<s2013> that looks more confusing to me :\
Ox6abe has joined #ruby
paul_k has quit [Remote host closed the connection]
fmcgeough has joined #ruby
`MArceLL` has quit [Ping timeout: 246 seconds]
<moneydouble> What makes ruby better than python? I'm kinda debating. :P
<s2013> ruby is 4 letters, python is 6
<IceDragon> <moneydouble> What makes ruby better than python? I'm kinda debating. :P # ones a precious gem and the other is a snake.
* Hanmac feels a storm is coming
<s2013> both are good, depending on what you want to do
smathieu has quit [Remote host closed the connection]
<moneydouble> heh
<AltGrendel> different tools for different jobs.
kindjal has quit [Quit: Computer has gone to sleep.]
<moneydouble> web apps.
freezey has joined #ruby
<s2013> then rails imo
<s2013> so rub
<s2013> ruby*
<Hanmac> moneydouble: i like in ruby that you dont need "self" as parameter for the functions
smathieu has joined #ruby
kindjal has joined #ruby
<s2013> id say many if not most people that does ruby has had some exposure to python but not the other way around
<moneydouble> hmm..
timonv has joined #ruby
<moneydouble> well, I really like python and have built things with it, but I'm defiantly interested in learning ruby.
<moneydouble> Ruby doesn't seem to be as popular?
kaspergrubbe has quit [Remote host closed the connection]
<s2013> just learn it then. rails is very popular
<s2013> if you want to do web apps
cnrk has joined #ruby
<s2013> and i like it better than django
<cwarner> i use python rather heavily.. i'm using ruby now.. it's not half bad
<moneydouble> s2013: any reason you prefer it over django?
Elhu has joined #ruby
funburn has joined #ruby
timonv has quit [Remote host closed the connection]
pothibo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
timonv has joined #ruby
<s2013> seems cleaner and more support
kreantos has quit [Remote host closed the connection]
<moneydouble> s2013: where would I start to learn ruby and rails? any good tutorials/guides/books?
dhruvasa1ar has quit [Quit: leaving]
Tuxist has joined #ruby
<s2013> yeah. learn basics of ruby first beofre jumping into rails
<s2013> for ruby a good book is well grounded rubyist
<s2013> and for rails, best one is michael hartl rails tutorial (its free online, just google it)
<s2013> you can also do the free codeacademy ruby tutorial. they arent half bad
smathieu has quit [Ping timeout: 252 seconds]
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<moneydouble> Ruby and ror seems to be pretty good honestly, but I'm trying to figure out the use cases. I'm building a fairly large web application.. One part of it is db intentive
<moneydouble> * intensive
<moneydouble> and the other is basically outputting data from the db.
mojjojo has quit [Quit: mojjojo]
<moneydouble> I've been building it in django but trying to find a use case for ruby / ror :P
<s2013> youll be fine.. but if you are good with django, just stick with it
`MArceLL` has joined #ruby
sheepman has joined #ruby
momomomomo has quit [Quit: momomomomo]
<moneydouble> s2013: yeah well I am for the most part, but I do have to create an API so im curious if I should do that in ruby with ror :P
<moneydouble> it'll be separate from my application anyway.
<Hanmac> just keep in mind that ruby is not rails, you can do so much more with ruby than only rails ;P
<moneydouble> yeah
timonv has quit [Ping timeout: 272 seconds]
<moneydouble> well that applies to most languages except php :P
<s2013> rails has some good api building gems. look into rabl
mojjojo has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
reset has joined #ruby
beermouse has quit [Quit: beermouse]
bradhe has quit [Remote host closed the connection]
nanoyak has joined #ruby
whunt has quit [Quit: Computer has gone to sleep.]
kaldreno_ has joined #ruby
bradhe has joined #ruby
pwh has quit []
flops has quit [Quit: leaving]
sgnl has joined #ruby
`MArceLL` has quit [Remote host closed the connection]
drumusician has joined #ruby
`MArceLL` has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
<moneydouble> s2013: interesting, yeah I'm def interested in learning ruby and ror and who knows its usecases for me down the line. :)
kaldrenon has quit [Ping timeout: 272 seconds]
kaspergrubbe has joined #ruby
beermouse has joined #ruby
momomomomo has joined #ruby
bnagy_ is now known as bnagy
<Hanmac> moneydouble: i use ruby for window gui libs and i can also use ruby for 3d gems ... and with the right driver it is not so slow
bradhe has quit [Ping timeout: 272 seconds]
dgfdgf has joined #ruby
j-allen has joined #ruby
jonathanwallace has joined #ruby
mikepack has joined #ruby
cescalante is now known as ce_afk
`MArceLL` has quit [Ping timeout: 246 seconds]
`MArceLL` has joined #ruby
asteros has joined #ruby
drumusician has quit [Ping timeout: 272 seconds]
Wixy has quit [Quit: Leaving]
havenwood has quit [Remote host closed the connection]
jerius has joined #ruby
jerius has quit [Client Quit]
havenwood has joined #ruby
Evixion has joined #ruby
<apeiros> s2013: literal_parser is a gem
kindjal has quit [Ping timeout: 272 seconds]
dgfdgf has quit [Ping timeout: 246 seconds]
drumusician has joined #ruby
psyl0n has quit [Remote host closed the connection]
Mars` has joined #ruby
beermouse has quit [Quit: beermouse]
jhamon has joined #ruby
zigomir has quit [Ping timeout: 272 seconds]
RichardBaker has joined #ruby
Elhu has joined #ruby
havenwood has quit [Ping timeout: 245 seconds]
jhamon has quit [Client Quit]
AltGrendel has left #ruby [#ruby]
jhamon has joined #ruby
KevinSjoberg has quit [Ping timeout: 246 seconds]
jhamon has quit [Client Quit]
Advocation has quit [Quit: Advocation]
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
funburn has quit [Quit: funburn]
martxel has quit [Ping timeout: 264 seconds]
carraroj has quit [Ping timeout: 240 seconds]
Ox6abe has quit []
KevinSjoberg has joined #ruby
amoli has joined #ruby
jerius has joined #ruby
failshell has joined #ruby
venk has quit [Remote host closed the connection]
nobitanobi has joined #ruby
vlad_starkov has joined #ruby
<s2013> http://paste.ubuntu.com/6444899/ whats wrong with this code? na returns an array of hash correctly but the action is all the same
Kilo`byte has joined #ruby
jhamon has joined #ruby
whunt has joined #ruby
<apeiros> s2013: you mutate the same hash all the time
<s2013> yeah but i store that in an array
<apeiros> that doesn't magically turn it into a new hash
<s2013> so i need to set it back to nth = {} ?
<Hanmac> s2013: nth is the same object
<nobitanobi> joshu, you found the solution?
<apeiros> >> a = "foo"; b = [a,a,a]; a.upcase!; b
<eval-in> apeiros => ["FOO", "FOO", "FOO"] (https://eval.in/69912)
jprovazn has quit [Quit: Odcházím]
<s2013> hmmm. so whats the best way to do this?
<apeiros> use a new hash on each iteration
<apeiros> and IMO just use a hash literal too
<apeiros> na << {time: Time.now, action: val}
danshult_ has quit [Read error: Connection reset by peer]
<s2013> k let me try that
newbiehacker has joined #ruby
<Hanmac> s2013: why using each_with_index when map works too? na = ta.map {|val| {:time => Time.now, :action => val} }
danshultz has joined #ruby
<apeiros> and that
paul_k has joined #ruby
<s2013> this is just a small sample set of a larger thing i need to write
<apeiros> Hanmac: you don't like 1.9 hash syntax?
<s2013> but what apeiros worked. thanks
<joshu> nobitanobi hi not quite there but it I think with SAX it works. I can't figure out how to save to the csv with this new SAX code...https://gist.github.com/anonymous/e9d4339427b48e316e84
<Hanmac> hm you are right with 1.9+ it would work too
Elhu has quit [Quit: Computer has gone to sleep.]
smathieu has joined #ruby
lkba has joined #ruby
rismoney has joined #ruby
jhamon has quit [Quit: jhamon]
mikecmpbll has joined #ruby
s_kilk has joined #ruby
<rismoney> if i have an array of hash, how do i return just the key not the value... ie foo=[{"PC-FAKE01"=>"foo"},{"PC-FAKE02"=> "bar"}] - I'd like to return an array of PC-FAKE01,PC-FAKE02
<Hanmac> rismoney: foo.flat_map(&:keys)
<failshell> what
<failshell> 's the best way to fix that dreaded net/http SSL issue with invalid certs?
<rismoney> 1.8.7...
<failshell> in 2.0
<rismoney> woops
timonv has joined #ruby
<Hanmac> rismoney: 1.8.7 died
* IceDragon chokes
<IceDragon> 1.8.x !
<bnagy> failshell: with google
<bnagy> there are lots of variables, and about three main approaches I've seen online
<bnagy> of which not all work for every case
Advocation has joined #ruby
<rismoney> i did a foo.map(&:keys) and it looks right
<joshu> nobitanobi yeah in the console I can see that SAX is working and finding all the anchor links. Just need to fix exporting to csv
<nobitanobi> joshu, +1
<rismoney> with a flaten
BraddPitt has quit [Ping timeout: 272 seconds]
atmosx has quit [Quit: Lost in trance]
h0rrorvacui has quit [Quit: Leaving]
bradhe has joined #ruby
Monie has joined #ruby
ebobby has joined #ruby
jrhe has joined #ruby
<s2013> >> JSON.parse
<eval-in> s2013 => uninitialized constant JSON (NameError) ... (https://eval.in/69924)
<s2013> >> require 'json'
<eval-in> s2013 => (https://eval.in/69925)
<s2013> >> JSON.parse '["start","end","close"]'
<eval-in> s2013 => uninitialized constant JSON (NameError) ... (https://eval.in/69926)
manoj_ has quit [Quit: Leaving...]
<s2013> damn.. anyways Hanmac JSON.parse also works heh
atrocitas has joined #ruby
jhamon has joined #ruby
<Hanmac> oh i didnt know it was valid json
i_s has joined #ruby
<s2013> it was a string
maletor has quit [Quit: Computer has gone to sleep.]
<s2013> ["blah", "blah"] but if you did json.parse it returns an array
<s2013> oh well. its all good. many ways to do the same thing
s_kilk has quit [Quit: Leaving]
diegoviola has quit [Quit: WeeChat 0.4.2]
<bnagy> JSON.parse is just as dangerous as eval
<s2013> how so?
<bnagy> for untrusted data
rudisimo has quit [Quit: Leaving.]
<s2013> well its our own data
<bnagy> then use eval
<bnagy> :)
<bnagy> at least it will always be there reminding you that you're doing something awful
maletor has joined #ruby
<s2013> yea
* Hanmac should mark his code that is older than 4 weeks also as "untrusted" ;P
newUser1234 has quit [Ping timeout: 272 seconds]
dgfdgf has joined #ruby
<s2013> Hanmac, what do you do?
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
tonni has joined #ruby
<Hanmac> i use evil C++ classes, combine them with more evil C macros and turn them into a little bit evil ruby code ;P
stozza has joined #ruby
stozza has left #ruby [#ruby]
`MArceLL` has quit [Ping timeout: 246 seconds]
watermel0n has quit []
<s2013> nice
<s2013> what kind of company do you work at?
timonv has quit [Ping timeout: 245 seconds]
<Hanmac> currently some kind of ecommerce company, where i use php code ... the C/C++/Ruby stuff is for my free time
Grantlyk has joined #ruby
<apeiros> bnagy: how's JSON parse as dangerous as eval?
<s2013> oh ok cool
<s2013> we use c, python and ruby at work
ExxKA has quit [Read error: Connection reset by peer]
<Morrolan> Work? PHP and Perl. Sigh.
<Hanmac> s2013: do you know C/C++? if yes try to solve this macro https://github.com/Hanmac/sfml-ruby/blob/master/ext/Vector2.cpp#L98 ... this file helps you with that https://github.com/Hanmac/sfml-ruby/blob/master/ext/main.hpp
pragmatism has quit [Quit: Leaving...]
timonv has joined #ruby
<s2013> only thing from c++ i remember is cout << "hello world\n";
<Morrolan> Hanmac: Ever thought about producing crossword puzzles for programmers? :P
mansi has quit [Ping timeout: 272 seconds]
<bnagy> apeiros: cause it builds objects?
<Hanmac> Morrolan: hm not yet, but i think my "macro_attr" macros are the nicest & evilest code i made, ... depending on the point of view ;P
<Morrolan> Right after you wrote them: Nicest. Two months later: Most evil? :P
Liquid-- has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
moneydouble has quit [Quit: Leaving.]
BraddPitt has joined #ruby
vlad_starkov has joined #ruby
<Hanmac> something like that ... this macros are for creating C methods including its bodies from less parameters as possible
<bnagy> apeiros: it's just slightly more work to execute code
moneydouble has joined #ruby
<Morrolan> Heh, I see.
<apeiros> bnagy: that's quite different from what eval does
<apeiros> JSON.parse doesn't let you execute random code
Rumsteak has joined #ruby
newUser1234 has joined #ruby
jhamon has quit [Quit: jhamon]
Rumsteak has left #ruby [#ruby]
<bnagy> whatever you say
<bnagy> you should hook up with the rails guys
agent_white has joined #ruby
<apeiros> bnagy: dude
Advocation has quit [Quit: Advocation]
<apeiros> please refer to an actual exploit based solely on JSON input
timonv_ has joined #ruby
timonv has quit [Remote host closed the connection]
jerius has quit [Quit: Computer has gone to sleep.]
<Hanmac> Morrolan: depending on the lib, the created c methods are doing more then just converting, they are also capably to catch exceptions and convert them into the correct ruby versions ... and all for macro_attr is the name of the Attribute and its type
<apeiros> rails did a bit more than just parse json
parduse has quit []
newUser1234 has quit [Read error: Connection reset by peer]
newUser1_ has joined #ruby
<Morrolan> Hanmac: Huh, nice.
vlad_starkov has quit [Remote host closed the connection]
<Hanmac> Morrolan: i think you may like that pieace of code: https://github.com/Hanmac/sfml-ruby/blob/master/ext/RenderState.cpp#L61-L82
<s2013> im just converting really old data into new format.. except we never had a proper format before so the data is in all different types
j-allen has quit [Quit: j-allen]
k776 has joined #ruby
parduse has joined #ruby
pragmatism has joined #ruby
newUser1234 has joined #ruby
<joshu> nobitanobi I have come this far https://gist.github.com/anonymous/99149a96167d4ef4e58b
axl_ has joined #ruby
<k776> Hello. Does anyone know of a good list (csv file that can be parsed or a service with a ruby api) of countries, their major cities/regions, and which timezone those cities are, and their currencies (currency symbol and code (e.g. USD$))?
<bean> thats an awfully specific list.
cburyta__ has quit [Remote host closed the connection]
magoo has quit [Quit: WeeChat 0.4.2]
pragmatism has quit [Remote host closed the connection]
magoo has joined #ruby
<apeiros> k776: if freebase still is a thing… I think something like that was their aim
newUser1_ has quit [Ping timeout: 272 seconds]
<bean> theres some stuff
evenix has quit [Ping timeout: 272 seconds]
<bean> doesn't have the symbol
<bean> but has like
<bean> USD and GBP
ringaroses1 has joined #ruby
<s2013> but you can easily find another db or something
momomomomo has quit [Quit: momomomomo]
Elhu has joined #ruby
<s2013> and then map it ot the country
spider-mario has quit [Remote host closed the connection]
<Morrolan> k776: If your list isn't too big, and you don't need to refresh this information (which, come to think of it, really shouldn't be the case), then you could scrape Wikipedia.
<Morrolan> They have these nice, uniform information tables.
<k776> bean: That looks good for a list of countries, but doesn't get me cities or their timezones unfortunately
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cburyta has joined #ruby
<bean> *shrug* one could combine several lists pretty easily
magoo has quit [Client Quit]
Elhu has quit [Client Quit]
timonv_ has quit [Remote host closed the connection]
jerius has joined #ruby
nomenkun_ has joined #ruby
<s2013> carmen gem
mjs2600 has quit [Remote host closed the connection]
<s2013> look into that k776
<bean> as in "where int he world is carmen sandiego?
<bean> "
<s2013> yes
<k776> s2013: Looking now
ringaroses has quit [Ping timeout: 272 seconds]
s_kilk has joined #ruby
jerius has quit [Client Quit]
maroloccio has quit [Quit: WeeChat 0.4.1]
<ebobby> :l
<apeiros> bnagy: ok, 10min - I think your blanket statement of "parsing json is as bad as eval" was talking out of your ass. and no, rails' param input handling does not fit the bill of that blanket statement.
<ebobby> it would be awesome if I could use ruby @ work
magoo has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
<s2013> you can get the iso code from carmen i believe
jrhe has quit [Quit: jrhe]
<s2013> or some thing like that
nomenkun has quit [Ping timeout: 272 seconds]
otherj has joined #ruby
kindjal has joined #ruby
ckinni has joined #ruby
nomenkun_ has quit [Remote host closed the connection]
<k776> s2013: Both gems look very promising. Looks like they contain all information except timezones :-(
cburyta has quit [Ping timeout: 272 seconds]
* k776 will do some testing
<s2013> k776, look into rgeo
<s2013> i think thats the gem
<bnagy> apeiros: oh, I wasn't looking for a link
<s2013> but thats more for coordinates and stuff
dweeb_ has joined #ruby
<bnagy> but as long as it can be used to create generic objects then it will break stuff
<bnagy> not every single thing will be trivially breakable, no
<apeiros> json does not consist of generic objects.
jerius has joined #ruby
<apeiros> it has about 10 types.
pixelgremlins has quit [Ping timeout: 264 seconds]
kindjal has quit [Ping timeout: 246 seconds]
jkhwan has quit [Remote host closed the connection]
<apeiros> and yes, of course, you can build broken parsers (javascript which plainly evaled, C with buffer overflows)
whunt has quit [Quit: Textual IRC Client: www.textualapp.com]
mikepack has quit [Remote host closed the connection]
<apeiros> but that's the generic issue of dealing with input and is rather unrelated to "eval vs. parse json"
jkhwan has joined #ruby
jhamon has joined #ruby
kindjal has joined #ruby
<k776> s2013: Thank you. I'll look into all of them now
<s2013> np good luck
jkhwan has quit [Read error: Connection reset by peer]
<bnagy> ruby used to have a 'build a generic class' in its parser?
<bnagy> did they fix it?
<bnagy> rrr Y U MAKE ME GOOGLE
jkhwan has joined #ruby
<bnagy> trying to actually work
jhamon has quit [Client Quit]
<apeiros> that'd fit the bill of "you have a parser which doesn't just parse json".
<apeiros> well, go work then. I go to sleep. gn8
<bnagy> json_class
<apeiros> as said, rails param input handling is not just json.
<bnagy> that's nothing to do with rails
moneydouble has quit [Quit: Leaving.]
<bnagy> you have to actually click the link
benwoody has quit [Quit: benwoody]
<bnagy> that will screw just about any orm
<apeiros> oh, that's actually a new one…
cburyta has joined #ruby
<bnagy> btu they fixed it
<bnagy> so you win this round
<bnagy> but there will be MOAR
<apeiros> bnagy: anyway, category of "broken input handling". but I really wish people weren't as stupid to pack non-standard stuff in standard-sounding-methods.
jbpros has quit [Quit: jbpros]
momomomomo has joined #ruby
jbueza has joined #ruby
pwh has joined #ruby
<apeiros> parse_with_extras if you want to do additional and dangerous shit.
<bnagy> well I really wish people weren't stupid enough to unserialize untrusted data
<bnagy> especially as objects
<bnagy> like, serialise DATA not OBJECTS
<Morrolan> Hard, in a language where most things are objects. ;D
<bnagy> really not hard
<bnagy> CSV is uderrated
<apeiros> I have a more differentiated view. but since I want to go to sleep…
<bnagy> ok I don't really mean that, but I kind of do
<bnagy> object serialisation is not always bad, just untrusted object deserialisation
<apeiros> bnagy: deserializing the ~10 types that exist in JSON is just about as dangerous as plainly reading input.
Kilo`byte has quit [Ping timeout: 272 seconds]
shevy has quit [Ping timeout: 245 seconds]
<apeiros> assuming you have a sane parser
<bnagy> that view ignores all implementat...yes
<apeiros> which seems a harder issue than could be expected
fmcgeough has quit [Quit: fmcgeough]
Tuxist has quit [Read error: Connection reset by peer]
kaldreno_ has quit [Remote host closed the connection]
h0rrorvacui has joined #ruby
<bnagy> security advice includes the real world in its scope
<apeiros> as everbody seems to think it was an awesome idea to pack nonstandard stuff into the "default" method (for the lack of a better term - I'd consider JSON.parse the default method to parse JSON)
kaldrenon has joined #ruby
jhamon has joined #ruby
<apeiros> anyway, bedtime now
<apeiros> gn8
<bnagy> o/
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
nanoyak has quit [Read error: Operation timed out]
sergicles has joined #ruby
asteros has quit [Remote host closed the connection]
havenwood has joined #ruby
asteros has joined #ruby
rh1n0 has quit [Quit: Linkinus - http://linkinus.com]
Kilo`byte has joined #ruby
kaldrenon has quit [Ping timeout: 245 seconds]
nanoyak has joined #ruby
Tearan has quit [Ping timeout: 272 seconds]
fibre has joined #ruby
h0rrorvacui has quit [Quit: Leaving]
jerius has quit [Quit: Computer has gone to sleep.]
fenicks has joined #ruby
threesome has quit [Ping timeout: 264 seconds]
freezey has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
benzrf has joined #ruby
Rydekull_ is now known as Rydekull
<benzrf> >> "3".to_i(16)
<eval-in> benzrf => 3 (https://eval.in/70006)
<benzrf> >> "A".to_i(16)
<eval-in> benzrf => 10 (https://eval.in/70007)
<benzrf> hm
<benzrf> "000ab30".to_i(16)
jerius has joined #ruby
<benzrf> >> "000ab30".to_i(16)
shevy has joined #ruby
<k776> s2013: The 'countries' gem (https://github.com/hexorx/countries) utilises the currencies gem you linked to earlier (by the same developer). They work together to provide a nice list. rgeo doesn't really seem fit for getting the timezones though so still need to find a resource for those.
<eval-in> benzrf => 43824 (https://eval.in/70008)
<benzrf> neat
<Morrolan> >> "0".to_i(1)
<eval-in> Morrolan => invalid radix 1 (ArgumentError) ... (https://eval.in/70009)
<Morrolan> :)
freezey has joined #ruby
<s2013> doesnt ruby / rails have built in timezone where you can put in a country and get the timezone
<benzrf> >> "a:b".strip ?:
<eval-in> benzrf => wrong number of arguments (1 for 0) (ArgumentError) ... (https://eval.in/70010)
<shevy> benzrf working on anything interesting?
<benzrf> huh
<benzrf> shevy: just codewars
<benzrf> i finished my sokoban
<benzrf> maybe ill make sokoban in ruby
<benzrf> ...nah
workmad3 has joined #ruby
CaptainJet has joined #ruby
<benzrf> >> "a:b".replace ?:, ''
<eval-in> benzrf => wrong number of arguments (2 for 1) (ArgumentError) ... (https://eval.in/70011)
<benzrf> >> "a:b".replace ?:
tannerburson has quit [Quit: tannerburson]
<eval-in> benzrf => ":" (https://eval.in/70012)
<benzrf> ?
<shevy> >> ?:
<eval-in> shevy => ":" (https://eval.in/70013)
Shidash has quit [Ping timeout: 240 seconds]
<benzrf> shevy: 1-char strings are ?f
<Morrolan> Char literal?
<Morrolan> How horrible. D:
<benzrf> shevy: fun exercise
<benzrf> shevy: implement the lambda calculus
<k776> s2013: Looks like I'd still need a valid timezone to pass in.
<benzrf> or rather, a function that takes a term in it
mikepack has joined #ruby
<benzrf> and reduces it to its most normal form
<benzrf> :D
<shevy> I dont even know what a lambda calculus is
jhamon has quit [Quit: jhamon]
<benzrf> its so much cooler than turing machines
<benzrf> it is a thingy
<benzrf> basically you have a few rules
<benzrf> a term in the lambda calculus is:
<benzrf> - a variable (x, y, z)
<benzrf> - a lambda, which is of the form \<var>.<term>
<benzrf> so like \x.x
<benzrf> or
<benzrf> - application, which looks like (term term)
<benzrf> so this is a valid term:
fenicks has quit [Remote host closed the connection]
jerius has quit [Quit: Computer has gone to sleep.]
j-allen has joined #ruby
<benzrf> (\x.\y.(x y) x)
brahman_work1 has joined #ruby
benwoody has joined #ruby
kcombs has quit [Remote host closed the connection]
TigerWolf has joined #ruby
<benzrf> if you have application where the first term is a lambda, you can reduce it to the body of the lambda with substitution
<benzrf> that is
<benzrf> you can reduce this:
<benzrf> (\x.x y)
<benzrf> to:
<benzrf> y
<benzrf> and that is the whole thing
acrussell has quit [Quit: Leaving.]
<benzrf> you can represent _any computable problem_ in it
<k776> s2013: Still, you've saved me hours of manually hunting down ISO and currency codes :-) Thanks
<benzrf> p. nifty
emocakes has joined #ruby
brahman_work has quit [Ping timeout: 245 seconds]
mojjojo has quit [Quit: mojjojo]
jhamon has joined #ruby
psyl0n has joined #ruby
failshel_ has joined #ruby
<shevy> hmm
<shevy> my mind is not fit for haskell
<benzrf> this isnt haskell
<benzrf> its just computer science
<benzrf> 8D
workmad3 has quit [Ping timeout: 272 seconds]
dweeb_ has quit [Ping timeout: 252 seconds]
sayd has joined #ruby
<sayd> anyone know why i'd get: /Users/dmarr/.rvm/gems/ruby-1.8.7-p374/gems/sass-3.2.1/bin/../lib/sass/../sass/plugin/compiler.rb:265:in `watch': uninitialized constant Listen::MultiListener (NameError)
<benzrf> ((\x.\y.(x y) \x.x) z) -> z
<benzrf> ((\x.\y.(x y) \x.x) z) -> (\y.(\x.x y) z) -> z
<s2013> k776, sure. good luck.
<s2013> wait why do you need to manually pass timezone?
mjs2600 has joined #ruby
<s2013> you pass the country
<s2013> and get the timezone
<s2013> dude you are a programmer. its not difficult
TripleDE1 has joined #ruby
TripleDE1 has quit [Client Quit]
<s2013> you pass the country/region ins :zone
<s2013> for the timezone
<shevy> benzrf look at that last line, that is like an attach with characters!
<shevy> *attack
<s2013> just read the readme k776
<benzrf> hah
<benzrf> youre right it is
jacobsmith has joined #ruby
<benzrf> a lambda is basically a block
intuxicated has quit [Ping timeout: 252 seconds]
<benzrf> \<foo>.<bar> == {|foo| bar}
<benzrf> \x.x == {|x| x}
vpretzel has quit [Quit: Adios!]
<benzrf> and (foo bar) == foo(bar)
failshell has quit [Ping timeout: 272 seconds]
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jacobsmith has quit [Client Quit]
jerius has joined #ruby
<benzrf> well more like foo.call bar
<benzrf> so if you used syntax like that
failshel_ has quit [Ping timeout: 245 seconds]
brandon has joined #ruby
brandon is now known as Guest89096
s_kilk has quit [Quit: Leaving]
frustrum has joined #ruby
<benzrf> ((\x.\y.(x y) \x.x) z) == {|x| {|y| x.call y}}.call({|x| x}).call(z)
<benzrf> or something
frustrum has quit [Client Quit]
moneydouble has joined #ruby
whunt has joined #ruby
Elico has joined #ruby
mengu has quit [Ping timeout: 240 seconds]
interactionjaxsn has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
Kilo`byte has quit [Ping timeout: 246 seconds]
duggiefresh has quit [Remote host closed the connection]
<benzrf> >> "foo".replace ?f
<eval-in> benzrf => "f" (https://eval.in/70029)
<benzrf> ???
<benzrf> >> "foo".replace ?z
<eval-in> benzrf => "z" (https://eval.in/70030)
<benzrf> oh
<benzrf> >.>
paul_k has quit [Remote host closed the connection]
<benzrf> >> "foo".gsub ?o
<eval-in> benzrf => #<Enumerator: "foo":gsub("o")> (https://eval.in/70031)
<benzrf> >> "foo".gsub ?o, ''
<eval-in> benzrf => "f" (https://eval.in/70032)
<bnagy> install irb already
<k776> s2013: I have, and experimented with it. Doesn't work as needed for this case.
fuhgeddaboudit has quit [Ping timeout: 245 seconds]
<benzrf> bnagy: i have
<benzrf> im just an asshole
<shevy> we would not need currency converters if we would all use one currency
jerius has quit [Quit: Computer has gone to sleep.]
moneydouble has quit [Ping timeout: 272 seconds]
Kilo`byte has joined #ruby
<bnagy> working well for the EU, amirite??
<benzrf> BITCOINS AMIRITE GUISE
<s2013> k good luck
interactionjaxsn has quit [Ping timeout: 252 seconds]
Ripp__ has quit []
<Reach> wish I bought a bunch of bitcoins when they were cheap
<benzrf> dont we all
xcv has quit [Remote host closed the connection]
xcv has joined #ruby
jerius has joined #ruby
johnnyfuchs has quit [Quit: Leaving.]
newUser1234 has quit [Quit: Leaving...]
lethjakman has joined #ruby
xibalba has joined #ruby
<lethjakman> is there a reason to define a method on self rather than just defining it?
<bnagy> for things like modules there's a semantic difference
<benzrf> lethjakman: they do diff things
<benzrf> lethjakman: self.foo defines it on whatever self is atm
<benzrf> while regular def defines it on instances of self [for classes]
<benzrf> idk anything about modules
<lethjakman> hrm...interesting.
macmartine has quit [Remote host closed the connection]
<benzrf> hmm
xcv has quit [Ping timeout: 264 seconds]
<benzrf> how do ruby format strings work?
<bnagy> same as normal ones
<bnagy> just no %n etc
<benzrf> ok
jerius has quit [Client Quit]
macmartine has joined #ruby
Xeago has quit [Remote host closed the connection]
<lethjakman> %n?
<shevy> lethjakman you can avoid having to type .new
jonahR has quit [Quit: jonahR]
<lethjakman> shevy: how so?
<shevy> >> class Cat; def self.meow; puts 'The cat meows.'; end;end; Cat.meow
<eval-in> shevy => The cat meows. ... (https://eval.in/70049)
<shevy> there
<lethjakman> do you ujst mean for in chat?
moneydouble has joined #ruby
<shevy> what? in chat?
<shevy> in chat you have to type out things :-)
<lethjakman> %n how does that prevent new?
<benzrf> lethjakman: unrelated
ebobby has quit [Ping timeout: 272 seconds]
<benzrf> %n doesnt have to do with avoiding.new
<lethjakman> oh.
<benzrf> shevy told you about that right after you asked by accident
<lethjakman> lol I get it, I was just confused.
dachi has joined #ruby
<benzrf> ok
atrocitas has quit [Ping timeout: 240 seconds]
iliketurtles has joined #ruby
blaskovicz has quit [Quit: Leaving.]
fijimunkii has quit [Ping timeout: 245 seconds]
jerius has joined #ruby
<benzrf> is there a method on arrays to replace a subsequence
<benzrf> like []= on strings
sailias has quit [Quit: Leaving.]
elux has quit [Quit: Bye!]
<shevy> what is a subsequence in regards to arrays
<benzrf> a sub array
<benzrf> like [2, 3] is a subseq of [1,2, 3, 4]
<benzrf> so i want to be able to do like
<shevy> >> array = %w( abc def ghi jkl ); array[1,2] = nil; array
<eval-in> shevy => ["abc", nil, "jkl"] (https://eval.in/70057)
rickruby has joined #ruby
<benzrf> but by value
<benzrf> o:
macmartine has quit [Ping timeout: 264 seconds]
<shevy> by value?
<benzrf> i.e.:
zxq9 has quit [Quit: Konversation terminated!]
<benzrf> foo = [1, 2, 3, 4]; foo[[2,3]] = [5, 6, 7]; foo #=> [1, 5, 6, 7, 4]
moneydouble has quit [Client Quit]
<benzrf> >> [?a, ?b, ?c].find ?b
<eval-in> benzrf => #<Enumerator: ["a", "b", "c"]:find("b")> (https://eval.in/70061)
<benzrf> hmm
<benzrf> >> [?a, ?b, ?c].find_index ?b
<eval-in> benzrf => 1 (https://eval.in/70062)
<benzrf> aha
<benzrf> >> [?a, ?b, ?c].find_index ?z
<eval-in> benzrf => nil (https://eval.in/70063)
<benzrf> how do i pad a string again
jerius has quit [Ping timeout: 241 seconds]
<benzrf> wait
<benzrf> >> "%03d" % 4
<eval-in> benzrf => "004" (https://eval.in/70066)
<benzrf> aha
<benzrf> >> "%03s" % "4"
<eval-in> benzrf => " 4" (https://eval.in/70068)
<benzrf> :\
momomomomo has quit [Quit: momomomomo]
<bnagy> srsly
<shevy> >> "abc".rjust(20)
<eval-in> shevy => " abc" (https://eval.in/70070)
<benzrf> does rjust take a char
<bnagy> botspam is still spam
<benzrf> bluh
<shevy> >> "abc".rjust(20,6)
<eval-in> shevy => no implicit conversion of Fixnum into String (TypeError) ... (https://eval.in/70071)
<benzrf> got it
<shevy> benzrf seems to take more than one
<benzrf> ok
<benzrf> just tested it outwindow
<benzrf> =]
<shevy> onwindows???
iamjarvo has quit [Remote host closed the connection]
<shevy> get a serious OS man
<shevy> like emacs
<benzrf> meh i prefer lunix
iamjarvo has joined #ruby
<shevy> the linux on the moon?
<benzrf> totally
AlSquire has quit [Quit: This computer has gone to sleep]
<shevy> energy input is a problem when you are on the side opposite to the sun
<sweeper> nukes man
<sweeper> all about the nukes
BraddPitt has quit [Ping timeout: 252 seconds]
TaxmanBD has joined #ruby
benlieb has joined #ruby
dgfdgf has quit [Ping timeout: 246 seconds]
`MArceLL` has joined #ruby
jkline has joined #ruby
funburn has joined #ruby
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
colonolGron has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fibre has left #ruby [#ruby]
iamjarvo has quit [Ping timeout: 264 seconds]
macmartine has joined #ruby
lsmola has quit [Read error: Operation timed out]
johnnyfuchs has joined #ruby
fgo has joined #ruby
<xibalba> <shevy> get a serious OS man
<xibalba> <shevy> like emacs
xcv has joined #ruby
<xibalba> emacs is an OS ?
xcv has quit [Remote host closed the connection]
<shevy> it's more a religion
a13x212 has joined #ruby
johnnyfuchs has quit [Client Quit]
<shevy> but it also serves as the underlying OS for GNU hurd
<a13x212> how can i print the last 7 characters of a string?
<shevy> a13x212 [-7,7] I think
<shevy> >> string = "abcdefghijklmnop"; string[-7,7]
<eval-in> shevy => "jklmnop" (https://eval.in/70080)
<Hanmac> shevy: http://i.imgur.com/W7W24rO.jpg << "i wish my company has"
<shevy> you find the creepy stuff
<a13x212> perfect thanks shevy
Tearan has joined #ruby
Kilo`byte has quit [Ping timeout: 248 seconds]
Alina-malina has quit [Ping timeout: 246 seconds]
s2013 has quit [Ping timeout: 245 seconds]
<Hanmac> a13x212:
<Hanmac> >> string = "abcdefghijklmnop"; string[-7..-1]
<eval-in> Hanmac => "jklmnop" (https://eval.in/70083)
Alina-malina has joined #ruby
psyl0n has quit [Ping timeout: 240 seconds]
jmeeuwen has joined #ruby
<benzrf> is there an array splice method?
<shevy> >> [].splice
<eval-in> shevy => undefined method `splice' for []:Array (NoMethodError) ... (https://eval.in/70085)
<shevy> benzrf no :-)
<benzrf> obv i checked that
<benzrf> ;P
<benzrf> I mean one that splices one array into the middle of another
BraddPitt has joined #ruby
<shevy> partition perhaps
<benzrf> really?
Kilo`byte has joined #ruby
<shevy> hmmmm
mikecmpbll has quit [Quit: Computer has gone to sleep.]
<Hanmac> benzrf: didt you mean slice ?
<shevy> can you give example input and desired output?
<shevy> yeah
<shevy> there are things like #each_slice
lfox has quit [Quit: ZZZzzz…]
<benzrf> Hanmac: Hanmac no, i want to stick an array into another oen
mikecmpbll has joined #ruby
<benzrf> i.e.
<benzrf> l = [1, 2, 5]
<benzrf> l.insert_after(1, [3, 4])
claymore has quit [Quit: Leaving]
martxel has joined #ruby
<benzrf> l #=> [1, 2, 3, 4, 5]
typicalbender has quit [Quit: Leaving.]
<benzrf> type of thing
amoli has quit [Ping timeout: 240 seconds]
kobain has joined #ruby
martxel is now known as Guest60381
classix has quit [Quit: leaving]
<Hanmac> like that?
<Hanmac> >>l = [1, 2, 5]; l[2,0]=[3,4]; l
<eval-in> Hanmac => [1, 2, 3, 4, 5] (https://eval.in/70094)
<shevy> well you would have to find the index
tkuchiki has quit [Remote host closed the connection]
nobitanobi has joined #ruby
<benzrf> ohh
<benzrf> the second one is LENGTH?
<shevy> then you can do an assignment
<benzrf> i feel silly
pwh has quit []
<shevy> do you feel smarter in haskell?
newbiehacker has quit [Ping timeout: 240 seconds]
<benzrf> yep
<benzrf> ;p
<kiba> so, my script occasionally timed out..I wonder how I can fix that
NoDennisRitchie has joined #ruby
Mattx has quit [Quit: Leaving]
funburn has quit [Quit: funburn]
<shevy> with appropriate code
sambao21 has quit [Ping timeout: 248 seconds]
<kiba> I am using Gems.#name_here
<Hanmac> benzrf: in []= the first one is the position, and the second is the length how many elements you want to replace
<kiba> which naturally do http stuff
iamjarvo has joined #ruby
sambao21 has joined #ruby
<benzrf> Hanmac: yes i was thinking of ..
<benzrf> having both seems neat
sheap has joined #ruby
fijimunkii has joined #ruby
PPH has joined #ruby
io_syl has quit [Ping timeout: 246 seconds]
candelabra has quit [Quit: Leaving]
osvico has joined #ruby
Alina-malina has quit [Ping timeout: 245 seconds]
enebo has quit [Quit: enebo]
<shevy> kiba if it is not your method you are not in control of it or?
petey has quit []
Alina-malina has joined #ruby
<nobitanobi> given a String such as 244,244,244,211 -- Any nice way to remove the last comma and number?
NoDennisRitchie has quit []
<nobitanobi> (basically, remove the alpha of a rgba value)
amacgregor has joined #ruby
<bnagy> split , [1..-2] join ,
filipe_ has joined #ruby
PPH has quit [Client Quit]
benzrf has left #ruby [#ruby]
PPH has joined #ruby
mikesplain has quit [Ping timeout: 264 seconds]
thesheff17 has quit [Ping timeout: 246 seconds]
<nobitanobi> bnagy, +1 thanks
rickruby has quit []
sambao21 has quit [Ping timeout: 272 seconds]
Notte has joined #ruby
fijimunkii has quit [Ping timeout: 245 seconds]
Guest89096 has quit [Quit: Leaving]
johnnyfuchs has joined #ruby
mansi has joined #ruby
mikecmpbll has quit [Quit: Computer has gone to sleep.]
k776 has quit [Quit: Leaving.]
<PPH> How can I achieve a behavior similar to method overload in ruby?
<Hanmac> nobitanobi:
<Hanmac> >> "244,244,244,211".sub(/,\d+$/,"")
<eval-in> Hanmac => "244,244,244" (https://eval.in/70102)
<Hanmac> PPH depends, do you want to overload by parameter count or py argument-type?
<PPH> argument type
pwh has joined #ruby
fgo has quit [Remote host closed the connection]
<Hanmac> PPH eighther dont do it and use duck-typing, or use case obj; when Class1; ... when Class2; ... end
jerius has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
psyl0n has joined #ruby
<PPH> Do you know relevant doc about duck typing? It's interesting
mansi has quit [Ping timeout: 245 seconds]
<PPH> Thank you :)
asobrasil has left #ruby [#ruby]
mjs2600 has quit [Remote host closed the connection]
ckinni has joined #ruby
jacobsmith has joined #ruby
drumusician has quit [Ping timeout: 246 seconds]
BrenoPerucchi has joined #ruby
TaxmanBD has quit [Ping timeout: 264 seconds]
kitak_ has joined #ruby
jerius has quit [Ping timeout: 248 seconds]
tigersharktopus has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
blaskovicz has joined #ruby
TaxmanBD has joined #ruby
Soda has joined #ruby
mikecmpbll has joined #ruby
brtdv has quit []
Grantlyk has quit []
iamjarvo has quit [Read error: Operation timed out]
kitak has quit [Ping timeout: 246 seconds]
pragmatism has joined #ruby
w4pm has quit [Ping timeout: 272 seconds]
<BrenoPerucchi> How I could use this array = [:updated_at, :state] to use with except (hash) hash = {:state => "a", :updated_at => "1").except(array modify)
<Hanmac> nobitanobi: i think you dont know this:
<Hanmac> >> s="244,244,244,211";s[/,\d+$/]=""; s
<eval-in> Hanmac => "244,244,244" (https://eval.in/70105)
<nobitanobi> Hanmac, thanks :P
<nobitanobi> no, I didn't know this
<nobitanobi> let me see
paul_k has joined #ruby
<Hanmac> use this if you dont want to modify:
<Hanmac> >> "244,244,244,211".sub(/,\d+$/,"")
<eval-in> Hanmac => "244,244,244" (https://eval.in/70107)
iliketurtles has joined #ruby
<nobitanobi> oh, you access the string using a regex, and say that for each match, change it to "" ?
kirun has quit [Quit: Client exiting]
segv has joined #ruby
<nobitanobi> the first one is in place?
<Hanmac> nah [/reg/]="str" replaces only the first match
terrellt has quit [Ping timeout: 260 seconds]
<nobitanobi> oh ok
Kilo`byte has quit [Ping timeout: 246 seconds]
<nobitanobi> Hanmac, thank you
RichardBaker has quit [Quit: RichardBaker]
<Hanmac> yet another way:
<Hanmac> >> s="244,244,244,211";s.slice!(/,\d+$/);s
<eval-in> Hanmac => "244,244,244" (https://eval.in/70108)
<nobitanobi> all based on regex ~
<nobitanobi> Hanmac, thanks a lot
ebobby has joined #ruby
filipe_ has quit [Remote host closed the connection]
TaxmanBD has quit [Ping timeout: 252 seconds]
<Hanmac> nobitanobi: yet another another way: (hm think that might be the best)
<Hanmac> >> "244,244,244,211"[/(.+),\d+$/,1]
<eval-in> Hanmac => "244,244,244" (https://eval.in/70111)
<nobitanobi> Oh, this is nice
<nobitanobi> you are getting the first group?
<nobitanobi> with 1
<Hanmac> yeah ;P
<nobitanobi> nice
<nobitanobi> beautiful yes
<Hanmac> i think it also cant be more golfed ,P
<nobitanobi> Do you guys know if when launching a Bash script (CasperJS) from Ruby and getting the output, there might be a limit on the amount that can be read? - I am doing this
<nobitanobi> pid = Process.spawn("casperjs #{path_to_file} '#{params[:page][:url]}' '#{Rails.root}/tmp/' --ignore-ssl-errors=yes", :out => pipe_cmd_out, :err => pipe_cmd_out)
<nobitanobi> Well,, I have a pipe, and I do: @output = pipe_cmd_in.read;
<nobitanobi> I have noticed that if @output is really long (100.000 characters) - it just won't read it (it times out at 2 minutes...)
<nobitanobi> @output is an stringified JSON
fgo has joined #ruby
tkuchiki has joined #ruby
jerius has joined #ruby
cnrk has quit [Quit: cnrk]
zz_michael_mbp is now known as michael_mbp
yekta has quit [Quit: yekta]
phus1on has quit [Quit: .]
DonRichie has quit [Quit: Verlassend]
fijimunkii has joined #ruby
cnrk has joined #ruby
Kilo`byte has joined #ruby
jerius has quit [Client Quit]
<SirFunk> is there a way if i have an array of arrays like [[1,2],[3,4],[5,6]] that i could get every combination of first and second elements.. eg [[1,2],[1,4],[1,6],[3,2],[3,4]...] ?
coderhs has quit [Ping timeout: 265 seconds]
mikecmpbll has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Read error: Connection reset by peer]
CaptainJet has quit []
johnnyfuchs has quit [Quit: Leaving.]
blaskovicz has quit [Quit: Leaving.]
CaptainJet has joined #ruby
nwertman has quit [Ping timeout: 245 seconds]
rickruby has joined #ruby
sergicles has quit [Ping timeout: 272 seconds]
nowthatsamatt has joined #ruby
ner0x has joined #ruby
mmitchell has quit []
jhamon has quit [Quit: jhamon]
segv has left #ruby ["Linkinus - http://linkinus.com"]
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
ner0x has quit [Client Quit]
h0rrorvacui has joined #ruby
moneydouble has joined #ruby
ner0x has joined #ruby
RichardBaker has joined #ruby
<Hanmac> SirFunk:
<Hanmac> >> a,b = [[1,2],[3,4],[5,6]].transpose; a.product(b)
<eval-in> Hanmac => [[1, 2], [1, 4], [1, 6], [3, 2], [3, 4], [3, 6], [5, 2], [5, 4], [5, 6]] (https://eval.in/70115)
axl_ has quit [Quit: axl_]
ebobby has quit [Quit: leaving]
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
baordog has quit [Remote host closed the connection]