<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: 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
<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
<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
<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
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
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.. :/
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.
<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>
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.
<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
<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
<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
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)
<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
<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
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]
<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]
<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
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]
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…]
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 ?
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¶m=weasel¶m=sudo"
<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]
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?
<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
<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 :)
<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.
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
<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?
<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.
<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]
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
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
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
<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.
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 ?
<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
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