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]
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
<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)"
<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
<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
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
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
<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
<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
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
<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
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.
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]
<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…]
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
<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?