<havenwood>
Guest83706: Pretty much anything with "Active" prefixed to it is a Rails thing. :P
Xiti has joined #ruby
jerematic has quit [Remote host closed the connection]
josephndenton has joined #ruby
SirCmpwn has quit [Remote host closed the connection]
uptownhr has quit [Quit: uptownhr]
gilest has quit [Remote host closed the connection]
SirCmpwn has joined #ruby
arescorpio has joined #ruby
dsfargeg has quit [Ping timeout: 245 seconds]
Sawbones_ has quit [Remote host closed the connection]
recurrence has joined #ruby
caveat- has quit [Ping timeout: 245 seconds]
enebo has quit [Quit: enebo]
BTRE has joined #ruby
longfeet has joined #ruby
nerium has quit [Quit: nerium]
n80 has quit [Quit: n80]
jherbst has joined #ruby
caveat- has joined #ruby
Kejento has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
yfeldblum has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby
tyfighter has joined #ruby
Aova has quit [Read error: Connection reset by peer]
hmsimha has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
uptownhr has joined #ruby
ta_ has joined #ruby
tkuchiki has joined #ruby
Takle_ has joined #ruby
hightower4 has quit [Ping timeout: 265 seconds]
LudicrousMango has joined #ruby
Aova has joined #ruby
fenzil has joined #ruby
Takle has quit [Ping timeout: 264 seconds]
nanoyak has quit [Remote host closed the connection]
nanoyak has joined #ruby
ta_ has quit [Ping timeout: 252 seconds]
ghr has joined #ruby
Sawbones_ has joined #ruby
hightower4 has joined #ruby
sevenseacat has joined #ruby
silkfox has quit [Ping timeout: 252 seconds]
caveat- has quit [Ping timeout: 245 seconds]
charliesome has quit [Quit: zzz]
scripore has joined #ruby
<pizzaops>
Is there a way in a ruby begin, rescue, end-style block to do something entirely different if there's an error, rather than executing the rescue code and then retrying the inital code
kl has joined #ruby
caveat- has joined #ruby
<wallerdev>
yeah just put something entirely different in the rescue block
<wallerdev>
?
charliesome has joined #ruby
<kl>
Hey guys. When do you decide to dependency inject an object, or just instantiate it in the place you'd have DI'd it to?
caveat- has quit [Read error: Connection reset by peer]
ghr has quit [Ping timeout: 245 seconds]
<wallerdev>
i almost never use dependency injection
shazaum has quit [Quit: Leaving]
<kl>
wallerdev: sorry, are you talking about containers there, or do you literally mean that
<wallerdev>
but it's useful when you want to be able to build one thing and replace componenets of it with other things depending on reason x or y
<shadoi>
I prefer using Forwardable with a dispatcher to switch behaviors
<shadoi>
It's way more readable
x1337807x has joined #ruby
<shadoi>
IMO
<wallerdev>
yeah i dont see much dependency injection used in ruby code in general, i see it a lot in java/c# and also in javascript with angularjs
ghostmoth has quit [Quit: ghostmoth]
<shadoi>
It makes things hard to unravel when debugging
<shadoi>
Java has abstract classes as a full concept, you can fake them in Ruby but it ends up looking really strange.
dspangenberg has joined #ruby
davedev2_ has quit [Ping timeout: 264 seconds]
<kl>
Yeah I think you guys are talking specifically about frameworks/containers
GaryOak_ has quit [Remote host closed the connection]
<kl>
By "dependency injecting" alone I'm literally talking about passing a constructed object (that is depended on) as a parameter
<kl>
versus, constructing it in the method it was passed to (or even later)
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eka_ has joined #ruby
<shadoi>
oh wow… heh
oo_ has quit [Remote host closed the connection]
<shadoi>
that's just how I've always written code, I don't even think of it in terms of dependency injection
<shadoi>
Forwardable is the closest I get
<kl>
I'm really confused with where you would bring forwardable into it
<kl>
We must have a disconnect
gilest has joined #ruby
<kl>
The Q: When should you pass an object as a parameter, and when should you instead instantiate that object in the place you were going to pass it (or later on in the application)
<shadoi>
Nah, forwardable lets you treat an attribute as an injected constructed object. I'm probably using the wrong terminology
oo_ has joined #ruby
jlast_ has quit [Remote host closed the connection]
iamjarvo has joined #ruby
dspangenberg has quit [Ping timeout: 250 seconds]
tyfighter has quit [Quit: tyfighter]
iamjarvo has quit [Max SendQ exceeded]
<shadoi>
But basically Forwardable just assumes that object is duck-typed as a "Foo" and if it responds to things like Foo it can be any object
jlast has joined #ruby
eka has quit [Ping timeout: 264 seconds]
lioninawhat has joined #ruby
pengin has quit [Remote host closed the connection]
<shadoi>
I almost always construct objects before passing them.
x77686d has quit [Quit: x77686d]
<wallerdev>
if the object is useful outside of the class i'd construct it outside of the class
iamjarvo has joined #ruby
<wallerdev>
if not i'd let the class construct it for internal use
<wallerdev>
in terms of passing later or not, i prefer passing everything needed for the class to work in the constructor
<shadoi>
Yeah
<shadoi>
same
iamninja has quit [Quit: ZZZzzz…]
<kl>
shadoi: I think you're talking about composition & creating a proxy there
<shadoi>
I never really thought about it specifically
<shadoi>
Yeah I think I am.
<shadoi>
delegation vs inheritance
<shadoi>
I suppose
<kl>
Yes, definitely an interesting albeit different discussion
pdoherty has joined #ruby
<kl>
wallerdev: bingo, I've only recently just consciously thought about that.
uptownhr has quit [Quit: uptownhr]
lmickh has quit [Remote host closed the connection]
Sawbones_ has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 240 seconds]
<kl>
Having the object injectable clearly states that the model the application represents can expect different things. Which may be false and unrepresentative of the product the developer is making
<kl>
s/can expect/does expect/
adriancb has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
Hijiri has quit [Quit: WeeChat 1.0.1]
phutchins has quit [Read error: Connection reset by peer]
sent1nel has quit [Remote host closed the connection]
Rennex has quit [Ping timeout: 276 seconds]
hmsimha has joined #ruby
Rennex has joined #ruby
ta_ has joined #ruby
Joufflu has joined #ruby
vvivv has quit [Quit: Leaving]
<coreycondardo>
if i have a method which checks session data to determine if a user is authenticated, and i want to test controllers that require that user to be logged in, do i want to stub that method to always be true in those controller tests?
Aova has quit [Read error: Connection reset by peer]
yfeldblu_ has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 246 seconds]
tubuliferous has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
ta_ has joined #ruby
<Radar>
coreycondardo: sounds like a question for #rubyonrails
<coreycondardo>
hmm.. i'm using padrino. might be valid to ask that IRC tho.
uptownhr has quit [Quit: uptownhr]
<Radar>
coreycondardo: oh sorry
mmoretti has quit [Quit: Leaving...]
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Aova has joined #ruby
<kl__>
coreycondardo: pretty sure it's not the return value of the controller you want to test, but the actions/statuses it emits
rbennacer has quit [Remote host closed the connection]
gsd has joined #ruby
<coreycondardo>
kl__: right, i'm basically setting a session in the controller. and all i want to do is say assuming that session is set, that it redirects to a certain place. so im trying to stub the method which does that check for the session and have it return true and therefore i can go on testing that the controller does the right thing. but im not even sure that's the right approach :)
shadoi has quit [Quit: Leaving.]
ghr has joined #ruby
lampd1 has quit []
ta_ has quit [Ping timeout: 252 seconds]
AlexRussia has quit [Ping timeout: 252 seconds]
Guest27010 has left #ruby ["Quit message"]
Sawbones_ has quit [Remote host closed the connection]
amystephen has quit [Quit: amystephen]
tjbiddle has joined #ruby
ghr has quit [Ping timeout: 256 seconds]
AlexRussia has joined #ruby
arescorpio has quit [Excess Flood]
hmsimha has quit [Ping timeout: 252 seconds]
tjbiddle has quit [Client Quit]
nii236_ has joined #ruby
davedev24_ has quit [Ping timeout: 250 seconds]
AlexRussia has quit [Ping timeout: 246 seconds]
nii236 has quit [Ping timeout: 264 seconds]
ta_ has joined #ruby
duncannz has joined #ruby
davedev24_ has joined #ruby
nii236_ has quit [Remote host closed the connection]
jlast has joined #ruby
jherbst has quit [Read error: Connection reset by peer]
jherbst has joined #ruby
Channel6 has quit [Quit: Leaving]
Ankhers has quit [Ping timeout: 250 seconds]
ta_ has quit [Ping timeout: 252 seconds]
ta_ has joined #ruby
hgl has quit [Ping timeout: 244 seconds]
jlast has quit [Ping timeout: 245 seconds]
davedev24_ has quit [Ping timeout: 256 seconds]
coreycondardo has left #ruby [#ruby]
davedev24_ has joined #ruby
hgl has joined #ruby
penzur has joined #ruby
n008f4g_ has quit [Ping timeout: 264 seconds]
ta_ has quit [Ping timeout: 265 seconds]
charliesome has quit [Quit: zzz]
stevenix has joined #ruby
Cache_Money has joined #ruby
arup_r has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
ta_ has joined #ruby
Kricir has quit [Remote host closed the connection]
Kricir has joined #ruby
yfeldblum has joined #ruby
jherbst has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PaulCapestany has joined #ruby
ponga has joined #ruby
charliesome has joined #ruby
ta_ has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby
pengin has joined #ruby
Kricir has quit [Ping timeout: 256 seconds]
josephndenton has quit [Ping timeout: 265 seconds]
Sawbones_ has joined #ruby
scripore has quit [Ping timeout: 264 seconds]
tyfighter has quit [Quit: tyfighter]
mac__ has joined #ruby
mikepack has quit [Remote host closed the connection]
mac__ has quit [Client Quit]
tyfighter has joined #ruby
jerematic has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
braincrash has quit [Quit: bye bye]
sent1nel has joined #ruby
dspangenberg has joined #ruby
Sawbones_ has quit [Ping timeout: 250 seconds]
jerematic has quit [Ping timeout: 250 seconds]
AlexRussia has joined #ruby
pengin has quit [Remote host closed the connection]
pengin has joined #ruby
braincrash has joined #ruby
mikepack has joined #ruby
dspangenberg has quit [Ping timeout: 264 seconds]
JBreit has left #ruby ["Leaving"]
anaeem1 has joined #ruby
pengin has quit [Ping timeout: 252 seconds]
lightstalker has joined #ruby
troubadour has joined #ruby
Aova has quit [Read error: Connection reset by peer]
DEA7TH has quit [Ping timeout: 265 seconds]
longfeet has quit [Ping timeout: 244 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_maes_ has joined #ruby
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 35.0/2015010900]]
Aova has joined #ruby
lioninawhat has quit [Remote host closed the connection]
chrishough has joined #ruby
ghostpl has joined #ruby
tyfighter has quit [Quit: tyfighter]
tkuchiki_ has quit [Read error: Connection reset by peer]
<shellox_>
hi, has anyone here experience with the liquid template language?
dreinull75 has quit [Remote host closed the connection]
lrocknrolmarc has joined #ruby
<shellox_>
I try to concatenate a string with it and kinda stuck
jlast has quit [Ping timeout: 252 seconds]
jerematic has quit [Ping timeout: 244 seconds]
dreinull75 has joined #ruby
<Xnfu>
Never heard of it
dreinull75 has quit [Remote host closed the connection]
ta_ has joined #ruby
lrocknrolmarc has quit [Ping timeout: 252 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
kalusn has quit [Remote host closed the connection]
<shellox_>
Xnfu: it's the template language which shopify is using
tobago has quit [Remote host closed the connection]
<shellox_>
but it's Open Source
<shellox_>
i figured it out anyway
shredding has joined #ruby
<totimkopf>
shredding: \m/
<shredding>
?
dreinull75 has joined #ruby
shredding has quit [Client Quit]
krz has joined #ruby
ta_ has quit [Ping timeout: 246 seconds]
niko has joined #ruby
rocknrollmarc has joined #ruby
mkaesz has joined #ruby
josephndenton has joined #ruby
<certainty>
moin
yfeldblum has joined #ruby
<totimkopf>
moin certainty
rocknrollmarc has quit [Ping timeout: 245 seconds]
debajit has quit [Quit: Lost terminal]
yfeldblu_ has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
josephndenton has quit [Ping timeout: 246 seconds]
govg has quit [Ping timeout: 256 seconds]
Pharaoh2 has joined #ruby
Pharaoh2 has quit [Max SendQ exceeded]
wpp has joined #ruby
Pharaoh2 has joined #ruby
govg has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
philwantsfish1 has quit [Ping timeout: 272 seconds]
fantazo has joined #ruby
aswen has joined #ruby
ebbflowgo has quit [Quit: ebbflowgo]
LudicrousMango has quit [Remote host closed the connection]
djbkd has quit [Quit: My people need me...]
timonv has joined #ruby
Anarch has quit [Ping timeout: 264 seconds]
Spami has joined #ruby
dspangenberg has joined #ruby
Joufflu has quit [Read error: Connection reset by peer]
Aova has quit [Read error: Connection reset by peer]
SixiS has joined #ruby
dspangenberg has quit [Ping timeout: 264 seconds]
olekenneth has quit [Ping timeout: 252 seconds]
Macaveli has joined #ruby
jottr_ has joined #ruby
juanpablo____ has joined #ruby
Macaveli_ has joined #ruby
siso has joined #ruby
wallerdev has quit [Quit: wallerdev]
Elico has quit [Quit: Leaving.]
olekenneth has joined #ruby
dumdedum has joined #ruby
<arup_r>
totimkopf: Hi
Aova has joined #ruby
towski_ has joined #ruby
towski_ has quit [Remote host closed the connection]
einarj has joined #ruby
juanpablo____ has quit [Ping timeout: 250 seconds]
jottr_ has quit [Ping timeout: 264 seconds]
Elico has joined #ruby
ekem has quit [Quit: Monkey]
mikepack has joined #ruby
terlar has joined #ruby
shredding has joined #ruby
YamakasY has quit [Excess Flood]
ta_ has joined #ruby
MasterPiece has quit [Ping timeout: 252 seconds]
uptownhr has quit [Quit: uptownhr]
livathinos has joined #ruby
YamakasY has joined #ruby
ghr has joined #ruby
_mynameis has joined #ruby
mikepack has quit [Ping timeout: 252 seconds]
apeiros_ has joined #ruby
tokik has quit [Ping timeout: 252 seconds]
nii236|irssi has joined #ruby
nii236|irssi has quit [Client Quit]
ghr has quit [Ping timeout: 250 seconds]
ta_ has quit [Ping timeout: 252 seconds]
lidaaa has quit [Ping timeout: 264 seconds]
oo_ has quit [Remote host closed the connection]
greenarrow has joined #ruby
nerium has joined #ruby
oo_ has joined #ruby
siso has quit [Quit: siso]
jlast has joined #ruby
kalusn has joined #ruby
kalusn has quit [Remote host closed the connection]
kalusn has joined #ruby
MasterPiece has joined #ruby
nerium has quit [Quit: nerium]
jlast has quit [Ping timeout: 255 seconds]
nhhagen has joined #ruby
pdoherty has joined #ruby
Alina-malina has quit [Ping timeout: 245 seconds]
msgodf has joined #ruby
alex88 has joined #ruby
cn28h has quit [Ping timeout: 245 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TheMoonMaster has quit [Ping timeout: 245 seconds]
mos_ has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
Alina-malina has joined #ruby
hanmac1 has joined #ruby
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
pdoherty has quit [Ping timeout: 252 seconds]
dc_ has quit [Remote host closed the connection]
<avril14th>
morning
ta_ has joined #ruby
dexteryy has joined #ruby
LudicrousMango has joined #ruby
ponga has joined #ruby
kl__ has quit [Ping timeout: 244 seconds]
fantazo has quit [Ping timeout: 245 seconds]
arup_r has quit []
cn28h has joined #ruby
dexteryy has quit [Client Quit]
thumpba has joined #ruby
lemur has quit [Remote host closed the connection]
fantazo has joined #ruby
ta_ has quit [Ping timeout: 265 seconds]
thumpba has quit [Ping timeout: 245 seconds]
olivier_bK has joined #ruby
astrobunny has quit [Remote host closed the connection]
dc_ has joined #ruby
mikecmpbll has joined #ruby
LouisRoR has joined #ruby
astrobunny has joined #ruby
kalusn has quit []
TheMoonMaster has joined #ruby
thatslifeson has quit [Ping timeout: 244 seconds]
LudicrousMango has quit [Ping timeout: 246 seconds]
Ellypse has quit [Quit: Ellypse]
shime has joined #ruby
loveablelobster has joined #ruby
Alina-malina has quit [Ping timeout: 245 seconds]
jgt has quit [Ping timeout: 245 seconds]
nerium has joined #ruby
asmodlol has joined #ruby
Alina-malina has joined #ruby
mkaesz has quit [Remote host closed the connection]
wottam_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mkaesz has joined #ruby
wottam has joined #ruby
mkaesz has quit [Remote host closed the connection]
jgt has joined #ruby
CustosL1men has joined #ruby
astrobunny has quit [Remote host closed the connection]
ghostpl has joined #ruby
psy_ has joined #ruby
asmodlol has quit [Ping timeout: 245 seconds]
izzol has joined #ruby
<izzol>
Hi
loveablelobster has quit [Ping timeout: 244 seconds]
<oddmunds>
izzol: good day
arup_r has joined #ruby
Takle has joined #ruby
ghr has joined #ruby
asmodlol has joined #ruby
siso has joined #ruby
ChoiKyuSang has quit [Quit: Going offline, see ya! (( www.adiirc.com )]
Aova has quit [Read error: Connection reset by peer]
<izzol>
I'm trying to convert epoch time (Nagios format) to human one but in the same way as it's possible in perl (one line): cat nagios.log | perl -pe 's/(\d+)/localtime($1)/e'
<izzol>
Shall I use Time.at() somehow ?
asmodlol has quit [Client Quit]
ta_ has joined #ruby
nerium has quit [Quit: nerium]
<Xnfu>
Yeah, that and strftim
<Xnfu>
strftime *
yeticry has quit [Ping timeout: 250 seconds]
qba73 has joined #ruby
Aova has joined #ruby
yeticry has joined #ruby
ta_ has quit [Ping timeout: 244 seconds]
krz has quit [Ping timeout: 246 seconds]
Timba-as has joined #ruby
Hobogrammer has quit [Ping timeout: 264 seconds]
DadoCe has joined #ruby
_mynameis has quit [Ping timeout: 245 seconds]
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Zai00 has joined #ruby
kyb3r_ has quit [Quit: Leaving]
<apeiros_>
nagios format? o0
hs366 has joined #ruby
mkaesz has joined #ruby
DadoCe has quit [Ping timeout: 252 seconds]
jerematic has joined #ruby
loveablelobster has joined #ruby
lightstalker has quit [Ping timeout: 250 seconds]
Pharaoh2 has joined #ruby
* arup_r
fogot the definition of "Boring"
LudicrousMango has joined #ruby
ta_ has joined #ruby
krz has joined #ruby
s_Ed has joined #ruby
<s_Ed>
hi
<s_Ed>
I would like to conver an ascii string in Hexadecimal using % as separator. For instance: abc->%61%62%63
krz is now known as Guest13173
<s_Ed>
any easy way to do it ?
penzur has quit [Quit: dc]
jerematic has quit [Ping timeout: 264 seconds]
<Xnfu>
take the string, split it to an array, convert each item to hexidecimal, and then use .join('%')
<shevy>
I think I need to buy food and home office thingies
<hanmac1>
shevy.add_time_for(:today)
<certainty>
shevy: alright, we'll see
<shevy>
:D
<shevy>
I don't wanna go out, it's 1.5 °C
<arup_r>
hanmac1: Don't kill me with Ruby's implicit block to proc capability.. :(
slushie|| has quit [Read error: Connection reset by peer]
quimrstorres has joined #ruby
withnale_ has joined #ruby
slushie|| has joined #ruby
josephndenton has quit [Ping timeout: 245 seconds]
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mkaesz has quit [Remote host closed the connection]
<withnale_>
Hello. If I have some 'attribute' style class methods called in my class to setup some data structures. However, if I subclass the object, these methods don't get called. Is there a way of achieving this...?
bigkevmcd has quit [Read error: Connection reset by peer]
<withnale_>
I'm writing a lot of checks which has a lot of duplication.
<withnale_>
So I thought I could write one master one with most of the 'option' sections in and then subclass it with just the methods relating specifically to that check
<withnale_>
The option is just managing a hash called @options
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Caius has joined #ruby
C1V0 has quit []
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<izzol>
Hmm
<izzol>
$ ruby -e '"Test is".sub(/is/,'are')'
<izzol>
-e:1:in `<main>': undefined local variable or method `are' for main:Object (NameError)
dspangenberg has joined #ruby
adriancb has quit [Ping timeout: 245 seconds]
<izzol>
Not sure why it doesn't. At irb it's working fine :(
greenarr_ has joined #ruby
wottam has joined #ruby
rocknrollmarc has joined #ruby
lrocknrolmarc has joined #ruby
greenarrow has quit [Read error: Connection reset by peer]
roshanavand has quit [Quit: Leaving]
greenarr_ is now known as greenarrow
shellox_ has quit [Quit: Lost terminal]
ferr_ has joined #ruby
s_Ed has quit [Ping timeout: 245 seconds]
ferr_ is now known as ferr
jgt has quit [Read error: Connection reset by peer]
<Xnfu>
changing edit.txt with nagios.log of course
<Xnfu>
$_ will be each line
thumpba has quit [Ping timeout: 245 seconds]
pdoherty has joined #ruby
livathin_ has joined #ruby
ta_ has quit [Ping timeout: 252 seconds]
<waxjar>
or depending on your shell, it might be interpolated and use the environment variable $1
<waxjar>
i know fish does something like that, its annoying sometimes
<workmad3>
waxjar: bash and zsh will interpolate $ inside ", not inside '
<shevy>
hehe
<waxjar>
good to know :)
jhebden has quit [Ping timeout: 250 seconds]
<workmad3>
waxjar: easy to see by comparing echo '$PATH' to echo "$PATH" :)
<Xnfu>
echo $PATH
anaeem___ has joined #ruby
<Xnfu>
I strings attached
<Xnfu>
If ya dig what I'm sayin'
ta_ has joined #ruby
<waxjar>
seems like fish does the same, gotta remember that :p
abuzze has quit [Ping timeout: 264 seconds]
eka has quit [Read error: Connection reset by peer]
livathinos has quit [Ping timeout: 264 seconds]
pdoherty has quit [Ping timeout: 245 seconds]
eka has joined #ruby
yeticry has quit [Ping timeout: 264 seconds]
ldnunes has joined #ruby
leafybasil has joined #ruby
anaeem1 has quit [Ping timeout: 244 seconds]
yeticry has joined #ruby
Squarepy has joined #ruby
AlexRussia has quit [Ping timeout: 245 seconds]
iwishiwerearobot has quit [Read error: Connection reset by peer]
<shevy>
fish is fun
<shevy>
but unusable!
hamakn has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 245 seconds]
<Xnfu>
I never used the fish
<shevy>
it has fancy colouring
abuzze has joined #ruby
MasterPiece has joined #ruby
exadeci has joined #ruby
troubadour has joined #ruby
enterprisedc has joined #ruby
tvw has joined #ruby
n008f4g_ has quit [Ping timeout: 264 seconds]
no_gravity has joined #ruby
<no_gravity>
Good Morning Everybody! What could be a good variable name for a string that contains a list of user submitted, tab seperated id/value pairs?
<Xnfu>
data?
<gizmore>
csv_data?
<gizmore>
tsv_data?
dspangenberg has joined #ruby
<shevy>
no_gravity user_hash !
<shevy>
no_gravity might be simpler if you name it right at what it actually does
<no_gravity>
oh, tsv_data is nice
<no_gravity>
or even tsv_attributes
<workmad3>
submitted_users ?
<no_gravity>
its not submitted users. its user submitted.
<shevy>
how can glibc break anyway? I did not touch or modify it
<certainty>
some rootkit messing with you
* certainty
hides
<no_gravity>
Xnfu: whats that?
<shevy>
I better go and do a backup
<workmad3>
shevy: could be a dynamic link that was linked against an old version, so is jumping into the .so in bad places and segfaulting
<certainty>
shevy: yepp. wait for rsync[4974]: segfault: at 373e2567 ip b75b7af8 sp bfcd29a0 error 4 in libc-2.15.so[b753d000+17e000]
<Xnfu>
I was just suggesting using a hash of hashes to better describe/store the tab delimiter string variable
<certainty>
is there a way to rebuild dependencies in slackware?
<certainty>
something like revdep-rebuild in gentoo?
Aova has joined #ruby
<workmad3>
dunno... I haven't used slack since I was a teenager :P
<certainty>
rebuild your build-chain then rebuild the system
<certainty>
turn of heater
chipotle has quit [Quit: cheerio]
<certainty>
slackware is a binary distribution?
<shevy>
workmad3 aha so you mean some older .so might be the culprit
jerematic has quit [Ping timeout: 246 seconds]
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
arup_r has quit [Ping timeout: 264 seconds]
dspangenberg has quit [Ping timeout: 246 seconds]
gfawcettpq has joined #ruby
Timba-as has quit [Quit: Be back later ...]
hamakn has joined #ruby
Timba-as has joined #ruby
arup_r has joined #ruby
nerium has quit [Quit: nerium]
LudicrousMango has quit [Remote host closed the connection]
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
Takle has quit [Remote host closed the connection]
josephndenton has joined #ruby
jhebden has quit [Ping timeout: 252 seconds]
no_gravity has left #ruby [#ruby]
Hijiri has quit [Ping timeout: 245 seconds]
charliesome has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
max96at|off is now known as max96at
yfeldblum has joined #ruby
jusmyth has quit [Quit: Leaving.]
<certainty>
oh cool there is Syslog::Logger, no more log4r
rdark has quit [Ping timeout: 245 seconds]
josephndenton has quit [Ping timeout: 265 seconds]
mLF has quit [Ping timeout: 244 seconds]
<workmad3>
certainty: yeah, it got added in with 2.0
rdark has joined #ruby
<workmad3>
(which confused me recently... I was trying to remember where I got it from, because I had no syslog gems in my apps and I had an app deploy on 1.9 and broke with syslog stuff :( )
startupality has quit [Quit: startupality]
frobs has joined #ruby
yfeldblum has quit [Ping timeout: 256 seconds]
Mon_Ouie has joined #ruby
<shevy>
ruby gets better and better
dabrorius has joined #ruby
ghostpl has quit [Remote host closed the connection]
eka has quit [Ping timeout: 245 seconds]
livathin_ has quit [Remote host closed the connection]
<workmad3>
well, that was nice for me, as it meant I could push that into my rails app config on chef deploy, and then my rails logs get pushed to my central log server, tagged with 'rails', turned into fields by logstash and then I can search them through an ES interface :)
keen__________53 has joined #ruby
<workmad3>
so 'site:some_site.com AND type:rails AND status:[400 TO 600]' <-- error messages ftw :D
Takle has joined #ruby
iwishiwerearobot has joined #ruby
keen__________52 has quit [Ping timeout: 240 seconds]
adriancb has joined #ruby
Hijiri has joined #ruby
<certainty>
workmad3: the docs are wrong though :/ ... they say that it supports the facility parameter, which it doesn't for ruby 2.0 as it seems
Vivex has joined #ruby
<shevy>
ruby docs are never wrong!!!
startupality has joined #ruby
shredding has quit [Quit: shredding]
bluOxigen has quit []
troubadour has quit [Quit: troubadour]
<certainty>
workmad3: yeah that's the plan here. though we'll probably not use syslog as the transport anymore. but for now i need a compatible replacement. unfortunatelly it doesn't seem to log anything, hmm
<workmad3>
certainty: ah, I had to do a bit of a sneak-hack around things to get that... Syslog::Logger.syslog = Syslog.open('rails', Syslog::LOG_CONS | Syslog::LOG_NDELAY | Syslog::LOG_NOWAIT | Syslog::LOG_PID, Syslog::LOG_<facility>)
<workmad3>
certainty: and then open a logger with Syslog::Logger.new 'rails'
adriancb has quit [Ping timeout: 245 seconds]
<certainty>
workmad3: ah ok that's doable. at least i can do it then. thanks for the hint
arietis has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<workmad3>
I think I had that working in 2.0 anyway... currently on 2.1 :)
roshanavand1 has quit [Remote host closed the connection]
<certainty>
yeah i have apps with 2.0 which need support
<certainty>
the facility is an important thing
<workmad3>
but it was a bit weird, as there was an internal syslog singleton that got used as the connection to a syslog interface (Syslog::Logger.syslog), and I needed to set that up to the chosen facility
startupality has quit [Quit: startupality]
<workmad3>
not sure it supports being able to log out to multiple facilities within the same program, as a quick warning
<certainty>
i only need one currently
<workmad3>
and yeah... I don't use syslog myself... I install rsyslog 8 from ppa :)
jottr_ has joined #ruby
roshanavand has joined #ruby
rkgudboy has joined #ruby
Timgauthier has joined #ruby
<certainty>
hmm now that's unexpected. it reports syslog is already opened. I didn't do that
<workmad3>
hmm...
<workmad3>
weird
<certainty>
gotta fiddle around a bit
<certainty>
bbl
bronson has joined #ruby
livathinos has joined #ruby
livathinos has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 255 seconds]
livathinos has joined #ruby
<workmad3>
certainty: you can add in a check for Syslog.opened?
juanpablo____ has joined #ruby
<workmad3>
certainty: so something like 'Syslog.close if Syslog.opened?' so you can then re-open the connection with your desired config :)
jottr_ has quit [Ping timeout: 246 seconds]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
<certainty>
workmad3: yepp, i found the culprit. it was me. i had another instance lingering around. i'll reopen it
<certainty>
anyway
bronson has quit [Ping timeout: 250 seconds]
Takle has quit [Remote host closed the connection]
rdark has quit [Quit: leaving]
rdark has joined #ruby
juanpablo____ has quit [Ping timeout: 245 seconds]
rodfersou has quit [Read error: Connection reset by peer]
lynxman has quit [Quit: leaving]
<certainty>
my rsyslog seems to be messed up though. i can't even produce a message using logger(1)
rodfersou has joined #ruby
<workmad3>
ah, ok... I'll leave you to figure that out then :P
codehotter has quit [Ping timeout: 276 seconds]
<certainty>
:)
nerium has joined #ruby
freerobby has joined #ruby
St_Marx has quit [Ping timeout: 250 seconds]
<ddv>
never change something that works, oh my perfectionism is killing me
iamninja has joined #ruby
revoohc has quit [Remote host closed the connection]
rocknrollmarc has joined #ruby
systemd0wn_ has joined #ruby
ghostpl has joined #ruby
lrocknrolmarc has joined #ruby
fella6s has joined #ruby
Asher2 has joined #ruby
mLF has joined #ruby
rkgudboy has quit [Quit: Leaving]
<certainty>
workmad3: uninstalled rsyslog and installed syslog-ng. works
TinkerTyper has quit [Ping timeout: 265 seconds]
Takle has joined #ruby
uxp_ has joined #ruby
djbkd has joined #ruby
totimkop1 has joined #ruby
lynxman has joined #ruby
DadoCe has joined #ruby
panga has joined #ruby
sheepman_ has joined #ruby
Elico1 has joined #ruby
einarj_ has joined #ruby
ryotarai_ has joined #ruby
renier_ has joined #ruby
Nahra` has joined #ruby
f_canela has joined #ruby
zmyrgel1 has joined #ruby
oddraisi1 has joined #ruby
BeLucid_ has joined #ruby
jzigmund_ has joined #ruby
ezra_ has joined #ruby
einarj has quit [Ping timeout: 244 seconds]
Meeh_ has joined #ruby
madhatter has joined #ruby
Aova has quit [Read error: Connection reset by peer]
goodenough has quit [Remote host closed the connection]
startupality has joined #ruby
BaNzoune1 has joined #ruby
TinkerTyper has joined #ruby
rfi_ has joined #ruby
byaruhaf has joined #ruby
DadoCe has quit [Ping timeout: 255 seconds]
rocknrollmarc has quit [Ping timeout: 264 seconds]
panga has quit [Remote host closed the connection]
nolic has quit [Remote host closed the connection]
einarj_ has quit [Ping timeout: 244 seconds]
brixen_ has joined #ruby
MasterPiece has quit [Quit: Leaving]
einarj has joined #ruby
CpuID2 has joined #ruby
CpuID2 has quit [Changing host]
CpuID2 has joined #ruby
livathin_ has joined #ruby
freerobby has quit [Quit: Leaving.]
nik0 has joined #ruby
deuterium has joined #ruby
DanKnox_ has joined #ruby
cephalostrum has joined #ruby
ponga has quit [*.net *.split]
Elico has quit [*.net *.split]
olekenneth has quit [*.net *.split]
niko has quit [*.net *.split]
totimkopf has quit [*.net *.split]
systemd0wn has quit [*.net *.split]
jonr22 has quit [*.net *.split]
oz has quit [*.net *.split]
djbkd_ has quit [*.net *.split]
sn0wb1rd has quit [*.net *.split]
oddraisin has quit [*.net *.split]
fcanela has quit [*.net *.split]
Meeh has quit [*.net *.split]
sheepman has quit [*.net *.split]
Kovensky has quit [*.net *.split]
demophoon has quit [*.net *.split]
uxp has quit [*.net *.split]
byaruhaf_ has quit [*.net *.split]
ryotarai has quit [*.net *.split]
weaksauce has quit [*.net *.split]
ping-pong has quit [*.net *.split]
renier has quit [*.net *.split]
brixen has quit [*.net *.split]
jzigmund has quit [*.net *.split]
Lorn has quit [*.net *.split]
rfi has quit [*.net *.split]
roger_rabbit has quit [*.net *.split]
zmyrgel has quit [*.net *.split]
zewelor has quit [*.net *.split]
tekku has quit [*.net *.split]
Nahra has quit [*.net *.split]
cephalostrum_ has quit [*.net *.split]
fella5s has quit [*.net *.split]
j416 has quit [*.net *.split]
DanKnox has quit [*.net *.split]
ezra has quit [*.net *.split]
Asher has quit [*.net *.split]
BaNzounet has quit [*.net *.split]
BeLucid has quit [*.net *.split]
pl1ght has quit [*.net *.split]
Gadgetoid has quit [*.net *.split]
ryotarai_ is now known as ryotarai
DanKnox_ is now known as DanKnox
sheepman_ is now known as sheepman
adam12 is now known as adam
tekk has joined #ruby
adam is now known as Guest55781
Aova has joined #ruby
zewelor has joined #ruby
zewelor has quit [Changing host]
zewelor has joined #ruby
Lorn has joined #ruby
Kovensky has joined #ruby
demophoon has joined #ruby
livathinos has quit [Ping timeout: 264 seconds]
Takle has quit [Remote host closed the connection]
nik0 is now known as niko
LudicrousMango has joined #ruby
n80 has joined #ruby
wpp has quit [Quit: ZZZzzz…]
rodfersou has quit [Read error: Connection reset by peer]
wpp has joined #ruby
rodfersou has joined #ruby
danjordan has quit [Quit: danjordan]
ramfjord has quit [Ping timeout: 264 seconds]
olekenneth has joined #ruby
pl1ght has joined #ruby
ping-pong has joined #ruby
jonr22 has joined #ruby
marr has quit [Ping timeout: 245 seconds]
sn0wb1rd has joined #ruby
Gadgetoid has joined #ruby
oz has joined #ruby
hamakn has quit [Remote host closed the connection]
totimkop1 is now known as totimkopf
totimkopf has quit [Changing host]
totimkopf has joined #ruby
roger_rabbit has joined #ruby
thumpba has joined #ruby
danjordan has joined #ruby
j416 has joined #ruby
greenarrow has quit [Quit: 500]
mLF has quit [Ping timeout: 245 seconds]
shredding has joined #ruby
thumpba has quit [Ping timeout: 256 seconds]
dAnjou has joined #ruby
jerematic has joined #ruby
sigurding has quit [Quit: sigurding]
shum has joined #ruby
<dAnjou>
hi, i'm a python guy setting up gitlab which uses ruby. this is just FYI, my question is not about gitlab, it's about how ruby and it's ecosystem. specifically bundler, what role does it play and more concrete: why does it have a shebang like `#!/usr/local/bin/ruby` even though my ruby might not be located there?
blackmesa has quit [Ping timeout: 244 seconds]
<dAnjou>
*its
greenarrow has joined #ruby
deuterium has quit [Ping timeout: 250 seconds]
iwishiwerearobot has quit [Quit: Be back later ...]
n1lo has joined #ruby
dkb20k has joined #ruby
jerematic has quit [Ping timeout: 264 seconds]
dkb20k has left #ruby [#ruby]
sigurding has joined #ruby
penzur has joined #ruby
lxsameer has quit [Quit: Leaving]
dumdedum has quit [Quit: foo]
<apeiros_>
dAnjou: the shebang line is usually set on installation and it is set to what is reported as your ruby.
<apeiros_>
dAnjou: so the shebang depends on how you installed it.
danjordan has quit [Quit: danjordan]
mskaesz has joined #ruby
davidhq has joined #ruby
nolic has joined #ruby
abuzze has quit [Remote host closed the connection]
hgl has quit [Ping timeout: 250 seconds]
<shevy>
dAnjou simplest answer is that bundler assumes that your ruby is in that location
<shevy>
dAnjou your ruby binary is at /usr/bin/ruby ?
hgl has joined #ruby
<apeiros_>
shevy: that's wrong
mkaesz has quit [Ping timeout: 245 seconds]
pdoherty has joined #ruby
<apeiros_>
a) it's not bundler, it's rubygems. b) there's no assumption in that.
<dAnjou>
shevy: no, it's vendored in gitlab
rsavage has joined #ruby
rsavage is now known as redking
redking is now known as redk1ng
<dAnjou>
so, at what point is bundler installed and is it common to have multiple bundler installations?
Patteh has joined #ruby
<shevy>
depends. on debian, /usr/bin/ruby is used and /usr/local/lib/ruby
<dAnjou>
not sure if i can compare that to python's virtualenv
<workmad3>
dAnjou: it's installed as a gem using rubygems, and it's pretty common, especially if you have multiple versions of ruby installed
<apeiros_>
for developers it's common to have multiple rubies installed
paradoja has joined #ruby
<apeiros_>
but each ruby will usually only have one bundler
abuzze has joined #ruby
<dAnjou>
okay, so when i install bundler with the correct ruby then it should use it in the end?
n80 has quit [Quit: n80]
<dAnjou>
like it figures that out itself?
<apeiros_>
yes. bundler belongs to the ruby you install it with.
<apeiros_>
all gems do.
paradoja has left #ruby [#ruby]
<dAnjou>
okay
<workmad3>
dAnjou: rubygems generates a wrapper for gem executables, which includes the #! path pointing to the ruby it was installed with
<dAnjou>
thanks a lot. i guess i go back to the gitlab installation guide and see how to use their vendored ruby
cpt_yossarian has quit [Ping timeout: 246 seconds]
<dAnjou>
workmad3: got it :)
danjordan has joined #ruby
sambao21 has joined #ruby
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pdoherty has quit [Ping timeout: 264 seconds]
iwishiwerearobot has joined #ruby
Mon_Ouie has quit [Ping timeout: 245 seconds]
anaeem___ has quit [Remote host closed the connection]
rkgudboy has joined #ruby
amundj has joined #ruby
rylev has joined #ruby
abuzze has quit [Remote host closed the connection]
jerematic has joined #ruby
arup_r has quit [Remote host closed the connection]
<Bish>
hello, im using net/http to make https requests, it always worked with valid encoding.. but somehow that behaviour stopped
<Bish>
(maybe because of ruby update? i don't know)
CpuID2 has quit [Quit: This computer has gone to sleep]
<Bish>
it does encode the body of the reponse as ASCII-8BIT, while the headers imply "content-type"=>["application/json; charset=utf-8"]
abuzze has joined #ruby
spyderman4g63 has joined #ruby
d3v has joined #ruby
spyderma_ has joined #ruby
<avril14th>
Is there a way to access local variables with a send?
<avril14th>
like meth(param); self.send(:param) ?
<avril14th>
def meth(param); self.send(:param): end I meant
dAnjou has left #ruby ["WeeChat 1.0.1"]
jottr_ has joined #ruby
<avril14th>
ok got it
<avril14th>
local_variables
<avril14th>
:)
spyderman4g63 has quit [Ping timeout: 245 seconds]
brb3 has joined #ruby
<avril14th>
well not quite
<avril14th>
this list the local variables, how do you access them by name?
wald0 has joined #ruby
frobs has quit [Quit: Konversation terminated!]
pika_pika has joined #ruby
Takle has joined #ruby
dspangenberg has joined #ruby
juanpablo____ has joined #ruby
aclearman037 has joined #ruby
startupality_ has joined #ruby
colli5ion has quit [Read error: Connection reset by peer]
<shevy>
not sure this is easily possible avril14th
colli5io_ has joined #ruby
<shevy>
with @ivars you have instance_variable_get()
ta_ has joined #ruby
B1n4r10 has joined #ruby
juanpablo____ has quit [Ping timeout: 250 seconds]
startupality has quit [Ping timeout: 252 seconds]
startupality_ is now known as startupality
<avril14th>
hmm, ivars? :)
dspangenberg has quit [Ping timeout: 264 seconds]
<avril14th>
isn't there a "$" writing to access each param?
<avril14th>
like $1, $2 ...
<shevy>
$ is global variable, @ is instance variable
shime has joined #ruby
<avril14th>
well, instance method params are not global nor instance
<shevy>
$1 $2 are special through regex checks like =~ ; they are volatile
<shevy>
yeah, they are available only inside of your method there
nerium has quit [Quit: nerium]
<avril14th>
well, I could change the params for a hash
Aova has quit [Read error: Connection reset by peer]
<avril14th>
but they that would be A LOR more verbose
<avril14th>
and I would have to play with that
nerium has joined #ruby
<avril14th>
no other way you think?
claptor has quit [Quit: this channel is bakas]
<shevy>
I would not know how. I mean their name is a give away... local :)
ta_ has quit [Ping timeout: 252 seconds]
selaruvich has joined #ruby
<shevy>
perhaps you could use eval
<avril14th>
yes, that could work
<avril14th>
good idea
<avril14th>
just for my knowledge, what's fastest, eval or hash playing around?
<avril14th>
(that's a weird question)
siso has quit [Quit: siso]
<shevy>
eh
<shevy>
use a hash man
rylev_ has joined #ruby
metadave has joined #ruby
Aova has joined #ruby
<avril14th>
k
<avril14th>
thank you :)
<Bish>
why did net/http stop accepting utf-8 as encoding from the server.. it worked perfectly i remember
Troy^ has joined #ruby
<Bish>
i was like "man ruby is godlike, never had any encoding problems"
josephndenton has joined #ruby
<Bish>
duh..
rylev has quit [Ping timeout: 264 seconds]
<ddv>
why are you so sure it's ruby fault?
<ddv>
it's an assumption
<Bish>
because it even tells me, the header is saying it's utf-8
hightower4 has quit [Ping timeout: 245 seconds]
<shevy>
Bish I always have encoding problems
<shevy>
even when doing # Encoding: ASCII-8BIT
ta_ has joined #ruby
<apeiros_>
Bish: given that I have no problems with net/http & utf-8 encoding from server, I'd doubt that it's net/http. but then again, you didn't exactly tell us much.
<shevy>
actually I need to make this better - I always had encoding problems past 1.8.x days
josephndenton has quit [Ping timeout: 240 seconds]
Elico1 has quit [Remote host closed the connection]
<shevy>
Bish you can try to force the encoding if you are 100% sure it is utf-8
<apeiros_>
shevy: as said, just treat everything as binary and it'll all be like in "good" old 1.8 days.
<shevy>
nope
<apeiros_>
yope
<shevy>
nope absolutely not
penzur has quit [Quit: reboot]
<apeiros_>
proof?
<shevy>
yes - every day
nerium has quit [Quit: nerium]
<apeiros_>
that's a claim, not a proof.
seal has joined #ruby
<shevy>
never had a single problem in the old days, lots of problems every time file handles are opened and assumptions made
<shevy>
you do the very same apeiros_
<shevy>
<apeiros_> shevy: as said, just treat everything as binary and it'll all be like in "good" old 1.8 days. <--
<apeiros_>
shevy: either you have an actual problem you can demonstrate or you're just FUDing around. so please, go ahead and show us…
<shevy>
you did not even have the same situation in the old days
<shevy>
such as objects with different encodings
nerium has joined #ruby
<shevy>
apeiros_ eh? it was you who claimed that this is not the case
ghostpl has quit [Remote host closed the connection]
<Bish>
shevy, yes i did that, didn't work ... it does tell it couldn't convert ascii8bit to utf8
LudicrousMango has quit [Remote host closed the connection]
<apeiros_>
shevy: yes. but inexistence is impossible to prove. existence is. so are you making things up or can you back your claim up?
<shevy>
Bish yeah, I have this often as well
ta_ has quit [Ping timeout: 250 seconds]
<shevy>
apeiros_ why should I? you said it is godlike
roshanavand has quit [Ping timeout: 252 seconds]
<apeiros_>
Bish: so your server claims to send utf-8 but sends data which is not
<Bish>
that could be the reason, yes
<apeiros_>
shevy: ok. you're a FUDer.
<shevy>
apeiros_ you are FUDer
<Bish>
the f is a fuder
<certainty>
FUD the Shuck up?
danjordan has quit [Quit: danjordan]
<apeiros_>
shevy: burden of proof is on you. until you back up your claims of having problems with treating all binary, I'll assume you're either just making things up.
<apeiros_>
-either
<shevy>
apeiros_ nope, you claimed it is "godlike" like in 1.8.x days. it is not. you may always end up with objects in different encodings
ponga has joined #ruby
Timba-as has quit [Ping timeout: 252 seconds]
<shevy>
so are you files in ISO-8859-1 encoding
<apeiros_>
shevy: 1.8 treated all as binary, so yes. it is like 1.8 if you set all encodings to binary. "godlike" is your silly term. don't put words in my mouth, thanks.
<shevy>
nope it simply is not
<shevy>
invalid byte sequence in UTF-8
<shevy>
even when I have it set
<apeiros_>
if you end up with objects in different encodings, then *you* do it wrong
<shevy>
you stated it is like the old days, this is simply incorrect
<apeiros_>
"invalid byte sequence in UTF-8" says you haven't set it.
<apeiros_>
shevy: dude, if you fuck it up, sure it isn't. my statement clearly requires you to do it properly.
<shevy>
I don't even have UTF-8 - it is an assumption by ruby
quimrstorres has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
<shevy>
apeiros_ all the files are # Encoding: ASCII-8BIT - so now what dude?
<apeiros_>
shevy: that only covers source encoding.
<shevy>
...
<apeiros_>
i.e. all literals.
JBreit has joined #ruby
arup_r has joined #ruby
<apeiros_>
it does not cover any IO
<certainty>
shevy: your mum is godlike
<certainty>
:D
danjordan has joined #ruby
<shevy>
certainty she is mixed encoding
<certainty>
hah
Axy has joined #ruby
Axy has joined #ruby
Mia has quit [Read error: Connection reset by peer]
<shevy>
one day I should switch to UTF-8
<apeiros_>
that day was 5y ago.
d10n-work has joined #ruby
<certainty>
one day is another word for noway
<shevy>
Bish still has encoding problems
ghostpl has joined #ruby
<Bish>
yip ;) im checking if what apeiros said is true
penzur has joined #ruby
<shevy>
I'd do the same!
<apeiros_>
that's sensible
wottam has joined #ruby
<shevy>
wait... that is the wrong apeiros Bish... you need to listen to the apeiros_ one
felixjet__ has quit [Quit: Leaving]
dumdedum has joined #ruby
seal has quit [Quit: Ex-Chat]
Timgauthier is now known as timgauthier_away
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
timonv has quit [Ping timeout: 264 seconds]
bronson has joined #ruby
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ChoiKyuSang has quit [Ping timeout: 265 seconds]
n1lo has quit [Ping timeout: 264 seconds]
n1lo has joined #ruby
bonhoeffer has joined #ruby
revoohc has joined #ruby
ixti has joined #ruby
pu22l3r has quit [Ping timeout: 246 seconds]
chihhsin has joined #ruby
bronson has quit [Ping timeout: 264 seconds]
bonhoeffer has quit [Client Quit]
silkfox has joined #ruby
<certainty>
shevy: you have no time for utf-8
charliesome has quit [Quit: zzz]
<Bish>
C\xC3\xADalan this is utf-8 right
Troy^ has joined #ruby
zarubin has joined #ruby
<apeiros_>
>> x = "C\xC3\xADalan"; [x.encoding, x.valid_encoding?]
<eval-in__>
Xnfu => undefined local variable or method `ord' for main:Object (NameError) ... (https://eval.in/277774)
<shevy>
certainty you use emacs?
<certainty>
shevy: yes
<arup_r>
shevy: I use Vim
<shevy>
arup_r yeah I was a vim user too in the beginning for some years
<Xnfu>
vim is the best text editor
<tobiasvl>
Xnfu: don't spam the bot please, use irb locally for testing
<Xnfu>
lol ^
<arup_r>
shevy: Why did you quit ?
<arup_r>
I meant quit vim
<shevy>
arup_r I felt that it took too much resources from my brain
<arup_r>
hehehehee
<arup_r>
:-)
<arup_r>
true true
<Xnfu>
vim makes things easy and efficient if you do it correctly
<arup_r>
Now.. what you use ?
sankaber has joined #ruby
<Xnfu>
prolly sublime or atom :p
<shevy>
arup_r bluefish 1.0.7 still. ironically the 2.x branch is worse than the 1.x :(
<Xnfu>
bluefish o.O
<Xnfu>
dafek
timonv has joined #ruby
<certainty>
shevy: hmm really? vim's command are quite regular. i think it might take less resources than emacs. That doesn't matter once you've developed muscle memory though
hiyosi has joined #ruby
<shevy>
certainty yeah. been there, done that. I think I have a vimrc that has ... about 30.000 lines or something. when I tried to clean it up, I asked myself why do I even want to do all this
<Bish>
apeiros, so what do i do know, when i know the server sends me utf8
<Bish>
and it doesn't encode it & force encoding doesn't work
triple_b has joined #ruby
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Timgauthier has joined #ruby
* arup_r
start wiking to know what is bluefish..
<certainty>
shevy: ah ok that's way too much. i have many modes as well and my emacs config is not exactly easy but not very hard either
ta_ has quit [Ping timeout: 252 seconds]
<shevy>
certainty doesn't emacs ruin the fingers with all those shortcuts? :-)
<shevy>
Ctrl-X Ctrl-Y Ctrl-P Ctrl-BreakFingers
<Timgauthier>
lol
anarang has quit [Quit: Leaving]
<Timgauthier>
use a mac
<Timgauthier>
command is much easier to hit
marr has joined #ruby
<certainty>
shevy: it can. i have a layout that is slightly more geared towards emacs
<arup_r>
shevy: what is **Ctrl-BreakFingers** ?
<apeiros_>
Bish: can you create a reproducible minimal case?
<shevy>
Timgauthier but I like linux!
tier has joined #ruby
<Timgauthier>
and i like php!
ta_ has joined #ruby
<Bish>
apeiros, no.
<Timgauthier>
doesn't make either of us a better person
<shevy>
hehe
rdark has quit [Quit: leaving]
<shevy>
Timgauthier you use TextMate?
<apeiros_>
Bish: ok, then I can't help you.
rdark has joined #ruby
axl_ has joined #ruby
<Timgauthier>
shevy not anymore
<Timgauthier>
i use sublime text
<Timgauthier>
3
<Bish>
apeiros, does it help that res.type_params say it's utf-8?
<shevy>
aha
<apeiros_>
Bish: that's a tiny piece of the puzzle. so no, that alone doesn't help.
<apeiros_>
Bish: you can't provide minimal information and expect useful help, sorry.
<Bish>
hokay :[
sandelius has joined #ruby
<apeiros_>
I mean you can - hire a consultant. that guy will be happy to make lots of money because it'll cost tons of time.
<apeiros_>
but it's unreasonable to expect the same for free.
anaeem1_ has joined #ruby
Rylee has left #ruby ["WeeChat 1.1-dev"]
AlexRussia has joined #ruby
rbennacer has joined #ruby
allcentury has joined #ruby
ta_ has quit [Ping timeout: 265 seconds]
<arup_r>
Tips: What's the fastest way to learn any programming language ? Any body would like to share ?
<Harlin>
Is there a FileUtil function that can copy both file and directory to another directory without having to test first that the source is either file or dir?
juanpablo____ has quit [Quit: (null)]
it0a has joined #ruby
<Harlin>
test so that you can then use two separate functions to handle both
dspangenberg has quit [Ping timeout: 245 seconds]
juanpablo_ has joined #ruby
coco_ has quit [Ping timeout: 245 seconds]
russt1 has joined #ruby
russt_ has joined #ruby
Xnfu has joined #ruby
<Xnfu>
lol I didn't even spam
<Xnfu>
If anything that bot generates more spam
d10n-work has quit [Quit: Connection closed for inactivity]
<Xnfu>
I get kicked for a rule I didn't break, lame
<Xnfu>
Good werk <3
<Harlin>
nm... I was doing a self recursive copy :( (doh)
dimaursu16 has quit [Ping timeout: 255 seconds]
Kricir has quit [Remote host closed the connection]
<apeiros_>
Xnfu: "mimimi I didn't spam, it was my chat client!"
<apeiros_>
seriously, that's as stupid an argument to make as humanly possible
mitchellhenke has quit [Quit: Computer has gone to sleep.]
jlast has quit [Remote host closed the connection]
<Xnfu>
Yeah, right because that was my argument.
jottr_ has joined #ruby
<Xnfu>
You have some maturity for an op, let me tell you.
<apeiros_>
*you* were the cause of the spam. not the bot. hence you get kicked. and if you do it again, or think it's a great idea to get all noisy over it, I can make it a ban too.
i0n was kicked from #ruby by apeiros_ [insults are not welcome either]
sent1nel has joined #ruby
<shevy>
ddv well it depends
* certainty
didn't see that coming
<apeiros_>
(he was referring to me with "he")
sambao21 has quit [Quit: Computer has gone to sleep.]
n4l has joined #ruby
tier has joined #ruby
blackmesa has joined #ruby
<ddv>
lol I thought he was refering to Xnfu_
<shevy>
ddv in the last 15 years, there were lots of new pizzeria-like areas... turkish pizza... indian pizza... these ones are strange, they taste as if you put too much flour into a bag and then just heated it up
<ddv>
shevy: I know a place that makes the best pizzas ever
<shevy>
I think it is mostly because they lack stone ovens
<shevy>
they use some other heating devices usually
<ddv>
shevy: Ok
<apeiros_>
that's what he considers to be a jerk. well. fine. he can think what he wants. but writing is another thing.
nolic has quit [Remote host closed the connection]
ghostpl has quit [Remote host closed the connection]
<ddv>
shevy: Yes a stone is the only proper way to heat a pizza
sambao21 has joined #ruby
<ddv>
+oven
<shevy>
with the turkish pizza slices, it's like 3 euros for a quarter pizza, they heat it up for 30 seconds then you get it... it's not bad per se but it just isn't as great as those in a stone oven
russt_ has quit [Quit: russt_]
Brando753 has quit [Quit: o_O_o]
SixiS has quit [Ping timeout: 245 seconds]
<shevy>
ddv now I am hungry :(
russt1 has quit [Remote host closed the connection]
<shevy>
it is strange because some lines display perfectly fine, then other lines don't
<certainty>
shevy: probably a problem with your window manager or your device driver?
<shevy>
hmm
<certainty>
did you upgrade X?
<certainty>
or the driver?
<shevy>
kinda
<shevy>
everything :-)
<certainty>
heh
xyh has joined #ruby
<shevy>
I think it must be gtk-related. kde konsole works fine, opera (which I think uses qt?) also works fine
<certainty>
shevy: yeah that sounds reasonable to assume then
ghostpl has joined #ruby
<xyh>
I see the following error when I am trying to use jekyll :: /usr/lib/ruby/gems/2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:43:in `<module:SafeYAML>': undefined method `tagged_classes' for Psych:Module (NoMethodError)
<certainty>
shevy: of course the solution is to use kde
<certainty>
:p
<shevy>
certainty yeah, I'll give that a try lateron
rkgudboy has quit [Ping timeout: 265 seconds]
<certainty>
KDE is not exactly the best desktop environment but probably also not the worst
<shevy>
I am more like cherry picking... combining what is useful and not using the rest
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
with fluxbox, if you do "startx" it is almost instantly there, all you need. when I start kde, it takes perhaps... 8 seconds or so before I can start using anything
<certainty>
yepp i know. i did like fluxbox some years back
ixti has quit [Ping timeout: 246 seconds]
kwd has quit [Quit: kwd]
<certainty>
shevy: but why konsole then and not e.g. urxvt?
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
ghostpl has quit [Ping timeout: 256 seconds]
allcentury has quit [Ping timeout: 244 seconds]
fryguy9 has joined #ruby
<shevy>
certainty urxvt has some strange display glitches every now and then
stunder has joined #ruby
<certainty>
shevy: hmm ok, i never had problems. no system is perfact :D
ta_ has joined #ruby
ixti has joined #ruby
yfeldblum has joined #ruby
allcentury has joined #ruby
<shevy>
yeah, you come over here and you'll be surprised how many problems I can find without even wanting to ;)
coco_ has joined #ruby
Aova has quit [Read error: Connection reset by peer]
rocknrollmarc has quit [Ping timeout: 264 seconds]
tesuji has quit [Ping timeout: 264 seconds]
dc_ has quit [Remote host closed the connection]
SixiS has joined #ruby
danman has joined #ruby
lrocknrolmarc has quit [Ping timeout: 252 seconds]
blackoperat has joined #ruby
einarj has quit [Remote host closed the connection]
cphrmky has joined #ruby
zenith_ has joined #ruby
Takle has quit [Remote host closed the connection]
einarj has joined #ruby
Aova has joined #ruby
tunaCanBruh has quit [Ping timeout: 255 seconds]
last_staff has quit [Quit: last_staff]
wpp has quit [Quit: ZZZzzz…]
wpp has joined #ruby
allcentury has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 264 seconds]
ta_ has quit [Ping timeout: 244 seconds]
allcentury has joined #ruby
kamilc__ has joined #ruby
einarj has quit [Ping timeout: 256 seconds]
aryaching has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<workmad3>
like Bell End, Swallow Drive, North Piddle...
<shevy>
oh in Gloucestershire ... that place still looks as if it was stuck in medieval times
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
lol
n008f4g_ has quit [Ping timeout: 264 seconds]
ghostpl_ has quit [Remote host closed the connection]
<shevy>
I am slowly beginning to understand how Monty Python could have been so funny... Sally Pusseys... man, with that name alone, comedy becomes much easier
OrbitalKitten has joined #ruby
lolmaus has joined #ruby
<workmad3>
shevy: I grew up in gloucestershire :(
tunaCanBruh has joined #ruby
<shevy>
hehe
<shevy>
picturesque area
Aova has joined #ruby
mskaesz has quit [Quit: Leaving...]
<shevy>
especially when you compare this to Hong Kong!
nobitanobi has joined #ruby
chipotle has joined #ruby
nobitanobi has quit [Client Quit]
rkgudboy has quit [Ping timeout: 245 seconds]
fryguy9 has quit [Quit: Leaving.]
<workmad3>
yeah... I grew up in probably the least picturesque area :P
Timgauthier has quit [Read error: Connection reset by peer]
danjordan has quit [Quit: danjordan]
yfeldblum has quit [Ping timeout: 245 seconds]
Timgauthier has joined #ruby
<shevy>
hehe
startupality has quit [Quit: startupality]
jobewan has joined #ruby
rylev_ has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tjohnson has joined #ruby
hamakn has joined #ruby
<workmad3>
shevy: I watched an Adam Hills show the other day... at one point, he just went through a possible train journey in the UK for the entire purpose of watching the person signing his show do the various signs...
crueber has joined #ruby
<workmad3>
shevy: Cockfosters was pretty good :)
<shevy>
what a weird name
rylev has quit [Ping timeout: 245 seconds]
aryaching_ has joined #ruby
dspangenberg has joined #ruby
redk1ng has quit [Remote host closed the connection]
deol has joined #ruby
olivier_bK has quit [Ping timeout: 250 seconds]
<workmad3>
shevy: the sign-language for it was the poor girl holding her hand down in a circle to indicate 'Cock' and then the motion to open a can of beer for 'fosters'...
antgel has quit [Ping timeout: 255 seconds]
<shevy>
what the
zenith__ has joined #ruby
odin22 has joined #ruby
skj3gg has joined #ruby
<shevy>
why do they use a circle with a held down hand
paulfm has quit [Quit: Zzzzz...]
aryaching_ has left #ruby [#ruby]
aryaching_ has joined #ruby
<shevy>
I mean if they already use a motion for open-can
<shevy>
they could also use a motion for the other word too!
aryaching has quit [Ping timeout: 265 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
dspangenberg has quit [Ping timeout: 245 seconds]
triple_b has joined #ruby
nerium has quit [Quit: nerium]
zenith_ has quit [Ping timeout: 264 seconds]
jgabrielygalan has quit [Quit: Leaving]
shum has quit [Quit: WeeChat 1.1.1]
<workmad3>
shevy: no, as in they make a circle with thumb and fore-finger and then hold it down near the pubic region
<workmad3>
shevy: as though they were holding a cock...
shum has joined #ruby
russt_ has joined #ruby
<shevy>
hehe
mary5030 has joined #ruby
Pupeno has quit [Remote host closed the connection]
<workmad3>
bishops hedge was also amusing :)
<workmad3>
but not quite as vulgar
jottr_ has joined #ruby
Pupeno has joined #ruby
Hobogrammer has joined #ruby
lemur has joined #ruby
B1n4r10 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nerium has joined #ruby
allcentury has quit [Ping timeout: 246 seconds]
endash has joined #ruby
russt_ has quit [Client Quit]
SixiS has quit [Read error: Connection reset by peer]
<atmosx>
hello
Bounga has quit [Quit: Bounga]
<shevy>
hey atmosx
Timgauthier has quit [Quit: night!]
<shevy>
atmosx doing any bioinformatic stuff today?
hamakn has quit [Remote host closed the connection]
<atmosx>
shevy: nah, thank God.
<shevy>
hehe
idealexit has joined #ruby
<atmosx>
shevy: made a couple of vaccines
<atmosx>
today
noop has joined #ruby
<shevy>
oh?
stunder has quit [Read error: Connection reset by peer]
pdoherty has quit [Remote host closed the connection]
<atmosx>
jefus: what's the non-boring solution?
<jefus>
i'd bet half the members of any programming channel takes something like that
Pharaoh2 has quit [Max SendQ exceeded]
<havenwood>
atmosx: and my ex >.>
<jefus>
it's...
<atmosx>
havenwood: oh well, what's her opinion, does these work becuase last time I chacked there's not any kind of scientific evidence they do whatsoever
<jefus>
i haven't figured it out yet.
arietis_ has joined #ruby
<avril14th>
now the investors and then I'm nearly off programming channels again, w00T
Pharaoh2 has joined #ruby
spyderman4g63 has joined #ruby
<atmosx>
avril14th: what investors?
<avril14th>
the ones I've been talking with for over a month
mikecmpbll has joined #ruby
<atmosx>
avril14th: you're programming for HFT?
jschoolcraft has joined #ruby
<avril14th>
atmosx: in ruby? lol
<atmosx>
avril14th: That was my next question
<avril14th>
atmosx: I used to do that (HFT), but I stopped
<atmosx>
avril14th: why?
<avril14th>
quit my joob in switzerland for this startup frenzy
<atmosx>
avril14th: what language would be most optimal, something like erlang?
<avril14th>
and so back to coding again :/
<havenwood>
atmosx: they assume more efficacy than I think the evidence supports, hard when pharma wont publish anything negative
ramfjord has joined #ruby
<atmosx>
avril14th: oh, well you're rich.
<avril14th>
atmosx: depends what exact high frequency you want
<havenwood>
publish ALL THE STUDIES \o/
<GaryOak_>
I can't even do low frequency trading
<atmosx>
avril14th: at least you have that going on. HFT seems interesting though
<atmosx>
havenwood: hahahahaha
<atmosx>
GaryOak_: why is that?
sambao21 has quit [Quit: Computer has gone to sleep.]
arietis has quit [Ping timeout: 240 seconds]
<GaryOak_>
I guess I'm just risk averse
<avril14th>
if you want second resolution, C++/C# can do
<atmosx>
GaryOak_: hm, no I mean programming-wise.
<avril14th>
sub that, people tend to develop their own language that gets hard coded into chips
<arup_r>
How can I get rid of chains of #try client_menu.send(type).try(:display_name).try(:mb_chars).try(:upcase) ?
<GaryOak_>
atmosx: you mean stock trading through a progam, I probably could
zachrab has joined #ruby
<arup_r>
It looks very nasty
<arup_r>
It is just to prevent the code raise Nomethod error on nil
<atmosx>
GaryOak_: yeah
<GaryOak_>
atmosx: I don't really understand how stocks work well enough
<workmad3>
arup_r: sort out your data model so that you don't return nils
<workmad3>
arup_r: have sensible defaults, or null-object patterns that represent 'no value' for a specific domain object
tier has quit [Ping timeout: 244 seconds]
gfawcettpq has quit [Read error: Connection reset by peer]
mary5030 has quit [Remote host closed the connection]
rdark has quit [Quit: leaving]
<avril14th>
btw, my text parsing takes 30sec to perform, ruby is indeed slow 0o
josephnd1nton has joined #ruby
<avril14th>
for documents that have no more than a hundred words
<atmosx>
avril14th: if it were both beautiful and fast there wouldn't be any competition left.
jschoolcraft has quit [Quit: peace]
<avril14th>
true
_maes_ has joined #ruby
tier has joined #ruby
<avril14th>
I wonder how fast the same thing would run on Crystal
<GaryOak_>
rust, ;)
sambao21 has joined #ruby
gfawcettpq has joined #ruby
<atmosx>
GaryOak_: hm, not as beautiful and buggy.
<GaryOak_>
that's fair, it just needs some more time to mature
Takle has quit [Remote host closed the connection]
nerium has quit [Quit: nerium]
<arup_r>
workmad3: So for each model one NullObject? Or a Global one ?
wallerdev has joined #ruby
davedev2_ has joined #ruby
davedev24_ has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
Megtastique has quit []
paulfm has joined #ruby
josephnd1nton has quit [Ping timeout: 265 seconds]
lioninawhat has quit [Remote host closed the connection]
<avril14th>
ok, off the desk. nice evening everyone
rclements has quit [Quit: rclements]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
william3 has joined #ruby
nerium has joined #ruby
nanoyak has joined #ruby
<atmosx>
Trying to implement a part of merge-sort here. Any idea why counting starts from the element 1 instead of zero? (first) then I have a 2nd issue with the implementation https://gist.github.com/atmosx/15cf0cd9f477d4ec370a
<atmosx>
ideas, thoughts welcomed :-)
thumpba has joined #ruby
momomomomo has quit [Quit: momomomomo]
momomomomo has joined #ruby
momomomomo has quit [Client Quit]
iamjarvo has joined #ruby
aryaching_ has quit [Ping timeout: 255 seconds]
aryaching has joined #ruby
scottgc has joined #ruby
rsavage has joined #ruby
ghr has joined #ruby
<rsavage>
Question, say I have a ruby script that shells out to run a command... and that command take a few mins to complete... is there a way to return/resuce on the failure of that shell command?
<havenwood>
rsavage: yes
<rsavage>
havenwood: sweet, how?
stunder has joined #ruby
B1n4r10 has joined #ruby
Aova has quit [Read error: Connection reset by peer]
Sid05 has joined #ruby
dfinninger has quit [Remote host closed the connection]
<cHarNe2>
atmosx: not sure what you are trying to accive
nanoyak has quit [Remote host closed the connection]
<havenwood>
Diabolik: if it walks like a bool and quacks like a bool...
<epitron>
hahah
<cHarNe2>
funny
<epitron>
yeppp
<epitron>
the ruby way isn't to check types
<epitron>
it's to use the objects and let them blow up
<Diabolik>
Create a Apple class. It should take a single argument on initialization -- a boolean value (true or false) asserting whether or not it is ripe
mary5030 has quit [Remote host closed the connection]
Kache4 has joined #ruby
agit0 has joined #ruby
rclements has joined #ruby
sent1nel has quit [Remote host closed the connection]
Azure has quit [Excess Flood]
roshanavand has joined #ruby
<cHarNe2>
well, my train is soon on the platform and, keep up the good work :)
werelivinginthef has quit [Remote host closed the connection]
shime has joined #ruby
Azure has joined #ruby
Aova has quit [Read error: Connection reset by peer]
sent1nel has joined #ruby
silkfox has quit [Ping timeout: 264 seconds]
Takle has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
Diabolik: Class's superclass is Module, whose superclass is Object, whose superclass is BasicObject, whose class is Class, just like Object, Module and Class's class are Class.
Kache4 is now known as Kache
ta_ has quit [Ping timeout: 252 seconds]
<arup_r>
wallerdev: got error
<arup_r>
NoMethodError: undefined method `alias_method' for #<Menu:0xafc8294>
arietis_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<wallerdev>
well that answer says that the methods are generated in a module that is included into the model class
<wallerdev>
thats not usually how things are done, thats just a rails thing
n4l has quit [Ping timeout: 265 seconds]
<wallerdev>
super would work in that case since the methods dont exist in the class in the first place, they exist in the module that was included
<havenwood>
Diabolik: It doesn't make sense to have an attr_accessor for a method you also define.
checkit has joined #ruby
<Diabolik>
ok havenwood
<Diabolik>
il work on it
OrbitalKitten has joined #ruby
beneggett has joined #ruby
<Diabolik>
thanks
paulfm has joined #ruby
startupality has quit [Quit: startupality]
mitchellhenke has quit [Ping timeout: 264 seconds]
<havenwood>
Diabolik: If you don't define the setter part, you could have an `attr_writer` or if you don't define the getter part you could have an `attr_reader` but `attr_accessor` does both so you're stomping on your getter here.
shadoi has joined #ruby
Turkey has quit [Ping timeout: 276 seconds]
naftilos76 has joined #ruby
<havenwood>
Diabolik: I'd vote just placing around with a single Class, and figure out how to initialize instance variables, use them in methods, then explore the attr sugar.
<havenwood>
s/placing/playing
ta_ has quit [Ping timeout: 252 seconds]
silkfox has joined #ruby
<Diabolik>
will do
<Diabolik>
thanks for the help
ghr has joined #ruby
<havenwood>
np
n4l has joined #ruby
oo_ has quit [Ping timeout: 245 seconds]
spider-mario has joined #ruby
<arup_r>
wallerdev: They used association.,.. Me too.. They won as they used `def`, But I lost as I used `define_method` ... I feel so.. But why my feeling is so bitter :-(
<arup_r>
I don't know
mikepack has joined #ruby
<wallerdev>
oh are you using activerecord?
spider-mario has quit [Read error: Connection reset by peer]
<arup_r>
Humm
<shadoi>
arup_r: 'define_method' is generally used in metaprogramming
<arup_r>
I didn't mention that... Otherwise you could ignore me :(
<arup_r>
shadoi: I know.. that's why I used
<shadoi>
ah, I must have misread
<arup_r>
There are 7 types.. By hand if I define them.. I'll disobey DRY
iamjarvo has joined #ruby
<arup_r>
:p
scottgc has joined #ruby
momomomomo has joined #ruby
shime has quit [Ping timeout: 265 seconds]
spider-mario has joined #ruby
<arup_r>
I understand only this refactoring technique... :) BTW
ghr has quit [Ping timeout: 250 seconds]
goodenough has joined #ruby
tyfighter has quit [Ping timeout: 250 seconds]
jobewan has joined #ruby
lkba has joined #ruby
yfeldblum has joined #ruby
tyfighter has joined #ruby
siso has joined #ruby
yfeldblum has quit [Remote host closed the connection]
beneggett has quit [Read error: Connection reset by peer]
yfeldblu_ has joined #ruby
mikepack has quit []
anaeem1_ has quit [Remote host closed the connection]
mikepack has joined #ruby
pandaant has quit [Remote host closed the connection]
beneggett has joined #ruby
anaeem1 has joined #ruby
neoxoen has joined #ruby
quimrsto_ has joined #ruby
febuiles has joined #ruby
n008f4g_ has joined #ruby
anaeem1 has quit [Ping timeout: 245 seconds]
dabrorius has quit [Remote host closed the connection]
siso has quit [Quit: siso]
wald0 has quit [Quit: Lost terminal]
tyfighter_ has joined #ruby
tyfighter has quit [Ping timeout: 264 seconds]
tyfighter_ is now known as tyfighter
quimrstorres has quit [Ping timeout: 245 seconds]
CustosL1men has quit [Ping timeout: 264 seconds]
arietis has joined #ruby
quimrsto_ has quit [Ping timeout: 250 seconds]
dspangenberg has joined #ruby
nanoyak has quit [Read error: Connection reset by peer]
Takle has quit [Remote host closed the connection]
<shevy>
hmm
<shevy>
anyone of you knows of a simple way
<shevy>
to rearrange the content of an array
<shevy>
like: switch position 4 with position 2 ?
nanoyak has joined #ruby
<shevy>
actually
pdoherty has quit [Remote host closed the connection]
Takle has joined #ruby
<shevy>
I think I'm just going dump this into a second array and use that one instead
ta_ has joined #ruby
nanoyak has quit [Client Quit]
<shadoi>
you can shuffle it
<wallerdev>
lolol
<shadoi>
if you need to do it precisely then I guess a new array is the only way
kirun has joined #ruby
<wallerdev>
just find a method in our codebase called parse_distance_from_jason
spacemud has joined #ruby
sent1nel has joined #ruby
<wallerdev>
instead of json
squar1sm has joined #ruby
<shadoi>
lol
paulfm_ has joined #ruby
tyfighter_ has joined #ruby
momomomomo has quit [Ping timeout: 245 seconds]
jimms has quit [Remote host closed the connection]
Turkey has joined #ruby
<shadoi>
I always pronounce it j-sawn, all the jason pronouncers hate me.
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<crome_>
>> a = [1, 2, 3]; a[0], a[2] = a[2], a[0]; a
rylev has quit [Remote host closed the connection]
<shadoi>
crome: commas ftw
mikepack has joined #ruby
pdoherty has joined #ruby
ta_ has joined #ruby
tyfighter has quit [Ping timeout: 244 seconds]
arturhoo has joined #ruby
<shadoi>
assignment there is surprising, kinda scary.
josephnd1nton has quit [Ping timeout: 252 seconds]
tyfighter has joined #ruby
shredding has quit [Quit: shredding]
Linell_ has joined #ruby
Bira has quit [Remote host closed the connection]
<eam>
why's that surprising/scary?
nobitanobi has joined #ruby
Takle has joined #ruby
<crome>
blizzy: is it dead?
jheathco has joined #ruby
<blizzy>
well, dead-ish.
<shadoi>
This doesn't really look like it's reassigning 'a': a[0], a[2] = a[2], a[0]
<blizzy>
is my gist possible?
jheathco has quit [Changing host]
jheathco has joined #ruby
<cphrmky>
I'm confused by dead/dead'ish. It has commits from today on GH...
<blizzy>
I meant
<crome>
yeah, that's why I asked
<blizzy>
the channel is dead
<jheathco>
anyone know if rvm allows me to put project specific environment variables in some file for rails?
<cphrmky>
oh
<blizzy>
sorry about the confusion, cphrmky
<shadoi>
blizzy: look at 'render'
<crome>
I think he wants the params
<crome>
(textarea value)
<blizzy>
yeah, I want to get the textarea param without submitting a form
<cphrmky>
blizzy haha, def made me wonder if I've been under a rock or something
<crome>
blizzy: in a get/post/whatever block you should be able to access the "params" hash
<shevy>
I have an array like: [1, 5, 6, 2, 3, 4]; and I have a second array that has strings. how can I obtain the proper strings, using the second array as the index for obtaining them?
<blizzy>
so it's not possible without reloading the page
rbennacer has quit [Remote host closed the connection]
<squar1sm>
I made an animation in Ruby with gamebox.io. Check it out. The source is linked below the video. https://vimeo.com/116836454
<shadoi>
shevy: depends what you want to end up with
<blizzy>
actually, I can use ajax for this
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 35.0/2015010900]]
nobitanobi has joined #ruby
<blizzy>
but there's no way to get the value without a GET or POST request?
reinaldob has quit [Remote host closed the connection]
<shadoi>
squar1sm: this is cool :)
rbennacer has joined #ruby
psyprus has quit [Changing host]
psyprus has joined #ruby
<shevy>
shadoi hmm lemme think
shum has quit [Quit: WeeChat 1.1.1]
sambao21 has quit [Quit: Computer has gone to sleep.]
<shadoi>
shevy: if memory isn't a concern you can zip the arrays together into a hash
<shadoi>
Hash.new(arr1.zip(arr2))
shum has joined #ruby
momomomomo has quit [Quit: momomomomo]
<wallerdev>
probably want Hash[] for that
multi_io_ has joined #ruby
<shadoi>
woops yeah
<squar1sm>
shadoi: thx
jheathco has quit [Quit: Page closed]
<shadoi>
squar1sm: what's the music?
<eam>
shevy: what do you mean obtain the proper strings? What's your input criteria?
<eam>
like "I want string #2, mapped through my first array?"
<shevy>
the first array gives the new positions
ldnunes has quit [Quit: Leaving]
<eam>
just array2[array1[index]]
<shevy>
I basically just have to reshuffle the array
<squar1sm>
shadoi: original
wallerdev has quit [Quit: wallerdev]
<shevy>
if I give the input: 1,3,7,2,4,5,6
idealexit has joined #ruby
<crome>
blizzy: I don't think I understand what you want exaclty
<shevy>
then the original array is always assumed to be: 1,2,3,4,5,6,7
<crome>
(or you don't :))
<shadoi>
squar1sm: you should say that in the description! great work :)
sambao21 has joined #ruby
<eam>
shevy: yeah just do array2[array1[index]]
<squar1sm>
Yeah it says in the repo
<squar1sm>
thanks
<shevy>
so in the case above, I need the last position, at the third one etc...
<squar1sm>
All the assets are in git
Aova has quit [Read error: Connection reset by peer]
_mynameis has quit [Quit: Leaving]
<eam>
things[ order_of_things[ position ] ]
devdazed_ has joined #ruby
mloveless has joined #ruby
multi_io has quit [Ping timeout: 255 seconds]
nerium has joined #ruby
apeiros_ has joined #ruby
<eam>
you could reorder `things` but there's really no need
ta_ has quit [Ping timeout: 252 seconds]
bronson has quit [Remote host closed the connection]
<eam>
depends if you'll change around your order_of_things
<blizzy>
crome, basically, I want to be able to type a word on the left side of the page, and it appears on the right without reloading the page.
olivier_bK has joined #ruby
chrishough has joined #ruby
perrier has quit [Remote host closed the connection]
perrier has joined #ruby
n1lo has quit [Quit: Leaving]
devdazed has quit [Ping timeout: 244 seconds]
jgt has quit [Ping timeout: 264 seconds]
Peppuz has joined #ruby
<shadoi>
shevy: if this is literally an ordering thing, and you may have to change the order again, I like a hash with the order as the key. Inefficient though it may be.
tonybird has joined #ruby
dukejames has quit [Quit: Quitting forever wow]
ghostpl has joined #ruby
james_ has joined #ruby
CpuID2 has joined #ruby
Aova has joined #ruby
james_ is now known as Guest96614
<shevy>
I get the input only from .csv files
<shadoi>
blizzy: you need javascript for that.
james__ has joined #ruby
ta_ has joined #ruby
scottgc has quit [Quit: scottgc]
<blizzy>
yeah, I just figured that out.
<blizzy>
thanks, shadoi.
james__ has quit [Read error: Connection reset by peer]
bronson has joined #ruby
Guest96614 is now known as DukeJames
<shevy>
hmm
danjordan has joined #ruby
<shevy>
is the most common separator in .csv files really a ',' ? I seem to remember that \t is also very popular
<crome>
ah, a framework for people who really can't be arsed to learn javascript?
<havenwood>
crome: \o/
<crome>
I mean, what could possibly go wrong
<blizzy>
thanks again, havenwood.
<blizzy>
I know Javascript. :L
<havenwood>
blizzy: no prob
zachrab has quit [Remote host closed the connection]
ponga has quit [Quit: Leaving...]
<wasamasa>
havenwood: what exactly is "data rich" supposed to mean
<wasamasa>
havenwood: do I need to be google to qualify?
nyuszika7h has joined #ruby
zachrab has joined #ruby
<havenwood>
shadoi: they report a pleasant experience. haven't had time to develop Stockholm syndrome like the jsers so i dunno? :P
Rezor has joined #ruby
<nyuszika7h>
hi, is there a way to see how Ruby parses a regex internally? I'm seeing weird behavior with ^[0-9]{2}{3,}$
<havenwood>
wasamasa: poor data...
<wasamasa>
"Docs: English | Japanese"
<wasamasa>
I have a bad feeling about this...
<wasamasa>
havenwood: oh, you mean unstructured data
<shevy>
lol
<nyuszika7h>
most other regex engines (Python, JavaScript) error on that. in Ruby, "123456" matches but not anything shorter or longer.
<nyuszika7h>
I'd expect that to expand to either [0-9][0-9]{3,} or [0-9]{3,}[0-9]{3,} if there's no error, but neither are true because 1234 would match with the first and 1234567 would match with the second.
Rezor has quit [Client Quit]
danjordan has quit [Quit: danjordan]
<crome>
see, ruby is awesome, it doesn't error when python and js do
ghostmoth has joined #ruby
iwishiwerearobot has quit [Ping timeout: 264 seconds]
<nyuszika7h>
actually, wait
iamjarvo has joined #ruby
<shadoi>
havenwood: volt looks great, I'll play around with it for a dashboard I'm going to write.
<nyuszika7h>
^[0-9]{2}{3,}$ matches 123456, 12345678 and so on
<nyuszika7h>
ah, I see!
<crome>
not on 2.0.0
<crome>
interesting
<nyuszika7h>
3 or more two-digit sequences
ghr has joined #ruby
<nyuszika7h>
so it's interpreted as ^([0-9]{2}){3,}$
shime has joined #ruby
ta_ has quit [Ping timeout: 252 seconds]
<sparr>
capistrano is trying to run this command while deploying one of my rails projects, can anyone tell me what it's supposed to do? "/usr/bin/env [ ! -d ~/.rbenv/versions/2.1.2 ]"
<nyuszika7h>
I'm on 2.1.4
zachrab has quit [Ping timeout: 255 seconds]
momomomomo has joined #ruby
scottgc has quit [Quit: scottgc]
sent1nel has quit [Remote host closed the connection]
<nyuszika7h>
sparr: it's checking to make sure the directory ~/.rbenv/versions/2.1.2 does not exist
dsfargeg has joined #ruby
sent1nel has joined #ruby
<sparr>
it does exist
<nyuszika7h>
well maybe it does something when it doesn't exist, and something else when it does
ghr has quit [Ping timeout: 252 seconds]
nanoyak has joined #ruby
<sparr>
that command is the last command being run. capistrano bails out because it returns 1
dc has quit [Remote host closed the connection]
fantazo has quit [Quit: Verlassend]
LudicrousMango has joined #ruby
<havenwood>
sparr: Gist more code?
tunaCanBruh has quit [Ping timeout: 264 seconds]
sent1nel has quit [Remote host closed the connection]
<sparr>
havenwood: that's the only code relevant to the question I'm asking
<havenwood>
sparr: But that code alone makes no sense.
<shellfu>
sparr that is a very simple and reproducible test on any *nix cli. Id get it straight manually and alter your cap task
Kricir has quit [Remote host closed the connection]
<shevy>
that kinda sucks :(
rsavage has quit [Quit: Konversation terminated!]
jherbst has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
olivier_bK has quit [Ping timeout: 252 seconds]
<shellfu>
also sparr just a quick note. ~/ denotes the home directory of the user running the script. It may exists but it may not exist at the user cap is running as. Something to check
<sparr>
shellfu: it existing is the problem. that test seems to produce 0 if the directory is missing, and 1 if it exists, with 1 being an error
fryguy9 has quit [Quit: Leaving.]
<shellfu>
that is nothing more than a directory test in sh. Besides negative control flow isnt the best when you approach that code months later. That is opinion however.
<shellfu>
Test for yourself on the cli first. Dont rely one some other garbage just yet. Test yourself. Then check the running user cap is running as. Add output.
<shellfu>
You need to add lots and lots of output until you find your issue. Your specific issue is not cap related, but rather being tested via the shell and user that cap is running as
icbm has joined #ruby
<shellfu>
Back up and maybe try a simple shell script to get what you want going then convert it to a cap task. If you cannot make it work with a shell script then adding abstraction with cap isnt going to buy you anything but trouble
tvw has quit []
* shellfu
is not a developer but a unix engineer. I do not claim to know ruby like these smart mofos in here. I know enough to be dirty :)
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
qba73 has joined #ruby
<shellfu>
That is simply the path I personally would take
Hijiri has joined #ruby
dc has joined #ruby
shredding has quit [Quit: shredding]
dsfargeg has quit [Ping timeout: 272 seconds]
aryaching has joined #ruby
jgt has joined #ruby
shime has quit [Ping timeout: 265 seconds]
uptownhr has joined #ruby
decoponio has quit [Quit: Leaving...]
fryguy9 has joined #ruby
rylev has joined #ruby
momomomomo has quit [Quit: momomomomo]
zenith__ has quit [Remote host closed the connection]
paulfm has joined #ruby
davedev24_ has joined #ruby
jrvlima has joined #ruby
tier_ has joined #ruby
spyderma_ has joined #ruby
Axy has quit [Read error: Connection reset by peer]
spyderman4g63 has quit [Ping timeout: 264 seconds]
<deepu>
I want to add some string (rabbit@) to the result
himsin has quit [Quit: himsin]
scottgc has left #ruby [#ruby]
SOLDIERz has quit [Quit: Be back later ...]
tier has quit [Ping timeout: 244 seconds]
<tobiasvl>
change line 4 to rabbit_virhost << "rabbit@#{r['ipaddress']}"
<tobiasvl>
?
sanguisdex has joined #ruby
<tobiasvl>
at least I think that's what you want. google "ruby string interpolation"
<tobiasvl>
deepu ^
<deepu>
tobiasvl: let me try that
<shadoi>
or: << "rabbit@" + r['ipaddress']
Bira has joined #ruby
<tobiasvl>
yeah, or that
ramfjord has quit [Ping timeout: 264 seconds]
<deepu>
Thanks guys
<tobiasvl>
might be easier to understand seeing as you now try to concatenate strings with no operator
<deepu>
that worked
spyderma_ has quit [Ping timeout: 244 seconds]
<shadoi>
also: s/'/"/g
<shadoi>
;)
x1337807x has joined #ruby
charliesome has joined #ruby
<sanguisdex>
I have a what method do I use to see if the hash value from foo['bar'] is empty, foo['bar'.empty? it breaking. (a page of documentation is a great answer)
tier_ has quit [Remote host closed the connection]
kirun has quit [Ping timeout: 256 seconds]
<shadoi>
foo['bar'].nil?
rylev has quit []
workmad3 has joined #ruby
<shadoi>
or if you need to see if the key exists: foo.key?('bar')
<wallerdev>
had to support csvs for a product we released to many customers
ta_ has quit [Ping timeout: 252 seconds]
<wallerdev>
and had many complaints from various customers that their csvs werent imported "correctly"
<workmad3>
shevy: tbh, if you parse the line with CSV.parse, you should generate your output with CSV.generate... don't just .join(",") and hope it's 'good enough'
maletor has quit [Quit: Computer has gone to sleep.]
CpuID2 has quit [Quit: This computer has gone to sleep]
cjim has quit [Quit: (null)]
bronson has quit [Ping timeout: 252 seconds]
<workmad3>
wallerdev: I had 'fun' recently building out my own layer of processing on top of CSV.parse so that I could 'skip' invalid multi-line records once I'd determined they were bad, without aborting the entire file process
totimkopf has quit [Ping timeout: 246 seconds]
<wallerdev>
yeah i basically did something similar
<shevy>
hehe
<workmad3>
which is a reminder... I still need to hook the error display of that up to the page
zachrab has joined #ruby
<wallerdev>
using an existing csv parser and making modifications to support various situations that shouldn't happen haha
nobitanobi has joined #ruby
_djbkd has quit [Remote host closed the connection]
reinaldob has joined #ruby
reinaldob has quit [Remote host closed the connection]
<workmad3>
good fun
<workmad3>
I also had 'fun' around different encodings for that particular aspect of the project too
kristian-aalborg has joined #ruby
CpuID2 has joined #ruby
CpuID2 has joined #ruby
<kristian-aalborg>
hello
<kristian-aalborg>
using ruby on a shell server where I'm running out of space
vijay has joined #ruby
<workmad3>
which is when I discovered that the UTF-16 BOM isn't removed and is an invisible, 0-width character...
<wallerdev>
hahahaha same
<vijay>
Hi
pu22l3r has quit [Ping timeout: 252 seconds]
<wallerdev>
omg
<kristian-aalborg>
would it be hazardous to rm -rf .gem/ ?
russt_ has joined #ruby
<wallerdev>
so many people save files in the wrong encodings it's a mess
<kristian-aalborg>
... and then install what I need?
cjim has joined #ruby
<workmad3>
I spent a good half hour looking at the CSV header I was trying to match, and the string from the file and going "They both say Username... WTF!!!!"
<shadoi>
kristian-aalborg: you have apps running using those gems?
<shevy>
kristian-aalborg you get rid of your .gem directory
<workmad3>
before unpacking and noticing the extra bytes :)
<wallerdev>
just open the folder in finder and drag it to your trash if you're worried
<shevy>
kristian-aalborg so all the gems you had will be gone; though that is only when you had --user-install option right?
<workmad3>
or just 'mv .gem{,.old}
vijay has left #ruby ["Quit"]
<wallerdev>
youll never find it again if you move it somewhere
<workmad3>
wallerdev: hence why I move to .gem.old ;)
zachrab has quit [Ping timeout: 252 seconds]
cjim has quit [Client Quit]
waynerade has joined #ruby
<workmad3>
wallerdev: easier to find, especially for a quick test to see if things will break (and then I'd remove it if things were fine)
<wallerdev>
well if you drag it to your trash
<kristian-aalborg>
shadoi, no
<wallerdev>
then you can just right click restore
<wallerdev>
and if it works, you dont have to take the extra step to delete it
<wallerdev>
its already deleted
nobitanobi has quit [Remote host closed the connection]
<workmad3>
you still need to empty trash to clear up the disk space... so there's an extra step :P
<kristian-aalborg>
shadoi, I'm allowed to install (some?) gems on the server
<wallerdev>
yeah but you can do that once a week or month etc
<workmad3>
but still, we're taking the yak down to the skin here :)
<wallerdev>
:p
<wallerdev>
i guess rm -rf is the cleanest solution
<kristian-aalborg>
moving them won't solve anything as it's a space issue, workmad3
<wallerdev>
then just restore from backup if everything breaks
<wallerdev>
lol
nobitanobi has joined #ruby
<workmad3>
kristian-aalborg: as, so neither would moving to trash :)
aryaching has quit []
<kristian-aalborg>
I will only be using it for jekyll (and friends)
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wallerdev>
i hate short words
jenrzzz has quit [Ping timeout: 240 seconds]
<wallerdev>
so hard to search for in a codebase
nobitanobi has quit [Remote host closed the connection]
avahey has quit [Quit: Connection closed for inactivity]
momomomomo has quit [Quit: momomomomo]
alex88 has quit []
ta_ has quit [Ping timeout: 245 seconds]
pika_pika has quit [Ping timeout: 245 seconds]
fedalto has quit [Quit: leaving]
quimrstorres has joined #ruby
nobitanobi has quit [Remote host closed the connection]
dkphenom has joined #ruby
Moeh has joined #ruby
nobitanobi has joined #ruby
Hijiri has joined #ruby
checkit has quit [Ping timeout: 264 seconds]
<kristian-aalborg>
is there a way to install gems so you don't use as many threads?
aclearman037 has quit [Quit: I'm out!]
dkphenom has quit [Client Quit]
enterprisedc has quit [Quit: enterprisedc]
C1V0 has quit []
<shevy>
huh
olivier_bK has joined #ruby
mLF has quit [Ping timeout: 245 seconds]
<Moeh>
apeiros: I am working on the code that you sent me two days ago, as I am trying to make it support arrays within hashes. This is what I have: http://pastie.org/9887141 However the output does not really match the expected result. Would be great if you had time to take a look.
avahey has joined #ruby
fryguy9 has quit [Quit: Leaving.]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<kristian-aalborg>
yeah, that was a strange way of putting it
blackoperat has quit [Ping timeout: 264 seconds]
<kristian-aalborg>
I can't install because I use too many processes in BASH
<kristian-aalborg>
-bash: fork: retry: No child processes
<kristian-aalborg>
I installed bundler, but I get command not found
Aova has quit [Read error: Connection reset by peer]
CpuID2 has quit [Quit: This computer has gone to sleep]
Sid05 has quit [Ping timeout: 264 seconds]
ta_ has quit [Ping timeout: 252 seconds]
Troy^ has joined #ruby
rbennacer has quit [Ping timeout: 264 seconds]
ramfjord has quit [Ping timeout: 246 seconds]
mary5030 has joined #ruby
iwishiwerearobot has joined #ruby
uptownhr has quit [Quit: uptownhr]
towski__ has joined #ruby
WildBamboo-Josh has joined #ruby
<kristian-aalborg>
ah, so it's in ~/.gem/ruby/2.0.0/gems/bundler-1.7.12/bin
towski___ has joined #ruby
towski_ has quit [Ping timeout: 245 seconds]
spyderm__ has quit [Ping timeout: 264 seconds]
pkrzywicki has joined #ruby
Aova has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codecop has quit [Remote host closed the connection]
iwishiwerearobot has quit [Ping timeout: 244 seconds]
juanpablo_ has quit [Ping timeout: 246 seconds]
skj3gg has joined #ruby
towski__ has quit [Ping timeout: 264 seconds]
juanpablo_ has joined #ruby
hmsimha has quit [Ping timeout: 252 seconds]
agjacome has joined #ruby
ta_ has joined #ruby
lkba has quit [Read error: Connection reset by peer]
brb3 has quit [Quit: <.<]
lkba has joined #ruby
stunder has joined #ruby
<wallerdev>
ugh the UK is a mess
<wallerdev>
cm for heights, miles for distances
hmsimha has joined #ruby
skj3gg has quit [Client Quit]
<Moeh>
havenwood: I am trying to use your code from two days ago (https://gist.github.com/havenwood/22bbab49087df6dae8b2) however there is one issue in that the result contains all first level keys from the hash, not only the one where the key in sub hash. Do you know why?
bronson_ has quit [Remote host closed the connection]
<havenwood>
Moeh: I don't understand.
<havenwood>
Moeh: Show an example of the issue?
ta_ has quit [Ping timeout: 252 seconds]
neoxoen has quit [Ping timeout: 244 seconds]
dsfargeg has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
Troy^ has joined #ruby
elaptics is now known as elaptics`away
sent1nel has joined #ruby
<Moeh>
Yes, so if there is a hash like this: { "a" => 1, "b" => 2, "c" => 3, "d"=> { "e" => 4, "f" => { "g" => 5 } } } and I search for "g", the expected result is: ["d", "f"]. However I get as result ["a", "b", "c", "d", "f"]
<havenwood>
Moeh: [{:key=>"d"}, {:key=>"f"}]
<havenwood>
Moeh: As expected.
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sambao21 has quit [Quit: Computer has gone to sleep.]
<havenwood>
Moeh: Run it with the code in that Gist.
<noob878>
can someone tell me if i have vehicles = [{:type => "car", :color =>"red"}, {:type => "truck", :color => "blue"}], how to get type given color?
ta_ has joined #ruby
reinaldob has quit [Ping timeout: 255 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]