apeiros_ changed the topic of #ruby to: Ruby 2.1.2; 2.0.0-p481; 1.9.3-p545: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
Rojo has quit [Ping timeout: 252 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
zkay11 has quit [Ping timeout: 240 seconds]
sambao21 has joined #ruby
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
codabrink has joined #ruby
ce_afk is now known as cescalante
mikecmpbll has quit [Quit: i've nodded off.]
lw has quit [Quit: s]
LexicalScope has quit [Ping timeout: 264 seconds]
lukec has quit [Quit: lukec]
redondos has quit [Excess Flood]
redondos has joined #ruby
redondos has quit [Changing host]
redondos has joined #ruby
dstrunk has joined #ruby
andrewjanssen has quit [Quit: Leaving...]
mjs2600_ has quit [Remote host closed the connection]
renier has joined #ruby
rkazak has quit [Quit: rkazak]
dstrunk has quit [Client Quit]
rkazak_ has joined #ruby
ChangJooPark has joined #ruby
zkay11 has joined #ruby
r0bby has joined #ruby
robbyoconnor has quit [Ping timeout: 255 seconds]
Cache_Money has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
Cache_Money has quit [Client Quit]
saarinen has joined #ruby
saarinen has quit [Client Quit]
sepp2k has joined #ruby
LexicalScope has joined #ruby
Olipro has quit [*.net *.split]
justinxreese has quit [*.net *.split]
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
zz_karupa is now known as karupa
Hanmac1 has quit [Ping timeout: 255 seconds]
momomomomo has joined #ruby
zorak8 has quit [Ping timeout: 252 seconds]
sputnik13 has joined #ruby
ChangJooPark has quit [Read error: Connection reset by peer]
kitak has quit [Remote host closed the connection]
<omosoj> Hey guys I'm having trouble with this Project Euler problem. Could use some coaching https://gist.github.com/anonymous/f71352ef139fc10afc37
<shevy> hmm I have a string and I regex check on it
<shevy> string =~ / (.*\.la)/
<shevy> then I use $1
kitak has joined #ruby
<shevy> is there a more elegant but shorter variant to the above?
<omosoj> Don't know how to create an appropriate flow control structure.
phoo1234567 has quit [Quit: Leaving]
Nexus_x1__ has joined #ruby
lolmaus has quit [Ping timeout: 245 seconds]
<omosoj> I think I need recursion but I don't know how to do it.
<arrubin> shevy: end_with?
<arrubin> shevy: Or might there be more after .la?
pen has quit [Remote host closed the connection]
* arrubin assumes so.
binaryhat has joined #ruby
<shevy> arrubin the regex is not the problem, the regex is complete
r0bby is now known as robbyoconnor
<shevy> arrubin I try to avoid $1, but it seems so short hmm
sunya7a has joined #ruby
fgo has joined #ruby
rkazak_ has quit [Quit: rkazak_]
Hanmac has joined #ruby
oo_ has joined #ruby
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
phutchins has joined #ruby
<shevy> omosoj the problem is that that code isn't minimal yet
Olipro has joined #ruby
<shevy> one requires quite a bit of thinking to come to it
<shevy> if you could chunk it into smaller parts...
Olipro has quit [Max SendQ exceeded]
rkazak has joined #ruby
ErrantEgo has joined #ruby
ErrantEgo has left #ruby [#ruby]
justinxreese has joined #ruby
<omosoj> shevy, hmm. I am trying to create a method that checks if a number is prime, and if so deletes a numeral, then runs the same function again recursively.
Spami has joined #ruby
<omosoj> Is that not the best approach?
Olipro has joined #ruby
<shevy> dunno, I would first make a method that checks if a number is a prime or not
Spami has quit [Max SendQ exceeded]
subbyyy_ has quit [Ping timeout: 245 seconds]
sunya7a has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
<shevy> the "if so deletes a numeral part" I would do outside of that method, with a .reject {} condition on my sample instead
fgo has quit [Ping timeout: 250 seconds]
<shevy> it's easier to do this in english
<shevy> "remove all non-primes from my array"
<omosoj> Oh, whoa, I didn't even think of that.
<omosoj> Wait, no. Why is that important?
Olipro has quit [Max SendQ exceeded]
<omosoj> Only the first and the last digit need be primes.
<shevy> well you wrote above that you will create a method that checks if a number is prime, and if yes, delete it
zorak8 has joined #ruby
kotk has joined #ruby
<shevy> ok so then it is even simpler
<shevy> you just catch the first and last element of your respective array/digit
mjs2600 has joined #ruby
razrunelord has joined #ruby
<omosoj> That's like a disqualifier as I iterate up. But how do I write a recursive function to check for primes as I delete digits?
tkuchiki has quit [Remote host closed the connection]
<shevy> do you have the method that checks for primes
<omosoj> does it need to be more complicated than Prime.prime?(x) ?
Olipro has joined #ruby
aiguu has joined #ruby
<shevy> I love methods
kotk_ has quit [Ping timeout: 240 seconds]
eighthbit has joined #ruby
<shevy> where is Prime.prime? btw
<shevy> huh
<omosoj> In the gist?
LexicalScope has quit [Read error: Connection reset by peer]
razrunelord has quit [Ping timeout: 252 seconds]
<shevy> uninitialized constant Prime (NameError)
LexicalScope has joined #ruby
<omosoj> require 'prime'
<shevy> aha
eighthbit has quit [Client Quit]
amclain has quit [Quit: Leaving]
nwkr has joined #ruby
peeja has quit [Ping timeout: 240 seconds]
Nowaker has quit [Ping timeout: 240 seconds]
crazysim has quit [Excess Flood]
vlad_starkov has quit []
aspiers has quit [Ping timeout: 240 seconds]
gyre007 has quit [Ping timeout: 240 seconds]
peeja has joined #ruby
crazysim has joined #ruby
<shevy> so now what's left to do is to chunk down on the digits you require/want
aiguu has quit [Ping timeout: 258 seconds]
drago777 has quit [Ping timeout: 240 seconds]
qhartman has quit [Ping timeout: 240 seconds]
aspiers has joined #ruby
contradictioned_ has joined #ruby
tiagonobre_ has quit [Ping timeout: 240 seconds]
ccooke has quit [Ping timeout: 240 seconds]
Affix has quit [Ping timeout: 240 seconds]
jaredrhine has quit [Ping timeout: 240 seconds]
ccooke_ has joined #ruby
gyre007 has joined #ruby
kitak has quit [Read error: Connection reset by peer]
mateu has quit [Ping timeout: 240 seconds]
petems_ has quit [Ping timeout: 240 seconds]
kitak has joined #ruby
contradictioned has quit [Ping timeout: 240 seconds]
Cope has quit [Ping timeout: 240 seconds]
jaredrhine has joined #ruby
Cope has joined #ruby
petems has joined #ruby
drago777 has joined #ruby
mateu has joined #ruby
saltsa_ has quit [Ping timeout: 240 seconds]
tiagonobre_ has joined #ruby
Gooder has joined #ruby
Hanmac1 has joined #ruby
<omosoj> Hmm. The problem says that you delete from each end, and each result needs to be prime.
spyderma_ has quit [Ping timeout: 250 seconds]
saltsa has joined #ruby
<omosoj> like: abcd must be prime, bcd must be prime, cd, and d; then abc, ab, a
<shevy> yeah not really sure I understand the problem at all
Hanmac has quit [Ping timeout: 276 seconds]
wereHamster has joined #ruby
<omosoj> Lol
ozzloy_ has joined #ruby
<shevy> you basically need to chop down an array from both ends simultaneously
chipotle has quit [Quit: cya]
patronus_ has joined #ruby
<omosoj> Not simultaneously...
<shevy> huh
wereHams1er has quit [Ping timeout: 240 seconds]
ozzloy has quit [Ping timeout: 240 seconds]
Olipro has quit [Read error: Connection reset by peer]
<shevy> "The problem says that you delete from each end"
<shevy> but it has two ends right?
<omosoj> yeah, but chop from the right end, and each time the resulting number must be prime. then you start from the left end and do the same.
<shevy> hmm
<omosoj> so they are separate tasks
flowerha_ has joined #ruby
peeja_ has joined #ruby
sonofgam1keeper has joined #ruby
droptone_ has joined #ruby
xea_ has joined #ruby
flowerhack has quit [Ping timeout: 245 seconds]
jhass- has joined #ruby
xm_ has joined #ruby
Killerkeksdose_ has joined #ruby
jhass- is now known as jhass
bsutt_ has joined #ruby
Morrolan has quit [Ping timeout: 240 seconds]
peeja has quit [Ping timeout: 240 seconds]
xea has quit [Ping timeout: 240 seconds]
zzak_ has quit [Ping timeout: 240 seconds]
adamholt has quit [Ping timeout: 240 seconds]
Sonofgamekeeper has quit [Ping timeout: 240 seconds]
miah has quit [Ping timeout: 240 seconds]
xm has quit [Ping timeout: 240 seconds]
jhass|off has quit [Ping timeout: 240 seconds]
qubit has quit [Ping timeout: 240 seconds]
droptone has quit [Ping timeout: 240 seconds]
binaryhat has quit [Ping timeout: 240 seconds]
radic has quit [Ping timeout: 240 seconds]
axisys has quit [Ping timeout: 240 seconds]
Killerkeksdose has quit [Ping timeout: 240 seconds]
bsutt has quit [Ping timeout: 240 seconds]
msch has quit [Ping timeout: 240 seconds]
xybre has quit [Ping timeout: 240 seconds]
katlogic has quit [Ping timeout: 240 seconds]
bier has quit [Excess Flood]
mnemon has quit [Read error: Connection reset by peer]
RubyPanther has quit [Ping timeout: 240 seconds]
patronus has quit [Ping timeout: 240 seconds]
vitorbaptista has quit [Ping timeout: 240 seconds]
cescalante has quit [Ping timeout: 240 seconds]
peeja_ is now known as peeja
katlogic has joined #ruby
adamholt_ has joined #ruby
bier_ has joined #ruby
cescalante has joined #ruby
mclee has quit [Ping timeout: 240 seconds]
itman has quit [Ping timeout: 240 seconds]
dmead has quit [Ping timeout: 240 seconds]
ti-wali has quit [Remote host closed the connection]
itman has joined #ruby
RubyPanther has joined #ruby
Rydekull has quit [Ping timeout: 240 seconds]
matrixise has quit [Ping timeout: 240 seconds]
Scient has quit [Ping timeout: 240 seconds]
qhartman has joined #ruby
dmead has joined #ruby
Affix has joined #ruby
mityaz has quit [Ping timeout: 240 seconds]
andrewjf has quit [Ping timeout: 240 seconds]
spinx^ has quit [Ping timeout: 240 seconds]
shaman42 has quit [Ping timeout: 240 seconds]
likemike has quit [Ping timeout: 240 seconds]
zzak_ has joined #ruby
shaman42 has joined #ruby
flowerha_ has quit [Remote host closed the connection]
axisys has joined #ruby
matrixise has joined #ruby
miah has joined #ruby
qubit has joined #ruby
xybre has joined #ruby
xybre has joined #ruby
xybre has quit [Changing host]
mityaz has joined #ruby
Morrolan has joined #ruby
Rydekull has joined #ruby
vitorbaptista has joined #ruby
Affix is now known as Guest99774
vitorbaptista has quit [Changing host]
vitorbaptista has joined #ruby
binaryhat has joined #ruby
andrewjf has joined #ruby
mnemon has joined #ruby
likemike has joined #ruby
msch has joined #ruby
Scient has joined #ruby
radic has joined #ruby
IceDragon has quit [Quit: Space~~~]
thomasxie has quit [Ping timeout: 252 seconds]
spinx has joined #ruby
AGreyCrane has joined #ruby
meatherl_ has joined #ruby
lolmaus has joined #ruby
oo_ has joined #ruby
meatherly has quit [Read error: Connection reset by peer]
Lightsword has joined #ruby
aspires has quit []
thomasxie has joined #ruby
flowerhack has joined #ruby
omosoj has quit [Ping timeout: 240 seconds]
mrmargolis has quit [Remote host closed the connection]
cescalante is now known as ce_afk
io_syl has joined #ruby
codeurge has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
rkazak has quit [Quit: rkazak]
sevenseacat has joined #ruby
sevenseacat has left #ruby [#ruby]
sevenseacat has joined #ruby
<Lightsword> I'm encoding information in serial numbers but am not sure how to use regex to extract the encoded information, the last 6 digits encode special numbers that I need to capture, the first 3 and last 3 of those 6 are what I need, leading 0's in the sets of 3 need to be stripped, here's an example of what I'm trying to capture https://gist.github.com/jameshilliard/003e23cf34aa6fa1e1ae
Jnco has quit [Quit: Jnco]
MZAWeb_ has joined #ruby
<Lightsword> I know how to capture them individually but am not sure how to strip the leading zeros
shanlar- has joined #ruby
mrmargolis has joined #ruby
<Dysruption> you don’t really need regex
<Dysruption> do you?
<Lightsword> I figured that would be the easiest way
tkuchiki has joined #ruby
<Lightsword> or at least the most condensed
<Dysruption> just get last 6 digits, split it into 3, then remove 0s in the front
hl has quit [Ping timeout: 255 seconds]
shanlar has quit [Read error: Connection reset by peer]
<Dysruption> possible using regex for last step
<Lightsword> is there a way to do that in a singe regex experession for each set of 3?
hl_ has joined #ruby
hl_ is now known as hl
<Dysruption> with 001 as an input?
<Dysruption> for example
aspires has joined #ruby
<Lightsword> yeah
zastern_ has joined #ruby
<shevy> yeah
<shevy> I forgot the syntax though
<Dysruption> me too
<arrubin> >> "001".to_i
<eval-in_> arrubin => 1 (https://eval.in/149758)
<Dysruption> ha
<Dysruption> boom
LexicalScope has quit [Ping timeout: 276 seconds]
<shevy> perhaps ... (\d\d\d){3,}
<shevy> but probably not :-)
<Lightsword> well, if there is a trailing zero it needs to be captured so I can't just limit it do 1-9
<arrubin> >> "001" =~ s/^0+//
<eval-in_> arrubin => /tmp/execpad-dbc22bea699c/source-dbc22bea699c:2: syntax error, unexpected '^' ... (https://eval.in/149759)
e^0 has quit [Quit: WeeChat 0.4.3]
<arrubin> Apparently Ruby differs from Perl here.
combusean has quit [Ping timeout: 276 seconds]
<Lightsword> I've noticed ruby regex has a few quirks to it
tekmaster has joined #ruby
Soulcutter has joined #ruby
Deele has quit [Ping timeout: 255 seconds]
tsunamie has quit [Ping timeout: 255 seconds]
Caius has quit [Ping timeout: 255 seconds]
zastern has quit [Ping timeout: 255 seconds]
kitak_ has joined #ruby
davidcollom_zzz has joined #ruby
<arrubin> >> "001".sub /^0+/, ''
<eval-in_> arrubin => "1" (https://eval.in/149760)
JStoker has quit [Killed (hobana.freenode.net (Nickname regained by services))]
<arrubin> to_i seems preferrable.
kies has joined #ruby
JStoker has joined #ruby
Hanmac1 has quit [Ping timeout: 252 seconds]
Hanmac has joined #ruby
jonahR has joined #ruby
netf has quit [Ping timeout: 255 seconds]
barratt has quit [Ping timeout: 255 seconds]
soulcake has quit [Ping timeout: 255 seconds]
netf has joined #ruby
tekacs has quit [Ping timeout: 255 seconds]
Sou|cutter has quit [Ping timeout: 255 seconds]
davidcollom has quit [Ping timeout: 255 seconds]
davidcollom_zzz is now known as davidcollom
tekmaster is now known as tekacs
soulcake has joined #ruby
Rahul_Roy has quit [Quit: Connection closed for inactivity]
barratt has joined #ruby
tsunamie has joined #ruby
Deele has joined #ruby
mjs2600 has quit [Remote host closed the connection]
mikepack has joined #ruby
ZeroCool has joined #ruby
<ZeroCool> sup noobs.
soulcake has quit [Changing host]
soulcake has joined #ruby
<ZeroCool> i am Z3r0C00L
<ZeroCool> i'm programming in c. what programming language are you noobs usign?
r0bby has joined #ruby
<ZeroCool> ZeroCool out.
ZeroCool has left #ruby [#ruby]
robustus has quit [Ping timeout: 264 seconds]
robbyoconnor has quit [Ping timeout: 240 seconds]
aiguu has joined #ruby
hakunin has quit []
hakunin has joined #ruby
hakunin has quit [Remote host closed the connection]
hakunin has joined #ruby
binaryhat has quit [Quit: Leaving]
moted has joined #ruby
robustus has joined #ruby
benzrf is now known as benzrf|offline
sambao21 has quit [Quit: Computer has gone to sleep.]
mjuszczak has joined #ruby
moted has quit [Client Quit]
mr_snowf1ake has joined #ruby
bakflash has joined #ruby
codeurge has quit [Quit: Quit.]
r0bby has quit [Ping timeout: 240 seconds]
flowerhack has quit [Read error: Connection reset by peer]
codeurge has joined #ruby
timonv has joined #ruby
flowerhack has joined #ruby
codeurge_ has joined #ruby
meinside has quit [Read error: Connection reset by peer]
meinside has joined #ruby
diegoviola has joined #ruby
codeurge has quit [Ping timeout: 240 seconds]
ixti has joined #ruby
sunya7a has joined #ruby
fgo has joined #ruby
MZAWeb_ has quit [Ping timeout: 245 seconds]
i_s has joined #ruby
<shadoi> kinda lol'd
timonv has quit [Ping timeout: 265 seconds]
Nexus_x1__ has quit [Quit: Computer has gone to sleep.]
codabrink has quit [Ping timeout: 255 seconds]
lw has joined #ruby
sunya7a has quit [Ping timeout: 240 seconds]
ddv has quit [Ping timeout: 245 seconds]
fgo has quit [Ping timeout: 250 seconds]
ddv has joined #ruby
dsdeiz has joined #ruby
razrunelord has joined #ruby
hgl has joined #ruby
danshultz has joined #ruby
spyderman4g63 has joined #ruby
zorak8 has quit [Ping timeout: 264 seconds]
alexju has joined #ruby
razrunelord has quit [Ping timeout: 250 seconds]
KAO has joined #ruby
matchaw_ has quit [Ping timeout: 258 seconds]
matchaw has joined #ruby
momomomomo has quit [Quit: momomomomo]
<shevy> what a wimp
raspberry has joined #ruby
Nexus_x1__ has joined #ruby
railsbro__ has joined #ruby
shadoi1 has joined #ruby
mikepack_ has joined #ruby
wldcordeiro|2 has joined #ruby
fella7s has joined #ruby
dnordstro has joined #ruby
senayar has joined #ruby
ndngvr has joined #ruby
gjvc_ has joined #ruby
i_s_ has joined #ruby
ta_ has joined #ruby
ItSANgo_ has joined #ruby
yfeldblu_ has joined #ruby
LadyRainicorn has quit [Ping timeout: 252 seconds]
aiguu_ has joined #ruby
sepp2k1 has joined #ruby
terrellt has joined #ruby
Royalb15_1 has joined #ruby
benzrf|offline is now known as benzrf
jpinnix_____ has joined #ruby
alol_ has joined #ruby
popl_ has joined #ruby
popl_ has joined #ruby
freerobby1 has joined #ruby
charles81__ has joined #ruby
bjeanes_ has joined #ruby
julian-delphiki has joined #ruby
eataix_ has joined #ruby
codeurge_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maZtah_ has joined #ruby
popl has quit [Disconnected by services]
popl_ is now known as popl
vcoinminer____ has joined #ruby
dmoe_____ has joined #ruby
hermanmu_ has joined #ruby
eval-in__ has joined #ruby
jonahR has quit [Remote host closed the connection]
hakunin_ has joined #ruby
justinmcp_ has joined #ruby
_zxq9_ has joined #ruby
ta has quit [Read error: Connection reset by peer]
i_s has quit [Read error: Connection reset by peer]
aep has quit [Ping timeout: 240 seconds]
banister has quit [Read error: Connection reset by peer]
terrell_t has quit [Read error: Connection reset by peer]
hamakn has quit [Remote host closed the connection]
sepp2k has quit [Ping timeout: 240 seconds]
jumblemuddle has quit [Ping timeout: 240 seconds]
freerobby has quit [Read error: Connection reset by peer]
eataix has quit [Ping timeout: 240 seconds]
verto has quit [Ping timeout: 240 seconds]
mikepack has quit [Ping timeout: 240 seconds]
shadoi has quit [Ping timeout: 240 seconds]
quantsini_ has quit [Ping timeout: 240 seconds]
ClarusCogitatio has quit [Ping timeout: 240 seconds]
ndngvr` has quit [Ping timeout: 240 seconds]
charles81_ has quit [Ping timeout: 240 seconds]
bjeanes has quit [Ping timeout: 240 seconds]
jrdnull has quit [Ping timeout: 240 seconds]
banister has joined #ruby
flughafen has quit [Ping timeout: 240 seconds]
cjk101010 has quit [Ping timeout: 240 seconds]
wldcordeiro has quit [Ping timeout: 240 seconds]
devdazed has quit [Ping timeout: 240 seconds]
dmoe____ has quit [Ping timeout: 240 seconds]
elico has quit [Ping timeout: 240 seconds]
hairyhenderson has quit [Ping timeout: 240 seconds]
ejnahc has quit [Ping timeout: 240 seconds]
mpajor_op5 has quit [Ping timeout: 240 seconds]
Jamo has quit [Ping timeout: 240 seconds]
mr_snowf1ake has quit [Ping timeout: 240 seconds]
justinmcp has quit [Quit: No Ping reply in 180 seconds.]
qubit has quit [Ping timeout: 240 seconds]
WormDrink has quit [Ping timeout: 240 seconds]
zxq9 has quit [Ping timeout: 240 seconds]
helpa has quit [Ping timeout: 240 seconds]
Riking has quit [Ping timeout: 240 seconds]
fumduq has quit [Ping timeout: 240 seconds]
eval-in_ has quit [Ping timeout: 240 seconds]
optiz0r has quit [Ping timeout: 240 seconds]
nomadic has quit [Ping timeout: 240 seconds]
cba has quit [Ping timeout: 240 seconds]
canton7 has quit [Ping timeout: 240 seconds]
willb1 has quit [Ping timeout: 240 seconds]
ptierno has quit [Ping timeout: 240 seconds]
Bish has quit [Quit: ZNC - http://znc.sourceforge.net]
segv has quit [Ping timeout: 240 seconds]
kmwhite has quit [Ping timeout: 240 seconds]
phreax has joined #ruby
graft_ has joined #ruby
drager_ has joined #ruby
bjeanes_ is now known as bjeanes
sambao21 has joined #ruby
matchaw_ has joined #ruby
LiquidIn1ect has joined #ruby
eataix_ is now known as eataix
helpa has joined #ruby
ejnahc has joined #ruby
Nowaker has joined #ruby
zarul[afk] has joined #ruby
xxi has joined #ruby
divbell has joined #ruby
dmoe_____ is now known as dmoe____
sputnik13 has joined #ruby
optiz0r has joined #ruby
hairyhenderson has joined #ruby
bean has quit [Read error: Connection reset by peer]
senayar_ has quit [Read error: Connection reset by peer]
dnordstrom has quit [Read error: Connection reset by peer]
aiguu has quit [Read error: Connection reset by peer]
gjvc has quit [Read error: Connection reset by peer]
Royalb15 has quit [Read error: Connection reset by peer]
SlvrDragn has quit [Ping timeout: 276 seconds]
vcoinminer___ has quit [Ping timeout: 276 seconds]
Derander has quit [Ping timeout: 276 seconds]
machete has quit [Ping timeout: 276 seconds]
guyz has quit [Ping timeout: 276 seconds]
alol has quit [Ping timeout: 276 seconds]
redondos has quit [Excess Flood]
matchaw has quit [Quit: No Ping reply in 180 seconds.]
yfeldblum has quit [Ping timeout: 276 seconds]
nwkr has quit [Ping timeout: 276 seconds]
hermanmunster has quit [Ping timeout: 276 seconds]
Solnse has quit [Ping timeout: 276 seconds]
drager has quit [Ping timeout: 276 seconds]
sj__ has quit [Ping timeout: 276 seconds]
sputnik1_ has quit [Ping timeout: 276 seconds]
divbell_ has quit [Ping timeout: 276 seconds]
graft has quit [Ping timeout: 276 seconds]
cHarNe2 has quit [Ping timeout: 276 seconds]
maZtah has quit [Ping timeout: 276 seconds]
_m_g_ has joined #ruby
jpinnix____ has quit [Ping timeout: 276 seconds]
ItSAN____ has quit [Ping timeout: 276 seconds]
ixx has quit [Ping timeout: 276 seconds]
xargoon has quit [Ping timeout: 276 seconds]
phreax_ has quit [Ping timeout: 276 seconds]
elektronaut has quit [Ping timeout: 276 seconds]
akosednar has quit [Ping timeout: 276 seconds]
LiquidInsect has quit [Ping timeout: 276 seconds]
hakunin has quit [Ping timeout: 276 seconds]
snath has quit [Ping timeout: 276 seconds]
vt102 has quit [Ping timeout: 276 seconds]
jmbrown412 has quit [Ping timeout: 276 seconds]
njs126 has quit [Ping timeout: 276 seconds]
fella6s has quit [Ping timeout: 276 seconds]
cwc has quit [Ping timeout: 276 seconds]
railsbro_ has quit [Ping timeout: 276 seconds]
zarul has quit [Ping timeout: 276 seconds]
go|dfish has quit [Ping timeout: 276 seconds]
devyn has quit [Ping timeout: 276 seconds]
sarlalian has quit [Ping timeout: 276 seconds]
Xuerian has quit [Ping timeout: 276 seconds]
avelldiroll has quit [Ping timeout: 276 seconds]
cHarNe2 has joined #ruby
joast has quit [Ping timeout: 276 seconds]
larsam has quit [Ping timeout: 276 seconds]
Jamo_ has joined #ruby
kmwhite has joined #ruby
mpajor_op5 has joined #ruby
alol_ is now known as alol
Xuerian has joined #ruby
crazysim has quit [Excess Flood]
snath has joined #ruby
qubit has joined #ruby
devyn has joined #ruby
jpinnix_____ is now known as jpinnix____
rkazak has joined #ruby
ptierno has joined #ruby
sonofgam1keeper has quit [Ping timeout: 252 seconds]
zorak8 has joined #ruby
Derander has joined #ruby
Bish_ has joined #ruby
fumduq has joined #ruby
maZtah_ is now known as maZtah
vcoinminer____ is now known as vcoinminer___
devdazed has joined #ruby
michaeldeol has joined #ruby
Royalb15 has joined #ruby
Royalb15 has quit [Remote host closed the connection]
akosednar has joined #ruby
elektronaut has joined #ruby
quantsini has joined #ruby
xargoon has joined #ruby
jumblemuddle has joined #ruby
oo_ has quit [Remote host closed the connection]
machete has joined #ruby
ClarusCogitatio has joined #ruby
LadyRainicorn has joined #ruby
aep has joined #ruby
cwc has joined #ruby
cjk101010 has joined #ruby
digifiv5e has joined #ruby
digifiv5e is now known as Guest4165
segv has joined #ruby
nomadic has joined #ruby
verto has joined #ruby
momomomomo has joined #ruby
jrdnull has joined #ruby
flowerhack has quit [Remote host closed the connection]
flowerhack has joined #ruby
lethjakman has joined #ruby
Riking has joined #ruby
raspberryfan has joined #ruby
flowerha_ has joined #ruby
flowerhack has quit [Remote host closed the connection]
oo_ has joined #ruby
tyll_ has joined #ruby
zylophone has joined #ruby
crazysim has joined #ruby
<zylophone> why might passenger prematurely close the connection?
hamakn has joined #ruby
<zylophone> trying to get gitlab to work on nginx with it, but hitting the signin page is fine, but as soon as i fill in the credentials, i get a 502, with the nginx error that upstream has prematurely closed the connectino
flughafen has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
cba has joined #ruby
mr_snowf1ake has joined #ruby
WormDrink has joined #ruby
hamakn has joined #ruby
tyll has quit [Ping timeout: 255 seconds]
Avahey_ has joined #ruby
go|dfish has joined #ruby
Dysruption has quit [Quit: Dysruption]
willb1 has joined #ruby
combusean has joined #ruby
njs126 has joined #ruby
vt102 has joined #ruby
meatherl_ has quit [Remote host closed the connection]
elico has joined #ruby
avelldiroll has joined #ruby
LadyRainicorn has quit [Ping timeout: 252 seconds]
Cache_Money has joined #ruby
sarlalian has joined #ruby
Solnse has joined #ruby
lethjakman has quit [Ping timeout: 245 seconds]
braincra- has joined #ruby
flowerha_ has quit [Remote host closed the connection]
redondos has joined #ruby
<dideler> i came across the following in a rakefile: system %(cd #{project} && #{$0} test:isolated)
flowerhack has joined #ruby
<dideler> what does the %() mean? a substitute for a string?
braincrash has quit [Ping timeout: 250 seconds]
havenwood has joined #ruby
phutchins has quit [Ping timeout: 264 seconds]
agrinb has quit [Remote host closed the connection]
<benzrf> dideler: string literal
<benzrf> > %/sdfjsdoifjsodifj/
<benzrf> >> %/sdfjsdoifjsodifj/
sepp2k1 has quit [Read error: Connection reset by peer]
<eval-in__> benzrf => "sdfjsdoifjsodifj" (https://eval.in/149773)
<benzrf> >> %[sdfjsdoifjsodifj]
<eval-in__> benzrf => "sdfjsdoifjsodifj" (https://eval.in/149774)
<benzrf> >> %(sdfjsdoifjsodifj)
<eval-in__> benzrf => "sdfjsdoifjsodifj" (https://eval.in/149775)
rkazak has quit [Quit: rkazak]
<benzrf> perl-style
<zylophone> gotta love perl
omosoj has joined #ruby
LadyRainicorn has joined #ruby
<shevy> ewwww
<shevy> what an unreadable piece of shit
<zylophone> you've never come across regex then
nwertman has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
flowerhack has quit [Read error: Connection reset by peer]
flowerhack has joined #ruby
<zylophone> bah, passenger can't be prematurely closing the connection due to lack of memory :(
<dideler> benzrf: thanks
eighthbit has joined #ruby
sensen has joined #ruby
rostam has quit [Remote host closed the connection]
LexicalScope has joined #ruby
havenwood has quit [Ping timeout: 272 seconds]
flowerha_ has joined #ruby
rostam has joined #ruby
flowerhack has quit [Ping timeout: 245 seconds]
nari has joined #ruby
Guest99774 is now known as Affix
Affix has joined #ruby
Affix has quit [Changing host]
alexju has quit [Remote host closed the connection]
zylophone has quit [Quit: leaving]
b00stfr3ak has quit [Ping timeout: 250 seconds]
sunya7a has joined #ruby
fgo has joined #ruby
codabrink has joined #ruby
flowerhack has joined #ruby
dseitz has joined #ruby
radic has quit [Ping timeout: 264 seconds]
sunya7a has quit [Ping timeout: 250 seconds]
fgo has quit [Ping timeout: 255 seconds]
skysploit has joined #ruby
skysploit has joined #ruby
skysploit has quit [Changing host]
codeurge has joined #ruby
havenwood has joined #ruby
troyreadyyy has joined #ruby
flowerha_ has quit [Ping timeout: 252 seconds]
radic has joined #ruby
codabrink has quit [Ping timeout: 240 seconds]
eighthbit has quit [Ping timeout: 240 seconds]
troyreadyy has quit [Ping timeout: 250 seconds]
razrunelord has joined #ruby
agrinb has joined #ruby
closures999 has joined #ruby
closures999 has quit [Remote host closed the connection]
closures999 has joined #ruby
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
Lightsword_ has joined #ruby
x1337807x has joined #ruby
Lightsword has quit [Ping timeout: 255 seconds]
Lightsword_ is now known as Lightsword
razrunelord has quit [Ping timeout: 258 seconds]
closures999 has quit [Client Quit]
wldcordeiro|2 has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
wldcordeiro has joined #ruby
danshultz has quit [Ping timeout: 250 seconds]
mclee has joined #ruby
northfurr has quit [Quit: northfurr]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
combusean has quit [Ping timeout: 240 seconds]
Nexus_x1__ has quit [Quit: Lingo - http://lingoirc.com]
combusean has joined #ruby
Hanmac1 has joined #ruby
aspiers has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
agrinb has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 252 seconds]
flowerhack has quit [Remote host closed the connection]
KAO has quit [Ping timeout: 264 seconds]
Cache_Money has quit [Quit: Cache_Money]
aspiers has joined #ruby
fantasticsid has joined #ruby
i_s_ has quit [Remote host closed the connection]
x1337807x has joined #ruby
zkay11 has quit [Ping timeout: 265 seconds]
yacks has joined #ruby
Matix has joined #ruby
mogwaidesign has joined #ruby
<mogwaidesign> hey
<mogwaidesign> hey i am trying to install grunt on windows 7
<mogwaidesign> is version 2
<mogwaidesign> a no no
<mogwaidesign> do i need 1.93?
zkay11 has joined #ruby
speakingcode has joined #ruby
alexju has joined #ruby
braincra- has quit [Quit: bye bye]
chipotle has joined #ruby
Matip has quit [Ping timeout: 240 seconds]
rkazak_ has joined #ruby
braincrash has joined #ruby
zarul[afk] has quit [Remote host closed the connection]
kies has quit [Ping timeout: 250 seconds]
speakingcode has quit [Quit: Lost terminal]
zarul has joined #ruby
zarul has quit [Changing host]
zarul has joined #ruby
havenwood has quit []
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lightsword has quit [Ping timeout: 245 seconds]
combusean has quit [Ping timeout: 258 seconds]
Lightsword has joined #ruby
zcreative has joined #ruby
timonv has joined #ruby
mjs2600 has joined #ruby
benzrf is now known as benzrf|offline
gorpon has joined #ruby
LBRapid has quit [Ping timeout: 240 seconds]
lfox has quit [Ping timeout: 240 seconds]
speakingcode has joined #ruby
DarkFoxDK has quit [Ping timeout: 240 seconds]
mr_snowf1ake has quit [Ping timeout: 258 seconds]
Nightmare has quit [Ping timeout: 240 seconds]
timonv has quit [Ping timeout: 245 seconds]
hoelzro has quit [Ping timeout: 252 seconds]
mjs2600 has quit [Ping timeout: 264 seconds]
krz has joined #ruby
meatherly has joined #ruby
benzrf|offline has quit [Ping timeout: 252 seconds]
io_syl has quit []
meatherly has quit [Read error: Connection reset by peer]
okinomo_away is now known as okinomo
meatherly has joined #ruby
fantasticsid has quit [Ping timeout: 255 seconds]
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
Solnse has quit [Read error: Connection reset by peer]
Hanmac has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Hanmac1 has quit [Ping timeout: 255 seconds]
oo_ has quit [Remote host closed the connection]
agjacome has quit [Quit: leaving]
meatherly has quit [Ping timeout: 240 seconds]
memorozovm has joined #ruby
oo_ has joined #ruby
sunya7a has joined #ruby
fgo has joined #ruby
codabrink has joined #ruby
zkay11 has quit [Ping timeout: 250 seconds]
oo_ has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 240 seconds]
sunya7a has quit [Ping timeout: 250 seconds]
aspires has quit []
codabrink has quit [Ping timeout: 240 seconds]
aspires has joined #ruby
KAO has joined #ruby
LadyRainicorn has quit [Ping timeout: 265 seconds]
HashNuke has joined #ruby
fella5s has joined #ruby
Shidash has quit [Ping timeout: 265 seconds]
fgo has joined #ruby
benzrf has quit [Ping timeout: 276 seconds]
freerobby1 has quit [Quit: Leaving.]
razrunelord has joined #ruby
yakko has quit [Ping timeout: 252 seconds]
fella7s has quit [Ping timeout: 258 seconds]
yakko has joined #ruby
trhodes- has joined #ruby
trhodes_ has quit [Ping timeout: 264 seconds]
codabrink has joined #ruby
combusean has joined #ruby
mary5030 has quit [Remote host closed the connection]
razrunelord has quit [Ping timeout: 264 seconds]
benzrf|offline has joined #ruby
codabrink has quit [Ping timeout: 252 seconds]
Hobogrammer_ has joined #ruby
benzrf|offline is now known as benzrf
LadyRainicorn has joined #ruby
jack_rabbit has joined #ruby
Hobogrammer has quit [Ping timeout: 258 seconds]
momomomomo has quit [Quit: momomomomo]
combusean has quit [Ping timeout: 250 seconds]
shadoi1 has quit [Quit: Leaving.]
mary5030 has joined #ruby
benzrf has quit [Ping timeout: 250 seconds]
silky__ has quit [Ping timeout: 252 seconds]
bubbajones has quit [Ping timeout: 250 seconds]
sambao21 has joined #ruby
bubbajones has joined #ruby
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
s2013 has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
fantasticsid has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
mrmargolis has quit [Remote host closed the connection]
Hanmac has joined #ruby
tkuchiki_ has joined #ruby
mehlah has quit [Quit: Leaving...]
omosoj has quit [Ping timeout: 240 seconds]
bluOxigen has joined #ruby
mikepack_ has quit [Remote host closed the connection]
thomasxie has quit [Quit: Leaving.]
tkuchiki has quit [Ping timeout: 240 seconds]
wmoxam_ has quit [Quit: leaving]
wmoxam has joined #ruby
KAO has quit [Ping timeout: 264 seconds]
silky__ has joined #ruby
LexicalScope` has joined #ruby
wookiehangover has joined #ruby
LexicalScope has quit [Ping timeout: 240 seconds]
ixti has quit [Ping timeout: 245 seconds]
alpha123 has quit [Ping timeout: 240 seconds]
Norrin has quit [Ping timeout: 252 seconds]
Megtastique has quit []
skysploit has quit [Remote host closed the connection]
nevans has quit [Ping timeout: 264 seconds]
Burgestrand has joined #ruby
diegoviola has quit [Ping timeout: 245 seconds]
hoelzro has joined #ruby
LBRapid has joined #ruby
DarkFoxDK has joined #ruby
Nightmare has joined #ruby
lfox has joined #ruby
centrx has quit [Quit: All this computer hacking is making me thirsty]
okinomo is now known as okinomo_away
Norrin has joined #ruby
gorpon has quit [Quit: Konversation terminated!]
meatherly has joined #ruby
narcan has joined #ruby
io_syl has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
tkuchiki has joined #ruby
combusean has joined #ruby
except has joined #ruby
jack_rabbit has quit [Ping timeout: 265 seconds]
davedev24_ has quit [Remote host closed the connection]
pen has joined #ruby
davedev24 has joined #ruby
s2013 has quit [Ping timeout: 240 seconds]
diegoviola has joined #ruby
mary5030 has quit [Remote host closed the connection]
meatherly has quit [Ping timeout: 245 seconds]
flowerhack has joined #ruby
KAO has joined #ruby
torresga has quit [Quit: torresga]
sski has joined #ruby
sunya7a has joined #ruby
anaeem1_ has joined #ruby
davedev24 has quit [Ping timeout: 264 seconds]
pen has quit [Ping timeout: 240 seconds]
diegoviola has quit [Quit: WeeChat 0.4.3]
benzrf has quit [Ping timeout: 276 seconds]
Hanmac1 has joined #ruby
Megtastique has joined #ruby
Morkel has joined #ruby
sunya7a has quit [Ping timeout: 258 seconds]
Hanmac has quit [Ping timeout: 265 seconds]
fgo has quit [Remote host closed the connection]
Burgestrand has quit [Quit: Burgestrand]
lukec has joined #ruby
Lightsword has quit [Ping timeout: 252 seconds]
blueOxigen has joined #ruby
bbloom has joined #ruby
arrubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bluOxigen has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
benzrf|offline has joined #ruby
rkazak_ has quit [Quit: rkazak_]
razrunelord has joined #ruby
heftig has quit [Quit: Quitting]
freerobby1 has joined #ruby
pen has joined #ruby
codabrink has joined #ruby
combusean has quit [Ping timeout: 250 seconds]
freerobby has quit [Ping timeout: 276 seconds]
razrunelord has quit [Ping timeout: 258 seconds]
freerobby1 has quit [Ping timeout: 240 seconds]
codabrink has quit [Ping timeout: 245 seconds]
billy_ran_away has quit [Ping timeout: 276 seconds]
kies has joined #ruby
bakflash has quit [Ping timeout: 252 seconds]
mikepack has joined #ruby
AliRezaTaleghani has joined #ruby
AliRezaTaleghani has quit [Client Quit]
virtualize has joined #ruby
sinkensabe has joined #ruby
billy_ran_away has joined #ruby
aganov has joined #ruby
proxie has quit [Ping timeout: 264 seconds]
Lightsword has joined #ruby
mikepack has quit [Ping timeout: 240 seconds]
diegoviola has joined #ruby
tobago has joined #ruby
yacks has quit [Ping timeout: 252 seconds]
skysploit has joined #ruby
JasmeetQA has joined #ruby
lukec has quit [Quit: lukec]
zkay11 has joined #ruby
combusean has joined #ruby
benzrf has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
chipotle has quit [Quit: cya]
aspires has quit []
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
blueOxigen has quit [Ping timeout: 255 seconds]
KAO has quit [Ping timeout: 265 seconds]
Megtastique has quit []
fantazo has joined #ruby
michaeldeol has joined #ruby
benzrf has quit [Ping timeout: 250 seconds]
timonv has quit [Ping timeout: 245 seconds]
oo_ has joined #ruby
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
fgo has joined #ruby
bluOxigen has joined #ruby
gstamp has joined #ruby
benzrf has quit [Ping timeout: 250 seconds]
blueOxigen has joined #ruby
aspiers has quit [Ping timeout: 258 seconds]
zcreative has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
bluOxigen has quit [Read error: No route to host]
Avahey_ has quit [Quit: Connection closed for inactivity]
aspiers has joined #ruby
mjs2600 has joined #ruby
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
mjs2600 has quit [Ping timeout: 245 seconds]
ktun has joined #ruby
sqwirl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
meatherly has joined #ruby
bluOxigen has joined #ruby
JBreit has joined #ruby
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
LexicalScope has joined #ruby
JBreit has left #ruby [#ruby]
skysploit has quit []
meatherly has quit [Ping timeout: 240 seconds]
LexicalScope` has quit [Ping timeout: 252 seconds]
crucify_me has joined #ruby
crucify_me has quit [Remote host closed the connection]
blueOxigen has quit [Ping timeout: 276 seconds]
raspberryfan has quit [Remote host closed the connection]
raspberryfan has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
tagrudev has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sunya7a has joined #ruby
aspiers has quit [Ping timeout: 252 seconds]
rshetty has joined #ruby
JasmeetQA1 has joined #ruby
lw has quit [Quit: s]
mercwithamouth has joined #ruby
raspberry has quit [Ping timeout: 240 seconds]
rshetty has quit [Client Quit]
raspberryfan has quit [Ping timeout: 255 seconds]
JasmeetQA has quit [Ping timeout: 245 seconds]
rshetty has joined #ruby
sinkensabe has quit [Remote host closed the connection]
nanoyak has joined #ruby
xcesariox has joined #ruby
sinkensabe has joined #ruby
sunya7a has quit [Ping timeout: 258 seconds]
michaeldeol has joined #ruby
Olipro has joined #ruby
sinkensabe has quit [Ping timeout: 240 seconds]
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
benzrf has quit [Ping timeout: 245 seconds]
michaeldeol has quit [Ping timeout: 258 seconds]
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
razrunelord has joined #ruby
freerobby has joined #ruby
codabrink has joined #ruby
RohanRNS has quit [Quit: Connection closed for inactivity]
Matix has quit [Quit: Leaving]
razrunelord has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
subraminion has joined #ruby
freerobby has quit [Ping timeout: 240 seconds]
crucify_me has joined #ruby
blueOxigen has joined #ruby
dumdedum has joined #ruby
codabrink has quit [Ping timeout: 264 seconds]
bluOxigen has quit [Ping timeout: 252 seconds]
zkay11 has left #ruby [#ruby]
mengu has joined #ruby
<crucify_me> http://pastie.org/9167582 hi with a hash like this when you have the block arguments |count_hash, word| is the key argument always second?
nanoyak has quit [Quit: Computer has gone to sleep.]
meatherly has joined #ruby
<crucify_me> ^ this returns {"ruby" => 3} etc.
timonv has quit [Remote host closed the connection]
Burgestrand has joined #ruby
except has quit [Ping timeout: 252 seconds]
crucify_me is now known as n_blownapart
meatherly has quit [Read error: Connection reset by peer]
meatherly has joined #ruby
mrmargolis has joined #ruby
raspberry has joined #ruby
raspberryfan has joined #ruby
hermanmu_ has quit [Remote host closed the connection]
Macaveli has joined #ruby
yacks has joined #ruby
KAO has joined #ruby
Mon_Ouie has quit [Ping timeout: 252 seconds]
meatherly has quit [Ping timeout: 258 seconds]
sinkensabe has joined #ruby
predator217 has quit [Ping timeout: 258 seconds]
hermanmu_ has joined #ruby
predator117 has joined #ruby
<popl> n_blownapart: your answer is in the documentation for Enumerable#inject
jackneill has joined #ruby
mrmargolis has quit [Ping timeout: 264 seconds]
Cork has quit [Ping timeout: 260 seconds]
except has joined #ruby
KAO has quit [Ping timeout: 240 seconds]
bal has joined #ruby
supershabam has left #ruby [#ruby]
bluOxigen has joined #ruby
frosgy has quit [Ping timeout: 258 seconds]
kiri has joined #ruby
Cork has joined #ruby
timonv has joined #ruby
m_3 has quit [Ping timeout: 252 seconds]
froy has quit [Ping timeout: 252 seconds]
froy has joined #ruby
Darryl has joined #ruby
nevans has joined #ruby
m_3 has joined #ruby
except has quit [Ping timeout: 252 seconds]
mercwithamouth has quit [Ping timeout: 240 seconds]
blueOxigen has quit [Ping timeout: 258 seconds]
<popl> n_blownapart: are you trying to create a hash from the paired array elements?
benzrf has quit [Ping timeout: 258 seconds]
<n_blownapart> I guess the enumerable is coming in as a string. I was curious about line 3 popl
<popl> did you read the documentation?
blueOxigen has joined #ruby
Hobogrammer_ has quit [Read error: Connection reset by peer]
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
<n_blownapart> where [word] is acting as the index, it never occurred to me that a key in a key/value pair was notated like an index, if that is indeed correct. popl sorry I got sidetracked.
Hobogrammer_ has joined #ruby
bluOxigen has quit [Read error: No route to host]
bluOxigen has joined #ruby
noop has joined #ruby
railsbro__ has quit [Quit: Leaving]
<n_blownapart> popl: but thanks for your time.. I gotta go
n_blownapart has quit [Remote host closed the connection]
blueOxigen has quit [Ping timeout: 240 seconds]
anarang has joined #ruby
bluOxigen has quit [Read error: No route to host]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bluOxigen has joined #ruby
frosgy has joined #ruby
roshanavand has joined #ruby
alem0lars has joined #ruby
cina has joined #ruby
jimbauds has quit [Quit: Leaving]
KAO has joined #ruby
meatherly has joined #ruby
Alina-malina has quit [Ping timeout: 240 seconds]
alem0lars has quit [Client Quit]
alexju has quit [Remote host closed the connection]
lolmaus has quit [Read error: Connection reset by peer]
blueOxigen has joined #ruby
alem0lars has joined #ruby
kiri has quit [Ping timeout: 245 seconds]
KAO has quit [Ping timeout: 265 seconds]
meatherly has quit [Ping timeout: 252 seconds]
bluOxigen has quit [Ping timeout: 252 seconds]
claymore has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
bigkevmcd has joined #ruby
Xeago has joined #ruby
sunya7a has joined #ruby
yacks has quit [Remote host closed the connection]
jprovazn has joined #ruby
sensen has quit [Ping timeout: 255 seconds]
kiri has joined #ruby
cina has quit [Quit: leaving]
ktun has joined #ruby
apeiros has quit [Ping timeout: 265 seconds]
flowerhack has quit [Remote host closed the connection]
sinkensa_ has joined #ruby
sunya7a has quit [Ping timeout: 258 seconds]
sinkensabe has quit [Read error: Connection reset by peer]
<vali> morning
benzrf has quit [Ping timeout: 240 seconds]
xcesariox has quit [Quit: Textual IRC Client: www.textualapp.com]
hermanmu_ has quit [Remote host closed the connection]
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
hermanmunster has joined #ruby
freerobby has joined #ruby
flowerhack has joined #ruby
virtualize has quit [Read error: Connection reset by peer]
virtualize has joined #ruby
twiceday has joined #ruby
alem0lars has quit [Quit: Going AFK...]
razrunelord has joined #ruby
hermanmunster has quit [Ping timeout: 240 seconds]
ggl has joined #ruby
klaut has joined #ruby
twiceaday has quit [Ping timeout: 258 seconds]
freerobby has quit [Ping timeout: 255 seconds]
alem0lars has joined #ruby
hermanmunster has joined #ruby
codabrink has joined #ruby
cina has joined #ruby
DouweM has quit [Ping timeout: 255 seconds]
hermanmunster has quit [Read error: Connection reset by peer]
hermanmu_ has joined #ruby
razrunelord has quit [Ping timeout: 265 seconds]
alem0lars has quit [Client Quit]
mjs2600 has joined #ruby
benzrf has quit [Ping timeout: 252 seconds]
LexicalScope has quit [Ping timeout: 252 seconds]
rshetty has quit [Remote host closed the connection]
mjs2600 has quit [Remote host closed the connection]
rshetty has joined #ruby
rshetty_ has joined #ruby
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
codabrink has quit [Ping timeout: 240 seconds]
sensen has joined #ruby
fantazo has quit [Ping timeout: 245 seconds]
alem0lars has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
AlexRussia has quit [Read error: Connection reset by peer]
AlexRussia has joined #ruby
rshetty has quit [Ping timeout: 258 seconds]
raspberryfan has quit [Remote host closed the connection]
benzrf has quit [Ping timeout: 255 seconds]
raspberryfan has joined #ruby
raspberryfan has quit [Remote host closed the connection]
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
raspberryfan has joined #ruby
arturaz has joined #ruby
obobobok has joined #ruby
mrmargolis has joined #ruby
zigomir has joined #ruby
chipotle has joined #ruby
mrmargolis has quit [Ping timeout: 265 seconds]
CorpusCallosum has quit [Quit: Computer has gone to sleep.]
fabrice31 has joined #ruby
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lightsword has quit [Ping timeout: 252 seconds]
ayaz has joined #ruby
sinkensa_ has quit [Remote host closed the connection]
sinkensabe has joined #ruby
raspberryfan has quit [Remote host closed the connection]
raspberryfan has joined #ruby
alem0lars has quit [Quit: Going AFK...]
lxsameer has joined #ruby
combusean has quit [Ping timeout: 240 seconds]
sinkensa_ has joined #ruby
canton7 has joined #ruby
benzrf has quit [Ping timeout: 255 seconds]
Alina-malina has joined #ruby
sinkensabe has quit [Read error: Connection reset by peer]
AlexRussia has quit [Ping timeout: 245 seconds]
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
LiohAu has joined #ruby
meatherly has joined #ruby
apeiros has joined #ruby
AlexRussia has joined #ruby
Lightsword has joined #ruby
brtdv has joined #ruby
charliesome has joined #ruby
benzrf has quit [Ping timeout: 250 seconds]
alem0lars has joined #ruby
benzrf|offline has joined #ruby
meatherly has quit [Ping timeout: 252 seconds]
benzrf|offline is now known as benzrf
alem0lars has quit [Client Quit]
timonv has quit [Remote host closed the connection]
agjacome has joined #ruby
raspberryfan has quit [Remote host closed the connection]
subraminion has quit [Read error: Connection reset by peer]
subraminion_ has joined #ruby
raspberryfan has joined #ruby
Rahul_Roy has joined #ruby
sunya7a has joined #ruby
raspberryfan has quit [Remote host closed the connection]
raspberryfan has joined #ruby
benzrf has quit [Ping timeout: 240 seconds]
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
CorpusCallosum has joined #ruby
sunya7a has quit [Ping timeout: 258 seconds]
alem0lars has joined #ruby
mogwaidesign has quit [Quit: Leaving]
qba73 has joined #ruby
skaflem has joined #ruby
freerobby has joined #ruby
chipotle has quit [Quit: cya]
benzrf has quit [Ping timeout: 252 seconds]
subraminion_ has quit [Quit: Computer has gone to sleep.]
LadyRainicorn has quit [Read error: Connection reset by peer]
benzrf|offline has joined #ruby
LadyRainicorn has joined #ruby
benzrf|offline is now known as benzrf
razrunelord has joined #ruby
freerobby has quit [Ping timeout: 252 seconds]
aetaric has joined #ruby
hermanmu_ has quit [Remote host closed the connection]
moritzs has joined #ruby
AlSquire has joined #ruby
AlSquire has quit [Remote host closed the connection]
razrunelord has quit [Ping timeout: 240 seconds]
hermanmunster has joined #ruby
Hobogrammer_ has quit [Ping timeout: 250 seconds]
_Andres has joined #ruby
benzrf has quit [Ping timeout: 240 seconds]
XThief has joined #ruby
sski has quit [Remote host closed the connection]
codabrink has joined #ruby
hermanmunster has quit [Ping timeout: 264 seconds]
benzrf|offline has joined #ruby
io_syl has quit []
benzrf|offline is now known as benzrf
sk87 has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
LadyRainicorn has quit [Read error: Connection reset by peer]
LadyRainicorn has joined #ruby
ghr has joined #ruby
danijoo has joined #ruby
sinkensa_ has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
sinkensabe has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
subraminion_ has joined #ruby
subraminion_ has quit [Remote host closed the connection]
rshetty_ has quit [Remote host closed the connection]
subraminion_ has joined #ruby
rshetty has joined #ruby
nvrch has joined #ruby
Sonofgamekeeper has joined #ruby
sinkensabe has quit [Ping timeout: 264 seconds]
joonty has joined #ruby
larsam has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
oo_ has quit [Remote host closed the connection]
ikaros has joined #ruby
rshetty has quit [Ping timeout: 276 seconds]
qba73 has quit []
agjacome has quit [Quit: leaving]
subraminion_ has quit [Quit: Lingo - http://lingoirc.com]
subraminion has joined #ruby
sk87 has joined #ruby
oo_ has joined #ruby
timonv has joined #ruby
grzywacz has joined #ruby
blackmesa has joined #ruby
moritzs has quit [Ping timeout: 252 seconds]
_zxq9_ has quit [Quit: Konversation terminated!]
_zxq9_ has joined #ruby
_zxq9_ is now known as zxq9
zxq9 has quit [Client Quit]
zxq9 has joined #ruby
meatherly has joined #ruby
XThief has quit [Quit: XThief]
Sonofgamekeeper has quit [Ping timeout: 240 seconds]
benzrf has quit [Ping timeout: 252 seconds]
codabrink has quit [Ping timeout: 245 seconds]
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
meatherly has quit [Ping timeout: 252 seconds]
wallerdev has quit [Quit: wallerdev]
olivier_bK has joined #ruby
einarj has joined #ruby
sunya7a has joined #ruby
heftig has joined #ruby
marr has joined #ruby
oo_ has quit [Remote host closed the connection]
sinkensabe has joined #ruby
obs has joined #ruby
oo_ has joined #ruby
dANOKELOFF has joined #ruby
sheepman has joined #ruby
sunya7a has quit [Ping timeout: 250 seconds]
blackmesa has quit [Quit: WeeChat 0.4.3]
shevy has quit [Read error: Connection reset by peer]
obs_ has joined #ruby
rshetty has joined #ruby
freerobby has joined #ruby
bean has joined #ruby
craigp has joined #ruby
andrewlio has joined #ruby
julian-delphiki has quit [Ping timeout: 264 seconds]
XThief has joined #ruby
claymore has quit [Quit: Leaving]
razrunelord has joined #ruby
freerobby has quit [Ping timeout: 240 seconds]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
lkba has quit [Ping timeout: 252 seconds]
sheepman has quit [Quit: ZNC - http://znc.in]
frobrob has joined #ruby
razrunelord has quit [Ping timeout: 265 seconds]
sheepman has joined #ruby
rdark has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
lxsameer has quit [Quit: Leaving]
decoponio has joined #ruby
timonv has quit [Read error: No route to host]
mjs2600 has joined #ruby
shevy has joined #ruby
ta has joined #ruby
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ta_ has quit [Ping timeout: 265 seconds]
AlSquire has joined #ruby
sqwirl has joined #ruby
mjs2600 has quit [Ping timeout: 258 seconds]
vlad_starkov has joined #ruby
gjvc_ is now known as gjvc
mrmargolis has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
VinceThePrince has joined #ruby
mengu has quit [Remote host closed the connection]
mrmargolis has quit [Ping timeout: 265 seconds]
cina has quit [Ping timeout: 245 seconds]
cina has joined #ruby
alem0lars has quit [Quit: Going AFK...]
Aaaal has joined #ruby
mehlah has joined #ruby
VinceThePrince has quit [Read error: Connection reset by peer]
kyb3r_ has joined #ruby
VinceThePrince has joined #ruby
VinceThePrince has quit [Remote host closed the connection]
nari has quit [Ping timeout: 245 seconds]
sevenseacat has quit [Quit: Leaving.]
cina has quit [Remote host closed the connection]
XThief has quit [Quit: XThief]
moritzs has joined #ruby
alem0lars has joined #ruby
timonv has joined #ruby
Macaveli has joined #ruby
cina has joined #ruby
nvrch has quit [Quit: nvrch]
kitak_ has quit [Read error: Connection reset by peer]
kitak_ has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.3]
sensen has quit [Ping timeout: 245 seconds]
wiscas has joined #ruby
meatherly has joined #ruby
codabrink has joined #ruby
HashNuke has quit [Quit: Connection closed for inactivity]
pessimis_ has joined #ruby
hai has joined #ruby
pessimis_ has left #ruby [#ruby]
<hai> I was able to evaluate ruby code fine in irb (2.1.1), but all of a sudden it just stopped evaluating
<hai> it goes to the next line, I see the numbers increment
<hai> it started at line :053
<hai> nvm, it was on " mode, sorry about that
workmad3 has joined #ruby
sensen has joined #ruby
meatherly has quit [Ping timeout: 276 seconds]
benzrf has quit [Ping timeout: 265 seconds]
tjsousa has joined #ruby
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
obobobok has quit [Quit: Ex-Chat]
moritzs has quit [Ping timeout: 252 seconds]
nari has joined #ruby
shiin has joined #ruby
sunya7a has joined #ruby
robbyoconnor has joined #ruby
<apeiros> hai: it pays to not use simple-prompt. the prompt shows you whether you're in a continued expression
ctp has joined #ruby
<apeiros> hai: also consider using pry instead of irb ;-)
sqwirl has quit [Ping timeout: 245 seconds]
<hai> apeiros, thanks
Martxel has joined #ruby
hai has quit [Quit: Leaving]
_justin has joined #ruby
sunya7a has quit [Ping timeout: 258 seconds]
nfk has joined #ruby
Macaveli has quit [Read error: No route to host]
vlad_starkov has quit [Remote host closed the connection]
Connie has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mercwithamouth has joined #ruby
tatsuya_o has joined #ruby
Lightsword has quit [Ping timeout: 264 seconds]
ben3 has joined #ruby
freerobby has joined #ruby
codabrink has quit [Ping timeout: 258 seconds]
benzrf has quit [Ping timeout: 264 seconds]
razrunelord has joined #ruby
freerobby has quit [Ping timeout: 255 seconds]
benzrf|offline has joined #ruby
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
benzrf|offline is now known as benzrf
joost_like_toast has joined #ruby
mengu has quit [Ping timeout: 258 seconds]
subraminion has quit [Quit: Computer has gone to sleep.]
razrunelord has quit [Ping timeout: 258 seconds]
mikepack has joined #ruby
nvrch has joined #ruby
mikepack has quit [Ping timeout: 255 seconds]
cina has quit [Quit: leaving]
ggl has quit [Quit: Page closed]
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
sinkensabe has quit [Remote host closed the connection]
sinkensabe has joined #ruby
lxsameer has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
alem0lars has quit [Quit: alem0lars]
Macaveli has joined #ruby
nari has quit [Ping timeout: 258 seconds]
bakflash has joined #ruby
subraminion has joined #ruby
subraminion has quit [Client Quit]
subraminion has joined #ruby
sinkensabe has quit [Ping timeout: 255 seconds]
Xeago has quit [Remote host closed the connection]
jilk23 has joined #ruby
Dreamer3 has joined #ruby
skinkitten has joined #ruby
<skinkitten> is there any bad input, error handling guides?
mercwithamouth has quit [Ping timeout: 265 seconds]
enricostn has joined #ruby
<skinkitten> I want this to be just the first two lines http://www.pasteall.org/51542/rails
MZAWeb_ has joined #ruby
lkba has joined #ruby
sinkensabe has joined #ruby
<apeiros> skinkitten: begin; …code which raises…; rescue => exception; puts "#{exception.class}: #{exception.message}\n #{exception.backtrace.first}"; end
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<skinkitten> tried that, could have done it wrong, giving it another go
memorozovm has quit [Remote host closed the connection]
<skinkitten> its a helper method that is throwing the error, could I be missing something?
tsunamie has quit [Max SendQ exceeded]
<apeiros> exceptions are raised, not thrown. throw is a separate thing in ruby.
<apeiros> yes, you could be missing something. no idea what, from what you've showed.
tsunamie has joined #ruby
chrisseaton has joined #ruby
JacobHayes has quit []
nari has joined #ruby
alex88 has joined #ruby
oo_ has quit [Remote host closed the connection]
<skinkitten> thanks apeiros its works
phoo1234567 has joined #ruby
meatherly has joined #ruby
narendraj9 has joined #ruby
adammcarth has joined #ruby
VTLob has joined #ruby
<adammcarth> is there a common way of removing if statements from code?
<enricostn> hi there, can anyone please share some resource that illustrates how we can use "first/rest" aka "head/tail" recursively for an Enumerable?
jujui has joined #ruby
<enricostn> For instance how to split (partition) an Array like [1, 2, 3] in [1, 2] and [3] based on a predicate like element == 2
XThief has joined #ruby
nari has quit [Ping timeout: 240 seconds]
jxf has quit [Ping timeout: 240 seconds]
diegoviola has quit [Remote host closed the connection]
meatherly has quit [Ping timeout: 240 seconds]
oo_ has joined #ruby
brtdv has quit []
tatsuya__ has joined #ruby
tatsuya_o has quit [Ping timeout: 265 seconds]
kyb3r_ has quit [Read error: Connection reset by peer]
sunya7a has joined #ruby
davedev24 has joined #ruby
<Hanmac1> enricostn: like that?
<Hanmac1> >> [1, 2, 3].each_slice(2).to_a
<eval-in__> Hanmac1 => [[1, 2], [3]] (https://eval.in/149959)
setra has joined #ruby
<enricostn> Hanmac1, thanks but my predicate is more complex than el == 2
<enricostn> imagine an array of objects
<workmad3> enricostn: hmm, closest I can find is '.slice_before'
<Hanmac1> >> [1, 2, 3, 4, 5, 6].partition.with_index {|_,i| i < 2}
<eval-in__> Hanmac1 => [[1, 2], [3, 4, 5, 6]] (https://eval.in/149961)
Hanmac1 is now known as Hanmac
<enricostn> I assume that the array is ordered
<workmad3> >> ['a', 'b', 'c', 'd', 'e'].slice_before{|a| a == 'c'}.to_a
<eval-in__> workmad3 => [["a", "b"], ["c", "d", "e"]] (https://eval.in/149962)
<enricostn> mh interesting
<Hanmac> workmad3: for unkown reason i didnt got #slice_before working with #with_index
<workmad3> Hanmac: I don't think indices have anything to do with this though :)
<Hanmac> hm yeah but slice_before.with_index does not work :/
nvrch has quit [Quit: nvrch]
sunya7a has quit [Ping timeout: 245 seconds]
<workmad3> Hanmac: works fine for me
<workmad3> >> [1,2,3,4].slice_before(3).with_index.to_a
<eval-in__> workmad3 => [[[1, 2], 0], [[3, 4], 1]] (https://eval.in/149963)
<workmad3> >> [1,2,3,4].slice_before{|a| a == 3}.with_index.to_a
<eval-in__> workmad3 => [[[1, 2], 0], [[3, 4], 1]] (https://eval.in/149964)
<Hanmac> hm yeah but this does not work:
<Hanmac> >>['a', 'b', 'c', 'd', 'e'].slice_before.with_index{|a, i| i == 2}.to_a
<eval-in__> Hanmac => wrong number of arguments (0 for 1) (ArgumentError) ... (https://eval.in/149965)
<workmad3> Hanmac: no, because you can't call slice_before without a param
sinkensa_ has joined #ruby
moritzs has joined #ruby
tjsousa_ has joined #ruby
sinkensabe has quit [Read error: Connection reset by peer]
tjsousa_ has quit [Remote host closed the connection]
tjsousa_ has joined #ruby
tjsousa has quit [Read error: Connection reset by peer]
<workmad3> Hanmac: you'd need to do '.each.with_index.slice_before{|a, i| i == 2}'
codabrink has joined #ruby
benzrf has quit [Ping timeout: 255 seconds]
Blaze_Boy has joined #ruby
Sonofgamekeeper has joined #ruby
tjsousa__ has joined #ruby
tjsousa__ has quit [Remote host closed the connection]
freerobby has joined #ruby
tjsousa__ has joined #ruby
tjsousa_ has quit [Read error: Connection reset by peer]
mr_snowf1ake has joined #ruby
Marfu has joined #ruby
<AntelopeSalad> hey workmad3, you're the only person i know using puma, have you upgraded to 2.8.x?
<Marfu> hello
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
<Marfu> I'm looking for easy media player lib
<workmad3> AntelopeSalad: I'm using 2.8.2 on my current project
<AntelopeSalad> workmad3: me too, have you tried sending a USR2 to it lately?
<workmad3> AntelopeSalad: no, I'm using usr1 for phased restarts nowadays
Shidash has joined #ruby
blueOxigen has quit [Ping timeout: 258 seconds]
<AntelopeSalad> workmad3: i'm noticing with 2 workers in cluster mode the workers always die when i try
<AntelopeSalad> then it just gets stuck in some unresponsive state with a master+no workers
<AntelopeSalad> are you sending this exact command? kill -s SIGUSR1 <pid of master>?
tjsousa___ has joined #ruby
<workmad3> AntelopeSalad: no, I'm using runit
brtdv has joined #ruby
tjsousa___ has quit [Remote host closed the connection]
adamholt_ is now known as adamholt
tjsousa__ has quit [Read error: Connection reset by peer]
freerobby has quit [Ping timeout: 252 seconds]
tjsousa___ has joined #ruby
<AntelopeSalad> what is runit sending to it?
razrunelord has joined #ruby
CorpusCallosum has quit [Quit: Computer has gone to sleep.]
memorozovm has joined #ruby
<workmad3> AntelopeSalad: tbh, I haven't checked that... but sending a usr2 manually to my 2.8.2 service did a graceful shutdown and restart fine
<AntelopeSalad> did you try accessing the server or looking at the output of ps?
<enricostn> workmad3, what if I need to include the "pivot" element too? e.g. [1, 2, 3].slice_before{ |a| a == 2 }.to_a => [[1, 2], [3]]
<workmad3> AntelopeSalad: I looked at the log file
hermanmunster has joined #ruby
<workmad3> AntelopeSalad: and then accessed the server
<AntelopeSalad> what ruby version or are you using and how many workers are you running?
<workmad3> enricostn: as I said, slice_before was the closest I found, but it put the 'pivot' on the wrong side (it is slice *before* after all, not slice after, which annoyingly doesn't seem to exist)
<enricostn> yep
mr_snowf1ake has quit [Ping timeout: 250 seconds]
<workmad3> AntelopeSalad: I'm using ruby 2.1.1 with puma 2.8.2 and 2 workers with up to 32 threads each
<workmad3> AntelopeSalad: on ubuntu 14.04
<enricostn> would be interesting to see how we could achieve this using first/rest recursively
razrunelord has quit [Ping timeout: 258 seconds]
<AntelopeSalad> workmad3: 0/32?
<workmad3> AntelopeSalad: yeah
fabrice31 has quit [Remote host closed the connection]
jackneill has quit [Remote host closed the connection]
<AntelopeSalad> hmm our env is pretty close to the same, i wonder what's going on
memorozovm has quit [Ping timeout: 240 seconds]
sensen has quit [Quit: leaving]
<workmad3> AntelopeSalad: https://gist.github.com/workmad3/3857a29aabd585ed6308 here's my puma config
Martxel has quit [Read error: Connection reset by peer]
<AntelopeSalad> mine is the same
Martxel has joined #ruby
dANOKELOFF has quit [Remote host closed the connection]
mr_snowf1ake has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
<AntelopeSalad> the only difference is i have my restart command set to call a systemv action
canton7-mac has joined #ruby
<workmad3> AntelopeSalad: hmm... isn't that kinda important though as a USR2 will restart using that command?
mjs2600 has joined #ruby
badhatter^ has quit [Ping timeout: 252 seconds]
<AntelopeSalad> maybe, i'm provisioning a server now to try it with a modified restart command
<AntelopeSalad> but you're saying i should be using USR1?
nfk has quit [Ping timeout: 252 seconds]
<AntelopeSalad> since USR2 is a typical full blown restart?
fabrice31 has joined #ruby
<workmad3> AntelopeSalad: well, if you want a phased, 0-downtime restart then yeah
nfk has joined #ruby
<workmad3> AntelopeSalad: usr2 is a graceful, hot restart
<workmad3> AntelopeSalad: usr1 is a phased restart which always leaves at least 1 worker available for handling requests
Marfu has left #ruby ["Wychodzi"]
<AntelopeSalad> workmad3: what's the difference between usr2 and just sending QUIT then starting?
<workmad3> AntelopeSalad: thinking about it, either could be using the restart command... I've not investigated tbh
sooik has joined #ruby
fantasticsid has quit [Ping timeout: 252 seconds]
Xeago has joined #ruby
<workmad3> AntelopeSalad: a hot restart doesn't drop connections, but it can leave them hanging while the new workers boot
<AntelopeSalad> and a QUIT+start will 502?
<workmad3> AntelopeSalad: a quit/start (or normal restart) cycle will drop connections and will also end up with a 404 or 500 on any connections coming in (or, if you're hitting puma directly, the browser will say the server isn't there)
oo_ has quit [Remote host closed the connection]
mjs2600 has quit [Ping timeout: 250 seconds]
nicoulaj has joined #ruby
<AntelopeSalad> hmm, but a usr2 will fully reload the env on the master/processes -- as in, there's no reason to ever quit+start?
spinx is now known as spinx^
<AntelopeSalad> unless maybe you wanted to upgrade puma itself?
Aaaal has quit [Quit: Aaaal]
<workmad3> I haven't investigated that fully, tbh
<workmad3> but it sounds reasonable
oo_ has joined #ruby
<AntelopeSalad> i was trolling through gitlab's configs and they never USR2'd, they always did a quit/start for their restart
craigp has quit [Remote host closed the connection]
<workmad3> heh :)
<AntelopeSalad> they are using unicorn but i figured both servers are similar (even tho their implementation is much different with diff pros/cons)
<AntelopeSalad> it's still "load a master then have workers do stuff"
<workmad3> ah, but unicorn doesn't have threaded workers
<workmad3> it has a master, and then worker processes
Aaaal has joined #ruby
<workmad3> and you have to handle a 0-downtime restart in a slightly different manner
<AntelopeSalad> from their script it seemed to be the same as puma, just send a USR1
<workmad3> yes, which gets the current unicorn master to spawn a new master process
<workmad3> but, last time I checked, it *doesn't* kill the old master, because that master lacks the ability to know when the new master is available for requests
craigp has joined #ruby
<AntelopeSalad> how does it know to die off?
Sonofgamekeeper has quit [Ping timeout: 264 seconds]
<workmad3> it doesn't
<AntelopeSalad> they are not running anything like runit/monit to check
<workmad3> that's kinda what I said
mrmargolis has joined #ruby
<AntelopeSalad> wouldn't it know based on the workers of the new master?
<workmad3> the old master can't do anything with the new master's workers
<AntelopeSalad> like "if new master spawned workers and workers are ready then old master can retire?"
<workmad3> not if the new workers aren't preloading the app
<AntelopeSalad> btw i noticed in your config that you're not using redis, have you experimenting with putting redis disconnects in the worker boot block?
<AntelopeSalad> *experimented
<workmad3> no, because I don't use redis
Centime has joined #ruby
ziyadb_ has quit [Quit: Connection closed for inactivity]
<Centime> Hi. After installing compass on archlinux, I have this error : Unfortunately, a fatal error has occurred. Please see the Bundler troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
<Centime> /usr/lib/ruby/2.1.0/tmpdir.rb:85:in `mkdir': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError)
<Centime> Permission denied @ dir_s_mkdir - ./.gem.20140512-16872-1sxsujf
<Centime> I'm new to ruby enviromnent, and I really don't know what it means
<canton7-mac> Centime, looks like you don't have write permissions to your currently directory?
mr_snowf1ake has quit [Ping timeout: 252 seconds]
<Centime> Sure I have
<AntelopeSalad> workmad3: ok thanks, going to test it now -- gl puma
<canton7-mac> can you create the folder it fails to create?
tatsuya_o has joined #ruby
mrmargolis has quit [Ping timeout: 252 seconds]
mr_snowf1ake has joined #ruby
_m_g_ has quit [Ping timeout: 276 seconds]
<Centime> Yes, and I even set the rights to 777 then
<Centime> We're talking about /usr/lib/ruby/2.1.0 right ?
Martxel has quit [Read error: Connection reset by peer]
<canton7> no. the current working dir
gheegh has quit [Ping timeout: 264 seconds]
<workmad3> which may change
tatsuya__ has quit [Ping timeout: 252 seconds]
Martxel has joined #ruby
<Centime> How can I know the current directory at the time of the call ?
shiin has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Marfu has joined #ruby
codabrink has quit [Ping timeout: 245 seconds]
<Marfu> is any working example with audio player ?
chrisramon has joined #ruby
<AntelopeSalad> workmad3: well, USR2 crashes puma with a bad file descriptor error
<AntelopeSalad> but USR1 does kick off a phased restart according to the output of puma "stopping PID for phased upgrade... TERM sent to PID"
_m_g_ has joined #ruby
toretore has joined #ruby
Aaaal has quit [Quit: Aaaal]
robbyoconnor has quit [Ping timeout: 240 seconds]
<workmad3> AntelopeSalad: does the server then restart and come back up?
postmodern has quit [Quit: Leaving]
<AntelopeSalad> on the USR1? yes it's all good
<AntelopeSalad> on the USR2? nope, the puma process completely crashes out
<AntelopeSalad> i ran it in the foreground to check
<AntelopeSalad> puma-2.8.2/lib/puma/binder.rb:290:in `for_fd': Bad file descriptor - fstat(2) (Errno::EBADF)
aiguu_ has quit [Ping timeout: 255 seconds]
sooik has quit [Ping timeout: 252 seconds]
troulouliou_dev has joined #ruby
Martxel has quit [Quit: Leaving]
_Andres has quit [Read error: Connection reset by peer]
sooik has joined #ruby
<skinkitten> can I return different output depending if the method was called directly or another method has called it?
sputnik1_ has joined #ruby
dangerousdave has joined #ruby
<apeiros> skinkitten: you could. but it's a rather bad idea.
AGreyCrane has quit [Quit: This computer has gone to sleep]
mr_snowf1ake has quit [Ping timeout: 252 seconds]
Marfu has quit [Quit: Wychodzi]
<skinkitten> hm
<apeiros> Kernel#caller_locations, #caller and __callee__ contain information about the calling method
<apeiros> use parametrization instead
* workmad3 wonders what the difference is between 'called directly' and 'another method called it' is
<toretore> hah
<apeiros> workmad3: I bet it's in a script context
<apeiros> i.e. toplevel method call
obs has quit [Remote host closed the connection]
akonny has joined #ruby
meatherly has joined #ruby
AlexRussia has quit [Read error: Connection reset by peer]
<skinkitten> parametrization? like method (a, option=false)
timonv has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
claymore has joined #ruby
<apeiros> skinkitten: yes
benzrf has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
tvw has joined #ruby
<AntelopeSalad> workmad3: kind of curious, in that restart_command is it smart enough to use the ENV that was passed to it when you started the actual process initially?
<workmad3> AntelopeSalad: pass? :)
<skinkitten> thanks, the case is Class.new('w').method1 or Class.new('w').method2 which calls method1 using its output in a different way.
<AntelopeSalad> yeah, like if you had chef set the environment to start the puma service
<AntelopeSalad> you wouldn't need to source the env again before bundle exec'ing puma in its restart_command?
meatherly has quit [Ping timeout: 265 seconds]
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
yfeldblum has quit [Ping timeout: 255 seconds]
tatsuya_o has quit []
flowerhack has quit [Ping timeout: 265 seconds]
<apeiros> skinkitten: that's not really an explanation of your use-case ;-)
dANOKELOFF has joined #ruby
SlvrDragn has joined #ruby
robbyoconnor has joined #ruby
andrewlio has quit [Ping timeout: 240 seconds]
_m_g_ has quit [Ping timeout: 276 seconds]
chrisseaton has quit []
sunya7a has joined #ruby
fukuyamaken has quit [Remote host closed the connection]
fukuyamaken has joined #ruby
tjsousa___ has quit [Quit: Lingo - http://lingoirc.com]
<skinkitten> I'm taking method2 out of the class. Class.new('w').method1 returns default output. method2 creates a new instance of that class, calling method 1 but receiving different output.
<skinkitten> sorry is this clearer?
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
_m_g_ has joined #ruby
Martxel has joined #ruby
<skinkitten> calling method 1 with the default parameter changed so it releases the output wanted.
chrisseaton has joined #ruby
SlvrDragn has quit [Ping timeout: 276 seconds]
_m_g_ is now known as SlvrDragn
Martxel has quit [Client Quit]
sunya7a has quit [Ping timeout: 252 seconds]
Martxel has joined #ruby
subraminion has quit [Quit: Computer has gone to sleep.]
<toretore> skinkitten: sounds like a stupid thing to do
subraminion has joined #ruby
shvelo has joined #ruby
karupa is now known as zz_karupa
kirun has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
XThief has quit [Quit: XThief]
arturaz has quit [Quit: Leaving]
benzrf has quit [Ping timeout: 264 seconds]
govind has joined #ruby
grzywacz has quit [Ping timeout: 240 seconds]
govind has quit [Remote host closed the connection]
benzrf|offline has joined #ruby
<skinkitten> toretore, go enlighten me.
benzrf|offline is now known as benzrf
robbyoconnor has quit [Excess Flood]
<toretore> can you show some real code?
ker2x has joined #ruby
robbyoconnor has joined #ruby
<shevy> I don't even understand what you are trying to do
<ker2x> friendly greetings ! anyone playing with ragel ? i have a problem with a token followed by a space, it include the space and i can't find any reason why the space is included (space as a single token is recognized correctly)
sambao21 has joined #ruby
andrewlio has joined #ruby
sooik has quit [Ping timeout: 265 seconds]
<ker2x> same for every defined token excepted the last one before EOF which is correct
sepp2k has joined #ruby
Connie has joined #ruby
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby
momomomomo has joined #ruby
subraminion has quit [Read error: Connection reset by peer]
nari has joined #ruby
subraminion has joined #ruby
mikepack has joined #ruby
prc has left #ruby [#ruby]
thesheff17 has quit [Ping timeout: 255 seconds]
ixti has joined #ruby
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
sooik has joined #ruby
mr_snowf1ake has joined #ruby
Asher has quit [Quit: Leaving.]
mikepack has quit [Ping timeout: 276 seconds]
Connie has quit [Disconnected by services]
Connie has joined #ruby
jilk23 has quit [Ping timeout: 245 seconds]
grzywacz has joined #ruby
rshetty has quit [Ping timeout: 276 seconds]
jilk23 has joined #ruby
<ker2x> :(
<apeiros> skinkitten: a use case explains *why* you want to do
jespada has joined #ruby
Morkel_ has joined #ruby
<apeiros> *what* you want to do you had explained before already (have different output from different call-sites)
Morkel has quit [Ping timeout: 276 seconds]
Morkel_ is now known as Morkel
baprath has joined #ruby
shredding has joined #ruby
robbyoconnor has quit [Ping timeout: 240 seconds]
chrisramon has quit [Quit: chrisramon]
Connie has quit [Disconnected by services]
<shevy> seems as if apeiros understood him
Connie has joined #ruby
mehlah has quit [Quit: Leaving...]
chipotle has joined #ruby
sk87 has joined #ruby
thesheff17 has joined #ruby
<shredding> Anyone happens to know how to localize page variables in middleman?
sevenseacat has joined #ruby
maximski has joined #ruby
codabrink has joined #ruby
bluOxigen has joined #ruby
baprath has quit [Ping timeout: 265 seconds]
oo_ has quit [Remote host closed the connection]
shiin_ has joined #ruby
shiin_ has quit [Client Quit]
oo_ has joined #ruby
fukuyamaken has quit [Remote host closed the connection]
maximski has quit [Client Quit]
raspberryfan has quit []
raspberry has quit [Quit: Leaving]
maximski has joined #ruby
shiin_ has joined #ruby
yalue has joined #ruby
shiin_ has quit [Client Quit]
_axx has left #ruby [#ruby]
shiin_ has joined #ruby
mehlah has joined #ruby
codabrink has quit [Ping timeout: 240 seconds]
narcan has joined #ruby
aiguu_ has joined #ruby
shiin_ has left #ruby [#ruby]
shiin has joined #ruby
AlexRussia has joined #ruby
maximski has quit [Client Quit]
doodlehaus has joined #ruby
LadyRainicorn has quit [Ping timeout: 252 seconds]
aiguu_ has quit [Ping timeout: 245 seconds]
LadyRainicorn has joined #ruby
Centime has quit [Ping timeout: 245 seconds]
nvrch has joined #ruby
danshultz has joined #ruby
razrunelord has joined #ruby
<skinkitten> apeiros, shevy ^^^^^
<shevy> ack
<shevy> what's that
sambao21 has quit [Ping timeout: 240 seconds]
<skinkitten> the code
<shevy> yeah toretore wanted it :)
<skinkitten> what I wanted to do
<shevy> hot_teen.rb
<skinkitten> you wanted it to be dirty.
<shevy> I need to bring things down to my level of understanding
<shevy> which is a rather low level
<skinkitten> :)
<shevy> a = -1
<skinkitten> I'll do my best
<shevy> ok that is weird
oo_ has quit [Remote host closed the connection]
<skinkitten> yes
flowerhack has joined #ruby
fukuyamaken has joined #ruby
sooik has quit [Ping timeout: 265 seconds]
oo_ has joined #ruby
sambao21 has joined #ruby
sumark_ has quit [Remote host closed the connection]
razrunelord has quit [Ping timeout: 276 seconds]
yfeldblum has joined #ruby
sumark has joined #ruby
kitak_ has quit [Remote host closed the connection]
saarinen has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
robbyoconnor has joined #ruby
Rainicorn has joined #ruby
dideler has quit [Ping timeout: 250 seconds]
benzrf has quit [Ping timeout: 240 seconds]
JasmeetQA1 has quit [Read error: Connection reset by peer]
<skinkitten> so what can I improve?
Asher has joined #ruby
<skinkitten> ort is it still unclear
yfeldblum has quit [Ping timeout: 240 seconds]
Aaaal has joined #ruby
LadyRainicorn has quit [Ping timeout: 245 seconds]
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
<shevy> oh it was not me who suggested to show code or come up with a use case
<shevy> unlike apeiros I did not understand what you want, and toretore seems to be silent as well now, probably in shock of seeing that code
<skinkitten> =D
<shevy> one thing I dont understand
<shevy> ScoreCalculator.new(a).git_score(options = true)
zorak8 has quit [Ping timeout: 255 seconds]
<shevy> why not have a class method, so you can avoid .new ?
flowerhack has quit [Remote host closed the connection]
<shevy> besides
<shevy> why is options set to true
<shevy> if you dont make use of that var lateron?
mr_snowf1ake has quit [Ping timeout: 250 seconds]
ldnunes has joined #ruby
<skinkitten> shevy, show me in code please
Aaaal has left #ruby [#ruby]
<shevy> huh
<shevy> you mean the class method?
<skinkitten> yes
Cymew has joined #ruby
<shevy> general syntax is
mr_snowf1ake has joined #ruby
<shevy> class Foo; def self.name_of_your_method_here(arguments_here); # now comes the code part, i.e. you may want to create a new instance of itself here; end; end
mjs2600_ has joined #ruby
mark_locklear has joined #ruby
sooik has joined #ruby
tjr9898 has joined #ruby
<toretore> skinkitten: ok, so what is the problem you're trying to fix with this code?
<shevy> lol toretore
<shevy> we are back to start again :)
<skinkitten> toretore, you guys are the experts
aviator7 has quit [Quit: Leaving]
Ardenzi has joined #ruby
<shevy> ok but who wrote the code!
<skinkitten> :)
paulfm has joined #ruby
<toretore> skinkitten: you were saying something earlier without showing the code. now that we have the code you have to explain what it is you're trying to do
Megtastique has joined #ruby
<skinkitten> I have the output in the pasteall, thats its.
spyderman4g63 has quit [Remote host closed the connection]
<Cymew> I'm trying to grab som data from a XML file. Can someone who knows Nokogiri tell me how I from the kind of data found in http://pastebin.com/47REuQDg can grab the IP number in that blob? I guess the css or xpath might help me, but I think I need some pointers on how to get at things beneath the Attribute level.
spyderman4g63 has joined #ruby
<skinkitten> now its just code education. with shevy toretore apeiros :)
<toretore> Cymew: yes, xpath would do it
<shevy> but from the three of us, only apeiros understood you
<skinkitten> shevy, I'm digesting that general syntax you mentioned. can you make it clearer?
<Cymew> toretore: ok, I'm on the right track at least
<toretore> "datumType"
<shevy> skinkitten, we have eval-in__ here
<shevy> >> class Foo; def self.bla; puts 'HI from bla'; end; end; Foo.bla
<eval-in__> shevy => HI from bla ... (https://eval.in/150057)
<shevy> so replace Foo with the name of your class
<shevy> also you may have to pass one or two arguments
<toretore> skinkitten: ok so you just want advice on the code in general?
<shevy> but you can assign default arguments too
<skinkitten> toretore, of course.
<skinkitten> toretore, wait
<skinkitten> toretore, advice that is specific to the code yes. improving the code yes. :)
<toretore> options = true
<skinkitten> it sucks doesn't help :)
<toretore> doesn't make any sense
<skinkitten> ok
chipotle has quit [Quit: cya]
<toretore> git_score(true)
<skinkitten> why?
_justin has quit [Quit: _justin]
<toretore> you are assigning a local variable
<skinkitten> yes
<toretore> if you see `options = true` in the docs it just means that `options` defaults to `true`
<skinkitten> right
workmad3 is now known as wm3|away
matled has quit [Remote host closed the connection]
<skinkitten> shevy, so make top_ten into self.ten_latest?
<shevy> skinkitten ohhh you copy pasted that from an example? :D
<shevy> it is your code
tkuchiki has quit [Ping timeout: 276 seconds]
<shevy> I can not tell you how to design it specifically because it was you who designed it; I can only tell you how it is done, the syntax etc...
<skinkitten> what example?
<shevy> you need to feel comfortable with your own APIs
<shevy> top_ten
<shevy> dunno
mjs2600_ has quit [Remote host closed the connection]
<shevy> why did you assign to a variable called options?
zorak8 has joined #ruby
frobrob has quit [Ping timeout: 250 seconds]
<skinkitten> so that ScoreCalculator.new('shevy').git_score works
<skinkitten> two ways to call git_score
<skinkitten> directly like that
<skinkitten> or getting the hot_ten
_justin has joined #ruby
<toretore> git_score from the paste doesn't take an argument
<skinkitten> which calls git_score for ten git ids
troulouliou_dev has joined #ruby
rails4444 has joined #ruby
<skinkitten> toretore, its optional
nvrch has quit [Quit: nvrch]
<alex88> in warden, after trying to authenticate an user, is there a way to clear the temporary data and try to authenticate again?
<alex88> since I've tried to authenticate an user, if it's not existing, create one from another user table, the problem is that when I make it try to authenticate again it doesn't searches for the user in the database again
<skinkitten> shevy, self.blah gets its arguments from where?
agrinb has joined #ruby
XThief has joined #ruby
vpretzel has joined #ruby
thesheff17 has quit [Ping timeout: 240 seconds]
Rojo has joined #ruby
rshetty has joined #ruby
mercwithamouth has joined #ruby
saarinen has quit [Quit: saarinen]
robbyoconnor has quit [Ping timeout: 258 seconds]
garndt has joined #ruby
thesheff17 has joined #ruby
<shevy> skinkitten just like any other argument to a method
<shevy> def foo(i = 'bla')
<shevy> def self.foo(i = 'bla')
fgo has quit []
<shevy> foo()
<shevy> foo('yo')
benzrf is now known as benzrf|offline
<shevy> Foo.foo('yo')
Asher has quit [Quit: Leaving.]
spyderma_ has joined #ruby
spyderma_ has quit [Remote host closed the connection]
spyderman4g63 has quit [Read error: No route to host]
<shevy> skinkitten btw for future pasties, it is easier to put the whole code into one file for pastie
spyderman4g63 has joined #ruby
<shevy> on https://gist.github.com/jsoto008/a3002606359ba47266ac I do not see git_score definition
<shevy> it's tedious to have to search for them
sambao21 has quit [Quit: Computer has gone to sleep.]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
mr_snowf1ake has quit [Quit: Leaving]
anaeem1_ has quit [Remote host closed the connection]
anaeem1_ has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
<skinkitten> my future pasties are set
benzrf|offline has quit [Ping timeout: 240 seconds]
s00pcan has quit [Quit: Lost terminal]
dblessing has joined #ruby
<skinkitten> i'll rearrange the code
sooik has quit [Ping timeout: 252 seconds]
AlexRussia has quit [Quit: Konversation terminated!Good bye!]
robbyoconnor has joined #ruby
sooik has joined #ruby
mehlah has quit [Ping timeout: 255 seconds]
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
_Andres has joined #ruby
_Andres has quit [Max SendQ exceeded]
atmosx has joined #ruby
maximski has joined #ruby
chipotle has joined #ruby
_Andres has joined #ruby
agrinb has quit [Remote host closed the connection]
cg433n has joined #ruby
chipotle has quit [Client Quit]
cg433n has quit [Client Quit]
roshanavand has quit [Quit: Gone!]
oo_ has quit [Remote host closed the connection]
agrinb has joined #ruby
chipotle has joined #ruby
saarinen has joined #ruby
Connie has quit [Ping timeout: 276 seconds]
robbyoconnor has quit [Ping timeout: 240 seconds]
chipotle has quit [Client Quit]
<ker2x> solved my ragel problem with a dirty trick, i don't understand why it happens
<ker2x> data[ts..te-1] <- eww
robbyoconnor has joined #ruby
kpshek has joined #ruby
cocotton has joined #ruby
_justin has quit [Quit: _justin]
cocotton has quit [Remote host closed the connection]
cocotton has joined #ruby
craigp has quit []
agrinb has quit [Remote host closed the connection]
Connie has joined #ruby
subraminion has quit [Quit: Computer has gone to sleep.]
mercerist has joined #ruby
robbyoconnor has quit [Excess Flood]
speakingcode has quit [Ping timeout: 250 seconds]
codabrink has joined #ruby
robbyoconnor has joined #ruby
robbyoconnor has joined #ruby
robbyoconnor has quit [Changing host]
cocotton has quit [Remote host closed the connection]
troulouliou_dev has quit [Quit: Leaving]
speakingcode has joined #ruby
_maes_ has joined #ruby
_justin has joined #ruby
shvelo has quit [Ping timeout: 258 seconds]
Xeago has quit [Remote host closed the connection]
AlexRussia has joined #ruby
Megtastique has quit []
Xeago has joined #ruby
kitak_ has joined #ruby
robbyoconnor has quit [Ping timeout: 258 seconds]
qwyeth has joined #ruby
grzywacz has quit [Ping timeout: 245 seconds]
freerobby has joined #ruby
shvelo has joined #ruby
robbyoconnor has joined #ruby
cocotton has joined #ruby
DouweM has joined #ruby
codabrink has quit [Ping timeout: 240 seconds]
saarinen has quit [Read error: Connection reset by peer]
Asher has joined #ruby
saarinen has joined #ruby
snath has quit [Ping timeout: 245 seconds]
relix has joined #ruby
BigTexasButters has joined #ruby
cocotton has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 240 seconds]
lukec has joined #ruby
BigTexasButters has quit [Client Quit]
mrmargolis has joined #ruby
yfeldblum has joined #ruby
benzrf has quit [Ping timeout: 245 seconds]
lxsameer has quit [Quit: Leaving]
except has joined #ruby
<skinkitten> shevy, shevy> why not have a class method, so you can avoid .new ?
<skinkitten> how would I create the instance
zorak8 has quit [Ping timeout: 265 seconds]
<skinkitten> don't understand
benzrf|offline has joined #ruby
benzrf|offline is now known as benzrf
XThief has quit [Quit: XThief]
dideler|work has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
badhatter has joined #ruby
treehug88 has joined #ruby
sooik has quit [Ping timeout: 250 seconds]
flowerhack has joined #ruby
jujui has quit [Quit: Page closed]
shredding has quit [Quit: shredding]
sambao21 has joined #ruby
devdazed has quit [Quit: Bye]
VinceThePrince has joined #ruby
memorozovm has joined #ruby
julian-delphiki has joined #ruby
chipotle has joined #ruby
sooik has joined #ruby
rshetty has quit [Ping timeout: 255 seconds]
tkuchiki has joined #ruby
chipotle has quit [Client Quit]
bean has quit [Ping timeout: 245 seconds]
mary5030 has joined #ruby
MZAWeb_ has quit [Ping timeout: 252 seconds]
Macaveli has quit [Ping timeout: 252 seconds]
VinceThePrince has quit [Client Quit]
no6 has joined #ruby
devdazed has joined #ruby
hermanmunster has quit [Remote host closed the connection]
beef-wellington has joined #ruby
kraljev6 has joined #ruby
cocotton has joined #ruby
hermanmunster has joined #ruby
<kraljev6> How come #uniq is not in Enumerable?
mary5030_ has joined #ruby
<apeiros> kraljev6: wondered about the same. but you can do .to_a.uniq
mehlah has joined #ruby
hermanmu_ has joined #ruby
jilk23 has quit [Quit: jilk23]
yairgo has joined #ruby
<kraljev6> but that's not just #uniq, plenty of other Array-only methods
no6 has quit [Ping timeout: 250 seconds]
memorozovm has quit []
Connie has quit [Changing host]
Connie has joined #ruby
adammcarth has quit []
wm3|away is now known as workmad3
mary5030 has quit [Ping timeout: 240 seconds]
bijan07077 has joined #ruby
<kraljev6> I have a feeling that Ruby is not well engineered, like Haskell or Scala are
zachallett has joined #ruby
hermanmunster has quit [Ping timeout: 240 seconds]
krz has quit [Quit: WeeChat 0.4.3]
<Hanmac> kraljev6: like sort! it wouldnt make much sense in Enumerable
sailias has joined #ruby
<apeiros> which others are you missing? there aren't exactly many which actually would make sense on enumerable
subraminion has joined #ruby
<apeiros> I think join is the only other I happened to miss on Enumerable
<cout> uniq is definitely one that doesn't make sense in Enumerable
<apeiros> I'm pretty sure Scala and Haskell have their offs/misses too
<apeiros> cout: disagree.
<cout> apeiros: well you're wrong!
subraminion has quit [Remote host closed the connection]
<apeiros> cout: it's easy to implement for Enumerable
subraminion_ has joined #ruby
subraminion_ has quit [Remote host closed the connection]
<cout> apeiros: what type should it return?
<apeiros> cout: Array
<cout> apeiros: ick
julian-delphiki has quit [Quit: Leaving]
Megtastique has joined #ruby
subraminion_ has joined #ruby
meatherly has joined #ruby
kitak has quit [Remote host closed the connection]
<apeiros> cout: you do realize that things like select/map return arrays, yes?
tylerkern has joined #ruby
<cout> apeiros: also ick :)
kitak has joined #ruby
<kraljev6> I miss #slice too
<apeiros> kraljev6: slice makes indeed no sense
<kraljev6> it would fit into Enumerable
<kraljev6> it does
<apeiros> slice requires positions
beef-wellington has quit [Ping timeout: 240 seconds]
<apeiros> an Enumerable doesn't have those
<kraljev6> skip first n, then take n
<apeiros> kraljev6: and now you've expressed it in terms of enumerable
subraminion_ has quit [Client Quit]
<kraljev6> exactly, therefore it should be there
<apeiros> cout: so you think #map, #select and friends should be removed from Enumerable?
<cout> apeiros: it's not how I would have designed it, no.
<apeiros> kraljev6: it'd be reduced in functionality. you can't handle e.g. negative arguments.
Sonofgamekeeper has joined #ruby
<apeiros> kraljev6: so it'd break expectation
<kraljev6> how about #reverse?
<kraljev6> if we have #revese_each
<kraljev6> already
<apeiros> kraljev6: reverse_each is not from Enumerable
<kraljev6> it is
subraminion has joined #ruby
lukec has quit [Quit: lukec]
<cout> apeiros: also they don't return Array; they return an enumerator.
<apeiros> hm, that's new
<kraljev6> ruby is a holly mess, php is unholy mess :P
<apeiros> curious on its limitations
<ker2x> kraljev6 :)
<apeiros> cout: wrong
mjs2600 has joined #ruby
<apeiros> >> (1..10).map { |x| x + 1 }.class
<eval-in__> apeiros => Array (https://eval.in/150077)
<DouweM> apeiros: #reverse_each does
<DouweM> apeiros: if that's what cout meant
<kraljev6> 2. why does reverse_each even exist? it should be .reverse.each {}
<apeiros> DouweM: we were talking #map, #select and friends
<DouweM> apeiros: yeah, I jumped in on the convo without reading it all, sorry
<apeiros> cout: only things without a block return Enumerator. and that's not just on Enumerable.
beef-wellington has joined #ruby
<Hanmac> kraljev6: image an enumerator with millons elements
phutchins has joined #ruby
<apeiros> cout: but I'm curious - so how would you have designed it? HOM style? (i.e. what .lazy.map does now)
<kraljev6> Hanmac, #reverse is enumerator, lazy
<kraljev6> it should be
<kraljev6> the same way #reverse_each is
<DouweM> kraljev6: not if you say .reverse.each, .reverse will return a reversed copy of the rray
<apeiros> kraljev6: that's inconsistent
nvrch has joined #ruby
<apeiros> kraljev6: if #reverse_each already returns an enumerator, why have a second method return the same?
<cout> apeiros: I would have required enumerables to also have a common interface for constructing a new enumerable
<cout> and appending to it
fantazo has joined #ruby
<kraljev6> ok, I just think #reverse_each is stupid, then we should also have #zip_each, #slice_each, #sort_each
<kraljev6> purely from that perspective
<cout> kraljev6: iirc #reverse_each pre-dates enumerator.
Rainicorn has quit [Ping timeout: 264 seconds]
shredding has joined #ruby
<kraljev6> great, then deprecate it
<Cymew> Nokogirir question. "<Attribute id="38286" definitionID="55" name="Monitored Address" datumType="String">192.168.1.50</Attribute>" is a node, and I can access it as a hash. So, how can I access the IP#? node['datumType'] gives me the "String", but how do I move beyond that?
grzywacz has joined #ruby
<Cymew> I'm missing something about how it works as a hash...
<Hanmac> apeiros: Enumerable#reverse_each generates an Array first
<workmad3> Cymew: node.text
<workmad3> Cymew: I thinxk
<workmad3> *think
<DouweM> Hanmac: that's a bit disappointing
kevind has joined #ruby
<apeiros> Hanmac: ah, was too busy to check the source. so it doesn't use self.pred or similar?
<apeiros> Hanmac: i.e. it just does .to_a.reverse_each?
<DouweM> apeiros: nope, straight #to_a and loop from length to 0
<apeiros> lol
<Hanmac> apeiros: nope :( pred is not used for Enumerable ... only Array.reverse_each is faster
<kraljev6> lol indeed
<apeiros> should have just dropped that
<DouweM> yeah that's a pointless addition
saarinen has quit [Quit: saarinen]
mary5030_ has quit [Remote host closed the connection]
centrx has joined #ruby
_justin has quit [Ping timeout: 245 seconds]
<kraljev6> we should make ruby right in 3.0 and for once not care for backwards compatibility
<workmad3> kraljev6: woo, lets make ruby 3.0 the same as python 3.0! practically unused...
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
<kraljev6> 1. remove duplicate metods, like #map, #collect, #flat_map, #collect_concat
aiguu_ has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kraljev6> 2. make al enumerables lazy
<Hanmac> kraljev6: infomation before you say it: find_all and select are not duplicate
sunya7a has joined #ruby
dmead has quit [Remote host closed the connection]
_justin has joined #ruby
aganov has quit [Remote host closed the connection]
sooik has quit [Ping timeout: 240 seconds]
gr33n7007h has joined #ruby
<apeiros> kraljev6: let bang methods return true/false instead of self/nil
Megtastique has quit []
<apeiros> the latter promotes errors and isn't more performant
sinkensa_ has quit [Remote host closed the connection]
<apeiros> alternatively let them return self all the time, but I'd rather have this:
<kraljev6> yes, bang methods definitely shouldn't return self
sambao21 has quit [Quit: Computer has gone to sleep.]
<gr33n7007h> Whats the difference between `&&` `and` `||` `or` if any?
<kraljev6> from asthetical standpoint
sinkensabe has joined #ruby
<apeiros> introduce syntax to have the return value of a method be self
<apeiros> (smalltalk has that, I think)
<apeiros> gr33n7007h: precedence
<Cymew> workmad3: That worked. Thanks. Now I only wonder why, but maybe I can find that in the docs.
anaeem1 has joined #ruby
<benzrf> gr33n7007h: prcedence
<gr33n7007h> apeiros, benzrf Thanks :)
<kraljev6> 4. definition of a method should return Method instead of Symbol
<benzrf> gr33n7007h: `and` binds loosely, `&&` binds tightly
<benzrf> i.e.
<workmad3> Cymew: it's because [] is for accessing attributes on a node, but the text isn't an attribute it's a special kind of child node (assuming I'm remembering my XML correctly :) )
<benzrf> foo bar && baz == foo(bar && baz)
<benzrf> foo bar and baz == foo(bar) and baz
<gr33n7007h> benzrf, Ah! got ya :) cheers
rizzatti has joined #ruby
aiguu_ has quit [Ping timeout: 252 seconds]
noop has quit [Ping timeout: 240 seconds]
<Cymew> workmad3: I'm not up to par regarding xml. It makes my head spin. I'm absorbing wisdom. ;)
fukuyamaken has quit [Read error: Connection reset by peer]
<apeiros> kraljev6: na, you can trivially get the method from the symbol
<kraljev6> apeiros: This #select vs #find_all difference goes also against POLA
<apeiros> kraljev6: and creating a throw away method object for rare use cases - pointless
fukuyamaken has joined #ruby
<workmad3> Cymew: it's been a while since I've done much with XML... JSON ftw! :)
<Cymew> you don't say...
<apeiros> 1. agreed. aliases considered harmful (except semantic aliases - e.g. when == and .equal? are the same for a given class)
gr33n7007h has quit [Client Quit]
<apeiros> 2. not sure. but understandable motivation
<apeiros> for 2., I prefer the .lazy approach I think. however I see some inconsistencies in how a couple of methods work
<kraljev6> apeiros, I'd like ruby to be more functional
<apeiros> I think I missed 3.
<kraljev6> to have things like compositum of enumerator
axl_ has joined #ruby
LadyRainicorn has joined #ruby
<apeiros> kraljev6: you can build that
<kraljev6> 3. wasn't present :)
VTLob has quit [Remote host closed the connection]
<workmad3> apeiros: so, with 1. are we going to go with pleasing old smalltalkers, functional peeps, or piss the hell out of both and keep '.map' over '.collect' and '.inject' over '.reduce'? :)
sinkensabe has quit [Ping timeout: 250 seconds]
<apeiros> workmad3: tbh, I don't really care. I have a set of preferred methods. but I'd happily switch for the benefit of having only a single name.
<workmad3> :)
<apeiros> workmad3: trying to appease to everybody all too often makes it worse for everybody
<kraljev6> apeiros, does .permutation.each_slice.map greedily evaulate perumtations?
havenwood has joined #ruby
<kraljev6> this is what i mean by compositum
<apeiros> kraljev6: you mean whether it is lazy or not?
<kraljev6> i mean do I use 6 gigs of ram?
<kraljev6> or just enough for one slice
<apeiros> that depends on your map
<apeiros> but up to each_slice, you get an Enumerator
<apeiros> i.e., lazy
<kraljev6> that's great
<apeiros> .map will return an array. you can make it return an Enumerator too by using .lazy
<kraljev6> i'd like that way for more methods
<kraljev6> for example, #drop
<kraljev6> should also work lazily
Macaveli has joined #ruby
<apeiros> yes. drop right now is IMO pointless.
<workmad3> apeiros: hmm... .map gives me an enumerator back, not an array...
<workmad3> >> [1,2,3,4].map
<apeiros> workmad3: you didn't pass a block
<apeiros> :-p
ffranz has joined #ruby
<workmad3> apeiros: I didn't see a block in the sample chain either ;)
<apeiros> workmad3: he didn't pass an arg to each_slice either
<apeiros> workmad3: so you could as well say "that expression will raise"
<workmad3> apeiros: :D
<apeiros> but yes
baweaver has joined #ruby
mary5030 has joined #ruby
<apeiros> .map.with_index is an actual application of a lazy/blockless map
mary5030 has quit [Remote host closed the connection]
<kraljev6> apeiros, I like .map.with_index
mary5030 has joined #ruby
<kraljev6> does .permutation.with_index also work?
<kraljev6> good
zz_jrhorn424 is now known as jrhorn424
<apeiros> define "work". up to that point it's lazy
<workmad3> I think .with_index is just on enumerator, so it should do
<apeiros> there are a couple of methods on Enumerator which won't return an Enumerator. (that's what I said about 2. and consistencies)
omosoj has joined #ruby
<kraljev6> apeiros, do you like #zip in Enumerator
<kraljev6> does it belong there?
<kraljev6> *Enumerable
codabrink has joined #ruby
rails4444 has quit [Ping timeout: 240 seconds]
<workmad3> zip seems like it belongs on Enumerator to me... used for composing together multiple other enumerators
lw has joined #ruby
aspiers has joined #ruby
<cout> I always thought zip belonged in Compressable
chrisseaton has quit []
<havenwood> Zipperable
<workmad3> cout: well, yeah... I think the name is somewhat unfortunate :)
<apeiros> it's fine in Enumerable. problem is as with other methods - sometimes you need .lazy, sometimes you don't.
<apeiros> -> consistency
<workmad3> cout: as it's 'zipping' in the sense of a zipper, not zipping as in compressing :)
tylerkern has quit [Ping timeout: 265 seconds]
tjr9898 has quit [Remote host closed the connection]
<havenwood> my pants inherit from Zipperable
cba has quit [Ping timeout: 252 seconds]
<workmad3> havenwood: and if you're lazy, I suspect you experience pain?
chrisseaton has joined #ruby
agrinb has joined #ruby
<cout> workmad3: :)
tjr9898 has joined #ruby
sputnik1_ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<havenwood> workmad3: yeah, i didn't use to have lazy but it was added in recent versions of me and now i may overuse it
sputnik1_ has joined #ruby
zergood_ has joined #ruby
axl_ has quit [Quit: axl_]
VTLob has joined #ruby
fukuyamaken has quit [Read error: Connection reset by peer]
<workmad3> :)
<Hanmac> imo zip should return an Enumerator too
fukuyamaken has joined #ruby
codabrink has quit [Ping timeout: 276 seconds]
axl_ has joined #ruby
codabrin_ has joined #ruby
dstynchula has joined #ruby
<Hanmac> havenwood: recent DoctorWho episode or are you finish with Season4?
axisys has quit [Changing host]
axisys has joined #ruby
razrunelord has joined #ruby
dstynchula has quit [Remote host closed the connection]
rostam has quit [Remote host closed the connection]
chrisseaton has quit [Client Quit]
<havenwood> now if Hash#most_things would return a Hash..
kiri has quit [Read error: Connection reset by peer]
<havenwood> Hanmac: s4e15 but i fell asleep so not exactly sure
kiri has joined #ruby
agrinb has quit [Remote host closed the connection]
chrisseaton has joined #ruby
<Hanmac> havenwood: hm ok i think you are not 100% finish yet ... what was your reaction to "TurnLeft" ? ;P
AlexRussia has quit [Remote host closed the connection]
sputnik1_ has quit [Ping timeout: 258 seconds]
chrisseaton has quit [Client Quit]
segfalt has joined #ruby
<cout> Hanmac: turnleft?
<workmad3> cout: dr who episode
AlexRussia has joined #ruby
<havenwood> #turn_left
<segfalt> Has anything changed in 1.8->2.1 the way Ruby handles signals, specifically with forks? I'm hitting this crazy scenario where I'm working a child, with a trap set up in the parent for SIGUSR1 and the child is raising SignalException SIGUSR1 when that signal *should* be getting sent to the parent. The same code worked in 1.8.7.
razrunelord has quit [Ping timeout: 258 seconds]
rostam has joined #ruby
qubit has left #ruby [#ruby]
iceden has joined #ruby
<cout> workmad3: I think I didn't like that one. I don't like many that davies wrote.
Megtastique has joined #ruby
<Hanmac> cout: i tihnk NielGaiman need to write more DoctorWho episodes ;P
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kraljev6> Can i get a verdict on Enumerable#reverse_each
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kraljev6> Should we file a bug report for deprecation?
<kraljev6> it clearly doesn't fit there
<cout> Hanmac: YES!
xerxas has joined #ruby
<cout> Hanmac: both the ones he wrote are in my top 20
io_syl has joined #ruby
io_syl has quit [Max SendQ exceeded]
subraminion has quit [Quit: Lingo - http://lingoirc.com]
io_syl has joined #ruby
relix has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
<Hanmac> both? i only know about TheDoctorsWife, ... (i didnt know about that he did the other too)
WishBoy has quit [Remote host closed the connection]
mengu has quit []
WishBoy has joined #ruby
tagrudev has quit [Remote host closed the connection]
fukuyamaken has quit [Read error: Connection reset by peer]
fukuyamaken has joined #ruby
SCommette has joined #ruby
<kraljev6> It has been 100 years since I have last used #map!
<kraljev6> Anyone else?
<benzrf> i use it sometimes
<benzrf> >> [1, 2, 3].reverse_each
webgen has joined #ruby
<eval-in__> benzrf => #<Enumerator: [1, 2, 3]:reverse_each> (https://eval.in/150088)
<benzrf> >> [[1, 2, 3], [4, 5, 6], [7, 8 ,9]].reverse_each.to_a
<eval-in__> benzrf => [[7, 8, 9], [4, 5, 6], [1, 2, 3]] (https://eval.in/150089)
<benzrf> o=
<benzrf> so uh
<benzrf> what exactly does reverse_each do
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<benzrf> is it somehow different from reverse
axl_ has quit [Quit: axl_]
vpretzel is now known as vpretzel|1403
setra has quit [Ping timeout: 258 seconds]
<apeiros> benzrf: it's used with a block. .reverse just returns the reversed array.
lolmaus has joined #ruby
rails4444 has joined #ruby
<apeiros> benzrf: anyway, Enumerable#reverse_each is what kraljev6 is talking about, not Array#reverse_each
dEPy has joined #ruby
<kraljev6> apeiros
<kraljev6> have you seen above?
<kraljev6> about the verdict on Enumerable#reverse_each
<apeiros> no, @work and slightly busy
<kraljev6> sorry
<kraljev6> I have asked if we should file a bug?
<havenwood> kraljev6: what do you want to replace it with?
<apeiros> #reverse_each with a split implementation would be worthwhile IMO
BigTexasButters has joined #ruby
<kraljev6> since that is no way an enumerable method
dblessing has quit [Read error: Connection reset by peer]
dblessing_ has joined #ruby
cocotton has quit [Remote host closed the connection]
<apeiros> i.e., a) native if available, b) use pred if available, c) use .to_a.reverse_each as fallback
<kraljev6> you have to keep all the previously visited elements
<benzrf> why not just reverse.each instead of reverse_each
<kraljev6> no better than .reverse.each
<apeiros> if it was implemented that way, I think it should stay. but if it's just implemented as c), it's pointless.
mrnugget has joined #ruby
fukuyamaken has quit [Read error: Connection reset by peer]
<kraljev6> or:
<kraljev6> d)
epochlynx is now known as epochwolf
<kraljev6> 1. remove #reverse_each
_justin has quit [Quit: _justin]
fukuyamaken has joined #ruby
<kraljev6> 2. Add #reverse to enumerable
<apeiros> no
<havenwood> kraljev6: impossibru!
<apeiros> conflicts with Array#reverse
rizzatti has quit [Quit: Leaving...]
<apeiros> if 2., then under a different name
<apeiros> and we have seen from .chars vs. each_char that "plain" methods are expected to return an array
dblessing has joined #ruby
<kraljev6> if so, then remove Array#reverse also
cocotton has joined #ruby
<kraljev6> and say f* backward compatibility
<apeiros> (2.0 #chars is an alias of each_char, as of 2.1 it returns an Array)
<apeiros> now you're being irrational :-p
<kraljev6> :)
dblessing has quit [Read error: Connection reset by peer]
<apeiros> *removing* Array#reverse is certainly not a sensible option.
dblessing has joined #ruby
<kraljev6> it is going to inherit that method from enumerable
axl_ has joined #ruby
<apeiros> ok. you mean: let Array#reverse return an Enumerator too
nateberkopec has joined #ruby
<apeiros> I'd prefer another route
<apeiros> let nothing return an Enumerator
<kraljev6> let everything return an enumerator
<apeiros> use .lazy to return a proxy which has implementations which return an Enumerator
dblessing_ has quit [Ping timeout: 245 seconds]
<kraljev6> hmm....
<apeiros> so: ary.reverse # => Array
<apeiros> ary.lazy.reverse # => Enumerator
dik_dak has joined #ruby
mjs2600 has quit [Remote host closed the connection]
Bumptious has quit [Remote host closed the connection]
<kraljev6> that is a great idea
Macaveli has joined #ruby
<kraljev6> good, apeiros
sinkensabe has joined #ruby
Macaveli has quit [Remote host closed the connection]
<kraljev6> I'd prefer that
sevenseacat has quit [Quit: Leaving.]
<kraljev6> The other alternative is mine, that everything is lazy, and you have to #force to get a result
<apeiros> viable. but comes at the price of performance.
<kraljev6> but this is bad, since you need Array more often
mansi has joined #ruby
dblessing has quit [Ping timeout: 250 seconds]
<apeiros> and that
mjs2600 has joined #ruby
io_syl has quit []
<apeiros> he upside is that a good bit of accidentally non-scaling code suddenly would scale.
<kraljev6> sure, that's why I like functional languages
<kraljev6> And that's why I propose we break backwards compatibility in 3.0
<kraljev6> and make ruby right
RaptorJesus has quit [Remote host closed the connection]
sambao21 has joined #ruby
<apeiros> kraljev6: you might want to take a look at sapphire
<apeiros> if it's still under development
akonny has quit [Quit: akonny]
RaptorJesus has joined #ruby
mjs2600 has quit [Remote host closed the connection]
sambao21 has quit [Client Quit]
Kruppe has quit [Quit: ZNC - http://znc.in]
ce_afk is now known as cescalante
duggiefresh has joined #ruby
<baweaver> breaking backward compatibility is almost always a bad idea.
mikecmpbll has quit [Quit: ciao.]
eka has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<baweaver> you destroy the community very quickly like that
<katlogic> There are strong points to break backwards compat.
<baweaver> that are heavily outweighed
<baweaver> look what it does to Scala
<katlogic> Like preventing bloat / feature creep. Naturally no big cathedrals can stand on such loose foundations.
<havenwood> kraljev6: you could propose for Rubinius X (if it ends up going anywhere?)
jobewan has joined #ruby
<katlogic> benzrf: I think Lua would be more specific example.
<apeiros> it matters a lot how you do it and what you gain in the process
sinkensabe has quit [Remote host closed the connection]
<benzrf> katlogic: of what?
<katlogic> s/benzrf/baweaver
mark_locklear has quit [Ping timeout: 252 seconds]
<benzrf> haha
<havenwood> mruby \o/
<katlogic> (srsly, there should be chanmode for this)
<benzrf> katlogic: for what?
<katlogic> prefix-trolling :)
Kruppe has joined #ruby
blackmesa has joined #ruby
<benzrf> ha
dEPy has quit [Quit: Lingo - http://lingoirc.com]
tjr9898 has quit [Remote host closed the connection]
tjr9898 has joined #ruby
rizzatti has joined #ruby
tkuchiki has quit [Remote host closed the connection]
hgl has quit [Read error: Connection reset by peer]
narendraj9 has quit [Quit: Connection closed for inactivity]
blackmesa has quit [Client Quit]
trhodes- has quit [Ping timeout: 264 seconds]
sambao21 has joined #ruby
fukuyamaken has quit [Remote host closed the connection]
dblessing has joined #ruby
rails4444 has quit [Remote host closed the connection]
heftig has quit [Quit: Quitting]
ayaz has quit [Quit: Textual IRC Client: www.textualapp.com]
rails4444 has joined #ruby
trhodes_ has joined #ruby
duggiefr_ has joined #ruby
<kraljev6> apeiros: it seems to me sapphire is no longer being developed
ccooke_ is now known as ccooke
<apeiros> rubinius X might indeed be the better choice
wnoronha has joined #ruby
aspiers has quit [Ping timeout: 252 seconds]
<apeiros> they've got the backing and the mission statement
bal has quit [Quit: bal]
duggiefresh has quit [Ping timeout: 240 seconds]
<Edelwin> 5/51
<Edelwin> whooooops
<canton7-mac> # => 0
ben3 has quit [Ping timeout: 240 seconds]
<havenwood> # => 0.0980392
<havenwood> mruby style :P
badhatter has quit [Read error: Connection reset by peer]
i_s has joined #ruby
tjr9898 has quit [Remote host closed the connection]
i_s has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
i_s has joined #ruby
Spami has joined #ruby
joast has joined #ruby
mrnugget has quit [Read error: Connection reset by peer]
wnoronha has quit [Quit: Computer has gone to sleep.]
Beoran_ has quit [Ping timeout: 265 seconds]
codeurge has joined #ruby
tjr9898 has joined #ruby
chrisseaton has joined #ruby
yakko has quit []
mrnugget has joined #ruby
tylerkern has joined #ruby
mordocai has joined #ruby
Sonofgamekeeper has quit [Quit: leaving]
except has quit [Ping timeout: 264 seconds]
lolmaus has quit [Ping timeout: 265 seconds]
Sonofgamekeeper has joined #ruby
codeurge has quit [Ping timeout: 240 seconds]
axl_ has quit [Ping timeout: 240 seconds]
Hanmac1 has joined #ruby
<mordocai> Hello. I am thinking about forking https://github.com/bluemonk/net-dns but I am unsure of the legality of the License clause in the Readme. I emailed the author but haven't heard back. Any thoughts? I would need to use it for work and, unfortunately, work doesn't have a legal team to ask.
benzrf is now known as benzrf|offline
mrnugget has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
Bumptious has joined #ruby
jespada has quit [Ping timeout: 250 seconds]
lmickh has joined #ruby
Kricir has joined #ruby
<canton7-mac> mordocai, what's your worry?
ben1 has joined #ruby
<apeiros> mordocai: the ruby license is rather permissive
<havenwood> mordocai: These days Ruby is released either under two-clause BSD license or the Ruby license: https://github.com/ruby/ruby/blob/trunk/COPYING
<havenwood> mordocai: you should be fine :)
<mordocai> well, I wasn't sure of the legality of saying "X is under the same license Y is"
<mordocai> Normall you have a full license file
<canton7-mac> and the ruby license seems really permissive
<mordocai> normally*
<canton7-mac> I'd say the author's intentions are pretty clear
mrnugget has joined #ruby
<havenwood> mordocai: you could open a pull request to either link to Ruby's current license or explicitly restate 2-clause BSDL or Ruby license.
<apeiros> and he'd be the only one able to press charges anyway
fabrice31 has quit [Remote host closed the connection]
Jamo_ is now known as Jamo
<kraljev6> (irb):6: warning: IO#lines is deprecated; use #each_line instead
<kraljev6> => #<Enumerator: #<File:/etc/hosts>:each_line>
axl_ has quit [Client Quit]
<kraljev6> that's just sad
<mordocai> havenwood: I could, he has 14 pull requests that haven't been dealt with though. Which is why I want to fork in the first place
<havenwood> mordocai: the only question to me is whether they meant just Ruby license, or like Ruby, both BSDL and Ruby
idoru has quit [Quit: Working as programmed]
mikepack has joined #ruby
juanmnl has joined #ruby
idoru has joined #ruby
rippa has joined #ruby
<mordocai> Also, is there a procedure for forking/taking over a rubygem? Assuming he never answers the bugfixes I'm making(and the ones sitting in pull requests) should probably be available to the community
kevind has quit [Quit: kevind]
<mordocai> Assuming he never answers,*
Rainicorn has joined #ruby
<havenwood> mordocai: i guess at the time net-dns initially stated "same license Ruby is", Ruby was choice of GPL2 or Ruby license.
binaryhat has joined #ruby
sambao21 has joined #ruby
LadyRainicorn has quit [Ping timeout: 245 seconds]
<mordocai> havenwood: Hmmm... if I fork I guess I should probably put it under specifically the ruby license then
<mordocai> havenwood: Since it changed from GPL to BSD
<havenwood> mordocai: It will still be encumbered by whatever this license is, which is certainly Ruby license and arguably both GPL2 and 2-clause BSDL.
Emmanuel_Chanel has quit [Quit: Leaving]
wnoronha has joined #ruby
agrinb has joined #ruby
<havenwood> pick your poison
<apeiros> mordocai: there's no procedure, no
Elhu has joined #ruby
<apeiros> mordocai: you fork it and release it under a different name
<apeiros> e.g. Net::DNS2
<apeiros> err, net-dns2
codeurge has joined #ruby
i_s has quit [Remote host closed the connection]
razrunelord has joined #ruby
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kilk_ has joined #ruby
Rainicorn has quit [Read error: Connection reset by peer]
kilk_ has quit [Client Quit]
LadyRainicorn has joined #ruby
i_s has joined #ruby
Sonofgamekeeper has left #ruby [#ruby]
Sonofgamekeeper has joined #ruby
mikecmpbll has joined #ruby
benzrf|offline is now known as benzrf
jprovazn has quit [Quit: Odcházím]
razrunelord has quit [Ping timeout: 240 seconds]
<skinkitten> apeiros, help http://www.pasteall.org/51556/rails
sambao21 has quit [Quit: Computer has gone to sleep.]
BigTexasButters has quit [Quit: [BX] OH SHIT!\31]
relix has joined #ruby
<apeiros> skinkitten: no help. commute :)
yfeldblum has joined #ruby
<skinkitten> no comprende
Emmanuel_Chanel has joined #ruby
yairgo has quit [Ping timeout: 252 seconds]
djbkd has joined #ruby
vpretzel|1403 is now known as vpretzel|215
sinkensabe has joined #ruby
Aaaal has joined #ruby
kotk_ has joined #ruby
<kraljev6> Also, please enlighten me, why does #min_by exist. This is the kind of redundancy I'm speaking about
duggiefr_ has quit [Remote host closed the connection]
<kraljev6> arr.min_by {...} is the same as arr.map{...}.min
<apeiros> kraljev6: same reason as for sort vs sort_by
<apeiros> kraljev6: no
<apeiros> the result maybe
<kraljev6> oh, forget it, please :)
<apeiros> not even the result actually
<kraljev6> not even the result
<apeiros> gtg, commute, cya
apeiros has quit [Remote host closed the connection]
sambao21 has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
kotk has quit [Ping timeout: 258 seconds]
apeiros has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
jobewan has quit [Remote host closed the connection]
djbkd has quit [Ping timeout: 258 seconds]
axl_ has joined #ruby
sinkensabe has quit [Remote host closed the connection]
LadyRainicorn has quit [Read error: Connection reset by peer]
ker2x has left #ruby [#ruby]
crelix has joined #ruby
s2013 has joined #ruby
jobewan has joined #ruby
Rainicorn has joined #ruby
apeiros has quit [Ping timeout: 252 seconds]
<skinkitten> ...
spider-mario has joined #ruby
Rainicorn is now known as LadyRainicorn
<Edelwin> ....
rurban_ has joined #ruby
Shidash has quit [Ping timeout: 265 seconds]
ben1 has quit [Quit: ben1]
wookiehangover has quit [Ping timeout: 240 seconds]
EagleDelta has joined #ruby
maximski has quit [Ping timeout: 276 seconds]
geggam has joined #ruby
dik_dak has quit [Ping timeout: 258 seconds]
sski has joined #ruby
cocotton has quit [Remote host closed the connection]
agrinb has quit [Remote host closed the connection]
alexju has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
chrisseaton has quit [Remote host closed the connection]
freerobby has joined #ruby
MZAWeb_ has joined #ruby
geoffw8_ has joined #ruby
cocotton has joined #ruby
LadyRainicorn has quit [Read error: Connection reset by peer]
LadyRainicorn has joined #ruby
sk87 has joined #ruby
mrnugget has quit [Read error: Connection reset by peer]
bluenemo has quit [Remote host closed the connection]
snath has joined #ruby
maximski has joined #ruby
khax has joined #ruby
<khax> catphish :
combusean has joined #ruby
mrnugget has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
noop has joined #ruby
<wiscas> is it possible to paralelise sinatra?
Rainicorn has joined #ruby
zigomir has quit [Remote host closed the connection]
<wiscas> kind of having a hard time finding info on this
lolmaus has joined #ruby
SegFaultAX has quit [Excess Flood]
fukuyamaken has joined #ruby
djbkd has joined #ruby
SegFaultAX has joined #ruby
<wiscas> does anyone have experience with this=?
<Edelwin> I don't know that
wnoronha has quit [Quit: Lingo - http://lingoirc.com]
LadyRainicorn has quit [Ping timeout: 240 seconds]
<mikepack> wiscas: what do you mean paralelise sinatra? Serve multiple requests at a time?
aiguu_ has joined #ruby
cocotton has quit [Quit: Leaving...]
joonty has quit [Quit: WeeChat 0.4.2]
jackneill has joined #ruby
oo_ has quit [Remote host closed the connection]
sski has quit [Remote host closed the connection]
<havenwood> wiscas: Are you familiar with the various Rack web servers?
phinfonet has joined #ruby
dik_dak has joined #ruby
sambao21 has joined #ruby
Rainicorn is now known as LadyRainicorn
s2013 has quit [Ping timeout: 265 seconds]
<wiscas> yes mikepack
kiri has quit [Ping timeout: 258 seconds]
<wiscas> no havenwood
s2013 has joined #ruby
<wiscas> i'm still a bit noob at it
<s2013> wiscas, do you mean paralyze sinatra? why would you do that to a dead man?
mark_locklear has joined #ruby
carraroj has joined #ruby
_maes_ has joined #ruby
carraroj has quit [Changing host]
carraroj has joined #ruby
<mikepack> wiscas: the concurrency you're looking for is handled by your web server. Look at Puma or Unicorn
<wiscas> lol s2013 i need it as part of some workflow i'm implementing, i need concurrency and parallelisation
mansi has quit [Remote host closed the connection]
<havenwood> wiscas: Might take a look at Unicorn, Rainbows!, Thin, Puma, Passenger, Reel-Rack and of course... Webrick!
kraljev6 has quit [Ping timeout: 258 seconds]
mansi has joined #ruby
<havenwood> wiscas: Fast or slow requests? Evented, threaded, forked or some combination of the above are options.
timonv has quit [Remote host closed the connection]
<khax> putty.exe
timonv has joined #ruby
<shevy> damn i
<s2013> i miss putty
<shevy> it
<shevy> wiscas, is your irc nick after some cat food?
<s2013> thats whiskas
<shevy> khax do you really have to type the trailing .exe ?
<khax> yes.exe
<shevy> s2013 could be mistyping!
<shevy> lol
<khax> STUB
<shevy> STUB.exe
<khax> LOOL
the_f0ster has joined #ruby
danshultz has quit [Remote host closed the connection]
<shevy> in the past we always made fun of viruses on windows
<khax> :)
<shevy> but who here on #ruby is still using windows at home?
<khax> <
Sonofgamekeeper has quit [Quit: leaving]
<khax> win 8.1 Pro.
<khax> ftw
danshultz has joined #ruby
benzrf is now known as benzrf|offline
Sonofgamekeeper has joined #ruby
mansi_ has joined #ruby
mansi has quit [Read error: Connection reset by peer]
Cache_Money has joined #ruby
<shevy> really khax? including ruby?
brtdv has quit []
<khax> jea
rizzatti has quit [Quit: Leaving...]
dANOKELOFF has quit [Remote host closed the connection]
<olivier_bK> therye is something i dont understand
<khax> pussy.exe smells.
wallerdev has joined #ruby
<olivier_bK> i use same file log.rb in another script and everything doing well
apeiros has joined #ruby
<olivier_bK> why here i get undefined method `info' for #<Proc:0x00000001c4a2b0> (NoMethodError)
<shevy> olivier_bK well the method is not defined on the proc object
<shevy> the question is: are you sure you need a proc object there?
tjr9898 has quit [Remote host closed the connection]
<shevy> olivier_bK where is the paste btw ;) ;) ;)
lkba has quit [Ping timeout: 252 seconds]
tjr9898 has joined #ruby
joost_like_toast has quit [Ping timeout: 252 seconds]
danshultz has quit [Ping timeout: 265 seconds]
juanmnl has quit [Quit: My dingdong has gone to sleep. ZZZzzz…]
aspiers has joined #ruby
crelix has quit [Quit: Textual IRC Client: www.textualapp.com]
amundj has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
lw has quit [Quit: s]
sailias1 has joined #ruby
sailias has quit [Quit: Leaving.]
shiin has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sputnik1_ has joined #ruby
khax has left #ruby ["Leaving"]
bijan07077 has quit [Quit: bijan07077]
jxf has joined #ruby
zigomir has joined #ruby
combusean has quit [Ping timeout: 250 seconds]
danman has joined #ruby
redondos has quit [Excess Flood]
timonv has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
redondos has joined #ruby
redondos has joined #ruby
redondos has quit [Changing host]
timonv has joined #ruby
juanmnl has joined #ruby
bijan07077 has joined #ruby
rokob has quit [Remote host closed the connection]
bijan07077 has quit [Client Quit]
banister has joined #ruby
bijan07077 has joined #ruby
zigomir has quit [Remote host closed the connection]
Sonofgamekeeper has quit [Quit: leaving]
kosmos has joined #ruby
bijan07077 has quit [Client Quit]
Cache_Money has quit [Quit: Cache_Money]
<banister> jhass you're the only person still contributing to diaspora? :)
juanmnl has quit [Client Quit]
<jhass> nah, not at all
timonv has quit [Ping timeout: 250 seconds]
Hanmac has joined #ruby
momomomomo has joined #ruby
aiguu_ has quit [Ping timeout: 252 seconds]
Hanmac1 has quit [Ping timeout: 255 seconds]
moritzs has quit [Ping timeout: 258 seconds]
LadyRainicorn has quit [Quit: Bye]
danshultz has joined #ruby
maletor has joined #ruby
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
dik_dak has quit [Ping timeout: 250 seconds]
fantazo has quit [Ping timeout: 264 seconds]
razrunelord has joined #ruby
<banister> jhass looks like it from the contributors page
<jhass> it's because I commit the translations and merge most PRs
Todd has joined #ruby
Trackor has joined #ruby
sambao21 has joined #ruby
lw has joined #ruby
aspires has joined #ruby
AlexRussia has quit [Ping timeout: 252 seconds]
aspiers has quit [Ping timeout: 252 seconds]
shvelo has quit [Ping timeout: 240 seconds]
shredding has quit [Quit: shredding]
carraroj has quit [Ping timeout: 245 seconds]
razrunelord has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
havenwood has quit [Remote host closed the connection]
havenn has joined #ruby
havenwood has joined #ruby
Shidash has joined #ruby
Sirupsen has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<skinkitten> I didn't get ubuntu until this year....
yfeldblum has quit [Ping timeout: 252 seconds]
agrinb has joined #ruby
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AlexRussia has joined #ruby
cescalante is now known as ce_afk
<apeiros> jhass: oh, you work on diaspora?
razrunelord has joined #ruby
<apeiros> diaspora is that distributed facebook thing?
<jhass> the reason I learned ruby actually
razrunelord has quit [Remote host closed the connection]
danshultz has quit [Read error: Connection reset by peer]
<jhass> it's not really comparable to facebook, though basically
danshultz has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
kosmos has quit [Quit: leaving]
moritzs has joined #ruby
SCommette has quit [Quit: SCommette]
<jxf> I know they're aliases, but is "reduce" preferred over "inject"?
deric_skibotn has joined #ruby
mikecmpbll has quit [Ping timeout: 252 seconds]
SCommette has joined #ruby
<apeiros> jxf: personal thing. I prefer inject.
razrunelord has joined #ruby
razrunelord has quit [Remote host closed the connection]
<apeiros> also inject exists for longer. reduce was added in 1.9 I think
<jhass> use what makes more sense for you in your context. Or just stick to one
<shevy> jxf long live inject! down with the reducers!
razrunelord has joined #ruby
<workmad3> apeiros: don't think so... I think reduce has been around for as long as .inject
<shevy> don't stick to one
zigomir has joined #ruby
<jxf> apeiros: ah, I didn't know that one was more of a newcomer
<shevy> alternate every time!
<Hanmac> 1.8>> [1,2,3].reduce {|a,b| a + b}
Lightsword has joined #ruby
saarinen has joined #ruby
<shevy> >> puts 'die, reducer, die!!!!'
<eval-in__> shevy => die, reducer, die!!!! ... (https://eval.in/150169)
<workmad3> apeiros: http://apidock.com/ruby/v1_8_7_72/Enumerable/reduce shows it in 1.8.7
<shevy> yeah eval-in__
<jhass> 18>> [1,2,3].reduce {|a,b| a + b}
<eval-in__> jhass => 6 (https://eval.in/150170)
mercerist has quit [Quit: Computer has gone to sleep.]
danshultz has quit [Ping timeout: 245 seconds]
<apeiros> workmad3: no, it wasn't in 1.8.6 definitively
<shevy> that reads so wrong
<apeiros> 1.8.7 contains some 1.9 backports, so might be
<workmad3> apeiros: ok, so 1.8.7 :)
<shevy> 1.8.7 was cool
<apeiros> hey, I do ruby since 1.8.0, I know my stuff :-p
akonny has joined #ruby
<workmad3> apeiros: it's possible that the alias was added by activesupport in 1.8.x :)
<havenwood> here, problem solved: module Enumerable; undef :reduce end
beef-wellington has quit [Ping timeout: 255 seconds]
<Hanmac> yeah the funny thing that 1.8.6 and 1.8.7 are neigther ABI nor API compatible ;P
<jxf> I think my personal preference is #reduce (just because that's a number of other langs call it), but I'm hesitant to use it if it's not really established as an idiom yet
<apeiros> workmad3: well possible, yes
<workmad3> apeiros: and I've tended to do stuff in the rails ecosystem more often than not
<apeiros> jxf: a number of langs call it inject
<apeiros> jxf: so it's really "a number of langs *I* know" ;-p
Spami has quit [Quit: This computer has gone to sleep]
<apeiros> </pedant>
<workmad3> jxf: basically, inject has a smalltalk heritage, reduce has a functional heritage
<apeiros> oh, whom do I lie to… of course I never </pedant> :D
wallerdev has quit [Quit: wallerdev]
<jxf> apeiros: sorry, yes, I should have said "a number of other FP-flavored langs"
nvrch has quit [Quit: nvrch]
<jxf> (that I know :) )
mrnugget has quit [Read error: Connection reset by peer]
kevind has joined #ruby
* havenwood opens pull request to add a #fold alias to #inject and #reduce.
<apeiros> hrm, "2003 12/25 | 1.8.1", so it's indeed >10y by now that I do ruby
senayar has quit []
<workmad3> jxf: I have noticed that many ruby programmers (myself included) seem to prefer 'map' over 'collect' (fp over smalltalk) but then 'inject' over 'reduce' (smalltalk over fp) :)
<shevy> but not 1.8.0!
<shevy> jxf we'll beat you into .inject eventually
<jxf> workmad3: that's true, I don't think I've ever written "collect"
maximski has quit []
<apeiros> map over collect is for 2 reasons: a) shorter, b) expresses IMO better what it does
<apeiros> with inject vs reject it's mostly habit for me
<shevy> .collect is for greedy people
<shevy> .map is for careful people
<apeiros> *reduce
<workmad3> apeiros: yeah, I started with collect/inject and have shifted my collect habit to map... should work on my inject habit :)
mrnugget has joined #ruby
canton7-mac has quit [Quit: Leaving]
<shevy> \o/
<shevy> all hail king workmad3
<shevy> A~A~A
<shevy> here an ascii crown for ya
* workmad3 nods our regal head
<shevy> hehe
<havenwood> isn't #fold really the functional programming term? :P
<shevy> #fold so sounds origami
<apeiros> foldl, no?
<shevy> foldyes
* apeiros folds shevy
aiguu_ has joined #ruby
dblessing has quit [Quit: dblessing]
Valesk has joined #ruby
timonv has joined #ruby
<workmad3> havenwood: I think 'reduce' is a special case of 'fold'
<shevy> :(
<jxf> not sure how authoritative this is (not at all? a little bit? very?) but Rubocop enforces reduce over inject: https://github.com/bbatsov/rubocop/blob/master/config/default.yml#L164-L169
<workmad3> havenwood: however, in many cases, inject/reduce is used as a fold, from my very quick reading :)
<Hanmac> is #fold a sister function from #pack ?
<jxf> but I'm also the only person I know that actually uses rubocop, so...
<havenwood> foldr foldl dunno
Valesk has quit [Client Quit]
<Mon_Ouie> lisps usually use reduce, Haskell calls it foldl, OCaml calls it fold_left
<workmad3> havenwood: my quick reading suggests that 'fold' folds a list into a single value, but it doesn't have to be of the same type as the list items, while 'reduce' does
gigetoo has quit [Remote host closed the connection]
<workmad3> very quick reading on an area I don't know a lot about though... so I could have picked up some bad info :)
gigetoo has joined #ruby
<apeiros> jxf: my rubocop enforces inject over reduce :)
shvelo has joined #ruby
<jxf> apeiros: hehe
<Hanmac> haha Rubocop should not be trusted ;P it thinks #find_all and #select are the same ;D
<apeiros> jxf: that said, I have ~300 line long rubocop config (most of it is comments on the rationale)
<apeiros> Hanmac: fork, bugfix and PR
<Hanmac> apeiros: its because Hash#select returns a Hash, while Enumerable#find_all still returns an Array ... *just said*
<Mon_Ouie> When do they do something different?
<Mon_Ouie> Oh
Elhu has quit [Quit: Computer has gone to sleep.]
olivier_bK has quit [Ping timeout: 265 seconds]
Valesk has joined #ruby
AlSquire has quit [Quit: Quitte]
coder_neo has joined #ruby
coder_neo has quit [Client Quit]
<havenwood> the whitespace errors are all i've found helpful
<havenwood> and easier ways to do that :P
<workmad3> havenwood: what whitespace errors does robocop tell you about?
ce_afk is now known as cescalante
Rylee has quit [Max SendQ exceeded]
<banister> Mon_Ouie is there another fancy name for foldr ?
Ardenzi has quit [Read error: Connection reset by peer]
<workmad3> havenwood: is it just the basic things that never happen with a decent error? trailing whitespace, mixed tabs and spaces and inconsistent indents?
<Mon_Ouie> I don't know. I've seen just 'fold' be used to refer to foldr though.
<workmad3> s/decent error/decent editor/
blackmesa has joined #ruby
tjr9898 has quit [Remote host closed the connection]
thesheff17 has quit [Remote host closed the connection]
<shevy> workmad3 do you mean rubocop
<banister> Mon_Ouie apparently foldr is more fundamental as foldr can be written in terms of it but not the other way round?
<banister> as foldl can be written in terms of it*
<havenwood> workmad3: a variety it seems, not really sure
<Mon_Ouie> Yess
<banister> Mon_Ouie You sound excited
<banister> ;)
jeregrine has joined #ruby
wookiehangover has joined #ruby
jiriki- has quit [Quit: leaving]
<banister> Mon_Ouie have you messed much with Ocaml?
twiceday has quit [Ping timeout: 240 seconds]
tjr9898__ has joined #ruby
<Mon_Ouie> Not really, I think the only two things I wrote in it were a Sudoku-solver and a game of life
<Mon_Ouie> (apart from hello world-level stuff)
<banister> Mon_Ouie what do you think of OCaml from your limited exposure? And how does it compare to haskell?
dblessing has joined #ruby
<apeiros> havenwood: I don't think I need rubocop for my personal code. my code style is overall IMO quite consistent.
saarinen has quit [Quit: saarinen]
<apeiros> havenwood: but I added it for my framework. in the hopes that somebody might actually contribute some time and I want a somewhat consistent style :)
danshultz has joined #ruby
<havenwood> apeiros: yup, i guess for a team setting it up could make sense, but for personal code you *are* you
<apeiros> havenwood: depending on my experiences, I will add it at work
danshultz has quit [Read error: Connection reset by peer]
<apeiros> not all of my coworkers share my OCD wrt code style :D
<banister> apeiros i'm never consistent with "" vs ''
<Mon_Ouie> It feels less 'clean' than Haskell. I found that it not being pure was annoying because the compiler assumes a function is and optimizes accordingly unless you have an argument. So you can't have a function that returns a random number of type int, it has to be unit -> int otherwise the compiler optimizes it away.
<apeiros> banister: haha, yes, that was my biggest offense too
saarinen has joined #ruby
danshultz has joined #ruby
<apeiros> 500, no matter which variant I chose
<havenwood> banister: i usually use '' unless it breaks without ""
<Mon_Ouie> Also you run into exceptions more often than in Haskell (vs. compilation errors), and those exceptions provide no backtrace
lessless has quit [Read error: Connection reset by peer]
mansi_ has quit [Remote host closed the connection]
<havenwood> banister: but i've seen some really weird conventions, like '' for requires then "" thereafter :O
wallerdev has joined #ruby
<havenwood> which is terrible!
<banister> Mon_Ouie it's object oriented though right? does it combine OO and functional style pretty nicely or does it feel kind of messy?
dik_dak has joined #ruby
thesheff17 has joined #ruby
<apeiros> https://gist.github.com/apeiros/8633ec2d2e2b80fe892a that's my rubocop config atm
<apeiros> still highly experimental :)
<workmad3> havenwood: but what if I want to do string interpolation in my requires? !!!
mansi has joined #ruby
<Mon_Ouie> I haven't messed with OOP in OCaml at all
<banister> havenwood yeah, unless i'm doing string interpolation i honestly just dont care, and i switch between the two randomly myself :)
<havenwood> workmad3: haha
<havenwood> banister: save a shift!
<Mon_Ouie> I've heard people tend to go one way or the other rather than actually mixing them in the same library/project
<joelteon> anyone familiar with rubocop here? it warns you not to use perl-style backrefs ($1, $2, etc.) in the block passed to gsub
<joelteon> but what is the alternative?
<workmad3> I've been defaulting to " over ' again... because I keep on editing chef data bags as JSON, and JSON needs "
jiriki has joined #ruby
<joelteon> besides $~[1], $~[2], and so on? which is even uglier
DouweM has quit [Ping timeout: 252 seconds]
duggiefresh has joined #ruby
cescalante is now known as ce_afk
brtdv has joined #ruby
<apeiros> workmad3: I default to " in rubocop now too. rationale, see https://gist.github.com/apeiros/8633ec2d2e2b80fe892a#file-rubocop-yml-L102-L108
elaptics`away is now known as elaptics
mercerist has joined #ruby
<Mon_Ouie> I default to " too, just because it's more common for me to add interpolated strings than to add double-quotes or literal \n in code
<banister> Mon_Ouie are you drunk on the functional programming kool-aid or are you still an OOP guy @ heart
<apeiros> joelteon: $~ is perlism too
<apeiros> joelteon: I'm surprised rubocop doesn't warn you about that
treehug8_ has joined #ruby
Sirupsen has quit [Quit: Textual IRC Client: www.textualapp.com]
Spami_ has joined #ruby
<apeiros> joelteon: if you can give me the code where you use $1 etc., I can show you how to do it better
<workmad3> joelteon: err... with gsub doesn't the block argument come in as the matched item?
<Mon_Ouie> I'm having a programming identity crisis
mansi_ has joined #ruby
Rylee has joined #ruby
<apeiros> workmad3: gsub sadly doesn't yield a MatchData, only $&
<joelteon> workmad3: i think the block is passed the full match text
mansi has quit [Read error: Connection reset by peer]
<apeiros> correct
<joelteon> yeah, it is
<joelteon> not the actual match data
<apeiros> (which is $&)
ktun has joined #ruby
<workmad3> ah, ok
yairgo has joined #ruby
<joelteon> looks like the "right way" is Regexp.last_match
<apeiros> Regexp.last_match :D
<joelteon> I wonder if that's threadsafe
<Mon_Ouie> If it's like $~, it is
<apeiros> I'd assume it invokes the same C function as $~
<banister> Mon_Ouie when you finally get employment as a programmer, which language would you like to use? :)
<joelteon> alright, cool
<apeiros> joelteon: note, $~ is really a wrapped C function (some globals are)
<joelteon> I guess that's my answer
carraroj has joined #ruby
<apeiros> you could check the source ^^
Blaze_Boy has quit [Quit: Leaving]
binaryhat has quit [Quit: Leaving]
subbyyy_ has joined #ruby
treehug88 has quit [Ping timeout: 240 seconds]
agrinb has quit [Remote host closed the connection]
<havenwood> joelteon: Can you Gist the code in question?
kpshek has quit []
Connie has quit [Ping timeout: 264 seconds]
dik_dak has quit [Ping timeout: 240 seconds]
agrinb has joined #ruby
<apeiros> gsub & scan are offenders :-/
b00stfr3ak has joined #ruby
<joelteon> yeah, sec
<workmad3> joelteon: you can also use gsub with ".gsub(/(1)(2)(3)/, "\\1\\3\\2") style references
<workmad3> joelteon: dunno if rubocop will complain about them
<apeiros> I use $vars with those too
agrinb has quit [Remote host closed the connection]
binaryhat has joined #ruby
<apeiros> workmad3: yeah, but as soon as you need a block…
<Mon_Ouie> workmad3: Clearly it's going to complain about quoting style!
<apeiros> hehe
<workmad3> Mon_Ouie: it's ok... ' are also fine there ;)
franzip has joined #ruby
testcore has joined #ruby
beef-wellington has joined #ruby
testcore has quit [Client Quit]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
* workmad3 would just say 'screw you rubocop' and use $1, $2 and $3
<joelteon> i would too
testcore has joined #ruby
<joelteon> but i mean, we have standards for a reason
<joelteon> >_>
ker2x_ has joined #ruby
<workmad3> joelteon: I'm not sure rubocop counts as a 'standard' ;)
<ker2x_> friendly greetings !
<Mon_Ouie> I'm not sure. Actually I got a job for this summer (working at uni) where I'll do C.
<joelteon> workmad3: yeah, but that's how our style guide works
<joelteon> and I have to set an example :)
<Mon_Ouie> Write a program to check answer to exercises for a systems programming introduction and preferably gives meaningful feedback
<workmad3> joelteon: yay, set an example of more braindead code because an automatic linter told you to not do things the easy way! ;)
<joelteon> absolutely. but the line has to be drawn somewhere
freerobby has quit [Quit: Leaving.]
<havenwood> a lot easier to find in the docs the latter way i guess
alex88 has quit [Quit: Leaving...]
<joelteon> we can either spend a week writing our own style guide, or use an existing tool to help enforce one
baweaver has quit [Remote host closed the connection]
<joelteon> and to be fair, regexp.last_match is a lot easier to google than $1
<havenwood> meh, i dunno here
<Mon_Ouie> Does rubocop not have settings?
enebo has joined #ruby
baweaver has joined #ruby
Jnco has joined #ruby
<workmad3> joelteon: '$1 regex' actually gives decent results ;)
<joelteon> it does, Mon_Ouie
anomaly has joined #ruby
<joelteon> you can use your own yaml file for it
<ker2x_> i have a supernoob question and i'll apreciate a link to a manual if the answer isn't easy : i have a file that look like this : module foo; class bar ... end; buz = new.bar() .... end. i don't know if it's clear but ... when the code after the class definition is executed please ?
<joelteon> we just hardly ever use regex so this hasn't come up
<joelteon> and to be honest I really do like not using magic globals in my code
mrnugget has quit [Read error: Connection reset by peer]
<ker2x_> (well, bar.new() not new bar)
<joelteon> even if it's just a placebo effect
Burgestrand has quit [Quit: Burgestrand]
meth has joined #ruby
combusean has joined #ruby
chipotle has joined #ruby
<Mon_Ouie> workmad3: Someone who doesn't know what $1 may not guess that it is related to regexps though
yfeldblum has joined #ruby
<meth> is it possible to point gem at a local gem server that caches gems as they get requested?
<ker2x_> should i create a pastebin to make my question easier to read ? :)
<workmad3> Mon_Ouie: so it being used right there with a method that replaces a regexp with a string doesn't give enough of a hint? :)
<banister> Mon_Ouie is ruby still your favorite language or are you being seduced away to other glittering castles
<Mon_Ouie> ker2x_: You probably should
Fire-Dragon-DoL has joined #ruby
<ker2x_> ok, brb
sambao21 has joined #ruby
<workmad3> Mon_Ouie: or am I being overly expectant that people who are writing code should be able to pick stuff up from context?
mrnugget has joined #ruby
xcesariox has joined #ruby
<joelteon> workmad3: so you'd prefer $1 over last_match?
ce_afk is now known as cescalante
momomomomo has quit [Quit: momomomomo]
<workmad3> joelteon: I preferred '$1 + yield($2) + $3' over 'match = Regexp.last_match; match[1] + yield(match[2]) + match[3]'
timonv has quit [Remote host closed the connection]
<joelteon> how do you feel about $_ in perl?
<Mon_Ouie> workmad3: hadn't noticed it said regexp on that line (I thought it called it pattern or something). It could still happen in other cases. Not that I'd rather use the long form over $N.
<apeiros> joelteon: I would prefer gsub to yield matchdata
ffranz has quit [Quit: Leaving]
agrinb has joined #ruby
<apeiros> joelteon: since you write monkey patches anyway - write one?
ffranz has joined #ruby
troyreadyyy has quit [Quit: Leaving]
froy has quit [Quit: kablam!]
<apeiros> class String; def gsubm(regexp); gsub(regex) { yield(Regexp.last_match) }; end; end
<apeiros> and then use that :)
ffranz has quit [Read error: Connection reset by peer]
danshultz has quit [Remote host closed the connection]
combusean has quit [Client Quit]
<ker2x_> http://pastebin.com/g6t3B5JX <- my question is here :)
nanoyak has joined #ruby
<workmad3> joelteon: third alternative would be for your regexp to use lookahead and lookbehind so that the arg passed to gsub only contains the bit to yield ;)
<Mon_Ouie> banister: It's still the one I know the most in depth at least, and my go-to language for doing random stuff quickly
momomomomo has joined #ruby
ffranz has joined #ruby
combusean has joined #ruby
<joelteon> yeah, that would be more elegant
<joelteon> but it is passed in by third parties and I don't know where, and I don't have the time to figure it out
danshultz has joined #ruby
<Mon_Ouie> ker2x_: It's executed when you load that file, right after evaluating the class definition
<workmad3> joelteon: :)
yfeldblum has quit [Ping timeout: 258 seconds]
nathancahill has joined #ruby
<Mon_Ouie> (i.e. Bar#stuff will exist at that point)
<joelteon> i just have to figure out the acceptable level of magic
<workmad3> joelteon: well, Regexp.last_match is still magic
<joelteon> regex matches are probably safe, but the line has to be drawn somewhere
<apeiros> workmad3: thought about suggesting that, but won't work universally
zastern_ has quit [Quit: WeeChat 0.4.3]
<joelteon> yes, but it's a self-documenting name
<apeiros> workmad3: lookbehinds must e.g. not have quantifiers
pen has quit [Remote host closed the connection]
<workmad3> apeiros: hey, stop that... I suggested lookaheads and lookbehinds knowing that it was probably unworkable due to large-scale changes
froy has joined #ruby
<workmad3> apeiros: that way I can say 'well, you're already compromising on decent code, so why not just use $1' ;)
dik_dak has joined #ruby
<apeiros> lol
mrnugget has quit [Read error: Connection reset by peer]
<apeiros> ooookay
cpruitt has joined #ruby
<ker2x_> Mon_Ouie: when require is called the code below the class definition is executed ? correct ? so if there is "puts someting" here then "something" will be printed even before my "main" stuff is executed ? (considering i have the "require" before my main code)
* apeiros off to write an url parser
rokob has joined #ruby
<workmad3> ker2x_: the class definition is also code that's executed
atraylen has joined #ruby
<ker2x_> hummmm
<workmad3> >> class Foobar; puts "hey, I'm just code too!"; end
<eval-in__> workmad3 => hey, I'm just code too! ... (https://eval.in/150199)
<ker2x_> ho
n0n3 has joined #ruby
<ker2x_> and the main reason to add code outside the class definition is ?
<workmad3> ker2x_: so code that comes after the class definition is executed after the class definition is executed...
mrnugget has joined #ruby
<ker2x_> hummm
carlyle has joined #ruby
Bumptious has quit [Remote host closed the connection]
cjsarette has joined #ruby
danshultz has quit [Ping timeout: 240 seconds]
<workmad3> ker2x_: because you need to run some code after the class is defined?
<ker2x_> ha yes, doing a class.new inside the class may not work :D
mityaz has quit [Ping timeout: 265 seconds]
cjsarette has quit [Max SendQ exceeded]
<ker2x_> i think i got it
<ker2x_> thank you very much
sinkensabe has joined #ruby
Bumptious has joined #ruby
<workmad3> >> class Foobar; puts new; end
<eval-in__> workmad3 => #<Foobar:0x41c22450> ... (https://eval.in/150201)
mityaz has joined #ruby
Bumptious has quit [Remote host closed the connection]
<workmad3> I wonder what crazy world would need you to wait until after you've closed a class definition before letting you create instances? :)
Bumptious has joined #ruby
<ker2x_> not mine apparently :p
<ker2x_> thank you very much
<Mon_Ouie> One where class Foo; end is translated to Foo = Class.new { … } ?
<workmad3> Mon_Ouie: sounds horrible
<Mon_Ouie> Actually A = Struct.new(…) do … end is something that happens
cjsarette has joined #ruby
andrewjanssen has joined #ruby
p8952 has quit [Ping timeout: 245 seconds]
<workmad3> >> class Foo < Struct.new(:foo, :bar); puts new("foo", "bar"); end
<workmad3> eval-in__ is being slow today :(
nanoyak has quit [Quit: Computer has gone to sleep.]
<Mon_Ouie> Then re-evaluate that definition and get an error because the super class is not the same as it was the first time
danijoo has quit [Read error: Connection reset by peer]
<workmad3> Mon_Ouie: :D
mikecmpbll has joined #ruby
maximski has joined #ruby
danijoo has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
Rahul_Roy has quit [Quit: Connection closed for inactivity]
<ker2x_> So, once my class is loaded, code is executed, and all variable created here are visible by... mmm... the code that did the require ?
bijan07077 has joined #ruby
sinkensabe has quit [Remote host closed the connection]
<Mon_Ouie> Your class being loaded is code being executed
<Mon_Ouie> And no, variables defined like foo = bar are local variables
<Mon_Ouie> So they can only be seen in the current lexical scope
tjr9898__ has quit [Remote host closed the connection]
ta_ has joined #ruby
ta has quit [Read error: Connection reset by peer]
carraroj has quit [Ping timeout: 258 seconds]
<ker2x_> mmm i have an idea
Bumptious has quit [Remote host closed the connection]
danshultz has joined #ruby
bluOxigen has quit [Ping timeout: 265 seconds]
lkba has joined #ruby
enebo has quit [Quit: enebo]
<ker2x_> https://github.com/ker2x/lyly/blob/master/libs/object.rb class definition end at line 68 then code is executed below, ok. RuntimeObject is an instance of Object. now... https://github.com/ker2x/lyly/blob/master/libs/method.rb RuntimeObject is used here, it's visible because it's in the same module ?
codeurge has quit [Quit: Quit.]
aspires has quit []
jackneill has quit [Ping timeout: 264 seconds]
geggam has quit [Ping timeout: 258 seconds]
happytux_ has joined #ruby
obs_ has quit [Remote host closed the connection]
aspires has joined #ruby
tjr9898 has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
ktun_ has joined #ruby
ktun has quit [Read error: Connection reset by peer]
rgiscard has joined #ruby
<ker2x_> ping
meth has left #ruby [#ruby]
andrewjanssen has quit [Quit: Linkinus - http://linkinus.com]
p8952 has joined #ruby
<Mon_Ouie> It's not a local variable, it's a constant define in the module Lyly
Solnse has joined #ruby
sooik has joined #ruby
<Mon_Ouie> Which does mean that it's accessible in that second place
<ker2x_> So it's visible from anything that is in the same module ?
Beoran has joined #ruby
codeurge has joined #ruby
<Mon_Ouie> You can access it from other places too, just not directly
<ker2x_> ok
<Mon_Ouie> You can just do Lyly::RuntimeObject
<ker2x_> well... Thank you \o/
creativeembassy has joined #ruby
davedev2_ has joined #ruby
SegFaultAX has quit [Excess Flood]
obs has joined #ruby
SegFaultAX has joined #ruby
fantazo has joined #ruby
freerobby has joined #ruby
nowthatsamatt has joined #ruby
ExceptionlCatch has joined #ruby
davidcollom_zzz has joined #ruby
m8 has joined #ruby
<ker2x_> That's weird stuff, i'm wondering if i could avoid doing that. it's probably a very clever hack but... meh
<ExceptionlCatch> i'm using ruby with the 'cgi' module and want use websockets. it seems everyone is using em-websockets or faye, is the original websockets unpopular?
n0n3 has quit []
Edelwin has left #ruby ["not here"]
davedev2_ is now known as davedev24_
davedev24 has quit [Ping timeout: 276 seconds]
axl_ has quit [Quit: axl_]
<havenwood> ExceptionlCatch: a lot of attention went to SSE
RSTJNII has quit [Remote host closed the connection]
RSTJNII has joined #ruby
jack_rabbit has joined #ruby
<banister> havenwood i used to be all about websockets but now i think sse is cooler
Spami has joined #ruby
<banister> apparently it's faster and you can also use it without having to host a separate websockets server, sse just uses your regular web server on teh standard ports
Spami_ has quit [Quit: Leaving]
Spami has quit [Client Quit]
<ker2x_> See you later ! thank you for the help. enough code for tonight :)
<havenwood> banister: like SOAP versus REST
Spami has joined #ruby
<havenwood> banister: text/event-stream ftw
ker2x_ has quit [Quit: ChatZilla 0.9.90.1 [Firefox 29.0.1/20140506152807]]
<ExceptionlCatch> oh nifty, thanks havenwood and banister for the clarification
<happytux_> So there is a Rakefile and a FileList defined inside: puppet_files = FileList['**/*.pp'].exclude('.*', 'doc/', 'vendor/', 'modules/')
<happytux_> Now how can I run a command with a path to each of those files in FileList?
<happytux_> Because the command in question does only support one file at time.
zorak has joined #ruby
AlexRussia has quit [Read error: Connection reset by peer]
bubbajones has quit [Remote host closed the connection]
AlexRussia has joined #ruby
Olipro has quit [*.net *.split]
davidcollom has quit [*.net *.split]
justinxreese has quit [*.net *.split]
davidcollom_zzz is now known as davidcollom
jackneill has joined #ruby
kraljev6 has joined #ruby
geggam has joined #ruby
<kraljev6> Hey, what does Hash#keep_if do without a block?
<kraljev6> It returns an enumerator, but I don't understand what this enumerator is good for.
combusean has quit [Ping timeout: 240 seconds]
kenneth has joined #ruby
MZAWeb_ has quit [Ping timeout: 265 seconds]
vpretzel|215 is now known as vpretzel|910
<rgiscard> ExceptionalCatch: If you go Rails (4.x) way, consider ActionController::Live to build yer SSE
Sirupsen has joined #ruby
lw has quit [Quit: s]
<terrellt> kraljev6: It's an object that responds to the basic enumeration methods.
<terrellt> kraljev6: All the enumerable methods return that without a block.
mansi_ has quit [Remote host closed the connection]
<terrellt> << a=[1,2]; b=a.each; b.first;
<terrellt> >> a=[1,2]; b=a.each; b.first;
<eval-in__> terrellt => 1 (https://eval.in/150207)
mansi has joined #ruby
elaptics is now known as elaptics`away
reset has joined #ruby
reset has quit [Client Quit]
sooik has quit [Ping timeout: 250 seconds]
<shevy> booting up linux takes a long time
beef-wellington has quit [Ping timeout: 240 seconds]
<Mon_Ouie> kraljev6: Probably calling with_index or with_object are the only two things you'd ever do to the enumerator returned by a method like #keep_if
<terrellt> shevy: Boot time and dollars spent have an inverse relationship.
lw has joined #ruby
<shevy> it's more of a design problem, all those one-after-the-other shell scripts that are run before one can login
mrnugget has quit [Read error: Connection reset by peer]
<Mon_Ouie> (most other additional methods pass it a block that doesn't return anything useful)
rizzatti has joined #ruby
kraljev6 has quit [Ping timeout: 245 seconds]
kraljev6 has joined #ruby
combusean has joined #ruby
dangerousdave has joined #ruby
moritzs has quit [Ping timeout: 252 seconds]
<kraljev6> so, anyone? What does Hash#keep_if do without a block
mansi has quit [Ping timeout: 276 seconds]
<banister> kraljev6 Mon_Ouie answerd already
mrnugget has joined #ruby
anarang has quit [Ping timeout: 276 seconds]
rbenv has joined #ruby
aspiers has joined #ruby
troyready has joined #ruby
blackmesa has quit [Quit: WeeChat 0.4.3]
Olipro has joined #ruby
MZAWeb_ has joined #ruby
Olipro has quit [Max SendQ exceeded]
mansi has joined #ruby
mansi has quit [Remote host closed the connection]
RohanRNS has joined #ruby
Olipro has joined #ruby
mansi has joined #ruby
justinxreese has joined #ruby
Olipro has quit [Changing host]
Olipro has joined #ruby
mrnugget has quit [Read error: Connection reset by peer]
beef-wellington has joined #ruby
einarj has quit [Remote host closed the connection]
MrWharfsnort has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
Hanmac1 has joined #ruby
freezey has joined #ruby
mrnugget has joined #ruby
Hanmac has quit [Ping timeout: 258 seconds]
shadoi has joined #ruby
blackmesa has joined #ruby
agjacome has joined #ruby
obs has quit [Quit: Saliendo]
tvw has quit []
mansi has quit [Ping timeout: 252 seconds]
mansi_ has joined #ruby
anomaly has left #ruby [#ruby]
havenwood has quit [Ping timeout: 272 seconds]
danshultz has quit [Remote host closed the connection]
havenwood has joined #ruby
_havenn has joined #ruby
havenn has quit [Remote host closed the connection]
danshultz has joined #ruby
brtdv has quit []
n0n3 has joined #ruby
nanoyak has joined #ruby
<cout> Hanmac1: hah
<cout> haven't seen it
Hanmac1 is now known as Hanmac
rdark has quit [Quit: leaving]
brtdv has joined #ruby
shadoi has quit [Ping timeout: 276 seconds]
Rahul_Roy has joined #ruby
thesheff17 has quit [Ping timeout: 240 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
paulfm has quit []
Musashi1 has joined #ruby
sanguisdex has joined #ruby
mjs2600 has joined #ruby
danshultz has quit [Ping timeout: 265 seconds]
b00stfr3ak has quit [Ping timeout: 245 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
paulfm has joined #ruby
b00stfr3ak has joined #ruby
obs has joined #ruby
atmosx has quit [Quit: Lost in trance]
x1337807x has joined #ruby
yfeldblum has joined #ruby
timonv has joined #ruby
arrubin has joined #ruby
nanoyak has joined #ruby
postmodern has joined #ruby
axl_ has joined #ruby
treehug88 has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
treehug8_ has quit [Ping timeout: 240 seconds]
agrinb has quit [Remote host closed the connection]
nanoyak has quit [Client Quit]
Squarepy has joined #ruby
zastern has joined #ruby
nanoyak has joined #ruby
bijan07077 has quit [Quit: bijan07077]
frogssgy has joined #ruby
p8952 has quit [Ping timeout: 252 seconds]
Hobogrammer has joined #ruby
AlexRussia has quit [Ping timeout: 252 seconds]
momomomomo has quit [Quit: momomomomo]
AlexRussia has joined #ruby
mehlah has quit [Quit: Leaving...]
frosgy has quit [Ping timeout: 264 seconds]
mjsmith2 has joined #ruby
x1337807x has quit [Ping timeout: 258 seconds]
freezey has quit [Remote host closed the connection]
xrq has joined #ruby
spider-mario has quit [Ping timeout: 258 seconds]
tylerkern has joined #ruby
freezey has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
mehlah has joined #ruby
agrinb has joined #ruby
afex has joined #ruby
nowthatsamatt has joined #ruby
rgiscard has quit [Remote host closed the connection]
mattmcclure has joined #ruby
combusean has quit [Ping timeout: 250 seconds]
nowthatsamatt has quit [Client Quit]
n0n3 has quit []
nwertman has quit [Quit: Lost terminal]
maximski has quit []
mrnugget has quit [Quit: mrnugget]
p8952 has joined #ruby
p8952 has quit [Changing host]
p8952 has joined #ruby
JaTochNietDan has quit [Ping timeout: 240 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
zarul has quit [Ping timeout: 258 seconds]
papercode has joined #ruby
nanoyak has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
Crayboff has joined #ruby
jespada has joined #ruby
livcd has joined #ruby
kpshek has joined #ruby
bbloom has quit [Ping timeout: 276 seconds]
grzywacz has quit [Quit: :wq]
mikecmpbll has joined #ruby
Crayboff is now known as newbabe
<livcd> Hi folks. What gem can you recommend me for a SSH/SCP kind of stuff ? I want to open a connection to remote server and send & receive commands
xerxas has quit [Quit: Connection closed for inactivity]
danijoo has quit [Read error: Connection reset by peer]
_maes_ has quit [Ping timeout: 240 seconds]
IceDragon has joined #ruby
danijoo has joined #ruby
<ericwood> net/ssh does stuff like that
papercode has quit [Remote host closed the connection]
callenb has quit [Read error: Connection reset by peer]
antonishen has quit [Read error: Connection reset by peer]
x1337807x has joined #ruby
sambao21 has joined #ruby
papercode has joined #ruby
callenb has joined #ruby
antonishen has joined #ruby
JaTochNietDan has joined #ruby
shvelo has quit [Ping timeout: 240 seconds]
djbkd has quit [Remote host closed the connection]
<livcd> terrellt: what is the main difference between them ?
lethjakman has joined #ruby
djbkd has joined #ruby
tvw has joined #ruby
shiin has joined #ruby
mjs2600 has quit [Remote host closed the connection]
mark_locklear has quit [Ping timeout: 265 seconds]
<livcd> terrellt: oh seems like sshkit uses net-ssh
atmosx has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
<terrellt> livcd: Yes. sshkit is just a DSL.
IceDragon has quit [Ping timeout: 252 seconds]
<webgen> how do i check if a.is_a Letter? Character?
IceDragon has joined #ruby
<jhass> [Character, Letter].include? a.class though with two I'd stay at a.is_a?(Letter) || a.is_a?(Character)
shock_one has joined #ruby
<Hanmac> webgen: with regexp?
<centrx> webgen, a.is_a?(String) && a.length == 1
<shock_one> What's the syntax to execute a lambda as a method? https://gist.github.com/avbrychak/42459958dac5d7371d82
<centrx> shock_one, my_lambda.call(args)
<terrellt> Sorta
<terrellt> He wants the context too
<jhass> shock_one: instance_exec(callable)
<terrellt> ^
sepp2k has quit [Ping timeout: 240 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
alem0lars has joined #ruby
b00stfr3ak has quit [Ping timeout: 240 seconds]
kevind has quit [Quit: kevind]
sanguisdex has quit [Quit: Leaving.]
b00stfr3ak has joined #ruby
maletor has joined #ruby
geoffw8_ has quit [Quit: Connection closed for inactivity]
kpshek has quit [Ping timeout: 258 seconds]
thesheff17 has joined #ruby
paulfm has quit []
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shock_one> Yeah, works in this case, but I have an error in real method. http://goo.gl/lbJn1H
sambao21 has quit [Quit: Computer has gone to sleep.]
rgiscard has joined #ruby
SegFaultAX has quit [Excess Flood]
<webgen> Hanmac, i want to check if a.[0] is an alphabetic character :S
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<webgen> a is a string
sambao21 has joined #ruby
<apeiros> a =~ /\A[A-Za-z]/
paulfm has joined #ruby
spider-mario has joined #ruby
<apeiros> depending on what you consider alphabetic, you might want something different than [A-Za-z]
<jhass> webgen: ('a'..'z').cover? a[0].downcase
<xybre> webgen: Remedy has a Key class which might be useful depending on what you're doing: http://rubydoc.info/gems/remedy/Remedy/Key
<Hanmac> apeiros: why not /\A[[:alpha:]]/ ?
nathancahill has quit [Quit: nathancahill]
<apeiros> Hanmac: because fuck [[::]] notation :)
<webgen> cool thanks guys! i got it =~ this was what i needed
<Hanmac> /^\p{alpha}/
<xybre> That notation is pretty gnarly.
SegFaultAX has joined #ruby
<happytux_> hi
<shevy> hmmmmm
<happytux_> is this channel rake related?
<apeiros> Hanmac: \A not ^
<happytux_> The #rake channel is empty.
<apeiros> but otherwise acceptable
<jhass> \p{alpha} :P
<shevy> class Cat; end; class House; def initialize; @cat = Cat.new; end; end
<Hanmac> apeiros: yeah ok but for test it works too
ktun_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> Hanmac: no
<jhass> ugh, too slow
<shevy> now most of the time inside of the class House, I would use @cat
<apeiros> "123\nA" would match
<shevy> but I could actually use: def cat; @cat; end, which would be the same or? I could omit the leading @
<Hanmac> apeiros: yeah i mean it did work for MY tests ...
Cadmi has joined #ruby
<Hanmac> shevy ... hm yeah but inside House calling @cat might be a bit faster ...
<Cadmi> Hi!
<shevy> Hanmac really?
<Cadmi> How could i stop iterating an array if i find an element ?
skaflem has quit [Quit: Leaving]
<apeiros> Cadmi: use Array#find
mehlah has quit [Quit: Leaving...]
rgiscard` has joined #ruby
<apeiros> depending on what you need, also look at #any? or #find_index
<Cadmi> mmmm
<Cadmi> wait i give you the problem
<Cadmi> it is very easy
<Hanmac> shock_one: did you try instance_exec too ? if yes you want proc, not lambdas for that
<Cadmi> but i am totally new in ruby and i can't get it thorugh google
skinkitten has quit [Ping timeout: 276 seconds]
prc has joined #ruby
bbloom has joined #ruby
ktun has joined #ruby
combusean has joined #ruby
<shevy> Cadmi but did apeiros' answer not already solve the very question you asked
<shock_one> Hanmac, thank you, if works with instance_exec. I didn't want to use Procs because they look ugly. But why it worked in the gist? https://gist.github.com/avbrychak/42459958dac5d7371d82
<Cadmi> apeiros this is the problem: http://pastebin.com/2NjQEAhx
nanoyak has joined #ruby
<Cadmi> yes shevy you can look the problem also if you want
rgiscard has quit [Ping timeout: 265 seconds]
<Cadmi> it is a 2d matrix to find a bomb
<atmosx> guys, I wanna grab a stream... I wrote a script could be execute through chrome, 5 days a week at 8:30 but... how do I stop it after 2 hours and 10 minutes?
<apeiros> Cadmi: find_index, as I said
<atmosx> should I something else like eventmachine (never used it don't know if the task)
<Cadmi> find_index? find value
<jhass> Cadmi: or each_with_index and explicit return
<atmosx> I could get the pid of the process and kill it? hm
<Jnco> Ive been a sys admin my whole career then jumped into devops writing some shell scripts in python, php, bash-- you guys think I can handle ruby?
<apeiros> Cadmi: *maybe* you should read the docs of the method
<_havenn> Jnco: yes
<Jnco> why did I decide to now to take on programming seriously
Aaaal has quit [Quit: Aaaal]
<Jnco> after like 15 years haha
<apeiros> Jnco: sure. ruby isn't that different from python
poguez_ has joined #ruby
<apeiros> and if you've survived the hell that is php…
<Jnco> yeah i like the gems
<Hanmac> shock_one: Person.new.instance_exec(&callable) works for me
<divbell> jnco, you've been a sysadmin your entire career but you've never written any code to help you with that?
<Jnco> some vb
nathancahill has joined #ruby
* divbell backs away slowly
<Jnco> startup scripts.. windows shell script
<Jnco> lol
<Jnco> was windows admin
<Jnco> for a long time
sepp2k has joined #ruby
<Jnco> I like linux for servers now more pretty obvious why
djbkd has quit [Remote host closed the connection]
<shock_one> Hanmac, yeah, for me too. But instance_eval works too, and it's strange since 1. instance_eval passes self as an argument 2. lambdas force arity.
<shevy> ruby works on linux and windows
<Jnco> windows seems to get fatter and fatter the more I use linux
<shevy> and even on toy OS like osx
<Jnco> why arnt more people using it
<shevy> ruby?
<yxhuvud> shevy: how is osx a toy?
<Jnco> yea
<Hanmac> shock_one: it totally depends on the block args
<shevy> yxhuvud it has the eyecandy
<shevy> Jnco there is a cost involved when learning a programming language
mark_locklear has joined #ruby
aspiers has quit [Ping timeout: 245 seconds]
<xybre> OSX is BSD + NEXT + UI libraries.
<atmosx> is it?
<atmosx> what is a BSD?
<shevy> something that has ports
aiguu_ has quit [Ping timeout: 276 seconds]
nari has quit [Ping timeout: 240 seconds]
maximski has joined #ruby
<xybre> " Darwin, the system on which Apple's Mac OS X is built, is a derivative of 4.4BSD-Lite2 and FreeBSD"
<xybre> Of course most operating systems contain BSD's network stack code, including Solaris and Windows (up until 7, I think) but OSX is literally BSD.
<shevy> with ports?
<webgen> and how do i check if a string consists of a legit binary number ?
<shock_one> Hanmac, mystery is revealed, thank you.
<shevy> Hanmac how is rwx going
<shevy> can I gem install it?
<xybre> shock_one: Yes, they all have ports.
razrunelord has quit [Remote host closed the connection]
tylerkern has joined #ruby
<terrellt> webgen: Umm..
<Hanmac> shevy not yet, did work on patches for wx itself recently ... but have more important stuff todo
<shock_one> xybre, TCP ports?
aspiers has joined #ruby
<divbell> windows ipv4 tcp/ip stack is from bsd
<xybre> You're probably talking about Berkeley Sockets, not jsut ports.
<terrellt> >> "1110011".to_i(2).to_s == "1110011"
<eval-in__> terrellt => false (https://eval.in/150217)
<webgen> terrellt, i guess shorcut method isnt necessary i ll just manually check it
<shevy> Hanmac, damn it, now you are even patching wx itself :(
<shock_one> xybre, my OS has more ports than yours.
skinkitten has joined #ruby
<xybre> More ports to hack you with my dear.
<shevy> xybre that is the first time I have heard about berkeley sockets now
<shevy> with ports I mean: cd /usr/src/ruby/; make
<shevy> or whatever it was again
<terrellt> Oh oh
<terrellt> >> "1110011".to_i(2).to_s(2) == "1110011"
<eval-in__> terrellt => true (https://eval.in/150218)
<shevy> been like 8 years since I last tried freebsd
<terrellt> ^ That
<xybre> shevy: You mean "port" as in there's a way to compile Ruby on it?
<terrellt> Although it'd probably break with leading zeros.
<xybre> lulz
<shevy> xybre I mean that ports system that they use to compile software, and where they say that they don't need a package manager like linux distributions because they have ports
agrinb has quit [Remote host closed the connection]
agrinb has joined #ruby
<mostlybadfly> Hey guys what is the rails channel?
<mostlybadfly> Prob obvious lol
<shevy> #rubyonrails
<shevy> I remember you mostlybadfly
aspires has quit []
<shock_one> shevy, cool kids use brew nowadays.
<shevy> but I dont remember from which channel
mikepack has quit [Remote host closed the connection]
<shevy> mostlybadfly not #nixos right?
<mostlybadfly> shevy: this one :)
<shevy> whoa cool
<mostlybadfly> You've helped me quite a few times
<shevy> I don't remember really
randomnick_ has joined #ruby
<mostlybadfly> Nae just starting with rails and wanted to join a channel in case I have questions
mikepack_ has joined #ruby
<shevy> but the two coolest ideas found in distributions had been in gobolinux and in nixos
<xybre> shevy: Ah. OSX has a few port systems. I use homebrew, which is pretty great and manages packages and dependencies. I actually wish for a similar system on Linux.
<shevy> cool
<shevy> well I know nothing about rails really but if there are ruby questions I might be able to help!
<xybre> Note that Portage/Emerge is not at all the same thing as Homebrew.
robbyoconnor has joined #ruby
<shevy> unless it is meta-instance-eval mega stuff
<xybre> Homebrew is written in Ruby also.
oo_ has joined #ruby
<shevy> and only for osx folks :(
<shevy> it reminds me of textmate
<shevy> "if you want to use it, get a mac"
<xybre> There's a ... uh.. port of Homebrew for Linux in progress.
<shock_one> shevy, well, all the package managers are only for pick-an-OS.
<shevy> shock_one hmm, I guess some package managers on linux could work on osx too
chipotle has quit [Quit: cya]
robbyoconnor has quit [Client Quit]
<shock_one> shevy, I doubt that it's possible to run pacman on ubuntu or yum on debian, not to say about other OSes.
<shevy> oh you can run pacman quite easily
<shevy> ftp://ftp.archlinux.org/other/pacman/pacman-4.0.3.tar.gz and http://www.libarchive.org/downloads/libarchive-3.1.2.tar.gz
<shevy> dunno how to setup yum or rpm properly
<xybre> Portage can be run on OSX, but it blows.
lw has quit [Quit: s]
<xybre> You have to recompile the entire stack and it takes even longer to set up than Gentoo does normally.
oo_ has quit [Ping timeout: 240 seconds]
<shevy> dpkg is doable but you need to somehow get in the proper URLs for the archives which I never succeeded ... http://ftp.debian.org/debian/pool/main/d/dpkg/dpkg_1.17.9.tar.xz
mansi_ has quit [Read error: Connection reset by peer]
<shevy> haha oh my god gentoo...
rgiscard` has quit [Remote host closed the connection]
<shevy> I compiled the whole system on a laptop in gentoo once
<shevy> late at night
mansi has joined #ruby
<shevy> I woke up early in the morning to see some stupid error fail and stop the whole cycle
mansi has quit [Read error: Connection reset by peer]
MrWharfsnort has quit [Ping timeout: 255 seconds]
<wallerdev> haha that's the worst
<xybre> I've successfully run Gentoo on servers and laptops, but considering how slowly they update their source repos and their stupid fights with upstream maintainers its really jsut not worth it anymore.
mansi has joined #ruby
alvaro_o has joined #ruby
saarinen has quit [Quit: saarinen]
<shock_one> xybre, what's your choice?
<wallerdev> the true linux choice these days is mac os x
<shevy> xybre what do they fight over?
sinkensabe has joined #ruby
<shevy> wallerdev I like linux from scratch + beyond linux from scratch simply because it teaches people core things
<yxhuvud> wallerdev: by definition, no. osx is not a linux.
danshultz has joined #ruby
<wallerdev> unix, w/e same thing
<wallerdev> :)
<_havenn> bsd
<shock_one> wallerdev, kind of, until you dig deeper.
<xybre> shock_one: Right now I use Ubuntu Server for my servers, and I use Crunchbang and Manjaro a bit for desktop use. Haiku is also a great OS, but requires some legwork for certain apps.
<shevy> cool
<wallerdev> did you guys watch silicon valley last night
<shevy> haiku was nice
<shevy> I only ran it in qemu though
<wallerdev> ruby on rails came up on it lol
<shevy> wallerdev really? why was it featured?
jonahR has joined #ruby
<wallerdev> the main character was like "i learned ruby on rails in a weekend, i can figure out this cloud stuff"
<wallerdev> but he couldnt figure out cloud
<wallerdev> D:
<xybre> shevy: For example Gentoo bans nethack because of Gentoo's broken security design. Gentoo blames Nethack for opening a security hole while Nethack is perfectly secure on every other distro and OS.
<shock_one> xybre, Is Manjaro for people who didn't manage to install Arch?
<xybre> shock_one: Yep!
<yxhuvud> xybre: I've heard very ugly things about the nethack code base though, so I can kinda understand that.
<shock_one> xybre, those should not touch my Arch.
<shevy> xybre wow
<shevy> that is evil
<shevy> to ban nethack
<shevy> that's like attacking ancient games
<xybre> yxhuvud: Oh man, don't get me wrong, I'm not justifying the casebase. It's called "nethack" because its a big hack a couple of people came up with via email source code back and forth.
<_havenn> OS X is fully POSIX-compliant unlike most mostly compliant Linux distros :O
<xybre> codebase^
<shevy> cakebase
<shock_one> Some people use emacs as an OS.
<shevy> I use GNU Hurd
<_havenn> shevy: \o/
<shevy> but only when noone is looking
<shevy> shock_one I can't make too much fun of emacs because matz is using it
<xybre> Wow, OSx has never been POSIX compliant before. I mean, really, thats probably becasue POSIX as a standard has some pretty silly edge cases in places.
<wallerdev> the good thing about emacs is the shortcuts work everywehre
Eiam_ has joined #ruby
<xybre> shevy: I've never gotten around to even booting HURD. But I did use Menuet for a little while.
<wallerdev> vim you learn but cant use it anywhere besides vim lol
<Xeago> wallerdev: I disagree
<Xeago> readline has a vimmode
<Xeago> sorry vimode*
phutchins has quit [Ping timeout: 250 seconds]
<wallerdev> sure you can hack it into various other applications
<Xeago> wallerdev: no, you just control readline
<Xeago> my irb, pry, shell
<Xeago> they all have vimode
<happytux_> Anyone here using Rake?
<shock_one> Did you guys know that emaks's C-p and C-n work in Skype and Chrome on OS X? Like to edit messages and autocomplete omnibar search suggestions.
<xybre> I use Emacs shortcuts in Vim.
<wallerdev> but like i can open a web browser and type in an input file and use ctrl+a and ctrl+e to go to beginning and end of lines of text fields
<wallerdev> etc
debajit has joined #ruby
<xybre> I could never decide if viml or emacslisp was the worse language though.
<wallerdev> any applciation on a mac i can use my emacs shortcuts
<shock_one> xybre, some centuries ago you would be burned down.
<xybre> shock_one: Vim doesn't have very good commandline editing shortcuts, so patching in Emacs shortcuts makes sense. Best of both worlds.
benzrf|offline is now known as benzrf
Eiam has quit [Ping timeout: 260 seconds]
<wallerdev> elisp is awful lol
<wallerdev> configuring emacs sucks haha
<shock_one> xybre, I use vi keymap in console. Especially I miss M-,
<xybre> So is viml, but yeah.
<benzrf> it has /dynamic scoping/ tho
<benzrf> *elisp does
<wallerdev> i just use textmate now though haha
prc has left #ruby [#ruby]
<debajit> Newbie question: How do I get the maximum Integer in Ruby?
aspires has joined #ruby
<wallerdev> there is no maximum integer is there?
workmad3 has joined #ruby
<wallerdev> or do you mean from an array haha
<terrellt> debajit: I assume you want..
<terrellt> >> [3,4,5,1,2,36].max
<eval-in__> terrellt => 36 (https://eval.in/150219)
<atmosx> hm
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<debajit> wallerdev: I know, I’m trying to write a test where I need to basically get any integer. I’d like to generate a number from INT_MIN to INT_MAX. How do I do that? I’m writing a static function: Any.int_value
ktun has joined #ruby
<_havenn> >> Float::MAX
<eval-in__> _havenn => 1.7976931348623157e+308 (https://eval.in/150223)
thumpba has quit []
<terrellt> Are you sure INT_MIN to INT_MAX is useful information? =)
<terrellt> >> Integer::MAX
<eval-in__> terrellt => uninitialized constant Integer::MAX (NameError) ... (https://eval.in/150224)
<terrellt> =(
<workmad3> what's this 'int max' you speak of?
<wallerdev> theres not a max haha
<debajit> INT_MIN and MAX are the C / C++ analogs of what I am looking for. Unless there is a way to avoid them altogether in Ruby
ktun has quit [Client Quit]
<benzrf> well there's automatic bignum promotion iirc
<benzrf> debajit: for example
<workmad3> ^^
<benzrf> >> 99999999999999999999999999999999999999.class
<eval-in__> benzrf => Bignum (https://eval.in/150225)
AlexRussia has quit [Read error: Connection reset by peer]
<benzrf> >> 9999999999999999999.class
<eval-in__> benzrf => Bignum (https://eval.in/150226)
<benzrf> >> 99999999999.class
<eval-in__> benzrf => Bignum (https://eval.in/150227)
<benzrf> >> 99999999.class
<eval-in__> benzrf => Fixnum (https://eval.in/150228)
<benzrf> hmm
<benzrf> >> (99999999 * 10).class
<eval-in__> benzrf => Fixnum (https://eval.in/150229)
<terrellt> Just pick an arbitrarily large number.
<benzrf> o:
<RubyPanther> yeah, we don't have crappy limits
<benzrf> >> (99999999 * 15).class
<eval-in__> benzrf => Bignum (https://eval.in/150230)
<benzrf> ^^
<baweaver> >> 2 ** 32
<eval-in__> baweaver => 4294967296 (https://eval.in/150231)
<baweaver> >> 2 ** 16
<eval-in__> baweaver => 65536 (https://eval.in/150232)
<baweaver> >> 2 ** 31
<eval-in__> baweaver => 2147483648 (https://eval.in/150233)
AlexRussia has joined #ruby
<wallerdev> you can always use Float::INFINITY
<baweaver> >> (2 ** 31).class
<eval-in__> baweaver => Bignum (https://eval.in/150234)
<workmad3> debajit: 'int max' in ruby == 'how much memory do you have available? we could use it all up for a single number if you wanted'
<baweaver> >> ((2 ** 31) - 1).class
<eval-in__> baweaver => Bignum (https://eval.in/150235)
<_havenn> 1.upto(Float::INFINITY).lazy.select(&:even?).first 5
<baweaver> huh, odd
<RubyPanther> >> 2**2**2**2**2**2
<eval-in__> RubyPanther => /tmp/execpad-7e00c0d83303/source-7e00c0d83303:2: warning: in a**b, b may be too big ... (https://eval.in/150236)
Bumptious has joined #ruby
<RubyPanther> comeon, why is eval-in still bugging with warnings?
MrWharfsnort has joined #ruby
<RubyPanther> whose bot is it, don't they love their own bot?
<baweaver> >> ((2 ** 31) - 5).class
<eval-in__> baweaver => Bignum (https://eval.in/150237)
<xybre> We may not have limits but we still ahve crappy floating point math!
nanoyak has quit [Quit: Computer has gone to sleep.]
<baweaver> >> ((2 ** 31) - 10).class
<eval-in__> baweaver => Bignum (https://eval.in/150238)
<baweaver> >> ((2 ** 31) - 100).class
<eval-in__> baweaver => Bignum (https://eval.in/150239)
<RubyPanther> warnings are not output
<baweaver> >> ((2 ** 31) - 1000).class
<eval-in__> baweaver => Bignum (https://eval.in/150240)
upsell5 has joined #ruby
<baweaver> >> ((2 ** 31) - 10000).class
<eval-in__> baweaver => Bignum (https://eval.in/150241)
<RubyPanther> they are a side channel
<terrellt> >> (2**(0.size * 8 -2) -1).class
<eval-in__> terrellt => Fixnum (https://eval.in/150242)
<terrellt> THAT'S the max
maletor has quit [Quit: Computer has gone to sleep.]
<terrellt> >> (2**(0.size * 8 -2)).class
<eval-in__> terrellt => Bignum (https://eval.in/150243)
djbkd has joined #ruby
<debajit> workmad3: I know I could use up all the memory :P Lets say I’m looking for the largest value less than a BigNum (sorry, I’m not sure how big that is)
<shock_one> xybre, use Rational, Luke.
combusean has quit [Ping timeout: 255 seconds]
<baweaver> It's normally around 2.14 billion
<workmad3> debajit: depends on if you're on a 32 or 64 bit ruby
lw has joined #ruby
maletor has joined #ruby
<xybre> shock_one: What if I'm irrational?
<terrellt> >> (2**(0.size * 8 -2) -1)
<eval-in__> terrellt => 1073741823 (https://eval.in/150244)
<wallerdev> >> Bignum.superclass
<eval-in__> wallerdev => Integer (https://eval.in/150245)
<wallerdev> no max
aiguu_ has joined #ruby
<debajit> workmad3: Lets say 32-bit. How would I get the max then?
sinkensabe has quit [Remote host closed the connection]
<terrellt> debajit: What I typed is the largest fixnum value.
<RubyPanther> (2**(0.size * 8 -2) -1)
<RubyPanther> => 4611686018427387903
vjt has quit [Ping timeout: 265 seconds]
<benzrf> >> (2**(0.size * 8 -2) -1).clas
<eval-in__> benzrf => undefined method `clas' for 1073741823:Fixnum (NoMethodError) ... (https://eval.in/150248)
<benzrf> >> (2**(0.size * 8 -2) -1).class
<eval-in__> benzrf => Fixnum (https://eval.in/150249)
sinkensabe has joined #ruby
<benzrf> >> (2**(0.size * 8 -2) - 0).class
nanoyak has joined #ruby
<eval-in__> benzrf => Bignum (https://eval.in/150251)
<workmad3> hmm, interesting, with exponentials '3 ** 3 ** 3 ** 3' gives Infinity, but 'a = 3; 4.times { a **= 3}' doesn't crap out :)
nwertman has joined #ruby
shashank_rs has joined #ruby
<benzrf> >> 3 ** 3 ** 3 ** 3
<eval-in__> benzrf => /tmp/execpad-099e665ad75b/source-099e665ad75b:2: warning: in a**b, b may be too big ... (https://eval.in/150252)
<benzrf> o=
aspiers has quit [Ping timeout: 255 seconds]
<debajit> terrellt: Got it :) Thanks. Is there a way to get to the largest fixnum without having to calculate it?
<shevy> god man
<benzrf> workmad3: im guessing its grouping
<benzrf> i.e.
<terrellt> debajit: No.
<terrellt> debajit: It's dependent on environment.
<benzrf> 3**(3**(3**3))
<RubyPanther> workmad3: the shortcuts are different depending on the methods
<benzrf> ((3**3)**3)**3
<benzrf> ^not the same!!!
<workmad3> benzrf: yeah... I currently have a bignum that's almost 7 million digits long...
binaryhat has quit [Quit: Leaving]
Bumptious has quit [Read error: Connection reset by peer]
<workmad3> ah, I've reached 'Infinity' in bignums after trying to cube that
<terrellt> workmad3 likes to break the world.
<RubyPanther> debajit: You should generally NOT NOT NOT NOT NOT be worrying about that as a "limit'
<debajit> terrellt: Got it :) Thanks a ton :) I’m still getting the hang of Ruby, I love it so far :) very beautiful language. I’m surprised its not used as much as languages like Java
<RubyPanther> Also note that a Bignum is still an integer
<shevy> ur mom is a fixnum!!!
_justin has joined #ruby
Bumptious has joined #ruby
diegoviola has joined #ruby
<debajit> RubyPanther: Ah, thanks. Where could I see a class hierarchy of Numeric?
<RubyPanther> shevy: ur moms is so fat, she tried to get an integer representation and exceeded the stack limit
<shevy> lol
jhass is now known as jhass|off
<benzrf> ur moms so fat, she follows the 8.3 naming cheme
<benzrf> *scheme
ktun has joined #ruby
<RubyPanther> debajit: we don't normally worry about siblings or children of classes, they are under their own care, so we don't usually have class hierarchy diagrams. They are only useful in Ruby when you're doing things very wrong.
sinkensabe has quit [Ping timeout: 252 seconds]
<RubyPanther> debajit: You should be worrying ONLY about if the objects you're getting have the methods you need
<workmad3> benzrf: hmm, so it looks like ruby can do 'a **= 3' 17 times in ruby before bignum goes to infinity
<debajit> RubyPanther: Got it. I just wanted to see how Numeric’s and Bignums and Integers were related that’s all actually :) (I’m just trying to learn Ruby in a few weeks)
<workmad3> also interestingly... it uses Float::Infinity for that...
jackneill has quit [Remote host closed the connection]
<RubyPanther> when you need an int, you say foo.to_i to get an integer representation. If the number is somehow "too big," then foo's #to_i method should be written to handle that. More often you would simply have a max value that comes out of your problem domain, instead of out of the limits of the host machine. In general in Ruby we want to be free of caring about the machine, we want to think, and have our code reflect, the problem domain as se
<RubyPanther> en from a human perspective, not as seen from a C perspective. This is true even when writing C extensions
<workmad3> so (a **= 3).class will go from Fixnum to Bignum to Float...
bijan07077 has joined #ruby
<benzrf> 
<debajit> RubyPanther: Awesome :) Thanks a ton :) That helps
<MrWharfsnort> qq about best practices
sunya7a has quit [Quit: leaving]
<MrWharfsnort> is this line okay?
<MrWharfsnort> rxp == 0 ? ( s.to_i(2) % 4 == 0 ? true : false ) : false
<workmad3> MrWharfsnort: ewww
<MrWharfsnort> or is there a better way of doing it
sunya7a has joined #ruby
<yxhuvud> No. god kills a kitten every time someone nests ternary ifs
<MrWharfsnort> lol
ikaros has quit [Quit: Ex-Chat]
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> rxp == 0 && s.to_i(2) % 4 == 0
<yxhuvud> and seriously, why the hell are you using one to produce booleans
<apeiros> MrWharfsnort: ^
<MrWharfsnort> i'm still learning
<apeiros> MrWharfsnort: == already returns true/false, so no need to use a ternary
noop has quit [Ping timeout: 265 seconds]
<workmad3> apeiros: how about (rxp + (s.to_i(2) % 4)).zero? :)
<apeiros> workmad3: broken
Burgestrand has joined #ruby
<workmad3> (I'm assuming both are positive there)
wldcordeiro_work has joined #ruby
<apeiros> see, you already know why it is broken :)
<workmad3> :P
wallerdev has quit [Quit: wallerdev]
<workmad3> apeiros: I just got upset because I was typing out your line, and you beat me to it :(
<webgen> hey guys can anyone explain why it is giving me blank line before outputing 2 last digits of a string array ?
<apeiros> workmad3: SO I WIN AGAIN!
<workmad3> webgen: maybe... if you linked to a gist with code in it...
omosoj has quit [Ping timeout: 240 seconds]
<webgen> sorry forgot to post :S :D
sambao21 has quit [Quit: Computer has gone to sleep.]
timonv has quit [Remote host closed the connection]
decoponio has quit [Quit: Leaving...]
tobago has quit [Remote host closed the connection]
timonv has joined #ruby
alem0lars has quit [Quit: alem0lars]
<workmad3> webgen: because ruby uses 0-indexing
nanoyak has quit [Quit: Computer has gone to sleep.]
anaeem1__ has joined #ruby
<workmad3> webgen: what are you wanting to do there btw?
<webgen> workmad3, so it start from array.length+1 in my case?
<webgen> workmad3 to check if last to digits are 0
djbkd has quit [Remote host closed the connection]
_lazarevsky has joined #ruby
<_lazarevsky> howdy all
anaeem1 has quit [Ping timeout: 240 seconds]
<workmad3> webgen: I'm somewhat concerned about the method name 'binary multiple of 4'... as that's implying that a number may be a multiple of 4 in decimal but not in binary...
<_lazarevsky> before I kick things off I've got a confession to make.. coming from .NET and Java I wanna say that I really dig the Ruby community
mehlah has joined #ruby
kraljev6 has quit [Ping timeout: 240 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<_lazarevsky> I would say the average Ruby programmer is a better programmer (or computer scientist) than the aforementioned
<RubyPanther> debajit: They inherit from Numeric, but most of the methods are implemented for each class. Very little is shared. The things that are shared are mainly things that coerce into a float first. For example Numeric provides a #ceil that converts to a float, and uses the float ceil method, which returns an int.
nowthatsamatt has joined #ruby
rOOb has joined #ruby
nowthatsamatt has quit [Client Quit]
creativeembassy has quit [Quit: FO SHO]
<_lazarevsky> now I wanna ask you, if there exists a built in function in ruby whereby I can say "give me the n last elements in the array with the lowest value"
jhass|off is now known as jhass
reset has joined #ruby
<workmad3> _lazarevsky: example input and output would be useful
<segfalt> webgen: If you need to see if the last two characters of a string are "0", you can do string[-2..-1] == "00", but there's probably something more math-y you can use for that method.
<_lazarevsky> I know this may be a stretch but again and again I've come across pretty zen built in functions in ruby so I thought I'd give it a try before setting about implementing it myself
<debajit> RubyPanther: got it
<webgen> workmad3, i would ignore method name on your place :D
<yxhuvud> _lazarevsky, : arr.sort.take n
<RubyPanther> IMO that is the only useful part of numeric to understand the details of. Mixed types are expected to be converted to floats. You can use a backwards coerce method to change this, for example in a money class where you want it to return money objects when added to a float, or when a float is added to it
timonv has quit [Ping timeout: 240 seconds]
<_lazarevsky> yxhuvud: yea I thought about doing something like that
<_lazarevsky> but I was hoping for
<_lazarevsky> arr.take.last_n
<_lazarevsky> :P
<_lazarevsky> or something along those lines..
<banister> _lav sort the array ? :)
<_lazarevsky> banister: dude yea I know how to do that.. I just wanted to see if there's something cool built in in ruby
<workmad3> _lazarevsky: right... so you're talking 'lowest 5 elements in the array'... yeah, 'arr.sort.take(n)' or even 'arr.sort[0...n]'
benzrf is now known as benzrf|offline
<MrWharfsnort> apeiros: thanks :)
Wolland has joined #ruby
Wolland has joined #ruby
<_lazarevsky> btw
<workmad3> _lazarevsky: you could always add said method ;)
<_lazarevsky> does any of you fellows use vim?
* segfalt used to
<_lazarevsky> I wrote a pretty cool macro :P
<_lazarevsky> which, when you press F8, prints console.log("currentLine")
<_lazarevsky> hehe :)
<_lazarevsky> actually it opens a new line, and prints console.log("lineNumber")
<shock_one> _lazarevsky, very funny. That's probably so hard to write.
<_lazarevsky> well.. it's not super hard.. it's a one liner.. but it takes a lot of reading
<_lazarevsky> I wanna figure out how to print the function name
<_lazarevsky> or maybe create a stack trace macro
<_lazarevsky> that would be kewl
bluOxigen has joined #ruby
<shock_one> By the way, if you guys ever need to take, say, 3 lowest values of 1 000 000 elements array, that's where insertion sort shines.
<workmad3> _lazarevsky: I'd prefer a macro that does 'binding.pry' (or removes that if it's already the line)
<_lazarevsky> print on enter and before exit from a function
<workmad3> call it a 'breakpoint' :)
saarinen has joined #ruby
razrunelord has joined #ruby
<_lazarevsky> lol
<segfalt> workmad3:
<_lazarevsky> I will write it for ya
<segfalt> binding.pry drops you into pry right there?
<_lazarevsky> segfalt: correct
<workmad3> segfalt: yup
<segfalt> that is very slick.
* segfalt will be using that a lot.
<workmad3> segfalt: you need pry installed
carraroj has joined #ruby
<_lazarevsky> I miss the good one netbeans debugger
vjt has joined #ruby
asteros has joined #ruby
<_lazarevsky> and especially the Visual Studio debuggers
<shock_one> _lazarevsky, aspect oriented programming can print on enter and exit.
<_lazarevsky> they were fantabulous
<workmad3> shock_one, _lazarevsky: or a trace function
nanoyak has joined #ruby
<_lazarevsky> shock_one: I dont think I've ever heard about aspect oriented programming. *googling it*
<workmad3> (I think)
Cadmi has quit []
<_lazarevsky> aaaaaanyway fellows
jonahR has quit [Quit: ¡Adios amigos, me fui para el carajo!]
<_lazarevsky> How would you like to work for Amazon.com?
<_lazarevsky> in the EC2 department?
<_lazarevsky> we're doing a lot of ruby dev here
<shock_one> workmad3, with stack trace you can only see callers. What if I want to see "neighbours"?
<_lazarevsky> and we're hiring
<_lazarevsky> if you're interested in applying. please do let me know
<banister> _lazarevsky no offense but u seem kind of noobed-out to be working for amazon, r u an intern? ;)
carraroj has quit [Client Quit]
<_lazarevsky> banister: neah I'm a junior dev
<_lazarevsky> SDE I
<_lazarevsky> straight outta college
<banister> k00
chipotle has joined #ruby
nanoyak has quit [Client Quit]
creativeembassy has joined #ruby
<_lazarevsky> banister: noobed-out. Ouch that hurt! I'm good with analysis of Algorithms haha
<_lazarevsky> ;)
<banister> :P
<banister> sry
<banister> brb
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RubyPanther> I was reading that in bed last night, thinking, wow, I'm sure glad I have time in my life to relax and read silly nonsense before bed
<_lazarevsky> RubyPanther: well you won't be packing boxes mate
phutchins has joined #ruby
akonny has quit [Quit: akonny]
<shock_one> _lazarevsky, how many boxes can be packed in a school bus?
<RubyPanther> _lazarevsky: packing boxes are probably the best jobs they have, in that they're not worse than box-packing other places
<RubyPanther> _lazarevsky: read the article, it isn't talking about box-packing
<RubyPanther> it is talking about professionals, top to bottom
<workmad3> shock_one: I was thinking 'set_trace_func' and yes, if you have a block that picks up c-call and c-return events, you can set a trace function that prints out when you're entering and leaving a method :)
<workmad3> shock_one: so not just a stack trace
<_lazarevsky> and to wrap it all off "Despite hefty monetary incentives for getting someone hired, I don't refer people."
<_lazarevsky> haha
<_lazarevsky> that's true tho.. They have a very lucrative peer referral programme :P
omosoj has joined #ruby
txdv has quit [Read error: Connection reset by peer]
<RubyPanther> You need that when you're churning through talent constantly
txdv has joined #ruby
ktun has joined #ruby
<_lazarevsky> ok well.. it's too bad no one's interested
chrisseaton has joined #ruby
<RubyPanther> If you're hiring great engineers and paying them well and the consider the experience "soul-crushing" and on average only stay a year and a half... wow, that is bad
datafirm has joined #ruby
wontoner_io has joined #ruby
<_lazarevsky> I don't know how things are run in Seatlle mate
<shock_one> _lazarevsky, I wrote you a private message.
<_lazarevsky> EC2 is developed in Cape Town, South Africa
<_lazarevsky> here it's pretty chilled.. Teams act as start-ups
<_lazarevsky> everyone walks bare-foot
<_lazarevsky> and it's super relaxed..
<_lazarevsky> long working hours tho.. but it's a stimulating atmosphere which drives you
<vpretzel|910> I wouldn't be able to work with stinky feet people
<_lazarevsky> at least that's been my experience
<RubyPanther> "teams act as start-ups" is code for "80 hrs a week, no overtime"
<_lazarevsky> RubyPanther: HAAHAHAHA
<_lazarevsky> hahahahaha
cjsarette has quit [Max SendQ exceeded]
<_lazarevsky> i lol'd so hard
<_lazarevsky> hahahhaa
freerobby has quit [Read error: Connection reset by peer]
<RubyPanther> it is after the laughing stops the melancholy sets in
zachallett has quit [Remote host closed the connection]
<_lazarevsky> as Xtina Aguillera would say "words can't bring me doooown. oooh nooo I am beautiful"
<workmad3> cross-tina?
<atmosx> are you?
<wontoner_io> RubyPanther: Programmer's Nirvana! Once you have a beer helmet you're good..
<RubyPanther> it only devolves to weeping if you're been there past a year and a half
codeurge has quit [Ping timeout: 276 seconds]
freerobby has joined #ruby
debajit_ has joined #ruby
rsuey has joined #ruby
claymore has quit [Quit: Leaving]
zachallett has joined #ruby
<_lazarevsky> anyway you guys are a cool bunch
<RubyPanther> I remember going into TripWire's offices on a saturday during the .com boom... there was nobody else there. At all. The entire company was either working normal hours, or getting paid for on-call time. That is what a successful startup looks like.
mercerist has quit [Quit: Computer has gone to sleep.]
moritzs has joined #ruby
codabrin_ has quit [Quit: Textual IRC Client: www.textualapp.com]
atmosx has quit [Quit: Lost in trance]
codabrink has joined #ruby
debajit_ has quit [Client Quit]
TheNumb has quit [Ping timeout: 276 seconds]
papercode has quit [Quit: WeeChat 0.4.4-dev]
codeurge has joined #ruby
papercode has joined #ruby
<_lazarevsky> RubyPanther: I admit, not everyone could cope with such a pace
<_lazarevsky> but I find it very rewarding.. I mean in less than 6 months I learned so many new technologies
kevind has joined #ruby
debajit_ has joined #ruby
<_lazarevsky> so my hands dirty in open source projects
<RubyPanther> "coping" is something you do to overcome bad things that happen to you. You should have to "cope" with your job. It means your job SUCKS.
sambao21 has joined #ruby
<_lazarevsky> am slowly mastering vim.. It's a cool place to work if you're driven
freerobby1 has joined #ruby
<_lazarevsky> I dig it
<RubyPanther> "shouldn't"
<_lazarevsky> yea I did not express myself correctly there I guess.. English is not my mother tongue as you noticed
MrWharfsnort has quit [Ping timeout: 255 seconds]
<skinkitten> i LIKe ruby, and panthers, RubyPanther hiring? :>
<RubyPanther> It is not a question of expressing yourself "correctly," it is that you're putting lipstick on a pig
debajit has quit [Ping timeout: 240 seconds]
freerobby has quit [Ping timeout: 245 seconds]
<_lazarevsky> RubyPanther: geez.. you're bitter.. Did you have a traumatic experience in the early days of your career. Please lay down and tell me all about it :P
<RubyPanther> skinkitten: I'm never hiring, but like everybody else I'd always love to find more subcontractors that can do high quality illustration of customer products! But I doubt I'll find many sell-out artists in a programming channel. :/
<skinkitten> when in doubt ____________________________
debajit_ has quit [Client Quit]
<RubyPanther> _lazarevsky: I said no to all that crap without having to go there. I've had bad clients, but I've never had a bad job. So no, I'm not traumatized at all.
carlyle has quit [Remote host closed the connection]
jwest has quit [Quit: WeeChat 0.4.2]
cjsarette has joined #ruby
Sirupsen has joined #ruby
nowthatsamatt has joined #ruby
wallerdev has joined #ruby
bijan07077 has quit [Quit: bijan07077]
Sirupsen has quit [Client Quit]
sambao21 has quit [Quit: Computer has gone to sleep.]
debajit has joined #ruby
codeurge has quit [Ping timeout: 252 seconds]
MrWharfsnort has joined #ruby
agrinb has quit [Remote host closed the connection]
nanoyak has joined #ruby
shvelo has joined #ruby
SegFaultAX has quit [Excess Flood]
terrell_t has joined #ruby
Jnco has quit [Remote host closed the connection]
mr_snowf1ake has joined #ruby
Jnco has joined #ruby
codeurge has joined #ruby
codeurge has quit [Max SendQ exceeded]
<vim_shim> If you're working long hours consistently, it's not for your own personal business, and you have no problem with it - you've already drank the cool-aid.
saarinen has quit [Quit: saarinen]
codeurge has joined #ruby
Bumptious has quit [Read error: No route to host]
saarinen has joined #ruby
Bumptious has joined #ruby
flazz has joined #ruby
Wolland has quit []
bijan07077 has joined #ruby
kirun has quit [Quit: Client exiting]
debajit has quit [Quit: Linkinus - http://linkinus.com]
debajit has joined #ruby
terrellt has quit [Ping timeout: 252 seconds]
<vim_shim> The previously linked article reminds me a lot of books I've read on the experience of Unification Church cult members (Moonies).
<wallerdev> yeah i worked long hours at my last job
<wallerdev> kills your soul
KanKava has joined #ruby
<wallerdev> haha
sambao21 has joined #ruby
<_lazarevsky> how did you break the vicious cycle?
saarinen has quit [Client Quit]
SegFaultAX has joined #ruby
<vim_shim> Command and control coercion techniques can be ported to any social environment if you own the platform. eg. the building (whether it be church or office)
<shevy> wtf
<shevy> coercion
kyb3r_ has joined #ruby
<shevy> you can put chains on the heels and lipstick on a pig
<shevy> but it stays a pig!
AlexRussia has quit [Read error: Connection reset by peer]
x1337807x has joined #ruby
debajit has quit [Client Quit]
<shevy> hmm if I have a method in a file called foo.rb
<shevy> def foo; puts 'hi from foo'; end
debajit has joined #ruby
<shevy> is there a way to load this file into a namespace?
<wallerdev> put it in a module in that file
shvelo has quit [Ping timeout: 255 seconds]
<wallerdev> then you can extend your current module with it
<Burgestrand> shevy: second parameter to load
<Burgestrand> there's some magic there…
nwertman has quit [Remote host closed the connection]
<Burgestrand> Actually, I'm probably full of it, but it's a fun thought.
<shevy> Burgestrand a moment, let my old brain digest that slowly
<shevy> wallerdev yeah but that is a workaround
<Burgestrand> shevy: I don't think it's useful, but I remember doing something funky with it
johak781 has joined #ruby
<wallerdev> is it really a workaround haha
<shevy> Burgestrand hmm but an anonymous module, I can't access that right?
<Burgestrand> shevy: indeed, that's a problem.
<shevy> wallerdev haha yeah, I think I have to use a workaround anyway
<Burgestrand> shevy: I think last time I did something like this, I probably just evaled the code in a different binding.
<shevy> it's nice that load allows some kind of ad-hoc namespacing though
johak781 has left #ruby [#ruby]
paulfm has quit []
<shevy> Burgestrand oh yeah... I remember that now... I think irb has that too, binding context or whatever was the name...
tjr9898 has quit []
benzrf|offline is now known as benzrf
nanoyak has quit [Quit: Computer has gone to sleep.]
marcdel has joined #ruby
nanoyak has joined #ruby
combusean has joined #ruby
einarj has joined #ruby
tjr9898 has joined #ruby
<Burgestrand> shevy: No, I mean something more like `foo = Module.new { eval File.read("file.rb") }`
<Burgestrand> Alarm bells always go off when I see an eval.
Trackor has quit [Quit: Textual IRC Client: www.textualapp.com]
<Burgestrand> Then again, require is similar to eval(File.read) anyway…
the_f0ster has quit [Ping timeout: 252 seconds]
_havenn has quit []
TheNumb has joined #ruby
<wallerdev> similar but not the same haha
_justin has quit [Quit: _justin]
mr_snowf1ake has quit [Ping timeout: 250 seconds]
agjacome has quit [Ping timeout: 258 seconds]
atmosx has joined #ruby
<workmad3> Burgestrand: a method call is similar to a goto... so goto is fine, right? :)
agrinb has joined #ruby
paulfm has joined #ruby
<Rickmasta> Hey guys, when using mechanize/nokogiri, is it ok to use xpaths like '//*[@id="list"]/li[1]/div/div[2]/div/div[1]/h5" ?
<centrx> Rickmasta, XPath is supported, yes
<wallerdev> xpath is about the worst thing to use
<shevy> Burgestrand aha!
<wallerdev> just use css selectors haha
<workmad3> whether it's 'ok' to use a monstrosity like that... well, that's up to you :)
<Rickmasta> It's giving me hell, yes wallerdev.
<wallerdev> literally no one knows xpath
<shevy> well that is almost readable... except for eval, I try to not use it when possible, it scares me
<Rickmasta> Well, that's all that chrome is giving me!
<centrx> XPath is useful for some things
<shevy> Burgestrand, right about require, but my eyes don't read eval, it is psychological for me mostly :)))
<workmad3> wallerdev: annoyingly, some stuff people like to do with DOMs isn't possible with css selectors :(
<centrx> ORing attributes
<shevy> require 'foo' # man am I glad this is not eval-ing
<Burgestrand> workmad3: goto is fine, misusing it is not
<debajit> Which is a good online reference site for Ruby methods?
<centrx> debajit, ruby-doc.org
<shevy> security through obscurity, security through looking-away-and-hoping-that-it-wont-fail
<workmad3> Burgestrand: :D
<wallerdev> workmad3: like what?
<workmad3> wallerdev: selecting the parent based on child elements, last I checked
<wallerdev> :(
<Burgestrand> workmad3: continuations, exceptions, throw/catch; all are poison
<Rickmasta> so how different is doing a css path than xpath?
Bumptious has quit [Remote host closed the connection]
<Burgestrand> !
<shevy> damn, workmad3 is using more javascript than ruby
<Rickmasta> I'm having no luck with xpath.
<centrx> CSS is much simpler
<wallerdev> didnt realize you could do that with xpath haha
nwertman has joined #ruby
ukd1 has joined #ruby
<workmad3> wallerdev: ;)
<centrx> div.my_class, div#my_id
snuffeluffegus has joined #ruby
<workmad3> wallerdev: it's rare I need xpath... but I'm glad it's there when I do :)
<debajit> centrx: Thanks!
<debajit> centrx: There seems to be a ruby-doc.org and a ruby-doc.com :)
snuffeluffegus has quit [Remote host closed the connection]
<debajit> centrx: Seems they are mirrors
snuffeluffegus has joined #ruby
zachallett has quit [Remote host closed the connection]
saarinen has joined #ruby
<Rickmasta> it only outputted the html?
<Rickmasta> I mean the tags, with no content.
<centrx> Both XPath and CSS should return a Nokogori Node/NodeSet
michaeldeol has joined #ruby
<centrx> #xpath, #css, #search
saarinen has quit [Client Quit]
djbkd has joined #ruby
razrunelord has quit [Remote host closed the connection]
<mordocai> Alright, so I have officially forked the rubygem net-dns. Now has implemented support for source address spoofing. https://rubygems.org/gems/net-dns2. Please start using it and filing issues against it! net-dns is no longer maintained.
agrinb has quit [Remote host closed the connection]
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jeregrine has quit [Quit: Connection closed for inactivity]
paulfm has quit []
sj__ has joined #ruby
debajit has quit [Quit: Linkinus - http://linkinus.com]
vpretzel|910 is now known as vpretzel|1573
<shevy> \o/
aspiers has joined #ruby
terrell_t has quit [Remote host closed the connection]
shock_one has quit [Ping timeout: 255 seconds]
iMe has joined #ruby
fangari has joined #ruby
tylerkern has joined #ruby
razrunelord has joined #ruby
terrellt has joined #ruby
<happytux_> hm, am I on ignore list? :/
<webgen> guys I am having trouble at raise argumenterror, how can I raise argumenterror if the class initializer gets an empty string as a parameter? I couldnt find a concise example on google :S
debajit has joined #ruby
<webgen> happytux_, nop
sunya7a has quit [Ping timeout: 245 seconds]
spider-mario has quit [Remote host closed the connection]
<omosoj> Quick q: is there a way to quickly add multiple values to an array with the '<<'? Like a=[]; a << 5, 6, 7
baweaver has quit [Remote host closed the connection]
michaeldeol has quit [Read error: Connection reset by peer]
cpruitt has quit [Quit: cpruitt]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<omosoj> And if not what's the simplest way to do that?
<workmad3> omosoj: a << 5 << 6 << 7
michaeldeol has joined #ruby
agrinb has joined #ruby
<omosoj> workmad3, haha, awesome!
<omosoj> (thanks!)
debajit has quit [Client Quit]
saarinen has joined #ruby
<shevy> happytux_ no
debajit has joined #ruby
<shevy> webgen first off we must start with the little details
debajit has quit [Client Quit]
<shevy> they are important
<shevy> webgen, it is not argumenterror but ArgumentError
<shevy> I used to do this in the past:
debajit has joined #ruby
<shevy> begin
<shevy> require 'yeah'
<shevy> rescue Loaderror; end
<shevy> and it failed!
<workmad3> shevy: unknown constant? :D
duggiefresh has quit [Remote host closed the connection]
<shevy> :(
<shevy> I also used to do this:
<shevy> class Foo
<shevy> def intialize
<shevy> and it failed!
beef-wellington has quit [Ping timeout: 264 seconds]
<webgen> why ?
sinkensabe has joined #ruby
<shevy> webgen, you need better eyes if you do not see ;)
<benzrf> intialize
<shevy> lol benzrf
<shevy> webgen ok now that we fixed that first problem let's look at the second
<wallerdev> i always screw up SQL typing SELECT * FORM abc
<wallerdev> cant type the word from :|
* workmad3 wonders if newcomers to coding should be given 100 pages of printed sheets and told to find the mistake
XanderA has joined #ruby
<shevy> webgen in your class, you simply: raise ArgumentError, 'wtf you stupid idiot, you must pass a non empty string to us!' if input.to_s.empty? # or similar
<XanderA> ok
<webgen> shevy deep thanks ! :D
<shevy> man I hate sql queries
<webgen> that was concise hahaha
cjsarette has quit [Excess Flood]
Striki has joined #ruby
<shevy> select * from 'wtf"double quotes" shit yeah IF wtf ''" also insert utf strings here'
<shevy> I think the only reason sql is so popular is because, in essence, it is primitive
asteros has quit [Quit: asteros]
<shevy> lolquery would be more fun
saarinen has quit [Client Quit]
<shevy> "gimme all tables start with ab"
creativeembassy has quit [Quit: FO SHO]
<shevy> "gimme all tables start with ab less than 8 chars"
Megtastique has quit []
djbkd has quit [Remote host closed the connection]
michaeldeol has quit [Read error: Connection reset by peer]
jhass has quit [Read error: Connection reset by peer]
jxf has quit [Ping timeout: 240 seconds]
michaeldeol has joined #ruby
x1337807x has joined #ruby
saarinen has joined #ruby
terrellt has quit [Remote host closed the connection]
s2013_ has joined #ruby
<Rickmasta> it's boggling my mind, when I do the css search, it just returns "<ul id="list"></ul>"
danshultz has quit [Remote host closed the connection]
thumpba has joined #ruby
cjsarette has joined #ruby
jjbohn has joined #ruby
<wallerdev> mindbottling
danshultz has joined #ruby
Bumptious has joined #ruby
<Rickmasta> lol
ascarter has joined #ruby
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby
s2013 has quit [Ping timeout: 252 seconds]
<shevy> I gave up on xml a long time ago
<shevy> I am so glad to no longer have to use stuff like xpath
ldnunes has quit [Quit: Leaving]
jobewan has quit [Ping timeout: 265 seconds]
s2013_ is now known as s2013
asteros has joined #ruby
<omosoj> Can a recursion mastermind help me out with this algorithm. It's prob 37 from Project Euler.
zergood_ has quit [Ping timeout: 240 seconds]
danshultz has quit [Ping timeout: 265 seconds]
combusean has quit [Ping timeout: 245 seconds]
<omosoj> I want to make a function that removes a digit from the left, then checks to see if prime; if prime, redoes the process until the entire integer is checked, then tell me if it was successful.
zeh- has joined #ruby
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 264 seconds]
jhass|off has joined #ruby
jhass|off is now known as jhass
cpruitt has joined #ruby
Morkel has quit [Quit: Morkel]
<debajit> is it general convention to write everything in snake_case in Ruby, or do people use camelCase as well?
combusean has joined #ruby
brtdv has quit []
<atmosx> what are truncatable nubers?
<atmosx> dachi: snakecase for methods camel-case for classes
rizzatti has quit [Ping timeout: 252 seconds]
<atmosx> classes or modules
<omosoj> atmosx: pretty much what the q describes: http://en.wikipedia.org/wiki/Truncatable_prime
agrinb has quit [Remote host closed the connection]
<workmad3> debajit: CamelCase for classes and modules btw, not camelCase
snuffeluffegus has quit [Quit: Leaving]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
terrellt has joined #ruby
<atmosx> omosoj: I see
snuffeluffegus has joined #ruby
<havenwood> headlessCamelsAreCreapy... where's the head?!?
<omosoj> havenwood, alternate dimension #4394
<atmosx> headius: it's headless and starts with a low-h so...
<atmosx> :-P
<atmosx> err havenwood
rbenv has quit [Quit: Textual IRC Client: www.textualapp.com]
<benzrf> haskell tho
mark_locklear has quit [Ping timeout: 276 seconds]
andrewjanssen has joined #ruby
jeregrine has joined #ruby
terrellt has quit [Ping timeout: 255 seconds]
maximski has quit []
sinkensabe has quit [Remote host closed the connection]
terrellt has joined #ruby
tjr9898 has quit [Remote host closed the connection]
agrinb has joined #ruby
freerobby1 has quit [Quit: Leaving.]
nicoulaj has quit [Remote host closed the connection]
debajit has quit [Quit: Leaving...]
mjs2600 has joined #ruby
beef-wellington has joined #ruby
baweaver has joined #ruby
chipotle has quit [Quit: cya]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cescalante is now known as ce_afk
ce_afk is now known as cescalante
ascarter has joined #ruby
shiin has left #ruby ["Textual IRC Client: www.textualapp.com"]
bluOxigen has quit [Ping timeout: 240 seconds]
razrunelord has quit [Remote host closed the connection]
beef-wellington has quit [Ping timeout: 252 seconds]
mjsmith2 has quit [Remote host closed the connection]
<shevy> I mix up headius and havenwood and then there is some more h-guy from the netherlands too
<shevy> that perl dude
tvw has quit []
beef-wellington has joined #ruby
tvw has joined #ruby
Musashi1 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<hoelzro> me?
<shevy> ah yes!
<shevy> now I remember you!
razrunelord has joined #ruby
<shevy> I couldn't before haha
<hoelzro> I'm been quiet =)
<hoelzro> er
<hoelzro> I've
eka has quit [Ping timeout: 252 seconds]
<shevy> your nick is a bit similar to "holz", german for wood/timber
amundj has joined #ruby
SCommette_ has joined #ruby
jhass has quit [Remote host closed the connection]
snuffeluffegus has quit [Quit: Leaving]
<RubyPanther> read-only wood, does that mean a protected forest?
franzip has quit [Quit: ...]
SCommette has quit [Ping timeout: 252 seconds]
SCommette_ is now known as SCommette
<Hanmac> maybe its some kind of unwritable paper? ;P
baweaver has quit [Ping timeout: 240 seconds]
diegoviola has quit [Quit: WeeChat 0.4.3]
saarinen has quit [Quit: saarinen]
<happytux_> So I want to use File::SEPARATOR in a Rakefile. What do I have to do/require in order to use it? Because currently it is just empty (on the linux system it should be ':').
cescalante is now known as ce_afk
beef-wellington has quit [Ping timeout: 245 seconds]
chipotle has joined #ruby
garndt has quit [Quit: Connection closed for inactivity]
sailias1 has quit [Quit: Leaving.]
m8 has quit [Quit: Sto andando via]
<Hanmac> happytux_:
<Hanmac> >> [File::SEPARATOR, File::PATH_SEPARATOR]
<eval-in__> Hanmac => ["/", ":"] (https://eval.in/150268)
jhass|off has joined #ruby
<Hanmac> happytux_: i think you want the Path separator, not the other one
jhass|off is now known as jhass
beef-wellington has joined #ruby
danman has quit [Quit: danman]
freggles has quit [Remote host closed the connection]
Kricir has quit [Remote host closed the connection]
jessehs_ has joined #ruby
jessehs_ has left #ruby [#ruby]
Kricir has joined #ruby
<happytux_> Hanmac: yes, this was it. Thanks
<shevy> what is File::SEPARATOR on windows?
doodlehaus has quit [Remote host closed the connection]
phoo1234567 has quit [Read error: Connection reset by peer]
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beef-wellington has quit [Ping timeout: 252 seconds]
<workmad3> shevy: /
<slash_nick> shevy: i tried it but got BSOD
Hanmac1 has joined #ruby
Burgestrand has quit [Quit: Burgestrand]
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> hmm
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> when is File::SEPARATOR ever not '/' ?
phoo1234567 has joined #ruby
<workmad3> shevy: it's not
<shevy> I mean I saw people do this a lot:
<shevy> File.join(File::SEPARATOR)
<shevy> or similar
Kricir has quit [Ping timeout: 240 seconds]
<workmad3> shevy: when I realised that the ruby File class transparently handles / to \ on windows, so you just use / all the time, I stopped doing stuff like 'File.join("foo", "bar", "buzz")' and instead just did 'foo/bar/buzz'
Hanmac has quit [Ping timeout: 252 seconds]
livcd has quit [Ping timeout: 264 seconds]
timonv has joined #ruby
omosoj has quit [Ping timeout: 240 seconds]
tkuchiki has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
phutchins has quit [Ping timeout: 252 seconds]
razrunelord has quit [Remote host closed the connection]
<shevy> yeah
<shevy> it just makes me wonder why people kept on using the above so often
zigomir has quit [Remote host closed the connection]
zeh- has quit [Quit: Linkinus - http://linkinus.com]
zigomir has joined #ruby
<benzrf> CORRECTNESS
* benzrf punches shevy
<benzrf> > [1, 2, 3] / 'test'
<benzrf> ugh
<benzrf> #haskell's lambdabot uses >
<benzrf> eval-in__ uses >>
<benzrf> and i always use the wrong one >.<
alexju has quit [Remote host closed the connection]
<benzrf> >> [1, 2, 3] / 'test'
<eval-in__> benzrf => undefined method `/' for [1, 2, 3]:Array (NoMethodError) ... (https://eval.in/150271)
<benzrf> hm
<benzrf> wasnt there / on something
<benzrf> >> 'foo bar baz' / ' '
<eval-in__> benzrf => undefined method `/' for "foo bar baz":String (NoMethodError) ... (https://eval.in/150272)
shashank_rs has quit [Ping timeout: 258 seconds]
<benzrf> >> String.alias_method :/, :split; 'foo bar baz' / ' '
<eval-in__> benzrf => private method `alias_method' called for String:Class (NoMethodError) ... (https://eval.in/150273)
<benzrf> >> String.send :alias_method :/, :split; 'foo bar baz' / ' '
<eval-in__> benzrf => /tmp/execpad-48518688f34f/source-48518688f34f:2: syntax error, unexpected ':', expecting keyword_end ... (https://eval.in/150274)
<benzrf> o_o
<benzrf> >> String.send :alias_method, :/, :split; 'foo bar baz' / ' '
<eval-in__> benzrf => ["foo", "bar", "baz"] (https://eval.in/150275)
workmad3 has quit [Ping timeout: 255 seconds]
timonv has quit [Ping timeout: 252 seconds]
<benzrf> neat
shashank_rs has joined #ruby
dblessing has quit [Quit: dblessing]
mrmargolis has quit [Remote host closed the connection]
saarinen has joined #ruby
<Hanmac1> shevy: in rubytrunk you can do this: Pathname.new("abc") / "def" / "xyz" => #<Pathname:abc/def/xyz>
meatherly has quit [Remote host closed the connection]
freerobby has joined #ruby
cjsarette has quit [Excess Flood]
<shevy> I dont use pathname, it has an awful API
EagleDelta has quit []
zigomir has quit [Ping timeout: 255 seconds]
eka has joined #ruby
lw has quit [Quit: s]
fukuyamaken has quit [Read error: Connection reset by peer]
cpruitt has quit [Quit: cpruitt]
ffranz has quit [Quit: Leaving]
danijoo has quit [Quit: Leaving...]
fukuyamaken has joined #ruby
mary5030 has quit [Remote host closed the connection]
shashank_rs has quit [Read error: Connection reset by peer]
cjsarette has joined #ruby
saarinen has quit [Client Quit]
aiguu has joined #ruby
aspires has quit []
codeurge has quit [Ping timeout: 250 seconds]
cjsarette has quit [Max SendQ exceeded]
mjs2600 has quit [Remote host closed the connection]
freerobby has quit [Ping timeout: 245 seconds]
asteros has quit [Quit: asteros]
aiguu_ has quit [Ping timeout: 255 seconds]
cjsarette has joined #ruby
cjsarette has quit [Max SendQ exceeded]
maximski has joined #ruby
codeurge has joined #ruby
R3D5H311 has joined #ruby
jxf has joined #ruby
SegFaultAX has quit [Excess Flood]
aspires has joined #ruby
nwertman has quit [Quit: leaving]
blackmesa has joined #ruby
cjsarette has joined #ruby
djbkd has joined #ruby
cjsarette has quit [Max SendQ exceeded]
cjsarette has joined #ruby
chipotle has quit [Quit: cya]
SegFaultAX has joined #ruby
rsuey has quit [Remote host closed the connection]
Squarepy has quit [Quit: Leaving]
qwyeth has quit [Remote host closed the connection]
razrunelord has joined #ruby
cpruitt has joined #ruby
XanderA has quit [Quit: Leaving]
danijoo has joined #ruby
tjr9898 has joined #ruby
aspires has quit []
blackmesa has quit [Ping timeout: 240 seconds]
Xeago has quit [Ping timeout: 240 seconds]
EasyCo has joined #ruby
VTLob has quit [Quit: VTLob]
saarinen has joined #ruby
aspires has joined #ruby
nfk has quit [Quit: yawn]
Wolland has joined #ruby
Wolland has quit [Client Quit]
freezey has quit []
mary5030 has joined #ruby
happytux_ has quit [Ping timeout: 255 seconds]
nwertman has joined #ruby
ukd1 has quit [Quit: Leaving...]
maximski has quit []
<benzrf> can you use something like '>= 2.1' in a ruby version in a gemfile
livcd has joined #ruby
<benzrf> or does it have to be a precise versoin
<benzrf> >.>
saarinen has quit [Client Quit]
<EasyCo> Hey guys, can somebody please provide clarity on block as arguments. I'm obviously new to Ruby and am slightly confused with the syntax used when sending an argument and a block to a method: some_method arg1 do #stuff end
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
agrinb has quit [Remote host closed the connection]
<EasyCo> I just find it weird that the first argument and the block aren't seperated by a comma
<benzrf> EasyCo: the block is a separate entity, syntactically
<EasyCo> The same way you would if sending 2 args: some_method arg1, arg2
<benzrf> foo() {block}
<benzrf> ^ not an argument in the list
blackmesa has joined #ruby
happytux has joined #ruby
<benzrf> {|thing| that} <- this is NOT an expression
randomnick_ has quit [Quit: Leaving]
<benzrf> it's a special syntactic thing that goes after an argument list
<EasyCo> Right, so that's the actual syntax when wrapped
geggam has quit [Remote host closed the connection]
<EasyCo> So foo(arg1, arg2) { block }
<EasyCo> Is valid
<Rickmasta> So I found out what was the issue with my nokogiri parse. I'm guessing because the content is loaded via jquery, it doesn't come up in the source.
<benzrf> EasyCo: y
<EasyCo> benzrf: Thanks for that, makes sense. Coming from JS and PHP it's a new syntax for me.
<benzrf> ew, gross languages
<benzrf> purge them from your brain before continuing !
mary5030 has quit [Remote host closed the connection]
<EasyCo> Haha, I'd say different, not gross but yah :)
<Rickmasta> Like so: http://cl.ly/VTRN When I inspect the element of the content I want to srape, it should be withiin the <ul id="list"></us> tags
voodoofish has joined #ruby
livcd has quit [Ping timeout: 245 seconds]
voodoofish1 has quit [Ping timeout: 264 seconds]
thesheff17 has quit [Ping timeout: 255 seconds]
agrinb has joined #ruby
jjbohn has quit [Ping timeout: 240 seconds]
AlexRussia has joined #ruby
andrewjanssen has quit [Quit: Leaving...]
momomomomo has joined #ruby
axl_ has quit [Quit: axl_]
binaryhat has joined #ruby
AlSquire has joined #ruby
axl_ has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
saarinen has joined #ruby
axl_ has quit [Client Quit]
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
saarinen has quit [Client Quit]
razrunelord has quit [Remote host closed the connection]
Kricir has joined #ruby
skinkitten has quit [Quit: Leaving]
andrewlio has quit [Quit: Leaving.]
mr_snowf1ake has joined #ruby
nateberkopec has quit [Quit: Leaving...]
dsdeiz_ has joined #ruby
agrinb has quit [Remote host closed the connection]
AlSquire has quit [Quit: Quitte]
AlSquire has joined #ruby
jahrichie has joined #ruby
dsdeiz has quit [Ping timeout: 245 seconds]
mansi has quit [Ping timeout: 240 seconds]
<_lazarevsky> anyone here?
obs has quit [Quit: Saliendo]
aspires has quit []
newbabe has quit [Ping timeout: 240 seconds]
jxf has quit [Ping timeout: 258 seconds]
aspires has joined #ruby
DouweM has joined #ruby
djbkd has quit [Remote host closed the connection]
sdwrage has joined #ruby
<benzrf> _lazarevsky: sup dude
elaptics`away is now known as elaptics
alpha123 has joined #ruby
<happytux> hi again
snath has quit [Ping timeout: 255 seconds]
<_lazarevsky> I was gonna ask whether I need to reload all rake tasks in order for the code changes to take effect, but it turns out the changes were not reflected because I changed a file name, but vim did not reload the file, so I kept making changes to a file that no longer exists.
<happytux> So File.symlink is used to create a new symlink. Now I want that if there is already such a symlink, it is only overwritten whether it 1) is not a symlink at all or 2) points to another path than the newly created symlink would to.
<happytux> What would be the easiest way?
<happytux> I thought about somehow extracting the target path from the symlink and then comparing it, when it isn't a symlink at all, the thing would fail anyway.
Kricir has quit [Ping timeout: 265 seconds]
dideler has joined #ruby
tvw has quit []
hermanmu_ has quit [Remote host closed the connection]
treehug88 has quit []
djbkd has joined #ruby
ce_afk is now known as cescalante
hermanmunster has joined #ruby
<shevy> happytux there is File.readlink
<shevy> and File.exist?
mjsmith2 has joined #ruby
<shevy> combine the two to check for equality or non-equality, and act on that outcome. it is really a simple if/else in the end, either your symlink exists, or it does not. and IF the symlink exists, you may have to add another check to test for equality
scotje has joined #ruby
<havenwood> and File.symlink?
<havenwood> though i don't get what the goal is
<shevy> lol
iMe has quit [Quit: Bye Bye]
<shevy> I think he wants to symlink something
einarj has quit [Remote host closed the connection]
<shevy> right happytux
zarul has joined #ruby
<havenwood> happytux: Maybe checkout FileUtils#ln_s too for good measure. :) http://www.ruby-doc.org/stdlib-2.1.2/libdoc/fileutils/rdoc/FileUtils.html#method-c-ln_s
snath has joined #ruby
<happytux> thanks
hermanmunster has quit [Ping timeout: 265 seconds]
jrhorn424 is now known as zz_jrhorn424
rek2p0wn has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
cescalante is now known as ce_afk
tylerkern has joined #ruby
ktun has joined #ruby
saarinen has joined #ruby
lmickh has quit [Remote host closed the connection]
jhass is now known as jhass|off
SCommette has quit [Quit: SCommette]
MrWharfsnort has quit [Ping timeout: 245 seconds]
<Jnco> when I did a rake:load:schema did I erase all the data in my database!?
MindfulMonk has quit [Ping timeout: 252 seconds]
webgen has quit [Remote host closed the connection]
chrisseaton has quit []
<wallerdev> probably
saarinen has quit [Client Quit]
IceDragon has quit [Ping timeout: 250 seconds]
<wallerdev> assuming you did rake db:schema:load in rails
IceDragon has joined #ruby
<wallerdev> if you want to change the schema without deleting things you should use migrations
MindfulMonk has joined #ruby
tjr9898 has quit [Remote host closed the connection]
<jahrichie> Jnco: what were you attempting todo with rake:load:schema ?
freerobby has joined #ruby
SilverKey has joined #ruby
flazz is now known as zz_flazz
Rahul_Roy has quit [Quit: Connection closed for inactivity]
Crane_ has joined #ruby
<Crane_> hii every body
<wallerdev> hi :)
IceDragon has quit [Ping timeout: 252 seconds]
<Crane_> i use mac os x
<wallerdev> are you having a clang build issue on mavericks
<xybre> ok
IceDragon has joined #ruby
<Crane_> i m installed rmv and ruby
<xybre> k
<Crane_> and this gems installed
<xybre> rite
fangari has quit [Quit: Lost terminal]
<Crane_> SARI:~ sari$ gem list
<Crane_> *** LOCAL GEMS ***
<Crane_> actionmailer (4.0.4)
<Crane_> actionpack (4.0.4)
<Crane_> activemodel (4.0.4)
<Crane_> activerecord (4.0.4)
<Crane_> activerecord-deprecated_finders (1.0.3)
<Crane_> activesupport (4.0.4)
<Crane_> arel (4.0.2)
<Crane_> atomic (1.1.16)
<wallerdev> hahaha
<Crane_> bigdecimal (1.2.0)
<Crane_> builder (3.1.4)
<Crane_> bundler (1.5.3)
<wallerdev> rip
<xybre> Bye!
<Crane_> bundler-unload (1.0.2)
FaresKAlaboud has quit [Quit: Quit~]
<Crane_> coffee-rails (4.0.1)
chipotle has joined #ruby
<Crane_> coffee-script (2.2.0)
<Crane_> coffee-script-source (1.7.0)
<Crane_> erubis (2.7.0)
<Crane_> execjs (2.0.2)
<Crane_> executable-hooks (1.3.1)
<Crane_> gem-wrappers (1.2.4)
<Crane_> hike (1.2.3)
freerobby has quit [Ping timeout: 245 seconds]
<Crane_> i18n (0.6.9)
<Crane_> io-console (0.4.2)
<wallerdev> apeiros: help
<Crane_> jbuilder (1.5.3)
<Crane_> jquery-rails (3.1.0)
<Crane_> json (1.8.1, 1.7.7)
<Crane_> mail (2.5.4)
<Crane_> mime-types (1.25.1)
<Crane_> minitest (4.7.5, 4.3.2)
<Crane_> multi_json (1.9.2)
Crane_ was kicked from #ruby by apeiros [Crane_]
<wallerdev> thanks lol
<xybre> +1
Crane_ has joined #ruby
<Crane_> rdoc (4.1.1, 4.0.0)
<Crane_> rubygems-bundler (1.4.2)
<Crane_> rvm (1.11.3.9)
arrubin has quit []
<wallerdev> LOL
<apeiros> srsly?
<xybre> lol!
Crane_ was kicked from #ruby by apeiros [Crane_]
<xybre> Auto rejoin I bet
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> …
<apeiros> I told him he should tell me when he's got it under control
<wallerdev> sass (3.2.15)
<wallerdev> ;)
<apeiros> seems he preferred to just say 'sory'[sic] and quit
<xybre> X-Chat needs a "stop whatever you're doing" flag on auto-rejoin.
<apeiros> xybre: only useful if activated by default
<xybre> Yes, activated by default.
anaeem1__ has quit [Remote host closed the connection]
<shevy> oh man
<xybre> In fact I don't know that it should be a flag you can disable outside of the source code.
<xybre> dwm style.
<wallerdev> i know some clients warn you if you try to paste something big before sending
<xybre> Yeah, weechat does.
<apeiros> could also be under the condition of rejoin due to kick
<sari> hii
<sari> i m sory
<shevy> haha
<shevy> what are your gems sari
<wallerdev> <3
<sari> i m not spamer
* xybre is convinced
* shevy will believe after sari shows gem lists
<apeiros> Guest89487: I've remove the ban on Crane_
<xybre> Use https://gist.github.com for pasting
<apeiros> but use gist.github.com or similar
<apeiros> *removed even
jespada has quit [Quit: Leaving]
<Guest89487> thanks
Trynemjoel has quit [Ping timeout: 245 seconds]
SilverKey has quit [Ping timeout: 255 seconds]
<Guest89487> my problem
vpretzel|1573 is now known as vpretzel
<Guest89487> ruby on rails now and I want to completely remove everything belonging to
<Guest89487> ?
<xybre> wallerdev: wow, I missed that, lol
<wallerdev> so you're done with ruby on rails and want to erase it frmo your hard drive?
<xybre> Man I feel that.
<Guest89487> because computer is a my friend
<wallerdev> lol
codeurge has quit [Ping timeout: 240 seconds]
<xybre> Computers are friends, not Rails slaves.
<Guest89487> I will return the computer to a friend
<xybre> Althought a lot of them are made in China.
<xybre> (thanks for the railroads guys!)
<wallerdev> gems dont take up too much space, i doubt your friend will notice
<xybre> sudo rm -rf /?
thesheff17 has joined #ruby
maximski has joined #ruby
<Guest89487> 1-) i installed ruby and gems on rvm
diegoviola has joined #ruby
Trynemjoel has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phoo1234567 has quit [Remote host closed the connection]
<Guest89487> I know how to clean ruby rails and gems
<happytux> hi
<happytux> How can I force File.unlink(...)?
FaresKAlaboud has joined #ruby
<happytux> there is also args, but how do I pass 'force' to it?
aspires has quit []
MrWharfsnort has joined #ruby
cpruitt has quit [Quit: cpruitt]
codeurge has joined #ruby
codeurge has quit [Max SendQ exceeded]
gilest has joined #ruby
<Guest89487> ??
codeurge has joined #ruby
gilest has quit [Client Quit]
livcd has joined #ruby
SCommette has joined #ruby
Xeago has joined #ruby
<happytux> Guest89487: sometimes you have to use `rm -f` to force deletion (due to symlink recursion and such).
<happytux> Guest89487: I want that File.unlink does this.
cjsarette has quit [Excess Flood]
upsell5 has quit [Quit: upsell5]
livcd has quit [Ping timeout: 240 seconds]
Xeago has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Quit: ciao.]
<shevy> happytux you can modify everything of ruby
freerobby has joined #ruby
aspires has joined #ruby
sputnik1_ is now known as sputnik13net
mikecmpbll has joined #ruby
Joel has joined #ruby
<Joel> given a gem is there a way I can tell if it's a user install or not?
bakflash has quit [Ping timeout: 252 seconds]
klaut has quit [Remote host closed the connection]
mikecmpbll has quit [Client Quit]
cjsarette has joined #ruby
<shevy> Joel hmm I think there is a way to find out the location a gem was installed to
vandemar has quit [Ping timeout: 264 seconds]
wallerdev_ has joined #ruby
<Joel> shevy, looks like gem -list -d
<shevy> Joel can you give me the name of a gem you installed
doodlehaus has joined #ruby
<Joel> gem list -d
aspires has quit [Client Quit]
mjsmith2 has quit [Remote host closed the connection]
<shevy> "gem -list -d" does aaah... without -
s2013_ has joined #ruby
funburn has joined #ruby
chipotle has quit [Quit: cya]
freerobby has quit [Ping timeout: 258 seconds]
wallerdev has quit [Ping timeout: 264 seconds]
wallerdev_ is now known as wallerdev
<shevy> >> Gem::Specification.find_by_name("rdoc").full_gem_path
<eval-in__> shevy => (https://eval.in/150277)
<shevy> # => "/usr/lib64/ruby/gems/1.9.1/gems/rdoc-3.9.5"
<shevy> silly bot
FaresKAlaboud has quit [Ping timeout: 252 seconds]
hermanmunster has joined #ruby
<shevy> has anyone of you
<shevy> a common scenario
<shevy> >> %w( abc def ghi jkl )
<eval-in__> shevy => ["abc", "def", "ghi", "jkl"] (https://eval.in/150278)
cjsarette has quit [Max SendQ exceeded]
<shevy> now you want to display this in a sorted way, with leading numbers
<shevy> something like:
<shevy> 1 abc
<shevy> 2 def
<shevy> but formatted properly haha
i_s has quit [Remote host closed the connection]
<shevy> I feel I need this like every day...
Thermo has joined #ruby
s2013 has quit [Ping timeout: 255 seconds]
trey has joined #ruby
wallerdev has quit [Client Quit]
<havenwood> >> 'a'.upto('l').each_slice(3).with_index(1).to_a
<eval-in__> havenwood => [[["a", "b", "c"], 1], [["d", "e", "f"], 2], [["g", "h", "i"], 3], [["j", "k", "l"], 4]] (https://eval.in/150279)
thumpba_ has joined #ruby
FaresKAlaboud has joined #ruby
<shevy> can you even remember that!
<shevy> 4 method calls!
<shevy> you must have a fat brain havenwood
wallerdev has joined #ruby
MrWharfsnort has quit [Ping timeout: 245 seconds]
upsell5 has joined #ruby
ss__ has joined #ruby
<havenwood> shevy: yup, just a head full of bacon
<shevy> like when people have a million neurons per cubic millimetres you must have a billion
<shevy> haha
<benzrf> >> [1, 2, 3].cycle 2
<eval-in__> benzrf => #<Enumerator: [1, 2, 3]:cycle(2)> (https://eval.in/150280)
<benzrf> p:
tacos1de has quit [Ping timeout: 272 seconds]
<benzrf> >> [1, 2, 3].cycle(2).to_a
<eval-in__> benzrf => [1, 2, 3, 1, 2, 3] (https://eval.in/150281)
<benzrf> cool cool
cjsarette has joined #ruby
<shevy> what did you do there
<shevy> is that like cloning?
terrell_t has joined #ruby
terrellt has quit [Ping timeout: 252 seconds]
Kricir has joined #ruby
s2013_ has quit [Ping timeout: 255 seconds]
aspires has joined #ruby
predator217 has joined #ruby
mehlah has quit [Quit: Leaving...]
tacos1de has joined #ruby
upsell5 has quit [Client Quit]
<shevy> if I have a module
<shevy> and one class method in that module
<shevy> and also the same method name
<shevy> example:
<shevy> module Foo
<shevy> def self.foo
<shevy> def foo
<shevy> the workhorse will be self.foo
<shevy> and foo will invoke Foo.foo
<shevy> but is there a simpler way to do that? right now I have to define the arguments to both methods twice, once for foo() and once for Foo.foo()
predator117 has quit [Ping timeout: 245 seconds]
<kenichi> uhhh, why not just call Foo.foo in the first place
<benzrf> shevy: use module_function
Kricir has quit [Ping timeout: 252 seconds]
timonv has joined #ruby
thumpba_ has quit [Remote host closed the connection]
<benzrf> altho
<benzrf> it makes the instance method private iirc
<benzrf> is that OK
<havenwood> shevy: you really want an identical class instance method and instance method?
<benzrf> shevy: you could also just def_delegator
<havenwood> >> module Foo; extend self; def foo; puts :foo end end; Foo.foo
<eval-in__> havenwood => foo ... (https://eval.in/150282)
<benzrf> havenwood: parently lots of people do or why would we have module_function etc
<benzrf> havenwood: gp
<havenwood> shevy: if not just one method ^
<benzrf> bbiab guise
<shevy> havenwood yeah, I need to have it available as mixin but also standalone
wldcordeiro_work has quit [Read error: Connection reset by peer]
<havenwood> shevy: extend self
thomasxie has joined #ruby
<shevy> hmm
benzrf is now known as benzrf|offline
terrell_t has quit [Remote host closed the connection]
<shevy> now I am a bit confused... why is there module_function? is that doing the same as extend self?
fantazo has quit [Ping timeout: 252 seconds]
<havenwood> shevy: people use that to get the class instance method in the first place ^ (which i disagree with), but if you want both it is a good way
<havenwood> shevy: a single method though
terrellt has joined #ruby
<havenwood> one at a time versus in bulkl
<havenwood> en masse
Joel has left #ruby ["Leaving"]
<shevy> hehe
<shevy> well those are mini modules
<shevy> they have only two methods
terrellt has quit [Read error: Connection reset by peer]
terrellt has joined #ruby
<havenwood> shevy: `extend self` at the top, done
kotk has joined #ruby
<shevy> hmm
<shevy> not at the bottom?
<havenwood> shevy: top
<shevy> hehe
<havenwood> :P
djbkd has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 240 seconds]
ss__ has quit [Ping timeout: 258 seconds]
kotk_ has quit [Ping timeout: 240 seconds]
diegoviola has quit [Quit: WeeChat 0.4.3]
dayepa has joined #ruby
<havenwood> shevy: i vote `module_function` immediately below each method if cherry picking, otherwise `extend self` at the top of the module.
<shevy> ok but is there a difference?
<shevy> I mean these modules have basically just one method
dayepa has quit [Client Quit]
<shevy> I am tempted to use module_function right after the end of the first method
dayepa has joined #ruby
<shevy> module Foo; def foo;end; module_function :foo; end
scotje has left #ruby [#ruby]
<shevy> that kinda seems more explicit to my eyes than extend self?
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
<shevy> oh well
momomomomo has quit [Quit: momomomomo]
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> I just noticed
<shevy> it is not the same
debajit has joined #ruby
<shevy> module_function does not work in my example at all, but extend self does
kevind has quit [Quit: kevind]
<havenwood> shevy: ah, interesting
<havenwood> shevy: do you need the constants?
kenneth has joined #ruby
<shevy> hmm which ones?
R3D5H311 has left #ruby ["Good day"]
<havenwood> shevy: i haven't seen the code
<havenwood> shevy: just assuming
<shevy> nono it's really just basically one method, that gets wrapped into a module with the same name of that method, and then also gets a class method
<shevy> so def foo becomes
<shevy> module Foo; def foo; well, and now also extend self \o/ ; end
redondos has quit [Excess Flood]
<havenwood> shevy: `extend self` is idiomatic in my opinion when that's actually what you're wanting to do
redondos has joined #ruby
<shevy> yeah
<shevy> now I need to find out when to use module_function
<havenwood> i only dislike it when it's used to mean `class << self`, nasty to willy nilly expose methods ;P