apeiros_ changed the topic of #ruby to: Ruby 2.1.2; 2.0.0-p481; 1.9.3-p545: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
jamesaanderson has joined #ruby
<lethjakman> I'd like to encapsulate my errr...not a method, a class.
jxf has joined #ruby
jimmyhoughjr has joined #ruby
mg^ has quit [Quit: Leaving]
Nexus_x1 has joined #ruby
mojo619 has quit [Quit: mojo619]
saarinen has quit [Quit: saarinen]
pen has quit [Remote host closed the connection]
pen has joined #ruby
smathieu has quit [Remote host closed the connection]
_djbkd has joined #ruby
end_guy has joined #ruby
smathieu has joined #ruby
snath has quit [Ping timeout: 240 seconds]
djbkd has quit [Ping timeout: 240 seconds]
axilla has quit [Ping timeout: 264 seconds]
axilla has joined #ruby
ddv has quit [Ping timeout: 245 seconds]
Zenigor has quit [Remote host closed the connection]
freerobby has joined #ruby
ddv has joined #ruby
pen has quit [Ping timeout: 265 seconds]
smathieu has quit [Ping timeout: 252 seconds]
marr has quit []
SilkFox_ has quit [Ping timeout: 264 seconds]
mercerist has quit [Quit: Computer has gone to sleep.]
snath has joined #ruby
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zz_nopc0de is now known as nopc0de
carlyle has quit [Remote host closed the connection]
axilla has quit [Ping timeout: 264 seconds]
combusean has quit [Ping timeout: 240 seconds]
KillerFox has quit [Ping timeout: 252 seconds]
KillerFox has joined #ruby
axilla has joined #ruby
<ra4king> nil is weird
<ra4king> why was "nil" chosen instead of "null"?
<ra4king> lethjakman: def initialize?
thumpba has joined #ruby
Bira has joined #ruby
moring has joined #ruby
supermarin_ has joined #ruby
dpswireless has quit [Remote host closed the connection]
rgiscard has joined #ruby
moring has quit [Client Quit]
endash has quit [Quit: endash]
pietr0 has quit [Quit: pietr0]
axilla has quit [Client Quit]
<csmrfx> null is zero
<csmrfx> nil is nothing
<csmrfx> quite the difference there
<lethjakman> like this.
Zenigor has joined #ruby
<benzrf> ra4king: probably because of lisp or smalltalk
fella5s has quit [Read error: Connection reset by peer]
<benzrf> wait, does perl use nil?
<benzrf> it doesnt does it
<arrubin> benzrf: It uses neither.
<ra4king> benzrf: google says NULL
<arrubin> undef is the closest thing in Perl.
<ra4king> oh wait, there's no null in perl
KanKava has quit [Quit: leaving]
<benzrf> arrubin: thats what i thought
jjbohn has quit [Quit: Leaving...]
<benzrf> so yeah, st or lis
<benzrf> p
the_f0ster has quit [Ping timeout: 240 seconds]
supermarin_ has quit [Ping timeout: 240 seconds]
<ra4king> lethjakman: yeah put that code in an initialize method
<lethjakman> ra4king: really? ok lemme try.
fella5s has joined #ruby
thumpba has quit [Remote host closed the connection]
thumpba has joined #ruby
<ra4king> and by "that code" I mean that .each block at the top only
nopc0de is now known as zz_nopc0de
nanoyak has quit [Quit: Computer has gone to sleep.]
_djbkd has quit [Quit: Leaving...]
<lethjakman> yep
<lethjakman> thank you!
<lethjakman> that helps.
nanoyak has joined #ruby
Megtastique has quit []
bradhe has quit [Remote host closed the connection]
Royalb15 has quit [Read error: Connection reset by peer]
happytux has quit [Quit: ChatZilla 0.9.90.1-rdmsoft [XULRunner 22.0/20130619132145]]
<lethjakman> hmmm, define_method is undefined
Lutece has quit [Quit: WeeChat 0.4.3]
Hanmac1 has joined #ruby
djbkd has joined #ruby
zz_karupa is now known as karupa
nowthatsamatt has joined #ruby
banisterfiend has quit [Remote host closed the connection]
banister has joined #ruby
t0rc has quit [Quit: WeeChat 0.4.3]
Royalb15 has joined #ruby
Hanmac has quit [Ping timeout: 276 seconds]
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
nanoyak_ has joined #ruby
nanoyak has quit [Ping timeout: 252 seconds]
thumpba has quit [Remote host closed the connection]
marcdel has quit []
sambao21 has quit [Quit: Computer has gone to sleep.]
n_blownapart has joined #ruby
postmodern has joined #ruby
yxhuvud has quit [Ping timeout: 240 seconds]
jxf has quit [Ping timeout: 255 seconds]
thumpba has joined #ruby
sski has joined #ruby
marcdel has joined #ruby
chipotle has joined #ruby
jimmyhoughjr has quit [Quit: jimmyhoughjr]
northfurr has joined #ruby
jimmyhoughjr has joined #ruby
toastynerd has quit [Remote host closed the connection]
MatthewsFace has joined #ruby
Zenigor has quit [Remote host closed the connection]
WishBoy- has quit [Remote host closed the connection]
Zenigor has joined #ruby
WishBoy has joined #ruby
thumpba has quit [Remote host closed the connection]
oo_ has joined #ruby
oo_ has quit [Client Quit]
kaspergrubbe has quit [Remote host closed the connection]
mjsmith2 has joined #ruby
maletor has quit [Ping timeout: 265 seconds]
shaileshg has joined #ruby
fatur has joined #ruby
trhodes_ has quit [Ping timeout: 264 seconds]
x1337807x has quit [Ping timeout: 276 seconds]
monkegjinni has quit [Remote host closed the connection]
jhulten has quit [Remote host closed the connection]
thumpba has joined #ruby
oo_ has joined #ruby
tkuchiki has joined #ruby
pu22l3r has joined #ruby
maletor has joined #ruby
abstrakt has joined #ruby
jamesaanderson has quit [Quit: Textual IRC Client: www.textualapp.com]
gilest has joined #ruby
trhodes_ has joined #ruby
Hanmac has joined #ruby
MatthewsFace has quit [Quit: This computer has gone to sleep]
marcdel has quit []
sepp2k has quit [Read error: Connection reset by peer]
pu22l3r has quit [Ping timeout: 252 seconds]
Hanmac1 has quit [Ping timeout: 265 seconds]
benlieb has quit [Read error: Connection reset by peer]
g0bl1n has quit [Ping timeout: 240 seconds]
benlieb has joined #ruby
<lethjakman> how do you instance_variable_set with an array?
maletor has quit [Quit: Computer has gone to sleep.]
n_blownapart has quit [Remote host closed the connection]
pierre1_ has joined #ruby
ixti has quit [Ping timeout: 255 seconds]
linojon has quit [Quit: linojon]
thumpba has quit [Remote host closed the connection]
rgiscard has quit [Ping timeout: 252 seconds]
x1337807x has joined #ruby
john3213 has joined #ruby
subbyyy has quit [Ping timeout: 255 seconds]
tzorvas has quit [Quit: Lost terminal]
maestrojed has quit [Quit: Textual IRC Client: www.textualapp.com]
amclain has joined #ruby
maestrojed has joined #ruby
max__ has joined #ruby
max__ is now known as Synthead
MatthewsFace has joined #ruby
john3213 has left #ruby [#ruby]
subbyyy has joined #ruby
meinside has joined #ruby
djbkd has quit [Remote host closed the connection]
Megtastique has joined #ruby
Megtastique has quit [Client Quit]
binaryhat has joined #ruby
zz_nopc0de is now known as nopc0de
dpswireless has joined #ruby
MatthewsFace has quit [Quit: This computer has gone to sleep]
toastynerd has joined #ruby
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nanoyak_ has quit [Quit: Computer has gone to sleep.]
supermarin_ has joined #ruby
aiguu__ has joined #ruby
bbloom has quit [Ping timeout: 252 seconds]
robustus has quit [Ping timeout: 264 seconds]
jimmyhoughjr has quit [Quit: jimmyhoughjr]
afex has quit [Ping timeout: 255 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
bbloom has joined #ruby
rgiscard has joined #ruby
robustus has joined #ruby
x1337807x has quit [Ping timeout: 255 seconds]
subbyyy has quit [Ping timeout: 240 seconds]
smathieu has joined #ruby
pen has joined #ruby
dpswireless has quit [Remote host closed the connection]
Es0teric has joined #ruby
toastynerd has quit [Remote host closed the connection]
hgl has joined #ruby
supermarin_ has quit [Ping timeout: 255 seconds]
dpswireless has joined #ruby
Megtastique has joined #ruby
x1337807x has joined #ruby
x1337807x has quit [Client Quit]
zigomir has joined #ruby
nopc0de is now known as zz_nopc0de
RyanV has joined #ruby
Hanmac1 has joined #ruby
mikepack has quit [Remote host closed the connection]
dpswireless has quit [Ping timeout: 252 seconds]
mikepack has joined #ruby
JordanJ2 has joined #ruby
papercode has quit [Remote host closed the connection]
pencilcheck has joined #ruby
Bumptious has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 255 seconds]
Bumptious has joined #ruby
papercode has joined #ruby
zigomir has quit [Ping timeout: 240 seconds]
Megtastique has quit []
frosgy has quit [Ping timeout: 264 seconds]
sunya7a has joined #ruby
pen has quit [Ping timeout: 240 seconds]
sunya7a has quit [Read error: Connection reset by peer]
mikepack has quit [Ping timeout: 264 seconds]
frogsy has joined #ruby
<Dreamer3> is there a way to write a hash key symbol with a . in it using the new hash syntax?
<Dreamer3> "blah.blah" => 1 ... what : 1
papercode has quit [Ping timeout: 276 seconds]
<benzrf> Dreamer3: those arent the same thing
<benzrf> & not that i know of
thomasxie has joined #ruby
sunya7a has joined #ruby
<Dreamer3> i was asking what what should be
<JordanJ2> Hi, I'm running Terminus Bot and getting this error http://pastebin.com/9cVk09qk. What command can I use to install it?
<Dreamer3> i didn't think there was but thought someone might know better
jimbauds has joined #ruby
codeurge has joined #ruby
toastynerd has joined #ruby
<wallerdev> you can write :"blah.blah" => 1 for a symbol if you want one
binaryhat has quit [Quit: Leaving]
Megtastique has joined #ruby
frank_____ has quit [Quit: Connection closed for inactivity]
<Dreamer3> yep, but i have to use =>
<Dreamer3> can't use the new :
<Dreamer3> i already know about :""
<wallerdev> the new way is just shorthand for the old way
<wallerdev> and it only works in certain scenarios
afex has joined #ruby
<Dreamer3> right, like no ".s" :)
<Dreamer3> correct?
Ipnorospo has joined #ruby
aspires has quit []
<wallerdev> i dont know what that means
thesheff17_ has joined #ruby
Megtastique has quit [Read error: Connection reset by peer]
<Dreamer3> :"blah.blah" => 1
thesheff17 has quit [Disconnected by services]
Megtastique has joined #ruby
<Dreamer3> is it not possible to write that in the shorthand
<wallerdev> right
thesheff17_ is now known as thesheff17
sunya7a_ has joined #ruby
JumpMast3r has joined #ruby
<wallerdev> basically if you have to use quotes you cant do it
replay has quit [Ping timeout: 276 seconds]
replay_ has joined #ruby
<Dreamer3> thanks
<Dreamer3> tha's all i wanted to know
sunya7a has quit [Ping timeout: 240 seconds]
<lethjakman> is there maybe a way to instance_variable_get a reference?
nanoyak has joined #ruby
<wallerdev> just use instance_variable_set when you want to update it?
<lethjakman> oh weird...it's by reference UNLESS you set it to a new...
<lethjakman> new must repoint it.
<lethjakman> wallerdev: can't figure out how to use that on an array.
<lethjakman> or hash.
toastynerd has quit [Remote host closed the connection]
benlieb has quit [Read error: Connection reset by peer]
<wallerdev> if your instance variable is an array you can add to it with the result of instance_variable_get
<wallerdev> should work fine
Ipnorospo has quit [Read error: Connection reset by peer]
raspberryfan has joined #ruby
<lethjakman> instance_variable_set('@my_var[2]', 5)
<lethjakman> is what I'm trying to do.
zorak has quit [Ping timeout: 252 seconds]
redondos has quit [Excess Flood]
redondos has joined #ruby
redondos has joined #ruby
redondos has quit [Changing host]
<wallerdev> lethjakman: thats not an instance variable
<wallerdev> lol
Royalb15 has quit [Ping timeout: 252 seconds]
<wallerdev> you can do instance_variable_get(:@my_var)[2] = 5
meinside has quit [Ping timeout: 245 seconds]
<wallerdev> benzrf: lol nice
<wallerdev> :D
<wallerdev> made me laugh
<wallerdev> i feel like id do the same thing as a programmer though
<wallerdev> anyway laterrr
upsell5 has joined #ruby
meinside has joined #ruby
wallerdev has quit [Quit: wallerdev]
Spami has quit [Quit: This computer has gone to sleep]
nanoyak has quit [Quit: Computer has gone to sleep.]
thesheff17 has quit [Ping timeout: 240 seconds]
smathieu has quit [Remote host closed the connection]
rek2p0wn has joined #ruby
meatherly has joined #ruby
smathieu has joined #ruby
Zenigor has quit [Remote host closed the connection]
sunya7a_ has quit [Ping timeout: 240 seconds]
<shevy> havenwood with a simple bot?
jimmyhoughjr has joined #ruby
<havenwood> shevy: bot? huh
<havenwood> shevy: what kinda bot?
<havenwood> shevy: oh, right!
smathieu has quit [Ping timeout: 255 seconds]
<havenwood> shevy: there's already a gem that will create project skeletons with gibberish ruby
Zenigor has joined #ruby
<havenwood> shevy: i guess the bad part would be the hundreds of github accounts you'd want to spread it over
hamakn has quit [Remote host closed the connection]
<havenwood> shevy: or just let those javascript fiends win the repo count battle with fluff! :P
braincra- has joined #ruby
<havenwood> shevy: maybe we should let them win at something since we already have so many nice things
mjsmith2 has quit [Remote host closed the connection]
<benzrf> you know, like when adults let kids 'win' at things
thesheff17 has joined #ruby
zorak has joined #ruby
MatthewsFace has joined #ruby
mojo619 has joined #ruby
nari_ has joined #ruby
<shevy> havenwood hmmm
<shevy> benzrf hey
<shevy> benzrf aren't you a kid?
centrx has joined #ruby
<shevy> I never let kids win at anything voluntarily
braincrash has quit [Ping timeout: 264 seconds]
afex has quit [Ping timeout: 240 seconds]
crazymykl has quit [Ping timeout: 276 seconds]
wallerdev has joined #ruby
io_syl has quit []
crazymykl has joined #ruby
lobstah has joined #ruby
Zenigor has quit [Remote host closed the connection]
<lobstah> hey all - wanting to learn some ruby -is there a good guide on installing ruby on rails for macos? searching there are about 20 guides, and all of them seem different.. is there a definitive 'best guide' out there? thanks
<shevy> now
krazh has joined #ruby
<shevy> is that a ruby question
<shevy> or a ruby on rails question
<shevy> because for the latter, the folks are on #rubyonrails
<havenwood> lobstah: What OS?
<lobstah> MAvericks
sunya7a has joined #ruby
datafirm has joined #ruby
<benzrf> lobstah: dont start with rails
RyanV has quit [Quit: Lingo - http://lingoirc.com]
<havenwood> lobstah: ruby-install/chruby or rvm if you want to be able to switch Rubies, otherwise brew Ruby or even system Ruby will do
<lobstah> benzrf thanks for the advice - I'll heed that and start with just ruby
<benzrf> lobstah: :-)
<havenwood> lobstah: Sinatra or Hobbit are nice to look at after you have some Ruby mastered.
<wallerdev> gem install rails
<wallerdev> done
zz_nopc0de is now known as nopc0de
<lobstah> havenwood so I do a ruby -v and I get ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0] - does that mean I installed it correctly?
<havenwood> lobstah: looks good
<shevy> PERHAPS
<havenwood> lobstah: which ruby
<shevy> if you would instead get output like "use python man, not ruby" then I would worry
<havenwood> lobstah: but yeah, that looks good
<benzrf> shevy: python is bretty good
<havenwood> lobstah: Just to double check?: gem -v
<shevy> benzrf python3 is awesome
<lobstah> havenwood what do you mean "which ruby"? - it's 2.1.2p95 isn't it?
<shevy> lol
<havenwood> lobstah: oh, i was just curious as to its path - i mean the command: which ruby
<havenwood> lobstah: like: command -v ruby
<shevy> lobstah 'which' is a command in most shells / terminals
omosoj has joined #ruby
krz has joined #ruby
<lobstah> havenwood ah! hahaha - it's /Users/mos/.rvm/rubies/ruby-2.1.2/bin/ruby
supermarin_ has joined #ruby
<havenwood> lobstah: yeah, so looks like you have a good user install of latest stable Ruby using RVM
kenneth__ has quit [Read error: Connection reset by peer]
kenneth has joined #ruby
<lobstah> havenwood fantastic! guess it's time to find some "ruby for dummies" sites... any you all recommend?
duggiefresh has joined #ruby
toastynerd has joined #ruby
sabfer has joined #ruby
<havenwood> lobstah: so as wallerdev said, installing Rails is just: gem install rails
aspires has joined #ruby
<havenwood> lobstah: if you haven't done it yet: http://tryruby.org/
<lobstah> awesome - thanks havenwood - might as well just install it then
<lobstah> havenwood thanks! I'll take a look there
sunya7a has quit [Ping timeout: 276 seconds]
<havenwood> lobstah: take a look at pry as an alternative to irb: gem install pry
<havenwood> lobstah: gem install sinatra hobbit
<havenwood> lobstah: etc
skysploit has joined #ruby
skysploit has joined #ruby
<havenwood> some other good resources here: https://www.ruby-lang.org/en/documentation/
<lobstah> thank you!
radic has quit [Disconnected by services]
<havenwood> lobstah: http://www.sinatrarb.com/
radic_ has joined #ruby
carlyle has joined #ruby
<havenwood> lobstah: #rubyonrails is the Rails channel by the way, if no one already mentioned
kenneth has quit [Read error: Connection reset by peer]
supermarin_ has quit [Ping timeout: 240 seconds]
<lobstah> thanks havenwood ! I'll park in there as well... try to absorb knowledge from you all :)
omosoj has quit [Ping timeout: 240 seconds]
yxhuvud has joined #ruby
<sabfer> hi! I'm looking to transform javascript encoded unicode codepoints to their corresponding characters in ruby. ej. "%u062A" to "ت". Any ideas?
kenneth has joined #ruby
mgomezch_ has quit [Remote host closed the connection]
<arrubin> sabfer: Is this in JSON?
<sabfer> arrubin: yes, I'm reading JSON stored in a cookie
<arrubin> Use a JSON parser?
<havenwood> lobstah: and sinatra is #sinatra, etc
<lobstah> :) -
bradhe has joined #ruby
nanoyak has joined #ruby
<sabfer> arrubin: yes, I'm using a JSON parser, but it is raising the following exception: ArgumentError occured: invalid %-encoding
nopc0de is now known as zz_nopc0de
replay has joined #ruby
carlyle has quit [Ping timeout: 255 seconds]
<sabfer> arrubin: it is interpreting the %XX characters, but not the long form %uXXXX ones
<arrubin> sabfer: What is generating Unicode escaped like that?
<arrubin> I do not think that that is standard.
kenneth__ has joined #ruby
aspires has quit []
ffranz has joined #ruby
<arrubin> That looks like URL encoding.
hamakn has joined #ruby
replay_ has quit [Ping timeout: 252 seconds]
<sabfer> arrubin: escape(JSON.stringify("ت"))
kenneth has quit [Ping timeout: 276 seconds]
jjbohn has joined #ruby
<arrubin> I believe that URL encodes the string.
freerobby has quit [Quit: Leaving.]
<arrubin> Creating the JSON should have already taken care of it.
<arrubin> It should replace it with \uXXXX.
rezzack has quit [Quit: Leaving.]
<arrubin> Although there is probably no reason to escape printable characters.
toastynerd has quit [Remote host closed the connection]
omosoj has joined #ruby
<sabfer> arrubin: URI.escape does not appear to recognize the %uXXXX forms. Besides, I found out that escape is deprecated and should be replaced with encodeURIComponent
jenskarlsen has joined #ruby
<arrubin> sabfer: Do they not provide the same result?
danijoo has quit [Read error: Connection reset by peer]
<sabfer> arrubin: I will take your advice tough and try to avoid escaping the value
<centrx> sabfer, encodeURIComponent is a Javascript function; and URI.escape converts TO % form
jjbohn has quit [Ping timeout: 265 seconds]
danijoo has joined #ruby
snuffeluffegus has joined #ruby
combusean has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
CodeBunny has joined #ruby
<sabfer> centrx: sorry, I meant the javascript escape. See https://github.com/carhartl/jquery-cookie/issues/3
<arrubin> Yes, URI.unescape is able to handle what encodeURIComponent produces.
<sabfer> escape("ت") !== encodeURIComponent("ت")
gigetoo has joined #ruby
<arrubin> I am just not sure whether escaping it is necessary.
<centrx> sabfer, Why are you escaping at all?
<arrubin> I am not an expert on such things though.
<arrubin> It is possible that cookies are supposed to be URL escaped.
<arrubin> But not because of unicode.
<sabfer> centrx: yes, the client-side code was old and I guess the developer wanted to be stay on the safe side
<sabfer> i should probably remove the escape altogether, while providing a way to parse old cookie values
icebourg has joined #ruby
<arrubin> It seems that you should URL encode them as some browsers do weird things because the standard is not specific as to what to do.
<arrubin> "Safari simply refuses to send any cookie containing non-ASCII characters."
Lobosque has quit [Quit: Page closed]
sensen has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
<sabfer> arrubin: great! that explains the use of escape, which should be replaced with the newer encodeURIComponent
<sabfer> arrubin, centrx: thanks for your help!
gigetoo has joined #ruby
em0ral has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
Kricir has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
<benzrf> o_o
<benzrf> safariiiiii
Shidash1 has joined #ruby
phinfonet has quit []
ziyadb_ has quit [Quit: Connection closed for inactivity]
pu22l3r has joined #ruby
Shidash has quit [Ping timeout: 240 seconds]
sptx00 has joined #ruby
mojo619 has quit [Quit: mojo619]
<shevy> in the jungle!
gilest has joined #ruby
gilest has quit [Remote host closed the connection]
pu22l3r has quit [Ping timeout: 240 seconds]
marcdel has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
yfeldblum has joined #ruby
marcdel_ has joined #ruby
freerobby has joined #ruby
snuffeluffegus has quit [Quit: Leaving]
toastynerd has joined #ruby
marcdel has quit [Ping timeout: 258 seconds]
braincra- has quit [Quit: bye bye]
toastynerd has quit [Remote host closed the connection]
northfurr has quit [Quit: northfurr]
Shidash1 has quit [Ping timeout: 240 seconds]
Bira has quit [Remote host closed the connection]
benzrf has quit [Quit: leaving]
em0ral has quit []
meatherly has quit [Remote host closed the connection]
tylersmith has joined #ruby
smathieu has joined #ruby
icebourg has quit []
braincrash has joined #ruby
chrisramon has joined #ruby
freerobby has quit [Ping timeout: 265 seconds]
chrisramon has quit [Client Quit]
centrx has quit [Quit: All this computer hacking is making me thirsty]
upsell5 has quit [Quit: upsell5]
mjsmith2 has joined #ruby
mikepack has joined #ruby
Beoran has quit [Ping timeout: 240 seconds]
bbloom has quit [Ping timeout: 240 seconds]
supermarin_ has joined #ruby
smathieu has quit [Ping timeout: 252 seconds]
bbloom has joined #ruby
mercwithamouth has quit [Quit: Lost terminal]
mjsmith2 has quit [Ping timeout: 240 seconds]
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
omosoj has quit [Quit: Leaving]
oo_ has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
mikepack has quit [Ping timeout: 240 seconds]
emanu has quit [Quit: emanu]
sski has quit [Remote host closed the connection]
wldcordeiro has quit [Ping timeout: 240 seconds]
aspires has joined #ruby
ffranz has quit [Quit: Leaving]
wldcordeiro has joined #ruby
zz_nopc0de is now known as nopc0de
jxf has joined #ruby
oo_ has joined #ruby
Dirkson has joined #ruby
ftj has joined #ruby
ftj has quit [Client Quit]
Beoran has joined #ruby
Kricir has joined #ruby
carlyle has joined #ruby
<Dirkson> Hey all. Trying to use the gem installer (Let me know if this is the wrong channel). Getting back this when I try to install gpgme : http://paste.orangehattech.com/view/93d18073 Help? : )
pencilcheck has quit [Remote host closed the connection]
x1337807x has joined #ruby
bbloom has quit [Ping timeout: 258 seconds]
nopc0de is now known as zz_nopc0de
carlyle has quit [Ping timeout: 255 seconds]
<havenwood> Dirkson: What OS/disto are you on?
<Dirkson> havenwood: Debian 64bit
lethjakman has quit [Ping timeout: 240 seconds]
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ftj has joined #ruby
<shevy> Dirkson "ERROR: Failed to build gem native extension."
<shevy> means that it tries to compile something via gcc (usually) and that failed
<shevy> libgpg-error.a(libgpg_error_la-init.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
supermarin_ has quit [Quit: Computer has gone to sleep.]
<shevy> your debian system has a problem in libgpg-error ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.12.tar.bz2
<havenwood> Dirkson: Try?: sudo apt-get install libgpgme11
supermarin_ has joined #ruby
Azure has quit [Remote host closed the connection]
<Dirkson> havenwood: shevy Thanks
aspires has quit []
<havenwood> Dirkson: Or whatever your libgpgme package is, then your gem should build.
tylerkern has joined #ruby
gigetoo has quit [Remote host closed the connection]
gigetoo has joined #ruby
Azure has joined #ruby
<havenwood> or maybe to get the lib shevy mentioned you need libgpgme-dev, not sure?
<havenwood> libgpgme11-dev or whatev
<shevy> whoever compiled libgpg-error compiled it without -fPIC
supermarin_ has quit [Ping timeout: 276 seconds]
Bira has joined #ruby
bbloom has joined #ruby
<havenwood> mm
pen has joined #ruby
Kricir has quit [Ping timeout: 240 seconds]
Bira has quit [Ping timeout: 255 seconds]
shaileshg has quit [Quit: Connection closed for inactivity]
Es0teric has quit [Quit: Nigga, im OUTIE 5000]
oo_ has quit [Remote host closed the connection]
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hobogrammer has quit [Ping timeout: 240 seconds]
supermarin_ has joined #ruby
codeurge has joined #ruby
duggiefresh has quit [Remote host closed the connection]
rgiscard has quit [Ping timeout: 252 seconds]
kitak has quit [Remote host closed the connection]
Megtastique has quit []
ftj has quit [Quit: Textual IRC Client: www.textualapp.com]
aiguu__ has quit [Ping timeout: 240 seconds]
AlexRussia has quit [Excess Flood]
moted has quit [Quit: moted]
AlexRussia has joined #ruby
nnu has quit [Quit: May the Force be with you.]
sunya7a has joined #ruby
Nexus_x1 has quit [Quit: Lingo - http://lingoirc.com]
kitak has joined #ruby
chrisramon has joined #ruby
danman has joined #ruby
danman has quit [Client Quit]
ktun has joined #ruby
Hobogrammer has joined #ruby
chrisramon has quit [Quit: chrisramon]
tylerkern has quit [Quit: Textual IRC Client: www.textualapp.com]
sabfer has quit [Read error: Connection reset by peer]
<zastern> When you do something like this: [1,2,3].map(&:to_s)
<zastern> is there a name for that shortcut, doing &:to_s
<zastern> instead of doing { |item| item.to_s }
<wallerdev> Symbol#to_proc
robbyoconnor has joined #ruby
<zastern> hmmmm
<zastern> I can
<zastern> I can't quite figure out when it's apropriate to use
freerobby has joined #ruby
<wallerdev> i use it everytime i can use it
<zastern> Hmm so, this works for example: %w[foo bar baz].inject(&:+)
weems has quit [Read error: Connection reset by peer]
fatur has quit [Quit: fatur]
<zastern> But this also works: %w[foo bar baz].inject(:+)
<zastern> What's the difference
fortunamajor has joined #ruby
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wallerdev> inject has built in code that handles if you pass a symbool
<zastern> ahhh
<zastern> I was confused by cleverness :D
<ra4king> what's :+?
<ra4king> and what's %w?
<wallerdev> >> %w{foo bar baz}
<eval-in__> wallerdev => ["foo", "bar", "baz"] (https://eval.in/153846)
<zastern> %w(foo bar baz) == ['foo','bar','baz']
<ra4king> oh whitespace
<ra4king> what's :+?
<zastern> >> %w[foo bar baz].inject(:+)
<eval-in__> zastern => "foobarbaz" (https://eval.in/153848)
<zastern> It's just +
<shevy> zastern you can use it every time you want to make things shorter
gigetoo has quit [Ping timeout: 252 seconds]
<shevy> with things I mean your code :-)
<shevy> array.map! {|e| e.chomp }
<shevy> array.map! &:chomp
gigetoo has joined #ruby
<shevy> ra4king whenever you see something with leading : in ruby, followed by non ' ' then it must be a symbol
<zastern> can you use it with multiple items being passed to the block?
subbyyy has joined #ruby
<shevy> no
<shevy> it is very limited
<zastern> mmk
<wallerdev> yes
<ra4king> shevy: yup I got that, but didn't know + was a valid character
<shevy> ra4king lot's of smileys are valid ruby code
Deele has joined #ruby
<ra4king> lol
<zastern> >> :+
<eval-in__> zastern => :+ (https://eval.in/153852)
<shevy> >> :>.class
<eval-in__> shevy => Symbol (https://eval.in/153854)
<ra4king> wow
<shevy> not all though
<ra4king> yeah just tried :+.class and it worked
<shevy> >> :).class
<eval-in__> shevy => /tmp/execpad-90791b7ab4c8/source-90791b7ab4c8:2: syntax error, unexpected ')', expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or tSTRING_END ... (https://eval.in/153855)
<shevy> but I like the :> smiley more, it makes me look smarter
<zastern> >> :')'
<eval-in__> zastern => :")" (https://eval.in/153856)
<shevy> :>
<shevy> that's some wide-spaced smiley you have there
<ra4king> I need to know all the valid characters
<shevy> well everything is valid, except for invalid tokens
<shevy> hahahaha
<shevy> so these be... } ... )
<wallerdev> lol
<shevy> hmm
MetalHead77 has quit []
<shevy> ]
<wallerdev> worst case you can always use a unicode character that looks the same as the one you need
<shevy> wow
<shevy> this is valid:
<shevy> >> :&
<eval-in__> shevy => :& (https://eval.in/153859)
<shevy> >> &:
<eval-in__> shevy => /tmp/execpad-4d625147dbc9/source-4d625147dbc9:2: syntax error, unexpected & (https://eval.in/153860)
<shevy> haha
<shevy> no
<shevy> who embeds unicode characters in his .rb files here?
<shevy> wallerdev is it you
<shevy> that has to stand in the corner
<shevy> full of shame
<wallerdev> :)
freerobby has quit [Ping timeout: 255 seconds]
gigetoo has quit [Ping timeout: 258 seconds]
supermarin_ has quit [Quit: Computer has gone to sleep.]
supermarin_ has joined #ruby
jrhe has quit [Quit: Connection closed for inactivity]
gigetoo has joined #ruby
oo_ has joined #ruby
lethjakman has joined #ruby
<wallerdev> >> def ❨╯°□°❩╯︵ ┻━┻; "Table is: #{┻━┻}" end; ❨╯°□°❩╯︵ 'my table'
<eval-in__> wallerdev => "Table is: my table" (https://eval.in/153864)
<wallerdev> lol
jxf has quit [Ping timeout: 255 seconds]
pagios has quit [Remote host closed the connection]
supermarin__ has joined #ruby
<shevy> that is so gibberish
pen has quit []
supermarin_ has quit [Read error: Connection reset by peer]
zz_nopc0de is now known as nopc0de
<wallerdev> the true power of ruby
<ra4king> I'm really loving this ruby stuf
<ra4king> this is pretty fun
<ra4king> went through many tutorials, right now finishing up codeacademy's ruby tutorials and they're pretty excellent
<zastern> I have to disagree
<zastern> I found codecademy's tutorials worthless from a practical perspective
<zastern> I didn't learn anything, and I completed the whole track
<wallerdev> guess ur tooo smart for us
<zastern> ;p
gigetoo has quit [Ping timeout: 258 seconds]
<shevy> I have to agree and disagree with both of you
gigetoo has joined #ruby
<shevy> I never did codeacademy
<zastern> YOU SIR, ARE A VESTIGGIO
anaeem1 has joined #ruby
<shevy> so I find it both useful and useless
<ra4king> zastern: no clue what you're talking about
<shevy> but seriously can you learn ruby by reading tutorials only ra4king
<ra4king> they're *very* comprehensive, and I learned many things about ruby other tutorials skipped over
<ra4king> shevy: syntax sure, API no
<ra4king> I'm learning the syntax, then I will get more familiar with the API by digging through the docs for a while
<ra4king> then I will go through some of those programming challenge sites like ProjectEuler and others I have bookmarked
carlyle has joined #ruby
<ra4king> trying to get into rails though, as I'm working on this huge project that requires a nice frontend that communicates with a backend
aloysius21 has joined #ruby
lw has quit [Quit: s]
oo_ has quit [Ping timeout: 264 seconds]
<zastern> I'm glad it's workign for you
<zastern> somehow it didn't make anything click for me at all
<zastern> Lynda.com's Ruby tutorials really worked for me thoug
montana has joined #ruby
caveat- has quit [Ping timeout: 265 seconds]
Celm_ has joined #ruby
<ra4king> oh lynda has good ruby tutorials?
<ra4king> I have lynda access
* ra4king checks them out
<zastern> They're dated
<ra4king> ah never mind then
<zastern> but they're close enough
<zastern> The syntax they cover is the same in 1.8 and newer rubies
<ra4king> I have extensive programming experience though, so Ruby has been mostly learning how to program with different syntax
<zastern> ah ok
<ra4king> there are of course those nice surprises
<zastern> Right so for you codecademy probably works fine
<ra4king> symbols are interesting
<ra4king> reminds me of enums
nopc0de is now known as zz_nopc0de
<ra4king> this is my first ever dynamic language, I come from a static background
<wallerdev> welcome to the dark side
<ra4king> Java, C#, C++, etc..
carlyle has quit [Ping timeout: 255 seconds]
<ra4king> wallerdev: hehe, I've always been hesitant and critical of dynamic
<wallerdev> where a typo brings down your production server
sptx00 has quit [Remote host closed the connection]
<ra4king> yup
<wallerdev> lol
<wallerdev> its okay though because we test our code
<ra4king> compile time type checking just made more sense to me, but fuck it, I want to learn it
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has quit []
<ra4king> so far I learned that for loops should never be used :D
<ra4king> that's going to be hard to remember haha
<wallerdev> lol
<ra4king> but codeacademy drills it down with the .each, .times, etc... nicely
aloysius21 has quit [Remote host closed the connection]
<ra4king> I *really* like .each
<wallerdev> yeah a for loop is basically each
<ra4king> .times is perfect though
<ra4king> no more for(int a = 0; a < num; a++
<ra4king> just
<ra4king> num.times { ... }
<shevy> ra4king and you picked ruby only because of rails?
<ra4king> so perfect
x1337807x has joined #ruby
<ra4king> shevy: I picked ruby because I need to make a website
mojo619 has joined #ruby
<ra4king> a very dynamic website that monitors a backend
<shevy> php!
<ra4king> service
<ra4king> fuck that
<shevy> hehehe
<ra4king> haha
<ra4king> *everybody* I know told me to run away from PHP
nnu has joined #ruby
<ra4king> and if a job requires it, I will run away from it too
<shevy> well I can't tell they are wrong, I left php because I wanted a better language, I narrowed it down between python and ruby
<shevy> then I read the matz interview in 2003
<ra4king> yup me too, python+django vs ruby+rails, then I basically read developer blogs that I respected and most sided with ruby
<ra4king> plus ruby seems to be more popular so meh
<wallerdev> the new hotness is nodejs
<ra4king> I cannot wrap my mind around Javascript on the server
<ra4king> that should not happen, ever
jjbohn has joined #ruby
User458764 has joined #ruby
<wallerdev> its actually pretty neat
<wallerdev> lol
<shevy> hehe
<shevy> ra4king wallerdev is like the channel clown
<ra4king> noooooooooo
<ra4king> excellent
<wallerdev> no im serious i like it lol
* ra4king pokes wallerdev
<wallerdev> if i ws gonna make a site today id probably do it in node
<wallerdev> and angular
<ra4king> haha
<shevy> <shevy> wallerdev say something funny
<shevy> <wallerdev> your face
<shevy> <wallerdev> thanks
<shevy> <winny> good one
<ra4king> hahaha
<shevy> wallerdev you mean a whole website in plain javascript?
<shevy> I remember javascript tutorials in like 1995 or something
<wallerdev> a whole website
<ra4king> Angular is really nice actually
<wallerdev> i use angular for my day job
<ra4king> I was looking at the examples and wow, I was blown away
<wallerdev> its pretty swag
<shevy> document.writeln("<h1>hello there</h1>");
<ra4king> it's actually pretty impressive!
<shevy> or something like that
<shevy> what is angular
<ra4king> I will probably use Angular for my website
<shevy> sounds like a dwarf name
<ra4king> shevy: google it man
Kricir has joined #ruby
<shevy> but I never heard of it before!
<ra4king> shevy: look at the examples, they're really impressive
<wallerdev> its kinda like ember or react
<shevy> what is ember
<shevy> what is react
<shevy> :\
<wallerdev> do you even web dev
<shevy> yes
<ra4king> I don't know web dev either
<shevy> without javascript
<ra4king> how?
<wallerdev> well you should check them out
<shevy> ra4king well just local stuff
<ra4king> I have still yet to fully learn HTML+CSS :(
<ra4king> that's going to be a major pain in the ass
<ra4king> I always wanted to avoid them
<shevy> ra4king via things like sinatra you can use URLs as commands to do stuff, so stuff like:
<ra4king> but not anymore
<shevy> install/php/4.5.3 would work as url instruction
<shevy> or remove/php/5.3.1
lxsameer has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
<ra4king> shevy: so backend
etqqkoiflwhb_ has joined #ruby
<ra4king> not frontend
jjbohn has quit [Ping timeout: 240 seconds]
<ra4king> I really like backend dev
<shevy> all my ends are in a circle
<ra4king> but I realized that it's not possible in today's job market to do backend without knowing frontend
<shevy> pffft job market
<ra4king> so I'm embarking on this project to learn HTML+CSS+Ruby
<shevy> they want me to learn R
<ra4king> hey I'm 18
<shevy> R!!!!!
<ra4king> I've got a long road
<shevy> that's good, you have a lot of years left
<ra4king> and R exists?
<shevy> let me find a nice example of R graphics
* ra4king wonders if Z exists
aspires has joined #ruby
pagioss has joined #ruby
<shevy> ra4king on the right side, after middle to bottom are nice examples: https://www.harding.edu/fmccown/r/
etqqkoiflwhb_ has quit [Client Quit]
<ra4king> oooh
<ra4king> shiny
<shevy> yeah but the language itself is not so awesome :(
oo_ has joined #ruby
<shevy> could be worse though
<shevy> that's one thing
<shevy> ra4king ruby kind of will spoil you
Kricir has quit [Ping timeout: 264 seconds]
<ra4king> oh I'm spoiled already
JasmeetQA has joined #ruby
<ra4king> .each man
<ra4king> that's so wonderful
<ra4king> I wish I could call .each on my Java arrays!
<shevy> yeah
<ra4king> well, I've got my foreach loop: for(int i : myArray)
<ra4king> but myArray.each { |i| ... } is so much nicer
skysploit has quit []
<shevy> ra4king can you tell which ways to iterate exist in ruby so far
<shevy> wallerdev! I found a victim for quizzing
<ra4king> for an array, so far only .each
MatthewsFace has quit [Quit: This computer has gone to sleep]
<shevy> I mean in general
<shevy> .each should be in... Enumerable... or Enumerator
agent_white has quit [Read error: Connection reset by peer]
<ra4king> numbers, I got 5.times, (1..5).each, for, loop, unless
<shevy> good
<ra4king> haven't learned much about Enumerator yet
<shevy> you forgot only one
agent_white has joined #ruby
<ra4king> which one
<shevy> while
<shevy> oh
<shevy> yeah
<ra4king> oh wait, I had written while
<shevy> hehe
<ra4king> hehe replaced it with loop
<shevy> loop works too
<shevy> loop { puts 'HI'; sleep 1 }
<ra4king> loop = no condition
AlexRussia has quit [Quit: Konversation terminated!Good bye!]
mikepack has joined #ruby
<ra4king> while + unless = condition
<shevy> right but you can terminate inside the {}
<ra4king> for = never use
<ra4king> :D
<shevy> loop { puts 'HI'; sleep 1; break if rand(3) == 0 }
<ra4king> yeah I know about break already
<ra4king> then there's 3 ways to "continue" basically: next, redo, retry
<ra4king> next = skip and continue
<ra4king> redo = repeat current index
<ra4king> retry = start at beginning
dopie has joined #ruby
<dopie> hey ruby gangsters
<ra4king> hello dopie
MatthewsFace has joined #ruby
<ra4king> and whoa, semicolon works in ruby!
<ra4king> I was wondering how to put things on the same line
<dopie> ra4king, hey just bashing my screen here because i cant figure this logic out
<ra4king> In soviet russia, logic figures out *you*
yacks has joined #ruby
mxweas has joined #ruby
mikepack has quit [Ping timeout: 264 seconds]
JasmeetQA1 has joined #ruby
aiguu__ has joined #ruby
LACP has joined #ruby
zms has joined #ruby
JasmeetQA has quit [Ping timeout: 264 seconds]
<zms> is there a way to list all features that match a tag(s) using cucumber? would be awesome if it did negation, and, or operations as well.. without actually running the steps?
<ra4king> cu.... cucumber?
<ra4king> woooow who the hell names tool cucumber...
<zms> @ra4king: yes, cucumber. apparently some folks that are cool as a cucumber.. ;-)
<ra4king> lol
amclain has quit [Quit: Leaving]
bbloom has quit [Ping timeout: 240 seconds]
Vivekananda has quit [Quit: Ex-Chat]
mxweas has quit [Quit: Leaving...]
marcdel_ has quit []
kitak has quit [Remote host closed the connection]
bbloom has joined #ruby
<jimmyhoughjr> is vpretzel here?
kitak has joined #ruby
aganov has joined #ruby
toastynerd has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
toastynerd has quit [Remote host closed the connection]
haha_ has joined #ruby
<haha_> how is ruby doing
freerobby has joined #ruby
<jimmyhoughjr> idk im new to ruby, just been doing koans
fantazo has joined #ruby
<haha_> never did ruby, it seems she is a slut, doing it with every1
lethjakman has quit [Ping timeout: 240 seconds]
rm_ has quit [Remote host closed the connection]
<jimmyhoughjr> so diamonds are a girls best friend, but rubies are...
<haha_> all stones are \=)
<pontiki> including yours
<haha_> haha
<pontiki> now you are being redundent
rek2p0wn has quit [Remote host closed the connection]
<haha_> endlessloop
<pontiki> 10 haha; goto 10
<haha_> hahahahahahahahaahahahahaha
<haha_> yup its works
<haha_> I can be programmed
agent_white has joined #ruby
toastynerd has joined #ruby
<pontiki> "haha"*1_000_000_000
<haha_> u want me to get banned?
<pontiki> of course!
<haha_> poke 53280,1
freerobby has quit [Ping timeout: 240 seconds]
agent_white has quit [Read error: Connection reset by peer]
MatthewsFace has quit [Quit: This computer has gone to sleep]
mjsmith2 has joined #ruby
Morkel has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
montana has quit [Quit: montana]
tobago has joined #ruby
lethe has joined #ruby
agent_white has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
toastynerd has quit [Remote host closed the connection]
phansch has joined #ruby
mjsmith2 has quit [Ping timeout: 240 seconds]
<ra4king> alright well
<ra4king> that's enough ruby for one day
nanoyak has joined #ruby
<ra4king> I'm going back to Java and OpenGL tonight
<ra4king> hehehe
mengu has joined #ruby
<haha_> yeah its a 'uby Tuesday'
<haha_> yeah its a 'Rby Tuesday'
<haha_> yeah its a 'Ruby Tuesday'
<haha_> sry
agent_white has joined #ruby
bbloom has quit [Ping timeout: 252 seconds]
JasmeetQA has joined #ruby
JasmeetQA1 has quit [Ping timeout: 255 seconds]
bradhe has quit [Remote host closed the connection]
bricker`LA has joined #ruby
bbloom has joined #ruby
pierre1_ has quit [Quit: Leaving]
zz_nopc0de is now known as nopc0de
datafirm has quit [Quit: Computer has gone to sleep.]
datafirm has joined #ruby
echevemaster has quit [Quit: Leaving]
supermarin__ has quit [Quit: Computer has gone to sleep.]
shashin has joined #ruby
shashin has joined #ruby
supermarin__ has joined #ruby
<zms> is there a way to list all features that match a tag(s) using cucumber? would be awesome if it did negation, and, or operations as well.. without actually running the steps?
axisys has quit [Ping timeout: 264 seconds]
datafirm has quit [Ping timeout: 240 seconds]
shashin has quit [Client Quit]
Y_Ichiro has joined #ruby
Y_Ichiro has joined #ruby
supermarin__ has quit [Ping timeout: 252 seconds]
duncannz has joined #ruby
MatthewsFace has joined #ruby
nopc0de is now known as zz_nopc0de
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
MatthewsFace has quit [Client Quit]
User458764 is now known as User458764_NotHe
mojo619 has quit [Quit: mojo619]
toastynerd has joined #ruby
aspires has quit []
Y_Ichiro has quit [Ping timeout: 240 seconds]
toastynerd has quit [Remote host closed the connection]
popl has joined #ruby
segfalt has quit [Quit: Connection closed for inactivity]
yacks has quit [Ping timeout: 240 seconds]
User458764_NotHe has quit [Ping timeout: 240 seconds]
Y_Ichiro has joined #ruby
Y_Ichiro has joined #ruby
jjbohn has joined #ruby
bradhe has joined #ruby
tagrudev has joined #ruby
jjbohn has quit [Ping timeout: 276 seconds]
eka_ has joined #ruby
bahar has quit [Ping timeout: 240 seconds]
bahar has joined #ruby
banister has quit [Remote host closed the connection]
_justin has joined #ruby
yacks has joined #ruby
yfeldblum has joined #ruby
kies has quit [Ping timeout: 265 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
sunya7a has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
yfeldblum has quit [Remote host closed the connection]
Morkel_ has joined #ruby
eka_ has quit [Quit: My computer has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
Morkel has quit [Ping timeout: 258 seconds]
Morkel_ is now known as Morkel
wldcordeiro has quit [Ping timeout: 240 seconds]
zms has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Celm_ has quit [Remote host closed the connection]
memorozovm has joined #ruby
datafirm has joined #ruby
fgo has joined #ruby
raja_ has joined #ruby
smathieu has joined #ruby
pu22l3r has joined #ruby
artmann has quit [Read error: Connection reset by peer]
artmann has joined #ruby
rotor has quit [Ping timeout: 240 seconds]
lambo has joined #ruby
datafirm has quit [Ping timeout: 258 seconds]
Arkaniad|Away has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
kies has joined #ruby
kies has joined #ruby
kies has quit [Changing host]
apeiros has joined #ruby
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
rshetty has joined #ruby
pu22l3r has quit [Ping timeout: 252 seconds]
duggiefresh has joined #ruby
Rahul_Roy has joined #ruby
apeiros has quit [Ping timeout: 258 seconds]
smathieu has quit [Ping timeout: 264 seconds]
mengu has quit [Remote host closed the connection]
Hobogrammer_ has joined #ruby
bal has joined #ruby
mengu has joined #ruby
freerobby has joined #ruby
MatthewsFace has joined #ruby
duggiefresh has quit [Ping timeout: 252 seconds]
Hobogrammer has quit [Ping timeout: 240 seconds]
Macaveli has joined #ruby
freerobby has quit [Ping timeout: 276 seconds]
mjsmith2 has joined #ruby
rotor has joined #ruby
yacks has quit [Ping timeout: 255 seconds]
Gabri has joined #ruby
duncannz has quit [Ping timeout: 240 seconds]
bahar has quit [Ping timeout: 255 seconds]
lxsameer has quit [Ping timeout: 255 seconds]
lxsameer has joined #ruby
mjsmith2 has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
bahar has joined #ruby
tylersmith has quit [Remote host closed the connection]
subbyyy has quit [Ping timeout: 258 seconds]
tylersmith has joined #ruby
relix has joined #ruby
oo_ has joined #ruby
axisys has joined #ruby
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ktun has joined #ruby
ktun has quit [Client Quit]
zz_nopc0de is now known as nopc0de
tylersmith has quit [Ping timeout: 255 seconds]
ndrei has joined #ruby
frogsy has quit [Ping timeout: 240 seconds]
roolo has joined #ruby
FunksMaName has joined #ruby
fantazo has quit [Ping timeout: 252 seconds]
carlyle has joined #ruby
<FunksMaName> can someone please help me install susy :/ i've been trying for hours
abstrakt has quit [Quit: Leaving]
zigomir has joined #ruby
diegoviola has joined #ruby
<FunksMaName> i have ruby running, install sass and compass, works fine with zen grids - compiles etc. I try to install susy, it needs a newer version of compass, so I install compass --pre and now watch craps out and won't run
<FunksMaName> susy isn't starting properly, and i always get some kind of 'LoadError' error
* FunksMaName might just go and flush his head down the toilet
nopc0de is now known as zz_nopc0de
maestrojed has quit [Quit: Textual IRC Client: www.textualapp.com]
aiguu__ has quit [Ping timeout: 264 seconds]
artmann has quit [Read error: Connection reset by peer]
artmann has joined #ruby
arrubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
carlyle has quit [Ping timeout: 255 seconds]
mikepack has joined #ruby
akonny has joined #ruby
dseitz has joined #ruby
supermarin__ has joined #ruby
noop has joined #ruby
MatthewsFace has quit [Quit: This computer has gone to sleep]
jjbohn has joined #ruby
andikr has joined #ruby
supermarin__ has quit [Ping timeout: 258 seconds]
apeiros has joined #ruby
chipotle has quit [Quit: cya]
mikepack has quit [Ping timeout: 265 seconds]
jjbohn has quit [Ping timeout: 260 seconds]
anaeem1 has quit [Read error: Connection reset by peer]
anaeem1 has joined #ruby
MatthewsFace has joined #ruby
toastynerd has joined #ruby
bahar has quit [Ping timeout: 276 seconds]
toastynerd has quit [Ping timeout: 240 seconds]
bahar has joined #ruby
_tpavel has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vt102 has quit [Ping timeout: 252 seconds]
jimmyhoughjr has quit [Quit: jimmyhoughjr]
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zigomir has quit [Remote host closed the connection]
datafirm has joined #ruby
kilk_ has joined #ruby
JensOfSweden has joined #ruby
Doppp has quit [Quit: Lost terminal]
zigomir has joined #ruby
Doppp has joined #ruby
codecop has joined #ruby
anarang has joined #ruby
Bumptious has quit [Remote host closed the connection]
agjacome has joined #ruby
MatthewsFace has quit [Quit: This computer has gone to sleep]
fabrice31 has joined #ruby
carlyle has joined #ruby
zigomir has quit [Ping timeout: 240 seconds]
carlyle has quit [Client Quit]
datafirm has quit [Ping timeout: 276 seconds]
ddv has quit [Changing host]
ddv has joined #ruby
nathancahill has quit [Quit: nathancahill]
claymore has joined #ruby
akonny has quit [Quit: akonny]
klaut has joined #ruby
Prawnzy has joined #ruby
akonny has joined #ruby
amundj has quit [Read error: Connection reset by peer]
amundj has joined #ruby
freerobby has joined #ruby
phansch has quit [Quit: WeeChat 0.4.3]
codecop has quit [Quit: Išeinu]
codecop_ has joined #ruby
roolo has quit [Quit: Leaving...]
bahar has quit [Ping timeout: 240 seconds]
krazh has quit []
jaykilleen has joined #ruby
zz_nopc0de is now known as nopc0de
subraminion has joined #ruby
zigomir has joined #ruby
bahar has joined #ruby
freerobby has quit [Ping timeout: 240 seconds]
fgo has quit [Remote host closed the connection]
WishBoy has quit [Remote host closed the connection]
shemerey has joined #ruby
_Andres has joined #ruby
mjsmith2 has joined #ruby
robbyoconnor has quit [Excess Flood]
ephemerian has joined #ruby
robbyoconnor has joined #ruby
rdark has joined #ruby
agent_wh1te has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
subraminion_ has joined #ruby
shemerey has quit [Client Quit]
subraminion_ has quit [Remote host closed the connection]
subraminion_ has joined #ruby
fortunamajor has quit [Read error: Connection reset by peer]
agent_wh1te has quit [Read error: Connection reset by peer]
davedev24 has quit [Remote host closed the connection]
subraminion_ has quit [Client Quit]
_tpavel has quit [Quit: Leaving]
subraminion_ has joined #ruby
_tpavel has joined #ruby
<robert_> so I'm incredibly rusty at ruby; how do I define instance methods, but still keep my outer scope? I think I can just instance_eval do |i| and then just do something like i.method_define( :foo ), right?
mjsmith2 has quit [Ping timeout: 240 seconds]
subraminion has quit [Ping timeout: 258 seconds]
fortunamajor has joined #ruby
ValicekB has quit []
jprovazn has joined #ruby
<shevy> what is the outer scope you want to keep
<shevy> and I think you want define_method, not method_define, I never heard the latter
jottr_ has joined #ruby
datafirm has joined #ruby
<robert_> the outer scope is another instance method
agent_white has joined #ruby
<robert_> oh, right. I mixed it up here. It's 3AM here.
agent_white has quit [Read error: Connection reset by peer]
<robert_> but then, the problem is that method_missing keeps being triggered.
WishBoy has joined #ruby
dangerousdave has joined #ruby
agjacome has quit [Ping timeout: 240 seconds]
raspberryfan has quit []
MatthewsFace has joined #ruby
wallerdev has quit [Quit: wallerdev]
datafirm has quit [Ping timeout: 255 seconds]
agent_white has joined #ruby
alem0lars has joined #ruby
ValicekB has joined #ruby
<shevy> huh
_justin has quit [Quit: _justin]
Xeago has joined #ruby
tesuji has joined #ruby
MatthewsFace has quit [Quit: This computer has gone to sleep]
User458764 has joined #ruby
weeems has joined #ruby
<apeiros> robert_: maybe you show us your problem instead of your proposed solution
spyderma_ has joined #ruby
<robert_> apeiros: ^
<robert_> I was one step ahead of you, lol
alex88 has joined #ruby
Xeago_ has joined #ruby
axl_ has joined #ruby
hamakn_ has joined #ruby
sk87 has joined #ruby
<robert_> actually, with output- http://codepad.org/fn9P7xNw
lobstah_ has joined #ruby
axl_ has quit [Client Quit]
thumpba__ has joined #ruby
rshetty has quit [Remote host closed the connection]
<apeiros> robert_: all the to_syms are superfluous
rshetty has joined #ruby
<apeiros> ivar_get/_set and define_method accept strings just fine
<apeiros> the instance eval @ line 29 is pointless
jackneill has joined #ruby
zartoosh has joined #ruby
<apeiros> begin; end while mutex.try_lock # <-- apart from being a busy loop which is bad on its own - where do you release the lock?
marnom has joined #ruby
FunksMaName has quit [Quit: ChatZilla 0.9.90.1 [Firefox 29.0.1/20140506152807]]
<apeiros> generally, mutexes should be used in block form. using it with explicit lock/unlock is usually a bad idea.
sheepman_ has joined #ruby
<apeiros> line 56/57 - that scope should have access to foo1__value and foo2__value
darmou has quit [Quit: darmou]
<robert_> yeah, I'm "ensuring" it gets unlocked.
marnom has left #ruby [#ruby]
tesuji has quit [Ping timeout: 258 seconds]
wmoxam_ has joined #ruby
<apeiros> with strong emphasis on the quotes?
<robert_> well ensure'ing looks weird to me
tesuji has joined #ruby
subbyyy has joined #ruby
<apeiros> I was more referring to the fact that I don't see a single ensure in the code
<apeiros> so any ensure would be outside of ThreadedResource, which sounds broken
akemrir has joined #ruby
tesuji has quit [Read error: Connection reset by peer]
<robert_> because I can't tell which resource I'll use.
<ra4king> well then
klaut_ has joined #ruby
<robert_> but I want to ensure serial access to whatever I end up using.
agent_white has quit [Read error: Connection reset by peer]
rshetty has quit [Ping timeout: 276 seconds]
<apeiros> robert_: I can't help it, but IMO that design is broken
agent_white has joined #ruby
<robert_> I know
jjbohn has joined #ruby
mercwith1mouth has joined #ruby
<robert_> I don't know of any better way to do it.
agent_white has quit [Read error: Connection reset by peer]
dumdedum has joined #ruby
gf3_ has joined #ruby
verto_ has joined #ruby
<robert_> because I'm getting database locked/busy/whatever errors on an sqlite3 database shared by multiple threads.
Xeago has quit [*.net *.split]
fortunamajor has quit [*.net *.split]
_Andres has quit [*.net *.split]
klaut has quit [*.net *.split]
Deele has quit [*.net *.split]
mercwithamouth has quit [*.net *.split]
CodeBunny has quit [*.net *.split]
krz has quit [*.net *.split]
hamakn has quit [*.net *.split]
gheegh has quit [*.net *.split]
magicien has quit [*.net *.split]
troyready has quit [*.net *.split]
quantsini has quit [*.net *.split]
gf3 has quit [*.net *.split]
lobstah has quit [*.net *.split]
wmoxam has quit [*.net *.split]
Davey has quit [*.net *.split]
verto has quit [*.net *.split]
thumpba_ has quit [*.net *.split]
spyderman4g63 has quit [*.net *.split]
yokel has quit [*.net *.split]
devdazed has quit [*.net *.split]
rostam has quit [*.net *.split]
malcolmva has quit [*.net *.split]
sheepman has quit [*.net *.split]
tsunamie has quit [*.net *.split]
rethus has quit [*.net *.split]
soulcake has quit [*.net *.split]
netf has quit [*.net *.split]
barratt has quit [*.net *.split]
sheepman_ is now known as sheepman
<robert_> I'm trying to make sure if you try to acquire any resource that you block until it becomes free.
lobstah_ is now known as lobstah
quantsini has joined #ruby
fgo has joined #ruby
devdazed has joined #ruby
klaut_ is now known as klaut
malcolmva has joined #ruby
<robert_> apeiros: any ideas?
troyready has joined #ruby
<ra4king> hooooly netsplit
<apeiros> as said, use block-form of mutexes
<apeiros> mutex.synchronize do …access shared resource… end
Davey has joined #ruby
lyanchih has joined #ruby
jjbohn has quit [Ping timeout: 245 seconds]
tvw has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
mercerist has joined #ruby
danijoo has joined #ruby
magicien has joined #ruby
yokel has joined #ruby
soulcake has joined #ruby
netf has joined #ruby
barratt has joined #ruby
krz has joined #ruby
Deele has joined #ruby
tsunamie has joined #ruby
trampi has joined #ruby
tsunamie has quit [Max SendQ exceeded]
yokel has quit [Max SendQ exceeded]
soulcake has quit [Changing host]
soulcake has joined #ruby
_Andres has joined #ruby
tsunamie has joined #ruby
krz is now known as Guest61308
yokel has joined #ruby
sigurding has joined #ruby
mehlah has joined #ruby
<trampi> Hi! I want a global navigation, which consists of links to models. The navigation is displayed everywhere in the site, currently it is rendered in the application.html.erb. Where should i put the code for fetching the models so that it is not duplicated in every controller?
gstamp has quit [Ping timeout: 256 seconds]
LiohAu has joined #ruby
<Hanmac1> trampi: rails?
<trampi> Hanmac1: yes
<Hanmac1> trampi: #rubyonrails
<trampi> oh, im sorry. thanks for the hint!
bradhe has quit [Remote host closed the connection]
trampi has quit [Quit: Page closed]
<robert_> apeiros: I thought about using synchronize, but I'm not sure how that would work with the way my jobs are broken up.. :/
rethus has joined #ruby
mehlah has quit [Quit: Linkinus - http://linkinus.com]
spacebug has quit [Read error: Connection reset by peer]
gilesw has quit [Read error: Operation timed out]
mrnugget has joined #ruby
spacebug has joined #ruby
olivier_bK has joined #ruby
Wayneoween has quit [Read error: Operation timed out]
mercwith1mouth has quit [Quit: Lost terminal]
<apeiros> robert_: which would lead us back to design
Wayneoween has joined #ruby
<apeiros> IME a resource which needs an exclusive thread to access is easiest to manage by a single "worker" thread which gets its "job" via a queue
mehlah has joined #ruby
Wayneoween has quit [Changing host]
Wayneoween has joined #ruby
trampi has joined #ruby
<trampi> Hi! I want a global navigation, which consists of links to models. The navigation is displayed everywhere in the site, currently it is rendered in the application.html.erb. Where should i put the code for fetching the models so that it is not duplicated in every controller?
marr has joined #ruby
mercerist has quit [Quit: Computer has gone to sleep.]
<apeiros> trampi: #rubyonrails might serve you better
<lethe> in ApplicationController using before_filter
<lethe> maybe
<bhaak> robert_: you can also use a global variable and use synchronize where possible and lock with begin/ensure otherwise.
<trampi> lethe: thanks, i will investigate that.
<robert_> yeah, though this is an example of a "Job" right now- http://codepad.org/VNq76iAk
yacks has joined #ruby
<robert_> (bhaak, apeiros)
SHyx0rmZ has joined #ruby
lyanchih has quit [Quit: lyanchih]
kaspergrubbe has joined #ruby
blackmesa has joined #ruby
<apeiros> bhaak: eeew global variables…
<apeiros> bhaak: at least use a constant
elaptics`away is now known as elaptics
<bhaak> apeiros: I didn't say it's pretty, but it would work. A constant that gets changed? The Mutex or Sync would be the global variable.
freerobby has joined #ruby
<apeiros> bhaak: you misunderstand constants
<apeiros> bhaak: a constant means it will constantly reference the same object
mehlah has quit [Quit: Linkinus - http://linkinus.com]
<apeiros> it doesn't mean the referenced object must be immutable
lyanchih has joined #ruby
<trampi> (lethe, apeiros) I am really sorry. I registered here on freenode because i couldn't join rubyonrails. after that i joined back here to lookup my question in the log. accidentally i posted it again here instead of #rubyonrails.
spider-mario has joined #ruby
<robert_> but I would need one for every single protected resource.
<apeiros> trampi: lol :) well, shit happens
AndChat| has joined #ruby
<robert_> and that's sort of untenable. I already have two. Who knows how many more things I'll end up moving into this?
<bhaak> apeiros: okay, a CONSTANT that gets its state changed. still feels a bit awkward
roolo has joined #ruby
<apeiros> robert_: that, or a hash
<bhaak> I thought only your db is the shared resource
<robert_> I have two databases, lol
ikaros has joined #ruby
<bhaak> and you write to both?
<robert_> yes
<robert_> one is an in-memory cache of the other.
gilesw has joined #ruby
<robert_> (or parts of the other.)
heftig has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
<bhaak> that ... sounds confusing.
<certainty> +1
freerobby has quit [Ping timeout: 264 seconds]
<robert_> one is a postgres database with several tens of thousands of records in it.
mjsmith2 has joined #ruby
mehlah has joined #ruby
AndChat| has quit [Ping timeout: 276 seconds]
<robert_> it's much faster to keep a local sqlite3 of a couple ten dozen records instead of tens of thousands of records, lol
duggiefresh has joined #ruby
axl_ has joined #ruby
<bhaak> but you don't have access problems with the postgres one. postgres does correct locking.
frogsy has joined #ruby
techsethi has joined #ruby
<robert_> eh, this is true.
<apeiros> mhm, postgres driver should handle threading properly
<techsethi> hi folks
axl_ has quit [Client Quit]
<robert_> yeah
heftig has quit [Ping timeout: 245 seconds]
danijoo has quit [Read error: Connection reset by peer]
mercwithamouth has joined #ruby
klaut has quit [Ping timeout: 252 seconds]
Burgestrand has joined #ruby
danijoo has joined #ruby
csmrfx has quit [Ping timeout: 252 seconds]
<techsethi> I am puzzled. why is this returning true ? pls help 1.9.3p484 :001 > 20 < 20 ? false : true
<robert_> so what about my sqlite database, then? I just want to fix my locking class and then go to sleep, lol
<techsethi> => true
mehlah has quit [Client Quit]
<apeiros> >> 20 < 20 ? false : true
<eval-in__> apeiros => true (https://eval.in/153935)
mehlah has joined #ruby
mercwithamouth has quit [Client Quit]
<apeiros> techsethi: because it's `cond ? iftrue : iffalse`
<apeiros> and since 20 < 20 is obviously false, it evaluates the `true` expression which then returns true
nvrch has joined #ruby
mjsmith2 has quit [Ping timeout: 240 seconds]
Gabri has quit [Remote host closed the connection]
<robert_> >> 20 < 20
<eval-in__> robert_ => false (https://eval.in/153936)
<robert_> see?
<techsethi> apeiros but shouldn't it return the first expression after ? which is "false"
klaut has joined #ruby
<apeiros> techsethi:
<apeiros> whoops, premature return
<apeiros> techsethi: no. why do you think it should?
duggiefresh has quit [Ping timeout: 252 seconds]
<apeiros> techsethi: as I just told you, it's `cond ? if_true_then_this : if_false_then_this`
_tpavel has quit [Quit: Leaving]
<apeiros> the part after the ? and before the : is evaluated if cond is true-ish. your condition is false-ish
<techsethi> 1 == 1 ? "yes" : "no" # returns yes
mercwithamouth has joined #ruby
Criztian has joined #ruby
<apeiros> techsethi: yes, because 1 == 1 is true
<techsethi> 20 < 20 ? "yes" : "no" # returns "no"
<apeiros> I'm not quite sure where you're having a block
<apeiros> *blockage
<robert_> >> 20 < 20? 1: 2
<eval-in__> robert_ => 2 (https://eval.in/153937)
<robert_> >> 20 == 20? 1: 2
<eval-in__> robert_ => 1 (https://eval.in/153938)
<robert_> see?
<techsethi> okie okie…. i was just thinking upside down. :(
<techsethi> thanks a lot folks :-)
<bhaak> robert_: for the sqlite3 db, the easiest (but maybe not the fastest) approach is to use a global Mutex object, using lock and/or synchronize. this should solve the issue without the need to change the design of the program
<apeiros> techsethi: 1 == 1 is true. first part of ternary is evaluated. 20 < 20 is false. second part of ternary is evaluated.
<techsethi> thanks aperios, all
<apeiros> techsethi: use tab completion for nicknames. avoids misspelling them (I'm not aperios :-p)
datafirm has joined #ruby
<Hanmac1> maybe for fun i will make a binary matrix ...
<techsethi> apeiros: I didn't know. thanks.
<certainty> poor binaries will be plugged into it and enslaved?
<bhaak> robert_: but also, I'm not sure if you couldn't speed up reading out of the postgres db in such a way that the sqlite3 db would become unnecessary. reading tens of dozen records out of tens of thousands records really is not a big slow task (if and only if your db schema and indexes are done correctly)
<robert_> bhaak: but I don't want to hack together a solution. I want to fix my class, lol. I could pass in a block and then synchronize and yield.
dangerousdave has quit [Ping timeout: 258 seconds]
<robert_> bhaak: it's not that, so much as the connection likes to drop every so often, and then nothing happens.
einarj has joined #ruby
<robert_> bhaak: also, it's helpful for caching local csv files that are picked up and haven't been processed yet.
<robert_> bhaak: because that's pretty much what this app as a whole does- process csv and send out emails, lol
toretore has joined #ruby
bbloom has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
helpa has quit [Remote host closed the connection]
mikepack has joined #ruby
helpa has joined #ruby
bbloom has joined #ruby
combusean has quit [Ping timeout: 240 seconds]
datafirm has quit [Ping timeout: 252 seconds]
<bhaak> robert_: this sounds like a queue design could work. you put the work into the global accesible queue and the threads take out a record, process it and put it into the will_be_written_queue which one thread takes stuff out and writes into the db? then you defined places where you need to synchronize (at the queues) and everything should churn along with max speed
akonny has quit [Quit: akonny]
sensen has quit [Quit: leaving]
Gabri has joined #ruby
<robert_> that seems rather hackish.
<robert_> I'm at the point where I want to avoid hacks as much as possible.
rshetty has joined #ruby
Advocation has joined #ruby
Hobogrammer_ has quit [Ping timeout: 255 seconds]
mikepack has quit [Ping timeout: 240 seconds]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
trhodes_ has quit [Ping timeout: 264 seconds]
<bhaak> how is that hackish? you have clearly defined process steps with clearly defined boundaries and places where you know you need to synchronize access and where you don't need to.
obs has joined #ruby
canton7-mac has joined #ruby
aspiers has joined #ruby
<trampi> bhaak: have to agree. Seems like a very plausible solution.
g0bl1n has joined #ruby
Synthead has quit [Ping timeout: 255 seconds]
_tpavel has joined #ruby
memorozovm has quit [Remote host closed the connection]
AlSquire has joined #ruby
cina has joined #ruby
dangerousdave has joined #ruby
memorozovm has joined #ruby
fgo has quit []
jjbohn has joined #ruby
<robert_> I follow (or try to) the principles of encapsulation; I'm going to try and avoid just sticking random bits of code randomly around; I'd prefer something that automatically locks/unlocks as per apeiros' suggestion.
bbloom has quit [Ping timeout: 252 seconds]
nvrch has quit [Quit: nvrch]
claymore has quit [Quit: Leaving]
g0bl1n has quit [Quit: Ex-Chat]
subraminion_ has quit [Quit: Lingo - http://lingoirc.com]
subraminion has joined #ruby
FrankTominc has joined #ruby
senayar has joined #ruby
jjbohn has quit [Ping timeout: 252 seconds]
tesuji has joined #ruby
FrankTominc has quit [Quit: Page closed]
nvrch has joined #ruby
raja_ has quit [Quit: Textual IRC Client: www.textualapp.com]
ktun has joined #ruby
combusean has joined #ruby
<canton7> ...you make a queue qhich encapsulates the synchronisation? producer/consumer is a pretty common pattern
aiguu__ has joined #ruby
rails426 has joined #ruby
<rails426> hello anybody know how i can gsub('[', '\[') ?
workmad3 has joined #ruby
<apeiros> rails426: that seems to work. what's your problem with it?
<apeiros> >> "[".gsub('[', '\[')
<eval-in__> apeiros => "\\[" (https://eval.in/153960)
combusean has quit [Ping timeout: 255 seconds]
memorozovm has quit [Remote host closed the connection]
alexju has quit [Remote host closed the connection]
<canton7-mac> >> puts '['.gsub('[', '\[')
<eval-in__> canton7-mac => \[ ... (https://eval.in/153961)
<rails426> apeiros I was not clear sorry I would like the result to be '\['
<tobiasvl> it is
<apeiros> rails426: which is the case. so again, what's your problem?
<apeiros> rails426: you do realize that "\\[" == '\[', yes?
cina has quit [Remote host closed the connection]
<ra4king> hmm I'm starting to question the need for ruby now
<tobiasvl> it's displayed as "\\[" just because the \ needs to be escaped too
<ra4king> I used to hate on Node.js but now I see the speed of V8 and I'm blown away
<rails426> tobiasvl apeiros :) Thank you guys
<rails426> I'm having a bad day
<certainty> ra4king: you didn't want ruby because of its speed did you?
<ra4king> plus I will be using Javascript for building my website, so it'd be nice to use the same one client side and backend
<ra4king> certainty: nope, because of ease of use
<certainty> ra4king: then i don't understand that v8 argument
<ra4king> then the second argument
<certainty> that one i can understand
<certainty> why didn't you consider doing it all js in the first place?
<ra4king> because I deeply dislike JS
<ra4king> also because I really want to learn more tools really
<ra4king> for this project, I'm building a service written in another language that, and then a website that controls that service
<ra4king> so I needed a good server-side tool that can communicate with that service and build a site
<ra4king> I boiled it down to Python+Django vs Ruby+Rails, and chose Ruby as it seemed more popular and it might help in future job prospects too
jimbauds has quit [Ping timeout: 240 seconds]
memorozovm has joined #ruby
Proshot has quit [Quit: Leaving]
<ra4king> s/language that/language/
cina has joined #ruby
<certainty> ra4king: so if you dislike js and you somehow have to use it for the frontend, why do you want to force yourself to do it in the backend also?
<certainty> i'm not speaking pro or contra ruby yed
<certainty> yet
<ra4king> because of argument #1 :)
<ra4king> I don't dislike JS *that* much that a 30-50 time speed improvement will stop me from using it
nfk has joined #ruby
yakko has quit [Read error: Connection reset by peer]
yakko has joined #ruby
<apeiros> uh, 30-50x? I doubt that quite a bit.
<certainty> ra4king: yeah but we already saw that speed clearly was not your main motivition to try ruby
ziyadb_ has joined #ruby
ziyadb_ has quit [Changing host]
ziyadb_ has joined #ruby
ziyadb_ has quit [Changing host]
ziyadb_ has joined #ruby
akonny has joined #ruby
<ra4king> certainty: so... now its speed vs ease of use, which offers the nice balance?
<apeiros> ra4king: you may get that in maybe one or two synthetic benchmarks. but not anywhere near close in real world applicaitons.
<ra4king> so far I'm loving ruby, the language is beautiful and makes life so easy
<ra4king> except Procs.... I don't understand the point of those at all yet
<toretore> then maybe it's premature to be making assertions about speed
tvw has quit [Read error: Connection reset by peer]
<toretore> or anything else
gregf_ has joined #ruby
tvw has joined #ruby
<certainty> ra4king: they allow you to reify code as an object which are first class citizens in ruby
benlieb has joined #ruby
<ra4king> certainty: right, but lambdas are better as far as I see
<benlieb> how do I get a key/val pair from one hash into another?
<ra4king> also calling a Proc in the middle of a method terminates the method when the call ends wtf!
<certainty> >> ->(){}.class
<eval-in__> certainty => Proc (https://eval.in/153966)
<apeiros> benlieb: Hash#merge
<apeiros> ra4king: no, calling a Proc doesn't terminate the method
<ra4king> certainty: huh, what's -> ?
<certainty> syntax for a lambda
<ra4king> oh interesting, haven't gotten to that yet
<apeiros> ra4king: if you use explicit return within that proc and constructed that proc in your method, then yes. but then that's what you told ruby to do.
freerobby has joined #ruby
<certainty> ra4king: but coming back to you questioning your decision. It's probably a good idea to stick to ruby and learn more about it to see if it is what you want. Apparently there is nothing that scared you away yet or was a big show stopper
<benlieb> where = {:bob => 'here', :jim => 'there'}; other_hash = {}; How do I use get :bob into other_hash without doing other_hash[:bob] = where[:bob] ?
ltdl has joined #ruby
combusean has joined #ruby
<benlieb> merge doesn't seem like it
<apeiros> benlieb: again, see Hash#merge
<apeiros> but it is
<ra4king> certainty: heh, I come from a static background, 4-5 years experience in Java/C#, and really liking Ruby so yeah
<ra4king> I think I'll stick with it then
<apeiros> note: merge is not in-place. it returns a new hash. see merge! and update for in-place.
<benlieb> apeiros: that merges the who hash
<benlieb> whole
<certainty> ra4king: i can assure you that ruby is a usable language for many tasks including webapps/services
<apeiros> benlieb: ok. maybe be more specific on what exactly you need then.
obs has quit [Remote host closed the connection]
<certainty> so the risk is not that higgh
<certainty> high
<benlieb> I basically want other_hash.add where[:bob]
<ra4king> right now the need is only for building dynamic webpages through communication with a backend service
<certainty> of course you have no good reason to trust me, but that's another problem
<benlieb> and then have other_hash[:bob] defined as it was in where
<toretore> benlieb: other_hash[:bob] = where[:bob]
freerobby has quit [Ping timeout: 240 seconds]
<ra4king> certainty: thanks for being patient and understanding :D
<benlieb> toretore: lol
<benlieb> yes
<certainty> ra4king: that's how I roll. Except when I grill people for no good reason :D
<benlieb> that's why I specified without doing other_hash[:bob] = where[:bob] :)
<ra4king> ha
<toretore> but that's how you do it
<ra4king> certainty: currently going through many tutorials, each seems to be covering stuff the previous missed
mjsmith2 has joined #ruby
obs has joined #ruby
<ra4king> currently going through CodeAcademy's tutorials on Ruby and they seem to be very thorough so far
combusean has quit [Ping timeout: 240 seconds]
<certainty> ra4king: yeah there is much to learn when you come to a new language. You know that from java/c#. There i a whole infrastructure and ecosystem that comes with a programming language, even if you want to touch only one of its application domains
<ra4king> yup
<toretore> other_hash.merge(where.select{|k,v| k == :bob })
<toretore> other_hash.merge(bob: where[:bob])
<ra4king> after learning syntax, I'll be diving into the API, just basically going through the ruby docs for hours
<ra4king> then I'll go through ProjectEuler a bit
<ra4king> afterwards, I gotta learn HTML+CSS (ha I still don't know them)
<ra4king> and start building the website
<certainty> ra4king: doing stuff is important, of course knowing what is in core and stdlib is important too, but learning just reading through them doesn't seem so promising to me. But that's possibly just not how I learn things. I have to actually use someting an solve problems that surely arise
<trampi> i'm started learning ruby two weeks ago and liked codewars.com to learn about the fundamentals.
<ra4king> certainty: oh right, I will definitely use them, through ProjectEuler, I just need an idea of what's *available*
<certainty> yeah agreed
<ra4king> but just reading and without creating my own example, I don't learn
<certainty> i usually build an irc bot and or a little compiler/interpreter when I learn a new language
<apeiros> certainty: doc browsing brought me up to speed quite quickly
<ra4king> also I see patterns very easily, and only seeing 1 example will make me want to test a million other test cases
subraminion_ has joined #ruby
<apeiros> certainty: IMO if you can learn without applying knowledge, it's quite valuable.
<ra4king> I thank IRB for that
<apeiros> especially core
mjsmith2 has quit [Ping timeout: 240 seconds]
trampi has quit [Quit: Page closed]
<apeiros> stdlib is probably good to just browse through the available libraries
<ra4king> going through CodeAcademy, they don't explain *all* the possible outcomes of a certain thing
subraminion has quit [Read error: Connection reset by peer]
<ra4king> so I open up IRB and try a bunch of ways to learn how it works
<ra4king> certainty: huh, never built an IRC bot before
platzhirsch has joined #ruby
<certainty> apeiros: yeah I'm aware that this helps once you have a solid understanding of the language itself. Maybe (certainly not me) people can learn it well even without trying too much. I'd not be surprised
<platzhirsch> hola
<ra4king> I don't see the point of using a 3rd party lib, since if I ever feel the need to build an IRC bot, I'd really like to learn the protocol and do things myself
<ra4king> damn you NIH syndrome!
cina has quit [Ping timeout: 258 seconds]
<ra4king> fuuuck, 5:15am already?
lotherk_ is now known as lotherk
<ra4king> I lose track of time quickly, off to bed
<ra4king> goodnight
akonny has quit [Quit: akonny]
<certainty> apeiros: browsing through stdlib is certaintly valuable. I did/do that too because I certainly memorize some of the methods I see there, but I realy internalize them only if i've put them to practice several times
<platzhirsch> shevy you old hag, how are you doing
<certainty> i'm totally aware that this is possibly only how my brain works
<apeiros> certainty: I only looked through core methods. stdlib I only checked which libraries are available.
jaykilleen has quit [Read error: Connection reset by peer]
cina has joined #ruby
todor has joined #ruby
datafirm has joined #ruby
end_guy has quit [Ping timeout: 272 seconds]
shaman42 has joined #ruby
bbloom has joined #ruby
<certainty> apeiros: yes, some parts of stdlib I had a closer look though to also know what methods they offer. Like benchmark. I think many of us do
nopc0de is now known as zz_nopc0de
djdb has joined #ruby
obs has quit [Remote host closed the connection]
<certainty> or securerandom
<apeiros> certainty: sure :)
<apeiros> shellwords, csv too
<apeiros> abbrev also
<certainty> yeah
<certainty> or timeout
<certainty> many things
obs has joined #ruby
monkegjinni has joined #ruby
obs has quit [Read error: Connection reset by peer]
datafirm has quit [Ping timeout: 240 seconds]
lkba has joined #ruby
end_guy has joined #ruby
trhodes_ has joined #ruby
obs has joined #ruby
bradhe has joined #ruby
hamakn_ has quit [Remote host closed the connection]
subbyyy has quit [Ping timeout: 240 seconds]
alem0lars has quit [Quit: alem0lars]
roshanavand has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
kilk_ has quit [Ping timeout: 240 seconds]
CodeBunny has joined #ruby
Burgestrand has quit [Ping timeout: 240 seconds]
koderok has joined #ruby
Burgestrand has joined #ruby
sigurding has quit [Read error: Connection reset by peer]
Gabri has quit [Remote host closed the connection]
art-solopov has joined #ruby
Gabri has joined #ruby
shemerey has joined #ruby
jjbohn has joined #ruby
mercerist has joined #ruby
Dude007 has joined #ruby
robbyoconnor has quit [Ping timeout: 240 seconds]
robbyoconnor has joined #ruby
rails426 has quit [Quit: ZZZzzz…]
vdmo has joined #ruby
subraminion_ has quit [Quit: Computer has gone to sleep.]
subraminion_ has joined #ruby
Gabri has quit [Ping timeout: 264 seconds]
jjbohn has quit [Ping timeout: 255 seconds]
subraminion_ has quit [Ping timeout: 255 seconds]
subraminion_ has joined #ruby
mengu has quit [Remote host closed the connection]
<certainty> i'm going to be extremist and stop testing
<certainty> and coding :D
<certainty> i'll grow flowers
<art-solopov> certainty: Ruby flowers? ^_^
Guest61308 has quit [Quit: WeeChat 0.4.3]
<certainty> more like tulips
krz has joined #ruby
nari_ has quit [Ping timeout: 245 seconds]
<certainty> art-solopov: hah!
obs has quit [Remote host closed the connection]
<certainty> beautiful flowers btw.
<art-solopov> ^_^
frobrob has joined #ruby
roshanavand has left #ruby [#ruby]
cina has quit [Remote host closed the connection]
obs has joined #ruby
pu22l3r has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
Gabri has joined #ruby
mikecmpbll has joined #ruby
workmad3 has joined #ruby
thomasxie has quit [Remote host closed the connection]
hamakn has joined #ruby
cina has joined #ruby
pu22l3r has quit [Ping timeout: 255 seconds]
fantasticsid has joined #ruby
freerobby has joined #ruby
combusean has joined #ruby
bamyojo14335 has joined #ruby
rgiscard has joined #ruby
freerobby has quit [Ping timeout: 255 seconds]
subraminion_ has quit [Remote host closed the connection]
subraminion_ has joined #ruby
rails426 has joined #ruby
mjsmith2 has joined #ruby
mikepack has joined #ruby
combusean has quit [Ping timeout: 252 seconds]
mercwithamouth has quit [Ping timeout: 258 seconds]
hgl has quit [Ping timeout: 240 seconds]
moneydouble has joined #ruby
shvelo has joined #ruby
oo_ has quit [Remote host closed the connection]
memorozovm has quit [Remote host closed the connection]
mjsmith2 has quit [Ping timeout: 240 seconds]
bahar has quit [Ping timeout: 264 seconds]
mikepack has quit [Ping timeout: 255 seconds]
memorozovm has joined #ruby
bahar has joined #ruby
fabrice31 has quit [Remote host closed the connection]
decoponio has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
rgiscard has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
sepp2k has joined #ruby
oo_ has joined #ruby
art-solopov has quit [Quit: Konversation terminated!]
heftig has joined #ruby
datafirm has joined #ruby
bradhe has joined #ruby
aiguu__ has quit [Ping timeout: 276 seconds]
sski has joined #ruby
sski has quit [Remote host closed the connection]
sski has joined #ruby
mengu has quit [Remote host closed the connection]
mengu has joined #ruby
datafirm has quit [Ping timeout: 255 seconds]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
mollitz has joined #ruby
fabrice31 has joined #ruby
monkegjinni has quit [Remote host closed the connection]
ayaz has joined #ruby
Sawbones has joined #ruby
koderok has quit [Ping timeout: 252 seconds]
mrnugget has quit [Quit: mrnugget]
bradhe has joined #ruby
trampi has joined #ruby
troulouliou_dev has joined #ruby
troulouliou_dev has quit [Remote host closed the connection]
cina has quit [Ping timeout: 240 seconds]
banister has joined #ruby
Bira has joined #ruby
cina has joined #ruby
nari_ has joined #ruby
mostlybadfly has joined #ruby
decoponio has quit [Quit: Leaving...]
dilated_dinosaur has joined #ruby
danjordan has joined #ruby
bradhe has quit [Ping timeout: 255 seconds]
<testol> Is it possible to raise an exception with an object message, rather than a string message?
<testol> When I try to rescue it, it seems to only be retrieving a string
sigurding has joined #ruby
Sawbones has quit [Remote host closed the connection]
wallerdev has joined #ruby
Sawbones has joined #ruby
<canton7-mac> no, but you can add an object property to a custom exception
Bira has quit [Ping timeout: 240 seconds]
<canton7-mac> s/property/attribute
wallerdev has quit [Client Quit]
decoponio has joined #ruby
diegoviola has quit [Remote host closed the connection]
axl_ has joined #ruby
mercerist has quit [Quit: Computer has gone to sleep.]
axl_ has quit [Client Quit]
dANOKELOFF has joined #ruby
magri has joined #ruby
lyanchih has quit [Ping timeout: 255 seconds]
Sawbones has quit [Ping timeout: 255 seconds]
trampi has quit [Quit: Bye]
nvrch has quit [Quit: nvrch]
trampi has joined #ruby
mattp__ has quit [Ping timeout: 252 seconds]
GlenK has joined #ruby
end_guy has quit [Ping timeout: 272 seconds]
Ankhers has quit [Ping timeout: 272 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rhainur has joined #ruby
mrnugget has joined #ruby
moneydouble has quit [Quit: Leaving.]
<Rhainur> I have a class with several class methods, and I would like to run a simple check whenever any of these methods is called
<Rhainur> the class itself is accessing an API, and I would like to check that I am logged in correctly before any of the methods are used
<Rhainur> what is the "correct" way to do this? copypasting code into every method seems wrong
end_guy has joined #ruby
Criztian has quit [Remote host closed the connection]
dreamchaser has joined #ruby
dreamchaser has joined #ruby
dreamchaser has quit [Changing host]
memorozo_ has joined #ruby
fantasticsid has quit [Ping timeout: 240 seconds]
badhatter has quit [Ping timeout: 240 seconds]
mollitz has quit [Ping timeout: 240 seconds]
jackneill has quit [Ping timeout: 240 seconds]
shaileshg has joined #ruby
<canton7-mac> it's fairly common to condense that check into a single method call, then make that method call in all affected class methods
<canton7-mac> taking it further than that is abuse of DRY imo, and makes things much less clear
memorozovm has quit [Ping timeout: 252 seconds]
moneydouble has joined #ruby
jackneill has joined #ruby
jackneill has quit [Changing host]
jackneill has joined #ruby
shashin has joined #ruby
shashin has joined #ruby
shashin has quit [Changing host]
ridget has joined #ruby
Gue______ has joined #ruby
<apeiros> Rhainur: if you have many class methods which are not constructors, you might consider making a class from it (where those are instance methods)
mercwithamouth has joined #ruby
whiteadam has joined #ruby
<whiteadam> Anyone know of a comment generator script? One that makes a nice 80 char box
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> huh?
mollitz has joined #ruby
memorozo_ has quit [Remote host closed the connection]
subraminion_ has quit [Quit: Computer has gone to sleep.]
User458764 is now known as User458764_NotHe
subraminion_ has joined #ruby
<whiteadam> I like pretty comments
<apeiros> sure, who doesn't. but I don't see how you'd *generate* comments
<whiteadam> magic
<apeiros> I see. Then I recommend the pixies inc. lib
<whiteadam> :)
freerobby has joined #ruby
Advocation has quit [Quit: Advocation]
Shidash has joined #ruby
Criztian has joined #ruby
<whiteadam> I'm probably wording it wrong... I mean, at the top of the code, the little box with ##### around it.
User458764_NotHe has quit [Ping timeout: 265 seconds]
combusean has joined #ruby
badhatter has joined #ruby
badhatter has joined #ruby
badhatter has quit [Changing host]
freerobby has quit [Ping timeout: 240 seconds]
kitak has quit [Remote host closed the connection]
<apeiros> oh. that's not commonly done in ruby.
<apeiros> we have class- and method-level docs. the rest is in the readme
kitak has joined #ruby
kitak has quit [Remote host closed the connection]
mjsmith2 has joined #ruby
<whiteadam> Yeah, that's what I thought. I'm trying to go back and annotate some code someone else wrote slopily so that some other team members can understand it
<apeiros> API docs commonly use Yard or RDoc style (I prefer the former - the latter exists for longer)
<whiteadam> oh, I have't actually seen Yard
danjordan has quit [Quit: danjordan]
combusean has quit [Ping timeout: 240 seconds]
moneydouble has quit [Quit: Leaving.]
danjordan has joined #ruby
danjordan has quit [Client Quit]
danjordan has joined #ruby
danjordan has left #ruby [#ruby]
mjsmith2 has quit [Ping timeout: 240 seconds]
danjordan has joined #ruby
danjordan has left #ruby [#ruby]
subraminion_ has quit [Quit: Lingo - http://lingoirc.com]
moneydouble has joined #ruby
subraminion has joined #ruby
danjordan has joined #ruby
Hanmac has joined #ruby
<LiohAu> Why isn’t this : raise ENV, printing the ENV vars?
<apeiros> LiohAu: raise ENV is invalid
<apeiros> you can only raise exceptions
strg has joined #ruby
<LiohAu> well but I can’t find how to print the ENV vars in an exception message
kyb3r_ has quit [Read error: Connection reset by peer]
Hanmac1 has quit [Ping timeout: 240 seconds]
<LiohAu> raise ``something`` is working, so why can’t I print the ENV ?
<apeiros> convert it to a string
phutchins has joined #ruby
<apeiros> because env is not a string
ridget has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Gue______ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nvrch has joined #ruby
trampi has quit [Ping timeout: 264 seconds]
<apeiros> raise "message" is equivalent to raise RuntimeError, "message"
bambuka has joined #ruby
claymore has joined #ruby
claymore has quit [Changing host]
claymore has joined #ruby
<Hanmac> but raising non-exceptions is stupid ... use throw
<apeiros> eh
<apeiros> LiohAu: why do you use *raise* to *print* stuff? sounds wrong anyway
<Hanmac> ups ... throw might not work too
<apeiros> raise is supposed to be used in the case of an exception. not as printing utility.
Advocation has joined #ruby
<apeiros> Hanmac: as of 1.9, you can indeed throw arbitrary objects.
Bira has joined #ruby
Bira has quit [Remote host closed the connection]
<LiohAu> apeiros: because I can’t print without raise (long story)
<Hanmac> apeiros: hm yeah but how to catch them nicely?
<Hanmac> LiohAu: let me quess, its a rails problem?
<apeiros> Hanmac: I didn't say I found it nice :)
<LiohAu> no
<LiohAu> not related to rails
<apeiros> LiohAu: sounds like you have bigger problems.
<LiohAu> no please, just help me to print the env,
<mikecmpbll> raise ENV.inspect
datafirm has joined #ruby
<LiohAu> thank you miah
<LiohAu> mikecmpbll:
<LiohAu> (sry miah :D)
yfeldblum has quit [Ping timeout: 255 seconds]
<apeiros> LiohAu: um, I told you to convert it to a string. I assumed you knew the basic ruby methods to do so…
<LiohAu> no I don’t :(
<LiohAu> I incur ruby
<LiohAu> (or ruby is incuring me?)
<mikecmpbll> i suspect incur is not that word you are looking for :p
<LiohAu> endure? suffer?
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sigurding has quit [Remote host closed the connection]
* LiohAu won’t use google translate anymore ^^
sigurding has joined #ruby
dilated_dinosaur has quit [Ping timeout: 265 seconds]
bradhe has joined #ruby
<mikecmpbll> perhaps.
<mikecmpbll> seems a strange thing to say though if that is indeed the intended meaning ;)
<apeiros> raises the question why you use ruby
whiteadam has quit [Quit: leaving]
<LiohAu> because the tool I use (calabash that depends on cucumber) has been developped using ruby :(
andrewlio has joined #ruby
datafirm has quit [Ping timeout: 265 seconds]
kiri has quit [Ping timeout: 276 seconds]
Criztian has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 264 seconds]
tjsousa has joined #ruby
<apeiros> cucumber definitively has better methods to print messages/debug than using raise. I'd be surprised if calabash hid those
<LiohAu> no it’s not cucumber/calabash fault
<apeiros> also, if you use such a tool and it requires ruby knowledge, you might do well to actually learn the language instead of "suffering".
gheegh has joined #ruby
<mikecmpbll> :)
mercerist has joined #ruby
csmrfx has joined #ruby
<LiohAu> it’s just that I am using a cloud service that runs the cucumber/calabash scenarios, and the cloud is hiding all the outputs except raised exceptions
<apeiros> it's not a difficult language
trampi has joined #ruby
Stalkr_ has joined #ruby
dangerousdave has quit [Ping timeout: 240 seconds]
<LiohAu> well syntax is hard than obj-c (that already has a weird method calls syntax)
<LiohAu> harder*
<apeiros> BS
rshetty has quit [Remote host closed the connection]
<apeiros> unless you want to learn and understand every way you can trick around in ruby, its syntax is very simple.
rshetty has joined #ruby
Hanmac1 has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
<apeiros> all of rubys syntax fits probably on an A4 paper, without squeezing. (not a formal definition of course, but enough information for a human to read and write correct ruby code)
<LiohAu> the optional () on calls makes reading difficult : function_call param1 param2, function_param(), function_call(param1, param2, function_param()) and function_call param1, param2, function_param
dilated_dinosaur has joined #ruby
<GlenK> I like scheme. you can literally learn all of it in a few hours
kitak has joined #ruby
<apeiros> LiohAu: you mean "reading shittily written code is difficult"? why yes, of course. it's in every language. surprise.
<apeiros> and having optional parens or not does little to add/remove from that fact
<trampi> GlenK: Syntax yes. Continuations probably not.
jimmyhoughjr has joined #ruby
rshetty has quit [Ping timeout: 264 seconds]
<LiohAu> you are used to ruby, but as a beginner I think it is hard to learn
<apeiros> LiohAu: I wasn't used to ruby from the beginning
jlebrech has joined #ruby
<apeiros> and I got into ruby mostly because of its code being very easy to read
<jlebrech> how can I find out if a url redirects or not with open-uri?
lw has joined #ruby
Nahra has quit [Remote host closed the connection]
<jlebrech> ok i can check base_uri against given uri
Nahra has joined #ruby
<GlenK> trampi: well, sure, I mean sorta. you can sorta understand functions are just data and still not fully grasp it until you build your own cons and cddr and whatnot. by learning scheme I don't just mean syntax though. I mean really learn all the keywords, how to make functions (sorta), etc.
phoo1234567 has joined #ruby
<shvelo> Ruby master race
<GlenK> I wish I really knew ruby, ocaml, and scala well enough to comment
danjordan has quit [Quit: danjordan]
<GlenK> ha
techsethi has quit [Quit: techsethi]
bamyojo14335 has quit [Quit: bamyojo14335]
<GlenK> oh, and opa
<GlenK> given ruby seems to be used for web stuff so much
setra has joined #ruby
<trampi> GlenK: hehe, we had a lesson in theoretical computer science which included building a scheme interpreter in scheme. That was awesome!
eka has joined #ruby
mollitz has quit [Ping timeout: 252 seconds]
Alina-malina has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby
jaykilleen has joined #ruby
memorozovm has joined #ruby
<Rhainur> I actually cannot believe there was a time in my life when for years I developed without any sort of source control
JasmeetQA has quit [Read error: Connection reset by peer]
<Rhainur> it was thanks to Ruby and especially RoR that I got introduced to Git
<Rhainur> but those days of FTP'ing in to webservers @_@
Bira has joined #ruby
jimmyhoughjr has quit [Quit: jimmyhoughjr]
Criztian has joined #ruby
jonno11 has joined #ruby
Criztian has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 255 seconds]
mjsmith2 has joined #ruby
<GlenK> ha, git was your introduction to version control? what are you 12?
r00ster has joined #ruby
memorozovm has quit [Ping timeout: 252 seconds]
Bira has quit [Ping timeout: 264 seconds]
<trampi> GlenK
<trampi> Yours was at least CVS? ;-)
<GlenK> cvs yeah
<GlenK> ha
<trampi> Hehe
<GlenK> you gonna bust out something older?
<trampi> No, I'm 22 ;-) started with svn
nowthatsamatt has quit [Quit: nowthatsamatt]
<GlenK> nowadays, hell even git is outdated. chef or puppet or whatever is the thing
<GlenK> from a tend /etc and whatnot standpoint I mean
subraminion_ has joined #ruby
freerobby has joined #ruby
mikepack has joined #ruby
jonno11 has quit [Quit: Textual IRC Client: www.textualapp.com]
lxsameer has quit [Quit: Leaving]
mjsmith2 has quit [Remote host closed the connection]
kiri has joined #ruby
Alina-malina has joined #ruby
memorozovm has joined #ruby
mame0 has quit [Quit: Tiarra 0.1+svn-36726: SIGTERM received; exit]
mame0 has joined #ruby
<GlenK> haha, at the end of today, I'll probably be doing consulting again
vt102 has joined #ruby
<GlenK> which is fine, because money
linojon has joined #ruby
subraminion has quit [Ping timeout: 264 seconds]
danjordan has joined #ruby
blackmesa has joined #ruby
Gabri has quit [Remote host closed the connection]
Gabri has joined #ruby
<GlenK> but it's not fine, because jesus christ dumb person, I'm here to screw with the server, but ok, let me try and be nice in explaining you're an idiot and your machine should be quarantined, melted down for slag, something.
r00ster has quit [Quit: Peace]
r00ster has joined #ruby
sambao21 has joined #ruby
freerobby has quit [Ping timeout: 276 seconds]
mikepack has quit [Ping timeout: 265 seconds]
<trampi> I'm studying, finished my bachelor recently and I am now in the post grad course. I'm working part time as a Java developer
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
<GlenK> haha, stay in school and get an EE degree I say
<Rhainur> GlenK: it was my introduction in that it was the first time I actually used any form of source control
<GlenK> better yet chemical engineering
<Rhainur> I knew about their existence
<trampi> Yeah, from a financial POV maybe. But I love software,that's my problem....
dblessing has joined #ruby
robbyoconnor has quit [Quit: Konversation terminated!]
<GlenK> I was thinking more along the lines of a sanity standpoint
Gabri has quit [Ping timeout: 255 seconds]
rshetty has joined #ruby
<trampi> Ohh, I am not sane. That's why I like programming probably
monkegjinni has joined #ruby
combusean has joined #ruby
freerobby has quit [Ping timeout: 240 seconds]
<GlenK> so the science channel is a thing. and it doesn't have dudes fishing for crap or whatever.
<Prawnzy> Loses points if it has Sagan on it
<Prawnzy> or anything in the same vein
rails426 has quit []
<Prawnzy> Nye's still cool though,
tjsousa_ has joined #ruby
tjsousa_ has quit [Remote host closed the connection]
tjsousa has quit [Read error: Connection reset by peer]
Morkel has quit [Ping timeout: 252 seconds]
tjsousa_ has joined #ruby
tjsousa_ has quit [Remote host closed the connection]
<GlenK> what is this reddit?
<GlenK> ha
tjsousa_ has joined #ruby
combusean has quit [Ping timeout: 258 seconds]
jmurray has quit [Quit: jmurray]
workmad3 is now known as wm3|away
tjsousa__ has joined #ruby
tjsousa__ has quit [Remote host closed the connection]
tjsousa_ has quit [Read error: Connection reset by peer]
flughafen has joined #ruby
jlebrech has quit [Read error: No route to host]
tjsousa__ has joined #ruby
bakflash has joined #ruby
zz_nopc0de is now known as nopc0de
tjsousa___ has joined #ruby
tjsousa___ has quit [Remote host closed the connection]
bradhe has joined #ruby
tjsousa__ has quit [Read error: Connection reset by peer]
tjsousa___ has joined #ruby
krz has quit [Quit: WeeChat 0.4.3]
tjsousa____ has joined #ruby
tjsousa____ has quit [Remote host closed the connection]
Hanmac has joined #ruby
tjsousa___ has quit [Read error: Connection reset by peer]
tjsousa____ has joined #ruby
bstrie has joined #ruby
mark_locklear has joined #ruby
subraminion_ has quit [Remote host closed the connection]
lw has quit [Quit: s]
tjsousa_____ has joined #ruby
subraminion_ has joined #ruby
tjsousa_____ has quit [Remote host closed the connection]
tjsousa____ has quit [Read error: Connection reset by peer]
jmurray has joined #ruby
thomasxie has joined #ruby
tjsousa_____ has joined #ruby
Hanmac1 has quit [Ping timeout: 252 seconds]
ktun has joined #ruby
strg has left #ruby ["Linkinus - http://linkinus.com"]
datafirm has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
sambao21 has quit [Ping timeout: 276 seconds]
zybi1 has joined #ruby
lw has joined #ruby
ziyadb_ has quit [Quit: Connection closed for inactivity]
Hanmac1 has joined #ruby
lw has quit [Client Quit]
northfurr has joined #ruby
sambao21 has joined #ruby
yakko_ has joined #ruby
Hanmac has quit [Ping timeout: 255 seconds]
kitak has quit [Remote host closed the connection]
datafirm has quit [Ping timeout: 240 seconds]
yakko has quit [Ping timeout: 252 seconds]
bamyojo14335 has joined #ruby
nowthatsamatt has joined #ruby
sigurding has quit [Quit: sigurding]
sambao21 has quit [Client Quit]
subraminion_ has quit [Quit: Computer has gone to sleep.]
subraminion_ has joined #ruby
tjsousa______ has joined #ruby
mercerist has quit [Quit: Computer has gone to sleep.]
tjsousa______ has quit [Remote host closed the connection]
tjsousa_____ has quit [Read error: Connection reset by peer]
tjsousa______ has joined #ruby
subraminion_ has quit [Ping timeout: 240 seconds]
Advocation has quit [Quit: Advocation]
troulouliou_dev has joined #ruby
subraminion_ has joined #ruby
sk87 has joined #ruby
twatters has joined #ruby
oo_ has quit [Remote host closed the connection]
qwyeth has joined #ruby
tjsousa______ has quit [Quit: Computer has gone to sleep.]
jmurray has quit [Quit: jmurray]
jmurray has joined #ruby
joelio has joined #ruby
alem0lars has joined #ruby
Gabri has joined #ruby
<joelio> probably quite a simple ruby problem for some, but any reason why this code works when entered manuall in irb but not in scirpt? https://gist.github.com/joelio/c8f51d65ec3ee6324249
<joelio> list_of_modes = list_of_modes = ethtool_output.scan(/Supported link modes:(.+)Supported pause frame use:/m)[0][0].to_s.split
shvelo has quit [Ping timeout: 240 seconds]
<joelio> is my issue
<joelio> err, sorry
kaspergrubbe has quit [Ping timeout: 240 seconds]
<joelio> list_of_modes = ethtool_output.scan(/Supported link modes:(.+)Supported pause frame use:/m)[0][0].to_s.split
<joelio> even
<tobiasvl> joelio: what's the problem?
<tobiasvl> "doesn't work" isn't a good error message ;)
<joelio> NoMethodError: undefined method `[]' for nil:NilClass
<joelio> irb(main):011:0> list_of_modes = list_of_modes = ethtool_output.scan(/Supported link modes:(.+)Supported pause frame use:/m)[0][0].to_s.split
<joelio> => ["10baseT/Half", "10baseT/Full", "100baseT/Half", "100baseT/Full", "1000baseT/Full"]
<joelio> in irb
bambuka has quit [Quit: Saliendo]
<joelio> probably something obvious my hackish ruby can't cope with :)
kaspergrubbe has joined #ruby
<csmrfx> read the error
<csmrfx> what does it say?
<csmrfx> c'mon, whats it say?
<joelio> sure, but why does it work in irb
<csmrfx> doesn't matter
<joelio> what does irb do that's magic then?
<tobiasvl> joelio: try comparing the output of ethtool in shell and irb
<csmrfx> joelio: read. the. error.
<csmrfx> joelio: forget. irb.
cina has quit [Remote host closed the connection]
ixti has joined #ruby
meatherly has joined #ruby
_tpavel has quit [Ping timeout: 240 seconds]
<joelio> tobiasvl: it's the same
<csmrfx> joelio: did you get why the error yet?
kpshek has joined #ruby
<joelio> no, otherwise I wouldn't have come here asking
mercerist has joined #ruby
<csmrfx> well, what does the last part of the error msg say?
<csmrfx> A: "nil"
LekeFly has joined #ruby
<csmrfx> "undefined method" for "nil"
<joelio> so it's getting a nil value as part of the array it's iterating over
duggiefresh has joined #ruby
rgiscard has joined #ruby
<csmrfx> perhaps
<joelio> and that's breaking teh intf as that's nil?
<joelio> but then
<csmrfx> joelio: you can't be sure if its a nil value in the [0] array of the response, or if the response is nil (the first [0])
<joelio> hmm, no it's not nil though, it's just a standard array
<joelio> => ["docker0", "eth0", "lo", "lxcbr0", "virbr0"]
<csmrfx> is that from irb or from "puts"?
<joelio> puts
<joelio> the issue isn't in the array
<joelio> irb says the same
<joelio> I can remove the scan and it works
<csmrfx> for.get.irb.
<csmrfx> look at the array, and then look at how you are accessing it
<joelio> it's ok, the scan is not being hit for docker0
<csmrfx> is there an array inside that array?
zybi1 has quit [Ping timeout: 245 seconds]
cina has joined #ruby
cina has quit [Client Quit]
thesheff17 has quit [Quit: Leaving]
LekeFly has quit [Client Quit]
anaeem1 has quit [Remote host closed the connection]
<joelio> great, works.. with the docker removal now
<joelio> thanks.. I think
akonny has joined #ruby
<csmrfx> ihih
<joelio> well, I'm not sure what you were getting at
<joelio> whatever it was about the index, that wasn't the issie :)
<joelio> and irb really help me thf
<csmrfx> sure
<csmrfx> but the answer is right there in the error
<joelio> oh yea :)
rails426 has joined #ruby
<csmrfx> you are handling a nil object which is not an array
<csmrfx> hence there is no index, etc
<joelio> I'm just pulling a subselect from the scan
northfurr has quit [Quit: northfurr]
<joelio> the nil object is due to no scan matching
<joelio> so just need some logic around that to handle those conditions
blackmesa has quit [Ping timeout: 255 seconds]
mattp_ has joined #ruby
bradT has joined #ruby
<csmrfx> so, why do you try to access the first array of the response array for no scan match?
<GlenK> so there are dudes on reddit that actively program in cobol
<csmrfx> reddit has nothing to do with it
<csmrfx> you might as well say the NYT has dudes actively programming ocaml
<joelio> csmrfx: with only 1 [0] selection...
<GlenK> haha, hey! I like ocaml
<joelio> ["[\"", "10baseT/Half", "10baseT/Full", "\\n\\t", "100baseT/Half", "100baseT/Full", "\\n\\t", "1000baseT/Full", "\\n\\t\"]"]
<GlenK> or what little I know I like
<joelio> csmrfx: with 2..
<joelio> ["10baseT/Half", "10baseT/Full", "100baseT/Half", "100baseT/Full", "1000baseT/Full"]
<csmrfx> or:
<csmrfx> >> nil
nnu has quit [Quit: May the Force be with you.]
frobrob has quit [Ping timeout: 240 seconds]
davedev24 has joined #ruby
<GlenK> ok, but let me restate that. reddit has some programming challenge junk, and some people conciously make the decision to come up with cobol solutions.
<csmrfx> or { foobar: "I wrote this easter egg in this lib just to spite you" }
subraminion_ has quit [Quit: Computer has gone to sleep.]
_tpavel has joined #ruby
mercwithamouth has quit [Ping timeout: 265 seconds]
subraminion_ has joined #ruby
zB0hs has joined #ruby
<bradT> Anyone here familiar with AJAX? I'm just learning it & posted a question about my Rails app http://stackoverflow.com/questions/23749918/how-to-poll-one-value-in-a-database-with-rails-4-if-value-changes-refresh-with
<csmrfx> this aint really a rails chan
<csmrfx> #rubyonrails or something
<csmrfx> Im familiar with ajax, to answer your q
<csmrfx> but sorry, I dont do rails
wm3|away is now known as workmad3
r00ster has quit [Quit: Peace]
timgauthier has joined #ruby
<bradT> @csmrfx I think my AJAX question has a simple answer, but I'm having a hard time deciphering what goes where & how everything in AJAX is supposed to work
rm_ has joined #ruby
<timgauthier> shevy why did 2 fighter jets just fly over my head?
<csmrfx> bradT: AJAX is #javascript
<bradT> OK, where is that info for getting access to the #javascript channel...
<csmrfx> and technically, ajax is in your browser, not in your rails app (afaik), so again, wrong chan
subraminion_ has quit [Ping timeout: 240 seconds]
combusean has joined #ruby
wallerdev has joined #ruby
zybi1 has joined #ruby
lw has joined #ruby
niharvey is now known as niharvey|brb
subraminion_ has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
Ankhers has joined #ruby
wallerdev has quit [Client Quit]
SCommette has joined #ruby
sski has quit [Remote host closed the connection]
sski has joined #ruby
danijoo has joined #ruby
<timgauthier> type /join #javascript
<timgauthier> depending on your app that should work
thomasxie has quit [Quit: Leaving.]
sambao21 has joined #ruby
<csmrfx> yeah, I guess the public channel is "##javascript" but you will be autoredirectecd
<bradT> I got into ##javascript (couldn't get into Rubyonrails).
combusean has quit [Ping timeout: 240 seconds]
<csmrfx> it might be #ror or #rails or something else, as well
bradhe has joined #ruby
<trampi> Rubyonrails needs you to be autheticated
<csmrfx> so
afhammad has joined #ruby
<trampi> Register on freenode
<csmrfx> ah yes
<csmrfx> oh well
<csmrfx> time to go jogging
<trampi> Had the same problem today :-)
<csmrfx> 8) ta!
tjsousa______ has joined #ruby
tjsousa______ has quit [Remote host closed the connection]
<GlenK> wow, my spelling fails. like really fails
verto_ is now known as verto
troulouliou_dev has quit [Remote host closed the connection]
afhammad has quit [Client Quit]
shemerey has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
afhammad has joined #ruby
nowthatsamatt_ has joined #ruby
bamyojo14335 has quit [Quit: bamyojo14335]
nowthatsamatt has quit [Ping timeout: 252 seconds]
bradT has quit [Quit: Page closed]
Megtastique has joined #ruby
bradhe has quit [Ping timeout: 255 seconds]
DrinkMachine has joined #ruby
Hamburglr has joined #ruby
endash has joined #ruby
freerobby has joined #ruby
mjsmith2 has joined #ruby
mjsmith2 has quit [Remote host closed the connection]
ktkh has joined #ruby
motoford has left #ruby [#ruby]
tkuchiki_ has joined #ruby
frobrob has joined #ruby
shemerey has joined #ruby
shaileshg has quit [Quit: Connection closed for inactivity]
Emmanuel_Chanel has quit [Ping timeout: 276 seconds]
tjsousa______ has joined #ruby
tjsousa______ has quit [Remote host closed the connection]
tjsousa______ has joined #ruby
jprovazn has quit [Quit: Leaving]
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
WishBoy has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 240 seconds]
nateberkopec has joined #ruby
tkuchiki_ has quit [Ping timeout: 264 seconds]
datafirm has joined #ruby
upsell5 has joined #ruby
sigurding has joined #ruby
jprovazn has joined #ruby
sski has quit []
sski has joined #ruby
tjsousa______ has quit [Ping timeout: 258 seconds]
rshetty has quit [Ping timeout: 240 seconds]
axl_ has joined #ruby
axl_ has quit [Client Quit]
datafirm has quit [Ping timeout: 240 seconds]
niharvey|brb is now known as niharvey
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
rshetty has joined #ruby
mengu has quit [Remote host closed the connection]
andrewlio has quit [Quit: Leaving.]
alexju has joined #ruby
agjacome has joined #ruby
fission6 has joined #ruby
<fission6> whats the rails channel
sinkensabe has joined #ruby
diegoviola has joined #ruby
<apeiros> fission6: make a guess
mary5030 has joined #ruby
<apeiros> (alternatively, it's also written on rubyonrails.org)
<fission6> #rails, #ror
<apeiros> both work
<trampi> #rubyonrails fission6
mary5030 has quit [Remote host closed the connection]
travis_ has joined #ruby
travis_ is now known as axilla
Y_Ichiro has quit [Ping timeout: 240 seconds]
<apeiros> that one too (all 3 are the same channel)
mary5030 has joined #ruby
subraminion_ has quit [Quit: Computer has gone to sleep.]
tkuchiki has joined #ruby
jaykilleen has quit [Ping timeout: 264 seconds]
User458764 has joined #ruby
<hackeron> anyone know what is wrong with this regex? < /((?:USD|EUR|GBP)?)/ -- I am trying to match if a string has USD EUR or GBP
mengu has joined #ruby
momomomomo has joined #ruby
narendraj9_ has joined #ruby
thomasxie has joined #ruby
chipotle has joined #ruby
Advocation has joined #ruby
<canton7-mac> hackeron, why that final ?
GC_2 has joined #ruby
banister has joined #ruby
mikepack has joined #ruby
<trampi> Hackeron it matches empty string
<_tpavel> hackeron, what's with the ":"?
jaykilleen has joined #ruby
narendraj9_ has quit [Client Quit]
rails426 has quit []
shemerey has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AlexRussia has joined #ruby
narendraj9_ has joined #ruby
dwayhs has joined #ruby
narendraj9_ has quit [Client Quit]
<hackeron> canton7-mac: ah, I see, thank you!
andrewlio has joined #ruby
chipotle has quit [Ping timeout: 240 seconds]
Prawnzy has quit [Ping timeout: 258 seconds]
narendraj9_ has joined #ruby
dwayhs_ has joined #ruby
bamyojo14335 has joined #ruby
mikepack has quit [Ping timeout: 255 seconds]
rshetty has quit [Remote host closed the connection]
DrinkMachine is now known as Vaporware
rshetty has joined #ruby
subraminion_ has joined #ruby
narendraj9_ is now known as narendra
subraminion_ has quit [Remote host closed the connection]
ktkh has quit [Quit: Leaving...]
GC_2 has quit [Ping timeout: 264 seconds]
narendra is now known as narendraj
tesuji has quit [Ping timeout: 255 seconds]
<apeiros> hackeron: also for future reference, if you cross-post, state so in every channel where you cross-post.
subraminion_ has joined #ruby
olivier_bK has quit [Remote host closed the connection]
danijoo has quit [Read error: Connection reset by peer]
narendraj is now known as narojosh
dwayhs has quit [Read error: Connection reset by peer]
Xeago_ has quit [Remote host closed the connection]
danijoo has joined #ruby
keeguon has joined #ruby
<shevy> timgauthier probably hunting some russian planes
marcdel has joined #ruby
<timgauthier> sweet :P
* apeiros is always fascinated by /(…)/ regexen (capturing group over the whole expression)
marcdel has quit [Client Quit]
nj_ has joined #ruby
rshetty has quit [Ping timeout: 240 seconds]
olivier_bK has joined #ruby
nj_ has quit [Client Quit]
fantazo has joined #ruby
Gabri has quit [Remote host closed the connection]
segfalt has joined #ruby
<keeguon> Hey, I have a file that I encrypt with openssl using the following command: “openssl enc -aes256 -K <key> -iv <initvector> -in <inf> -out <outf>”, the key and iv are stored in a file so I can reuse them later in Ruby but when I try to decrypt my file I end up getting the following error: “`final': wrong final block length (OpenSSL::Cipher::CipherError)” which is annoying. So I tried encrypting the file with Ruby and
<keeguon> it works I guess but the shasum is totally different from when I encrypt it directly w/ openssl any ideas?
aganov has quit [Remote host closed the connection]
vpretzel is now known as vpretzel|1379
<snapcase> how come __dir__ replaced __DIR__? the latter accepted an argument so you didn't have to concatenate strings. __dir__ + '/../directory' just looks terrible
mercerist has quit [Quit: Computer has gone to sleep.]
memorozovm has quit [Remote host closed the connection]
voglster has joined #ruby
<shevy> >> __dir__
<eval-in__> shevy => "/tmp/execpad-be842aa5ecfc" (https://eval.in/154189)
<apeiros> snapcase: __DIR__ never existed in ruby
<apeiros> snapcase: maybe you used a framework which added that
<shevy> >> __DIR__
<eval-in__> shevy => undefined local variable or method `__DIR__' for main:Object (NameError) ... (https://eval.in/154190)
<shevy> snapcase that seems to not work
SCommette has quit [Quit: SCommette]
yacks has quit [Quit: Leaving]
darmou has joined #ruby
wmoxam_ has quit [Quit: leaving]
<shevy> I find no __DIR__
wmoxam has joined #ruby
<snapcase> then I was mistaken, thought __DIR__ was a part of earlier ruby versions
<apeiros> I think sinatra, and maybe rails added __DIR__
Macaveli has quit [Ping timeout: 252 seconds]
narojosh is now known as narendra
bluehavana has quit [Quit: Connection closed for inactivity]
<snapcase> aw.. yeah seems it was a part of Ramaze. my bad
kevind has joined #ruby
bradhe has joined #ruby
EagleDelta has joined #ruby
akonny has quit [Quit: akonny]
memorozovm has joined #ruby
afhammad has quit []
s2013 has joined #ruby
combusean has joined #ruby
rshetty has joined #ruby
echevemaster has joined #ruby
jdoes has joined #ruby
sailias has joined #ruby
WormDrink has quit [Ping timeout: 252 seconds]
jdoes is now known as osomoj_
bradhe has quit [Ping timeout: 276 seconds]
<voglster> I am new to ruby and have a quick syntax question... https://gist.github.com/18c1421c41d6c40c29a0 how do i extract out the helpers into its own file?
twatters has left #ruby [#ruby]
setra has quit [Ping timeout: 255 seconds]
NukePuppy has joined #ruby
memorozovm has quit [Ping timeout: 255 seconds]
combusean has quit [Ping timeout: 258 seconds]
baweaver has joined #ruby
tvw has quit []
Zenigor has joined #ruby
codecop_ has quit [Remote host closed the connection]
niharvey is now known as niharvey|brb
blackmesa has joined #ruby
chrisja has joined #ruby
rdark has quit [Ping timeout: 264 seconds]
dangerousdave has joined #ruby
rshetty has quit [Ping timeout: 255 seconds]
Bira has joined #ruby
ascarter has joined #ruby
mercerist has joined #ruby
rdark has joined #ruby
SCommette has joined #ruby
ryanleesipes has joined #ruby
havenwood has joined #ruby
chipotle has joined #ruby
julian-delphiki has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
<apeiros> voglster: that's more a sinatra question than a ruby question. check whether Sinatra::Base#helpers accepts a module. if so, put it into a module in a separate file, require that file, and then use that module.
benlieb has quit [Quit: benlieb]
frobrob has quit [Ping timeout: 265 seconds]
mikepack has joined #ruby
<havenwood> voglster: there's #sinatra as well
User4587_ has joined #ruby
User458764 has quit [Ping timeout: 252 seconds]
thesheff17 has joined #ruby
ghr has joined #ruby
ghr has quit [Client Quit]
tjsousa______ has joined #ruby
tjsousa______ has quit [Remote host closed the connection]
bean_ has quit [Ping timeout: 255 seconds]
s2013 has quit [Ping timeout: 255 seconds]
rgiscard` has joined #ruby
ltdl has quit [Ping timeout: 240 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nnu has joined #ruby
nfk has quit [Ping timeout: 252 seconds]
paulfm has quit []
datafirm has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
julian-delphiki has quit [Ping timeout: 264 seconds]
bean has joined #ruby
<testol> Which is the preferred form: raise MyCustomError.new(param) -- or raise MyCustomError, param ?
<apeiros> latter, but only if param is the message
shemerey has joined #ruby
rgiscard has quit [Ping timeout: 258 seconds]
<apeiros> if it isn't the message, the latter won't work
paulfm has joined #ruby
jprovazn_ has joined #ruby
dangerousdave has quit [Ping timeout: 240 seconds]
tagrudev has quit [Remote host closed the connection]
niharvey|brb is now known as niharvey
vdmo has quit [Remote host closed the connection]
rayners has joined #ruby
Y_Ichiro has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
jprovazn has quit [Ping timeout: 255 seconds]
datafirm has quit [Ping timeout: 240 seconds]
paulfm has quit [Read error: Connection reset by peer]
enebo has joined #ruby
paulfm has joined #ruby
dik_dak has joined #ruby
lethjakman has joined #ruby
mengu has quit [Remote host closed the connection]
rizzatti has joined #ruby
Deele has quit [Ping timeout: 255 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
subraminion_ has quit [Quit: Lingo - http://lingoirc.com]
ffranz has joined #ruby
anarang has quit [Ping timeout: 258 seconds]
s2013 has joined #ruby
SegFaultAX has quit [Excess Flood]
trampi has quit [Ping timeout: 264 seconds]
replay has quit [Ping timeout: 276 seconds]
mikepack has quit [Remote host closed the connection]
replay has joined #ruby
Hanmac1 has quit [Quit: Leaving.]
mikepack has joined #ruby
SegFaultAX has joined #ruby
thomasxie has left #ruby [#ruby]
sinkensabe has quit [Remote host closed the connection]
axl_ has joined #ruby
Deele has joined #ruby
chipotle has quit [Quit: cya]
ce_afk is now known as cescalante
replay has quit [Ping timeout: 252 seconds]
replay has joined #ruby
mikepack has quit [Ping timeout: 264 seconds]
datafirm has joined #ruby
tjsousa______ has joined #ruby
tjsousa______ has quit [Remote host closed the connection]
jespada has joined #ruby
tjsousa______ has joined #ruby
<voglster> apeiros, havenwood thank you
<voglster> going to go punt it to sinatra channel
toastynerd has joined #ruby
darmou has quit [Quit: darmou]
andrewjanssen has joined #ruby
dangerousdave has joined #ruby
i_s has quit [Remote host closed the connection]
Emmanuel_Chanel has joined #ruby
ffranz has quit [Ping timeout: 255 seconds]
jimmyhoughjr has joined #ruby
yfeldblum has joined #ruby
datafirm has quit [Ping timeout: 255 seconds]
gregf has quit [Quit: WeeChat 0.4.3]
snath has quit [Ping timeout: 264 seconds]
trampi has joined #ruby
Stalkr_ has quit [Changing host]
Stalkr_ has joined #ruby
sigurding has quit [Quit: sigurding]
anarang has joined #ruby
aiguu__ has joined #ruby
chipotle has joined #ruby
bal has quit [Quit: bal]
ffranz has joined #ruby
aspires has joined #ruby
zigomir has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 252 seconds]
Hanmac has joined #ruby
trampi has quit [Ping timeout: 264 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
zigomir_ has joined #ruby
jaimef has quit [Excess Flood]
Deele has quit [Ping timeout: 255 seconds]
moneydouble has quit [Quit: Leaving.]
bradhe has joined #ruby
andrewhl has joined #ruby
DaniG2k has joined #ruby
aiguu__ has quit [Ping timeout: 276 seconds]
andrewjanssen has quit [Ping timeout: 255 seconds]
sambao21 has joined #ruby
Soda has joined #ruby
Soda has quit [Read error: Connection reset by peer]
agjacome has quit [Quit: leaving]
blackmesa has joined #ruby
lethjakman has quit [Ping timeout: 240 seconds]
jaimef has joined #ruby
anarang has quit [Ping timeout: 240 seconds]
jprovazn_ has quit [Quit: Leaving]
bradhe has quit [Ping timeout: 258 seconds]
codeurge has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
supermarin__ has joined #ruby
i_s has joined #ruby
moted has joined #ruby
Deele has joined #ruby
lethe has quit [Remote host closed the connection]
acrussell has joined #ruby
combusean has joined #ruby
treehug88 has joined #ruby
noop has quit [Ping timeout: 264 seconds]
anaeem1_ has joined #ruby
ktun has quit [Quit: Textual IRC Client: www.textualapp.com]
fabrice31 has quit [Remote host closed the connection]
nopc0de is now known as zz_nopc0de
fabrice31 has joined #ruby
<keeguon> Hey, I have a file that I encrypt with openssl using the following command: “openssl enc -aes256 -K <key> -iv <initvector> -in <inf> -out <outf>”, the key and iv are stored in a file so I can reuse them later in Ruby but when I try to decrypt my file I end up getting the following error: “`final': wrong final block length (OpenSSL::Cipher::CipherError)” which is annoying. So I tried encrypting the file with Ruby and
<keeguon> it works I guess but the shasum is totally different from when I encrypt it directly w/ openssl any ideas?
sski has quit [Remote host closed the connection]
ktun has joined #ruby
Deele has quit [Ping timeout: 255 seconds]
fenak has joined #ruby
sski has joined #ruby
jimmyhoughjr has quit [Quit: jimmyhoughjr]
ada has joined #ruby
toastynerd has quit [Remote host closed the connection]
combusean has quit [Ping timeout: 265 seconds]
bradhe has joined #ruby
senayar has quit [Ping timeout: 264 seconds]
phantasm66 has joined #ruby
rdark has quit [Ping timeout: 255 seconds]
SHyx0rmZ has quit [Ping timeout: 258 seconds]
fabrice31 has quit [Ping timeout: 240 seconds]
SHyx0rmZ has joined #ruby
Deele has joined #ruby
supermarin__ has quit [Quit: Computer has gone to sleep.]
aiguu__ has joined #ruby
sski has quit [Ping timeout: 265 seconds]
rdark has joined #ruby
LastWhisper has joined #ruby
supermarin__ has joined #ruby
LastWhisper has quit [Write error: Connection reset by peer]
pragmatism has joined #ruby
snath has joined #ruby
anarang has joined #ruby
bradhe_ has joined #ruby
LastWhisper has joined #ruby
dwayhs_ has quit [Quit: Computer has gone to sleep.]
<LastWhisper> hey guys, anyone familiar with rss parsers ?
centrx has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
User4587_ has quit [Quit: Textual IRC Client: www.textualapp.com]
danman has joined #ruby
bradhe_ has quit [Remote host closed the connection]
sinkensabe has joined #ruby
supermarin__ has quit [Ping timeout: 240 seconds]
<pragmatism> Given this string, what's the best way to collect the param values in to an array? "[10-14-2013] Request: param=dog&param=weasel&param=sudo"
i_s has quit [Remote host closed the connection]
s3ri0us has joined #ruby
Soda has joined #ruby
nfk has joined #ruby
kpshek has quit []
<Hanmac> pragmatism:
<Hanmac> >> "[10-14-2013] Request: param=dog&param=weasel&param=sudo".scan(/(\w+)=(\w+)/)
<eval-in__> Hanmac => [["param", "dog"], ["param", "weasel"], ["param", "sudo"]] (https://eval.in/154203)
<pragmatism> HA!
<pragmatism> Thanks!!
supermarin__ has joined #ruby
phinfonet has joined #ruby
osomoj_ has quit [Quit: Leaving]
osomoj_ has joined #ruby
<apeiros> bound to break for any non-trivial argument list
<apeiros> (param list)
blackmesa has quit [Ping timeout: 252 seconds]
binaryhat has joined #ruby
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stef_204 has joined #ruby
<s3ri0us> Can anyone tell me why this doesnt work https://gist.github.com/anonymous/86ba21bffc9450f65329
DrShoggoth has joined #ruby
Dude007 has quit [Ping timeout: 240 seconds]
<havenwood> s3ri0us: If you want to be able to call the method on `current_page.path` you'll need to define the method on `current_page.path.class`.
ktun has joined #ruby
<centrx> s3ri0us, Unless you want to monkey patch current_page.path, change remove_index to take a parameter remove_index(path) and act on the parameter
tiguser has joined #ruby
<s3ri0us> thanks havenwood working that out now
treehug8_ has joined #ruby
WishBoy has joined #ruby
<s3ri0us> thanks centrx
lmickh has joined #ruby
zz_jrhorn424 is now known as jrhorn424
apeiros has quit [Remote host closed the connection]
rizzatti has quit [Quit: Leaving...]
webgen has joined #ruby
apeiros has joined #ruby
treehug88 has quit [Ping timeout: 255 seconds]
andrewjanssen has joined #ruby
stef_204 has quit [Remote host closed the connection]
phansch has joined #ruby
Advocation has quit [Quit: Advocation]
<pragmatism> Hanmac: what if I wanted to pull the date out too?
mrnugget has quit [Ping timeout: 240 seconds]
mjs2600 has joined #ruby
stef_204 has joined #ruby
Rhainur has quit [Read error: Connection reset by peer]
Rhainur has joined #ruby
felixjet_ has joined #ruby
mojo619 has joined #ruby
sinkensabe has quit [Remote host closed the connection]
shastaky has joined #ruby
sinkensabe has joined #ruby
apeiros has quit [Ping timeout: 264 seconds]
felixjet has quit [Ping timeout: 258 seconds]
_tpavel has quit [Quit: Leaving]
datafirm has joined #ruby
ryanleesipes has quit [Quit: Leaving]
rizzatti has joined #ruby
ryan has joined #ruby
<Hanmac> pragmatism: "[10-14-2013] Request: param=dog&param=weasel&param=sudo".scan(/([^=& ]+)=([^=&]+)/)
<pragmatism> Hanmac: thanks :)
ryan is now known as Guest76764
Guest76764 has quit [Client Quit]
kaspergrubbe has quit [Read error: Connection reset by peer]
ryanleesipes has joined #ruby
aloysius21 has joined #ruby
sinkensabe has quit [Ping timeout: 255 seconds]
kpshek has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
heftig has quit [Quit: Quitting]
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
supermarin__ has quit [Quit: Computer has gone to sleep.]
supermarin__ has joined #ruby
ryanleesipes has quit [Client Quit]
fantazo has quit [Ping timeout: 276 seconds]
ayaz has quit [Quit: Textual IRC Client: www.textualapp.com]
datafirm has quit [Ping timeout: 252 seconds]
b00stfr3ak has joined #ruby
nvrch has quit [Quit: nvrch]
anaeem1 has joined #ruby
ryanleesipes has joined #ruby
shastaky has quit [Quit: Leaving...]
sente has left #ruby [#ruby]
datafirm has joined #ruby
ryanleesipes has quit [Client Quit]
pu22l3r has joined #ruby
Lutece has joined #ruby
aspires has quit []
ryanleesipes has joined #ruby
anaeem1 has quit [Remote host closed the connection]
zz_nopc0de is now known as nopc0de
rippa has joined #ruby
maletor has joined #ruby
sski has joined #ruby
supermarin__ has quit [Ping timeout: 240 seconds]
aspires has joined #ruby
einarj has quit [Remote host closed the connection]
shemerey has quit [Quit: Textual IRC Client: www.textualapp.com]
bradhe has joined #ruby
Dude007 has joined #ruby
benlieb has joined #ruby
MatthewsFace has joined #ruby
combusean has joined #ruby
phantasm66 has quit [Quit: *poof*]
gheegh has quit [Ping timeout: 240 seconds]
dANOKELO_ has joined #ruby
MatthewsFace has quit [Client Quit]
shvelo has joined #ruby
<webgen> hello
<webgen> i need to troubleshoot this :S I cant run autotest for the right dir with lib and spec directories, it gives me this error, I am running ubuntu https://gist.github.com/webzorg/a30c67a610971c57a5c3
supermarin__ has joined #ruby
sski has quit [Ping timeout: 276 seconds]
<s3ri0us> worked perfectly thanks centrx!
dANOKELOFF has quit [Ping timeout: 240 seconds]
maestrojed has joined #ruby
yfeldblum has joined #ruby
<LastWhisper> Do any of you guys use Feedjira?
nathancahill has joined #ruby
anaeem1_ has joined #ruby
ryanleesipes has quit [Quit: Leaving]
andrewjanssen has quit [Read error: Connection reset by peer]
JumpMast3r has quit [Quit: JumpMast3r]
ryanleesipes has joined #ruby
anarang has quit [Quit: Leaving]
jobewan has joined #ruby
dANOKELO_ has quit []
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
<tubuliferous> Hey Ruby folks, quick beginner question: I have an array that I want to iterate over, starting with the 5th element of the array. What is the most ruby-like way to do the iteration?
jhulten has joined #ruby
<havenwood> tubuliferous: array[4..-1].each do
lethjakman has joined #ruby
osomoj_ has quit [Ping timeout: 252 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
andrewjanssen has joined #ruby
<havenwood> tubuliferous: or maybe nicer to read: array.drop(5).each
<tubuliferous> ah...great!
<tubuliferous> thanks
bluenemo has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 276 seconds]
Lucky_ has joined #ruby
danjordan has quit [Quit: danjordan]
apeiros has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<tubuliferous> Ok, new question...I want to count the occurrences of a particular string element in an array of strings. What is a concise way of doing so?
Burgestrand has quit [Quit: Burgestrand]
dpswireless has joined #ruby
<tubuliferous> something with .map perhaps...
<centrx> tubuliferous, count
<tubuliferous> oh right =D
<tubuliferous> hahaha... thanks, centrx
jimbauds has joined #ruby
g0bl1n has joined #ruby
pietr0 has joined #ruby
mattmcclure has joined #ruby
zigomir_ has quit [Remote host closed the connection]
pu22l3r has quit [Ping timeout: 255 seconds]
toastynerd has joined #ruby
sambao21 has joined #ruby
datafirm has quit [Quit: Computer has gone to sleep.]
keeguon has quit [Quit: keeguon]
webgen has quit [Quit: Leaving from xChat]
datafirm has joined #ruby
akemrir has quit [Quit: WeeChat 0.4.3]
treehug88 has joined #ruby
treehug8_ has quit [Ping timeout: 276 seconds]
wallerdev has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
blackmesa has joined #ruby
mollitz has joined #ruby
mollitz has quit [Max SendQ exceeded]
datafirm has quit [Ping timeout: 265 seconds]
<Veejay> Hello people. I am looking for a strip-like method on strings that would allow me to pass an Array of characters to remove on top of the whitespace, does such a method exist?
xcesariox has joined #ruby
<havenwood> >> [' ya', ' sure'].map &:lstrip
<eval-in__> havenwood => ["ya", "sure"] (https://eval.in/154207)
ylluminate has joined #ruby
janssen has joined #ruby
sigurding has joined #ruby
DaniG2k has quit [Quit: leaving]
<havenwood> Veejay: oh, well if you want a method that does both map and lstrip you'd have to make it yourself
<centrx> he wants to remove characters other than whitespace
<havenwood> oh, oops
<Veejay> havenwood: I am actually looking for something like "--foobar quux ".magic_method("-") => "foobar quux"
<centrx> I thought you could do that with #strip but apparently not
GriffinHeart has quit [Ping timeout: 252 seconds]
<shevy> Veejay that is not strip
<Veejay> Yeah I thought so too
<shevy> and your example is a string, not an array ;)
<shevy> you can use .map and .delete('-') or .gsub
andrewjanssen has quit [Ping timeout: 255 seconds]
<Veejay> shevy: No I know. Strip does whitespace
<centrx> Veejay, str.gsub(/^\-*|\-*$/, '')
dangerousdave has quit [Ping timeout: 264 seconds]
<Veejay> shevy: Oh that's a string?
<centrx> str.gsub(/^[ \-]*|[ \-]*$/, '')
<Veejay> My bad I thought "" was for Arrey
<shevy> Veejay your example yes: "--foobar quux ".magic_method("-") => "foobar quux"
<shevy> [] is for array
<Veejay> Ah OK
<shevy> btw have you been on #ruby some months ago?
<shevy> I am trying to recollect whether you were that guy from sri lanka/india
dwayhs_ has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
<Veejay> shevy: I've been on Ruby thousands of times in the past 5 years heh
<Veejay> Also, I know that's a string
mojo619 has quit [Quit: mojo619]
<Veejay> Array, strings, add a splat and they all look alike anyway don't they?
<shevy> [] '' *
<shevy> array string splat
pel_daniel has joined #ruby
<Veejay> shevy: There's a misunderstanding here
Valesk has joined #ruby
lmickh has quit [Remote host closed the connection]
<shevy> I understand myself very well
<shevy> :)
<Veejay> Well that's a start
andrewhl has quit [Quit: andrewhl]
maletor has quit [Quit: Computer has gone to sleep.]
obs has quit [Remote host closed the connection]
<Veejay> So OK, nothing out of the box then, thanks everyone
garndt has joined #ruby
olivier_bK has quit [Ping timeout: 255 seconds]
<shevy> that's why such actions are .chainable
tobago has quit [Remote host closed the connection]
<shevy> or could you think of a good method name for the action you desire?
kiri has quit [Ping timeout: 240 seconds]
Bira has quit []
dwayhs_ has quit [Ping timeout: 252 seconds]
sigurding has quit [Ping timeout: 240 seconds]
Gabri has joined #ruby
rm_ has quit [Remote host closed the connection]
<Lutece> Anyone here know a gem that implements serpent encryption?
supermarin__ has quit [Quit: Computer has gone to sleep.]
supermarin__ has joined #ruby
qhartman has quit [Quit: Ex-Chat]
dseitz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Lutece> Wait found it
pu22l3r has joined #ruby
rdark_ has joined #ruby
p8952 has joined #ruby
michaeldeol has joined #ruby
deric_skibotn has joined #ruby
<Lutece> Wait no I haven't, question still stands
rdark has quit [Read error: Connection reset by peer]
dwayhs_ has joined #ruby
paulfm has quit []
sigurding has joined #ruby
predator117 has quit [Quit: leaving]
qwyeth has quit [Ping timeout: 255 seconds]
predator117 has joined #ruby
paulfm has joined #ruby
supermarin__ has quit [Ping timeout: 255 seconds]
<Veejay> shevy: Can't really think of one no
<Lutece> Shame, AES it is
<centrx> It should be added to strip, strip should accept parameter(s)
<havenwood> centrx: or lchomp
vpretzel|1379 is now known as vpretzel|lunch
<Lutece> I'm not too sure on the inner workings... not enough to implement it saddly, the crypt gem says its comming soon, closest i could find
dwayhs_ has quit [Ping timeout: 255 seconds]
mikecmpbll has quit [Ping timeout: 240 seconds]
kevinykchan has joined #ruby
djbkd has joined #ruby
<shevy> hmm
<shevy> did you guys file an issue request
datafirm has joined #ruby
<havenwood> so: class String; def lchomp(separator = $/); self.reverse.chomp(separator.reverse).reverse end end
smathieu has joined #ruby
<havenwood> reverse ALL THE THINGS \o/
tkuchiki has quit [Remote host closed the connection]
<shevy> add ALL THE THINGS \o~
<havenwood> shevy: your little guy seems to be drowning
<shevy> yeah, he's done for good
<shevy> ~o~
<havenwood> ~o~^~
<havenwood> sharks!
VTLob has joined #ruby
spider-mario has quit [Remote host closed the connection]
shashin has quit [Quit: shashin]
lkba has joined #ruby
<shevy> omg
<shevy> if it were only sharks
<shevy> but LOOK
<shevy> ~o~^~'-'-'-'-
<shevy> it's piranhas too!
kaspergrubbe has joined #ruby
Snarkz has joined #ruby
Soda has quit [Remote host closed the connection]
lethe has joined #ruby
wallerdev has quit [Quit: wallerdev]
rurban_ has quit [Ping timeout: 240 seconds]
nowthatsamatt has joined #ruby
weeems is now known as weems
weems has quit [Changing host]
weems has joined #ruby
maletor has joined #ruby
Hobogrammer has joined #ruby
blackmesa has joined #ruby
geggam has joined #ruby
alpha123 has joined #ruby
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
trampi has joined #ruby
janssen has quit [Quit: Leaving...]
ylluminate has quit [Quit: Bye!]
ylluminate has joined #ruby
mordocai has joined #ruby
lethe has quit [Ping timeout: 264 seconds]
lkba has quit [Ping timeout: 258 seconds]
Spami has joined #ruby
Deele has quit [Ping timeout: 255 seconds]
sk87 has joined #ruby
jottr_ has quit [Quit: WeeChat 0.4.2]
Advocation has joined #ruby
jottr has joined #ruby
fantazo has joined #ruby
iceden has joined #ruby
aspires has quit []
canton7-mac has quit [Remote host closed the connection]
larissa has joined #ruby
emanu has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
sk87 has quit [Client Quit]
emanu has quit [Client Quit]
aiguu__ has quit [Ping timeout: 252 seconds]
davedev2_ has joined #ruby
qwyeth has joined #ruby
rurban_ has joined #ruby
mollitz has joined #ruby
papercode has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
davedev24 has quit [Ping timeout: 252 seconds]
benlieb has quit [Quit: benlieb]
andikr has quit [Remote host closed the connection]
Deele has joined #ruby
zorak has quit [Ping timeout: 240 seconds]
macmartine has joined #ruby
monkegjinni has quit [Remote host closed the connection]
centrx has quit [Quit: All this computer hacking is making me thirsty]
aspires has joined #ruby
pu22l3r has quit [Remote host closed the connection]
Dude007 has quit [Remote host closed the connection]
saarinen has joined #ruby
mercerist has quit [Quit: Computer has gone to sleep.]
Dude007 has joined #ruby
pu22l3r has joined #ruby
Squarepy has joined #ruby
davedev2_ has quit [Ping timeout: 240 seconds]
voglster has quit [Ping timeout: 255 seconds]
Snarkz has quit [Quit: Textual IRC Client: www.textualapp.com]
stef_204 has joined #ruby
axl_ has quit [Quit: axl_]
Guest11680 has joined #ruby
Azure has quit [Quit: Blue Sky Fish]
IceDragon has joined #ruby
mercerist has joined #ruby
alem0lars has quit [Quit: Going AFK...]
diegoviola has quit [Quit: WeeChat 0.4.3]
Guest11680 has left #ruby [#ruby]
lkba has joined #ruby
Dude007 has quit [Ping timeout: 255 seconds]
<eam> with require 'bundler/setup' is there a way to specifiy a path to the Gemfile?
smathieu has quit [Remote host closed the connection]
freerobby has quit [Read error: Connection reset by peer]
nanoyak has joined #ruby
freerobby has joined #ruby
<eam> (other than Dir.chdir just before ...)
sambao21 has quit [Quit: Computer has gone to sleep.]
shvelo has quit [Ping timeout: 265 seconds]
smathieu has joined #ruby
happytux has joined #ruby
<happytux> hi
<happytux> When building ruby (using ruby-install or ruby-build or even completely manually), is the openssl documentation used at all? Or just the openssl library files?
dangerousdave has joined #ruby
davedev24 has joined #ruby
mikecmpbll has joined #ruby
SegFaultAX has quit [Excess Flood]
mary5030 has quit [Remote host closed the connection]
<happytux> I ask because with last stable openssl (.g) some trouble can happen during doc generation and also I ask myself if the doc are necessary at all (the particular openssl is build just for building ruby using it).
jottr_ has joined #ruby
wallerdev has joined #ruby
smathieu has quit [Remote host closed the connection]
shvelo has joined #ruby
Bira has joined #ruby
tjsousa_______ has joined #ruby
<shevy> happytux if you extract the ruby source from ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.bz2 you will see a dir
smathieu has joined #ruby
<shevy> called ext/openssl
binaryhat has quit [Quit: Leaving]
tjsousa_______ has quit [Remote host closed the connection]
<shevy> you can go there and install manually if installation fails
<wallerdev> wow still trying to install ruby?
<wallerdev> thats some dedication
tjsousa_______ has joined #ruby
<shevy> happytux in that directory run "ruby extconf.rb"
SegFaultAX has joined #ruby
anidear has joined #ruby
<shevy> and of course docs are not necessary
<shevy> the ruby parser does not need to read docs to understand what it has to do
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
jottr has quit [Ping timeout: 240 seconds]
<eam> it's a fair question, I've run into projects where docs impact builds
BreakmanXpc has joined #ruby
<wallerdev> in closure you use documentation to do type checking for javascript
<wallerdev> its interesting haha
mary5030 has joined #ruby
<eam> squid proxy builds its configuration datastructure by parsing its docs
<happytux> wallerdev: "Hell is about repetition."
dwayhs_ has joined #ruby
dilated_dinosaur has quit [Ping timeout: 258 seconds]
tjsousa______ has quit [Ping timeout: 276 seconds]
<happytux> wallerdev: (quoted of course, it is not from me)
vpretzel|lunch is now known as vpretzel|sick
i_s has joined #ruby
<happytux> I need to build a particular version of ruby to test Puppet modules (Puppet is written in ruby).
<happytux> But it works now. Finally.
<wallerdev> nice :D
<happytux> A new wicked bug came up in last stable openssl concerning the doc generation.
<happytux> But when the docs aren't needed by ruby at all (why should they), I can simply skip this step and then it works.
ndrei has quit [Quit: leaving]
diegoviola has joined #ruby
<wallerdev> i like having ri docs
Azure has joined #ruby
ndrei has joined #ruby
<happytux> wallerdev: I mean the openssl docs
<happytux> wallerdev: luckily
<wallerdev> ah
<wallerdev> either way if you have the internet docs arent a huge deal
Azure has quit [Client Quit]
upsell5 has quit [Quit: upsell5]
<happytux> wallerdev: the pain building ruby finally comes to an end.
troulouliou_dev has joined #ruby
<wallerdev> :)
<wallerdev> im just using the default ruby on mavericks at the moment haha
x1337807x has joined #ruby
dwayhs_ has quit [Read error: Connection reset by peer]
<wallerdev> but i havent done much ruby dev lately
mrnugget has joined #ruby
<wallerdev> and if i start a new project id probably do it in nodejs
bamyojo14335 has quit [Quit: bamyojo14335]
dwayhs_ has joined #ruby
<happytux> I ask myself if those people, introducing such breaking bugs, can hear the screams of many affected souls during git merge.
sigurding has quit [Ping timeout: 240 seconds]
voglster has joined #ruby
<happytux> wallerdev: yes, nodejs is interesting. But you guess, one also have to build them when to be used properly (I use nave as environment manager).
<wallerdev> that sentence doesnt make any sense to me
<wallerdev> lol
<happytux> wallerdev: the scream one?
alex88 has quit [Quit: Leaving...]
_Andres has joined #ruby
mehlah has quit [Quit: Leaving...]
carraroj has joined #ruby
mehlah has joined #ruby
pu22l3r has quit [Ping timeout: 264 seconds]
aiguu__ has joined #ruby
qhartman has joined #ruby
<happytux> wallerdev: One can install multiple nodejs versions on the system. Although I use containers sometimes, the version should be still locked (as the application has been tested with it). So one has to build a particular nodejs (and npm) version like I have to with ruby.
<happytux> wallerdev: And there are also many trouble points.
yfeldblum has joined #ruby
cbill has joined #ruby
LiohAu has quit [Quit: LiohAu]
Sawbones has joined #ruby
gregf has joined #ruby
mehlah has quit [Client Quit]
Shindigs has joined #ruby
djbkd has quit [Remote host closed the connection]
<Shindigs> hey all
<Shindigs> I hope your mothers have cancer today as well
<Shindigs> f_ucking bastard
<apeiros> some people…
Gabri has quit [Remote host closed the connection]
Shindigs was kicked from #ruby by apeiros [Shindigs]
<havenwood> Shindigs: mothers' or mothers's would be acceptable, but possessive form please
tylersmith has joined #ruby
<happytux> lol
<havenwood> did get to have him correct me that my correction was wrong :P
<workmad3> havenwood: the quality of grammar in messages from aggessive bastards seems to be going downhill nowadays :(
<havenwood> trolls >.>
<havenwood> workmad3: what's odd is they can't spell the swear words
yfeldblum has quit [Ping timeout: 264 seconds]
_Andres has quit [Ping timeout: 255 seconds]
<havenwood> maybe child filter?
<havenwood> or they think they're avoiding some bot detection?
<workmad3> havenwood: nah, what's odd is that they can still see the keyboard to hen-peck out their vitriol through the haze of rage-induced redness in their eyes
platzhirsch has quit [Quit: Leaving.]
platzhirsch1 has left #ruby [#ruby]
<workmad3> havenwood: I guess we should be impressed they have anything even approaching a basic command of the English language after that :)
<havenwood> workmad3: http://i.imgur.com/1M2BpNc.jpg
<workmad3> havenwood: awesome :D
<happytux> What do you think about nodejs as ruby devs? For myself, I find ruby more mature than nodejs.
enebo has quit [Quit: enebo]
<havenwood> happytux: i find there's less javascript when coding in ruby, which is obviously a good thing ;)
shvelo has quit [Ping timeout: 240 seconds]
<miah> different languages, different purposes.
tris has quit [Quit: Leaving]
<happytux> miah: Hm, ruby seems to be general purpose, at least Web Frameworks and Puppet is written in it. What purpose would be a good one for nodejs?
<happytux> havenwood: Being honest: Javascript is somehow cruel.
anidear has quit [Quit: Leaving]
<miah> ruby is dynamically, and strongly typed. javascript is dynamic, and weakly typed
ndrei has quit [Ping timeout: 258 seconds]
<miah> i write all sorts of things in Ruby, but ya, lots of Chef related stuff.
<wallerdev> javascript is perfect though, i dont think there are any trouble points or issues with nodejs
<miah> i personally, dont write anything in javascript.
<Hanmac> havenwood: DoctorWho?
<havenwood> happytux: Other than Javascript and using a web browser's VM I can't think of anything wrong with Node.js.
tjsousa_______ has quit [Ping timeout: 255 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zybi1 is now known as zybi1_away-cooki
<miah> if i were to write in another language, it would probably be clojure, or go
<happytux> havenwood: lol
<miah> javascript allows you to do `"5"+ 5` to end up with.. wtf knows.
<havenwood> Hanmac: No progress whatsoever. :( Busy weekend and now procrastinating..
<wallerdev> 55
<wallerdev> what else would you expect from that :p
<miah> :P
Slavox is now known as Slavox|AFK
<miah> ok, "dfd3dfd" + 4
<miah> =)
<miah> to be more descriptive to see the weird
<wallerdev> ruby cant even figure out what to do in that situation, javascript is king
<shevy> tiobe agrees with wallerdev
<miah> well, ruby you would need to convert the string to a int, which would result in 3 + 4
<miah> i think it can certainly be more confusing for new programmers to deal with really weak types
<wallerdev> or convert the int to a string
<wallerdev> and end up with "dfd3dfd4" like js
<miah> right
joast has quit [Ping timeout: 240 seconds]
roolo has quit [Quit: Leaving...]
rdark_ has quit [Quit: leaving]
momomomomo has quit [Quit: momomomomo]
<miah> that said, i think javascript and nodejs have their place, and anybody who is new who learns through them is gonna be fine as long as they continue to keep a open mind, and explore other languages
x1337807x has quit [Ping timeout: 255 seconds]
<havenwood> Dart, ClojureScript, CoffeeScript, Opal. Pick your poison?
<xybre> ew
workmad3 has quit [Ping timeout: 265 seconds]
<wallerdev> yeah i think if people dont have experience with a language with real types and try to pick up node
<wallerdev> it might be a disaster
<wallerdev> lol
lambo has quit [Quit: leaving]
<happytux> havenwood: and TypeScript, but it is from MS
<havenwood> I wonder if Opal will replace CoffeeScript in Rails anytime soon? :O
<wallerdev> i dont like languages that compile to JS
<havenwood> happytux: or ActiveScript, but those are worth than poison.
<xybre> havenwood: I assume you mean Opa?
<wallerdev> too annoying to debug
<shevy> rails uses coffeescript?
<havenwood> xybre: http://opalrb.org/
<wallerdev> rails lets you use coffeescript, its not required though
<havenwood> shevy: yup
<xybre> Oh okay. There's like 8 languages called Opal so I missed that one.
<shevy> hehe
Shidash has quit [Quit: Leaving.]
Hobogrammer has quit [Ping timeout: 255 seconds]
<xybre> I guess I'd go with CoffeeScript unless Opal is actually usable.
<alpha123> I rather like CoffeeScript.
tjsousa_________ has joined #ruby
mg^ has joined #ruby
upsell5 has joined #ruby
<wallerdev> i prefer just using helper libraries with pure js
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
Xeago has joined #ruby
ldnunes has joined #ruby
bricker`LA has quit [Ping timeout: 240 seconds]
ktun has joined #ruby
<terrellt> <3 Coffeescript
datafirm has quit [Quit: Computer has gone to sleep.]
tjsousa_________ has quit [Read error: Connection reset by peer]
datafirm has joined #ruby
akonny has joined #ruby
tjsousa_________ has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
<terrellt> Opal looks interesting.
papercode has quit [Ping timeout: 255 seconds]
jottr_ has quit [Ping timeout: 258 seconds]
<alpha123> I think I saw Opal a while ago and discarded it. I should give it another look.
<alpha123> I'm generally fine with plain JS though, and CoffeeScript makes it even more awesome.
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Max SendQ exceeded]
<happytux> I was a PHP guy. I was overwhelmed by all the new languages out there.
sambao21 has joined #ruby
<wallerdev> coffeescript gets you into the same state as something like haml does
cbill has quit [Ping timeout: 240 seconds]
Fire-Dragon-DoL has joined #ruby
jaykilleen has quit [Ping timeout: 264 seconds]
goleldar has joined #ruby
<alpha123> Slim FTW
datafirm has quit [Ping timeout: 264 seconds]
<xybre> Slim++
rm_ has joined #ruby
goleldar has quit [Client Quit]
BreakmanXpc has quit [Remote host closed the connection]
michaeldeol has left #ruby ["Textual IRC Client: www.textualapp.com"]
troulouliou_dev has quit [Remote host closed the connection]
mengu has joined #ruby
mengu has joined #ruby
replay_ has joined #ruby
the_f0ster has joined #ruby
<shevy> Fat
<the_f0ster> hi y'all, i am trying to recursively search a directory.. This works Dir['**/*.*'], but if i try to prepend a path to this blob, it doesnt return anything, e.g., Dir[File.join(recursively_search_this_path, '**/*.*')]
Soda has joined #ruby
replay has quit [Ping timeout: 252 seconds]
Dude007 has joined #ruby
WormDrink has joined #ruby
x1337807x has joined #ruby
<xybre> the_f0ster: whats the output of the File.join?
malia has joined #ruby
RurouniJones has joined #ruby
datafirm has joined #ruby
anidear has joined #ruby
Prawnzy has joined #ruby
sheperson has joined #ruby
<the_f0ster> xybre: the path with a string
<the_f0ster> soryr, the path, as a string
cbill has joined #ruby
<RurouniJones> Ello all, could someone verify something for me quickly on ruby-2.1.2 - Marshal.dump(Queue.new) - causes a Core dump
<the_f0ster> xybre: actually, it works, i am stupid
<the_f0ster> my directory that was testing earlier was empty, because of another bug :D
smathieu has quit [Remote host closed the connection]
<xybre> it happens:)
djbkd has left #ruby ["Leaving..."]
goleldar has joined #ruby
smathieu has joined #ruby
andrewlio has quit [Quit: Leaving.]
AlSquire has quit [Quit: This computer has gone to sleep]
pu22l3r has joined #ruby
smathieu has quit [Remote host closed the connection]
trampi has quit [Quit: Bye]
dumdedum has quit [Quit: foo]
smathieu has joined #ruby
kirun has joined #ruby
mollitz has quit [Ping timeout: 252 seconds]
<shevy> once or twice
axilla has quit [Ping timeout: 264 seconds]
<shevy> but not ALL THE TIME!!!
<xybre> haha
Emmanuel_Chanel has quit [Ping timeout: 258 seconds]
bradhe has quit [Remote host closed the connection]
mojo619 has joined #ruby
<shevy> RurouniJones yes, you just crashed my ruby, I hate you now
bradhe has joined #ruby
<shevy> "You may have encountered a bug in the Ruby interpreter or extension libraries.
<shevy> Bug reports are welcome."
<RurouniJones> yea, working on it
<RurouniJones> it broke in 2.0.0 afaik
<xybre> Crashes 2.1.1 also.
<RurouniJones> 1.9.3 handles it properly
<shevy> the larger the version number, the louder the crashes
<xybre> ypeError: no _dump_data is defined for class Mutex
<xybre> >> Marshal.dump(Queue.new)
<eval-in__> xybre => /tmp/execpad-09704883931f/source-09704883931f:2: [BUG] Segmentation fault at 0x00000c ... (https://eval.in/154220)
<toretore> i wouldn't expect to be able to marshal a Queue, tbh
<RurouniJones> oh, 2.0.0 works as well
<xybre> >> RUBY_VERSION
<eval-in__> xybre => "2.1.0" (https://eval.in/154221)
terrell_t has joined #ruby
<RurouniJones> yea, you cannot Marshal a queue, but a core dump is a bit extreme :p
<xybre> toretore: Perhaps not, but it should't dump core either.
carraroj has quit [Ping timeout: 240 seconds]
Azure has joined #ruby
terrell_t has quit [Remote host closed the connection]
momomomomo has joined #ruby
Hobogrammer has joined #ruby
terrellt has quit [Ping timeout: 240 seconds]
<shevy> toretore would you expect a crash
Asher has quit [Quit: Leaving.]
Asher has joined #ruby
<RurouniJones> xybre, shevy: Could you tell me your OS details?
SCommette has quit [Quit: SCommette]
<xybre> >> RUBY_PLATFORM
<eval-in__> xybre => "i686-linux" (https://eval.in/154234)
nateberkopec has quit [Quit: Leaving...]
<xybre> x86_64-darwin13.1.0
<xybre> So probably everything does it.
<RurouniJones> Ye, just wanted to add that to point out not OS dependent
terrellt has joined #ruby
<havenwood> xybre: that's a bug, needs an issue: https://bugs.ruby-lang.org/projects/ruby-trunk/issues
yfeldblum has joined #ruby
* xybre bugs havenwood
<xybre> I think thats what RurouniJones is doing havenwood, unless I'm mistaken.
Symbiosisz has joined #ruby
AnoGen_ has joined #ruby
kaspergr_ has joined #ruby
Astralum has joined #ruby
<havenwood> xybre: i meant the segfault
<havenwood> toretore: aha!
<xybre> havenwood: Thats not what he's doing? I'm confused!
kaspergrubbe has quit [Remote host closed the connection]
<RurouniJones> Hah
* havenwood reads back
<havenwood> oh
<RurouniJones> Should have checked first
nateberkopec has joined #ruby
<RurouniJones> All that work gisting core dumps
kaspergrubbe has joined #ruby
<RurouniJones> oh well.
<havenwood> RurouniJones: Ah, right, on 2.2.0-dev: Marshal.dump Queue.new #=> TypeError: can't dump Thread::Queue
narendra has quit [Quit: Connection closed for inactivity]
<havenwood> toretore: interesting.., hm
terrellt has quit [Ping timeout: 240 seconds]
geggam has quit [Remote host closed the connection]
joast has joined #ruby
p8952 has quit [Ping timeout: 240 seconds]
noop has joined #ruby
terrellt has joined #ruby
AnoGen_ has quit [Client Quit]
testcore has joined #ruby
AnoGen has joined #ruby
kaspergr_ has quit [Ping timeout: 255 seconds]
Tricon has joined #ruby
<RurouniJones> Right, since my SSD is on last legs and liable to die any moment, I shall say goodbye now and thanks for the help.
p8952 has joined #ruby
p8952 has quit [Changing host]
p8952 has joined #ruby
<havenwood> poor unreachable, undumpable, uncopyable Queue
pushpak has joined #ruby
<RurouniJones> Tis a pity. I shall just have to Marshal a set instead then populate the queue from that
<toretore> marshal, yuck :(
geggam has joined #ruby
<RurouniJones> This is not an application. Just doing some benchmarking on stuff and need a lot of data to process
gigetoo has quit [Remote host closed the connection]
<toretore> use xml like a real programmer ;)
AnoGen has quit [Client Quit]
<RurouniJones> I can either re-parse 100,000 odd emails or marshal :
smathieu has quit [Remote host closed the connection]
<toretore> XMLMarshallerFactory
<havenwood> RurouniJones: YAML.dump Queue.new #=> "--- !ruby/object:Thread::Queue {}\n"
<RurouniJones> I think XML with embedded JSON is the best way to o
<RurouniJones> havenwood: huh, that is a surprise
smathieu has joined #ruby
alem0lars has joined #ruby
benlieb has joined #ruby
nateberkopec has quit [Quit: Leaving...]
gigetoo has joined #ruby
terrellt has quit [Remote host closed the connection]
<havenwood> and loading it... segfault!
<havenwood> surprises! /o\
<benlieb> I have a rails app running ruby 1.8.7 but now have need of a gem written incompatible ruby 1.9.x syntax. Is my only option to upgrade my entire app, or is there some magic solution I don't know of?
<toretore> they should leave it like that
<toretore> it's what you deserve for trying to do it in the first place
<RurouniJones> Hahahah, havenwood, your turn to file a bug ;p
Advocation has quit [Quit: Advocation]
<havenwood> works in 1.9 :O
<RurouniJones> Even better
blackmesa has joined #ruby
<havenwood> lots of issues with the new C implementation of Queue it seems
<the_f0ster> havenwood: where is that?
andrewhl has joined #ruby
terrellt has joined #ruby
WishBoy has quit [Ping timeout: 265 seconds]
andrewhl has quit [Client Quit]
mrnugget has quit [Quit: mrnugget]
<RurouniJones> Queue got re-implemented in 2.0?
terrellt has quit [Remote host closed the connection]
alem0lars has quit [Read error: No route to host]
apeiros has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
papercode has joined #ruby
<RurouniJones> and there goes the SSD
<RurouniJones> tata
RurouniJones has quit [Remote host closed the connection]
<shevy> where is RurouniJones
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RurouniJones has joined #ruby
dpswireless has quit [Remote host closed the connection]
havenwood has quit []
terrellt has joined #ruby
terrellt has quit [Remote host closed the connection]
andrewjanssen has joined #ruby
subbyyy has joined #ruby
centrx has joined #ruby
sinkensabe has joined #ruby
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
timgauthier has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
anidear has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]
b1205 has joined #ruby
x1337807x has joined #ruby
timgauthier has joined #ruby
ktosiek has joined #ruby
DrShoggoth has quit [Ping timeout: 252 seconds]
lethjakman has quit [Ping timeout: 240 seconds]
dseitz has joined #ruby
<machty> all you rspec geniuses out there, is there a more succinct way to write this?
anidear has joined #ruby
smathieu has quit [Remote host closed the connection]
DrShoggoth has joined #ruby
dangerousdave has quit []
arrubin has joined #ruby
Naoe-Kanno has joined #ruby
freerobby has quit [Quit: Leaving.]
chipotle has quit [Quit: cya]
smathieu has joined #ruby
andrewjanssen has quit [Ping timeout: 240 seconds]
Krajsnick has joined #ruby
sailias has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
nateberkopec has joined #ruby
bradhe has quit [Remote host closed the connection]
sinkensabe has quit [Remote host closed the connection]
lambo has joined #ruby
Shidash has joined #ruby
SHyx0rmZ has quit [Ping timeout: 276 seconds]
sinkensabe has joined #ruby
<apeiros> IMO Array.new(2) { … } is more idiomatic than 2.times.map { … }
terrellt has joined #ruby
terrellt has quit [Read error: Connection reset by peer]
p8952 has quit [Ping timeout: 258 seconds]
Asher has quit [Quit: Leaving.]
fenak has quit [Ping timeout: 255 seconds]
terrellt has joined #ruby
MatthewsFace has joined #ruby
bradhe has joined #ruby
<yxhuvud> benlieb: I suggest you upgrade. You will get a *ton* of performance.
b1205 has quit [Ping timeout: 258 seconds]
Kilo`byte has quit [Ping timeout: 252 seconds]
MatthewsFace has quit [Client Quit]
sinkensabe has quit [Ping timeout: 264 seconds]
smathieu has quit [Remote host closed the connection]
<slash_nick> apeiros: is the #map necessary? 2.times { }
smathieu has joined #ruby
<apeiros> slash_nick: 2.times returns 2
Naoe-Kanno has quit [Quit: ネウロイを負かさなきゃならないね]
<apeiros> and Array.new(2) would still be more idiomatic :)
<slash_nick> oh, didn't read back far enough sorry :)
replicant has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<machty> i'll go w Array.new(2). thanks!
<machty> but more specifically the pattern of mocking update_attribute
<machty> wondered if there was a more inline way to do it
<machty> w rspec 3
<apeiros> don't know rspec, so can't give advice there
upsell5 has quit [Quit: upsell5]
nanoyak has joined #ruby
JoeGaudet has joined #ruby
b1205 has joined #ruby
ghostbox has joined #ruby
s3ri0us is now known as s3ri0us|away
Kilo`byte has joined #ruby
<lambo> wich rubies manager is the most beginner friendly? (i mean the easiest to document / seting up) ?
phantasm66 has joined #ruby
reactormonk has quit [Ping timeout: 240 seconds]
andrewlio has joined #ruby
phantasm66 has quit [Client Quit]
reactormonk has joined #ruby
r_s_h has joined #ruby
zybi1_away-cooki has quit [Quit: Leaving]
Authenticator has joined #ruby
magri has quit [Ping timeout: 240 seconds]
phantasm66 has joined #ruby
<r_s_h> regex ninjas: I want to return if there's a space in the pattern. For example, "mich aelll" =~ /michael(.*)/ I want this to return.
<pontiki> return *what*
run_kmc has joined #ruby
<r_s_h> well that will return the index of the first letter matched I believe, so [0]
Emmanuel_Chanel has joined #ruby
mojo619 has quit [Read error: Connection reset by peer]
bamyojo14335 has joined #ruby
<r_s_h> as long as it returns something other than nil
sepp2k1 has joined #ruby
<wallerdev> just use / / ?
<apeiros> lambo: I like rvm. never had issues with it. IMO well documented and #rvm is friendly
Authenticator has left #ruby [#ruby]
rm_ has quit [Remote host closed the connection]
shvelo has joined #ruby
run_kmc has left #ruby [#ruby]
<r_s_h> that won't take care of the space.
Asher has joined #ruby
Asher has quit [Read error: Connection reset by peer]
sepp2k has quit [Ping timeout: 276 seconds]
lethjakman has joined #ruby
<wallerdev> not sure what youre asking then haha
<r_s_h> "mich ael" see the string is there, but there's a space breaking it up.
mojo619 has joined #ruby
Xiti has quit [Quit: Leaving]
<wallerdev> >> str = "mich ael"; str[/ /] = ''; str
<eval-in__> wallerdev => "michael" (https://eval.in/154296)
chrisseaton has joined #ruby
axilla has joined #ruby
p8952 has joined #ruby
<wallerdev> >> str = "mich ael"; str.delete(' ')
<eval-in__> wallerdev => "michael" (https://eval.in/154297)
kenneth__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
afex has joined #ruby
nateberkopec has quit [Quit: Leaving...]
Asher has joined #ruby
Asher has quit [Client Quit]
bamyojo14335 has quit [Quit: bamyojo14335]
jprovazn has joined #ruby
failshell has joined #ruby
bamyojo14335 has joined #ruby
Astralum has quit [Quit: Leaving]
axilla has quit [Ping timeout: 255 seconds]
jimbow has joined #ruby
<jimbow> okay so i typed mv /this/folder/is/here ..
<jimbow> i figured .. would move the folder back one level
<jimbow> the folder disappeared
alvaro_o has joined #ruby
<jimbow> :(
<apeiros> jimbow: back one level from pwd, yes
Bumptious has joined #ruby
<jimbow> fuck
<wallerdev> lol
<apeiros> relative paths are always relative to pwd
<failshell> anyone knows how to turn off ssl validation for XMLRPMC::Client ?
<wallerdev> at least the folder is probably still around :p
chrisseaton has quit [Ping timeout: 264 seconds]
<jimbow> thanks guys
datafirm has quit [Quit: Computer has gone to sleep.]
<apeiros> /part #bash
Xeago has quit [Remote host closed the connection]
datafirm has joined #ruby
<wallerdev> :p
zigomir has joined #ruby
alpha123 has quit [Ping timeout: 252 seconds]
lw has quit [Ping timeout: 276 seconds]
bamyojo14335 has quit [Quit: bamyojo14335]
macmartine has quit [Remote host closed the connection]
nateberkopec has joined #ruby
benweint has joined #ruby
benweint has quit [Client Quit]
lw has joined #ruby
datafirm has quit [Ping timeout: 252 seconds]
s3ri0us|away is now known as s3ri0us
jprovazn has quit [Quit: Odcházím]
ryanleesipes has quit [Ping timeout: 240 seconds]
Tricon has quit [Ping timeout: 255 seconds]
jprovazn has joined #ruby
pu22l3r_ has joined #ruby
<jimbow> thanks guys a lot
<jimbow> i would have never thought i'd do that
glenfe has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
afex has quit [Ping timeout: 240 seconds]
Shidash has quit [Quit: Leaving.]
tjsousa_________ has quit [Ping timeout: 252 seconds]
freerobby has quit [Read error: Connection reset by peer]
pu22l3r has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
Bumptious has quit [Remote host closed the connection]
<apeiros> jimbow: next time, run [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You lucky bastard"
<wallerdev> haha reminds me of that space invaders game that would delete random files everytime you killed an enemy
Bumptious has joined #ruby
<jimbow> !ops
<jimbow> apeiros is being a dick
<wallerdev> yeah someone ban apeiros ;)
<apeiros> huh? what?
nari_ has quit [Quit: Ex-Chat]
<apeiros> jimbow: mind telling me how I was being a dick?
rezzack has joined #ruby
* xybre microwaves some popcorn
rethus has left #ruby ["Konversation terminated!"]
agjacome has joined #ruby
Bira has quit [Remote host closed the connection]
<apeiros> I'm willing to apologize. but I don't yet see how I was a being dick.
toastynerd has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<jimbow> 12:10 < apeiros> jimbow: next time, run [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You lucky bastard"
<jimbow> really...
<jimbow> :(
noop has quit [Ping timeout: 255 seconds]
* shvelo has quit (Remote host closed the connection)
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> ok, so you repeat what I said. that does not really explain why that makes me being a dick.
<jimbow> telling someone to delete their hard drive isn't dick i don't know what is
phutchins has quit [Ping timeout: 252 seconds]
<RurouniJones> For reference: http://www.commitstrip.com/en/page/3/
<apeiros> oookay. I thought it was pretty obvious that this is bash russian roulette.
t0rc has joined #ruby
<geggam> it wont delete the whole drive... usually fails when it hits /dev at some point jimbow
* geggam has tried it when bored
* shvelo (shvelo@unaffiliated/shvelo) has joined #ruby
Bumptious has quit [Ping timeout: 264 seconds]
bradhe has quit [Remote host closed the connection]
<geggam> or /proc
<geggam> its not reliably consistent
<wallerdev> wouldnt do much unless youre crusing as root haha
maletor has quit [Quit: Computer has gone to sleep.]
<shvelo> sudo dd if=/dev/zero of=/dev/sda
<geggam> bs=512 count=1
<geggam> data is safe ;)
Hanmac1 has joined #ruby
smathieu has quit [Remote host closed the connection]
<canton7> doesn't 'rm -rf /' fail anyway?
<wallerdev> try it
<shvelo> GPT table is safe too
<canton7> unless you pass --no-preserve-root or so
bradhe has joined #ruby
<geggam> rm -rf / will run for a bit... really trashes a system...
smathieu has joined #ruby
<wallerdev> rm -rf ~/ would be much more devastating for me
axilla has joined #ruby
<RurouniJones> I think ubuntu has a special "Noway" hardcoded into that
bamyojo14335 has joined #ruby
<geggam> ubuntu needs it.. its userbase isnt really that smart :)
rm_ has joined #ruby
<shvelo> lel
<canton7> sudo rm -rf /
<canton7> rm: it is dangerous to operate recursively on `/'
<canton7> rm: use --no-preserve-root to override this failsafe
<xybre> You should always sudo rm -rf.
Hanmac has quit [Ping timeout: 252 seconds]
<shvelo> Ubuntu is slow even on a quad-core i5
<canton7> sudo rm -rf /* works :)
<wallerdev> doesnt that depend on the graphical environment
<wallerdev> or whats slow
<shvelo> Unity environment
<toretore> ubuntu loads modslow by default :(
maletor has joined #ruby
<apeiros> jimbow: anyway, noted. if I show that again, I'll follow it up with a warning and an explanation.
<wallerdev> ubuntu is good for servers
Dude007 has quit []
<shvelo> I'd use coreos on servers
<apeiros> toretore: but that's dozens of times faster than modmolasses, no?
niharvey is now known as niharvey|lunch
<arrubin> What is CoreOS's packaging system?
<haha_> Ruby tuesday
rm_ has quit [Remote host closed the connection]
<shvelo> Docker
s3ri0us is now known as s3ri0us|away
bamyojo14335 has quit [Client Quit]
<arrubin> Hmm.
SHyx0rmZ has joined #ruby
<shvelo> you can even run Ubuntu server on it via docker
<toretore> sure, but modmolasses requires modrandsegf
<shvelo> modrandpanic
<shvelo> modbluescreen
sheperson has quit [Ping timeout: 255 seconds]
<geggam> ubuntu on a server is almost as bad as windows on a server
<toretore> arrubin: coreos isn't supposed to have anything installed on it
<ra4king> I love sudo rm -rf /
<arrubin> geggam: Ubuntu Server does not install X.
<ra4king> I do it all the time
<ra4king> makes my computer so much faster!
<toretore> it's only there to run docker containers
<geggam> nope arrubin ... it installs ubuntu
sheperson has joined #ruby
<shvelo> openbox is good for server GUI, if you need it. I ran Openbox on a VPS with 128mb RAM
<shvelo> hardcore
SCommette has joined #ruby
<shvelo> or should it be i3
* shvelo doesn't know how to use tiling window managers
Xeago has joined #ruby
alpha123 has joined #ruby
edmellum has quit [Ping timeout: 276 seconds]
agent_white has joined #ruby
ggherdov has quit [Ping timeout: 276 seconds]
Hanmac has joined #ruby
cmaxw_____ has quit [Ping timeout: 258 seconds]
tiagonobre_ has quit [Ping timeout: 240 seconds]
vpretzel|sick is now known as vpretzel
mroth has quit [Ping timeout: 258 seconds]
mark_locklear has quit [Ping timeout: 264 seconds]
VinDH has joined #ruby
cmaxw_____ has joined #ruby
<shvelo> oh wait this is #ruby
<shvelo> hey shevy
mehlah has joined #ruby
edmellum has joined #ruby
mroth has joined #ruby
Hanmac1 has quit [Ping timeout: 255 seconds]
tiagonobre_ has joined #ruby
RurouniJones has quit [Remote host closed the connection]
timfoo has joined #ruby
echevemaster has quit [Quit: Leaving]
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gazarsgo has quit [Ping timeout: 240 seconds]
aspires has quit []
momomomomo has quit [Quit: momomomomo]
nanoyak has quit [Quit: Computer has gone to sleep.]
sheperson has quit [Ping timeout: 240 seconds]
mrnugget has joined #ruby
gazarsgo has joined #ruby
b1205 has quit [Ping timeout: 240 seconds]
ggherdov has joined #ruby
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
mrnugget has quit [Read error: Connection reset by peer]
Martxel has joined #ruby
<xybre> Ubuntu is fine for "dedicated" style servers.
wallerdev has quit [Quit: wallerdev]
DrShoggoth has quit [Quit: Leaving]
Soda has quit [Remote host closed the connection]
mrnugget has joined #ruby
ryanleesipes has joined #ruby
monkegjinni has joined #ruby
<timgauthier> is there a sim city addicts annon?
sailias has joined #ruby
sailias has quit [Remote host closed the connection]
<shvelo> Ruby anyone?
<agent_white> I do Ruby stuff.
s3ri0us|away is now known as s3ri0us
Xeago has quit [Remote host closed the connection]
<haha_> yeah you can RUBy my back
Xeago has joined #ruby
<shvelo> Any performance difference between Ruby and JRuby?
<agent_white> o \o
elaptics is now known as elaptics`away
mrnugget has quit [Read error: Connection reset by peer]
Eyess has joined #ruby
Bira has joined #ruby
<arrubin> shvelo: Maybe.
<agent_white> JRuby is longer than Ruby, so prolly slower.
Hanmac has quit [Ping timeout: 276 seconds]
chrisseaton has joined #ruby
r_s_h has left #ruby [#ruby]
mrnugget has joined #ruby
<xybre> shvelo: try it and see
mrnugget has quit [Write error: Connection reset by peer]
Oxddf has joined #ruby
smathieu has quit [Remote host closed the connection]
KAO has joined #ruby
mrnugget has joined #ruby
Xeago has quit [Ping timeout: 252 seconds]
smathieu has joined #ruby
smathieu has quit [Read error: Connection reset by peer]
<shvelo> I might try Ruboto if it didn't require installing a Ruboto Core app on the device
mrnugget has quit [Client Quit]
Hanmac has joined #ruby
smathieu has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
benweint has joined #ruby
<replicant> howdy, would love to get some help on some file io operations for this little note taking script i'm working on.. https://gist.github.com/megalithic/87beeccb708f257903f6#file-noter-rb-L50
sski has joined #ruby
<replicant> ^^ specifically as mentioend for the TODO on L50 there, i'd love to know how to write a string above a specific line
Spami has joined #ruby
1JTAAPWSA has joined #ruby
aiguu__ has quit [Ping timeout: 276 seconds]
<xybre> shvelo: rvm can install jruby without any issues
<shvelo> I don't use rvm
<slash_nick> replicant: what size files are we talking about here?
KAO has quit [Ping timeout: 255 seconds]
<eam> jruby can be faster, but has immensely slower startup time
<xybre> shvelo: it's not difficult to install.
<replicant> howdy slash_nick, they are relatively small markdown files.. likely no more than 100-200 lines per file (just tinkering with stuff right now)
<eam> not that cruby + gem startup time is anything to write home about
<replicant> slash_nick: mostly having issues just writing to a pspecific line in a file within my file.open block
spider-mario has joined #ruby
sinkensabe has joined #ruby
phantasm66 has quit [Quit: *poof*]
<slash_nick> replicant: is specific line necessary, or as the TODO indicates just writing to the first line?
<shvelo> Ruby gem startup time :(
sinkensabe has quit [Remote host closed the connection]
<replicant> even though i f.rewind or f.lineno=1 and then commence my puts/print/write it still writes in place to the end of the file
<replicant> slash_nick: ultimatelly i'll need to be able to write to a point in the file, bu t we'll start easy and just do first line :D
<shvelo> Why can't Ruby have faster startup time like Python?
sinkensabe has joined #ruby
jimbow has quit [Quit: Lost terminal]
g0bl1n has quit [Ping timeout: 240 seconds]
<shevy> shvelo because japan is very far away
<shvelo> lol
<shevy> gem is notoriously slow though
<replicant> within the file.open block my 'f' object shows f.readlines as being an emtpy array.. so that's disheartening.. perhaps i'm not understanding the file.open block corectly. if i File.readlines(f) i see all the lines in the file
<replicant> slash_nick: ^^
<xybre> ruby-install also can install JRuby, I think ruby-build (rbenv build) can too.
<shvelo> gem is written in Ruby right?
<slash_nick> replicant: something like http://stackoverflow.com/a/8623291/1152759 with Array#insert
<xybre> shvelo: gem is much faster as of Ruby 2 do to the require optimizations :)
<replicant> checking now, thanks
s3ri0us is now known as s3ri0us|away
<xybre> shvelo: yes. gem ins ruby.
<xybre> ins = is/in
Kilo`byte has quit [Ping timeout: 258 seconds]
yubrew has quit []
kapowaz has quit [Ping timeout: 258 seconds]
decoponio has quit [Quit: Leaving...]
paulfm has quit []
Kilo`byte has joined #ruby
<eam> shvelo: there are a couple of really simple reasons why gem is slow
alpha123 has quit [Ping timeout: 252 seconds]
sinkensabe has quit [Ping timeout: 265 seconds]
SegFaultAX has quit [Excess Flood]
paulfm has joined #ruby
<eam> chief among them, gem registered programs run *two* ruby instances
s3ri0us|away is now known as s3ri0us
<eam> so there's an immediate doubling of interpreter startup time
<shvelo> also it would be good if gem showed progress , kinda like npm does. gem looks like it doesn't work unless you run it with -V
jgx has joined #ruby
<eam> other issues surround how the runtime loader traverses directories
SegFaultAX has joined #ruby
kenneth has joined #ruby
gazarsgo has quit [Ping timeout: 245 seconds]
aspires has joined #ruby
KAO has joined #ruby
sethen has joined #ruby
<RubyPanther> eam: doubling isn't true at all
<eam> RubyPanther: it absolutely is
jeffreybaird has quit [Ping timeout: 258 seconds]
<eam> gem installs a shim script which re-execs
<RubyPanther> it absolutely is absurd
<eam> RubyPanther: I'm happy to explain how this works
<RubyPanther> if you run the same thing 2 times in a row it does not take 2 times the time
<eam> sigh
kapowaz has joined #ruby
<RubyPanther> yes, *sigh* indeed
gazarsgo has joined #ruby
<eam> RubyPanther: there is startup cost in launching an interpreter
Olipro has quit [Ping timeout: 246 seconds]
datafirm has joined #ruby
<eam> that cost is paid twice, when running a script from a gem
yubrew has joined #ruby
<RubyPanther> I advise a benchmark. There is NO WAY you can make running the same thing twice in a row, immediately, take twice the time
<eam> ...
<eam> listen to what you just said
paulfm has quit [Client Quit]
<RubyPanther> modern hardware it is not even out of CPU cache, the instructions don't get re-run by the CPU. The kernel gets answers instantly from the cache
<eam> oh dear
* shvelo tries to find popcorn but fails
freerobby has quit [Quit: Leaving.]
sinkensabe has joined #ruby
<RubyPanther> just like reading the same part of the fs twice in a row, it does not actually read it twice
<eam> RubyPanther: we are talking about execve(), that is a completely new process
<apeiros> eam: gems don't use exec to re-exec
freerobby has joined #ruby
<RubyPanther> it doesn't matter if it is a new process, it matters if the process as the same code
<apeiros> the shim does `load Gem.bin_path('bundler', 'bundle', version)`
<RubyPanther> s/as/has/
jeffreybaird has joined #ruby
<apeiros> (took bundler shim to check)
<eam> apeiros: oh, now that's interesting
datafirm_ has joined #ruby
<RubyPanther> eam: You really need to dial down your "certainty" dial. You're at 11, I'd recommend putting a hard stop at around 5 or 6
<apeiros> but yes, rubygems introduces quite a bit of overhead. I think it got better in newer releases. still far more than necessary for the same features IMO.
<RubyPanther> especially since you're not a hardware person
<eam> RubyPanther: regardless, in the case I described, certainty level 11, it will be 2x
nanoyak has joined #ruby
s2013_ has joined #ruby
<eam> it just so happens that there isn't a second exec :)
toastynerd has joined #ruby
<eam> the stuff you mention about cpu cache isn't relevant when constructing a new process
<RubyPanther> yes but you're wrong. And even if you think you're right, you have to leave room for actually being wrong, because you clearly don't understand how moderns computers work under the hood
yfeldblum has quit [Remote host closed the connection]
<eam> I'm not wrong where I illustrate your mistakes :)
datafirm has quit [Ping timeout: 240 seconds]
<eam> seriously, take your own advice
<RubyPanther> it is so relevant, the OS can't even do anything to stop it from happening. And the CPU cache doesn't know wtf you're talking about, a "process" wtf is a "process?"
<eam> oh dead
<eam> dear
<RubyPanther> but you know you don't understand the hardware, so you know you're throwing darts and hoping you're right ;)
<eam> mmmm
<eam> one of us is
Olipro has joined #ruby
s2013 has quit [Ping timeout: 255 seconds]
sinkensabe has quit [Ping timeout: 240 seconds]
niharvey|lunch is now known as niharvey
sailias has joined #ruby
ceej has quit [Ping timeout: 245 seconds]
benweint has quit [Quit: Computer has gone to sleep.]
sambao21 has joined #ruby
x1337807x has joined #ruby
benzrf has joined #ruby
toastynerd has quit [Ping timeout: 252 seconds]
frosgy has joined #ruby
<RubyPanther> eam: "<eam> the stuff you mention about cpu cache isn't relevant when constructing a new process" it is okay to start from not knowing, that is where everybody starts. But if you're turning your certainly up to 22, how can you ever learn? And if you turn it up that high when you have partial knowledge (which is the most anybody can have) then you prevent yourself from learning.
toastynerd has joined #ruby
<benzrf> RubyPanther: perhaps you meant 'up to 11'
<eam> RubyPanther: please explain to me how two completely separate invocations of ruby in serial will benefit from whatever it is you imagine is going on?
1JTAAPWSA has quit []
thinkclay has joined #ruby
<apeiros> CPU cache isn't even big enough for the ruby whole process, let alone the loaded and interpreted ruby code.
<eam> I'm not even clear what your think is occuring
<RubyPanther> benzrf: you're right, I doubled it
<apeiros> *the whole ruby process
<eam> apeiros: exactly
<apeiros> even less so while contending with other running processes
aiguu__ has joined #ruby
<RubyPanther> It doesn't load the whole process into the CPU anyway, that isn't how it works
<eam> and on top of that, simple OS level costs surrounding constructing and destructing process entries
saltsa has quit [Quit: system upgrade]
paulfm has joined #ruby
<RubyPanther> there are lots of repeated instructions, lots and lots, and indeed, all the instructions in Ruby that are used during startup will easily get cached
Zenigor has quit [Remote host closed the connection]
marcdel has joined #ruby
ceej has joined #ruby
toastyne_ has joined #ruby
larissa has quit [Quit: Leaving]
s3ri0us is now known as s3ri0us|away
<eam> ok so I think I'm starting to understand your mental model of what you think a "CPU cache" is. Rather than dive in, let's just agree that there is a cost to start the interpreter, and starting it twice costs twice as much?
frogsy has quit [Ping timeout: 240 seconds]
<apeiros> $ time ruby -e 'exec "ruby -e 1"' # <-- pretty much 2x that of time ruby -e 1
bklane has joined #ruby
afex has joined #ruby
<apeiros> so real world measurement says "nope, exec isn't cheaper even for a relatively simple process"
<eam> RubyPanther: because here's the thing, if it works as you imagine (which, it doesn't) then the first instance would be as fast as the second on any system running lots of ruby
aloysius21 has quit [Remote host closed the connection]
Zenigor has joined #ruby
cbill has quit [Quit: WeeChat 0.4.3]
benweint has joined #ruby
toastynerd has quit [Ping timeout: 240 seconds]
<eam> or the fourth, just as fast as the fifth
s3ri0us|away is now known as s3ri0us
pu22l3r_ has quit [Remote host closed the connection]
<eam> the real story here is that the gem stub doesn't call exec() - I must've been thinking of something else re: running twice
<apeiros> eam: it might have done that one time
<RubyPanther> if you're running "lots of ruby" you're hitting the same bottlenecks, so it will slow down in other places even as it is speeding up, same as if you're running lots of the same anything
sambao21 has quit [Quit: Computer has gone to sleep.]
<apeiros> eam: at least I seem to remember something to that extent too
<eam> I may also have been looking at something involving bundler
<apeiros> rails console uses exec
<apeiros> or used
combusean has quit [Ping timeout: 240 seconds]
<apeiros> loading full rails+app, just to throw it away again. that is (was?) so retarted
<apeiros> *retarded
combusean has joined #ruby
<benzrf> apeiros: why call it retarded
<eam> RubyPanther: just please take my word for it, much of the work involved in constructing a ruby interpreter isn't cachable
<benzrf> there are lots of other words
<benzrf> 'retarded' is ableist
<benzrf> =[
<slash_nick> benzrf: "slow"
<eam> your biggest cache win from a clean start will be the file cache
<benzrf> -=[bluh]=-
<apeiros> benzrf: ableist?
<RubyPanther> apeiros: real 0m0.096s vs real 0m0.128s
* apeiros googles
<slash_nick> benzrf: I have the same feelings, but give benefit of doubt when the usage aligns with the definition
duggiefresh has quit [Remote host closed the connection]
<RubyPanther> >> 0.096 * 2
<eval-in__> RubyPanther => 0.192 (https://eval.in/154357)
<benzrf> slash_nick: >_<
bradhe has quit [Remote host closed the connection]
kevinykchan has quit [Quit: Computer has gone to sleep.]
<apeiros> RubyPanther: CPU time matters more there than real
lethe has joined #ruby
happytux has quit [Ping timeout: 240 seconds]
aiguu__ has quit [Quit: WeeChat 0.4.3]
<apeiros> that's what I get
Hanmac1 has joined #ruby
<RubyPanther> 0.085 vs 0.1169
jackneill has quit [Read error: Connection reset by peer]
postmodern has joined #ruby
<eam> apeiros: of course, that should be also execing a shell -- unless you're hitting that weird codepath in ruby exec where it optimizes the shell out and parses the args on its own
<eam> so it may be running 3 processes
<RubyPanther> The only reason I bought the A6 instead of the A4 was the extra CPU cache
kpshek has quit []
wallerdev has joined #ruby
<eam> apeiros: and it looks like ruby does optimize away the shell and tokenize on its own
<eam> hate that behavior
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hanmac has quit [Ping timeout: 252 seconds]
<eam> time ruby -e 'exec "ruby -e 1 #*"'
<eam> get to see the sh -c cost :)
<eam> I think exec *%w{ruby -e 1} is the way to force non-shell
<apeiros> I get the same timings with ruby -e 'exec "ruby", "-e", "1"'
<apeiros> which is supposed to bypass the shell
lethe has quit [Ping timeout: 240 seconds]
<eam> that's because ruby runs a heuristic on single-string args and does its own in-process tokenization if it thinks it can
<eam> to save the extra execve cost we're talking about :)
dwayhs_ has quit [Quit: Computer has gone to sleep.]
<eam> adding a #* to the end forces ruby to run a shell
nanoyak has quit [Read error: Connection reset by peer]
troulouliou_dev has joined #ruby
treehug88 has quit []
fission6 has quit [Quit: fission6]
nanoyak has joined #ruby
freerobby has quit [Quit: Leaving.]
<eam> there are some unfortunate bugs surrounding this behavior, when ruby mis-predicts the behavior of the local system's /bin/sh
<apeiros> benzrf: ok. which other words would you suggest instead of retarded?
<RubyPanther> "You can force shell invocation by adding “;” to the string " is from the docs
kpshek has joined #ruby
<eam> RubyPanther: sure, that works too
<eam> any metacharacter will do
<eam> personally I always avoid the exec builtin and use one that explicitly takes Array
<eam> and am explicit with an sh -c prepend if I want it
dwayhs__ has joined #ruby
<RubyPanther> Ruby doesn't "mispredict" the behavior of /bin/sh, /bin/sh is expected to have normal behavior and on systems where that isn't reliably true you can set an env var to set your shell
<eam> hey man, ease up
<apeiros> eam: he's arguing for arguings sake.
SegFaultAX has quit [Excess Flood]
Es0teric has joined #ruby
<apeiros> it also doesn't matter whether you prove him wrong
<RubyPanther> It is typical, most of the stdlib passes off to whatever C libs you built with, it doesn't try to do a bunch of magic
<eam> gotta love the internet
p8952 has quit [Ping timeout: 255 seconds]
<benzrf> apeiros: in what context?
<eam> RubyPanther: sure, the thing is this isn't in parity with libc -- this is just something ruby does
KAO has quit [Ping timeout: 240 seconds]
<eam> it's more or less strictly copied from perl's exec :)
<apeiros> benzrf: in the one where I used it for starters
saltsa has joined #ruby
SegFaultAX has joined #ruby
<RubyPanther> Well, you can just insult me and assume that doing so makes you superior, or you can consider perhaps knowing the difference between a bug and design decision that Matz made might help you more accurately predict and understand what Ruby will do in these situations
<eam> RubyPanther: no insults dude. Let's be pals
<eam> I just like chatting about goofy technology stuff
<benzrf> i dunno
<wallerdev> wow calm down we're all rubyists here
<benzrf> dumb? waste of time? pointless?
<apeiros> wallerdev: don't you dare insulting me like that!!!
<agent_white> eam: Never knew that "#*" Ruby trick. That's fancy :D
<slash_nick> apeiros: if you meant they way they did it was stupid, "stupid"... if you meant they way they did it was slow, the word was correct but can be offensive
<wallerdev> lol
<RubyPanther> benzrf does both, he insults and pays attention, too
<benzrf> RubyPanther: o=
<RubyPanther> but he's a kid, he can multitask
alexju has quit [Remote host closed the connection]
<benzrf> i suck at both multitasking and monotasking
pushpak has quit [Quit: Linkinus - http://linkinus.com]
cliff_ has joined #ruby
mjs2600 has quit [Remote host closed the connection]
<slash_nick> what's that leave? antitasking?
<apeiros> slash_nick: I intended it synonymous to stupid. if retarded is offensive, but stupid is not, I'll use stupid in the future.
<RubyPanther> "Student has trouble staying on-task"
mengu has quit []
jprovazn has quit [Quit: Odcházím]
<apeiros> benzrf: I suggest zerotasking
jottr_ has joined #ruby
<slash_nick> apeiros is a stand-up guy
* apeiros zerotasks all the time. main reason I don't get shit done :(
<RubyPanther> "stupid" is the neutral engineering term for not having built-in logic
<apeiros> I thought "primitive" was that term.
<RubyPanther> like in KISS, it isn't telling the stupid guy to keep it simple, it is saying not to build in logic
<benzrf> apeiros: some would say that stupid is also offensive
Krajsnick has quit [Quit: Leaving...]
<benzrf> but i feel like that's overkill
<slash_nick> RubyPanther: arguing stupid is a reserved word? lol
<apeiros> benzrf: some people are offended no matter what.
* benzrf shrugs
<apeiros> but I'm not speaking english natively. so if something clearly offends a group of people if misapplied, I'll try to not misapply it.
<RubyPanther> slash_nick: No, I'm saying stupid is a legit engineering word for "lacking intelligence," whereas "retarded" is a word that invented as a medical term but has been widely regarded as a pejorative for decades
mojo619 has quit [Read error: Connection reset by peer]
<agent_white> I just took one of those "what kinda employee are you" tests. Actually got me spot on. "expresses his ideas in a 'take it or leave it' manner.(and if you leave it, he will likely pursue it anyway."
<RubyPanther> "stupid" is not offensive until you use it as a pejorative, but "retarded" starts out offensive
<slash_nick> i follow
kpshek has quit []
sambao21 has joined #ruby
<axilla> https://gist.github.com/travisdmathis/3b35323fba458219a022 --- can i call parameters that I passed to a resque worker like this?
dpswireless has joined #ruby
cliff_ has quit [Ping timeout: 265 seconds]
<slash_nick> axilla: is "api_key" defined?
<axilla> yea
mojo619 has joined #ruby
<axilla> api_key and list_id are defined
kyb3r_ has joined #ruby
ktosiek has quit [Read error: Connection reset by peer]
<slash_nick> axilla: ok.. i don't think i understand the question though
timonv has quit [Remote host closed the connection]
Ankhers has quit [Remote host closed the connection]
<axilla> i have a resque job that's being initiated and I want to pass data as a worker parameter like so Resque.enqueue_in(15.seconds, IRJob::Delete, self.master_user.email)
<axilla> so in my worker file which i pasted above in the gist
saarinen has quit [Quit: saarinen]
<axilla> can i access the datastored in the email parameter like i did? or do I access it another way?
<davidcelis> What's it called when you put an `if` or `unless` statement at the end of a line?
<davidcelis> I always forget
<centrx> a didgeridoo
malia has left #ruby [#ruby]
<davidcelis> No that is an instrument used primarily by aborigines
<RubyPanther> davidcelis: postfix conditional
<centrx> one-line conditional?
<centrx> postfix is good
<slash_nick> "postfix" is a new word to me... inline if?
s2013_ has quit [Ping timeout: 240 seconds]
bradhe has joined #ruby
<centrx> inline is good
<slash_nick> postfix is right/good/fine too, I just hadn't heard it before
Rhainur has quit [Quit: Leaving]
<centrx> slash_nick, Look up Reverse Polish Notation
simoz1113 has joined #ruby
p8952 has joined #ruby
Azure has quit [Ping timeout: 252 seconds]
<slash_nick> centrx: hadn't heard that phrase either... although i did use some of the HP calculators that use RPN
spider-mario has quit [Read error: Connection reset by peer]
GlenK has quit [Quit: Konversation terminated!]
Zenigor has quit [Remote host closed the connection]
b1205 has joined #ruby
keeguon has joined #ruby
phansch has quit [Quit: WeeChat 0.4.3]
<shvelo> Anyone know both music theory and Ruby?
Xeago has joined #ruby
<dideler|work> when adding a gem to your gemfile that's a cli tool, it's safe to do `require: false` right?
nanoyak has quit [Read error: Connection reset by peer]
itamaryu has joined #ruby
<itamaryu> Hi guys, I need to define a range, the first field will be 0-100, 101-200 and so on until 500+. what do you think will be the best way to implement it?
nanoyak has joined #ruby
<centrx> itamaryu, More info?
datafirm_ has quit [Quit: Computer has gone to sleep.]
<itamaryu> I'm creating a form where users can pick their total budget
datafirm_ has joined #ruby
<apeiros> >> Array.new(5) { |i| (i*100)..((i+1)*100) }
<eval-in__> apeiros => [0..100, 100..200, 200..300, 300..400, 400..500] (https://eval.in/154375)
<itamaryu> I want to let them select between $0-100,$101-200 ... in a selectbox
<apeiros> well, first starting at 0 instead of 1 makes it a bit more difficult
<davidcelis> shvelo: Hi.
<itamaryu> my question is what's the best way to build the model and prepare the db for it, I thought of using Enumerize for that
<apeiros> >> [0,100,200,300,400,500,Float::INFINITY].each_cons(2).map { |a,b| a..b }
<eval-in__> apeiros => [0..100, 100..200, 200..300, 300..400, 400..500, 500..Infinity] (https://eval.in/154376)
<apeiros> ah bleh
<apeiros> still that off-by-one :)
saarinen has joined #ruby
Xeago has quit [Ping timeout: 252 seconds]
<itamaryu> I think it's more Rails question and not Ruby, can someone please send me an invite to #rails or #rubyonrails?
<pontiki> you just have to be identified to nickserv to join #rubyonrails
datafirm_ has quit [Ping timeout: 264 seconds]
thinkclay has quit []
Lucky_ has joined #ruby
<davidcelis> shvelo: What is "divisions"? Number of measures?
Bira has quit [Remote host closed the connection]
Sawbones has quit []
<davidcelis> i guess probably not since the MusicXML doc apparently has a "measures" element
ryanleesipes has quit [Remote host closed the connection]
<shvelo> I think I should remove it entirely?
sambao21 has quit [Quit: Computer has gone to sleep.]
<itamaryu> thanks @pontiki, how can identify myself to the nickserv?
<shvelo> /msg nickserv identify <password>
<pontiki> itamaryu: try /msg nickserv help
bjeanes has quit [Ping timeout: 252 seconds]
andrewcarter has quit [Ping timeout: 240 seconds]
<pontiki> you have to register your nick, then you identify with that nick when you connecdt
andrewcarter has joined #ruby
<davidcelis> /msg nickserv identify hunter2
bjeanes has joined #ruby
jeffreybaird has quit [Ping timeout: 245 seconds]
hellome has joined #ruby
garndt has quit [Quit: Connection closed for inactivity]
rizzatti has quit [Quit: Linkinus - http://linkinus.com]
jeffreybaird has joined #ruby
<davidcelis> shvelo: Not too familiar with MusicXML unfortunately. maybe this will help? http://www.musicxml.com/tutorial/the-midi-compatible-part/duration/
yfeldblum has joined #ruby
<xybre> So there's an error caused in the depths of this legacy app that just says " undefined method `preference' for #<Class:0x007ff6a7dd5798>
<davidcelis> shvelo: You'd need to take a section's tempo, along with the entire section's duration, and do division. But tempo in a song can change. Note lengths in time are not going to stay constant.
sinkensabe has joined #ruby
ryanleesipes has joined #ruby
SHyx0rmZ has quit [Ping timeout: 240 seconds]
<xybre> I've never tried to pull an object out of ObjectSpace by its address, but I'm considering it.
<centrx> xybre, I bet you are calling self.class in a class method!
sambao21 has joined #ruby
<davidcelis> xybre: We do it in the New Relic Ruby agent
<davidcelis> What could go wrong?
<xybre> centrx: Nah, its not my code, I'm pretty sure it has something to do with Spree and its "magic".
<xybre> davidcelis: that's comforting. I'm not planning to do anything in production, jsut thought I might be able to shortcut the debug process if I could get the internal state of the mystery class.
testcore has quit [Ping timeout: 272 seconds]
frobrob has joined #ruby
<apeiros> >> Class.new
<eval-in__> apeiros => #<Class:0x4227657c> (https://eval.in/154388)
<apeiros> xybre: ^
Vaporware has quit [Quit: Page closed]
<shvelo> davidcelis, I don't understand it :(
<apeiros> anonymous classes have that inspect signature
<xybre> Right, I know that.
smathieu has quit [Remote host closed the connection]
<xybre> I'm figuring the library is generating the class on the fly.
itamaryu has left #ruby [#ruby]
<apeiros> probably
smathieu has joined #ruby
<xybre> People often do that with Modules, haven't seen it come up too much with classes.
bklane has quit [Read error: Connection reset by peer]
smathieu_ has joined #ruby
<apeiros> I think I've far more anonymous classes in my code than modules.
<davidcelis> yeah i dont see anonymous modules too often
duggiefresh has joined #ruby
bklane has joined #ruby
<apeiros> I see lots of them. but that's because rails
<xybre> Interesting. Different sample set I suppose.
baweaver has quit [Read error: Connection reset by peer]
baweaver has joined #ruby
<apeiros> (note: see = foreign code)
banister has joined #ruby
sinkensabe has quit [Remote host closed the connection]
Squarepy has quit [Quit: Leaving]
martisj has quit [Ping timeout: 265 seconds]
<xybre> requiring spree_core "fixes" the problem. Spree is monkey patching Rails to hell and back.
sinkensabe has joined #ruby
Asher has joined #ruby
smathieu has quit [Ping timeout: 240 seconds]
martisj has joined #ruby
<apeiros> so the monkey patcher gets monkey patched :D
troulouliou_dev has quit [Quit: Leaving]
<xybre> Truths!
<davidcelis> justice
<xybre> Well, retribution. Justice would mean we wouldn't have to deal with it anymore.
duggiefresh has quit [Ping timeout: 252 seconds]
upsell5 has joined #ruby
yubrew has quit [Remote host closed the connection]
sinkensa_ has joined #ruby
bahar has quit [Quit: ZNC - http://znc.in]
benlieb has quit [Quit: benlieb]
akonny has quit [Quit: akonny]
agent_white has quit [Read error: Connection reset by peer]
ldnunes has quit [Quit: Leaving]
agent_white has joined #ruby
banister has quit [Read error: Connection reset by peer]
sinkensabe has quit [Ping timeout: 240 seconds]
sinkensa_ has quit [Remote host closed the connection]
banister has joined #ruby
sinkensabe has joined #ruby
moneydouble has joined #ruby
Squarepy has joined #ruby
WishBoy has joined #ruby
mjs2600 has joined #ruby
<lethjakman> so...I'm trying to write a .find method for an API call...but I want it to act like .initialize where I'm inside of an initialized class.
<lethjakman> is there a way to do that?
Martxel has quit [Read error: Connection reset by peer]
<lethjakman> self.my_name which is a attr_accessor doesn't exist.
<benzrf> lethjakman: huh?
<lethjakman> I'll write it up, one sec.
smathieu_ has quit [Remote host closed the connection]
klaut has quit [Remote host closed the connection]
smathieu has joined #ruby
sinkensabe has quit [Ping timeout: 276 seconds]
jgx has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<slash_nick> lethjakman: ie - the class method #find, called by YourClass.find() should initialize an instance of YourClass and call the #find instance method ?
smathieu has quit [Remote host closed the connection]
<lethjakman> kinda what I'm getting at.
bamyojo14335 has joined #ruby
smathieu has joined #ruby
shredding has joined #ruby
<xybre> "act like initialize"?
<apeiros> lethjakman: in custom constructors (and your find seems to be one) you usually normalize input and call new with that
Elak has joined #ruby
St_Marx has quit [Quit: Ex-Chat]
<lethjakman> ahhh
<lethjakman> I was kinda thinking about that.
<apeiros> also, 2 spaces for indent :-p
<lethjakman> I suppose that makes sense, thank you.
<lethjakman> :P
<lethjakman> it's what github gave me.
Azure has joined #ruby
sinkensabe has joined #ruby
cina has joined #ruby
<apeiros> lethjakman: https://gist.github.com/apeiros/f221a5fe1c0e2e1cfca1 example (ruby 2.1 syntax)
<apeiros> whoops, missed an @
noob101 has joined #ruby
<apeiros> updated & fixed
<noob101> Hello ruby community, noob101 has a question like always.
<slash_nick> noob101: prove it
<slash_nick> i've yet to see evidence this question truly exists :)
<apeiros> lethjakman: if you consider fetching from the db more to be deserialization (which is IMO a valid view), you can also use Class#allocate. works the same as new, but doesn't call initialize.
<lethjakman> that makes sense, thank you.
<lethjakman> smart! I didn't know about allocate!
testcore has joined #ruby
testcore has quit [Client Quit]
<lethjakman> thing is I have to store this off my server...so I have to do it by API calls. kinda a PITA but the way it has to be.
<apeiros> things like marshal use it
dblessing has quit [Read error: Connection reset by peer]
<lethjakman> thank you!
<lethjakman> :)
nateberkopec has quit [Quit: Leaving...]
dblessing_ has joined #ruby
<noob101> So basically, this is what I want. I want to have a variable, the variable will have a random number but the thing is the variable is in a loop is every time the loop initiates I would like that variable with a random number to change. I also want to print the variable which has a random number then I want to add that variable with a value of a random number to another variable.
Megtastique has quit []
chipotle has joined #ruby
benlieb has joined #ruby
Slavox|AFK is now known as Slavox
iceden has quit [Ping timeout: 240 seconds]
<apeiros> noob101: I suggest you write as much of that code as you can
<apeiros> noob101: then put it up on gist.github.com and ask us when you hit a road block
<noob101> apeiros: I don't know how to write that I am a beginner rubyist. That's why I am here.
<noob101> apeiros: Oh ok, I will. :(
<noob101> I have dinner now but if you guys have any suggestions then please pm me! :)
<noob101> Thank you for the help.
<apeiros> noob101: you won't learn if you don't try it yourself
frobrob has quit [Ping timeout: 252 seconds]
<slash_nick> noob101: start with a loop...
<slash_nick> here's some examples: http://www.tutorialspoint.com/ruby/ruby_loops.htm
saarinen has quit [Quit: saarinen]
roolo has joined #ruby
failshel_ has joined #ruby
NukePuppy has quit [Ping timeout: 255 seconds]
Zenigor has joined #ruby
Zenigor has quit [Remote host closed the connection]
mojo619 has quit [Quit: mojo619]
Zenigor has joined #ruby
axl_ has joined #ruby
Tricon has joined #ruby
smathieu has quit [Remote host closed the connection]
saarinen has joined #ruby
b1205 has quit [Ping timeout: 265 seconds]
smathieu has joined #ruby
axl_ has quit [Client Quit]
Megtastique has joined #ruby
chrisja_ has joined #ruby
chrisja_ has quit [Client Quit]
failshell has quit [Ping timeout: 276 seconds]
NukePuppy has joined #ruby
failshel_ has quit [Ping timeout: 240 seconds]
Zenigor_ has joined #ruby
ghostbox has quit [Remote host closed the connection]
chrisja has quit [Ping timeout: 264 seconds]
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
alex88 has joined #ruby
dfinly has joined #ruby
dfinly has quit [Max SendQ exceeded]
dseitz has quit [Quit: off to be productive...]
Zenigor has quit [Ping timeout: 258 seconds]
anidear has quit [Quit: Leaving]
EvanR has quit [Ping timeout: 240 seconds]
lw has quit [Quit: s]
GC_2 has joined #ruby
mojo619 has joined #ruby
axilla has quit [Ping timeout: 258 seconds]
timgauthier has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NukePuppy has quit [Ping timeout: 240 seconds]
iceden has joined #ruby
moneydouble has quit [Quit: Leaving.]
Arkaniad has joined #ruby
mercwithamouth has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
Prawnzy has quit [Ping timeout: 264 seconds]
Slavox is now known as Slavox|AFK
claymore has quit [Quit: night]
saarinen has quit [Quit: saarinen]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dpswireless has quit [Remote host closed the connection]
Bumptious has joined #ruby
Bumptious has quit [Remote host closed the connection]
centrx has quit [Quit: All this computer hacking is making me thirsty]
Bumptious has joined #ruby
nanoyak has quit [Read error: Connection reset by peer]
nanoyak has joined #ruby
ikaros has quit [Quit: Ex-Chat]
sinkensabe has quit [Remote host closed the connection]
bakflash has quit [Ping timeout: 252 seconds]
nanoyak has quit [Client Quit]
centrx has joined #ruby
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
dwayhs__ has quit [Quit: Computer has gone to sleep.]
St_Marx has joined #ruby
zigomir has quit [Remote host closed the connection]
datafirm_ has joined #ruby
banister has joined #ruby
banister has quit [Client Quit]
nanoyak has joined #ruby
nateberkopec has joined #ruby
mehlah has quit [Quit: Leaving...]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
smathieu has quit [Remote host closed the connection]
banister has joined #ruby
cescalante is now known as ce_afk
bradhe has quit [Remote host closed the connection]
smathieu has joined #ruby
centrx has quit [Client Quit]
mehlah has joined #ruby
lmickh has joined #ruby
sailias has quit [Quit: Leaving.]
jhulten has quit [Remote host closed the connection]
nanoyak has quit [Client Quit]
b1205 has joined #ruby
bradhe has joined #ruby
SegFaultAX has quit [Excess Flood]
caveat- has joined #ruby
monkegjinni has quit [Remote host closed the connection]
datafirm_ has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
caveat- has quit [Client Quit]
smathieu has quit [Remote host closed the connection]
SegFaultAX has joined #ruby
smathieu has joined #ruby
Adawerk__ has joined #ruby
mjs2600 has quit [Remote host closed the connection]
mven_ has quit [Read error: No route to host]
ryanleesipes has quit [Quit: Leaving]
caveat- has joined #ruby
pragmatism is now known as pragmatism_away
b1205 has quit [Ping timeout: 240 seconds]
nowthatsamatt has quit [Quit: nowthatsamatt]
Royalb15 has joined #ruby
b1205 has joined #ruby
Lightsword has joined #ruby
VTLob has quit [Quit: VTLob]
Eiam has joined #ruby
andrewjanssen has joined #ruby
Zenigor has joined #ruby
saarinen has joined #ruby
Slavox|AFK is now known as Slavox
jhulten has joined #ruby
Zenigor_ has quit [Read error: Connection reset by peer]
zB0hs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zenigor has quit [Remote host closed the connection]
<Lightsword> I'm trying to poll a JSON RPC API on thousands of devices with eventmachine at once but I'm having trouble with the callback, I'm using em-synchrony TCPSocket.
agjacome has quit [Ping timeout: 240 seconds]
EagleDelta has quit []
<Lightsword> I can poll one device but I'm not sure how to do multiple
kirun has quit [Quit: Client exiting]
thesheff17 has quit [Ping timeout: 252 seconds]
GC_2 has quit [Ping timeout: 264 seconds]
testcore has joined #ruby
noob101 has quit [Ping timeout: 240 seconds]
bklane has quit [Quit: Leaving...]
axilla has joined #ruby
benlieb_ has joined #ruby
<kenichi> is there already a thing that finds slices inside arrays?
keeguon has quit [Quit: keeguon]
Bumptious has quit [Remote host closed the connection]
benlieb has quit [Ping timeout: 264 seconds]
benlieb_ is now known as benlieb
EvanR has joined #ruby
<wallerdev> kenichi: ary[1..5] ?
axilla has quit [Ping timeout: 255 seconds]
EvanR is now known as Guest12241
rayners has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ankov has joined #ruby
bradhe has quit [Remote host closed the connection]
<kenichi> wallerdev: well, yes, that gives me a slice of that ary...
Zenigor has joined #ruby
<kenichi> wallerdev: but i want to know if [1,2,3,4,5] has [2,3,4] in it
caveat- has quit [Ping timeout: 260 seconds]
<apeiros> kenichi: no, nothing built-in there.
<kenichi> i've added Array#slice_exists?(ary) with `each_index.select {|i| at(i) == ary[0]}.any? {|i| self[i,ary.length] == ary}`
<wallerdev> you could use each_cons and check each slice of 3
<kenichi> apeiros: ok thanks for the check
<wallerdev> but itd be kinda slow
<apeiros> kenichi: I'd modify that slightly
acrussell has quit [Quit: Leaving.]
<kenichi> apeiros: pls do always interested
<apeiros> def slice_exists?(slice); start = slice.first; len = slice.size; each_index do |i| return true if self[i] == start && self[i,len] == slice end; false; end
bradhe has joined #ruby
<apeiros> err, I actually wanted each_with_index
<apeiros> so no self[i] is needed
caveat- has joined #ruby
SCommette has quit [Quit: SCommette]
<apeiros> you could also change it up and use (size-len+1).times do |i| …
noob101 has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.3]
Zenigor has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
<kenichi> apeiros: can you tell me a bit about your changes?
dwayhs__ has joined #ruby
<wallerdev> >> [1, 2, 3, 4, 5].each_cons(3).any? { |ary| ary == [1, 2, 3] }
<eval-in__> wallerdev => true (https://eval.in/154452)
<wallerdev> thats how id do it haha
nanoyak has joined #ruby
bradhe has quit [Remote host closed the connection]
<apeiros> kenichi: biggest diff is probably just that mine aborts earlier
jimbauds has quit [Quit: Leaving]
<kenichi> it only calls each_with_index once, and doesn't call select or any? at all
<apeiros> wallerdev: certainly the nicest variant style-wise
<kenichi> any? aborts quick, doesn't it?
<apeiros> kenichi: yes, but your select runs through
<apeiros> and runs on top of an enumerator
pu22l3r has joined #ruby
timonv has joined #ruby
<kenichi> apeiros: ah yes
<apeiros> so if you want nice - wallerdevs IMO wins the price. if you want fast, I'd bet mine is faster. but I didn't test.
bradhe has joined #ruby
<kenichi> fast is prob best in this case :)
<apeiros> each_cons(ary.size) do |cmp| return true if cmp == ary end; false # might be pretty fast too, though
<wallerdev> write a c extension
<wallerdev> lol
<kenichi> wallerdev: bah :)
braincrash has quit [Ping timeout: 255 seconds]
dik_dak has quit [Quit: Leaving]
Royalb15 has quit [Remote host closed the connection]
<kenichi> apeiros: yours checks first element first, then slices and compares if needed, vs. each_cons which slices each time, yeah?
<apeiros> kenichi: yes. but ruby has shared sub-arrays
<apeiros> so it might be quite fast
pu22l3r has quit [Remote host closed the connection]
northfurr has joined #ruby
<apeiros> question is which overhead is higher - method call or array creation
qwyeth has quit [Quit: Leaving]
<apeiros> just bench it :-)
timonv has quit [Ping timeout: 276 seconds]
jobewan has quit [Quit: Leaving]
caveat- has quit [Ping timeout: 260 seconds]
tylerkern has joined #ruby
nobitanobi has joined #ruby
the_f0ster has quit [Ping timeout: 240 seconds]
linojon has quit [Quit: linojon]
kenneth has joined #ruby
Oxddf has quit [Ping timeout: 252 seconds]
smathieu has quit [Ping timeout: 255 seconds]
darmou has joined #ruby
smathieu has joined #ruby
binaryhat has joined #ruby
Bira has joined #ruby
caveat- has joined #ruby
mjs2600 has joined #ruby
dblessing_ has quit [Quit: dblessing_]
toretore has quit [Quit: This computer has gone to sleep]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ValicekB has quit [Ping timeout: 264 seconds]
Bira has quit [Ping timeout: 240 seconds]
mary5030 has quit [Remote host closed the connection]
lw has joined #ruby
<lobstah> Anyone here use/used RubyMine? Is it good?
caveat- has quit [Ping timeout: 260 seconds]
maletor has quit [Read error: Connection reset by peer]
benlieb has quit [Quit: benlieb]
zorak has joined #ruby
mercwithamouth has quit [Ping timeout: 258 seconds]
maletor has joined #ruby
Xaitec has joined #ruby
KAO has joined #ruby
rgiscard` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ValicekB has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
snath has quit [Ping timeout: 240 seconds]
<wallerdev> lobstah: ive heard good things, but ive used other jetbrains products and havent really been impressed
<wallerdev> especially on a mac, java apps are kinda gross to use
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alex88 has quit [Quit: Leaving...]
__class__ has quit [Ping timeout: 258 seconds]
mollitz has joined #ruby
s2013 has joined #ruby
Xaitec has quit [Remote host closed the connection]
Fire-Dragon-DoL has joined #ruby
alpha123 has joined #ruby
<lobstah> thanks wallerdev - was curious - might take a look at it
<wallerdev> i think they have a trial
<wallerdev> so no harm trying it
axilla has joined #ruby
<kenichi> apeiros: yours is fastest, wallerdev's 2nd, mine DFL
<wallerdev> whats the difference in times?
yubrew has joined #ruby
maletor has quit [Ping timeout: 255 seconds]
x1337807x has joined #ruby
Squarepy has quit [Quit: Leaving]
b1205 has quit [Ping timeout: 265 seconds]
shredding has quit [Quit: shredding]
b1205 has joined #ruby
dwayhs__ has quit [Quit: Computer has gone to sleep.]
datafirm_ has joined #ruby
yubrew has quit [Ping timeout: 255 seconds]
mercwithamouth has joined #ruby
<wallerdev> very interesting
Fire-Dragon-DoL has quit [Quit: Leaving.]
axl_ has joined #ruby
lw has quit [Quit: s]
<kenichi> apeiros, wallerdev: thanks to both of you!
upsell5 has quit [Quit: upsell5]
SegFaultAX has quit [Excess Flood]
baweaver has joined #ruby
saarinen has quit [Quit: saarinen]
bamyojo14335 has quit [Quit: bamyojo14335]
axl_ has quit [Client Quit]
<nobitanobi> Is it ok to catch an exception from the caller which has not been raised in the calling method, but inner inside? https://gist.github.com/novito/f45f692e828a3e5a7ff9
<nobitanobi> **By ok I mean if it's a good pattern
dwayhs___ has joined #ruby
gabrlh has joined #ruby
gabrielh has joined #ruby
SegFaultAX has joined #ruby
datafirm_ has quit [Ping timeout: 240 seconds]
jaykilleen has joined #ruby
<wallerdev> yeah thats normal
<nobitanobi> wallerdev: ok. So is not like I need to catch it in the process method and reraise it there.
<wallerdev> no that would be kinda pointless
<wallerdev> unless you want to change what kind of exception it was or something
<nobitanobi> so when documenting I can say that the process method can Raise an exception
<nobitanobi> even though he is not raising, but something inside is raising it.
baweaver has quit [Ping timeout: 240 seconds]
<wallerdev> yup
<nobitanobi> wallerdev: I see. Interesting
Companion has quit [Ping timeout: 264 seconds]
jrhorn424 is now known as zz_jrhorn424
<nobitanobi> I am trying to move from return nil / return false
<nobitanobi> :)
rm_ has joined #ruby
<wallerdev> are you coming from java?
<benzrf> dsfw
<benzrf> lol
blackmesa has quit [Ping timeout: 258 seconds]
<nobitanobi> uh?
<wallerdev> i feel like java would be the kind of language that makes you catch every exception just to reraise them
<nobitanobi> yep, I have done java in the past wallerdev
maletor has joined #ruby
danman has quit [Quit: danman]
Fire-Dragon-DoL has joined #ruby
lw has joined #ruby
s3ri0us has quit [Quit: Leaving...]
roolo has quit [Quit: Leaving...]
arrubin has quit []
Spami has quit [Quit: This computer has gone to sleep]
s2013 has quit [Ping timeout: 240 seconds]
mmoretti has joined #ruby
lw has quit [Client Quit]
mmoretti has quit [Remote host closed the connection]
toastyne_ has quit [Remote host closed the connection]
SCommette has joined #ruby
afhammad has joined #ruby
axilla has quit [Ping timeout: 255 seconds]
chipotle has quit [Quit: cya]
gstamp has joined #ruby
Companion has joined #ruby
andrewlio has quit [Quit: Leaving.]
jhulten has quit [Remote host closed the connection]
aspires has quit []
jhulten has joined #ruby
aspires has joined #ruby
chrisseaton has quit []
bamyojo14335 has joined #ruby
aspires has quit [Client Quit]
Spami has joined #ruby
s2013 has joined #ruby
Megtastique has quit []
chrisseaton has joined #ruby
spyderma_ has quit [Ping timeout: 240 seconds]
sethen has quit [Quit: Leaving...]
Dreamer3 has quit [Quit: Leaving...]
guilund has joined #ruby
zorak has quit [Remote host closed the connection]
toastynerd has joined #ruby
toastynerd has quit [Remote host closed the connection]
thomasxie has joined #ruby
combusean has quit [Ping timeout: 240 seconds]
echevemaster has joined #ruby
axilla has joined #ruby
weaksauce has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
sambao21 has joined #ruby
__class__ has joined #ruby
toastynerd has joined #ruby
aspires has joined #ruby
IceDragon has quit [Ping timeout: 240 seconds]
mercerist has quit [Quit: Computer has gone to sleep.]
predator217 has joined #ruby
IceDragon has joined #ruby
ffranz has quit [Quit: Leaving]
aspires has quit [Client Quit]
toastynerd has quit [Remote host closed the connection]
s2013 has quit [Ping timeout: 240 seconds]
Megtastique has joined #ruby
mikecmpbll has joined #ruby
predator117 has quit [Ping timeout: 240 seconds]
sambao21 has quit [Ping timeout: 240 seconds]
ankov has quit [Read error: Connection reset by peer]
maletor_ has joined #ruby
jottr_ has quit [Ping timeout: 240 seconds]
davedev24 has quit [Read error: Connection reset by peer]
combusean has joined #ruby
davedev24 has joined #ruby
Guest42916 has joined #ruby
parduse is now known as Guest21517
Guest42916 is now known as parduse
voglster has quit [Ping timeout: 252 seconds]
Guest21517 has quit [Ping timeout: 255 seconds]
parduse is now known as Guest95166
upsell5 has joined #ruby
maletor has quit [Ping timeout: 276 seconds]
mikecmpbll has quit [Client Quit]
nateberkopec has quit [Quit: Leaving...]
Deele has quit [Ping timeout: 255 seconds]
<benzrf> my brain is full of lenses
<benzrf> @_@
toastynerd has joined #ruby
SCommette has quit [Quit: SCommette]
toastynerd has quit [Remote host closed the connection]
maletor_ has quit [Read error: Connection reset by peer]
maletor has joined #ruby
Megtastique has quit []
toastynerd has joined #ruby
mercwithamouth has quit [Ping timeout: 276 seconds]
yubrew has joined #ruby
thesheff17 has joined #ruby
t0rc has quit [Quit: WeeChat 0.4.3]
toastynerd has quit [Remote host closed the connection]
datafirm_ has joined #ruby
afhammad has quit []
CorpusCallosum has quit [Read error: Connection reset by peer]
pel_daniel has left #ruby [#ruby]
yubrew has quit [Ping timeout: 240 seconds]
banister has quit [Ping timeout: 240 seconds]
Tricon has quit [Quit: Linkinus - http://linkinus.com]
Bira has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
thomasxie has quit [Remote host closed the connection]
pu22l3r has joined #ruby
lethe has joined #ruby
ericmathison has joined #ruby
nowthatsamatt has joined #ruby
SegFaultAX has quit [Excess Flood]
nowthatsamatt has quit [Client Quit]
SegFaultAX has joined #ruby
Bira has quit [Ping timeout: 255 seconds]
mjs2600 has quit [Remote host closed the connection]
NinoScript has joined #ruby
Megtastique has joined #ruby
lmickh has quit [Remote host closed the connection]
lethe has quit [Ping timeout: 252 seconds]
dwayhs___ has quit [Quit: Computer has gone to sleep.]
aspires has joined #ruby
lethjakman has quit [Ping timeout: 252 seconds]
mehlah has quit [Quit: Leaving...]