havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
skade has quit [Quit: Computer has gone to sleep.]
<blubjr> ?try
<ruboto> Why don't you try it and see for yourself?
<EllisTAA> got it. works
<EllisTAA> have a feeling i should use what jhass said
tildes has quit [Ping timeout: 250 seconds]
cirenyc has joined #ruby
Oog has joined #ruby
rbowlby_ has quit [Ping timeout: 240 seconds]
maloik has quit [Ping timeout: 244 seconds]
rbowlby has joined #ruby
allcentury has joined #ruby
mistermo_ has joined #ruby
gennaro has quit [Remote host closed the connection]
tubuliferous_ has quit [Ping timeout: 265 seconds]
gennaro has joined #ruby
skade has joined #ruby
<EllisTAA> i’m getting this error message that says this file is not a file or a directory …. what the heck? https://gist.github.com/ellismarte/dc4eb18967f85c53b25f#file-errors-txt-L1
<jhass> what's with the // in front?
mistermocha has quit [Ping timeout: 276 seconds]
<EllisTAA> jhass: idk that’s just part of the error message
<jhass> nope
<jhass> it's the real value you pass to File.file?
bMalum has quit [Quit: bMalum]
<EllisTAA> what?
<jhass> or chdir rather
<jhass> whatever is on line 33
<bougyman> yes, folder must have that // on it
<EllisTAA> well i think that just is root …
gennaro has quit [Remote host closed the connection]
[Butch] has quit [Quit: I'm out . . .]
trosborn has quit [Quit: trosborn]
<jhass> so you have "/" in folder
<jhass> then you concatenate "/" and what's in file, "Applications" in this case
<jhass> "/" + "/" + "Applications"
<EllisTAA> yeah for sure
<jhass> &ri File.join
gennaro has joined #ruby
djbkd has joined #ruby
<EllisTAA> are you saying File.file?(File.join(folder, file)) is better than what i have?
Gnut has quit [Ping timeout: 240 seconds]
<jhass> not just there, everywhere where you do + "/" +
<EllisTAA> jhass: ok
<jhass> but you're also reimplementing Dir[] / Dir.glob thee
<jhass> *there
<EllisTAA> jhass: what about the error? how can something be neither a file or a directory?
<jhass> I don't know OSX, I'd make sure it doesn't freak out about the "//" first
<EllisTAA> well it runs for a while before it hits that error
hahuang65 has quit [Ping timeout: 264 seconds]
<EllisTAA> oh shit, adding this ‘ return if all_files_in_this_directory.empty?’ to the file got rid of the //
karapetyan has quit [Remote host closed the connection]
<jhass> well, then it indeed is neither a file nor a directory
<jhass> perhaps a symlink, socket, fifo or whatever
<ljarvis> &ri Find
<ljarvis> but yeah, don't chdir without knowing it's a directory..
axsuul has quit [Ping timeout: 272 seconds]
<mg^> I still like my suggestion of Rake::FileList because you can give it a .exclude
sepp2k has quit [Quit: Leaving.]
<mg^> but of course there's more than one way to do it
rakm has joined #ruby
<ljarvis> I think that and glob are find for collecting stuff, but this doesn't seem to do that (yet?)
<jhass> EllisTAA seems determined to find the most cludgy one for now, let's just let them
<ljarvis> so it seems pointless to grow something
<jhass> at least glob takes a block
<ljarvis> aye
HammyJammy has quit [Quit: Vwums]
frem has quit [Quit: Connection closed for inactivity]
<blubjr> i think they're just learning..
<EllisTAA> blubjr: yep
_stu_ has quit [Quit: _stu_]
<EllisTAA> i need to eventually accecss gzip … is that possible from inside ruby
<ljarvis> yes
jetpackjoe has joined #ruby
<EllisTAA> ljarvis: how?
bkxd has quit [Ping timeout: 244 seconds]
<ljarvis> you said eventually, do you really want to start that now?
<gennaro> 22Avolio-Toly11
jetpackjoe has quit [Max SendQ exceeded]
shortdudey123 has quit [Max SendQ exceeded]
<mg^> this would be a fun one to golf, since there are so many ways to get it done
juddey has quit [Ping timeout: 260 seconds]
shortdudey123 has joined #ruby
aeontech has joined #ruby
gennaro has quit []
<ljarvis> i dont really understand what the goal is, it cant be inferred from the code
gatman has joined #ruby
bkxd has joined #ruby
<EllisTAA> ljarvis: i’m just doing it for fun and to learn how to work with files
<ljarvis> EllisTAA: yep sure I get that, but I'm saying you should get past the current hurdle before moving on to the mode advanced stuff. I think it would be helpful
<EllisTAA> ljarvis: for sure
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mg^> system('find /dir -mtime +60 -exec gzip {} \;') but that's cheating
<mg^> actually need a -type f in there
solocshaw has joined #ruby
last_staff has quit [Quit: last_staff]
<EllisTAA> cool this allows me to traverse through the entire file system https://gist.github.com/ellismarte/dc4eb18967f85c53b25f
<EllisTAA> oh nvm another error
baweaver has quit [Read error: Connection reset by peer]
baweaver has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<ljarvis> I would recommend against using chdir
<ljarvis> there's no reason to do it
Azure|dc has quit [Quit: Oops.]
<EllisTAA> ljarvis: hmm ok
<havenwood> EllisTAA: You just want the filenames or the path and filename?
gustav_ has joined #ruby
<EllisTAA> havenwood: i’d want the path i guess so i can go into the directory
Spami has quit [Quit: This computer has gone to sleep]
atomical has joined #ruby
<havenwood> EllisTAA: Try: require 'find'; Find.find('/') { |path| puts path }
* ljarvis points above
<ljarvis> but yeah you are just implementing Find.find
<ljarvis> which is fine if you want to learn obviously
htmldrum has joined #ruby
gusrub has joined #ruby
allcentury has quit [Ping timeout: 276 seconds]
<EllisTAA> if i dont change directories how do i grab everything in the folder?
stannard has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
kirun has quit [Quit: Client exiting]
voodo has joined #ruby
malconis has joined #ruby
gustav_ has quit [Ping timeout: 240 seconds]
htmldrum has quit [Ping timeout: 265 seconds]
stannard has quit [Ping timeout: 255 seconds]
matp has quit [Excess Flood]
benlieb has quit [Quit: benlieb]
bougyman has quit [Excess Flood]
bougyman has joined #ruby
<jhass> EllisTAA: by not ignoring the advice you've been given here. You have been pointed out three superiror options so far
PDI has quit [Ping timeout: 260 seconds]
IrishGringo has joined #ruby
rbowlby has quit [Ping timeout: 250 seconds]
<blubjr> lol what a dick
rbowlby has joined #ruby
<EllisTAA> blubjr: lol
voodo has quit [Ping timeout: 272 seconds]
matp has joined #ruby
stannard has joined #ruby
<ljarvis> blubjr: language like that isn't tolerated here, take that as your last warning
angiebadillo has joined #ruby
<blubjr> sorry
gusrub has quit [Remote host closed the connection]
blackmesa has joined #ruby
stannard has quit [Ping timeout: 250 seconds]
err_ok has joined #ruby
eminencehc has joined #ruby
braderhart has joined #ruby
Yzguy has quit [Quit: Zzz...]
bkxd has quit [Ping timeout: 250 seconds]
amirpro has joined #ruby
baweaver has quit [Remote host closed the connection]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aphprentice has joined #ruby
cyberfawkes has joined #ruby
wldcordeiro has joined #ruby
eminencehc has quit [Remote host closed the connection]
maloik has joined #ruby
moeabdol has joined #ruby
ss_much has joined #ruby
duncannz has joined #ruby
yoongkang has quit [Remote host closed the connection]
gusrub has joined #ruby
Rollabunna has quit [Read error: Connection reset by peer]
marr has quit [Ping timeout: 265 seconds]
benlieb has joined #ruby
Rollabunna has joined #ruby
moeabdol has quit [Ping timeout: 246 seconds]
maloik has quit [Ping timeout: 260 seconds]
rbowlby_ has joined #ruby
PDI has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
rbowlby_ has quit [Remote host closed the connection]
dorei has quit []
<arcanez> havenwood: is that essentially the same as 'find . -type f' ?
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Jardayn has quit [Quit: Leaving]
sondr3 has quit [Quit: Sleep]
rbowlby has quit [Ping timeout: 255 seconds]
rubie has joined #ruby
PDI has quit [Ping timeout: 240 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<EllisTAA> woo!! got the traversal part to work https://gist.github.com/ellismarte/dc4eb18967f85c53b25f
PDI has joined #ruby
cirenyc has quit [Quit: Leaving...]
exadeci has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
pandaant has quit [Remote host closed the connection]
mistermo_ has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
rubie has quit [Ping timeout: 265 seconds]
cirenyc has joined #ruby
PDI has quit [Ping timeout: 240 seconds]
skweek has joined #ruby
wldcordeiro has quit [Quit: WeeChat 1.3]
PDI has joined #ruby
wldcordeiro has joined #ruby
dodddok has quit [Quit: Leaving]
k3asd` has quit [Ping timeout: 272 seconds]
Antiarc has quit [Ping timeout: 260 seconds]
chipotle has quit [Quit: cheerio]
<shevy> we build the next skynet live on #ruby!
IrishGringo has quit [Ping timeout: 246 seconds]
<mg^> literally lol
gusrub has quit [Remote host closed the connection]
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diegoviola has joined #ruby
allcentury has joined #ruby
<mg^> meaning that I laughed, co-worker is confused
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
paradisaeidae has quit [Quit: ChatZilla 0.9.92 [Firefox 42.0/20151029151421]]
mistermocha has joined #ruby
<EllisTAA> i’ve been running this program for like 10 mins ….
<EllisTAA> starting to think it’s in a loop …. https://gist.github.com/ellismarte/dc4eb18967f85c53b25f
<EllisTAA> which seems like that wouldn’t be true since it’s like a tree …
maloik has joined #ruby
mistermocha has quit [Ping timeout: 260 seconds]
dlitvak has joined #ruby
rakm has joined #ruby
nateberkopec has joined #ruby
pdoherty has quit [Ping timeout: 265 seconds]
bruce_lee2 has joined #ruby
benlieb has quit [Quit: benlieb]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
willardg has joined #ruby
chipotle has joined #ruby
maloik has quit [Ping timeout: 265 seconds]
<strgbrew> quit
hahuang65 has joined #ruby
strgbrew has quit [Quit: [BX] Reserve your copy of BitchX-1.2.1 for the Amiga today!]
nateberkopec has quit [Quit: Leaving...]
asas has quit [Ping timeout: 272 seconds]
bruce_lee has quit [Ping timeout: 272 seconds]
CloCkWeRX has joined #ruby
scripore has joined #ruby
NeverTired has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
aibot has quit [Remote host closed the connection]
maloik has joined #ruby
aibot has joined #ruby
kobain has quit [Read error: Connection timed out]
kobain has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
htmldrum has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
<havenwood> arcanez: I think `require 'find'; puts Find.find('.').first 20` would be more along the lines of `find -s . | head -n 20`.
maloik has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
CloCkWeRX has quit [Ping timeout: 250 seconds]
arooni has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
NeverDie has quit [Ping timeout: 246 seconds]
<havenwood> diff -s <(find -s . | head -n 20) <(ruby -rfind -e "puts Find.find('.').first 20") #=> Files /dev/fd/x and /dev/fd/y are identical
baweaver has joined #ruby
ur5us has joined #ruby
B1n4r10 has quit [Ping timeout: 272 seconds]
Melpaws has joined #ruby
NeverDie has joined #ruby
yoongkang has joined #ruby
dmcp_ has joined #ruby
pawnbox has joined #ruby
baweaver has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 250 seconds]
NeverDie has quit [Ping timeout: 250 seconds]
<havenwood> (^ BSD userland flags.)
cirenyc has quit [Quit: Leaving...]
gatman has quit []
yoongkang has quit [Ping timeout: 260 seconds]
bruce_lee2 has quit [Changing host]
bruce_lee2 has joined #ruby
EllisTAA has left #ruby [#ruby]
bruce_lee2 is now known as bruce_lee
pawnbox has quit [Ping timeout: 240 seconds]
Oog has quit []
cirenyc has joined #ruby
cirenyc has quit [Client Quit]
axsuul has joined #ruby
eminencehc has joined #ruby
iateadonut has joined #ruby
iateadonut has quit [Client Quit]
axsuul has quit [Ping timeout: 250 seconds]
jackjackdripper has quit [Quit: Leaving.]
jetpackjoe has joined #ruby
jetpackjoe has quit [Client Quit]
pyon has quit [Quit: fix config]
rgtk has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
kp666 has quit [Ping timeout: 250 seconds]
moeabdol has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
hahuang65 has joined #ruby
paradisaeidae has joined #ruby
kp666 has joined #ruby
EllisTAA has joined #ruby
borkdude_ has joined #ruby
tvw has quit [Ping timeout: 252 seconds]
towski_ has quit [Remote host closed the connection]
Sp4rKy_ has joined #ruby
raddazong has joined #ruby
mduca has joined #ruby
Drakevr_ has joined #ruby
saltsa_ has joined #ruby
sgrdrnk has joined #ruby
tethra_ has joined #ruby
bafbomb_ has joined #ruby
badeball_ has joined #ruby
euoia_ has joined #ruby
pygospa has quit [Disconnected by services]
ccooke_ has joined #ruby
connor_g1odwolf has joined #ruby
[ace] has joined #ruby
janno_ has joined #ruby
OmegaA_ has joined #ruby
gregf__ has joined #ruby
L1nuX has quit [Excess Flood]
bubuntu_ has joined #ruby
kiki_lam1 has joined #ruby
moeabdol has quit [Ping timeout: 252 seconds]
uxp_ has joined #ruby
pygospa has joined #ruby
bubuntu has quit [Write error: Broken pipe]
ccooke has quit [Write error: Broken pipe]
sugardrunk has quit [Write error: Broken pipe]
madhatter has quit [Write error: Broken pipe]
mduca_ has quit [Write error: Broken pipe]
OmegaA has quit [Write error: Broken pipe]
janno has quit [Write error: Broken pipe]
dtordable has quit [Write error: Broken pipe]
kiki_lamb has quit [Write error: Broken pipe]
badeball has quit [Write error: Broken pipe]
axisys has quit [Write error: Broken pipe]
Jamo has quit [Write error: Broken pipe]
euoia has quit [Write error: Broken pipe]
borkdude has quit [Write error: Broken pipe]
gregf_ has quit [Write error: Broken pipe]
silverdust has quit [Write error: Broken pipe]
Sp4rKy has quit [Remote host closed the connection]
uxp has quit [Remote host closed the connection]
saltsa has quit [Remote host closed the connection]
connor_goodwolf has quit [Remote host closed the connection]
tethra has quit [Remote host closed the connection]
Drakevr has quit [Remote host closed the connection]
[ace]_ has quit [Remote host closed the connection]
bafbomb has quit [Remote host closed the connection]
dtordabl1 has joined #ruby
axisys_ has joined #ruby
silverdust has joined #ruby
Jamo has joined #ruby
L1nuX has joined #ruby
vagnerlandio has joined #ruby
<vagnerlandio> hi
eminencehc has joined #ruby
<bougyman> hey
silverdust is now known as Guest13472
<blubjr> hi
<vagnerlandio> my first time in irc chat
<vagnerlandio> hehe
Bellthoven has quit []
pkmiec has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
Azure has joined #ruby
<Ox0dea> vagnerlandio: The world is quiet here.
vagnerlandio has quit [Client Quit]
Azure has quit [Client Quit]
pawnbox has quit [Ping timeout: 244 seconds]
Azure has joined #ruby
djbkd has quit [Quit: My people need me...]
Azure has quit [Client Quit]
FunkyJunky has quit [Quit: FunkyJunky]
FunkyJunky has joined #ruby
Azure has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
copious has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
copious has quit [Client Quit]
UniFreak has joined #ruby
IrishGringo has joined #ruby
freerobby has joined #ruby
allcentury has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
Melpaws has quit [Quit: Leaving.]
pyon has joined #ruby
yqt has quit [Ping timeout: 250 seconds]
<EllisTAA> i’m running this program trying to traverse through my file system but it’s taking forever … i decided to add the paths of every searched file to an array and check if that path has been searched, but it’s still taking forever. could someone glance at this file and see if anything is causing it to maybe loop? https://github.com/ellismarte/neatfreak/blob/master/neatfreak.rb#L15
<havenwood> EllisTAA: Are you doing it for fun or to learn or rather to accomplish the task?
hahuang61 has joined #ruby
<Radar> EllisTAA: Dir.glob("**/*") will save a lot of that code.
<EllisTAA> havenwood: fun and to learn
nateberkopec has joined #ruby
<EllisTAA> Radar: what do u mean will save a lot of that code?
<Radar> EllisTAA: Try it and find out.
<EllisTAA> k
<havenwood> Radar: Earlier I was suggesting: require 'find'; Find.find('/') { |path| puts path }
malconis has joined #ruby
<havenwood> EllisTAA: Ah, good! :)
hahuang65 has quit [Ping timeout: 272 seconds]
<Radar> EllisTAA: I hope the difference between Dir.glob("*") and Dir.glob("**/*") are obvious from their output.
<Radar> havenwood: TIL about Find
blackmesa has quit [Ping timeout: 252 seconds]
maloik has joined #ruby
UtkarshRay has quit [Remote host closed the connection]
WillAmes has quit [Remote host closed the connection]
stannard has joined #ruby
WillAmes has joined #ruby
FunkyJunky has quit [Ping timeout: 272 seconds]
<EllisTAA> Radar: so running Dir.glob(“**/*”) grabs all files & all files in all of the folder’s sub folders?
nateberkopec has quit [Ping timeout: 276 seconds]
<Radar> EllisTAA: yup
Ox0dea has quit [Ping timeout: 264 seconds]
dikaio has joined #ruby
<EllisTAA> oh snap
<Radar> mhm
maloik has quit [Ping timeout: 272 seconds]
stannard has quit [Ping timeout: 244 seconds]
fedexo has joined #ruby
RainBowww has joined #ruby
DLSteve has joined #ruby
yoongkang has joined #ruby
hahuang61 has quit [Ping timeout: 272 seconds]
EllisTAA has quit [Quit: EllisTAA]
sunya7a has quit [Quit: leaving]
EllisTAA has joined #ruby
EllisTAA has quit [Client Quit]
RainBowww has quit [Quit: Leaving]
benlovell has joined #ruby
nofxx has quit [Remote host closed the connection]
djbkd has joined #ruby
yoongkang has quit [Ping timeout: 272 seconds]
nofxx has joined #ruby
rubie has joined #ruby
jetpackjoe has joined #ruby
jetpackjoe has quit [Max SendQ exceeded]
connor_g1odwolf has quit [Quit: leaving]
connor_goodwolf has joined #ruby
benlovell has quit [Ping timeout: 252 seconds]
djbkd has quit [Ping timeout: 240 seconds]
speakingcode has quit [Ping timeout: 265 seconds]
juddey has joined #ruby
pdoherty has joined #ruby
speakingcode has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
UniFreak has quit [Ping timeout: 276 seconds]
dfinninger has joined #ruby
dlitvak has quit [Remote host closed the connection]
lemondom has joined #ruby
<lemondom> hi
<lemondom> config.ru - that is a Rake specific config thing, right?
bb010g has joined #ruby
idefine has joined #ruby
<lemondom> anyone? :/
howdoicomputer has quit [Ping timeout: 265 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cmoneylulz has joined #ruby
karapetyan has joined #ruby
<mozzarella> Russian configuration
<mozzarella> set your squat levels
freerobby has quit [Quit: Leaving.]
paradisaeidae has quit [Quit: ChatZilla 0.9.92 [Firefox 42.0/20151029151421]]
TomPeed has joined #ruby
th_masv has quit [Quit: Textual IRC Client: www.textualapp.com]
RobertBirnie has joined #ruby
shinenelson has quit [Quit: Connection closed for inactivity]
TheHodge has quit [Quit: Connection closed for inactivity]
idefine has quit [Remote host closed the connection]
antoniobeyah has joined #ruby
sdwrage has quit [Quit: Leaving]
karapetyan has quit [Ping timeout: 250 seconds]
<lemondom> lol
arescorpio has joined #ruby
<lemondom> I also though that first because of the .ru :D
<lemondom> Hm, on what server tech this thing is running?: https://github.com/geminabox/geminabox
<lemondom> Is that Rack?
idefine has joined #ruby
<lemondom> Sinatra?
ibouvousaime_ has joined #ruby
<lemondom> ah, sinatra
<lemondom> ok
UniFreak has joined #ruby
_stu_ has joined #ruby
zfez has joined #ruby
saddad has joined #ruby
<lemondom> hmm, how can I configure Sinatra::Base instance to listen to a specific host/ip address? :/
cyberfawkes has left #ruby [#ruby]
IrishGringo has quit [Ping timeout: 272 seconds]
baweaver has joined #ruby
blue_deref has quit [Quit: bbn]
dmcp_ has quit [Quit: Disconnecting...]
dmcp_ has joined #ruby
zfez has left #ruby [#ruby]
dmcp_ has quit [Read error: Connection reset by peer]
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Ping timeout: 240 seconds]
idefine has quit [Remote host closed the connection]
juddey has quit [Ping timeout: 240 seconds]
DLSteve has joined #ruby
<lemondom> anyone here with experience in sinatra?
PDI has quit [Ping timeout: 265 seconds]
pawnbox has joined #ruby
CodingWolf has quit [Ping timeout: 265 seconds]
dmcp_ has joined #ruby
dmcp_ has quit [Remote host closed the connection]
dfinninger has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 260 seconds]
ismaelga has joined #ruby
zfez_ has joined #ruby
DrShoggoth has quit [Read error: Connection reset by peer]
RazorX has quit [Max SendQ exceeded]
RazorX has joined #ruby
Antiarc has joined #ruby
eminencehc has quit [Remote host closed the connection]
Rickmasta has joined #ruby
eminencehc has joined #ruby
yfeldblum has quit [Remote host closed the connection]
atomical has quit [Max SendQ exceeded]
dfinninger has joined #ruby
atomical has joined #ruby
Antiarc has quit [Remote host closed the connection]
Antiarc has joined #ruby
Antiarc has quit [Remote host closed the connection]
roshanavand has joined #ruby
saddad has quit [Ping timeout: 272 seconds]
Antiarc has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
houhoulis has joined #ruby
yes`r has joined #ruby
lemondom_ has joined #ruby
lemondom has quit [Read error: Connection reset by peer]
willardg has quit [Quit: Textual IRC Client: www.textualapp.com]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
moeabdol has joined #ruby
maikowblue has quit [Quit: .]
diegoaguilar has joined #ruby
Antiarc has quit [Remote host closed the connection]
braincras has quit [Quit: bye bye]
zfez_ has quit [Quit: Leaving]
howdoicomputer has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
arescorpio has quit [Ping timeout: 276 seconds]
cmoneylulz has quit []
quazimodo has joined #ruby
nathan1 has joined #ruby
_stu_ has quit [Quit: _stu_]
Antiarc has joined #ruby
eminencehc has quit [Remote host closed the connection]
Antiarc has quit [Remote host closed the connection]
braincrash has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
Mia has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
pawnbox has joined #ruby
ismaelga has quit [Remote host closed the connection]
davedev2_ has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
atomical has quit [Max SendQ exceeded]
davedev24 has quit [Ping timeout: 246 seconds]
nathan1 has quit [Quit: WeeChat 1.0.1]
djbkd has joined #ruby
solocshaw has quit [Ping timeout: 246 seconds]
atomical has joined #ruby
quazimodo has quit [Ping timeout: 250 seconds]
nathan__ has joined #ruby
nathan__ has quit [Client Quit]
ibouvousaime_ has quit [Ping timeout: 250 seconds]
djbkd has quit [Ping timeout: 260 seconds]
davedev2_ has quit [Ping timeout: 240 seconds]
davedev24 has joined #ruby
B1n4r10 has joined #ruby
atomical has quit [Max SendQ exceeded]
benlieb has joined #ruby
saddad has joined #ruby
baweaver has joined #ruby
juddey has joined #ruby
B1n4r10 has quit [Client Quit]
antoniobeyah has quit [Quit: antoniobeyah]
Oog has joined #ruby
psy_ has quit [Read error: Connection reset by peer]
shinnya has quit [Ping timeout: 264 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
baweaver has quit [Ping timeout: 246 seconds]
weemsledeux has joined #ruby
UniFreak has quit [Ping timeout: 244 seconds]
justinweiss has quit [Quit: Connection closed for inactivity]
saddad has quit [Ping timeout: 246 seconds]
pdoherty has quit [Remote host closed the connection]
Antiarc has joined #ruby
kp666 has quit [Ping timeout: 240 seconds]
iateadonut has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
wldcordeiro has quit [Ping timeout: 264 seconds]
Antiarc has quit [Remote host closed the connection]
Oog has quit []
stannard has joined #ruby
RobertBirnie has joined #ruby
Antiarc has joined #ruby
benlovell has joined #ruby
UniFreak has joined #ruby
Antiarc has quit [Remote host closed the connection]
stannard has quit [Ping timeout: 250 seconds]
kp666 has joined #ruby
psmolen has left #ruby [#ruby]
baweaver has joined #ruby
benlovell has quit [Ping timeout: 255 seconds]
diegoaguilar has quit [Remote host closed the connection]
pawnbox has joined #ruby
gix has quit [Ping timeout: 240 seconds]
araujo_ has joined #ruby
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
poguez_ has quit [Quit: Connection closed for inactivity]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
araujo has quit [Ping timeout: 244 seconds]
benlieb has quit [Quit: benlieb]
gix has joined #ruby
pawnbox has quit [Ping timeout: 272 seconds]
crystalmaiden has joined #ruby
benlieb has joined #ruby
s2013 has joined #ruby
kp666 has quit [Ping timeout: 240 seconds]
tmtwd_ has joined #ruby
_blizzy_ has quit [Quit: Leaving]
davedev2_ has joined #ruby
lkba_ has quit [Ping timeout: 250 seconds]
tmtwd has quit [Read error: Connection reset by peer]
axl_ has quit [Ping timeout: 265 seconds]
axl_ has joined #ruby
hinbody has quit [Ping timeout: 265 seconds]
davedev24 has quit [Ping timeout: 240 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hinbody has joined #ruby
tmtwd_ has quit [Remote host closed the connection]
atomical has joined #ruby
meltdown has joined #ruby
quazimodo has joined #ruby
howdoicomputer has quit [Ping timeout: 255 seconds]
atomical has quit [Max SendQ exceeded]
dealpete has joined #ruby
unclouded has quit [Read error: No route to host]
makenoise has joined #ruby
IrishGringo has joined #ruby
tmtwd has joined #ruby
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has quit [Remote host closed the connection]
Antiarc has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
willardg has joined #ruby
ohaibbq has joined #ruby
Bellthoven has joined #ruby
atomical has joined #ruby
yfeldblum has joined #ruby
howdoicomputer has joined #ruby
benlieb_ has joined #ruby
benlieb has quit [Read error: Connection reset by peer]
benlieb_ is now known as benlieb
Bellthoven has quit [Client Quit]
dopie has joined #ruby
sarkis has quit [Ping timeout: 252 seconds]
crystalmaiden has quit [Ping timeout: 272 seconds]
kp666 has joined #ruby
juddey has quit [Ping timeout: 272 seconds]
Rodya_ has joined #ruby
benlovell has joined #ruby
IrishGringo has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
jetpackjoe has joined #ruby
dfinninger has quit [Remote host closed the connection]
makenoise has quit [Remote host closed the connection]
makenoise has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
benlovell has quit [Ping timeout: 260 seconds]
darkf has joined #ruby
blackmesa has joined #ruby
antoniobeyah has joined #ruby
Bellthoven has joined #ruby
darkxploit has joined #ruby
eminencehc has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
<antoniobeyah> lemondom_: never really used sinatra but looking at the source it seems it takes cli args: https://github.com/sinatra/sinatra/blob/52b9a798a71ac3594be44c99f3fa786bbe6c8824/lib/sinatra/main.rb#L16-L17
makenoise has quit [Remote host closed the connection]
Bellthoven has quit []
Bellthoven has joined #ruby
sarkis has joined #ruby
benlieb has quit [Quit: benlieb]
moeabdol has joined #ruby
juddey has joined #ruby
sarkis has quit [Ping timeout: 272 seconds]
yoongkang has joined #ruby
moeabdol has quit [Ping timeout: 272 seconds]
meltdown has quit [Quit: This computer has gone to sleep]
juddey has quit [Ping timeout: 244 seconds]
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dealpete has quit [Ping timeout: 276 seconds]
benlieb has joined #ruby
brainfire has joined #ruby
arup_r has joined #ruby
yoongkang has quit [Ping timeout: 252 seconds]
diegoaguilar has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rubie has joined #ruby
rippa has joined #ruby
meltdown has joined #ruby
shinenelson has joined #ruby
iateadonut has quit [Quit: Leaving.]
cjbottaro has joined #ruby
axsuul has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
diegoaguilar has quit [Remote host closed the connection]
djbkd has joined #ruby
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Coldblackice has quit [Ping timeout: 276 seconds]
CloCkWeRX has joined #ruby
pawnbox has joined #ruby
maloik has joined #ruby
<kiki_lam1> Hey... if I've got an object that has optional features that can be enabled, is there any particular reason why implementing this by having it dynamically prepend modules onto it's eigenclass in response to a method call is a bad idea?
CloCkWeRX has quit [Ping timeout: 244 seconds]
kp666 has quit [Ping timeout: 250 seconds]
maloik has quit [Ping timeout: 250 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
framling has joined #ruby
kp666 has joined #ruby
lxsameer has joined #ruby
fedexo has quit [Read error: Connection reset by peer]
benlieb_ has joined #ruby
benlieb has quit [Read error: Connection reset by peer]
benlieb_ is now known as benlieb
PDI has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
benlieb has quit [Client Quit]
amclain has quit [Quit: Leaving]
lxsameer has quit [Remote host closed the connection]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
maloik has joined #ruby
makenoise has joined #ruby
quazimodo has quit [Ping timeout: 250 seconds]
maloik has quit [Ping timeout: 240 seconds]
araujo__ has joined #ruby
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
araujo_ has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
CloCkWeRX has joined #ruby
beast has quit [Quit: Leaving]
makenoise has quit [Remote host closed the connection]
makenoise has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
axsuul has quit [Ping timeout: 252 seconds]
axsuul has joined #ruby
s00pcan has quit [Remote host closed the connection]
djbkd has quit []
darkxploit has quit [Quit: Leaving]
quazimodo has joined #ruby
terminalrecluse has joined #ruby
sunya7a has joined #ruby
Bellthoven has quit []
yoongkang has joined #ruby
yoongkang has quit [Ping timeout: 240 seconds]
lemur has joined #ruby
ibouvousaime has joined #ruby
Spami has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
tmtwd has quit [Ping timeout: 255 seconds]
<arup_r> What you guys use to validate emails using Regex? I am literally confused after seeing this long thread http://stackoverflow.com/questions/46155/validate-email-address-in-javascript ?
<arup_r> I am looking for a good email validate regex
tmtwd has joined #ruby
lemur has quit [Ping timeout: 272 seconds]
<Coraline> There is no email validation regex
<Coraline> You should send an email to see if it's valid
<Coraline> Trust the user
<eam> well, while that's true, helping people correct obvious typos goes a very long way
pawnbox has joined #ruby
<eam> for example, if your user types in gmal.com you may want to prompt them for a fix right away
<arup_r> Actually you both are true. http://stackoverflow.com/a/815242/2767755
<eam> you can also check to see if the domain has an MX record at all
<arup_r> eam: how to do that ?
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has quit [Quit: Leaving...]
pawnbox has quit [Ping timeout: 255 seconds]
eminencehc has quit [Remote host closed the connection]
tjohnson has joined #ruby
bkxd has joined #ruby
User458764 has joined #ruby
juddey has joined #ruby
dionysus69 has joined #ruby
gambl0re has joined #ruby
lessless has joined #ruby
eminencehc has joined #ruby
kies has joined #ruby
hackeron has quit [Ping timeout: 244 seconds]
pawnbox has joined #ruby
hackeron has joined #ruby
ibouvousaime has quit [Ping timeout: 250 seconds]
VeryBewitching has quit [Quit: Konversation terminated!]
davedev2_ has quit []
dikiaap has joined #ruby
<eam> arup_r: to check for mx? Do a DNS lookup
<eam> for the rest, it's all heuristics and guesswork
pawnbox has quit [Ping timeout: 250 seconds]
axsuul has quit [Read error: Connection reset by peer]
<dikiaap> I have two version ruby in my computer. 1.9 version and 2.2. How can I switch to 2.2 version?
axsuul has joined #ruby
<arup_r> dikiaap: Use Rvm or any version manager
CloCkWeRX has quit [Ping timeout: 264 seconds]
CloCkWeRX has joined #ruby
ss_much has quit [Quit: Connection closed for inactivity]
axsuul has quit [Ping timeout: 260 seconds]
<dikiaap> ok, I done installed rvm and what the command to change it?
makenoise has quit [Remote host closed the connection]
safe has quit [Quit: Leaving]
blackmesa has joined #ruby
moeabdol has joined #ruby
<shevy> rvm --default use 1.9.3 # <-- use proper version there I suppose
<shevy> rvm list default
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
CloCkWeRX has quit [Ping timeout: 272 seconds]
raeoks has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
moeabdol has quit [Ping timeout: 260 seconds]
Coldblackice has joined #ruby
skcin7 has joined #ruby
eminencehc has quit [Remote host closed the connection]
bodgix has joined #ruby
<dikiaap> shevy : yes, but I've installed two versions. and RVM want to download again.
raeoks has quit [Quit: Textual IRC Client: www.textualapp.com]
raeoks has joined #ruby
<shevy> what a silly software
auzty has joined #ruby
<al2o3-cr> arup_r: you can check for mx records using resolv: Resolv::DNS.open { |dns| dns.getresources(domain, Resolv::DNS::Resource::IN::MX) }
<arup_r> ok
myztic has joined #ruby
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
CloCkWeRX has joined #ruby
cwong_on_irc has joined #ruby
skcin7 has quit [Quit: Textual IRC Client: www.textualapp.com]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stannard has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mostlybadfly has quit [Quit: Connection closed for inactivity]
<arup_r> >> p /\A\s*([^@\s]{1,64})@((?:[-\p{L}\d]+\.)+\p{L}{2,})\s*\z/i === "arup@gmail.com"
<ruboto> arup_r # => true ...check link for more (https://eval.in/473188)
<arup_r> working.. but the same in JS not working.. what the heck :)
maloik has joined #ruby
<apeiros> oh, email validation done wrong
<apeiros> recurring topic :)
<arup_r> "arup@gmail.com".match(/\A\s*([^@\s]{1,64})@((?:[-\p{L}\d]+\.)+\p{L}{2,})\s*\z/i) is `null`
<apeiros> no it isn't?
<apeiros> >> "arup@gmail.com".match(/\A\s*([^@\s]{1,64})@((?:[-\p{L}\d]+\.)+\p{L}{2,})\s*\z/i)
<ruboto> apeiros # => #<MatchData "arup@gmail.com" 1:"arup" 2:"gmail.com"> (https://eval.in/473189)
<arup_r> What Regex engine JS use then.. it is saying my email id is not valid as per the regex
<arup_r> apeiros: what do you mean by no it is not.. ?:)
<apeiros> did you say you use JS before?
stannard has quit [Ping timeout: 265 seconds]
<apeiros> JS doesn't have \p afair.
<arup_r> yes, I will use the same regex frontend and backend .. backend is saying email is valid, frontend is saying not valid
<apeiros> yeah, forget that.
<arup_r> o i see
lessless has joined #ruby
Channel6 has joined #ruby
<arup_r> Now I am in trouble then
<apeiros> there's a couple of discrepancies. unless you're careful, using the same won't work.
<apeiros> but again, that regex is wrong for mail validation.
<arup_r> I thought I'll use it in frontend to give user hints, and then do double check in backend
maloik has quit [Ping timeout: 260 seconds]
<apeiros> there are solutions to give user hints in the front-end
<apeiros> trying to remember the name. wanted to use that myself too.
<arup_r> apeiros: some hints/references please
<apeiros> as said: trying to remember.
<arup_r> oh. :)
trosborn has joined #ruby
jetpackjoe has joined #ruby
jetpackjoe has quit [Max SendQ exceeded]
<shevy> arup_r it's way too early for him to remember anything right now!
blueOxigen has quit [Ping timeout: 272 seconds]
<apeiros> ah I think it iwas this: https://github.com/mailcheck/mailcheck
<apeiros> no idea how good it is, though.
Xeago has joined #ruby
howdoicomputer has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
k3asd` has joined #ruby
rubie has joined #ruby
howdoicomputer has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
dionysus69 has quit [Quit: dionysus69]
dionysus69 has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
helpa-bot has joined #ruby
helpa-bot has quit [Remote host closed the connection]
helpa-bot has joined #ruby
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd has quit [Ping timeout: 276 seconds]
helpa-bot has quit [Remote host closed the connection]
helpa-bot has joined #ruby
NeverDie has joined #ruby
helpa-bot has quit [Remote host closed the connection]
helpa-bot has joined #ruby
makenoise has joined #ruby
codecop has joined #ruby
pawnbox_ has joined #ruby
howdoicomputer has quit [Ping timeout: 272 seconds]
helpa has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
trosborn has quit [Quit: trosborn]
helpa-bot has quit [Remote host closed the connection]
helpa has joined #ruby
scripore has joined #ruby
darkf has quit [Read error: Connection reset by peer]
<shevy> hmm ... I suppose there are no simple one-line way to suppress warnings? I know I can modify $VERBOSE but I find this somewhat inelegant
solocshaw has joined #ruby
darkf has joined #ruby
meltdown has quit [Quit: This computer has gone to sleep]
dikiaap has left #ruby ["Bye!"]
makenoise has quit [Remote host closed the connection]
timonv has joined #ruby
aeontech has quit [Ping timeout: 265 seconds]
aeontech has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
hakunin has joined #ruby
Channel6 has quit [Quit: Leaving]
juddey has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
raeoks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
UniFreak has left #ruby [#ruby]
karapetyan has joined #ruby
juddey has joined #ruby
araujo__ has quit [Quit: Leaving]
lessless has quit [Read error: Connection reset by peer]
ur5us has quit [Remote host closed the connection]
lessless has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
asas has joined #ruby
moeabdol has joined #ruby
bMalum has joined #ruby
rubie has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 272 seconds]
sarkis has joined #ruby
TomPeed has joined #ruby
moeabdol has quit [Ping timeout: 272 seconds]
kies has quit [Ping timeout: 272 seconds]
arup_r has quit [Ping timeout: 255 seconds]
maloik has joined #ruby
sarkis has quit [Ping timeout: 260 seconds]
sinkensabe has joined #ruby
pandaant has joined #ruby
sinkensabe has quit [Remote host closed the connection]
nofxx has quit [Remote host closed the connection]
aeontech has quit [Quit: aeontech]
dionysus69 has quit [Quit: dionysus69]
juddey has quit [Ping timeout: 272 seconds]
duncannz has quit [Ping timeout: 255 seconds]
skcin7 has joined #ruby
maloik has quit [Ping timeout: 260 seconds]
tildes has joined #ruby
houhoulis has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
NeverDie has quit [Quit: http://radiux.io/]
karapetyan has joined #ruby
Voker57 has quit [Ping timeout: 260 seconds]
BlackGear has joined #ruby
k3asd` has quit [Ping timeout: 264 seconds]
Voker57 has joined #ruby
k3asd` has joined #ruby
ta has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
CloCkWeRX has quit [Ping timeout: 240 seconds]
Jackneill has joined #ruby
maloik has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ta has joined #ruby
dlitvak has quit [Ping timeout: 260 seconds]
timonv has quit [Ping timeout: 250 seconds]
CloCkWeRX has joined #ruby
blackmesa has joined #ruby
karapetyan has quit [Remote host closed the connection]
rgtk has joined #ruby
maloik has quit [Ping timeout: 250 seconds]
scripore has quit [Quit: This computer has gone to sleep]
blackmesa has quit [Ping timeout: 244 seconds]
maloik has joined #ruby
User458764 has joined #ruby
maloik has quit [Ping timeout: 250 seconds]
<shevy> File.expand_path() will also expand to the full path? I did not know that, thought it would only work on ~
<shevy> oops
<shevy> will also/will always
akem has joined #ruby
SCHAAP137 has joined #ruby
blackmesa has joined #ruby
kp666 has quit [Ping timeout: 244 seconds]
tercenya has quit [Ping timeout: 272 seconds]
yes`r has quit [Ping timeout: 276 seconds]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maloik has joined #ruby
tercenya has joined #ruby
solars has joined #ruby
ohaibbq has quit [Remote host closed the connection]
Rollabunna has quit [Read error: Connection reset by peer]
k3asd` has quit [Ping timeout: 264 seconds]
asas has quit [Ping timeout: 265 seconds]
aryaching has joined #ruby
kp666 has joined #ruby
tildes has quit [Ping timeout: 260 seconds]
gustav_ has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
dlitvak has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
k3asd` has joined #ruby
bubbys has quit [Ping timeout: 244 seconds]
arup_r has joined #ruby
arup_r is now known as Guest16924
bubbys has joined #ruby
gustav_ has quit [Ping timeout: 250 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dlitvak has quit [Ping timeout: 252 seconds]
eminencehc has joined #ruby
TomPeed has joined #ruby
kp666 has quit [Ping timeout: 250 seconds]
eminencehc has quit [Ping timeout: 250 seconds]
Guest16924 is now known as arup_r
jxs_ has joined #ruby
k3asd` has quit [Ping timeout: 276 seconds]
joonty has joined #ruby
spiman has joined #ruby
nso95__ has joined #ruby
moeabdol has joined #ruby
moeabdol has quit [Client Quit]
kp666 has joined #ruby
ruid has joined #ruby
auzty has quit [Quit: Leaving]
k3asd` has joined #ruby
wildlander has joined #ruby
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maloik has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Ping timeout: 272 seconds]
maloik has joined #ruby
quazimodo has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
maloik has quit [Ping timeout: 264 seconds]
dfdfdf has joined #ruby
blackmesa has joined #ruby
aryaching has quit []
kp666 has quit [Ping timeout: 244 seconds]
norc has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
<norc> https://eval.in/473226 -- why is this code failing?
nso95__ has quit [Remote host closed the connection]
<apeiros> norc: precedence
<apeiros> the block is associated with puts, not foo. use {} or parens.
<norc> Ahhh.
<apeiros> also you only need either &block or yield
<norc> apeiros: I know, was just a reminensce from my original code. :)
<apeiros> in this case, just yield will be faster as it doesn't force ruby to convert the block to a proc.
<norc> Yeah
yes`r has joined #ruby
<norc> apeiros: Ah well this is silly. I could have simply looked at the compiled YARV code.
<apeiros> yes, you could have! why didn't you!
* apeiros stares down norc
<norc> :(
<apeiros> ;-)
<norc> 0019 send <callinfo!mid:puts, argc:1, block:block in <compiled>, FCALL>
agit0 has joined #ruby
<norc> But on the bright side, I am getting closer every day. :)
<apeiros> why did I read that last one as fuckall?
<norc> heh
<apeiros> closer to what? world dominance? stay away from that. that's mine!
CloCkWeRX has quit [Ping timeout: 276 seconds]
agit0 has quit [Client Quit]
pandaant has quit [Remote host closed the connection]
<norc> apeiros: A year ago I would have shuddered just reading "AST"
futilegames has joined #ruby
futilegames has quit [Client Quit]
<shevy> what are you doing norc
<apeiros> timezones are terrifying indeed.
agit0 has joined #ruby
<apeiros> alaskan state troopers too
<arup_r> Can you help me to write this heredoc successfully? https://gist.github.com/aruprakshit/6a7361d68a6bbbcab325 the `Array#join` not working rather coming a "..." :p
joonty has quit [Quit: joonty]
tildes has joined #ruby
kp666 has joined #ruby
<apeiros> why on earth do you even use a heredoc there?
<arup_r> seeing the output as "invalid_emails.join(', ') is not valid." not the one I want
<arup_r> save local variables .. :)
Coldblackice has quit [Ping timeout: 250 seconds]
<apeiros> I'm not sure I want to comment that.
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arup_r> comment or commit you meant ?
TomPeed has joined #ruby
<apeiros> I said what I meant
<apeiros> I also meant what I said
DoubleMalt has joined #ruby
dlitvak has joined #ruby
<apeiros> also you may want to take a look at Enumerable#partition
<arup_r> ok. How that partition will help me here ?
<apeiros> it'll save line 3
<apeiros> since you like saving.
nso95__ has joined #ruby
nofxx has joined #ruby
<arup_r> ok. What is wrong with Heredoc .. just asking.?
<arup_r> I mean why did you not like in this usecase ?
<arup_r> I fixed it. want to know why is that a code smell ?
karapetyan has joined #ruby
<apeiros> because it's utterly pointless. there's absolutely no string in your string. only code.
<apeiros> it's like a = "#{some code here}"
<apeiros> why have "#{}" at all there?
dlitvak has quit [Ping timeout: 255 seconds]
<arup_r> ok. convinced
<apeiros> but your code is full with silly stuff tbh. e.g. invalid_emails.size == 0 -> singular. well, no. zero is plural. only 1 is singular. and an empty list of emails results in " is not valid".
nofxx has quit [Ping timeout: 255 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<apeiros> or: EOF as token - EOF means End Of File. your heredoc doesn't really mark the end of file
<arup_r> MSG is a good name
<apeiros> and I sure hope that the test for @ is only a placeholder for an actually useful email validation
<arup_r> yes :)
<shevy> apeiros is having a day :-)
blackmesa has quit [Ping timeout: 260 seconds]
<apeiros> and email.rindex("@").to_i > 0 as a test for "contains an @" - seriously?
<shevy> it's creative!
<apeiros> email =~ /@/, or email.include?("@"). if you want to make sure it's not the first char: email =~ /.@/
<arup_r> yes. which has first letter as `@` is not valid
<apeiros> (and of course, still the same comment about "actually meaningful email validation")
<apeiros> yeah, it's quite arbitrary to allow a billion invalid email addresses, BUT NOT THOSE starting with @.
<arup_r> rindex will tell me the word has @ but not at first prostion with > 0 test
<apeiros> not really.
<apeiros> >> "@@foo".rindex("@")
<ruboto> apeiros # => 1 (https://eval.in/473235)
<apeiros> hahaaaa, fooled!
<apeiros> not sure why I even wrote "foo" there. "@@" alone is valid as per your test.
<arup_r> I'll accept it. :) Then if it is not valid email id, Mail server will not send it
<arup_r> but I will get it from UI
<arup_r> minimal check in UI :D
kp666 has quit [Ping timeout: 276 seconds]
<apeiros> um, yeah. UI checks are never authoritative.
<arup_r> it is user responsibility when subscribing a mailing list .. that is less headache
<arup_r> hm
<apeiros> you can just as well add a checkbox "I swear this email is valid" to your form. same amount of certainty that it's valid.
jxs_ has quit [Remote host closed the connection]
unrar has joined #ruby
<unrar> Hey guys
<apeiros> unrar: hi gal
karapetyan has quit [Remote host closed the connection]
<unrar> Is there a way to sort of store/reference functions in a list and then call each of them?
<arup_r> lol
<apeiros> unrar: see Object#send and Proc
<unrar> sort of like: functions = [:add, :delete]; functions.each do { |f| f }
<apeiros> actually, drop Object#send and instead see Object#public_send. and additionally: Object#method + Method#call
<unrar> Yeah I've been doing some research and found some references to Object#send but I'm not really getting it
<apeiros> &ri Object#public_send @unrar
<apeiros> which which parts do you have troubles?
<unrar> Object#send seems to be used to call methods, what if it's a standalone function?
<apeiros> that doesn't exist
<unrar> oh too bad
<apeiros> I mean: standalone functions don't exist.
<unrar> what object are they methods of then? Object?
<apeiros> ask them.
<apeiros> >> method(:puts).owner
<ruboto> apeiros # => Kernel (https://eval.in/473238)
<apeiros> and you *always* call a method on an object. if you don't have an explicit receiver, the receiver *always* is self.
scripore has joined #ruby
Xeago has joined #ruby
BlackCoyote has joined #ruby
<unrar> I see
<apeiros> i.e., `puts "foo"` is really `self.puts "foo"` (just that that wouldn't work because puts is private)
nso95__ has quit [Remote host closed the connection]
<arup_r> ready and corrected all typos and logical errors.. :) lets commit it
CloCkWeRX has joined #ruby
Xeago has quit [Ping timeout: 240 seconds]
raeoks has joined #ruby
CloCkWeRX has quit [Ping timeout: 246 seconds]
PaulCapestany has quit [Quit: .]
minimalism has quit [Quit: leaving]
sdfgsdfg has quit [Ping timeout: 240 seconds]
nso95__ has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PaulCapestany has joined #ruby
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
The_Phoenix has joined #ruby
maloik has joined #ruby
skade has joined #ruby
chipotle has quit [Quit: cheerio]
TomPeed has joined #ruby
minimalism has joined #ruby
bkxd has joined #ruby
minimalism has quit [Client Quit]
dlitvak has joined #ruby
karapetyan has joined #ruby
CloCkWeRX has joined #ruby
Guest2784 has quit [Ping timeout: 240 seconds]
<norc> shevy: Hacking up a Amazon MWS library.
<norc> unrar: To be exact a method does not belong to an object either
dlitvak has quit [Ping timeout: 272 seconds]
<norc> It always belongs to a class.
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has quit [Remote host closed the connection]
DexterLB has quit [Read error: Connection reset by peer]
yes`r has quit [Ping timeout: 240 seconds]
yeshacker has joined #ruby
lipoqil has joined #ruby
DexterLB has joined #ruby
rgtk has quit [Remote host closed the connection]
maloik has quit [Ping timeout: 244 seconds]
ItSANgo has quit [Quit: Leaving...]
yeshacker has quit [Quit: WeeChat 1.3]
mloy has quit [Quit: Leaving]
maloik has joined #ruby
rgtk has joined #ruby
dfdfdf has quit [Quit: Leaving]
skade has quit [Quit: Computer has gone to sleep.]
ht__ has joined #ruby
nofxx has joined #ruby
ItSANgo has joined #ruby
Olipro_ has joined #ruby
Olipro_ is now known as Guest90705
ht__ has quit [Client Quit]
ht__ has joined #ruby
Voker57 has quit [Remote host closed the connection]
nofxx has quit [Ping timeout: 250 seconds]
akem has quit [Ping timeout: 255 seconds]
kp666 has joined #ruby
Voker57 has joined #ruby
gustav_ has joined #ruby
nso95__ has quit [Remote host closed the connection]
NeverTired has quit [Quit: Connection closed for inactivity]
Mia has joined #ruby
raeoks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shinnya has joined #ruby
spiman has quit [Remote host closed the connection]
fantazo has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
htmldrum has quit [Ping timeout: 260 seconds]
gustav_ has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
scripore has joined #ruby
kvltar has joined #ruby
kvltar has quit [Client Quit]
ruurd has joined #ruby
toretore has joined #ruby
karapetyan has quit [Ping timeout: 255 seconds]
PDI has quit [Ping timeout: 240 seconds]
scripore has quit [Quit: This computer has gone to sleep]
segfalt has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
Guest13472 is now known as silverdust
silverdust has quit [Changing host]
silverdust has joined #ruby
pwned has joined #ruby
User458764 has joined #ruby
<lemondom_> some nice guy, antonio or so - just told me that sinatra takes the host to listen over its cli
segfalt__ has quit [Ping timeout: 276 seconds]
purplexed- has quit [Ping timeout: 255 seconds]
<lemondom_> so it is not possible to set this using config.ru instead?
<lemondom_> What I want: I just want that the app listens on a specific host address...
silverdust is now known as bl4ckdu5t
<lemondom_> bundle exec rackup
<lemondom_> how can I pass a host to listen on?
Rickmasta has joined #ruby
<lemondom_> of course, I would love to use the config.ru instead
<lemondom_> but when the cli is the only way
voker57_ has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
bl4ckdu5t is now known as silverdust
sdothum has joined #ruby
kirun has joined #ruby
dikaio has quit [Quit: ........]
sgambino has joined #ruby
Voker57 has quit []
voker57_ is now known as Voker57
Voker57 has quit [Changing host]
Voker57 has joined #ruby
darkxploit has joined #ruby
scripore has joined #ruby
ruid has quit [Ping timeout: 260 seconds]
maloik has quit [Ping timeout: 276 seconds]
spiman has joined #ruby
maloik has joined #ruby
<pwned> lemondom_: you mean rackup --binding=yourhost ?
<pwned> sorry
<pwned> rackup --host yourhost
codecop has quit [Quit: Išeinu]
ht__ has quit [Quit: Konversation terminated!]
tildes has quit [Ping timeout: 265 seconds]
ht__ has joined #ruby
gguggi has joined #ruby
bubbys has quit [Ping timeout: 250 seconds]
ht__ has quit [Client Quit]
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pupp3tm4st3r has joined #ruby
kp666 has quit [Ping timeout: 255 seconds]
ht__ has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mostlybadfly has joined #ruby
maloik has quit [Ping timeout: 255 seconds]
felltir has joined #ruby
ruid has joined #ruby
yoongkang has joined #ruby
Ox0dea has joined #ruby
ibouvousaime has joined #ruby
<lemondom_> perfect
<lemondom_> pwned: thx
maloik has joined #ruby
<lemondom_> pwned: it works - and one can't set this in config.ru I guess, right?
Pupp3tm4st3r has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
skade has joined #ruby
<unrar> Hey I managed to do the running-functions-in-a-list thingie, feedback? :P https://github.com/unrar/midb/blob/gem/lib/midb/hooks.rb
ruid has quit [Ping timeout: 260 seconds]
ruid has joined #ruby
maloik has quit [Ping timeout: 264 seconds]
maloik has joined #ruby
raeoks has joined #ruby
<pwned> lemondom_: I remember reading something like set :bind in sinatra configuration docs
<lemondom_> pwned: yes, I tried that, nothing worked. the cli is fine for me
ht__ has quit [Quit: Konversation terminated!]
<lemondom_> pwned: but I cannot pass extra config over cli instead using config.ru? some must be set in config.ru
ht__ has joined #ruby
<pwned> lemondom_: perhaps it needs a bit of coding (reading from environment variables or parsing commandline options)
krz has joined #ruby
arup_r has quit [Quit: Leaving]
ruurd has quit [Quit: ZZZzzz…]
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
maloik has quit [Ping timeout: 244 seconds]
<lemondom_> pwned: yes, env variables
ruid has quit [Ping timeout: 264 seconds]
allcentury has joined #ruby
maloik has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
tildes has joined #ruby
zotherstupidguy has joined #ruby
lxsameer has quit [Quit: Leaving]
karapetyan has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
ht__ has quit [Quit: Konversation terminated!]
zenguy_pc has quit [Ping timeout: 260 seconds]
skade has joined #ruby
ht__ has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
maloik has quit [Ping timeout: 272 seconds]
ht__ has quit [Client Quit]
_blizzy_ has joined #ruby
ht__ has joined #ruby
_blizzy_ has quit [Max SendQ exceeded]
houhoulis has joined #ruby
_blizzy_ has joined #ruby
_blizzy_ has quit [Max SendQ exceeded]
_blizzy_ has joined #ruby
_blizzy_ has quit [Max SendQ exceeded]
marcosantoniocar has joined #ruby
_blizzy_ has joined #ruby
voodo has joined #ruby
spiman has quit [Remote host closed the connection]
SenpaiSilver has quit [Quit: Leaving]
SenpaiSilver has joined #ruby
crdpink has joined #ruby
crdpink2 has quit [Ping timeout: 246 seconds]
ruurd has joined #ruby
maloik has joined #ruby
Bellthoven has joined #ruby
futilegames has joined #ruby
ruurd has quit [Client Quit]
sarkis has joined #ruby
gustav_ has joined #ruby
houhoulis has quit [Remote host closed the connection]
freerobby has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
spiman has joined #ruby
sarkis has quit [Ping timeout: 265 seconds]
_blizzy_ has quit [Quit: Leaving]
gustav_ has quit [Ping timeout: 250 seconds]
voodo is now known as voodo|away
zenguy_pc has joined #ruby
ht__ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
houhoulis has joined #ruby
<brainfire> is there something like priority sorting? sort by one attribute first and then by another?
RobertBirnie has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
crazydiamond has quit [Ping timeout: 255 seconds]
<havenwood> brainfire: sort_by { |foo| [foo.bar, foo.baz] }
<apeiros> sort_by { |thingy| [first, second, third] }
akem has joined #ruby
<apeiros> also can use sorting: https://github.com/apeiros/sorting
<apeiros> nice if you want asc/desc and handling of nils.
karapetyan has joined #ruby
<apeiros> or have expensive to calculate properties which aren't first thing to sort by.
arup_r has joined #ruby
futilegames has quit [Quit: futilegames]
AndyBotwin has joined #ruby
<brainfire> does this work with .sort! as well?
voodo|away is now known as voodo
last_staff has joined #ruby
k3asd` has quit [Ping timeout: 250 seconds]
banister has joined #ruby
<apeiros> "this"? sort/sort! works quite a bit differently from sort_by.
benlovell has joined #ruby
nofxx has joined #ruby
<apeiros> and why'd you want to use sort! over sort_by! ?
atmosx has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
<brainfire> just because I'm more familiar with it. I just started using ruby a couple of days ago.
aryaching has joined #ruby
<apeiros> using any of the above described ways with sort/sort! is just you making your own life harder for no reason. learn how sort_by works instead.
BaroMeter has joined #ruby
<brainfire> I'm looking into it right now ;)
<apeiros> (and yes, you can make them work with sort)
ht__ has quit [Quit: Konversation terminated!]
benlovell has quit [Ping timeout: 246 seconds]
nofxx has quit [Ping timeout: 255 seconds]
ht__ has joined #ruby
aryaching has quit []
dorei has joined #ruby
<brainfire> apeiros: I got it :) thanks
Bellthoven has quit []
pyon is now known as nyon
karapetyan has joined #ruby
ht__ has quit [Client Quit]
ht__ has joined #ruby
BaroMeter has quit [Remote host closed the connection]
dlitvak has joined #ruby
ht__ has quit [Client Quit]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tildes has quit [Ping timeout: 250 seconds]
dlitvak has quit [Ping timeout: 252 seconds]
aryaching has joined #ruby
ht__ has joined #ruby
decoponio has joined #ruby
ht__ has quit [Client Quit]
ht__ has joined #ruby
Macaveli has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
Pupp3tm4st3r has joined #ruby
tildes has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tulak has joined #ruby
karapetyan has joined #ruby
voodo is now known as voodo|away
davedev24 has joined #ruby
dstarh has joined #ruby
ruurd has joined #ruby
A124 has joined #ruby
psy_ has joined #ruby
Rollabunna has joined #ruby
agit0 has joined #ruby
IrishGringo has joined #ruby
<lessless> guys, what's most eloquent way to accept both integer and array as an argument, so the integer would be an array eventually?
Oli has joined #ruby
<lessless> i.e. x(1) => [1], x([2,3]) => [2,3]
davedev2_ has joined #ruby
Oli is now known as Guest42726
karapetyan has quit [Ping timeout: 250 seconds]
<toretore> the most elegant way is to not accept both
<toretore> if there's any chance that you want to accept more than one of something, always demand an array
davedev24 has quit [Read error: Connection reset by peer]
blue_deref has joined #ruby
<jhass> or use a splat and demand the caller to do so too
<jhass> x(1), x(*[2, 3]), def x(*values)
<jhass> x(2, 3)
RobertBirnie has joined #ruby
freerobby has quit [Quit: Leaving.]
<toretore> and then when you want to add another parameter you're screwed ;)
episage has joined #ruby
j5s7 has joined #ruby
encapuzado has left #ruby [#ruby]
<jhass> ruby's pretty tolerant about that actually
atomical has quit [Ping timeout: 255 seconds]
<apeiros> lessless: +1 to toretore's suggestion.
<apeiros> also sometimes splat is the appropriate answer.
<jhass> >> def x(*values, value); [values, value]; end; [x(1), x(1, 2), x(1, 2, 3)]
<ruboto> jhass # => [[[], 1], [[1], 2], [[1, 2], 3]] (https://eval.in/473314)
<toretore> yes, sometimes
<apeiros> ah, and that's already been mentioned by jhass
<apeiros> s/the/an/
<toretore> but it's like singletons, rarely does is not come back to bite you
<apeiros> toretore: well, for single/last argument, I prefer splat over taking an array.
j5s7 has quit [Client Quit]
<apeiros> caller can still easily normalize
<toretore> i just like being very explicit about everything i guess
<apeiros> splat is explicit :)
<jhass> so, switch to Java? :P
<toretore> java 8 looks inviting actually ;)
j5s7 has joined #ruby
dkphenom has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
ruurd has quit [Read error: Connection reset by peer]
ht__ has joined #ruby
j5s7 has quit [Client Quit]
ruurd has joined #ruby
tildes has quit [Ping timeout: 250 seconds]
rubie has joined #ruby
<apeiros> java starts to look more attractive indeed.
<apeiros> if only they could reduce their twenty five gazillion classes to something more sane…
<adaedra> but that would make it less entreprise-y
<apeiros> adaedra: all they have to do is call it "oracle java". boom. enterprise-y
<adaedra> :D
<toretore> that's also part of the attraction - they have libs for everything, good quality ones too
<apeiros> toretore: IME a mixed bag too.
<Papierkorb> Java is outdated from a language standpoint
<toretore> how so?
<apeiros> it's only the 10th character in the alphabet.
<apeiros> s/it's/J is/
<apeiros> so it must be outdated. Kava would be newer
<Papierkorb> toretore: The OOP model is just old. no real mixins. Takes more code to do the same, while not being faster at all times
ruurd has quit [Read error: Connection reset by peer]
<Papierkorb> Not everything is an Object. no operator overloading.
<Papierkorb> And yes, operator overloading comes to bite you back when you want to write something like an_array + an_array
davedev24 has joined #ruby
<Papierkorb> Writing tests is annoying. static methods (comparable to rubys "class methods") are a special kind of snowflake, so no simple mocking for them
monod has joined #ruby
davedev2_ has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
<Papierkorb> You can have an int, or an Integer. int works most of the time, but as they're not an Object, not as an Generic type (e.g.: List<Integer>, not List<int>)
dlitvak has joined #ruby
<Papierkorb> The list goes on. That language has too many annoyances.
atomical has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
benhuda has joined #ruby
ruurd has joined #ruby
bMalum has quit [Quit: bMalum]
dlitvak has quit [Ping timeout: 272 seconds]
czsr has joined #ruby
monod has quit [Quit: Sto andando via]
rubie has quit [Remote host closed the connection]
<shevy> it is too verbose
bMalum has joined #ruby
j5s7 has joined #ruby
tildes has joined #ruby
<shevy> it does have a lot of graphic stuff though - I remember at my old workplace when we looked at electron microscopy dataset, there were two fat java apps that did not have any good replacement (electron microscopy have the weirdest binary format types)
ruurd has quit [Read error: Connection reset by peer]
j5s7 has quit [Client Quit]
<Papierkorb> shevy: not to confuse with GUI development. Java is horrible at that.
<Papierkorb> JavaFX. Creating a new button only requires to create three distinct classes! Because only one would not be enterprais for srs bsns
j5s7 has joined #ruby
<Papierkorb> And then, it still looks completely outlandish. Expect it to look n' feel native to the platform? Don't use Java. (Use e.g. C++/Qt)
j5s7 has quit [Client Quit]
tildes has quit [Remote host closed the connection]
voodo|away has quit [Quit: Leaving...]
dfdfdf has joined #ruby
htmldrum has joined #ruby
stannard has joined #ruby
davedev2_ has joined #ruby
arup_r has quit [Remote host closed the connection]
davedev24 has quit [Read error: Connection reset by peer]
CloCkWeRX has quit [Quit: Leaving.]
ruurd has joined #ruby
arup_r has joined #ruby
kab has joined #ruby
arup_r has quit [Remote host closed the connection]
s2013 has joined #ruby
htmldrum has quit [Ping timeout: 272 seconds]
spiman has quit []
FreelancerBR has joined #ruby
linuxboy_ has quit [Ping timeout: 260 seconds]
chipotle has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
toretore has quit [Ping timeout: 260 seconds]
AndyBotwin has quit [Ping timeout: 265 seconds]
BlackGear has quit [Quit: Textual IRC Client: www.textualapp.com]
ruurd has joined #ruby
AndyBotwin has joined #ruby
freerobby has joined #ruby
episage has quit [Ping timeout: 240 seconds]
rgtk has quit [Remote host closed the connection]
IrishGringo has quit [Ping timeout: 264 seconds]
<Papierkorb> Does someone know if Hash#values copies anything, or is it just returning part of the internal representation in MRI?
cornerma1 has joined #ruby
dealpete has joined #ruby
banister has joined #ruby
krz has quit [Quit: WeeChat 1.2]
arup_r has joined #ruby
cornerman has quit [Ping timeout: 240 seconds]
cornerma1 is now known as cornerman
sunya7a_ has quit [Ping timeout: 240 seconds]
sunya7a has quit [Ping timeout: 264 seconds]
Yzguy has joined #ruby
bMalum has quit [Quit: bMalum]
CodingWolf has joined #ruby
_blizzy_ has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> it does allocate an array and fills it with the "internal" references, I'd assume
The_Phoenix has quit [Quit: Leaving.]
msb__ has quit [Ping timeout: 244 seconds]
lemondom_ has quit [Read error: Connection timed out]
BaroMeter has joined #ruby
lemondom has joined #ruby
fantazo has quit [Quit: Verlassend]
zomgbie has joined #ruby
skweek has joined #ruby
BaroMeter has quit [Client Quit]
Guest42726 has quit [Ping timeout: 276 seconds]
benlovell has joined #ruby
toretore has joined #ruby
kab has quit [Quit: Leaving]
symm- has joined #ruby
Yzguy has quit [Quit: Zzz...]
A124 has quit [Quit: '']
exadeci has quit [Quit: Connection closed for inactivity]
al2o3-cr has quit [Quit: WeeChat 1.3]
al2o3-cr has joined #ruby
Yzguy has joined #ruby
Yzguy has quit [Client Quit]
Yzguy has joined #ruby
tildes has joined #ruby
l4cr0ss has joined #ruby
sanna has joined #ruby
fedexo has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
l4cr0ss has quit [Client Quit]
<arup_r> so here in this Proxy class (https://github.com/amatsuda/kaminari/blob/master/lib/kaminari/helpers/paginator.rb#L116), in this class I want to add a helper method for my own project. Is it possible ?
A124 has joined #ruby
<arup_r> ok, let me ask it to #rails .. sorry
<arup_r> moving there
tref has joined #ruby
raeoks has quit [Quit: Textual IRC Client: www.textualapp.com]
sumark has quit [Remote host closed the connection]
sumark has joined #ruby
markfletcher has joined #ruby
segfalt has quit [Quit: WeeChat 1.3]
terminalrecluse has joined #ruby
freerobby has quit [Quit: Leaving.]
markfletcher has quit [Client Quit]
bMalum has joined #ruby
lessless has quit [Ping timeout: 244 seconds]
ismaelga has joined #ruby
tref has quit [Quit: tref]
unrar has quit [Quit: Leaving]
skweek has quit [Remote host closed the connection]
darkxploit has quit [Ping timeout: 264 seconds]
skweek has joined #ruby
pdoherty has joined #ruby
Mon_Ouie has joined #ruby
stannard has quit [Remote host closed the connection]
sondr3 has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruurd has quit [Read error: Connection reset by peer]
s2013 has joined #ruby
ruurd has joined #ruby
ruurd has quit [Client Quit]
nofxx has joined #ruby
da3mian has joined #ruby
kp666 has joined #ruby
felltir has quit [Remote host closed the connection]
maloik has quit [Ping timeout: 265 seconds]
moei has quit [Quit: Leaving...]
felltir has joined #ruby
felltir has quit [Remote host closed the connection]
ht__ has quit [Quit: Konversation terminated!]
skade has joined #ruby
ht__ has joined #ruby
nofxx has quit [Ping timeout: 255 seconds]
yardenbar has quit [Ping timeout: 252 seconds]
User458764 has joined #ruby
Bellthoven has joined #ruby
araujo has joined #ruby
sunya7a has joined #ruby
angiebadillo has quit [Ping timeout: 240 seconds]
braderhart has quit [Ping timeout: 252 seconds]
yoongkang has quit [Remote host closed the connection]
myztic has quit [Quit: leaving]
aphprentice has quit [Ping timeout: 264 seconds]
myztic has joined #ruby
myztic has quit [Client Quit]
darkxploit has joined #ruby
arup_r has quit [Remote host closed the connection]
amirpro has quit [Ping timeout: 272 seconds]
myztic has joined #ruby
tekk has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 250 seconds]
bjmllr has quit [Ping timeout: 264 seconds]
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
diegoviola has quit [Quit: WeeChat 1.3]
tekk has joined #ruby
arup_r has joined #ruby
arup_r is now known as Guest34582
Guest34582 has quit [Remote host closed the connection]
aryaching has quit []
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sanna has quit [Ping timeout: 240 seconds]
The_Phoenix has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
axsuul has joined #ruby
IrishGringo has joined #ruby
adac has joined #ruby
Eiam_ has joined #ruby
build22 has joined #ruby
sankaber has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
sarkis has joined #ruby
ht__ has joined #ruby
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
nathan1 has joined #ruby
ruurd has joined #ruby
elaptics is now known as elaptics`away
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RobertBirnie has quit [Ping timeout: 252 seconds]
angiebadillo has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
nathan1 has quit [Quit: WeeChat 1.0.1]
zfez has joined #ruby
ht__ has joined #ruby
braderhart has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
RobertBirnie has joined #ruby
aphprentice has joined #ruby
_blizzy_ has quit [Ping timeout: 255 seconds]
amirpro has joined #ruby
bjmllr has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
ruurd has joined #ruby
futilegames has joined #ruby
vdamewood has joined #ruby
scripore has joined #ruby
skweek has quit [Ping timeout: 252 seconds]
Xeago has quit [Remote host closed the connection]
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
NeverDie has joined #ruby
stannard has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
davedev24 has joined #ruby
davedev2_ has quit [Read error: Connection reset by peer]
howdoicomputer has joined #ruby
dfinninger has joined #ruby
da3mian has quit [Quit: Textual IRC Client: www.textualapp.com]
griffindy has joined #ruby
symm- has quit [Ping timeout: 264 seconds]
flashbck has joined #ruby
ruurd has joined #ruby
<flashbck> What is the recommended way to develop an applicaiton that depends on a custom gem that is hosted in a private gem server?
skade has joined #ruby
<flashbck> Say I've got a rails applicaiton, my_rails, and a custom gem, my_gem
<adaedra> Add the custom source to the Gemfile
<flashbck> I typically host my_gem from a private gem server
jamesfordummies has joined #ruby
<flashbck> I know that I can use :path in the Gemfile
nofxx has joined #ruby
weemsledeux has joined #ruby
<flashbck> but I'd have to modify my gemfile for local dev but revert that for deployment?
skade has quit [Client Quit]
<jhass> flashbck: why do you have to use a local development checkout of the private gem for development?
<jhass> as adaedra pointed out, just use the source option
jamesfordummies has quit [Client Quit]
<flashbck> Because I am making modifications to my gem and the rails app
<jhass> well, that has nothing to do with it being on a private gem server then
VeryBewitching has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sarkis has quit [Ping timeout: 276 seconds]
<VeryBewitching> G'day folks.
<flashbck> I'm just wondering if the only way that I can make updates to the gem is to modify my Gemfile to reference the local copy instead of the gem server copy
<flashbck> I know that npm has the ability to do some sort of link option
<jhass> flashbck: pretty much, there are some shenigans for using the git option and specifying a local override for that in your local bundler configuration, but it's not really making it any easier
s2013 has joined #ruby
<jhass> flashbck: switch it back before releasing the gem
ruurd has quit [Read error: Connection reset by peer]
<jhass> or when rather
troulouliou_dev has joined #ruby
howdoicomputer has quit [Ping timeout: 246 seconds]
jamesfordummies has joined #ruby
<flashbck> Yeah, I saw the bundle config options for a git based gem
ruurd has joined #ruby
nofxx has quit [Ping timeout: 276 seconds]
xet7 has joined #ruby
skade has joined #ruby
karapetyan has joined #ruby
jamesfordummies has quit [Client Quit]
yoongkang has joined #ruby
benlovell has quit [Ping timeout: 264 seconds]
sankaber has quit [Remote host closed the connection]
sarkis has joined #ruby
gregf has quit [Ping timeout: 272 seconds]
sankaber has joined #ruby
nofxx has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
yoongkang has quit [Ping timeout: 244 seconds]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jamesfordummies has joined #ruby
jamesfordummies has left #ruby [#ruby]
arup_r has joined #ruby
moeabdol has joined #ruby
AndyBotwin has quit [Quit: Leaving]
iamvery has quit [Ping timeout: 276 seconds]
nyon is now known as pyon
tmtwd has joined #ruby
guacjack has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
NeverDie has quit [Quit: http://radiux.io/]
Guest42726 has joined #ruby
maloik has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
wildlander has quit [Quit: Saliendo]
18WAA6551 has joined #ruby
myztic has quit [Quit: leaving]
myztic has joined #ruby
ruurd has joined #ruby
maloik has quit [Ping timeout: 240 seconds]
axsuul has quit [Read error: Connection reset by peer]
axsuul has joined #ruby
aphprentice has quit [Ping timeout: 240 seconds]
Fire-Dragon-DoL has quit [Ping timeout: 240 seconds]
willardg has joined #ruby
willardg has quit [Remote host closed the connection]
mikolalysenko has quit [Ping timeout: 240 seconds]
yosafbridge has quit [Ping timeout: 240 seconds]
bttf has quit [Ping timeout: 240 seconds]
zapata has quit [Ping timeout: 240 seconds]
colstrom has quit [Ping timeout: 240 seconds]
null2 has quit [Ping timeout: 240 seconds]
elektronaut has quit [Ping timeout: 240 seconds]
benlakey has quit [Ping timeout: 240 seconds]
torpig has quit [Ping timeout: 240 seconds]
EvilJStoker has quit [Ping timeout: 240 seconds]
golgaroth has quit [Ping timeout: 240 seconds]
machty has quit [Ping timeout: 240 seconds]
zrl has quit [Ping timeout: 240 seconds]
myztic has quit [Client Quit]
amirpro has quit [Ping timeout: 240 seconds]
darkf has quit [Ping timeout: 240 seconds]
pmarreck has quit [Ping timeout: 240 seconds]
drPoggs has quit [Ping timeout: 240 seconds]
mistym has quit [Ping timeout: 240 seconds]
twistedpixels has quit [Ping timeout: 240 seconds]
nrk has quit [Ping timeout: 240 seconds]
Voker57 has quit [Ping timeout: 240 seconds]
lele has quit [Ping timeout: 240 seconds]
akem has quit [Ping timeout: 264 seconds]
ruurd has quit [Read error: Connection reset by peer]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Voker57 has joined #ruby
Voker57 has quit [Changing host]
Voker57 has joined #ruby
aphprentice has joined #ruby
twe4ked has quit [Ping timeout: 240 seconds]
mikolalysenko has joined #ruby
benlakey has joined #ruby
colstrom has joined #ruby
karapetyan has quit [Remote host closed the connection]
IrishGringo has quit [Ping timeout: 250 seconds]
axsuul has quit [Ping timeout: 265 seconds]
golgaroth has joined #ruby
zrl has joined #ruby
amirpro has joined #ruby
bttf has joined #ruby
atmosx has quit [Ping timeout: 276 seconds]
pmarreck has joined #ruby
EvilJStoker has joined #ruby
twistedpixels has joined #ruby
Fire-Dragon-DoL has joined #ruby
lele has joined #ruby
yosafbridge has joined #ruby
elektronaut has joined #ruby
mistym has joined #ruby
mistym has joined #ruby
antoniobeyah has joined #ruby
centrx has joined #ruby
drPoggs has joined #ruby
machty has joined #ruby
ruurd has joined #ruby
Fire-Dragon-DoL has quit [Client Quit]
Fire-Dragon-DoL has joined #ruby
dfinninger has quit [Remote host closed the connection]
banister has joined #ruby
shinnya has joined #ruby
gregf has joined #ruby
dlitvak has joined #ruby
zapata has joined #ruby
ElSif has quit [Ping timeout: 244 seconds]
nrk has joined #ruby
null2 has joined #ruby
torpig has joined #ruby
blackmesa has joined #ruby
ruurd has quit [Ping timeout: 276 seconds]
trouloulioud_dev has joined #ruby
mallu has joined #ruby
troulouliou_dev has quit [Ping timeout: 244 seconds]
<mallu> can you please tell me what I am doing wrong? https://gist.github.com/anonymous/8210251cf31c0ccff06a
<jhass> mallu: what's puts hash(d) supposed to do?
<jhass> mallu: accesing a value of a hash is done with []
<mallu> jhass: I wanted to get the value of d
<mallu> oh ok
zomgbie has quit [Ping timeout: 264 seconds]
stannard has quit [Remote host closed the connection]
kies has joined #ruby
<jhass> mallu: so you were calling Object#hash there with the argument d, but Object#hash doesn't take an argument ;)
gregf has quit [Quit: brb]
marcosantoniocar has left #ruby [#ruby]
akem has joined #ruby
<mallu> jhass: ok.. I'm learning ruby so let me read hash doc again.. thank you
err_ok has quit [Read error: Connection reset by peer]
antoniobeyah has quit [Quit: antoniobeyah]
gregf has joined #ruby
Vile` has quit [Ping timeout: 264 seconds]
<jhass> mallu: a tip: don't name your local variables like the datastructure, so instead of hash name it dna_pairs or something
err_ok has joined #ruby
<mallu> jhass: ok thank you
<jhass> base_pairs? I don't know the correct english term
<jhass> hah, guessed right https://en.wikipedia.org/wiki/Base_pair
ruurd has joined #ruby
<mallu> jhass: so this is what I was expecting to get from that method
<mallu> irb(main):034:0> hash = {'G' => 'C', 'C' => 'G', 'T' => 'A', 'A' => 'U'} => {"G"=>"C", "C"=>"G", "T"=>"A", "A"=>"U"} irb(main):035:0> hash['G'] => "C"
<jhass> I figured
tref has joined #ruby
kies has quit [Ping timeout: 255 seconds]
<mallu> jhass: so what do you mean by "but Object#hash doesn't take an argument"
Vile` has joined #ruby
<apeiros> oy, genetics
<jhass> apeiros: not really :P
<apeiros> DNS?
tmtwd has quit [Ping timeout: 240 seconds]
<jhass> apeiros: Hash rather
<apeiros> GCTA & U sounds suspiciously like adenin, cytosin, guanin, and whatever the others were
<jhass> mallu: so, hash("C") wasn't using your local variable named hash, because it was a method call, we could also write it as self.hash("C")
<apeiros> err, DNA in english
<jhass> mallu: Object is the base for everything and defines a hash method, so that method was called
<jhass> mallu: but then Object#hash doesn't take an argument and that raised your ArgumentError
<mallu> ok
<apeiros> mallu: working with some bio stuff? dna related? (because of the keys/values in your hash)
<jhass> apeiros: the task is mapping a DNA base to its pair, but it's just a exercism or codewars challenge iirc
ruurd has quit [Ping timeout: 240 seconds]
dkphenom has joined #ruby
<jhass> so it's much more about Hash than about DNA :P
<mallu> aperios: learning ruby and found this exercise online
<apeiros> ?tabnick mallu
<ruboto> mallu, pro-tip - use tab completion for nicks. avoids typos in nicks.
<mallu> jhass: so if I change my hash variable to dna_hash then it should work?
<apeiros> I really have to auto that for all known apeiros mutilations
<mallu> ruboto: thanks
<apeiros> ?justabot mallu
<ruboto> mallu, I'm just a bot. You don't need to address me.
<apeiros> and that I should auto as well
howdoicomputer has joined #ruby
voodo has joined #ruby
UtkarshRay has joined #ruby
jaequery has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
twe4ked has joined #ruby
<mallu> jhass: I'm still getting the same error def self.of_dna(dna_pairs) dna_hash = {'G' => 'C', 'C' => 'G', 'T' => 'A', 'A' => 'U'} dna_hash['dna_pairs'] end
pen has joined #ruby
<jhass> mallu: the same? I highly doubt that?
<jhass> did you save your file?
<jhass> brb, apeiros has to take over :P
<mallu> I am getting nil I suppoed to get G
stannard has joined #ruby
blue_deref has quit [Quit: bbn]
dtordabl1 has quit [Quit: Lost terminal]
dtordable has joined #ruby
voodo has quit [Ping timeout: 255 seconds]
dtordable has quit [Client Quit]
howdoicomputer has quit [Ping timeout: 252 seconds]
jaequery has quit [Ping timeout: 246 seconds]
<jhass> >> dna_pairs = "C"; dna_pairs == 'dna_pairs'
<ruboto> jhass # => false (https://eval.in/473450)
dtordable has joined #ruby
<mallu> ah.. found the issue
eminencehc has joined #ruby
ruurd has joined #ruby
stannard has quit [Ping timeout: 244 seconds]
EllisTAA has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
IrishGringo has joined #ruby
ruurd has quit [Ping timeout: 250 seconds]
maloik has joined #ruby
bb010g has joined #ruby
bMalum has quit [Quit: bMalum]
agentmeerkat has joined #ruby
maloik has quit [Ping timeout: 252 seconds]
myztic has joined #ruby
trouloulioud_dev has quit [Quit: Leaving]
howdoicomputer has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
Melpaws has joined #ruby
last_staff has quit [Quit: last_staff]
makenoise has joined #ruby
ruurd has joined #ruby
darkxploit has quit [Ping timeout: 265 seconds]
darkxploit has joined #ruby
skcin7 has joined #ruby
myztic has quit [Quit: leaving]
ruurd has quit [Ping timeout: 272 seconds]
dfinninger has joined #ruby
flashbck has quit [Ping timeout: 250 seconds]
dfinninger has quit [Remote host closed the connection]
makenoise has quit [Remote host closed the connection]
axsuul has joined #ruby
maloik has joined #ruby
arup_r has quit [Remote host closed the connection]
pdoherty has quit [Read error: Connection reset by peer]
aibot has quit [Ping timeout: 246 seconds]
houhoulis has quit [Remote host closed the connection]
pdoherty has joined #ruby
aibot has joined #ruby
nolic has joined #ruby
yqt has joined #ruby
tchv09 has joined #ruby
makenoise has joined #ruby
agentmeerkat has quit [Ping timeout: 276 seconds]
maloik has quit [Ping timeout: 260 seconds]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cyb3rspy has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
arup_r has joined #ruby
arup_r is now known as Guest32931
eminencehc has joined #ruby
gregf has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
Guest32931 is now known as arup_r
yeticry has joined #ruby
<norc> Ox0dea: Meh my question was silly. Ruby does not recover from longjmps anyway.
pawnbox_ has quit [Remote host closed the connection]
<norc> But at least I have learned a few interesting pieces how Exceptions are raised. :)
tchv09 has quit [Quit: Leaving]
axsuul has quit [Read error: Connection reset by peer]
axsuul has joined #ruby
zomgbie has joined #ruby
pskosinski has joined #ruby
symm- has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
axsuul has joined #ruby
makenoise has quit []
eminencehc has quit [Remote host closed the connection]
linduxed has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
brainfire has quit [Quit: Konversation terminated!]
pawnbox has joined #ruby
maloik has joined #ruby
eminencehc has joined #ruby
kadoppe has quit [Ping timeout: 272 seconds]
<guacjack> evening
kadoppe has joined #ruby
gambl0re has quit [Read error: Connection reset by peer]
khwilo has joined #ruby
benlovell has joined #ruby
maloik has quit [Ping timeout: 250 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
<jhass> morning
khwilo_ has joined #ruby
myztic has joined #ruby
crazydiamond has joined #ruby
<EllisTAA> mawning
SenpaiSilver has quit [Quit: Leaving]
kobain has joined #ruby
saddad has joined #ruby
pawnbox has joined #ruby
<afschw> Evening.
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
<mallu> please take a look at this and tell me how I can make it better. I feel like I am repeating lots of code. https://gist.github.com/anonymous/613d964f73d9cb1e5266
<jhass> ?gist_usage mallu
<ruboto> mallu, To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting a new one.
Outlastsheep has quit [Quit: ZNC - http://znc.in]
yoongkang has joined #ruby
linduxed has joined #ruby
<mallu> ok
<jhass> &ri Array#map Hash#invert @mallu
banister has joined #ruby
<jhass> mallu: and true, you can extract the logic to a method that takes the map as argument
<jhass> well, or just use Hash#values_at with a splat I guess, then the repetition would become a minor issue
solars has quit [Ping timeout: 260 seconds]
akem2 has joined #ruby
<jhass> &ri Hash#fetch Hash#has_key?
<jhass> mallu: ^ two more methods to take a look at
akem has quit [Read error: No route to host]
<mallu> ok
minimalism has joined #ruby
yoongkang has quit [Ping timeout: 252 seconds]
aeontech has joined #ruby
al2o3-cr has quit [Quit: WeeChat 1.3]
dlitvak has quit [Remote host closed the connection]
benlovell has quit [Quit: Lost terminal]
adac has quit [Ping timeout: 255 seconds]
<EllisTAA> could someone tell me where to look for how i’d access unix commands from inside my ruby program? i want to access gzip
<jhass> EllisTAA: check zlib stdlib
<EllisTAA> jhass: thanks
<EllisTAA> jhass: what about Shell.gzip
maikowblue has joined #ruby
<jhass> that's a thing?
<jhass> can't find it, where did you find that?
<EllisTAA> yeah ur right it isn’t …
<EllisTAA> thought Shell gave me access to all commands
adac has joined #ruby
aeontech has quit [Ping timeout: 265 seconds]
segy_ has joined #ruby
yfeldblum has joined #ruby
<jhass> no, that's not what it does
finisherr has joined #ruby
aeontech has joined #ruby
ruurd has joined #ruby
k3asd` has joined #ruby
solars has joined #ruby
segy has quit [Ping timeout: 276 seconds]
segy_ is now known as segy
al2o3-cr has joined #ruby
rgrmatt has joined #ruby
towski_ has joined #ruby
centrx has quit [Quit: If you meet the Buddha on the road, kill him.]
ismael__ has joined #ruby
segy_ has joined #ruby
tildes has quit [Ping timeout: 250 seconds]
craysiii has joined #ruby
crazydiamond has quit [Remote host closed the connection]
Uranio has joined #ruby
ismaelga has quit [Ping timeout: 272 seconds]
IrishGringo has quit [Ping timeout: 260 seconds]
segy has quit [Ping timeout: 252 seconds]
segy_ is now known as segy
ta has quit [Remote host closed the connection]
maloik has joined #ruby
_blizzy_ has joined #ruby
blackjid has quit [Max SendQ exceeded]
dlitvak has joined #ruby
blackjid has joined #ruby
Uranio has quit [Quit: Leaving]
bMalum has joined #ruby
IrishGringo has joined #ruby
maloik has quit [Ping timeout: 252 seconds]
ta has joined #ruby
antoniobeyah has joined #ruby
finisherr has quit [Quit: finisherr]
blackmesa has joined #ruby
unclouded has joined #ruby
gix has quit [Quit: Client exiting]
al2o3-cr1 has joined #ruby
al2o3-cr has quit [Disconnected by services]
al2o3-cr1 is now known as al2o3-cr
finisherr has joined #ruby
bluOxigen has joined #ruby
bluOxigen has quit [Changing host]
bluOxigen has joined #ruby
goodcodeguy has joined #ruby
timonv has joined #ruby
arup_r has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
IrishGringo has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
allcentury has quit [Ping timeout: 240 seconds]
axsuul has quit [Ping timeout: 250 seconds]
IrishGringo has joined #ruby
darkxploit has quit [Quit: Leaving]
diegoaguilar has joined #ruby
arup_r has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
arup_r is now known as Guest32545
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<EllisTAA> man zlib is confusing
jud has quit [Quit: Leaving]
saddad has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
Guest32545 has quit [Ping timeout: 264 seconds]
diegoaguilar has quit [Ping timeout: 272 seconds]
timonv has quit [Quit: WeeChat 1.3]
moei has joined #ruby
Coldblackice has joined #ruby
terminalrecluse has joined #ruby
futilegames has quit [Quit: futilegames]
towski_ has quit [Remote host closed the connection]
AlexRussia has quit [Ping timeout: 260 seconds]
maloik has joined #ruby
beauby has joined #ruby
Outlastsheep has joined #ruby
diegoaguilar has joined #ruby
ohaibbq has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
tref has quit [Quit: tref]
diegoaguilar has quit [Read error: Connection reset by peer]
maloik has quit [Ping timeout: 272 seconds]
bMalum has quit [Ping timeout: 240 seconds]
<EllisTAA> when i run this i expect my files to get compressed but when i check the files they arent compressed … https://gist.github.com/ellismarte/b1cb88fd52f731f0efed#file-neat-rb-L14-L16
<jhass> EllisTAA: it returns the compressed data as a string
<jhass> &ri Zlib::deflate
zotherstupidguy has quit [Quit: WeeChat 1.3]
<EllisTAA> jhass: is it possible to get file hello.txt on my desktop to = hello.txt.gz?
<jhass> sure
<EllisTAA> jhass: using the Zlib?
<jhass> sure
<jhass> File.open(path) do |file| File.write("#{path}.gz", Zlib.deflate(file)); end; File.unlink(path)
IrishGringo has quit [Ping timeout: 250 seconds]
cdg has joined #ruby
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<EllisTAA> jhass: sweet. what does it mean to unlink a path? i could just look it up
<jhass> &ri File.unlink
moeabdol has quit [Read error: Connection reset by peer]
<jhass> ah we have it aliased as delete these days
khwilo has quit [Quit: Leaving]
Voker57 has quit [Quit: voker57]
moeabdol has joined #ruby
Voker57 has joined #ruby
Voker57 has quit [Changing host]
Voker57 has joined #ruby
<norc> EllisTAA: Unlinking is a more concise terms since pretty much all filesystem have/support hard links.
<EllisTAA> jhass: so in the code u wrote up there, i’d deflate the file then use unlink to delete the file that isn’t compressed?
<jhass> yes
<EllisTAA> cool
nomadic has quit [Quit: -bye-]
<jhass> gzip(1) doesn't do anything else
SenpaiSilver has joined #ruby
nomadic has joined #ruby
khwilo_ has quit [Ping timeout: 246 seconds]
varunwachaspati_ has joined #ruby
User458764 has joined #ruby
User458764 has quit [Max SendQ exceeded]
yfeldblum has quit [Remote host closed the connection]
User458764 has joined #ruby
yfeldblum has joined #ruby
gambl0re has joined #ruby
Xeago has quit [Remote host closed the connection]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<EllisTAA> jhass: so deflate is expecting a string … could i just pass it the path and still create a compressed file on this line https://gist.github.com/ellismarte/b1cb88fd52f731f0efed#file-neat-rb-L15
ismael__ has quit [Remote host closed the connection]
<jhass> then you would just compress the path
weemsledeux has joined #ruby
cdg has quit [Remote host closed the connection]
houhoulis has joined #ruby
<EllisTAA> am i correct in thinking if i pass it the path then i can delete line 14?
zotherstupidguy has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
<EllisTAA> oh dang it works!
<jhass> EllisTAA: zcat it
DLSteve has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
IrishGringo has joined #ruby
blackmesa has joined #ruby
<EllisTAA> jhass: thanks 4 the help
<jhass> EllisTAA: seriously, zcat the result
<EllisTAA> ill look it up but what’s that
<jhass> a command, like gzip
<jhass> decompresses it and prints the result to stdout
s00pcan has joined #ruby
s00pcan has quit [Remote host closed the connection]
s00pcan has joined #ruby
ruurd has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
terminalrecluse has joined #ruby
gambl0re has quit [Read error: Connection reset by peer]
A124 has quit [Quit: '']
<EllisTAA> ok gotta do the dishes first
solars has quit [Ping timeout: 240 seconds]
zapata has quit [Quit: WeeChat 1.3]
dfdfdf has quit [Quit: Leaving]
ruurd has quit [Quit: ZZZzzz…]
beauby has quit [Ping timeout: 252 seconds]
gambl0re has joined #ruby
finisherr has quit [Quit: finisherr]
symm- has quit [Ping timeout: 246 seconds]
Xeago has joined #ruby
purplexed- has joined #ruby
purplexed- has joined #ruby
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
adac has quit [Ping timeout: 240 seconds]
allcentury has joined #ruby
symm- has joined #ruby
dikaio has joined #ruby
<shevy> I want robots that program for me
<akem2> do i hear satan clauss?
zapata has joined #ruby
Xeago has quit [Remote host closed the connection]
solars has joined #ruby
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruurd has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
beauby has joined #ruby
Yzguy has quit [Quit: Zzz...]
gix has joined #ruby
BSaboia has joined #ruby
BTRE has quit [Quit: Leaving]
arup_r has joined #ruby
adac has joined #ruby
beauby has quit [Ping timeout: 250 seconds]
gix has quit [Client Quit]
maloik has joined #ruby
Sp4rKy_ has quit [Remote host closed the connection]
Sp4rKy has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
sparr has quit [Changing host]
sparr has joined #ruby
<sondr3> hello, newbie question: I'm trying to wrap my head around OptionParser but can't figure out how to send a name on an option to another function... here's my current progress: https://gist.github.com/sondr3/c4739d6e17a6efdea4ae. It works fine except it doesn't seem to trigger anything in the lib file. Anybody care to help me a bit? Sorry if I'm missing something obvious
asas has joined #ruby
yoongkang has joined #ruby
<adaedra> It's all your code?
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
<sondr3> well, I took most from the example I found on ruby-doc.org and modified it from there
<adaedra> It's obviously not all the code, as it lacks at least opts definition
tlaxkit has joined #ruby
maloik has quit [Ping timeout: 272 seconds]
<sondr3> oh, like that, yeah, I just ripped it out from the middle of everything, but since I just used the example on ruby-docs I figured that wasn't needed
<sondr3> it all works fine, except I can't figure out how to "get" the name in the cli.rb file
saddad has joined #ruby
<adaedra> Ah, it works?
<adaedra> well, just pass the parameter to new then
pskosinski_ has joined #ruby
<sondr3> uh, yeah, that's what I can't figure out how to do, hehe, quite new to this
ur5us has joined #ruby
gix has joined #ruby
<adaedra> like any other function
<adaedra> method*
yoongkang has quit [Ping timeout: 265 seconds]
pskosinski_ has quit [Remote host closed the connection]
adac has quit [Ping timeout: 255 seconds]
<adaedra> the parameters you pass to new are passed to initialize
<droptone> Question: When searching an array of hashes for a value, I normally use .select, is this the quickest method?
gambl0re has quit [Read error: Connection reset by peer]
pskosinski_ has joined #ruby
<adaedra> For only one value?
<droptone> such as test = [{"name" => "jim", "job" => "boss"}, {"name" => "steve", "job" => "vp"}]
_blizzy_ has quit [Quit: Leaving]
<droptone> then test.select { |t| t['name'] == "jim" }
pskosinski_ has quit [Remote host closed the connection]
<droptone> Yes, I only need one value
<adaedra> If you just need the key, there's Hash#key
<jhass> &ri Enumerable#find
<droptone> Well, no, I need all the values within that array entry
<sondr3> okay, thanks guys, I'll figure it out :)
<droptone> I need that hash
<jhass> droptone: so your .first afterwards? use .find instead of select
<droptone> so I need it to return the hash itself with the various parameters.
<adaedra> Otherwise, yes, for one value you need Hash#find
<droptone> Yes, jhass, exactly, so .find is better?
<droptone> Perfect, thank you.
<jhass> droptone: it doesn't allocate an array
<adaedra> yes, as it will return first match
<droptone> Yes, I am having to use .first.
toretore has quit [Ping timeout: 272 seconds]
<droptone> Brilliant, thank you.
<jhass> and stops on the first match
<droptone> Is the syntax the same?
<norc> I get an Error: uninitialized constant Pry::ObjectPath::StringScanner every time I try to tab complete require filesystem paths, i.e.: require "./<TAB>
<adaedra> You have the doc above, linked by `derpy
<droptone> test.find { |t| t['name'] == "jim" }
<norc> This is from pry 0.10.3
toretore has joined #ruby
symm- has quit [Ping timeout: 240 seconds]
<adaedra> but that's not a hash you're searching, droptone
<adaedra> duh, I succeeded at misreading badly.
_ko1 has quit [Ping timeout: 240 seconds]
rgrmatt has quit [Remote host closed the connection]
finisherr has joined #ruby
malconis has joined #ruby
hrs has joined #ruby
mack25 has joined #ruby
hrs has quit [Remote host closed the connection]
pskosinski has quit []
maloik has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
SenpaiSilver has quit [Quit: Leaving]
SCHAAP137 has joined #ruby
baweaver has quit [Remote host closed the connection]
ruurd has joined #ruby
<droptone> adaedra: It's an array of hashes, no?
<adaedra> yeah yeah ignore me
<adaedra> I thought you had a simple hash
<droptone> hah, no problem man.
<droptone> I appreciate the help.
gregf has joined #ruby
<adaedra> I read a tiny bit too fast sometimes :x
<droptone> I'm at version 3 of this project, it's a major overhaul.
nolic has quit [Ping timeout: 244 seconds]
<droptone> We're getting customers all over the world, so I'm having to add catchalls for all eventualities.
symm- has joined #ruby
<droptone> I'm really glad we chose Ruby instead of Python when we began this project.
hrs has joined #ruby
maloik has quit [Ping timeout: 260 seconds]
<lemondom> hmm
<lemondom> but I use ansible over puppet :O
<lemondom> am I a bad guy now? :
<norc> Good lord, pry is so amazing. :<
<norc> How did I survive all those years without it....
stannard has joined #ruby
<droptone> Here's a question: I have code here that does the following: test = test2.to_s; test3 = test[2..-1]
<droptone> Is there a way to combine the two statements, so I can convert the value to a string and assign the value [2..-1] in the same statement?
<droptone> Like the way Ruby allows chaining methods like .to_time.strftime() and what not?
ta has quit [Remote host closed the connection]
<adaedra> of course
<adaedra> just chain :)
maloik has joined #ruby
<jhass> droptone: [] is in fact just a method call, we could (but shouldn't) rewrite it to test.[](2..-1)
<jhass> so test2.to_s[2..-1] is valid
<droptone> Very nice, thank you.
BSaboia has quit [Ping timeout: 265 seconds]
glanzi has joined #ruby
mary5030 has quit [Remote host closed the connection]
gambl0re has joined #ruby
maloik has quit [Ping timeout: 250 seconds]
mary5030 has joined #ruby
cibs has quit [Ping timeout: 272 seconds]
cibs has joined #ruby
pdoherty has quit [Ping timeout: 272 seconds]
<Papierkorb> Is there a way to alias_method a method on a instance alone?
<Mon_Ouie> You can use that instance's singleton class
<Papierkorb> is that the eigenclass?
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Mon_Ouie> Yes, the methods to manipulate it use the word 'singleton' so that's how I refer to it
<Papierkorb> thanks, reading up on that
troulouliou_div2 has joined #ruby
mary5030 has quit [Remote host closed the connection]
hrs has quit [Remote host closed the connection]
ismaelga has joined #ruby
<Papierkorb> Mon_Ouie: that worked, thanks!
maloik has joined #ruby
nsuke has joined #ruby
saddad has quit [Ping timeout: 260 seconds]
tref has joined #ruby
auxbuss has joined #ruby
IrishGringo has quit [Ping timeout: 265 seconds]
Channel6 has joined #ruby
Jackneill has quit [Ping timeout: 264 seconds]
troulouliou_div2 has quit [Remote host closed the connection]
maloik has quit [Ping timeout: 276 seconds]
rbowlby has joined #ruby
aeontech has quit [Quit: aeontech]
lemondom_ has joined #ruby
eminencehc has joined #ruby
ur5us has quit [Remote host closed the connection]
freerobby has joined #ruby
lemondom has quit [Ping timeout: 252 seconds]
ta has joined #ruby
bluOxigen has quit [Ping timeout: 272 seconds]
nolic has joined #ruby
gambl0re has quit [Read error: Connection reset by peer]
beauby has joined #ruby
tref has quit [Quit: tref]
AlexRussia has joined #ruby
ta has quit [Ping timeout: 272 seconds]
gambl0re has joined #ruby
centrx has joined #ruby
pawnbox has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 240 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<doddok> what's the best CPU for ruby?
beauby has quit [Ping timeout: 272 seconds]
<doddok> apple a9 seems the best
<doddok> what do u think
auxbuss has quit [Quit: ZZZzzz…]
<Fire-Dragon-DoL> doddok: I'm not sure why "best cpu" should exist for ruby. Isn't it something like XEON with lot of cores?
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<norc> Papierkorb: It can be quite helpful to understand how Rubys Object model works behind the scenes. It makes everything from default asignee/receiver to instance methods really easy to understand. :)
yoongkang has joined #ruby
dstarh has joined #ruby
icbm has joined #ruby
<Papierkorb> norc: I knew about the eigenclass stuff through def the_instance.the_method hacks, but didn't knew that there's #singleton_class. But thinking about it, is define_singleton_method by that a short-hand for self.singleton_class.define_method ?
<norc> Papierkorb: Well, that method would be private.
<Papierkorb> nothing a just-do-it #send won't fix
<norc> So rather self.singleton_class.send(:define_method) which is really cumbersome
<norc> But yes.
marr has joined #ruby
chipotle has quit [Ping timeout: 272 seconds]
mary5030 has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<norc> Papierkorb: Also, everytime you do class << self; end what you actually do is open the singleton class of whatever self is.
_blizzy_ has joined #ruby
<norc> And set that to the new self
EllisTAA has joined #ruby
yfeldblum has joined #ruby
fedexo has quit [Ping timeout: 272 seconds]
ruid has joined #ruby
yoongkang has quit [Ping timeout: 265 seconds]
dstarh has quit [Client Quit]
pawnbox has joined #ruby
dmcp_ has joined #ruby
waka has quit [Read error: Connection reset by peer]
<norc> Papierkorb: Also there is a much much much more common way to do self.singleton_class.send(:define_method)
<norc> It's this:
<norc> >> def self.people_do_this_for_class_methods; end
<ruboto> norc # => :people_do_this_for_class_methods (https://eval.in/473622)
tref has joined #ruby
<norc> Which also just adds a method to self's singleton class.
s2013 has joined #ruby
pawnbox has quit [Ping timeout: 252 seconds]
chipotle has joined #ruby
ElSif has joined #ruby
Fraeon has quit [Ping timeout: 276 seconds]
weaksauce has quit [Ping timeout: 276 seconds]
rgrmatt has joined #ruby
Freijo has joined #ruby
arup_r has quit []
ruid has quit [Ping timeout: 240 seconds]
<norc> If you look at the implementation (click on "Toggle source") you will see that it is just syntactic sugar for what you said. http://ruby-doc.org/core-2.0.0/Object.html#method-i-define_singleton_method
<shevy> doddok for me it never seemed to be a problem; I usually buy very cheap machines altogether, only thing that I have had looked for where that the RAM was in the 4-8 Gig range
bruce_lee has quit [Read error: Connection reset by peer]
mack25 has quit [Quit: Cya]
weaksauce has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
Xeago has joined #ruby
baweaver has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
mary5030 has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
pdoherty has joined #ruby
ruurd has joined #ruby
Xeago has joined #ruby
IrishGringo has joined #ruby
rgrmatt has quit [Ping timeout: 272 seconds]
rbowlby has quit [Remote host closed the connection]
arescorpio has joined #ruby
BlackCoyote has quit [Remote host closed the connection]
baweaver has quit [Ping timeout: 246 seconds]
allcentury has quit [Ping timeout: 246 seconds]
postmodern has joined #ruby
gambl0re has quit [Read error: Connection reset by peer]
ruurd has quit [Quit: ZZZzzz…]
jetpackjoe has joined #ruby
<postmodern> what is the defacto way of handling optional dependencies? autoload the constant? Object.const_defined?(:ThatLib) ?
auxbuss has joined #ruby
<postmodern> require the user require mylib/enable_optional_dependency
ismaelga has quit [Remote host closed the connection]
dmcp_ has quit [Quit: Disconnecting...]
ruurd has joined #ruby
gambl0re has joined #ruby
tref has quit [Quit: tref]
quazimodo has quit [Ping timeout: 240 seconds]
glanzi has quit [Remote host closed the connection]
ruurd has quit [Quit: Bye]
gambl0re has quit [Ping timeout: 265 seconds]
cdg has joined #ruby
sunya7a_ has joined #ruby
FreelancerBR has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Ox0dea has quit [Quit: WeeChat 1.4-dev]
kirun has quit [Remote host closed the connection]
cwong_on_irc has joined #ruby
auxbuss has quit [Quit: ZZZzzz…]
beauby has joined #ruby
waka has joined #ruby
waka has quit [Changing host]
waka has joined #ruby
CBX has joined #ruby
eminencehc has quit [Remote host closed the connection]
<shevy> probably or do a rescue LoadError perhaps
<postmodern> shevy, so like require the dependency within the method, if they pass in the option to enable it
Ox0dea has joined #ruby
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duncannz has joined #ruby
Jardayn has joined #ruby
gambl0re has joined #ruby
doddok has quit [Quit: Leaving]
<shevy> hmm
pawnbox has joined #ruby
auxbuss has joined #ruby
jetpackjoe has joined #ruby
<shevy> I have a few gems where there are a bunch of important dependencies, which must be satisfied; for the other ones, such as local .rb files that are just addons to make it more convenient for me, I do silent begin/rescue and handle the cases where this constant is unavailable, usually via a Object.const_defined? check (or defining a convenience method such as: if available? :AsciiParty; AsciiParty.dance!; en
<shevy> d; I do this only for small stuff like singular .rb files or small projects, for larger projects I use autoload, it seems to be better for when you have to require big projects with lots of .rb files
jetpackjoe has quit [Max SendQ exceeded]
Channel6 has quit [Quit: Leaving]
CloCkWeRX has joined #ruby
<jhass> postmodern: I've seen that but also doing it at the top of the file and defining/setting something (constant or value in the gems configuration)
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> or just defined?/ const_defined? in the runtime code
rbowlby has joined #ruby
bihi has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
CBX has quit [Quit: Leaving]
EllisTAA has quit [Quit: EllisTAA]
auxbuss has quit [Quit: I'm gone.]
eminencehc has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
ta has joined #ruby
cdg has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
icbm has quit [Quit: Leaving]
pandaant has joined #ruby
eminencehc has quit [Remote host closed the connection]
norc has quit [Ping timeout: 246 seconds]
yoongkang has joined #ruby
freerobby has quit [Quit: Leaving.]
maloik has joined #ruby
centrx has quit [Remote host closed the connection]
centrx has joined #ruby
rgrmatt has joined #ruby
ta has quit [Ping timeout: 252 seconds]
yoongkang has quit [Ping timeout: 272 seconds]
solars has quit [Ping timeout: 244 seconds]
maloik has quit [Ping timeout: 250 seconds]
SCHAAP137 has quit [Quit: Leaving]
SCHAAP137 has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
varunwachaspati_ has quit [Quit: Connection closed for inactivity]
lkba has joined #ruby
sgambino has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
sgambino has quit [Client Quit]
Sembei has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
cwong_on_irc has joined #ruby
maloik has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
saddad has joined #ruby
BTRE has joined #ruby
pawnbox has joined #ruby
guacjack has quit [Ping timeout: 246 seconds]
houhoulis has quit [Remote host closed the connection]
allcentury has joined #ruby
s2013 has joined #ruby
maloik has quit [Ping timeout: 276 seconds]
pawnbox has quit [Ping timeout: 250 seconds]
maloik has joined #ruby
rbowlby has quit [Remote host closed the connection]
DrShoggoth has joined #ruby
rbowlby has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
maloik has quit [Ping timeout: 272 seconds]