apeiros_ changed the topic of #ruby to: Ruby 2.2.1; 2.1.5; 2.0.0-p643: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org, other public logging is prohibited
cjim has joined #ruby
RegulationD has quit [Remote host closed the connection]
SouL has quit [Ping timeout: 248 seconds]
nickjj has joined #ruby
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SouL has joined #ruby
mitchellhenke has quit [Client Quit]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd has quit [Remote host closed the connection]
Synthbread has joined #ruby
cjim has quit [Client Quit]
freerobby has quit [Quit: Leaving.]
doodlehaus has joined #ruby
fgo has quit [Ping timeout: 264 seconds]
AlphaTech has quit []
lidaaa has joined #ruby
caconym has joined #ruby
lys has quit [Quit: lys]
xymbol has quit [Quit: Be back later ...]
triple_b has joined #ruby
serivich has joined #ruby
dseitz has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
sankaber has joined #ruby
wallerdev has quit [Quit: wallerdev]
jeromelanteri has joined #ruby
SouL_ has joined #ruby
sivsushruth has joined #ruby
SouL has quit [Ping timeout: 250 seconds]
Cache_Money has quit [Quit: Cache_Money]
jack_rabbit has quit [Ping timeout: 265 seconds]
scottymeuk has joined #ruby
iliketurtles has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
pengin has quit [Remote host closed the connection]
SouL_ has quit [Ping timeout: 248 seconds]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sivsushruth has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sivsushruth has joined #ruby
zacts has joined #ruby
ghr has quit [Ping timeout: 246 seconds]
charliesome has joined #ruby
chipotle has quit [Quit: cheerio]
SouL has joined #ruby
starless has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
doodlehaus has quit [Remote host closed the connection]
pandaant has joined #ruby
graydot has quit [Quit: graydot]
airdisa has quit [Remote host closed the connection]
mitchellhenke has joined #ruby
airdisa has joined #ruby
kaleido has joined #ruby
kaleido has quit [Remote host closed the connection]
blackmesa has joined #ruby
jack_rabbit has joined #ruby
airdisa has quit [Ping timeout: 256 seconds]
sivsushruth has quit [Read error: Connection reset by peer]
dc has joined #ruby
SouL has quit [Ping timeout: 265 seconds]
valkyrka has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
Mia has quit [Write error: Connection reset by peer]
sivsushruth has joined #ruby
blackmes1 has quit [Ping timeout: 245 seconds]
Guest56982 has joined #ruby
Guest56982 has quit [Read error: Connection reset by peer]
fgo has joined #ruby
SouL has joined #ruby
Soda has quit [Remote host closed the connection]
cacocola has quit [Remote host closed the connection]
<eam> /win 2
marr has quit [Ping timeout: 264 seconds]
Guest56982 has joined #ruby
senayar has quit [Remote host closed the connection]
Guest56982 has quit [Read error: Connection reset by peer]
nym has quit [Quit: Connection closed for inactivity]
thinkswan has joined #ruby
cacocola has joined #ruby
Guest56982 has joined #ruby
Guest56982 has quit [Read error: Connection reset by peer]
sivsushruth has quit [Read error: Connection reset by peer]
_thinkswan has joined #ruby
cacocola has quit [Ping timeout: 252 seconds]
sivsushruth has joined #ruby
Guest56982 has joined #ruby
thinkswan has quit [Ping timeout: 272 seconds]
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jlast has quit [Remote host closed the connection]
SouL has quit [Ping timeout: 265 seconds]
Guest56982 has quit [Read error: Connection reset by peer]
<shevy> /linux 3
SouL has joined #ruby
kblake has joined #ruby
bricker has quit [Quit: leaving]
Vivex_ has quit [Read error: Connection reset by peer]
SouL_ has joined #ruby
dc has quit [Remote host closed the connection]
splud has quit [Quit: splud]
rokob has joined #ruby
SouL has quit [Ping timeout: 245 seconds]
merqlove has joined #ruby
Purrkode has joined #ruby
kblake has quit [Ping timeout: 246 seconds]
Zai00 has quit [Quit: Zai00]
martinbmadsen has quit [Ping timeout: 246 seconds]
Guest56982 has joined #ruby
wallerdev has joined #ruby
mitchellhenke has quit [Quit: Computer has gone to sleep.]
mikecmpbll has quit [Quit: i've nodded off.]
plashchynski has quit [Quit: plashchynski]
dorei has quit [Ping timeout: 252 seconds]
yqt has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
Guest56982 has quit [Read error: Connection reset by peer]
SouL_ has quit [Ping timeout: 248 seconds]
rokob has quit [Ping timeout: 246 seconds]
plashchynski has joined #ruby
Guest56982 has joined #ruby
overcrush has quit [Remote host closed the connection]
enebo has joined #ruby
Guest56982 has quit [Read error: Connection reset by peer]
Synthbread has quit [Remote host closed the connection]
<eam> shevy: o m g :(
<jhass> DeBot: !hangman ruby
<DeBot> ␣␣␣␣␣␣␣␣␣␣␣␣␣ [] 0/12
<jhass> DeBot: #:
<DeBot> ␣␣␣␣::␣␣␣␣␣␣␣ [#] 1/12
RegulationD has joined #ruby
<jhass> DeBot: _
<DeBot> ␣␣␣␣::␣␣␣␣␣␣␣ [#_] 2/12
fgo has quit [Ping timeout: 245 seconds]
SouL has joined #ruby
mistergibson has joined #ruby
<apeiros> DeBot: n
<DeBot> ␣␣␣␣::␣␣␣␣␣␣␣ [#_n] 3/12
<apeiros> DeBot: e
Guest56982 has joined #ruby
<DeBot> ␣␣␣␣::␣␣␣␣e␣␣ [#_n] 3/12
<apeiros> DeBot: srt
<DeBot> ␣␣␣␣::␣Stre␣␣ [#_n] 3/12
Guest56982 has quit [Read error: Connection reset by peer]
mistergibson has quit [Client Quit]
Tingo1983 has joined #ruby
iliketurtles has joined #ruby
<jhass> oO
<apeiros> DeBot: ao
<DeBot> ␣␣␣␣::␣Strea␣ [#_no] 4/12
<apeiros> DeBot: m
<DeBot> ␣␣␣␣::␣Stream [#_no] 4/12
<apeiros> DeBot: g
<DeBot> ␣␣␣␣::␣Stream [#_nog] 5/12
<jhass> ah, right, I forgot it does just classes/modules too :P
mistergibson has joined #ruby
<jhass> DeBot: u
<DeBot> ␣␣␣␣::␣Stream [#_nogu] 6/12
<apeiros> DeBot: i
<DeBot> ␣␣i␣::␣Stream [#_nogu] 6/12
<apeiros> DeBot: z
<DeBot> Z␣i␣::ZStream [#_nogu] 6/12
<apeiros> DeBot: lb
valkyrka has quit [Ping timeout: 256 seconds]
<DeBot> Zlib::ZStream [#_nogu] 6/12 You won!
<jhass> \o/
Guest56982 has joined #ruby
iliketurtles has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 246 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
<apeiros> time to sleep. worked a bit on the FAQ. it will probably still look like shit by tomorrow evening. but hey - like amy says: just f'ing ship it :D
caconym has left #ruby [#ruby]
<jhass> yeah, this is open source, right? make it so bad that people can't resist but fix it \o/
agrinb has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> heh
<apeiros> right, I need that "fork me on github" badge
agrinb has joined #ruby
<apeiros> dunno why, but never really liked that badge :-/
jenrzzz has quit [Ping timeout: 272 seconds]
Guest56982 has quit [Read error: Connection reset by peer]
lid_ has joined #ruby
<jhass> wonder if there's a status badge like one
<jhass> mmh, http://shields.io/
sivsushruth has quit [Read error: Connection reset by peer]
<apeiros> ribbon added
Guest56982 has joined #ruby
SouL has quit [Ping timeout: 265 seconds]
JoshGlzBrk has joined #ruby
willharrison has joined #ruby
jordsmi has joined #ruby
krisquigley has joined #ruby
robustus has quit [Ping timeout: 264 seconds]
agrinb has quit [Ping timeout: 245 seconds]
sivsushruth has joined #ruby
lidaaa has quit [Ping timeout: 255 seconds]
hpoydar has joined #ruby
<apeiros> https://github.com/blog/273-github-ribbons - used the red one on the right side
bronson has quit [Remote host closed the connection]
markholmes has joined #ruby
Guest56982 has quit [Read error: Connection reset by peer]
enebo has quit [Quit: enebo]
SouL has joined #ruby
robustus has joined #ruby
<shevy> wat
SouL_ has joined #ruby
Guest56982 has joined #ruby
<shevy> the wat referred to Zlib::ZStream
Guest56982 has quit [Read error: Connection reset by peer]
<shevy> you are googling!
<apeiros> gn8
<shevy> you wrote a bot-solver!
<jhass> night
amclain has joined #ruby
krisquigley has quit [Ping timeout: 246 seconds]
<jhass> DeBot: !hangman ruby
<DeBot> ␣␣␣␣␣␣␣␣␣␣␣␣␣ [] 0/12
<jhass> shevy: ^ all yours
hpoydar has quit [Ping timeout: 246 seconds]
<jhass> common, you can do it!
Guest56982 has joined #ruby
Guest56982 has quit [Read error: Connection reset by peer]
martinbmadsen has joined #ruby
SouL__ has joined #ruby
baweaver has quit [Remote host closed the connection]
SouL has quit [Ping timeout: 245 seconds]
mitchellhenke has joined #ruby
bronson has joined #ruby
Andrevan has quit [Quit: WeeChat 0.4.4-dev]
freerobby has quit [Quit: Leaving.]
SouL_ has quit [Ping timeout: 252 seconds]
SouL__ has quit [Read error: Connection reset by peer]
Guest56982 has joined #ruby
Guest56982 has quit [Read error: Connection reset by peer]
dc has joined #ruby
morihei has quit [Remote host closed the connection]
thinkswan has joined #ruby
vim_shimm has joined #ruby
_thinkswan has quit [Ping timeout: 246 seconds]
SouL has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
cpruitt has joined #ruby
agrinb has joined #ruby
Guest56982 has joined #ruby
SouL has quit [Read error: Connection reset by peer]
roolo has quit [Remote host closed the connection]
hiyosi has joined #ruby
<jokester> botwar
cpruitt has quit [Client Quit]
phutchins has joined #ruby
mrsolo has joined #ruby
vim_shimm has quit [Ping timeout: 256 seconds]
Guest56982 is now known as Crazy_Atheist
Crazy_Atheist is now known as ZeeNoodleyGamer
jonr22 has joined #ruby
airdisa has joined #ruby
ZeeNoodleyGamer has quit [Read error: Connection reset by peer]
jerematic has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sivsushruth has quit [Read error: Connection reset by peer]
phutchins has quit [Ping timeout: 250 seconds]
sivsushruth has joined #ruby
astrobunny has joined #ruby
SouL has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
DerisiveLogic has quit [Ping timeout: 272 seconds]
jerematic has quit [Ping timeout: 252 seconds]
SouL has quit [Read error: Connection reset by peer]
<shevy> jhass I can not decipher what the bot outputs
Purrkode has quit [Quit: Textual IRC Client: www.textualapp.com]
<jhass> shevy: eh, still lacking unicode even in your IRC client?
ZeeNoodleyGamer has joined #ruby
<shevy> jhass I am completely unicode free everywhere
<jhass> I bet you're not
<shevy> I am!
<shevy> I have nothing unicode related on my system
ZeeNoodleyGamer has quit [Read error: Connection reset by peer]
<jhass> do you have a browser?
<shevy> yeah
meatherly has quit [Remote host closed the connection]
<jhass> there, I won the bet
tubuliferous has quit [Read error: Connection reset by peer]
mitchellhenke has quit [Quit: Computer has gone to sleep.]
jenrzzz has joined #ruby
wallerdev has quit [Quit: wallerdev]
airdisa has quit [Ping timeout: 272 seconds]
purrist has joined #ruby
SouL has joined #ruby
gsd has joined #ruby
nicolastarzia has quit [Remote host closed the connection]
martinbmadsen has quit [Ping timeout: 252 seconds]
gsd has quit [Client Quit]
sivsushruth has quit [Read error: Connection reset by peer]
dx7 has joined #ruby
sivsushruth has joined #ruby
cefkamcau has joined #ruby
PaulCapestany has quit [Quit: .]
Tingo1983 has quit [Ping timeout: 264 seconds]
purrist has quit [Quit: Textual IRC Client: www.textualapp.com]
PaulCapestany has joined #ruby
SouL_ has joined #ruby
hien_ has joined #ruby
<hien_> hi all
eshiffob has quit [Ping timeout: 250 seconds]
hien_ is now known as Guest58021
<Guest58021> I have a problem with chartkick
SouL has quit [Ping timeout: 265 seconds]
<Guest58021> please can someone help me?
SouL has joined #ruby
charliesome has quit [Quit: zzz]
sivsushruth has quit [Read error: Connection reset by peer]
<morenoh149> https://github.com/fog/fog-aws/blob/master/lib/fog/aws/signaturev4.rb#L12 I'm getting `no implicit conversion of Bignum into String` on this line
Aswebb_ has quit [Remote host closed the connection]
SouL_ has quit [Ping timeout: 252 seconds]
a5i has joined #ruby
sivsushruth has joined #ruby
sevvie has quit [Ping timeout: 246 seconds]
sivsushruth has quit [Read error: Connection reset by peer]
davedev24_ has quit []
SouL has quit [Ping timeout: 264 seconds]
sivsushruth has joined #ruby
<jhass> morenoh149: you pass the secret key as a number instead of a string, ensure you pass it as a string
juanpablo__ has joined #ruby
jwinder has joined #ruby
<jhass> Guest58021: these kind of questions are better in #RubyOnRails, but you can't call .group on an instance of the model, you have to call it on the model class
thinkswan has quit [Remote host closed the connection]
<jhass> or some association collection, like noted in the comments already
mrsolo has quit [Quit: This computer has gone to sleep]
thinkswan has joined #ruby
SouL has joined #ruby
sevvie has joined #ruby
charliesome has joined #ruby
swgillespie has joined #ruby
SouL has quit [Read error: Connection reset by peer]
bruno-_ has quit [Ping timeout: 246 seconds]
juanpablo__ has quit [Ping timeout: 265 seconds]
AlphaTech has joined #ruby
astrobunny has quit [Remote host closed the connection]
_honning_ has quit [Ping timeout: 272 seconds]
jcromartie has joined #ruby
thinkswan has quit [Ping timeout: 256 seconds]
Aswebb_ has joined #ruby
serivich has quit [Ping timeout: 244 seconds]
thumpba_ has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
SouL has joined #ruby
sivsushruth has joined #ruby
thumpba has quit [Ping timeout: 252 seconds]
thumpba_ has quit [Remote host closed the connection]
jlast has joined #ruby
SouL_ has joined #ruby
serivich has joined #ruby
j_mcnally has joined #ruby
SouL has quit [Ping timeout: 272 seconds]
j_mcnally has quit [Max SendQ exceeded]
Aswebb_ has quit []
thumpba has joined #ruby
j_mcnally has joined #ruby
jph98 has joined #ruby
jeramy_s has joined #ruby
jlast has quit [Ping timeout: 250 seconds]
SouL_ has quit [Ping timeout: 250 seconds]
zorak8 has quit [Ping timeout: 264 seconds]
jph98 has quit [Ping timeout: 256 seconds]
zorak8 has joined #ruby
jwingfi has quit [Remote host closed the connection]
slackbotgz has quit [Remote host closed the connection]
slackbotgz has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
serivich has quit [Ping timeout: 272 seconds]
jenrzzz has quit [Ping timeout: 272 seconds]
bradleyp_ has quit [Remote host closed the connection]
SouL_ has joined #ruby
sivsushruth has joined #ruby
charliesome has quit [Quit: zzz]
_honning_ has joined #ruby
TheNet has joined #ruby
nettoweb has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SouL_ has quit [Ping timeout: 264 seconds]
SouL has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alphaatom has quit [Ping timeout: 250 seconds]
maximski has joined #ruby
millerti has joined #ruby
dx7 has quit [Quit: Leaving...]
sivsushruth has quit [Read error: Connection reset by peer]
sivsushruth has joined #ruby
Cache_Money has joined #ruby
nahtnam has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
_honning_ has quit [Ping timeout: 272 seconds]
sivsushruth has joined #ruby
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kyrylo has quit [Ping timeout: 264 seconds]
Guest13307 has joined #ruby
Guest13307 is now known as S`
towski_ has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
jack_rabbit has quit [Ping timeout: 272 seconds]
markholmes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lordkryss has quit [Quit: Connection closed for inactivity]
hgl has quit [Ping timeout: 255 seconds]
delianides has quit [Remote host closed the connection]
delianides has joined #ruby
SouL has quit [Ping timeout: 264 seconds]
hgl has joined #ruby
jcromartie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
benlieb_ has joined #ruby
SouL has joined #ruby
exadeci has quit [Quit: Connection closed for inactivity]
hpoydar has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
chipotle has joined #ruby
<Guest58021> @jhass thank you so much
SouL has quit [Read error: Connection reset by peer]
iMe has quit [Ping timeout: 250 seconds]
havenwood has quit [Remote host closed the connection]
hpoydar has quit [Ping timeout: 246 seconds]
iMe has joined #ruby
Channel6 has joined #ruby
plashchynski has quit [Quit: plashchynski]
tkuchiki has joined #ruby
Lewix has quit [Remote host closed the connection]
sevvie has quit [Ping timeout: 265 seconds]
krisquigley has joined #ruby
DerisiveLogic has joined #ruby
SouL has joined #ruby
maximski has quit []
RegulationD has joined #ruby
mesamoo has quit [Quit: Konversation terminated!]
juanpablo__ has joined #ruby
thumpba has quit [Remote host closed the connection]
ominari has joined #ruby
merqlove has quit [Quit: Connection closed for inactivity]
cjim has joined #ruby
j_mcnally has joined #ruby
bruno- has joined #ruby
krisquigley has quit [Ping timeout: 246 seconds]
dc has quit [Remote host closed the connection]
arescorpio has joined #ruby
RegulationD has quit [Ping timeout: 264 seconds]
tus has quit []
juanpablo__ has quit [Ping timeout: 248 seconds]
xymbol has joined #ruby
jeramy_s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cjim has quit [Ping timeout: 250 seconds]
bruno- has quit [Ping timeout: 255 seconds]
xymbol has quit [Read error: No route to host]
jeramy_s has joined #ruby
hakunin_ has joined #ruby
fumduq has quit [Ping timeout: 252 seconds]
WillAmes has quit [Ping timeout: 252 seconds]
fumduq has joined #ruby
OtterCoder has quit [Remote host closed the connection]
sevvie has joined #ruby
tkuchiki has quit [Remote host closed the connection]
hakunin has quit [Ping timeout: 252 seconds]
pagios has quit [Ping timeout: 252 seconds]
dc has joined #ruby
jonr22 has joined #ruby
duncannz has quit [Remote host closed the connection]
jerematic has joined #ruby
phutchins has joined #ruby
charliesome has joined #ruby
hornairs has joined #ruby
pagios has joined #ruby
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
hornairs has quit [Client Quit]
jonr22 has quit [Ping timeout: 256 seconds]
jerematic has quit [Ping timeout: 252 seconds]
vim_shimm has joined #ruby
mikemac has quit [Remote host closed the connection]
bricker has joined #ruby
mikemac has joined #ruby
phutchins has quit [Ping timeout: 245 seconds]
juanca_ has joined #ruby
bayed has quit [Quit: Connection closed for inactivity]
phutchins has joined #ruby
airdisa has joined #ruby
gsd has joined #ruby
paulcsmith has joined #ruby
ominari has quit [Quit: Be back later ...]
slackbotgz has quit [Remote host closed the connection]
slackbotgz has joined #ruby
Sawbones_ has joined #ruby
vim_shimm has quit [Ping timeout: 264 seconds]
<TheNet> does anyone know how to access a key from a nested hash assuming you don't know how many layers the hash has?
mattrose has quit [Quit: WeeChat 1.0.1]
banister has joined #ruby
<TheNet> so normally you could do hash[key_one][key_two][key_three]
<TheNet> but what if you don't know beforehand how many keys you're going to need
airdisa has quit [Ping timeout: 245 seconds]
ominari has joined #ruby
paulcsmith has quit [Ping timeout: 265 seconds]
phutchins has quit [Ping timeout: 255 seconds]
dc has quit [Remote host closed the connection]
Sawbones_ has quit [Remote host closed the connection]
Papierkorb_ has quit [Ping timeout: 250 seconds]
jlast has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
frem has quit [Quit: Connection closed for inactivity]
fgo has joined #ruby
sivsushruth has joined #ruby
bronson has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 265 seconds]
fgo has quit [Ping timeout: 250 seconds]
dc has joined #ruby
dc has quit [Remote host closed the connection]
serivich has joined #ruby
<jokester> so what determines the keys?
govg has quit [Ping timeout: 272 seconds]
amystephen has quit [Quit: amystephen]
SouL_ has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bradland> TheNet: you're going to need recursion
BTRE has quit [Ping timeout: 264 seconds]
SouL has quit [Ping timeout: 265 seconds]
<TheNet> bradland: how so?
<TheNet> jokester: let's say there's a hash of keys
starless has quit [Quit: Leaving]
<TheNet> I'm surprised this isn't easy to accomplish in ruby
paulcsmith has joined #ruby
paulcsmith has quit [Client Quit]
lemur has joined #ruby
<bradland> you write a method that accepts a hash, iterates the key/values, then calls itself any value.is_a?(Hash) returns true
DerisiveLogic has quit [Ping timeout: 255 seconds]
<bradland> your problem statement isn't entirely clear though
<TheNet> I phrased my original question wrong
<TheNet> yeah
<bradland> if you have a hash that is arbitrarily deep, how do you know which key/value you need?
<TheNet> How do I edit a value in a nested hash if I don't know how many layers it is
<bradland> is it always the first one? at what depth? until we run out of depth?
<TheNet> there could be an array of keys
bronson has joined #ruby
<bradland> but how do you know which key/value you need?
<TheNet> so [:key_one, :key_two, :key_three] --accesses--> hash[:key_one][:key_two][:key_three]
SouL_ has quit [Ping timeout: 244 seconds]
<bradland> are you asking how to accomplish that?
<TheNet> yep
<TheNet> by access I mean edit though
<TheNet> I want to do hash[:key_one][:key_two][:key_three] = 'foo'
DerisiveLogic has joined #ruby
<bradland> once you have a strategy to access, assignment shouldn't be a problem
<bradland> lemme see what i can come up with
<TheNet> thanks
caveat- has quit [Ping timeout: 248 seconds]
<bricker> TheNet: it doesn't need to be recursive (technically): https://gist.github.com/bricker/51595b9461b387f82389
caveat- has joined #ruby
<TheNet> bricker: but unless I'm missing something that's just reading the value
<TheNet> I want to write it
n_blownapart has joined #ruby
<bricker> oh, I missed that part
<TheNet> yeah sorry, I phrased it badly
<bricker> TheNet: I would probably use method missing for that
digitalextremist has quit [Quit: Leaving]
<TheNet> bricker: I'll give that a try
havenwood has joined #ruby
BTRE has joined #ruby
<bricker> TheNet: that wouldn't work now that I thought about it for 2 seconds
<TheNet> I was trying to figure out what you meant :P
Cache_Money has quit [Quit: Cache_Money]
SouL_ has joined #ruby
benlieb_ has quit [Quit: benlieb_]
<bricker> TheNet: actually chef does it, I never looked up how but you could go through their source
<bricker> TheNet: They have their own Hash type, which is probably what you'll want
<bricker> let's see....
basiclaser has quit [Quit: Connection closed for inactivity]
red_horned_rihno has joined #ruby
braincra- has quit [Quit: bye bye]
ominari has quit [Quit: Be back later ...]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SouL_ has quit [Ping timeout: 256 seconds]
<bricker> not perfect but a starting point for you
red_horned_rihno has quit [Max SendQ exceeded]
markholmes has joined #ruby
Soda has joined #ruby
red_horned_rihno has joined #ruby
red_horned_rihno has quit [Read error: Connection reset by peer]
iMe has quit [Ping timeout: 272 seconds]
braincrash has joined #ruby
serivich has quit [Quit: Leaving]
Crazy_Atheist has joined #ruby
Crazy_Atheist has quit [Read error: Connection reset by peer]
<bradland> i thought he wanted to use the array of keys to access values at a depth matching the array
SouL has joined #ruby
<bricker> *shrug*
iMe has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bradland> this is what I came up with: https://gist.github.com/bradland/26d4744ce19766779947
<bradland> could be modified to set the value if two arguments are provided, an array of keys, and the desired value
<bradland> TheNet: ^^
<bricker> nice
agrinb has quit [Remote host closed the connection]
jefus_ has quit [Read error: Connection reset by peer]
<bricker> huh
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bricker> I just learned that the destructive enumerable method (recject!, delete_if, etc.) aren't defined in Enumerable
<bricker> this is causing me grief
<bradland> say whaaaaaat
jokester has quit [Quit: recharge]
jokester has joined #ruby
jordsmi has quit [Quit: Connection closed for inactivity]
mistermocha has joined #ruby
<bradland> TheNet: ^^
<TheNet> bradland: that's clever but how can I use that to set the value?
<bradland> refresh
<bradland> i just updated it
<bradland> the method HashArrayAccess::array_assign(keys, value) will do what you want
<bradland> first argument is an array of keys, second argument is the desired value
<bradland> although, the module name is now a misnomer
mostlybadfly has quit [Quit: Connection closed for inactivity]
<bradland> naming: one of three hard problems in computer science
agrinb has joined #ruby
SouL has quit [Ping timeout: 256 seconds]
<bricker> bradland: you messed up the joke
<bradland> ok... so that doesn't exactly work
<bricker> it's "naming is one of the two hard problems in CS" ... "what is the other one?" ... "cache expiration and off-by-one errors"
<bradland> the resulting hash is {:one=>{:two=>{:three=>"bar"}}, nil=>"baz"}
<bradland> damn!
<bradland> lol
<bricker> :)
tcrypt has quit [Ping timeout: 256 seconds]
<TheNet> yeah
<TheNet> there should be an irc channel to help each other come up with names
<bradland> oh, dur
jefus has joined #ruby
<bradland> one pass over and the keys array is done for
<bradland> it has to be re-initialized
<bricker> TheNet: There is, but it was named so poorly that nobody can find it
<bradland> or i need to dupe internally
<bradland> new startup idea IaaS
<bricker> come on that joke was gold
<bradland> idiot as a service. founder: me
<bradland> ha!
sankaber has joined #ruby
<bradland> TheNet: I can get this working. I'm just slow :)
vdamewood has joined #ruby
n_blownapart has quit [Quit: Leaving]
delianides has quit [Remote host closed the connection]
martinbmadsen has joined #ruby
balazs has quit [Ping timeout: 252 seconds]
<bradland> TheNet: updated version works as expected: https://gist.github.com/bradland/26d4744ce19766779947
oo_ has joined #ruby
<bradland> gotta say, i'm kind of surprised i was able to do that. i suck at recursion.
juanca_ has quit []
Sawbones_ has joined #ruby
<bradland> it's necessary to call dup on the array so that the calls to Array#shift don't empty your keys
<bricker> has_key?() and key?() are the exact same method but not an alias
<bricker> I wonder why
kblake has joined #ruby
<bradland> bricker: the actual C method name is rb_hash_has_key for both
<bradland> undocumented hash?
<bricker> I know, that's why I find it strange they didn't just alias one to the other
zzing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bradland> derp, i meant to say undocumented alias?
hgl has quit [Ping timeout: 246 seconds]
a5i has quit [Quit: Connection closed for inactivity]
kblake has quit [Ping timeout: 246 seconds]
hgl has joined #ruby
jlast has joined #ruby
<bradland> that should def be an rb_define_alias isntead
SouL has joined #ruby
fgo has joined #ruby
<bradland> six methods that are the same C symbol internally
<bradland> heh
<bradland> doh, four
JoshGlzBrk has joined #ruby
Soda has quit [Remote host closed the connection]
reinaldob has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
Spami has quit [Quit: This computer has gone to sleep]
SouL has quit [Ping timeout: 264 seconds]
hpoydar has joined #ruby
fgo has quit [Ping timeout: 255 seconds]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
reinaldob has quit [Ping timeout: 252 seconds]
duncannz has joined #ruby
Sawbones_ has quit [Remote host closed the connection]
SouL has joined #ruby
hpoydar has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
SouL has quit [Read error: Connection reset by peer]
netside has joined #ruby
krisquigley has joined #ruby
SouL has joined #ruby
DavidDudson has joined #ruby
mostlybadfly has joined #ruby
f3lp has quit [Ping timeout: 250 seconds]
duncannz has quit [Ping timeout: 264 seconds]
Sawbones_ has joined #ruby
juanpablo__ has joined #ruby
hgl has quit [Ping timeout: 264 seconds]
SouL has quit [Ping timeout: 252 seconds]
krisquigley has quit [Ping timeout: 252 seconds]
hgl has joined #ruby
netside has quit []
robertt_dex has joined #ruby
SouL has joined #ruby
juanpablo__ has quit [Ping timeout: 252 seconds]
Channel6 has quit [Quit: Leaving]
nettoweb has joined #ruby
SouL_ has joined #ruby
iliketurtles has joined #ruby
Sembei has quit [Read error: Connection reset by peer]
SouL__ has joined #ruby
Megtastique has joined #ruby
jerematic has joined #ruby
Sembei has joined #ruby
SouL has quit [Ping timeout: 265 seconds]
jonr22 has joined #ruby
SouL_ has quit [Ping timeout: 246 seconds]
iMe has quit [Ping timeout: 250 seconds]
SouL__ has quit [Ping timeout: 256 seconds]
darkPT has joined #ruby
jerematic has quit [Ping timeout: 246 seconds]
agrinb has quit [Remote host closed the connection]
jlast has joined #ruby
darkPT is now known as niko-is-GAY
agrinb has joined #ruby
iMe has joined #ruby
niko-is-GAY has quit [Killed (Sigyn (Spam is off topic on freenode.))]
sivsushruth has quit [Read error: Connection reset by peer]
jonr22 has quit [Ping timeout: 255 seconds]
sivsushruth has joined #ruby
digitalextremist has joined #ruby
sankaber has quit [Ping timeout: 255 seconds]
agrinb has quit [Ping timeout: 256 seconds]
jlast has quit [Ping timeout: 256 seconds]
SouL has joined #ruby
airdisa has joined #ruby
jeramy_s has quit [Quit: Peace out!]
SouL has quit [Read error: Connection reset by peer]
sivsushruth has quit [Read error: Connection reset by peer]
airdisa has quit [Ping timeout: 246 seconds]
sivsushruth has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
SouL has joined #ruby
ParSalian has quit [Quit: WeeChat 1.0.1]
sivsushruth has joined #ruby
thumpba has joined #ruby
vim_shimm has joined #ruby
phutchins has joined #ruby
colorados has joined #ruby
Jiyuhen has quit [Ping timeout: 264 seconds]
vim_shimm has quit [Ping timeout: 244 seconds]
SouL_ has joined #ruby
Sawbones_ has quit [Remote host closed the connection]
MegaDork has joined #ruby
SouL has quit [Ping timeout: 252 seconds]
MegaDork has left #ruby [#ruby]
phutchins has quit [Ping timeout: 272 seconds]
vdamewood has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
DavidDudson has quit [Ping timeout: 250 seconds]
SouL has joined #ruby
gregf1 has quit [Quit: WeeChat 1.0.1]
Megtastique has quit []
SouL_ has quit [Ping timeout: 245 seconds]
ParSalian has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
gregf1 has joined #ruby
jack_rabbit has joined #ruby
arescorpio has quit [Excess Flood]
daed_ is now known as daed
sivsushruth has joined #ruby
gregf1 has quit [Client Quit]
fgo has joined #ruby
droidburgundy has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
mistermocha has quit [Remote host closed the connection]
sivsushruth has quit [Read error: Connection reset by peer]
sivsushruth has joined #ruby
gregf1 has joined #ruby
mistermocha has joined #ruby
colorados has quit [Ping timeout: 250 seconds]
fgo has quit [Ping timeout: 246 seconds]
DavidDudson has joined #ruby
gregf1 has quit [Client Quit]
sivsushruth has quit [Read error: Connection reset by peer]
sivsushruth has joined #ruby
netside has joined #ruby
iMe has quit [Ping timeout: 244 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jayeshsolanki has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
swgillespie has joined #ruby
iMe has joined #ruby
oo_ has quit [Remote host closed the connection]
sivsushruth has quit [Read error: Connection reset by peer]
SouL has quit [Ping timeout: 255 seconds]
SouL has joined #ruby
RegulationD has joined #ruby
droidburgundy has joined #ruby
sivsushruth has joined #ruby
DavidDudson has quit [Read error: Connection reset by peer]
sivsushruth has quit [Read error: Connection reset by peer]
sivsushruth has joined #ruby
gregf1 has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chopperkun has joined #ruby
hgl has quit [Ping timeout: 246 seconds]
dseitz has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 256 seconds]
f3lp has joined #ruby
hgl has joined #ruby
TerjeLarsen has joined #ruby
swindsor has joined #ruby
Darryl___ has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
DavidDudson has joined #ruby
DavidDudson has quit [Client Quit]
sigurding has joined #ruby
iMadper is now known as iMadper|elisp
swindsor has left #ruby [#ruby]
RegulationD has joined #ruby
sivsushruth has joined #ruby
lxsameer has joined #ruby
Morkel has joined #ruby
SouL_ has joined #ruby
jack_rabbit has quit [Ping timeout: 265 seconds]
martinbmadsen has quit [Ping timeout: 246 seconds]
oo_ has joined #ruby
SouL has quit [Ping timeout: 255 seconds]
RegulationD has quit [Ping timeout: 255 seconds]
SouL has joined #ruby
colorados has joined #ruby
thinkswan has joined #ruby
jlast has joined #ruby
SouL_ has quit [Ping timeout: 248 seconds]
ominari has joined #ruby
thumpba has quit [Remote host closed the connection]
thumpba has joined #ruby
SouL has quit [Ping timeout: 264 seconds]
SouL has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
BTRE has quit [Quit: Leaving]
thumpba has quit [Ping timeout: 264 seconds]
_2_meill231 has joined #ruby
<_2_meill231> hi
charliesome has quit [Quit: zzz]
sivsushruth has quit [Read error: Connection reset by peer]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sivsushruth has joined #ruby
DexterLB has quit [Quit: So long and thanks for all the fish]
sivsushruth has quit [Read error: Connection reset by peer]
<havenwood> hi
iMe has quit [Ping timeout: 250 seconds]
_2_meill231 has quit [Remote host closed the connection]
SouL_ has joined #ruby
SouL has quit [Read error: Connection reset by peer]
wottam has joined #ruby
sivsushruth has joined #ruby
DexterLB has joined #ruby
iMe has joined #ruby
lid_ has quit [Ping timeout: 252 seconds]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<keyofnight> Hm!
TerjeLarsen has quit [Read error: Connection reset by peer]
zorak8 has quit [Remote host closed the connection]
<keyofnight> Hi erybody. ;)
techsethi has joined #ruby
hpoydar has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
f3lp has quit [Quit: Leaving]
f3lp has joined #ruby
<colorados> whats new features in ruby 2.3?
keen__________28 has joined #ruby
robertt_dex has quit [Ping timeout: 245 seconds]
keen__________27 has quit [Ping timeout: 246 seconds]
pontiki has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
Notte has joined #ruby
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
hpoydar has quit [Ping timeout: 250 seconds]
duncannz has joined #ruby
sivsushruth has joined #ruby
Morkel has quit [Quit: Morkel]
elaptics_away is now known as elaptics
<havenwood> colorados: "It should be faster, it should be more feature rich, it should be more stable and it should be more interesting."
anarang has joined #ruby
<colorados> wow
<colorados> new mystic ruby
krisquigley has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
juanpablo__ has joined #ruby
sivsushruth has joined #ruby
<riceandbeans> have you ever seen topaz?
fumduq has quit [Ping timeout: 252 seconds]
<riceandbeans> ruby in python in python in C
<riceandbeans> supposed to be awesome though
mistermocha has joined #ruby
krisquigley has quit [Ping timeout: 250 seconds]
<riceandbeans> ruby interpreted by pypy
<riceandbeans> it's terrifying
<riceandbeans> but supposedly stupid fast
roger_rabbit has quit [Ping timeout: 252 seconds]
<havenwood> riceandbeans: Well, pypy is implemented in rpython just like topaz.
Soda has joined #ruby
fumduq has joined #ruby
SouL_ has quit [Read error: Connection reset by peer]
<riceandbeans> ok
<riceandbeans> havenwood: still, what do you think of topaz?
airdisa has joined #ruby
Notte has quit [Remote host closed the connection]
jwinder has quit [Ping timeout: 252 seconds]
<havenwood> riceandbeans: I think it was a neat proof of concept. I don't think its further development is likely or that a 1.0 is going to happen.
SouL has joined #ruby
juanpablo__ has quit [Ping timeout: 246 seconds]
<colorados> do you have speed comparison with another lang?
roger_rabbit has joined #ruby
jenrzzz has joined #ruby
mistermocha has quit [Ping timeout: 256 seconds]
<havenwood> riceandbeans: Here's a dated benchmark showing Topaz's strength: https://gist.github.com/havenwood/4724778
admin1 has joined #ruby
<riceandbeans> is that really a reiable source :P
<Blaster> Stop mining gemstones and go listen to symphonies
<riceandbeans> jesus
<riceandbeans> 8 seconds compared to ~44
airdisa has quit [Ping timeout: 256 seconds]
<riceandbeans> that had to be an error
admin1 has quit [Read error: Connection reset by peer]
admin2 has joined #ruby
<havenwood> crystal-lang took the cake on that bench though, and it still does
<havenwood> unless you allow jruby truffle graal in the mix :)
roger_rabbit has quit [Ping timeout: 250 seconds]
<havenwood> riceandbeans: check these out: https://github.com/kostya/benchmarks
jerematic has joined #ruby
BTRE has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
<havenwood> riceandbeans: http://crystal-lang.org/
jph98 has joined #ruby
mitchellhenke has joined #ruby
jonr22 has joined #ruby
hololeap has joined #ruby
<riceandbeans> wow
<riceandbeans> it's its own language on github
jerematic has quit [Ping timeout: 252 seconds]
<riceandbeans> that's amazing
<hololeap> i'm trying to install the latest version of rails from github. when i try to install activejob by using `gem build *.gemspec` and then `gem install *.gem` it gives me the error, "Unresolved dependency found during sorting - activesupport (>= 4.1.0) (requested by globalid-0.3.3)"
<havenwood> riceandbeans: Here's some reading if you want to get excited about Truffle: http://www.chrisseaton.com/rubytruffle/modularity15/rubyextensions.pdf
kreeves has joined #ruby
<hololeap> however, `gem list -l activesupport` shows this: "*** LOCAL GEMS *** activesupport (5.0.0.alpha)"
<havenwood> riceandbeans: Check out the crystal-lang samples/, they're fun to run.
kreeves has quit [Client Quit]
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jonr22 has quit [Ping timeout: 265 seconds]
<havenwood> hololeap: You'll probably have better luck with Rails questions in #RubyOnRails. That's a better place to ask.
<hololeap> havenwood: i am asking in both places :)
admin2 has quit [Quit: WeeChat 0.3.8]
<hololeap> this is partially a ruby-specific question since it has to do with how rubygems handles versions
<havenwood> hololeap: Aha! In that case just mention in both channels it's a crosspost. Then we can go look for the answer and not waste time if it has been answered.
<riceandbeans> havenwood: it won't compile on my OS, seems terminally broken
<havenwood> riceandbeans: crystal-lang?
<hololeap> havenwood: ok, though nobody has responded yet in #RubyOnRails
<havenwood> hololeap: Have you tried: bundle
<havenwood> riceandbeans: works on my machine
<havenwood> riceandbeans: #crystal-lang is the channel
<hololeap> havenwood: i would like to install the gem outside of bundle so that it will install rails to ~/.gem/ruby/2.2.0/bin/
<riceandbeans> havenwood: yeah
<havenwood> hololeap: you have have the bundle install there
SouL has quit [Ping timeout: 246 seconds]
sivsushruth has quit [Ping timeout: 264 seconds]
sivsushruth has joined #ruby
SouL has joined #ruby
sigurding has quit [Quit: sigurding]
<havenwood> hololeap: you can have*
<hololeap> havenwood: i was looking for a way to do that so that i don't have to run `bundle exec` every time. do you know the syntax?
SouL_ has joined #ruby
<havenwood> hololeap: `bundle install` actually installs to GEM_HOME by default, but if you don't prefix `bundle exec` it wont necessarily use the right versions
<havenwood> hololeap: a newer version would be used if it's there
<havenwood> hololeap: if you don't want to prefix `bundle exec` there are tools that do it for you
SouL__ has joined #ruby
<havenwood> hololeap: the most popular is rubygems-bundler: https://github.com/mpapis/rubygems-bundler#readme
jlast has joined #ruby
SouL has quit [Ping timeout: 246 seconds]
<hololeap> normally i wouldn't mind using bundler for each app individually, but calling "rails" automates the directory setup and whatnot. i have ~/.gem/ruby/2.2.0/bin/ in my PATH so that i can run gem-installed scripts
<havenwood> hololeap: The rubygems-bundler gem is pretty widely used because it ships with RVM. It automatically uses the bundle if there's a Gemfile in the dir or any subdir.
SouL_ has quit [Ping timeout: 272 seconds]
lemur has quit [Remote host closed the connection]
<havenwood> hololeap: If it wasn't Rails you could try RubyGems' built in resolver than partially replaces Bundler already. It doesn't work for Rails yet because of Bundler-specific integration that doesn't have a working alternative unless you manually make edits.
<havenwood> s/than/that
SouL__ has quit [Read error: Connection reset by peer]
<havenwood> hololeap: TL;DR: use bundler, and rubygems-bundler too if you don't want to prefix `bundle exec`
<havenwood> hololeap: the bundler team recommend you manually prefix it
<havenwood> hololeap: it's your choice
joonty has joined #ruby
jlast has quit [Ping timeout: 256 seconds]
joonty has quit [Client Quit]
AlexRussia has quit [Ping timeout: 250 seconds]
iMe has quit [Ping timeout: 248 seconds]
<hololeap> havenwood: but shouldn't i be able to install the gems manually as well? why would rubygems be complaining about not having >=activesupport-4.1.0 when activesupport (5.0.0.alpha) is clearly installed?
AlexRussia has joined #ruby
SouL has joined #ruby
techsethi has quit [Quit: techsethi]
<havenwood> hololeap: each gem has dependencies. those dependencies have dependencies. very quickly they conflict with a complex project like rails.
iMe has joined #ruby
ominari has quit [Quit: Be back later ...]
oo_ has quit [Remote host closed the connection]
<hololeap> havenwood: the error message seems pretty clear that it is looking for >=activesupport-4.1.0 ... looking into it, this was a bug not too long ago: https://github.com/rails/rails/issues/16609
f3lp has quit [Quit: Leaving]
f3lp has joined #ruby
michael_mbp has quit [Excess Flood]
<havenwood> hololeap: does it work with bundler?
<hololeap> havenwood: seems to. doesn't throw an error message anyway
<havenwood> hololeap: currently gem update and prereleases don't play nice
michael_mbp has joined #ruby
Takle has joined #ruby
<havenwood> hololeap: that'll be fixed in RubyGems 2.5, but Bundler is the defacto way to install Rails dependencies
ominari has joined #ruby
<havenwood> hololeap: you can drop bundler if you're willing to go through some hoops, due to some awesome work on rubygems by drbrain
<havenwood> but it isn't an easy path yet
<havenwood> bundler is the easy path
<hololeap> havenwood: is it a documented path?
<hololeap> somewhere...
<hololeap> :)
<havenwood> yes, somewhere
<havenwood> barely
<hololeap> because i would really like to install the latest rails from github without using bundler or rvm
vim_shimm has joined #ruby
<havenwood> Goodbye `Gemfile`, hello `gem.deps.rb`. :)
<havenwood> hololeap: Here lie dragons. This path is not for the faint of heart.
<havenwood> hololeap: But if you take it, report issues. ;)
Pharaoh2 has joined #ruby
<hololeap> havenwood: haha. well, it's good enough for me
<hololeap> havenwood: thanks for the guidance
vim_shimm has quit [Ping timeout: 264 seconds]
<havenwood> hololeap: you're welcome. happy coding!
dtscode has joined #ruby
dtscode has left #ruby ["Leaving"]
julian-delphiki has joined #ruby
pontiki_ has joined #ruby
chopperkun has quit [Quit: Leaving]
cnj has quit [Ping timeout: 256 seconds]
slackbotgz has quit [Ping timeout: 256 seconds]
brixen has quit [Ping timeout: 250 seconds]
headius has quit [Ping timeout: 265 seconds]
whateverman has quit [Ping timeout: 265 seconds]
sarlalia1 has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
endash has quit [Ping timeout: 265 seconds]
headius has joined #ruby
Gnubie__ has quit [Read error: Connection reset by peer]
endash has joined #ruby
gilmour has quit [Ping timeout: 256 seconds]
bean has quit [Ping timeout: 265 seconds]
rlvm has joined #ruby
pontiki has quit [Ping timeout: 265 seconds]
rager has joined #ruby
brixen has joined #ruby
Gnubie_ has joined #ruby
cnj has joined #ruby
SouL has quit [Read error: Connection reset by peer]
gilmour has joined #ruby
SouL has joined #ruby
sarlalia1 has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
hololeap has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
sivsushruth has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
ponga has quit [Remote host closed the connection]
<pagios> how can i convert from epoch format into a readable time ? ex 1427490122
SouL has quit [Ping timeout: 252 seconds]
ponga has joined #ruby
rlvm has quit [Remote host closed the connection]
rippa has joined #ruby
Morkel has joined #ruby
techsethi has joined #ruby
<hanmac> pagios:
<hanmac> >> Time.at(1427490122)
<eval-in_> hanmac => 2015-03-27 21:02:02 +0000 (https://eval.in/305927)
<pagios> >> Time.at(1427490122).strftime("%t"
<eval-in_> pagios => /tmp/execpad-76f162716f5c/source-76f162716f5c:3: syntax error, unexpected keyword_rescue, expecting ')' ... (https://eval.in/305928)
<pagios> >> Time.at(1427490122).strftime("%t")
<eval-in_> pagios => "\t" (https://eval.in/305929)
<pagios> >> Time.at(1427490122).strftime("%d")
<eval-in_> pagios => "27" (https://eval.in/305930)
<pagios> >> Time.at(1427490122).strftime("%T")
<eval-in_> pagios => "21:02:02" (https://eval.in/305931)
<pagios> thanks hanmac
Rephiax has joined #ruby
DavidDudson has joined #ruby
sevenseacat has joined #ruby
Musashi007 has joined #ruby
jph98 has quit [Quit: jph98]
ponga has quit [Ping timeout: 264 seconds]
RegulationD has joined #ruby
wottam has joined #ruby
Jiyuhen has joined #ruby
amclain has quit [Quit: Leaving]
SouL has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
RegulationD has quit [Ping timeout: 245 seconds]
Rephiax has quit [Ping timeout: 265 seconds]
TheNet has quit [Quit: Leaving...]
wicope has joined #ruby
SouL has quit [Ping timeout: 255 seconds]
markholmes has quit [Quit: So it goes.]
Joufflu has quit [Ping timeout: 256 seconds]
sivsushruth has quit [Read error: Connection reset by peer]
mark[oz] has joined #ruby
sandelius has joined #ruby
sivsushruth has joined #ruby
Soda has quit [Remote host closed the connection]
ponga has joined #ruby
Rephiax has joined #ruby
SouL has joined #ruby
mitchellhenke has quit [Quit: Computer has gone to sleep.]
amystephen has joined #ruby
bronson has quit [Remote host closed the connection]
SouL has quit [Read error: Connection reset by peer]
kblake has joined #ruby
jlast has joined #ruby
SouL has joined #ruby
Musashi007 has quit [Quit: Musashi007]
Morkel has quit [Quit: Morkel]
f3lp has quit [Ping timeout: 272 seconds]
rlvm has joined #ruby
iMe has quit [Ping timeout: 252 seconds]
Dakuan has joined #ruby
kblake has quit [Ping timeout: 250 seconds]
jlast has quit [Ping timeout: 265 seconds]
dc has joined #ruby
iMe has joined #ruby
terlar has joined #ruby
techsethi has quit [Quit: techsethi]
SouL_ has joined #ruby
blackmesa has joined #ruby
aswen has joined #ruby
hpoydar has joined #ruby
SouL has quit [Ping timeout: 250 seconds]
sivsushruth has quit [Read error: Connection reset by peer]
dc has quit [Ping timeout: 256 seconds]
SouL has joined #ruby
sivsushruth has joined #ruby
hpoydar has quit [Ping timeout: 246 seconds]
fgo has joined #ruby
SouL_ has quit [Ping timeout: 246 seconds]
sivsushruth has quit [Read error: Connection reset by peer]
krisquigley has joined #ruby
anarang has quit [Ping timeout: 248 seconds]
sivsushruth has joined #ruby
Musashi007 has joined #ruby
rlvm has quit [Remote host closed the connection]
SouL_ has joined #ruby
rlvm has joined #ruby
fgo has quit [Ping timeout: 250 seconds]
phutchins has joined #ruby
Sawbones_ has joined #ruby
juanpablo__ has joined #ruby
SouL__ has joined #ruby
SouL has quit [Ping timeout: 264 seconds]
SouL_ has quit [Read error: Connection reset by peer]
Spami has joined #ruby
bruno- has joined #ruby
krisquigley has quit [Ping timeout: 246 seconds]
Musashi007 has quit [Client Quit]
AlphaTech has quit [Quit: Connection closed for inactivity]
Notte has joined #ruby
BTRE has quit [Remote host closed the connection]
airdisa has joined #ruby
BTRE has joined #ruby
phutchins has quit [Ping timeout: 246 seconds]
Sawbones_ has quit [Ping timeout: 250 seconds]
DavidDudson has joined #ruby
bigkevmcd has quit [Quit: Outta here...]
juanpablo__ has quit [Ping timeout: 264 seconds]
Musashi007 has joined #ruby
rlvm has quit [Remote host closed the connection]
_hollywood has joined #ruby
flcn has joined #ruby
bruno- has quit [Ping timeout: 272 seconds]
Notte has quit [Ping timeout: 245 seconds]
havenwood has quit []
airdisa has quit [Ping timeout: 265 seconds]
DavidDudson has quit [Client Quit]
xaxxon has joined #ruby
jimms has joined #ruby
psy_ has quit [Ping timeout: 250 seconds]
<xaxxon> is there a "clever" way to make an empty string act like false? So I can do my_string_that_may_be_empty or false? Like some way to call empty? on it and have it return itself if true or false if false?
rlvm has joined #ruby
jerematic has joined #ruby
flcn has quit [Ping timeout: 245 seconds]
Zai00 has joined #ruby
<xaxxon> err, my_string_that_may_be_empty or "default string"
blackmesa has quit [Ping timeout: 245 seconds]
<xaxxon> the issue is that my string is computed, not sitting in a nice variable and I don't want to put it into one or repeat the computation
<xaxxon> so mystr.empty? ? mystr : "default" doesn't work
<xaxxon> I'm tinking some trick with &:empty? or something.. but I don't know ruby well enough
iMe has left #ruby ["Bye Bye"]
jonr22 has joined #ruby
CorpusCallosum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jerematic has quit [Ping timeout: 264 seconds]
sivsushruth has quit [Read error: Connection reset by peer]
DavidDudson has joined #ruby
<xaxxon> basically is there aynthing that runs an arbitrary test on an object and returns that object if true or false if false
jonr22 has quit [Ping timeout: 256 seconds]
sivsushruth has joined #ruby
rlvm has quit [Remote host closed the connection]
pwnz0r has joined #ruby
sevenseacat has quit [Quit: Leaving.]
anarang has joined #ruby
sevenseacat1 has joined #ruby
exadeci has joined #ruby
SouL__ has quit [Ping timeout: 250 seconds]
SouL has joined #ruby
<xaxxon> never mind.. going to bed
xaxxon has quit [Quit: Leaving]
platosha has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
sivsushruth has joined #ruby
wicope has quit [Quit: Leaving]
wicope has joined #ruby
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DavidDudson has quit [Read error: Connection reset by peer]
jayeshsolanki has quit [Quit: bye!]
davispuh has joined #ruby
anarang has quit [Ping timeout: 250 seconds]
Xiti has quit [Read error: Connection reset by peer]
SouL has quit [Ping timeout: 246 seconds]
SouL has joined #ruby
Xiti has joined #ruby
DerisiveLogic has quit [Read error: Connection reset by peer]
wicope has quit [Quit: Leaving]
wicope has joined #ruby
anarang has joined #ruby
marr has joined #ruby
techsethi has joined #ruby
oo_ has joined #ruby
DerisiveLogic has joined #ruby
wicope has quit [Remote host closed the connection]
SouL_ has joined #ruby
jenrzzz has joined #ruby
Jiyuhen has quit [Ping timeout: 265 seconds]
towski_ has joined #ruby
SouL has quit [Ping timeout: 248 seconds]
duncannz has quit [Ping timeout: 252 seconds]
jlast has joined #ruby
<pagios> i have this array of objects returned, how can i reference a specific object by srquence_number? http://pastie.org/10058944
amystephen has quit [Quit: amystephen]
jlast has quit [Ping timeout: 265 seconds]
SouL_ has quit [Read error: Connection reset by peer]
sch1zo has joined #ruby
cats has joined #ruby
SouL has joined #ruby
oo_ has quit [Remote host closed the connection]
lkba_ has quit [Read error: Connection reset by peer]
<gr33n7007h> pagios: could you elaborate a little?
lkba has joined #ruby
<pagios> i want to return an element of that array having a specific sequence number
<pagios> i got it thanks
<atmosx> pagios: you did it?
<atmosx> pagios: you iterate through the array, picking up the entries that match the requested sequence
<pagios> yes
<atmosx> or you handle the job to a database :-)
Jiyuhen has joined #ruby
<atmosx> or an ORM will do it for you (very quickly) if the array has thousands of elements
wottam has joined #ruby
<pagios> orm?
Musashi007 has quit [Quit: Musashi007]
lkba has quit [Ping timeout: 246 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RedStripeBot has joined #ruby
Musashi007 has joined #ruby
<atmosx> object relational mapping -> practically it translates SQL to ruby methods (or any other langauge)
techsethi has quit [Quit: techsethi]
vim_shimm has joined #ruby
SouL has quit [Ping timeout: 248 seconds]
<atmosx> by creating classes of objects that carry out data. Then you perform opertions on this data using ruby methods, e.g. Prescriptions.first(name: 'John') # => {:name => 'John', :surname => 'Redford', :age => 19', etc.}
bricker has quit [Quit: leaving]
<atmosx> pagios: you want this orm thing, only if you application interacts with a database.
<gr33n7007h> atmosx: you could of used Robert ;)
<atmosx> gr33n7007h: true :-P
phreakocious has quit [Ping timeout: 246 seconds]
<atmosx> anyway gonna take a shower and go for some walk. Cya ppl
Notte has joined #ruby
SouL has joined #ruby
<gr33n7007h> c u later
phreakocious has joined #ruby
SouL has quit [Read error: Connection reset by peer]
michael_mbp has quit [Excess Flood]
vim_shimm has quit [Ping timeout: 264 seconds]
sivsushruth has quit [Read error: Connection reset by peer]
michael_mbp has joined #ruby
davispuh has quit [Remote host closed the connection]
sivsushruth has joined #ruby
SouL has joined #ruby
valkyrka has joined #ruby
<gr33n7007h> !urban ruby
<RedStripeBot> That mysterious girl that you saw once, but don't know whether you'll see her again. nice hair!
<gr33n7007h> !urban python
<RedStripeBot> Python is a powerful high-level interpreted language. Python's design is notably clean, elegant, and well thought through; it tends to attract the sort of programmers who find Perl grubby and exiguous.
sivsushruth has quit [Read error: Connection reset by peer]
techsethi has joined #ruby
Feyn has joined #ruby
max96at|off is now known as max96at
sivsushruth has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
SouL has quit [Ping timeout: 265 seconds]
davispuh has joined #ruby
RegulationD has joined #ruby
fgo has joined #ruby
sivsushruth has joined #ruby
towski_ has quit [Remote host closed the connection]
Dakuan has quit [Remote host closed the connection]
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wottam has joined #ruby
wottam has quit [Client Quit]
Dakuan has joined #ruby
senayar has joined #ruby
Musashi007 has quit [Quit: Musashi007]
RegulationD has quit [Ping timeout: 250 seconds]
senayar has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 255 seconds]
Musashi007 has joined #ruby
alexherbo2 has quit [Quit: WeeChat 1.1.1]
flcn has joined #ruby
jimms has quit [Remote host closed the connection]
tvw has joined #ruby
senayar has joined #ruby
pwnz0r has quit [Remote host closed the connection]
hpoydar has joined #ruby
netside has quit [Quit: Leaving]
sivsushruth has quit [Read error: Connection reset by peer]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
uber has quit [Quit: bye]
sivsushruth has joined #ruby
jimms has joined #ruby
hpoydar has quit [Ping timeout: 252 seconds]
<hanmac> gr33n7007h: imo ruby is like pythons evil twin sister ;P
terlar has quit [Read error: Connection reset by peer]
<gr33n7007h> hanmac: yeah, haha
<wasamasa> and perl is the crazy one?
alexherbo2 has joined #ruby
aimada has joined #ruby
<gr33n7007h> !urban perl
<RedStripeBot> pur'-el (n) 1. Computer programming language used mostly by male virgins, between the ages of 17 and 35, who are also well versed in the Lord Of The Rings stories.
<hanmac> gr33n7007h: about ruby = "That mysterious girl that you saw once" reminds me ... i wanted to watch a movie named "Ruby Sparks" ... checkout the trailer ;P
<gr33n7007h> hanmac: will do ;)
wottam has joined #ruby
uber has joined #ruby
uber is now known as Guest69530
<hanmac> gr33n7007h: "pur'-el" looks like some kind of goa'uld slang ;P
<gr33n7007h> hanmac: looks good :)
uber has joined #ruby
kapott has joined #ruby
kapott has quit [Excess Flood]
kapott has joined #ruby
xcombelle has joined #ruby
anarang has quit [Ping timeout: 244 seconds]
sivsushruth has quit [Read error: Connection reset by peer]
Takle has quit [Remote host closed the connection]
stef204 has joined #ruby
sivsushruth has joined #ruby
dc has joined #ruby
kapott has quit [Client Quit]
sivsushruth has quit [Read error: Connection reset by peer]
stef204 has quit [Client Quit]
arup_r has joined #ruby
sivsushruth has joined #ruby
jlast has joined #ruby
<gr33n7007h> DeBot: !hangman ruby
<DeBot> ␣␣␣␣␣␣␣␣␣␣␣␣␣ [] 0/12
<gr33n7007h> DeBot: aeiou
<DeBot> ␣␣oa␣␣i␣␣␣e␣␣ [u] 1/12
<wasamasa> DeBot: r
<DeBot> ␣␣oa␣␣i␣␣␣e␣␣ [ur] 2/12
<gr33n7007h> DeBot: #
<DeBot> ␣␣oa␣#i␣␣␣e␣␣ [ur] 2/12
<gr33n7007h> DeBot: f
<DeBot> F␣oa␣#i␣␣␣e␣␣ [ur] 2/12
<gr33n7007h> DeBot: l
<DeBot> Floa␣#i␣␣␣e␣␣ [ur] 2/12
<gr33n7007h> DeBot: lt
<DeBot> Float#i␣␣␣e␣t [ur] 2/12
benlieb_ has joined #ruby
<gr33n7007h> DeBot: n
<DeBot> Float#in␣␣e␣t [ur] 2/12
<gr33n7007h> DeBot: s
<DeBot> Float#ins␣e␣t [ur] 2/12
<gr33n7007h> DeBot: p
<DeBot> Float#inspe␣t [ur] 2/12
<gr33n7007h> DeBot: c
<DeBot> Float#inspect [ur] 2/12 You won!
<gr33n7007h> DeBot: !hangman ruby
<DeBot> ␣␣␣␣␣␣␣␣␣␣␣␣␣␣ [] 0/12
<gr33n7007h> DeBot: aeiou
<DeBot> ␣e␣␣␣␣␣␣␣␣␣ea␣ [iou] 3/12
<gr33n7007h> DeBot: #
<DeBot> ␣e␣␣␣␣␣␣␣#␣ea␣ [iou] 3/12
<gr33n7007h> DeBot: r
<DeBot> ␣e␣␣␣␣␣␣␣#␣ea␣ [iour] 4/12
<gr33n7007h> DeBot: s
<DeBot> ␣e␣␣␣␣␣␣␣#␣ea␣ [iours] 5/12
<gr33n7007h> DeBot: t
<DeBot> ␣et␣␣␣TT␣#␣ea␣ [iours] 5/12
<gr33n7007h> DeBot: h
<DeBot> ␣et␣␣HTT␣#hea␣ [iours] 5/12
<gr33n7007h> DeBot: p
<DeBot> ␣et␣␣HTTP#hea␣ [iours] 5/12
krisquigley has joined #ruby
<gr33n7007h> DeBot: n
<DeBot> Net␣␣HTTP#hea␣ [iours] 5/12
<gr33n7007h> DeBot: :
<DeBot> Net::HTTP#hea␣ [iours] 5/12
<gr33n7007h> DeBot: d
<DeBot> Net::HTTP#head [iours] 5/12 You won!
stef204 has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
sivsushruth has quit [Read error: Connection reset by peer]
<gr33n7007h> I'll know Ruby's entire infrastructure in no time ;p
juanpablo__ has joined #ruby
sivsushruth has joined #ruby
bruno- has joined #ruby
krisquigley has quit [Ping timeout: 265 seconds]
techsethi has quit [Quit: techsethi]
lkba has joined #ruby
serivich has joined #ruby
merqlove has joined #ruby
airdisa has joined #ruby
roolo has joined #ruby
plashchynski has joined #ruby
* gr33n7007h stop using apostrophies where not needed
juanpablo__ has quit [Ping timeout: 248 seconds]
blackmesa has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
aimada has quit [Ping timeout: 255 seconds]
techsethi has joined #ruby
bluOxigen has joined #ruby
techsethi has quit [Client Quit]
airdisa has quit [Ping timeout: 264 seconds]
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ghr has joined #ruby
jerematic has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jonr22 has joined #ruby
ghr has quit [Ping timeout: 265 seconds]
jerematic has quit [Ping timeout: 248 seconds]
anarang has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
Zai00 has quit [Quit: Zai00]
andre0991 has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
sivsushruth has joined #ruby
<andre0991> Hey guys, I'm creating a class with methods a, b, and c, let's say. There are also the methods a_print, b_print and c_print. The former do some math stuff and return an array of coefficients; the latter prints the equations with the right coefficients.
andre0991 is now known as anpt
<anpt> The user inputs in stdin the kind of method he or she wants to execute (a, b or c) and it executes it, printing the equation. But the method can raise an exeption. What I don't now how to do properly is to execute the print method for the chosen method *only if* the calculation was done correcly (without raising an exeption). What's the proper way of doing that? I read some tutorials about exceptions but none of them explains the flow of the pro
<anpt> cess.
aswen has quit [Ping timeout: 248 seconds]
sandelius has joined #ruby
Guest69530 has quit [Changing host]
Guest69530 has joined #ruby
Guest69530 is now known as over
<Mon_Ouie> If you just do 'a_print(a)', a_print will only be executed if a doesn't raise an exception
<jhass> anpt: if an exception is raised, it jumps straight to the next matching rescue clause, statements in between are not executed
Jiyuhen has quit [Ping timeout: 272 seconds]
jheg has joined #ruby
<anpt> Mon_Ouie: thanks, I'll try that
<anpt> jhass: ops, sorry, actually I used just begin/rescue
<jhass> anpt: that's okay
<jhass> begin; raises; not_executed; rescue; handle_exception; ensure; run_in_any_case; end;
AlexRussia has quit [Ping timeout: 250 seconds]
sdothum has joined #ruby
Musashi007 has quit [Quit: Musashi007]
arietis has joined #ruby
<anpt> jhass: Right. Thank you.
sevenseacat has joined #ruby
Musashi007 has joined #ruby
over has quit [Quit: bye]
serivich has quit [Ping timeout: 252 seconds]
livcd has quit [Changing host]
livcd has joined #ruby
Rephiax has quit [Ping timeout: 252 seconds]
akers has joined #ruby
Dakuan has quit [Remote host closed the connection]
fgo has joined #ruby
<sandelius> Exactly what does this mean: "DOM transformations that are idempotent are best" ? English is not my native language
coinjunkie has left #ruby [#ruby]
bruno- has joined #ruby
Musashi007 has quit [Quit: Musashi007]
sevenseacat has quit []
nfk has joined #ruby
Dakuan has joined #ruby
<aep> sandelius: thats a fancy math term for 'side effect free'
AlexRussia has joined #ruby
<sandelius> aep ahh ok. Thx
<sandelius> fancy words :)
Takle has joined #ruby
sch1zo has quit [Quit: Verlassend]
uber2 has joined #ruby
fgo has quit [Ping timeout: 272 seconds]
_64k has joined #ruby
Zai00 has joined #ruby
<anpt> jhass: the thing is that printing is defined in another method. Mon_Ouie: the problem is that the print method takes 2 arguments. Well, I can use a_print(a[0],a[1]), is this bad? I can assume that "a" will be executed just once, right?
bruno- has quit [Ping timeout: 264 seconds]
Dakuan has quit [Ping timeout: 252 seconds]
<jhass> anpt: no, it would be executed twice
<jhass> that it is defined in another method doesn't change anything about my note
<apeiros> sevenseacat1: mind a pm?
<jhass> to not run it twice either assign the result to a local variable a_result = a
sevenseacat1 has quit [Remote host closed the connection]
<jhass> or use a splat for direct passing: print_a(*a)
benlieb_ has quit [Quit: benlieb_]
<akers> catching conversation way late... are named arguments something you're perhaps looking for?
teddyp1cker has joined #ruby
uber2 has quit [Quit: bye]
ube- has joined #ruby
akers has quit [Quit: leaving]
mark[oz] has quit []
ube- has quit [Remote host closed the connection]
plashchynski has quit [Quit: plashchynski]
jlast has joined #ruby
<anpt> jhass: cool, I didn't know about splat. It doesn't work for me here because print_a(*a) fails when a executes the rescue part. So, back to the other way: for example, var1, var2 = a is what I was trying to do (and then, on the next line, print_a(var1,var2)). The problem is that the print method is executed anyway. I think I didn't get what you said to avoid executing the next line
<jhass> don't rescue inside a
<jhass> rescue outside a
<jhass> begin; result = a; print_a(*result); rescue FooError; puts "Nope"; end;
<anpt> jhass: Ah, right. Thank you very much.
jlast has quit [Ping timeout: 256 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<gr33n7007h> >> begin result = 1/0; puts result; rescue ZeroDivisionError; puts "can't divide by 0 silly"; end
<eval-in_> gr33n7007h => can't divide by 0 silly ... (https://eval.in/305982)
<gr33n7007h> >> begin result = 10/2; puts result; rescue ZeroDivisionError; puts "can't divide by 0 silly"; end
<eval-in_> gr33n7007h => 5 ... (https://eval.in/305983)
phutchins has joined #ruby
plashchynski has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
sivsushruth has joined #ruby
Notte has quit [Remote host closed the connection]
phutchins has quit [Ping timeout: 255 seconds]
vim_shimm has joined #ruby
Dakuan has joined #ruby
RegulationD has joined #ruby
digitalextremist has quit [Ping timeout: 264 seconds]
Notte has joined #ruby
jcromartie has joined #ruby
Notte has quit [Client Quit]
_64k has quit [Ping timeout: 248 seconds]
vim_shimm has quit [Ping timeout: 250 seconds]
xukdnv has joined #ruby
relix has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
Jackneill has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
riotjones has joined #ruby
hpoydar has joined #ruby
fgo has joined #ruby
tobacco_joe has joined #ruby
gr33n7007h has quit [Quit: WeeChat 1.1.1]
gr33n7007h has joined #ruby
serivich has joined #ruby
riotjones has quit [Ping timeout: 248 seconds]
hpoydar has quit [Ping timeout: 244 seconds]
A205B064 has quit [Ping timeout: 265 seconds]
bluOxigen has quit [Ping timeout: 246 seconds]
arietis has quit [Quit: Leaving.]
gr33n7007h has quit [Quit: WeeChat 1.1.1]
gr33n7007h has joined #ruby
kblake has joined #ruby
arietis has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
airdisa has joined #ruby
DLSteve has joined #ruby
kyrylo has joined #ruby
* gr33n7007h thinks nyancat in pry is awesome ^_^
stef204 has quit [Ping timeout: 252 seconds]
<wasamasa> wat
<ytti> i wish pry would split into pry-cli and pry-lib
<ytti> so that i could use slop 4
<gr33n7007h> gem i nyancat then in pry type nyan-cat
tobacco_joe has quit [Ping timeout: 248 seconds]
tobacco_joe has joined #ruby
plashchynski has quit [Quit: plashchynski]
kblake has quit [Ping timeout: 252 seconds]
SouL has joined #ruby
sandelius has joined #ruby
bruno- has joined #ruby
airdisa has quit [Ping timeout: 264 seconds]
hiyosi has joined #ruby
digitalextremist has joined #ruby
jerematic has joined #ruby
SouL has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 252 seconds]
jcromartie has quit [Quit: Textual IRC Client: www.textualapp.com]
krisquigley has joined #ruby
<Mon_Ouie> What exactly would be in pry-cli but not in pry-lib? Commands like ls, etc. rely on Slop.
jerematic has quit [Ping timeout: 272 seconds]
arietis has quit [Quit: Leaving.]
plashchynski has joined #ruby
kyrylo has quit [Ping timeout: 246 seconds]
kyrylo_ has joined #ruby
juanpablo__ has joined #ruby
jimms has quit [Remote host closed the connection]
bronson has joined #ruby
krisquigley has quit [Ping timeout: 244 seconds]
SouL has joined #ruby
_64k has joined #ruby
juanpablo__ has quit [Ping timeout: 252 seconds]
Spami has quit [Quit: This computer has gone to sleep]
kyrylo__ has joined #ruby
jlast has joined #ruby
bronson has quit [Ping timeout: 255 seconds]
kyrylo_ has quit [Ping timeout: 272 seconds]
kirun has joined #ruby
jlast has quit [Ping timeout: 256 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
plashchynski has quit [Quit: plashchynski]
stef204 has joined #ruby
_hollywood has quit [Quit: Leaving]
_64k has quit [Ping timeout: 248 seconds]
jonr22 has joined #ruby
DexterLB has quit [Quit: So long and thanks for all the fish]
jonr22 has quit [Ping timeout: 246 seconds]
sigurding has joined #ruby
DexterLB has joined #ruby
charliesome has joined #ruby
_1_ranvijay has joined #ruby
pyr0commie has joined #ruby
<_1_ranvijay> Any female like sex.chat??
_1_ranvijay was kicked from #ruby by apeiros [wrong channel]
pyr0commie has quit [Remote host closed the connection]
<wasamasa> lol
ascarter has joined #ruby
millerti has joined #ruby
Feyn has quit [Quit: Leaving]
Guest58021 has quit [Quit: Page closed]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
towski_ has joined #ruby
ghostpl_ has quit [Remote host closed the connection]
banister has joined #ruby
merqlove has quit [Quit: Connection closed for inactivity]
flcn has quit [Quit: Be back later ...]
tier has joined #ruby
towski_ has quit [Ping timeout: 256 seconds]
twistedpixels has quit [Ping timeout: 252 seconds]
blackmesa has quit [Ping timeout: 245 seconds]
stef204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
twistedpixels has joined #ruby
DavidDudson has joined #ruby
Crisix has joined #ruby
ToApolytoXaos has joined #ruby
edwinvdgraaf has joined #ruby
Crisix has quit [Max SendQ exceeded]
blackmesa has joined #ruby
hpoydar has joined #ruby
kyrylo__ is now known as kyrylo_
kyrylo_ is now known as kyrylo
DavidDudson has quit [Ping timeout: 256 seconds]
airdisa has joined #ruby
tier has quit []
hpoydar has quit [Ping timeout: 246 seconds]
mengu has joined #ruby
mengu has joined #ruby
<shevy> :)
<shevy> those nicks always have a leading number somewhere
fgo has quit [Quit: WeeChat 1.1.1]
ToApolytoXaos has left #ruby ["Leaving the channel."]
anpt has quit [Remote host closed the connection]
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 36.0.4/2015032000]]
ndrei has joined #ruby
mostlybadfly has joined #ruby
oo_ has joined #ruby
AlexRussia has quit [Ping timeout: 272 seconds]
colorados has quit [Ping timeout: 248 seconds]
blackmesa has quit [Quit: WeeChat 1.1.1]
Rephiax has joined #ruby
hornairs has joined #ruby
bronson has joined #ruby
airdisa has quit [Remote host closed the connection]
hornairs has quit [Client Quit]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
airdisa has joined #ruby
jenrzzz has joined #ruby
basiclaser has joined #ruby
blackmesa has joined #ruby
bruno- has joined #ruby
jlast has joined #ruby
Darryl___ has quit [Quit: Connection closed for inactivity]
bronson has quit [Ping timeout: 244 seconds]
sigurding has quit [Quit: sigurding]
airdisa has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
RegulationD has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
_64k has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
DexterLB has quit [Quit: So long and thanks for all the fish]
jlast has joined #ruby
Rephiax has quit []
Crisix has joined #ruby
Crisix has quit [Remote host closed the connection]
lavros has joined #ruby
vim_shimm has joined #ruby
anarang has quit [Quit: Leaving]
jlast has quit [Ping timeout: 265 seconds]
tus has joined #ruby
sevenseacat has joined #ruby
vim_shimm has quit [Ping timeout: 256 seconds]
Spami has joined #ruby
tobacco_joe has quit [Remote host closed the connection]
_64k has quit [Ping timeout: 252 seconds]
SouL has quit [Remote host closed the connection]
juanpablo__ has joined #ruby
_honning_ has joined #ruby
Nahra has quit [Remote host closed the connection]
Papierkorb_ has joined #ruby
juanpablo__ has quit [Ping timeout: 255 seconds]
ghostpl_ has joined #ruby
kblake has joined #ruby
reinaldob has joined #ruby
serivich has quit [Ping timeout: 244 seconds]
palms has joined #ruby
reinaldob has quit [Remote host closed the connection]
ghostpl_ has quit [Ping timeout: 256 seconds]
kblake has quit [Ping timeout: 246 seconds]
jerematic has joined #ruby
DexterLB has joined #ruby
tobacco__ has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
Darryl___ has joined #ruby
arietis has joined #ruby
senayar has quit [Remote host closed the connection]
krisquigley has joined #ruby
jerematic has quit [Ping timeout: 264 seconds]
arietis has quit [Client Quit]
hpoydar has joined #ruby
Akagi201 has joined #ruby
_russellb has joined #ruby
_russellb has quit [Client Quit]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krisquigley has quit [Ping timeout: 246 seconds]
hpoydar has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
DLSteve has quit [Quit: Textual IRC Client: www.textualapp.com]
claw has quit [Ping timeout: 244 seconds]
Papierkorb__ has joined #ruby
ndrei has quit [Ping timeout: 248 seconds]
claw has joined #ruby
mitchellhenke has joined #ruby
paradoja has joined #ruby
ndrei has joined #ruby
Papierkorb_ has quit [Ping timeout: 256 seconds]
siaw23 has joined #ruby
jonr22 has joined #ruby
lkba has quit [Ping timeout: 245 seconds]
relix has joined #ruby
bronson has joined #ruby
<siaw23> good people, i have this. https://gist.github.com/siaw23/3c19119f1333439c12ba it loops through ALL the array elements. i want to just call on which hash item i need, to work on. example i want to be able to call capital(countries)[0] to it spits Ghana and Accra instead. how do i do this?
airdisa has joined #ruby
serivich has joined #ruby
<apeiros> hi siaw23
<apeiros> in `capital(countries)[0]`, the `[0]` is a method call on the result of `capital(countries)`. since capital already prints, it's too late.
<apeiros> you could do: `capital(countries[0,1])`, this passes only a subset of your countries array to the capital() method.
jonr22 has quit [Ping timeout: 265 seconds]
centrx has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
lxsameer has quit [Ping timeout: 245 seconds]
Takle has quit [Remote host closed the connection]
lxsameer has joined #ruby
DEA7TH has quit [Ping timeout: 272 seconds]
iamjarvo has joined #ruby
agrinb has joined #ruby
airdisa has quit [Ping timeout: 256 seconds]
pandaant has quit [Remote host closed the connection]
<siaw23> apeiros: it’s not too late. the clue to the solution suggests i use capita(countries)[0] to call ONLY the country capital of ONLY the first hash item in the array
Soda has joined #ruby
<apeiros> siaw23: you don't have to believe me. doesn't change that what I said is true.
jlast has joined #ruby
enebo has joined #ruby
mitchellhenke has quit [Quit: Computer has gone to sleep.]
chris[] has quit [Ping timeout: 264 seconds]
amystephen has joined #ruby
jlast has quit [Ping timeout: 256 seconds]
christiandsg has joined #ruby
bronson has joined #ruby
nettoweb has joined #ruby
RegulationD has joined #ruby
_64k has joined #ruby
xcombelle has quit [Remote host closed the connection]
jwingfi has joined #ruby
jwingfi has quit [Remote host closed the connection]
christiandsg has quit [Remote host closed the connection]
pandaant has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
phutchins has joined #ruby
Sawbones has joined #ruby
Sawbones has quit [Remote host closed the connection]
Sawbones has joined #ruby
hanmac has quit [Ping timeout: 246 seconds]
Takle has joined #ruby
phutchins has quit [Ping timeout: 272 seconds]
ghostpl_ has joined #ruby
sandelius has joined #ruby
Sawbones has quit [Ping timeout: 244 seconds]
valkyrka has quit [Ping timeout: 256 seconds]
_honning_ has quit [Ping timeout: 244 seconds]
pandaant has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
edwinvdgraaf has quit [Remote host closed the connection]
reinaldob has joined #ruby
edwinvdgraaf has joined #ruby
ghostpl_ has quit [Ping timeout: 246 seconds]
oo_ has joined #ruby
plashchynski has joined #ruby
Vivex has joined #ruby
Pupeno has joined #ruby
willharrison has joined #ruby
ddarkpassenger has joined #ruby
reinaldob has quit [Ping timeout: 246 seconds]
<ddarkpassenger> I have and array [0xfc, 0xb4, 0x74, 0x70, 0x29, 0xa2, 0xd7, 0x37, 0xa1, 0x99, 0x0f, 0x9c, 0x13, 0x70, 0x6f, 0xd2, 0x57, 0xe0, 0x07, 0x66] and i want to transform into a hex string fcb4747029a2d737a1990f9c13706fd257e00766
<ddarkpassenger> how do I do this in ruby?
<jhass> ddarkpassenger: with Array#pack
_honning_ has joined #ruby
<apeiros> >> [0xfc, 0xb4, 0x74, 0x70, 0x29, 0xa2, 0xd7, 0x37, 0xa1, 0x99, 0x0f, 0x9c, 0x13, 0x70, 0x6f, 0xd2, 0x57, 0xe0, 0x07, 0x66].pack("C*").unpack("H*").first
<eval-in_> apeiros => "fcb4747029a2d737a1990f9c13706fd257e00766" (https://eval.in/306010)
juanpablo__ has joined #ruby
<apeiros> I don't think there's a direct Array#pack instruction
<apeiros> ddarkpassenger: ^
<jhass> >> [0xfc, 0xb4, 0x74, 0x70, 0x29, 0xa2, 0xd7, 0x37, 0xa1, 0x99, 0x0f, 0x9c, 0x13, 0x70, 0x6f, 0xd2, 0x57, 0xe0, 0x07, 0x66].pack("H*")
<eval-in_> jhass => no implicit conversion of Fixnum into String (TypeError) ... (https://eval.in/306011)
<jhass> heh
<ddarkpassenger> apeiros: thank you, I was trying to do with a single instruction and was having issues
edwinvdg_ has joined #ruby
Papierkorb__ is now known as Papierkorb
bronson has quit [Remote host closed the connection]
mhib has joined #ruby
juanpablo__ has quit [Ping timeout: 246 seconds]
edwinvdgraaf has quit [Ping timeout: 246 seconds]
plashchynski has quit [Quit: plashchynski]
Sawbones has joined #ruby
Aswebb_ has joined #ruby
jheg has quit [Quit: jheg]
ArchRogem has joined #ruby
Pharaoh2_ has joined #ruby
jerematic has joined #ruby
ArchRogem has quit [Client Quit]
plashchynski has joined #ruby
davedev24_ has joined #ruby
Pharaoh2 has quit [Ping timeout: 255 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Dakuan has quit [Remote host closed the connection]
jerematic has quit [Ping timeout: 256 seconds]
aryaching has joined #ruby
colorados has joined #ruby
Sawbones has quit [Remote host closed the connection]
lkba has joined #ruby
_honning_ has quit [Ping timeout: 245 seconds]
relix has quit [Ping timeout: 272 seconds]
relix_ has joined #ruby
relix has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
arietis has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 1.1.1]
relix_ has quit [Ping timeout: 252 seconds]
psy_ has joined #ruby
Sawbones has joined #ruby
gsd has joined #ruby
jcs has joined #ruby
jcs has left #ruby [#ruby]
tobacco__ has quit []
jlast has joined #ruby
tobacco_joe has joined #ruby
vim_shimm has joined #ruby
Guest77_ has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
vim_shimm has quit [Ping timeout: 245 seconds]
blackmesa has joined #ruby
Sawbones has quit [Remote host closed the connection]
Guest86976 has joined #ruby
_64k has quit [Ping timeout: 250 seconds]
<Guest86976> hey guys... I am trying to build an XML with nokogiri that has a nesting that is 140 levels deep and I am running into some problems. After 127 levels it seems that the xml starts to be trimmed
OrbitalKitten has joined #ruby
<Guest86976> can anyone have a look? I am not sure if I am messing something up, or if there is some issue with nokogiri
kblake has joined #ruby
<Guest86976> expected result is something like... <root><count>0</count><myList><root><count>1</count><myList><root><count>2 ... until 140
tus has quit []
<centrx> Why are you building it 140 levels deep?
<bradland> hrm. suspicious that it's near 2^7.
Takle has quit [Remote host closed the connection]
hmsimha has joined #ruby
<centrx> and using recursion
<centrx> so it might not have anything to do with the XML or Nokogiri
bradleyprice has joined #ruby
<centrx> Hard to say without any error message
<centrx> oh well
<Guest86976> there are no error messages
<Guest86976> the script runs fine until the end
arietis has quit [Quit: Leaving.]
<Guest86976> but the result just shows count from 0 to 127
siaw23 has left #ruby [#ruby]
<centrx> What are you really trying to do? 140 recursions or 140 nested XML levels seems like bad design
<Guest86976> I wanna be able to build xmls as deep as requested
<Guest86976> this will be used in a fuzzer
krisquigley has joined #ruby
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kblake has quit [Ping timeout: 244 seconds]
<Guest86976> so i need to be able to have more than those 128 levels of nesting
<centrx> I see
plashchynski has quit [Quit: plashchynski]
<bradland> this is super bizarre
hpoydar has joined #ruby
<bradland> the XML is valid, but it's missing nodes that should be there
<bradland> Guest86976: have you tried it from the other direction?
<Guest86976> exactly... that is really weird... it looks like some issue with nokogiri, but I am not sure
jenrzzz has joined #ruby
<bradland> as in, start with a document that is 140 nodes deep and try parsing it with nokogiri
<Guest86976> hmm... haven't tried that
kubunto has joined #ruby
<jhass> well, nokogiri just is a libxml2 binding, that's something to keep in mind
ghostpl_ has joined #ruby
charliesome has quit [Quit: zzz]
<Guest86976> jhass: are you aware of any limitations on libxml2 related to the depth of nesting?
<Guest86976> I wasn't aware nokogiri was a libxml2 binding
oo_ has quit [Remote host closed the connection]
<bradland> it definitely is
<jhass> no, just saying when researching, such limitations for libxml2 would be relevant
stef204 has joined #ruby
<Guest86976> yeah I'll google for that
tubuliferous has joined #ruby
<bradland> i'm doing some searching for /(libxml2|nokogiri) node depth limit/ and not coming up with much at all
mistermocha has joined #ruby
krisquigley has quit [Ping timeout: 244 seconds]
airdisa has joined #ruby
<kubunto> is it possible to require a file dynamically?
<bradland> "dynamically" is a word that business people use
<bradland> is it possible to require a file based on a condition? yes
<apeiros> kubunto: require is an ordinary method
<apeiros> so yes
<kubunto> sweet
<bradland> is it possible to require a file where the name is stored in a variable? yes
<apeiros> you can pass in variables as arguments, you can put require itself within conditions - whatever your heart desires.
hanmac has joined #ruby
<kubunto> bradland: thats what i wanted to do
<bradland> ok cool
hpoydar has quit [Ping timeout: 272 seconds]
arietis has joined #ruby
<bradland> not trying to be a jerk, but refining the language you use will get you better results :)
<bradland> also, i am as bad about that as anyone!
jenrzzz has quit [Ping timeout: 256 seconds]
<kubunto> noted
<kubunto> (the advice that is)
<shevy> (we use lisp now)
plashchynski has joined #ruby
<bradland> i'm not sure there are nearly enough paren for any of that to qualify as lisp
sevenseacat has quit [Remote host closed the connection]
airdisa has quit [Ping timeout: 265 seconds]
mistermocha has quit [Ping timeout: 265 seconds]
ghostpl_ has quit [Ping timeout: 272 seconds]
<bradland> in that XML code that guest posted, there is this: builder.to_xml.split("\n")[1..-1].join("\n")
<bradland> why split by newlines only to join by newlines? or does that do something i don't understand?
banister has joined #ruby
banister has quit [Max SendQ exceeded]
<bradland> nm
<bradland> [1..-1]
<jhass> .drop(1), yeah
<Guest86976> bradland: removing the first line
<bradland> mental off-by-one error. derp.
<jhass> 1-index all the things!
<Guest86976> i am pretty new to ruby... is there a better way to do that?
aryaching has quit [Ping timeout: 265 seconds]
<bradland> the method you've used isn't bad, IMO
<centrx> [1..-1] is probably the best for a one-liner
<bradland> i don't think you need the explicity "\n" in the last join though
<bradland> i think that's the default for Array#join
enebo has quit [Quit: enebo]
<bradland> that's a really minor nitpick though
<jhass> nope
<jhass> the default is empty string
bronson has joined #ruby
<jhass> and as already written, the alternative to [1..-1] is .drop(1)
<Guest86976> jhass: is drop(1) preferred? or are both equally accepted?
<jhass> I have no idea why you drop the line just to add it manually though
zzing has joined #ruby
<jhass> I see both equally
<bradland> drop(1) strikes me as more "literate", if you're in to that kind of thing
<bradland> literate meaning, it reads like a sentence
<waxjar> string[string.index("\n)..-1] :D
<Guest86976> there is a hardlimit set in libxml2 source code
<Guest86976> for a max depth of 128
<bradland> derp
<bradland> 2^7 dawg
<bradland> 7 bits ought to be enough for anyone
<Guest86976> for depths greater than that I need to activate XML_PARSE_HUGE
<jhass> I mean it's enough for ascii right?
<Guest86976> but I just found that info in the source code
dc has quit [Remote host closed the connection]
<jhass> all freedom of expression a human will ever need!
<bradland> seems exceedingly relevant that this is for a fuzzer now lol
<Guest86976> jhass: i drop it because ecery level of recursion would add the <?xml ...
jonr22 has joined #ruby
jheg has joined #ruby
<Guest86976> so I would have <myList><?xml ...><myList><?xml ...
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> oh, wasn't there something with Fragment?
<Guest86976> guess I'll just build the xml manually :(
bronson has quit [Ping timeout: 244 seconds]
airdisa has joined #ruby
<Guest86976> bradland: i am not sure how to use that information
<bradland> me either lol
<bradland> it looks like they implemented something for XML_PARSE_HUGE
<bradland> it's part of Nokogiri::ParseOptions
<bradland> but i'm looking at the docs, and still scratching my head
jph98 has joined #ruby
<Guest86976> think I found it
<Guest86976> yeah, that is almost the same hehe
jonr22 has quit [Ping timeout: 246 seconds]
<Guest86976> thanks
banister has joined #ruby
<Guest86976> i'll give it a try
<bradland> yeah, you add ParseOptions::HUGE to config.options
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bradland> that's for parsing though :\
<bradland> dunno how you're going to use this in a writing context
valkyrka has joined #ruby
jamto11 has joined #ruby
thinkswan has quit [Remote host closed the connection]
zorak8 has joined #ruby
<Guest86976> yeah I can't find anything for the xml builder
<Guest86976> :(
ParSalian has quit [Quit: WeeChat 1.0.1]
ParSalian has joined #ruby
<Guest86976> there is an options parameter in the builder initializer
<Guest86976> no explanation on what it accepts though
<bradland> i'm looking at the docs for that initializer as well
<bradland> also, just for the sake of helping you out
<bradland> you should 'gem install pry'
<bradland> then add require 'pry' to the top of your file
<bradland> and on the line right after the builder, put binding.pry
<bradland> and run your script
<Guest86976> let me try
<bradland> you'll get a REPL that you can use to explore the script's context at that point
<Guest86976> cool
<bradland> i'm using that to dig around in the context, looking for something i can use
<bradland> specifically, i'm looking for anything "options" related
flcn has joined #ruby
<Guest86976> i'll give it a shot too... thanks for that :D
jph98 has quit [Quit: jph98]
Dakuan has joined #ruby
<bradland> note that if you put binding.pry inside the loop, you'll have to kill the ruby process from another terminal session
<bradland> you can get the pid from Process.pid inside pry
ndrei has quit [Ping timeout: 256 seconds]
<Guest86976> right... I am in the pry repl
<Guest86976> how do you go about figuring out stuff there/
<Guest86976> I mean, what are you looking for there?
willharrison has joined #ruby
<bradland> i have the same thing open
sigurding has joined #ruby
<bradland> i just wanted to share it with you, because this can be very useful
<bradland> type ls
bricker has joined #ruby
<bradland> it will show you the context
<bradland> you can also "cd" in to objects
<ytti> 18:09 < bradland> note that if you put binding.pry inside the loop, you'll have to kill the ruby process from another terminal session
<ytti> why?
<ytti> 'exit-pro'
<bradland> ytti: there's...
<Guest86976> ahhh that is awesome
<Guest86976> :D
<bradland> was going to say there's probably a command for that, but i don't remember it
valkyrka has quit [Ping timeout: 256 seconds]
<bradland> Guest86976: try cd Nokogiri::XML
<bradland> then ls
<bradland> you can modify the context from within here
<ytti> pry is so great
Dakuan has quit [Ping timeout: 248 seconds]
<bradland> so if you explore around and look for a way to access the config options you need
<bradland> unfortunately, i don't think you're going to find what you need
<bradland> Builder.new takes options, but it just passes them to Document
<bradland> and only Document.parse takes the option you're looking for
<bradland> not Document.new
<bradland> Document.new only takes a version argument :\
Darryl___ has quit [Quit: Connection closed for inactivity]
<Guest86976> =(
<bradland> Guest86976: typing "help" from within pry is also useful
<bradland> heh
<bradland> there's a TON of good stuff in there
<Guest86976> yeah, guess I should have done that hehe
<Guest86976> i'll poke around a little
<Guest86976> if I find a solution I'll let you guys know
<Guest86976> thanks for the help =)
<bradland> sure thing
mrsolo has joined #ruby
mitchellhenke has joined #ruby
jlast has joined #ruby
airdisa has quit [Remote host closed the connection]
Akuma has quit [Quit: So long sukkas!]
airdisa has joined #ruby
OrbitalKitten has quit [Read error: Connection reset by peer]
OrbitalKitten has joined #ruby
ndrei has joined #ruby
banister has quit [Ping timeout: 264 seconds]
jerematic has joined #ruby
<bradland> ok, i followed this thing down the rabbit hole
<bradland> the ParseOptions constants are so cryptic because they get passed as an INT to the libxml2 method htmlReadIO
jenrzzz has joined #ruby
thumpba has joined #ruby
<bradland> which, in my mind, pretty definitively closes out any notion that the ParseOptions can affect writing XML
amclain has joined #ruby
<Guest86976> don't be so pessimistic
<bradland> :P
<Guest86976> :D
<bradland> that just closes the door on ParseOptions :)
<bradland> not everything
airdisa has quit [Ping timeout: 256 seconds]
OrbitalKitten has quit [Client Quit]
jerematic has quit [Ping timeout: 256 seconds]
Takle has joined #ruby
thumpba has quit [Remote host closed the connection]
vdamewood has joined #ruby
<jhass> Guest86976: bradland http://paste.mrzyx.de/pzdgbkdqq generates all 140 levels here
thumpba has joined #ruby
hpoydar has joined #ruby
Channel6 has joined #ruby
<bradland> problem solved
Takle has quit [Remote host closed the connection]
ghr has joined #ruby
<jhass> just tried, can make that well over 1000 without issues
<jhass> takes less than a second too
<bradland> this is a better recursion model too, because it doesn't rely on variables outside the scope of the method definition
dc has joined #ruby
AndyBotwin has joined #ruby
<jhass> I tried an iterative approach first, but the Builder API wouldn't allow that
<Guest86976> bradland: the recursion model in my code was just an example
<jhass> could still instantiate ::Document and :Node's by hand, but meh
<Guest86976> I am recursing based on the items in a list
arietis has quit [Quit: Leaving.]
<bradland> Guest86976: sorry, didn't mean that as a slight
thumpba has quit [Ping timeout: 246 seconds]
<Guest86976> jhass: that looks like a nice solution
<Guest86976> I will try it agains my code
<bradland> i'm horrible at recursion
sevvie has quit [Ping timeout: 250 seconds]
<Guest86976> bradland: =)
AlphaTech has joined #ruby
ominari has quit [Quit: Be back later ...]
gregf1 has quit [Quit: WeeChat 1.0.1]
banister has joined #ruby
gregf1 has joined #ruby
martinbmadsen has joined #ruby
dc has quit [Read error: Connection reset by peer]
dc has joined #ruby
a5i has joined #ruby
roolo has quit [Remote host closed the connection]
spider-mario has joined #ruby
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pontiki_ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
plashchynski has quit [Quit: plashchynski]
willharrison has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pontiki has joined #ruby
towski_ has joined #ruby
OtterCoder has joined #ruby
<pontiki> o/
<bradland> \o
<jhass> \o/
<kubunto> damn too slow
<jhass> you mean:
<jhass> o
<pontiki> o//
<pontiki> |o|
juanpablo__ has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
AlexRussia has joined #ruby
Dakuan has joined #ruby
Dakuan has quit [Remote host closed the connection]
<a5i> - o -
ddarkpassenger has quit [Quit: Page closed]
chris[] has joined #ruby
ascarter has joined #ruby
arrubin has joined #ruby
ghr has quit [Ping timeout: 252 seconds]
nichtdiebohne has joined #ruby
<OtterCoder> It's fun to stay at the \o/ ⸮o? o= /o\
* bradland doveclaps
ghr has joined #ruby
<Guest86976> firefox stops rendering the xml at depth level 98
<Guest86976> sad
<bradland> heh
<pontiki> OtterCoder++
<Guest86976> but the file is created as expected... and if you inspect the xml source you see it all there... it just can't render more levels than that
juanpablo__ has quit [Ping timeout: 246 seconds]
oo_ has joined #ruby
<Guest86976> just wish they would throw an error instead of simply truncating the output
mistermocha has joined #ruby
quimrstorres has joined #ruby
serivich has quit [Ping timeout: 255 seconds]
robustus|Off has joined #ruby
flcn has quit [Quit: Be back later ...]
ghr has quit [Ping timeout: 250 seconds]
robustus has quit [Ping timeout: 255 seconds]
robustus|Off is now known as robustus
oo_ has quit [Ping timeout: 246 seconds]
wookiehangover has quit [Ping timeout: 256 seconds]
mistermocha has quit [Ping timeout: 256 seconds]
DEA7TH has joined #ruby
<shevy> xml
<shevy> this makes me so sad Guest86976
jenrzzz has quit [Ping timeout: 252 seconds]
senayar has joined #ruby
<lxsameer> guys is there any method on Hash to fetch a key value with a symbol. ( even if the same key exists as string )
plashchynski has joined #ruby
<Guest86976> shevy: xml makes everybidy sad
ghr has joined #ruby
gregf1 has quit [Quit: WeeChat 1.0.1]
<Guest86976> xml is just a substitution ciphered way of writing sad
<banister> lxsameer hash with indifferent access
<banister> lxsameer it's a rails thing, google :)
<lxsameer> banister: thanks
<banister> lxsameer absolutely no problem, i enjoyed helping you.
<lxsameer> banister: ;)
xenokiller has joined #ruby
wookiehangover has joined #ruby
senayar has quit [Ping timeout: 252 seconds]
banister_ has joined #ruby
m8 has joined #ruby
banister has quit [Read error: Connection reset by peer]
ghr has quit [Ping timeout: 246 seconds]
quimrstorres has quit [Remote host closed the connection]
<waxjar> instead of dragging in a full blown library, hash[symbol.to_s] would probably work fine too ;)
hpoydar has quit [Remote host closed the connection]
mrsolo has quit [Quit: This computer has gone to sleep]
doodlehaus has joined #ruby
doodlehaus has quit [Remote host closed the connection]
GnuYawk has joined #ruby
thinkswan has joined #ruby
jph98 has joined #ruby
jph98 has quit [Client Quit]
Takle has joined #ruby
havenwood has joined #ruby
jeromelanteri has quit [Remote host closed the connection]
thinkswan has quit [Ping timeout: 256 seconds]
hectortrope has joined #ruby
jimms has joined #ruby
Azure has quit [Excess Flood]
blackmesa has quit [Ping timeout: 248 seconds]
Azure has joined #ruby
banister_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
benlieb_ has joined #ruby
iamninja has quit [Read error: Connection reset by peer]
airdisa has joined #ruby
HakN99 has joined #ruby
michael_mbp has quit [Excess Flood]
iamninja has joined #ruby
michael_mbp has joined #ruby
airdisa_ has joined #ruby
Guest77_ has quit [Ping timeout: 255 seconds]
jerematic has joined #ruby
tohsig has joined #ruby
airdisa__ has joined #ruby
arup_r has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
airdisa has quit [Ping timeout: 265 seconds]
<shevy> or use a wrapper-method
airdisa_ has quit [Ping timeout: 256 seconds]
<shevy> def fetch(i); @hash[i.to_sy]
<shevy> hmmm to_s
<shevy> to_sy now that is a heisenberg method... sometimes it becomes to_s, sometimes to_sym
ghr has joined #ruby
jerematic has quit [Ping timeout: 264 seconds]
jaxxstorm has quit [Quit: ZNC - http://znc.in]
alphaatom has joined #ruby
jaxxstorm has joined #ruby
plashchynski has quit [Quit: plashchynski]
vim_shimm has joined #ruby
razieliyo has joined #ruby
razieliyo has joined #ruby
razieliyo has quit [Remote host closed the connection]
n008f4g_ has quit [Quit: leaving]
ghr has quit [Ping timeout: 256 seconds]
overcrush has joined #ruby
airdisa__ has quit [Ping timeout: 272 seconds]
plashchynski has joined #ruby
krisquigley has joined #ruby
Dakuan has joined #ruby
dc has quit [Remote host closed the connection]
ndrei has joined #ruby
benlieb_ has quit [Quit: benlieb_]
vim_shimm has quit [Ping timeout: 255 seconds]
benlieb_ has joined #ruby
bim has quit [Remote host closed the connection]
Limix has joined #ruby
naftilos76 has joined #ruby
<havenwood> shevy: class Object; def to_sy; self.public_send [:to_sym, :intern, :to_s, :to_str].sample end end
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
paradoja has quit [Remote host closed the connection]
<shevy> :P
<shevy> it was a typo!!!
<havenwood> shevy: it's almost date-appropriate to propose it though
ghostpl_ has joined #ruby
krisquigley has quit [Ping timeout: 265 seconds]
jwinder has joined #ruby
pontiki has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
hpoydar has joined #ruby
<arup_r> how wrapper method saves us in this world ?
paradoja has joined #ruby
hpoydar has quit [Remote host closed the connection]
hpoydar has joined #ruby
HakN99 has quit [Quit: Peace!]
ghostpl_ has quit [Ping timeout: 248 seconds]
ghr has joined #ruby
lidaaa has joined #ruby
overcrush has quit [Remote host closed the connection]
bim has joined #ruby
tobacco_joe has quit []
swgillespie has joined #ruby
leafybas_ has joined #ruby
jonr22 has joined #ruby
leafybasil has quit [Ping timeout: 245 seconds]
ghr has quit [Ping timeout: 265 seconds]
flcn has joined #ruby
max96at is now known as max96at|off
pdoherty has joined #ruby
ki0 has joined #ruby
jonr22 has quit [Ping timeout: 256 seconds]
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hectortrope has quit [Ping timeout: 272 seconds]
pdoherty has quit [Client Quit]
willharrison has joined #ruby
Dakuan has quit [Remote host closed the connection]
<shevy> arup_r so you don't have to memorize using .to_s manually
<jhass> arup_r: shevy want's to reimplement AS:HWIA
iamninja has quit [Read error: Connection reset by peer]
ki0 has quit [Remote host closed the connection]
iamninja has joined #ruby
AlexRussia has quit [Ping timeout: 245 seconds]
bim has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
<shevy> sounds good
senayar has joined #ruby
colorados is now known as brokollka
<shevy> A super healthy wealthy information agency
Cache_Money has joined #ruby
Dakuan has joined #ruby
Zggb has joined #ruby
VBlizzard has joined #ruby
_blizzy_ has quit [Disconnected by services]
AlexRussia has joined #ruby
VBlizzard is now known as _blizzy_
mrsolo has joined #ruby
bim has joined #ruby
xymbol has joined #ruby
<Zggb> Guys. After 3 days php working I'm understanding how I love ruby much
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nichtdiebohne has quit [Ping timeout: 244 seconds]
f3lp has joined #ruby
nichtdiebohne has joined #ruby
palms has quit [Ping timeout: 246 seconds]
<kubunto> hehe
bim has quit [Remote host closed the connection]
tus has joined #ruby
bim has joined #ruby
<OtterCoder> Zggb: After 2 years PHP, I understand ruby love more than ever.
<kubunto> whats so wrong with php?
bradleyprice has quit [Remote host closed the connection]
leafybas_ has quit [Remote host closed the connection]
<arup_r> kubunto: syntax are broken
<arup_r> I saw most of the Rails dev are from PhP only.
palms has joined #ruby
jwinder has quit [Ping timeout: 264 seconds]
<kubunto> ?
iliketurtles has joined #ruby
mengu has quit [Remote host closed the connection]
sandelius has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
<shevy> Zggb haha
<kubunto> arup_r: i dont follow
dfinninger has joined #ruby
<shevy> kubunto what is wrong with PHP -> http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
<shevy> T_PAAMAYIM_NEKUDOTAYIM
arietis has joined #ruby
sevvie has joined #ruby
deol has joined #ruby
palms has quit [Ping timeout: 265 seconds]
<shevy> "Learning the language should not require a complete upheaval of your mental model of the universe. (Sorry, Haskell.)"
<Zggb> I' crazy with settings of developing tools. And versions in compatible in php. I must install php 5.2.17 (2010year), if I want zend optimizer works. May be it's my wrong opinion. But after this -rails is paradise
jack_rabbit has joined #ruby
<arup_r> RUDE
mengu has quit [Ping timeout: 255 seconds]
dfinning_ has joined #ruby
dorei has joined #ruby
arietis has quit [Client Quit]
senayar has quit [Remote host closed the connection]
dfinninger has quit [Ping timeout: 256 seconds]
SouL has joined #ruby
<kubunto> then where does bash fall in comparison to php?
<centrx> bash is probably more logical, everything is compared to PHP natch
<centrx> but the real answer is bash is not really considered a programming language
senayar has joined #ruby
<kubunto> why not?
<centrx> it's shell scripting, bash is a shell not a programming language
<miah> its a command language
<centrx> Of course it's probably Turing complete, but yeah ^
<centrx> cool good link
senayar has quit [Remote host closed the connection]
<miah> this is _bourne_ shell though, not bash =)
mrsolo has quit [Quit: This computer has gone to sleep]
<miah> still though..
<centrx> like the Wrath of Khan, Bourne Again shell is even better!
<miah> bash has weird stuff going on
<kubunto> centrx: i was just writing stuff up in bash and could have easily fooled me to thinking it was a normal script language
<miah> you'd think it was a language
<miah> but stuff like `[` are actually binaries
<miah> $: which [
<miah> /bin/[
<havenwood> test
bim has quit [Remote host closed the connection]
thiagovsk has quit [Quit: Connection closed for inactivity]
airdisa has joined #ruby
<miah> you can certainly script with it
<miah> but its a collection of binaries on your system chained together to do a thing
bim has joined #ruby
juanpablo__ has joined #ruby
naftilos76 has quit [Remote host closed the connection]
<kubunto> ah
albedoa has joined #ruby
relaxedricky has quit [Remote host closed the connection]
jenrzzz has joined #ruby
max96at|off is now known as max96at
jimms has quit [Remote host closed the connection]
max96at is now known as max96at|off
<miah> its fine to consider it a scripting language, its generally pointless to argue about such things =) but keep in mind that its built on commands
<miah> and different systems may implement those commands different
<shevy> [
<shevy> bash: [: missing `]'
<shevy> []
<shevy> bash: []: command not found
<miah> eg, bsd grep vs gnu grep
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
senayar has joined #ruby
<miah> shevy man test =)
airdisa has quit [Ping timeout: 256 seconds]
<dorei> if it's turing complete, then technically it's a programming language :p
<miah> it also expects arguments
<wasamasa> bash is baroque
<miah> dorei: sure
palms has joined #ruby
<shevy> bash complained that there is a missing ]
<miah> ya
<shevy> I added it yet bash still complains :(
<wasamasa> there's actually reasons behind its design decisions
juanpablo__ has quit [Ping timeout: 246 seconds]
<shevy> yeah
<shevy> madness
Synthbread has joined #ruby
<kubunto> shevy: try [ true ]
vim_shimm has joined #ruby
<miah> try, [ 1 -gt 0 ]
<shevy> that's not what the error message said!
<miah> i know
<miah> which is why shell scripting is a awful thing generally
<albedoa> https://gist.github.com/albedoa/0141811ad544e6ec2dbf how can i set hashTwo['one'] to the value of hashOne['one']? in other words, how can i access the key name 'one' from within the key itself?
benlieb_ has quit [Quit: benlieb_]
<shevy> even ruby has better error messages :)
<shevy> perhaps I should switch to zsh
<wasamasa> lol
<kubunto> miah: then the difference between bash and ruby/python/etc is that the others are based on a compiler not on the system itself?
<wasamasa> just use ruby for anything elaborate
<wasamasa> kubunto: bash is not a general-purpose programming language
<havenwood> kubunto: https://github.com/matz/streem
<wasamasa> kubunto: unlike ruby for instance which is designed to do all kinds of things
arietis has joined #ruby
<dorei> kubunto: i'd say that filenames are first-class citizen of bash
<havenwood> kubunto: streem ^ is a new stream-based scripting language by the creator of Ruby. maybe in the future it'll replace bash. ;)
airdisa has joined #ruby
mistermocha has joined #ruby
shredding has joined #ruby
<miah> i hadn't seen streem
<kubunto> dorei: that was why i wanted to use it actually
AlexRussia has quit [Ping timeout: 264 seconds]
dc has joined #ruby
benlieb_ has joined #ruby
bim has quit [Remote host closed the connection]
spiderbyte has joined #ruby
bim has joined #ruby
pwnz0r has joined #ruby
pontiki has joined #ruby
edwinvdg_ has quit [Read error: Connection reset by peer]
edwinvdgraaf has joined #ruby
msgodf has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
yeticry has quit [Ping timeout: 256 seconds]
bim has quit [Remote host closed the connection]
kadoppe has quit [Ping timeout: 252 seconds]
<atmosx> aloha
yeticry has joined #ruby
<miah> moin
AlexRussia has joined #ruby
bim has joined #ruby
kadoppe has joined #ruby
benlieb_ has quit [Quit: benlieb_]
kubunto has quit [Quit: off i go]
Dakuan has quit [Remote host closed the connection]
dc has quit []
Aswebb__ has joined #ruby
ki0 has joined #ruby
xukdnv has quit [Read error: Connection reset by peer]
banister has joined #ruby
Aswebb_ has quit [Ping timeout: 272 seconds]
ki0 has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 256 seconds]
ki0 has joined #ruby
_64k has joined #ruby
Joufflu has joined #ruby
Joufflu has quit [Read error: Connection reset by peer]
cientifico has joined #ruby
ghr has joined #ruby
Joufflu has joined #ruby
gregf1 has joined #ruby
gregf1 has quit [Client Quit]
flcn has quit [Quit: Be back later ...]
bronson has joined #ruby
bim has quit [Remote host closed the connection]
bim has joined #ruby
ki0 has quit [Remote host closed the connection]
sigurding has quit [Quit: sigurding]
sevvie has quit [Ping timeout: 264 seconds]
sevvie has joined #ruby
bim has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 250 seconds]
Cache_Money has quit [Quit: Cache_Money]
<dorei> can visual studio be used for ruby? :O
wottam has joined #ruby
<centrx> That sounds awful
<wasamasa> lol
bim has joined #ruby
_hollywood has joined #ruby
<dorei> visual studio has the best completion engine I've come across, but then I don't think one really needs code completion when doing ruby :)
<wasamasa> indeed
<miah> i generally use vim. but i also had a good experience with Rubymine
<wasamasa> the usual completion of long identifiers I've already typed suffices for me
<wasamasa> I only know of one more intelligent ruby completion system that goes beyond talking to a REPL
bim has quit [Remote host closed the connection]
<wasamasa> and it's written in java ;_;
<miah> intellij has a great completetion engine, and thats what rubymine is built on
Cache_Money has joined #ruby
<wasamasa> someone was brave enough to touch it, but then just wrapped it with a bit of jruby
DexterLB has quit [Quit: So long and thanks for all the fish]
dfinning_ has quit [Remote host closed the connection]
carvantes has joined #ruby
jerematic has joined #ruby
shredding has quit [Ping timeout: 246 seconds]
xymbol has quit [Quit: Lingo: www.lingoirc.com]
Takle has quit [Remote host closed the connection]
lordkryss has joined #ruby
jerematic has quit [Ping timeout: 246 seconds]
willharrison has joined #ruby
bim has joined #ruby
gregf1 has joined #ruby
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 36.0.4/2015032000]]
Takle has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
braincrash has quit [Ping timeout: 272 seconds]
edwinvdgraaf has joined #ruby
braincrash has joined #ruby
krisquigley has joined #ruby
carvantes has quit [Quit: WeeChat 0.4.2]
Notte has joined #ruby
albedoa has quit [Ping timeout: 272 seconds]
flcn has joined #ruby
ndrei has joined #ruby
albedoa has joined #ruby
leafybasil has joined #ruby
ghostpl_ has joined #ruby
krisquigley has quit [Ping timeout: 250 seconds]
Dakuan has joined #ruby
thumpba has joined #ruby
<havenwood> Here's my stab at the Streem FizzBuzz example in Ruby: https://gist.github.com/havenwood/979fbe4b0c07a627c05a
msgodf has quit [Ping timeout: 252 seconds]
triple_b has joined #ruby
<havenwood> Not pretty... but pretty close to the Streem one! Okay, kinda close.
kubunto has joined #ruby
leafybasil has quit [Ping timeout: 256 seconds]
wasamasa has quit [Quit: ZNC - http://znc.in]
swgillespie has joined #ruby
lemur_ has joined #ruby
_64k has quit [Ping timeout: 256 seconds]
bim has quit [Remote host closed the connection]
MasterPiece has joined #ruby
bim has joined #ruby
thumpba has quit [Ping timeout: 255 seconds]
bim has quit [Remote host closed the connection]
TheNet has joined #ruby
wasamasa has joined #ruby
dseitz has joined #ruby
Takle has quit [Remote host closed the connection]
wasamasa has quit [Changing host]
wasamasa has joined #ruby
yqt has joined #ruby
jack_rabbit has quit [Ping timeout: 272 seconds]
Takle has joined #ruby
Takle has quit [Remote host closed the connection]
jonr22 has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wottam has quit [Remote host closed the connection]
<banister> havenwood you're writing some pretty interesting code these days homie
wottam has joined #ruby
Pupeno_ has joined #ruby
jonr22 has quit [Ping timeout: 246 seconds]
wookiehangover has quit [Ping timeout: 265 seconds]
lxsameer has quit [Quit: Leaving]
doodlehaus has joined #ruby
Pupeno has quit [Ping timeout: 265 seconds]
<pipework> I don't get it, havenwood.
vim_shimm has quit [Ping timeout: 255 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
vim_shimm has joined #ruby
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
overcrush has joined #ruby
bim has joined #ruby
<havenwood> banister: :P
MasterPiece has quit [Ping timeout: 265 seconds]
<pipework> banister: A long time ago, I wrote a thing based off a fork of a gist you wrote that would let you keep the code for how the controller handles the response in the controller, but bind to other object. I think I want to clean that up and make it work properly.
<havenwood> pipework: There's no why, if that's the part you don't get. >.>
<banister> pipework cool
<banister> pipework i've been using something like that in production for a while
hpoydar has quit [Remote host closed the connection]
<banister> lemme see if i can find it
<pipework> havenwood: I was just curious if you were just implementing the same thing to output the same thing and look the same, or if there was something else I don't know enough about streem.
<pipework> banister: I'll have it in a sec.
<pipework> whoa, TIL you don't need username in the URL
oo_ has joined #ruby
<banister> pipework i dont think that's valid ruby :P
<pipework> banister: That's why I said that I want to make it work properly.
<banister> seems like you have free-standing blocks
<banister> ah ok
<banister> pipework in case you're interested here's the base class for that gist https://gist.github.com/7e12edfec2cca4e1ff49
bim has quit [Read error: Connection reset by peer]
swgillespie has quit [Read error: Connection reset by peer]
hpoydar has joined #ruby
<pipework> banister: I think I should either add some sugar, don't add sugar and just use a lambda with #call right there, or just not suggest anything and explain you get data from the thing you binded yourself too or whatever.
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<banister> pipework cool, good luck :) it's a fun project
<pipework> banister: Yeah? That's good to know, because I often have a hard time telling whether anything is actually cool or lame.
oo_ has quit [Ping timeout: 256 seconds]
<pipework> I kinda think it'd be pretty neat to figure out something and flexible.
swgillespie has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
swgillespie has quit [Max SendQ exceeded]
Cust0sL1men has quit [Ping timeout: 246 seconds]
ghr has quit [Read error: Connection reset by peer]
swgillespie has joined #ruby
ghr has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
A205B064 has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<kubunto> pipework: what is the application controller?
<pipework> kubunto: It was in the context of rails.
Cork has quit [Quit: .]
bim has joined #ruby
bronson has joined #ruby
<kubunto> ah
plashchynski has quit [Quit: plashchynski]
albedoa has quit [Ping timeout: 256 seconds]
<pipework> kubunto: It's not really great code as it is, it's just illustrating the way I'd want to get closer to decoupling the objects themselves while keeping the system highly cohesive.
<kubunto> pipework: i was trying to figure out the inheritance
<pipework> kubunto: Egh, it doesn't really matter here. If there's anything weird, it's probably because it isn't valid.
<pipework> Unless you're not familiar with rails.
<kubunto> i am not
<kubunto> and rather new to ruby as a whole
<pipework> Oh neat!
<pipework> Whale, good luck.
ghr has quit [Ping timeout: 256 seconds]
bronson has quit [Ping timeout: 250 seconds]
kblake has joined #ruby
palms has quit [Ping timeout: 244 seconds]
iamninja has quit [Read error: Connection reset by peer]
plashchynski has joined #ruby
DexterLB has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kblake has quit [Ping timeout: 256 seconds]
Cust0sL1men has joined #ruby
m8 has quit [Quit: Sto andando via]
chopperkun has joined #ruby
jwinder has joined #ruby
<kubunto> ty
kubunto has left #ruby [#ruby]
palms has joined #ruby
plashchynski has quit [Client Quit]
xploshioon has joined #ruby
merqlove has joined #ruby
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
juanpablo__ has joined #ruby
Dude007 has joined #ruby
Pupeno has joined #ruby
scripore has joined #ruby
brb3 has joined #ruby
macoecho has joined #ruby
Pupeno_ has quit [Ping timeout: 252 seconds]
cpt_yossarian has quit [Quit: And then he took off.]
Cork has joined #ruby
plashchynski has joined #ruby
juanpablo__ has quit [Ping timeout: 252 seconds]
mitchellhenke has quit [Quit: Computer has gone to sleep.]
lavros has quit [Quit: leaving]
codecop_ has joined #ruby
slash_nick has joined #ruby
xploshioon has quit [Quit: Leaving]
mistermocha has joined #ruby
slash_nick has quit [Changing host]
slash_nick has joined #ruby
ghr has joined #ruby
lkba has quit [Ping timeout: 248 seconds]
xploshioon has joined #ruby
lavros has joined #ruby
Papierkorb_ has joined #ruby
quimrstorres has joined #ruby
teddyp1cker has left #ruby [#ruby]
lkba has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
joshua__ has joined #ruby
OrbitalKitten has joined #ruby
leafybasil has joined #ruby
mistermocha has quit [Ping timeout: 256 seconds]
quimrstorres has quit [Remote host closed the connection]
Papierkorb has quit [Ping timeout: 252 seconds]
_64k has joined #ruby
lavros has quit [Client Quit]
albedoa has joined #ruby
lavros has joined #ruby
akira_ has joined #ruby
<joshua__> hola, https://gist.github.com/anonymous/5567b684e768fa237dec , value is a unix timestamp. Best way to efficiently return the resource_id of the element with the most up to date timestamp?
quimrstorres has joined #ruby
<joshua__> Rather than putting each into an array, calling max on it and then going back through picking out that one..?
ki0 has joined #ruby
kappy has quit [Ping timeout: 246 seconds]
_hollywood has quit [Quit: Leaving]
lavros has quit [Client Quit]
_honning_ has joined #ruby
<jhass> joshua__: max takes a block
rankine has joined #ruby
TheNet has quit [Ping timeout: 250 seconds]
<joshua__> jhass: oh
quimrstorres has quit [Remote host closed the connection]
<bradland> max is in Enumerable too, so you should be able to call the block form on a Hash
ghr has quit [Ping timeout: 264 seconds]
<bradland> sorry, i see you have an array of hashes
Takle has joined #ruby
quimrstorres has joined #ruby
<banister> joshua__ there's also max_by
<banister> which is to max as sort_by is to sort
<jhass> isn't that actually redundant to the block form of max? I never got it
<bradland> jhass: you can avoid flying saucers with it
<joshua__> hmm, looking at max now. Not sure how it would look..
<banister> jhass lok at the docs, max with a block takes two args
relix has joined #ruby
<banister> jhass max_by only takes one arg
<jhass> oh
<jhass> right
<banister> it's exactly like sort { |a, b| } vs sort_by { |x|
<jhass> so max_by is actually better here
vdamewood has quit [Quit: Computer has gone to sleep.]
<bradland> a[:tag_set].max { |x, y| x[:value] <=> y[:value] }
<bradland> versus
hfp has quit [Ping timeout: 252 seconds]
<bradland> a[:tag_set].max_by { |x| x[:value] }
<bradland> i think
<bradland> joshua__: ^^ try those on your data
<jhass> >> %w(foo baaar blub).max_by {|e| e.size }
<eval-in_> jhass => "baaar" (https://eval.in/306023)
<joshua__> bradland: ah indeed, I ended up with the max version..
hfp_work has quit [Ping timeout: 245 seconds]
Takle has quit [Ping timeout: 250 seconds]
<joshua__> max_by looks better.
iliketurtles has quit [Quit: zzzzz…..]
<bradland> thx banister. learned something new today
quimrstorres has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
plashchynski has quit [Quit: plashchynski]
ndrei has quit [Ping timeout: 252 seconds]
<joshua__> thx guys, worked nicely
xcombelle has joined #ruby
umby24|offline is now known as umby24
quimrstorres has joined #ruby
digitalextremist has quit [Ping timeout: 264 seconds]
bim has quit [Remote host closed the connection]
<shevy> code code code
<shevy> more and more code
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
overcrush has quit [Remote host closed the connection]
arietis has quit [Quit: Leaving.]
bim has joined #ruby
lidaaa has quit [Ping timeout: 246 seconds]
_honning_ has quit [Ping timeout: 246 seconds]
hpoydar has quit [Remote host closed the connection]
claptor has joined #ruby
Dude007 has quit [Ping timeout: 264 seconds]
bruno- has joined #ruby
Takle has joined #ruby
Pharaoh2_ is now known as Pharaoh2
reinaldob has joined #ruby
JDiPierro has joined #ruby
ascarter has joined #ruby
jerematic has joined #ruby
blackmesa has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
bronson has joined #ruby
jamto11 has quit [Remote host closed the connection]
mostlybadfly has joined #ruby
Jackneill has quit [Read error: Connection reset by peer]
duncannz has joined #ruby
rankine has quit [Quit: leaving]
reinaldob has quit [Ping timeout: 256 seconds]
jerematic has quit [Ping timeout: 250 seconds]
hfp has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
Zggb has quit [Quit: Connection closed for inactivity]
hfp_work has joined #ruby
digitalextremist has joined #ruby
swgillespie has joined #ruby
_honning_ has joined #ruby
quimrstorres has quit [Remote host closed the connection]
slash_nick has quit [Read error: Connection reset by peer]
gsd has joined #ruby
<jhass> you mean, like, ... unicode?
quimrstorres has joined #ruby
gsd has quit [Client Quit]
Sawbones_ has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krisquigley has joined #ruby
kirun has quit [Quit: Client exiting]
<shevy> no
<shevy> what can you code with unicode?
<jhass> Ruby
scripore has quit [Quit: This computer has gone to sleep]
macoecho has quit [Quit: This computer has gone to sleep]
<bradland> everything you've coded so far
fryguy9 has joined #ruby
bim has quit [Remote host closed the connection]
chopperkun has quit [Quit: Laters]
willharrison has joined #ruby
Mia has quit [Read error: Connection reset by peer]
arietis has joined #ruby
<bradland> so earlier, TheNet asked me why include HashArrayAccess in Hash, rather than just reopening Hash in this example: https://gist.github.com/bradland/26d4744ce19766779947
terlar has joined #ruby
<bradland> my answer was that doing it this way would identify ary_access as a method of HashArrayAccess
<bradland> making it easier to find later if someone is debugging
<shevy> I have not coded a single thing in unicode
<bradland> are there other advantages versus reopening?
krisquigley has quit [Ping timeout: 246 seconds]
<bradland> oh yeah, i forgot. you run a unicode free system.
<shevy> well
<shevy> my browser supports unicode
<bradland> close to unicode free
<jhass> bradland: a bit constructed, but you can easier override by adding another module and calling super
<shevy> I use it solely to watch the unicode-snowman dance
<bradland> jhass: would the mechanism i've used there be called composition?
<jhass> though #prepend made that point kinda moot
<jhass> no
<jhass> Composition is basically delegation
<jhass> instead of doing a child class (or include a module) to add specific functionality, you make a wrapper that holds the original in an instance variable and delegates functionality as needed
<jhass> note that personally I would a full proxy no longer call composition though
<bradland> will have to read up on that
<jhass> at the end of the day these terms are kinda vague anyway
arietis has quit [Client Quit]
n_blownapart has joined #ruby
<jhass> that's why I got good grades at software engineering, I can argue my claims in pretty terms that essentially don't mean much :P
<bradland> lol
<jhass> but the actual designs I do on intuition most of the time
<jhass> and just recognize and name the patterns
<bradland> after all these years of getting by using ruby for my limited uses, i'm feeling like getting a bit deeper lately
ki0 has quit [Remote host closed the connection]
<bradland> it's amazing how well you can get by on simplistically designed software :P
<jhass> yeah
<jhass> the trick is to allot time for when your simple design breaks and a simple refactor won't break it
<jhass> er, * won't fix it
<jhass> by that time you have a way better understanding of your issue and can plan a better design than you could upfront anyhow
iliketurtles has joined #ruby
cpt_yossarian has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
quimrstorres has quit [Remote host closed the connection]
SouL has quit [Remote host closed the connection]
akira_ has quit [Quit: I'm leaving]
bim has joined #ruby
roolo has joined #ruby
quimrsto_ has joined #ruby
bim has quit [Remote host closed the connection]
_honning_ has quit [Ping timeout: 250 seconds]
jonr22 has joined #ruby
hfp has quit [Read error: Connection reset by peer]
hfp_work has quit [Read error: Connection reset by peer]
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Sawbones_ has quit [Remote host closed the connection]
hfp has joined #ruby
airdisa has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
ghr has joined #ruby
<shevy> :)
airdisa has joined #ruby
Cust0sL1men has quit [Ping timeout: 248 seconds]
nichtdiebohne has left #ruby [#ruby]
Takle has quit [*.net *.split]
spiderbyte has quit [*.net *.split]
senayar has quit [*.net *.split]
f3lp has quit [*.net *.split]
tubuliferous has quit [*.net *.split]
claw has quit [*.net *.split]
julian-delphiki has quit [*.net *.split]
cefkamcau has quit [*.net *.split]
robbyoconnor has quit [*.net *.split]
Blaster has quit [*.net *.split]
nateberkopec has quit [*.net *.split]
riceandbeans has quit [*.net *.split]
__main__ has quit [*.net *.split]
queequeg1 has quit [*.net *.split]
patrick99e99 has quit [*.net *.split]
clamstar has quit [*.net *.split]
Spleeze has quit [*.net *.split]
ninjazach has quit [*.net *.split]
alexblom_ has quit [*.net *.split]
haroldwu_ has quit [*.net *.split]
ChoiKyuSang has quit [*.net *.split]
dhruvasagar has quit [*.net *.split]
pasv_ has quit [*.net *.split]
duracrisis has quit [*.net *.split]
edwardly has quit [*.net *.split]
Luyt__ has quit [*.net *.split]
jud has quit [*.net *.split]
joast has quit [*.net *.split]
daynaskully has quit [*.net *.split]
ejnahc has quit [*.net *.split]
malcolmva has quit [*.net *.split]
ducklobster has quit [*.net *.split]
b1nd has quit [*.net *.split]
zemlya has quit [*.net *.split]
ndrst has quit [*.net *.split]
senayar has joined #ruby
nateberkopec has joined #ruby
hfp_work has joined #ruby
patrick99e99 has joined #ruby
queequeg1 has joined #ruby
xcombelle has quit [Quit: Quitte]
jud has joined #ruby
jud has joined #ruby
tubuliferous has joined #ruby
claw has joined #ruby
julian-delphiki has joined #ruby
haroldwu has joined #ruby
Luyt__ has joined #ruby
pasv_ has joined #ruby
riceandbeans has joined #ruby
riceandbeans has joined #ruby
cefkamcau has joined #ruby
f3lp has joined #ruby
spiderbyte has joined #ruby
Takle has joined #ruby
zemlya has joined #ruby
robbyoconnor has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
quimrsto_ has quit [Remote host closed the connection]
ChoiKyuSang has joined #ruby
ChoiKyuSang has joined #ruby
ndrst has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
__main__ has joined #ruby
f3lp_ has joined #ruby
quimrstorres has joined #ruby
ninjazach has joined #ruby
diegoviola has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
airdisa has quit [Ping timeout: 250 seconds]
ghr has quit [Ping timeout: 250 seconds]
TheNet has joined #ruby
fryguy9 has quit [Read error: Connection reset by peer]
alexblom has joined #ruby
swgillespie has joined #ruby
dhruvasagar has joined #ruby
fryguy9 has joined #ruby
digifiv5e has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
digifiv5e is now known as Guest61456
ejnahc has joined #ruby
Spleeze has joined #ruby
f3lp has quit [Ping timeout: 250 seconds]
swgillespie has quit [Max SendQ exceeded]
Sawbones_ has joined #ruby
cientifico has quit [Ping timeout: 252 seconds]
swgillespie has joined #ruby
b1nd has joined #ruby
tohsig has quit [Quit: Textual IRC Client: www.textualapp.com]
agrinb has quit [Quit: Leaving...]
agrinb has joined #ruby
slash_nick has joined #ruby
slash_nick has quit [Changing host]
slash_nick has joined #ruby
clamstar has joined #ruby
vdamewood has joined #ruby
Sawbones_ has quit [Ping timeout: 246 seconds]
nettoweb has joined #ruby
_honning_ has joined #ruby
TheNet_ has joined #ruby
jack_rabbit has joined #ruby
joast has joined #ruby
TheNet has quit [Ping timeout: 264 seconds]
macoecho has joined #ruby
scripore has joined #ruby
AndyBotwin has quit [Ping timeout: 264 seconds]
Sirupsen has joined #ruby
malcolmva has joined #ruby
jimms has joined #ruby
Blaster has joined #ruby
Sawbones_ has joined #ruby
bim has joined #ruby
Takle has quit [Remote host closed the connection]
Cust0sL1men has joined #ruby
ghr has joined #ruby
vim_shimm has quit [Ping timeout: 265 seconds]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest24 is now known as lele
hpoydar has joined #ruby
kubunto has joined #ruby
TheNet has joined #ruby
Takle has joined #ruby
rokob has joined #ruby
GnuYawk has quit [Ping timeout: 245 seconds]
TheNet_ has quit [Ping timeout: 244 seconds]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
kubunto has quit [Read error: Connection reset by peer]
hpoydar has quit [Ping timeout: 265 seconds]
Takle has quit [Ping timeout: 256 seconds]
doodlehaus has joined #ruby
bel__ has joined #ruby
bel__ has left #ruby [#ruby]
vim_shimm has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
f3lp_ has quit [Remote host closed the connection]
ping-pong has quit [Ping timeout: 256 seconds]
bronson has joined #ruby
f3lp has joined #ruby
decoponio has quit [Read error: Connection reset by peer]
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Renich has joined #ruby
pontiki has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
diegoviola has quit [Quit: WeeChat 1.1.1]
decoponio has joined #ruby
Sawbones_ has quit [Remote host closed the connection]
VBlizzard has joined #ruby
doodlehaus has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 248 seconds]
teddyp1c_ has joined #ruby
juanpablo__ has joined #ruby
cacocola has joined #ruby
Sawbones_ has joined #ruby
_blizzy_ has quit [Ping timeout: 265 seconds]
greenbagels has quit [Quit: Leaving]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xploshioon has quit [Quit: Leaving]
OtterCoder has quit [Ping timeout: 244 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
teddyp1c_ has quit [Ping timeout: 264 seconds]
juanpablo__ has quit [Ping timeout: 256 seconds]
bigmac_ has quit [Ping timeout: 245 seconds]
fryguy9 has quit [Quit: Leaving.]
pwnz0r has quit [Remote host closed the connection]
greenbagels has joined #ruby
sevvie has quit [Ping timeout: 255 seconds]
nettoweb has joined #ruby
sevvie has joined #ruby
quimrstorres has quit [Remote host closed the connection]
albedoa has quit [Quit: Textual IRC Client: www.textualapp.com]
ping-pong has joined #ruby
quimrstorres has joined #ruby
mistermocha has joined #ruby
VBlizzard is now known as _blizzy_
vdamewood has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
vim_shimm has quit [Ping timeout: 265 seconds]
_64k has quit [Read error: Connection reset by peer]
christiandsg has joined #ruby
vhlfd is now known as majeure
mistermocha has quit [Ping timeout: 265 seconds]
kubunto has joined #ruby
majeure is now known as vhlfd
Soda has quit [Remote host closed the connection]
quimrstorres has quit [Remote host closed the connection]
bigmac_ has joined #ruby
tus has quit [Ping timeout: 264 seconds]
airdisa has joined #ruby
codecop_ has quit [Remote host closed the connection]
gsd has joined #ruby
vim_shimm has joined #ruby
kyrylo has quit [Quit: Konversation terminated!]
kyrylo has joined #ruby
Megtastique has joined #ruby
n_blownapart has quit []
airdisa has quit [Ping timeout: 265 seconds]
OtterCoder has joined #ruby
diegoviola has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
ghostpl_ has quit [Remote host closed the connection]
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Channel6 has quit [Quit: Leaving]
TheNet has quit [Quit: Leaving...]
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
ghr has quit [Ping timeout: 246 seconds]
vim_shimm has quit [Ping timeout: 245 seconds]
DerisiveLogic has quit [Ping timeout: 244 seconds]
jimms has quit []
Notte has quit [Remote host closed the connection]
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brokollka has quit [Quit: Leaving]
ktk7777 has joined #ruby
jerematic has joined #ruby
jheg has quit [Quit: jheg]
jerematic has quit [Ping timeout: 246 seconds]
rokob has quit [Remote host closed the connection]
sevvie has quit [Ping timeout: 250 seconds]
hpoydar has joined #ruby
<ktk7777> Anyone willing to help with an issue I'm running into with ajax on my rails app? more details about the issue can be found at http://stackoverflow.com/questions/29323456/polling-for-changes-to-database-and-append-new-changes-to-the-view-in-rails-usin thanks in advance!
bigmac_ has quit [Ping timeout: 246 seconds]
gchristensen has left #ruby ["WeeChat 0.4.2"]
greenbagels has quit [Read error: Connection reset by peer]
Megtastique has quit []
enebo has joined #ruby
macoecho has quit [Quit: This computer has gone to sleep]
scripore has quit [Quit: This computer has gone to sleep]
wookiehangover has joined #ruby
scripore has joined #ruby
macoecho has joined #ruby
somnium has joined #ruby
hpoydar has quit [Ping timeout: 252 seconds]
scripore has quit [Client Quit]
macoecho has quit [Client Quit]
krisquigley has joined #ruby
paradoja has quit [Ping timeout: 245 seconds]
Guest72521 has quit [Ping timeout: 252 seconds]
sevvie has joined #ruby
plashchynski has joined #ruby
badhatter has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
riotjones has joined #ruby
bronson has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
badhatter has joined #ruby
krisquigley has quit [Ping timeout: 246 seconds]
OtterCoder has quit [Ping timeout: 264 seconds]
OtterCoder has joined #ruby
davispuh has quit [Read error: Connection reset by peer]
DEA7TH has quit [Ping timeout: 264 seconds]
CorpusCallosum has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
Blaster has quit [Read error: Connection reset by peer]
bigmac_ has joined #ruby
riotjones has quit [Ping timeout: 256 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nfk has quit [Quit: yawn]
mrsolo has joined #ruby
OtterCoder has quit [Ping timeout: 245 seconds]
OtterCoder has joined #ruby
bigmac_ has quit [Ping timeout: 246 seconds]
arescorpio has joined #ruby
phutchins has joined #ruby
_honning_ has quit [Ping timeout: 246 seconds]
OrbitalKitten has quit [Read error: Connection reset by peer]
OrbitalKitten has joined #ruby
jonr22 has joined #ruby
JDiPierro has quit [Remote host closed the connection]
platosha has quit [Quit: This computer has gone to sleep]
enebo has quit [Quit: enebo]
_honning_ has joined #ruby
bigmac_ has joined #ruby
mhib has quit [Quit: Leaving]
jonr22 has quit [Ping timeout: 256 seconds]
Pupeno has quit [Ping timeout: 246 seconds]
phutchins has quit [Ping timeout: 265 seconds]
Pupeno has joined #ruby
sevvie has quit [Ping timeout: 245 seconds]
OtterCoder has quit [Quit: No Ping reply in 180 seconds.]
ragingcake_ has joined #ruby
graydot has joined #ruby
OtterCoder has joined #ruby
graydot has quit [Client Quit]
jack_rabbit has quit [Ping timeout: 272 seconds]
Sawbones_ has quit [Remote host closed the connection]
phreakocious has quit [Ping timeout: 248 seconds]
JDiPierro has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
zacts has quit [Quit: leaving]
phreakocious has joined #ruby
sevvie has joined #ruby
bigmac_ has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
bigmac_ has joined #ruby
quimrstorres has joined #ruby
kubunto is now known as kubunto|foods
bigmac_ has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
bigmac_ has joined #ruby
christiandsg has quit [Remote host closed the connection]
christiandsg has joined #ruby
macoecho has joined #ruby
scripore has joined #ruby
christiandsg has quit [Remote host closed the connection]
nettoweb has quit [Client Quit]
daveomcd has joined #ruby
quimrstorres has quit [Remote host closed the connection]
ghr has joined #ruby
Sirupsen has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<daveomcd> if I wanted to get the difference between two dates ex: 2015-03-28 & 1991-01-17 ... could i get that in decimal form in the form of years? I'm just unsure how to calculate the decimal part; however I'd like to take into account how much of the year is passed
joshua__ has quit [Remote host closed the connection]
<jhass> daveomcd: so, in what units can you already get the difference?
<apeiros> daveomcd: I've a different question - what's 0.1 year?
quimrstorres has joined #ruby
<daveomcd> jhass, right now I'm doing (Date.today - birth_date).to_i
<jhass> apeiros: one day, obviously!
<jhass> daveomcd: so what does that give you? what unit?
<daveomcd> days
freerobby has quit [Quit: Leaving.]
Olipro has joined #ruby
<jhass> okay, how many days does a year have?
Olipro is now known as Guest45667
* apeiros is curious on that answer… :D
<daveomcd> 7819
<jhass> no, I'm not asking what value you get
<daveomcd> oh depends on the year
<daveomcd> 365/366
CaffeineShot has joined #ruby
<jhass> yeah, so, for 7819 days, what value would you expect if the unit is years?
<banister> apeiros isn't it (3 * 365 + 466) / 4
<banister> err 366
<apeiros> IMO calculating age is easiest using Date#yday + Date.ordinal
<apeiros> oh wait, actually…
<apeiros> nope. now I remember why I didn't use that
brb3 has quit [Quit: ZZZzzz…]
<daveomcd> jhass, 21 something
CaffeineShot has quit [Client Quit]
Notte has joined #ruby
brb3 has joined #ruby
<jhass> well, that something is important at this point, but how did you calculate that value?
<apeiros> banister: average days per year in gregorian calendar is 365.2425
<apeiros> in julian it's 365.25
<banister> apeiros ah ok
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<banister> which one did you use
<apeiros> (julian calendar knew leap years, but not the 100y and 400y exceptions)
<daveomcd> i just divided by 365
<apeiros> western countries use gregorian
<jhass> daveomcd: sooo, you did 7819.fdiv(365)... now, let's check back, where did 7819 come from?
<ytti> Date.parse('2015-03-28') - Date.parse('1991-01-17'
<ytti> says 8836
quimrstorres has quit [Remote host closed the connection]
<apeiros> ytti: don't use Date.parse
<daveomcd> jhass, from subtracting two dates, i used a different date that 1991-01-17 my apologies
<apeiros> it's the guess-o-mat of dates
<jhass> ytti: also not the point we're making here ;)
<jhass> daveomcd: doesn't matter much though, you basically answered your own question by now ;)
OrbitalKitten has quit [Quit: Textual IRC Client: www.textualapp.com]
<jhass> do you see how?
oo_ has joined #ruby
<daveomcd> well if i did... (Date.today - marcus.birth_date).fdiv(365) -- i probably don't really care if it's not exact in this situation because it's close enough
<daveomcd> so i guess i have
<jhass> as apeiros noted a slightly better approximation is to divide by 365.2425
ghr has quit [Ping timeout: 252 seconds]
<jhass> but as you can see, it's pretty easy after all, no? ;)
juanpablo__ has joined #ruby
<daveomcd> yes! thanks for walking me through all of that! you too apeiros
ktk7777 has quit [Ping timeout: 245 seconds]
<apeiros> dividing the difference in days is not a correct solution, though
<daveomcd> jhass, yes haha i think I just thought is was going to be more complex after I had recalled that it could be 365 or 366 and didn't really think about it not having to be *exact*
<apeiros> iirc there are cases where it'll be off
<jhass> yeah, a 100% perfect solution needs to work on the dates in question anyway
<jhass> and probably easily a couple days of work
<jhass> that approximation is good enough for many cases though
oo_ has quit [Ping timeout: 244 seconds]
<apeiros> easiest solution is to subtract years and compare the date
<daveomcd> yes especially my case, i just want to know how close to their next year someone might be and estimating it to a tenth works for my purposes
<apeiros> when comparing the date you have to remember leap year edge case
<jhass> and calendar switches and stuff like that, no?
<apeiros> if you have large distances, yes
<apeiros> but then you get into issues of definition too
juanpablo__ has quit [Ping timeout: 246 seconds]
<jhass> and wasn't there something like we're still not really sure whether 1200-1300 or something actually happened?
<jhass> like, it's likely that it did but we lack any real proof from that period?