apeiros_ changed the topic of #ruby to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
Davey has quit [Quit: Computer has gone to sleep.]
mneorr has joined #ruby
Mon_Ouie has quit [Ping timeout: 252 seconds]
jarin has quit [Quit: WeeChat 0.4.0]
arya has quit [Ping timeout: 248 seconds]
arya has joined #ruby
Loaft has quit [Ping timeout: 268 seconds]
Loaft has joined #ruby
graeme has quit [Quit: graeme]
kofno has quit [Remote host closed the connection]
linguini has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
hiroyuki has quit [Read error: Connection reset by peer]
mneorr has quit [Ping timeout: 268 seconds]
tbrock_ has quit [Quit: Textual IRC Client: www.textualapp.com]
sailias has quit [Quit: Leaving.]
Yayo has joined #ruby
tbrock_ has joined #ruby
arya_ has joined #ruby
Loaft has quit [Ping timeout: 252 seconds]
zeade has quit [Quit: Leaving.]
Spooner has quit [Quit: Leaving]
ariedler has joined #ruby
arya has quit [Ping timeout: 248 seconds]
hiroyuki has joined #ruby
vertroa has joined #ruby
Targen has quit [Read error: Operation timed out]
Heero has joined #ruby
daniel_- has quit [Ping timeout: 256 seconds]
benlieb has joined #ruby
ariedler_ has joined #ruby
ariedler has quit [Read error: Connection reset by peer]
Yayo has quit [Ping timeout: 276 seconds]
k610 has quit [Read error: Operation timed out]
quantsini has joined #ruby
graeme has joined #ruby
balishag has quit [Ping timeout: 246 seconds]
kofno has joined #ruby
Nisstyre has joined #ruby
benlieb has quit [Quit: benlieb]
Loaft has joined #ruby
Vivekananda has joined #ruby
jimg has joined #ruby
Yayo has joined #ruby
snuglepuss has quit [Remote host closed the connection]
timkohrumel has joined #ruby
chipotle_ has quit [Quit: cya]
Loaft has quit [Read error: Operation timed out]
Lo^82 has joined #ruby
Lo^26 has joined #ruby
Lo^15 has joined #ruby
kstone has joined #ruby
timkohrumel has quit [Ping timeout: 258 seconds]
Lo^82 has quit [Read error: Operation timed out]
jimg has quit [Ping timeout: 258 seconds]
Yayo has quit [Ping timeout: 252 seconds]
postmodern_ has joined #ruby
jtharris has quit [Quit: WeeChat 0.4.0]
angel has quit [Ping timeout: 276 seconds]
brotatos has quit [Quit: WeeChat 0.4.1-dev]
brotatos has joined #ruby
brotatos has quit [Client Quit]
Lo^26 has quit [Ping timeout: 264 seconds]
postmodern has quit [Ping timeout: 245 seconds]
Kricir has quit [Remote host closed the connection]
postmodern_ has quit [Client Quit]
postmodern has joined #ruby
Kricir has joined #ruby
Davey has joined #ruby
hiroyuki has quit [Read error: Connection reset by peer]
v0n has quit [Read error: Operation timed out]
kstone has left #ruby [#ruby]
Brutus- has quit [Remote host closed the connection]
jeebster has quit [Quit: Leaving.]
d2dchat has joined #ruby
pietr0 has quit [Ping timeout: 252 seconds]
yshh has joined #ruby
Markvilla has quit [Quit: Computer has gone to sleep.]
arya_ has quit [Ping timeout: 248 seconds]
nesoi has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
brotatos has joined #ruby
tylersmith has joined #ruby
crodas has quit [Ping timeout: 252 seconds]
brotatos has quit [Client Quit]
pskosinski has quit [Quit: pskosinski]
brotatos has joined #ruby
pskosinski has joined #ruby
tylersmith has quit [Remote host closed the connection]
arya has joined #ruby
autumn is now known as auty
DouweM has quit [Quit: Leaving...]
chrishough has quit [Quit: chrishough]
mixel has quit [Quit: mixel]
Tricon has joined #ruby
jenrzzz has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
brianpWins has quit [Quit: brianpWins]
kofno has quit [Remote host closed the connection]
brianpWins has joined #ruby
chrishough has joined #ruby
ab3 has quit [Ping timeout: 248 seconds]
jimg has joined #ruby
aleph-null has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
rton has left #ruby [#ruby]
mikestok has joined #ruby
bitZero__ has quit [Ping timeout: 255 seconds]
bitZero__ has joined #ruby
mklappstuhl has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
teclator has joined #ruby
nezumi has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
slyv has joined #ruby
jimg has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
benlieb has joined #ruby
nari_ has quit [Ping timeout: 256 seconds]
brianpWins has quit [Quit: brianpWins]
benlieb has quit [Client Quit]
tommyvyo has quit [Quit:]
ixti has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
robscom__ has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
fixl has joined #ruby
JMcAfreak has quit [Ping timeout: 276 seconds]
elux has joined #ruby
athst has quit [Quit: athst]
elux has quit [Client Quit]
stoic_squirrel has quit [Quit: Textual IRC Client: www.textualapp.com]
Hanmac has quit [Ping timeout: 264 seconds]
jimeh has quit [Quit: ZNC - http://znc.in]
jimeh has joined #ruby
m8 has quit [Read error: Connection reset by peer]
jimeh has quit [Client Quit]
mpereira has joined #ruby
jimeh has joined #ruby
jimeh has quit [Client Quit]
jimeh has joined #ruby
pietr0 has joined #ruby
jimeh has quit [Client Quit]
jimeh has joined #ruby
jimeh has quit [Client Quit]
jimeh has joined #ruby
werdnativ has quit [Quit: werdnativ]
benlieb has joined #ruby
jimeh has quit [Client Quit]
jimeh has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
zeade has joined #ruby
benlieb has quit [Client Quit]
jmaya has joined #ruby
rakl has quit [Quit: sleeping]
chrishough has quit [Quit: chrishough]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
freewizard has joined #ruby
wroathe has quit [Ping timeout: 246 seconds]
jimeh has quit [Quit: ZNC - http://znc.in]
jimeh has joined #ruby
jimeh has quit [Client Quit]
jimeh has joined #ruby
slainer68 has joined #ruby
jmaya has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
bitZero__ has quit [Read error: Operation timed out]
io_syl has quit [Ping timeout: 260 seconds]
emergion has joined #ruby
bitZero__ has joined #ruby
io_syl has joined #ruby
awarner has quit [Remote host closed the connection]
tylersmith has joined #ruby
ravster has left #ruby [#ruby]
slash_nick has joined #ruby
peta_ has quit [Quit: peta_]
mikestok has quit [Quit: Computer has gone to sleep.]
thomasl__ has quit [Remote host closed the connection]
kofno has joined #ruby
jimeh_ has joined #ruby
freeayu has joined #ruby
sean_s has joined #ruby
jamesfung14 has quit [Ping timeout: 256 seconds]
arya has quit [Ping timeout: 248 seconds]
mercwithamouth has quit [Ping timeout: 252 seconds]
zeade has quit [Quit: Leaving.]
sambao21 has joined #ruby
jimeh_ has quit [Quit: ZNC - http://znc.in]
arya has joined #ruby
havenwood has quit [Remote host closed the connection]
wroathe has joined #ruby
brianherman has joined #ruby
insel has joined #ruby
jimeh has quit [Quit: ZNC - http://znc.in]
jimeh has joined #ruby
Nautes has quit [Quit: Leaving]
<insel> is testing if a methode exists like this: puts "exists!" if defined?(link.innerText) wrong?
radic_ has quit [Ping timeout: 260 seconds]
<bnagy> normally you'd use respond_to? to check if something responds to a method
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<insel> so... puts "muh!" if link.respond_to?(innerText)
<insel> ?
<bnagy> >> "foo".respond_to? :length
<eval-in> bnagy => true (http://eval.in/20770)
<insel> ok ty
robustus has joined #ruby
awarner has joined #ruby
robustus|Off has quit [Ping timeout: 255 seconds]
arya has quit [Ping timeout: 248 seconds]
poga has joined #ruby
nhhagen has quit [Remote host closed the connection]
hesco has quit [Quit: Leaving.]
arya has joined #ruby
awarner has quit [Ping timeout: 248 seconds]
sean_s has quit [Quit: sean_s]
ixti has quit [Quit: WeeChat 0.4.0]
emergion has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 248 seconds]
tjbiddle_ has joined #ruby
tealmage has joined #ruby
lahwran has quit [Ping timeout: 264 seconds]
slash_nick has quit [Ping timeout: 258 seconds]
tjbiddle has quit [Ping timeout: 256 seconds]
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
phantasm66 has joined #ruby
arya has joined #ruby
tjbiddle_ has quit [Ping timeout: 258 seconds]
niklasb has quit [Ping timeout: 258 seconds]
mklappstuhl has quit [Remote host closed the connection]
Lo^15 has quit [Read error: Operation timed out]
CyberMaN has quit []
mmitchell has quit [Remote host closed the connection]
atno has quit [Remote host closed the connection]
hiyakashi has quit [Quit: お前は知りすぎた]
Tricon has quit [Quit: Leaving...]
phantasm66 has quit [Quit: *poof*]
splittingred has joined #ruby
shadoi has joined #ruby
shadoi has quit [Client Quit]
splittingred has quit [Client Quit]
Cultofmetatron has quit [Remote host closed the connection]
splittingred has joined #ruby
_br_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
jenrzzz has quit [Quit: whyyyyyy]
hamakn has joined #ruby
tylersmith has quit [Remote host closed the connection]
sambao21 has joined #ruby
bubblehead has quit [Remote host closed the connection]
jbueza has joined #ruby
Cultofmetatron has joined #ruby
rickmasta has joined #ruby
arya has quit [Ping timeout: 248 seconds]
<brotatos> I'm getting this error when doing a `rails new blog`: /usr/lib/ruby/gems/2.0.0/gems/rails-2.3.15/lib/rails_generator/generators/applications/app/app_generator.rb:7:in `<class:AppGenerator>': Use RbConfig instead of obsolete and deprecated Config.
kofno has quit [Remote host closed the connection]
kemist has quit [Quit: kemist]
arya has joined #ruby
dmiller has quit [Ping timeout: 258 seconds]
jdunck has quit [Quit: Computer has gone to sleep.]
quantsini has quit [Quit: Leaving.]
ariedler_ has quit [Remote host closed the connection]
lufi has quit [Excess Flood]
lufi has joined #ruby
quantsini has joined #ruby
crodas has joined #ruby
sambao21 has quit [Ping timeout: 258 seconds]
nari_ has joined #ruby
mmitchell has joined #ruby
yannis has quit [Quit: yannis]
tk_ has joined #ruby
tjbiddle has joined #ruby
mmitchell has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
eboaz has joined #ruby
wroathe has quit [Ping timeout: 256 seconds]
Kricir has quit [Remote host closed the connection]
arya has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
MrPoT4tO has joined #ruby
quantsini has quit [Quit: Leaving.]
brotatos has quit [Quit: WeeChat 0.4.1-dev]
sambao21 has joined #ruby
kofno has joined #ruby
sambao21 has quit [Client Quit]
_br_ has quit [Ping timeout: 258 seconds]
freewizard has quit [Remote host closed the connection]
snorkdude has joined #ruby
insel has quit []
jimg has joined #ruby
kofno has quit [Remote host closed the connection]
kofno has joined #ruby
Kricir has joined #ruby
akhet has quit [Remote host closed the connection]
failshell has joined #ruby
kofno has quit [Ping timeout: 268 seconds]
failshell has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
nari_ has quit [Ping timeout: 276 seconds]
charliesome has joined #ruby
akashj87 has joined #ruby
mockra has quit [Remote host closed the connection]
mockra has joined #ruby
freewizard has joined #ruby
arya has joined #ruby
eka has joined #ruby
Leighton has joined #ruby
[Rickmasta] has joined #ruby
rickmasta has quit [Ping timeout: 258 seconds]
Nisstyre has quit [Quit: Leaving]
eka has quit [Ping timeout: 256 seconds]
indyrl has joined #ruby
Nisstyre has joined #ruby
braincra- has joined #ruby
[Rickmasta] has quit [Client Quit]
jimg has quit [Remote host closed the connection]
braincrash has quit [Ping timeout: 276 seconds]
slainer68 has quit [Remote host closed the connection]
blakeeb has quit [Ping timeout: 252 seconds]
s2013 has joined #ruby
tealmage has quit [Remote host closed the connection]
<snorkdude> How do I parse the value of a JS variable on an HTML page in Ruby?
osvico has joined #ruby
<snorkdude> Can this be done with Nokogiri/HPricot
<snorkdude> ?
Cultofmetatron has quit [Remote host closed the connection]
<s2013> yes snorkdude
<s2013> use nokogiri
<snorkdude> I can't quite seem to figure it out
<s2013> one sec let me give you a good tutorial
<s2013> that is really helpful
<snorkdude> Isn't this HTML scraping?
<s2013> what are you trying to do?
<snorkdude> Get the value of a JS variable
<s2013> you can use nokogiri for it
codezombie has quit [Quit: Linkinus - http://linkinus.com]
<s2013> or you can do it yourself without nokogiri.. i mean you kinda have to scrape the page
<s2013> before you get the variable
tylersmith has joined #ruby
jeremywrowe has joined #ruby
jeremywrowe has quit [Changing host]
jeremywrowe has joined #ruby
danneu has joined #ruby
<snorkdude> It seems like nokogiri only works for XPath/Css though
<s2013> do you know the name of the variable?
tylersmith has quit [Ping timeout: 252 seconds]
<snorkdude> yes
<snorkdude> s2013
end_guy has quit [Remote host closed the connection]
slyv has quit [Quit: Textual IRC Client: www.textualapp.com]
<s2013> i think it should be easy.. you can get the entire content and just filter outeverything cept the variable
akashj87 has quit [Ping timeout: 256 seconds]
<s2013> might need to use some regex but im not the best help since im a newbie myself
<s2013> look at that
DrCode has quit [Ping timeout: 276 seconds]
end_guy has joined #ruby
davedev24 has quit [Remote host closed the connection]
akashj87 has joined #ruby
Akuma has quit [Ping timeout: 252 seconds]
rushed has joined #ruby
baroquebobcat has joined #ruby
Banistergalaxy has quit [Ping timeout: 258 seconds]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
DrCode has joined #ruby
drumond19 has joined #ruby
arya has quit [Ping timeout: 248 seconds]
joofsh has joined #ruby
feedbackloop_ has joined #ruby
mmitchell has joined #ruby
quantsini has joined #ruby
slainer68 has joined #ruby
jeremywrowe has quit [Quit: Lost terminal]
feedbackloop has quit [Ping timeout: 252 seconds]
ry4nn_ has joined #ruby
Cultofmetatron has joined #ruby
anirudh24seven has joined #ruby
arya has joined #ruby
mmitchell has quit [Ping timeout: 276 seconds]
Akuma has joined #ruby
danneu has quit [Ping timeout: 252 seconds]
drumond19 has quit [Remote host closed the connection]
slainer68 has quit [Ping timeout: 256 seconds]
DarthGandalf has quit [Ping timeout: 264 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
idkazuma has quit [Remote host closed the connection]
nari_ has joined #ruby
graeme has quit [Quit: graeme]
danneu has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
idkazuma has joined #ruby
DarthGandalf has joined #ruby
idkazuma has quit [Remote host closed the connection]
lempface has quit [Ping timeout: 245 seconds]
newTech has joined #ruby
danneu1 has joined #ruby
danneu has quit [Ping timeout: 256 seconds]
MrPoT4tO has quit [Remote host closed the connection]
huoxito has quit [Quit: Leaving]
arya has quit [Ping timeout: 248 seconds]
teddyp1cker has joined #ruby
arya has joined #ruby
jbueza has quit [Quit: Leaving.]
freewizard has quit [Read error: No route to host]
freewizard has joined #ruby
indyrl has left #ruby [#ruby]
jduan1981 has joined #ruby
rgbdev has quit [Ping timeout: 245 seconds]
psyprus has quit [Ping timeout: 258 seconds]
mahmoudimus has joined #ruby
psyprus has joined #ruby
nplusp has joined #ruby
DarthGandalf has quit [Read error: Connection reset by peer]
arya has quit []
daniel_hinojosa has joined #ruby
dopie has joined #ruby
aedornm has joined #ruby
nplusp has quit [Ping timeout: 248 seconds]
rgbdev has joined #ruby
osvico has quit [Ping timeout: 246 seconds]
jonathanwallace has joined #ruby
danneu1 has quit [Ping timeout: 252 seconds]
snorkdude has quit [Quit: snorkdude]
richcollins has joined #ruby
lewix has joined #ruby
tvw has joined #ruby
<richcollins> Anyone here us Goliath?
sandGorgon has joined #ruby
Heero has quit [Ping timeout: 252 seconds]
freeayu has quit [Ping timeout: 264 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
DarthGandalf has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.4.0]
aleph-null has joined #ruby
freeayu has joined #ruby
splittingred has quit [Quit: splittingred]
snorkdude has joined #ruby
snorkdude has quit [Client Quit]
mr0wl has joined #ruby
brianherman has quit [Quit: Leaving]
tommyvyo has joined #ruby
epicurus has quit [Quit: Leaving]
philcrissman has quit [Remote host closed the connection]
aleph-null has quit [Ping timeout: 276 seconds]
wookiehangover has quit [Quit: i'm out]
aedornm has quit [Remote host closed the connection]
wookiehangover has joined #ruby
freakazoid0223 has quit [Ping timeout: 256 seconds]
rgbdev has quit [Read error: Connection reset by peer]
zeade has joined #ruby
rgbdev has joined #ruby
Kricir has quit [Remote host closed the connection]
nghialv2607 has joined #ruby
wallerdev has quit [Quit: wallerdev]
jduan1981 has quit [Quit: jduan1981]
rgbdev has quit [Ping timeout: 264 seconds]
mahmoudimus has joined #ruby
aleph-null has joined #ruby
aleph-null has quit [Remote host closed the connection]
thomasl__ has joined #ruby
joofsh has quit [Remote host closed the connection]
crodas has quit [Read error: Connection reset by peer]
megha has quit [Ping timeout: 268 seconds]
vlad_starkov has joined #ruby
vlad_sta_ has joined #ruby
tommyvyo has quit [Quit:]
arubin has quit [Quit: Textual IRC Client: www.textualapp.com]
vlad_sta_ has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
fschuindt has joined #ruby
rickruby has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
freeayu has joined #ruby
vlad_starkov has quit [Ping timeout: 258 seconds]
Vivekananda has quit [Remote host closed the connection]
nari_ has quit [Ping timeout: 255 seconds]
Mon_Ouie has joined #ruby
mockra has quit [Remote host closed the connection]
daniel_hinojosa has quit [Quit: Leaving.]
megha has joined #ruby
Davey has joined #ruby
crodas has joined #ruby
passerine has joined #ruby
arya_ has joined #ruby
feedbackloop_ has quit [Ping timeout: 260 seconds]
Umren has joined #ruby
zeade has quit [Quit: Leaving.]
megha has quit [Quit: WeeChat 0.4.0]
arya_ has quit [Remote host closed the connection]
arya_ has joined #ruby
arya_ has quit [Client Quit]
b0oh has joined #ruby
awarner has joined #ruby
yshh has quit [Remote host closed the connection]
mahmoudimus has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
awarner has quit [Ping timeout: 264 seconds]
brianpWins has joined #ruby
jimg has joined #ruby
cyong has joined #ruby
sayan has joined #ruby
DementedInsanity has quit [Ping timeout: 264 seconds]
browndawg has joined #ruby
nghialv2607 has quit [Remote host closed the connection]
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
s2013 has quit [Ping timeout: 246 seconds]
oneirophren has joined #ruby
hamed_r has joined #ruby
dzied has joined #ruby
richcollins has quit [Quit: richcollins]
megha has joined #ruby
yshh has joined #ruby
Kricir has joined #ruby
jimg has quit [Remote host closed the connection]
indyrl has joined #ruby
c0rn has joined #ruby
vlad_starkov has joined #ruby
Kricir has quit [Ping timeout: 256 seconds]
<lewix> I use David
b0oh has quit [Quit: Leaving.]
vlad_starkov has quit [Ping timeout: 256 seconds]
Zolo has joined #ruby
dhruvasagar has quit [Read error: Operation timed out]
pithagorians has joined #ruby
fschuindt has quit [Ping timeout: 258 seconds]
Cultofmetatron has quit [Remote host closed the connection]
io_syl has quit [Quit: Computer has gone to sleep.]
<pithagorians> www.modruby.net shows me a Japaneses site
sandGorgon has quit [Ping timeout: 276 seconds]
dzied has quit [Read error: Connection reset by peer]
sayan has quit [Ping timeout: 256 seconds]
wesside has joined #ruby
mockra has joined #ruby
workmad3 has joined #ruby
dhruvasagar has joined #ruby
dangerousdave has joined #ruby
mockra has quit [Ping timeout: 252 seconds]
newTech has quit [Quit: newTech]
arya has joined #ruby
lufi has quit [Excess Flood]
lufi has joined #ruby
slash_nick has joined #ruby
oneirophren has quit [Ping timeout: 256 seconds]
icecandy has joined #ruby
<slash_nick> Hey, I'm curious... $stdin.getch.ord #=> pressing up/down/escape/right/left all return 27... why?
<Mon_Ouie> It's because those are more than one character
<Mon_Ouie> 27 is "\e" (escape character)
* slash_nick nods...
<slash_nick> Thanks :)
haxrbyte has quit [Remote host closed the connection]
icantbecool has joined #ruby
sayan has joined #ruby
osvico has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
nmeum has quit [Quit: WeeChat 0.4.1-dev]
nmeum has joined #ruby
kobain has quit []
nmeum has left #ruby [#ruby]
ossareh has quit [Ping timeout: 256 seconds]
fixl has joined #ruby
Leighton has quit [Quit: Leaving]
rickruby has quit [Remote host closed the connection]
Leighton has joined #ruby
ossareh has joined #ruby
skroon has joined #ruby
nomenkun has joined #ruby
it_tard has joined #ruby
it_tard has quit [Changing host]
it_tard has joined #ruby
arya has quit [Ping timeout: 248 seconds]
eka has joined #ruby
tjbiddle has joined #ruby
arya has joined #ruby
eka has quit [Ping timeout: 252 seconds]
cyong has quit [Quit: Leaving.]
icecandy has quit [Remote host closed the connection]
anirudh24seven has quit [Read error: Connection reset by peer]
mklappstuhl has joined #ruby
icantbecool has quit [Quit: Computer has gone to sleep.]
akashj87 has quit [Ping timeout: 248 seconds]
<shevy> slash_chick!
skroon has left #ruby [#ruby]
tealmage has joined #ruby
anirudh24seven has joined #ruby
vlad_starkov has joined #ruby
mr0wl has quit [Read error: Operation timed out]
sayan has quit [Read error: Connection reset by peer]
osvico has quit [Ping timeout: 246 seconds]
<whowantstolivefo> hiya, i am working on ruby koans and and i am at the file of about_methods.rb .. i have an example so >> def test_calling_global_methods_without_parentheses result = my_global_method 2, 3 assert_equal __ , result end <<< and i change the "__" line with the 5 or any number, and after i typed rake i get the following error. what should i do ?
chandankumar has joined #ruby
<whowantstolivefo> here is my error link https://gist.github.com/whowantstolivefo/5516719
Hanmac has joined #ruby
mneorr has joined #ruby
tealmage has quit [Ping timeout: 264 seconds]
tjbiddle has quit [Quit: tjbiddle]
Hanmac1 has quit [Ping timeout: 255 seconds]
vlad_starkov has quit [Ping timeout: 256 seconds]
arya has quit [Ping timeout: 248 seconds]
marr has joined #ruby
<bnagy> that's a syntax error
<whowantstolivefo> bnagy: yes. what to do for fix ?
<bnagy> you probably shouldn't be doing the koans until you can actually write ruby
<whowantstolivefo> "5" ? or parantheses ?
<whowantstolivefo> bnagy: i started to koans with the people at here suggestions
<bnagy> they're not really for learning the language, they're for learning weird language internals
<whowantstolivefo> bnagy: i listen your advice for learning ruby ?
yshh__ has joined #ruby
ab3 has joined #ruby
seanmccann has joined #ruby
megha has quit [Ping timeout: 268 seconds]
<bnagy> don't know
<whowantstolivefo> :)
<bnagy> I learned by coding and reading the docs, but I knew how to program
postmodern has joined #ruby
<whowantstolivefo> you suggest me to read docs ?
yshh__ has quit [Read error: Connection reset by peer]
jlast has quit [Remote host closed the connection]
yshh__ has joined #ruby
<bnagy> no, I just said that's what I did
yshh has quit [Ping timeout: 268 seconds]
bluOxigen has joined #ruby
yshh__ has quit [Read error: Connection reset by peer]
<whowantstolivefo> bnagy: your not helping me
<whowantstolivefo> :)
yshh has joined #ruby
BizarreCake has joined #ruby
ephemerian has joined #ruby
cofin has joined #ruby
cofin has quit [Quit: cofin]
cofin has joined #ruby
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
cofin has quit [Client Quit]
megha has joined #ruby
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
tonini has joined #ruby
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
postmodern has quit [Ping timeout: 256 seconds]
mklappstuhl has quit [Remote host closed the connection]
yshh_ has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
nhhagen has joined #ruby
sayan has joined #ruby
daniel_- has joined #ruby
benlieb has joined #ruby
mneorr has quit [Remote host closed the connection]
yshh has quit [Ping timeout: 260 seconds]
thomasl__ has quit [Remote host closed the connection]
balishag has joined #ruby
mneorr has joined #ruby
akashj87 has joined #ruby
<passerine> does ruby have something like interfaces or abstract base classes?
mneorr has quit [Remote host closed the connection]
indyrl has left #ruby [#ruby]
johchri has joined #ruby
seanmccann has quit [Quit: seanmccann]
kiri has quit [Ping timeout: 245 seconds]
osvico has joined #ruby
ephemerian has quit [Quit: Leaving.]
Neomex has joined #ruby
Neomex has quit [Client Quit]
c0rn has quit [Quit: Computer has gone to sleep.]
skogis has quit [Ping timeout: 264 seconds]
skogis has joined #ruby
wesside has quit [Quit: Computer has gone to sleep.]
daniel_- has quit [Read error: Operation timed out]
sayan has quit [Read error: Connection reset by peer]
rickruby has joined #ruby
<shevy> sorry for asking again, I fell asleep
<shevy> do we have a ruby gem that maps "1" to "one" or "341" to "three hundred forty one"
<shevy> passerine, what is an abstract class?
<shevy> whowantstolivefo only way to learn ruby is by writing .rb files on your own
danneu1 has joined #ruby
anirudh24seven has quit [Ping timeout: 268 seconds]
freewizard has quit [Remote host closed the connection]
freewizard has joined #ruby
rickruby has quit [Ping timeout: 256 seconds]
<passerine> shevy, C++ allows declaring methods without implementations in the base class. It requires them to be defined in derived classes. I suppose I could define the method in the base class that throws an exception if it gets called.
danneu1 has quit [Ping timeout: 248 seconds]
sandGorgon has joined #ruby
johchri has quit [Quit: Textual IRC Client: www.textualapp.com]
<passerine> Or just not. I'm not sure if it makes sense in ruby.
danneu1 has joined #ruby
nhhagen has quit [Remote host closed the connection]
freewizard has quit [Ping timeout: 276 seconds]
<shevy> passerine I am not sure what you mean
<shevy> you can declare a method in ruby
<shevy> def foo
<shevy> puts 'in foo'
<shevy> end
<shevy> this would have "no implementation in the base class"
<shevy> but to require them to be defined in a derived class?
<shevy> yeah, your base class would have to contain that check
<slash_nick> define them in the base, call them in the derived?
<shevy> there are method-related hooks
<shevy> self.inherited for instance
postmodern has joined #ruby
<passerine> slash_nick, the method wants different implementations so needs to be defined in the derived class
ab3 has quit [Ping timeout: 264 seconds]
chandankumar has quit [Quit: Leaving]
vlad_starkov has joined #ruby
<slash_nick> your derived class can redefine the method... when (re)defining, you're free to call super (executing whatever the inherited version of the method would've executed)
dhruvasagar has joined #ruby
<slash_nick> passerine try: class Base;def foo; puts "bar"; end; end; class Derived; def foo; puts "super"; super; end; end; Derived.new.foo
<passerine> shevy, thanks - after reading those I think I'll just define the base's method to throw an exception, and more for "self-documenting code" than any real runtime benefit.
vlad_starkov has quit [Ping timeout: 248 seconds]
monkegjinni has joined #ruby
workmad3 has quit [Ping timeout: 268 seconds]
lkba has quit [Ping timeout: 268 seconds]
patronus has quit [Ping timeout: 255 seconds]
<bnagy> passerine: we have NotImplementedError for that ( among other things )
<passerine> bnagy, i see. Thanks
infecto has quit [Read error: Operation timed out]
<bnagy> reading back... you still won't get an error if someone forgets to define the method
<bnagy> only at runtime
infecto has joined #ruby
<passerine> slash_nick, thanks for your inputs too.
zommi has joined #ruby
robottinosino has joined #ruby
tonini has quit [Remote host closed the connection]
mneorr has joined #ruby
mixel has joined #ruby
xardas has joined #ruby
[Cordobesa] has joined #ruby
[Cordobesa] has left #ruby [#ruby]
<whowantstolivefo> shevy: thank you, you know i have no programming background, this is why i am getting this much hard.
freewizard has joined #ruby
eka has joined #ruby
berkes has joined #ruby
brianpWins has quit [Quit: brianpWins]
emergion has joined #ruby
arya has joined #ruby
ab3 has joined #ruby
<shevy> whowantstolivefo I had neither, but there are some elements the same in every language
<shevy> functions/methods are basically almost the same everywhere
<shevy> input -> process it -> output
<shevy> some languages differ between side effects during the processing stage and others dont
<shevy> and what is also typical of most language, is what data containers are used
DonRichie has joined #ruby
dangerousdave has quit [Quit: Linkinus - http://linkinus.com]
forlin has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
zommi has quit [Remote host closed the connection]
freewizard has quit [Ping timeout: 256 seconds]
danneu1 has quit [Quit: WeeChat 0.3.8]
Xeago has joined #ruby
slainer68 has joined #ruby
ab3 has quit [Ping timeout: 252 seconds]
spider-mario has joined #ruby
tomzx_mac has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
slainer68 has quit [Ping timeout: 276 seconds]
mklappstuhl has joined #ruby
rton has joined #ruby
monkegjinni has quit [Remote host closed the connection]
blacktulip has joined #ruby
<slash_nick> passerine: sure :)
monkegjinni has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
nomenkun has quit [Read error: Connection reset by peer]
<slash_nick> Mon_Ouie: Thank you for the help earlier... this guy is running more smoothly now: https://github.com/rthbound/konamio
nari_ has joined #ruby
nomenkun has joined #ruby
mneorr has quit [Remote host closed the connection]
balishag has quit [Quit: Leaving]
nimor has quit [Quit: Leaving]
Davey has quit [Quit: Computer has gone to sleep.]
b0oh has joined #ruby
m8 has joined #ruby
e-dard has left #ruby [#ruby]
skattyadz has joined #ruby
mklappstuhl has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
r0bglees0n has quit [Ping timeout: 248 seconds]
MrZYX|off is now known as MrZYX
sayan has joined #ruby
kirun has joined #ruby
m8 has quit [Read error: Connection reset by peer]
m8 has joined #ruby
letstest has joined #ruby
emergion has joined #ruby
ttt has joined #ruby
m8 has quit [Max SendQ exceeded]
ttt has quit [Remote host closed the connection]
m8 has joined #ruby
vlad_starkov has joined #ruby
<letstest> Hi, hope this is ok to ask here. This is a very basic question. I want to simply print something continuously for 5 minutes. i.e puts "hello world" for 5 minutes. I assume it is something obvious. But, I can't seem to be able to do it
banisterfiend has joined #ruby
mixel has quit [Quit: mixel]
<MrZYX> stop = Time.now+5*60; puts "Hello World" while Time.now < stop;
<canton7> that will eat your cpu, if you care
<letstest> thank you! MrZXY
<MrZYX> only one core
<MrZYX> also it's doing IO, so not too bad :P
<letstest> ic. good to know about cpu. I am doing this to accomplish something small
<waxjar> or require timeout: Timeout::timeout(5*60) do loop { puts "hello world" } end
<canton7> put a sleep in there to stop it spinning
<MrZYX> Timeout is not thread-safe though
arya has quit [Ping timeout: 248 seconds]
vlad_starkov has quit [Ping timeout: 248 seconds]
<letstest> Thank you for the info!
freeayu has quit [Ping timeout: 256 seconds]
rushed has quit [Quit: rushed]
benlieb has quit [Quit: benlieb]
krainboltgreene has quit [Ping timeout: 255 seconds]
nari_ has quit [Ping timeout: 276 seconds]
nhhagen has joined #ruby
poga has quit [Remote host closed the connection]
hamed_r has quit [Quit: Leaving]
endure has quit [Read error: Connection reset by peer]
nhhagen has quit [Remote host closed the connection]
<shevy> letstest the easiest way to do a loop in ruby is: loop {}
<shevy> loop { sleep 1; puts 'hello world' }
davedev24 has joined #ruby
<shevy> hmm what happens here
<shevy> loop { loop { loop { loop { puts 'hi!' } } } }
<shevy> ack
<waxjar> only the most innerloop will run?
<shevy> waxjar hmm I think you are right
davedev24 has quit [Ping timeout: 258 seconds]
daniel_- has joined #ruby
dr_Poggs is now known as drPoggs
progbyperm has joined #ruby
k610 has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
atyz has joined #ruby
AgentWillyWonka has quit [Quit: Linkinus - http://linkinus.com]
pskosinski has quit [Ping timeout: 264 seconds]
emergion has joined #ruby
freeayu has joined #ruby
Spooner has joined #ruby
freewizard has joined #ruby
freewizard has quit [Read error: Connection reset by peer]
freewizard has joined #ruby
freewizard has quit [Remote host closed the connection]
freewizard has joined #ruby
Matip has joined #ruby
freewizard has quit [Read error: No route to host]
freewiza_ has joined #ruby
jimg has joined #ruby
mercwithamouth has joined #ruby
slainer68 has joined #ruby
atyz has quit [Quit: Leaving...]
marr has quit [Ping timeout: 264 seconds]
Darcade has joined #ruby
ossareh has quit [Ping timeout: 256 seconds]
passerine has left #ruby [#ruby]
<shevy> ah well
<shevy> ruby ruby ruby
Mattix has quit [Ping timeout: 264 seconds]
marcgg has quit [Read error: No route to host]
slainer68 has quit [Ping timeout: 246 seconds]
Squarepy has joined #ruby
daniel_- has quit [Ping timeout: 248 seconds]
xbhya has quit [Ping timeout: 256 seconds]
banisterfiend has quit [Remote host closed the connection]
AgentWillyWonka has joined #ruby
Jackneill has joined #ruby
banisterfiend has joined #ruby
Spooner has quit [Remote host closed the connection]
Spooner has joined #ruby
codecop has joined #ruby
quantsini has quit [Quit: Leaving.]
Brutus- has joined #ruby
Czupa has joined #ruby
teddyp1cker has joined #ruby
berkes has quit [Quit: Ex-Chat]
kofno has joined #ruby
khismetix has joined #ruby
sideshowcoder has joined #ruby
robottinosino has quit [Read error: No route to host]
Squarepy has quit [Remote host closed the connection]
daniel_- has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
lkba has joined #ruby
tealmage has joined #ruby
Zoup has joined #ruby
vlad_starkov has joined #ruby
<Zoup> is there a shortcut for Usd.create(:cost => cost) , in case where symbol has the same name as variable?
<MrZYX> no
machuga|away is now known as machuga
<injekt> it's not just the inner loop that runs
<injekt> they all run, it'll just hit the inner loop and never exit it
<MrZYX> depends on how you define "run" I guess, does it run if it never finish the first iteration?
<waxjar> Zoup: the shortest you could get it would be Usd.create cost: cost (assuming you're on ruby 1.9 or higher)
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<Zoup> waxjar: thats it, thanks
emergion has joined #ruby
atno has joined #ruby
Markvilla has joined #ruby
vlad_starkov has quit [Ping timeout: 256 seconds]
banisterfiend has quit [Remote host closed the connection]
lushious has joined #ruby
Jackneill has quit [Ping timeout: 246 seconds]
arya has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
evenix has joined #ruby
corehook has joined #ruby
kristofers has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
mmitchell has joined #ruby
freewiza_ has quit [Remote host closed the connection]
freewizard has joined #ruby
khismetix has joined #ruby
jimg has quit [Remote host closed the connection]
sandGorgon has quit [Ping timeout: 258 seconds]
dhruvasagar has quit [Ping timeout: 252 seconds]
sandGorgon has joined #ruby
ferdev has joined #ruby
radic has joined #ruby
freewizard has quit [Ping timeout: 258 seconds]
mikestok has joined #ruby
slash_nick has quit [Ping timeout: 268 seconds]
idkazuma has joined #ruby
daniel_- has quit [Ping timeout: 276 seconds]
slash_nick has joined #ruby
idkazuma has quit [Remote host closed the connection]
mikestok has quit [Client Quit]
ramblex has joined #ruby
tealmage has quit [Ping timeout: 255 seconds]
stef_204 has joined #ruby
idkazuma has joined #ruby
<shevy> require 'numbers_and_words'
<shevy> Gem::LoadError: Unable to activate activesupport-3.2.13, because i18n-0.6.4 conflicts with i18n (= 0.6.1)
<shevy> STUPID GHAY FUCKING GEM CONFLICTS
<shevy> https://github.com/kslazarev/numbers_and_words such a nice gem, and such a fucking dependency
kofno has quit [Remote host closed the connection]
<MrZYX> bundler to the rescue! :P
<shevy> !!!
<shevy> hmm a question
<shevy> how would you call such a conversion:
<shevy> "three" -> "3"
<shevy> ?
tonini has joined #ruby
<shevy> word_to_number ?
<shevy> hmmmmm
<shevy> but number could be either "3" or "three"
corehook has quit [Remote host closed the connection]
<MrZYX> word_to_digit ?
idkazuma has quit [Remote host closed the connection]
marcgg has joined #ruby
<shevy> hmm yeah, seems plausible
Squarepy has joined #ruby
tonini has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
<Brutus-> to_figure or word2figure :)
Boki has joined #ruby
m8 has quit [Read error: Connection reset by peer]
m8 has joined #ruby
MrZYX is now known as MrZYX|off
m8 has quit [Max SendQ exceeded]
nomenkun has quit [Remote host closed the connection]
yacks has quit [Quit: Leaving]
m8 has joined #ruby
nomenkun has joined #ruby
b0oh has left #ruby [#ruby]
m8 has quit [Max SendQ exceeded]
m8 has joined #ruby
beiter has joined #ruby
sayan has quit [Ping timeout: 252 seconds]
Zoup has quit [Ping timeout: 276 seconds]
nomenkun has quit [Ping timeout: 255 seconds]
m8 has quit [Max SendQ exceeded]
khismetix has quit [Quit: Computer has gone to sleep.]
m8 has joined #ruby
mercwithamouth has quit [Ping timeout: 264 seconds]
cibs has quit [Ping timeout: 256 seconds]
yannis has joined #ruby
dhruvasagar has joined #ruby
dopie has quit [Ping timeout: 245 seconds]
slainer68 has joined #ruby
idkazuma has joined #ruby
rushed has joined #ruby
megha has quit [Quit: WeeChat 0.4.0]
idkazuma has quit [Remote host closed the connection]
rushed has quit [Client Quit]
freewizard has joined #ruby
bubblehead has joined #ruby
sam113101 has quit [Quit: WeeChat 0.4.0]
sam113101 has joined #ruby
DouweM has joined #ruby
vlad_starkov has joined #ruby
mmitchell has quit [Remote host closed the connection]
sepp2k has joined #ruby
<heftig> english_to_decimal
s2013 has joined #ruby
banisterfiend has joined #ruby
apa has joined #ruby
icecandy has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
apa has left #ruby [#ruby]
postmodern has quit [Quit: Leaving]
Jackneill has joined #ruby
mikestok has joined #ruby
_nex_ has joined #ruby
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
forlin has quit [Remote host closed the connection]
pothibo has joined #ruby
devurandom has joined #ruby
<devurandom> Hello!
<sideshowcoder> hi
<devurandom> I have a question regarding #!hashbangs on different Linux distros: On Gentoo Ruby 1.9 is named ruby19, but on Ubuntu it is ruby1.9.1 or ruby1.9.3 (I have both). How do I write my hashbang, so that my script executes on both distros?
dhruvasagar has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby
<sideshowcoder> devurandom: doesn't #!/usr/bin/env ruby give you a correct version?
io_syl has joined #ruby
<devurandom> sideshowcoder: That gives me Ruby 1.8.
<devurandom> I do not want to force users of my script to change the default interpreter, and the default on Ubuntu is 1.8 apparently.
<sideshowcoder> a I see, well you could use rbenv or alike and set a .ruby-version for the folder your scripts are in
<sideshowcoder> I don't think there is a common convention on how ruby versions are named across distros
koddsson has left #ruby [#ruby]
<Brutus-> You could check the ruby version at runtime and stop if version != 1.9
Squarepy has quit [Quit: Leaving]
insulator has joined #ruby
<sideshowcoder> and if not 1.9 provide an error to the user to run with a ruby 1.9
AgentWillyWonka has quit [Quit: Linkinus - http://linkinus.com]
Proshot has quit [Ping timeout: 246 seconds]
peta_ has joined #ruby
<Hanmac> devurandom: not anymore in newer ubuntu default ruby is 1.9.*
mixel has joined #ruby
tommyvyo has joined #ruby
beiter has quit [Quit: beiter]
skattyadz has quit [Quit: skattyadz]
mklappstuhl has quit [Remote host closed the connection]
kofno has joined #ruby
bubblehead has quit [Ping timeout: 246 seconds]
skattyadz has joined #ruby
skattyadz has quit [Client Quit]
juarlex has quit [Read error: Connection reset by peer]
juarlex has joined #ruby
mklappstuhl has joined #ruby
yacks has joined #ruby
kofno has quit [Ping timeout: 258 seconds]
pskosinski has joined #ruby
khismetix has joined #ruby
philcrissman has joined #ruby
Markvilla has quit [Read error: Connection reset by peer]
tonini has joined #ruby
kraljev2 has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
skattyadz has joined #ruby
<kraljev2> Ok, I have extended native Array class
<kraljev2> class Test < Array
<kraljev2> why are operations on test not of type test
<kraljev2> Test[1,2,3] | Test[4.5]
<kraljev2> Why is this class Array, and how can I make it Test
andredieb has quit [Ping timeout: 256 seconds]
<kraljev2> irb(main):005:0> (Test[1,2,3] | Test[3,5]).class
<kraljev2> => Array
andredieb has joined #ruby
andredieb has joined #ruby
andredieb has quit [Changing host]
<waxjar> because Array#| returns a new Array
<kraljev2> But since extending, the operation is Test#| not Array#|
<Morrolan> The method | is still defined in the Array class, however, and not your Test class.
khismetix has quit [Quit: Computer has gone to sleep.]
Markvilla has joined #ruby
xardas has quit [Changing host]
xardas has joined #ruby
mikestok has quit [Quit: Computer has gone to sleep.]
<kraljev2> it shouldn't matter in which superclass it is defined
<kraljev2> ok, how can i counteract this?
osvico has quit [Ping timeout: 256 seconds]
Markvilla has quit [Read error: Connection reset by peer]
<Morrolan> Array#| is defined in such a way that it returns an array. And that is what it does.
khismetix has joined #ruby
<waxjar> define a #| method on Test that returns a Test object
<Morrolan> And my second message just got ninja'd. ;)
<kraljev2> morrolan is right, that is the reason
Markvilla has joined #ruby
<kraljev2> but i want all the operations to return the subclass test
Markvilla has quit [Read error: Connection reset by peer]
khismetix has quit [Client Quit]
<waxjar> def |(other); Test.new (self | other); end, something like that
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
zer0-day has joined #ruby
Markvilla has joined #ruby
davedev24 has joined #ruby
Markvilla has quit [Read error: Connection reset by peer]
codecop has quit [Remote host closed the connection]
<kraljev2> and also for -, join, pop, ...?
emergion has quit [Quit: Computer has gone to sleep.]
nari_ has joined #ruby
Markvilla has joined #ruby
<waxjar> all methods that return a new object, yeah
<kraljev2> the | operator was just an example, i need that for all of them
Markvilla has quit [Read error: Connection reset by peer]
<Morrolan> Or at least those method where, for the user of your class, it matters whether the return value is an 'Array' or a 'Test'. :)
Markvilla has joined #ruby
Markvilla has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
insulator has quit [Quit: insulator]
Markvilla has joined #ruby
Markvilla has quit [Read error: Connection reset by peer]
Markvilla has joined #ruby
Markvilla has quit [Read error: Connection reset by peer]
Markvilla has joined #ruby
Markvilla has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 252 seconds]
Markvilla has joined #ruby
anirudh24seven has joined #ruby
Markvilla has quit [Read error: Connection reset by peer]
Markvilla has joined #ruby
browndawg has quit [Quit: Leaving.]
aboudreault has quit [Ping timeout: 245 seconds]
slainer68 has quit [Remote host closed the connection]
banisterfiend has quit [Remote host closed the connection]
Markvilla has quit [Read error: Connection reset by peer]
tommyvyo has quit [Quit:]
kiri has joined #ruby
Markvilla has joined #ruby
mmitchell has joined #ruby
Markvilla has quit [Read error: Connection reset by peer]
Markvilla has joined #ruby
aboudreault has joined #ruby
kfoo_ has quit [Ping timeout: 264 seconds]
mmitchell has quit [Read error: Operation timed out]
Markvilla has quit [Read error: Connection reset by peer]
yacks has quit [Read error: Operation timed out]
Markvilla has joined #ruby
_br_ has joined #ruby
kfoo_ has joined #ruby
anirudh24seven has quit [Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931]]
Markvilla has quit [Read error: Connection reset by peer]
Markvilla has joined #ruby
regedarek has quit [Read error: Connection reset by peer]
emmanuelux has joined #ruby
Markvilla has quit [Read error: Connection reset by peer]
<shevy> guys I must find all first words in a case menu
<shevy> case foo
<shevy> when 'x'
tealmage has joined #ruby
<shevy> when 'y'
Markvilla has joined #ruby
<shevy> ^^^ I need an array with x, y and all other entries that appear, but only the first entries, right after 'when '
noxoc has joined #ruby
<shevy> hmm should I use File.readlines, and iterate over every entry?
tonini has quit [Quit: Lost terminal]
emmanuelux has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
cofin has joined #ruby
Markvilla has quit [Read error: Connection reset by peer]
tealmage has quit [Ping timeout: 252 seconds]
Czupa has quit [Remote host closed the connection]
Markvilla has joined #ruby
Hanmac1 has joined #ruby
rdark has joined #ruby
Markvilla has quit [Read error: Connection reset by peer]
pothibo has quit [Ping timeout: 252 seconds]
Hanmac has quit [Ping timeout: 268 seconds]
subbyyy has joined #ruby
bluOxigen has quit [Ping timeout: 264 seconds]
megha has joined #ruby
mfridh has quit [Ping timeout: 264 seconds]
Banistergalaxy has joined #ruby
kristofers has quit []
wallerdev has joined #ruby
s2013 has quit [Ping timeout: 264 seconds]
kephra has joined #ruby
<kephra> is there a way (environment variable) for ruby 1.8.7 to parse files starting with an UTF-8 BOM?
Darcade has quit [Read error: Connection reset by peer]
<Brutus-> shevy: what do you think? entries = IO.read(file).scan /when\s+'(.*)'/
<kraljev2> I'm posing this question again in hope for elegant answers
<kraljev2> If i extend native class Test < Array
<kraljev2> how can I make operations between two Test object a Test object, not Array?
Hanmac1 has quit [Ping timeout: 260 seconds]
<Brutus-> kraljev2: returning a Test obj at the end of the method?
<kraljev2> but then i have to essentially rewrite all Array methods
<Brutus-> oh, you mean Array's methods
<kraljev2> yes, like +, -, &, *, ...
<kraljev2> also #slice for example
<kraljev2> #compact
<kraljev2> etc.
mklappstuhl has quit [Remote host closed the connection]
pothibo has joined #ruby
letstest has quit [Remote host closed the connection]
<kraljev2> irb(main):007:0> (Test[1,2, nil,3, nil].compact).class
<kraljev2> => Array
Vivekananda has joined #ruby
<Banistergalaxy> Kraljev2 irb is the pits, use pry ftw
txdv has quit [Ping timeout: 272 seconds]
akashj87_ has joined #ruby
txdv has joined #ruby
_maes_ has joined #ruby
progbyperm has quit [Quit: Lost terminal]
<waxjar> kraljev2, there is no elegant solution. the code for those methods specifically returns a new Array object. to only "catch all" solution would be to write a wrapper and apply some method_missing magic. i don't think you'd wanna do that, though
<shevy> Brutus- hmm yeah I think that works fine, let me test on a 2000 lines of code case menu
browndawg has joined #ruby
<shevy> hmm no that seems to give me several duplicates
akashj87 has quit [Ping timeout: 248 seconds]
<shevy> ["ras','rasmol"] from when 'ras','rasmol'
yacks has joined #ruby
<injekt> shevy: use a set and use File#each_line
<injekt> shevy: sets are very fast and does not contain dups
<injekt> and each_line does not slurp the file contents into memory
<injekt> like read/readlines
<injekt> Banistergalaxy: almost at 2.5 million for pry, nice work
<injekt> I noticed because slop is about 100k behind
<Banistergalaxy> Cool
<injekt> aw slop is almost taking over chronic
akashj87_ has quit [Read error: Connection reset by peer]
bonhoeffer has joined #ruby
<bonhoeffer> any insight into how this could be refactored. i do this a lot: https://gist.github.com/tbbooher/5517573
akashj87_ has joined #ruby
<injekt> I really need to find time to work on chronic :/
vlad_starkov has joined #ruby
davedev24 has quit [Read error: Connection reset by peer]
<bonhoeffer> i don't think i need to leave the variable dangling at the end, and the whole operation looks clunky
<injekt> bonhoeffer: fix indentation on line 6, also no need for self (you probably know that, I just prefer without)
<injekt> bonhoeffer: you want map, not each
davedev24 has joined #ruby
<bonhoeffer> yeah -- that helps me . . . but do i really need to initialize it
<injekt> huh?
<injekt> initialize what?
<bonhoeffer> votes = []
<injekt> oh, no, use map
MrZYX|off is now known as MrZYX
<injekt> hold on
<bonhoeffer> so map would allow me to leave the variable off at the end . . .
sambao21 has joined #ruby
psyprus has quit [Read error: Connection reset by peer]
tenmilestereo has joined #ruby
psyprus has joined #ruby
eliasp has quit [Read error: Connection reset by peer]
TomRone has quit [Ping timeout: 256 seconds]
monkegjinni has joined #ruby
<injekt> BUT, because you're using if inside the map, you might have nil values
<injekt> so you want to append .compact onto it
<injekt> I also think there's no need for line 3
<bonhoeffer> where
Zolo has quit [Remote host closed the connection]
moos3 has quit [Quit: Computer has gone to sleep.]
<injekt> .map ... end.compact
<bonhoeffer> got it
<injekt> tbh I think the votes = []; thing is fine, but it depends on your style
Zolo has joined #ruby
<injekt> I dont like map.compact too much
TomRone has joined #ruby
ramblex has quit [Ping timeout: 264 seconds]
<injekt> it tells me you probably dont really want map because you dont always know what'll be returned
vlad_starkov has quit [Ping timeout: 252 seconds]
moos3 has joined #ruby
eliasp has joined #ruby
<bonhoeffer> but that whole variable isn't needed
Czupa has joined #ruby
Czupa has quit [Remote host closed the connection]
<injekt> it's not needed, but using map and compact already creates that new array implicitly anyway
Czupa has joined #ruby
chipotle_ has joined #ruby
<bonhoeffer> much cleaner -- perfect help, thanks!
<bonhoeffer> btw, i use several of your gems, thanks for all your work
<injekt> mine?
<bonhoeffer> yeah -- your gist gem i believe
robottinosino has joined #ruby
<injekt> I dont think I have a gist gem :)
<injekt> defunkt wrote gist
<bonhoeffer> ok . . . well then . . .
<injekt> but you're welcome for the help!
skulker has joined #ruby
akashj87_ has quit [Quit: leaving]
akashj87 has joined #ruby
robottinosino has quit [Ping timeout: 252 seconds]
<bonhoeffer> i'm coming back to ruby after a long pause -- i'm trying to update a gem, and want to test in irb -- the gem is govtrack -- why can't i require 'govtrack'
ZachBeta has joined #ruby
<bonhoeffer> the rb file has to be in the path, right?
<MrZYX> what's your ruby version?
skulker has quit [Remote host closed the connection]
F1skr has joined #ruby
wallerdev has quit [Quit: wallerdev]
ramblex has joined #ruby
pothibo has quit [Quit: pothibo]
Brutus- has quit [Ping timeout: 256 seconds]
<bonhoeffer> ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.3.0]
ZachBeta has quit [Client Quit]
<bonhoeffer> i've moved to require "#{Dir.pwd}/lib/govtrack/govtrack.rb" -- but then i get LoadError: cannot load such file -- govtrack/base
<bonhoeffer> so it looks like i need to cd to the right directory
shevy has quit [Ping timeout: 264 seconds]
<bonhoeffer> from irb . . .
<MrZYX> hm, that's no gem, right?
slainer68 has joined #ruby
<MrZYX> at least not installed as one
sailias has joined #ruby
<bonhoeffer> no, not installed as one, i'm working on the gem so it is not in bundler
<bonhoeffer> i think i should start irb from the lib directory, and that would solve my problems
subbyyy has quit [Ping timeout: 264 seconds]
tealmage has joined #ruby
<bonhoeffer> what i'm working on
plains has quit [Quit: leaving]
johchri has joined #ruby
noxoc has quit [Quit: noxoc]
justsee has quit [Ping timeout: 246 seconds]
baroquebobcat has joined #ruby
<bonhoeffer> for amusement: https://gist.github.com/tbbooher/5517624
<bonhoeffer> watch me flail . . .
<DouweM> require_relative?
<bonhoeffer> ah
<DouweM> but starting irb in the lib dir would also work
<DouweM> irb -Ilib
<bonhoeffer> LoadError: cannot infer basepath
<MrZYX> I just cloned the repo and can do rspec spec/ just fine
Hanmac has joined #ruby
slainer68 has quit [Ping timeout: 264 seconds]
<bonhoeffer> MrZYX: govtrack?
<MrZYX> yup
<MrZYX> but not in IRB, yeah, irb -Ilib works fine
<bonhoeffer> yeah -- i got all tests to pass, but i want to play with the model
tealmage_ has joined #ruby
<MrZYX> if you add "gemspec" to your Gemfile, bundle exec irb works too
tealmage has quit [Ping timeout: 252 seconds]
kunday has joined #ruby
<bonhoeffer> still can't get it to work -- i know i'm missing something basic . . . light will click on shortly :)
<MrZYX> not inside the lib directory, from the root
<bonhoeffer> got it
<bonhoeffer> light is on . . .
<bonhoeffer> i, of course, could work in rails console where the gem is in the environment, but i knew i could get this
<DouweM> for gems, testing in isolation like this is essential
sebastian08 has joined #ruby
<bonhoeffer> i tend to think so
nari_ has quit [Ping timeout: 252 seconds]
<bonhoeffer> if i can't, i feel i'm not understanding enough of how ruby works
slainer68 has joined #ruby
Jedi_SCT1 has quit [Ping timeout: 248 seconds]
devurandom has left #ruby [#ruby]
Yakko has joined #ruby
kunday has quit [Quit: Linkinus - http://linkinus.com]
shevy has joined #ruby
splittingred has joined #ruby
kunday has joined #ruby
sebastian08 has quit [Client Quit]
joofsh has joined #ruby
mfridh has joined #ruby
kunday_ has joined #ruby
kobain has joined #ruby
vlad_starkov has joined #ruby
kunday has quit [Ping timeout: 252 seconds]
OperatorJL has joined #ruby
johchri has quit [Quit: Textual IRC Client: www.textualapp.com]
noxoc has joined #ruby
tenmilestereo has quit [Quit: Leaving]
moos3 has quit [Quit: Computer has gone to sleep.]
noxoc has quit [Client Quit]
arya has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
noxoc has joined #ruby
wallerdev has joined #ruby
kunday_ has quit [Quit: Linkinus - http://linkinus.com]
noxoc has quit [Client Quit]
Cultofmetatron has joined #ruby
noxoc has joined #ruby
noxoc has quit [Remote host closed the connection]
mixel has quit [Quit: mixel]
monkegjinni has quit [Remote host closed the connection]
rking has quit [Quit: Yes! Finally fixed my IRC/UTF-8 issues.]
bonhoeffer has quit [Quit: bonhoeffer]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
davedev24 has quit [Remote host closed the connection]
v0n has joined #ruby
Cultofmetatron has quit [Remote host closed the connection]
rking has joined #ruby
davedev24 has joined #ruby
ARCADIVS has joined #ruby
apeiros has joined #ruby
arya has quit [Ping timeout: 248 seconds]
jeremy_c_ is now known as jeremy_c
Faris9 has joined #ruby
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
hiroyuki has joined #ruby
chipotle_ has quit [Quit: cya]
arya has joined #ruby
DouweM has quit [Quit: Leaving...]
Zolo has quit [Remote host closed the connection]
LennyLinux has joined #ruby
brennanMKE has joined #ruby
sandGorgon has quit [Ping timeout: 264 seconds]
jonathanwallace has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
ToApolytoXaos has joined #ruby
monkegjinni has joined #ruby
bonhoeffer has joined #ruby
ggordan has joined #ruby
arya has quit [Ping timeout: 248 seconds]
sambao21 has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
k611 has joined #ruby
chandankumar has joined #ruby
k610 has quit [Ping timeout: 256 seconds]
maden has joined #ruby
freeayu has quit [Remote host closed the connection]
Empty_One has joined #ruby
toquonce has quit [Quit: toquonce]
arya has joined #ruby
<Nom-> Anyone around with a bit of experience writing KPeg grammars per chance? I'd like to pick you brain on something?
yfeldblum has quit [Ping timeout: 258 seconds]
joofsh has quit [Remote host closed the connection]
breakingthings has joined #ruby
joofsh has joined #ruby
kephra has left #ruby ["Leaving"]
brennanMKE has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
banisterfiend has joined #ruby
brennanMKE has joined #ruby
mikestok has joined #ruby
arya has joined #ruby
blaxter has joined #ruby
Emmanuel_Chanel has joined #ruby
Niamkik has quit [Quit: Disconnecting from stoned server.]
DouweM has joined #ruby
Niamkik has joined #ruby
Targen has joined #ruby
arya has quit [Ping timeout: 248 seconds]
lethan has joined #ruby
arya has joined #ruby
caveat- has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
lethan has quit [Remote host closed the connection]
joofsh has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
splittingred has quit [Quit: splittingred]
kron4eg has joined #ruby
josedonizetti has joined #ruby
kuyatzu has joined #ruby
vlad_starkov has joined #ruby
Proshot has joined #ruby
kuyatzu has left #ruby ["WeeChat 0.4.0"]
xardas has quit [Read error: Connection reset by peer]
freakazoid0223 has joined #ruby
mikestok has quit [Quit: Computer has gone to sleep.]
kron4eg has quit [Client Quit]
robottinosino has joined #ruby
tealmage_ has quit [Remote host closed the connection]
lethan has joined #ruby
browndawg has quit [Ping timeout: 258 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
maden has quit [Quit: Leaving]
chandankumar has quit [Quit: Leaving]
browndawg has joined #ruby
yannis has quit [Quit: Bye!]
tjbiddle has joined #ruby
r0bglees0n has joined #ruby
caveat- has joined #ruby
petru has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<shevy> injekt is a famous man
mmitchell has joined #ruby
richcollins has joined #ruby
mmitchell has quit [Remote host closed the connection]
krainboltgreene has joined #ruby
petru has quit [Quit: Leaving]
krainboltgreene has quit [Read error: Connection reset by peer]
krainboltgreene has joined #ruby
rickmasta has joined #ruby
Squarepy has joined #ruby
akashj87 has quit [Ping timeout: 256 seconds]
maden has joined #ruby
Randomage has joined #ruby
akashj87 has joined #ruby
forlin has joined #ruby
monkegjinni has joined #ruby
maden has quit [Read error: Connection reset by peer]
<apeiros> Xeago: ping - up for some games tomorrow? :)
anderson has joined #ruby
F1skr has quit [Quit: WeeChat 0.4.0]
benwoody has joined #ruby
baba has joined #ruby
slaggy has joined #ruby
slaggy has left #ruby [#ruby]
timkohrumel has joined #ruby
megha has quit [Ping timeout: 264 seconds]
apeiros has quit [Remote host closed the connection]
julianhurley has joined #ruby
apeiros has joined #ruby
julianhurley has quit [Remote host closed the connection]
julianhurley has joined #ruby
brennanMKE has quit [Remote host closed the connection]
julianhurley has quit [Remote host closed the connection]
tjbiddle has quit [Quit: tjbiddle]
joofsh has joined #ruby
mklappstuhl has joined #ruby
julianhurley has joined #ruby
monkegjinni has quit [Remote host closed the connection]
julianhurley has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 260 seconds]
daniel_- has joined #ruby
Randomage has left #ruby [#ruby]
joofsh has quit [Remote host closed the connection]
codecop has joined #ruby
rickruby has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
krainboltgreene has quit [Ping timeout: 248 seconds]
indyrl has joined #ruby
pitzips has joined #ruby
<shevy> apeiros is back!
daniel_- has quit [Quit: WeeChat 0.4.0]
BizarreCake has quit [Read error: Connection reset by peer]
suporte85 has joined #ruby
poga has joined #ruby
wesside has joined #ruby
afei has joined #ruby
kraljev2 has quit [Ping timeout: 255 seconds]
mikestok has joined #ruby
baroquebobcat has joined #ruby
guillaum has joined #ruby
mikestok has quit [Client Quit]
xardas has joined #ruby
xardas has quit [Changing host]
xardas has joined #ruby
freewizard has quit [Remote host closed the connection]
juarlex has quit [Read error: Operation timed out]
Empty_One has quit [Ping timeout: 258 seconds]
freewizard has joined #ruby
mikestok has joined #ruby
blakeeb has joined #ruby
guillaum has quit [Read error: Connection reset by peer]
tealmage has joined #ruby
julianhurley has joined #ruby
freewizard has quit [Ping timeout: 276 seconds]
vlad_starkov has quit [Remote host closed the connection]
blakeeb has quit [Client Quit]
vlad_starkov has joined #ruby
tealmage has quit [Remote host closed the connection]
tealmage has joined #ruby
<apeiros> shevy: yupp, back from the caribbean
<julianhurley> I have an idea for a website that involves content being split over multiple pages. Similar to this:
<julianhurley> However, I have no idea how I could work out how to split this content, aside from using a monospaced font, working out how many words there are per page and diving the total number of words by page number.
<julianhurley> However, I'd like to use a different number of fonts, insert images and diagrams. I'm currently thinking that something that dynamically finds out the widths of each font character and then counts each character per page and from there works out how to split them. That's getting a bit mad though.
<julianhurley> How does a Word Processor know how to split pages, and could this realistically be replicated using ruby?
<julianhurley> Simply an idea for a non-crucial project :)
<julianhurley> Not sure if this is the place to ask!
poga has quit [Remote host closed the connection]
<apeiros> julianhurley: you'd need metrics on what is how big. the naive algorithm would be to just overflow to the next page when the container is full.
tealmage has quit [Ping timeout: 256 seconds]
<julianhurley> hmm
mmitchell has joined #ruby
<apeiros> and yes, this can realistically be done in ruby. but the "how" depends on the graphical toolkit you use.
<julianhurley> Ah interesting that this can be done realistically!
richcollins has quit [Quit: richcollins]
<julianhurley> Realistically's always good :)
<julianhurley> Apologies, but could you elaborate on 'graphical toolkit'
<apeiros> I prefer surrealism, though :-p
rdark has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Ping timeout: 252 seconds]
<julianhurley> haha
<apeiros> julianhurley: well, the thing which renders your images and text
<apeiros> such as gtk, qt, swing, (whatever the cocoa one is currently called) etc.
<banisterfiend> apeiros: where did u go in caribbean
<apeiros> banisterfiend: dom rep
<julianhurley> Ahh, I see!
<banisterfiend> apeiros: cool, i know a girl from there
<apeiros> from the car wash? :)
bjensen has joined #ruby
<bjensen> simple issue with blocks I need help with.. http://pastie.org/7800792
<apeiros> bjensen: you must define a method before using it
<apeiros> simply move line 10-12 above line 6
<bjensen> damn lol your right
timkohrumel has quit [Remote host closed the connection]
goto has joined #ruby
osvico has joined #ruby
<bjensen> my test case failed. I have an issue with chef that I cant call methods inside a block..
rickmasta has quit [Quit: Leaving...]
<apeiros> bjensen: probably the blocks get instance_eval'ed
<apeiros> (or class_/module_eval'ed)
timkohrumel has joined #ruby
Neomex has joined #ruby
<bjensen> yeah exactly
<bjensen> any idea how I can get around that?
lufi has quit [Excess Flood]
<apeiros> use an explicit receiver
<apeiros> `blupp = self; foo.instance_eval do blupp.method_you_want_to_call end`
<MrZYX> or just put them in a module/class
lufi has joined #ruby
blaxter has quit [Ping timeout: 256 seconds]
<apeiros> o0
<MrZYX> module MyUtils; module_function; def my_method; foo; end; end;
<MrZYX> MyUtils.my_method
<apeiros> if it's a utility function, yes, that'd be good
rickmasta has joined #ruby
<apeiros> s/good/my favored solution/
floo has joined #ruby
<apeiros> (function => uses no reference to self, which includes ivars)
jimg has joined #ruby
afei has quit [Remote host closed the connection]
Dan39 has joined #ruby
<Dan39> is /patter/.match(string) the same as string.match(/pattern/) ??
<DouweM> pretty much
<spider-mario> string might be nil
<spider-mario> or not a string
<spider-mario> whereas /patter/ should always be a pattern
<Dan39> good point
maden has joined #ruby
<Dan39> so /pattern/.match will always return a like true or false, where string.match might raise an exception if its not a string which wouldnt have a match method..
chandankumar has joined #ruby
NiteRain has quit [Read error: Connection timed out]
<spider-mario> right
<DouweM> pretty much
maden has quit [Read error: Connection reset by peer]
skattyadz has quit [Quit: skattyadz]
NiteRain has joined #ruby
<Hanmac> and there is a VERY BIG difference when you use an regex literal with named groups
<spider-mario> (well, it fails on numbers, for example)
mahmoudimus has joined #ruby
<spider-mario> (and returns nil for nil)
<Dan39> well match returns a match when it matches i guess, but im only interested in if it matches or not :P
<Hanmac> hm ok it does not hapen with the match method but with the similar =~ one
<Dan39> ok and question on if this code works like it should... its not mine: if answer.match(/cross-domain-policy/||/xml version=/)
<Hanmac> Dan39: look also at =~ if you dont want the match pbject
<Dan39> it didnt seem to, to me
<Dan39> i changed it to: if /cross-domain-policy|xml version=/.match(answer)
jdunck has joined #ruby
<Dan39> which seems to work like expected
<MrZYX> a Regexp object is always true so the original version will only ever match /cross-domain-policy/
<Dan39> i dont even get how that would work with the match method
jimg has quit [Ping timeout: 258 seconds]
<Dan39> how the || in there would
<MrZYX> >> /a/ || /b/
<eval-in> MrZYX => /a/ (http://eval.in/21176)
<Dan39> doesnt make sense lol
<Dan39> ooo
<Dan39> so it just returns the first one
<MrZYX> yup
<Dan39> bad coder i guess
<Hanmac> >> Regexp.union(/a/,/b/)
<eval-in> Hanmac => /(?-mix:a)|(?-mix:b)/ (http://eval.in/21177)
<Dan39> and that was put into an official release of a "stable" program haha
<Dan39> flashpolicyd
timkohrumel has quit [Remote host closed the connection]
<Hanmac> Dan39: /cross-domain-policy|xml version=/
<Dan39> Hanmac: huh?
DementedInsanity has joined #ruby
DementedInsanity has quit [Changing host]
DementedInsanity has joined #ruby
<Dan39> Hanmac: yea read up, i said: 13:04:12 Dan39 | i changed it to: if /cross-domain-policy|xml version=/.match(answer)
<Dan39> :P
yacks has quit [Quit: Leaving]
<Dan39> was just wondering if the original code was bad or it was just something wrong
<apeiros> Dan39: || always evaluates to the first non-nil/false value
<apeiros> otherwise it evaluates to the last nil/false value
<Dan39> im surprised it returns /cross-domain-policy/ tho
<Dan39> id think trying to evaluate /cross-domain-policy/ by itself would throw nil or an error
jdunck has quit [Quit: Computer has gone to sleep.]
Kricir has joined #ruby
<DouweM> It's a Regexp literal, it's just an object. And objects are, obviously, truthy
<Dan39> yea
<Dan39> but then wouldnt it just return true?
<apeiros> the same as 12 or "foo" don't *raise* (not throw) a nil error
<Dan39> so it would be string.match(true) ?
kristofers has joined #ruby
<MrZYX> no
<r0bglees0n> why would it return true dude
<DouweM> it'll evaluate to the first non-nil/false, so the Regexp object
<Dan39> ok
<DouweM> there's no "boolean casting"
ariedler has joined #ruby
DonRichie has quit [Ping timeout: 268 seconds]
DonRichie has joined #ruby
cyberarm has joined #ruby
mmitchell has quit [Remote host closed the connection]
banisterfiend has quit [Remote host closed the connection]
k611 has quit [Ping timeout: 256 seconds]
generali_ has joined #ruby
<julianhurley> apeiros: Could I PM you?
DouweM has quit [Quit: Leaving...]
timkohrumel has joined #ruby
Shiva has joined #ruby
iPhoneMRZ has joined #ruby
johchri has joined #ruby
iPhoneMRZ has quit [Client Quit]
bjensen has quit [Quit: bjensen]
v0n has quit [Read error: Operation timed out]
<apeiros> julianhurley: if it's about a programming problem, then no. I'm not a consultant. I only give my knowledge away for free in public.
<apeiros> otherweise, yes
<apeiros> *wise
machuga is now known as machuga|away
<julianhurley> 'fraid it is programming :P
dhruvasagar has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
splittingred has joined #ruby
mockra has joined #ruby
<apeiros> julianhurley: just ask in public.
wedgex has joined #ruby
nezumi has quit [Ping timeout: 260 seconds]
tommyvyo has joined #ruby
Cultofmetatron has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
rickmasta has quit [Quit: Leaving...]
mixel has joined #ruby
vlad_starkov has joined #ruby
wedgex has quit [Remote host closed the connection]
<julianhurley> It's just I'm looking into GTK and thinking of using it for my pagination program. Not quite sure how I'd get the text to overflow when the container's full. Do you think finding out the size of each character dynamically, and then counting the frequency of each character, and using that to split the text over multiple images is a good idea?
<julianhurley> *sorry, multiple pages, not images
<julianhurley> multiple pages
ramblex has quit [Remote host closed the connection]
bjensen has joined #ruby
browndawg has quit [Quit: Leaving.]
mixel has quit [Client Quit]
Hanmac1 has joined #ruby
ariedler has quit [Remote host closed the connection]
ariedler has joined #ruby
<julianhurley> I mean, browsers aren't exactly compliant. That approach may work in one browser, but not another. What if IE (it would be IE) decided to render a certain character a tincy bit bigger than normal? The effect would be sheer chaos! :P
workmad3 has joined #ruby
tealmage has joined #ruby
Hanmac has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby
RagingDave has joined #ruby
<julianhurley> I don't know much about the inner workings of browsers. Just that the way they render text is actually really complicated. And this approach doesn't feel very solid, you know?
brianpWins has joined #ruby
ariedler has quit [Ping timeout: 252 seconds]
ariedler has joined #ruby
bluOxigen has joined #ruby
Catbuntu has joined #ruby
zeade has joined #ruby
tealmage has quit [Ping timeout: 264 seconds]
Boki has quit []
slainer68 has quit [Remote host closed the connection]
tk_ has quit [Quit: ばいばい]
subbyyy has joined #ruby
iPhoneMRZ has joined #ruby
NiteRain has quit [Ping timeout: 260 seconds]
iPhoneMRZ has quit [Client Quit]
threesome has quit [Read error: Connection reset by peer]
mixel has joined #ruby
Shiva has quit [Read error: Connection reset by peer]
generali_ has quit [Remote host closed the connection]
<shevy> ruby-gtk?
johchri has quit [Quit: Textual IRC Client: www.textualapp.com]
threesome has joined #ruby
<Dan39> hmm ruby looks pretty nice
<shevy> it has bindings for a browser, doesn't it?
<shevy> Dan39 start today!
<Dan39> i probably shouldnt, ive still got a lot to learn with others :P
<mixel> today is too far away, start now!
<Dan39> i was just fixing a script i downloaded
<MrZYX> shevy: you want gobject instead these days
<Dan39> thats one id really like to learn tho, vala :P
DouweM has joined #ruby
<Dan39> or geanie, which is vala with a different syntax
<shevy> ewwww
<shevy> go away!
<julianhurley> shevy: I haven't looked at it properly, and have never used it
<shevy> go learn geanie
<Dan39> haha
<Dan39> shevy: you seen geanie?
<shevy> julianhurley hey I am still in the past here, ruby-gnome does not work on my last ruby version 1.8.7 anymore
<Dan39> it looks pretty awesome :P
sandGorgon has joined #ruby
<shevy> Dan39 have not, but I am trying to become less dependent on computers slowly!
s2013 has joined #ruby
<Dan39> o_O
<Dan39> vala is kinda new to, lacks documentation and much community
<Dan39> tho*
nezumi has joined #ruby
<shevy> wtf
<shevy> x = ' "geiz','geizhals",'
<shevy> !!!
<Dan39> haha who did that?
<shevy> this is an array????
<Dan39> looks like a string to me?
<MrZYX> no, it's an array
<Dan39> oo wait i see
<shevy> wow
<Dan39> haha
<shevy> x = 'abc','def' # => ["abc", "def"]
<shevy> why is this an arrray
<shevy> Array
<shevy> MAGIC
<MrZYX> x, *y = 'a','b','c'
<shevy> but you use a * there
bjensen has quit [Quit: bjensen]
uncleBob is now known as kn0tsel
kn0tsel is now known as dfdf
eka has joined #ruby
<MrZYX> the point is that the right hand side is an array in this case too
<MrZYX> >> x, *y = ['a', 'b', 'c']; y
<eval-in> MrZYX => ["b", "c"] (http://eval.in/21214)
threesome has quit [Remote host closed the connection]
<shevy> but you used [] now
yacks has joined #ruby
echevemaster has quit [Read error: Connection reset by peer]
<shevy> ruby tricked me
<shevy> I thought it was a string
Empty_One has joined #ruby
<shevy> but it will magically add []
<MrZYX> it's ruby, it makes parens of all sort optional wherever it can ;)
<shevy> this is funny
NiteRain has joined #ruby
<shevy> x = 'a','b','c' # => ["a", "b", "c"]
<shevy> x = ('a','b','c') # SyntaxError: compile error
<shevy> x = (['a','b','c']) # => ["a", "b", "c"]
threesome has joined #ruby
Kricir has quit [Remote host closed the connection]
robottinosino has quit [Ping timeout: 252 seconds]
<shevy> the ruby parser must be the most devilish thing on earth
Cultofmetatron has quit [Remote host closed the connection]
freewizard has joined #ruby
Xeago_ has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
bonhoeffer has quit [Quit: bonhoeffer]
farhad_hf_ has joined #ruby
Cultofmetatron has joined #ruby
wroathe has joined #ruby
Cultofmetatron has quit [Read error: Connection reset by peer]
Xeago has quit [Ping timeout: 256 seconds]
eka has quit [Quit: Computer has gone to sleep.]
IceDragon has joined #ruby
wesside has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 248 seconds]
ab3 has joined #ruby
staafl has quit [Read error: Connection reset by peer]
freewizard has quit [Read error: Connection reset by peer]
subbyyy has quit [Read error: Connection reset by peer]
freewizard has joined #ruby
arya has joined #ruby
jmaya has joined #ruby
Xeago has joined #ruby
duply has joined #ruby
rton has left #ruby [#ruby]
duply has quit [Read error: Connection reset by peer]
mklappstuhl has joined #ruby
subbyyy has joined #ruby
rton has joined #ruby
duply has joined #ruby
rton has left #ruby [#ruby]
Xeago_ has quit [Ping timeout: 245 seconds]
Squarepy has quit [Remote host closed the connection]
rton has joined #ruby
rton has left #ruby [#ruby]
jbpros has joined #ruby
whowantstolivef1 has joined #ruby
Empty_One has quit [Ping timeout: 260 seconds]
dfdf has quit [Remote host closed the connection]
<slash_nick> How can I pass a block to this method https://github.com/rthbound/konamio/blob/master/lib/konamio/sequence/requisition.rb#L19 so that when the recursion completes, the block gets called here https://github.com/rthbound/konamio/blob/master/lib/konamio/sequence/requisition.rb#L32 ?
Squarepy has joined #ruby
arya has quit [Ping timeout: 248 seconds]
rton has joined #ruby
rton has left #ruby [#ruby]
mockra has quit [Remote host closed the connection]
rton has joined #ruby
rton has left #ruby [#ruby]
mockra has joined #ruby
forlin has quit [Remote host closed the connection]
iPhoneMRZ has joined #ruby
iPhoneMRZ has quit [Client Quit]
rton has joined #ruby
<injekt> slash_nick: execute!(&block); listen(@sequence, block); inside listen: block.call
benlieb has joined #ruby
jduan1981 has joined #ruby
<slash_nick> injekt: so just be sure to pass it to every call to listen? thanks :)
arya has joined #ruby
<injekt> slash_nick: yeah, and if you want it to be optional use listen(@sequence, &block) instead
<injekt> slash_nick: that way it'll be passed in as a literal block instead of a Proc object as an argument
<slash_nick> def listen(@sequence, &block) ? ....
mercwithamouth has joined #ruby
toquonce has joined #ruby
<injekt> slash_nick: yup
<slash_nick> thanks :)
tealmage has joined #ruby
<injekt> slash_nick: then block will be nil if none was provided so you can just block.call if block
jmaya has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
lethan has quit [Remote host closed the connection]
Neomex has quit [Quit: Neomex]
mr0wl has joined #ruby
workmad3 has joined #ruby
<slash_nick> great I'm going to try it a bit... I'd like the gem to execute an arbitrary block when the konami code is given :)
_nex_ has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
tealmage has quit [Ping timeout: 260 seconds]
sandGorgon has quit [Ping timeout: 260 seconds]
sandGorgon has joined #ruby
splittingred has quit [Quit: splittingred]
robscomputer_ has joined #ruby
robscomputer_ has quit [Remote host closed the connection]
josedonizetti has quit [Quit: josedonizetti]
robscomputer_ has joined #ruby
LennyLinux has quit [Remote host closed the connection]
toquonce has quit [Ping timeout: 245 seconds]
iPhoneMRZ has joined #ruby
iPhoneMRZ has quit [Client Quit]
bjensen has joined #ruby
ToApolytoXaos has quit [Quit: Leaving]
felipillo has joined #ruby
tealmage has joined #ruby
sambao21_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
sambao21_ is now known as sambao21
mr0wl has quit [Quit: leaving]
codezombie has joined #ruby
slainer68 has joined #ruby
workmad3 has quit [Read error: Operation timed out]
icantbecool has joined #ruby
sambao21 has quit [Client Quit]
jbpros_ has joined #ruby
jbpros has quit [Ping timeout: 252 seconds]
jbpros_ is now known as jbpros
slainer68 has quit [Ping timeout: 256 seconds]
slash_nick has quit [Ping timeout: 256 seconds]
icantbecool has quit [Quit: Computer has gone to sleep.]
mattbl has joined #ruby
benlieb has quit [Read error: Connection reset by peer]
benlieb has joined #ruby
kaffepan1a is now known as kaffepanna
end_guy has quit [Remote host closed the connection]
DrCode has quit [Remote host closed the connection]
Hobogrammer_ has joined #ruby
DrCode has joined #ruby
breakingthings has quit [Quit: breakingthings]
rickmasta has joined #ruby
farhad_hf_ has left #ruby ["Konversation terminated!"]
jbpros has quit [Quit: jbpros]
Hobogrammer has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Remote host closed the connection]
end_guy has joined #ruby
c0rn has joined #ruby
tylersmith has joined #ruby
Czupa has quit [Ping timeout: 256 seconds]
mr0wl has joined #ruby
icecandy has quit [Remote host closed the connection]
pbertain has joined #ruby
pbertain has quit [Remote host closed the connection]
graeme has joined #ruby
jgarvey has quit [Quit: Leaving]
computer has joined #ruby
staafl has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
sambao21 has joined #ruby
mahmoudimus has joined #ruby
slash_nick has joined #ruby
staafl has quit [Read error: Connection reset by peer]
staafl has joined #ruby
Proshot has quit [Quit: Leaving]
staafl has quit [Read error: Connection reset by peer]
staafl has joined #ruby
josedonizetti has joined #ruby
brianpWins has quit [Quit: brianpWins]
iaj has left #ruby [#ruby]
mixel has quit [Quit: mixel]
Tobiaschib has joined #ruby
johnnygoodmancpa has joined #ruby
timkohrumel has quit [Ping timeout: 276 seconds]
pyx has joined #ruby
khismetix has joined #ruby
<shevy> what means this /^\s*$/ ?
<shevy> from beginning of line, to end of line... hmm
TheFuzzball has quit [Quit: Computer has gone to sleep.]
<shevy> \s Any whitespace character
<shevy> ok so all whitespace characters
<Mon_Ouie> A (possibly empty) line with only whitespace
<shevy> that is \t and ' ' ?
<shevy> ok
graeme has quit [Quit: graeme]
<MrZYX> \n and \r too
rickmasta has quit [Quit: Leaving...]
<MrZYX> I guess non-breaking space etc too
<Mon_Ouie> Nope
<Mon_Ouie> To match those you can use unicode properties though
wormwood has quit [Quit: WeeChat 0.4.0]
mercwithamouth has quit [Ping timeout: 255 seconds]
<Mon_Ouie> And well, unbreaking space is likely not to be matched by the most common of them by design (so that a split on any whitespace character doesn't split on _unbreaking_ spaces)
altivec has joined #ruby
Squarepy has quit [Remote host closed the connection]
rdg has joined #ruby
rdg has quit [Remote host closed the connection]
rdg has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
wroathe has quit [Ping timeout: 252 seconds]
brianpWins has joined #ruby
kstone has joined #ruby
chandankumar has quit [Quit: Leaving]
jetblack has quit [Quit: leaving]
chandankumar has joined #ruby
brain_shim_ has joined #ruby
banjara has joined #ruby
altivec has quit [Quit: Computer has gone to sleep.]
kstone has left #ruby [#ruby]
<apeiros> are non-breaking spaces also called unbreaking spaces? o0
wormwood has joined #ruby
<MrZYX> maybe.. there are also small non-breaking spaces and soft spaces
akashj87 has quit [Read error: Connection reset by peer]
<apeiros> there are like 20 different kinds of spaces
mr0wl has quit [Quit: leaving]
Shiva has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
chandankumar has quit [Quit: Leaving]
dv__ has joined #ruby
goto has quit [Quit: Leaving]
rdg has quit [Quit: ttfn]
dv_ has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
jetblack has joined #ruby
akashj87 has joined #ruby
mercwithamouth has joined #ruby
huoxito has joined #ruby
mattbl has quit [Quit: Leaving]
<ddfreyne> Does anybody have a recommendation for a framework/library for building games (Or game prototypes) in Ruby?
<ddfreyne> I know of rubygame and gosu.
<Hanmac1> gosu is nice
Hanmac1 is now known as Hanmac
Shiva has quit [Client Quit]
<Hanmac> i have something for 3d but its not finish yet ;(
wesside has joined #ruby
<ddfreyne> I wrote a 2D engine in Obj-C, then converted it to C, but now I want to start with a different project and I want a language that I can use to prototype something *quickly*
c0rn has quit [Quit: Computer has gone to sleep.]
<ddfreyne> So the library doesn’t have to be feature-complete or fast; it just needs to allow me to prototype something quickly
Tricon has joined #ruby
<brain_shim_> Howdy y'all. I'm trying to wrap my head around a class that the Senior Dev on our project slapped into our lib directory. https://gist.github.com/anonymous/bc94918a8b54bbd32ecb
<brain_shim_> Any insights?
<brain_shim_> Or things I should research to get a better handle on it?
<MrZYX> brain_shim maybe you should point to the part you do not understand
<brain_shim_> I under stand that there is some meta programming involved. I'm just more spotty on the "why" of it.
<Mon_Ouie> brain_shim_: Looks like he's reading a YAML file and automatically defining accessors for them
<Mon_Ouie> for the properties that have been read from it, that is
<Mon_Ouie> Why not ask the people you're working with though?
brennanMKE has joined #ruby
<brain_shim_> it's kind of a challenge
<brain_shim_> of sorts
johnnygoodmancpa has left #ruby [#ruby]
tomzx_mac has joined #ruby
slash_nick has quit [Ping timeout: 245 seconds]
<Spooner> Someone reinventing the OpenStruct wheel by the look of it.
<brain_shim_> He basically *defied* me to understand it, and I want to know why.
<MrZYX> hm, OpenStruct is recursive?
<Mon_Ouie> Because there's no point in defying someone to understand properly written code!
<brain_shim_> Yeah basically.
slash_nick has joined #ruby
<MrZYX> maybe explain what you think it's doing line by line (or block by block) and we point out where you're mistaken
<brain_shim_> kk
<Spooner> MrZYX, No, it isn't recursive, but it could map the hashes to OpenStructs and get most of the same effect.
<Mon_Ouie> MrZYX: It isn't. It also doesn't have a default proc like hash does
<Spooner> Without a bag of meta.
<MrZYX> hm, yeah
<MrZYX> so how about we write a smarter version of it and brain_shim can shoot back? :D
Jackneill has quit [Remote host closed the connection]
jbpros has joined #ruby
<brain_shim_> When I look at def self.reload!, it looks to me like he's grabbing some values that normally aren't accessible, and inserting them into a context where he can get at them more conveniently.
<brain_shim_> I guess I should do an Ack on the codebase to see where this class gets called for more context.
<Mon_Ouie> Not really. Instead of having his data in a hash accessible with foo["bar"]["baz"] he's creating methods, so he can do AppConfig.bar.baz
<Spooner> MrZYX, Several solutions here: http://www.ruby-forum.com/topic/67905
backjlack has quit [Ping timeout: 264 seconds]
jrajav has joined #ruby
<brain_shim_> I knew it was reading YAML, I wasn't sure what problem he was trying to solve tho. Nice thread.
tylersmith has quit [Remote host closed the connection]
mr0wl has joined #ruby
Catbuntu has quit [Quit: Leaving]
nezumi has quit [Ping timeout: 260 seconds]
tommyvyo has quit [Quit:]
anderson has quit [Quit: Leaving]
mklappstuhl has quit [Remote host closed the connection]
<workmad3> brain_shim_: https://github.com/markbates/configatron you could throw that in your senior dev's face too ;)
<brain_shim_> workmad3: looks good :)
tommyvyo has joined #ruby
<Mon_Ouie> Yeah, openstruct makes it way shorter
<brain_shim_> I'm looking at the docs for OpenStruct and it seems like a pretty straight forward way to go about it.
vlad_starkov has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
sideshowcoder has quit [Ping timeout: 264 seconds]
newTech has joined #ruby
computer has quit [Ping timeout: 256 seconds]
tjbiddle has joined #ruby
freerobby has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
<apeiros> there is a thing about openstruct for which I don't like it for something like config wrapper
<apeiros> it doesn't raise on non-existent properties
KevinSjoberg has joined #ruby
<apeiros> (which is perfectly fine for other use-cases)
moos3 has joined #ruby
tjbiddle has quit [Client Quit]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
sideshowcoder has joined #ruby
marr has joined #ruby
vlad_starkov has joined #ruby
rgn has quit [Read error: Operation timed out]
Squarepy has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
SeanTAllen has quit [Ping timeout: 246 seconds]
im0b has quit [Ping timeout: 246 seconds]
Spaceghost|cloud has quit [Ping timeout: 272 seconds]
octarine has quit [Ping timeout: 245 seconds]
mroth has quit [Ping timeout: 256 seconds]
mtlatif has quit [Ping timeout: 276 seconds]
strax has quit [Ping timeout: 256 seconds]
xerxas has quit [Ping timeout: 245 seconds]
yeban has quit [Ping timeout: 246 seconds]
heidar has quit [Ping timeout: 272 seconds]
r0bglees0n has quit [Ping timeout: 252 seconds]
notbrent has quit [Ping timeout: 276 seconds]
guilleiguaran_ has quit [Ping timeout: 245 seconds]
karnowski has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Ping timeout: 252 seconds]
<Spooner> brain_shim_, MrZYX: https://gist.github.com/Spooner/9ef45d2e6fc201d9a8b3 I believe that is simplerer!
[Neurotic] has quit [Ping timeout: 256 seconds]
toquonce has joined #ruby
phasma has quit [Ping timeout: 272 seconds]
<brain_shim_> Spooner: It certainly looks less complex. :)
emmanuelux has joined #ruby
<Spooner> But as workmad3 says, it is already done in configation's from_hash
<MrZYX> Spooner: except that you need to inherit from SimpleDelegate and do __setobj__(yaml_config) at the end
<Spooner> MrZYX, You do?
<MrZYX> well currently there's no way to access it?
<Spooner> There wasn't in the original.
<MrZYX> the original defined singleton methods
karnowski has joined #ruby
phasma has joined #ruby
brennanMKE has quit [Remote host closed the connection]
idkazuma has joined #ruby
xerxas has joined #ruby
akells` has joined #ruby
kristofers has quit [Read error: Connection reset by peer]
rdg has joined #ruby
arya has quit [Ping timeout: 248 seconds]
freerobby has quit [Quit: Leaving.]
chrishough has joined #ruby
kristofers has joined #ruby
rickmasta has joined #ruby
chessguy has joined #ruby
s2013 has quit [Ping timeout: 256 seconds]
lkba has quit [Ping timeout: 246 seconds]
arya has joined #ruby
JohnRKD has joined #ruby
freerobby has joined #ruby
mneorr has joined #ruby
F1skr has joined #ruby
babykosh has joined #ruby
tylersmith has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
rdg has quit [Quit: ttfn]
tricon_ has joined #ruby
suporte85 has quit [Read error: Connection reset by peer]
saarinen has joined #ruby
tjbiddle has joined #ruby
jetblack has quit [Remote host closed the connection]
pitzips has quit [Quit: Leaving]
saarinen has quit [Client Quit]
babykosh has quit [Quit: babykosh]
jamesfung14 has joined #ruby
xbhya has joined #ruby
Tricon has quit [Ping timeout: 264 seconds]
arya has quit [Ping timeout: 248 seconds]
computer has joined #ruby
juarlex has joined #ruby
backjlack has joined #ruby
<slash_nick> injekt: thanks again... check out the gem "konamio" if you're up for it :) it's neat
ckrailo has joined #ruby
lkba has joined #ruby
subbyyy has quit [Ping timeout: 256 seconds]
joofsh has joined #ruby
saarinen has joined #ruby
<Banistergalaxy> Slash_nick what does that gem do?
<slash_nick> Listens to stdin til you enter the konami code... then it congratulates you and executes the block you gave it (if you gave it one)
<slash_nick> up up down down left right left right B A
mklappstuhl has joined #ruby
ravster has joined #ruby
infecto has quit [Read error: Operation timed out]
infecto has joined #ruby
wallerdev has quit [Quit: wallerdev]
corehook has joined #ruby
toquonce has quit [Quit: toquonce]
<slash_nick> Banistergalaxy: It was just a toy. Built it as an exercise and as a demonstration of a pattern I'm fond of... the pattern's "powered by" pay_dirt
jbpros has quit [Quit: jbpros]
pyx has quit [Quit: WeeChat 0.4.0]
ab3 has quit [Ping timeout: 246 seconds]
wallerdev has joined #ruby
ziprar has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
chrishough has quit [Quit: chrishough]
niceguyjames has joined #ruby
Squarepy has quit [Remote host closed the connection]
zipace has quit [Ping timeout: 260 seconds]
ziprar has quit [Read error: Connection reset by peer]
corehook has quit [Ping timeout: 252 seconds]
tricon_ has quit [Quit: Leaving...]
subbyyy has joined #ruby
nezumi has joined #ruby
arya has joined #ruby
k611 has joined #ruby
robbyoconnor has joined #ruby
AgentWillyWonka has joined #ruby
backjlack has quit [Remote host closed the connection]
LennyLinux has joined #ruby
saarinen has quit [Quit: saarinen]
zeade has quit [Quit: Leaving.]
Mon_Ouie has quit [Ping timeout: 264 seconds]
<AgentWillyWonka> hello
toquonce has joined #ruby
<apeiros> Spooner: btw., I prefer something like this: https://gist.github.com/apeiros/5518772
<Vivekananda> hey everyone
k611 has quit [Ping timeout: 264 seconds]
ryanf has quit [Quit: leaving]
mocfive has joined #ruby
<Vivekananda> someone gave me a good link for data structures in java on youtube and for the life of me I dont remember who. I am trying to search in youtube and also ask in case I can get it again :)
nhhagen has joined #ruby
johnnygoodmancpa has joined #ruby
nhhagen has quit [Remote host closed the connection]
rushed has joined #ruby
ehaliewicz has joined #ruby
rushed has quit [Client Quit]
guilleiguaran_ has joined #ruby
jonathanwallace has quit [Read error: Operation timed out]
davout has joined #ruby
zipace has joined #ruby
freewizard has quit [Remote host closed the connection]
freewizard has joined #ruby
kristofers has quit []
codecop has quit [Remote host closed the connection]
freewizard has quit [Ping timeout: 252 seconds]
bonhoeffer has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
arya has quit [Ping timeout: 248 seconds]
statarb3 has quit [Quit: Leaving]
KevinSjoberg has quit [Quit: Textual IRC Client: www.textualapp.com]
<ravster> how does aasm work? I'm trying to get the example thats in their readme working on a new rails app, and I'm just not able to get it.
backjlack has joined #ruby
johnnygoodmancpa has left #ruby [#ruby]
<apeiros> ravster: rails questions are better placed in #rubyonrails
<ravster> apeiros: ok, thanks
spider-mario has quit [Remote host closed the connection]
<MrZYX> from a quick look at the readme aasm seems pretty straight forward and not very rails specific though
Jedi_SCT1 has joined #ruby
backjlack has quit [Remote host closed the connection]
strax has joined #ruby
JohnRKD has quit []
rickmasta has quit [Quit: Leaving...]
backjlack has joined #ruby
<MrZYX> ravster: you should ask a more specific question, I doubt letting us reword the readme will get you any further
<shevy> can I access case menus like an object?
ravster has quit [Quit: Leaving.]
Squarepy has joined #ruby
<apeiros> MrZYX: yes, aasm can be used outside of rails. chances he is having rails related issues are quite high, though.
<MrZYX> we'll never know
ZachBeta has joined #ruby
<MrZYX> chances he just didn't get state machines are quite high too
ariedler has quit [Remote host closed the connection]
computer has quit [Ping timeout: 260 seconds]
ehaliewicz has quit [Ping timeout: 256 seconds]
Jedi_SCT1 has quit [Quit: See ya]
ckrailo has quit [Quit: Computer has gone to sleep.]
bonhoeffer has quit [Quit: bonhoeffer]
babykosh has joined #ruby
mikestok has quit [Quit: Computer has gone to sleep.]
thone_ has joined #ruby
icy` has quit [Ping timeout: 245 seconds]
felipillo has quit [Ping timeout: 256 seconds]
tyl has joined #ruby
Jedi_SCT1 has joined #ruby
<apeiros> MrZYX: interestingly enough he did not ask in #rubyonrails
slyv has joined #ruby
thone has quit [Ping timeout: 252 seconds]
babykosh has quit [Client Quit]
benlieb has quit [Quit: benlieb]
rton has left #ruby [#ruby]
benlieb has joined #ruby
rton has joined #ruby
tealmage has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
tealmage has joined #ruby
Faris9 has quit [Quit: Faris9]
mklappstuhl has joined #ruby
mixel has joined #ruby
duply has quit [Read error: Connection reset by peer]
arya has joined #ruby
<benlieb> where is the Hash.slice method from? Don't see it in ruby or rails docs.
tealmage has quit [Ping timeout: 256 seconds]
<apeiros> benlieb: Hash.instance_method(:slice).source_location helps with such questions
<apeiros> also {}.method(:slice).source_location
atyz has joined #ruby
<apeiros> or (only in pry): $ {}.slice
<apeiros> Banistergalaxy: is there a shortcut in pry to get the source location? similar to $ and ?
rushed has joined #ruby
Palantir has joined #ruby
eka has joined #ruby
swex has joined #ruby
arya has quit [Ping timeout: 256 seconds]
ckrailo has joined #ruby
tylersmith has quit [Remote host closed the connection]
pithagorians has quit [Ping timeout: 264 seconds]
blacktulip has quit [Remote host closed the connection]
swex_ has quit [Ping timeout: 258 seconds]
newTech has quit [Quit: newTech]
jonathanwallace has joined #ruby
jhn has joined #ruby
joofsh has quit [Remote host closed the connection]
generalissimo has joined #ruby
arya has joined #ruby
Mattx has joined #ruby
mercwithamouth has quit [Ping timeout: 260 seconds]
sambao21 has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
Tricon has joined #ruby
rgn has joined #ruby
mroth has joined #ruby
SeanTAllen has joined #ruby
octarine has joined #ruby
Spaceghost|cloud has joined #ruby
arya has quit [Ping timeout: 248 seconds]
[Neurotic] has joined #ruby
notbrent has joined #ruby
Matip has quit [Ping timeout: 268 seconds]
heidar has joined #ruby
mtlatif has joined #ruby
niceguyjames has quit [Quit: Textual IRC Client: www.textualapp.com]
arya has joined #ruby
jhn has quit [Ping timeout: 246 seconds]
im0b has joined #ruby
yeban has joined #ruby
tyl has quit [Quit: Computer has gone to sleep.]
arya has quit [Ping timeout: 252 seconds]
csaunders has joined #ruby
RagingDave has quit [Quit: Ex-Chat]
bonhoeffer has joined #ruby
rickmasta has joined #ruby
MrZYX is now known as MrZYX|off
altker128 has joined #ruby
<altker128> Hey all. Does anyone here use the TracksApp (http://getontracks.org/)? I have the basic setup working using the Mongrel web server but the response time is absurdly bad, like 10's of seconds ; the server is a Core i7-2710 ; Ruby 1.92 . I wanted to understand if this was normal or not.
akells` has quit [Remote host closed the connection]
LennyLinux has quit [Remote host closed the connection]
Jedi_SCT1 has quit [Quit: See ya]
breakingthings has joined #ruby
<apeiros> altker128: I doubt that 10s is normal
mercwithamouth has joined #ruby
Jedi_SCT1 has joined #ruby
<apeiros> altker128: sounds a bit as if it was a rails app and got restarted upon every request
<altker128> apeiros: I wouldn't think so either. The console shows reasonable times to 'render' pieces, in the 10's of ms, but the web brower on the client side is jacked
<apeiros> that OTOH sounds different
<apeiros> no idea, though
<altker128> apeiros: I meant to say, on the client-side (web browser) it takes 10's of seconds to change. It sounds abnormal to me too...time to rip up this jail
sepp2k1 has joined #ruby
felipillo has joined #ruby
sepp2k has quit [Ping timeout: 258 seconds]
bjensen has quit [Quit: bjensen]
marr has quit [Ping timeout: 256 seconds]
<altker128> apeiros: Fixed it! :)
<apeiros> congrats :)
<whowantstolivef1> i've done examples in ruby koans today
<altker128> apeiros: It was doing a reverse DNS look-up which was totally killing the performance
<apeiros> or just don't use webrick
<apeiros> there are much faster ruby based webservers out there
<apeiros> thin and unicorn e.g.
generalissimo has quit [Remote host closed the connection]
<altker128> apeiros: I keep hearing that...but I have no idea how to integrate that with Tracks. Anything Ruby related is really brand new to me.
<codezombie> When using array.zip is it possible to keep the extra elements from the array being passed in? For example ["a","b"].zip(["c","d",e"]). `e` would be lost in the merge. I'd like to preserve it if possible.
csaunders has quit [Quit: Computer has gone to sleep.]
<altker128> apeiros: I mean, I guess if performance was truly a concern I'd use Apache or lighttpd or nginx or something
joofsh has joined #ruby
<apeiros> codezombie: how?
bjensen has joined #ruby
<codezombie> apeiros: ["a","b"].zip(["c","d","e"]) produces [["a", "c"], ["b", "d"]] - I'm asking if there's a way to keep "e" in this instance.
<apeiros> altker128: is there a file "Gemfile" in the toplevel of the project? if so, just add `gem "thin"` to it
<apeiros> codezombie: yes. keep it *how*
<altker128> apeiros: Yes, there is a Gemfile. Just add gem thin? That's really it?
<codezombie> apeiros: no idea. Just thought I'd ask if there was a known way to preserve it.
<altker128> apeiros: Well, that and use bundle to get the gem, right?
<codezombie> apeiros: in the result
<apeiros> altker128: not `gem thin`, `gem "thin"`, the quotes are needed.
<apeiros> codezombie: then your question makes no sense.
Squarepy has quit [Quit: Leaving]
Umren has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
bluOxigen has quit [Ping timeout: 260 seconds]
<altker128> apeiros: Ok, looking at the format of the Gemfile , I understand what you mean. But once I add thin , and launch it via
_Drewch has joined #ruby
<apeiros> altker128: correct
brianpWins has quit [Quit: brianpWins]
<altker128> "bundle exec rails server -e production" evreything will work?
<apeiros> yes
<apeiros> should, at least :)
<altker128> OK. Let me give it a shot :)
<_Drewch> Can you overload Hash's => operator, or add another operator that acts in the same way as =>
<apeiros> _Drewch: no
freerobby has quit [Quit: Leaving.]
bonhoeffer has quit [Quit: bonhoeffer]
<_Drewch> Bummer, thanks
<apeiros> that's syntax. you can't change syntax without changing the ruby executable itself (i.e. change parse.y and whatnot and recompile)
indyrl has quit [Read error: Connection reset by peer]
<codezombie> apeiros: maybe my full example would help. https://gist.github.com/gitt/1bd2f688b0534b133947 - If there are more elements in @target_list, then columns, I'd ultimately like to still hadd them to the hash with the lists key.
<_Drewch> yeah that's what I figured but ruby has surprised me before
chessguy has quit [Remote host closed the connection]
<apeiros> codezombie: the desired result of such a modified zip would be better. as that would show how you'd like it preserved.
zackiv31 has joined #ruby
kirun has quit [Quit: Client exiting]
<apeiros> _Drewch: sure, and asking doesn't hurt :)
tyl has joined #ruby
tealmage has joined #ruby
<_Drewch> apeiros Cheers! Thanks for the reply.
<apeiros> *sob*
arya has joined #ruby
<apeiros> codezombie: ["a","b"].zip(["c","d","e"]) should result in *what*?
<altker128> apeiros: You rock! Thanks so much. It is noticably faster!
<apeiros> altker128: cool :)
<codezombie> apeiros: updated with comments, and more examples: https://gist.github.com/gitt/1bd2f688b0534b133947
<apeiros> altker128: if you installed ruby via rvm, you might also enjoy reinstalling ruby with the `--patch railsexpress` option
marr has joined #ruby
huoxito has quit [Quit: Leaving]
<altker128> apeiros: I'm on FreeBSD and compiled it from the ports/src
<altker128> apeiros: But, if I may ask, what does railsexpress do?
<apeiros> it applies a couple of patches which further improve performance
Guest70364 has joined #ruby
tealmage has quit [Ping timeout: 264 seconds]
v0n has joined #ruby
<altker128> apeiros: I'll look into it, thank you :)
<apeiros> I wouldn't spend too much time. it's maybe 10-20%
fixl has joined #ruby
<altker128> apeiros: You might find this interesting, but in the log, the webbricks shows lower time than thin. But who knows.
eka has quit [Quit: Computer has gone to sleep.]
Guest70364 has quit [Client Quit]
pilgo has joined #ruby
<zackiv31> can anyone help with this simple fsevent watcher under ubuntu? https://gist.github.com/zivester/5519099
<altker128> apeiros: But I think that's client-side delays (slower desktop). Anyway, thank you again. I'll keep using thin, this is great!
cofin has quit [Quit: cofin]
<pilgo> Hi all. I'm trying to learn Ruby using koans. I'm getting this error, though: <KeyError> exception expected but was Class: <IndexError> Message: <"key not found"> ---Backtrace--- ./about_hashes.rb:27:in `fetch' ./about_hashes.rb:27:in `test_accessing_hashes_with_fetch' ---------------
slyv has quit [Quit: Textual IRC Client: www.textualapp.com]
<pilgo> I looked up both exceptions and neither mention in what version of ruby they were added. How is that type of thing documented in ruby?
Astral_ has joined #ruby
Astralum has quit [Ping timeout: 268 seconds]
Palantir has quit [Ping timeout: 276 seconds]
brianherman has joined #ruby
joofsh has quit [Remote host closed the connection]
TheFuzzball has joined #ruby
newTech has joined #ruby
moos3 has joined #ruby
vlad_starkov has joined #ruby
TheFuzzball has quit [Client Quit]
<Spooner> pilgo, Can you link the koan?
tylersmith has joined #ruby
<pilgo> Spooner: Not sure how to do that since I downloaded it
slyv has joined #ruby
bonhoeffer has joined #ruby
<Spooner> pilgo, I'm guessing it is on here: http://koans.heroku.com/about_hashes
<pilgo> Spooner: That seems different. I don't see test_accessing_hashes_with_fetch
Palantir has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
altker128 has left #ruby ["Konversation terminated!"]
arya has quit [Ping timeout: 248 seconds]
marr has quit [Ping timeout: 264 seconds]
Xeago has quit [Remote host closed the connection]
tylersmith has quit [Ping timeout: 252 seconds]
_br_ has quit [Ping timeout: 260 seconds]
<Spooner> pilgo, I worked out the problem. In 1.8.7 (which is what the Koans are run in), a bad fetch raises an IndexError, but in 1.9+, it raises a KeyError
<pilgo> Right, that's dandy.
<pilgo> However, how do I find that discrepancy in the docs?
<pilgo> BTW, my local ruby is ruby 1.8.7
postmodern has joined #ruby
<Spooner> Oh well, it is the other way around then (Koans are expecting 1.9, but you are answering for 1.8).
<pilgo> Spooner: Mind you, I've shared my koans on dropbox and access them from multiple machines (which could have different ruby versions)
F1skr has quit [Read error: Operation timed out]
<Spooner> I'm not sure where the difference is documented.
marr has joined #ruby
<pilgo> :(
freerobby has joined #ruby
davout has quit [Remote host closed the connection]
Guest36627 has quit [Ping timeout: 258 seconds]
<Spooner> 1.8.7 is about to hit end of life though, so needn't worry too much!
bjensen has quit [Quit: bjensen]
teclator has quit [Ping timeout: 256 seconds]
rickmasta has quit [Quit: Leaving...]
predator117 has joined #ruby
digifiv5e has joined #ruby
Palantir has quit [Ping timeout: 256 seconds]
jonathanwallace has joined #ruby
digifiv5e is now known as Guest32784
<pilgo> Spooner: Well, just thinking about the general docs. In python docs, it's clearly stated what version a function is obsolete or new, etc.
wargasm has quit [Read error: Connection reset by peer]
<pilgo> Just trying to find that in ruby docs, I guess
Elico has joined #ruby
it_tard has quit [Quit: yawn]
<Spooner> Yeah, it is pretty crappy that we don't have a "version added in" in our docs.
moos3 has quit [Quit: Computer has gone to sleep.]
predator217 has quit [Ping timeout: 248 seconds]
mklappstuhl has quit [Remote host closed the connection]
freerobby has quit [Ping timeout: 248 seconds]
<apeiros> pilgo: might be in the changelog
<apeiros> I'd search for "Hash#fetch", if that doesn't yield anything, then just "fetch", and last just "Hash"
<apeiros> and/or search for "IndexError" and "KeyError"
<pilgo> The only place i found version was in the URL and the main header
mercwithamouth has quit [Ping timeout: 256 seconds]
brianherman has quit [Read error: Connection reset by peer]
brianherman has joined #ruby
arya has joined #ruby
slyv has quit [Quit: Textual IRC Client: www.textualapp.com]
jonathanwallace has quit [Ping timeout: 252 seconds]
arya has quit [Ping timeout: 268 seconds]
pskosinski has quit [Ping timeout: 268 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
Tobiaschib has quit [Ping timeout: 245 seconds]
arya has joined #ruby
Heero has joined #ruby
Heero has quit [Changing host]
Heero has joined #ruby
OperatorJL has quit [Quit: Lost terminal]
v0n has quit [Read error: Operation timed out]
skogis has quit [Read error: Operation timed out]
moos3 has joined #ruby
marr has quit [Ping timeout: 252 seconds]
skogis has joined #ruby
arya has quit [Ping timeout: 260 seconds]