apeiros_ changed the topic of #ruby to: Ruby 2.2.0; 2.1.5; 2.0.0-p598; 1.9.3-p551: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
<wallerdev> not put arrays into one field
shime has quit [Remote host closed the connection]
<havenwood> Guest83706: For example to check if all Strings in the Array contain only one or more digits: array.all? { |string| string =~ /\d+/ }
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Guest83706> i am trying to use the validates function because it will create errors for each field that doesn't pass validation
<havenwood> Guest83706: Ahh, i missed that. Rails validation.
it0a has joined #ruby
<Guest83706> yea, sorry i should have specified
<havenwood> Guest83706: #RubyOnRails is the best place for Rails questions. They require nick registration. Check out: /msg NickServ help REGISTER
jack_rabbit has joined #ruby
nanothief has joined #ruby
<Guest83706> ok thanks, didn't know it was only a rails thing
Guest83706 has quit [Quit: Page closed]
<havenwood> Guest83706: ActiveRecord validations?
<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
oo_ has joined #ruby
dtscode has quit [Quit: ZNC - http://znc.in]
davedev24_ has joined #ruby
<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]
pdoherty has quit [Ping timeout: 245 seconds]
droidburgundy has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
riotjones has joined #ruby
Sawbones_ has joined #ruby
stunder has quit [Remote host closed the connection]
graydot has joined #ruby
jenrzzz has joined #ruby
tkuchiki_ has joined #ruby
tkuchiki has quit [Ping timeout: 250 seconds]
nanothief has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Sawbones_ has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 265 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
phutchins has joined #ruby
Channel6 has joined #ruby
gilest has quit [Quit: Leaving...]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
nii236|irssi has joined #ruby
Tuxero has quit [Quit: Tuxero]
qhartman has quit [Quit: Ex-Chat]
dc_ has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: zzz]
tyfighter has joined #ruby
ta_ has joined #ruby
Alayde has joined #ruby
Sawbones_ has joined #ruby
Kricir has quit [Remote host closed the connection]
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
psy_ has quit [Read error: Connection reset by peer]
Kricir has joined #ruby
sent1nel has joined #ruby
psy_ has joined #ruby
ta_ has quit [Ping timeout: 245 seconds]
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Takle_ has quit [Remote host closed the connection]
ghostpl has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 264 seconds]
x1337807x has joined #ruby
jerematic has joined #ruby
robustus has quit [Ping timeout: 264 seconds]
crdpink has joined #ruby
noname001__ has quit [Ping timeout: 264 seconds]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
digdeep has joined #ruby
robustus|Off has joined #ruby
digdeep has quit [Changing host]
digdeep has joined #ruby
robustus|Off is now known as robustus
crdpink2 has quit [Ping timeout: 245 seconds]
byprdct has joined #ruby
OrbitalK_ has joined #ruby
phoo1234567 has quit [Quit: Leaving]
triple_b has joined #ruby
sent1nel has quit [Remote host closed the connection]
Ellypse has joined #ruby
Alayde has left #ruby ["WeeChat 1.0"]
jerematic has quit [Ping timeout: 252 seconds]
Spami has quit [Quit: This computer has gone to sleep]
OrbitalKitten has quit [Ping timeout: 246 seconds]
mrsolo has joined #ruby
JBreit has joined #ruby
triple_b has quit [Client Quit]
mrsolo has quit [Remote host closed the connection]
marr has quit []
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
adriancb has joined #ruby
wallerdev has quit [Quit: wallerdev]
Aova has quit [Read error: Connection reset by peer]
metadave has joined #ruby
Troy^ has joined #ruby
malcolmva has quit [Ping timeout: 250 seconds]
x1337807x has joined #ruby
li0ninawhat has joined #ruby
wallerdev has joined #ruby
Aova has joined #ruby
lioninawhat has quit [Ping timeout: 245 seconds]
freerobby has joined #ruby
ghr has joined #ruby
bronson has quit [Remote host closed the connection]
Sawbones_ has quit [Remote host closed the connection]
scripore has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yfeldblum has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 256 seconds]
yfeldblum has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
danman has quit [Quit: danman]
malcolmva has joined #ruby
ta_ has joined #ruby
oleo is now known as Guest10153
oleo__ has joined #ruby
jhebden has joined #ruby
iamjarvo has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
Guest10153 has quit [Ping timeout: 264 seconds]
ta_ has quit [Ping timeout: 252 seconds]
jlast has joined #ruby
mleung has quit [Quit: mleung]
iamjarvo has quit [Ping timeout: 255 seconds]
WhereIsMySpoon_ has quit [Quit: No Ping reply in 180 seconds.]
byprdct has quit [Quit: Textual IRC Client: www.textualapp.com]
ereslibre has quit [Quit: No Ping reply in 180 seconds.]
ereslibre has joined #ruby
nateberkopec has quit [Quit: Leaving...]
WhereIsMySpoon_ has joined #ruby
jlast has quit [Ping timeout: 256 seconds]
zachrab has quit [Remote host closed the connection]
metadave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zachrab has joined #ruby
phutchins has quit [Ping timeout: 256 seconds]
mrmargolis has joined #ruby
ta_ has joined #ruby
adriancb has quit [Ping timeout: 252 seconds]
tyfighter has quit [Quit: tyfighter]
adriancb has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
DadoCe has quit [Remote host closed the connection]
eka_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zachrab has quit [Ping timeout: 244 seconds]
Hijiri has joined #ruby
pika_pika has quit [Ping timeout: 245 seconds]
DadoCe has joined #ruby
thumpba has quit [Remote host closed the connection]
juanpablo____ has joined #ruby
Hobogrammer has joined #ruby
ta_ has quit [Ping timeout: 252 seconds]
Rollabunna has quit [Quit: Leaving...]
charliesome has joined #ruby
nii236|irssi has quit [Ping timeout: 245 seconds]
thumpba has joined #ruby
digdeep has quit [Remote host closed the connection]
eka has joined #ruby
jottr_ has quit [Ping timeout: 240 seconds]
<bricker> why is Psych called that?
nii236|irssi has joined #ruby
juanpablo____ has quit [Ping timeout: 244 seconds]
d10n-work has quit [Quit: Connection closed for inactivity]
tyfighter has joined #ruby
<wallerdev> because it reads your mind about what you want
<wallerdev> or something dumb like that
<wallerdev> lol
regnartim has joined #ruby
thumpba has quit [Ping timeout: 264 seconds]
ta_ has joined #ruby
reinaldob has joined #ruby
<bricker> no way
<bricker> it must be some clever pun that I'm not understanding
deric_skibotn has quit [Ping timeout: 245 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ta_ has quit [Ping timeout: 252 seconds]
DadoCe has quit [Remote host closed the connection]
reinaldob has quit [Ping timeout: 245 seconds]
djbkd has quit [Remote host closed the connection]
DadoCe has joined #ruby
djbkd has joined #ruby
lampd1 has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
krz has joined #ruby
_ixti_ has quit [Ping timeout: 245 seconds]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<weaksauce> no. it's short for psychological in the sense that you are excited for it.
<weaksauce> some 80's slang
hamakn has joined #ruby
<bricker> weaksauce: I'm asking why the lib is called that
<weaksauce> gotcha
<bricker> the YAML parsing lib I mean
hamakn has quit [Read error: Connection reset by peer]
DadoCe has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
<havenwood> bricker: sych so psych
<bricker> havenwood: ah-hah
DadoCe has joined #ruby
hamakn has joined #ruby
<bricker> havenwood: so you know my next question right? :)
<weaksauce> that's sych --- sick
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
<weaksauce> different 80's slang
iamjarvo has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
<bricker> huh... why the lucky stiff wrote syck :O
Troy^ has joined #ruby
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jerematic has joined #ruby
<eam> syck was *the* yaml parser back in the day
<bricker> lol "Scripters' YAML Cobble-Yourself-a-Parser Kit"
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
Troy^ has quit [Read error: No route to host]
<havenwood> syck*
graydot has quit [Quit: graydot]
hamakn has quit [Read error: Connection reset by peer]
Aova has quit [Read error: Connection reset by peer]
Troy^ has joined #ruby
hamakn has joined #ruby
recurrence has quit [Quit: recurrence]
dspangenberg has joined #ruby
bricker has quit [Quit: leaving]
jerematic has quit [Ping timeout: 245 seconds]
tyfighter has quit [Quit: tyfighter]
amclain has joined #ruby
yfeldblu_ has joined #ruby
jack_rabbit has quit [Ping timeout: 244 seconds]
Aova has joined #ruby
dspangenberg has quit [Ping timeout: 245 seconds]
LouisRoR has joined #ruby
maletor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 245 seconds]
claptor has joined #ruby
1JTAAILXV has joined #ruby
vlad_sta- has quit [Ping timeout: 244 seconds]
1JTAAILXV is now known as avarice
ghr has joined #ruby
vlad_starkov has joined #ruby
bronson has joined #ruby
jlast has joined #ruby
Sawbones_ has joined #ruby
PaulCapestany has quit []
rbennacer has joined #ruby
jlast has quit [Read error: Connection reset by peer]
nanoyak has joined #ruby
jlast has joined #ruby
LouisRoR has quit [Ping timeout: 264 seconds]
dimaursu16 has quit [Ping timeout: 255 seconds]
ghr has quit [Ping timeout: 250 seconds]
havenwood has quit []
bronson has quit [Ping timeout: 246 seconds]
Sawbones_ has quit [Ping timeout: 250 seconds]
dimaursu16 has joined #ruby
oo_ has quit [Read error: Connection reset by peer]
jlast has quit [Ping timeout: 244 seconds]
oo_ has joined #ruby
sent1nel has joined #ruby
coreycondardo has joined #ruby
riotjones has joined #ruby
djbkd has quit [Quit: My people need me...]
kapil__ has joined #ruby
nobitanobi has quit [Remote host closed the connection]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jlast has joined #ruby
KramerC has quit [Ping timeout: 276 seconds]
KramerC has joined #ruby
riotjones has quit [Ping timeout: 252 seconds]
wallerdev has quit [Quit: wallerdev]
jlast_ has joined #ruby
jlast has quit [Read error: Connection reset by peer]
Megtastique has quit []
DadoCe has quit [Remote host closed the connection]
pdoherty has joined #ruby
nii236|irssi has quit [Quit: leaving]
icbm has quit [Quit: Leaving]
Kricir has joined #ruby
<totimkopf> shevy: yo
oo__ has joined #ruby
swgillespie has joined #ruby
jlast_ has quit [Ping timeout: 246 seconds]
oo_ has quit [Ping timeout: 245 seconds]
ta_ has joined #ruby
pdoherty has quit [Ping timeout: 245 seconds]
lemur has joined #ruby
uptownhr has joined #ruby
ZoanthusR has quit [Quit: Linkinus - http://linkinus.com]
Mon_Ouie has quit [Quit: WeeChat 1.1.1]
leafybasil has quit [Read error: Connection reset by peer]
tyfighter has joined #ruby
towski_ has quit [Remote host closed the connection]
nii236|irssi has joined #ruby
kl__ has joined #ruby
nii236|irssi has quit [Client Quit]
tjbiddle has quit [Quit: tjbiddle]
nii236|irssi has joined #ruby
ta_ has quit [Ping timeout: 252 seconds]
nii236|irssi is now known as nii236
leafybasil has joined #ruby
Sawbones_ has joined #ruby
kl has quit [Ping timeout: 240 seconds]
jottr_ has joined #ruby
juanpablo____ has joined #ruby
OrbitalK_ has quit [Quit: Textual IRC Client: www.textualapp.com]
nanoyak has quit [Quit: Computer has gone to sleep.]
ta_ has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
marcdel has joined #ruby
thumpba has joined #ruby
Takumo has quit [Ping timeout: 244 seconds]
juanpablo____ has quit [Ping timeout: 256 seconds]
jottr_ has quit [Ping timeout: 264 seconds]
Takumo has joined #ruby
uptownhr has quit [Quit: uptownhr]
li0ninawhat has quit [Read error: Connection reset by peer]
uptownhr has joined #ruby
thumpba has quit [Ping timeout: 264 seconds]
uptownhr has quit [Client Quit]
lioninawhat has joined #ruby
uptownhr has joined #ruby
wallerdev has joined #ruby
ta_ has quit [Ping timeout: 250 seconds]
uptownhr has quit [Client Quit]
uptownhr has joined #ruby
vdamewood has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
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]
lioninawhat has joined #ruby
tkuchiki has joined #ruby
riotjones has joined #ruby
knut has quit [Ping timeout: 245 seconds]
x1337807x has joined #ruby
ghr has joined #ruby
mgorbach has quit [Quit: ZNC - http://znc.in]
ghostpl has quit [Ping timeout: 245 seconds]
ta_ has joined #ruby
lioninawhat has quit [Ping timeout: 245 seconds]
riotjones has quit [Ping timeout: 240 seconds]
mgorbach has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
ta_ has quit [Ping timeout: 252 seconds]
peteyg has joined #ruby
nanoyak has joined #ruby
shum has quit [Quit: WeeChat 1.1.1]
Megtastique has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diegoviola has quit [Quit: WeeChat 1.1.1]
nobitanobi has joined #ruby
jlast has joined #ruby
nrsk has quit [Ping timeout: 252 seconds]
zwer_g has joined #ruby
nrsk has joined #ruby
jottr_ has joined #ruby
juanpablo____ has joined #ruby
pdoherty has joined #ruby
mikepack has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 245 seconds]
troubadour has quit [Quit: troubadour]
zwer has quit [Ping timeout: 250 seconds]
ta_ has joined #ruby
thumpba has joined #ruby
jottr_ has quit [Ping timeout: 255 seconds]
juanpablo____ has quit [Ping timeout: 245 seconds]
pdoherty has quit [Ping timeout: 245 seconds]
x1337807x has joined #ruby
oo__ has quit [Remote host closed the connection]
patrick99e99 has quit [Ping timeout: 252 seconds]
sent1nel has quit [Remote host closed the connection]
iamjarvo has joined #ruby
greenbagels has quit [Read error: Connection reset by peer]
thumpba has quit [Ping timeout: 264 seconds]
Channel6 has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
sent1nel has joined #ruby
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ta_ has quit [Ping timeout: 252 seconds]
tkuchiki_ has joined #ruby
tkuchiki has quit [Read error: Connection reset by peer]
sent1nel has quit [Remote host closed the connection]
DadoCe has joined #ruby
troubadour has joined #ruby
wallerdev has quit [Read error: Connection reset by peer]
Adran has joined #ruby
davedev24_ has quit [Ping timeout: 245 seconds]
fenzil has quit [Ping timeout: 256 seconds]
nii236|irssi has joined #ruby
wallerdev has joined #ruby
sevenseacat has quit [Remote host closed the connection]
penzur has quit [Read error: Connection reset by peer]
josephndenton has joined #ruby
DadoCe has quit [Ping timeout: 264 seconds]
penzur has joined #ruby
ta_ has joined #ruby
penzur has quit [Read error: Connection reset by peer]
St1gma has joined #ruby
astrobunny has joined #ruby
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
patrick99e99 has joined #ruby
tus has quit []
<ericwood> shit, I'm moving to NYC this month
<ericwood> it's official
<havenwood> ericwood: nice
ellisTAA has joined #ruby
<ellisTAA> i want to get the index of an array. can i do this with the value associated with the index?
josephndenton has quit [Ping timeout: 250 seconds]
<ericwood> >> [1,2,3].index(2)
<eval-in__> ericwood => 1 (https://eval.in/277444)
<ericwood> boom!
tjbiddle has joined #ruby
<ellisTAA> ah i see
<ericwood> I recommend reading the array docs at some point, some good stuff in there
<ellisTAA> >>[‘a’,’b’,’c’].index(‘b’)
<ellisTAA> how come that didn’t work?
ebbflowgo has joined #ruby
<ericwood> put a space after the >>
davedev24_ has joined #ruby
<ericwood> also those aren't real quotes
<ericwood> you're using OS X and it's doing the "smart quotes" thing
<ellisTAA> >> [“a”, “b”, “c”].index(“b”)
<ericwood> >> ['a', 'b', 'c'].index('b')
<eval-in__> ericwood => 1 (https://eval.in/277450)
<ellisTAA> wtf ok cool
<ellisTAA> i’m trying to build an encrypter, ill show u when i’m done
justinweiss has quit [Quit: leaving]
mrmargolis has quit [Remote host closed the connection]
mrmargolis has joined #ruby
ta_ has quit [Ping timeout: 245 seconds]
maletor has joined #ruby
wallerdev has quit [Ping timeout: 250 seconds]
Monti has joined #ruby
wallerdev has joined #ruby
krz has quit [Ping timeout: 265 seconds]
mrmargolis has quit [Ping timeout: 264 seconds]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chihhsin_ has quit [Remote host closed the connection]
Deele has joined #ruby
wallerdev has quit [Ping timeout: 252 seconds]
fenzil has joined #ruby
ramfjord has joined #ruby
wallerdev has joined #ruby
Aova has quit [Read error: Connection reset by peer]
longfeet has joined #ruby
justinweiss has joined #ruby
Monti has quit [Quit: Leaving]
adriancb has quit [Remote host closed the connection]
penzur has joined #ruby
bier_ has quit [Ping timeout: 245 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
Aova has joined #ruby
ponga has quit [Remote host closed the connection]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bluOxigen has joined #ruby
mikepack has joined #ruby
mikepack has quit [Remote host closed the connection]
nii236|irssi has quit [Quit: leaving]
longfeet has quit [Ping timeout: 250 seconds]
bier has joined #ruby
bronson has joined #ruby
ghr has joined #ruby
Xiti has quit [Quit: Xiti]
bronson has quit [Ping timeout: 250 seconds]
ghr has quit [Ping timeout: 252 seconds]
hfor has quit [Ping timeout: 250 seconds]
JBreit has joined #ruby
ta_ has joined #ruby
JBreit has left #ruby [#ruby]
kyb3r_ has joined #ruby
Channel6 has quit [Quit: Leaving]
<ericwood> lol ok
jlast has joined #ruby
ponga has joined #ruby
Megtastique has quit []
oo_ has joined #ruby
Cadillactica has joined #ruby
knut has joined #ruby
arup_r has joined #ruby
postmodern has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
nanoyak has joined #ruby
jlast has quit [Ping timeout: 250 seconds]
elaptics`away is now known as elaptics
kyb3r_ has joined #ruby
<Cadillactica> anyone have a great Ruby interview question/answer resource?
<Cadillactica> + Rails
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thumpba has joined #ruby
jusmyth has joined #ruby
hfor has joined #ruby
<ellisTAA> if anyone is bored i just made my first encrypter / decrypter and would appreciate any feedback https://gist.github.com/ellisTAA/c30e10d0f867fe24bae9
Sawbones_ has joined #ruby
nobitanobi has quit [Remote host closed the connection]
djbkd has joined #ruby
<ericwood> it's really secure
oo_ has quit [Remote host closed the connection]
<Cadillactica> ellisTAA First impression: make sure your indentation is correct
<ellisTAA> cadillactica: ty, will do
thumpba has quit [Ping timeout: 240 seconds]
<ericwood> ellisTAA: when you're doing something like "end.foo" many say it's better to use curly braces
<Cadillactica> ellisTAA: np - once you’re in the habit of doing it, you’ll see it makes your code way easier to read
<Senjai> ellisTAA: Opinions on the code? or the implimentation?
yfeldblum has quit [Remote host closed the connection]
MaciejCzyzewski has joined #ruby
jerematic has joined #ruby
<ellisTAA> ericwood: which line are you referring to?
<ericwood> ellisTAA: the calls to .map!
Sawbones_ has quit [Ping timeout: 264 seconds]
<ellisTAA> ericwood: for single lines?
<ellisTAA> senaji: ty
oo_ has joined #ruby
MaciejCzyzewski has quit [Client Quit]
marcdel has quit []
<ericwood> here's how I would have formatted it
uptownhr has joined #ruby
dspangenberg has joined #ruby
<ellisTAA> ericwood: thanks, i gotta work on my formatting
riotjones has joined #ruby
<ericwood> ellisTAA: as far as indentation goes, a good text editor will take care of that for you
jerematic has quit [Ping timeout: 246 seconds]
<ericwood> what are you currently using?
<ellisTAA> i use atom ….
<ericwood> hmmm okay atom should be handling all of that for you
<Xnfu> vim all day
<ericwood> Xnfu: *fistbump*
<Xnfu> *bump*
<ericwood> ellisTAA: there's some good ruby style guides out there: https://github.com/bbatsov/ruby-style-guide
<ellisTAA> when i run encrypt("hey what the heck is going on why doesnt my code work") i get ouput “zzzzzzzzzzzz” … ?
<ellisTAA> ericwood: thanks
<ericwood> also this one: https://github.com/airbnb/ruby
<Xnfu> You have some code ellisTAA?
tkuchiki has joined #ruby
ajaiswal has joined #ruby
<Xnfu> post some of it on pastebin
nobitanobi has joined #ruby
tkuchiki_ has quit [Ping timeout: 252 seconds]
<ellisTAA> encrypt and decrypt if i have short messages but not if i have long ones
jgt has joined #ruby
troubadour has quit [Quit: troubadour]
<Xnfu> No need to use the exclamation mark on your map
<ericwood> Xnfu: I reformatted his code here: https://gist.github.com/eric-wood/4733901a49f3f7b2c611
dspangenberg has quit [Ping timeout: 252 seconds]
<Xnfu> What is he trying to do?
<Xnfu> End goal?
<Xnfu> take the ascii value of a character and add a key value to it?
riotjones has quit [Ping timeout: 250 seconds]
<ericwood> it's a caesar cipher
<Xnfu> Like a basic ceasar cipher?
<Xnfu> haha
<Xnfu> You are doing it the hard way
<ellisTAA> xnfu: it actually only works if i use map! for some reason
marcdel has joined #ruby
<Xnfu> No need for all that
<ericwood> is it one-liner time?
petertretyakov_ has joined #ruby
<Xnfu> I did a oneliner to complete a HTS challenge that used a rotating ceasar cipher
Cache_Money has quit [Quit: Cache_Money]
<Xnfu> See if I can draft up an easy one
lolmaus has quit [Quit: Konversation terminated!]
it0a has quit [Quit: WeeChat 1.1.1]
The_Phoenix has joined #ruby
uptownhr has quit [Quit: uptownhr]
Sawbones_ has joined #ruby
krz has joined #ruby
marcdel has quit [Ping timeout: 255 seconds]
josephndenton has joined #ruby
<ellisTAA> i think i’d have to use modular arithmetic in order for my program to work ..
DrShoggoth has quit [Ping timeout: 264 seconds]
marcdel has joined #ruby
steveElsewhere has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
josephndenton has quit [Ping timeout: 256 seconds]
krz has quit [Ping timeout: 244 seconds]
astrobunny has quit [Remote host closed the connection]
Morkel has joined #ruby
<Xnfu> Something like that
<Xnfu> message.split('').map{ |c| c = (c.ord + key).chr }.join
<Xnfu> I used a standard key there
Cadillactica has quit [Quit: Cadillactica]
<Xnfu> But you could easily fix that to work with a normal ceasar
tobago has joined #ruby
astrobunny has joined #ruby
jobewan has quit [Ping timeout: 240 seconds]
petertretyakov_ has quit [Quit: Lingo: www.lingoirc.com]
mLF has joined #ruby
Aova has quit [Read error: Connection reset by peer]
elaptics is now known as elaptics`away
nanoyak has quit [Quit: Computer has gone to sleep.]
<Xnfu> Nevermind, that was a basic caesar cipher I just did :D
adriancb has joined #ruby
lxsameer has joined #ruby
Sawbones_ has quit []
Xeago has joined #ruby
<ellisTAA> what is .ord?
Aova has joined #ruby
spider-mario has quit [Remote host closed the connection]
<Xnfu> .ord gets the ascii value of said character
<Xnfu> based on the ASCII chart
adriancb has quit [Ping timeout: 245 seconds]
nanoyak has joined #ruby
rbennacer has joined #ruby
jgt has quit [Ping timeout: 244 seconds]
oleo__ has quit [Quit: Verlassend]
Xeago_ has joined #ruby
cndiv has joined #ruby
cndiv has left #ruby [#ruby]
<Xnfu> It gets the decimal value, so for instance, 'a'.ord would be 97
<Xnfu> If you did something like (97+1).chr you should be 'b'
<Xnfu> s/be/get/
chrishough has joined #ruby
tkuchiki has quit [Ping timeout: 250 seconds]
tkuchiki has joined #ruby
bronson has joined #ruby
rbennacer has quit [Ping timeout: 245 seconds]
ghr has joined #ruby
Xeago has quit [Ping timeout: 265 seconds]
mleung_ has joined #ruby
jottr_ has joined #ruby
juanpablo____ has joined #ruby
ghr has quit [Ping timeout: 252 seconds]
bronson has quit [Ping timeout: 252 seconds]
wottam has joined #ruby
jottr_ has quit [Ping timeout: 245 seconds]
juanpablo____ has quit [Ping timeout: 250 seconds]
tyfighter has joined #ruby
ellisTAA has quit [Quit: ellisTAA]
SixiS has joined #ruby
ellisTAA has joined #ruby
steveElsewhere has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jlast has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ruby
uptownhr has joined #ruby
aganov has joined #ruby
apeiros_ has quit [Read error: Connection reset by peer]
hvxgr has quit [Ping timeout: 264 seconds]
pdoherty has joined #ruby
apeiros__ has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
DrShoggoth has joined #ruby
wottam_ has joined #ruby
wottam has quit [Ping timeout: 265 seconds]
tagrudev has joined #ruby
pdoherty has quit [Ping timeout: 264 seconds]
amclain has quit [Quit: Leaving]
grios has quit [Quit: Textual IRC Client: www.textualapp.com]
nanoyak has quit [Quit: Computer has gone to sleep.]
jgt has joined #ruby
last_staff has joined #ruby
ellisTAA has quit [Quit: ellisTAA]
maletor has joined #ruby
ellisTAA has joined #ruby
dspangenberg has joined #ruby
psy_ has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 255 seconds]
apeiros__ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
charliesome has quit [Quit: zzz]
wallerdev has quit [Quit: wallerdev]
dsfargeg has joined #ruby
nobitanobi has quit [Remote host closed the connection]
dspangenberg has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
thumpba has joined #ruby
mloveless has quit []
ellisTAA has quit [Quit: ellisTAA]
apeiros_ has quit [Ping timeout: 265 seconds]
Xeago_ has quit [Ping timeout: 250 seconds]
C1V0 has joined #ruby
mleung_ has quit [Ping timeout: 250 seconds]
shredding has joined #ruby
thumpba has quit [Ping timeout: 244 seconds]
Fire-Dragon-DoL has quit [Quit: Leaving.]
claptor has quit [Read error: Connection reset by peer]
dsfargeg has quit [Ping timeout: 272 seconds]
claptor has joined #ruby
mleung has joined #ruby
konsolebox has joined #ruby
avahey has quit [Quit: Connection closed for inactivity]
mleung_ has joined #ruby
aaas has quit [Ping timeout: 244 seconds]
codecop has joined #ruby
avarice has quit [Quit: this channel is bakas]
shredding has quit [Quit: shredding]
fenzil has quit [Quit: Leaving]
noop has joined #ruby
mleung has quit [Ping timeout: 245 seconds]
mleung_ is now known as mleung
hvxgr has joined #ruby
wallerdev has joined #ruby
claptor has quit [Read error: Connection reset by peer]
niko has quit [Ping timeout: 600 seconds]
claptor has joined #ruby
Aova has quit [Read error: Connection reset by peer]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dsfargeg has joined #ruby
Elico has joined #ruby
decoponio has joined #ruby
riotjones has joined #ruby
arup_r has quit [Remote host closed the connection]
artmann has joined #ruby
x1337807x has joined #ruby
yfeldblum has joined #ruby
Aova has joined #ruby
ponga has quit [Quit: Leaving...]
tesuji has joined #ruby
dsfargeg has quit [Ping timeout: 272 seconds]
tjbiddle has quit [Quit: tjbiddle]
yfeldblum has quit [Ping timeout: 245 seconds]
arup_r has joined #ruby
kalusn has joined #ruby
MasterPiece has joined #ruby
Macaveli has joined #ruby
hmsimha has joined #ruby
SixiS has quit [Quit: SixiS]
Macaveli has quit [Client Quit]
Alina-malina has quit [Read error: Connection reset by peer]
Alina-malina has joined #ruby
ghr has joined #ruby
kamilc__ has joined #ruby
amil has joined #ruby
tyfighter has quit [Quit: tyfighter]
sigurding has joined #ruby
ghr has quit [Ping timeout: 256 seconds]
kamilc__ has quit [Ping timeout: 246 seconds]
debajit has joined #ruby
Lucky___ has quit [Quit: Textual IRC Client: www.textualapp.com]
kith_ is now known as kith
mleung has quit [Quit: mleung]
razieliyo has joined #ruby
kwd has joined #ruby
lolmaus has joined #ruby
swgillespie has joined #ruby
jenrzzz has joined #ruby
jlast has joined #ruby
marcdel has quit []
jerematic has joined #ruby
Lucky___ has joined #ruby
shellox_ has joined #ruby
anarang has joined #ruby
<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('%')
jenrzzz has quit [Ping timeout: 264 seconds]
<arup_r> >> "a".ord
<eval-in__> arup_r => 97 (https://eval.in/277590)
AFKGeek has joined #ruby
mos__ has joined #ruby
elaptics`away is now known as elaptics
<s_Ed> Xnfu: thank you :) Let me try it (im' new in ruby :p)
lkba has quit [Ping timeout: 256 seconds]
mos_ has quit [Remote host closed the connection]
mos__ has quit [Remote host closed the connection]
nerium has joined #ruby
mos_ has joined #ruby
ta_ has quit [Ping timeout: 255 seconds]
mos_ has quit [Client Quit]
Lucky___ has quit [Ping timeout: 246 seconds]
_mynameis has joined #ruby
mos_ has joined #ruby
quimrstorres has joined #ruby
<arup_r> >> "%x|%x" % ['a','b'].map(&:ord)
<eval-in__> arup_r => "61|62" (https://eval.in/277594)
fantazo has quit [Ping timeout: 250 seconds]
roshanavand has joined #ruby
mos_ has quit [Client Quit]
<Xnfu> Why is there a bot in here
roshanavand has quit [Client Quit]
mos_ has joined #ruby
quimrstorres has quit [Remote host closed the connection]
<hanmac1> Xnfu: because why not? ;P
jenrzzz has joined #ruby
<Xnfu> Because they aren't supposed to be in this channel
<arup_r> >> "%%x%%x" % ['a','b'].map(&:ord)
<eval-in__> arup_r => "%x%x" (https://eval.in/277595)
fantazo has joined #ruby
<arup_r> nothing happened :-(
<hanmac1> *gasp* Xnfu dont dare to remove the bot!
* arup_r don't know how to get the output as %61%62%63
<tobiasvl> bots aren't supposed to be in this channel???
mos_ has quit [Remote host closed the connection]
<hanmac1> arup_r: %% does go to % you need another one
<hanmac1> >> "%%%x%%%x" % ['a','b'].map(&:ord)
<eval-in__> hanmac1 => "%61%62" (https://eval.in/277596)
<gregf__> >>"%%%s%%%s%%%s" % "abc".scan(/./).map(&:ord)
<eval-in__> gregf__ => "%97%98%99" (https://eval.in/277597)
<Xnfu> >> fuck this bot
<eval-in__> Xnfu => undefined local variable or method `bot' for main:Object (NameError) ... (https://eval.in/277598)
<Xnfu> damn
josephndenton has joined #ruby
marr has joined #ruby
<certainty> i don't get it
<arup_r> ohh... gregf__: Thanks
roshanavand has joined #ruby
<arup_r> hanmac1: Thanks
<gregf__> arup_r: er, well, hanmac1 i guess ;)
<Xnfu> >> 'a'.each_byte.map { |b| b.to_s(16) }.join
<eval-in__> Xnfu => "61" (https://eval.in/277607)
roshanavand has quit [Client Quit]
<certainty> shevy: more time today?
<hanmac1> s_Ed & arup_r: or for dynamic length:
<hanmac1> >> "ab".each_codepoint.map(&"%%%x".method(:%)).join
<eval-in__> hanmac1 => "%61%62" (https://eval.in/277610)
<Xnfu> >> 'ab'.each_byte.map { |b| b.to_s(16) }.join('%')
<eval-in__> Xnfu => "61%62" (https://eval.in/277611)
<s_Ed> thank you :)
roshanavand has joined #ruby
<Xnfu> Yep'
<shevy> certainty dunno
<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...?
spacemud has quit [Ping timeout: 255 seconds]
<tobiasvl> shevy: so lucky, here it's –4° C
mkaesz has joined #ruby
<certainty> i can beat that with -5
iwishiwerearobot has joined #ruby
spacemud has joined #ruby
plashchynski has joined #ruby
rdark has joined #ruby
Caius has quit [Ping timeout: 276 seconds]
enterprisedc has quit [Ping timeout: 255 seconds]
loveablelobster has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
Pharaoh2 has joined #ruby
roshanavand has quit [Quit: Leaving]
roshanavand has joined #ruby
<withnale_> Noone...?
<tobiasvl> withnale_: show us some code maybe?
<tobiasvl> what's the attribute style classes?
adriancb has joined #ruby
<tobiasvl> attr_accessor ?
reinaldob has joined #ruby
<withnale_> It's actually for sensu plugins. An exampel is here... https://github.com/sensu/sensu-community-plugins/blob/master/plugins/graphite/check-data.rb
colli5ion has joined #ruby
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]
roshanavand has joined #ruby
ta_ has joined #ruby
dspangenberg has quit [Ping timeout: 264 seconds]
<ferr> I need to refactor this, any suggestions are welcome https://gist.github.com/Fercell/a6e039d1e4babcefbada
<ddv> my code is great today
<ddv> i'm a genius
<ferr> Make my code great today, genius
bronson has joined #ruby
<ferr> I look at my code and I am about to puke
bigkevmcd has joined #ruby
rocknrollmarc has quit [Ping timeout: 265 seconds]
juanpablo____ has joined #ruby
lrocknrolmarc has quit [Ping timeout: 265 seconds]
hamakn has quit [Remote host closed the connection]
plashchynski has quit [Quit: plashchynski]
roshanavand1 has joined #ruby
roshanavand has quit [Ping timeout: 265 seconds]
bronson has quit [Ping timeout: 252 seconds]
ta_ has quit [Ping timeout: 252 seconds]
juanpablo____ has quit [Ping timeout: 265 seconds]
jgt has joined #ruby
rodfersou has joined #ruby
Aova has quit [Read error: Connection reset by peer]
<waxjar> izzol: probably due to shell escaping
<waxjar> try replacing 'are' with "are"
ferr has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
duncannz has quit [Remote host closed the connection]
shevy has quit [Remote host closed the connection]
Guest13173 has quit [Quit: WeeChat 1.0.1]
Aova has joined #ruby
<izzol> waxjar: just fixed it :)
postmodern has quit [Quit: Leaving]
ChoiKyuSang has joined #ruby
workmad3 has joined #ruby
withnale_ has quit [Ping timeout: 264 seconds]
withnale_ has joined #ruby
pico-pete has quit []
leafybasil has quit [Remote host closed the connection]
<izzol> hmm still somethings wrong :(
<izzol> $ cat nagios.log | ruby -p -e "gsub(/\d+/, Time.at($1))"
<izzol> -e:1:in `at': wrong number of arguments (0 for 1..2) (ArgumentError)
main has joined #ruby
aganov has quit [Quit: Leaving]
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
n008f4g_ has joined #ruby
lessless has joined #ruby
aganov has joined #ruby
ta_ has joined #ruby
hamakn has joined #ruby
Soda has joined #ruby
<Xnfu> izzol: Why not pass the file differently
Number2 has joined #ruby
<Xnfu> ruby -e 'stuff here' < file-here
<Xnfu> -pe *
shevy has joined #ruby
<waxjar> $1 might be nil?
thumpba has joined #ruby
<Xnfu> Most likely
konsolebox has quit [Ping timeout: 250 seconds]
<waxjar> you could use the block form (dunno if Kernel#gsub supports it)
<Xnfu> izzol: Use this as an outline, it should be easy to modify it to work with what you want
<Xnfu> ruby -ne 'BEGIN{$/="\n"}; puts $_' < edit.txt
MasterPiece has quit [Ping timeout: 245 seconds]
<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> we should submit the users
nuck has quit [Quit: Textual IRC Client: www.textualapp.com]
<gregf__> cat test1.txt; 1423047775; ruby -pe 'require "date";chomp(epoch = $_);print Time.at(epoch.to_i).to_datetime.to_s;' test1.txt <== izzol
<shevy> in a neck-crank lock
<workmad3> user_data or user_values then, maybe? :)
<shevy> user_users
<no_gravity> i tend to tsv_attributes now
<workmad3> or, more pertinent... what groups these values together?
<certainty> or more patient
<workmad3> yeah, because that's lovely and descriptive... may as well call it 'x' and save yourself typing :P
<certainty> :D
<workmad3> </sarcasm>
havenwood has quit [Remote host closed the connection]
shime has quit [Ping timeout: 240 seconds]
<shevy> </good_point>
shevy has quit [Remote host closed the connection]
shevy has joined #ruby
jhebden has joined #ruby
<certainty> </no_time>
<certainty> also no opening tags
<shevy> certainty today is going to suck, I think I have to reinstall here and abandon slackware :(
<Xnfu> I think you should use a hash anyways
<workmad3> certainty: I'm a rebel... I go for implicit opening tags and explicit closing!
<Xnfu> and seperate the fields to be more descriptive
<certainty> workmad3: </rebel></yell>
alex88 has quit []
<workmad3> certainty: damn you... now I've got to add that to my playlist :(
anders- has joined #ruby
<certainty> hah!
anders- has left #ruby [#ruby]
<certainty> in the midnight hour ~sing
<certainty> shevy: why reinstall?
<certainty> no more slackware? :(
Aova has quit [Read error: Connection reset by peer]
<shevy> certainty I am getting all sorts of strange errors
<shevy> configure[5652]: segfault at 373e2567 ip b7654af8 sp bf824a50 error 4 in libc-2.15.so[b75da000+17e000]
<certainty> not good
<shevy> and several programs, mostly gtk-based, display weird fancy black pixel-dots here and there, so I can not even read what is displayed
nfk has joined #ruby
<shevy> curiously enough kde konsole works without any glitch
arup_r has quit [Ping timeout: 245 seconds]
<certainty> what are you going to use now?
<shevy> dunno yet
<workmad3> windows 10
* workmad3 runs away
<certainty> :D
<shevy> something that is always super up to date and never breaks
jerematic has joined #ruby
<certainty> shevy: there is no such thing
<certainty> that's a contradiction
<shevy> sh[19382]: segfault at 373e2567 ip b75b7af8 sp bfcd29a0 error 4 in libc-2.15.so[b753d000+17e000]
arup_r has joined #ruby
<Xnfu> no_gravity: maybe something like this: http://repl.it/9qk
<shevy> this scares me
stef204 has joined #ruby
<certainty> yeah
<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__> apeiros_ => [#<Encoding:UTF-8>, true] (https://eval.in/277771)
<apeiros_> ruby says yes, it is valid utf-8.
ta_ has joined #ruby
Pharaoh2 has joined #ruby
<ddv> doesn't ruby sort of guess? I don't believe it is possible to know the encoding of some data
chihhsin has quit [Quit: leaving]
<shevy> certainty well I'd have to change to another editor as well
dblessing has joined #ruby
chihhsin has joined #ruby
<Xnfu> >>
<eval-in__> Xnfu => nil (https://eval.in/277773)
<Xnfu> >> ord.ord.ord
<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 ?
<arup_r> shevy: I got panicked by seeing the topic name : https://www.youtube.com/watch?v=5pOxlazS3zs
<Bish> trial and error
<arup_r> Get a book or just browsing the documentation..
juanpablo____ has joined #ruby
<arup_r> Bish: ^
dspangenberg has joined #ruby
<shevy> arup_r well there are alway trade-offs. on linux at least I can do a lot of stuff without something stopping me
livathin_ has quit []
amystephen has joined #ruby
<arup_r> humm..
<arup_r> Others please share ....
<shevy> I am never fast
paulfm has joined #ruby
jusmyth has joined #ruby
william3 has joined #ruby
iamjarvo has joined #ruby
enebo has joined #ruby
paulfm_ has joined #ruby
coco_ has quit [Ping timeout: 244 seconds]
dspangenberg has quit [Ping timeout: 265 seconds]
livathinos has joined #ruby
Xeago has quit [Remote host closed the connection]
coco_ has joined #ruby
Aova has quit [Read error: Connection reset by peer]
jlast has joined #ruby
paulfm has quit [Ping timeout: 245 seconds]
dimaursu16 has quit [Ping timeout: 250 seconds]
dimaursu16 has joined #ruby
rocknrollmarc has joined #ruby
jespada has joined #ruby
thumpba has joined #ruby
<certainty> shevy: so why do you switch editors?
<shevy> arup_r I think you need to always go and write code, in order to learn a programming language
<shevy> certainty I don't! I am staying with my old one for just a bit long!
<shevy> *longer
<certainty> ah ok, makes sense
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zenith_ has joined #ruby
<shevy> but I am not really using much of it; I think I use like ... 20% of its features
paradoja has joined #ruby
<certainty> same here
paradoja has left #ruby [#ruby]
<shevy> certainty hmm let me make a list what an editor would need for me
ajaiswal has quit [Quit: Leaving]
shime has quit [Read error: Connection reset by peer]
arup_r has quit []
blackoperat has joined #ruby
Aova has joined #ruby
cphrmky has joined #ruby
shime has joined #ruby
zenith_ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
thumpba has quit [Ping timeout: 255 seconds]
nateberkopec has joined #ruby
frobs has joined #ruby
Channel6 has joined #ruby
LudicrousMango has joined #ruby
zenith_ has joined #ruby
jerius has joined #ruby
<certainty> shevy: i tried that. i did not nearly cover everything. there are so many things i use that i don't even realize really
<shevy> yeah
<shevy> I'd wish one could cherry pick features from different apps together
ta_ has quit [Ping timeout: 245 seconds]
rbennacer has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<certainty> well with emacs and evil mode you can have emacs and vim :p
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<certainty> i don't know if it's any good though
pandaant has joined #ruby
eka has joined #ruby
coco_ has quit [Ping timeout: 252 seconds]
quimrstorres has joined #ruby
sankaber has quit [Read error: Connection reset by peer]
<shevy> lol
sankaber has joined #ruby
coco_ has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
rbennacer has joined #ruby
aclearman037 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<wasamasa> it's pretty good
livathinos has quit [Remote host closed the connection]
lessless has joined #ruby
lioninawhat has joined #ruby
phutchins has joined #ruby
livathinos has joined #ruby
fryguy9 has joined #ruby
adriancb has joined #ruby
devdazed has joined #ruby
Timgauthier has quit [Read error: Connection reset by peer]
paulfm_ has quit [Quit: Zzzzz...]
nhhagen has quit []
Timgauthier has joined #ruby
zarubin has quit [Quit: Leaving.]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Takle has quit [Remote host closed the connection]
blenny has joined #ruby
blenny has quit [Max SendQ exceeded]
josephndenton has joined #ruby
Timgauthier has quit [Client Quit]
pdoherty has joined #ruby
blenny has joined #ruby
werelivinginthef has joined #ruby
aclearman037 has joined #ruby
Timgauthier has joined #ruby
fryguy9 has quit [Quit: Leaving.]
allcentury has quit [Ping timeout: 255 seconds]
rbennacer has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 245 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rkgudboy has quit [Ping timeout: 245 seconds]
sandelius has joined #ruby
mrmargolis has joined #ruby
withnale_2 has joined #ruby
withnale_2 has left #ruby [#ruby]
withnale_2 has joined #ruby
lessless has quit [Quit: Textual IRC Client: www.textualapp.com]
bronson has joined #ruby
Sid05 has joined #ruby
fryguy9 has joined #ruby
agjacome has quit [Quit: leaving]
penzur has quit []
tunaCanBruh has joined #ruby
Channel6 has quit [Quit: Leaving]
antgel has joined #ruby
Takle has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
Harlin has joined #ruby
Stoge88 has joined #ruby
DEA7TH has joined #ruby
Stoge88 has quit [Client Quit]
<antgel> hi all. is #rails unavailable? i can't seem to connect
<waxjar> #rubyonrails is the rails channel :)
<gizmore> antgel: you need to register your nickname for the #RubyOnRails channel
ChoiKyuSang has joined #ruby
skj3gg has joined #ruby
ghostpl has quit [Remote host closed the connection]
lmickh has joined #ruby
ghostpl has joined #ruby
ghostpl has quit [Remote host closed the connection]
Pharaoh2_ has joined #ruby
<workmad3> #rails trys to boot you over to #rubyonrails (freenode finally sorted that out a little while ago)
jottr_ has quit [Ping timeout: 252 seconds]
<workmad3> if your nick isn't registered though, you'll hit that problem :)
mitchellhenke has joined #ruby
ta_ has joined #ruby
<shevy> so snobbish to require registration to chat!
paulfm has joined #ruby
Xeago has joined #ruby
<workmad3> shevy: too many trolls :(
withnale_2 has quit [Quit: withnale_2]
Pharaoh2 has quit [Ping timeout: 256 seconds]
sanguisdex has left #ruby [#ruby]
antgel has quit [Ping timeout: 265 seconds]
jimms has joined #ruby
tier has quit [Remote host closed the connection]
f_canela has quit [Ping timeout: 246 seconds]
aryaching has joined #ruby
avahey has joined #ruby
amil has quit [Quit: Leaving...]
tier has joined #ruby
Kricir has joined #ruby
antgel has joined #ruby
lioninawhat has quit [Remote host closed the connection]
penzur has joined #ruby
tier has quit [Read error: Connection reset by peer]
tier_ has joined #ruby
freerobby has joined #ruby
ta_ has quit [Ping timeout: 265 seconds]
allcentury has joined #ruby
nerium has quit [Quit: nerium]
davidhq has joined #ruby
penzur has quit []
Xeago_ has joined #ruby
aryaching has quit [Client Quit]
hmark has joined #ruby
frobs has quit [Quit: Konversation terminated!]
antgel has quit [Ping timeout: 245 seconds]
Sid05 has quit [Remote host closed the connection]
antgel has joined #ruby
Xeago has quit [Ping timeout: 245 seconds]
metadave has quit [Quit: Textual IRC Client: www.textualapp.com]
hmark has left #ruby [#ruby]
josephnd1nton has joined #ruby
danjordan has quit [Quit: danjordan]
Squarepy has quit [Quit: Leaving]
metadave has joined #ruby
ta_ has joined #ruby
JBreit has left #ruby ["Leaving"]
banister has joined #ruby
nerium has joined #ruby
antgel has quit [Ping timeout: 264 seconds]
josephnd1nton has quit [Ping timeout: 265 seconds]
banister has quit [Client Quit]
Matadoer has quit [Ping timeout: 264 seconds]
antgel has joined #ruby
oo_ has joined #ruby
Aova has quit [Read error: Connection reset by peer]
ta_ has quit [Ping timeout: 252 seconds]
jottr_ has joined #ruby
Matadoer has joined #ruby
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
ta_ has joined #ruby
rbennacer has joined #ruby
thumpba has joined #ruby
danjordan has joined #ruby
oleo has joined #ruby
n008f4g_ has joined #ruby
<Xnfu> >> ([1] * 6000).join
<eval-in__> Xnfu => "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 ... (https://eval.in/277831)
<Xnfu> good
kapil__ has quit [Quit: Connection closed for inactivity]
Xiti has joined #ruby
<shevy> lol
danzilio_ has joined #ruby
danzilio_ has quit [Max SendQ exceeded]
jottr_ has quit [Ping timeout: 245 seconds]
Aova has joined #ruby
danzilio_ has joined #ruby
danzilio_ has quit [Max SendQ exceeded]
metadave has left #ruby ["Textual IRC Client: www.textualapp.com"]
ta_ has quit [Ping timeout: 264 seconds]
thumpba has quit [Ping timeout: 255 seconds]
danzilio has joined #ruby
danzilio has quit [Max SendQ exceeded]
danzilio has joined #ruby
danzilio has quit [Max SendQ exceeded]
danzilio has joined #ruby
danzilio has quit [Max SendQ exceeded]
<tobiasvl> Xnfu: will you please stop abusing the bot
noop has quit [Ping timeout: 245 seconds]
tier has joined #ruby
<tobiasvl> apeiros_: ^ (not the first time today)
Xnfu was kicked from #ruby by apeiros_ [spamming is not ok]
dimaursu16 has quit [Ping timeout: 245 seconds]
freerobby has quit [Quit: Leaving.]
<cphrmky> can anyone recommend a gem for working with PDFs? specifically hoping for the ability to replace text line-by-line in an existing pdf...
sambao21 has quit [Quit: Computer has gone to sleep.]
freerobby has joined #ruby
<tobiasvl> apeiros_: thanks
<apeiros_> yw
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
Xeago has joined #ruby
iamjarvo has joined #ruby
tjbiddle has joined #ruby
Xeago__ has joined #ruby
hs366 has quit [Quit: Leaving]
tjbiddle has quit [Remote host closed the connection]
jherbst has joined #ruby
rbennacer has quit [Remote host closed the connection]
* cphrmky just realized this channel has an awesome bot...
sambao21 has joined #ruby
<certainty> nah shevy is real
<cphrmky> >> puts 'like this?'
iwishiwerearobot has quit [Read error: Connection reset by peer]
<eval-in__> cphrmky => like this? ... (https://eval.in/277836)
fedalto has joined #ruby
<cphrmky> thats cool
<pontiki> certainty: are you shure?
tier_ has quit [Ping timeout: 264 seconds]
<certainty> pontiki: hehe, now that you ask
aganov has quit [Remote host closed the connection]
<tobiasvl> pontiki: he's certaint
tus has joined #ruby
iwishiwerearobot has joined #ruby
<certainty> :D
Xeago_ has quit [Ping timeout: 250 seconds]
snath has quit [Ping timeout: 245 seconds]
russt1 has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
Xeago has quit [Ping timeout: 265 seconds]
iamjarvo has quit [Client Quit]
russt1 has quit [Remote host closed the connection]
<pontiki> tho certainty is not proper tea
<shevy> cphrmky prawn
<shevy> cphrmky though not sure it can do line-by-line replacement
tagrudev has quit [Remote host closed the connection]
<ddv> who's bot is it?
zenith_ has quit [Ping timeout: 256 seconds]
<cphrmky> thx shevy
jottr_ has joined #ruby
<ddv> ah by a guy named charlie
revoohc has quit [Quit: revoohc]
<certainty> je suis charlie?
dfinninger has joined #ruby
rbennacer has joined #ruby
<shevy> no you are not
<certainty> you don't know that
<certainty> maybe i am
<pontiki> this charlie: https://github.com/charliesome
penzur has joined #ruby
cphrmky has left #ruby ["Textual IRC Client: www.textualapp.com"]
<pontiki> that's the best charlie brown jpg you could find??
<certainty> pontiki: nope just the first
shredding has quit [Quit: shredding]
psmolen has quit [Ping timeout: 245 seconds]
Xeago__ has quit [Remote host closed the connection]
<Diabolik> if i want to create a method that merges two hashes together
<Diabolik> what is wrong with
<Diabolik> def merge_us(hash={})(hash={})
<Diabolik> to declare the method?
<certainty> Diabolik: many things. But i think you might look for def merge_us(lhs,rhs) ... end
fryguy9 has quit [Quit: Leaving.]
dimaursu16 has joined #ruby
<Diabolik> so certainty
<Diabolik> def merge_us(lhs,rhs)
<Diabolik> lhs.merge(rhs)
<Diabolik> end
main has quit [Remote host closed the connection]
hanmac1 has quit [Quit: Leaving.]
<pontiki> Diabolik: Hash#merge won't work?
xyh has joined #ruby
<Diabolik> pontiki its for a tutorial thing
<certainty> Diabolik: yes, but you probably would just merge directly
havenwood has joined #ruby
dspangenberg has joined #ruby
vpereira has joined #ruby
pontiki has quit [Quit: bbl, stay warm!]
<xyh> what is wrong with my GEM PATH ? what should I do ? :: https://www.refheap.com/96900
revoohc has joined #ruby
i0n has joined #ruby
psmolen has joined #ruby
rippa has joined #ruby
<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]
lolmaus has quit [Quit: Konversation terminated!]
dimaursu16 has joined #ruby
Kricir has joined #ruby
jottr_ has quit [Ping timeout: 256 seconds]
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
<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.
<Xnfu> Lol too much ego in you
<Xnfu> w/e, let's get on topic
<Xnfu> It's done.
<Xnfu> petty
Xnfu was kicked from #ruby by apeiros_ [good bye]
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
mLF has joined #ruby
ramfjord has joined #ruby
penzur has quit [Quit: Leaving]
maletor has joined #ruby
hamakn has joined #ruby
ta_ has joined #ruby
xyh has left #ruby ["Killed buffer"]
jlast has joined #ruby
<apeiros_> I've got no patience for idiots anymore.
shime has quit [Read error: Connection reset by peer]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mitchellhenke has joined #ruby
tier has quit [Remote host closed the connection]
Xnfu_ has joined #ruby
jgabrielygalan has joined #ruby
shime has joined #ruby
<Xnfu_> lol man
<havenwood> xyh: Interesting installation path, how'd you install Ruby?
<Xnfu_> I could avoid you all day, but it's really not worth it
jusmyth has quit [Quit: Leaving.]
<ddv> bad evading is perm ban
<Xnfu_> Just lift the ban nikka
Xnfu_ was kicked from #ruby by apeiros_ [good bye]
zacstewart has joined #ruby
tier has joined #ruby
<i0n> he has been a jerk all week
ghostpl has joined #ruby
<i0n> i asked a question two days ago and he chewed me out for it
harryporter has joined #ruby
fcanela has joined #ruby
pu22l3r has joined #ruby
jottr_ has quit [Ping timeout: 265 seconds]
<shevy> he is a cat killer too!
<ddv> what am I going to eat tonight, shevy?
rkgudboy has joined #ruby
<shevy> ddv italian pizza
ramfjord has quit [Ping timeout: 246 seconds]
tier has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 252 seconds]
<ddv> shevy: nice choice
wald0 has quit [Quit: Lost terminal]
<ddv> I will do that
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]
<ddv> :)
AFKGeek has quit [Quit: Fades into the shadows]
blackoperat has quit [Ping timeout: 244 seconds]
<shevy> certainty this is the weird display problem I am facing right now http://i.imgur.com/yWYMdVM.png
<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.]
Megtastique has joined #ruby
jam___ has joined #ruby
Macaveli_ has quit [Quit: Textual IRC Client: www.textualapp.com]
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
wpp has quit [Ping timeout: 265 seconds]
shime has quit [Ping timeout: 250 seconds]
tunaCanBruh has joined #ruby
konsolebox has joined #ruby
ghostpl has joined #ruby
ghostpl has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
ghostpl has joined #ruby
apeiros_ has joined #ruby
sambao21 has joined #ruby
St_Marx has joined #ruby
nanoyak has joined #ruby
tier has quit [Remote host closed the connection]
livathinos has quit []
chrishough has joined #ruby
hamakn has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
DrCode has quit [Ping timeout: 250 seconds]
stevenix has left #ruby [#ruby]
SixiS has quit [Quit: SixiS]
<ddv> I used to switch tilers every month
Takle has joined #ruby
bronson has joined #ruby
tier has joined #ruby
ghostpl_ has joined #ruby
<Diabolik> i can't pass the last test :(
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
apeiros_ has quit [Ping timeout: 264 seconds]
ghostpl has quit [Read error: Connection reset by peer]
DrCode has joined #ruby
himsin has joined #ruby
<havenwood> >> [:name, :uuid, :cost].sort == [:cost, :uuid, :name].sort
<eval-in__> havenwood => true (https://eval.in/277884)
tier has quit [Read error: Connection reset by peer]
Morkel has quit [Quit: Morkel]
tier has joined #ruby
<Diabolik> havenwood where does that go in the if/else space?
<havenwood> Diabolik: You are comparing two Arrays but they're in a different order. Where do you compare those Arrays? Try it! :)
aswen has quit [Ping timeout: 245 seconds]
claw_ has quit [Ping timeout: 244 seconds]
<Diabolik> havenwood i did and suddenly its not passing the previous tests
<Diabolik> i added it to elsif
claw__ has joined #ruby
<epitron> Diabolik: another trick is that you don't need to return true if your of statement's condition is true
<epitron> Just return the if statement's condition
harryporter has quit []
<epitron> Cut out the middle man
<Diabolik> okthanks epitron
<epitron> *if
<havenwood> and you don't need to do the first `hash.keys`
<Diabolik> * ok thanks
<havenwood> Diabolik: just one line inside that method
<Diabolik> but epitron
<Diabolik> i just did that
<Diabolik> now
<Diabolik> do_i_have? returns true if all keys are in the hash
<Diabolik> is returning nil
<havenwood> Diabolik: no `return`, just a single equality comparison with a sort on both sides
<havenwood> everything else is implicit
iamjarvo has joined #ruby
zenith_ has quit [Ping timeout: 245 seconds]
tunaCanBruh has quit [Ping timeout: 265 seconds]
gsd has joined #ruby
<epitron> Diabolik: == returns true or false
<Diabolik> so def do_i_have?(hash, array_of_keys)
<Diabolik> if [:name, :uuid, :cost].sort == [:cost, :uuid, :name].sort
<Diabolik> end
<Diabolik> end
Hijiri has quit [Quit: aaaaaaaaaaaaaaaaaaaaaaaaaaa]
<havenwood> Diabolik: Like epitron said, the if statement is redundant
<epitron> So you just return a == b
xyh has left #ruby ["Killed buffer"]
<havenwood> just the condition alone
arup_r has joined #ruby
nanoyak has quit [Remote host closed the connection]
<Diabolik> ok but now the first 3 tests aren't passing
<havenwood> >> [1, 2].sort == [1, 2].sort
<eval-in__> havenwood => true (https://eval.in/277887)
zenith_ has joined #ruby
nanoyak has joined #ruby
<epitron> return is also unnecessary :)
<Diabolik> im now passing the last two tests but failing the first 3
skj3gg has joined #ruby
<epitron> Oh, Looks like you did that already
<havenwood> Diabolik: Show the code?
<epitron> He probably has an if in there still
<havenwood> i imagine so!
<Diabolik> def do_i_have?(hash, array_of_keys)
<Diabolik> [:name, :uuid, :cost].sort == [:cost, :uuid, :name].sort
<Diabolik> end
sigurding_ has joined #ruby
<havenwood> hehe
<Diabolik> im on day 3 of learning ruby
<Diabolik> forgive me
<Diabolik> :P
<havenwood> Diabolik: those were example Arrays representing what `hash.keys` and `array_of_keys` might be
<havenwood> Diabolik: You're on the right path, but are using dummy data.
<gregf__> Diabolik: def do_i_have?(hash={}, array_of_keys=[]); return hash.keys().sort == array_of_keys;end;[[{},[]], [{ foo: 1 },[:foo]],[{foo: 1},[:bar]],[{foo: 1, bar: 1}, [:foo,:bar]]].each { |h,a| puts do_i_have?(h,a) }
nanoyak has quit [Client Quit]
<gregf__> just what havenwood said :/
sigurding has quit [Ping timeout: 245 seconds]
sigurding_ is now known as sigurding
<Diabolik> woohoo havenwood
<Diabolik> i did it
<Diabolik> def do_i_have?(hash, array_of_keys)
<Diabolik> hash.keys.sort == array_of_keys.sort
<Diabolik> end
<havenwood> victory!
arietis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy> I think .count counts for each occurence. is there a way to count for substrings? like
<shevy> "string x, how many substrings of abc do you have?"
<shevy> x = 'abcabcabc fooo' then it should yield 3 as a result hmm
snath has joined #ruby
iwishiwerearobot has quit [Quit: Be back later ...]
<shevy> wait let me try .scan with regex actually
<gregf__> >> "abcfooabcbarabcbaz".scan(/abc/).count
<eval-in__> gregf__ => 3 (https://eval.in/277890)
<gregf__> shevy^^
LudicrousMango has quit [Remote host closed the connection]
<shevy> \o/
mikepack has joined #ruby
<shevy> I was using like .count('abc') and wondered :D
<Diabolik> havenwood
<Diabolik> do you have any learning
jobewan has joined #ruby
<Diabolik> resources
<Diabolik> to recommend
<Diabolik> thanks irc
<Diabolik> for multilining my question
jottr_ has joined #ruby
qba73 has quit [Remote host closed the connection]
arietis has joined #ruby
<Diabolik> havenwood have you used https://www.omniref.com/
swgillespie has joined #ruby
<shevy> :D
nfk has quit [Quit: yawn]
wald0 has joined #ruby
<havenwood> Diabolik: That's a sekret, I'll never tell!
blackmesa has quit [Ping timeout: 245 seconds]
OrbitalKitten has joined #ruby
rkgudboy has joined #ruby
josephnd1nton has joined #ruby
SixiS has joined #ruby
GaryOak_ has joined #ruby
<havenwood> >> x = 'abcfooabcbarabcbaz'; y = 'abc'; x.each_char.each_cons(y.size).map(&:join).count y
<eval-in__> havenwood => 3 (https://eval.in/277891)
jottr_ has quit [Ping timeout: 240 seconds]
<havenwood> shevy: the requisite non-Regexp solution wasn't pretty on this one >.>
<shevy> hmm that looks weird
<havenwood> shevy: i jest
<shevy> each_cons is short for "each consecutive"?
william3 has quit [Remote host closed the connection]
shime has joined #ruby
davidhq has joined #ruby
<havenwood> shevy: hem, i never wondered. that sounds plausible
<GaryOak_> is that a lisp term?
<havenwood> shevy: yeah, they say "consecutive" in the docs
zacstewart has quit [Read error: Connection reset by peer]
dumdedum has quit [Quit: foo]
skj3gg has quit [Quit: ZZZzzz…]
zacstewart has joined #ruby
<shevy> I need to get better at this kind of non-regex stuff
<havenwood> cons is the inverse of car and cdr
<shevy> arup_r teach me
<shevy> the inverse of a car?
<havenwood> shevy: rac
<shevy> lol
<arup_r> :)
<GaryOak_> hehe
Mon_Ouie has joined #ruby
<gregf__> str ="abcfooabcbarabcbaz"; print ((str.length - str.gsub("abc","").length)/"abc".length).to_s <== shevy
banister has joined #ruby
spyderma_ has quit [Ping timeout: 256 seconds]
<havenwood> no Regexp, it checks out. ship it!
josephnd1nton has quit [Ping timeout: 264 seconds]
<shevy> huh
fryguy9 has quit [Quit: Leaving.]
CustosL1men has quit [Ping timeout: 250 seconds]
<shevy> now that is clever
_ixti_ has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
fryguy9 has joined #ruby
* arup_r thinking how to get rid of "Boreness"
ixti has quit [Ping timeout: 245 seconds]
Bounga has joined #ruby
<havenwood> >> "Boreness".clear
<eval-in__> havenwood => "" (https://eval.in/277895)
rylev has joined #ruby
thumpba has joined #ruby
d10n-work has joined #ruby
<shevy> hey
<shevy> .clear gets rid of everything!
greenarrow has quit [Quit: 500]
<shevy> even cats
hgl has quit [Ping timeout: 256 seconds]
<havenwood> shevy: cats made of string
hgl has joined #ruby
<workmad3> havenwood: I'm a string theorist... so that gets rid of all cats!
rylev_ has quit [Ping timeout: 245 seconds]
<workmad3> (not really a string theorist btw... but I like the concepts :) )
coco_ has quit [Ping timeout: 240 seconds]
<havenwood> :)
fenzil has joined #ruby
<arup_r> lol
<havenwood> i'm a cat theorist
jobewan has quit [Ping timeout: 265 seconds]
<shevy> yeah
thumpba has quit [Ping timeout: 244 seconds]
rbennacer has quit [Remote host closed the connection]
<shevy> I remember the string theory... strings in the universe can somehow be interconnected
coco_ has joined #ruby
<havenwood> though shevy has said "meow" 17 times in this channel compared to my measly 11, from my logs
<shevy> and now you say that cats are made out of strings
<shevy> so we can soon equate cats made the universe
cats has left #ruby ["Wow, rude."]
<shevy> lol you can count that?!
<shevy> I really typed meow?
longfeet has joined #ruby
<shevy> perhaps I was trying to communicate with sevenseacat
wallerdev has joined #ruby
msgodf has quit [Ping timeout: 245 seconds]
fryguy9 has quit [Quit: Leaving.]
<havenwood> shevy: you meow more than you expected?
camilasan has quit [Ping timeout: 252 seconds]
<shevy> oh damn
<shevy> 2013 must have been the year of the cat for me then
<shevy> oh I see
patrick99e99 has quit [Ping timeout: 245 seconds]
Guest55781 is now known as adam12
<shevy> a method called meow, now that makes sense
fryguy9 has joined #ruby
jespada has quit [Quit: Leaving]
camilasan has joined #ruby
deric_skibotn has joined #ruby
<havenwood> and I was talking to a "meowington"
<shevy> haha
<shevy> there is a town in austria called Fucking
zacstewa_ has joined #ruby
<shevy> but you prounce the 'u' there like uuuuuu like in "you" but even longer
Aova has quit [Read error: Connection reset by peer]
<shevy> that is the place :D http://de.wikipedia.org/wiki/Fucking
zacstewart has quit [Ping timeout: 264 seconds]
<shevy> 93 people live there ...
ptrrr has joined #ruby
rbennacer has joined #ruby
timonv has quit [Quit: WeeChat 1.1.1]
<shevy> cool... the name came from some royal dude called "von Vucckingen" ... that almost sounds like northern germany or dutch...
longfeet has quit [Ping timeout: 252 seconds]
kobain has joined #ruby
yfeldblum has joined #ruby
<havenwood> shevy: Ein Apfelstrudel mit Vanillesauce und ein Glas Zweigelt, bitte.
kobain has quit [Max SendQ exceeded]
<shevy> haha
<shevy> ack
kobain has joined #ruby
<ericwood> lol
<shevy> upper slaughter... sounds as if some battle must have happened there
bricker has joined #ruby
<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]
blackmesa has joined #ruby
<shevy> you mean learned, or designed
Pupeno has quit [Ping timeout: 265 seconds]
kaspertidemann has joined #ruby
uptownhr has joined #ruby
wallerdev has quit [Quit: wallerdev]
chinmay_dd has joined #ruby
momomomomo has joined #ruby
wldcordeiro has joined #ruby
endash has quit [Quit: endash]
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
allcentury has joined #ruby
Peppuz has joined #ruby
cats has joined #ruby
d3v- has joined #ruby
fenzil has quit [Quit: Leaving]
tyfighter has joined #ruby
sigurding has quit [Quit: sigurding]
leafybasil has quit [Read error: Connection reset by peer]
fenzil has joined #ruby
Fire-Dragon-DoL has joined #ruby
d3v has quit [Ping timeout: 240 seconds]
CustosL1men has joined #ruby
livingstn has joined #ruby
lemur has quit [Remote host closed the connection]
sent1nel has quit [Remote host closed the connection]
colli5io_ has quit []
lioninawhat has joined #ruby
rylev_ has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
ghr has quit [Ping timeout: 256 seconds]
jimms has quit [Remote host closed the connection]
<atmosx> shevy: nah I just nailed a couple of old blokes
<atmosx> lol
recurrence has joined #ruby
tyfighter has quit [Quit: tyfighter]
<atmosx> shevy: learn well, I knew the theory.
nrsk has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
tier has quit [Remote host closed the connection]
<avril14th> I thought I would feel better after finishing my 1K lines of regex / text parsing
tier has joined #ruby
jenrzzz has joined #ruby
<avril14th> programming isn't fun as it used to be
startupality has joined #ruby
<atmosx> avril14th: I can hand you an SSRI if you want
<shevy> avril14th yeah
<shevy> avril14th I try to solve it by making only small changes, little code.
<avril14th> atmosx: SSRI?
Pharaoh2_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<atmosx> avril14th: ask shevy
<atmosx> avril14th: new framework
<jefus> atmosx: that's the boring solution.
<havenwood> selective serotonin reuptake inhibitor
rclements has joined #ruby
tyfighter has joined #ruby
<atmosx> havenwood: did you google that out? :-P
Pharaoh2 has joined #ruby
<havenwood> atmosx: my mother was a psychiatrist
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]
startupality has quit [Ping timeout: 245 seconds]
cjim has joined #ruby
startupality has joined #ruby
nanoyak has joined #ruby
<havenwood> rsavage: Depends how you're shelling out and what you want to do. Maybe start with `$?.exitstatus` and if that doesn't work for you let us know the issues: http://www.ruby-doc.org/core-2.2.0/Process/Status.html#method-i-exitstatus
<rsavage> havenwood: I am doing `shell-cmd.sh`
bMalum has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
<havenwood> rsavage: And is?: $?.success?
LouisRoR has quit [Ping timeout: 245 seconds]
zacstewa_ has quit [Ping timeout: 256 seconds]
<rsavage> havenwood: I don't know... are you saying I should do `shell-cmd.sh`; $?.success?
<havenwood> rsavage: yup
<rsavage> nice
<havenwood> rsavage: Or check out Open3 if you end up needing more control: http://ruby-doc.org/stdlib-2.2.0/libdoc/open3/rdoc/Open3.html
Aova has joined #ruby
<rsavage> k thanks
<havenwood> np
h0lyalg0rithm has joined #ruby
zacstewart has joined #ruby
zacstewa_ has joined #ruby
zacstewart has quit [Read error: Connection reset by peer]
n1lo has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
chrishough has joined #ruby
n1lo has joined #ruby
rbennacer has quit [Remote host closed the connection]
fryguy9 has joined #ruby
wallerdev has quit [Quit: wallerdev]
<epitron> atmosx: why don't you make it recursive?
<Diabolik> how can i tell a function to expect a boolean value in one argument?
<epitron> merge( sort(left_half), sort(right_half) )
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pdoherty has joined #ruby
<atmosx> epitron: that's part of a recursive algo.
<epitron> that's the point of merge sort :)
h0lyalg0_ has joined #ruby
<epitron> it's recursive
<epitron> if it's not recursive, it's kinda crappy
<epitron> quicksort is better
<atmosx> epitron: I know, but recursion happens at higher level (at least the way I've designed this)
<epitron> well, i mean, quicksort is recursive too
<epitron> i think there's a non-recursive version though
h0lyalg0rithm has quit [Ping timeout: 265 seconds]
<atmosx> epitron: no no I"m interestd in the recursive version anyway.
<Diabolik> epitron?
<epitron> well, good luck! :D
<epitron> hi Diabolik
nerium has quit [Quit: nerium]
wallerdev has joined #ruby
<atmosx> brb
<Diabolik> how can i tell initialize to expect a boolean value
<atmosx> epitron: ty
<Diabolik> in one argument
<epitron> Diabolik: "raise 'u sux' unless value.is_a? Boolean"
<Diabolik> wut
<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
noname001__ has joined #ruby
<epitron> so just use the argument!
<epitron> @ripe = arg
<Diabolik> and in the brackets for initialize?
<epitron> arg
<Diabolik> just arg?
<epitron> or you could call it "ripe"
<epitron> @ripe = ripe
<epitron> RIPE RIPE
<havenwood> Diabolik: drop those `return`s and `unless @ripe` instead of `if !@ripe == true`
rbennacer has joined #ruby
sigurding has joined #ruby
<cHarNe2> im waiting for someone to swap that i to an a
<rsavage> how do you force a loop in ruby to only loop once?
ghr has joined #ruby
fryguy9 has quit [Read error: Connection reset by peer]
fryguy91 has joined #ruby
<gizmore> rsavage: don´t use a loop at all?
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<epitron> cHarNe2: those letters are pretty far apart
<epitron> cHarNe2: i doubt anyrape is going to make that typo
<havenwood> rsavage: loops have to loop to be loops
<epitron> OH SNAP
<Diabolik> inception looping
zbaxter has joined #ruby
<gregf__> w
<havenwood> rsavage: you can `break` your loop
<gregf__> sorry :/
fryguy9 has joined #ruby
shime has quit [Read error: Connection reset by peer]
<cHarNe2> epitron: two point to you
<rsavage> gizmore: I need to loop in the future, but testing now
zbaxter has left #ruby [#ruby]
pdlug_ has joined #ruby
<rsavage> break should work, thanks havenwood
withnale_ has quit [Ping timeout: 240 seconds]
<cHarNe2> need to get new glasses, don't see to good with theese :S
freerobby has quit [Quit: Leaving.]
fryguy91 has quit [Ping timeout: 252 seconds]
ramfjord has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
<shevy> cHarNe2 yeah take them off, you don't look good with them man
<cHarNe2> o.o
_djbkd has joined #ruby
<shevy> yes these look better
<shevy> I'd go for these though:
<cHarNe2> ok
<shevy> O_O
<gizmore> did you know that -.- is the chinese version of o-o ???
fenzil has quit [Ping timeout: 245 seconds]
ghr has quit [Ping timeout: 256 seconds]
<shevy> I feel you are punking us now gizmore!
<eam> I think you mean korean
<gizmore> asian?
<shevy> but ^_^ is the anime smiley
<eam> gizmore: not asian, asia includes india
<gizmore> ^-^
h0lyalg0_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> I know that because a girl that has been drawing lots and lots of these, was always using that
<shevy> yeah gizmore that is a smiling cat
<shevy> '^-^' now it's waving its paws
<eam> o_O
<shevy> the weirdest folks are that make smileys like this
<epitron> guys i need help i'm writing a ruby program with emoticons and i want to know which are more east asian
<shevy> (:
<epitron> oh wait nvm i read scrollback thanks
<shevy> well, what smiley does matz use?
<arup_r> eam: what happened with your eyes ?
<shevy> one eye is swollen from a punch
<eam> epitron: (=^-ω-^=)
<epitron> matz just IS smiley
<epitron> he doesn't need to use anything
<epitron> he just signs his name
<shevy> well matz is always smiling
idealexit has quit [Remote host closed the connection]
<epitron> his smiley is HIS PRESENCE
<eam> ฅ(˘ω˘ )ฅ
crazydiamond has joined #ruby
<shevy> it's like a buddha without the buddha-belly
<epitron> and glasses
<shevy> hehehe
<eam> (`o´)
iwishiwerearobot has joined #ruby
<shevy> perhaps the old buddha was short sighted too... did not see a thing so he could always smile
fryguy9 has quit [Quit: Leaving.]
scottgc has quit [Quit: scottgc]
<cHarNe2> only meetup-group in my area is a bible-study right now :S
<epitron> his happiness was due to myopia?
tier has quit [Remote host closed the connection]
<epitron> cHarNe2: how much are bus tickets?
jam___ has quit [Quit: Connection closed for inactivity]
SOLDIERz has joined #ruby
<shevy> epitron well if you are short sighted, go running late at night in a big town
<shevy> you don't even see what is going on all around you
tier has joined #ruby
<shevy> then you become entertained by your own thoughts, because the environment around is so blurred that you can't see what happens
<epitron> ...until it's too late
<epitron> DUN DUN DUNNN
<shevy> yeah well you have to be careful when you cross a street!
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
<epitron> WHAT IF THERE ARE MUGGERS
dspangenberg has joined #ruby
<epitron> OR RAPISTS
<shevy> nah
<epitron> OR MUG RAPERS
<epitron> MUGGISTS
<shevy> are you scared of your town at night!
<epitron> no, i live in toronto
<epitron> BUT
<AdNauseaum|tWork> RUGGERS
<epitron> i might be scared if i was living in a place full of muggists
<AdNauseaum|tWork> RUGGISTS
<AdNauseaum|tWork> flumpin muggists
<shevy> someone woke up :P
iwishiwerearobot has quit [Ping timeout: 264 seconds]
phoo1234567 has joined #ruby
jottr has joined #ruby
jottr_ has quit [Read error: Connection reset by peer]
m8 has joined #ruby
fenzil has joined #ruby
phoo1234567 has quit [Max SendQ exceeded]
dspangenberg has quit [Ping timeout: 245 seconds]
gfawcettpq has quit [Ping timeout: 250 seconds]
phoo1234567 has joined #ruby
_Andres has joined #ruby
hamakn has joined #ruby
sigurding has quit [Quit: sigurding]
aryaching has quit []
LouisRoR has joined #ruby
<wallerdev> good morning
<cHarNe2> morning
<wallerdev> how is your wednesday cHarNe2
<cHarNe2> sitting on a train back home from work
rylev has joined #ruby
dfinninger has joined #ruby
<cHarNe2> did a lot of ruby programming today
<wallerdev> oh cool :)
<wallerdev> are you in europe?
william3 has quit [Remote host closed the connection]
<cHarNe2> sweden
sambao21 has quit [Quit: Computer has gone to sleep.]
<wallerdev> oh northern or southern
fryguy9 has joined #ruby
jottr_ has joined #ruby
vozcelik has joined #ruby
vozcelik has quit [Read error: Connection reset by peer]
werelivinginthef has quit [Remote host closed the connection]
<cHarNe2> work is at stockholm and i live in norrköping, so in the middle kind of
hamakn has quit [Ping timeout: 250 seconds]
<wallerdev> gotcha
<wallerdev> i have a friend who lives in the northern part of sweden
<cHarNe2> im buiding a provisioning engine that provision SIM-cards
<cHarNe2> ohh, nice. do you know where?
<wallerdev> Holmsund
<cHarNe2> ok
<wallerdev> apparently a small town haha
weaksauce has joined #ruby
uptownhr has quit [Quit: uptownhr]
<cHarNe2> ye, i think it is
freerobby has joined #ruby
<cHarNe2> how was your day?
<wallerdev> just starting it haha, woke up 2 hours ago :), but good so far
jottr has quit [Ping timeout: 256 seconds]
<wallerdev> got coffee & a banana, ready to get some work done
<cHarNe2> great, US based?
<wallerdev> yup california
sambao21 has joined #ruby
<jefus> best breakfast
mikepack has quit [Remote host closed the connection]
<wallerdev> haha yeah
<cHarNe2> i like boiled eggs and swedish caviar
sambao21 has quit [Client Quit]
himsin has quit [Ping timeout: 252 seconds]
<wallerdev> caviar for breakfast, high roller haha
<jefus> swedish caviar is the worst.
<cHarNe2> swedish caviar comes in a tube :) it's the best
<jefus> tubular :)
<jefus> i actually would have no idea but i'm sure i'd make a mean omelette with it
<wallerdev> haha weird
<wallerdev> like toothpaste :p
systemd0wn_ is now known as systemd0wn
<arup_r> I need help!
The_Phoenix has quit [Read error: Connection reset by peer]
<jefus> rescue arup_r
sent1nel has joined #ruby
<arup_r> I am trying to define some method dynamically... But `super` is kicking me out of my destiny... Any pointer how to do so.. I never saw error such before. https://gist.github.com/aruprakshit/6974ba5f98a3febce3da
werelivinginthef has joined #ruby
<arup_r> I tried `super`.. Same error I got
<cHarNe2> i didnt know super existed in ruby, great learning something today aswell
<wallerdev> super automatically sends all arguments that were given in the method params
pdlug_ has quit [Read error: Connection reset by peer]
nanoyak has quit [Remote host closed the connection]
<arup_r> method has no params as far as I see
<wallerdev> so you just need to change def cool_method(one, two, three); super; end to def cool_method(one, two, three); super(one, two, three); end
<wallerdev> then call super()
josephnd1nton has joined #ruby
nanoyak has joined #ruby
Megtastique has joined #ruby
jenrzzz has joined #ruby
zacstewa_ has quit [Remote host closed the connection]
sambao21 has joined #ruby
<arup_r> I am overriding the methods created by https://gist.github.com/aruprakshit/6974ba5f98a3febce3da#file-menu-rb-L4 with the dynamic methods
mary5030 has joined #ruby
tubuliferous has joined #ruby
<wallerdev> you can use alias_method and call the old one after you override it
Peppuz has quit [Quit: This computer has gone to sleep]
nobitanobi has joined #ruby
<arup_r> wallerdev: sounds good idea.. can you give a hint in my Gist ?
himsin has joined #ruby
Bira has joined #ruby
josephnd1nton has quit [Ping timeout: 264 seconds]
<wallerdev> you would do something like alias_method("old_" + type, type); then instead of calling super() call send("old_" + type)
<wallerdev> i guess
skj3gg has quit [Quit: ZZZzzz…]
huddy has joined #ruby
<Diabolik> Module class of module is the superclass of the Class class of class
<Diabolik> what the shit
<wallerdev> lol
<arup_r> ok
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sandelius has joined #ruby
sandelius has quit [Max SendQ exceeded]
sandelius has joined #ruby
towski_ has joined #ruby
jimms has joined #ruby
Kache has joined #ruby
ilteris has left #ruby ["Textual IRC Client: www.textualapp.com"]
Kache has left #ruby [#ruby]
ta_ has joined #ruby
noop has quit [Quit: Leaving]
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…]
werelivi_ has joined #ruby
<havenwood> Diabolik: Look at the bottom left and follow it along the left side to the middle top: http://www.gliffy.com/go/publish/5152080
elaptics is now known as elaptics`away
sent1nel has quit [Remote host closed the connection]
<wallerdev> sounds like you coded it wrong arup_r
Tuxero has joined #ruby
<wallerdev> maybe play with alias_method a bit in a test file to understand how to use it
<arup_r> moment.. let me show you the gist
Kache has quit [Quit: Leaving]
<Diabolik> havenwood
<Diabolik> since all of those functions in essence do the same thing
<Diabolik> is there a way of refactoring them
<arup_r> wallerdev: ^^
Aova has joined #ruby
Kache4 has joined #ruby
<wallerdev> should put it inside the define_method
<arup_r> I did it
<Diabolik> sorry havenwood
<wallerdev> shouldnt*
<wallerdev> lol
<arup_r> ok
<arup_r> got it
ramfjord has joined #ruby
<havenwood> Diabolik: Fix your indentation and put a newline between each method.
wldcordeiro has quit [Ping timeout: 252 seconds]
jobewan has quit [Ping timeout: 250 seconds]
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> Diabolik: Seems these methods call themselves. :O
<Diabolik> i mean havenwood is there a way of refactoring them to within one function
dc has joined #ruby
<havenwood> Diabolik: We call them methods. This is too little code out of context.
<havenwood> Diabolik: SystemStackError: stack level too deep
ta_ has joined #ruby
<arup_r> wallerdev: Thanks
<havenwood> >> def name; name end; name
<eval-in__> havenwood => stack level too deep (SystemStackError) ... (https://eval.in/277967)
<arup_r> I should practice Ruby with you 6 months
<arup_r> :)
<arup_r> wallerdev: ^^
<arup_r> I wish I could use `super` :-(
paulfm has quit [Ping timeout: 240 seconds]
<wallerdev> super doesnt make sense in that context
<havenwood> Diabolik: `name` != `@name`
<wallerdev> since you're not overriding it in a subclass, you're just overwriting it outright
lidaaa has joined #ruby
shredding has joined #ruby
zacstewart has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<arup_r> one moment again :)
spacemud has quit [Ping timeout: 252 seconds]
<havenwood> Diabolik: Seems needlessly complicated to me. Fine for learning to do mess around, but refactoring would mean very little code here.
thebastl has joined #ruby
baroquebobcat has joined #ruby
noname001__ has quit [Ping timeout: 255 seconds]
<arup_r> wallerdev: This answer hints me to do so : http://stackoverflow.com/a/20132555/2767755
oo_ has joined #ruby
mitchell_ has joined #ruby
<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
<eval-in__> crome_ => [3, 2, 1] (https://eval.in/277992)
nobitanobi has quit [Remote host closed the connection]
Takle has quit [Ping timeout: 264 seconds]
werelivi_ has quit [Remote host closed the connection]
tyfighter has quit [Ping timeout: 264 seconds]
tyfighter_ is now known as tyfighter
crome_ is now known as crome
GaryOak_ has quit [Remote host closed the connection]
davedev2_ has quit []
paulfm has quit [Ping timeout: 252 seconds]
rclements has left #ruby [#ruby]
dblessing has joined #ruby
<shevy> crome hmm
naftilos76 has quit [Remote host closed the connection]
momomomomo has joined #ruby
<crome> it's magic!
paulfm_ has quit [Ping timeout: 264 seconds]
ta_ has quit [Ping timeout: 252 seconds]
rodfersou has quit [Quit: leaving]
nobitano_ has joined #ruby
Turkey has quit [Remote host closed the connection]
febuiles has quit [Quit: febuiles]
josephnd1nton has joined #ruby
nobitano_ has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
diegoviola has joined #ruby
leafybasil has joined #ruby
<blizzy> since sinatra is dead, is there any way to achieve this? https://gist.github.com/VBlizzard/7e79c07a5c659570ab96
<blizzy> the channel, that is.
dspangenberg has quit [Quit: Lost terminal]
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
arietis has quit [Quit: Textual IRC Client: www.textualapp.com]
nobitanobi has quit [Remote host closed the connection]
<shadoi> shevy: index_array.map {|i| string_array.at(i) }
<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
Rezor has joined #ruby
<tobiasvl> that's tsv ;)
<shadoi> that would make it .tsv
<shadoi> lol
it0a has quit [Quit: WeeChat 1.1.1]
<tobiasvl> you can use any separator really
nobitanobi has quit [Remote host closed the connection]
C1V0 has joined #ruby
<tobiasvl> but I'm guessing comma, tabs and semicolons are mostly used
<havenwood> blizzy: event-stream is an option with sinatra. here are a couple examples: https://gist.github.com/rkh/1476463 https://gist.github.com/maccman/2992949
arturhoo has quit [Quit: arturhoo]
scottgc has joined #ruby
<havenwood> blizzy: As an alternative, Volt seems to be shaping up quite nicely: http://voltframework.com/
ghostpl has quit [Ping timeout: 252 seconds]
shredding has joined #ruby
Zai00 has joined #ruby
<blizzy> thanks, havenwood.
kamilc__ has quit [Quit: Linkinus - http://linkinus.com]
<havenwood> blizzy: you're welcome
<shadoi> wow, the volt guys are brave, cut myself on Opal for hours before giving up
<havenwood> blizzy: might want to check out Sinatra::Streaming, i'm not sure on its status but it looks interesting: http://www.sinatrarb.com/contrib/streaming.html
Rezor has quit [Quit: changing servers]
tier has quit [Remote host closed the connection]
nerium has quit [Quit: nerium]
iwishiwerearobot has joined #ruby
tier has joined #ruby
<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.
<shevy> CSV.parse("Maria,55,5054,\"Good, delicious food\",5,6\n") # => [["Maria", "55", "5054", "Good, delicious food", "5", "6"]]
<shevy> am I blind or does CSV remove '"' ?
<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.
Aswebb_ has joined #ruby
regnartim has quit [Quit: Leaving]
timonv has joined #ruby
<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]
deepu has joined #ruby
scottgc has joined #ruby
<deepu> Can someone please tell me how I can achieve this? http://pastie.org/private/xaqao4olby01dwdbktbw
spyderm__ has joined #ruby
momomomomo has joined #ruby
Peppuz has quit [Quit: Leaving]
jhebden has joined #ruby
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')
tier has joined #ruby
<havenwood> foo.key? 'bar'
nb_bez___ has joined #ruby
<shadoi> There's also: has_value?
kirun has joined #ruby
claw__ has quit [Ping timeout: 246 seconds]
wallerdev has joined #ruby
Bira has quit [Ping timeout: 245 seconds]
claw___ has joined #ruby
<havenwood> #include? #key? #has_key? / #value #has_value?
<shadoi> seems silly that doesn't return the key, but … meh
<shadoi> I guess #key does that
<sanguisdex> .nil worked
apurcell has joined #ruby
cpt_yossarian has joined #ruby
dzho has joined #ruby
kalusn has joined #ruby
Aova has quit [Read error: Connection reset by peer]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nobitanobi has joined #ruby
ta_ has joined #ruby
dabrorius has joined #ruby
josephnd1nton has joined #ruby
<shevy> I have this string: string = 'Foo,Bar,"One, Two",Bla'
charliesome has quit [Quit: zzz]
<shevy> I wish to split on ',' but not when it is inside of quotes like ""
<shevy> anyone has an idea how to do this via a regex perhaps?
tunaCanBruh has joined #ruby
<shevy> or solutions would be nice too
elaptics`away is now known as elaptics
nobitanobi has quit [Remote host closed the connection]
sanguisdex has left #ruby [#ruby]
Aova has joined #ruby
chrisja has joined #ruby
<wallerdev> sounds like a csv parser
<wallerdev> do you allow escape sequences
<wallerdev> or multiline items
josephnd1nton has quit [Ping timeout: 245 seconds]
ghostpl has joined #ruby
<shevy> the problem is that with a csv parser
<shevy> the " disappear
<shevy> CSV.parse 'Foo,Bar,"One, Two",Bla' # => [["Foo", "Bar", "One, Two", "Bla"]]
<wallerdev> thats because csv is a format that no one actually follows
<wallerdev> everyone just writes their own parsers
<shevy> so I can no longer distinguish between the original "One, Two"
_ixti_ has quit [Ping timeout: 240 seconds]
<wallerdev> because theyre like wow this format is simple
<wallerdev> let me just join(",") and that should work
<wallerdev> lol
<shevy> lol
ramfjord has joined #ruby
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
<shevy> ["Foo", "Bar", "One, Two", "Bla"].join(',') # => "Foo,Bar,One, Two,Bla"
<wallerdev> anyway you know it has quotes if it has a comma in it
<wallerdev> otherwise it wouldnt have a comma in it
<wallerdev> problem solved
<shevy> aha
<shevy> now that makes sense
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
<shevy> you are a very clever dev wallerdev
<wallerdev> ^__^
iamjarvo has joined #ruby
yeticry has quit [Ping timeout: 240 seconds]
_ixti_ has joined #ruby
mordocai has joined #ruby
beneggett has quit [Ping timeout: 246 seconds]
metadave_ has joined #ruby
<workmad3> wallerdev: one of the worst-followed RFCs in history :) http://www.ietf.org/rfc/rfc4180.txt
beneggett has joined #ruby
<wallerdev> haha im very aware
bronson_ has joined #ruby
<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]
<pipework> >> (:a..:z).to_a
<eval-in__> pipework => [:a, :b, :c, :d, :e, :f, :g, :h, :i, :j, :k, :l, :m, :n, :o, :p, :q, :r, :s, :t, :u, :v, :w, :x, :y, :z] (https://eval.in/278050)
cjim has joined #ruby
jenrzzz has joined #ruby
<workmad3> wallerdev: just don't forget to put \b around it?
ta_ has joined #ruby
GaryOak_ has joined #ruby
<pipework> 26 fantastic variable names.
<kristian-aalborg> it's done.
alex88 has joined #ruby
<wallerdev> \b doesnt always help haha
<wallerdev> im searching for thigns that have to do with kilometers
<wallerdev> so searching for km
<workmad3> well, it should help with km\b at least... and maybe a constraint for digits in front of it? :)
<wallerdev> dont want to miss some function named changekmtomiles or something dumb
zachrab has joined #ruby
<wallerdev> :)
beneggett has joined #ruby
<workmad3> oh... I forgot about checking for idiocy :)
baroquebobcat has quit [Quit: baroquebobcat]
<pipework> Isn't it fantastic that vim supports c for confirm?
<workmad3> although if it's true idiocy, there's probably 'changekmtomiles' and another one 'multiply_by_1point6'
<wallerdev> haha
shanlar has quit [Quit: shanlar]
<workmad3> bah, I can't manage true idiocy... I automatically put in _s
Hijiri has quit [Quit: WeeChat 1.0.1]
ta_ has quit [Ping timeout: 252 seconds]
terlar has quit [Ping timeout: 252 seconds]
jenrzzz_ has joined #ruby
nobitanobi has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
shanlar has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davidhq has quit [Quit: Textual IRC Client: www.textualapp.com]
timonv has quit [Quit: WeeChat 1.1.1]
davidhq has joined #ruby
skj3gg has joined #ruby
timonv has joined #ruby
mrsolo has joined #ruby
maletor has joined #ruby
<kristian-aalborg> km/b/
ta_ has joined #ruby
mrsolo has left #ruby [#ruby]
graydot has joined #ruby
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
revoohc has quit [Quit: revoohc]
baroquebobcat has joined #ruby
beneggett has quit [Quit: Textual IRC Client: www.textualapp.com]
EvanFreeman has quit [Remote host closed the connection]
<wallerdev> how are you installing gems now?
<kristian-aalborg> gem install
<wallerdev> the gem install process ends after you install something though
_djbkd has joined #ruby
<wallerdev> so just run it sequentially in a loop?
<kristian-aalborg> this is not on my home machine, but on a shell, as mentioned earlier
Soda has quit [Remote host closed the connection]
jenrzzz_ has quit [Ping timeout: 244 seconds]
<kristian-aalborg> it seems to quit OK after installing
<kristian-aalborg> it's nokogiri which is causing trouble
blizzy has quit [Ping timeout: 264 seconds]
enterprisedc has joined #ruby
<wallerdev> sounds like you might be misinterpreting the error then
paulfm has quit [Quit: Zzzzz...]
<kristian-aalborg> hmm
<wallerdev> theres no way nokogiri goes over the process limit when installing lol
hiyosi has joined #ruby
<pipework> Unless the limit is set to a really low value.
<kristian-aalborg> it is
<kristian-aalborg> I think it's 30
<pipework> Then set your bundler threading config thingy to like 4.
<wallerdev> wow
<pipework> Or whatever.
josephndenton has quit [Ping timeout: 264 seconds]
tier has quit [Remote host closed the connection]
<wallerdev> still 30 is a lot for nokogiri
tonybird has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pipework> It might be compiling things and his makeflags aren't set up nice. Who knows.
workmad3 has quit [Ping timeout: 264 seconds]
<havenwood> i'd guess make `-j` flag without args, so unlimited
<wallerdev> can you see the make command
silkfox has quit [Ping timeout: 244 seconds]
baroquebobcat has quit [Ping timeout: 250 seconds]
<kristian-aalborg> http://pastebin.com/6c0WQqe0
baroquebobcat has joined #ruby
triple_b has quit [Ping timeout: 264 seconds]
<kristian-aalborg> pipework, got more info on how to do that?
<wallerdev> wow
<pipework> kristian-aalborg: do what?
<wallerdev> what are you trying to compile on
<wallerdev> lol
<pipework> wallerdev: a potato
<kristian-aalborg> set bundler threads
patrick99e99 has joined #ruby
_djbkd has quit [Ping timeout: 245 seconds]
<kristian-aalborg> yes, a potato...
roshanavand has quit [Read error: Connection reset by peer]
<pipework> kristian-aalborg: I think it's like --jobs NUMBER
<havenwood> kristian-aalborg: are you using bundler, or just `gem install`?
<kristian-aalborg> the latter
skj3gg has quit [Quit: ZZZzzz…]
stef204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
skj3gg has joined #ruby
blizzy has joined #ruby
ta_ has joined #ruby
_djbkd has joined #ruby
skj3gg has quit [Client Quit]
stunder has quit [Quit: Leaving]
<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.
metadave_ has quit [Quit: Textual IRC Client: www.textualapp.com]
metadave has joined #ruby
juicer2 has joined #ruby
<havenwood> Moeh: Change `{key: key}` to just `key` if you want only the key. If you don't want indexes, drop `<< {index: index}`.
uptownhr has joined #ruby
sambao21 has joined #ruby
<Moeh> I was trying it with this hash:
<Moeh> {"coord"=>{"lon"=>13.41, "lat"=>52.52}, "sys"=>{"type"=>3, "id"=>162538, "message"=>0.0044, "country"=>"DE", "sunrise"=>1423032146, "sunset"=>1423065487}, "weather"=>[{"a"=>803, "b"=>[{"i"=>803, "j"=>"Clouds", "k"=>"broken clouds", "l"=>"04n"}, {"m"=>803, "n"=>"Clouds", "o"=>"broken clouds", "p"=>"04n"}], "c"=>"broken clouds", "d"=>"04n"}, {"e"=>803, "f"=>"Clouds", "g"=>"broken clouds", "h"=>"04n"}], "base"=>"cmc stations", "main"=>{"temp
reinaldob has joined #ruby
jerius has quit [Ping timeout: 264 seconds]
<Moeh> And new_search(hash, 'm')
CpuID2 has joined #ruby
<havenwood> Moeh: You'll have to Gist it. Cut off.
<Moeh> Okay
<kristian-aalborg> pipework, it seems to work
swgillespie has joined #ruby
swgillespie has quit [Client Quit]
chrishough has joined #ruby
chinmay_dd has quit [Quit: Connection closed for inactivity]
<Moeh> havenwood: Here is the pastie: http://pastie.org/9887234
ghr has joined #ruby
<juicer2> Hi, trying to figure out a ruby aws-sdk issue ... is this the correct channel or is there a better one ?
jenrzzz has joined #ruby
shadoi has quit [Quit: Leaving.]
noob878 has joined #ruby
<wallerdev> doubt theres a channel just for ruby aws
sent1nel has quit [Ping timeout: 264 seconds]
sent1nel has joined #ruby
axl_ has quit [Quit: axl_]
B1n4r10 has quit [Quit: Textual IRC Client: www.textualapp.com]
<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…]
<wallerdev> >> [{:type => "car", :color =>"red"}, {:type => "truck", :color => "blue"}].find { |hash| hash[:color] == "red" }[:type]
<eval-in__> wallerdev => "car" (https://eval.in/278110)
mary5030 has quit [Remote host closed the connection]
jobewan has quit [Ping timeout: 246 seconds]
<noob878> wow thanks
ghr has quit [Ping timeout: 264 seconds]
<juicer2> wallerdev: ok thanks
antgel has joined #ruby
zachrab has quit [Remote host closed the connection]
<havenwood> Moeh: mm, yeah it's adding extra branches it crawled on the way to a match
zachrab has joined #ruby
<noob878> guess my problem was adding an if inside the {}
max96at is now known as max96at|off
<Moeh> Yes, I tried to adjust it so that it does not do it but I had no success
CpuID2 has quit [Quit: This computer has gone to sleep]
zachrab_ has joined #ruby
gsd has quit [Ping timeout: 264 seconds]
zachrab has quit [Read error: Connection reset by peer]
mikepack has quit [Remote host closed the connection]
konsolebox has quit [Quit: Leaving]
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
ta_ has quit [Ping timeout: 252 seconds]
antgel has quit [Ping timeout: 255 seconds]
Takle has quit [Remote host closed the connection]
<noob878> i knew find would return a single record, just wasn't 100% sure how to get the type tho. :)
<Moeh> havenwood: Do you have an idea why this is happening?
gsd has joined #ruby
ta_ has joined #ruby
ramfjord has joined #ruby
fenzil has quit [Read error: Connection reset by peer]
tyfighter has quit [Quit: tyfighter]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
WillAmes has quit [Remote host closed the connection]
olivier_bK has quit [Ping timeout: 252 seconds]
Hijiri has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
juicer2 has left #ruby [#ruby]
WillAmes has joined #ruby
sdwrage has joined #ruby
noob878 has quit [Quit: Page closed]
jobewan has joined #ruby
Bira has joined #ruby
jgt has quit [Ping timeout: 245 seconds]
platzhirsch has joined #ruby
ghostmoth has quit [Quit: ghostmoth]
cjim has quit [Quit: (null)]
Deele has quit [Ping timeout: 245 seconds]
jgt has joined #ruby
ptrrr has quit [Quit: ptrrr]
dkphenom has joined #ruby
odin22 has quit [Quit: Leaving]
longfeet has joined #ruby
quimrstorres has quit [Remote host closed the connection]
lmickh has quit [Remote host closed the connection]
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mrmargolis has quit [Remote host closed the connection]
<havenwood> Moeh: I'll take a look.
<Moeh> Thanks a lot!
quimrstorres has joined #ruby
Bira has quit [Ping timeout: 264 seconds]
fenzyl has joined #ruby
baweaver has joined #ruby
mitchell_ has quit [Quit: Computer has gone to sleep.]
lioninawhat has joined #ruby
kobain has quit [Ping timeout: 264 seconds]
qba73 has quit [Remote host closed the connection]
jgt has quit [Ping timeout: 245 seconds]
triple_b has joined #ruby
qba73 has joined #ruby
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
Hijiri has joined #ruby
ghostpl has quit [Remote host closed the connection]
devdazed_ has quit [Quit: Computer has gone to sleep.]
mary5030 has joined #ruby
Linell_ has quit [Quit: leaving]
x1337807x has joined #ruby
wallerdev_ has joined #ruby
crueber has quit [Quit: Leaving.]
blackoperat has joined #ruby
Kricir has joined #ruby
thebastl has quit [Quit: Leaving...]
qba73 has quit [Ping timeout: 246 seconds]
wallerdev has quit [Ping timeout: 264 seconds]
wallerdev_ is now known as wallerdev
josephndenton has joined #ruby
echevemaster has joined #ruby
neoxquick has joined #ruby
mloveless has quit [Remote host closed the connection]
momomomomo has joined #ruby
DadoCe has joined #ruby
tyfighter has joined #ruby
pdoherty has quit [Remote host closed the connection]
josephndenton has quit [Ping timeout: 245 seconds]
fryguy9 has joined #ruby
chrishough has joined #ruby
dfinninger has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
kobain has joined #ruby
<havenwood> Moeh: So I was careless and mutated Arrays.
<shevy> you are so evil
qhartman has joined #ruby
<havenwood> shevy: I know, right!
adriancb has quit [Remote host closed the connection]
Pupeno has joined #ruby
<havenwood> Moeh: Fixed it and updated the gist. ;)
workmad3 has joined #ruby
fryguy9 has quit [Client Quit]
shime has joined #ruby
cphrmky has quit [Read error: Connection reset by peer]
<Diabolik> havenwood can you explain yield to me in retard terms?
platzhirsch has quit [Ping timeout: 255 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_djbkd has quit [Remote host closed the connection]
Rollabunna has joined #ruby
jottr has joined #ruby
jottr_ has quit [Read error: Connection reset by peer]
Aova has quit [Read error: Connection reset by peer]
<shevy> Diabolik with yield you access a block
totimkopf has joined #ruby
riotjone_ has joined #ruby
<Diabolik> shevy in relation to each?
ghostpl has joined #ruby
<shevy> Diabolik you have to understand what a block is first
<Moeh> havenwood: Thank you so much. That is really cool :)
<shevy> Foo.bar('arguments','to','the','ethod') { :the_block }
<shevy> so with yield you access :the_block Diabolik
_djbkd has joined #ruby
quimrstorres has quit [Remote host closed the connection]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Diabolik> ok
riotjones has quit [Ping timeout: 246 seconds]
x1337807x has joined #ruby
metadave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> Diabolik the best way is you should try to realize this
<shevy> by writing code
mary5030 has quit [Remote host closed the connection]
zacstewart has quit [Remote host closed the connection]
<shevy> Diabolik write a class Cat that has one method called meow() that will respond to a block you pass
<havenwood> Diabolik: Premise of the question disregarded, yield will call a block if one is given or raise a LocalJumpError if no block is given.
Kricir has quit [Remote host closed the connection]
m8 has quit [Quit: Sto andando via]
phoo1234567 has quit [Quit: Leaving]
ghr has joined #ruby
Kricir has joined #ruby
totimkopf has quit [Ping timeout: 265 seconds]
<havenwood> Diabolik: You can ask if a block was given: http://www.ruby-doc.org/core-2.2.0/Kernel.html#method-i-block_given-3F
Aova has joined #ruby
<Diabolik> thanks havenwood
revoohc has joined #ruby
CpuID2 has joined #ruby
CpuID2 has joined #ruby
platzhirsch has joined #ruby
ghostpl has quit [Remote host closed the connection]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
zacstewart has joined #ruby
<havenwood> Moeh: You're welcome.
<havenwood> Diabolik: np
waynerade has quit [Ping timeout: 250 seconds]
freerobby has quit [Quit: Leaving.]
fenzyl has quit [Quit: Leaving]
idealexit has quit [Remote host closed the connection]
fenzyl has joined #ruby
iceden has quit [Read error: Connection reset by peer]
baroquebobcat_ has joined #ruby
revoohc_ has joined #ruby
Kricir has quit [Ping timeout: 256 seconds]
CpuID2 has quit [Client Quit]
revoohc has quit [Ping timeout: 255 seconds]
revoohc_ is now known as revoohc
momomomomo has quit [Ping timeout: 245 seconds]
ghr has quit [Ping timeout: 250 seconds]
fenzyl is now known as fenzil
pu22l3r has joined #ruby
quimrstorres has joined #ruby
baroquebobcat has quit [Ping timeout: 255 seconds]
baroquebobcat_ is now known as baroquebobcat
CpuID2 has joined #ruby
allcentury has quit [Ping timeout: 245 seconds]
danmanstx has joined #ruby
enebo has quit [Quit: enebo]
AlexRussia has quit [Ping timeout: 245 seconds]
CpuID2 has quit [Client Quit]
ghostpl has joined #ruby
_maes_ has quit [Ping timeout: 264 seconds]
chrisja has quit [Quit: leaving]
danjordan has joined #ruby
IrishGringo has joined #ruby
pu22l3r has quit [Remote host closed the connection]
jgt has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
lifenoodles has joined #ruby
uptownhr has quit [Quit: uptownhr]
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
Pupeno has quit [Remote host closed the connection]
lostcuaz has joined #ruby
pu22l3r has joined #ruby
penzur has joined #ruby
davidhq has joined #ruby
dfoolz_ is now known as anonymoose
uptownhr has joined #ruby
sent1nel has quit [Ping timeout: 255 seconds]
sent1nel has joined #ruby
snath has quit [Ping timeout: 265 seconds]
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
jottr has joined #ruby
ghostpl has quit [Ping timeout: 256 seconds]
pdlug_ has joined #ruby
Pupeno has joined #ruby
iceden has joined #ruby
danjordan has quit [Quit: danjordan]
mloveless has joined #ruby
jgt has quit [Ping timeout: 244 seconds]
apeiros_ has quit [Ping timeout: 264 seconds]
AlSquire has quit [Quit: This computer has gone to sleep]
fenzil has quit [Ping timeout: 245 seconds]
pdlug_ has left #ruby [#ruby]
quimrstorres has quit [Remote host closed the connection]
blackmesa has joined #ruby
pu22l3r has quit [Remote host closed the connection]
jobewan has quit [Quit: Leaving]
dsfargeg has quit [Ping timeout: 272 seconds]
Takle has joined #ruby
Hijiri has quit [Quit: moving classes]
sambao21 has quit [Quit: Computer has gone to sleep.]
tunaCanBruh has quit [Ping timeout: 252 seconds]
swgillespie has joined #ruby
triple_b has joined #ruby
Bira has joined #ruby
LouisRoR has quit [Ping timeout: 245 seconds]
crueber has joined #ruby
baweaver is now known as Lemur
Takle has quit [Ping timeout: 244 seconds]
lele has quit [Ping timeout: 276 seconds]
mordocai has quit [Ping timeout: 252 seconds]
crueber has quit [Client Quit]
AlexRussia has joined #ruby
jack_rabbit has joined #ruby
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
juanpablo_ has quit [Quit: (null)]
lele has joined #ruby
Zai00 has quit [Quit: Zai00]
juanpablo_ has joined #ruby
Moeh has quit [Quit: Page closed]
iamjarvo has joined #ruby
ghr has joined #ruby
anonymoose is now known as anonym00se
sambao21 has joined #ruby