apeiros changed the topic of #ruby to: Ruby 2.0.0-p353: http://ruby-lang.org (Ruby 1.9.3-p484) || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
ctsimpson has quit []
orionstein is now known as orionstein_away
xcv has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
aryaching has joined #ruby
xcv has joined #ruby
CorySimmons has joined #ruby
momomomomo has quit [Quit: momomomomo]
sensen has joined #ruby
asteros has quit [Quit: asteros]
relix has joined #ruby
xcv has quit [Ping timeout: 241 seconds]
almarshall has joined #ruby
CorySimmons has quit [Ping timeout: 272 seconds]
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
olivier_bK has quit [Ping timeout: 252 seconds]
sensen has quit [Quit: leaving]
vpretzel has quit [Quit: Adios!]
tanema has joined #ruby
pragmatism has quit [Ping timeout: 272 seconds]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
blackxored has quit [Ping timeout: 240 seconds]
Naoe-Kanno has quit [Quit: ネウロイを負かさなきゃならないね]
almarshall has quit [Quit: almarshall]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
mary5030 has joined #ruby
<ua> i have this idea on how to enrich ruby ecosystem in non-web related areas
pragmatism has joined #ruby
bklane has quit [Read error: Connection reset by peer]
kcombs has joined #ruby
<ua> so there would be translation of python and C with python internals to ruby and C with ruby internals
<ua> lol
<ua> so after writing something like this, ruby magically has access to every library that python has
<ua> and then we eat the world
Jetchisel has joined #ruby
mojjojo has joined #ruby
mklappstuhl has joined #ruby
Atrophius has joined #ruby
jfelchner has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
mikepack_ has joined #ruby
mikepack_ has quit [Remote host closed the connection]
<DouweM> ua: it's not like there's a shortage of Ruby libraries
mary5030 has quit [Ping timeout: 252 seconds]
yuri_niyazov has joined #ruby
nateberkopec has quit [Quit: Leaving...]
bklane has joined #ruby
mklappstuhl has quit [Read error: Connection reset by peer]
mklappstuhl has joined #ruby
bklane has quit [Remote host closed the connection]
<yuri_niyazov> in ruby 2.0 with native Linux threads, how can I define which threads receive signals? In a C program I would use pthread_sigmask. Is that exposed in any way via Ruby?
jkhwan has quit [Read error: Connection reset by peer]
jkhwan has joined #ruby
mikepack has quit [Ping timeout: 245 seconds]
Aryasam has joined #ruby
aryaching has quit []
jamesaanderson has joined #ruby
Deele has quit [Ping timeout: 260 seconds]
<ua> DouweM, yea ok buts most of it is web related, and python has so many different well-developed libraries for various scientific fields
<ua> opencv, scikit-learn, pandas, numpy, scipy, mlpy, networkX, matplotlib
<yuri_niyazov> ?
<ua> its just killing me
<ua> sympy
mklappstuhl has quit [Ping timeout: 245 seconds]
<ua> yuri_niyazov, sorry i have no idea but just dont leave, someone will most prolly answer you at some point :P
<DouweM> ua: "most of it is web related", I'm not so sure. But otherwise, yeah, Python has a lot of scientific libs that would be nice to have. But I very much doubt building a Ruby/Python bridge would yield something you'd want to use. Have you seen: http://rubypython.rubyforge.org/
blaskovicz has quit [Quit: Leaving.]
danman has joined #ruby
asteros has joined #ruby
<ua> yea i did used it for kinda heavy data processing
danman has quit [Client Quit]
<ua> worked 1 every 3 times or so
einarj has joined #ruby
lucazi has quit [Quit: Textual IRC Client: www.textualapp.com]
jkhwan has quit [Remote host closed the connection]
<ua> reference counting blew up at some point
<h0rrorvacui> ua why not use the c libraries with ffi?
jkhwan has joined #ruby
ahawkins has quit [Ping timeout: 250 seconds]
jkhwan has quit [Read error: Connection reset by peer]
jkhwan has joined #ruby
<h0rrorvacui> ua you mentioned opencv here is an example of using it and ffi in ruby. http://www.sitepoint.com/detecting-faces-with-ruby-ffi-in-a-nutshell/
yfeldblu_ has quit [Remote host closed the connection]
<bnagy> yuri_niyazov: far as I know you can't
<bnagy> for MRI there's only one ruby thread running at a time anyway
<bnagy> but afaik signal handlers are global
<bnagy> don't know about rubinius
almarshall has joined #ruby
mmcdaris has joined #ruby
cpruitt has joined #ruby
tris has joined #ruby
einarj has quit [Ping timeout: 260 seconds]
jfelchner has quit [Ping timeout: 245 seconds]
predator217 has quit [Ping timeout: 240 seconds]
Beoran_ has joined #ruby
freerobby has joined #ruby
bklane has joined #ruby
predator117 has joined #ruby
nhhagen has quit []
jkhwan has quit [Remote host closed the connection]
Beoran__ has quit [Ping timeout: 246 seconds]
jkhwan has joined #ruby
s2013 has joined #ruby
h0rrorvacui has quit [Ping timeout: 250 seconds]
xcv has joined #ruby
jfelchner has joined #ruby
h0rrorvacui has joined #ruby
i8igmac has joined #ruby
pu22l3r has joined #ruby
hogeo has joined #ruby
jkhwan has quit [Ping timeout: 272 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Seich_ has quit [Quit: Computer has gone to sleep.]
athst has quit [Quit: athst]
bentonrr has quit [Remote host closed the connection]
juancate has quit [Quit: leaving]
vlad_starkov has joined #ruby
xcv has quit [Remote host closed the connection]
xcv has joined #ruby
jkline has quit [Quit: jkline]
mklappstuhl has joined #ruby
Megtastique has quit []
hadees has quit [Quit: hadees]
vlad_starkov has quit [Read error: Connection reset by peer]
wildroman2 has quit [Remote host closed the connection]
mmcdaris has quit [Quit: mmcdaris]
xcv has quit [Ping timeout: 240 seconds]
s2013 has quit [Remote host closed the connection]
jkline has joined #ruby
mjs2600 has joined #ruby
mklappstuhl has quit [Ping timeout: 246 seconds]
nari has joined #ruby
pragmatism has quit [Quit: Leaving...]
axl_ has quit [Quit: axl_]
pragmatism has joined #ruby
Reach has quit [Remote host closed the connection]
pragmatism has quit [Remote host closed the connection]
pragmatism has joined #ruby
Seich_ has joined #ruby
jkhwan has joined #ruby
b00stfr3ak has quit [Ping timeout: 260 seconds]
Aryasam has quit [Ping timeout: 245 seconds]
macmartine has quit [Remote host closed the connection]
Opettaja has joined #ruby
tkuchiki has joined #ruby
Aryasam has joined #ruby
sevenseacat has joined #ruby
mojjojo has quit [Quit: mojjojo]
robustus|Off has quit [Ping timeout: 264 seconds]
ukd1 has joined #ruby
saarinen has quit [Quit: saarinen]
thesheff17 has joined #ruby
mmcdaris has joined #ruby
Xeago has joined #ruby
aryaching has joined #ruby
Aryasam has quit [Client Quit]
sambao21 has quit [Quit: Computer has gone to sleep.]
CorySimmons has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
robustus has joined #ruby
cpruitt has quit [Quit: cpruitt]
hadees has joined #ruby
baroquebobcat has joined #ruby
ewnd9 has joined #ruby
Xeago has quit [Ping timeout: 246 seconds]
Bira has joined #ruby
sambao21 has joined #ruby
subbyyy_ has quit [Ping timeout: 240 seconds]
nateberkopec has joined #ruby
duggiefresh has quit [Remote host closed the connection]
CorySimmons has quit [Ping timeout: 245 seconds]
spergy has joined #ruby
tylersmith has quit [Remote host closed the connection]
mojjojo has joined #ruby
mvangala_ has joined #ruby
mvangala has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
juancate has joined #ruby
<bahar_> hey, i'm looking for some help with basic ruby... i'm learning and got stuck =~/
zz_N00D is now known as CripperZ
mklappstuhl has joined #ruby
AntelopeSalad has quit [Read error: Connection reset by peer]
lukec has quit [Quit: lukec]
Pixi__ has joined #ruby
AntelopeSalad has joined #ruby
mjs2600 has quit [Remote host closed the connection]
Tyrel has joined #ruby
spike|spiegel has quit [Ping timeout: 246 seconds]
lfox has quit [Quit: ZZZzzz…]
hadees has quit [Quit: hadees]
<DanBoy> can you gist your code bahar_?
Xiti` has quit [Ping timeout: 265 seconds]
yuri_niyazov has quit [Quit: yuri_niyazov]
mklappstuhl has quit [Ping timeout: 250 seconds]
lmickh has quit [Quit: lmickh]
mercwithamouth has quit [Ping timeout: 272 seconds]
<bahar_> see the minutes_to_degrees lines... none of them work (i tried them individually, they all produce error: "undefined method: minutes_to_degrees"
brum has joined #ruby
almarshall has quit [Quit: almarshall]
ravster has quit [Quit: Leaving.]
<bahar_> puts "hour as degrees equals", hour.to_i * 30 clearly works, but the result isn't saved, and that's what i'm trying to do with minutes_to_degrees
mdel has quit [Ping timeout: 250 seconds]
<bnagy> that's because you haven't written the minutes_to_degrees method
almarshall has joined #ruby
<bnagy> add def minutes_to_degrees minute_str; # YOUR CODE HERE; end
<bnagy> but with newlines etc instead of semicolons
<DanBoy> ya
sambao21 has quit [Quit: Computer has gone to sleep.]
<DanBoy> where did you define minutes_to_degrees
<DanBoy> if its another file you need to require file.rb
maletor has quit [Quit: Computer has gone to sleep.]
<bahar_> hm, i thought i could do variable { block to set variable value }
mojjojo has quit [Quit: mojjojo]
<DanBoy> you could
marr has quit [Ping timeout: 252 seconds]
mjs2600 has joined #ruby
<bahar_> what did i do wrong?
zeade has quit [Quit: Leaving.]
<bahar_> thanks for the sugg, bnagy! what is minute_str?
<DanBoy> if you want to save hour.to_i * 30 you need to assign it to a variable or
<DanBoy> hour = hour.to_I * 30
<DanBoy> *to_i
<DanBoy> something like that
ewnd9 has quit [Ping timeout: 260 seconds]
randomnick_ has quit [Quit: Leaving]
kreisys has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
<bnagy> bahar_: in this case it's the name of the argument you pass to your method
nari has quit [Ping timeout: 240 seconds]
tsykoduk is now known as zz_tsykoduk
Megtastique has joined #ruby
<bahar_> bnagy: thanks i'll have to look up what it goes
ephemerian has quit [Quit: Leaving.]
ping_pong is now known as ping-pong
mojjojo has joined #ruby
<bahar_> DanBoy: hour = hour.to_i * 30 works but minutes.to_i / 2 returns an error, "undefined method '/'"
wildroman2 has joined #ruby
almarshall has quit [Quit: almarshall]
<DanBoy> minutes_to_degrees(minutes.to_i / 2)
thomasvs has quit [Read error: Operation timed out]
SirFunk has quit [Read error: Operation timed out]
gf3 has quit [Read error: Operation timed out]
hogeo has quit [Remote host closed the connection]
falood has joined #ruby
<DanBoy> i think i can see what your trying to do but try and just define minutes_to_degrees
gf3 has joined #ruby
<DanBoy> then pass your blocks to it
bklane has quit [Remote host closed the connection]
thomasvs has joined #ruby
thomasvs has quit [Changing host]
thomasvs has joined #ruby
spike|spiegel has joined #ruby
yeboot has quit [Ping timeout: 265 seconds]
yeboot has joined #ruby
brianpWins has quit [Quit: brianpWins]
tvw has quit []
bklane_ has joined #ruby
hogeo has joined #ruby
SirFunk has joined #ruby
<bahar_> trying that...
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jlast has quit [Remote host closed the connection]
<bahar_> ok it's telling me now that i have an undefined local variable or method 'minutes'
<bahar_> but it's supposed to be the value I entered, so isn't it defined?
<DanBoy> gist it all again
fedesilva has joined #ruby
CripperZ is now known as N00D
mercwithamouth has joined #ruby
akonny has quit [Quit: akonny]
mmcdaris_ has joined #ruby
mmcdaris has quit [Ping timeout: 260 seconds]
mmcdaris_ is now known as mmcdaris
<DanBoy> your not passing any arguments to your functions
<DanBoy> methods i mean
baroquebobcat has quit [Quit: baroquebobcat]
mojjojo has quit [Quit: mojjojo]
<DanBoy> and your not defining the variables your using
<bahar_> i thought hour = gets.chomp would define the variable hour
<DanBoy> not in the method's scope
<DanBoy> it doesn't see it
<bahar_> so i need to make it a global variable?
<DanBoy> you need to pass it in
<DanBoy> no
codeFiend has joined #ruby
hogeo has quit [Remote host closed the connection]
<DanBoy> just define hours_to_degrees like hours_to_degrees(hour)
<DanBoy> then call it like hours_to_degrees(hour)
hogeo has joined #ruby
<DanBoy> you have to call your methods for them to run
mklappstuhl has joined #ruby
<bahar_> back to the drawing board
<bahar_> i'm really new, can you tell?
<DanBoy> just chill its easy
<bahar_> 85% through codeacademy and i thought i'd take her for a spin, see what i got
Scarberian has joined #ruby
<DanBoy> codeacademy is something you paid for?
<bnagy> you can get 85% through codeacademy and not write methods?
<sevenseacat> ouch
Avahey has joined #ruby
<DanBoy> whats codeacademy
<DanBoy> like can see from the name
<DanBoy> but do you pay for it
clevermatt has joined #ruby
lmickh has joined #ruby
<bahar_> no, it's a free online course: http://www.codecademy.com/tracks/ruby
<bahar_> i went through the methods section, but i guess i didn't really grasp it
<DanBoy> you're better off with a good book dude in my humble opinion
pu22l3r has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<bahar_> can you recommend one? i went through Why's Guide but it was a mess... hearing good things about Eloquent Ruby or the Pickaxe book
dhruvasagar has joined #ruby
pu22l3r has joined #ruby
<DanBoy> dont start with pickaxe
mklappstuhl has quit [Ping timeout: 264 seconds]
<DanBoy> or eloquent ruby
<bnagy> learn ruby the hard way is OK for starting from absolute zero
<bnagy> the ruby style is not all that great, but style is just style
<DanBoy> i've heard good things from "Learn to Program"
baroquebobcat has joined #ruby
<DanBoy> or Learning to Program
i8igmac has quit [Quit: Leaving]
<sevenseacat> so have i
<sevenseacat> @ 'learn to program'
ehc has quit [Quit: ehc]
<DanBoy> i dunno i don't remember if i read any of the beginning ruby books
eka has quit [Quit: Computer has gone to sleep.]
<DanBoy> but learn to program looks good for you
vlad_starkov has quit [Read error: Connection reset by peer]
ehc has joined #ruby
Hanmac1 has joined #ruby
mmcdaris has quit [Quit: mmcdaris]
Hanmac has quit [Ping timeout: 246 seconds]
<bahar_> anyone done the Ruby Koans?
pu22l3r_ has joined #ruby
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
CorySimmons has joined #ruby
hogeo has quit [Remote host closed the connection]
Seich_ has quit [Quit: Computer has gone to sleep.]
Seich_ has joined #ruby
<DanBoy> not me
xk_id has quit [Quit:
pu22l3r has quit [Ping timeout: 245 seconds]
asteros has quit [Quit: asteros]
nari has joined #ruby
bentonrr has joined #ruby
CorySimmons has quit [Ping timeout: 260 seconds]
hogeo has joined #ruby
rjhunter has joined #ruby
Seich_ has quit [Ping timeout: 250 seconds]
Scarberian has quit [Ping timeout: 245 seconds]
wildroman2 has quit [Remote host closed the connection]
ckinni has joined #ruby
fedesilva has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<DanBoy> i dunno koans looks like its starting with TDD, just get "Learn to Program"
<DanBoy> its short
<DanBoy> has great reviews
thesheff17 has quit [Read error: Connection reset by peer]
iliketur_ has quit [Quit: zzzzz…..]
michael_lee has joined #ruby
bentonrr has quit [Ping timeout: 272 seconds]
raphaelivan has joined #ruby
Seich_ has joined #ruby
iliketur_ has joined #ruby
acoyfellow has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 272 seconds]
ukd1 has quit [Ping timeout: 252 seconds]
Liothen has joined #ruby
yfeldblum has joined #ruby
banister has joined #ruby
mklappstuhl has joined #ruby
<bahar_> baby steps!
Bira has quit [Remote host closed the connection]
araujo has quit [Read error: Connection reset by peer]
fedesilva has joined #ruby
araujo has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
Davey is now known as Eomar
mmcdaris has joined #ruby
mklappstuhl has quit [Ping timeout: 246 seconds]
asteros has joined #ruby
g0bl1n has quit [Quit: Ex-Chat]
<DanBoy> yup
Seich_ has quit [Ping timeout: 240 seconds]
vikhyat has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
Hanmac has joined #ruby
hogeo has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 246 seconds]
Dan has joined #ruby
Briareos1 has quit [Remote host closed the connection]
Dan has quit [Client Quit]
b00stfr3ak has joined #ruby
Hanmac1 has quit [Ping timeout: 260 seconds]
Voodoofish430 has quit [Quit: Leaving.]
qz_ is now known as qz
qz has quit [Changing host]
qz has joined #ruby
asteros has quit [Ping timeout: 260 seconds]
Seich_ has joined #ruby
pragmatism has quit [Ping timeout: 252 seconds]
spergy has quit [Ping timeout: 240 seconds]
tanema has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
tanema has joined #ruby
macmartine has joined #ruby
Atrophius has quit [Ping timeout: 264 seconds]
macmartine has quit [Remote host closed the connection]
aryaching has quit []
spergy has joined #ruby
danshultz has joined #ruby
<bahar_> thanks for the feedback/help...
tanema has quit [Ping timeout: 260 seconds]
<bahar_> DanBoy, bnagy
<bnagy> bahar_: if you're going to use parens ( which imho you shouldn't ) they should immediately follow the method name
saarinen has joined #ruby
soba has joined #ruby
<bnagy> time_in_degrees( hour, minutes ) OR time_in_degrees hour, minutes
mjs2600 has quit [Remote host closed the connection]
<bnagy> also having the puts inside that method is not the best style
nateberkopec has joined #ruby
<bnagy> it's what we call coupling - the method can only output. Which is fine now, but later you might want the same conversion but for a different reason
<bahar_> yeah, i would rather do the puts outside the method, also
<bahar_> but i have to figure out how
hogeo has joined #ruby
<bnagy> my advice is to make two methods, one for hours and one for minutes
<bahar_> you said you wouldn't use parens? how would you do it w/o parens?
blandflakes has quit [Quit: Page closed]
<bnagy> time_in_degrees hour, minutes
nateberkopec has quit [Client Quit]
<bnagy> then use something like min_degrees = mins_to_degrees( minutes )
<bahar_> interesting... it works but RubyMine hates it
<bnagy> then puts min_degrees
<bnagy> then whatever RubyMine is is retarded
mjs2600 has joined #ruby
<bahar_> heh
clevermatt has quit [Remote host closed the connection]
<DanBoy> lol
sensen has joined #ruby
kobain has quit [Ping timeout: 252 seconds]
jkline has quit [Quit: jkline]
<Scient> someone should slap you for the silly foo( bar ) convention :P
<bahar_> lol... it's in the materials i'm learning from
<bahar_> :-/
pragmatism has joined #ruby
pragmatism has quit [Excess Flood]
pragmatism has joined #ruby
<bahar_> what does it mean when I get "stack level too deep (SystemStackError)"
aryaching has joined #ruby
<Scient> endless loop
<Scient> usually by recursion
<bnagy> you probably called a method from within itself
hogeo has quit [Remote host closed the connection]
Seich_ has quit [Ping timeout: 272 seconds]
<bnagy> it has 0 to do with 'endless' or loops
saarinen has quit [Quit: saarinen]
<Scient> recursion is a loop
<bahar_> i made an infinity mirror?
<bnagy> there are plenty of legit recursions that will blow up the stack
<Scient> and endless recursion is a endless loop
<Scient> stop being a douche while trying to look smart
ewnd9 has joined #ruby
mercwithamouth has quit [Ping timeout: 250 seconds]
varfoo has joined #ruby
jfelchner has quit [Quit: jfelchner]
Hanmac1 has joined #ruby
Seich_ has joined #ruby
codeFiend has quit [Quit: codeFiend]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hanmac has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby
jkhwan has quit [Remote host closed the connection]
pragmatism has quit [Quit: Leaving...]
<bnagy> bahar_: l9 in your gist - you called the method from inside itself
jkhwan has joined #ruby
<bahar_> ok so that's a no no, can't refer to the method or use it in any way while i'm actually in the method?
ehc has quit [Quit: ehc]
<bnagy> yes, you can, and there's a whole programming technique based on that
<bnagy> but for now, best not
vlad_starkov has joined #ruby
jkhwan has quit [Read error: Connection reset by peer]
<bahar_> got it
lfox has joined #ruby
jkhwan has joined #ruby
<DanBoy> don't worry about it
<DanBoy> just get that book if you can
_maes_ has joined #ruby
hogeo has joined #ruby
<bahar_> definitely will
aryaching has quit []
<bahar_> it's a little old though, April 2009, still relevant?
<DanBoy> ya
<DanBoy> its fine
<bahar_> ok
vlad_starkov has quit [Read error: Connection reset by peer]
mando has joined #ruby
<DanBoy> as long as the ruby it uses is 1.9 at least
<DanBoy> honestly for you it doesn't matter
<DanBoy> it could be 1.8
Seich_ has quit [Quit: Computer has gone to sleep.]
<bahar_> "the fourth printing of the Learn to Program, 2nd edition has been updated for Ruby 2.0"
<bahar_> cool
baroquebobcat has quit [Quit: baroquebobcat]
<sevenseacat> nice
browndawg has joined #ruby
ewnd9 has quit [Read error: Connection reset by peer]
CorySimmons has joined #ruby
mklappstuhl has joined #ruby
otherj has joined #ruby
otherj has quit [Client Quit]
kevind has quit [Quit: kevind]
Jdubs has quit [Read error: Connection reset by peer]
hogeo has quit [Remote host closed the connection]
Jdubs has joined #ruby
Mars__ has quit [Remote host closed the connection]
Mars has joined #ruby
TigerWolf has joined #ruby
Mars is now known as Guest54224
kobain has joined #ruby
CorySimmons has quit [Ping timeout: 252 seconds]
Jdubs has quit [Read error: Connection reset by peer]
kevinykchan has joined #ruby
Jdubs_ has joined #ruby
mklappstuhl has quit [Ping timeout: 240 seconds]
aryaching has joined #ruby
IceDragon has quit [Ping timeout: 272 seconds]
Opettaja has quit [Quit: WeeChat 0.4.2]
IceDragon has joined #ruby
fedesilva has quit [Remote host closed the connection]
Opettaja has joined #ruby
Guest54224 has quit [Ping timeout: 260 seconds]
phipes has joined #ruby
colonolGron has quit [Quit: Lost terminal]
dhruvasagar has quit [Ping timeout: 272 seconds]
hogeo has joined #ruby
phipes has quit [Client Quit]
spergy has quit [Ping timeout: 245 seconds]
bentonrr has joined #ruby
phipes has joined #ruby
phipes has quit [Changing host]
phipes has joined #ruby
phipes has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
phipes has joined #ruby
hogeo has quit [Remote host closed the connection]
ambushsabre has quit [Ping timeout: 264 seconds]
spergy has joined #ruby
phipes has quit [Remote host closed the connection]
tanema has joined #ruby
phipes has joined #ruby
ambushsabre has joined #ruby
hogeo has joined #ruby
petey has joined #ruby
Megtastique has quit []
phipes has quit [Client Quit]
phipes has joined #ruby
phipes has quit [Client Quit]
phipes has joined #ruby
radic has quit [Read error: Operation timed out]
spergy has quit [Ping timeout: 260 seconds]
nisstyre has quit [Remote host closed the connection]
mjs2600 has quit [Remote host closed the connection]
Shidash has quit [Quit: Leaving.]
Shidash1 has joined #ruby
phipes has quit [Client Quit]
phipes has joined #ruby
Arzaga has joined #ruby
cannonball has quit [Quit: Leaving]
nixie has joined #ruby
phipes has quit [Client Quit]
Arzaga has quit [Client Quit]
phipes has joined #ruby
freerobby has quit [Quit: Leaving.]
mary5030 has joined #ruby
mmitchell has joined #ruby
spergy has joined #ruby
Shidash1 has quit [Quit: Leaving.]
Shidash has joined #ruby
amoli has quit [Ping timeout: 246 seconds]
mklappstuhl has joined #ruby
kobain has quit []
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby
radic has joined #ruby
petey_ has joined #ruby
petey has quit [Read error: Connection reset by peer]
mklappstuhl has quit [Ping timeout: 250 seconds]
hadees has joined #ruby
hadees has quit [Client Quit]
phantasm66 has joined #ruby
phantasm66 has quit [Client Quit]
jamesaanderson has joined #ruby
hadees has joined #ruby
mmitchell has quit []
digital-ghost has quit [Remote host closed the connection]
jamesaanderson has quit [Client Quit]
reset has quit [Ping timeout: 240 seconds]
asteros has joined #ruby
raphaelivan has quit [Quit: Leaving.]
IceDragon has quit [Quit: Space~~~]
hiyosi has quit [Ping timeout: 272 seconds]
dhruvasagar has joined #ruby
spergy has left #ruby [#ruby]
nixie has quit [Read error: Connection reset by peer]
nixie has joined #ruby
julweber has joined #ruby
mmcdaris has quit [Quit: mmcdaris]
julweber_ has quit [Ping timeout: 240 seconds]
jamesaanderson has joined #ruby
freerobby has joined #ruby
macmartine has joined #ruby
Hanmac has joined #ruby
Eomar is now known as Davey
Monie has joined #ruby
Monie has quit [Max SendQ exceeded]
Monie has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
almarshall has joined #ruby
Hanmac1 has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby
iliketur_ has quit [Quit: zzzzz…..]
mklappstuhl has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hogeo has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
|jemc| has joined #ruby
danshultz has quit [Remote host closed the connection]
shadoi has quit [Quit: Leaving.]
<|jemc|> anybody know a way to trace all of the mri c-api calls made in evaluation of a particular snippet?
danshultz has joined #ruby
Opettaja has quit [Ping timeout: 246 seconds]
jkline has joined #ruby
pu22l3r has joined #ruby
<|jemc|> using Tracer doesn't actually show c method names in any detail - it just lets you know that a particular line invoked a c method of some kind
ner0x has quit [Quit: Leaving]
mklappstuhl has quit [Ping timeout: 260 seconds]
asteros has quit [Quit: asteros]
CorySimmons has joined #ruby
<rjhunter> |jemc|: On Linux, `ltrace` might help
<mr`spock> What's the most used programming language?
<mr`spock> A: Profanity
<sevenseacat> lol
<sevenseacat> nice
danshultz has quit [Ping timeout: 264 seconds]
katherinem13 has quit [Quit: leaving]
katherinem13 has joined #ruby
CorySimmons has quit [Ping timeout: 250 seconds]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
phipes has quit [Remote host closed the connection]
macmartine has quit [Remote host closed the connection]
<rjhunter> |jemc|: what are you trying to do? sounds interesting
freerobby has quit [Quit: Leaving.]
_maes_ has joined #ruby
<|jemc|> trying to do some evil dastardly magic :P
zeade has joined #ruby
<|jemc|> I'm trying to figure out the process of what happens for a simple assignment expression
mando has quit [Remote host closed the connection]
freerobby has joined #ruby
freerobby has quit [Client Quit]
<|jemc|> and evaluate the feasiblity of some dastardly c extension that hooks into the assignment operator
zeade has quit [Client Quit]
phipes has joined #ruby
<|jemc|> to provide some form of notifications to a registry when a variable is altered
<|jemc|> I'm trying to go beyond what can be done with ruby-level accessor hooks
freerobby has joined #ruby
<|jemc|> mostly for the fun of the exploration
johnnyfuchs has joined #ruby
<rjhunter> |jemc|: wow, that does sound dastardly (but very interesting). you might find Rubinius an easier interpreter to start with -- the implementations are structurally pretty similar but easier to follow since it's (almost) all ruby
braincrash has quit [Quit: bye bye]
<|jemc|> yeah, in parallel I've been researching how it might be done in rubinius
<|jemc|> rbx seems to provide a way to hook in your own arbitrary ast transforms post-parser
<|jemc|> which is really cool
<rjhunter> *super* cool
<|jemc|> heh. heh
<|jemc|> I do love a good pun
bentonrr has quit [Remote host closed the connection]
psyl0n has quit [Remote host closed the connection]
<rjhunter> i wasn't aiming for a pun but i'll take it :-)
braincrash has joined #ruby
<|jemc|> ltrace isn't showing enough... I may have to pull out gdb and see what can be done there
estebistec has joined #ruby
hamakn has joined #ruby
<|jemc|> or maybe ltrace isn't picking it up because it happens in a sub thread...
jkhwan has quit [Remote host closed the connection]
<rjhunter> |jemc|: you can tell ltrace to follow forks and threads, I believe (probably -f)
<rjhunter> |jemc|: you can with strace, anyway
jkhwan has joined #ruby
<|jemc|> didn't provide any more lines of output :/
estebistec has quit [Remote host closed the connection]
jkhwan has quit [Read error: Connection reset by peer]
jkhwan_ has joined #ruby
jkline_ has joined #ruby
bentonrr has joined #ruby
jkline has quit [Ping timeout: 250 seconds]
jkline_ is now known as jkline
alvaro_o_ has quit [Quit: Ex-Chat]
mklappstuhl has joined #ruby
<rjhunter> but it may also be the case that the bytecode doesn't result in any library function call
<|jemc|> yeah, I think that they're not _library_ calls
bkparso has joined #ruby
<|jemc|> just internal c calls
<rjhunter> you're probably right about it being time to break out the debugger
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<|jemc|> yeah, I've been able to stop on a few breakpoints so far
<|jemc|> just need to figure out what breakpoints to set...
heidi has quit [Quit: Leaving.]
<rjhunter> i've said before that debuggers are like fire extinguishers -- you hope to never need them, but if you ever do need one it's a lifesaver
<|jemc|> yeah, I've always enjoyed my time spent with gdb more than I expect to :)
b00stfr3ak has quit [Ping timeout: 252 seconds]
jamesaanderson has joined #ruby
mklappstuhl has quit [Ping timeout: 260 seconds]
<rjhunter> I'm browsing through the MRI source and the bytecode instruction "setlocal" (defined in ruby/insns.def) seems to be the local variable assignment
gianlucadv has joined #ruby
<|jemc|> ah yes, forgot it would be vm bytecode and not necessarily supported by any c function call
<|jemc|> hm
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rjhunter> ast transforms are looking more and more appealing :-)
macmartine has joined #ruby
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
jkhwan_ has quit [Remote host closed the connection]
jkhwan has joined #ruby
<h0rrorvacui> |jemc| all this to hook variable assignment?
<h0rrorvacui> lol
<h0rrorvacui> Sounds like a true hacker
ckinni has joined #ruby
<|jemc|> its all for the thrill of the chase
dseitz has joined #ruby
kh019267 has joined #ruby
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
phipes has quit [Remote host closed the connection]
uxp_ has quit [Quit: Lost terminal]
uxp has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
pu22l3r has quit [Remote host closed the connection]
bklane_ has quit [Quit: Leaving...]
almarshall has quit [Quit: almarshall]
jkline has quit [Quit: jkline]
kizzx2 has joined #ruby
hiyosi has joined #ruby
Hanmac1 has joined #ruby
kizzx2 has quit [Client Quit]
euclides has joined #ruby
kizzx2 has joined #ruby
iliketur_ has joined #ruby
ElasticElephant has joined #ruby
robbyoconnor has joined #ruby
<ElasticElephant> Hey guys
Hanmac has quit [Ping timeout: 250 seconds]
hiyosi has quit [Ping timeout: 260 seconds]
vikhyat has quit [Remote host closed the connection]
<|jemc|> rjhunter: seems like ivars might be easier (and more practical) than locals
<|jemc|> I'm able to break on rb_ivar_set with gdb
<|jemc|> wasn't sure if the internal machine used that part of the api itself, or if it was just for external use
<rjhunter> |jemc|: yeah, ivars don't seem like an unreasonable limitation
<rjhunter> ElasticElephant: hello
<ElasticElephant> hows everyone doin
Methylated has quit [Quit: Leaving.]
<ElasticElephant> ?
<|jemc|> swell, just swell
Methylated has joined #ruby
sensen has quit [Ping timeout: 245 seconds]
sensen_ has joined #ruby
<ElasticElephant> awesome, so anyone doing anything cool lol
<h0rrorvacui> define cool
<|jemc|> but now that I've found my function I want to co-opt, I'm not sure how to actually do so: not as easy as in ruby to override a c method
linguini has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<|jemc|> :P
<h0rrorvacui> ElasticElephant because |jemc| is doing something that some might view as cool
<|jemc|> and some as an onholy abomination
<|jemc|> *unholy
<ElasticElephant> that sounds kinda cool to me
gianlucadv has quit [Ping timeout: 260 seconds]
<h0rrorvacui> he is peering into variable assignment by hooking the assignment operator or something like that
uxp has quit [Remote host closed the connection]
Kricir has joined #ruby
vlad_starkov has joined #ruby
<ElasticElephant> wells that's pretty cool
<h0rrorvacui> ElasticElephant what you up to?
<ElasticElephant> doing some rspec crap
freerobby has quit [Quit: Leaving.]
hogeo has joined #ruby
tjad has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
euclides has quit [Quit: Leaving...]
hogeo has quit [Read error: Connection reset by peer]
Mars has joined #ruby
<h0rrorvacui> yeah I'm having one of those dull days where I've probably been on the computer to long and can't think
hogeo has joined #ruby
Mars is now known as Guest27258
<h0rrorvacui> So I'm just screwing around with rspec myself
Kricir has quit [Ping timeout: 252 seconds]
<h0rrorvacui> and the really fun githug gem
<CaptainJet> I wish I could git some hug
uxp has joined #ruby
<CaptainJet> Make a few pull requests on some hugs
<|jemc|> request denied
<CaptainJet> Can I just fork you instead then?
<|jemc|> only if we can spoon afterward
<h0rrorvacui> I'm on level 40 and I'm getting tired of it now
<CaptainJet> I'm not sure I can make that commit |jemc|
CorySimmons has joined #ruby
hogeo has quit [Ping timeout: 240 seconds]
<DanBoy> lame coder humor :P
<mr`spock> zomg i'm telling everyone on twitter how offensive and insensitive you folks are
<mr`spock> jkjk put your dongle a little closer to the port
<|jemc|> um... I take _issue_ with it
* |jemc| is out of innuendos
<h0rrorvacui> this feels like a reddit circle jerk
<DanBoy> lol
brunto has quit [Ping timeout: 264 seconds]
bentonrr has quit [Remote host closed the connection]
<CaptainJet> Out already? You need to branch out more then
<|jemc|> now _that_'s offensive, h0rrorvacui
* DanBoy hears crickets
* DanBoy hears crickets++
<h0rrorvacui> sorry...
<h0rrorvacui> don't blame me
<mr`spock> h0rrorvacui, I'm sorry for committing that offense. i loathe them discussion boards - it's why i come to IRC
brunto has joined #ruby
<h0rrorvacui> get it "blame"
<h0rrorvacui> :P
<CaptainJet> h0rrorvacui, with jokes like that, we might have to mark you up
<mr`spock> after that he gets sent through the CSS inliner
CorySimmons has quit [Ping timeout: 246 seconds]
<|jemc|> yuck, tastes like github-flavored markdown
sensen_ has quit [Ping timeout: 246 seconds]
<h0rrorvacui> Why does ruby have as much questions as the python, go, and haskell channels?
<h0rrorvacui> doesn't*
danshultz has joined #ruby
<CaptainJet> Because Ruby isn't as confusing to begin with?
vikhyat has joined #ruby
soba has quit [Ping timeout: 245 seconds]
fuhgeddaboudit has joined #ruby
danshultz has quit [Ping timeout: 272 seconds]
hogeo has joined #ruby
nhmood has joined #ruby
<nhmood> What does {13} refer to in the context of gsub(/^ {13}/, '')?
<bnagy> it's a count
<|jemc|> repetition
<h0rrorvacui> how many times
<bnagy> check rubular.com it has syntax etc etc
soba has joined #ruby
<|jemc|> repetition of the space character
<nhmood> Oh I see
<h0rrorvacui> for example you can do {3,5} and repeat 3 to 5 times
phipes has joined #ruby
<nhmood> Ohh I see, that makes sense
lmickh has quit [Quit: lmickh]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<nhmood> So if used with a heredoc style string
tanema has quit [Remote host closed the connection]
<nhmood> <<-MESSAGE.gsub(/^ {13}/, '')
mklappstuhl has joined #ruby
<nhmood> would imply remove the beginning 13 whitespace chars in the string?
tanema has joined #ruby
<h0rrorvacui> it looks like its saying not 13 spaces
petey_ has quit [Remote host closed the connection]
Fire-Dragon-DoL has quit [Quit: Leaving.]
<nhmood> I thought ^ was beginning of string?
<h0rrorvacui> it is
macmartine has quit [Remote host closed the connection]
<h0rrorvacui> start of line
petey has joined #ruby
<h0rrorvacui> if its in the [
<h0rrorvacui> its not
<h0rrorvacui> sorry
<h0rrorvacui> I have a bad font on my hexchat
<nhmood> np np
macmartine has joined #ruby
CaptainJet has quit []
nisstyre has joined #ruby
tanema has quit [Ping timeout: 246 seconds]
brianpWins has joined #ruby
thesheff17 has joined #ruby
mklappstuhl has quit [Ping timeout: 264 seconds]
petey has quit [Ping timeout: 240 seconds]
phansch has joined #ruby
mando has joined #ruby
Atrophius has joined #ruby
Bry8Star{T2 has joined #ruby
iliketur_ has quit [Quit: zzzzz…..]
mando has quit [Ping timeout: 245 seconds]
Liothen has quit [Remote host closed the connection]
BlakeRG has joined #ruby
<bnagy> start of line != start of string
<BlakeRG> why can't i check for a value like so: segments[0][1].nil? - i get NoMethodError: undefined method `[]' for nil:NilClass
<bnagy> BlakeRG: dollar says segments[0] isn't set
browndawg has quit [Quit: Leaving.]
<BlakeRG> bnagy: yes that makes sense, but do i really have to use two conditions in my if statement just to check fir the existence of the first index before i check the second?
<|jemc|> yeah, because you can't index a 'nil'
<|jemc|> or you can rescue the NoMethodError
dhruvasagar has joined #ruby
<h0rrorvacui> BlakeRG often times when I find myself in situations like this I've discovered a code smell
fuhgeddaboudit has quit [Ping timeout: 245 seconds]
mmcdaris has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<h0rrorvacui> which is probably why you are asking lol
lfox has quit [Quit: ZZZzzz…]
<h0rrorvacui> BlakeRG can you share some code? Maybe context could help us discover some alternatives.
webserver_define has joined #ruby
<webserver_define> easiest way to setup modern cgi with ruby on arch linux on a webserver
<BlakeRG> h0rrorvacui: oh yeah, this code is total crap i admit, i am just accustom to using something like isset() in other languages that allows for that behavior
<h0rrorvacui> ohh god a php'er
<h0rrorvacui> :P
<BlakeRG> yeeeep
<webserver_define> guys i have a arch linux laptop
<BlakeRG> i'm splitting a string into two matched groups and i am just verifying the two values exist: segments = url.scan(/^(1:)(.*)$/); unless segments[0][0].nil?........
<webserver_define> i want a webserver + ruby + cgi = working
<webserver_define> how?
tharindu has joined #ruby
petey has joined #ruby
<oddalot> ruby on rails
<webserver_define> ok which webserver be best for a computer newbie to setup ruby on rails ?
nisstyre has quit [Remote host closed the connection]
hiyosi has joined #ruby
* sevenseacat tiptoes very quickly away from conversation
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
falsetto has joined #ruby
thelorax123 has joined #ruby
macmartine has quit [Remote host closed the connection]
<|jemc|> webserver_define: you'll find more rails users in #rubyonrails
<h0rrorvacui> webserver_define I don't know where to begin to even help you.
<h0rrorvacui> webserver_define do you have ruby installed?
<webserver_define> yep
<webserver_define> I install ruby
johnnyfuchs has quit [Quit: Leaving.]
<webserver_define> I want to choose a webserver now which would help me config it easily
<h0rrorvacui> What os are you using?
<webserver_define> Arch linux
<h0rrorvacui> Is this going to be production or for development?
<webserver_define> amd64
<webserver_define> learning
<webserver_define> also for my site ..
<h0rrorvacui> Have you decided on how you are going to host it?
<webserver_define> to host application ( small one like calculation based but complex sometimes )
mklappstuhl has joined #ruby
<webserver_define> on my own webserver
<webserver_define> but i can't get lighttpd to work with ruby on rails
<webserver_define> hence i am here to choose a diff server if that works well
dseitz has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Spami has joined #ruby
<rjhunter> webserver_define: you don't need a special web server if you're just getting started in development. your ruby code can run everything it needs (you can use a command like `rackup` or `rails server` to start)
codeFiend has joined #ruby
hiyosi has quit [Ping timeout: 252 seconds]
<rjhunter> webserver_define: when you want to deploy the code somewhere to run in production, you'll want something more. but thanks to hosts like heroku, you don't even need to worry about that. `git push` and you're done
<oddalot> git push heroku
<oddalot> and then spend half a day getting it to work right lol
<rjhunter> again, you'll find more Rails-specific advice in #rubyonrails
<h0rrorvacui> he moved there
<webserver_define> guys I tried lighttpd but it din't wrk cudnt get it work with ruby on rails
<webserver_define> some1 using lighttpd with rails here ?
mklappstuhl has quit [Ping timeout: 250 seconds]
<|jemc|> any people that are using rails in here are probably also in #rubyonrails
<|jemc|> and people in here tend to get a little frustrated with rails questions that persist after the questioner has already been forwarded to the other channel
<h0rrorvacui> Well he did start off asking for cgi :P
<webserver_define> guys I am tring to host a site of my own .. but i also want to host a few applications which i ve in excel like calculation based on the server to help people do all that even from a mobile device i heard cgi is the way to do .. n then ruby has rails which is good to learn so i am here .. I tried lighttpd + rails but couldn't get it to work .. if you want i would try again setup by setup
<h0rrorvacui> is he trolling?
<h0rrorvacui> I can't tell.
macmartine has joined #ruby
vlad_starkov has joined #ruby
charliesome has joined #ruby
<rjhunter> webserver_define: I'm not sure if you're listening to any of the responses. If you are, please respond to a couple of the suggestions.
<webserver_define> rjhunter, i m setting up nginx now ruby and then phusion passenger
<webserver_define> looking into it
<h0rrorvacui> I got a feeling you need to just learn rails with out the trouble of that yet
vlad_starkov has quit [Read error: Connection reset by peer]
<h0rrorvacui> I mean what is he going to do when he sets it up?
<rjhunter> webserver_define: let me spell this out very clearly because I think you missed it before: you don't need to install a web server yet.
<webserver_define> oh
ahawkins has joined #ruby
<ElasticElephant> question, when talking about arrays the .sort method sorts a-z right?
<h0rrorvacui> webserver_define ruby has webrick for development
<bnagy> ElasticElephant: no
<ElasticElephant> which way?
<bnagy> depends what's in it
dseitz has joined #ruby
BlakeRG has quit []
<h0rrorvacui> webserver_define you need to get a guide to Ruby on Rails and just learn rails or something.
<h0rrorvacui> It will all become clear to you.
<ElasticElephant> what do you mean
<bnagy> ElasticElephant: check out Comparable
<rjhunter> webserver_define: did you notice those directions finish with a working site? ''' A test-page should shown greeting you "Welcome aboard". '''
<ElasticElephant> thanks
CorySimmons has joined #ruby
iliketur_ has joined #ruby
asteros has joined #ruby
<webserver_define> Ok guys
<rjhunter> webserver_define: don't worry about terms like CGI. not really relevant. people from other languages sometimes use "CGI" to mean any server-side code
<webserver_define> ok
<webserver_define> rjhunter, may i pm you?
<h0rrorvacui> webserver_define if you look up a ruby on rails tutorial you won't need us
<rjhunter> webserver_define: thanks for asking, but I don't normally respond to personal messages. if it's on-topic, talk about it in here. if it's off-topic, i don't really want to talk about it.
<webserver_define> i did but nginx is so complex .. n lighttpd was so cute to setup and i did all the config jus that rails didn't work
<webserver_define> rjhunter, np
<webserver_define> I was just asking as too many responses where hard to process for me
<rjhunter> webserver_define: what h0rrorvacui says is true. any Rails tutorial (including the guide on the Rails site) will talk you through everything you need.
<webserver_define> I followed Arch Wiki but lighttpd + rails didn't work .. i would try again now
<rjhunter> webserver_define: you don't need lighthttpd. you don't need ngninix. you don't need apache. you don't need any of that.
falsetto has quit [Quit: Computer has gone to sleep.]
<h0rrorvacui> webserver_define look its simple ruby on rails has a webserver called webrick that you don't have to install it comes with rails
s2013 has joined #ruby
CorySimmons has quit [Ping timeout: 272 seconds]
Jdubs_ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<rjhunter> webserver_define: please tell us if you understand what we're saying
<webserver_define> h0rrorvacui, rjhunter I know but then can I host my site on that dev server too ?
Jdubs has joined #ruby
<webserver_define> rjhunter, I understand that most modern programming lan has its own server to test / dev stuff right ?
<rjhunter> you will want a real server for production hosting, but you're trying to run before you can walk
rezzack has quit [Ping timeout: 245 seconds]
<webserver_define> rjhunter, ok
<webserver_define> ok guys I won't bug you more.. I would install everything and then come back to you .. after reading a bit too
<webserver_define> ok?
<webserver_define> THanks a zillion
<h0rrorvacui> more than a bit of reading ahead
<rjhunter> webserver_define: good luck! and remember it should be really easy. if you find yourself editing a config file, stop and go back
gr33n7007h has quit [Quit: Leaving]
<webserver_define> but on arch we have to edit a lot of thing always :(
nixie has quit [Read error: Connection reset by peer]
<webserver_define> They give you a sample config file and then i edit it as per my understanding
<rjhunter> webserver_define: if you have ruby installed, you shouldn't need to edit anything more
mklappstuhl has joined #ruby
nixie has joined #ruby
<h0rrorvacui> Sure but that has nothing to do with it.
<rjhunter> webserver_define: a working ruby installation is all you need. seriously.
<ahawkins> hey guys, any idea why i'd get Errno::ECONNREFUSED from an HTTP request from ruby when I can make the same request with curl fine?
<dseitz> gist?
<webserver_define> rjhunter now i ve install ruby too
<webserver_define> h0rrorvacui, ruby done
<rjhunter> ahawkins: could be a few things. could be the server only takes one connection. could be proxy settings (one going through a proxy, one not)
bentonrr has joined #ruby
nisstyre has joined #ruby
<h0rrorvacui> webserver_define http://rubyonrails.org/download
browndawg has joined #ruby
<h0rrorvacui> follow those instructions
<webserver_define> ok guys wait what is ruby-fcgi ??
<rjhunter> don't worry about anything with CGI in it
<rjhunter> not relevant yet
<webserver_define> ok
<webserver_define> gem install rails <--- it is not doing anything yet .. jus entered the command
JohnBat26 has joined #ruby
<rjhunter> those instructions h0rrorvacui talked about? three steps. Install ruby. Install rails. Make your application.
mklappstuhl has quit [Ping timeout: 252 seconds]
<sevenseacat> step 4 - be awesome.
jkhwan has quit [Remote host closed the connection]
<rjhunter> that's an important step
<dseitz> it'll probably take a moment before you see any output
jkhwan has joined #ruby
<webserver_define> gem install rails <--- it is not doing anything yettttt does it take time ?
<sevenseacat> did you press enter?
<h0rrorvacui> lol
<webserver_define> ya lol
<sevenseacat> just checking
<dseitz> If you don't see anything in like 30 seconds... well, you should see something :)
<webserver_define> gem install rails --no-ri --no-rdoc ?? should it work ??
<sevenseacat> just let it run.
<sevenseacat> all good things take time.
<webserver_define> ok
bentonrr has quit [Ping timeout: 240 seconds]
<webserver_define> omg rail has localhost:3000 that means its own webserver for dev right ? :p
<sevenseacat> yes.
<sevenseacat> webrick, as you've been told.
<webserver_define> so its own folder to put your files for development
Jdubs has quit [Remote host closed the connection]
<h0rrorvacui> its a framework
<dseitz> well create a demo proj. real quick
<webserver_define> arch wiki says building docs take a lot of time so use rails --no-ri --no-rdoc
<h0rrorvacui> yeah well arch says a lot of stuff
<h0rrorvacui> stop looking at arch wiki atm
<webserver_define> lol ya
<h0rrorvacui> :P
<dseitz> hehe
<webserver_define> :p
<webserver_define> Arch wiki is sooooooooooo much of info for anyone to handle ..
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sevenseacat> apart from installing ruby, and installing some gems with native extensions, not a lot of OS-specific stuff in rails
<webserver_define> i think pacgem rails shows you the status of installation to
<rjhunter> webserver_define: don't try to mix OS packages and `gem install`. it usually causes more trouble than it's worth.
<h0rrorvacui> don't worry about pacgem
jkhwan has quit [Ping timeout: 272 seconds]
<h0rrorvacui> You don't do everything through arch's repos
charliesome has joined #ruby
mmcdaris has quit [Quit: mmcdaris]
mmcdaris has joined #ruby
<webserver_define> rjhunter, so pacgem or gem ?
thelorax123 has quit [Remote host closed the connection]
<h0rrorvacui> use gem, pacgem is for creating arch packages for each gem
jonahR has quit [Quit: jonahR]
<h0rrorvacui> don't worry about that
thelorax123 has joined #ruby
<webserver_define> no doing anything yet .. no status ..
Astralum has joined #ruby
petey has quit [Remote host closed the connection]
lemonsparrow has joined #ruby
<webserver_define> i think it is stuck ..
<webserver_define> No progress
petey has joined #ruby
larissa has quit [Quit: Leaving]
lukec has joined #ruby
<webserver_define> should i stop it ?
<sevenseacat> shouldnt have taken this long
<dseitz> You're still installing rails?
<webserver_define> yep
<webserver_define> i think it ain't workin
petey has quit [Ping timeout: 260 seconds]
<h0rrorvacui> did anything scroll by?
mmcdaris has quit [Quit: mmcdaris]
Arzaga has joined #ruby
pel_daniel has left #ruby [#ruby]
Atrophius has quit [Ping timeout: 240 seconds]
<dseitz> on my two year old iMac, there's about 25 sec wait before gem install rails start showing output
klaut has joined #ruby
<dseitz> on Arch, on my powerbox, it's like... no wait at all
<h0rrorvacui> dseitz is that with system ruby?
brum has quit [Remote host closed the connection]
<h0rrorvacui> on the arch that is
<dseitz> You don't want to set up a rails env. w/ system ruby
<webserver_define> h0rrorvacui, nothing scroll by
<h0rrorvacui> thats my point he is probably using system ruby
macmartine has quit [Read error: Connection reset by peer]
<dseitz> gem will try to install
<dseitz> but will fail due to permissions
<dseitz> its broke execution, might time out after 5 minutes
<dseitz> :P
vikhyat has quit [Ping timeout: 264 seconds]
<webserver_define> arch wiki says building docs take a lot of time so use rails --no-ri --no-rdoc
<dseitz> system ruby is for client use
<sevenseacat> system ruby :(
<dseitz> we don't use it for rails
macmartine has joined #ruby
<h0rrorvacui> if he followed the instructions in arch wiki to install ruby then he maybe alright
apeiros has quit [Remote host closed the connection]
<webserver_define> I think it is working as it din't stop or anything
apeiros has joined #ruby
vikhyat has joined #ruby
<dseitz> yeah, but you have to update your $PATH and relaunch your shell
<dseitz> which might be a confusing step to miss
Astralum has quit [Quit: Leaving]
tjad has joined #ruby
<dseitz> well I may be mistaken, supposedly the arch default is to use ~/.gem
ewnd9 has joined #ruby
asteros has quit [Ping timeout: 240 seconds]
sergicles has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hiyosi has joined #ruby
vikhyat has quit [Ping timeout: 250 seconds]
<h0rrorvacui> webserver_define how much ruby experience do you have?
<webserver_define> 0
<webserver_define> like i said I only learned cpp in high school 7 yrs back
<dseitz> Per manual, it does recommend add $(ruby -rubygems -e "puts Gem.user_dir")/bin to your path
<webserver_define> But I know how to develop small programs in any language in 20 days
<webserver_define> I jus learn it
<h0rrorvacui> ...
<sevenseacat> lol
<webserver_define> ERROR: While executing gem ... (OpenSSL::SSL::SSLError)
lukec has quit [Quit: lukec]
aganov has joined #ruby
sergicles has quit [Quit: sergicles]
mmcdaris has joined #ruby
sensen has joined #ruby
hiyosi has quit [Ping timeout: 272 seconds]
<dseitz> did you install openssl before ruby?
tjad has quit [Remote host closed the connection]
<webserver_define> ya
<webserver_define> I had it already
jonahR has joined #ruby
macmartine has quit [Read error: Connection reset by peer]
<webserver_define> trying again gem install rails --no-ri --no-rdoc
macmartine has joined #ruby
<h0rrorvacui> ruby depends on: gdbm, openssl, libffi, and libyaml; so unless he is doing something wrong with pacman he should of got openssl
<h0rrorvacui> in arch I should say
noop has joined #ruby
<h0rrorvacui> To be honest I'm impressed you got this far through arch and up to this point. I've friends who are employed as developers and they find arch to much work/to difficult.
<dseitz> yeah; they list it as a dependancy under (make)
BizarreCake has joined #ruby
<webserver_define> h0rrorvacui, arch is so easy for me .. just that I didn't do CGI or web programming yet but i could get cpp with fastcgi working .. but people said cgi is like 500 yrs old so don't work now .. use some something like ruby/perl/python w.e you can and try php too its easy .. but use a framework .. they make help your work easy
asteros has joined #ruby
<webserver_define> I ve to add I like only two Free OS in the world .. FreeBSD n Arch in Gnu/Linux also now Parabola in Linux-libre
thesheff17 has quit [Ping timeout: 240 seconds]
amritanshu_RnD has joined #ruby
yfeldblum has quit [Remote host closed the connection]
tagrudev has joined #ruby
yfeldblum has joined #ruby
DanielRb has quit [Ping timeout: 250 seconds]
pranny has joined #ruby
triptec has quit [Quit: leaving]
DanielRb has joined #ruby
s2013 has quit [Ping timeout: 246 seconds]
mengu has joined #ruby
<webserver_define> guys i am trying pacgem now.. it is resolving gems
<webserver_define> railes-4.0.2
<webserver_define> rails*
CorySimmons has joined #ruby
<h0rrorvacui> webserver_define if it doesn't work you need to see if its something to do with the fact that you are using system ruby
amacgregor_ has joined #ruby
<h0rrorvacui> and try out something like rvm, rbenv, chruby w/ ruby-install or ruby-build
<webserver_define> it is done almost
mklappstuhl has joined #ruby
<webserver_define> ruby-i18n-0.6.9-1
<webserver_define> installed
ce_afk is now known as cescalante
amacgregor has quit [Ping timeout: 246 seconds]
CorySimmons has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
mklappstuhl has quit [Ping timeout: 240 seconds]
apeiros has joined #ruby
banghouse has quit [Quit: What if the hokey pokey really is what it's all about?]
<webserver_define> it is installing a lot of stuff
<webserver_define> jason, tzinfo
<webserver_define> atomic
<h0rrorvacui> yeah, thats expected
<webserver_define> thread-safe
<webserver_define> now
tonsk has quit [Quit: Page closed]
<dseitz> let us know when it says N gems installed; $
<dseitz> :)
<webserver_define> ok
<webserver_define> ruby-builder
macmartine has quit [Remote host closed the connection]
<h0rrorvacui> careful throwing out all these gem names might summon someone by accident :P
<webserver_define> kk
apeiros has quit [Ping timeout: 246 seconds]
<dseitz> we know the gems names - not to seem rude, but just hang out until it gives you control of your terminal again
<webserver_define> pacgem = gem's pacman version :p
<sevenseacat> rails should be 31 gems iirc
<sevenseacat> including dependencies
s2013 has joined #ruby
<webserver_define> dseitz, u r not rude .. ( only channel tht is not rude yet!! ) else other say go read the manual it has it all .. but Arch/freebsd/now ruby channel is the most co-operative yet
<webserver_define> sevenseacat, k
Lewix has quit [Remote host closed the connection]
<webserver_define> it stopped on activemodel
<sevenseacat> seeing how many gems actually get used in a standard rails app is scary
<h0rrorvacui> Did it return control of the prompt?
<h0rrorvacui> If not it is still going.
<webserver_define> no it has installed ruby-arel .. now looking for next thing
Jdubs has joined #ruby
maroloccio has quit [Remote host closed the connection]
<webserver_define> guys it is taking long time
<sevenseacat> we know.
<sevenseacat> you keep telling us.
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
* webserver_define reading Ruby book :p
hogeo has quit [Remote host closed the connection]
Arzaga has quit [Quit: Computer has gone to sleep.]
<h0rrorvacui> I'd imagine it could have a lot to do with the fact that you are using pacgem
<h0rrorvacui> It is probably building arch packages out of each gem
<h0rrorvacui> maybe some overhead there idk...
s2013 has quit [Ping timeout: 240 seconds]
mary5030 has quit [Remote host closed the connection]
akonny has joined #ruby
<h0rrorvacui> I'm out seems like a good time to bail
<h0rrorvacui> :P
h0rrorvacui has quit [Quit: Leaving]
ambushsabre has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hogeo has joined #ruby
Arzaga has joined #ruby
Elhu has joined #ruby
timonv has joined #ruby
amacgregor has joined #ruby
zipper has joined #ruby
mklappstuhl has joined #ruby
<webserver_define> omg ruby has personal thor?
amacgregor__ has joined #ruby
hogeo has quit [Remote host closed the connection]
amacgregor_ has quit [Ping timeout: 245 seconds]
Kneferilis has quit [Quit: Leaving]
sergicles has joined #ruby
hogeo has joined #ruby
amacgregor has quit [Ping timeout: 246 seconds]
sergicles has quit [Client Quit]
mklappstuhl has quit [Ping timeout: 246 seconds]
larssmit has joined #ruby
tskogberg has quit [Read error: Operation timed out]
Mon_Ouie has quit [Ping timeout: 272 seconds]
ephemerian has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
Arzaga has quit [Quit: Computer has gone to sleep.]
amacgregor has joined #ruby
hiyosi has joined #ruby
amacgregor_ has joined #ruby
himsin has joined #ruby
d45h has joined #ruby
amacgregor__ has quit [Ping timeout: 246 seconds]
Guest27258 has quit [Remote host closed the connection]
Mars has joined #ruby
Mars is now known as Guest70974
amacgregor has quit [Ping timeout: 246 seconds]
<pontiki> just be careful for his personal mjöllnir
hiyosi has quit [Ping timeout: 272 seconds]
Guest70974 has quit [Ping timeout: 246 seconds]
skaflem has joined #ruby
Lewix has joined #ruby
phansch has quit [Quit: Leaving]
Methylated has quit [Quit: Leaving.]
hogeo has quit [Remote host closed the connection]
Methylated has joined #ruby
hogeo has joined #ruby
hadees has quit [Ping timeout: 246 seconds]
dagobah has joined #ruby
<Hanmac1> only a pure rubyist can lift this, railsians cant even touch it ;P
xguinness] has joined #ruby
end_guy has quit [Read error: Connection reset by peer]
DanBoy has quit [Remote host closed the connection]
phipes has quit [Remote host closed the connection]
hadees has joined #ruby
d45h has quit []
psyl0n has joined #ruby
asteros has quit [Quit: asteros]
mklappstuhl has joined #ruby
himsin_ has joined #ruby
akonny has quit [Quit: akonny]
himsin has quit [Ping timeout: 252 seconds]
himsin_ is now known as himsin
CorySimmons has joined #ruby
jhaals has joined #ruby
mklappstuhl has quit [Ping timeout: 264 seconds]
lsmola has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
jhaals has quit [Client Quit]
yacks has quit [Quit: Leaving]
CorySimmons has quit [Ping timeout: 272 seconds]
d45h has joined #ruby
claymore has joined #ruby
jhaals has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
Kneferilis has joined #ruby
spergy has joined #ruby
pranny has quit [Quit: Leaving.]
zipper has quit [Remote host closed the connection]
pranny has joined #ruby
zipper has joined #ruby
himsin has quit [Ping timeout: 240 seconds]
Azure has quit [Quit: My MBP went to sleep.]
Xeago has joined #ruby
pranny has quit [Read error: Connection reset by peer]
h_kon has joined #ruby
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ephemerian has quit [Ping timeout: 240 seconds]
noname001__ has joined #ruby
himsin has joined #ruby
klaut has quit [Remote host closed the connection]
<shevy> railsers are office workers
<shevy> the "Yes, Sir!" types
jprovazn has joined #ruby
d45h has quit []
alup has joined #ruby
gtsiftsis has joined #ruby
browndawg has quit [Quit: Leaving.]
<shevy> webserver_define thor is just the name of a gem project. you can give a project any name you want to
mklappstuhl has joined #ruby
arefaslani has joined #ruby
tharindu has quit [Quit: Leaving...]
aryaching has quit [Ping timeout: 246 seconds]
troessner has joined #ruby
jbpros has joined #ruby
maroloccio has joined #ruby
threesome has joined #ruby
<CalimeroTeknik> I'm getting weird results with a socket: try http://sprunge.us/TDSg and compare the output with curl ctkarch.org/downloads
<CalimeroTeknik> why is ruby inserting numbers all over the place?
<CalimeroTeknik> and spare lines
mklappstuhl has quit [Ping timeout: 252 seconds]
katterstrophe has joined #ruby
<CalimeroTeknik> extra* lines
<CalimeroTeknik> I'm sending the same headers as curl does
alup has quit [Ping timeout: 252 seconds]
fluve has joined #ruby
alup has joined #ruby
<CalimeroTeknik> and it's really slow at that
<shevy> CalimeroTeknik does this code work
<shevy> because it clearly does not for me
fluve has quit [Remote host closed the connection]
katterstrophe has quit [Client Quit]
<CalimeroTeknik> it works for me but I just noticed there's a missing quote. here, fixed: http://sprunge.us/ICUF
<CalimeroTeknik> shevy, what do you get?
mary5030 has joined #ruby
<CalimeroTeknik> incredibly my version of ruby was okay with the missing quote.
jbpros has quit [Quit: jbpros]
<shevy> that is better
marcgg has joined #ruby
braoru has joined #ruby
<shevy> I also get numbers
tesuji has joined #ruby
<CalimeroTeknik> I reproduced the curl headers though, it's weird
<CalimeroTeknik> where are these numbers and extra lines coming from?
d45h has joined #ruby
dEPy has joined #ruby
<dEPy> heyo
<shevy> I dont know but that is the first time I see anything like that. I dont think normal TCPSocket shows numbers
<dEPy> could this thing be implemented more nicely? https://gist.github.com/depy/ac937dc4b29e90a259e7
tharindu has joined #ruby
Animawish has joined #ruby
hogeo has quit [Remote host closed the connection]
jbpros has joined #ruby
wboots has quit [Ping timeout: 250 seconds]
Sp4rKy has quit [Ping timeout: 245 seconds]
<CalimeroTeknik> I tried without setting the encoding, but it doesn't change anything
marcgg_ has quit [Ping timeout: 252 seconds]
tesuji has quit [Read error: Connection reset by peer]
<CalimeroTeknik> is my socket abnormal? should I avoid using puts?
mary5030 has quit [Ping timeout: 250 seconds]
<shevy> dEPy well you could change callbacks = Hash.new to callbacks = {} :>
tesuji has joined #ruby
<shevy> I am not sure where you make use of &block
braoru has quit [Max SendQ exceeded]
braoru has joined #ruby
hiyosi has joined #ruby
<dEPy> shevy: SomeUsecase.execute(1,2,3) do |obj| obj[:success] = -> { puts 1; }; obj[:failure] = -> { puts -1; }; end
<dagobah> Anyone good at ruby code golf?
<dEPy> I use block to define success and failure callbacks on yielded obj
nhmood has quit [Ping timeout: 250 seconds]
iliketur_ has quit [Quit: zzzzz…..]
vlad_starkov has joined #ruby
Clooth has quit [Quit: Leaving...]
iliketur_ has joined #ruby
akonny has joined #ruby
burgess has joined #ruby
browndawg has joined #ruby
<Xeago> dagobah: there is nothing hard at golfing ruby
<Xeago> other than knowing stdlib
d45h has quit []
hiyosi has quit [Ping timeout: 272 seconds]
<dagobah> Xeago: OK, are there any obvious improvements to this - '07700 90'+('0 334'..?9*5).select{|v|v.tr('^34',?().sum==234}[n-1]
<Xeago> where does n come from
<sevenseacat> im not even going to pretend to know what that does
<dagobah> n comes in from the method argument.
camilasan has joined #ruby
SeySayux has quit [Read error: Connection reset by peer]
d45h has joined #ruby
olivier_bK has joined #ruby
iliketur_ has quit [Quit: zzzzz…..]
<dagobah> It's an odd challenge, essentially. return the nth phone number that has exactly two 3's and a 4 in it, beginning with '07700 90'
andikr has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<dagobah> The tr('^34',?().sum==234 is a golfed down version of `v.count(3) == 2 && v.count(4) == 1`
mklappstuhl has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
<dagobah> By turning everything that isn't a 3 or 4 into a "(" and checking the sum == "334".sum.
Mars has joined #ruby
Sp4rKy has joined #ruby
thelorax123 has quit [Remote host closed the connection]
suvash has joined #ruby
Mars is now known as Guest13067
amund_ is now known as amundj
Elhu has joined #ruby
MattStratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv has quit [Remote host closed the connection]
Guest13067 has quit [Read error: Connection reset by peer]
thelorax123 has joined #ruby
SeySayux has joined #ruby
akonny has quit [Quit: akonny]
wboots has joined #ruby
<Hanmac1> dEPy: why not like that? SomeUsecase.execute(1,2,3 success: -> { puts 1; }, failure: -> { puts -1; } )
mklappstuhl has quit [Ping timeout: 260 seconds]
<Hanmac1> okay i miss a , but you know what i mean
GreatSUN has joined #ruby
arefaslani has quit [Ping timeout: 264 seconds]
<GreatSUN> rehi
<dEPy> Hanmac1 this way I must always be carefull how many parameters execute takes right?
<Hanmac1> dEPy: hm no, i mean you could use option parameters
<dEPy> Hanmac1: Maybe I could make a base class for Usecase with execute(*args, &block) some how? I'm not that good at ruby OO :S
|jemc| has quit [Ping timeout: 240 seconds]
CorySimmons has joined #ruby
<Xeago> dEPy: ever heard of callbacks/delegates?
<dEPy> Xeago well yes, haven't seen it in ruby though
<Xeago> u = WhateverUsecase.new(&success,&failure)
nhhagen has joined #ruby
<dEPy> oh ok
<Xeago> u.foo = :foo; u.bar = :bar, u.execute
<dEPy> so you instasntiate it with succ and fail callbacks then call execute
<dEPy> oh hm.... this is nice
<Xeago> not fond of it, but it isn't that bad
<Xeago> but honestly
drumusician has joined #ruby
<Xeago> why can't you just raise exceptions?
<Xeago> and catch those?
<dEPy> for invalid number of args?
<Xeago> not just that
<Xeago> but also for errors in operation
<Hanmac1> Xeago: new(&success,&failure) does not work
<Xeago> success,failure = some incantation, some other
<GreatSUN> very good morning to all of you rubyists ;-)
relix has joined #ruby
klaut has joined #ruby
marr has joined #ruby
CorySimmons has quit [Ping timeout: 253 seconds]
<dEPy> What I basically want is this guys. I hate putting stuff in rails controllers that are not their responsibility
<dEPy> so what I want is one base class Usecase which I can subclass and will take care of the plumbing (callbacks, and stuff)
<dEPy> then I want my specific use cases to be used like this (sort of): u = MyUsecase(successCallback, failiureCallback); u.execute(p1,p2,p3,...)
burgess has quit [Quit: ^zzz]
nhhagen has quit [Remote host closed the connection]
<dEPy> So I should put callback stuff in base class and just implement execute in specific classes that subclass that =
<dEPy> ?
Speed has joined #ruby
Deele has joined #ruby
browndawg has quit [Ping timeout: 245 seconds]
vt102 has quit [Remote host closed the connection]
gyre007 has joined #ruby
<Xeago> dEPy: why have such specific succes callback and failure callback
<Xeago> are they ever going to be different
jbpros has quit [Quit: jbpros]
<Xeago> and if so, how do exceptions not satisfy your usecase?
gyre007 has quit [Remote host closed the connection]
roolo has joined #ruby
gyre007 has joined #ruby
yfeldblum has joined #ruby
gyre007 has quit [Read error: No route to host]
<dEPy> Xeago: actually im not sure
gyre007 has joined #ruby
obs has joined #ruby
<Xeago> my suggesiton would be to just make a class that does what you want
<Xeago> first
hogeo has joined #ruby
<Xeago> and then worry about abstracting it
<Xeago> imo thinking purely in terms of usecases is a very painful way of thinking
timonv has joined #ruby
jhaals has joined #ruby
shime has joined #ruby
ephemerian has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
_Andres has joined #ruby
<dEPy> why is that?
jhaals has quit [Ping timeout: 272 seconds]
maroloccio has quit [Quit: WeeChat 0.4.1]
<webserver_define> any1 using ruby on rails with lightppd ?
<webserver_define> lighttpd*
nari has quit [Ping timeout: 264 seconds]
jhaals has joined #ruby
sevenseacat has quit [Quit: Leaving.]
phansch has joined #ruby
d45h has quit []
<dEPy> Xeago: this is what I came up with https://gist.github.com/depy/7750251b39f1fcf4bd01
<dEPy> Is there a way to defined those two callbacks named? like :succes -> ....
Animawish has quit [Quit: Animawish]
phil_b has joined #ruby
<shevy> dEPy cant you assign a variable to them?
<shevy> foo = proc {}
<shevy> bar = proc {}
burgess has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
hogeo has quit [Remote host closed the connection]
Emmanuel_Chanel has quit [Quit: Leaving]
<dEPy> shevy yes but it doesn't force someone using my class to define it this way :)
drumusician has quit [Read error: Operation timed out]
hogeo has joined #ruby
<shevy> in 99% I would assume that it's you first to use that class
<shevy> I know that if I were to have to use something like this, I would scratch my head because I dont really see why I would have to use this strange way
<dEPy> is it really that strange?
<dEPy> It's quite commong in javascript for example to define success and failure callbacks
TMM has joined #ruby
<dEPy> I just want a consistent way of handling stuff in my rails controllers, and if I tell the people they must use UseCase to implement behvaiour and just handle success and failure in controller which means basicaly only redirects or renders, i think this clears things up and prevents people putting crap in controllers
hiyosi has joined #ruby
ylluminate has quit [Quit: Bye!]
webserver_define has left #ruby ["Leaving"]
hogeo has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby
mklappstuhl has joined #ruby
hiyosi has quit [Ping timeout: 240 seconds]
Mars has joined #ruby
Mars is now known as Guest39338
allsystemsarego has joined #ruby
allsystemsarego has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
Emmanuel_Chanel has joined #ruby
mklappstuhl has quit [Ping timeout: 246 seconds]
<dagobah> dEPy: I've done something like https://gist.github.com/kotay/1504e0f8edaad09f13df before. It's worked well in Rails controllers.
spergy has quit [Ping timeout: 252 seconds]
browndawg has joined #ruby
Guest39338 has quit [Remote host closed the connection]
<dEPy> dagobah hm that's pretty nice
<dEPy> can you show me the implementation for that?
joonty_ is now known as joonty
<dEPy> what is "on" ?
Clooth has joined #ruby
<dagobah> Or perhaps more in your style: https://gist.github.com/kotay/8ca40f16031ee3dad066
nixie has quit [Ping timeout: 264 seconds]
<dagobah> "on" is just the name I gave to the block argument, could be anything you want, "on", "response", "when" etc.
<dEPy> dagobah: what's the type of "on" ?
<dEPy> I have no idea how to implement the first version
kizzx2 has quit [Quit: Leaving.]
xk_id has joined #ruby
fluve has joined #ruby
vlad_starkov has quit []
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
newbiehacker has joined #ruby
timonv has quit [Remote host closed the connection]
CorySimmons has joined #ruby
xk_id has quit [Quit:
juancate has quit [Quit: leaving]
wallerdev has quit [Quit: wallerdev]
klaut has quit [Remote host closed the connection]
burgess has quit [Quit: ^ddd]
gigetoo has quit [Ping timeout: 264 seconds]
xk_id has joined #ruby
zeeraw has joined #ruby
Zai00 has joined #ruby
CorySimmons has quit [Ping timeout: 252 seconds]
amoli has joined #ruby
<CalimeroTeknik> shevy, wireshark confirmed that the server does reply the same thing: the problem is in the line puts socket.read
<shevy> perhaps it returns an integer
<shevy> bytes read or something
sepp2k has joined #ruby
<CalimeroTeknik> ah, hum, doesn't it return a string?
arefaslani has joined #ruby
nari has joined #ruby
<shevy> what I mean is
<shevy> perhaps socket.read returns an array sometimes?
Speed has joined #ruby
<CalimeroTeknik> ohh let's see
<shevy> could be ... [3, '<foo>']
<shevy> unlikely but still
Astralum has joined #ruby
nhhagen has joined #ruby
<CalimeroTeknik> is there something to indicate the type of an object in ruby?
andywojo has quit [Ping timeout: 245 seconds]
zipper has quit [Remote host closed the connection]
<CalimeroTeknik> php has var_dump
andywojo has joined #ruby
gianlucadv has joined #ruby
zipper has joined #ruby
<CalimeroTeknik> inspect it seems
spergy has joined #ruby
lsmola has quit [Ping timeout: 250 seconds]
<CalimeroTeknik> it's a string with numbers inside
<CalimeroTeknik> that's insane
visof has joined #ruby
<visof> hello
mklappstuhl has joined #ruby
<CalimeroTeknik> while gets on the socket does the same thing
<visof> how can i create XML file using ruby with root element which is called "Hello:World" ?
<Hanmac1> visof: depends on the xml gem you use for generating (i prefer nokogiri)
<visof> Hanmac1: doc = Nokogiri::XML::Document.new("1.0"); doc.root = "Hello:World" ?
nhhagen has quit [Ping timeout: 272 seconds]
<dagobah> dEPy: I've written an implementation but you won't like it :P
<dagobah> dEPy: Lots of boilerplate stuff that could be tidied away though :)
d45h has joined #ruby
spergy has quit [Remote host closed the connection]
<Hanmac1> visof: Nokogiri::XML::Builder.new {|xml| xml.send("Hello:World")}.to_xml
Hanmac1 is now known as Hanmac
zipper has quit [Ping timeout: 240 seconds]
<dEPy> dagobah: Any could will help. :)
mklappstuhl has quit [Ping timeout: 264 seconds]
ephemerian has quit [Ping timeout: 264 seconds]
<dEPy> dagobah: I see. I was trying to write this without method missing and failed :S
<dagobah> dEPy: Ah yes, you probably could. But it makes for shorter code if you use it.
klaut has joined #ruby
<Hanmac> i think more pun could be added when BaseUseCase automaticly redirects to Proxy when in Proxy the specific callback is defined
ismaelrb has joined #ruby
<dagobah> true :)
timonv has joined #ruby
luckyruby has quit [Remote host closed the connection]
d45h has quit [Ping timeout: 252 seconds]
larssmit has quit [Quit: Leaving.]
lsmola has joined #ruby
larssmit has joined #ruby
tkuchiki has quit [Remote host closed the connection]
apeiros has joined #ruby
mmcdaris has quit [Quit: mmcdaris]
<Hanmac> dagobah & dEPy: what do you think about that? https://gist.github.com/Hanmac/144c30883dae01c5a184
<dEPy> I'm not very fond of explicit call to super(&respond_wth)
<dEPy> :/
<Hanmac> dEPy: hm super without args would work too in thiscase
<dEPy> Can't we get rid of the super somehow? :/
<dEPy> Not sure how thought :)
thelorax123 has quit [Remote host closed the connection]
<dEPy> -t
G1eb has joined #ruby
mojjojo has joined #ruby
phansch has quit [Quit: Leaving]
akonny has joined #ruby
zipper has joined #ruby
thelorax123 has joined #ruby
mengu has quit [Remote host closed the connection]
<Hanmac> dEPy: no that super is there for a reason
<dagobah> Not unless you want the implementation anywhere else but the base class.
<dagobah> Hanmac: I prefer your implementation to mine :)
hogeo has joined #ruby
mojjojo has quit [Quit: mojjojo]
zipper has quit [Ping timeout: 250 seconds]
hogeo has quit [Read error: Connection reset by peer]
hogeo has joined #ruby
zipper has joined #ruby
mklappstuhl has joined #ruby
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
tharindu has quit [Quit: Leaving...]
mklappstuhl has quit [Ping timeout: 264 seconds]
Reach has joined #ruby
xcv has joined #ruby
mojjojo has joined #ruby
xcv has quit [Remote host closed the connection]
xcv has joined #ruby
funburn has joined #ruby
tkuchiki has joined #ruby
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
Reach has quit [Client Quit]
ismaelrb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zipper has quit [Ping timeout: 250 seconds]
jprovazn has quit [Quit: Leaving]
Reach has joined #ruby
xcv_ has joined #ruby
<dagobah> dEPy: If you don't want super in your execute, you could do something like https://gist.github.com/kotay/76b5c0e59103144b2eca
xcv has quit [Read error: Connection reset by peer]
atm1 has joined #ruby
atm1 is now known as canton7-mac
<dagobah> dEPy: But it just has to go somewhere else and seems to clobber the subclass's initialize which I don't like as much.
mikecmpbll has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
<mikecmpbll> what would be the preferred way to indiscriminately get the values for keys in a nested hash, for example:
zipper has joined #ruby
dangerousdave has joined #ruby
mojjojo has quit [Quit: mojjojo]
Astralum has quit [Read error: Connection reset by peer]
<mikecmpbll> getting all the values for key :thing two levels down
Astralum has joined #ruby
<mikecmpbll> regardless of the key at :a or :b
<DouweM> h.map { |k, v| v[:thing] }
mojjojo has joined #ruby
ldnunes has joined #ruby
xcv_ has quit [Remote host closed the connection]
<mikecmpbll> yeah, kinda seems like a silly question now.
<mikecmpbll> fml
xcv has joined #ruby
<dEPy> dagobah: ye that's not perfect either :)
shime has quit [Ping timeout: 240 seconds]
<mikecmpbll> i did oversimplify it a bit, there's not necessarily always a value, and it's more levels deep than that, but those are not insurmountable. cheers.
mojjojo has quit [Client Quit]
Macaveli has joined #ruby
lsmola has quit [Ping timeout: 250 seconds]
<Hanmac> mikecmpbll: there is also an way with more fun: ;P
<Hanmac> >> {:a => {:thing => "a"}, :b => {:thing => "b"} }.map {|_,thing: nil|thing}
<eval-in> Hanmac => [nil, nil] (https://eval.in/76394)
marr has quit [Ping timeout: 264 seconds]
N00D is now known as zz_N00D
<Hanmac> hm there is somthing broken in evalin
zipper has quit [Ping timeout: 260 seconds]
<DouweM> Hanmac: that's supported? :| that's crazy. but cool
zipper has joined #ruby
bluOxigen has quit [Ping timeout: 260 seconds]
<Hanmac> yeah, i need to look for more magic, but there was a way to do that
mojjojo has joined #ruby
clevermatt has joined #ruby
ismaelrb has joined #ruby
AlSquirrel has joined #ruby
niklasb has joined #ruby
movedx has joined #ruby
<Macaveli> Hi all! Anyone have a Rails 3 installation guide that works with OS X 10.9 and latest xcode I have a lot of problems for example I can't do ruby -v inside my app folder
jb41 has joined #ruby
<movedx> https://github.com/vchs/ruby_vcloud_sdk/blob/master/lib/ruby_vcloud_sdk/connection/connection.rb#L49 -- can someone give me a clue as to where this 'delay' variable is coming from?
<jb41> hi guys
sensen has quit [Ping timeout: 250 seconds]
eka has joined #ruby
shaunbaker has joined #ruby
wildroman2 has joined #ruby
CorySimmons has joined #ruby
<jb41> how to make from [1, 1, 2, 3, 2, 2, 1] array that array: [1, 2, 3, 2, 1] (I want to delete repeating elements)
Alina-malina has quit [Quit: Leaving]
wildroman2 has quit [Remote host closed the connection]
Alina-malina has joined #ruby
wildroman2 has joined #ruby
thelorax123 has quit [Remote host closed the connection]
<movedx> DouweM: Beltin' nice one ;)
mengu has joined #ruby
<shevy> jb41 .uniq
<mikecmpbll> shevy: he's not simply removing duplicates
<DouweM> shevy: that'd remove the 1 at the end
<mikecmpbll> he wants to remove repeating elements in the sequence.
ismaelrb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jb41> that's right
<jb41> uniq doesn't do the job
<shevy> what is a repeating element?
<jb41> [1, 1, 1, 2]
<jb41> 1 is repeating
<shevy> yes
thelorax123 has joined #ruby
<shevy> >> [1, 1, 1, 2].uniq
<jb41> [1, 1, 2, 2, 3, 2, 2, 2].magic -> [1, 2, 3, 2]
<eval-in> shevy => [1, 2] (https://eval.in/76408)
<mikecmpbll> >> new_a = []; arr = [1, 1, 2, 3, 2, 2, 1]; arr.each_with_index{|i| new_a << i unless arr[i+1] = i}; new_a
<eval-in> mikecmpbll => [] (https://eval.in/76409)
<mikecmpbll> oops
<shevy> jb41 in your array 2 is repeating
mengu has quit [Remote host closed the connection]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
ismaelrb has joined #ruby
<jb41> >> new_a = []; arr = [1, 1, 2, 3, 2, 2, 1]; arr.each_with_index{|i| new_a << i unless arr[i+1] == i}; new_a
<DouweM> shevy: arrays are ordered. if array[i+1] == array[i], array[i] is repeating. I don't see what you don't get about that
<mikecmpbll> shit, assignment
<mikecmpbll> >> new_a = []; arr = [1, 1, 2, 3, 2, 2, 1]; arr.each_with_index{|i| new_a << i unless arr[i+1] == i}; new_a
<eval-in> mikecmpbll => [1, 1, 2, 3, 2, 2, 1] (https://eval.in/76410)
<mikecmpbll> hmpf. ;D
ewnd9 has quit [Ping timeout: 245 seconds]
CorySimmons has quit [Ping timeout: 240 seconds]
sepp2k has quit [Quit: Leaving.]
<jb41> ;d
<shevy> DouweM to me a repeating element means that it exists more than once. I don't see what you don't get about that
<DouweM> mikecmpbll: each_with_index takes 2 args on the block ;) you're ignoring the value
<DouweM> shevy: :) I definitely see where you're coming from, but I'd think the examples would be clear enough
<mikecmpbll> >> new_a = []; arr = [1, 1, 2, 3, 2, 2, 1]; arr.each_with_index{|v, i| new_a << v unless arr[i+1] == v}; new_a
<eval-in> mikecmpbll => [1, 2, 3, 2, 1] (https://eval.in/76411)
<mikecmpbll> being a complete retard today.
<jb41> !
<jb41> mikecmpbll: that's it
tvw has joined #ruby
* Hanmac the golf sanin appears
<Hanmac> >> [1, 1, 2, 3, 2, 2, 1].chunk {|i|i}.map(&:first)
<eval-in> Hanmac => [1, 2, 3, 2, 1] (https://eval.in/76412)
* DouweM applauds
<shevy> cool
<mikecmpbll> >> [1, 1, 2, 3, 2, 2, 1].each_with_index.map{|v,i| v unless arr[i+1] == v}.compact
<eval-in> mikecmpbll => undefined local variable or method `arr' for main:Object (NameError) ... (https://eval.in/76413)
lsmola has joined #ruby
<mikecmpbll> hehhh
<DouweM> mikecmpbll: go get another coffee
<mikecmpbll> worked for me in rib -_-
<mikecmpbll> shite.
<DouweM> haha
* mikecmpbll leaves
nhhagen has joined #ruby
<shevy> I don't think I have seen .chunk before
<DouweM> neither have I
<jb41> that chunk solution looks even better
<DouweM> >> [1, 1, 2, 3, 2, 2, 1].group_by{|i|i}.keys
<eval-in> DouweM => [1, 2, 3] (https://eval.in/76414)
<DouweM> shit :P
<DouweM> but yeah, the chunk one looks great
<mikecmpbll> :D
<Xeago> I like that he golfer the latter part
<Xeago> but not the array itself
<Xeago> :3
hidensoft is now known as intuxicated
<DouweM> mikecmpbll: you're not the only one who's having trouble thinking today :P
<shevy> get this description folks:
<mikecmpbll> that's reassuring.
<shevy> "Consecutive elements which return the same block value are chunked together."
<mikecmpbll> well yeah.
ckinni has quit [Remote host closed the connection]
<shevy> I never read that before in english ... to chunk something together
<DouweM> chunck (noun): "a thick, solid piece of something."; chunk (verb): "divide (something) into chunks."
<DouweM> makes sense I guess
<jb41> it's quite a hack such thing like .chunk {|i| i}
<jb41> but looks really nice ;d
<Hanmac> or without {|i|i} block it looks like that:
<Hanmac> >> [1, 1, 2, 3, 2, 2, 1].chunk(&:to_i).map(&:first)
<eval-in> Hanmac => [1, 2, 3, 2, 1] (https://eval.in/76415)
<shevy> it is typical Hanmac code
<jb41> and have sense
<shevy> nobody but Hanmac masters this
<jb41> hehe ;d
<shevy> look at him go!
<shevy> hmm
<shevy> >> [1, 1, 2, 3,2,2,2,3,4,5,5,1,1,2,2,3,1, 2, 2, 1].chunk(&:to_i).map(&:first)
<eval-in> shevy => [1, 2, 3, 2, 3, 4, 5, 1, 2, 3, 1, 2, 1] (https://eval.in/76416)
<jb41> works good
nhhagen has quit [Ping timeout: 240 seconds]
<DouweM> *works well
ismaelrb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Speed has left #ruby ["WeeChat 0.4.2"]
<shevy> :D
<DouweM> and of course it does, it's Hanmac code(TM)
<visof> Hanmac: to create tag for name = "Hello:World" what should i do : xml.send("Hello:world").send((:name => "foobar")) ? this doesn't work
<visof> in the wiki tags are generated using xml.object(:type => o.type)
<shevy> what method do you try to invoke
<Hanmac> visof: i think you want: xml.send("Hello:world", :name => "foobar")
<Hanmac> shevy Nokogiri::XML::Builder#method_missing
<shevy> omg
<shevy> XML and method_missing combined
<shevy> can it get any worse than that
<mikecmpbll> another solution just for fun ..
<mikecmpbll> >> [1, 1, 2, 3, 2, 2, 1].join.squeeze.split(//).map(&:to_i)
<eval-in> mikecmpbll => [1, 2, 3, 2, 1] (https://eval.in/76417)
<mikecmpbll> all votes for an Array#squeeze to be added say aye.
<jb41> ; )
<DouweM> dafuq, all these new methods I'm learning about!
<mikecmpbll> >> "aaabbbccccc".squeeze
<eval-in> mikecmpbll => "abc" (https://eval.in/76418)
<mikecmpbll> handy one, that.
klaut has quit [Remote host closed the connection]
ace_striker has joined #ruby
<DouweM> what actual use cases would that method have on a String? on an Array I could see it
<mikecmpbll> intact, that only works if they array elects are just 0-9
<shevy> hmm
<mikecmpbll> in fact*
<shevy> I think I have seen .squeeze before
<DouweM> good point
jprovazn has joined #ruby
olivier_bK has quit [Quit: Quitte]
<shevy> don't think I had needed it yet
yfeldblum has joined #ruby
olivier_bK has joined #ruby
klaut has joined #ruby
aryaching has joined #ruby
<visof> Hanmac: well, i'm in situation which i have hash of tags like this {:name => "foo", :desc => "its foo"} , how can i generate this hash as tags for "Hello:World" ?
<Hanmac> mikecmpbll: as long as the new methods makes sense i say aye! (rails methods for samples doesnt often make sense)
<mikecmpbll> idd :)
ismaelrb has joined #ruby
echevemaster has quit [Quit: Leaving]
nari has quit [Ping timeout: 240 seconds]
<DouweM> I idd a common acronym for indeed in English-speaking countries? :/
<DouweM> *Is
yfeldblum has quit [Ping timeout: 260 seconds]
dEPy has quit [Quit: Computer has gone to sleep.]
danshultz has joined #ruby
dEPy has joined #ruby
includex has joined #ruby
charliesome has joined #ruby
<mikecmpbll> DouweM: not sure how common it is but that's what it means, yes.
<shevy> huh
<shevy> I just found the display() method
<DouweM> I know it does, because it's probably originally from the Dutch "inderdaad", where it makes some sense. I'd never seen it used in English
<DouweM> (I'm Dutch, so I'm very familiar with idd)
fedesilva has joined #ruby
<shevy> Hanmac where is the display method defined?
<shevy> it returns "main"
<shevy> Hanmac cool graph
camilasan has quit [Remote host closed the connection]
phansch has joined #ruby
<shevy> I still dont know what is going on in it though
camilasa_ has joined #ruby
xk_id has quit [Quit:
<Hanmac> shevy: display is defined in Kernel
<mikecmpbll> DouweM: ah you're probably right, i think i picked it up during my gaming days, lots of dutch chaps about then.
<DouweM> mikecmpbll: that's probably it
<shevy> but it's not there
almarshall has joined #ruby
d45h has joined #ruby
<shevy> #chop #eval #exec
<shevy> no #d methods
dEPy has quit [Ping timeout: 246 seconds]
<shevy> found it
Briareos1 has joined #ruby
<DouweM> ;)
<shevy> "Prints obj on the given port (default $>). "
<Hanmac> visof: do you want it like that? <Hello:World name="foo" desc="its foo"/> or as extra sub tags?
<shevy> can someone translates this
<shevy> why do I want display when I can use puts
<DouweM> obj.display ~ puts obj
<Hanmac> >> [1,2,3].each(&:display)
<eval-in> Hanmac => 123[1, 2, 3] (https://eval.in/76446)
wildroman2 has quit [Remote host closed the connection]
hiall has joined #ruby
clevermatt has quit [Remote host closed the connection]
<shevy> >> [1,2,3].each(&:print)
<eval-in> shevy => private method `print' called for 1:Fixnum (NoMethodError) ... (https://eval.in/76449)
<shevy> aha!
<Hanmac> >> [1234].tap(&:display) << 567
<eval-in> Hanmac => [1234][1234, 567] (https://eval.in/76450)
<Hanmac> >> [1,2,3].each(&method(:print))
<eval-in> Hanmac => 123[1, 2, 3] (https://eval.in/76451)
<DouweM> now you're just showing off :P
hiall_ has joined #ruby
thelorax123 has quit [Remote host closed the connection]
Jdubs_ has joined #ruby
dEPy has joined #ruby
popl has quit [Quit: And then there are people who prefer to look their fate in the eye.]
hiall has quit [Ping timeout: 246 seconds]
hiall_ is now known as hiall
thelorax123 has joined #ruby
Jdubs has quit [Ping timeout: 246 seconds]
browndawg has quit [Ping timeout: 260 seconds]
shime has joined #ruby
arefaslani has quit [Ping timeout: 260 seconds]
fluve has quit []
bluOxigen has joined #ruby
tesuji has quit [Read error: Connection reset by peer]
tesuji has joined #ruby
xue has joined #ruby
AlSquirrel has quit [Quit: This computer has gone to sleep]
raphaelivan has joined #ruby
Hanmac1 has joined #ruby
AndChat| has joined #ruby
marr has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
samphippen has joined #ruby
<samphippen> I'm getting deprecation warnings with proc.bind(self)
ace_striker has quit [Ping timeout: 250 seconds]
<samphippen> what's the correct replacement?
funburn has quit [Quit: funburn]
lkba has quit [Ping timeout: 250 seconds]
Reach has quit [Remote host closed the connection]
almarshall has quit [Quit: almarshall]
<samphippen> instance eval
<samphippen> cool
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
AndChat| has quit [Ping timeout: 252 seconds]
oddalot has quit [Quit: Leaving]
oddalot has joined #ruby
Hanmac has joined #ruby
ephemerian has joined #ruby
jonahR has quit [Quit: jonahR]
Xeago has quit [Ping timeout: 246 seconds]
Hanmac1 has quit [Ping timeout: 260 seconds]
danshult_ has joined #ruby
CorySimmons has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
pedda has joined #ruby
matheuscaceres has joined #ruby
seoNinjaWarrior has quit [Quit: Computer has gone to sleep.]
klaut has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
CorySimmons has quit [Ping timeout: 272 seconds]
shaunbaker has quit [Remote host closed the connection]
nhhagen has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
kevinykchan has joined #ruby
ValicekB has quit [Ping timeout: 248 seconds]
mojjojo has quit [Quit: mojjojo]
F1skr has joined #ruby
wildroman2 has joined #ruby
mojjojo has joined #ruby
larssmit has quit [Quit: Leaving.]
mojjojo has quit [Client Quit]
nhhagen has quit [Ping timeout: 245 seconds]
oddalot has quit [Quit: Leaving]
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
browndawg has joined #ruby
<CalimeroTeknik> shevy, it appears that my "numbers everywhere issue" is because http isn't using the socket raw: http://en.wikipedia.org/wiki/Chunked_transfer_encoding
dangerousdave has joined #ruby
mojjojo has joined #ruby
<CalimeroTeknik> maybe Net:HTTP has something that de-chunks?
ValicekB has joined #ruby
danshultz has joined #ruby
Jdubs_ has quit [Remote host closed the connection]
zipper has quit [Ping timeout: 260 seconds]
atno__ has joined #ruby
yfeldblum has joined #ruby
danshult_ has quit [Read error: Connection reset by peer]
danshultz has quit [Read error: Connection reset by peer]
atno has quit [Ping timeout: 260 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
danshultz has joined #ruby
Jdubs has joined #ruby
charliesome has joined #ruby
zipper has joined #ruby
Briareos1_ has joined #ruby
<shevy> CalimeroTeknik hmmm
Briareos1 has quit [Ping timeout: 246 seconds]
<shevy> 4\r\n
<shevy> Wiki\r\n
<shevy> 5\r\n
<shevy> though
<shevy> in the output you had it seemed to jump
<shevy> like 8, 125, 252
<shevy> (or a bit less than that)
yfeldblum has quit [Ping timeout: 240 seconds]
Astralum has quit [Read error: Connection reset by peer]
Astralum has joined #ruby
Briareos1 has joined #ruby
Jdubs has quit [Remote host closed the connection]
Briareos1_ has quit [Ping timeout: 264 seconds]
mklappstuhl has joined #ruby
Mon_Ouie has joined #ruby
himsin has quit [Remote host closed the connection]
himsin has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Elhu has quit [Quit: Computer has gone to sleep.]
amedeiros has joined #ruby
amedeiros is now known as Guest36491
AlSquire has joined #ruby
ismaelrb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fragmachine has joined #ruby
tanema has joined #ruby
Banistergalaxy has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Ping timeout: 245 seconds]
threesome has quit [Read error: Operation timed out]
yeboot has quit [Quit: leaving]
jkamenik has joined #ruby
Liothen has joined #ruby
phansch has quit [Read error: Connection reset by peer]
phansch_ has joined #ruby
nixie has joined #ruby
soba has quit [Ping timeout: 240 seconds]
mercwithamouth has quit [Ping timeout: 240 seconds]
camilasa_ has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
hiyosi has joined #ruby
AlSquire has quit [Quit: Quitte]
camilasan has joined #ruby
ewnd9 has joined #ruby
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
danshult_ has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
hiyosi has quit [Ping timeout: 264 seconds]
Weazy has joined #ruby
danshultz has quit [Ping timeout: 264 seconds]
sensen has joined #ruby
shaunbaker has joined #ruby
raphaelivan has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mboyd has joined #ruby
tedstriker has quit [Ping timeout: 252 seconds]
Xeago has joined #ruby
<CalimeroTeknik> yeah whatever, it matches the size of the following chunk, and it seems it's hexadecimal
<apeiros> CalimeroTeknik: that's chunked encoding
<CalimeroTeknik> yes it is
<CalimeroTeknik> is there some function somewhere or some clever trick to de-chunk?
<CalimeroTeknik> in fact I need to read a line as hexa and delete it, skip the number of bytes specified, and again
<CalimeroTeknik> until the number is zero
amoli has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
lkba has joined #ruby
amoli has joined #ruby
<apeiros> CalimeroTeknik: understanding how chunked encoding works helps. no need for clever tricks then.
<CalimeroTeknik> I'd be fine with using an http library, but I can't find one that will allow me to only download the first kilobyte of the page
<apeiros> correct, the hex states the length of the chunk
jbpros has joined #ruby
<CalimeroTeknik> could pattern matching be used for parsing and thus accurately deleting chunk size info?
fedesilva has quit [Remote host closed the connection]
<apeiros> no
<CalimeroTeknik> I'd need to skip an hexadecimal number of bytes in the expression
<CalimeroTeknik> guess it's not possible
dgfdgf has quit [Ping timeout: 246 seconds]
Elhu has joined #ruby
<apeiros> CalimeroTeknik: decoding chunked data is like 3 lines of ruby. write a method for it and be done.
<_br_> Anyone have an idea how to merge rack's config.ru map with em-proxy?
sensen has quit [Ping timeout: 246 seconds]
ayaz_ has joined #ruby
mklappstuhl has joined #ruby
xk_id has joined #ruby
CorySimmons has joined #ruby
psyl0n has quit [Remote host closed the connection]
psyl0n has joined #ruby
psyl0n has joined #ruby
psyl0n has quit [Changing host]
decoponio has joined #ruby
MattStratton has joined #ruby
danshult_ has quit [Remote host closed the connection]
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
danshultz has joined #ruby
ayaz_ has quit [Client Quit]
fedesilva has joined #ruby
RaCx has joined #ruby
ayaz has quit [Quit: leaving]
intuxicated has quit [Ping timeout: 252 seconds]
ayaz has joined #ruby
intuxicated has joined #ruby
ayaz has quit [Changing host]
ayaz has joined #ruby
CorySimmons has quit [Ping timeout: 246 seconds]
sevenseacat has joined #ruby
Jetchisel has quit [Remote host closed the connection]
<CalimeroTeknik> aaah what will I do for https :x
danshultz has quit [Ping timeout: 252 seconds]
nhhagen has joined #ruby
fragmachine has quit [Remote host closed the connection]
ffranz has joined #ruby
<CalimeroTeknik> implementing a web client on a raw socket was a bad idea from the start; but I did that for one only reason: so I could limit the download to the first kilobyte of the reply
<CalimeroTeknik> can the http library do that?
shaunbaker has quit [Remote host closed the connection]
<apeiros> if you can, use a range request
Fire-Dragon-DoL has joined #ruby
<apeiros> and yes, net/http should be able to do that
<CalimeroTeknik> I'm not guaranteed to get only that data
<CalimeroTeknik> I need to cut the connection on my side to be sure
shaunbaker has joined #ruby
<apeiros> that doesn't guarantee that you "don't get" the data either. all it ensures is that the unread data is thrown away.
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shaunbaker has quit [Remote host closed the connection]
<CalimeroTeknik> well, closing a TCP connection is pretty efficient to not receive more data on it, right? the other peer will also notice it
<apeiros> and yes, unless you're communicating with a broken webserver, a range request will only return you the range you requested
<CalimeroTeknik> I can't receive more than the TCP window
<CalimeroTeknik> well… I don't want to assume it's not broken (that is a sane reasoning, right?)
thelorax123 has quit [Remote host closed the connection]
nhhagen has quit [Ping timeout: 252 seconds]
<CalimeroTeknik> looking at http://ruby-doc.org/stdlib-2.0.0/libdoc/net/http/rdoc/Net/HTTP.html but I don't really know what to look for
ewnd9 has quit [Remote host closed the connection]
<CalimeroTeknik> to close the TCP connection after I got what I asked for
thelorax123 has joined #ruby
`MArceLL` has joined #ruby
wildroman2 has quit [Remote host closed the connection]
Al__ has joined #ruby
arefaslani has joined #ruby
fedesilv_ has joined #ruby
yfeldblum has joined #ruby
fedesilva has quit [Read error: Connection reset by peer]
jkamenik1 has joined #ruby
klaut has joined #ruby
jkamenik has quit [Ping timeout: 250 seconds]
fedesilva has joined #ruby
himsin has quit [Quit: himsin]
billy_ran_away has quit [Ping timeout: 246 seconds]
arefaslani has quit [Ping timeout: 260 seconds]
paolooo has joined #ruby
mary5030 has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
fedesilv_ has quit [Ping timeout: 260 seconds]
lsmola has quit [Ping timeout: 260 seconds]
ArchBeOS-work has joined #ruby
kreisys has quit [Quit: Computer has gone to sleep.]
fedesilva has quit [Remote host closed the connection]
xcv_ has joined #ruby
mary5030 has quit [Remote host closed the connection]
yalue has joined #ruby
seoNinjaWarrior has joined #ruby
vt102 has joined #ruby
zipper has quit [Ping timeout: 245 seconds]
fedesilva has joined #ruby
nixie has quit [Ping timeout: 246 seconds]
fedesilva has quit [Read error: Connection reset by peer]
xcv has quit [Ping timeout: 250 seconds]
fedesilva has joined #ruby
ismaelrb has joined #ruby
fedesilva has quit [Read error: Connection reset by peer]
awkwords has joined #ruby
falsetto has joined #ruby
fedesilva has joined #ruby
ua_ has joined #ruby
klaut_ has joined #ruby
_Andres has joined #ruby
klaut has quit [Read error: Connection reset by peer]
<Hanmac> shevy did you know there is a object where o.frozen? is false but o.to_s.frozen? is true ;P
zipper has joined #ruby
<Hanmac> >> ObjectSpace.each_object.select{|c|!c.frozen? && c.to_s.frozen?}
<eval-in> Hanmac => [#<SystemStackError: stack level too deep>] (https://eval.in/76497)
sng|afk has quit [Ping timeout: 245 seconds]
mark_locklear has joined #ruby
<awkwords> anyone used highline before? https://github.com/JEG2/highline? how do i ask something and save the result as a symbol
ismaelrb has quit [Quit: Textual IRC Client: www.textualapp.com]
ismaelrb has joined #ruby
ua has quit [Ping timeout: 260 seconds]
varfoo has quit [Quit: WeeChat 0.4.0]
tkuchiki has quit [Remote host closed the connection]
ewnd9 has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
Banistergalaxy has joined #ruby
MattStratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> Hanmac I think you showed that method once
<shevy> Hanmac and you are trying to break the bot again!
hiyosi has joined #ruby
phansch_ has quit [Ping timeout: 272 seconds]
<shevy> Hanmac, I am in the process of making all of my configuration updateable via ruby scripts
<Hanmac> shevy: about the frozen vs non-frozen ... try it in your irb/ruby it also happens there
zipper has quit [Quit: leaving]
Zai00 has quit [Ping timeout: 245 seconds]
zipper has joined #ruby
<shevy> is that a bug?
brian___ has joined #ruby
brian___ has quit [Client Quit]
<Hanmac> maybe i dont know ;P
falsetto has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Zai00 has joined #ruby
Arzaga has joined #ruby
kaldrenon has joined #ruby
diegoviola has joined #ruby
TwinkleH1od is now known as TwinkleHood
ffranz has quit [Ping timeout: 246 seconds]
dawkirst has joined #ruby
<awkwords> >> something='blah'
<awkwords> => "blah"
<awkwords> => nil
<awkwords> something
<awkwords> >> puts :something.to_s
<eval-in> awkwords => "blah" (https://eval.in/76503)
<eval-in> awkwords => something ... (https://eval.in/76504)
<awkwords> >>
<eval-in> awkwords => nil (https://eval.in/76505)
Kabaka has quit [Ping timeout: 240 seconds]
matheuscaceres has quit [Quit: matheuscaceres]
lucazi has joined #ruby
ismaelrb has quit [Quit: Textual IRC Client: www.textualapp.com]
<CalimeroTeknik> how can I tell socket.read() to time out after one second?
phansch has joined #ruby
ffranz has joined #ruby
phantummm has joined #ruby
_amir has joined #ruby
Guest36491 is now known as amedeiros
Tarential has quit [Excess Flood]
Tarential has joined #ruby
kh019267 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Arzaga has quit [Quit: Computer has gone to sleep.]
TheCyberCriminal has joined #ruby
einarj has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
mando has joined #ruby
joliss has joined #ruby
joliss has left #ruby [#ruby]
_maes_ has joined #ruby
CorySimmons has joined #ruby
fedesilva has quit [Remote host closed the connection]
thelorax123 has quit [Remote host closed the connection]
drumusician has joined #ruby
tanema has quit [Remote host closed the connection]
burlyscudd has joined #ruby
thelorax123 has joined #ruby
<CalimeroTeknik> how do I catch errors in ruby so the program doesn't end on one?
yacks has joined #ruby
<CalimeroTeknik> this dies with an error: http://sprunge.us/ZDXe
<mando> CalimeroTeknik: you've got one too many 'end's in there
seoNinjaWarrior has quit [Quit: Computer has gone to sleep.]
awea has joined #ruby
<mando> oh, no you don't :)
<mando> sorry
<CalimeroTeknik> if I try to remove one, it's a syntax error
mojjojo has quit [Quit: mojjojo]
<CalimeroTeknik> no, it dies in the timeout error
<mando> what error are you getting?
<mando> that code runs fine for me
<CalimeroTeknik> /usr/lib/ruby/1.8/timeout.rb:64: execution expired (Timeout::Error)
<CalimeroTeknik> from test.rb:3
<Hanmac> CalimeroTeknik: use newer ruby
Elhu has joined #ruby
<CalimeroTeknik> meh… there should be a way for 1.8, right?
mojjojo has joined #ruby
<mando> works fine for me under 1.8.6
jamesaanderson has joined #ruby
<Hanmac> you using rescue wrong ... and you need newer ruby
<CalimeroTeknik> this is 1.8.7
agjacome has joined #ruby
phansch has quit [Ping timeout: 250 seconds]
<CalimeroTeknik> I want to get rid of the error
Lewix has quit [Remote host closed the connection]
<mando> sorry, I don't have 1.8.7 installed
polymar has joined #ruby
* Hanmac 's nindo is "not support badly outdated software"
<mando> but under 1.8.6, this code works fine
polymar has quit [Remote host closed the connection]
<mando> ahhh, I see now
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<CalimeroTeknik> yeah right; well, I thought even ruby 1.8 had support for exception handling
<Hanmac> mando & CalimeroTeknik compare your codes, look at what possition "rescue" is
CorySimmons has quit [Ping timeout: 252 seconds]
<mando> yup
<mando> Hanmac's right
mojjojo has quit [Client Quit]
iamjarvo has joined #ruby
<mando> I don't believe the line 'end rescue Timeout::Error end' is being parsed the way you expect, CalimeroTeknik
<CalimeroTeknik> oh I see. it's caught and returned with my code
<mando> yup
thelorax123 has quit [Remote host closed the connection]
mojjojo has joined #ruby
seoNinjaWarrior has joined #ruby
casheew_ has joined #ruby
thelorax123 has joined #ruby
eyckelbo1m is now known as eyckelboom
MattStratton has joined #ruby
klaut_ has quit [Remote host closed the connection]
mojjojo has quit [Client Quit]
nhhagen has joined #ruby
kreisys has joined #ruby
kreisys has quit [Read error: Connection reset by peer]
hogeo has quit [Remote host closed the connection]
mojjojo has joined #ruby
falood has quit [Remote host closed the connection]
<dEPy> is there a way to see which class/module called my method?
<hoelzro> yes
krnflake_ has joined #ruby
danshultz has joined #ruby
xerxas_ has joined #ruby
<dEPy> this just gives files
<CalimeroTeknik> I dislike exceptions, so got rid of them! begin timeout(1) do sleep(5) end;rescue Timeout::Error => dead;end
hadees has quit [Ping timeout: 245 seconds]
<hoelzro> ah, sure enough.
nhhagen has quit [Ping timeout: 245 seconds]
threesome has joined #ruby
shaunbaker has joined #ruby
Xeago has quit [Remote host closed the connection]
TheCyberCriminal has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
casheew has quit [Read error: Connection reset by peer]
krnflake has quit [Ping timeout: 252 seconds]
xerxas has quit [Ping timeout: 252 seconds]
gtsiftsis has quit [Ping timeout: 252 seconds]
phrozen77 has quit [Ping timeout: 252 seconds]
gtsiftsis has joined #ruby
xpirator has quit [Ping timeout: 252 seconds]
xerxas_ is now known as xerxas
shaunbak_ has joined #ruby
xpirator has joined #ruby
phrozen77 has joined #ruby
shaunbak_ has quit [Remote host closed the connection]
vpretzel has joined #ruby
tylersmith has joined #ruby
dhruvasagar has joined #ruby
zkc has joined #ruby
shaunbaker has quit [Ping timeout: 250 seconds]
tedstriker has joined #ruby
Kricir has joined #ruby
mando has quit [Remote host closed the connection]
yfeldblum has joined #ruby
matheuscaceres has joined #ruby
nari has joined #ruby
Astral_ has joined #ruby
synergy has joined #ruby
lucazi has quit [Ping timeout: 240 seconds]
phantasm66 has joined #ruby
phantasm66 has joined #ruby
bluenemo has joined #ruby
polaco_zZz is now known as polaco
Astralum has quit [Ping timeout: 260 seconds]
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 252 seconds]
wildroman2 has joined #ruby
ewnd9 has quit [Ping timeout: 260 seconds]
sevenseacat has quit [Quit: Leaving.]
phansch has joined #ruby
lucazi has joined #ruby
mengu has quit [Remote host closed the connection]
sailias has joined #ruby
klaut has joined #ruby
cescalante is now known as ce_afk
<slap_stick> hm is there a neat quick way of taking a hash and duplicating each key but obviously with a new name so the numebr of keys equals the size of another hash i.e. say i have h1 and h2 i want h1 to duplicate the same key layout til it is equal in the number of keys of h2
klaut has quit [Remote host closed the connection]
<apeiros> slap_stick: care to give a concrete example?
breakingthings has joined #ruby
aganov has quit [Quit: aganov]
moshee has quit [Ping timeout: 252 seconds]
<slap_stick> yeh so one solutino, which i dont like is h1.each_pair { |k,v| i = 0 while i<h2.size { h1[k+i] = v } } somehting like that bnot sure if that works as didn't test it
lucazi has quit [Ping timeout: 245 seconds]
lucazi has joined #ruby
mengu has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
taion809 has quit [Ping timeout: 260 seconds]
petey has joined #ruby
RaCx has joined #ruby
<apeiros> I'm more interested in a example of in-/output
klaut has joined #ruby
<apeiros> the above - ignoring the broken code - seems to create h1.size*h2.size keys in h1
enebo has joined #ruby
<apeiros> which conflicts already with how I understood your initial question
kh019267 has joined #ruby
<slap_stick> it's ok i'll figure it out but thanks ;-)
ewnd9 has joined #ruby
TMM has quit [Quit: Ex-Chat]
jerius has joined #ruby
petey has quit [Remote host closed the connection]
petey has joined #ruby
<apeiros> slap_stick: ok, that's annoying.
dEPy has quit [Quit: Lingo - http://www.lingoirc.com]
<apeiros> either go and figure it out yourself or ask. but don't half-ask and walk away.
h_kon has quit [Remote host closed the connection]
duggiefresh has joined #ruby
Xeago has joined #ruby
mjs2600 has joined #ruby
ExxKA has joined #ruby
<slap_stick> sorry, it just requires a bigger explanatino to what i am trying to do for you to understand and give a decent answer and i've figured out a way now that works and so saved both me and you having a big long conversation about what it is i am really trying to do in detail
petey has quit [Ping timeout: 246 seconds]
<slap_stick> wasn't me being annoying deliberately, just got to the bottom of it myself, penny dropped
seoNinjaWarrior has quit [Quit: Computer has gone to sleep.]
liamkeily has joined #ruby
lukec has joined #ruby
_maes_ has joined #ruby
javon has joined #ruby
iamjarvo has quit [Remote host closed the connection]
lucazi has quit [Quit: Textual IRC Client: www.textualapp.com]
fedesilva has joined #ruby
kevinykc_ has joined #ruby
iamjarvo has joined #ruby
pzula has joined #ruby
kristofers has joined #ruby
mary5030 has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
vongrippen has quit [Quit: No Ping reply in 180 seconds.]
Xeago has quit [Ping timeout: 250 seconds]
iamjarvo has quit [Ping timeout: 246 seconds]
mary5030_ has joined #ruby
joonty has quit [Ping timeout: 246 seconds]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mary5030 has quit [Read error: Connection reset by peer]
aganov has joined #ruby
seoNinjaWarrior has joined #ruby
agjacome has quit [Quit: leaving]
Kricir has quit [Remote host closed the connection]
kristofers has quit [Ping timeout: 252 seconds]
ehc has joined #ruby
xcv_ has quit [Remote host closed the connection]
xcv has joined #ruby
mary5030_ has quit [Remote host closed the connection]
Kricir has joined #ruby
mary5030 has joined #ruby
tanema has joined #ruby
shaunbaker has joined #ruby
elux has joined #ruby
ravster has joined #ruby
gianlucadv has quit [Ping timeout: 260 seconds]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
dhruvasagar has joined #ruby
blaskovicz has joined #ruby
lemonsparrow_ has joined #ruby
spyderman4g63 has joined #ruby
mojjojo has quit [Quit: mojjojo]
joonty has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
failshell has joined #ruby
mikecmpbll has joined #ruby
kcombs_ has joined #ruby
browndawg has quit [Quit: Leaving.]
nhhagen has joined #ruby
tannerburson has joined #ruby
sepp2k has joined #ruby
lemonsparrow is now known as Guest76116
hadees has joined #ruby
lemonsparrow_ is now known as lemonsparrow
seoNinjaWarrior has quit [Quit: Computer has gone to sleep.]
nomenkun has joined #ruby
awkwords has quit [Quit: Leaving.]
mdel has joined #ruby
goshakkk has joined #ruby
klaut has quit [Remote host closed the connection]
domakesaythings has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
amedeiros has quit [Ping timeout: 240 seconds]
johnnyfuchs has joined #ruby
nhhagen has quit [Ping timeout: 252 seconds]
domakesaythings has left #ruby [#ruby]
amoli has quit [Ping timeout: 272 seconds]
iamchrisf has joined #ruby
lfox has joined #ruby
norm has joined #ruby
Kabaka has joined #ruby
noop has quit [Ping timeout: 246 seconds]
<norm> i'm reading a binary file, and am getting back \u001F\x8B. why is that first character a \u001F and not \x1F ?
<norm> (admittedly a file encoding question, not pure ruby)
appineer has joined #ruby
johnnyfuchs has left #ruby [#ruby]
stin4u has joined #ruby
<elux> hrmm whats the deal with rbenv being so slow to add new updates..
taion809 has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
jedimind has joined #ruby
freerobby has joined #ruby
moshee has joined #ruby
mojjojo has joined #ruby
michael_lee has quit [Quit: Ex-Chat]
lukec has quit [Quit: lukec]
<norm> oh nevermind, i use gets on a binary file, i should have used .read
RaCx has joined #ruby
burlyscudd has quit [Quit: Leaving.]
lemonsparrow has quit [Quit: Page closed]
shaunbaker has quit [Remote host closed the connection]
<_br_> Interesting Question. If you would think completely objective (no ruby prejudice), in what language would you write a Chat bot system consisting of worker nodes (deployed in guests, connecting back to some C&C node), a C&C node which has separate modules handling NLP, heuristic AI, etc.
kristofers has joined #ruby
hogeo has joined #ruby
<CalimeroTeknik> how do I set a timeout for read() on a socket?
<CalimeroTeknik> it didn't work with socket.setsockopt Socket::SOL_SOCKET, Socket::SO_RCVTIMEO, [1, 0].pack("l_2")
thesheff17 has joined #ruby
momomomomo has joined #ruby
saltnvinegar has joined #ruby
vongrippen has joined #ruby
pzula has quit [Quit: Lost terminal]
drag00n has joined #ruby
Xeago has joined #ruby
krawchyk has joined #ruby
iamjarvo has joined #ruby
<Hanmac> norm:
<Hanmac> >> [\u001F\x8B" == "\x1F\x8B", "\x1F\x8B"]
goshakkk has quit [Read error: Connection reset by peer]
<eval-in> Hanmac => /tmp/execpad-18ba3369ce5d/source-18ba3369ce5d:2: syntax error, unexpected $undefined, expecting ']' ... (https://eval.in/76531)
javon has quit [Ping timeout: 250 seconds]
<Hanmac> >> ["\u001F\x8B" == "\x1F\x8B", "\x1F\x8B"]
<eval-in> Hanmac => [true, "\u001F\x8B"] (https://eval.in/76532)
<norm> Hanmac: huh. i swear that was false a minute ago.
<norm> thanks
wildroman2 has quit [Remote host closed the connection]
javon has joined #ruby
shaunbaker has joined #ruby
macmartine has joined #ruby
macmartine has quit [Remote host closed the connection]
hogeo has quit [Ping timeout: 240 seconds]
iamchrisf has quit [Quit: iamchrisf]
goshakkk has joined #ruby
mojjojo has quit [Quit: mojjojo]
shaunbaker has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
mojjojo has joined #ruby
stin4u has quit [Quit: Leaving]
tonni has quit [Ping timeout: 264 seconds]
iamchrisf has joined #ruby
Shidash has quit [Ping timeout: 252 seconds]
jamesaanderson has joined #ruby
ce_afk is now known as cescalante
mando has joined #ruby
jamesaanderson has quit [Client Quit]
momomomomo has quit [Quit: momomomomo]
shime has quit [Ping timeout: 240 seconds]
Megtastique has joined #ruby
phantummm has quit [Quit: phantummm]
momomomomo has joined #ruby
tonni has joined #ruby
tagrudev has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
mlpinit has joined #ruby
amritanshu_RnD has quit [Quit: Leaving]
mengu has quit []
divi_ has joined #ruby
aganov has quit [Remote host closed the connection]
F1skr has quit [Quit: WeeChat 0.4.2]
moshee has quit [Ping timeout: 264 seconds]
tesuji has quit [Ping timeout: 264 seconds]
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
taion809 has quit [Ping timeout: 252 seconds]
bluenemo has quit [Remote host closed the connection]
wildroman2 has joined #ruby
angusigu1ss has joined #ruby
mudmaster has joined #ruby
nowthatsamatt has joined #ruby
cescalante is now known as ce_afk
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ce_afk is now known as cescalante
similian has joined #ruby
<similian> hello fellow rubianians
jamesaanderson has joined #ruby
dweeb_ has joined #ruby
<waxjar> impostor! rubyists is the term :P
Clooth has quit [Quit: Leaving...]
dangerousdave has joined #ruby
yfeldblum has joined #ruby
klaut has joined #ruby
mjs2600 has quit [Remote host closed the connection]
<similian> muhaah
<similian> well that sound quite dry tho
<Hanmac> waxjar: i think he is a railsian in camouflage
jamesaanderson has quit [Client Quit]
<similian> thats the one !!!
mudmaste_ has joined #ruby
* waxjar runs
<similian> :/
<similian> no web app questions ?
<similian> ???
bean__ has joined #ruby
<similian> its off topic anyway ...
mudmaster has quit [Ping timeout: 264 seconds]
jb41 has quit [Quit: leaving]
kevind has joined #ruby
<similian> I would like to extend my web app with cms functionality. And wondered if there was a nice way to have some sort of nestet css where i could include my default form/ui parts.
<similian> Example: You can set your header footer and custom css. Yet the login form of my app stays in my style.
<similian> iframes are just not funny.
<similian> ( kick-ban? )
pzula has joined #ruby
zz_tsykoduk is now known as tsykoduk
GreatSUN has quit [Ping timeout: 250 seconds]
rippa has joined #ruby
sailias has quit [Quit: Leaving.]
shaunbaker has joined #ruby
kevind has quit [Client Quit]
lmickh has joined #ruby
BackEndCoder has joined #ruby
kevind has joined #ruby
liamkeily has quit [Ping timeout: 250 seconds]
moshee has joined #ruby
taion809 has joined #ruby
starfox21 has joined #ruby
aspires has joined #ruby
Zesty has joined #ruby
jibi has joined #ruby
g0bl1n has joined #ruby
<_br_> similian: Your question is puzzling. You mean header, footer load one set of CSS and main content another set of CSS which both needs to be applied independently?
sailias has joined #ruby
tonni has quit [Remote host closed the connection]
tonni has joined #ruby
browndawg has joined #ruby
pzula has quit [Quit: Lost terminal]
pzula has joined #ruby
sebkomianos has joined #ruby
pushpak has joined #ruby
iamjarvo has quit [Remote host closed the connection]
sebkomianos has quit [Remote host closed the connection]
mojjojo has quit [Quit: mojjojo]
phil_b has quit [Ping timeout: 264 seconds]
iamjarvo has joined #ruby
nwertman has quit [Ping timeout: 246 seconds]
shime has joined #ruby
paolooo has quit [Quit: Page closed]
Macaveli has quit [Quit: This computer has gone to sleep]
jbpros has quit [Quit: jbpros]
tonni has quit [Ping timeout: 240 seconds]
shaunbaker has quit [Remote host closed the connection]
jprovazn has quit [Quit: Odcházím]
sebkomianos has joined #ruby
fedesilv_ has joined #ruby
pzula has quit [Quit: Lost terminal]
pzula has joined #ruby
baroquebobcat has joined #ruby
olivier_bK has quit [Ping timeout: 252 seconds]
moshee has quit [Ping timeout: 260 seconds]
shaunbaker has joined #ruby
wallerdev has joined #ruby
taion809 has quit [Ping timeout: 240 seconds]
fedesilva has quit [Ping timeout: 245 seconds]
kristofers has quit [Remote host closed the connection]
hogeo has joined #ruby
ziyadb has joined #ruby
jl- has joined #ruby
blaskovicz1 has joined #ruby
jl- has left #ruby [#ruby]
<shevy> dumdedum
<similian> _br_ correct
zeeraw has joined #ruby
blaskovicz has quit [Ping timeout: 240 seconds]
apeiros has quit [Remote host closed the connection]
blaskovicz has joined #ruby
shaunbaker has quit [Remote host closed the connection]
vt102 has quit [Remote host closed the connection]
pzula has quit [Ping timeout: 246 seconds]
zz_N00D is now known as CripperZ
rdark has joined #ruby
ambushsabre has joined #ruby
includex has quit [Quit: Textual IRC Client: www.textualapp.com]
petey has joined #ruby
iamchrisf has quit [Quit: iamchrisf]
digital-ghost has joined #ruby
pzula has joined #ruby
<rdark> I'm reading the value of a method, defined by a variable using public_send, but any ideas how I would reverse this and update the value using a variable?
mjs2600 has joined #ruby
blaskovicz1 has quit [Ping timeout: 264 seconds]
slap_stick has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
DrForr_ is now known as DrForr
sguselnikov has joined #ruby
sguselnikov has quit [Client Quit]
iamchrisf has joined #ruby
bline79 has quit [Quit: Leaving]
<_br_> similian: applying different styling as you want it is impossible since the DOM is one entity. What you want is to make sure that ids/classes are not affecting each other.
momomomomo has quit [Quit: momomomomo]
wallerdev has quit [Quit: wallerdev]
udoprog has joined #ruby
arietis has joined #ruby
doggfrank has joined #ruby
moshee has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
jprovazn has joined #ruby
taion809 has joined #ruby
<similian> okay so i would have to reorganize the css accordingly
seoNinjaWarrior has joined #ruby
mando has quit [Remote host closed the connection]
<_br_> I had a similar issue like you
<_br_> one part of an app coming from nodejs stack via proxy into an exist app.
mando has joined #ruby
_maes_ has quit [Read error: Connection reset by peer]
Kricir has quit [Remote host closed the connection]
<similian> i created a less file where bootstrap is nested into a custom-class
thelorax123 has quit [Remote host closed the connection]
<similian> yup similar problem
<_br_> well, just apply nested CSS rules to split the effect of applied CSS.
<_br_> but don't go all out inception with too many layers :)
<similian> okay ... i see
Hanmac1 has joined #ruby
<similian> do you find this developer friendly ... :/
thelorax123 has joined #ruby
phantummm has joined #ruby
<similian> would it be easy to copy paste custome bits in an editor
yo61 has joined #ruby
bentonrr has joined #ruby
<similian> well i will just try an see :D
Hanmac has quit [Ping timeout: 245 seconds]
freerobby has joined #ruby
xue has quit [Quit: Konversation terminated!]
camilasan has quit [Remote host closed the connection]
<_br_> developer friendly?
MrZYX|off is now known as MrZYX
nwertman has joined #ruby
Newls has joined #ruby
<similian> well i would supply my nested css
<similian> an you could include my stuff into your page
visof has quit [Ping timeout: 240 seconds]
<_br_> if you write your css correctly that is no issue
<similian> i hope you wont have to hassle with my css
matheuscaceres has quit [Quit: matheuscaceres]
Zesty has quit [Quit: Linkinus - http://linkinus.com]
<similian> I see !!! thats what i needed to know!!!
breakingthings has quit []
<similian> thx _br_ !!!
<_br_> np
<Newls> Hello Ruby Peoples ! I have a question to ask, i use an app built with ruby (the excellent Gitlab) which i run on a server running archlinux. Everything was working fine since after an update my libicui18n.so.51 needed by charlock_holmes is not there anymore, replaced by it's .52.something version
geggam has joined #ruby
petey has quit [Remote host closed the connection]
arietis has quit [Quit: Computer has gone to sleep.]
doggfrank has quit [Quit: Leaving]
petey has joined #ruby
<Newls> The question is : do I need to rebuild the gem ? and what is the best way to do that in my case
gtsiftsis has quit [Quit: Leaving]
clamstar has joined #ruby
<Newls> Thank you a lot in advance !
atno__ is now known as atno
xk_id has quit [Quit:
tonni has joined #ruby
<shevy> gem is not in control over .so files on your system
iamjarvo has quit [Remote host closed the connection]
<_br_> Newls: Yes.
iamjarvo has joined #ruby
<Newls> i know, but this gem (charlock_holmes) need either be recompiled or something or I need to recompile libicu.51
<Newls> thanks _br_ :)
macmartine has joined #ruby
saltnvinegar has quit [Quit: saltnvinegar]
tonni has quit [Remote host closed the connection]
seoNinjaWarrior has quit [Quit: Computer has gone to sleep.]
<Newls> _br_: i'm not finding what i need on google, what is the command to just make it recompile agin ?
<_br_> Well, I don't know charlock_holmes, but I suspect libicui18n.so.51 was just a symlink to libicui18n.so
tonni has joined #ruby
<_br_> Newls: You need to recompile the lib from arch via pacman and you need to reinstall the gem
petey has quit [Ping timeout: 240 seconds]
<Newls> yes, I made the link again to test, and I had some other errors beacause the binary lib wasnt good in that version
<Newls> SYMBOL something
momomomomo has joined #ruby
<Newls> that is possible to use an old version ?
Azure has joined #ruby
maxmouchet has joined #ruby
<_br_> downgrading? sure, just downgrade your lib on arch and reinstall the gem
<Newls> ok I can just use the pacman 's stable version (the last)
<_br_> Newls: There is a #gitlab channel btw.
<Newls> :)
<Newls> thanks _br_ :)
seoNinjaWarrior has joined #ruby
dkamioka has joined #ruby
wildroman2 has quit [Remote host closed the connection]
tsykoduk is now known as zz_tsykoduk
zz_tsykoduk is now known as tsykoduk
arietis has joined #ruby
<_br_> np
zkc has quit [Quit: Leaving]
tonni has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
macmartine has quit [Remote host closed the connection]
browndawg has quit [Quit: Leaving.]
maxmouchet has quit []
zipper has quit [Quit: Lost terminal]
Clooth has joined #ruby
Clooth has quit [Client Quit]
alup has quit [Quit: Leaving]
_DrForr has joined #ruby
klaut has quit [Remote host closed the connection]
spider-mario has joined #ruby
andikr has quit [Remote host closed the connection]
duggiefresh has quit [Read error: Connection reset by peer]
DrForr has quit [Ping timeout: 246 seconds]
maxmouchet has joined #ruby
tonni has joined #ruby
maxmouchet is now known as m-o-s
jacobsmith has joined #ruby
CaptainJet has joined #ruby
pedda has quit [Quit: Textual IRC Client: www.textualapp.com]
_DrForr is now known as DrForr
tjbiddle has joined #ruby
IceDragon has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<dkamioka> anyone has experience with Jbuilder (rails, but there noone answered)
<shevy> never heard of it before
noname001__ has quit [Ping timeout: 245 seconds]
tsykoduk is now known as zz_tsykoduk
klaut has joined #ruby
awkwords has joined #ruby
<_br_> jbuilder? java thing?
mansi has joined #ruby
RaCx has joined #ruby
Spami has joined #ruby
hadees has quit [Quit: hadees]
bluOxigen has quit [Ping timeout: 264 seconds]
duggiefresh has joined #ruby
matheuscaceres has joined #ruby
xk_id has joined #ruby
sambao21 has joined #ruby
clevermatt has joined #ruby
g0bl1n has quit [Quit: Ex-Chat]
<shevy> hehe
burlyscudd has joined #ruby
pel_daniel has joined #ruby
jsaak has quit [Ping timeout: 252 seconds]
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
wildroman2 has joined #ruby
cleverma_ has joined #ruby
jbpros has joined #ruby
clevermatt has quit [Ping timeout: 240 seconds]
Hanmac has joined #ruby
shadoi has joined #ruby
jhaals has quit [Ping timeout: 272 seconds]
nomenkun has quit [Remote host closed the connection]
vt102 has joined #ruby
nomenkun has joined #ruby
Hanmac1 has quit [Ping timeout: 250 seconds]
momomomomo has quit [Quit: momomomomo]
Atrophius has joined #ruby
hogeo has quit [Remote host closed the connection]
ahawkins has quit [Ping timeout: 240 seconds]
<CalimeroTeknik> oh no! recvfrom is blocking?
wallerdev has joined #ruby
awkwords has quit [Quit: Leaving.]
acrussell has joined #ruby
d45h has quit []
phantummm has quit [Quit: phantummm]
arefaslani has joined #ruby
<sebkomianos> hey guys, can I bother you with a newbie question about gems and scopes?
|jemc| has joined #ruby
Czupa has joined #ruby
nixie has joined #ruby
RaCx has quit [Ping timeout: 240 seconds]
|jemc| has left #ruby [#ruby]
<sebkomianos> I mean, I know, "don't ask to ask, just ask", but would someone go over a gist with me? I am failing to get a few things
RaCx has joined #ruby
<havenwood> sebkomianos: Paste the Gist?
Monie has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
m-o-s_ has joined #ruby
<shevy> CalimeroTeknik are you *still* investigating?!?!
<shevy> sebkomianos not sure what you mean with scopes
Spami has quit [Quit: This computer has gone to sleep]
phantummm has joined #ruby
jkhwan has joined #ruby
<CalimeroTeknik> yeah, looking for a valid solution to get the first kilobyte of an http link with a one-second timeout
<CalimeroTeknik> to no avail so far
nhhagen has joined #ruby
nixie has quit [Ping timeout: 245 seconds]
<shevy> oh god, is that ruby code or an alien language
mjs2600 has quit [Remote host closed the connection]
mroth has quit [Ping timeout: 245 seconds]
<CalimeroTeknik> I've seen worse!
seoNinjaWarrior has quit [Quit: Computer has gone to sleep.]
<shevy> this is all so extremely domain specific
<shevy> def self.has limit, name, options = {}
mroth has joined #ruby
<sebkomianos> haha, really? I'd love to hear suggestions
<shevy> and they don't even use () anymore :(
shadoi has quit [Quit: Leaving.]
saltnvinegar has joined #ruby
m-o-s has quit [Ping timeout: 260 seconds]
tannerburson has quit [Quit: tannerburson]
ewnd9 has quit [Read error: Connection reset by peer]
<shevy> so where is the scope related thingy?
mojjojo has joined #ruby
<Hanmac> sebkomianos: when you want to monkeypatch ActiveRecord you need to do that AFTER you require "activerecord" ... its like repainting a wall before the house is build
momomomomo has joined #ruby
jetblack has joined #ruby
<sebkomianos> shevy: on line 17 (https://gist.github.com/sebkomianos/8138387a1b855c95d271#file-gemscope-rb-L17), if I type name I get the name of the class (Tst), not the name that was passed in the "has" method
m-o-s_ has quit [Ping timeout: 260 seconds]
lukec has joined #ruby
<Hanmac> sebkomianos: "options[:validate] = false unless options[:validate] == true" why is that ?? i mean it doesnt make any sense?
<shevy> that's really not easy to find out what is going on
sepp2k has quit [Read error: Connection reset by peer]
petey_ has joined #ruby
<shevy> sebkomianos, you seem to pass in the symbol called :users right?
<sebkomianos> shevy: and then on line 18, "errors" gives a `method_missing': undefined local variable or method error
xcv has quit [Read error: Connection reset by peer]
<shevy> errors does not respond to add method?
<shevy> where from does errors come
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Hanmac> shevy: no it means there is no errors method/variable
<shevy> right
<shevy> there is no errors thing known to ruby at that time
aspires has quit []
<shevy> btw why is pry there on line 17
sambao21 has quit [Quit: Computer has gone to sleep.]
mikecmpbll has joined #ruby
<Hanmac> sebkomianos: that is also "name.to_sym" a bit evil/dumb ... i mean what else should use use? and the orginal has_ methods should care about that problem
<sebkomianos> shevy: I am using pry to try see what's going on
mojjojo has quit [Quit: mojjojo]
arietis has joined #ruby
olivier_bK has joined #ruby
<shevy> aha
<shevy> you do weird things
Lewix has joined #ruby
<sebkomianos> shevy: haha, I can imagine it looks bad
<shevy> btw
<shevy> if options[:validate] == true
<shevy> this is usually not necessary
<shevy> if condition
<Hanmac> shevy: i also like "name.to_sym.size" ;P
<shevy> >> x = true; puts 'hi sebkomianos' if x
<eval-in> shevy => hi sebkomianos ... (https://eval.in/76568)
<shevy> he seems to do a lot of #to_sym
<sebkomianos> Hanmac: the "options[:validate]" is there because I want to default it to false if no value was given to it
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Banistergalaxy has quit [Ping timeout: 240 seconds]
<shevy> this one is the most confusing
<shevy> Hanmac, explain: has_many name.to_sym, -> { limit(limit) }, options
<interactionjaxsn> sebkomianos: use options.fetch(:validate){ false }
liamkeily has joined #ruby
<Hanmac> sebkomianos: when no value is given then its nil and if its nil than its treated as false in if
b00stfr3ak has joined #ruby
<Hanmac> i hope thats not orginal rails code you copied to put pry inside
jbpros has quit [Quit: jbpros]
iliketur_ has joined #ruby
<olivier_bK> how i can call a ruby script from another one ?
<shevy> olivier_bK no, require it and then use it like pure ruby
<Hanmac> olivier_bK: or Kernel#load
Spami has joined #ruby
<shevy> YES
<shevy> require 'foobar.rb'; foobar = Foobar.new
<shevy> that's how to do it olivier_bK !
<shevy> but you could also do
sepp2k has joined #ruby
<shevy> system 'ruby foobar.rb'
<shevy> but that's awful
<Hanmac> shevy i found this in the dokumentation: spawn(RbConfig.ruby, "-eputs'Hello, world!'")
mroth has quit [Ping timeout: 246 seconds]
Voodoofish430 has joined #ruby
<sebkomianos> shevy, Hanmac I removed that condition
mroth has joined #ruby
kevind_ has joined #ruby
AlSquire has joined #ruby
<sebkomianos> with name.to_sym.size I want to count the associations that exist
arefaslani has quit [Ping timeout: 252 seconds]
<interactionjaxsn> sebkomianos: update the gist. and to_sym the name higher up so you arent' repeating yourself
drumusician has quit [Ping timeout: 272 seconds]
<Hanmac> shevy & havenwood: did you see this? http://www.gliffy.com/go/publish/5152080
dagobah has quit [Remote host closed the connection]
<Hanmac> interactionjaxsn: the more funny joke is that "to_sym" is not needed in this piece of code (and in one place it doesnt make any sense)
rehat has joined #ruby
nomenkun_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
<waxjar> nice Hanmac, bookmarked.
mojjojo has joined #ruby
<rehat> I'm new with rails and ruby, if I need to write a csv object to file I need to fist create the file with File and then use File.open
klaut has quit [Remote host closed the connection]
<interactionjaxsn> Hanmac: right. since he's passing it in as an argument. i just assumed that we wasn't sure of that param so was doing it as a safeguard
timonv has quit [Remote host closed the connection]
<Hanmac> rehat: #rubyonrails
<Hanmac> waxjar: its not finish yet, so it might change in the future
mojjojo has quit [Client Quit]
kevind has quit [Ping timeout: 272 seconds]
<olivier_bK> shevy, thanks
<olivier_bK> Hanmac, thanks
kevind_ is now known as kevind
<sebkomianos> ok, updated - I get how "name.size" won't do what I want it to do now
nomenkun has quit [Ping timeout: 240 seconds]
<havenwood> Hanmac: Nice, i like! Visualization ftw.
<Hanmac> >> RbConfig.ruby
<eval-in> Hanmac => "/execpad/interpreters/ruby-2.0.0-p0/bin/ruby" (https://eval.in/76569)
iamchrisf has quit [Quit: iamchrisf]
Mars___ has joined #ruby
mary5030 has quit [Remote host closed the connection]
<sebkomianos> basically I want to validate that there can never been more than 3 associations
Spami has quit [Quit: This computer has gone to sleep]
burlyscudd has quit [Quit: Leaving.]
<sebkomianos> (more than "limit" associations, to be more precise)
colonolGron has joined #ruby
<rehat> when I do File.open('filename', 'w') what path would this be looking in
momomomomo has joined #ruby
<sebkomianos> so I am checking if "validate" was passed in the options and if there are more than "limit" associations, I want to add an error
Guest19776 has quit [Quit: Connection closed for inactivity]
maletor has joined #ruby
jlast has joined #ruby
mojjojo has joined #ruby
Briareos1_ has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Briareos1 has quit [Ping timeout: 240 seconds]
colonolGron has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
olivier_bK has quit [Ping timeout: 252 seconds]
mojjojo has quit [Client Quit]
<Hanmac> rehat: Dir.pwd
javon has quit [Ping timeout: 240 seconds]
isec has joined #ruby
<isec> hi all
iliketur_ has quit [Quit: zzzzz…..]
Newls has quit [Quit: WeeChat 0.4.2]
nvrch has quit [Quit: nvrch]
dioms has quit [Ping timeout: 245 seconds]
<momomomomo> hi isec
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
dweeb_ has quit [Quit: Textual IRC Client: www.textualapp.com]
dioms has joined #ruby
bentonrr_ has joined #ruby
Hanmac1 has joined #ruby
RaCx has quit [Ping timeout: 240 seconds]
isec has quit [Read error: Connection reset by peer]
petey_ has quit [Remote host closed the connection]
taion809 has quit [Ping timeout: 240 seconds]
moshee has quit [Ping timeout: 240 seconds]
petey has joined #ruby
johnny5stillaliv has joined #ruby
jragon has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
Hanmac1 is now known as Hanmac
zeeraw has joined #ruby
macmartine has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
duggiefresh has quit [Remote host closed the connection]
bentonrr has quit [Ping timeout: 245 seconds]
jkhwan has quit [Ping timeout: 272 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
RaCx has joined #ruby
bentonrr_ has quit [Remote host closed the connection]
isec has joined #ruby
<isec> hi all
jkhwan has joined #ruby
petey has quit [Ping timeout: 246 seconds]
<momomomomo> hi isec
<interactionjaxsn> hisec
thumpba has quit [Remote host closed the connection]
<isec> using: gem install ruby-oci8 I get the error: Could not find a valid gem 'ruby-oci8'
bentonrr has joined #ruby
jchristi has joined #ruby
<interactionjaxsn> isec: is this rails?
ineb has left #ruby [#ruby]
macmartine has quit [Remote host closed the connection]
timonv has joined #ruby
macmartine has joined #ruby
<isec> it's a package to connect to oracle db
maninthemiddle has joined #ruby
Elhu has joined #ruby
<maninthemiddle> hey there
<momomomomo> isec: Just installed for me
liamkeily has quit [Ping timeout: 240 seconds]
<momomomomo> which version of ruby are you using isec
clamstar has quit [Quit: Computer has gone to sleep.]
<isec> ruby 2.0.0p247 (2013-06-27 revision 41674)
<momomomomo> well, not sure, seems like a ruby gems thing because I found the package just fine
<isec> wondering gem is using a db that has to be updated from the net?
<momomomomo> gem install ruby-oci8
sambao21 has joined #ruby
phantummm has quit [Quit: phantummm]
jetblack has quit [Quit: leaving]
<maninthemiddle> need your advice: is there a way to work with ruby-1.9.3 application, and at the same time run some utilities under ruby-2.0? I am using RVM, but see no options for myself to do exactly that
<momomomomo> though the install failed :p
Mars___ has quit [Remote host closed the connection]
bentonrr has quit [Ping timeout: 252 seconds]
<Hanmac> maninthemiddle: it may be possible but i would not recomend that
<jchristi> is there an easy way in ruby to compare two similar but not identical XML files? I want to detect config changes, but ignore whitespace, single quotes vs double quotes, self-closing tags, etc. git diff -w only does the first of those.
timonv_ has joined #ruby
timonv has quit [Read error: Connection reset by peer]
canton7-mac has quit [Ping timeout: 240 seconds]
<Hanmac> jchristi: you can try to parse them with nokogiri
isec has quit [Remote host closed the connection]
burlyscudd has joined #ruby
tvw has quit []
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
<Hanmac> jchristi: big question: why should selfclosig tags be ignored?
bentonrr has joined #ruby
saltnvinegar has quit [Quit: saltnvinegar]
codeFiend has quit [Quit: codeFiend]
cleverma_ has quit [Remote host closed the connection]
<shevy> poor guys still using XML
iamchrisf has joined #ruby
phantummm has joined #ruby
hololeap has joined #ruby
petey has joined #ruby
platzhirsch has joined #ruby
endash has quit [Read error: No route to host]
samphippen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
javon has joined #ruby
yfeldblum has quit [Remote host closed the connection]
jkhwan_ has joined #ruby
tannerburson has joined #ruby
<Hanmac> shevy i think the main problem is that he has html like that "<p>section1<p>section2<p>section3" without "</p>" tags ;P
jkhwan has quit [Ping timeout: 272 seconds]
endash has joined #ruby
tannerburson has quit [Client Quit]
<shevy> that is just sad
pragmatism has joined #ruby
dkamioka has quit [Remote host closed the connection]
johnny5stillaliv has quit [Ping timeout: 252 seconds]
nhhagen has quit [Remote host closed the connection]
clamstar has joined #ruby
tannerburson has joined #ruby
dkamioka has joined #ruby
relix has joined #ruby
<jchristi> Hanmac: not ignore self-closing tags, but ignoring <tag></tag> vs <tag/> as a difference
<jchristi> should have said "empty tags" vs "self closing tags"
hakunin has joined #ruby
troessner has quit [Quit: Leaving]
CripperZ is now known as zz_CripperZ
mmcdaris has joined #ruby
yfeldblum has joined #ruby
typicalbender has joined #ruby
jkhwan_ has quit [Remote host closed the connection]
mrfoto has joined #ruby
dkamioka has quit [Ping timeout: 250 seconds]
jkhwan has joined #ruby
Mars___ has joined #ruby
rubyracer has joined #ruby
dkamioka has joined #ruby
<Hanmac> jchristi: Nokogiri::XML("<h><a></a> <b/></h>",nil,nil,Nokogiri::XML::ParseOptions::NOBLANKS).to_xml => "<h>\n <a/>\n <b/>\n</h>" as you can see the " " between a and b was removed and a and b was parsed as the same
iliketur_ has joined #ruby
mdel has quit [Ping timeout: 240 seconds]
<jchristi> Hanmac: ill try it out
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
duggiefresh has joined #ruby
lukec has quit [Quit: lukec]
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
mikepack has joined #ruby
aspires has joined #ruby
jkhwan_ has joined #ruby
m8 has joined #ruby
jkhwan has quit [Read error: Connection reset by peer]
typicalbender has quit [Ping timeout: 260 seconds]
Weazy has quit [Ping timeout: 260 seconds]
divi_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zai00 has quit [Quit: Zai00]
Marco has quit [Remote host closed the connection]
typicalbender has joined #ruby
zz_CripperZ is now known as CripperZ
maninthemiddle_ has joined #ruby
athst has joined #ruby
fsck3r has joined #ruby
<shevy> hmmm
<shevy> I think #bioruby and bioruby is a little dead
blaskovicz has quit [Quit: Leaving.]
petey has quit [Remote host closed the connection]
petey has joined #ruby
petey has quit [Remote host closed the connection]
<fsck3r> This is awesome
petey has joined #ruby
<fsck3r> irccloud
failshel_ has joined #ruby
zz_tsykoduk is now known as tsykoduk
failshell has quit [Ping timeout: 245 seconds]
<shevy> wat
<fsck3r> Just happy to be able to connect from work
sbos99 has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
apeiros has joined #ruby
burlyscudd has quit [Quit: Leaving.]
jsaak has joined #ruby
nhhagen has joined #ruby
petey has quit [Ping timeout: 272 seconds]
hiall has quit [Ping timeout: 240 seconds]
pringlescan has joined #ruby
phansch has quit [Remote host closed the connection]
ukd1 has joined #ruby
dkamioka has quit [Remote host closed the connection]
<pringlescan> has anyone had trouble on FreeBSD using gem? I tried to install /usr/ports/devel/ruby-gems with ruby 1.9. it installs without error but it can't find the gem command
Shidash has joined #ruby
ukd1 has quit [Remote host closed the connection]
VTLob has joined #ruby
Shidash has quit [Client Quit]
dkamioka has joined #ruby
yfeldblum has quit [Remote host closed the connection]
ukd1 has joined #ruby
gianlucadv has joined #ruby
yfeldblum has joined #ruby
nomenkun_ has quit [Remote host closed the connection]
<ukd1> does anyone know of an irb / equiv which can display inline images?
dkamioka_ has joined #ruby
nomenkun has joined #ruby
mikepack_ has joined #ruby
_amir has quit [Ping timeout: 245 seconds]
<fsck3r> pringlescan: Did it create the necessary sym links for ruby?
<fsck3r> are you able to run ruby1.9
bramdevries has joined #ruby
noop has joined #ruby
bentonrr has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 260 seconds]
dkamioka has quit [Ping timeout: 264 seconds]
saarinen has joined #ruby
h0rrorvacui has joined #ruby
sarlalian has quit [Read error: Connection reset by peer]
lukec has joined #ruby
nomenkun has quit [Ping timeout: 240 seconds]
blaskovicz has joined #ruby
Mars____ has joined #ruby
jkhwan_ has quit [Remote host closed the connection]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
mmcdaris has quit [Quit: mmcdaris]
jkhwan has joined #ruby
bluOxigen has joined #ruby
arefaslani has joined #ruby
iliketur_ has quit [Quit: zzzzz…..]
Atrophius has quit [Ping timeout: 250 seconds]
wildroman2 has quit [Remote host closed the connection]
<mrfoto> hi, im having trouble with chruby
s2013 has joined #ruby
momomomomo has quit [Quit: momomomomo]
<mrfoto> it gives me `-bash: chruby: command not found` and I have the source in my .bashrc
Mars___ has quit [Ping timeout: 240 seconds]
<havenwood> mrfoto: Either reload your terminal or source your .bashrc.
heidi has joined #ruby
timonv_ has quit [Remote host closed the connection]
<havenwood> mrfoto: source ~/.bashrc
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
sarlalian has joined #ruby
<mrfoto> havenwood: tried all that first, then I came here :P
thumpba has joined #ruby
dkamioka_ has quit [Remote host closed the connection]
<havenwood> mrfoto: Wanna jump over to #chruby channel? Can probably get it sorted.
mary5030 has joined #ruby
<mrfoto> oh, didnt know it existed, tnx!
brianpWins has quit [Quit: brianpWins]
jkhwan has quit [Read error: Connection reset by peer]
colonolGron has joined #ruby
jkhwan has joined #ruby
stringoO has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
duggiefresh has quit [Read error: Connection reset by peer]
dkamioka_ has joined #ruby
Xeago has quit [Ping timeout: 246 seconds]
amedeiros has joined #ruby
mklappstuhl has joined #ruby
amedeiros is now known as Guest88607
arefaslani has quit [Remote host closed the connection]
<havenwood> mrfoto: But it does seem you're not getting the chruby source loaded, or the `chruby` function would be available. Double check you've not added the auto.sh source line twice or something, that you really are sourcing chruby.sh: source /usr/local/share/chruby/chruby.sh
danshultz has quit [Remote host closed the connection]
<s2013> i have aquestion about something erally stupid but whats the difference between an enumerable and an array
<havenwood> mrfoto: And that that chruby.sh file is indeed there (that chruby is installed).
danshultz has joined #ruby
jkhwan has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
ringaroses has joined #ruby
jkhwan has joined #ruby
duggiefresh has joined #ruby
<mrfoto> havenwood: figured it out - my bashrc wasn't loading, just bash_profile, moved the source there, now it works
<mrfoto> thanks!
<havenwood> s2013: I think you're getting terminology a bit confused, but not a stupid question at all. Enumerable is actually in Array's ancestor chain: Array < Enumerable #=> true
Atrophius has joined #ruby
<havenwood> >> Array.ancestors.include? Enumerable
<eval-in> havenwood => true (https://eval.in/76581)
nari has quit [Ping timeout: 272 seconds]
<havenwood> mrfoto: np :)
jkhwan has quit [Remote host closed the connection]
momomomomo has joined #ruby
krainbol_ has joined #ruby
jkhwan has joined #ruby
mary5030_ has joined #ruby
danshultz has quit [Ping timeout: 240 seconds]
divi_ has joined #ruby
duggiefr_ has joined #ruby
<havenwood> s2013: So I think what you mean is the difference between an Array and an Enumerator (both of which inherit from Enumerable).
krainbol_ has quit [Client Quit]
heidi has quit [Quit: Leaving.]
obs has quit [Quit: Saliendo]
failshel_ has quit [Remote host closed the connection]
<havenwood> s2013: (Lots of folk get confused between Enumerator and Enumerable, just sound too similar I think.)
athst has quit [Quit: athst]
jkhwan_ has joined #ruby
<s2013> sorry
<s2013> yes i meant enumerator
failshell has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jkhwan has quit [Read error: Connection reset by peer]
heidi has joined #ruby
<s2013> yeah they both inherit from enumerable
<Hanmac> hmm its more true that both include Enumerable ... inherit is something different
<havenwood> Hanmac: good point
blaskovicz has quit [Quit: Leaving.]
Czupa has quit [Read error: Operation timed out]
mary5030 has quit [Ping timeout: 264 seconds]
Czupa has joined #ruby
<Hanmac> s2013: for sample File.foreach(path) returns a enumerator, its better than an Array for big files because it does not read the entire File at once
duggiefresh has quit [Ping timeout: 264 seconds]
mikee_ has quit [Ping timeout: 246 seconds]
s2013 has quit [Remote host closed the connection]
<momomomomo> range = (1..50)
<momomomomo> enumerator = range.lazy
nomenkun has joined #ruby
arefaslani has joined #ruby
SHyx0rmZ has joined #ruby
endash has quit [Read error: No route to host]
duggiefr_ has quit [Read error: Connection reset by peer]
amedeiro1 has joined #ruby
DropsOfSerenity has joined #ruby
<momomomomo> To see the inclusion, range.method(:lazy).inspect
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
blaskovicz has joined #ruby
endash has joined #ruby
banister has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.2]
wildroman2 has joined #ruby
bramdevries has quit []
duggiefresh has joined #ruby
camilasan has quit [Remote host closed the connection]
deception has joined #ruby
reset has joined #ruby
nomenkun has quit [Ping timeout: 240 seconds]
Guest88607 has quit [Ping timeout: 252 seconds]
MattStratton has quit [Ping timeout: 264 seconds]
Jetchisel has joined #ruby
hiyosi has quit [Ping timeout: 240 seconds]
s2013 has joined #ruby
decoponio has quit [Quit: Leaving...]
amedeiro1 has quit [Ping timeout: 240 seconds]
johnny5stillaliv has joined #ruby
banister is now known as banisterfiend
johnny5stillaliv has quit [Remote host closed the connection]
mikee has joined #ruby
wrseward has quit [Ping timeout: 246 seconds]
agent_white has quit [Quit: brb]
Speed has joined #ruby
iliketur_ has joined #ruby
zeade has joined #ruby
johnnyfuchs has joined #ruby
johnnyfuchs has left #ruby [#ruby]
samphippen has joined #ruby
<platzhirsch> Any idea why they use Liquid instead of ERuby in Jekyll?
agent_white has joined #ruby
johnny5stillaliv has joined #ruby
avalarion has joined #ruby
arefasla_ has joined #ruby
binaryplease has joined #ruby
kirun has joined #ruby
wildroman2 has quit [Remote host closed the connection]
danshultz has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Al__ has quit [Quit: Al__]
arefasl__ has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
<DouweM> platzhirsch: more template-y
drumusician has joined #ruby
<platzhirsch> DouweM: Syntax seems to be similar to Jinja2
relix has joined #ruby
<h0rrorvacui> Is the sorting algorithm used in ruby the double pivot quicksort?
arefaslani has quit [Ping timeout: 272 seconds]
mlpinit has quit [Remote host closed the connection]
roolo has quit [Remote host closed the connection]
petey has joined #ruby
mlpinit has joined #ruby
segfalt has joined #ruby
mary5030_ has quit [Read error: Operation timed out]
<segfalt> So I have a use case where I want to /murder a thread dead/ in a test to mimic the behavior of a killed process. Unfortunately Ruby is doing the right thing and running the cleanup code in my ensure block. Any workaround where I can take a particular thread and 100% stop it's execution completely?
athst has joined #ruby
moshee has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
mary5030 has joined #ruby
arefasla_ has quit [Ping timeout: 245 seconds]
iamjarvo_ has joined #ruby
mojjojo has joined #ruby
<h0rrorvacui> DouweM first glance looks like a plain quick sort
cgore-work has joined #ruby
<platzhirsch> Yes, it is quicksort
petey has quit [Remote host closed the connection]
<h0rrorvacui> It could be a 3 way pivot
<h0rrorvacui> let me look again
petey has joined #ruby
<h0rrorvacui> yeah its a 3 way pivot looking at the comments
duggiefr_ has joined #ruby
cgore has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
Xeago has joined #ruby
cgore-work has quit [Client Quit]
eulerphi has joined #ruby
<eulerphi> is there a way to let a variable equal something else in ruby, temporarily?
<eulerphi> ie. with x = Blah.Blah.Blah { x.foo = bar; x.bar = foo; etc etc..}
duggiefresh has quit [Ping timeout: 240 seconds]
awkwords has joined #ruby
<eulerphi> any hipsters willing to answer?
<segfalt> I guess I don't understand.
shime has quit [Ping timeout: 272 seconds]
<segfalt> Assign it to a variable, then assign something else to that variable when you're done.
mary5030 has quit [Read error: No route to host]
<eulerphi> i want a with statement, like in javascript
<eulerphi> segfalt thats the most non-hipster way ive ever heard
mary5030 has joined #ruby
<eulerphi> i want more of an alaias
<eulerphi> not an actual variable.
<segfalt> everything in Ruby is an alias ;-)
nanoyak has joined #ruby
Hanmac1 has joined #ruby
<DouweM> eulerphi: we can't all be hipsters
<eulerphi> sigh. well ill wait for someone else to answer.
<segfalt> yeah some of us have jobs :-(
<eulerphi> because I know you can do with Hash.new { |h| .... }
mikepack_ has quit [Remote host closed the connection]
<eulerphi> segfalt, time zones...
<eulerphi> :D
<DouweM> eulerphi: there's no 'with' in Ruby. I have no idea what you're talking about
<eulerphi> hm well ill make one then i guess
<s2013> how can i replace a value in an array? lets say i havea n array like [["a", "b"],["c","d"],["a","f"]]
mikepack has joined #ruby
<platzhirsch> yeah, restate your question
<eulerphi> seems kinda lame to not have one.
<s2013> i want all the a in the array to be x
<eulerphi> platzhirsch, is there a way to do a temoporary alias
mikepack has quit [Remote host closed the connection]
<segfalt> What's the value of it?
petey has quit [Ping timeout: 260 seconds]
<eulerphi> ie, with H=Long.Foo.Bar { .. do something with h ... }
jkhwan_ has quit [Remote host closed the connection]
<eulerphi> anything similar to that?
<DouweM> eulerphi: what is a variable if not a temporary alias?
<segfalt> ^^
<segfalt> h = Long.Foo.Bar
<segfalt> # do something with h
<s2013> is map the only way to do that
<segfalt> no indentation or curly braces needed.
<eulerphi> DouweM, a variable has a longer scope, I can create a proc and call it..but thats not what I'm looking for
jkhwan has joined #ruby
<eulerphi> You guys are such trolls..fair enough tho, i called you hipsters.
dkamioka has joined #ruby
<DouweM> ...
iliketur_ has quit [Quit: zzzzz…..]
Hanmac has quit [Ping timeout: 272 seconds]
jibi has quit [Ping timeout: 272 seconds]
<segfalt> I'm honestly not trying to be a troll.
johnny5stillaliv has quit [Ping timeout: 246 seconds]
<segfalt> I do not understand why you want to write code that way.
jkhwan has quit [Read error: Connection reset by peer]
<platzhirsch> eulerphi: well I am a hipster hacker, but besides... what's the problem, assign h, and do something with it
<DouweM> you could easily write a method that would allow you to do `with(some_object) { |h| do stuff with h }`
petey has joined #ruby
<DouweM> but I really don't see the point
<eulerphi> segfalt, well if you got a long initializer, it helps
jkhwan has joined #ruby
<DouweM> and what segfalt's saying. we're not trying to troll
<h0rrorvacui> I think he is trolling you guys.
<segfalt> Sure, I get that.
heftig_ has joined #ruby
<trolling> he isn't
<h0rrorvacui> lol
<segfalt> lol
<DouweM> lol
<platzhirsch> lol
<segfalt> you seem to be the expert on that, trolling, so I yield.
Monie has joined #ruby
<eulerphi> in javascript you'd do (function(alias){ })(Blah.blah.blah.blah);
<eulerphi> I know I can create a proc in ruby, but I figured there'd be a block semantic for lexical aliasing
<eulerphi> But if theres not, oh well
heftig has quit [Read error: Connection reset by peer]
<DouweM> (lambda { |h| ... }).call(Blah.blag.blag)
<segfalt> ^^
<DouweM> same as in JS
<eulerphi> eh, seems dirty, I thought ruby had hacks for everything
Hanmac1 is now known as Hanmac
<eulerphi> seems like a really expressive language
<DouweM> how is this any more dirty than the JS version
amedeiro1 has joined #ruby
<segfalt> it's an anonymous function, which is what you want
<DouweM> you create a lambda and you call it
<eulerphi> JS is naturally dirty
<DouweM> fair enough :P
jkhwan has quit [Remote host closed the connection]
<segfalt> ruby is dirty too
gyre007 has quit [Ping timeout: 264 seconds]
<segfalt> makes me sad sometimes
<eulerphi> Okay thanks DouweM
<platzhirsch> Ruby gives you tools, wrap it in your own method
<segfalt> omit parens 97% of the time!
<segfalt> yay
timonv has joined #ruby
maasha has joined #ruby
<eulerphi> I guess I can create a block method to do something like that right
jkhwan has joined #ruby
<eulerphi> awith a yield?
<DouweM> eulerphi: sure. a with method would be easy peasy
<platzhirsch> for instance
<DouweM> yup
<segfalt> def with(var) { yield var }
danshultz has quit [Read error: Connection reset by peer]
<segfalt> there
<platzhirsch> and then you can give the method some rat name
<segfalt> i wrote it for you
newbiehacker has quit [Read error: Connection reset by peer]
Leighton has joined #ruby
<segfalt> i missed &blk
<segfalt> shit
mojjojo has quit [Quit: mojjojo]
<eulerphi> lol segfalt that was easy :)
<eulerphi> I dont know ruby well
<DouweM> segfalt no you didn't
dkamioka_ has quit [Ping timeout: 272 seconds]
momomomomo has quit [Quit: momomomomo]
<shevy> if you omit parens in method definitions
jkamenik1 has left #ruby [#ruby]
<DouweM> segfalt: you don't need &blk with yield, just if you want blk.call()
newbiehacker has joined #ruby
<shevy> I will personally come and slay you!
danshultz has joined #ruby
<segfalt> it makes the block required which is handy, imo
heftig_ is now known as heftig
<shevy> ok segfalt how about this
goshakkk has quit [Ping timeout: 240 seconds]
<DouweM> segfalt: won't it crash on yield too this way?
<shevy> def with var { yield var }
<arefasl__> what this mean: class << self
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
<DouweM> shevy: that line of code gave me a disease
Jdubs has joined #ruby
<platzhirsch> arefasl__: open up the eigenclass and do some horrible things
asteros has joined #ruby
<shevy> arefasl__ you extend the current class or module, you can add class methods that way to several methods in a go
<DouweM> arefasl__: everything between that and `end` will be class methods
momomomomo has joined #ruby
wildroman2 has joined #ruby
pzula has quit [Ping timeout: 260 seconds]
interactionjaxsn has joined #ruby
<shevy> I like platzhirsch's description
magoo has joined #ruby
<shevy> it should become the official documentation of that
<platzhirsch> there's a bit more to it, forgot most of the stuff again http://madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html
<DouweM> I find eigenclasses fascinating, but you really don't need them in day-to-day Rub
<DouweM> y
<arefasl__> platzhirsch, shevy DouweM: Thank you all
<shevy> platzhirsch, do you like the word eigenclass
<apeiros> you do, just in very unobtrusive ways
<platzhirsch> for single line statements there is this: self.singleton_class.send(:alias_method, :generate, :new)
mojjojo has joined #ruby
khismetix has joined #ruby
codeFiend has joined #ruby
<shevy> hey wait
<shevy> what is that
<platzhirsch> shevy: yes, it reminds me of eigenvector
<DouweM> apeiros: sure
<shevy> the singleton_class thing
<platzhirsch> the same thing
<DouweM> platzhirsch: also helps that you speak German and "eigen" isn't just a random string of letters to you
<platzhirsch> singleton class, eigenclass,..
<platzhirsch> dejavu
<shevy> platzhirsch you can define a class method that way?
jkhwan has quit [Ping timeout: 272 seconds]
Elhu has joined #ruby
<s2013> how do i map a nested array?
<platzhirsch> shevy: not sure, but I think so
<DouweM> s2013: nested maps!
<Hanmac> s2013: depends how nested it is and what data you have
<s2013> [["a", "b"], ["d", nil], [nil, "e"]] i want to change nil to a different value
<shevy> platzhirsch I just tried it
<shevy> it works!
<s2013> if its not nil then just leave it alone
<platzhirsch> praise the lord
<h0rrorvacui> Is there a reason not to use a pseudo class method?
<DouweM> >> x = [["a", "b"], ["d", nil], [nil, "e"]]; x.map { |y| y.map { |z| z.nil? "AAA" : z }}
<eval-in> DouweM => /tmp/execpad-8cbb7fdf857e/source-8cbb7fdf857e:2: syntax error, unexpected ':', expecting '}' ... (https://eval.in/76582)
<segfalt> arr.each {|a| a.each {|b| b = 'new' unless b} }
<platzhirsch> But it's not availabile in Ruby 1.8.3, but if you work with anything but Ruby 2.0 you are lost anyway
<tobiasvl> lost?!
<platzhirsch> lost, as in forsaken
Astral__ has joined #ruby
<segfalt> >> [["a", "b"], ["d", nil], [nil, "e"]].each {|a| a.each {|b| b = 'new' unless b} }
<eval-in> segfalt => [["a", "b"], ["d", nil], [nil, "e"]] (https://eval.in/76583)
<tobiasvl> yes, i understand the meaning of the word
fella6s has joined #ruby
<segfalt> hm
Xiti` has joined #ruby
<shevy> >> class Foo; def self.bar; puts 'ok'; end; end; Foo.singleton_class.send(:alias_method, :foo, :bar); Foo.foo
<tobiasvl> but ruby 1.9 and to some extent 1.8 is surely widespread still
<shevy> what
<eval-in> shevy => ok ... (https://eval.in/76584)
<shevy> hahaha wtf
<platzhirsch> tobiasvl: yeah, like a virus
<shevy> >> class Foo; def self.bar; puts 'ok'; end; end; Foo.singleton_class.send(:alias_method, :foo, :bar); Foo.bar
<eval-in> shevy => ok ... (https://eval.in/76585)
aryaching_ has joined #ruby
<shevy> ah ok, bot was lagging
<Hanmac> s2013: lets say the pos have a meaning:
<Hanmac> >> [["a", "b"], ["d", nil], [nil, "e"]].map {|x,y| [x || 123,y || 456]}
<eval-in> Hanmac => [["a", "b"], ["d", 456], [123, "e"]] (https://eval.in/76586)
<shevy> platzhirsch, it works on 1.9 too!
<s2013> so just a nested map? i thoguth you could do it at one shot
<segfalt> >> [["a", "b"], ["d", nil], [nil, "e"]].map {|a| a.map {|b| b = 'new' unless b} }
<eval-in> segfalt => [[nil, nil], [nil, "new"], ["new", nil]] (https://eval.in/76587)
<segfalt> yea that is way worse
* platzhirsch slays with the tobiasvl bleeding-edge sword
DouweM_ has joined #ruby
<platzhirsch> damn those propaganda
<s2013> ok im even more confused.. too many choices
<s2013> one sec
<segfalt> actually
<havenwood> s2013: There are many ways.
<havenwood> >> [["a", "b"], ["d", nil], [nil, "e"]].map { |a, b| [a ? a : :nope, b ? b : :nope] }
<eval-in> havenwood => [["a", "b"], ["d", :nope], [:nope, "e"]] (https://eval.in/76589)
<segfalt> single mapis enough
<segfalt> yeah
<DouweM> too bad
<DouweM> >> x = [["a", "b"], ["d", nil], [nil, "e"]]; x.map { |y| y.map { |z| z.nil? "AAA" : z }}}
<DouweM> missed a }
<DouweM> or it's crashing for some other reason
<DouweM> yeah, missed a ?. either way. that's pretty much it
<eval-in> DouweM => /tmp/execpad-d8b52a4acb02/source-d8b52a4acb02:2: syntax error, unexpected ':', expecting '}' ... (https://eval.in/76591)
aryaching has quit [Read error: Connection reset by peer]
awea has quit [Read error: Connection reset by peer]
DouweM has quit [Read error: Connection reset by peer]
casheew_ has quit [Read error: Connection reset by peer]
Astral_ has quit [Read error: Connection reset by peer]
<tobiasvl> platzhirsch: yeah well, not all environments have the means to migrate to 2.0 in a jiffy just because you think they're lost if they don't ;)
athst has quit [Quit: athst]
<s2013> my goodness
ringaroses1 has joined #ruby
<DouweM_> (those were supposed to be sent earlier)
maroloccio has joined #ruby
<s2013> [["a", "b"], ["d", nil], [nil, "e"]].map {|x,y| [x || 123,y || 456]}
<s2013> i think that looks the most eloquent
<segfalt> there you go
pzula has joined #ruby
<s2013> thanks
<platzhirsch> tobiasvl: the non-agile
<shevy> the FAT
DouweM_ has quit [Client Quit]
<shevy> I am so agile
<platzhirsch> If you don't update to the latest Ruby version, then you are doing it wrong
zaychenok has joined #ruby
<shevy> but syck has been removed! :(
<platzhirsch> if your production server is not updated to Ruby 2.1 on 25th December, then you are it wrong, too
Pixi__ has quit [Ping timeout: 246 seconds]
fella5s has quit [Ping timeout: 246 seconds]
* Hanmac point and laugh about all 1.8.6 users
<jrobeson> WRONG WRONG WRONG
brianpWins has joined #ruby
* jrobeson is already on ruby 3.0
<tobiasvl> platzhirsch: hehe. i'll make sure to pass it on and have the developers work on christmas day because someone on the internet told them they had to
<platzhirsch> but then again, I never had a Ruby project with someone else but me. I have no idea what I am talking about :(
dkamioka has quit [Remote host closed the connection]
ringaroses has quit [Ping timeout: 260 seconds]
<tobiasvl> platzhirsch: aha! that's why then :)
<platzhirsch> ;)
<RubyPanther> if you don't update to a Ruby less than 3 years old, you're doing it wrong.
* Hanmac test his stuff always against nightly ruby
dkamioka has joined #ruby
DouweM has joined #ruby
<shevy> I will work together with Hanmac as soon as he finishes his wxwidget bindings!
xcv has joined #ruby
<platzhirsch> tobiasvl: but I desperately want to
casheew has joined #ruby
breakingthings has joined #ruby
<havenwood> s2013: just for the sake of it: .flatten.map { |x| x or :none }.each_slice(2).to_a
mzdravkov has joined #ruby
shedd has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<apeiros> ew flatten
<havenwood> hah
Eiam has joined #ruby
<apeiros> epitome of "something went wrong before"
<Hanmac> havenwood: what about flat_map ?
<RubyPanther> 5 years, tops, which would bring you to 1.8.7
<havenwood> Hanmac: I was just being silly, but #flat_map wouldn't work since I need the input flat, not the output
<Hanmac> yeah ... then it should be named map_flat ;P
<havenwood> lol
angusigu1ss is now known as angusiguess
<s2013> heh havenwood
nomenkun has joined #ruby
<tobiasvl> platzhirsch RubyPanther: we (and all production servers) are on Red Hat Enterprise Linux 6, which just has ruby 1.8.7 :(
bluOxigen has quit [Ping timeout: 252 seconds]
dkamioka has quit [Ping timeout: 264 seconds]
Astral__ has quit [Ping timeout: 240 seconds]
<havenwood> tobiasvl: can you use EPEL to get Fedora's modern, sane Ruby?
petey has quit [Remote host closed the connection]
<RubyPanther> tobiasvl: I'm on Fedora 16, system ruby is 1.8.7. You're only supposed to use the system Ruby if you're making RPMs
awkwords has left #ruby [#ruby]
<havenwood> RubyPanther: Fedora 19+ is ruby-2.0.0 :)
<platzhirsch> tobiasvl: ah okay, and what hinders you from upgrading? never change a running system?
nomenkun_ has joined #ruby
shime has joined #ruby
<segfalt> havenwood: Which hopefully means RHEL7 will be 2.0?
freerobby has quit [Quit: Leaving.]
<tobiasvl> well, we'd like to, but resources
<RubyPanther> havenwood: I hate upgrading, I don't want my software to change. Except the stuff I'm writing.
esing has joined #ruby
<RubyPanther> I won't upgrade until my libraries stop working
<jrobeson> fedora 16 is EOL isn't it?
<RubyPanther> probably, the only updates I get are from 3rd party repos
<havenwood> segfalt: I'd hope so!
<jrobeson> now if only fedora would get a new redis ...
shedd has quit []
<RubyPanther> tobiasvl: it isn't hard to package an RPM if you need one for a new Ruby
petey has joined #ruby
dmyers has joined #ruby
shedd has joined #ruby
maninthemiddle has quit [Quit: Page closed]
<platzhirsch> tobiasvl: resources, so you mean no time to spent some time on that?
freerobby has joined #ruby
<RubyPanther> 30 minutes following a tutorial
nhhagen has quit [Remote host closed the connection]
<h0rrorvacui> So for someone who doesn't have to manage a bunch of machines, why are you not using version managers or something?
nomenkun has quit [Ping timeout: 240 seconds]
blaskovicz1 has joined #ruby
<h0rrorvacui> Is it bad practice to be compiling ruby on your production machines in an enterprise setting?
<havenwood> ruby-install has a chef cookbook :D https://github.com/rosstimson/chef-ruby_install#readme
<h0rrorvacui> or something?
amedeiro1 has quit [Ping timeout: 246 seconds]
<h0rrorvacui> I guess it could also not be your job to worry about that and therefore have no power over the decision.
<RubyPanther> h0rrorvacui: when I've been in those settings, if there is a BOFH compilers aren't even allowed on those machines, and certainly not Ruby or Perl.
<mzdravkov> I stumbled upon some wikipedia page about comparison of programming languages, and there ruby was described as aspect oriented. Do they have in mind that you can yield a block in a method and this way set a cut point that some "aspect" from outside can do something with passing a block?
<havenwood> mzdravkov: i think it is just wikipedia gibberish nonsense, but dunno
blaskovicz2 has joined #ruby
blaskovicz has quit [Ping timeout: 264 seconds]
<mzdravkov> havenwood: I thought the same, but decided that maybe just I don't understand something...
atmosx has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
psyl0n has quit [Remote host closed the connection]
nixie has joined #ruby
<s2013> https://gist.github.com/ss2k/d4707ff8e97492b37980 how can i refactor that?
RaCx has joined #ruby
RaCx has quit [Client Quit]
blaskovicz1 has quit [Ping timeout: 272 seconds]
nhhagen has joined #ruby
carraroj has joined #ruby
fedesilv_ has quit [Remote host closed the connection]
<segfalt> I don't understand what this is supposed to do, s2013.
<RubyPanther> mzdravkov: it is just an obtuse academic way of describing modularity through mixins
jkhwan has joined #ruby
<segfalt> You want to see if a date is within a range of dates?
Es0teric has joined #ruby
jonahR has joined #ruby
<segfalt> Or if any of the date ranges are overlapping… hmm
<Mon_Ouie> segfalt: I'd use each_cons and any?
Astralum has joined #ruby
<segfalt> I think I get it now.
<s2013> yeah
<Mon_Ouie> s2013*
<s2013> i mean it works but im sure there is a better way to do it
<RubyPanther> at least, that is what I believe after having suffered the wiki for AOP
<h0rrorvacui> I thought it was checking if someone was a da
<h0rrorvacui> :P
<segfalt> it only works if the later pairs are overlapping
athst has joined #ruby
<s2013> its ordered segfalt
RaCx has joined #ruby
<havenwood> >> [[1, 2], [3, 4], [4, 6]].each_cons(2).any? { |x, y| (x[0]..x[1]).cover? y[0] }
<eval-in> havenwood => true (https://eval.in/76598)
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
alvaro_o has joined #ruby
burlyscudd has joined #ruby
arefasl__ has quit [Ping timeout: 240 seconds]
<s2013> hmm gotta check what each_cons is
<Mon_Ouie> It iterates over each sequence of n consecutive element
<s2013> oh
<havenwood> >> [1, 2, 3, 4].each_cons(2).to_a
<eval-in> havenwood => [[1, 2], [2, 3], [3, 4]] (https://eval.in/76600)
<segfalt> that is handy
maasha has quit [Ping timeout: 250 seconds]
freerobby has quit [Quit: Leaving.]
sambao21 has joined #ruby
<s2013> oo fancy
<s2013> >> [1..9].each_cons(3).to_a
<eval-in> s2013 => [] (https://eval.in/76601)
<s2013> hmm
<segfalt> array of ranges
<segfalt> 1..9.each
<havenwood> s2013: I think you meant: [*1..9].each_cons(3).to_a
<segfalt> (1..9).each if you like structure
<s2013> >> (1..9).each_cons(3).to_a
<eval-in> s2013 => [[1, 2, 3], [2, 3, 4], [3, 4, 5], [4, 5, 6], [5, 6, 7], [6, 7, 8], [7, 8, 9]] (https://eval.in/76602)
<s2013> sorry that
codeFiend has quit [Ping timeout: 240 seconds]
iamchrisf has left #ruby [#ruby]
hiyosi has joined #ruby
carraroj has quit [Remote host closed the connection]
Jdubs has quit [Ping timeout: 250 seconds]
Astralum has quit [Ping timeout: 240 seconds]
jibi has joined #ruby
codeFiend has joined #ruby
agjacome has joined #ruby
aryaching_ has quit [Ping timeout: 245 seconds]
rdark has quit [Quit: leaving]
matheuscaceres has quit [Quit: matheuscaceres]
failshell has quit []
Astralum has joined #ruby
ehaliewicz has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
pipecloud_ is now known as pipecloud
<s2013> >> [[1,2], [3,4],[5,6]].each_cons(2) { |x,y| puts x+y }
<eval-in> s2013 => 1 ... (https://eval.in/76603)
hiyosi has quit [Ping timeout: 240 seconds]
pipecloud has quit [Changing host]
pipecloud has joined #ruby
pipecloud has joined #ruby
pipecloud has quit [Changing host]
<s2013> im still a bit confused about how each_cons work
amedeiros has joined #ruby
amedeiros is now known as Guest33198
<bricker`LA> >> [][1..4]
<eval-in> bricker`LA => nil (https://eval.in/76604)
<bricker`LA> That kinda bothers me
Shidash has joined #ruby
<Hanmac> s2013: in your last sample they are already as two cons, thats why an adional each_cons only put them more together
<havenwood> bricker`LA: you expect?: []
coca_rails has joined #ruby
platzhirsch has left #ruby [#ruby]
niklasb has quit [Ping timeout: 246 seconds]
<bricker`LA> havenwood: exactly
nomenkun_ has quit [Remote host closed the connection]
iamjarvo has quit [Read error: Connection reset by peer]
iamjarvo_ is now known as iamjarvo
<RubyPanther> [][9] is also nil, though
carraroj has joined #ruby
lkba has joined #ruby
iamjarvo_ has joined #ruby
davy_ has joined #ruby
nomenkun has joined #ruby
Reach has joined #ruby
mansi has quit [Read error: Connection reset by peer]
<bricker`LA> RubyPanther: I know, and that makes perfect sense. But since [0][0..2] is [0], I would except [][0..2] to just be []
<bricker`LA> *shrug*
mansi has joined #ruby
<bricker`LA> I'm sure there's a good reason
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
<RubyPanther> being the same across the args to #[] has to win the least surprise contest though
Elhu has quit [Quit: Computer has gone to sleep.]
maletor has quit [Quit: Computer has gone to sleep.]
mansi has quit [Read error: Connection reset by peer]
carraroj has quit [Client Quit]
mansi has joined #ruby
<RubyPanther> also [] is true and nothing was a valid index, so that would be a problem
<havenwood> >> [0][0..0]
<eval-in> havenwood => [0] (https://eval.in/76605)
<Hanmac> bricker`LA:
<Hanmac> >> [][0..4]
<eval-in> Hanmac => [] (https://eval.in/76607)
mikej03 has joined #ruby
<bricker`LA> Hanmac: arg! That's even worse!
<RubyPanther> >> (0..0).size
<eval-in> RubyPanther => 1 (https://eval.in/76608)
<h0rrorvacui> now thats strange
Mon_Ouie has quit [Ping timeout: 250 seconds]
<RubyPanther> No, that is correct and expected
samphippen has left #ruby ["Textual IRC Client: www.textualapp.com"]
nomenkun_ has joined #ruby
<h0rrorvacui> Yeah I see now.
<RubyPanther> [0][0..0] is [0][0]
nomenkun has quit [Ping timeout: 240 seconds]
Xeago has quit [Ping timeout: 272 seconds]
mrfoto has quit []
<bricker`LA> I'll just wrap it in Array() ;(
burlyscudd has quit [Quit: Leaving.]
athst has quit [Quit: athst]
<h0rrorvacui> (0..0).size would be a good interview question to trip someone up with.
<h0rrorvacui> Make sure how well they look at things.
wildroman2 has quit [Remote host closed the connection]
<bricker`LA> >> (0..0).to_a
<eval-in> bricker`LA => [0] (https://eval.in/76609)
<s2013> ohhhhhhhhh now it mkes sense
<RubyPanther> >> [(1.0/0)][0..0]
<eval-in> RubyPanther => [Infinity] (https://eval.in/76610)
<s2013> the each_cons(2) for my nested array was the first 2 arrays. and then it just sort of went to the next set of 2 , etc.
freerobby has joined #ruby
skaflem has quit [Quit: Leaving]
mjs2600 has joined #ruby
javon has quit [Ping timeout: 240 seconds]
codeFiend has quit [Ping timeout: 245 seconds]
<h0rrorvacui> >>(0...0).size
<eval-in> h0rrorvacui => 0 (https://eval.in/76611)
<h0rrorvacui> thats cool
codeFiend has joined #ruby
Elhu has joined #ruby
<RubyPanther> >> [(0.0/0)][0...0]
<eval-in> RubyPanther => [] (https://eval.in/76612)
<RubyPanther> That one will be my new Array.new replacement
burlyscudd has joined #ruby
<h0rrorvacui> lol
<h0rrorvacui> lets all start using that so it becomes idiomatic ruby
bluOxigen has joined #ruby
mikej03 has left #ruby [#ruby]
R33C3 has joined #ruby
CripperZ is now known as zz_CripperZ
agjacome has quit [Ping timeout: 260 seconds]
<Hanmac> RubyPanther i have a quest for you: find the shortest way to check if a float is -0.0
<RubyPanther> It will instantly reveal the quality of your character.
blaskovicz2 has quit [Quit: Leaving.]
<bricker`LA> Hanmac:
<bricker`LA> >> f = -0.0; f == -0.0
<eval-in> bricker`LA => true (https://eval.in/76613)
<bricker`LA> :P
typicalbender has quit [Ping timeout: 246 seconds]
<Hanmac> bricker`LA: -0.0 == 0.0 #=> true, i wanted to know if its -0.0 not 0.0
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
maletor has joined #ruby
mojjojo has quit [Quit: mojjojo]
lkba has quit [Ping timeout: 264 seconds]
<RubyPanther> >> foo = -0.0 ; foo.to_s == foo.abs.to_s # Hanmac
<eval-in> RubyPanther => false (https://eval.in/76615)
R33C3 has quit [Remote host closed the connection]
javon has joined #ruby
<bricker`LA> Hanmac: ohh
<RubyPanther> dunno if it is shortest, I suck at golf. But it is short enough for me.
mlpinit has quit [Ping timeout: 264 seconds]
Shidash has quit [Read error: Connection timed out]
bluenemo has joined #ruby
michaellynch has joined #ruby
<Hanmac> hm yeah because you cant use == or eql? or equal? for that :(
<RubyPanther> stringification is required because they're the same number mathematically
Shidash has joined #ruby
blaskovicz has joined #ruby
asteros has quit [Quit: asteros]
<RubyPanther> or, write it in C :) seems a little light to make a gem for, though
Stalebread has joined #ruby
agjacome has joined #ruby
<RubyPanther> I'm surprised there is no #pos? and #neg? though
<h0rrorvacui> I wonder why someone would want to know if zero is negative...
<h0rrorvacui> :P
timonv has quit [Ping timeout: 260 seconds]
<Hanmac> BigDecimal also has problems with that:
<Hanmac> >> require "bigdecimal"; [BigDecimal("-0.0"),BigDecimal(-0.0,1)]
<eval-in> Hanmac => (https://eval.in/76616)
<Hanmac> ah man stupid protection
xcv has quit [Remote host closed the connection]
goshakkk has joined #ruby
goshakkk has quit [Max SendQ exceeded]
Stalebread has quit [Client Quit]
xcv has joined #ruby
momomomomo has quit [Quit: momomomomo]
<Hanmac> that would happen, see the difference in the output: [BigDecimal("-0.0"),BigDecimal(-0.0,1)] #=> [#<BigDecimal:29e5348,'-0.0',9(18)>, #<BigDecimal:29e5190,'0.0',9(27)>]
petey has quit [Remote host closed the connection]
<bricker`LA> I like RubyPanther's method
goshakkk has joined #ruby
<bricker`LA> >> f = -0.0; f.to_s == "-0.0"
<eval-in> bricker`LA => true (https://eval.in/76617)
<bricker`LA> :D
Dan_ has joined #ruby
<h0rrorvacui> I think hanmac is trolling you guys
petey has joined #ruby
Dan_ has quit [Read error: Connection reset by peer]
<RubyPanther> OMG finally something my dec_number gem is better than BigDecimal at!!
<h0rrorvacui> :P
<Hanmac> also possible:
<Hanmac> >> f = -0.0; f.eql?(0.0) && !f.equal?(0.0)
<eval-in> Hanmac => true (https://eval.in/76618)
<RubyPanther> require 'dec_number' ; DecNumber("-0.0").negative? => true
blueOxigen has joined #ruby
freerobby has quit [Quit: Leaving.]
macmartine has quit [Remote host closed the connection]
xcv has quit [Read error: No route to host]
tylershipe has joined #ruby
Guest33198 has quit [Ping timeout: 252 seconds]
freerobby has joined #ruby
<RubyPanther> So you can do it easily with an IEEE DecNumber but not a Float
macmartine has joined #ruby
<Hanmac> months ago i was telling: "0.0 has fixed object id, but -0.0 has not, that will bite you guys into the ass some day" ... and then it happens
xcv has joined #ruby
<RubyPanther> I hate floats more every week
khismetix has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
noop has quit [Ping timeout: 260 seconds]
<h0rrorvacui> What is the usecase for something like this?
<h0rrorvacui> :P
bluOxigen has quit [Ping timeout: 272 seconds]
<RubyPanther> h0rrorvacui: my off the cuff imaginary use case is a data file or config file where negative numbers have significance
nyx has joined #ruby
<h0rrorvacui> but negative zeros?
<h0rrorvacui> thats just crazy
nyx is now known as Guest25037
heidi has quit [Quit: Leaving.]
<canton7> floats can't represent number very close to zero. so -0.000<lots of zeros>0001 gets represented as -0.0
timonv has joined #ruby
petey has quit [Ping timeout: 240 seconds]
pragmatism has quit [Ping timeout: 264 seconds]
RaCx has quit [Quit: Computer has gone to sleep.]
<Hanmac> be very happy that there is no +0.0 in addion to 0.0 and -0.0 ;P
mojjojo has joined #ruby
nixie has quit [Ping timeout: 264 seconds]
<RubyPanther> yeah, one bit of sign is bad enough
fedesilva has joined #ruby
macmartine has quit [Ping timeout: 250 seconds]
<s2013> >> [1..5].cover? 1
<eval-in> s2013 => undefined method `cover?' for [1..5]:Array (NoMethodError) ... (https://eval.in/76619)
<s2013> >> (1..5).cover? 1
<eval-in> s2013 => true (https://eval.in/76620)
pragmatism has joined #ruby
<s2013> how can i make it so it returns false if the start/end is the same.
mojjojo has quit [Client Quit]
<s2013> but only if its between
momomomomo has joined #ruby
<s2013> so 2,3,4 would return true, 1,5 wont
xcv has quit [Remote host closed the connection]
dwgill has joined #ruby
<Hanmac> RubyPanther: what about ±0.0 ? ;P
spider-mario has quit [Read error: Connection reset by peer]
pragmatism has quit [Client Quit]
xcv has joined #ruby
<Hanmac> or ∓0.0 ? ;P
<RubyPanther> ArgumentError: invalid value for DecNumber: ±0.0
<canton7> s2013, create a new range 2..4, or check .include?(1 - 1) && include?(1 + 1) ?
blueOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
<canton7> s2013, monkey-patch Range if you want
Reach has quit []
dawkirst has quit [Ping timeout: 264 seconds]
esing has quit [Remote host closed the connection]
mdel has joined #ruby
mdel has joined #ruby
mdel has quit [Changing host]
amedeiro1 has joined #ruby
larissa has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
tsykoduk is now known as zz_tsykoduk
<s2013> i think im just going to subtract -1
<s2013> yea
<s2013> thanks
coca_rails has quit [Remote host closed the connection]
Genjikyosher has joined #ruby
ldnunes has quit [Quit: Leaving]
R33C3 has joined #ruby
coca_rails has joined #ruby
DMA has joined #ruby
xcv has quit [Ping timeout: 264 seconds]
petey has joined #ruby
codeFiend has quit [Quit: codeFiend]
mikepack has joined #ruby
klaut has joined #ruby
Shidash has quit [Read error: Connection timed out]
Mars____ has quit [Remote host closed the connection]
coca_rails has quit [Ping timeout: 245 seconds]
DMA has left #ruby [#ruby]
Shidash has joined #ruby
iliketur_ has joined #ruby
shime has quit [Ping timeout: 260 seconds]
iliketur_ has quit [Client Quit]
bluenemo has quit [Remote host closed the connection]
mando_ has joined #ruby
RaCx has joined #ruby
amedeiro1 has quit [Ping timeout: 240 seconds]
colonolGron has quit [Quit: leaving]
mando has quit [Ping timeout: 246 seconds]
amedeiro1 has joined #ruby
mando_ has quit [Ping timeout: 245 seconds]
clamstar has quit [Quit: Computer has gone to sleep.]
funburn has joined #ruby
pragmatism has joined #ruby
hololeap has quit [Ping timeout: 240 seconds]
goshakkk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ffranz has quit [Quit: Leaving]
bigkevmcd has quit [Ping timeout: 240 seconds]
bret has joined #ruby
capicue has joined #ruby
nobitanobi has joined #ruby
bret has left #ruby ["Textual IRC Client: www.textualapp.com"]
yfeldblum has quit [Ping timeout: 240 seconds]
wildroman2 has joined #ruby
bigkevmcd has joined #ruby
colonolGron has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
aasirc has joined #ruby
randomnick_ has joined #ruby
postmodern has joined #ruby
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
hiyosi has joined #ruby
atmosx has quit [Quit: Lost in trance]
louism2wash has joined #ruby
yfeldblum has joined #ruby
mlpinit has joined #ruby
jragon has quit [Ping timeout: 272 seconds]
macmartine has joined #ruby
typicalbender has joined #ruby
<louism2wash> Hey guys, is there a way to call a method from inside a module using the fully namespaces syntax rather than including all that modules methods?
Shidash has quit [Read error: Connection timed out]
Mars___ has joined #ruby
dev1x is now known as wiscas
<slash_nick> louism2wash: have you tried it?
wiscas is now known as rfx86
<louism2wash> slash_nick: yes
<MrZYX> show us your attempt
<shevy> louism2wash what means "fully namespace syntax"
RaCx has joined #ruby
pzula has quit [Ping timeout: 245 seconds]
<shevy> louism2wash you can define class methods and call these
<f0ster> can I do something like this in my class, or should i do the initilization in a constructor, @@LivingChildren = Array.new
<tobiasvl> don't use @@
hiall has joined #ruby
<slash_nick> yikes
Shidash has joined #ruby
BizarreCake has quit [Ping timeout: 252 seconds]
einarj has quit [Remote host closed the connection]
<slash_nick> don't capitalize your variable names
iliketur_ has joined #ruby
MetaCosm has quit [Read error: Operation timed out]
<louism2wash> here is what I am trying to do: https://gist.github.com/louism2/7813514
<slash_nick> louism2wash: as shevy said, make it a class method... def self.photo_count(hash)
<shevy> louism2wash append "extend self" and you can do that
relix has joined #ruby
iliketur_ has quit [Client Quit]
<MrZYX> louism2wash: check module_function if both, including and calling it on the module should work
<Hanmac> or use module_function
hiyosi has quit [Ping timeout: 260 seconds]
macmartine has quit [Ping timeout: 246 seconds]
pzula has joined #ruby
<shevy> f0ster why do you use @@ exactly
<tobiasvl> f0ster: first of all, @@vars are class variables, so no, you do not need to do it in initialization. that said, you shouldn't use classe variables, you should use @vars. those are instance variables and SHOULD get their value in initialization.
<f0ster> because i need something like a static class var
<f0ster> tobiasvl: I dont' think i need an instance variable
<Hanmac> f0ster: you will learn about "class instance variables" in 3 ... 2 ... 1...
burlyscudd has quit [Quit: Leaving.]
<tobiasvl> :)
davy_ has quit [Remote host closed the connection]
<shevy> f0ster yes if you want to, you can do that
<tobiasvl> then you want to use @vars and give them value outside initialization, making them instance variables of the class.
<shevy> but tobiasvl is right so if you want to write ugly code you can continue
MetaCosm has joined #ruby
<f0ster> i come from statically typed langauges like c++ where i would still use a constructor to initialize my static member values
<f0ster> because the static constructor would only be called once.. but because the class is static
<tobiasvl> in ruby, classes are instances too, of the class Class
nomenkun_ has quit [Remote host closed the connection]
<f0ster> Ah
<tobiasvl> there's really no such thing as static, which means that using the static @@variables doesn't really make sense and is pretty broken
nomenkun has joined #ruby
Jdubs has joined #ruby
<shevy> matz hinted at that by forcing you to type the @ key TWICE
<shevy> imagine if he would have done so with $$superglobals
<tobiasvl> shevy: on a mac that's not that off-putting, but on my pc... shiver
<slash_nick> pc... shiver
jprovazn has quit [Quit: Odcházím]
starfox21 has quit [Ping timeout: 260 seconds]
<tobiasvl> well, it runs linux, but i still need to do AltGr + 2 to get @
blackmesa has joined #ruby
cpruitt has joined #ruby
<slash_nick> oh okay :)
brunto has quit [Ping timeout: 240 seconds]
wildroman2 has quit [Remote host closed the connection]
RaCx has quit [Quit: Computer has gone to sleep.]
nhhagen has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 272 seconds]
R33C3 has quit [Remote host closed the connection]
dkamioka has joined #ruby
greenarrow_ has quit [Read error: Connection reset by peer]
burlyscudd has joined #ruby
jacobsmith has quit [Ping timeout: 250 seconds]
kpshek has joined #ruby
nhhagen has joined #ruby
<shevy> yeah
<shevy> but that key is ok
<shevy> I hte the {} much more
<shevy> *hate
bbloom has quit [Read error: Connection reset by peer]
bbloom_ has joined #ruby
julweber has quit [Remote host closed the connection]
Zai00 has joined #ruby
julweber has joined #ruby
<Hanmac> i had a problem with one windows app where Alt+Q marks the lines as comment, but i need AltGr+Q for @ ... you guys see the problem right? ;P
beneggett has joined #ruby
pragmatism is now known as pragmatism|away
sebkomianos has quit []
Shidash has quit [Read error: Connection timed out]
ark_ has joined #ruby
cescalante is now known as ce_afk
Mon_Ouie has joined #ruby
beneggett has quit [Client Quit]
dangerousdave has joined #ruby
pragmatism|away is now known as pragmatism
davy_ has joined #ruby
pragmatism has quit [Quit: Leaving...]
Shidash has joined #ruby
amedeiro1 has quit [Ping timeout: 246 seconds]
Elhu has joined #ruby
guillehorno has joined #ruby
nobitanobi has quit [Ping timeout: 240 seconds]
dpritchett has joined #ruby
Guest25037 has quit [Read error: Connection reset by peer]
pragmatism has joined #ruby
pragmatism has quit [Remote host closed the connection]
iliketur_ has joined #ruby
nixie has joined #ruby
pragmatism has joined #ruby
nixie has quit [Remote host closed the connection]
funburn has quit [Read error: Connection reset by peer]
thumpba has quit [Remote host closed the connection]
carraroj has joined #ruby
julweber has quit [Ping timeout: 252 seconds]
freerobby has quit [Quit: Leaving.]
starfox21 has joined #ruby
fuhgeddaboudit has joined #ruby
RaCx has joined #ruby
jkhwan has quit [Remote host closed the connection]
zoo-zed has joined #ruby
burlyscudd has quit [Ping timeout: 272 seconds]
nobitanobi has joined #ruby
freerobby has joined #ruby
jkhwan has joined #ruby
wildroman2 has joined #ruby
pepsis_ has joined #ruby
sbos99 has quit [Ping timeout: 240 seconds]
echevemaster has joined #ruby
funburn has joined #ruby
guillehorno has quit [Read error: No route to host]
binaryplease has quit [Ping timeout: 272 seconds]
macmartine has joined #ruby
guillehorno has joined #ruby
wildroman2 has quit [Ping timeout: 240 seconds]
ae-r has joined #ruby
jkhwan has quit [Ping timeout: 272 seconds]
julweber has joined #ruby
xcv has joined #ruby
starfox21 has quit [Quit: starfox21]
carraroj has quit [Quit: Konversation terminated!]
Clooth has joined #ruby
amedeiros has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
amedeiros is now known as Guest14507
Xeago has joined #ruby
clamstar has joined #ruby
<nobitanobi> hello party people
wildroman2 has joined #ruby
carraroj has joined #ruby
macmartine has quit [Remote host closed the connection]
arefaslani has joined #ruby
ddd_ has joined #ruby
ddd_ has quit [Client Quit]
macmartine has joined #ruby
ddd_ has joined #ruby
ddd_ is now known as ddd
krawchyk has quit []
<DouweM> hello nobi
mojjojo has joined #ruby
havenwood has quit [Remote host closed the connection]
Shidash has quit [Read error: Connection timed out]
guillehorno has quit [Quit: guillehorno]
Guest14507 has quit [Ping timeout: 252 seconds]
heidi has joined #ruby
v0n has joined #ruby
Shidash has joined #ruby
Speed has left #ruby ["WeeChat 0.4.2"]
g3orge has joined #ruby
mojjojo has quit [Client Quit]
macmarti_ has joined #ruby
mojjojo has joined #ruby
funburn has quit [Quit: funburn]
mando has joined #ruby
wildroman3 has joined #ruby
jonahR has quit [Quit: jonahR]
<nobitanobi> hi DouweM how are u doing?
macmartine has quit [Remote host closed the connection]
petey has quit [Remote host closed the connection]
pwestlund has quit [Ping timeout: 260 seconds]
CorySimmons has joined #ruby
petey has joined #ruby
<CorySimmons> How can I p = p.somedata in one step?
<CorySimmons> something like p.somedata!
<MrZYX> what's p?
<CorySimmons> ah, var for something
wildroman2 has quit [Ping timeout: 264 seconds]
<DouweM> CorySimmons: if you define that method to work in place, sure
Authenticator has joined #ruby
thumpba has joined #ruby
havenwood has joined #ruby
siwica has joined #ruby
cpruitt has quit [Quit: cpruitt]
<CorySimmons> Actually, p = SomeClass.first
jkhwan has joined #ruby
<DouweM> nobitanobi: well enough. currently deciding whether to work some more tonight or go to bed early. you?
nomenkun has joined #ruby
<MrZYX> CorySimmons: there's nothing that does it for arbitrary variables the object in p needs to support it
<CorySimmons> Hm
glacius has quit [Quit: WeeChat 0.4.2]
Czupa has quit [Remote host closed the connection]
<CorySimmons> I mean, it'd be nice if I could step through pry like:
<CorySimmons> foo = Foo.first
<CorySimmons> foo.somedata!
<nobitanobi> DouweM, just started to work actually :P
<CorySimmons> foo then returns the data of somedata
<CorySimmons> Rather than foo = foo.somedata
mboyd has quit [Quit: This computer has gone to sleep]
ArchBeOS-work has quit [Quit: Leaving]
<CorySimmons> S'ok I suppose. Was just looking for the "right way" but meh
nomenkun_ has joined #ruby
MattStratton has joined #ruby
<MrZYX> as said the object needs to support it
<Hanmac> CorySimmons: BEWARE! some ! methods can return nil when nothing has changed
<MrZYX> many in core do
<CorySimmons> Hanmac, yeah i was gonna test rather than just randomly trying out methods and ending up with nil or errs
petey has quit [Ping timeout: 250 seconds]
<CorySimmons> ooc, does anyone know if it's possible in pry to get all the methods assigned to a var?
<CorySimmons> Or does Ruby not keep that in mem?
<Hanmac> you may want: foo = Foo.first.tap(&:somedata!)
yalue has quit [Quit: Leaving]
<MrZYX> you assign an object to a variable
<MrZYX> you can inspect an object with ls in pry
<MrZYX> so ls p lists the methods of the object referenced by p
lkba has joined #ruby
<CorySimmons> so…… http://pastie.org/8531681
nomenkun has quit [Ping timeout: 240 seconds]
<CorySimmons> nice
wildroman3 has quit [Read error: Connection reset by peer]
<CorySimmons> MrZYX: http://i.imgur.com/teyNM2f.png ?
<MrZYX> yes?
<CorySimmons> ALL of those have been refed by p?
nomenkun_ has quit [Ping timeout: 246 seconds]
<DouweM> CorySimmons: those are all methods on p.
mjs2600 has quit [Remote host closed the connection]
<CorySimmons> But not ones assigned by me>
<MrZYX> CorySimmons: p seems to contain an instance of String, so that string object has all methods String defines
<CorySimmons> I'm looking for something more like this http://pastie.org/8531681
<MrZYX> that makes no sense to me
<CorySimmons> Just echos the methods I've assigned to it
<MrZYX> you don't assign methods
<DouweM> CorySimmons: I have no idea what you're trying to do
<MrZYX> you assign objects
<canton7> CorySimmons, do you mean you want to create your own class, then list just the methods you defined in it?
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shredding has joined #ruby
<CorySimmons> canton7: No, I'd like to step through pry and figure out the method chain I want step by step, then when I'm happy with the returned result, enter some command and get a list of the methods I've applied to that var over the history of my pry session
<CorySimmons> I don't think it's possible
<CorySimmons> As in, I don't think that kind of information is stored along with the var
<canton7> oh! that was not clear at all
DropsOfSerenity has quit [Quit: Peace.]
<CorySimmons> :[
psyl0n has joined #ruby
dpritchett has left #ruby ["goodbye"]
shedd has quit [Remote host closed the connection]
<CorySimmons> Sorry, thought the paste illustrated it
<canton7> no. it isn't. there a console log which shows everything you've done...
<ddd> yeah was lurking and reading and that totally was not something i even remotely thought he meant
<CorySimmons> :D
ae-r has quit [Remote host closed the connection]
<ddd> i thought he wanted a list of the methods HE had added, none of the public ones
<CorySimmons> Long day and my feet are cold
mzdravkov has left #ruby [#ruby]
<CorySimmons> ddd that is what i want
<MrZYX> check hist, help hist
Shidash has quit [Ping timeout: 264 seconds]
swills has quit [Remote host closed the connection]
xcv has quit [Remote host closed the connection]
mansi has quit [Read error: Connection reset by peer]
<ddd> no you want a list of each methoid you've stepped through
<canton7> CorySimmons, methods you *called*, not methods you *added*
<ddd> 2 different things
xcv has joined #ruby
mansi has joined #ruby
xcv has quit [Read error: Connection reset by peer]
JohnBat26 has quit [Ping timeout: 272 seconds]
<CorySimmons> MrZYX: How does hist differ from scrolling up buffer?
<MrZYX> not much
awestroke has joined #ruby
<MrZYX> you can filter it
xcv has joined #ruby
<MrZYX> also save-file, help save-file
mary5030 has quit [Read error: No route to host]
mary5030 has joined #ruby
<CorySimmons> I see
<CorySimmons> That's as close as I'm gonna get I think
<canton7> you could do some magic with wrapping Foo and implementing method_missing
<ddd> iirc you can do something like YourClass.public_methods(false) to get the list of methods on a class you created
nomenkun has joined #ruby
petey has joined #ruby
<ddd> the methods *you* defined
<ddd> check that with the pry docs. banisterfiend has that in the tutorial iirc
mary5030 has quit [Remote host closed the connection]
xcv has quit [Remote host closed the connection]
g3orge has quit [Quit: WeeChat 0.4.2]
Mars___ has quit [Remote host closed the connection]
xcv has joined #ruby
Guest76116 has quit [Ping timeout: 250 seconds]
typicalbender has quit [Ping timeout: 252 seconds]
zoo-zed has quit [Quit: Leaving.]
asteros has joined #ruby
ravster has quit [Quit: Leaving.]
maletor has quit [Quit: Computer has gone to sleep.]
iliketur_ has quit [Quit: zzzzz…..]
hiyosi has joined #ruby
m_3 has quit [Remote host closed the connection]
ark_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
failshell has joined #ruby
jibi has quit [Ping timeout: 260 seconds]
mengu has joined #ruby
DouweM has quit [Ping timeout: 250 seconds]
mengu has quit [Changing host]
mengu has joined #ruby
<CorySimmons> Man, it'd be pretty awesome
<CorySimmons> I get the feeling that by reassigning foo, it loses previously applied methods though right?
iliketur_ has joined #ruby
psyl0n_ has joined #ruby
beneggett has joined #ruby
havenwood has quit [Remote host closed the connection]
<MrZYX> get your concepts straight
havenwood has joined #ruby
<MrZYX> a variable never ever would store "method calls to it"
mary5030 has joined #ruby
xcv has quit [Ping timeout: 272 seconds]
<MrZYX> an object could but that'd need to be implemented inside it
<MrZYX> it'd be a property of the object, not the variable
paulczar has joined #ruby
Mars__ has joined #ruby
maletor has joined #ruby
<CorySimmons> Ok thanks guys
Clooth has quit [Ping timeout: 245 seconds]
rehat has quit [Remote host closed the connection]
<paulczar> any rubocop people here? trying to work out how to skip certain cops … e.g. 'line is too long'
mlpinit has quit [Quit: Leaving...]
timonv has quit [Remote host closed the connection]
psyl0n has quit [Ping timeout: 264 seconds]
divi_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
allsystemsarego has quit [Quit: Leaving]
jacobsmith has joined #ruby
mark_locklear has quit [Ping timeout: 272 seconds]
<canton7> CorySimmons, https://eval.in/76634
vpretzel has quit [Quit: Adios!]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<canton7> hmm, better: https://eval.in/76635
* canton7 is quite proud of that
danshultz has quit [Remote host closed the connection]
gianlucadv has quit [Ping timeout: 260 seconds]
danshultz has joined #ruby
<canton7> take 3: https://eval.in/76636
blackmesa has quit [Ping timeout: 240 seconds]
<apeiros> omg, that's horrible
<apeiros> j/k, didn't look ;-)
R33C3 has joined #ruby
<CorySimmons> canton7: Nice :D
tylershipe has quit [Remote host closed the connection]
<MrZYX> use public_send
Authenticator has quit [Quit: leaving]
<MrZYX> so you notice that you start calling private methods
tylershipe has joined #ruby
blackmesa has joined #ruby
phantasm66 has quit [Quit: *sleeeep….]
<canton7> good poitn
<ddd> CorySimmons: I'm wrong on my public_methods(false). I'm trying to find it. he showed me the command once to *only* see the methods defined within the Class definition itself, just not finding it
R33C3 has quit [Remote host closed the connection]
jacobsmith has quit [Ping timeout: 245 seconds]
<CorySimmons> This is pretty interesting stuff though. It'll make living in pry a joy
awestroke has quit [Remote host closed the connection]
<canton7> that's got nothing to do with pry, btw :P
Shidash has joined #ruby
einarj has joined #ruby
divi has joined #ruby
danshultz has quit [Ping timeout: 246 seconds]
<CorySimmons> I know, I see how it works
<CorySimmons> But you can use it in pr
<CorySimmons> *pry
jbpros has joined #ruby
<CorySimmons> To kind of accomplish what I was looking for
tylershipe has quit [Ping timeout: 260 seconds]
vpretzel has joined #ruby
timonv has joined #ruby
<ddd> hmm maybe I'm thinking like: ls -m :shrug:
<CorySimmons> Where would a good place to put this in a Rails app be so I can access it anywhere? application.rb?
<ddd> access what?
<CorySimmons> ddd: lol, is that the same thing canton7 just made?
Monie has joined #ruby
Monie has quit [Client Quit]
<ddd> no
<MrZYX> CorySimmons: https://github.com/pry/pry/wiki/Pry-rc would be a good place IMO
arefaslani has quit [Ping timeout: 264 seconds]
einarj has quit [Ping timeout: 245 seconds]
m_3 has joined #ruby
Leighton has quit [Quit: leaving]
<CorySimmons> MrZYX: Yeah, or maybe as a command https://github.com/pry/pry/wiki/Custom-commands#wiki-Class_commands
<CorySimmons> canton7: Why pass "test"? A necessity?
wongon has joined #ruby
paulczar has left #ruby [#ruby]
R33C3 has joined #ruby
mlpinit has joined #ruby
<canton7> so the version of the code *before* I introduced WrappedObject would be 'foo = "test"\n foo.upcase!......'
<CorySimmons> I see
<canton7> (as in, that argument says what object we want to wrap up)
timonv has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
typicalbender has joined #ruby
<CorySimmons> Ok, so if my actual class was MonkeyButler then I'd foo = WrappedObject.new("MonkeyButler") ?
awea_ has joined #ruby
mansi has quit [Remote host closed the connection]
athst has joined #ruby
<canton7> no
kaldrenon has quit [Remote host closed the connection]
<CorySimmons> :\
<canton7> so if your original code was 'monkey = MonkeyButler.new \n monkey.jump'
shedd has joined #ruby
mansi has joined #ruby
<canton7> you'd do 'monkey = WrappedObject.new(MonkeyButler.new) \n monkey.jump'
kaldrenon has joined #ruby
mansi has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
mansi has joined #ruby
phantomcircuit is now known as PhantomCircuit
<canton7> put better: 'original_monkey = MonkeyButler.new \n wrapped_monkey = WrappedObject.new(initial_monkey) \n wrapped_monkey.jump'
PhantomCircuit is now known as phantomcircuit
<CorySimmons> I see
segfalt has quit [Quit: Leaving.]
capicue has quit [Quit: Leaving...]
<canton7> the wrapper makes a record of every method that's called, then calls that method on the object it's wrapped, gets the result, wraps that up, and returns it
psyl0n_ has quit [Remote host closed the connection]
<CorySimmons> So nice
Taranis has joined #ruby
<canton7> hacky as hell, but oh well
mmcdaris has joined #ruby
shedd has quit [Ping timeout: 240 seconds]
kaldrenon has quit [Ping timeout: 245 seconds]
<CorySimmons> Seems like foo shouldn't contain the first record yet since it wasn't assigned
pringlescan has quit [Quit: Leaving.]
<CorySimmons> ie: foo = foo.first
ldnunes has joined #ruby
<canton7> did you mean 'WrappedObject.new(Proposal.new) ?
<canton7> ah no, you didn't
<canton7> that's fine
<h0rrorvacui> CorySimmons what are you using for irc? I like the lines above a person's comments.
jchristi has quit [Quit: Leaving.]
<CorySimmons> Adium
<CorySimmons> Mac
Elhu has joined #ruby
rubyracer has quit [Quit: Konversation terminated!]
<h0rrorvacui> Thanks
nhhagen has quit [Remote host closed the connection]
<canton7> CorySimmons, foo doesn't contain the first record on [6]
<CorySimmons> canton7: Do I need to do something different for that assignment-only functionality?
rubyracer has joined #ruby
<CorySimmons> OH
acrussell has quit [Quit: Leaving.]
nhhagen has joined #ruby
<CorySimmons> So is it just assigning one at random?
<canton7> what?
shedd has joined #ruby
mjs2600 has joined #ruby
<CorySimmons> Oh nm
asteros has quit [Quit: asteros]
<canton7> I think Proposal established a database connection when you called Proposal.first, even if you threw away the result?
mmcdaris has quit [Client Quit]
brianpWins has quit [Quit: brianpWins]
aantix has joined #ruby
<canton7> if you assign foo = Proposal, I bet it'll look the same
jacobsmith has joined #ruby
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
brianpWins has joined #ruby
tannerburson has quit [Quit: tannerburson]
athst has quit [Quit: athst]
zz_CripperZ is now known as CripperZ
SHyx0rmZ has joined #ruby
<canton7> what are you showing me?
michaellynch has quit [Ping timeout: 260 seconds]
nhhagen has quit [Ping timeout: 240 seconds]
<CorySimmons> nm
ravster has joined #ruby
iamjarv__ has joined #ruby
jedimind has quit [Quit: home time!]
<CorySimmons> Why is it throwing away foo?
nhhagen has joined #ruby
ravster has left #ruby [#ruby]
burlyscudd has joined #ruby
jacobsmith has quit [Ping timeout: 240 seconds]
<CorySimmons> I don't understand why I can't access proposal_data like that.
<canton7> what does 'Proposal.proposal_data' return? I bet it throws that same exception
coca_rails has joined #ruby
jkhwan has quit [Ping timeout: 272 seconds]
<canton7> (latest: https://eval.in/76643)
<CorySimmons> Ah I suck
mjs2600 has quit [Remote host closed the connection]
<CorySimmons> ignore everything above as I suck
asteros has joined #ruby
SHyx0rmZ has quit [Ping timeout: 250 seconds]
iamjarvo_ has quit [Ping timeout: 250 seconds]
sethetter has joined #ruby
<sethetter> Is there a web based ruby linter?
<RubyPanther> Hanmac: nice, thanks. I'll avoid passing floats into my big_decimals
<RubyPanther> I hate floats anyways
<CorySimmons> canton7: Is there anyway to save JUST the methods applied during assignment?
<CorySimmons> That way I can test/fail a billion things before I get to the right method without recording the billion things
SHyx0rmZ has joined #ruby
<canton7> 'applied during assignment'?
sepp2k has quit [Ping timeout: 241 seconds]
carraroj has quit [Quit: Konversation terminated!]
<Hanmac> RubyPanther: the funiest thing is how they fixed it ;P look in the revison at ext/bigdecimal/bigdecimal.c
<CorySimmons> foo = Foo.first
<MrZYX> no, an object can't detect if it's assigned to a variable or not
<CorySimmons> would record
iamjarv__ has quit [Ping timeout: 240 seconds]
<CorySimmons> but foo.first by itself wouldn't record
<canton7> sure
<CorySimmons> :D
<CorySimmons> This thing is gonna be so awesome
<CorySimmons> It's really going to help me
<RubyPanther> goto lol
<Hanmac> MrZYX: classes can detect that ... but only once ;P
<canton7> CorySimmons, https://eval.in/76644
<canton7> CorySimmons, see if you can figure out why that change works :P
<CorySimmons> Only once?
nomenkun_ has joined #ruby
R33C3 has quit [Remote host closed the connection]
<Hanmac> RubyPanther: i think more funn is if (d != 0.0) {}else if (1/d < 0.0) {}
<CorySimmons> ok
nomenkun has quit [Ping timeout: 240 seconds]
mjs2600 has joined #ruby
gigetoo has joined #ruby
<RubyPanther> Hanmac: I don't mind if there are secret floats under the hood, and long they don't propagate
<Hanmac> >> a=Class.new; p a.name; XYZ = a; a.name
<eval-in> Hanmac => nil ... (https://eval.in/76645)
mmcdaris has joined #ruby
psyl0n has joined #ruby
<RubyPanther> That's mostly why I wrote my dec_number wrapper, I did the coerce backwards so I never get back floats
<CorySimmons> canton7: Now it's just returning the last method right?
<CorySimmons> upcase isn't logged
<Hanmac> CorySimmons: https://eval.in/76645 << like you see
<CorySimmons> sdofkasdf
<CorySimmons> lol nm
RaCx has quit [Quit: Computer has gone to sleep.]
shredding has quit [Quit: shredding]
kobain has joined #ruby
blackmesa has quit [Quit: WeeChat 0.4.2]
<CorySimmons> Hanmac: Yes I see what it's doing
<CorySimmons> Assigning to the array by default
<CorySimmons> Whereas the new version is making a new object to assign to
Xeago has quit [Remote host closed the connection]
<Hanmac> CorySimmons: gsub returns an total new string
<CorySimmons> right canton7?
phipes has joined #ruby
<canton7> so the old version updated a WrappedObject's log whenever a method was called, and passes that updated log onto the returned WrappedObject
<canton7> the new one doesn't update the WrappedObject's log, just adds something to the log it passes to the returned WrappedObject's log
blackmesa has joined #ruby
stringoO has quit [Quit: stringoO]
<canton7> you could also modify it to do something like 'foo.upcase # ok, that was good. foo.record'
<CorySimmons> canton7: Works perfect!!
jbpros has quit [Quit: jbpros]
<CorySimmons> :D
<Hanmac> CorySimmons: your method missing need to check if the method has ! or not ...
<CorySimmons> This is soooo cool
<CorySimmons> Makes exploring methods in the console such a joy
b00stfr3ak has quit [Ping timeout: 250 seconds]
sethetter has left #ruby [#ruby]
hiall has quit [Quit: hiall]
fuhgeddaboudit has quit [Ping timeout: 240 seconds]
user5555 has joined #ruby
R33C3 has joined #ruby
hiall has joined #ruby
<CorySimmons> canton7: Thank you so much!
mikepack has quit [Remote host closed the connection]
_amir has joined #ruby
<CorySimmons> Should turn this into a repo :)
<user5555> Hey, does anyone know a way to remove the '.rb' from a file and just make the file have the name only? Basically, you remove the .rb as the file type?
nhhagen has quit [Remote host closed the connection]
Dreamer3__ is now known as Dreamer3
nhhagen has joined #ruby
jerius has quit [Ping timeout: 264 seconds]
<canton7> CorySimmons, https://eval.in/76647
jacobsmith has joined #ruby
capicue has joined #ruby
davy_ has quit [Remote host closed the connection]
<user5555> Anyone know by chance? I am really trying to upload a gem soon, and need to remove the .rb from the file.
<CorySimmons> asdam;kdAs;dasd
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<MrZYX> >> File.basename("foo.rb", ".rb")
<eval-in> MrZYX => "foo" (https://eval.in/76648)
<CorySimmons> Go canton7 go!
charliesome has joined #ruby
redondos has joined #ruby
davy_ has joined #ruby
<redondos> hello. what's a more idiomatic way of extracting "two" from this string? "one.two.three.four" - this is what i'm doing: c.sub(/(.\w+){2}$/, "").sub(/.*\./, "")
<canton7> CorySimmons, even better: https://eval.in/76649
<MrZYX> redondos: what are the variants?
<MrZYX> always the second item?
<CorySimmons> canton7: These are in order right?
<canton7> 'in order'?
<CorySimmons> order of assignment
<redondos> MrZYX: it's a domain name, and i want the third to last. so i think split on . and get -2?
<user5555> MrZYX: I am not acutally trying to program something to do it. I am actually physically trying to change the file name myself. For whatever reason, windows doesn't seem to give me the option to change the file type when I go to properties.
<CorySimmons> of "recording"
<canton7> the log?
<canton7> yeah, it's ordered
<CorySimmons> yeah
<CorySimmons> k
<canton7> Array#<< appends
<MrZYX> user5555: google windows and well known file extensions
gigetoo has quit [Ping timeout: 245 seconds]
<MrZYX> redondos: yup, also check Array#last
<CorySimmons> Ah I see
<CorySimmons> canton7: You should seriously turn this into a github repo
<CorySimmons> I'd star. :\
failshel_ has joined #ruby
<redondos> thanks MrZYX
momomomomo has quit [Quit: momomomomo]
<canton7> CorySimmons, https://eval.in/76650
nhhagen has quit [Ping timeout: 250 seconds]
v0n has quit [Ping timeout: 240 seconds]
<CorySimmons> canton7: Can you add a -simple flag in there that just echos out .downcase.gsub('t', 'p') instead of [{:method=>:downcase!, :args=>[]}, {:method=>:gsub, :args=>["t", "p"]}] ?
cpruitt has joined #ruby
sepp2k has joined #ruby
jkhwan has joined #ruby
failshell has quit [Read error: Operation timed out]
<CorySimmons> Have twitter man?
shime has joined #ruby
amoli has joined #ruby
jacobsmith has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
mikepack has joined #ruby
<user5555> MrZYX: I think I found the answer via google, thanks for the help.
interactionjaxsn has quit [Remote host closed the connection]
failshel_ has quit [Ping timeout: 246 seconds]
ambushsabre has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
threesome has quit [Read error: Operation timed out]
petey has quit [Remote host closed the connection]
preller has joined #ruby
preller has joined #ruby
preller has quit [Changing host]
<canton7> CorySimmons, https://eval.in/76656
<canton7> and no, not that I use
<canton7> CorySimmons, right, bedtime for me. If you update it, comment on that gist :)
petey has joined #ruby
<CorySimmons> Thanks so much man
<CorySimmons> <3 you :D
RoryHughes has joined #ruby
elux has quit [Quit: Bye!]
shadoi has joined #ruby
kcombs_ has quit [Remote host closed the connection]
MattStratton has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Remote host closed the connection]
Elhu has quit [Quit: Computer has gone to sleep.]
matheuscaceres has joined #ruby
jkhwan has quit [Remote host closed the connection]
mdel has quit [Ping timeout: 252 seconds]
tvw has joined #ruby
jkhwan has joined #ruby
petey has quit [Ping timeout: 246 seconds]
jkhwan has quit [Read error: Connection reset by peer]
jkhwan has joined #ruby
petey has joined #ruby
CorySimmons has quit [Quit: Leaving.]
otherj has joined #ruby
DouweM has joined #ruby
blackmesa has quit [Quit: WeeChat 0.4.2]
tanema has quit [Remote host closed the connection]
<user5555> So, I was told, that is I remove the .rb extension from a file, add a shebang at the top of the file like this "#!/usr/bin/env ruby", I should be able to go to that directory via command line and type bin/studio_game and the file will run. However it does not. Does the shebang method not work anymore?
bluOxigen has quit [Ping timeout: 272 seconds]
mengu has quit [Remote host closed the connection]
drumusician has quit [Ping timeout: 246 seconds]
ctsimpson has joined #ruby
macmarti_ has quit [Remote host closed the connection]
tanema_ has joined #ruby
DanBoy has joined #ruby
macmartine has joined #ruby
<jwest> user5555: Try ./studio_game
Animawish has joined #ruby
xcv has joined #ruby
luckyruby has joined #ruby
brunto has joined #ruby
<user5555> jwest: Doesn't work either.
<Eiam> or chmod +x
<Eiam> then try it..
fedesilva has quit [Remote host closed the connection]
CripperZ is now known as zz_CripperZ
<user5555> Eiam: I tried that, I am on window, not Unix (mac or PC)
<matled> haha, that's like trying a blind shell injection :)
<Eiam> you'd either need to say "ruby studio_game" or chmod +X studio_game; ./studio_game
R33C3 has quit [Remote host closed the connection]
canton7-mobile has joined #ruby
<Eiam> oh windows.. bummer.
capicue has quit [Quit: Leaving...]
zz_tsykoduk is now known as tsykoduk
macmartine has quit [Remote host closed the connection]
<user5555> Eiam: It shouldn't be a bummer, because the extra work is necessary on the Unix machines, not the windows.
macmartine has joined #ruby
yfeldblum has joined #ruby
<user5555> Eiam: You shouldn't need to do chmod stuff on windows.
<Eiam> I don't mind if you enjoy doing development work on Windows, thats your pain to deal with & manage
burlyscudd has quit [Quit: Leaving.]
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Myk267> Is it weird to iterate over an array like this: a[0..a.length] ?
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Eiam> Myk267: yes...
shadoi has quit [Quit: Leaving.]
<user5555> Eiam: It says bin is not a recognized as an internal or external command when I type "bin/studio_game"
<Eiam> Myk267: a[0..-1] ?
tanema_ has quit [Ping timeout: 246 seconds]
<Eiam> user5555: honestly, I have not used Windows for anything other than launching a game from steam in over 10 years. I barely remember how "dir" works or what options it supports. I won't be able to help you out any further sorry.
sebkomianos has joined #ruby
louism2wash has quit [Quit: This computer has gone to sleep]
<Myk267> Eiam: hey hey, that seems nicer. Thanks!
<MrZYX> user5555: how should a shebang work in windows if there's isn't even a /usr/bin directory nor a env(.exe) in it?
<Eiam> MrZYX: powershell magic?! who knows.
<user5555> MrZYX: I have my seperated into three folders. bin, lib, and spec
<user5555> the file is in the bin directory
<Myk267> b
<MrZYX> Myk267: Eiam: uhm, maybe I'm missing something, but a[0..-1] == a
phansch has joined #ruby
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
<Eiam> MrZYX: right, it totally does equal that...
Cork has quit [Ping timeout: 245 seconds]
<MrZYX> so what's the point?
<Eiam> MrZYX: he said iterate but he shows array accessors, not an enumerator
<Myk267> MrZYX: a is just some array, in this case.
<MrZYX> a.each
<Eiam> *shrug* I just provided a more concise way to do a[0..a.length]
<MrZYX> done
<user5555> MrZYX: The point is that the file and directory are there, it is not finding it and it makes zero sense.
<Eiam> MrZYX: but yes, you are correct that its not any sort of "enumeration" going on, I figured he knew what he wanted and was just using the wrong words =)
duggiefresh has joined #ruby
<Eiam> >> [1,2,3].each {|item| puts item}
<eval-in> Eiam => 1 ... (https://eval.in/76659)
<MrZYX> user5555: using a shebang on windows makes zero sense to me. But then I don't use windows
<Eiam> user5555: a shebang is a unix construct.
<user5555> It was so that I wouldn't have to type ruby befor running something, but maybe this is just stupd to be doing.
<MrZYX> user5555: but I see those .bat files in all the cross platform projects, can't imagine why they'd put that there if windows knew shebangs
<Eiam> it lets the loader know it should parse and use the directive supplied after the shebang.
mmcdaris has quit [Quit: mmcdaris]
<user5555> What eiam said basically.
<user5555> You put the shebang at the top of the file.
jibi has joined #ruby
R33C3 has joined #ruby
<Eiam> wait, don't flip me to your side
Cork has joined #ruby
<Eiam> I'm on MrZYX's side here ;)
<MrZYX> :D
R33C3 has quit [Client Quit]
<Eiam> using a shebang to indicate *anything* on Windows makes 0 sense.
mansi has quit [Remote host closed the connection]
<Eiam> its not a windows construct.
<jwest> user5555: That's for unix. Windows doesn't understand it at all.
<MrZYX> Eiam: did you know you can register .exe files in the kernel so it runs them through wine?
funburn has joined #ruby
<Eiam> MrZYX: I honestly don't want to know anything about windows. Using it from 3.1 to XP was years of my life I wish I could have spent using some variation of unix instead
preller has quit [Ping timeout: 240 seconds]
duggiefr_ has quit [Ping timeout: 264 seconds]
rubyracer has quit [Quit: Konversation terminated!]
thelorax123 has quit [Remote host closed the connection]
<user5555> jwest: I think you are right. I'm just going to move on and continue. I will just leave it at the top of the file, but it will be useless to me I guess unless I'm on a linux or mac.
blaskovicz has quit [Quit: Leaving.]
ylluminate has joined #ruby
jacobsmith has joined #ruby
danshultz has joined #ruby
Lewix has quit [Remote host closed the connection]
timonv has joined #ruby
canton7-mobile has quit [Read error: Connection reset by peer]
mmcdaris has joined #ruby
canton8 has joined #ruby
thelorax123 has joined #ruby
ambushsabre has joined #ruby
mansi has joined #ruby
drag00n has quit [Ping timeout: 250 seconds]
duggiefresh has quit [Remote host closed the connection]
mansi has quit [Read error: Connection reset by peer]
zombiebit has joined #ruby
mansi has joined #ruby
duggiefresh has joined #ruby
dkamioka has quit [Remote host closed the connection]
h0rrorvacui has quit [Quit: Leaving]
canton8 has quit [Client Quit]
lfox has quit [Quit: ZZZzzz…]
h0rrorvacui has joined #ruby
danshultz has quit [Ping timeout: 246 seconds]
timonv has quit [Ping timeout: 252 seconds]
sailias has quit [Ping timeout: 264 seconds]
duggiefresh has quit [Remote host closed the connection]
Animawish has quit [Quit: Animawish]
xcv has quit [Remote host closed the connection]
javon has quit [Ping timeout: 272 seconds]
xcv has joined #ruby
macmartine has quit []
newbiehacker has quit [Ping timeout: 264 seconds]
ctsimpson has quit [Remote host closed the connection]
nhhagen has joined #ruby
dawkirst has joined #ruby
duggiefresh has joined #ruby
<maletor> What is \x01?
xcv has quit [Ping timeout: 272 seconds]
shadoi has joined #ruby
ce_afk is now known as cescalante
typicalbender1 has joined #ruby
typicalbender has quit [Read error: Connection reset by peer]
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
preller has joined #ruby
cbetta_afk is now known as cbetta
Bira has joined #ruby
typicalbender1 has quit [Client Quit]
claymore has quit [Quit: Leaving]
liamkeily has joined #ruby
zombiebit has quit [Remote host closed the connection]
<Eiam> its a c-style character scape
zombiebit has joined #ruby
agjacome has quit [Ping timeout: 264 seconds]
zombiebit has quit [Remote host closed the connection]
zombiebit has joined #ruby
blackmesa has joined #ruby
petey has quit [Remote host closed the connection]
otherj has quit []
Megtastique has quit []
larissa has quit [Quit: Leaving]
pragmatism is now known as pragmatism|away
mando has quit [Remote host closed the connection]
polaco is now known as polaco_zZz
mando has joined #ruby
timonv has joined #ruby
capicue has joined #ruby
RoryHughes has quit []
dayepa1 has quit [Ping timeout: 246 seconds]
pel_daniel has left #ruby [#ruby]
nobitanobi has quit [Read error: Connection reset by peer]
lmickh has quit [Quit: lmickh]
Nogbit has joined #ruby
user5555 has quit [Quit: Page closed]
shadoi has quit [Quit: Leaving.]
kirun has quit [Quit: Client exiting]
Lewix has joined #ruby
mmcdaris has quit [Quit: mmcdaris]
Lewix has quit [Remote host closed the connection]
nobitanobi has joined #ruby
mando has quit [Ping timeout: 245 seconds]
blackmesa has quit [Quit: WeeChat 0.4.2]
timonv has quit [Ping timeout: 264 seconds]
timonv has joined #ruby
Xeago has joined #ruby
duggiefresh has quit [Remote host closed the connection]
pel_daniel1 has joined #ruby
zombiebit has quit [Remote host closed the connection]
zombiebit has joined #ruby
davy_ has quit [Remote host closed the connection]
burlyscudd has joined #ruby
petey has joined #ruby
davy_ has joined #ruby
wildroman2 has joined #ruby
mootpointer has joined #ruby
preller has quit [Ping timeout: 240 seconds]
burlyscudd has quit [Client Quit]
mansi has quit [Remote host closed the connection]
tanema has joined #ruby
mercwithamouth has joined #ruby
mansi has joined #ruby
aasirc has quit [Quit: Textual IRC Client: www.textualapp.com]
jibi has quit [Quit: .]
duggiefresh has joined #ruby
tsykoduk is now known as zz_tsykoduk
sambao21 has quit [Quit: Computer has gone to sleep.]
thumpba has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 272 seconds]
zombiebit has quit [Ping timeout: 240 seconds]
javon has joined #ruby
kh019267 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
duggiefresh has quit [Remote host closed the connection]
aryaching has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
nobitanobi has quit [Ping timeout: 246 seconds]
mary5030 has quit [Remote host closed the connection]
kpshek has quit []
pragmatism|away is now known as pragmatism
mansi has quit [Ping timeout: 250 seconds]
Xeago has quit [Ping timeout: 240 seconds]
m8 has quit [Quit: Sto andando via]
superscott[8] has joined #ruby
dkamioka has joined #ruby
preller has joined #ruby
ctsimpson has joined #ruby
Zai00 has quit [Quit: Zai00]
<redondos> MrZYX: going back to my question, sometimes I need to extract "colo" from server.colo.domain.com, sometimes from server.colo.country.domain.com
<redondos> how do you recommend doing this staying idiomatic?
<MrZYX> never from "colo.domain.com" or "foo.server.colo.domain.com"?
Shidash has quit [Ping timeout: 264 seconds]
coca_rails has quit [Remote host closed the connection]
javon has quit [Ping timeout: 250 seconds]
<redondos> not the first one, but the latter can occur
drag00n has joined #ruby
<redondos> and "country" is only "us" or "ca"
aryaching has quit []
<redondos> so, if [-3] matches us or ca, take -4
cbetta has left #ruby ["Textual IRC Client: www.textualapp.com"]
phansch has quit [Quit: Leaving]
klaut has quit [Remote host closed the connection]
appineer has quit [Quit: appineer]
<redondos> i want to do that without a bunch of conditionals. something that looks nicer in ruby
xcv has joined #ruby
blaskovicz has joined #ruby
Viridisignis has joined #ruby
asteros has quit [Quit: asteros]
almarshall has joined #ruby
<MrZYX> mmh, I guess I'd end up with something like string[/\.(\w)+\.(us|ca|\w+\.\w+$)/, 1] (didn't test, so maybe not that exact version)
amedeiros has joined #ruby
asteros has joined #ruby
<MrZYX> (\w)+ -> (\w+) of course
divi has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dkamioka has quit [Remote host closed the connection]
mjs2600 has quit [Remote host closed the connection]
banghouse2 has joined #ruby
banghouse2 has quit [Client Quit]
nobitanobi has joined #ruby
nobitanobi has quit [Client Quit]
jn_ has joined #ruby
jn_ has quit [Client Quit]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
funburn has quit [Read error: Connection reset by peer]
cpruitt has quit [Quit: cpruitt]
amedeiros has quit [Quit: leaving]
yfeldblum has quit [Remote host closed the connection]
funburn has joined #ruby
yfeldblu_ has joined #ruby
geggam has quit [Remote host closed the connection]
agent_white has quit [Ping timeout: 246 seconds]
amedeiros has joined #ruby
coca_rails has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
dwgill has quit [Quit: Leaving]
ctsimpson has quit [Remote host closed the connection]
tylersmith has joined #ruby
funburn has quit [Read error: Connection reset by peer]
Kricir has joined #ruby
taion809 has joined #ruby
jpagano_ has joined #ruby
breakingthings has quit []
atmosx has joined #ruby
Shidash has joined #ruby
<jpagano_> real simple question guys but for some reason I can't find it by googling… what is the @ symbol used for in ruby? like in the beginning if a variable declaration @variable ?
<jpagano_> local variable?
<sebkomianos> jpagano_: global
freerobby has quit [Quit: Leaving.]
nfk has quit [Quit: yawn]
<jpagano_> oh ok
<jpagano_> thanks
<MrZYX> jpagano_: sebkomianos no it's not a global, it's an instance variable
<MrZYX> $ is global
<jpagano_> know of any guide to symbol usages ?
<Eiam> only a bajillion
<jpagano_> well not symbols, characters i guess