yasushi has quit [Remote host closed the connection]
<charliesome>
DouweM: nah just showing a friend
<DouweM>
all right
jpinnix___ has quit [Ping timeout: 240 seconds]
MindfulMonk has quit [Ping timeout: 240 seconds]
Guest91861 has quit [Ping timeout: 240 seconds]
ctp_ has quit [Read error: Connection reset by peer]
Norrin has quit [Ping timeout: 240 seconds]
ConstantineXVI has quit [Ping timeout: 240 seconds]
mjmac has quit [Ping timeout: 240 seconds]
supershabam has quit [Ping timeout: 240 seconds]
dcfedde has quit [Ping timeout: 240 seconds]
Asitha has joined #ruby
supershabam has joined #ruby
drjblouse__ has quit [Ping timeout: 240 seconds]
mbff has joined #ruby
b00stfr3ak has quit [Ping timeout: 240 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
mjmac has joined #ruby
jpinnix____ is now known as jpinnix___
supershabam has quit [Changing host]
supershabam has joined #ruby
MindfulMonk has joined #ruby
Klumben has quit [Ping timeout: 240 seconds]
mbff is now known as Guest59737
ConstantineXVI has joined #ruby
dcfedde has joined #ruby
jollyy has quit [Quit: jollyy]
drjblouse__ has joined #ruby
fgo has quit [Remote host closed the connection]
zachallett has joined #ruby
Klumben has joined #ruby
spyderma_ has quit [Remote host closed the connection]
<Asitha>
hi there
antonishen has quit [Ping timeout: 245 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
evenix_ has joined #ruby
kennym1 has quit [Quit: Leaving.]
fgo_ has joined #ruby
antonishen has joined #ruby
ga1j1n_ has joined #ruby
bradhe_ has joined #ruby
lolmaus_ has quit [Ping timeout: 264 seconds]
m4n1f3st0 has joined #ruby
fjfish has joined #ruby
sparrovv has quit [Remote host closed the connection]
xcv has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
Cornflake has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
evenix has quit [Remote host closed the connection]
<Asitha>
Was wondering if someone could help me figure this out. I'm trying to create a tournament winner scenario that works recursively and it wont matter how many players there are as long as there is 2n players.
<Asitha>
given that the number of players is correct, I want to be able to recursively find the winner and move them onto the next level.
<Asitha>
But for some reason, my check doesn't get past the first sub-round, it keeps trying to go through the array even after the winner for that round has been decided
ga1j1n has quit [Remote host closed the connection]
francisfish has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 240 seconds]
rakm has quit [Ping timeout: 240 seconds]
sputnik13 has quit [Ping timeout: 240 seconds]
Paradox has quit [Ping timeout: 240 seconds]
pel_daniel has quit [Ping timeout: 240 seconds]
frode15243_ has quit [Ping timeout: 240 seconds]
ner0x has quit [Ping timeout: 240 seconds]
linduxed has quit [Ping timeout: 240 seconds]
bbloom has quit [Ping timeout: 240 seconds]
ConstantineXVI has quit [Ping timeout: 240 seconds]
kenichi has quit [Ping timeout: 240 seconds]
zz_jrhorn424 has quit [Ping timeout: 240 seconds]
stephenmac7 has quit [Ping timeout: 240 seconds]
rakm has joined #ruby
_bart has quit [Ping timeout: 255 seconds]
kenichi has joined #ruby
pel_daniel has joined #ruby
<centrx>
Asitha, Where is the logic that is supposed to stop it?
evenix_ has quit [Ping timeout: 264 seconds]
<Cornflake>
return rps_game_winner(finals)
stephenmac7 has joined #ruby
crantron has joined #ruby
sputnik13 has joined #ruby
<Cornflake>
or the is_match function
Elico has left #ruby [#ruby]
Lewix has quit [Remote host closed the connection]
Norrin has joined #ruby
frode15243_ has joined #ruby
ConstantineXVI has joined #ruby
Paradox has joined #ruby
ner0x has joined #ruby
Asitha has quit [Ping timeout: 240 seconds]
Cornflake is now known as Asitha
zz_jrhorn424 has joined #ruby
linduxed has joined #ruby
<Asitha>
centrx, the is_match function is supposed to stop it right
<Asitha>
and return the winner
m_3 has quit [Remote host closed the connection]
<centrx>
Asitha, You need to use "break" to end the loop
<bnagy>
imho don't mix iteration ( like each ) with recursion
<bnagy>
you'll just confuse yourself
fgo_ has quit [Remote host closed the connection]
<Asitha>
where would I put the break
<bnagy>
if it's a recursive reduction just have def reduce; # return if done; #logic; reduce(remaining)
<bnagy>
that's the basic skeleton of any programming exercise recursion
<bnagy>
and ( again imho ) that's the only kind you should use
<bnagy>
iterative algs are just easier on everyone
dcfedde has quit [Remote host closed the connection]
<bnagy>
few problems are naturally recursive
<Asitha>
where would I put the break
<Asitha>
oops
dcfedde has joined #ruby
<Asitha>
sorry was meant to press up enter on console
withnale has quit [Quit: No Ping reply in 180 seconds.]
<bnagy>
just use a normal unless blah, then press the key on the right side of the keyboard above shift, then put in the logic
axsuul has quit [Ping timeout: 255 seconds]
axsuul has joined #ruby
philcrissman_ has quit [Remote host closed the connection]
timonv has joined #ruby
TheCleanGame has left #ruby [#ruby]
<chuck_>
hah
spyderman4g63 has joined #ruby
tharindu_ has joined #ruby
Avahey_ has joined #ruby
kitak has joined #ruby
timonv has quit [Ping timeout: 264 seconds]
halkeye has left #ruby ["WeeChat 0.4.1"]
<Asitha>
sorry was meant to press up enter on console
<bnagy>
skills
spyderman4g63 has quit [Client Quit]
nari has quit [Ping timeout: 264 seconds]
<Asitha>
xD
tkuchiki has quit [Remote host closed the connection]
funburn has quit [Quit: funburn]
robert__ has joined #ruby
saarinen has quit [Quit: saarinen]
funburn has joined #ruby
manacit has quit [Ping timeout: 264 seconds]
aboudreault has quit [Ping timeout: 255 seconds]
m4n1f3st0 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jhass is now known as jhass|off
chris_th_ has joined #ruby
dr_Poggs has joined #ruby
sailias has joined #ruby
Klumben has quit [Ping timeout: 240 seconds]
m4n1f3st0 has joined #ruby
ConstantineXVI has quit [Ping timeout: 240 seconds]
Paradox has quit [Ping timeout: 240 seconds]
drPoggs has quit [Ping timeout: 240 seconds]
dr_Poggs is now known as drPoggs
csq has quit [Ping timeout: 240 seconds]
MindfulMonk has quit [Ping timeout: 240 seconds]
Guest59737 has quit [Ping timeout: 240 seconds]
supershabam has quit [Ping timeout: 240 seconds]
Afal has quit [Ping timeout: 240 seconds]
samuel02 has joined #ruby
bricker`LA has joined #ruby
ner0x has quit [Ping timeout: 240 seconds]
kenndel_ has quit [Ping timeout: 240 seconds]
TigerWolf has quit [Ping timeout: 240 seconds]
jack_rabbit has quit [Ping timeout: 240 seconds]
PhilK has quit [Ping timeout: 240 seconds]
wykydtron has quit [Ping timeout: 240 seconds]
<bricker`LA>
How do you get something like this in ruby: "sha1$4910774a$1$d9ad69e6b7be6dd2fd4767dda957ed47a582c7e3" ?
withnale_ has joined #ruby
weeems is now known as weems
weems has quit [Changing host]
weems has joined #ruby
wykydtron has joined #ruby
dmarr has quit [Ping timeout: 240 seconds]
lolmaus has joined #ruby
<bricker`LA>
Digest::SHA1.hexdigest() only generates the hash
armyriad has quit [Ping timeout: 240 seconds]
ffranz has quit [Ping timeout: 240 seconds]
<bricker`LA>
but I've seen this format in many places
dyreshark has quit [Ping timeout: 240 seconds]
aetaric has quit [Ping timeout: 240 seconds]
Afal has joined #ruby
withnale has quit [Ping timeout: 240 seconds]
zpinter has quit [Ping timeout: 240 seconds]
snath has quit [Ping timeout: 240 seconds]
chris_thomson has quit [Ping timeout: 240 seconds]
jack_rabbit has joined #ruby
zorak has quit [Ping timeout: 240 seconds]
postmodern has quit [Ping timeout: 240 seconds]
invinceable has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
bauruine has quit [Ping timeout: 240 seconds]
csq has joined #ruby
wykydtron has quit [Excess Flood]
PhilK has joined #ruby
yfeldblu_ has quit [Ping timeout: 240 seconds]
rurban has quit [Ping timeout: 240 seconds]
wykydtron has joined #ruby
dyreshark has joined #ruby
ffranz has joined #ruby
ner0x has joined #ruby
supershabam has joined #ruby
<bnagy>
that looks like a ( stupid ) hashed / salted secret
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
funburn has quit [Ping timeout: 255 seconds]
zpinter has joined #ruby
Klumben has joined #ruby
ConstantineXVI has joined #ruby
agjacome has quit [Ping timeout: 240 seconds]
aetaric has joined #ruby
mbff_ has joined #ruby
MindfulMonk has joined #ruby
bauruine has joined #ruby
dcfedde has quit [Read error: Connection reset by peer]
postmodern has joined #ruby
<bricker`LA>
what's stupid about it?
postmodern has quit [Changing host]
postmodern has joined #ruby
echevemaster has quit [Ping timeout: 240 seconds]
<bnagy>
Digest will only sha1 stuff for you - you need to salt etc yourself
blizzow has quit [Ping timeout: 240 seconds]
<bnagy>
using sha1 for passwords is stupid ( should use bcrypt / scrypt )
artgoeshere has quit [Ping timeout: 240 seconds]
agjacome has joined #ruby
fgo has joined #ruby
dcfedde has joined #ruby
<bnagy>
substitute 'stored secret of any kind' for passwords, obviously
dmarr has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
axsuul has joined #ruby
sailias has quit [Ping timeout: 255 seconds]
fijimunkii has quit [Ping timeout: 255 seconds]
lfox has quit [Ping timeout: 240 seconds]
Paradox has joined #ruby
samuel02 has quit [Ping timeout: 255 seconds]
Authenticator has quit [Ping timeout: 240 seconds]
Nicholas_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
linduxed has quit [Ping timeout: 240 seconds]
thoonai has quit [Ping timeout: 240 seconds]
kennym has joined #ruby
mjmac has quit [Ping timeout: 240 seconds]
danshultz has quit [Remote host closed the connection]
NicholasFlamel has joined #ruby
artgoeshere has joined #ruby
ConstantineXVI has quit [Ping timeout: 240 seconds]
maZtah has quit [Ping timeout: 240 seconds]
wykydtron has quit [Ping timeout: 240 seconds]
danshultz has joined #ruby
MindfulMonk has quit [Ping timeout: 240 seconds]
lfox has joined #ruby
goleldar has joined #ruby
zorak has joined #ruby
xaq has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
danshultz has joined #ruby
thoonai has joined #ruby
aaronmcadam has quit [Quit: Leaving...]
apeiros_ has joined #ruby
Voodoofish4301 has quit [Ping timeout: 240 seconds]
Authenticator has joined #ruby
ndrei_ has quit [Ping timeout: 255 seconds]
m4n1f3st0 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
endash_ has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
northfurr2 has joined #ruby
northfurr2 has joined #ruby
northfurr2 has quit [Changing host]
Spami_ has joined #ruby
blizzow has joined #ruby
csq has quit [Ping timeout: 240 seconds]
apeiros has quit [Ping timeout: 240 seconds]
lfox has quit [Ping timeout: 240 seconds]
ddd has quit [Ping timeout: 240 seconds]
dmarr has quit [Ping timeout: 240 seconds]
Paradox has quit [Ping timeout: 240 seconds]
Klumben has quit [Ping timeout: 240 seconds]
yjmsf20 has quit [Ping timeout: 240 seconds]
zpinter has quit [Ping timeout: 240 seconds]
zenojis has quit [Ping timeout: 240 seconds]
endash has quit [Read error: Connection reset by peer]
seich- has quit [Ping timeout: 240 seconds]
northfurr has quit [Ping timeout: 240 seconds]
ddd has joined #ruby
endash_ is now known as endash
wykydtron has joined #ruby
fijimunkii has joined #ruby
csq has joined #ruby
Paradox has joined #ruby
mary5030 has joined #ruby
MindfulMonk has joined #ruby
mjmac has joined #ruby
Afal has quit [Ping timeout: 240 seconds]
Spami has quit [Ping timeout: 240 seconds]
oso96_2000 is now known as oso|away
zenojis has joined #ruby
Afal has joined #ruby
Kneferilis has quit [Read error: Connection reset by peer]
snath has joined #ruby
vaicine_ has joined #ruby
NicholasFlamel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblu_ has joined #ruby
Solnse has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Read error: Connection reset by peer]
pel_daniel has left #ruby [#ruby]
ga1j1n_ has quit [Remote host closed the connection]
m4n1f3st0 has joined #ruby
zpinter has joined #ruby
Hobogrammer_ has joined #ruby
Solnse has joined #ruby
postmodern has quit [Ping timeout: 240 seconds]
lfox has joined #ruby
Hobogrammer has quit [Ping timeout: 240 seconds]
vaicine has quit [Ping timeout: 240 seconds]
DarkFoxDK has quit [Ping timeout: 240 seconds]
csq has quit [Ping timeout: 240 seconds]
tkuchiki has joined #ruby
mjmac has quit [Ping timeout: 240 seconds]
MindfulMonk has quit [Ping timeout: 240 seconds]
csq has joined #ruby
rurban has joined #ruby
caveat- has quit [Ping timeout: 240 seconds]
zenojis has quit [Excess Flood]
mary5030 has quit [Remote host closed the connection]
DarkFoxDK has joined #ruby
ddd has quit [Ping timeout: 240 seconds]
dcfedde has quit [Ping timeout: 240 seconds]
zorak has quit [Ping timeout: 240 seconds]
Sthebig has quit [Ping timeout: 240 seconds]
ConstantineXVI has joined #ruby
dcfedde has joined #ruby
bbloom has joined #ruby
MindfulMonk has joined #ruby
goleldar has quit [Remote host closed the connection]
wald0 has joined #ruby
dyreshark has quit [Ping timeout: 240 seconds]
mbff_ has quit [Ping timeout: 240 seconds]
Sthebig has joined #ruby
robustus has quit [Ping timeout: 252 seconds]
caveat- has joined #ruby
zorak has joined #ruby
Voodoofish4301 has joined #ruby
amclain has joined #ruby
mbff_ has joined #ruby
dyreshark has joined #ruby
seich- has joined #ruby
Paradox has quit [Ping timeout: 240 seconds]
dkamioka_ has quit [Remote host closed the connection]
cantonic has quit [Read error: Connection reset by peer]
horofox has joined #ruby
cantonic has joined #ruby
lw has quit [Read error: Connection reset by peer]
robustus has joined #ruby
lw has joined #ruby
tvw has quit []
cantonic has quit [Read error: Connection reset by peer]
blizzow1 has joined #ruby
CpuID2 has joined #ruby
CpuID2 has joined #ruby
CpuID2 has quit [Changing host]
dmarr has joined #ruby
blizzow has quit [Ping timeout: 240 seconds]
artgoeshere has quit [Ping timeout: 240 seconds]
dcfedde has quit [Remote host closed the connection]
lfox has quit [Ping timeout: 240 seconds]
ConstantineXVI has quit [Ping timeout: 240 seconds]
MindfulMonk has quit [Ping timeout: 240 seconds]
CpuID has quit [Ping timeout: 240 seconds]
mbff_ has quit [Ping timeout: 240 seconds]
dyreshark has quit [Ping timeout: 240 seconds]
ner0x has quit [Ping timeout: 240 seconds]
awkisopen has quit [Ping timeout: 240 seconds]
bbloom has quit [Ping timeout: 240 seconds]
mjmac has joined #ruby
lfox has joined #ruby
zz_jrhorn424 has quit [Ping timeout: 240 seconds]
MindfulMonk has joined #ruby
DarkFoxDK has quit [Ping timeout: 240 seconds]
smathieu_ has quit [Remote host closed the connection]
<pipework>
bnagy: For people who don't understand cryptography, I'd suggest they use securerandom.
TigerWolf has joined #ruby
mikepack has joined #ruby
<pipework>
with bcrypt, sorry.
wald0_ has joined #ruby
artgoeshere has joined #ruby
smathieu has joined #ruby
mbff_ has joined #ruby
zenojis has joined #ruby
wald0 has quit [Ping timeout: 240 seconds]
ddd has joined #ruby
zz_jrhorn424 has joined #ruby
rurban has quit [Ping timeout: 240 seconds]
agjacome has quit [Ping timeout: 240 seconds]
DarkFoxDK has joined #ruby
rurban has joined #ruby
seich- has quit [Ping timeout: 240 seconds]
wykydtron has quit [Ping timeout: 240 seconds]
Nightmare has quit [Ping timeout: 240 seconds]
agjacome has joined #ruby
m4n1f3st0 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dcfedde has joined #ruby
awkisopen has joined #ruby
Paradox has joined #ruby
ConstantineXVI has joined #ruby
wykydtron has joined #ruby
ner0x has joined #ruby
bradhe_ has quit [Remote host closed the connection]
snuffeluffegus has joined #ruby
ndrei has joined #ruby
S0da has quit [Remote host closed the connection]
marcdel has quit [Ping timeout: 255 seconds]
<bnagy>
I don't have a very strong opinion on bcrypt vs scrypt, they're both so much better than salted hashes
<bnagy>
but I'd use scrypt given a choice
xaq has quit [Remote host closed the connection]
wald0_ has quit [Quit: leaving]
wald0 has joined #ruby
nari has joined #ruby
Lewix has quit [Remote host closed the connection]
Voodoofish4301 has quit [Quit: Leaving.]
mikepack has quit [Remote host closed the connection]
Spami_ has quit [Quit: This computer has gone to sleep]
agjacome_ has joined #ruby
Mongey_ has quit [Read error: Connection reset by peer]
mgberlin has joined #ruby
ndrei has quit [Ping timeout: 255 seconds]
zz_jrhorn424 has quit [Ping timeout: 240 seconds]
sailias has joined #ruby
Liothen- has joined #ruby
ddd has quit [Ping timeout: 240 seconds]
seich- has joined #ruby
Klumben has joined #ruby
norm__ has joined #ruby
norm has quit [Ping timeout: 240 seconds]
artgoeshere has quit [Ping timeout: 240 seconds]
lfox has quit [Ping timeout: 240 seconds]
DarkFoxDK has quit [Ping timeout: 240 seconds]
drx_ has quit [Ping timeout: 240 seconds]
ConstantineXVI has quit [Ping timeout: 240 seconds]
awkisopen has quit [Ping timeout: 240 seconds]
Liothen has quit [Ping timeout: 240 seconds]
DarkFoxDK has joined #ruby
Nightmare has joined #ruby
zz_jrhorn424 has joined #ruby
aetaric has quit [Ping timeout: 240 seconds]
aetaric has joined #ruby
lfox has joined #ruby
agjacome has quit [Ping timeout: 240 seconds]
Paradox has quit [Ping timeout: 240 seconds]
ner0x has quit [Ping timeout: 240 seconds]
dmarr has quit [Ping timeout: 240 seconds]
zenojis has quit [Ping timeout: 240 seconds]
ddd has joined #ruby
nowthatsamatt has quit [Read error: Connection reset by peer]
crantron has quit [Ping timeout: 240 seconds]
mjmac has quit [Ping timeout: 240 seconds]
DarkFoxDK has quit [Ping timeout: 240 seconds]
seich- has quit [Ping timeout: 240 seconds]
norm has quit [Ping timeout: 240 seconds]
zz_jrhorn424 has quit [Ping timeout: 240 seconds]
MindfulMonk has quit [Ping timeout: 240 seconds]
tharindu_ has quit [Ping timeout: 240 seconds]
lfox has quit [Ping timeout: 240 seconds]
Klumben has quit [Ping timeout: 240 seconds]
mbff_ has quit [Ping timeout: 240 seconds]
csq has quit [Ping timeout: 240 seconds]
Nightmare has quit [Ping timeout: 240 seconds]
ffranz has quit [Ping timeout: 240 seconds]
rurban has quit [Ping timeout: 240 seconds]
artgoeshere has joined #ruby
afex has quit [Ping timeout: 264 seconds]
smathieu has quit [Read error: Connection reset by peer]
yarou has joined #ruby
dcfedde has quit [Ping timeout: 240 seconds]
epochwolf has quit [Ping timeout: 240 seconds]
ada2358_ has quit [Ping timeout: 240 seconds]
ner0x has joined #ruby
zenojis has joined #ruby
mjmac has joined #ruby
DarkFoxDK has joined #ruby
awkisopen has joined #ruby
awkisopen has joined #ruby
Paradox has joined #ruby
crantron has joined #ruby
csq has joined #ruby
Gate has quit [Ping timeout: 240 seconds]
ConstantineXVI has joined #ruby
epochwolf has joined #ruby
zz_jrhorn424 has joined #ruby
MindfulMonk has joined #ruby
rurban has joined #ruby
seich- has joined #ruby
Nightmare has joined #ruby
ada2358 has joined #ruby
dmarr has joined #ruby
dcfedde has joined #ruby
mbff_ has joined #ruby
lfox has joined #ruby
Nightmare is now known as Guest45092
ffranz has joined #ruby
yarou_ has quit [Ping timeout: 240 seconds]
dcfedde has quit [Remote host closed the connection]
mikepack has joined #ruby
drx_ has joined #ruby
smathieu has joined #ruby
m4n1f3st0 has joined #ruby
pu22l3r has joined #ruby
mjmac has quit [Ping timeout: 240 seconds]
csq has quit [Ping timeout: 240 seconds]
artgoeshere has quit [Ping timeout: 240 seconds]
wykydtron has quit [Ping timeout: 240 seconds]
seich- has quit [Ping timeout: 240 seconds]
lfox has quit [Ping timeout: 240 seconds]
MindfulMonk has quit [Ping timeout: 240 seconds]
dmarr has quit [Ping timeout: 240 seconds]
mgberlin has quit [Remote host closed the connection]
csq has joined #ruby
noodman has joined #ruby
Gate has joined #ruby
Guest45092 has quit [Ping timeout: 240 seconds]
rurban has quit [Ping timeout: 240 seconds]
awkisopen has quit [Ping timeout: 240 seconds]
zenojis has quit [Ping timeout: 240 seconds]
wykydtron has joined #ruby
Paradox has quit [Ping timeout: 240 seconds]
DarkFoxDK has quit [Ping timeout: 240 seconds]
zenojis has joined #ruby
<noodman>
I'm using nokogiri and I'll trying to select a div class but it is just returning empty. The div class is definitely in the raw html. Does nokogiri css selector not like class names with dashes i.e. div.this-class ?
wykydtron has quit [Excess Flood]
afex has joined #ruby
mikepack_ has joined #ruby
lfox has joined #ruby
MindfulMonk has joined #ruby
mjmac has joined #ruby
seich- has joined #ruby
mikepack has quit [Ping timeout: 240 seconds]
ffranz has quit [Quit: Leaving]
ner0x has quit [Ping timeout: 240 seconds]
<centrx>
noodman, It should work
dmarr has joined #ruby
cntrx has joined #ruby
centrx has quit [Quit: All this computer hacking is making me thirsty]
epochwolf has quit [Ping timeout: 240 seconds]
danshultz has quit [Remote host closed the connection]
cntrx is now known as centrx
krz has joined #ruby
m4n1f3st0 has quit [Ping timeout: 264 seconds]
Paradox has joined #ruby
DarkFoxDK has joined #ruby
epochwolf has joined #ruby
epochwolf has quit [Changing host]
epochwolf has joined #ruby
artgoeshere has joined #ruby
afex has quit [Ping timeout: 240 seconds]
csq has quit [Ping timeout: 240 seconds]
TheTFEF has joined #ruby
TheTFEF is now known as Guest20718
rurban has joined #ruby
lfox has quit [Ping timeout: 240 seconds]
MindfulMonk has quit [Ping timeout: 240 seconds]
mjmac has quit [Ping timeout: 240 seconds]
mjmac has joined #ruby
awkisopen has joined #ruby
centrx has quit [Client Quit]
centrx has joined #ruby
wykydtron has joined #ruby
wykydtron has quit [Excess Flood]
lfox has joined #ruby
wykydtron has joined #ruby
ner0x has joined #ruby
MindfulMonk has joined #ruby
rezzack has quit [Ping timeout: 240 seconds]
csq has joined #ruby
Klumben has joined #ruby
mehlah has joined #ruby
m4n1f3st0 has joined #ruby
afex has joined #ruby
<noodman>
centrx: could there be anything in the html throwing it off?
Lewix has joined #ruby
<centrx>
noodman, Yes, that is a likelihood
manacit has joined #ruby
robbyoconnor has joined #ruby
robbyoconnor has quit [Changing host]
robbyoconnor has joined #ruby
jaimef has quit [Ping timeout: 255 seconds]
xaq has joined #ruby
weems has quit [Ping timeout: 255 seconds]
dcfedde has joined #ruby
jaimef has joined #ruby
pu22l3r has quit [Remote host closed the connection]
mikepack_ has quit [Remote host closed the connection]
<noodman>
centrx: do you know a good reference for things in the html that might throw it off?
pu22l3r has joined #ruby
weems has joined #ruby
<centrx>
noodman, I don't know. Nokogiri is not especially tolerant of malformed HTML
<centrx>
noodman, You'd have to learn HTML :)
mikepack has joined #ruby
Mongey_ has joined #ruby
<noodman>
centre: I think the html is fine, the site providers has explicated tried to stop scraping so i think it might be something there
<centrx>
That is quite possible
m4n1f3st0 has quit [Ping timeout: 240 seconds]
aboudreault has joined #ruby
dcfedde has quit [Remote host closed the connection]
dkamioka has joined #ruby
robbyoconnor has quit [Ping timeout: 255 seconds]
oioioioi has joined #ruby
marcdel has joined #ruby
becausewhynot has joined #ruby
aboudreault has quit [Excess Flood]
dcfedde has joined #ruby
mary5030 has joined #ruby
codabrin_ has quit [Ping timeout: 264 seconds]
xm has quit [Ping timeout: 255 seconds]
m4n1f3st_ has joined #ruby
northfurr2 has quit []
northfurr has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
<bnagy>
just watch out you don't get [a, [b,c,d]] when you want [a,b,c,d]
arubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaimef has joined #ruby
Mongey_ has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
fgo has quit [Remote host closed the connection]
dcfedde has quit [Remote host closed the connection]
sensen has joined #ruby
<Steve445>
ya just testing now. But that may work well. Could build some small wrappers around it to make building the aggregation more of a selecting the order of the hashes in the array and then rest are calls to the methods
wallerdev has joined #ruby
dcfedde has joined #ruby
afex has quit [Ping timeout: 264 seconds]
Deele has quit [Ping timeout: 264 seconds]
<Steve445>
well have to do some thinking about the structure of the method calls, but overall that might work well
Vivekananda has quit [Remote host closed the connection]
thomasxie has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
yacks has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
sski has joined #ruby
alexju_ has quit [Remote host closed the connection]
Skaag has joined #ruby
alexju has joined #ruby
xaq_ has quit [Remote host closed the connection]
Steve445 has quit [Quit: Steve445]
sski has quit [Ping timeout: 240 seconds]
bds has joined #ruby
jamto11 has joined #ruby
pu22l3r_ has joined #ruby
teddyp1cker has joined #ruby
yasushi has joined #ruby
pu22l3r has quit [Ping timeout: 240 seconds]
jamto11 has quit [Ping timeout: 240 seconds]
gfunc has quit [Remote host closed the connection]
bds has quit [Quit: leaving]
_lynX has quit [Ping timeout: 264 seconds]
dcfedde has quit [Remote host closed the connection]
teddyp1cker has quit [Ping timeout: 264 seconds]
yubrew has joined #ruby
dcfedde has joined #ruby
Hobogrammer_ has quit [Ping timeout: 255 seconds]
Mongey_ has joined #ruby
maletor has joined #ruby
yubrew has quit [Ping timeout: 264 seconds]
x1337807x has joined #ruby
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
programmerq has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<centrx>
Sigloo, Symbolic methods like [], ==, <=>, <<, etc. work that way
vlad_starkov has joined #ruby
<centrx>
Sigloo, I'm sure the parser notices that the method name ends because it is not a letter or an underscore
rickruby has quit []
<centrx>
Sigloo, s/method name/object name
dseitz has joined #ruby
<Sigloo>
Ah, okay. Thanks. Been trying to search for some information about it, but didn't know the proper terminology. I'll look up special methods.
dcfedde has quit [Remote host closed the connection]
dcfedde has joined #ruby
arubin has joined #ruby
timonv has joined #ruby
flagg0204 has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
wallerdev has quit [Quit: wallerdev]
paolooo has joined #ruby
tungd has quit [Ping timeout: 264 seconds]
bawNg has quit [Changing host]
bawNg has joined #ruby
tungd has joined #ruby
chris_th_ is now known as chris_thomson
timonv has quit [Ping timeout: 255 seconds]
Mongey_ has joined #ruby
james_d_h has joined #ruby
Solnse has quit [Ping timeout: 264 seconds]
royalty has quit [Quit: Leaving]
sdouglas has joined #ruby
centrx has quit [Quit: All this computer hacking is making me thirsty]
centrx has joined #ruby
yubrew has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
teddyp1cker has joined #ruby
tectonic has joined #ruby
hobodave has joined #ruby
Paradox has quit [Quit: off to herp the derps]
Paradox has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
x1337807x has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
dcfedde has quit [Remote host closed the connection]
dcfedde has joined #ruby
Zunonia has quit [Ping timeout: 255 seconds]
Oog has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
<Oog>
Digest::MD5.base64digest(html) is calculating the wrong hash when html is a utf-8 string - ideas?
werdnativ has joined #ruby
abdulsattar has joined #ruby
Shidash has quit [Ping timeout: 255 seconds]
sensen has quit [Ping timeout: 240 seconds]
teddyp1cker has quit [Remote host closed the connection]
Zunonia has joined #ruby
mary5030 has joined #ruby
zorak has quit [Remote host closed the connection]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hanmac has joined #ruby
thomasxie has quit [Ping timeout: 240 seconds]
dkamioka has quit [Remote host closed the connection]
tungd has quit [Ping timeout: 240 seconds]
mary5030 has quit [Remote host closed the connection]
sensen has joined #ruby
Liothen- is now known as Liothen
Liothen has quit [Changing host]
Liothen has joined #ruby
Hanmac1 has quit [Ping timeout: 255 seconds]
axsuul has quit [Ping timeout: 240 seconds]
tungd has joined #ruby
mary5030 has joined #ruby
Mongey_ has quit [Read error: Connection reset by peer]
colour has quit [Quit: see you space cowboy ...]
axsuul has joined #ruby
wallerdev has joined #ruby
_justin has joined #ruby
dcfedde has quit [Remote host closed the connection]
klue has quit [Ping timeout: 264 seconds]
wallerdev has quit [Client Quit]
dcfedde has joined #ruby
mattmcclure has quit [Quit: Connection closed for inactivity]
bradhe has quit [Remote host closed the connection]
ericmathison has joined #ruby
sensen has quit [Ping timeout: 255 seconds]
chris_thomson has quit [Quit: Zzz...]
bar___ has joined #ruby
rococo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hobodave has quit [Quit: Computer has gone to sleep.]
snuffeluffegus has quit [Quit: Leaving]
shadoi1 has quit [Remote host closed the connection]
ehc has quit [Quit: ehc]
Mongey_ has joined #ruby
mercwithamouth has quit [Ping timeout: 255 seconds]
abdulsattar has quit [Ping timeout: 240 seconds]
abdulsattar has joined #ruby
Deele has joined #ruby
paolooo has quit [Quit: Page closed]
havenwood has quit []
zigomir has joined #ruby
saarinen has joined #ruby
tungd has quit [Ping timeout: 255 seconds]
lw has quit [Quit: s]
teddyp1cker has joined #ruby
tungd has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phansch has joined #ruby
dcfedde has quit [Remote host closed the connection]
dcfedde has joined #ruby
bar___ has quit [Remote host closed the connection]
<ericmathison>
Probably missing something obvious here... I would expect "foobar\n"[/ar\n\Z/] to return nil since \Z is supposed to match just before a final newline if one exists. So why does it return "ar\n"?
charliesome has joined #ruby
<centrx>
ericmathison, Well you included the \n in the match
Emmanuel_Chanel has quit [Ping timeout: 265 seconds]
<centrx>
ericmathison, So it matches the end of the string, but there is no other newline after the one you already specified
sdouglas has quit [Remote host closed the connection]
sdouglas has joined #ruby
funburn has joined #ruby
<ericmathison>
but don't the docs say that if there is a final new line that \Z matches before it? how can the \Z match if it comes after the position it is supposed to match?
sensen has joined #ruby
Hanmac has quit [Ping timeout: 255 seconds]
Mongey_ has quit [Read error: Connection reset by peer]
mary5030 has quit [Remote host closed the connection]
funburn has left #ruby [#ruby]
<ericmathison>
in other words, it seems like the docs are saying that if there is a final newline, don't match the end of the string. match the position before the final character
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yubrew has quit [Ping timeout: 240 seconds]
makara has joined #ruby
<centrx>
ericmathison, But there is no final newline after what was already matched
teddyp1cker has quit [Remote host closed the connection]
<ericmathison>
which means i should get nil, right?
sdouglas has quit [Ping timeout: 240 seconds]
<centrx>
ericmathison, \Z still matches the end of string whether there is a final newline or not
raja has joined #ruby
raja is now known as Guest74555
jamto11 has joined #ruby
<ericmathison>
so, the statement that "If string ends with a newline, it matches just before newline
etqqkoiflwhb has joined #ruby
<ericmathison>
oops
lw has joined #ruby
Guest74555 is now known as raja
etqqkoiflwhb has quit [Remote host closed the connection]
Hanmac has joined #ruby
teddyp1cker has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
<ericmathison>
so is the statement that "If a string ends with a newline, it matches just before the newline" only correct when not trying to match a newline?
<centrx>
"If a string ends with a newline"
jamto11 has quit [Ping timeout: 255 seconds]
<centrx>
That really means "If \Z matches at a place where there is a newline at the end of the string
<centrx>
/ar\n\Z/ already uses up the newline, so the \Z matches after it
<centrx>
If you wanted \Z to match the newline, you can remove the explicit \n from the regex
axsuul has quit [Ping timeout: 240 seconds]
dcfedde has quit [Remote host closed the connection]
NicholasFlamel has joined #ruby
dcfedde has joined #ruby
<ericmathison>
Ok. If I follow correctly, that means the docs could probably stand to be worded a little better?
funburn has joined #ruby
<ericmathison>
or am is still missing it?
Mongey_ has joined #ruby
yarou has quit [Remote host closed the connection]
<centrx>
ericmathison, The doc is clear for all reasonable use cases
<centrx>
ericmathison, There is no reason to use \n\Z if you want \Z to match that preceding \n
<ericmathison>
ok. true. :) Thanks for your time. Your wording help me.
tungd has quit [Ping timeout: 264 seconds]
tungd has joined #ruby
<ericmathison>
I guess, I was mostly trying to find a possible scenario where i would use \Z over \z
<centrx>
I am happy to help
S0da has joined #ruby
Oog has quit []
<centrx>
ericmathison, it sounds like \Z is kind of like a free chomp
<ericmathison>
ok, i see how that would be helpeful
_justin has quit [Ping timeout: 255 seconds]
monkegjinni has joined #ruby
beanHolez has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
lyanchih has joined #ruby
chipotle has joined #ruby
beanHolez has quit [Remote host closed the connection]
lyanchih has quit [Client Quit]
funburn has quit [Quit: funburn]
lyanchih has joined #ruby
Emmanuel_Chanel has joined #ruby
Spami has joined #ruby
_justin has joined #ruby
saarinen has quit [Read error: Connection reset by peer]
saarinen has joined #ruby
lolmaus has quit [Quit: No Ping reply in 180 seconds.]
monkegjinni has quit [Remote host closed the connection]
lolmaus has joined #ruby
sdouglas has joined #ruby
monkegjinni has joined #ruby
bradhe has joined #ruby
samuel02 has joined #ruby
dcfedde has quit [Remote host closed the connection]
Sigloo has quit [Ping timeout: 240 seconds]
dcfedde has joined #ruby
NicholasFlamel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sdouglas has quit [Ping timeout: 240 seconds]
monkegjinni has quit [Ping timeout: 255 seconds]
tylersmith has quit [Remote host closed the connection]
sigurding has joined #ruby
samuel02 has quit [Ping timeout: 264 seconds]
koell has quit [Quit: So say we all!]
Mongey_ has quit [Read error: Connection reset by peer]
aganov has joined #ruby
Mongey_ has joined #ruby
timonv has joined #ruby
AussieDownUnder has joined #ruby
browndawg has joined #ruby
rococo has joined #ruby
Skaag has quit [Ping timeout: 264 seconds]
lyanchih has quit [Quit: lyanchih]
Es0teric has quit [Quit: Computer has gone to sleep.]
lyanchih has joined #ruby
<AussieDownUnder>
Hello Rubians, I'm considering learning a little Ruby, first time learning a language in about 8 years & whatever languages I was learning back then I struggled. Any suggestions/recommendations on what to use in a ubuntu derivative? So far I'm playing with the ruby language in notepad ++ run in wine
<centrx>
That's the default, but it has 2.0 in the package "ruby2.0"
gstamp has quit [Read error: No route to host]
<AussieDownUnder>
I just tried a terminal install for just ruby, says it wants to install 1.9.1
dcfedde has quit [Remote host closed the connection]
<AussieDownUnder>
Think I'll try & get the latest daily or whatever
<abdulsattar>
centrx: yes, you're rihgt
<abdulsattar>
*right
dcfedde has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
<AussieDownUnder>
I'll have a look on the ruby website & see what else I can type from the terminal to get a later version.
<centrx>
AussieDownUnder, Get a stable release, not the daily build, daily builds can have a lot of bugs
TheColonial has joined #ruby
<TheColonial>
Hi all. Can someone please give me a hint as to how to detect if an array of bytes is a valid unicode string?
crystal77 has joined #ruby
<TheColonial>
sometimes a given payload will have arbitrary bytes.. and other times it will have a valid string. in the latter case I want to render the string not just a blob of bytes.
<TheColonial>
Does ruby have something that'll parse the array and check if the content is nothing but valid unicode characters?
raja has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gstamp has joined #ruby
codabrink has quit [Read error: Connection reset by peer]
codabrin_ has joined #ruby
<centrx>
TheColonial, Array#pack / String#unpack might be relevant
<TheColonial>
centrx: i know how to do th epacking, but i don't know how to check if the content is valid first.
freerobby has quit [Quit: Leaving.]
<TheColonial>
centrx: how would I use those two to determine if the string is valid?
<Hanmac>
TheColonial: also look at valid_encoding?
<TheColonial>
Hanmac: ah! that looks like the ticket. Thank you :)
<centrx>
ooo this guy's good
yacks has quit [Ping timeout: 240 seconds]
hermanmunster has quit [Remote host closed the connection]
hermanmunster has joined #ruby
yasushi has joined #ruby
james_d_h has quit [Ping timeout: 264 seconds]
sameerynho has joined #ruby
ksinkar has joined #ruby
arubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sensen_ has joined #ruby
sensen has quit [Ping timeout: 240 seconds]
lxsameer_ has joined #ruby
hermanmunster has quit [Ping timeout: 240 seconds]
Macaveli has joined #ruby
Mongey_ has joined #ruby
<AussieDownUnder>
I installed ruby, does it need a gui/front end installed separately or something?
lxsameer has quit [Ping timeout: 255 seconds]
<centrx>
AussieDownUnder, Nope
<abdulsattar>
AussieDownUnder: No it doesn't. It's a compiler, just like gcc
<abdulsattar>
*wacks my brain*
<abdulsattar>
not a compiler
<abdulsattar>
an interpreter
Mongey_ has quit [Read error: Connection reset by peer]
<abdulsattar>
details don't matter though
jprovazn has joined #ruby
sameerynho has quit [Ping timeout: 264 seconds]
Mongey_ has joined #ruby
dkamioka has joined #ruby
charliesome has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
browndawg has quit [Quit: Leaving.]
mengu has joined #ruby
monkegjinni has joined #ruby
Skaag has joined #ruby
tungd has quit [Ping timeout: 264 seconds]
tungd has joined #ruby
Hanmac has joined #ruby
centrx has quit [Quit: All this computer hacking is making me thirsty]
mary5030 has joined #ruby
dcfedde has quit [Remote host closed the connection]
jackneill has joined #ruby
skaflem has joined #ruby
dcfedde has joined #ruby
<AussieDownUnder>
abdulsattar, yeah I am a new man to these worlds. So how do I actually use Ruby then? Do I write code in another program then tell it to compile into the ruby things? Sorry (don't bash your brain over my non existant knowledge of ruby, you actually have a brain)
sensen_ has quit [Ping timeout: 264 seconds]
sameerynho has joined #ruby
tagrudev has joined #ruby
Skaag has quit [Ping timeout: 240 seconds]
<Hanmac>
AussieDownUnder: ruby is interpreted not compiled ... so you start your script with "ruby your_file.rb" or with "./your_file.rb" if the file is marked as exceutable and has the shebang
mary5030 has quit [Ping timeout: 255 seconds]
lxsameer_ has quit [Ping timeout: 240 seconds]
<AussieDownUnder>
Hanmac, So what's a good all in one programmin language to practise writing ruby in? What do you do/how do you go about ruby?
TheColonial has left #ruby [#ruby]
<AussieDownUnder>
Hanmac, programming language software?
<Hanmac>
"all in one programmin language" ? i use gedit and eclipse as Editors (depending on the size of the projects) and mostly i write bindings in C(++) for Ruby
dkamioka_ has joined #ruby
vlad_starkov has joined #ruby
nfk has joined #ruby
timonv has quit [Remote host closed the connection]
decoponio has joined #ruby
yacks has joined #ruby
ndrei has joined #ruby
timonv has joined #ruby
dkamioka has quit [Ping timeout: 264 seconds]
SevereOverfl0w has joined #ruby
dkamioka_ has quit [Ping timeout: 255 seconds]
timonv has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
crystal77 has quit [Quit: Computer has gone to sleep.]
raja has joined #ruby
freerobby1 has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
NicholasFlamel has joined #ruby
yasushi has quit [Remote host closed the connection]
amclain has quit [Quit: Leaving]
sdouglas has joined #ruby
tungd has quit [Ping timeout: 255 seconds]
dcfedde has quit [Remote host closed the connection]
tungd has joined #ruby
freerobby1 has quit [Ping timeout: 240 seconds]
samuel02 has joined #ruby
dcfedde has joined #ruby
klaut has joined #ruby
sdouglas has quit [Ping timeout: 240 seconds]
anarang has joined #ruby
<AussieDownUnder>
So anyone here actually programmed anything or made software with Ruby?
AussieDownUnder has quit [Remote host closed the connection]
samuel02 has quit [Ping timeout: 264 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bnagy>
I am starting to feel trolled
fieldfirst has joined #ruby
bal has joined #ruby
ndrei has quit [Ping timeout: 255 seconds]
tubuliferous has joined #ruby
<tubuliferous>
#processing
ndrei has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
yacks has quit [Ping timeout: 264 seconds]
ehaliewicz has joined #ruby
tectonic has quit []
fieldfirst has quit [Remote host closed the connection]
SonicX has joined #ruby
dcfedde has quit [Remote host closed the connection]
dcfedde has joined #ruby
sensen has joined #ruby
vlad_starkov has joined #ruby
axsuul has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Alina-malina has joined #ruby
Merks has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
donsindrom has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
sensen has quit [Ping timeout: 255 seconds]
tubuliferous has quit [Quit: Leaving]
samuel02 has joined #ruby
fijimunkii has quit [Read error: Connection reset by peer]
<_justin>
lol
tungd has quit [Ping timeout: 264 seconds]
NovapaX has joined #ruby
lolmaus has quit [Quit: No Ping reply in 180 seconds.]
lolmaus has joined #ruby
TTilus has quit [Ping timeout: 264 seconds]
TTilus has joined #ruby
sigurding has quit [Quit: sigurding]
sigurding has joined #ruby
sigurding has quit [Client Quit]
browndawg has joined #ruby
jamto11 has joined #ruby
Hanmac has joined #ruby
apeiros_ has quit [Remote host closed the connection]
dkamioka has joined #ruby
apeiros has joined #ruby
zigomir has quit [Ping timeout: 240 seconds]
m1lt0n_ has joined #ruby
freerobby has joined #ruby
jamto11 has quit [Ping timeout: 255 seconds]
dkamioka has quit [Ping timeout: 240 seconds]
apeiros has quit [Ping timeout: 255 seconds]
relix has joined #ruby
bradhe has joined #ruby
Skaag has joined #ruby
dcfedde has quit [Remote host closed the connection]
sensen has joined #ruby
vedic has quit [Quit: Leaving.]
dcfedde has joined #ruby
fflush has quit [Ping timeout: 264 seconds]
freerobby has quit [Ping timeout: 264 seconds]
fflush has joined #ruby
fflush_ has quit [Ping timeout: 264 seconds]
fflush_ has joined #ruby
<phansch>
there's also the ruby-processing gem, which is neat
bradhe has quit [Ping timeout: 240 seconds]
Skaag has quit [Ping timeout: 255 seconds]
nomenkun has joined #ruby
Hobogrammer has joined #ruby
sensen has quit [Ping timeout: 264 seconds]
LiohAu has joined #ruby
fflush has quit [Ping timeout: 264 seconds]
fflush has joined #ruby
sensen has joined #ruby
donsindrom has left #ruby ["Leaving"]
kenndel_ has joined #ruby
nomenkun has quit [Ping timeout: 264 seconds]
nomenkun has joined #ruby
sensen has quit [Ping timeout: 264 seconds]
freerobby has joined #ruby
arturaz has joined #ruby
BeingUntoDeath has quit [Ping timeout: 240 seconds]
JohnBat26 has quit [Remote host closed the connection]
AussieDownUnder has joined #ruby
robert__ has quit [Ping timeout: 255 seconds]
rails426 has joined #ruby
sdouglas has joined #ruby
monkegjinni has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 255 seconds]
freerobby has quit [Ping timeout: 240 seconds]
dcfedde has quit [Remote host closed the connection]
monkegjinni has joined #ruby
dcfedde has joined #ruby
fella6s has joined #ruby
rdark has joined #ruby
apeiros has joined #ruby
sdouglas has quit [Ping timeout: 240 seconds]
<crome>
moroning
AussieDownUnder has quit [Ping timeout: 240 seconds]
fella5s has quit [Ping timeout: 246 seconds]
Mongey_ has quit [Ping timeout: 264 seconds]
agjacome_ has quit [Quit: leaving]
monkegjinni has quit [Ping timeout: 264 seconds]
claymore has joined #ruby
nomenkun has joined #ruby
sigurding has joined #ruby
CpuID2 has quit [Ping timeout: 255 seconds]
Merks has quit [Read error: Connection reset by peer]
billy_ran_away has quit [Ping timeout: 240 seconds]
<rails426>
\exit
<rails426>
clear
rails426 has quit [Quit: leaving]
Kneferilis has joined #ruby
telling has quit [Remote host closed the connection]
<shevy>
rescue!
rails426 has joined #ruby
Authenticator has quit [Ping timeout: 255 seconds]
ikaros has joined #ruby
sparrovv has joined #ruby
renklaf_ has joined #ruby
lyanchih has quit [Quit: lyanchih]
nomenkun has quit [Remote host closed the connection]
nomenkun has joined #ruby
Hobogrammer has quit [Remote host closed the connection]
Hobogrammer has joined #ruby
AussieDownUnder has joined #ruby
mengu has quit [Remote host closed the connection]
sensen has joined #ruby
jayne_ has joined #ruby
Authenticator has joined #ruby
pfg has joined #ruby
kayloos has joined #ruby
billy_ran_away has joined #ruby
dcfedde has quit [Remote host closed the connection]
lw has quit [Quit: s]
CpuID has joined #ruby
CpuID has quit [Changing host]
CpuID has joined #ruby
andikr has joined #ruby
sparrovv has quit [Remote host closed the connection]
gaussblurinc has joined #ruby
jayne has quit [Ping timeout: 624 seconds]
obs has joined #ruby
Azulinho has quit [Ping timeout: 264 seconds]
jayne_ is now known as jayne
obs has left #ruby [#ruby]
_bart has joined #ruby
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
Alina-malina has quit [Quit: Leaving]
Alina-malina has joined #ruby
YamakasY has joined #ruby
dcfedde has joined #ruby
kayloos has quit [Remote host closed the connection]
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dkamioka has joined #ruby
bradhe has joined #ruby
vedic has joined #ruby
mengu has joined #ruby
yasushi has joined #ruby
dkamioka has quit [Ping timeout: 240 seconds]
bradhe has quit [Ping timeout: 255 seconds]
blackmesa has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
raja has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dcfedde has quit [Remote host closed the connection]
<He4a>
just wanted to doublecheck if there something built in
lyanchih has joined #ruby
fannye has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
george2 has quit [Remote host closed the connection]
arefaslani has quit [Remote host closed the connection]
<mbuf>
what is the proper way to tailf on a file and read each line?
r0ber has joined #ruby
MrSamuel has joined #ruby
<ij>
%x{tail -f file}.each_line
<ij>
No, that's not right.
ndrei has joined #ruby
jamto11 has joined #ruby
<ij>
It's not lazy.
He4a has quit [Quit: leaving]
r0ber has quit [Client Quit]
dkamioka has joined #ruby
Advocation has joined #ruby
ayaz has joined #ruby
jamto11 has quit [Ping timeout: 240 seconds]
<ij>
mbuf, Might do with IO.popen, and then read_lines from the pipe.
dkamioka has quit [Ping timeout: 252 seconds]
danshultz has joined #ruby
camilasan has joined #ruby
dcfedde has quit [Remote host closed the connection]
cbreeze has joined #ruby
postmodern has quit [Quit: Leaving]
dcfedde has joined #ruby
arefaslani has joined #ruby
abdulsattar has quit [Ping timeout: 240 seconds]
Skaag has joined #ruby
francisfish has joined #ruby
lolmaus_ has joined #ruby
lolmaus has quit [Ping timeout: 255 seconds]
sensen has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
<mbuf>
ij, is there a recommended way to open a file only after it has been completely written? is there a way to check that in case another process keeps writing to it?
sensen has joined #ruby
<ij>
Define completely written... I'd say that after you think it's done, move it so other processes can't use it, that's all. As for the checking, yeah I'd go with reading tail -f's output.
Skaag has quit [Ping timeout: 240 seconds]
MrSamuel has quit [Ping timeout: 240 seconds]
drx_ has quit [Remote host closed the connection]
workmad3 has joined #ruby
francisfish has quit [Read error: Connection reset by peer]
AlSquire has joined #ruby
francisfish has joined #ruby
danshultz has quit [Ping timeout: 240 seconds]
nari has quit [Ping timeout: 264 seconds]
mengu has quit [Ping timeout: 240 seconds]
mehlah has joined #ruby
MrSamuel has joined #ruby
<mbuf>
ij, "completely written" as in no other process is still writing to it
<mbuf>
ij, or appending text
TMM has joined #ruby
freerobby has joined #ruby
NicholasFlamel has quit [Ping timeout: 240 seconds]
AlexRussia has quit [Ping timeout: 240 seconds]
hahahahah has joined #ruby
yubrew has joined #ruby
kevinykc_ has quit [Quit: Computer has gone to sleep.]
oioioioi has quit [Ping timeout: 264 seconds]
kevinykchan has joined #ruby
sdouglas has joined #ruby
freerobby has quit [Ping timeout: 240 seconds]
nomenkun has quit [Remote host closed the connection]
nomenkun has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
pdimitrov has joined #ruby
dcfedde has quit [Remote host closed the connection]
kevinykchan has quit [Client Quit]
sensen has quit [Ping timeout: 240 seconds]
dcfedde has joined #ruby
klaut has joined #ruby
blaxter has joined #ruby
sensen has joined #ruby
zeeraw has joined #ruby
sdouglas has quit [Ping timeout: 240 seconds]
nomenkun has quit [Ping timeout: 240 seconds]
Advocation has quit [Quit: Advocation]
aaronmcadam has joined #ruby
tvw has joined #ruby
TCG has joined #ruby
atmosx has joined #ruby
shaunbaker has joined #ruby
danshultz has joined #ruby
abdulsattar has joined #ruby
Advocation has joined #ruby
atmosx has quit [Client Quit]
Zunonia has quit [Quit: Computer has gone to sleep.]
nomenkun has joined #ruby
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
AndChat| has quit [Ping timeout: 255 seconds]
aaronmcadam has quit [Remote host closed the connection]
lyanchih has quit [Ping timeout: 240 seconds]
aaronmcadam has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
endash_ has joined #ruby
nomenkun has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
lyanchih has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
camilasan has quit [Read error: Connection reset by peer]
camilasa_ has joined #ruby
drx_ has joined #ruby
lyanchih has quit [Client Quit]
camilasa_ has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
MissionCritical has joined #ruby
sigurding has quit [Quit: sigurding]
camilasan has quit [Read error: Connection reset by peer]
maoko has joined #ruby
maoko has quit [Client Quit]
camilasan has joined #ruby
drx__ has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
Nightmare has quit [Quit: DDoS has died, DDoS has risen, DDoS comin' again]
popl has quit [Quit: Touch the frog.]
Nightmare has joined #ruby
camilasan has joined #ruby
Nightmare is now known as Guest34359
Guest34359 has quit [Remote host closed the connection]
camilasan has quit [Read error: Connection reset by peer]
nvrch has quit [Remote host closed the connection]
drx__ has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
drx__ has joined #ruby
banister has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
drx_ has quit [Ping timeout: 240 seconds]
camilasa_ has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
drx__ has quit [Read error: Connection reset by peer]
camilasa_ has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
Skaag has joined #ruby
lyanchih_ has joined #ruby
vlad_starkov has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
jamto11 has joined #ruby
drx__ has joined #ruby
camilasan has joined #ruby
camilasa_ has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
camilasa_ has quit [Read error: Connection reset by peer]
AlexRussia has joined #ruby
sdouglas has joined #ruby
drx_ has quit [Ping timeout: 240 seconds]
camilasan has quit [Read error: Connection reset by peer]
AlexRussia has quit [Client Quit]
camilasan has joined #ruby
linojon has joined #ruby
Hanmac has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
northfurr has quit [Ping timeout: 255 seconds]
camilasan has joined #ruby
tungd has quit [Ping timeout: 240 seconds]
AussieDownUnder has quit [Quit: Leaving]
jamto11 has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Ping timeout: 240 seconds]
vijaykoogu has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
<vijaykoogu>
hello Ruby world
drx__ has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby
camilasan has joined #ruby
george2 has joined #ruby
Hanmac1 has quit [Ping timeout: 240 seconds]
tungd has joined #ruby
alexju has quit [Remote host closed the connection]
camilasan has quit [Read error: Connection reset by peer]
<vijaykoogu>
hello guys any1 home ?
camilasan has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
<aaronmcadam>
puts "Hello"
camilasan has joined #ruby
vijaykoogu has quit [Client Quit]
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
TheTFEF has joined #ruby
fieldfirst has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
gaussblurinc has quit [Quit: Leaving.]
camilasan has joined #ruby
dcfedde has quit [Remote host closed the connection]
camilasa_ has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
dcfedde has joined #ruby
professor_soap has joined #ruby
camilasa_ has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
yubrew has joined #ruby
<professor_soap>
Hi. I have a problem with encoding in a rails app, probably not rails related tho.
camilasan has quit [Read error: Connection reset by peer]
fieldfirst has quit [Client Quit]
camilasan has joined #ruby
ixti has joined #ruby
<professor_soap>
Im rendering some data fetched from the database and this data has a sentences like "Ã\u0096vriga"
camilasan has quit [Read error: Connection reset by peer]
camilasa_ has joined #ruby
TheTFEF is now known as Nightmare
camilasa_ has quit [Read error: Connection reset by peer]
<professor_soap>
When doing .encoding on the data in console it says it has utf-8 encoding.
camilasan has joined #ruby
<professor_soap>
Im pretty much a newbie when it comes to encoding
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<professor_soap>
How can I encode it so that it shows the right characters?
camilasan has quit [Read error: Connection reset by peer]
fieldfirst has joined #ruby
camilasan has joined #ruby
Macaveli has joined #ruby
<professor_soap>
Im doing a YAML.load(data)
camilasan has quit [Read error: Connection reset by peer]
<professor_soap>
Anyone?
camilasan has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
camilasan has quit [Read error: Connection reset by peer]
sigurding has joined #ruby
camilasan has joined #ruby
danshultz has joined #ruby
<apeiros>
professor_soap: sounds like your yaml file was saved in something which is not utf-8
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
<apeiros>
professor_soap: and yaml reads it as utf-8
<apeiros>
the solution would be to ensure that your yaml files are properly saved as utf-8.
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
<professor_soap>
you mean when saved to the db?
camilasan has quit [Read error: Connection reset by peer]
<professor_soap>
There are no YAML files really..
<apeiros>
professor_soap: um, you once say "Im doing a YAML.load(data)" and another time you say "from the database" - which is it now?
camilasan has joined #ruby
linojon has quit [Ping timeout: 252 seconds]
<professor_soap>
ya, im fetching the data from the db and then doing a YAML.load to structure it in that way.
camilasan has quit [Read error: Connection reset by peer]
<professor_soap>
sort of like doing a JSON.parse(data)
<apeiros>
you mean you store serialized data in your db
camilasan has joined #ruby
<professor_soap>
yeah
<apeiros>
with the db involved it gets a *tiny* bit more complex.
<apeiros>
ensure that your client<->server connection has the proper encoding set
<apeiros>
ensure that your database/table/column encoding is set properly
camilasan has quit [Read error: Connection reset by peer]
<apeiros>
ensure that you write indeed utf-8 into the table
eka has joined #ruby
camilasan has joined #ruby
<professor_soap>
Yea I know what your saying
camilasan has quit [Read error: Connection reset by peer]
<professor_soap>
Im working with a legacy code base here, lots of old code I didnt write in the first place.
<apeiros>
note, String#encoding only tells you how ruby *interprets* the data in the string
<professor_soap>
But is there some way of decoding it and encoding it again?
freerobby has joined #ruby
<professor_soap>
ok
camilasan has joined #ruby
<apeiros>
it doesn't mean the bytes in the string are indeed meant to be interpreted as utf-8.
maroloccio has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
<apeiros>
professor_soap: you can use force_encoding to tell ruby that the encoding of the string is in fact another one
camilasan has joined #ruby
<apeiros>
professor_soap: and you can use .encode to translate a string from one encoding to another
linojon has joined #ruby
<professor_soap>
hmm
camilasan has quit [Read error: Connection reset by peer]
<apeiros>
you should only use those techniques to clean up data
camilasan has joined #ruby
banister has joined #ruby
<apeiros>
in your workflows, you should define where "translation borders" are, and specify external/internal encodings there
<professor_soap>
force_encoding didn't change the output, same resutl.
camilasan has quit [Read error: Connection reset by peer]
<professor_soap>
yeah
<professor_soap>
well I have set it in the database.yml file, encoding utf-8
<professor_soap>
and in application.rb
<apeiros>
what should "Ã\u0096vriga" look like correctly?
<professor_soap>
config.encoding
<professor_soap>
etc.
camilasan has joined #ruby
<professor_soap>
But this is old data saved in a bad way basically.
<professor_soap>
I need some temp solution.
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
S0da has quit [Remote host closed the connection]
freerobby has quit [Ping timeout: 240 seconds]
camilasan has quit [Read error: Connection reset by peer]
nvrch has joined #ruby
camilasan has joined #ruby
mlpinit has quit [Remote host closed the connection]
camilasan has quit [Read error: Connection reset by peer]
Hanmac1 has joined #ruby
camilasan has joined #ruby
perlsyntax has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
sski has joined #ruby
VinceThePrince has joined #ruby
camilasan has joined #ruby
yasushi has quit [Remote host closed the connection]
maZtah has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
Hanmac has quit [Ping timeout: 240 seconds]
dcfedde has quit [Remote host closed the connection]
Skaag has quit [Ping timeout: 240 seconds]
camilasan has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
camilasa_ has joined #ruby
dcfedde has joined #ruby
Macaveli has quit [Ping timeout: 252 seconds]
camilasa_ has quit [Read error: Connection reset by peer]
ixti has quit [Ping timeout: 240 seconds]
camilasan has joined #ruby
drx_ has joined #ruby
camilasa_ has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
tungd has quit [Ping timeout: 252 seconds]
drx_ has quit [Read error: Connection reset by peer]
tungd has joined #ruby
drx_ has joined #ruby
mpajor_op5 has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
bradhe has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
fieldfirst has quit [Ping timeout: 240 seconds]
fieldfirst has joined #ruby
yacks has quit [Quit: Leaving]
drx__ has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
rippa has joined #ruby
drx_ has joined #ruby
drx__ has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 253 seconds]
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
professor_soap has quit []
aryaching has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
drx__ has joined #ruby
senayar has quit [Remote host closed the connection]
coderhs has joined #ruby
coderhs has quit [Client Quit]
drx__ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
NovapaX has quit [Read error: Connection reset by peer]
francisfish has quit [Remote host closed the connection]
NovapaX has joined #ruby
george2|chakra has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
chrisseaton has joined #ruby
george2 has quit [Ping timeout: 240 seconds]
skaflem has quit [Quit: This computer has gone to sleep]
mark_locklear has joined #ruby
drx__ has joined #ruby
dcfedde has quit [Remote host closed the connection]
dcfedde has joined #ruby
Hanmac has joined #ruby
Hanmac1 has quit [Ping timeout: 240 seconds]
danshultz has quit [Remote host closed the connection]
drx___ has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drx__ has quit [Read error: Connection reset by peer]
drx_ has quit [Ping timeout: 240 seconds]
foredoomed has joined #ruby
drx_ has joined #ruby
drx___ has quit [Read error: Connection reset by peer]
VinceThePrince has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
crantron has joined #ruby
drx__ has joined #ruby
VinceThePrince has joined #ruby
mbuf has quit [Quit: Leaving]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
drx__ has quit [Read error: Connection reset by peer]
senayar has joined #ruby
VinceThePrince has quit [Remote host closed the connection]
nism has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
drx__ has joined #ruby
drx_ has quit [Ping timeout: 240 seconds]
banister has joined #ruby
Trynemjoel has joined #ruby
gaussblurinc has joined #ruby
danshultz has joined #ruby
drx_ has joined #ruby
lotherk has quit [Ping timeout: 265 seconds]
drx__ has quit [Read error: Connection reset by peer]
tungd has quit [Ping timeout: 252 seconds]
DouweM has quit [Quit: Leaving...]
tungd has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
drx__ has joined #ruby
yacks has joined #ruby
peterellisjones has quit [Quit: Leaving.]
drx__ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
mjs2600 has joined #ruby
compleatang has quit [Remote host closed the connection]
drx_ has quit [Read error: Connection reset by peer]
drx__ has joined #ruby
drx__ has quit [Read error: Connection reset by peer]
yubrew has joined #ruby
drx_ has joined #ruby
roolo has quit [Quit: Leaving...]
phutch1ns has quit [Ping timeout: 246 seconds]
sigurding has quit [Quit: sigurding]
mengu has quit [Remote host closed the connection]
DouweM has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
vlad_starkov has joined #ruby
_bart has joined #ruby
dblessing has joined #ruby
drx__ has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
dcfedde has quit [Remote host closed the connection]
S0da has joined #ruby
dcfedde has joined #ruby
lyanchih_ has quit [Quit: lyanchih_]
drx__ has quit [Read error: Connection reset by peer]
lyanchih has joined #ruby
drx__ has joined #ruby
agjacome has joined #ruby
drx_ has quit [Ping timeout: 240 seconds]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
nomenkun has joined #ruby
St_Marx has quit [Ping timeout: 245 seconds]
tkuchiki_ has joined #ruby
lotherk has joined #ruby
drx_ has joined #ruby
drx__ has quit [Read error: Connection reset by peer]
cantonic has joined #ruby
mansi has joined #ruby
fgo has quit [Remote host closed the connection]
NicholasFlamel has joined #ruby
NovapaX has quit [Read error: Connection reset by peer]
rmorello has joined #ruby
drx__ has joined #ruby
NovapaX has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
dagobah has joined #ruby
drx___ has joined #ruby
tkuchiki_ has quit [Ping timeout: 240 seconds]
drx__ has quit [Read error: Connection reset by peer]
drx_ has quit [Ping timeout: 240 seconds]
Macaveli has joined #ruby
drx___ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
nism has quit [Remote host closed the connection]
jkamenik has joined #ruby
krz has quit [Quit: WeeChat 0.4.3]
drx__ has joined #ruby
skaflem has joined #ruby
drx__ has quit [Read error: Connection reset by peer]
crantron has quit []
drx__ has joined #ruby
freerobby has joined #ruby
drx_ has quit [Ping timeout: 240 seconds]
drx__ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
michael_lee has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
tungd has quit [Ping timeout: 252 seconds]
drx_ has joined #ruby
<omegahm>
How are you guys at golfing? I'm looking for a way that does the same as Hash#has_key?, that is {}.has_key?(:t) == false, but {t:nil}.has_key?(:t) == true, but I want it shorter
stringoO has joined #ruby
<omegahm>
I've been discussing {}[:t], but this of course returns nil, when {t:nil}
tungd has joined #ruby
freerobby has quit [Ping timeout: 252 seconds]
drx__ has joined #ruby
SCommette has joined #ruby
sk87 has joined #ruby
sparrovv has joined #ruby
aryaching_ has joined #ruby
drx__ has quit [Read error: Connection reset by peer]
drx__ has joined #ruby
<apeiros>
omegahm: #key? is an alias of has_key?
<apeiros>
saves you 4 letters
drx_ has quit [Ping timeout: 240 seconds]
dcfedde has quit [Remote host closed the connection]
bradhe has joined #ruby
drx__ has quit [Read error: Connection reset by peer]
freezey has joined #ruby
<omegahm>
Thanks apeiros
drx_ has joined #ruby
dcfedde has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
aryaching has quit [Ping timeout: 252 seconds]
sigurding has joined #ruby
drx_ has joined #ruby
St_Marx has joined #ruby
adkron has joined #ruby
<DouweM>
omegahm: drop the parentheses around :t
nomenkun_ has joined #ruby
<DouweM>
although you need them if you really want == true
obs has quit [Ping timeout: 240 seconds]
bradhe has quit [Ping timeout: 240 seconds]
drx__ has joined #ruby
<DouweM>
otherwise it'll compare :t with true
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
tkuchiki has joined #ruby
freezey has quit [Ping timeout: 252 seconds]
<omegahm>
Ahh, DouweM, yes, I can actually save one character here as well... See you guys are not half bad at golfing :)
freerobby has joined #ruby
<DouweM>
omegahm: what golf are you trying to solve?
fieldfirst has quit [Read error: Connection reset by peer]
nomenkun has quit [Ping timeout: 240 seconds]
<omegahm>
DouweM: Work related. :)
fieldfirst has joined #ruby
drx___ has joined #ruby
drx__ has quit [Read error: Connection reset by peer]
AlexRussia has joined #ruby
<omegahm>
One of the other guys just said we couldn't have the code if it was more than x characters, so we all started golfing.
drx_ has quit [Ping timeout: 240 seconds]
kayloos has joined #ruby
<apeiros>
lol
<apeiros>
long live single letter variables
blackmesa has quit [Ping timeout: 240 seconds]
<DouweM>
lol
<DouweM>
what an arbitrary restriction
drx___ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
<apeiros>
it'd actually be awesome as a joint education effort
<jhass>
omegahm: give that guy a slap from the whole channel
<apeiros>
golf a piece of code
<apeiros>
then share with peers
<DouweM>
Sure
<apeiros>
and you have to explain the code of your peer to the others
<DouweM>
jhass: seconded
<apeiros>
jhass: thirded
Hanmac has joined #ruby
sk87 has joined #ruby
Sleepee has joined #ruby
drx__ has joined #ruby
roolo has joined #ruby
lotherk has quit [Ping timeout: 240 seconds]
makara has quit [Ping timeout: 255 seconds]
drx_ has quit [Read error: Connection reset by peer]
drx__ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
tjr9898 has joined #ruby
sailias has joined #ruby
sameerynho has quit [Quit: Leaving]
nomenkun_ has quit [Read error: Connection reset by peer]
drx_ has quit [Read error: Connection reset by peer]
cbreeze has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
IceyEC has joined #ruby
paulfm has joined #ruby
phansch has quit [Quit: WeeChat 0.4.2]
drx__ has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
jlast has joined #ruby
chris_thomson has joined #ruby
phantomtiger has joined #ruby
nomenkun has joined #ruby
drx__ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
jamto11 has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
chuk has joined #ruby
freezey has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
camilasa_ has quit [Remote host closed the connection]
drx__ has joined #ruby
camilasan has joined #ruby
platzhirsch has joined #ruby
* platzhirsch
slurps...
camilasan has quit [Read error: Connection reset by peer]
bal has quit [Quit: bal]
dcfedde has quit [Remote host closed the connection]
ck1 has joined #ruby
camilasan has joined #ruby
drx_ has quit [Read error: Connection reset by peer]
drx__ has quit [Read error: Connection reset by peer]
dcfedde has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
drx_ has joined #ruby
camilasan has joined #ruby
<snickers>
abdulsattar: I know that is a EOL and now i'm working od simple server that send file. When I send text file everything works, but i have problem with binary data
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
tungd has quit [Ping timeout: 252 seconds]
camilasan has quit [Read error: Connection reset by peer]
browndawg has quit [Quit: Leaving.]
bal has joined #ruby
camilasan has joined #ruby
tungd has joined #ruby
<snickers>
I try to add 0x00 sequence after 0x0d via gsub, but client don't alweys remove this seqence and I don't know why
camilasan has quit [Read error: Connection reset by peer]
<ck1>
is net::ssh a standard ruby package?
camilasan has joined #ruby
<freezey>
ck1: its a gem
<freezey>
net-ssh (2.7.0, 2.2.2)
<freezey>
whichever you please
camilasan has quit [Read error: Connection reset by peer]
<snickers>
generaly I have problem that file after downlowad dont match orginal data
camilasan has joined #ruby
<ck1>
ok, thanks. another question is... (i can't seem to word it right to get what I want on google) but I need to automate a shelll scripting ... i need to call a command and then maybe respond based on output...
camilasan has quit [Read error: Connection reset by peer]
<freezey>
sure
nomenkun_ has joined #ruby
<ck1>
but i can't/don't want ot use a 3rd part library
<freezey>
you can either shell out
camilasan has joined #ruby
<freezey>
ok no 3rd party so you can shell out
<freezey>
cmd = %x{command here} or cmd = IO.popen('command here')
camilasan has quit [Read error: Connection reset by peer]
drx_ has quit [Ping timeout: 252 seconds]
duggiefresh has joined #ruby
camilasan has joined #ruby
<ck1>
freezey: is there a difference than running with ` `?
sk87 has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
chris_thomson has quit [Quit: Zzz...]
<ck1>
right now i'm using ssh = `ssh foobar do something`
<shevy>
Hanmac yeah there is more than one way to do it but I am not interested in it, mallu is :-)
larissa has quit [Quit: Leaving]
yasushi has quit [Remote host closed the connection]
rayners has joined #ruby
<Hanmac>
i think the best way would be (g)sub
dkamioka_ has quit [Ping timeout: 240 seconds]
francisfish has joined #ruby
freezey has quit [Remote host closed the connection]
Tomasso has joined #ruby
rainmanjam has joined #ruby
tgkokk has joined #ruby
tgkokk has quit [Max SendQ exceeded]
rainmanjam has quit [Remote host closed the connection]
rainmanjam has joined #ruby
blackmesa has joined #ruby
npearson has quit [Remote host closed the connection]
npearson has joined #ruby
zorak has quit [Ping timeout: 252 seconds]
circuit has quit [Quit: Lost terminal]
dcfedde has quit [Remote host closed the connection]
VictorBjelkholm has joined #ruby
maZtah has quit [Changing host]
maZtah has joined #ruby
dcfedde has joined #ruby
geggam has joined #ruby
obs has quit [Remote host closed the connection]
jds_ has joined #ruby
mjs2600 has joined #ruby
VictorBjelkholm has quit [Quit: Leaving]
jds_ is now known as jds
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
kayloos_ has joined #ruby
bluenemo has quit [Remote host closed the connection]
ohwhoa has joined #ruby
b00stfr3ak has joined #ruby
lw has joined #ruby
Tomasso has quit [Ping timeout: 252 seconds]
<mjc_>
wow reel is impressive
fijimunkii has quit [Quit: leaving]
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
obs has joined #ruby
kayloos has quit [Ping timeout: 240 seconds]
axl_ has quit [Quit: axl_]
tagrudev has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 240 seconds]
freezey has joined #ruby
mlpinit_ has joined #ruby
mlpinit has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
raja has joined #ruby
ndrei has quit [Read error: Operation timed out]
raja has quit [Max SendQ exceeded]
mansi_ has quit [Remote host closed the connection]
mengu has quit []
mansi_ has joined #ruby
mlpinit_ has quit [Read error: Connection reset by peer]
abdulsattar has joined #ruby
mansi_ has quit [Read error: Connection reset by peer]
sterlingcalder has joined #ruby
kevind has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
mansi_ has joined #ruby
mlpinit has joined #ruby
markisonfire has joined #ruby
<Morrolan>
The amount of application- and web-servers in and around the Ruby world is astonishing...
paulfm has quit []
sterlingcalder has left #ruby [#ruby]
dcfedde has quit [Quit: Lost terminal]
<stringoO>
How would I go about implementing something like Calc.new.one.plus.two ?
larissa has joined #ruby
<shevy>
stringoO not possible
<stringoO>
shevy: it's a coding challenge on codewars.com
<shevy>
you will have to return an object that responds to #one #plus #two
<benzrf>
codewars ftw
<benzrf>
stringoO: check out my katas =D
paulfm has joined #ruby
<stringoO>
:)
<benzrf>
stringoO: i did that kata youre on
razibog has joined #ruby
enebo has joined #ruby
Beoran__ has joined #ruby
Beoran_ has quit [Ping timeout: 264 seconds]
Beoran has quit [Ping timeout: 264 seconds]
<Morrolan>
Chaining is generally done by having the methods return the object, after the respective operations. To support arbitrary method calls you'll also need #method_missing.
<stringoO>
cool
<shevy>
there you go stringoO \o/
<stringoO>
this is crazy lol
mikepack has joined #ruby
<Morrolan>
I'd just start with implementing #one, #plus and #two by hand, though. :)
<stringoO>
benzrf: I cannot see your solution without forfeiting my points lol :P
axl_ has joined #ruby
<stringoO>
Morrolan: thanks!
DouweM_ has joined #ruby
nomenkun_ has quit [Read error: Connection reset by peer]
tgkokk has joined #ruby
cbreeze has joined #ruby
ndrei has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
tungd has quit [Ping timeout: 240 seconds]
<stringoO>
Morrolan: I totally didn't think of returning the object - that's so smart! Thanks! :)
<Morrolan>
:)
<Morrolan>
Has a very javascript-ish feel to it. Some people love method chaining, others don't.
perlsyntax has joined #ruby
DouweM has quit [Ping timeout: 240 seconds]
tungd has joined #ruby
<stringoO>
Morrolan: is it possible to know if there's a further method chained? As in, if I call Calc.new.one, I want to return 1, but if it needs chaining then I have to return the object
bal has quit [Quit: bal]
mjs2600 has quit [Remote host closed the connection]
<Morrolan>
I don't think there is. It would also make for a confusing API. Imagine that the user of your library would store the result of Calc.new.one in a variable, with the intention of calling #plus#two on it later on.
jhass is now known as jhass|off
<Morrolan>
It would blow up, since, while he thought he got a Calculator object, he actually got a number.
tgkokk has quit [Client Quit]
Prometheian has joined #ruby
<stringoO>
gotcha
<stringoO>
thanks
tgkokk has joined #ruby
tgkokk has quit [Max SendQ exceeded]
<Morrolan>
codewars.com wants me to sign up via a non-encrypted connection? And I thought we had 2014... :P
<benzrf>
stringoO: you /could/ modify Fixnum to have #plus
<benzrf>
but that's p crud
tylersmith has quit [Remote host closed the connection]
DouweM_ has quit [Ping timeout: 252 seconds]
fieldfirst has quit [Ping timeout: 252 seconds]
tylersmith has joined #ruby
jonno11 has joined #ruby
amundj has quit [Read error: Operation timed out]
camilasan has quit [Remote host closed the connection]
camilasan has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
m4n1f3st0 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
camilasan has joined #ruby
jdguzman has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
tungd has quit [Ping timeout: 240 seconds]
ndrei has joined #ruby
camilasan has joined #ruby
aganov has quit [Quit: Leaving]
apeiros has quit [Ping timeout: 240 seconds]
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
Spami has joined #ruby
tungd has joined #ruby
ndrei_ has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
camilasan has joined #ruby
havenwood has joined #ruby
browndawg has joined #ruby
CorySimmons has quit [Quit: Zzz...]
IceyEC has quit [Quit: IceyEC]
circuit has joined #ruby
bas has joined #ruby
james_d_h has joined #ruby
Blue_Ice has joined #ruby
<bas>
in my gemfile i have "gem 'cucumber', '0.6.3'", however if i 'bundle install --system' cucumber is not in my path. if i manually 'gem install cucumber --version ..' it is in my path. how can i have bundler install cucumber in my path?
axl_ has quit [Ping timeout: 240 seconds]
<xm_>
xm_> im not efficient! <--- haha i could have just said "im inefficient!"
smathieu has quit [Remote host closed the connection]
mansi_ has quit [Remote host closed the connection]
smathieu has joined #ruby
crystal77 has quit [Quit: Computer has gone to sleep.]
<benzrf>
bas: why are you using cucumber
pietr0 has joined #ruby
<ichistmeinname>
hey folks - i'm more a functional programmer, and since there's currently a hype on "lenses" in haskell and scala, I'm asking myself, if there are attempt for an "lens" library in ruby. Unfortunately, goolge didn't give me any hits.
mansi_ has joined #ruby
<benzrf>
ichistmeinname: it should not be too hard to write a simple one yourself
<benzrf>
;p
mansi_ has quit [Read error: Connection reset by peer]
<benzrf>
besides, why would lenses be so useful?
<benzrf>
zippers might be interesting, but i fail to use the use for lenses in ruby
mansi_ has joined #ruby
nomenkun has joined #ruby
sambao21 has joined #ruby
crystal77 has joined #ruby
Advocation has joined #ruby
nomenkun has quit [Remote host closed the connection]
<bas>
benzrf: old legacy project
<ichistmeinname>
for the most common structures (arrays, hashmaps), there are only destructive methods, that do not yield a new object. maybe a lens-kinda-library would bring a more functional style to such structures
dkamioka_ has joined #ruby
lw has quit [Quit: s]
tjr9898 has joined #ruby
sparrovv has joined #ruby
philcrissman has joined #ruby
<ichistmeinname>
so, there's no known "lens"-library for ruby, yet?
<benzrf>
ichistmeinname: not that i can think of off the top of my head
<benzrf>
if you decide to make one id be happy to contributed
<benzrf>
ichistmeinname: i dont think lenses are the solution for non-destructive updating though
<benzrf>
tbh
<benzrf>
like i said, zippers probably fit imperative oop better
<benzrf>
:u
kpshek has joined #ruby
gaussblurinc has quit [Quit: Leaving.]
vasilakisFiL has joined #ruby
baroquebobcat has joined #ruby
<benzrf>
class Symbol
<benzrf>
def call(*args, *blk)
lw has joined #ruby
<benzrf>
proc {|o| o.send self, *args, *blk}
<benzrf>
end
<benzrf>
end
<benzrf>
^nifty
gaussblurinc has joined #ruby
m4n1f3st0 has joined #ruby
mikepack has quit [Remote host closed the connection]
Nyyx has quit [Ping timeout: 245 seconds]
<vasilakisFiL>
how can I undefine a class variable? there is a remove_class_variable but I get such errors: NoMethodError: undefined method `remove_class_variable' for main:Object. Also when I try to run this example from ruby docs http://apidock.com/ruby/Module/remove_class_variable I get this error: NameError: cannot remove @@test for Dummy.
<vasilakisFiL>
I am using ruby 2.1.1
<benzrf>
why are you removing it?
m4n1f3st0 has quit [Client Quit]
larissa has quit [Quit: Leaving]
mikepack has joined #ruby
<banister>
benzrf how do you use that? :hello.(5, 6).(self)
<benzrf>
:hello.(2, 3)
<havenwood>
vasilakisFiL: My favorite way to remove class variables is to not use them. :P
lkba has joined #ruby
<benzrf>
brb
<banister>
benzrf collection.each(&:hello.(5, 6))
<banister>
benzrf that's pretty cool actually
benzrf is now known as benzrf|offline
<banister>
benzrf|offline i like it :)
m4n1f3st0 has joined #ruby
<banister>
benzrf|offline really nice, get that in core
nomenkun has joined #ruby
<vasilakisFiL>
ok.. how can I have a global attribute among ruby classes? for instance, let's say that I have 5 classes that I want them to use the same database connection
benzrf|offline is now known as benzrf
<vasilakisFiL>
so that to avoid the db connection tear up/down overhead
danshultz has quit []
<benzrf>
banister: i would Trynemjoel
<benzrf>
*try ugh
<banister>
benzrf what?
<benzrf>
do you think it is possible?
<banister>
benzrf Yes, did you come up with that?
npearson has quit [Remote host closed the connection]
ndrei_ has quit [Read error: Operation timed out]
<benzrf>
yeah but it probs exists already
<benzrf>
its p obvious ;p
<banister>
i've never seen it, i like it
aspires has joined #ruby
<benzrf>
=}
dkamioka has joined #ruby
nomenkun has quit [Remote host closed the connection]
<benzrf>
another thing tho
<benzrf>
1 sec let me write this shit up
yasushi has joined #ruby
kevinykchan has joined #ruby
zsais has joined #ruby
<benzrf>
hmm
<benzrf>
is there a programmatic undef
andy__ has quit [Read error: Connection reset by peer]
<ij>
vasilakisFiL, If it's an instance, then methods on it from whichever class or mixin, will be able to reach them.
<havenwood>
sigurding: which issue again?
sjeijk has joined #ruby
zeeraw has joined #ruby
<benzrf>
i e%amined ItSANgo
<benzrf>
*it
<benzrf>
god dammit ItSANgo
<sjeijk>
hi all can someone tell me how I can fix this error that Phusion Passenger throws at me?
<sjeijk>
You cannot specify the same gem twice with different version requirements. You specified: money (~> 5.0.0) and money (~> 5.1.0) (Bundler::GemfileError)
chiel_ has quit [Client Quit]
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sk87 has joined #ruby
<sjeijk>
I am not sure where i need to start looking
<mallu>
hi, I have x=4.0.0 and I'm splitting x.split('.').first.to_i wich gives me 4. How do I call the second in the array which is 0?
sigurding_ has joined #ruby
zachallett has quit [Remote host closed the connection]
sigurding has quit [Read error: Connection reset by peer]
<banister>
abdulsattar that's just a specific case, Symbol#call is more genearl
foredoomed has quit [Ping timeout: 240 seconds]
ohwhoa has quit [Quit: woah!]
<banister>
abdulsattar it's a generalization of Symbol#to_proc to multiple arguments
claymore has joined #ruby
sterlingcalder has joined #ruby
samuel02 has quit []
<benzrf>
wait whoa u created pry?
<benzrf>
O:
<benzrf>
cool beans
crystal77 has quit [Client Quit]
<benzrf>
here is a suggestion: can you make some way of easily distinguishing between commands and code
xcv has quit [Remote host closed the connection]
<benzrf>
for example if I do 'exit if done'
<benzrf>
pry misreads that
<benzrf>
:v
xcv has joined #ruby
<banister>
benzrf yeah i know, we need something more intelligent there. However, you can force a command prefix which might be enough for you, Pry.config.command_prefix = "%"
<banister>
then you have to do: %exit to run the pry command
<banister>
'exit' by itself will just run the method
<sjeijk>
abdulsattar i just deleted 5.1.0 since i have 1.9.3p installed
grvgr has joined #ruby
<havenwood>
lessless: same as `&:add.call(5, 6)`
zeeraw has joined #ruby
TheCleanGame has left #ruby [#ruby]
bradhe has quit [Ping timeout: 240 seconds]
<abdulsattar>
sjeijk: if you delete one, you get another error, right?
dkamioka_ has joined #ruby
<sjeijk>
well i can install it
<sjeijk>
but then i get another error indeed
<shevy>
workmad3 apeiros once said that matz said the proper way to ask the question would be singular, to the object, as in "object, do you exist?" "file, do you exist?"; in written english, "if file exists" would be correct, but that would be asking the wrong question to the given object
<havenwood>
abdulsattar: if you ever return `nil` from `cmd` something is terribly awry
<havenwood>
abdulsattar: `cmd` → string
danshultz has joined #ruby
xuisce has joined #ruby
<havenwood>
abdulsattar: All living Rubies ship with default gems.
xuisce has quit [Client Quit]
<havenwood>
abdulsattar: gems which `gem uninstall --all` does not uninstall
smathieu has quit [Remote host closed the connection]
<abdulsattar>
abdulsattar: I am returning nothing, it's just that `gem list` returns nil.
<abdulsattar>
sjeijk: not that line
m4n1f3st0 has joined #ruby
DrShoggoth has quit [Quit: Leaving]
dweeb_ has quit [Quit: Computer has gone to sleep.]
TMM has quit [Quit: Ex-Chat]
jmpf has joined #ruby
smathieu has joined #ruby
xcv_ has joined #ruby
<abdulsattar>
require 'redmine_contacts/liquid/liquid' if `gem list`.match('liquid') # this one
razibog1 has quit [Quit: Leaving.]
Hanmac has joined #ruby
<abdulsattar>
I downloaded it from the link yo ugave me
kevinykchan has joined #ruby
<abdulsattar>
*you gave
ichistmeinname has quit [Read error: Operation timed out]
f0ster_ has joined #ruby
YamakasY has quit [Ping timeout: 255 seconds]
<f0ster_>
Hello everyone
<havenwood>
hi
sdouglas has quit [Remote host closed the connection]
ga1j1n has quit [Remote host closed the connection]
<sigurding>
havenwood: I am trying 2.0 currently
Hanmac1 has quit [Ping timeout: 240 seconds]
<havenwood>
abdulsattar: shelling out with backticks doesn't return nil ever, i'm really confused what you mean
jlast has joined #ruby
sambao21 has joined #ruby
<sigurding>
but I am not sure why this is so buggy, and difficult to debug
<sjeijk>
<3 abdulsattar !!!
* havenwood
is just confused today. So sad.
sdouglas has joined #ruby
ga1j1n has joined #ruby
<sigurding>
what does this segmentation error mean?
_Andres has joined #ruby
hamakn has quit [Remote host closed the connection]
<abdulsattar>
sjeijk: haha, awesome
<sjeijk>
thank you so much!!! abdulsattar
gaussblurinc has quit [Quit: Leaving.]
ga1j1n has quit [Remote host closed the connection]
<abdulsattar>
havenwood: see that was the error
<abdulsattar>
it was returning nil
ga1j1n has joined #ruby
andrewlio has quit [Remote host closed the connection]
<sjeijk>
I will make a bug for the guys that wrote this plugin
Tomasso has joined #ruby
xcv has quit [Ping timeout: 240 seconds]
ndrei has quit [Ping timeout: 240 seconds]
<shevy>
you will make a bug?
<sjeijk>
report
<shevy>
I am gonna add some bugs too!
sdouglas_ has joined #ruby
<sjeijk>
:p
<shevy>
;-)
<abdulsattar>
sjeijk: I don't think it's the guy's fault
<f0ster_>
im tasked with building a new restful API, and a cms that admins can use to manage the content/data. I th ink rails makes sense for the cms part, but what do you all think aboiut the API piece? is rails overkill? shouldnt I have some shared repository code in both projcets ? I know "the rails way" doesnt really use the repository method, just looking for tips on how to architect this perhaps, with TDD too
<havenwood>
abdulsattar: oh, ``gem list`.match('liquid')`, gotcha - so just no #match
m4n1f3st0 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Asitha has quit [Ping timeout: 264 seconds]
Cornflake is now known as Asitha
bricker_ is now known as bricker`work
_bart has joined #ruby
mansi_ has quit [Remote host closed the connection]
bricker has quit [Disconnected by services]
bricker`work is now known as bricker
npearson has quit [Ping timeout: 240 seconds]
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
browndawg has quit [Quit: Leaving.]
Kilo`byte has quit [Max SendQ exceeded]
Hanmac has quit [Ping timeout: 240 seconds]
claymore has quit [Ping timeout: 240 seconds]
afex has joined #ruby
jack_rabbit has quit [Ping timeout: 255 seconds]
Kilo`byte has joined #ruby
jonno11 has joined #ruby
klaut has joined #ruby
sailias has quit [Ping timeout: 240 seconds]
fieldfirst has joined #ruby
jmpf has quit [Quit: leaving]
francisfish has quit [Remote host closed the connection]
claymore has joined #ruby
francisfish has joined #ruby
bitcycle has joined #ruby
klaut has quit [Read error: No route to host]
SilkFox has quit [Ping timeout: 252 seconds]
klaut has joined #ruby
sigurding has joined #ruby
sailias has joined #ruby
<Prometheian>
I'm using ruby/capybara/cucumber to write a regression test (new to Ruby so taking baby steps). In my feature file I have "Given I log in as admin" and I'm trying to get that in my ruby file, but I can't seem to get it to catch it. "Given (^/I log in as (.*)$/) do |user|". Anyone know what my regex is doing wrong?
sterlingcalder has joined #ruby
Spami_ has quit [Quit: Leaving]
mansi_ has joined #ruby
Spami_ has joined #ruby
dkamioka has quit [Remote host closed the connection]
klaut has quit [Remote host closed the connection]
<bitcycle>
[rvm-related] Hey all. Can someone tell me how bad will it be if I accidentally deleted my global gemset?
<apeiros>
`Given /^I log in as (.*)$/ do`
smathieu has quit [Remote host closed the connection]
<benzrf>
bitcycle: is this a 'hypothetical question'
<apeiros>
bitcycle: horrible - earth will stop moving. #rvm is usually helpful.
benatkin has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
smathieu has joined #ruby
<bitcycle>
benzrf: not hypothetical. lol.
<bitcycle>
benzrf: I recreated it, so I think I'm ok, but I figured that I would ask.
<Prometheian>
apeiros: did not fix :s
<bitcycle>
apeiros: I also asked there, but there's far fewer folks and activity on that channel.
RaCx has quit [Ping timeout: 240 seconds]
Advocation has quit [Quit: Advocation]
hobodave has quit [Read error: Connection reset by peer]
Advocation has joined #ruby
francisfish has quit [Ping timeout: 240 seconds]
hobodave has joined #ruby
Zespre has quit [Quit: leaving]
<apeiros>
bitcycle: if you cross post, *tell so*
axsuul has joined #ruby
<bitcycle>
apeiros: my bad.
RaCx has joined #ruby
Advocation has quit [Client Quit]
Zespre has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
x1337807x has joined #ruby
sigurding has quit [Quit: sigurding]
<apeiros>
Prometheian: "did not fix" is not a problem description.
smathieu has quit [Ping timeout: 240 seconds]
benatkin has joined #ruby
deadlock has quit [Read error: Connection reset by peer]
larissa has joined #ruby
<Prometheian>
Okay. I tried using your line but it didn't not cause it to pick up admin as input
jlast has quit [Remote host closed the connection]
<Prometheian>
I believe that only the (.*) needs to be changed but I'm not sure in exactly what way.
<apeiros>
Prometheian: still very vague and impossible to tell a) what exactly happened, b) what exactly you did
mercwithamouth has quit [Ping timeout: 252 seconds]
RaCx has quit [Remote host closed the connection]
<apeiros>
I think you need to drop the anchors. cucumbers examples don't use them.
RaCx has joined #ruby
smathieu has joined #ruby
rails426 has joined #ruby
<bitcycle>
apeiros: still no response on #rvm ... arg.
<apeiros>
bitcycle: in the worst case, `rvm implode` and reinstall all new
<apeiros>
but I'm pretty sure there is a less painful way
RaCx has quit [Remote host closed the connection]
jlast has joined #ruby
byprdct has joined #ruby
gigetoo has quit [Remote host closed the connection]
<bitcycle>
apeiros: thanks!
sambao21 has joined #ruby
dkamioka has joined #ruby
<mordocai>
Anyone know of a git API gem that has proper submodule support? It looks like ruby-git does with https://github.com/schacon/ruby-git/pull/19 but that pull request is 3 years old.
<apeiros>
"its more readable for people who don't know ruby" is a bad argument IMO
RaCx_ has joined #ruby
stardiviner has joined #ruby
stardiviner has quit [Changing host]
stardiviner has joined #ruby
<phat4life>
not reallyu
<shevy>
zacmc kraken was more readable!
<phat4life>
its valid syntax
rootshift has joined #ruby
<apeiros>
don't write code for people who don't know the language you write the code in. except if you're writing a book teaching it.
<shevy>
'OPEN DOOR'
lolmaus_ has joined #ruby
<shevy>
my code teaches people
<apeiros>
phat4life: it's still silly.
<phat4life>
let me re-iterate: its valid syntax
<apeiros>
phat4life: you don't write fortran style in C because some fortran people might read it.
<shevy>
ewwww fortran
<shevy>
program hello
RaCx_ has quit [Remote host closed the connection]
<shevy>
print *, "Hello World!"
x1337807x has joined #ruby
<shevy>
end program hello
<shevy>
hmm
<shevy>
that almost looks like ruby actually :)
RaCx has joined #ruby
<apeiros>
phat4life: the &block there is unecessary btw. - it even makes ruby do more work for nothing (forces it to convert the block to a proc, which you never use)
<phat4life>
i want to pass a proc eventually though
<phat4life>
but good to know
Xiti` has quit [Quit: Leaving]
<shevy>
hehe
carraroj has quit [Read error: Operation timed out]
<shevy>
eventually
<shevy>
like when
<apeiros>
phat4life: if you pass a proc, then it won't even work with the &
<shevy>
in 10 years? :)
<benzrf>
B^U
<phat4life>
ok, so if i pass a proc, i don't need &
Xiti has joined #ruby
<apeiros>
&arg is only to capture block args, not ordinary args.
<shevy>
I'd like to have a proc that would capture the whole snapshot of ruby
<shevy>
benzrf how about that ^^^ like a smalltalk image
lolmaus has quit [Ping timeout: 252 seconds]
<phat4life>
its reasons like this i prefer c
<apeiros>
phat4life: I'd convert the proc to a block on the caller side.
<benzrf>
shevy: pfft
<shevy>
cool, C and ruby have like the same niche
<phat4life>
exactly
ga1j1n has quit [Remote host closed the connection]
<shevy>
I am gonna write my apps in C-on-Cails next
fannye has quit [Read error: Connection reset by peer]
ga1j1n has joined #ruby
<phat4life>
&arg is only to capture block args, not ordinary args. can you elaborate on this
bradhe has quit [Remote host closed the connection]
Spami_ has quit [Quit: This computer has gone to sleep]
JBlazeCoder21 has joined #ruby
sdouglas has joined #ruby
RaCx has quit [Read error: Connection reset by peer]
<benzrf>
i prefer groovy on grails
<benzrf>
it should be grooby
<phat4life>
I know that in minit test, it uses the block to defined the test methods dynamically
<shevy>
phat4life I think it has to do with finding valid syntax
<shevy>
the &foo only appears as a regular argument
<phat4life>
what i had was valid syntax though, which is what is confusing
failshel_ has quit [Remote host closed the connection]
RaCx has joined #ruby
RaCx has quit [Remote host closed the connection]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
<phat4life>
shevy so i can do stuff with &foo
<phat4life>
like
SilkFox has quit [Ping timeout: 240 seconds]
Spami_ has joined #ruby
failshell has joined #ruby
hrs has joined #ruby
<apeiros>
phat4life: def foo(arg); end; foo { 1+1 } # <-- this will raise, the block is not a normal arg, it is not assigned to `arg`
jonno11 has joined #ruby
<shevy>
I don't like the &foo notation myself, when I see it in something like: def foo(a,b,c,d,e,&f) it confuses me on a first glance
Spami has quit [Read error: Connection reset by peer]
SonicX has joined #ruby
<apeiros>
phat4life: def foo(&arg); end; foo { 1+1 } # <-- this will work, it lets ruby convert the block (which is not an object) into a Proc instance (which is an object) and assign it to the variable `arg`
ga1j1n has quit [Ping timeout: 252 seconds]
burgess|vayo has joined #ruby
<shevy>
and when you pass a {} to that as well, my confusion intensifies
Spami has joined #ruby
BraddPitt has quit [Read error: Connection reset by peer]
davedev24 has quit [Read error: Connection reset by peer]
Spami_ has quit [Client Quit]
BraddPitt has joined #ruby
<apeiros>
if you use `yield` and `block_given?`, you don't need the &arg to be present. you don't need to somehow tell ruby that the method takes a block.
davedev24 has joined #ruby
<shevy>
I like yield and block_given? a lot
aryaching has quit [Ping timeout: 240 seconds]
<benzrf>
block_given? is 2magic
<benzrf>
its so perlsyntax
<benzrf>
*perl
<shevy>
nah it is ok, only a trailing ? character benzrf
<apeiros>
the &arg syntax is useful if you want to pass the block on or want to store it to execute later. else it's not needed.
<apeiros>
phat4life: enough elaboration?
<phat4life>
apeiros: yes
sailias has quit [Ping timeout: 240 seconds]
bluOxigen has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Advocation has joined #ruby
<phat4life>
apeiros: i know in minitest, the test method takes a &arg
<shevy>
people when seeing & can get confused... newcomer question: "What means: ["abc\n","defh\n"].map(&:chomp) ?")
<phat4life>
and it defines a method dynamically
<phat4life>
using that block
burgess|vayo has quit [Client Quit]
aryaching has joined #ruby
<havenwood>
shevy: $: signifies that the chomp is angry!
<apeiros>
phat4life: yes, that's the "if you want to pass the block on" part
<phat4life>
well in other languages & is a reference, like a pointer
blueOxigen has quit [Ping timeout: 240 seconds]
jack_rabbit has joined #ruby
<shevy>
havenwood that is cool but where is $: ? :-)
senayar has quit [Remote host closed the connection]
danshultz has joined #ruby
_Andres has quit [Read error: Connection reset by peer]
senayar has joined #ruby
timonv has quit [Remote host closed the connection]
dkamioka has quit [Ping timeout: 240 seconds]
burgess|vayo has joined #ruby
<shevy>
bricker yeah though I often use File.readlines; also, make sure you check whether the file exists, before trying to read it
sdouglas has quit [Remote host closed the connection]
kevinykchan has joined #ruby
freezey has joined #ruby
senayar has quit [Read error: Operation timed out]
ahmedelgabri has joined #ruby
ctp has joined #ruby
ahmedelgabri has quit [Client Quit]
maximski has joined #ruby
sdouglas has joined #ruby
hiall has quit [Ping timeout: 240 seconds]
Advocation has quit [Quit: Advocation]
andy__ has quit [Read error: Connection reset by peer]
Vovko has quit [Remote host closed the connection]
michaeldeol has joined #ruby
andy__ has joined #ruby
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kevinykchan has quit [Ping timeout: 240 seconds]
andy__ has quit [Read error: Connection reset by peer]
<JBlazeCoder21>
does anyone know how to retrieve a password on limechat?
sailias has joined #ruby
Vovko has joined #ruby
timonv has joined #ruby
sdouglas has quit [Remote host closed the connection]
andy__ has joined #ruby
bean has joined #ruby
<phat4life>
is yield a function
<phat4life>
or is it more like a return or goto
<JBlazeCoder21>
I am trying to add a channel, and its asking for a paswword. I tried going to the limechat website and there is option to resend this info.
andy__ has quit [Read error: Connection reset by peer]
nolic_ has quit [Read error: Connection reset by peer]
andy__ has joined #ruby
ktosiek has joined #ruby
danshultz has quit [Ping timeout: 240 seconds]
andy__ has quit [Read error: Connection reset by peer]
byprdct has joined #ruby
RaCx has joined #ruby
RaCx has quit [Remote host closed the connection]
andy___ has joined #ruby
bradhe has joined #ruby
andy___ is now known as Guest99705
<bricker>
shevy: thanks!
lampe2 has joined #ruby
<lampe2>
hey got a problem i got a hash with multiple values and every value has a name these names are sometimes numbers and sometimes letters now i want to sort them that i first see the letters and then the numbers. can someone give me a hint how to do that?
npearson has joined #ruby
danshultz has joined #ruby
sdelmore1 has joined #ruby
CaptainJet has joined #ruby
senayar has joined #ruby
IceDragon has joined #ruby
RaCx has joined #ruby
newbie1r has joined #ruby
<sdelmore1>
I have a bit of ruby code I don't understand, hoping someone can explain it to me….
atmosx has joined #ruby
<sdelmore1>
if I do 10.class I get fixnum, if I to 10.to_time I get 10 years, if I do 10.to_time.class I get float.
Vovko has quit [Remote host closed the connection]
<phat4life>
sdelmore1: post a gist
<sdelmore1>
That makes no sense to me. How is "10 years" a float?
<sdelmore1>
And wouldn't I expect .to_time to return a class time?
yarou has joined #ruby
<centrx>
sdelmore1, You must be using some library that has Fixnum#to_time ?
<centrx>
sdelmore1, This method is not in core Ruby
<sdelmore1>
Might be a rails thing?
Hanmac has joined #ruby
Lewix has quit [Remote host closed the connection]
senayar has quit [Read error: Operation timed out]
workmad3 has quit [Ping timeout: 240 seconds]
<centrx>
sdelmore1, Yes, if you are using ActiveSupport. to_time probably changes it to an ActiveSupport::Duration, which often pretends to act like a number
<centrx>
That is a possibility
danshultz has quit [Ping timeout: 240 seconds]
starfox21 has quit [Quit: starfox21]
<sdelmore1>
Wow. That appears to be what is happening. So you're saying I have an ActiveSupport::Duration that is lying to me and saying it is a float?
Hanmac1 has quit [Ping timeout: 240 seconds]
<centrx>
sdelmore1, On the other hand, my Rails installation does not have Fixnum#to_time either, so it must be something else
<centrx>
sdelmore1, NoMethodError: undefined method `to_time' for 10:Fixnum
obs has quit [Quit: Saliendo]
Merks has quit [Remote host closed the connection]
<shevy>
sdelmore1 never trust gems that modify core things of ruby completely
<sdelmore1>
Ahh…I see mine does the same actually. I was pasting in an example of what I thought was happening, but this isn't quite right. This helps, thank
circuit has quit [Quit: leaving]
RaCx has quit [Ping timeout: 252 seconds]
<sdelmore1>
Thank you.
alvaro_o has joined #ruby
pu22l3r has quit [Remote host closed the connection]
mansi_ has quit [Remote host closed the connection]
rootshift has joined #ruby
ndrei has joined #ruby
ndrei_ has joined #ruby
mansi has joined #ruby
mansi has quit [Read error: Connection reset by peer]
WormDrink has joined #ruby
mrnugget has quit [Quit: mrnugget]
mansi has joined #ruby
lw has joined #ruby
<phat4life>
would it be corrent to say that ruby is dynamically typed?
rayners has quit [Remote host closed the connection]
ga1j1n has joined #ruby
lw has quit [Client Quit]
<centrx>
phat4life, Yes
nouitfvf has quit [Ping timeout: 252 seconds]
FL1SK has joined #ruby
_bart has quit [Ping timeout: 240 seconds]
axsuul has joined #ruby
nouitfvf has joined #ruby
tvw has quit [Ping timeout: 240 seconds]
<shevy>
what means dynamically typed
Atw has joined #ruby
<pipework>
shevy: is when you get drunk and go on IRC.
<shevy>
lol
<atmosx>
hey shevy what's up
<shevy>
hey atmosx!
<shevy>
atmosx dunno... I am on ruby 2.1.1 suddenly!
<atmosx>
shevy: hahah awesome
<pipework>
phat4life: Ruby doesn't have a compile time that's different from runtime, so...
saarinen has joined #ruby
<pipework>
To the user, it's the same thing.
m4n1f3st0 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
burgess|vayo has quit [Quit: ^zzz]
<shevy>
atmosx haha yeah, tenderlove had kept an old copy of syck as a gem, I installed it and it worked. now I am going through a lot of old scripts and fix them so that 2.1.1 no longer complains or errors about them
yalue has quit [Quit: Leaving]
WormDrink has quit [Read error: Connection reset by peer]
<atmosx>
shevy: cool
lw has joined #ruby
<shevy>
menu.rb:1179: warning: duplicated when clause is ignored
<shevy>
menu.rb:693: warning: duplicated when clause is ignored
<shevy>
myriads of these warnings
Hanmac1 has joined #ruby
_Andres has joined #ruby
andrewlio has quit [Quit: Leaving.]
x1337807x has joined #ruby
freezey has quit [Remote host closed the connection]
Vovko has joined #ruby
SonicX has quit [Remote host closed the connection]
sdouglas has quit [Remote host closed the connection]
<pipework>
shevy: That's silly, you can never have too many whens.
Hanmac has quit [Ping timeout: 240 seconds]
<shevy>
I know! but ruby complains
b00stfr3ak has quit [Ping timeout: 240 seconds]
Ariadeno has joined #ruby
m4n1f3st0 has joined #ruby
<pipework>
silly rubby
michael_lee has quit [Read error: Connection reset by peer]
<shevy>
I hate duplicates in case when menus, it is so boring to fix these warnings :(
<BeingUntoDeath>
hmmmmmmmmmmm... thank you very much.
lolmaus_ has quit [Remote host closed the connection]
pushpak has joined #ruby
dkamioka_ has quit [Read error: Connection reset by peer]
<snickers>
I need help with regular expresion, let say that I have string like that 'aaaaaaaaabaaaaaabpaaaaabdaa' and I want to change evryone 'b' to 'bd' but I need leve 'bd' untached. I want to return something like that 'aaaaaaaaabdaaaaaabdpaaaaabdaa'
dkamioka has joined #ruby
Vovko has quit [Remote host closed the connection]
freerobby has joined #ruby
k0m has joined #ruby
ndrei_ has quit [Ping timeout: 240 seconds]
_Andres has quit [Read error: Connection reset by peer]
ndrei has quit [Ping timeout: 252 seconds]
benzrf|offline is now known as benzrf
Sleepee has quit [Quit: Leaving]
<dseitz>
Look up gsub
<phat4life>
use sed jk
yfeldblum has quit [Ping timeout: 240 seconds]
<benzrf>
hey yo
<snickers>
dseitz: yes, but i don't know how to proper expresion for gsub
yfeldblum has joined #ruby
WormDrink has joined #ruby
kevinykchan has joined #ruby
<dseitz>
It accepts Regexp or just a string
Rollabunna has quit [Remote host closed the connection]
<shevy>
dseitz see there is no magic to it, I am clueless about regexes, I throw at rubular until something useful comes out, if that still does not work, I ask RubyPanther
bradhe_ has joined #ruby
<lampe2>
hey got a problem i got a hash with multiple values and every value has a name these names are sometimes numbers and sometimes letters now i want to sort them that i first see the letters and then the numbers. can someone give me a hint how to do that?
<benzrf>
lampe2: please, use some punctuation
bradhe has quit [Read error: Connection reset by peer]
<benzrf>
i cannot understand what you want <_<'
cescalante is now known as ce_afk
<dseitz>
Ahhh well regular expressions can get detailed that is for sure. I usually spend some time with rubular and the pickaxe guide lol
<RubyPanther>
peeking ahead is simpler than all that other stuff
<benzrf>
=p
<lampe2>
I hava a ActiveRecord Collection [<Object name: 1>, <Object name: 10> <Object name: "bla">] now i want to sort that collection. First the "bla" and then the integers orderd asc.
freezey has joined #ruby
mjs2600 has joined #ruby
<benzrf>
RubyPanther: how about
rouby has joined #ruby
hrs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sailias has quit [Quit: Leaving.]
mois3x has joined #ruby
<benzrf>
/b([^d])/, d$1
rouby has quit [Client Quit]
<banister>
benzrf too complicated, but cool :)
<RubyPanther>
ugh, now you have to save something and put it back. that is a lot more work than checking and not saving
<benzrf>
how is it too complicated?
<benzrf>
:I
axsuul has quit [Ping timeout: 240 seconds]
claymore has quit [Ping timeout: 240 seconds]
werdnativ has quit [Ping timeout: 240 seconds]
werdnativ_ is now known as werdnativ
<banister>
benzrf method_missing
skaflem has quit [Quit: Leaving]
rootshift has joined #ruby
<RubyPanther>
well, the least complicated is better than the more complicated, not that something is too complicated
claymore has joined #ruby
fijimunkii has joined #ruby
aaronmcadam has joined #ruby
<benzrf>
banister: how else would you do it o.O
<RubyPanther>
but saving state vs not saving state, if you don't actually need the state, you probably don't want it. Usually I love saving state.
hrs has joined #ruby
<banister>
benzrf i wouldn't, if you have to resort to that, it's not good
timonv has quit [Remote host closed the connection]
k0m has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
sdouglas has joined #ruby
postmodern has joined #ruby
bradhe_ has joined #ruby
Ariadeno has quit [Read error: Connection reset by peer]
sterlingcalder has quit [Remote host closed the connection]
Ariadeno has joined #ruby
jack_rabbit has quit [Ping timeout: 240 seconds]
toastynerd has joined #ruby
zigomir_ has quit [Ping timeout: 240 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
duggiefresh has quit []
SonicX_ has joined #ruby
<shevy>
certainty wow
SonicX has quit [Ping timeout: 240 seconds]
<shevy>
certainty what is that
sterlingcalder has joined #ruby
timonv has quit [Ping timeout: 246 seconds]
benzrf|offline is now known as benzrf
shadoi1 has joined #ruby
newbie1r has joined #ruby
acrussell has quit [Quit: Leaving.]
larissa has quit [Quit: Leaving]
sterlingcalder has quit [Read error: Connection reset by peer]
codezomb has joined #ruby
isbadawi has joined #ruby
<benzrf>
im baaack
sterlingcalder has joined #ruby
<certainty>
shevy: just something i played around with. The main idea was to chain calls to procedures with | %w[foo Bar baz].map(&:downcase | :reverse | :capitalize) etc.
yubrew has quit []
camidoo has joined #ruby
<benzrf>
hows it goin ruby peeples
<shevy>
certainty ah but this is not regular ruby or?
<certainty>
shevy: nope
<slash_kick>
whew
<shevy>
k, I am relieved now, continue with your experiments :D
hfp`away is now known as hfp
<slash_kick>
shevy: scary huh?
SonicX_ has quit [Remote host closed the connection]
<certainty>
shevy: well it is regular ruby ... a library :p
timonv has joined #ruby
polydius has quit [Quit: EOF]
<benzrf>
Hanmac: mine is more versatile
<benzrf>
:y
bradhe_ has quit [Remote host closed the connection]
<hfp>
Hi! Is there a way to write more concise if statements with multiple conditions? Something like `if a, b, c puts 'hi'` rather than `if a && if b && if c puts 'hi'` ?
<dstynchula>
case?
yubrew has joined #ruby
<shevy>
slash_kick as long as it is some secret tiny little evil library that never gets used by anyone else, I don't mind
<shevy>
:P
<slash_kick>
hfp: Array#all?()
<hfp>
dstynchula: Testing if a, b, and c are set
<benzrf>
hmm looks like ampex is basically the same thing
<benzrf>
that i made
dkamioka_ has joined #ruby
<shevy>
hfp, yes, case when menu: x = 'foo'; case x; when /fo/; puts 'hi there'; end
<dstynchula>
what he said. :)
<shevy>
when 'a','b','c'
Adrao has joined #ruby
sterling_ has joined #ruby
<shevy>
regex // works too of course
<benzrf>
hfp: yep, you want Array#all?
freerobby has joined #ruby
sterlingcalder has quit [Read error: Connection reset by peer]
<benzrf>
it appears to be basically the same thing i sent you
<banister>
benzrf baby doesnt like it
sterlingcalder has joined #ruby
isbadawi has left #ruby [#ruby]
sterlingcalder has quit [Remote host closed the connection]
<certainty>
anaphoric
sterling_ has quit [Read error: Connection reset by peer]
ij has quit [Ping timeout: 240 seconds]
kevinykchan has quit [Ping timeout: 240 seconds]
yubrew has quit [Remote host closed the connection]
greenrose1 has quit []
SonicX has quit [Read error: Connection reset by peer]
isbadawi has joined #ruby
smathieu has quit [Remote host closed the connection]
SilkFox has joined #ruby
monkegjinni has quit [Ping timeout: 265 seconds]
<benzrf>
certainty: what's anaphoric?
ikawnoclast has quit [Remote host closed the connection]
shadoi1 has quit [Read error: Connection reset by peer]
<benzrf>
*what is it that is anaphoric
smathieu has joined #ruby
abdulsattar has quit [Ping timeout: 240 seconds]
elaptics`away is now known as elaptics
aspires has quit []
shadoi1 has joined #ruby
aspires has joined #ruby
jackneill has quit [Ping timeout: 255 seconds]
werdnativ has joined #ruby
<shevy>
perhaps the opposite of euphoric
aspires has quit [Client Quit]
x1337807x has joined #ruby
<shevy>
hmm nope
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andy___ has joined #ruby
<shevy>
the dictionary says it is back referring
aspires has joined #ruby
bean has joined #ruby
andy___ is now known as Guest27338
parus has quit [Read error: Operation timed out]
parus has joined #ruby
WormDrink has quit [Ping timeout: 252 seconds]
tomshafer has joined #ruby
thesheff17_ has joined #ruby
werdnativ_ has joined #ruby
aspires_ has joined #ruby
npearson has quit [Remote host closed the connection]
phantomtiger has quit [Quit: phantomtiger]
npearson has joined #ruby
smathieu_ has joined #ruby
jayne_ has joined #ruby
timonv has quit [Remote host closed the connection]
<certainty>
benzrf: the ampex library ... [1,2,3].map &(X + 3)
<RubyPanther>
shevy: it was: 'aaaaaaaaabaaaaaabpaaaaabdaa'.gsub(/b(?!d)/,'bd')
<benzrf>
certainty: yessss i know >_<
<benzrf>
it is the same as mine =p
<benzrf>
except with a constant instead of a method
<certainty>
(a-if "foo" (string-reverse it)) ....
<shevy>
RubyPanther haha cool
<benzrf>
wot
<shevy>
damn
peckerman has joined #ruby
elaptics is now known as elaptics`away
<shevy>
certainty comes from the lisp base
<shevy>
they try to take over ruby with ()
aspires has quit []
<shevy>
benzrf did you learn lisp?
<certainty>
aif is a classic anaphoric macros
bradhe has joined #ruby
<benzrf>
i know me some lisp
<benzrf>
certainty: ah i see
<benzrf>
wait
<benzrf>
maybe <_<
<benzrf>
what does it do precisely .-.
Guest27338 has quit [Remote host closed the connection]
<certainty>
it "injects" a binding ... *it* in this case
<benzrf>
oh, it just sets the var?
<benzrf>
like a single let?
<certainty>
benzrf: it binds the result of the condition to an identifier that is injected and can be used in the consequence clause
Czupa has quit [Remote host closed the connection]
WormDrink has joined #ruby
WormDrink has joined #ruby
WormDrink has quit [Changing host]
npearson has quit [Ping timeout: 264 seconds]
<benzrf>
ooohhhh
npearson has joined #ruby
<benzrf>
nifty: .
<benzrf>
oops
<nifty>
lol
<certainty>
benzrf: yeah, not so hard in CL since this is just a common macro bug turned into a feature. Interesting to implement in scheme as many schemes enforce hygiene
ndrei has quit [Read error: Operation timed out]
ndrei_ has quit [Write error: Broken pipe]
juarlex has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
isbadawi has left #ruby [#ruby]
dkamioka_ has quit [Remote host closed the connection]
jayne has quit [Read error: Connection reset by peer]
camt has quit [Read error: Connection reset by peer]
smathieu has quit [Write error: Broken pipe]
werdnativ has quit [Ping timeout: 442 seconds]
werdnativ_ is now known as werdnativ
Sthebig has quit [Ping timeout: 442 seconds]
Kovensky has quit [Ping timeout: 442 seconds]
Lulzon has quit [Ping timeout: 442 seconds]
Guest30023 has quit [Ping timeout: 442 seconds]
sirecote has quit [Ping timeout: 442 seconds]
failshel_ has joined #ruby
grvgr has quit [Quit: grvgr]
Lulzon_ has joined #ruby
Sthebig has joined #ruby
Sthebig has quit [Changing host]
Sthebig has joined #ruby
Kovensky has joined #ruby
sirecote has joined #ruby
juarlex has joined #ruby
failshell has quit [Read error: Operation timed out]
sirecote is now known as Guest99008
<benzrf>
i wrote a toy lisp in haskell a little while BackEndCoder
<benzrf>
*back
ndrei has joined #ruby
ndrei_ has joined #ruby
<certainty>
benzrf: cool, an interpreter or a compiler?
bradhe_ has quit [Ping timeout: 258 seconds]
SCommette has quit [Quit: SCommette]
<benzrf>
interpreter, certainly
mansi has quit [Remote host closed the connection]
<benzrf>
do you think i have the patience or knowledge to make a compiler ;p
<benzrf>
it's raw AST walking, like old-style mri
<certainty>
benzrf: i'm working on a virtual machine for a scheme with immutable pairs in haskell. Basically as a toyproject to get better at haskell
mary5030 has quit [Remote host closed the connection]
mlpinit has quit [Remote host closed the connection]
mansi has joined #ruby
<RoryHughes>
Sinatra vs. Grape (or other options), which do people find the best and why
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
andy___ has joined #ruby
<hfp>
Could someone tell me what am I doing wrong there please: https://eval.in/120434 ? I guess it's from my each block... How am I supposed to write this then?
andy___ is now known as Guest23571
SCommette has joined #ruby
<razrunelord>
Hey guys, how do I create a cookie using ruby sockets alone?
glebm has quit [Remote host closed the connection]
k0m has joined #ruby
glebm has joined #ruby
JBlazeCoder21 has quit [Remote host closed the connection]
juarlex has quit [Remote host closed the connection]
<hfp>
I see, so == will only compare a single value with another one where === will return true if the value is within the range?
<hfp>
Sorry if I'm slow, I'm strating with Ruby
freerobby has joined #ruby
<hfp>
starting*
_Andres has quit [Ping timeout: 240 seconds]
<hfp>
Is === only used in case statements or do they have another use outside of them?
afex has joined #ruby
<benzrf>
hm?
<benzrf>
=== is supposed to be treating the lhs as a predicate and the rhs as a value to check
Skaag has joined #ruby
<benzrf>
as such it is used by case to check when clauses
<benzrf>
i.e.
<benzrf>
case foo
<benzrf>
when bar
<benzrf>
when baz
<benzrf>
is like
<benzrf>
if bar === foo
<benzrf>
elsif baz === foo
jayne_ is now known as jayne
rainmanjam has quit [Remote host closed the connection]
<hfp>
I don't get it :(
freerobby has quit [Ping timeout: 255 seconds]
sdouglas has quit [Remote host closed the connection]
JBreit has joined #ruby
<hfp>
is it reversed?
<hfp>
why not foo === bar and foo === baz?
<benzrf>
idk man
<benzrf>
oh wait derp
<benzrf>
because operators are methods on the left hand side
<benzrf>
and the functionality should differ between predicates
<benzrf>
therefore it should be a method on the predicate
razrunelord has quit [Remote host closed the connection]
<benzrf>
*the functionality should be up to the predicate, not the target
kevinykchan has joined #ruby
isbadawi has joined #ruby
Salve has quit [Remote host closed the connection]
Salve has joined #ruby
jackal_ has joined #ruby
<jackal_>
hey everyone
Ziarkaen has joined #ruby
<hfp>
If I remember that == if for any scenario and === is for case/when statements, am I good?
jackal_ is now known as Guest68877
<Guest68877>
im having a big problem getting rake to work in relation to db:migrate in rails, is this a good place to ask, if not could someone please point me to the appropiate channel?
Guest68877 is now known as allinthegoodoffu
<hfp>
I guess I'll get the subtleties when I'm further on the learning curve
<hfp>
if = is
<hfp>
Guest40652: #RubyOnRails
<allinthegoodoffu>
thanks
pel_daniel has joined #ruby
<allinthegoodoffu>
freenode?
<hfp>
Yes
funburn has quit [Quit: funburn]
NicholasFlamel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kevinykchan has quit [Ping timeout: 264 seconds]
pskosinski has joined #ruby
<benzrf>
hfp: == is for checking if two things are the same
<benzrf>
hfp: === is for checking if the left hand side 'describes' the right hand side
TheLarkInn1 has joined #ruby
<benzrf>
i.e. if lhs is a class
<benzrf>
is rhs an instance
<benzrf>
if it is a proc
<benzrf>
is the result tree when passed rhs
<benzrf>
if it is a range
<benzrf>
is rhs in it
<benzrf>
if its a regex
<benzrf>
does rhs match
<allinthegoodoffu>
wierd rubyonrails doesnt work
<benzrf>
try just rails
<hfp>
so === checks for type?
<allinthegoodoffu>
invite only
<benzrf>
no
<allinthegoodoffu>
grrrr
<benzrf>
wait, what?
<benzrf>
i just told you a bunch of examples o-O
<hfp>
allinthegoodoffu: #RubyOnRails on Freenode exists, I'm on there along with 414 other users
<allinthegoodoffu>
its not letting me join for some reason
mordocai` has joined #ruby
<hfp>
benzrf: Right, so /regex/ === regex will be false because the rhs is not a regex, is that correct?
xcv has joined #ruby
allinthegoodoffu is now known as jackalman
m8 has quit [Quit: Sto andando via]
dstynchu_ has joined #ruby
Ziarkaen` has joined #ruby
csq- has joined #ruby
Ziarkaen` has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
brianpWins_ has joined #ruby
mikecmpb_ has joined #ruby
quatron_ has joined #ruby
MindfulMonk_ has joined #ruby
jackalman has quit [Quit: Leaving]
fflush__ has joined #ruby
jackal__ has joined #ruby
shadoi2 has joined #ruby
<jackal__>
still cant join #RubyOnRails
mois3x_ has joined #ruby
b00stfr3ak has quit [Ping timeout: 255 seconds]
sumark_ has joined #ruby
<jackal__>
how do i identify with services?
<benzrf>
hfp: yeah
<benzrf>
wait wut
<benzrf>
hfp: no
<benzrf>
>> /fo+/ === 'fooooooo;
<eval-in>
benzrf => /tmp/execpad-33db10af7c4b/source-33db10af7c4b:2: unterminated string meets end of file ... (https://eval.in/120468)