havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.1; 2.2.5; 2.1.9: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || logs @ http://irclog.whitequark.org/ruby/
devbug has quit [Quit: ZZZzzz…]
EdwardIII has quit [Ping timeout: 250 seconds]
yqt has quit [Ping timeout: 244 seconds]
mozzarella has joined #ruby
ljames has quit [Ping timeout: 260 seconds]
Puffball has quit [Read error: Connection reset by peer]
GodFather has quit [Ping timeout: 260 seconds]
joaumg has quit [Quit: WeeChat 0.4.2]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
joaumg has joined #ruby
EdwardIII has joined #ruby
GodFather has joined #ruby
chipotle has quit [Ping timeout: 252 seconds]
crdpink has joined #ruby
crdpink2 has quit [Ping timeout: 250 seconds]
tjohnson has quit [Quit: Connection closed for inactivity]
chipotle has joined #ruby
skolman has quit [Remote host closed the connection]
skolman has joined #ruby
rkazak has joined #ruby
Gasher has quit [Quit: Leaving]
Dimik has quit []
Puffball has joined #ruby
Yiota has joined #ruby
skolman has quit [Remote host closed the connection]
skolman has joined #ruby
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ixti has joined #ruby
r_rios has joined #ruby
jancel has quit [Remote host closed the connection]
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<r_rios> Is there a way to make the instances of a class callable? Kinda like overloading operator() in C++
marr has quit [Ping timeout: 276 seconds]
<Radar> r_rios: "callable"?
Blaguvest has quit []
Puffball has quit [Ping timeout: 252 seconds]
<r_rios> Radar: Something like: a = B.new; a(1, 2, 3)
<Radar> r_rios: what would that do?
<r_rios> Some method from B
eljimmy has joined #ruby
<r_rios> I don't know the exact terminology in Ruby, but you can make objects callable like functions in C++ by overloading operator(); I'd like to know if there's an equivalent of that in Ruby
mtkd has quit [Ping timeout: 276 seconds]
jhack has quit [Quit: jhack]
mtkd has joined #ruby
<baweaver> there's not
<baweaver> There are things like this you might see:
<baweaver> >> Integer('1')
<ruby[bot]> baweaver: # => 1 (https://eval.in/567646)
Nanuq has quit [Ping timeout: 260 seconds]
jancel has joined #ruby
<baweaver> but that's literally a method, distinguished by the parens
<baweaver> otherwise Ruby would try constant resolution on it
eljimador has quit [Ping timeout: 276 seconds]
stannard has joined #ruby
senayar has quit []
<r_rios> baweaver: OK, thanks for the info :)
<baweaver> well, rather by presence of a param as well since Ruby can go without parens
moeabdol has joined #ruby
whathappens has quit [Remote host closed the connection]
<baweaver> r_rios what you _could_ do though...
SVR4 has quit [Quit: jmIrc destroyed by the OS]
<baweaver> >> class B; def [](arg) send(arg) end end; B.new[:to_s]
<ruby[bot]> baweaver: # => "#<B:0x408959f0>" (https://eval.in/567650)
<baweaver> is overload the array accessor
catpoop is now known as mnrmnaugh
babblebre has quit [Quit: Connection closed for inactivity]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stannard has quit [Ping timeout: 250 seconds]
idefine has quit [Remote host closed the connection]
dn` has quit [Ping timeout: 240 seconds]
moeabdol has quit [Ping timeout: 252 seconds]
CloCkWeRX has joined #ruby
<r_rios> baweaver: Yeah, that's what I'm doing right now, but it kinda feels wrong, but I guess this will have to do
<r_rios> Thanks, anyway (y)
idefine has joined #ruby
<baweaver> I guess the other question is why?
ropeney has joined #ruby
ljames has joined #ruby
<r_rios> Why it feels wrong? Or why I want to do it?
<baweaver> why you'd want to do it
freerobby1 has quit [Quit: Leaving.]
<havenwood> just for fun:
<havenwood> >> class B; def initialize *args; @args = args end end; a = B.public_method(:new); a.(1, 2, 3)
Nanuq has joined #ruby
<ruby[bot]> havenwood: # => #<B:0x41cc58bc @args=[1, 2, 3]> (https://eval.in/567653)
* havenwood looks for an excuse to add #curry
raeoks has joined #ruby
<baweaver> havenwood stop that, you'll scare the children
<havenwood> >> class B; def initialize *args; @args = args end end; a = ->(*args) { B.new *args }; a.(1, 2, 3)
<ruby[bot]> havenwood: # => #<B:0x422797b8 @args=[1, 2, 3]> (https://eval.in/567654)
blaxter has quit [Read error: Connection reset by peer]
<r_rios> ...I think I'll stick to []
<havenwood> r_rios: :)
diegoviola has quit [Quit: WeeChat 1.5]
<al2o3-cr> havenwood: a.=== 1,2,3 is gooey
<havenwood> >> class B; def initialize a, b, c; @args = [a, b, c] end end; a = B.public_method(:new).curry(3); a.(1).(2).(3)
<ruby[bot]> havenwood: # => #<B:0x40c3d5a8 @args=[1, 2, 3]> (https://eval.in/567655)
<r_rios> And it doesn't even get all the way there: I'd have to call a.(1, 2, 3), not a(1, 2, 3)
jancel has quit [Remote host closed the connection]
<havenwood> r_rios: a dot away
<r_rios> Not that I don't appreciate the effort, though
<havenwood> r_rios: you could always use a method instead of a proc, i was just being silly
<r_rios> I know :P
<al2o3-cr> r_rios: python might be better for you
<havenwood> :)
<baweaver> r_rios so why do you want that?
<havenwood> al2o3-cr: :P
<baweaver> at least from a straight ruby perspective it doesn't make much sense why you'd need it
<al2o3-cr> ;)
neanderslob has quit [Disconnected by services]
neanderslob_ has joined #ruby
<r_rios> Anyway, baweaver: it's a class whose main purpose is to execute a command, so it's basically like a function; however, I have to register paths, local executables, etc. once in a while
<baweaver> might be time to look into lambdas instead
<r_rios> Most of the time, I'd call it like a function; but sometimes, I'd do a.register_foo('a', '/usr/bin')
neanderslob_ is now known as neanderslob
<r_rios> Then do a('a')
<r_rios> Etc.
<baweaver> either that or allow it to yield a block
<r_rios> What do you mean, exactly?
<baweaver> a.do_something { |yielded_value| calculations }
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<r_rios> Is that supposed to replace a.register_foo('a') or a('a')?
neanderslob has quit [Read error: Connection reset by peer]
drewo has quit [Ping timeout: 240 seconds]
<baweaver> not sure, don't know enough of the usecase.
neanderslob has joined #ruby
<baweaver> just mentioning that it's there
<baweaver> though you could just build up closures as well
<r_rios> I don't think it applies to my case, though. What I what is a function-like object that is capable of holding state
<r_rios> Or something like that
<baweaver> >> adder = -> x { -> y { x + y } }; add3 = adder[3]; (1..10).map(&add3)
<ruby[bot]> baweaver: # => [4, 5, 6, 7, 8, 9, 10, 11, 12, 13] (https://eval.in/567656)
<baweaver> closures
<baweaver> add3 remembers the state of x
<r_rios> Hm
GodFather has quit [Remote host closed the connection]
<r_rios> Can I change x afterwards?
<baweaver> make a new adder
Puffball has joined #ruby
<baweaver> once x is set, it's set, but you can make a new one
dn` has joined #ruby
<r_rios> Hm
<baweaver> https://leanpub.com/combinators - this will sufficiently trip you out on what you can get away with for Lambdas and the like
<r_rios> Then I think just overloading [] will be enough for me
Devalo has joined #ruby
<r_rios> For now, at least
GodFather has joined #ruby
<baweaver> read through some of that and do some poking around FP and closures.
<r_rios> I just learned that that's how Procs are called, so it's a bit more reassuring that what I'm doing is not too unusual
dopamean_ has joined #ruby
<r_rios> Thanks for the advice, though. Really appreciate it
eljimbo has joined #ruby
RegulationD has quit [Remote host closed the connection]
<baweaver> I'm not incredibly fond of it honestly, I think that's the key weakness of paren-free styling
<baweaver> Haskell and Scala did a better job of composition on that note.
<baweaver> especially taking advantage of _
Devalo has quit [Ping timeout: 250 seconds]
idefine has quit [Remote host closed the connection]
<arahael> baweaver: Not sure about Scala, but Haskell doesn't exactly offer an alternative, w.r.t. OO techniques.
patrick99e99 has quit [Quit: Page closed]
jaguarmagenta has joined #ruby
<baweaver> not saying it does
<arahael> Though, it's TypeClasses, Applicative and Monads are all pretty good.
<baweaver> just saying that composing functions is a lot cleaner in terms of syntax there
cdg has quit [Remote host closed the connection]
<baweaver> Scala is definitely OO capable
<arahael> Ah, fair enough.
cdg has joined #ruby
<baweaver> I just like that Haskell will let me: 1 `mod` 5 or fn . otherFn
<arahael> That's just infix notation, though.
<baweaver> function infix and composition
<arahael> But it's indeed neat.
<baweaver> the . is compose
justin_pdx has quit [Quit: justin_pdx]
<baweaver> If I didn't know any better though I'd say Ruby 3.0 is what happens when Ruby 2.x and Scala get together
amclain has quit [Quit: Leaving]
<arahael> Well, yes, though it's also shown in infix form there. :) Rather than, say, (.) fn otherFn
<baweaver> yeah, that's fair
d10n-work has quit [Quit: Connection closed for inactivity]
<baweaver> Ruby 3 is already rumored to be statically typed with a concurrency system that looks a lot like Akka
<arahael> It will be interesting to see how that works out.
<arahael> I still prefer python... But Ruby seems to be advancing much faster now.
juanfra has quit [Ping timeout: 276 seconds]
jaguarmagenta has quit [Ping timeout: 244 seconds]
skalfyfan has joined #ruby
<baweaver> Hopefully we don't pull a Python with our 2/3 jump :P
<arahael> Indeed. Mind you, the ruby 1.6, 1.8, and 2.0 changes were fairly disruptive. But nothing like the python 2/3 change.
<havenwood> 3x the performance of Ruby 2.0 along with higher level concurrency is a tasty looking carrot.
cdg has quit [Ping timeout: 252 seconds]
<arahael> Especially if that's combined with (optional?) static typing.
jenrzzz has quit [Ping timeout: 250 seconds]
stannard has joined #ruby
<baweaver> arahael read through how Scala does static typing. Heavy inference.
<baweaver> hence the Ruby stealing from Scala comment earlier.
yude has quit [Read error: Connection timed out]
<havenwood> Matz has mentioned he's reluctant to merge a JIT until Ruby 3 because he wants it to have that draw.
BrunoSaboia has joined #ruby
<arahael> Impressive. Is there a good writeup about these plans/rumours so that I can post it at work?
<baweaver> See that above link
<baweaver> Matz is a tease is what it amounts to though
<havenwood> arahael: Matz' last two RubyConf keynotes cover it it some detail.
<arahael> Thanks. I'll have to look for them.
yude has joined #ruby
<arahael> Blegh, a video!
<arahael> Anything with at least a transcription?
<arahael> Sorry, I have a thing against videos. (Mainly due to his deafness, to be honest)
<havenwood> arahael: yeah, i'm pretty sure matz releases the code for his slides
juanfra has joined #ruby
<arahael> Cool, I'll find them, then. :)
<havenwood> you can find the link in the video i bet :P
<havenwood> yeah, i'd like it if i knew
<havenwood> link*
<havenwood> link/like
<havenwood> both
jdawgaz has joined #ruby
<havenwood> turtle and a hare
<arahael> Doesn't mention static analysis though.
stannard has quit [Ping timeout: 265 seconds]
whathappens has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
idefine has joined #ruby
Puffball has quit [Ping timeout: 240 seconds]
Yzguy has joined #ruby
jancel has joined #ruby
`tim` has joined #ruby
dn` has quit [Ping timeout: 260 seconds]
whathappens has quit [Quit: Leaving...]
juanfra has quit [Ping timeout: 276 seconds]
chouhoulis has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
aeterne has quit [Read error: Connection reset by peer]
devbug has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
|ifei5g00d has joined #ruby
idefine has quit []
stardiviner has joined #ruby
idefine has joined #ruby
Puffball has joined #ruby
stannard has joined #ruby
dn` has joined #ruby
devbug has quit [Ping timeout: 260 seconds]
smathy is now known as smathy_afk
stannard has quit [Ping timeout: 260 seconds]
rbennacer has joined #ruby
<bazz_> what means `%Q{"str"}`
Coldblackice has joined #ruby
rbennacer has quit [Remote host closed the connection]
<bazz_> nevermind I figured it out
idefine has quit [Remote host closed the connection]
Puffball has quit [Ping timeout: 276 seconds]
Es0teric has quit [Quit: Nigga, im OUTIE 5000]
idefine has joined #ruby
stardiviner has quit [Ping timeout: 265 seconds]
rbennacer has joined #ruby
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
juanfra has joined #ruby
rbennacer has quit [Remote host closed the connection]
jancel has quit [Remote host closed the connection]
rbennacer has joined #ruby
jud has joined #ruby
saneax is now known as saneax_AFK
dikaio has joined #ruby
skolman has quit [Remote host closed the connection]
skolman_ has joined #ruby
zacstewart has quit [Ping timeout: 244 seconds]
Dimik has joined #ruby
electrostat has quit [Quit: uwotm8]
ur5us has joined #ruby
skolman_ has quit [Ping timeout: 276 seconds]
sp4rrow_ has joined #ruby
electrostat has joined #ruby
tatsuo has joined #ruby
djbkd has quit [Quit: My people need me...]
sp4rrow has quit [Ping timeout: 260 seconds]
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby
electrostat has quit [Client Quit]
skalfyfan has joined #ruby
Rikaikun has joined #ruby
shinnya has joined #ruby
jancel has joined #ruby
tatsuo has quit [Ping timeout: 260 seconds]
bronson has quit [Remote host closed the connection]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stardiviner has joined #ruby
Rikaikun has quit []
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arescorpio has joined #ruby
kkeuning has joined #ruby
jdawgaz has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
electrostat has joined #ruby
GodFather has quit [Ping timeout: 276 seconds]
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
jancel has quit [Remote host closed the connection]
dikaio has joined #ruby
maikowblue has quit [Quit: .]
tmtwd has joined #ruby
rbennacer has quit [Remote host closed the connection]
smathy_afk is now known as smathy
chipotle has quit [Ping timeout: 240 seconds]
moeabdol has joined #ruby
dudepare has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
gooodroot has joined #ruby
moeabdol has quit [Ping timeout: 250 seconds]
davedev24 has joined #ruby
davedev24 has quit [Remote host closed the connection]
Puffball has joined #ruby
davedev2_ has quit [Ping timeout: 276 seconds]
davedev24 has joined #ruby
goodroot has quit [Ping timeout: 260 seconds]
davedev24 has quit [Client Quit]
rbennacer has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
r_rios has quit [Ping timeout: 244 seconds]
AustinMatherne has quit [Remote host closed the connection]
AustinMatherne has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
|2701 has quit [Quit: Connection closed for inactivity]
banister has joined #ruby
Puffball has quit [Remote host closed the connection]
skalfyfan has joined #ruby
justin_pdx has joined #ruby
Nanuq has quit [Ping timeout: 260 seconds]
jancel has joined #ruby
cdg has joined #ruby
shinnya has quit [Ping timeout: 265 seconds]
saneax_AFK is now known as saneax
kgrz has quit [Ping timeout: 276 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stardiviner has quit [Ping timeout: 260 seconds]
TransMemroyEXII has joined #ruby
Nanuq has joined #ruby
stardiviner has joined #ruby
stannard has joined #ruby
jancel has quit [Remote host closed the connection]
kgrz has joined #ruby
greg__ has joined #ruby
nando293921 has quit [Quit: Lost terminal]
greg__ has quit [Client Quit]
electrostat has quit [Quit: uwotm8]
nando293921 has joined #ruby
sdwrage has joined #ruby
grenierm has joined #ruby
stannard has quit [Ping timeout: 276 seconds]
electrostat has joined #ruby
Devalo has joined #ruby
RegulationD has joined #ruby
electrostat has quit [Client Quit]
|ifei5g00d has quit [Read error: Connection reset by peer]
|ifei5g00d has joined #ruby
solocshaw has quit [Remote host closed the connection]
solocshaw1 has joined #ruby
electrostat has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jaguarmagenta has joined #ruby
Devalo has quit [Ping timeout: 250 seconds]
|ifei5good has joined #ruby
solocshaw1 is now known as solocshaw
RegulationD has quit [Ping timeout: 246 seconds]
jancel has joined #ruby
|ifei5g00d has quit [Ping timeout: 260 seconds]
dopamean_ has quit [Ping timeout: 276 seconds]
jaguarmagenta has quit [Ping timeout: 246 seconds]
solocshaw has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
solocshaw has joined #ruby
|ifei5g00d has joined #ruby
BMetash has joined #ruby
Nanuq has quit [Quit: leaving]
braincrash has quit [Quit: bye bye]
rkazak has joined #ruby
Nanuq has joined #ruby
bronson has joined #ruby
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
|ifei5good has quit [Ping timeout: 260 seconds]
solocshaw has quit [Read error: Connection reset by peer]
solocshaw has joined #ruby
sneakerhax has joined #ruby
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
grenierm has quit [Quit: grenierm]
braincrash has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
jancel has quit [Remote host closed the connection]
Puffball has joined #ruby
raeoks has quit [Quit: Textual IRC Client: www.textualapp.com]
brent__ has joined #ruby
grenierm has joined #ruby
moeabdol has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Puffball has quit [Remote host closed the connection]
gix has quit [Ping timeout: 246 seconds]
tatsuo has joined #ruby
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dikaio has joined #ruby
JoshGlzBrk has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
nisstyre has quit [Ping timeout: 246 seconds]
Caerus|Away is now known as Caerus
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rkazak has quit [Quit: Sleep.....ing....]
* Caerus greets #ruby
azor has joined #ruby
<Radar> hi Caerus
* azor winter is coming
gix has joined #ruby
<Caerus> hi hi
rbennacer has joined #ruby
ramfjord has joined #ruby
Yiota has joined #ruby
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<BMetash> exit
BMetash has quit [Quit: leaving]
diegoaguilar has quit [Remote host closed the connection]
BMetash has joined #ruby
dopamean_ has joined #ruby
tmtwd has quit [Ping timeout: 276 seconds]
moeabdol has quit [Quit: WeeChat 1.4]
TransMemroyEXII is now known as madper|eat
bruno- has quit [Ping timeout: 240 seconds]
Puffball has joined #ruby
djbkd has joined #ruby
Puffball has quit [Remote host closed the connection]
electrostat has quit [Quit: uwotm8]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
koooge has joined #ruby
jdawgaz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
solocshaw has quit [Ping timeout: 276 seconds]
dudepare has joined #ruby
azor has quit [Quit: WeeChat 1.4]
jancel has joined #ruby
jdawgaz has quit [Client Quit]
benlieb has joined #ruby
goooodroot has joined #ruby
jdawgaz has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rbennacer has quit [Remote host closed the connection]
banister has joined #ruby
nisstyre has joined #ruby
Puffball has joined #ruby
gooodroot has quit [Ping timeout: 260 seconds]
mukyu has joined #ruby
zacstewart has joined #ruby
stannard has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Puffball has quit [Remote host closed the connection]
mukyu has left #ruby [#ruby]
azor has joined #ruby
Yzguy has quit [Quit: Zzz...]
rkazak has joined #ruby
stannard has quit [Ping timeout: 246 seconds]
zacstewart has quit [Ping timeout: 246 seconds]
Fr0g has joined #ruby
<Fr0g> Hello Ruby wizards. I'm recently switching from perl to ruby and need a pointer: Find.find('/var/spool/*/new/)
<Fr0g> This doesnt work; how can I get that to work
michael_mbp has quit [Ping timeout: 244 seconds]
karmatr0_ has quit [Read error: Connection reset by peer]
karmatr0n has joined #ruby
znz_jp has quit [Remote host closed the connection]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<kgrz> Fr0g: Are you trying to find all the files under `/var/spool/` directory?
whippythellama has quit [Quit: WeeChat 1.5]
<kgrz> If that's so, checkout Dir.glob http://ruby-doc.org/core-2.2.0/Dir.html#method-c-glob
LoneHerm_ has joined #ruby
<Fr0g> yes kgrz
<Fr0g> for all users
znz_jp has joined #ruby
<Fr0g> err correction, I'm trying to find all emails for all users in /var/spool/mail/$USER/new/
<Fr0g> i dont want to generate a list of users and check them
<Fr0g> checking Dir.glob
kareeoleez has joined #ruby
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
michael_mbp has joined #ruby
BSaboia has quit [Quit: Leaving]
BrunoSaboia has quit [Quit: Leaving]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jancel has quit [Remote host closed the connection]
schpn has joined #ruby
schpn has quit [Max SendQ exceeded]
saneax is now known as saneax_AFK
<Fr0g> sweet that worked kgrz
<Fr0g> are you savvy with threads by chance?
BMetash has left #ruby [#ruby]
dling` has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Remote host closed the connection]
ngscheurich has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
schpn has joined #ruby
schpn has quit [Max SendQ exceeded]
juanfra has quit [Read error: Connection reset by peer]
cdg has quit [Remote host closed the connection]
juanfra has joined #ruby
<azor> What do you want to do with threads?
djd has joined #ruby
schpn has joined #ruby
schpn has quit [Max SendQ exceeded]
schpn has joined #ruby
tmtwd has joined #ruby
schpn has quit [Max SendQ exceeded]
Yzguy has joined #ruby
dikaio has joined #ruby
zast has quit [Remote host closed the connection]
sp4rrow_ has quit [Quit: The Internet needs a break and I need a cookie]
<azor> Fr0g: It's very easy to use threads in Ruby.
benlieb has quit [Quit: benlieb]
pawnbox has quit [Ping timeout: 250 seconds]
stannard has joined #ruby
d0lph1n98 has joined #ruby
wnd has quit [Excess Flood]
terminal_ has joined #ruby
wnd has joined #ruby
dling has joined #ruby
Yzguy has quit [Quit: Zzz...]
stannard has quit [Ping timeout: 240 seconds]
<arahael> email threads, on the other hand...
Yzguy has joined #ruby
Yzguy has quit [Max SendQ exceeded]
bobbycvi has quit [Quit: ...]
Puffball has joined #ruby
ngscheurich has quit [Ping timeout: 276 seconds]
stardiviner has quit [Ping timeout: 276 seconds]
fedexo has joined #ruby
Devalo has joined #ruby
zenlot6 has joined #ruby
tatsuo has quit [Remote host closed the connection]
Yzguy has joined #ruby
zenlot has quit [Ping timeout: 240 seconds]
orangey has quit [Ping timeout: 244 seconds]
arescorpio has quit [Quit: Leaving.]
Puffball has quit [Remote host closed the connection]
orangey has joined #ruby
saneax_AFK is now known as saneax
ascarter has joined #ruby
JoshGlzB_ has joined #ruby
JoshGlzBrk has quit [Read error: Connection reset by peer]
JoshGlzB_ has quit [Client Quit]
sneakerhax has quit [Read error: Connection reset by peer]
anes has joined #ruby
yude has quit [Read error: Connection timed out]
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dikaio has joined #ruby
yude has joined #ruby
Puffball has joined #ruby
yfeldblum has joined #ruby
justin_pdx has quit [Quit: justin_pdx]
stardiviner has joined #ruby
dikaio has quit [Client Quit]
jaguarmagenta has joined #ruby
Puffball has quit [Remote host closed the connection]
justin_pdx has joined #ruby
jaguarmagenta has quit [Ping timeout: 252 seconds]
dionysus69 has joined #ruby
d0lph1n98 has quit [Ping timeout: 252 seconds]
max1 has joined #ruby
justin_pdx has quit [Quit: justin_pdx]
bronson has joined #ruby
tatsuo has joined #ruby
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
tmtwd has quit [Ping timeout: 265 seconds]
duncannz has joined #ruby
tvw has joined #ruby
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Rickmasta has quit [Ping timeout: 276 seconds]
ascarter has quit [Quit: Textual IRC Client: www.textualapp.com]
nando293921 has quit [Quit: Lost terminal]
bronson has quit [Ping timeout: 252 seconds]
nando293921 has joined #ruby
duderonomy has joined #ruby
stannard has joined #ruby
Puffball has joined #ruby
madper|eat is now known as iMadper
justin_pdx has joined #ruby
Puffball has quit [Remote host closed the connection]
djd has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlieb has joined #ruby
kareeoleez has quit [Remote host closed the connection]
duncannz has quit [Ping timeout: 252 seconds]
last_staff has joined #ruby
bwlang has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
stannard has quit [Ping timeout: 260 seconds]
sauvin has joined #ruby
crankharder has quit [Ping timeout: 252 seconds]
justin_pdx has quit [Client Quit]
fedexo has quit [Read error: Connection reset by peer]
duncannz has joined #ruby
fedexo has joined #ruby
bazz_ has quit [Ping timeout: 265 seconds]
bazz_ has joined #ruby
ferr has joined #ruby
tmtwd has joined #ruby
duncannz has quit [Ping timeout: 252 seconds]
Puffball has joined #ruby
justin_pdx has joined #ruby
Fr0g has quit [Quit: leaving]
pawnbox has joined #ruby
lxsameer has quit [Ping timeout: 265 seconds]
Yzguy has quit [Quit: Zzz...]
Puffball has quit [Ping timeout: 244 seconds]
Rickmasta has joined #ruby
stryek has quit [Ping timeout: 246 seconds]
justin_pdx has quit [Quit: justin_pdx]
noService has joined #ruby
crankharder has joined #ruby
d0lph1n98 has joined #ruby
pawnbox has quit [Remote host closed the connection]
Guest2 has joined #ruby
helpa has quit [Remote host closed the connection]
stryek has joined #ruby
helpa has joined #ruby
saneax is now known as saneax_AFK
idefine has quit [Remote host closed the connection]
djbkd has quit [Quit: My people need me...]
noService has quit [Ping timeout: 246 seconds]
karmatr0n has quit [Ping timeout: 244 seconds]
max1 is now known as PickAndMIx
PickAndMIx is now known as PickAndMix
Puffball has joined #ruby
Nilium_ has joined #ruby
Dimik has quit []
Dimik has joined #ruby
dikaio has joined #ruby
Dimik has quit [Client Quit]
Dimik has joined #ruby
Nilium has quit [Ping timeout: 252 seconds]
Nilium_ is now known as Nilium
astrobunny has joined #ruby
Guest2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
futilegames has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
LoneHerm_ has joined #ruby
dikaio has joined #ruby
orangey has left #ruby ["Part"]
claw has quit [Ping timeout: 276 seconds]
futilegames has quit [Client Quit]
yfeldblum has quit [Remote host closed the connection]
claw has joined #ruby
moeabdol has joined #ruby
djbkd has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
djbkd has quit [Client Quit]
LoneHerm_ has quit [Ping timeout: 265 seconds]
pawnbox has joined #ruby
dopamean_ has quit [Ping timeout: 260 seconds]
astrobunny has quit [Remote host closed the connection]
tatsuo has quit [Remote host closed the connection]
futilegames has joined #ruby
Dimik has quit [Read error: Connection reset by peer]
fckyoufreenode has joined #ruby
ramfjord has joined #ruby
fckyoufreenode has quit [Client Quit]
Lomex has joined #ruby
Lomex has quit [Remote host closed the connection]
chipotle has quit [Quit: cheerio]
pawnbox has quit [Ping timeout: 240 seconds]
renatosilva has joined #ruby
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
renatosilva has left #ruby ["http://renatosilva.net - Renato Silva"]
ramfjord has quit [Read error: Connection reset by peer]
jancel has joined #ruby
yfeldblum has joined #ruby
ramfjord has joined #ruby
pawnbox has joined #ruby
nando293921 has quit [Ping timeout: 276 seconds]
Nilium has quit [Read error: Connection reset by peer]
Nilium has joined #ruby
bronson has joined #ruby
jancel has quit [Ping timeout: 276 seconds]
kareeoleez has joined #ruby
futilegames has quit [Quit: futilegames]
kareeoleez has quit [Remote host closed the connection]
kareeoleez has joined #ruby
yfeldblum has quit [Ping timeout: 276 seconds]
astrobunny has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
Guest2 has joined #ruby
Devalo has quit [Remote host closed the connection]
PickAndMix has quit [Ping timeout: 260 seconds]
Macaveli has joined #ruby
pawnbox has quit [Remote host closed the connection]
Guest2 has quit [Client Quit]
goldfax has joined #ruby
ur5us has quit [Remote host closed the connection]
dikaio has quit [Ping timeout: 244 seconds]
ddffg has joined #ruby
ayonkhan has joined #ruby
chouhoulis has quit [Remote host closed the connection]
Rickmasta has quit [Ping timeout: 276 seconds]
tmtwd has quit [Ping timeout: 276 seconds]
firstdayonthejob has joined #ruby
baweaver is now known as baweaver_away
pawnbox has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duncannz has joined #ruby
stannard has joined #ruby
hypercube32 has joined #ruby
tmtwd has joined #ruby
stannard has quit [Ping timeout: 260 seconds]
idefine has joined #ruby
akem has joined #ruby
baweaver_away is now known as baweaver
Rickmasta has joined #ruby
firstdayonthejob has quit [Ping timeout: 250 seconds]
Tichodroma has joined #ruby
idefine has quit [Ping timeout: 265 seconds]
dionysus69 has quit [Ping timeout: 276 seconds]
kkeuning has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yude has quit [Read error: Connection timed out]
ur5us has joined #ruby
goldfax has quit [Ping timeout: 250 seconds]
yude has joined #ruby
scepticulous has joined #ruby
bazz_ has quit [Quit: Leaving]
Dimik has joined #ruby
platzhirsch has joined #ruby
Slackman_ has joined #ruby
ur5us has quit [Remote host closed the connection]
johnbat26 has joined #ruby
benlieb has quit [Quit: benlieb]
Rickmasta has quit [Ping timeout: 260 seconds]
fedexo has quit [Ping timeout: 250 seconds]
madhatter has joined #ruby
pLaToOn has joined #ruby
platzhirsch has left #ruby [#ruby]
nobitanobi has joined #ruby
tildes has joined #ruby
<pLaToOn> moin
DoubleMalt has joined #ruby
noService has joined #ruby
jaguarmagenta has joined #ruby
blackgoat has quit [Quit: WeeChat 1.4]
stupidystupid has joined #ruby
stupidystupid has quit [Max SendQ exceeded]
codecop has joined #ruby
noServic1 has joined #ruby
noService has quit [Ping timeout: 276 seconds]
biberu has joined #ruby
stupidystupid has joined #ruby
nobitanobi has quit [Remote host closed the connection]
jaguarmagenta has quit [Ping timeout: 276 seconds]
blur3d has joined #ruby
dionysus69 has joined #ruby
toretore has joined #ruby
dudepare has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
Nahra has quit [Remote host closed the connection]
stannard has joined #ruby
Couch has joined #ruby
stupidystupid has quit [Quit: Textual IRC Client: www.textualapp.com]
stupidystupid has joined #ruby
drewo has joined #ruby
stupidystupid has quit [Client Quit]
anes has quit [Ping timeout: 250 seconds]
bwlang has joined #ruby
gooooodroot has joined #ruby
benlieb has joined #ruby
stannard has quit [Ping timeout: 260 seconds]
ta__ has joined #ruby
Arnvald has joined #ruby
AnoHito has quit [Ping timeout: 260 seconds]
AnoHito has joined #ruby
Slackman_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
goooodroot has quit [Ping timeout: 276 seconds]
hypercube32 has quit [Quit: Leaving]
ta_ has quit [Ping timeout: 260 seconds]
the_drow has joined #ruby
edwinvdgraaf has joined #ruby
aganov has joined #ruby
Echohn has joined #ruby
tmtwd has quit [Ping timeout: 244 seconds]
TomyWork has joined #ruby
emiltin has joined #ruby
Echohn has quit [Client Quit]
antgel has joined #ruby
andikr has joined #ruby
anisha has joined #ruby
Arnvald has quit [Remote host closed the connection]
<shevy> lol
CausaMortis has joined #ruby
<shevy> FileUtils.compare_file('somefile', 'somefile') #=> true
<shevy> FileUtils.compare_file('/bin/cp', '/bin/mv') #=> maybe false
<shevy> we got a maybe monad
Ch4rAss has joined #ruby
Arnvald has joined #ruby
postmodern has quit [Quit: Leaving]
terminal_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xall has joined #ruby
terminal_ has joined #ruby
terminal_ has quit [Client Quit]
CloCkWeRX has quit [Quit: Leaving.]
idefine has joined #ruby
hk238 has joined #ruby
mark_66 has joined #ruby
Ch4rAss has quit [Quit: leaving]
Ch4rAss has joined #ruby
idefine has quit [Ping timeout: 265 seconds]
pawnbox has quit [Remote host closed the connection]
brent__ has quit [Quit: Connection closed for inactivity]
terlar has joined #ruby
eljimbo has quit [Quit: This computer has gone to sleep]
skade has joined #ruby
ctp has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
aufi has joined #ruby
Rickmasta has joined #ruby
goldfax has joined #ruby
zacstewart has joined #ruby
jancel has joined #ruby
Ch4rAss has quit [Quit: leaving]
Ch4rAss has joined #ruby
stannard has joined #ruby
sdwrage has joined #ruby
Mia has quit [Read error: Connection reset by peer]
<Radar> I got asked today and I don't know the answer to this: when should we use block.call and when should we use yield?
Ch4rAss has quit [Client Quit]
Ch4rAss has joined #ruby
Ch4rAss has quit [Client Quit]
zacstewart has quit [Ping timeout: 240 seconds]
Ch4rAss has joined #ruby
jancel has quit [Ping timeout: 265 seconds]
stannard has quit [Ping timeout: 265 seconds]
ur5us has quit [Remote host closed the connection]
Ch4rAss has quit [Client Quit]
terlar has quit [Quit: WeeChat 1.5]
terlar has joined #ruby
Ch4rAss has joined #ruby
Ch4rAss has quit [Client Quit]
elaptics`away is now known as elaptics
lxsameer has joined #ruby
ayonkhan has quit [Quit: Textual IRC Client: www.textualapp.com]
Rickmasta has quit [Ping timeout: 265 seconds]
Ch4rAss has joined #ruby
Dimik has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
mikecmpbll has joined #ruby
bweston92 has quit [Quit: Leaving]
Ch4rAss has quit [Client Quit]
Ch4rAss has joined #ruby
bweston92 has joined #ruby
finnnnnnnnnnn has joined #ruby
<Caerus> .rbt
Ch4rAss has quit [Client Quit]
Caerus is now known as Caerus|Away
Ch4rAss has joined #ruby
blackmes1 has joined #ruby
nobitanobi has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
Caerus|Away is now known as Caerus
dh64 has quit [Read error: Connection reset by peer]
mesamoo has joined #ruby
nobitanobi has quit [Remote host closed the connection]
karapetyan has joined #ruby
ICantCook has quit [Ping timeout: 260 seconds]
polysics has joined #ruby
ICantCook has joined #ruby
ishe_ua has joined #ruby
<apeiros> Radar: yield/block_given? is faster and less gc intense
marr has joined #ruby
<apeiros> in case of immediate use that is. if it's nested, use &block to pass the block on
<apeiros> block.call itself I only ever use if I store the block and invoke it elsewhere
IbrahimA has joined #ruby
nobitanobi has joined #ruby
stannard has joined #ruby
<IbrahimA> was reading this article https://samsaffron.com/archive/2013/11/22/demystifying-the-ruby-gc , and i have a question about ruby's memory allocation model and GC
moeabdol has quit [Read error: Connection reset by peer]
goldfax has quit [Ping timeout: 240 seconds]
<IbrahimA> he says ruby allocates multiple "heaps" and each one is 16kb and if GC finds that it ran out of free heaps it will allocate 1.8x more
<IbrahimA> and the number of heaps is never decreased
siovene has joined #ruby
<IbrahimA> is that still true? is there no way to reclaim that heap space once we no longer need it, besides restarting the process?
moeabdol has joined #ruby
stannard has quit [Ping timeout: 240 seconds]
drbrain has quit [Ping timeout: 276 seconds]
Rickmasta has joined #ruby
<ropeney> IbrahimA, I believe thats still the case but a factor of 1.4
mrgrieve1 has joined #ruby
Macaveli_ has joined #ruby
drbrain has joined #ruby
<droptone> Does .find return just the first matching result?
Macaveli_ has quit [Client Quit]
<apeiros> IbrahimA: a modern OS will page out unused memory anyway and virtualize it
<apeiros> droptone: context
<apeiros> droptone: there's an infinite number of .find methods.
<IbrahimA> apeiros: what if swap is turned off or swap space is low?
lxsameer has quit [Ping timeout: 276 seconds]
rkazak has joined #ruby
Macaveli has quit [Ping timeout: 260 seconds]
<IbrahimA> it seems like for a long running process this could be a potential trouble spot
<IbrahimA> i've got a sidekiq worker running all sorts of jobs, and a new type of job im trying to add tends to use a lot of memory depending on what sorts of files users upload
<apeiros> IbrahimA: if I run "top" I see `VM: 962G vsize`
<IbrahimA> heh
<apeiros> my system doesn't have 962GB of ram, neither does it have that amount of disk space
<IbrahimA> actually yeah i've seen chrome does that
<apeiros> it's purely virtual
Snowy has joined #ruby
<IbrahimA> i wonder if swapoff prevents that from working though; i guess in theory swap and virtual memory are orthogonal
<apeiros> I don't know the precise details at how that works, but as I understood it, while the memory is not reclaimed by the OS, it won't occupy any real memory either.
<droptone> Ok, so in this context:
<droptone> contacts = [ { "name" => "Jim", "age" => 20 }, { "name" => "Bob", "age" => 25 }, { "name" => "Jim", "age" => 20 } ]; user = { "name" => "Jim", "age" => 20 }; testfind = contacts.find(|con| con["name"].downcase == user["name"].downcase);
<droptone> Just that line.
<IbrahimA> but in practice i imagine if you have swap off once you pass the amount of physical memory something's gotta give
<droptone> That final find statement would match two entries, the first and the last array index.
polysics has quit []
<ropeney> IbrahimA, it does
<apeiros> droptone: so the context would be Array#find
karapetyan has quit [Remote host closed the connection]
<droptone> right, ok
<apeiros> droptone: yes, Array#find will only find the first result
<droptone> ok
<IbrahimA> Ropeney: you mean, most likely the kernel will kill ruby due to low memory?
<ropeney> or it will kill something else
<IbrahimA> sure
<apeiros> droptone: which is btw. (surprise) also documented: "Returns the first for which block is not false"
Rickmasta has quit [Ping timeout: 246 seconds]
<IbrahimA> im thinking the best way to go for me here is to fork and do the work in a separate process to avoid increasing heap size of my sidekiq worker
Ishido has joined #ruby
<IbrahimA> i think upstart or something will restart sidekiq if it dies, but i'll lose whatever it was working on i believe
<droptone> *sigh*
<droptone> Right, but did you see how I wasn't clear on which .find of the infinite .find methods I would be researching?
<apeiros> droptone: contacts.class
<apeiros> droptone: and then `ri ThatClass#find`
<apeiros> not all that difficult
<droptone> Right, but I clearly didn't understand that I needed to know the class to understand the context.
<droptone> Hence me asking the question in the channel.
<ropeney> IbrahimA, probably not a good solution
<apeiros> droptone: great, so you learned something today
<droptone> lol
<droptone> wee!
Ch4rAss has quit [Quit: leaving]
mrgrieve1 has quit [Quit: leaving]
<ropeney> IbrahimA http://www.sitepoint.com/ruby-uses-memory/ claims it gives it back ***slowly***
<IbrahimA> yeah that's definitely not an ideal solution
<IbrahimA> ah funnily enough i was just reading that article
<IbrahimA> and it's newer than sam saffron's
brunto has joined #ruby
<ropeney> goodluck though, im off
Ch4rAss has joined #ruby
ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
Ch4rAss has quit [Client Quit]
<IbrahimA> thanks!
Arnvald has quit [Remote host closed the connection]
rkazak has quit [Quit: Sleep.....ing....]
Arnvald has joined #ruby
Ch4rAss has joined #ruby
Ch4rAss has quit [Client Quit]
aupadhye has joined #ruby
Echohn has joined #ruby
Ch4rAss has joined #ruby
Echohn has quit [Client Quit]
benlieb has quit [Quit: benlieb]
Madplatypus has joined #ruby
Ch4rAss has quit [Quit: leaving]
Ch4rAss has joined #ruby
terlar has quit [Ping timeout: 244 seconds]
lewis1711 has joined #ruby
<lewis1711> how does ruby "know" how to sort characters?
d0lph1n98 has quit [Ping timeout: 260 seconds]
<lewis1711> hmm it seems to do it by the result of "ord" with strings
last_staff has quit [Remote host closed the connection]
ur5us has joined #ruby
<lewis1711> though I am not quite sure what an "integer ordinal" is
<apeiros> lewis1711: it doesn't sort characters, it sorts bytes. ruby doesn't have collation support.
Jet4Fire has joined #ruby
ferr has quit [Ping timeout: 246 seconds]
pabs has quit [Ping timeout: 260 seconds]
Eiam has quit [Read error: Connection reset by peer]
stannard has joined #ruby
jaguarmagenta has joined #ruby
duncannz has quit [Remote host closed the connection]
Xiti has quit [Read error: Connection reset by peer]
stannard has quit [Ping timeout: 276 seconds]
Xiti has joined #ruby
hays has quit [Read error: Connection reset by peer]
hays has joined #ruby
aep has left #ruby ["Quit message"]
astrobunny has quit [Remote host closed the connection]
jaguarmagenta has quit [Ping timeout: 240 seconds]
astrobunny has joined #ruby
drewo has quit [Ping timeout: 252 seconds]
jgt has joined #ruby
pabs has joined #ruby
drptbl has joined #ruby
blackmes1 has quit [Ping timeout: 276 seconds]
CloCkWeRX has joined #ruby
ta__ has quit [Remote host closed the connection]
ta_ has joined #ruby
ur5us has quit [Remote host closed the connection]
elaptics is now known as elaptics`away
platzhirsch has joined #ruby
saneax_AFK is now known as saneax
stannard has joined #ruby
IbrahimA has left #ruby [#ruby]
emiltin has quit [Read error: Connection reset by peer]
jespada has joined #ruby
mdw has joined #ruby
framling has quit [Ping timeout: 260 seconds]
terlar has joined #ruby
stannard has quit [Ping timeout: 252 seconds]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
ensyde__ has joined #ruby
yfeldblum has joined #ruby
xall has quit [Ping timeout: 250 seconds]
DoubleMalt has quit [Read error: Connection reset by peer]
yude has quit [Read error: Connection timed out]
CloCkWeRX has quit [Ping timeout: 250 seconds]
workmad3 has joined #ruby
astrobunny has quit [Remote host closed the connection]
yude has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
d0lph1n98 has joined #ruby
cpup has quit [Ping timeout: 250 seconds]
lewis1711 has left #ruby ["Ex-Chat"]
CloCkWeRX has joined #ruby
johnDoe111 has joined #ruby
drewo has joined #ruby
DoubleMalt has joined #ruby
Coldblackice has quit [Ping timeout: 240 seconds]
idefine has joined #ruby
<Ox0dea> apeiros: How do I hit this? https://git.io/vrJcZ
<Ox0dea> And can you reckon on the rationale that might've gone into that?
cpup has joined #ruby
CloCkWeRX1 has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
Macaveli has joined #ruby
CloCkWeRX has quit [Ping timeout: 260 seconds]
<ujjain> is this valid? timeout_exception = 'Execution Timeout Error: This deployment has taken too long to run'
<ujjain> puts 'timeout_exception'
drewo has quit [Ping timeout: 260 seconds]
idefine has quit [Ping timeout: 265 seconds]
qwer has joined #ruby
<kgrz> are you trying to print out the contents of variable `timeout_exception`?
<ujjain> Yes
ur5us has joined #ruby
<kgrz> puts timeout_exception is the valid call. No single quotes around the variable name
<qwer> how to pass all arguments of the method to another method ?
<kgrz> qwer: can you provide an example of what you're trying to achieve? pastebin or gist
Gasher has joined #ruby
<hanmac> qwer: def meth1(*args); meth2(*args); end
<Caerus> interesting
<Ox0dea> qwer: Sounds like you might want to structure your thing so that you can just say `super`.
<qwer> actually i just want to modify existing initialize() of external class
<qwer> to modify one attribute when initialize() is finished
Puffball has quit [Ping timeout: 252 seconds]
<Caerus> so the only way to make args non mutable is to define them as Constants? or is it common practice that you you want args not to be mutated you code so that they don't get tampered with
<Caerus> *if you don't want*
<Ox0dea> qwer: Then you probably want Module#prepend... and `super`. :P
CoderPuppy has joined #ruby
<hanmac> qwer & Ox0dea i would probably do something like that: class X; prepend Module.new { def initialize(*); super; "your code there"; end }; end
<Ox0dea> hanmac: Thank you for letting me know you would do what I would do.
cpup has quit [Ping timeout: 265 seconds]
goodroot has joined #ruby
<hanmac> ;p in one of my systems i had a function that did the "prepend Module.new" inside a function so you can do: class X; overwrite { ... }; end
marens has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> qwer: https://eval.in/567829
RegulationD has joined #ruby
<Ox0dea> Don't actually do that #dup to "stack" prependitures, though.
<qwer> hanmac, Ox0dea, thank you
joconcepts has quit [Remote host closed the connection]
<Ox0dea> No worries.
<qwer> the recipe works
<Ox0dea> Ruby loves you and wants you to be happy.
joconcepts has joined #ruby
gooooodroot has quit [Ping timeout: 276 seconds]
<mikecmpbll> "Ruby MRI does not release memory back to the OS." http://stackoverflow.com/a/27663380/1520714 — is that the case?
<yorickpeterse> mikecmpbll: pretty much, it however does re-use memory
RegulationD has quit [Ping timeout: 240 seconds]
last_staff has joined #ruby
<mikecmpbll> hmpf. my delayed-jobs can use a heck of a lot of memory, some of the time
<yorickpeterse> basically it allocates chunks of memory for objects. Whenever the objects are GC'd the memory is IIRC not released back to the OS but kept around, instead being re-used for any future objects
<mikecmpbll> and i run workers in separate processes, so other processes aren't able to access that memory i guess.
* mikecmpbll upgrades his server :D
emiltin has joined #ruby
CausaMortis has quit [Ping timeout: 244 seconds]
<hanmac> qwer & Ox0dea: i would do it like that: https://eval.in/567830
<ujjain> https://gist.github.com/ujjain/29324d4e533e8025bebd34aa10770ba8 - Can I use ruby with the double quotes like this? log.error "#{timeout_exception}"
d0lph1n98 has quit [Ping timeout: 260 seconds]
<Ox0dea> ?try ujjain
<ruby[bot]> ujjain: Why don't you try it and see for yourself?
<ujjain> oh of course
<yorickpeterse> mikecmpbll: I think the only solution here is to fix your code so it doesn't use as much memory
<ujjain> thanks, works fine
blackmes1 has joined #ruby
<mikecmpbll> yorickpeterse : yeah. that would be a nice option. i'm not sure i can, though. it's rendering a PDF
noServic1 has quit [Quit: leaving]
niko has quit [Ping timeout: 615 seconds]
noService has joined #ruby
noService has quit [Changing host]
noService has joined #ruby
<mikecmpbll> oh actually, i can probably render directly to a file instead of memory :D
zerOnepal has joined #ruby
zerOnepal has left #ruby [#ruby]
bronson has joined #ruby
blaxter has joined #ruby
iMadper has quit [Remote host closed the connection]
terlar has quit [Ping timeout: 250 seconds]
<Caerus> >> def mymethod(x); x +=1 end; y=1; puts mymethod(y); puts y
<ruby[bot]> Caerus: # => 2 ...check link for more (https://eval.in/567844)
bronson has quit [Ping timeout: 252 seconds]
<Caerus> >> z = [1,2]; z.each { |x| x += 1; puts x} ; puts z
<ruby[bot]> Caerus: # => 2 ...check link for more (https://eval.in/567851)
b|ackwolf has joined #ruby
mdw has quit [Quit: cya! http://www.somerobots.com]
<Caerus> is there a way to mutate arguments passed to methods or blocks?
elaptics`away is now known as elaptics
* Caerus searches
<yorickpeterse> Caerus: what do you mean with mutate?
ravishankarjha has joined #ruby
<Caerus> pass by value
blaxter has quit [Read error: Connection reset by peer]
finnnnnnnnnnn_ has joined #ruby
finnnnnnnnnnn has quit [Ping timeout: 260 seconds]
finnnnnnnnnnn_ is now known as finnnnnnnnnnn
<ravishankarjha> hi
chouhoulis has joined #ruby
<yorickpeterse> Caerus: the values passed as arguments are always references
johnDoe111 has quit [Ping timeout: 244 seconds]
<yorickpeterse> You can't do pure pass by value in Ruby
<Ox0dea> Caerus: Just use a method that mutates the receiver.
blaxter has joined #ruby
<Caerus> >> def mymethod(x); x +=1 end; y=1; y = mymethod(y); puts y
<Ox0dea> >> a = %w[foo bar]; a.map! &:upcase; a
<ruby[bot]> Caerus: # => 2 ...check link for more (https://eval.in/567863)
<ruby[bot]> Ox0dea: # => ["FOO", "BAR"] (https://eval.in/567864)
<Caerus> that actually works lol
<Caerus> ty
chouhoulis has quit [Ping timeout: 260 seconds]
<yorickpeterse> Caerus: but probably not because of how you expect it to work
<yorickpeterse> x += 1 in "mymethod" does a re-assign of "x" local to the method's body
<yorickpeterse> the result of this is then returned
<yorickpeterse> so the outer "y" is not modified because of what mymethod re-assigns, but because of what it returns and due to the outer re-assign of "y"
<yorickpeterse> >> def mymethod(x); x +=1 end; y=1; mymethod(y); puts y
<ruby[bot]> yorickpeterse: # => 1 ...check link for more (https://eval.in/567874)
<Caerus> yeah the method didn't modify the actual argument.
johnmilton has quit [Remote host closed the connection]
<Caerus> I had read about bang methods I was just wondering if could make a module with some function that modified args
edavis_ has joined #ruby
edavis has quit [Read error: Connection reset by peer]
<Caerus> in a.map! I'm actually passing a an argument?
<Ox0dea> You can, if those args are mutable.
brunto has quit [Ping timeout: 260 seconds]
<Caerus> oohh
<Ox0dea> You're passing a block, which is pretty much an argument, but the interpreter itself disagrees.
<platzhirsch> huh
<Ox0dea> >> def foo arg1, &arg2; end; method(:foo).arity
<ruby[bot]> Ox0dea: # => 1 (https://eval.in/567878)
<platzhirsch> IRC in the terminal, that's... new
<Ox0dea> It... shouldn't be?
drewo has joined #ruby
<Caerus> bitchx?
ur5us has quit [Remote host closed the connection]
grenierm has quit [Quit: grenierm]
<iszak> I only use IRC in the terminal in irssi
soc42 has joined #ruby
millerti has joined #ruby
<Ox0dea> That's a weird way to spell WeeChat.
<Caerus> Ox0dea, interesting, so it's either arg1 or &arg2 the later being the mutable one?
<Ox0dea> Caerus: No, &arg2 is a block parameter.
drewo has quit [Ping timeout: 265 seconds]
<Ox0dea> Caerus: Array, Hash, and String are mutable.
<Caerus> oh, proc, I missed it
Azure has quit [Remote host closed the connection]
<Caerus> gotcha, thanks.
elaptics is now known as elaptics`away
<Ox0dea> Most anything but Fixnums and Symbols can be mutated in-place, but you have to get your hands dirty for certain things.
elaptics`away is now known as elaptics
<Caerus> getting dirty sometimes help with learning, I'm sure it's sane for ruby to behave like that but digging up sometimes makes learning more solid
<Caerus> provided that you don't go down the rabbit hole xD
<Ox0dea> Caerus: https://eval.in/567888
sepp2k has joined #ruby
<Ox0dea> (Check 'em.)
<Ox0dea> Anyway, those classes also have a #replace method, so you can swap them out for new instances entirely.
<Caerus> cool, I'm on it
jespada has quit [Ping timeout: 265 seconds]
stannard has joined #ruby
DanyC has joined #ruby
CausaMortis has joined #ruby
skade has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
stannard has quit [Ping timeout: 240 seconds]
Arnvald has quit []
|ifei5good has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
GodFather has joined #ruby
|ifei5g00d has quit [Ping timeout: 246 seconds]
Luna_Moonfang has quit [Remote host closed the connection]
Luna_Moonfang has joined #ruby
jaguarmagenta has joined #ruby
<apeiros> Ox0dea: will take a look after lunch break
d0lph1n98 has joined #ruby
umdstu has joined #ruby
jaguarmagenta has quit [Ping timeout: 265 seconds]
<apeiros> RB_ENCODING_GET looks fancy
<apeiros> errr, ENCODING_GET
brunto has joined #ruby
karapetyan has joined #ruby
inukshuk_ has joined #ruby
chipotle has joined #ruby
karapetyan has quit [Remote host closed the connection]
DanyC has quit []
rodfersou has joined #ruby
inukshuk_ has quit [Client Quit]
nobitanobi has quit [Remote host closed the connection]
* Caerus yawnz*
Yiota has joined #ruby
<Caerus> don't know how I substituted call-by-reference with its opposite call-by-value, that's so destructive
<Caerus> also my cue that I should stop reading and go to bed, see ya later #ruby thank you all for the help :)
blackjid has quit [Ping timeout: 250 seconds]
finnnnnnnnnnn has quit [Quit: finnnnnnnnnnn]
Caerus is now known as Caerus|Away
tpendragon has quit [Ping timeout: 250 seconds]
aguynamedben has quit [Ping timeout: 250 seconds]
emiltin has quit [Read error: Connection reset by peer]
b|ackwolf is now known as blackwolf
neanderslob has quit [Remote host closed the connection]
johnmilton has joined #ruby
deadnull_ has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
drewo has joined #ruby
Rickmasta has joined #ruby
stannard has joined #ruby
r_rios has joined #ruby
r_rios has joined #ruby
r_rios has quit [Changing host]
d0lph1n98 has quit [Ping timeout: 260 seconds]
drewo has quit [Ping timeout: 244 seconds]
hk238 has quit [Ping timeout: 276 seconds]
chouhoulis has joined #ruby
tatsuo has joined #ruby
jespada has joined #ruby
jespada has quit [Client Quit]
grs has joined #ruby
stannard has quit [Ping timeout: 250 seconds]
roshanavand has joined #ruby
blackmes1 has quit [Ping timeout: 265 seconds]
nadir has quit [Quit: Connection closed for inactivity]
nobitanobi has joined #ruby
idefine has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.3]
finnnnnnnnnnn has joined #ruby
idefine has quit [Ping timeout: 265 seconds]
<apeiros> Ox0dea: seems like you hit that when the two strings have a different encoding which is not considered to be comparable, and then it's the index of the encoding which decides <=> (which makes little to no sense to me - but that's how I read it)
<apeiros> can't test since rb_str_comparable is not accessible from ruby and I don't feel like writing native code just for this :)
ferr has joined #ruby
gnufied has joined #ruby
hanmac has quit [Ping timeout: 250 seconds]
tvw has quit [Remote host closed the connection]
blackmes1 has joined #ruby
zacstewart has joined #ruby
<Ox0dea> apeiros: Right, it was that <=> which struck me as perfectly nonsensical.
<Ox0dea> Feels very "PHP". :/
drptbl_ has joined #ruby
zacstewart has quit [Ping timeout: 250 seconds]
<apeiros> yeah. comparing encodings instead of strings in case of incompatible encodings makes no sense IMO
<apeiros> should just return nil
saneax is now known as saneax_AFK
<apeiros> like any other incomparables
noServic1 has joined #ruby
drptbl has quit [Ping timeout: 265 seconds]
Madmanden has joined #ruby
synthroid has joined #ruby
blackmes1 has quit [Ping timeout: 265 seconds]
Madmanden has quit [Remote host closed the connection]
platzhirsch has quit [Quit: WeeChat 1.4]
kareeoleez has quit [Remote host closed the connection]
RegulationD has joined #ruby
noService has quit [Ping timeout: 265 seconds]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
<shevy> we must use one true encoding
<apeiros> there is no one true encoding
<apeiros> utf-8, which you love so much, comes somewhat close to it, though.
<arahael> or just compare bytes!
<arahael> might not be lexographical order though.
hanmac has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
finnnnnnnnnnn has quit [Quit: finnnnnnnnnnn]
ldnunes has joined #ruby
mikecmpb_ has joined #ruby
Madmande_ has joined #ruby
xpt has left #ruby ["WeeChat 1.4"]
saneax_AFK is now known as saneax
Madmande_ has quit [Client Quit]
d0lph1n98 has joined #ruby
banister has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
<apeiros> Ox0dea, arahael: oooh, actually it *does* compare the bytes
GinoManWorks has joined #ruby
<apeiros> it only resorts to the encodings once they're the same
kdisneur has joined #ruby
terlar has joined #ruby
norc__ has joined #ruby
stannard has joined #ruby
bronson has joined #ruby
crameth has joined #ruby
Madmanden has joined #ruby
stannard has quit [Ping timeout: 252 seconds]
sdothum has joined #ruby
dionysus69 has joined #ruby
karapetyan has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
hays has quit [Read error: Connection reset by peer]
rbennacer has joined #ruby
chouhoulis has quit [Remote host closed the connection]
nerium has joined #ruby
nchambers has quit [Changing host]
nchambers has joined #ruby
drewo has joined #ruby
kkeuning has joined #ruby
zenspider has quit [Read error: Connection reset by peer]
sarbs has quit [Ping timeout: 244 seconds]
iamvery has quit [Ping timeout: 260 seconds]
wldcordeiro has quit [Ping timeout: 244 seconds]
kies has quit [Ping timeout: 276 seconds]
zenspider has joined #ruby
iamvery has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ifsp has quit [Ping timeout: 276 seconds]
sarbs has joined #ruby
karapetyan has quit [Ping timeout: 265 seconds]
pLaTo0n has joined #ruby
Symbiosisz has quit [Ping timeout: 276 seconds]
chouhoulis has joined #ruby
jancel has joined #ruby
hays has joined #ruby
drewo has quit [Ping timeout: 276 seconds]
andikr has quit [Remote host closed the connection]
pLaToOn has quit [Ping timeout: 276 seconds]
GodFather has quit [Ping timeout: 240 seconds]
aufi has quit [Ping timeout: 276 seconds]
zast has joined #ruby
giz|work has joined #ruby
|2701 has joined #ruby
jgt has quit [Ping timeout: 260 seconds]
terlar has quit [Quit: WeeChat 1.5]
terlar has joined #ruby
hays has quit [Read error: Connection reset by peer]
hays has joined #ruby
evidex has joined #ruby
stardiviner has quit [Ping timeout: 240 seconds]
brunto has quit [Ping timeout: 240 seconds]
tesuji_ has joined #ruby
araujo_ has joined #ruby
wldcordeiro has joined #ruby
dANOKELOFF has joined #ruby
stannard has joined #ruby
davedev24 has joined #ruby
Symbiosisz has joined #ruby
araujo has quit [Ping timeout: 265 seconds]
skalfyfan has joined #ruby
budhram has joined #ruby
stannard has quit [Ping timeout: 265 seconds]
rubyaw has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<budhram> hello folks, I have heard that it is not recommended to checkin Gemfile.lock while building Ruby Gem. I have searched for its reason but couldn't get the perfect answer. Could anybody help me to understand its valid point of not checkin Gemfile.lock?
<budhram> Thanks
jdawgaz has joined #ruby
last_staff has quit [Quit: last_staff]
tatsuo has quit [Remote host closed the connection]
blackmes1 has joined #ruby
saneax is now known as saneax_AFK
hays_ has joined #ruby
cpup has joined #ruby
hays has quit [Ping timeout: 246 seconds]
rbennacer has quit [Remote host closed the connection]
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stardiviner has joined #ruby
CoderPuppy has quit [Ping timeout: 244 seconds]
skalfyfan has joined #ruby
<apeiros> budhram: I don't use Gemfile's at all when building gems. but when I have a Gemfile, I think it makes the most sense to check-in the Gemfile.lock too
<budhram> apeiros, thanks for response. Would like to see what opinion other have
kareeoleez has joined #ruby
skalfyfan has quit [Client Quit]
saneax_AFK is now known as saneax
finnnnnnnnnnn has joined #ruby
ifsp has joined #ruby
<norc__> apeiros: I prefer to keep that to myself. Why should other people avoid the pain I had to go through, figuring out which Oracle dependencies are broken.
skalfyfan has joined #ruby
<apeiros> eeehehehe
<norc__> Knowing that they are suffering just as much as I was is what gets me through the day.
<apeiros> shared pain is half the pain?
<Ox0dea> Double.
<apeiros> Ox0dea: so you side with commander data on this? :)
<Ox0dea> apeiros: Pain is the greatest teacher, and we must always be ready to realize we're in Her classroom at all times.
blackmes1 has quit [Ping timeout: 260 seconds]
<Ox0dea> Er, I didn't mean to equate Pain with God there, but maybe that's a thing?
<norc__> apeiros: Plus if being an asshole dictator is fine for having led the most widely used C library, then surely that sort of behaviour can't be bad for me.
ramortegui has joined #ruby
brunto has joined #ruby
<Ox0dea> Assholes that GSD are absolved of all their sins.
<apeiros> GSD?
<norc__> get shit done
<Ox0dea> I learned that from Ayn Rand, so take it as gospel.
nobitanobi has quit [Remote host closed the connection]
<apeiros> I'd disagree. but I have no intention of arguing my point :)
<mikecmpb_> Penthos the greek god of mourning and lamentation :'(
<norc__> Ox0dea: You see, and I cannot get shit done with the current state of my surroundings.
<norc__> Do you know understand my pain?
<norc__> *now
<Ox0dea> norc__: Do you know how to start a fire?
Madmanden has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<norc__> Ox0dea: We had this crash course in the military once.
<Ox0dea> norc__: I swear I meant it in the figurative sense.
<norc__> ;)
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jaguarmagenta has joined #ruby
millerti has joined #ruby
minimalism has quit [Quit: minimalism]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
koooge has quit [Quit: Leaving...]
GodFather has joined #ruby
lxsameer has joined #ruby
roamingdog has joined #ruby
jaguarmagenta has quit [Ping timeout: 276 seconds]
Ouchy has joined #ruby
scepticulous has quit [Ping timeout: 265 seconds]
tvw has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blandflakes has joined #ruby
skalfyfan has joined #ruby
rubyaw has quit [Quit: Leaving...]
fmcgeough has joined #ruby
pawnbox has quit [Remote host closed the connection]
aguynamedben has joined #ruby
nadir has joined #ruby
aguynamedben has quit [K-Lined]
kkeuning has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
drewo has joined #ruby
tvw has quit []
edavis_ is now known as edavis
blur3d has quit [Quit: blur3d]
stannard has joined #ruby
duoi has quit [Ping timeout: 250 seconds]
jancel has quit [Remote host closed the connection]
drewo has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
malconis has joined #ruby
duoi has joined #ruby
jaruga___ has joined #ruby
aegis3121 has joined #ruby
malconis has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
jgt has joined #ruby
stannard has quit [Ping timeout: 276 seconds]
robh71 has joined #ruby
nobitanobi has joined #ruby
karmatr0n has joined #ruby
gooodroot has joined #ruby
malconis has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TvL2386 has quit [Remote host closed the connection]
goodroot has quit [Ping timeout: 244 seconds]
noServic1 has quit [Quit: leaving]
noService has joined #ruby
CloCkWeRX1 has quit [Ping timeout: 260 seconds]
weemsledeux has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Bish> can somebody tell me, how to automaticially break new pages with squid and prawn ( pdf creation )
<Bish> if was about to do 3000.times do text "text" end, it would break to a new page, when the end of the current is reached
<Bish> if i do that with squid graphs, it simply writes over it
<Bish> like in dead space
stannard has joined #ruby
anisha has quit [Quit: Leaving]
r_rios has quit [Quit: Konversation terminated!]
karapetyan has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
duoi has quit [Ping timeout: 276 seconds]
jdawgaz has joined #ruby
duoi has joined #ruby
kies has joined #ruby
karapetyan has quit [Ping timeout: 240 seconds]
pandaant has joined #ruby
zacstewart has joined #ruby
jobewan has joined #ruby
jancel has joined #ruby
idefine has joined #ruby
`tim` has joined #ruby
karapetyan has joined #ruby
malconis has joined #ruby
douglascorrea has joined #ruby
tpendragon has joined #ruby
aguynamedben has joined #ruby
platzhirsch has joined #ruby
tesuji_ has quit [Read error: Connection reset by peer]
blackjid has joined #ruby
karapetyan has quit [Ping timeout: 246 seconds]
idefine has quit [Ping timeout: 265 seconds]
blackjid has quit [K-Lined]
aguynamedben has quit [K-Lined]
tpendragon has quit [K-Lined]
anisha has joined #ruby
CloCkWeRX has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbennacer has joined #ruby
blackwolf has quit [Ping timeout: 260 seconds]
nobitano_ has joined #ruby
rbennace_ has joined #ruby
finnnnnnnnnnn_ has joined #ruby
nobitanobi has quit [Ping timeout: 250 seconds]
douglascorrea has quit []
finnnnnnnnnnn has quit [Ping timeout: 276 seconds]
djcp has joined #ruby
nobitanobi has joined #ruby
finnnnnnnnnnn_ is now known as finnnnnnnnnnn
rbennacer has quit [Ping timeout: 250 seconds]
nobitano_ has quit [Ping timeout: 244 seconds]
RegulationD has joined #ruby
ahai has joined #ruby
Mon_Ouie has joined #ruby
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
sarbs has quit [Ping timeout: 252 seconds]
blandflakes has joined #ruby
nobitano_ has joined #ruby
codecop has quit [Remote host closed the connection]
quakephil has joined #ruby
azor has quit [Ping timeout: 246 seconds]
<quakephil> is there a way to load a sqlite3 in ruby using a different schema name? essentially something like 'attach blah.sqlite3 as different_schema_name' but in database.yml?
akkmaxon has joined #ruby
<apeiros> sqlite3 has schemas? :D
nobitanobi has quit [Ping timeout: 244 seconds]
pLaTo0n has quit [Read error: Connection reset by peer]
<quakephil> if you issue a create table blah.mycooltable it will work, but you will have to attach db.sqlite3 as blah to be able to access it
<quakephil> so it looks like it has schemas on the command line
araujo_ has quit [Quit: Leaving]
<apeiros> I never knew
<apeiros> interesting
idle_task has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
idletask has quit [Ping timeout: 252 seconds]
rbennace_ has quit []
<quakephil> i'm using it to facilitate rspec tests, whereas production db is a mysql with actual schemas, so I need this functionality in database.yml but I donno how to tell ruby to access the blah schema (gem must be loading it with the default "main" schema and therefore can't find my tables)
millerti has joined #ruby
griffindy has joined #ruby
<apeiros> given that you're in a rails context, I'd ask over there. but I somewhat doubt that rails can do that via database.yml
<apeiros> if at all, you'll probably have to write an initializer
sarbs has joined #ruby
<apeiros> might even be necessary to do it on creation of each db connection
<quakephil> actually i'm not in rails, i'm in grape
rbennacer has joined #ruby
<quakephil> wonderful...
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
whippythellama has joined #ruby
sdwrage has joined #ruby
<apeiros> IMO you should use the same db for tests anyway
banister has joined #ruby
drewo has joined #ruby
<quakephil> we use codeship for qa and they can't tunnel to our databases
eljimbo has joined #ruby
<apeiros> ok, let me rephrase: same db software
<apeiros> doesn't need to be the very same server
PickAndMix has joined #ruby
blackwolf has joined #ruby
<quakephil> yeah you do have a point there
<quakephil> i just thought sqlite+ruby was mature enough by now
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> actually I'd even prefer not using the same server for envs != prod as prod. for the other envs, not sure I'd care.
mostlybadfly has joined #ruby
<quakephil> obviously our prod is separate server, vpc, etc
agent_white has joined #ruby
<agent_white> Mornin'
<quakephil> of course its a problem installing mysql on codeship all the same
Caerus|Away has quit [Ping timeout: 276 seconds]
sdwrage_ has joined #ruby
drewo has quit [Ping timeout: 250 seconds]
ctp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cdg has joined #ruby
<umdstu> anyone know why the git unignore operator (!) would not be working on os x? (2.3.2 apple git-55)
futilegames has joined #ruby
bronson has joined #ruby
sdwrage has quit [Ping timeout: 260 seconds]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has joined #ruby
emilkarl has joined #ruby
tatsuo has joined #ruby
kareeoleez has quit [Remote host closed the connection]
sdwrage_ has quit [Quit: Leaving]
bronson has quit [Ping timeout: 252 seconds]
blackjid has joined #ruby
aguynamedben has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
tpendragon has joined #ruby
futilegames has quit [Quit: futilegames]
duoi has quit [Ping timeout: 276 seconds]
senayar_ has joined #ruby
ravishankarjha has quit []
senayar has quit [Read error: Connection reset by peer]
smathy has joined #ruby
duoi has joined #ruby
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
davedev24 has quit []
[Butch] has joined #ruby
grenierm has joined #ruby
jdawgaz has joined #ruby
smathy is now known as smathy_afk
finnnnnnnnnnn has quit [Quit: finnnnnnnnnnn]
moeabdol has quit [Ping timeout: 250 seconds]
aegis3121 has quit [Ping timeout: 244 seconds]
siovene has quit [Quit: Connection closed for inactivity]
aegis3121 has joined #ruby
saneax is now known as saneax_AFK
saneax_AFK is now known as saneax
kobain has joined #ruby
zast has quit [Remote host closed the connection]
crameth has quit [Quit: crameth]
terminal_ has joined #ruby
norc__ has quit [Ping timeout: 250 seconds]
Caerus|Away has joined #ruby
`tim` has quit [Quit: Textual IRC Client: www.textualapp.com]
grenierm has quit [Quit: grenierm]
<TheBrayn> do you have an example?
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
grenierm has joined #ruby
chouhoulis has quit [Remote host closed the connection]
aufi has joined #ruby
banister has joined #ruby
noService has quit [Ping timeout: 246 seconds]
finnnnnnnnnnn has joined #ruby
matp has quit [Ping timeout: 240 seconds]
Devalo has joined #ruby
dopamean_ has joined #ruby
noService has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
anisha has quit [Quit: Leaving]
karapetyan has joined #ruby
<quakephil> So I have a calculated column in my ar model (like this: http://stackoverflow.com/questions/1982778/concat-two-fields-activerecord ) but I'm stumped how to select it.. I tried Myarclass.select('usual,fields', :calculated_field).other().stuff() ... but that just gave me 'calculated_field' as calculated_field instead of what I have in my def.... am I missing something obvious here?
Mia has joined #ruby
duderonomy has quit [Ping timeout: 240 seconds]
SilverKey has joined #ruby
ahai has quit [Quit: WeeChat 1.4]
duderonomy has joined #ruby
<quakephil> If I do select('*') its not there either...
freerobby has quit [Client Quit]
<quakephil> fuck it, I'll just have the front end do it
inukshuk_ has joined #ruby
noService has quit [Ping timeout: 276 seconds]
polishdub has joined #ruby
inukshuk_ has quit [Client Quit]
matp has joined #ruby
Kim^J has left #ruby [#ruby]
karapetyan has quit [Ping timeout: 260 seconds]
<havenwood> quakephil: Show the real code? Might be nice to do it in Ruby! :)
perturbation has quit [Quit: Leaving]
freerobby has joined #ruby
<havenwood> quakephil: Just for future reference, there's a #rubyonrails channel specifically for Rails stuff.
dionysus69 has quit [Ping timeout: 246 seconds]
skalfyfan has joined #ruby
malconis has joined #ruby
<apeiros> and AR is considered rails stuff, even when used outside of it, like e.g. in grape ;-)
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> Active/Action/Turbo/Adequate -> Rails
rbennacer has quit [Remote host closed the connection]
trinaldi has quit [Quit: WeeChat 1.5-rc1]
evidex has quit [Ping timeout: 260 seconds]
akkmaxon has quit [Quit: Konversation terminated!]
rbennacer has joined #ruby
hobodave has joined #ruby
rikai has quit [Quit: No Ping reply in 180 seconds.]
evidex has joined #ruby
<Ouchy> Does Ruby install on windows with WAMP well, without rails?
bruno- has joined #ruby
<quakephil> havenwood: I'm not using rails, I'm using grape, does that chan still apply?
<quakephil> apeiros: ok gotcha, I'll check there if I'm still stuck...
<havenwood> quakephil: If it's ActiveRecord that's where the most people using AR can be found.
<havenwood> quakephil: There are plenty here as well but it's a component of Rails.
<havenwood> Sequel!
grenierm has quit [Quit: grenierm]
finisherr has left #ruby [#ruby]
Devalo has quit [Remote host closed the connection]
jaguarmagenta has joined #ruby
rbennacer has quit [Ping timeout: 244 seconds]
grenierm has joined #ruby
drewo has joined #ruby
tubbo has quit [Ping timeout: 276 seconds]
Ch4rAss has quit [Ping timeout: 265 seconds]
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
akkmaxon has joined #ruby
saneax is now known as saneax_AFK
Ch4rAss has joined #ruby
dionysus69 has joined #ruby
blandflakes has joined #ruby
jaguarmagenta has quit [Ping timeout: 276 seconds]
drewo has quit [Ping timeout: 260 seconds]
tubbo has joined #ruby
chouhoulis has joined #ruby
qwer has left #ruby [#ruby]
rikai has joined #ruby
blackmes1 has joined #ruby
aganov has quit [Remote host closed the connection]
skalfyfan has joined #ruby
chopin has joined #ruby
jgt has quit [Ping timeout: 250 seconds]
ferr has quit [Ping timeout: 252 seconds]
blackmes1 has quit [Ping timeout: 276 seconds]
rkazak has joined #ruby
idle_task is now known as idletask
joneshf-laptop has joined #ruby
jancel has quit [Remote host closed the connection]
bruno- has quit [Read error: Connection reset by peer]
tvw has joined #ruby
bruno- has joined #ruby
aufi has quit [Ping timeout: 250 seconds]
codecop has joined #ruby
roshanavand has quit [Ping timeout: 250 seconds]
Madmanden has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
failshell has joined #ruby
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
robh71 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
symm- has joined #ruby
skalfyfan has joined #ruby
Amnez777 has quit [Ping timeout: 246 seconds]
hk238 has joined #ruby
dhollinger has joined #ruby
Alina-malina has quit [Ping timeout: 260 seconds]
openstruct has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
jds has joined #ruby
ddffg has quit [Quit: Leaving]
ramortegui has quit [Read error: Connection reset by peer]
ramortegui has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
wldcordeiro has quit [Ping timeout: 246 seconds]
rodfersou is now known as rodfersou|lunch
tvw has quit [Ping timeout: 265 seconds]
roamingdog has quit []
Yeomra has joined #ruby
jhack has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramortegui has left #ruby [#ruby]
<kgrz> havenwood: that Active/Action... should be a IRC msg shorthand :D
<kgrz> (I don't know what they are called)
tvw has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
jgt has joined #ruby
bruno- has joined #ruby
ekinmur has joined #ruby
skalfyfan has joined #ruby
Yiota has joined #ruby
rippa has joined #ruby
blackmes1 has joined #ruby
nobitanobi has joined #ruby
GnuYawk has joined #ruby
GnuYawk has quit [Changing host]
GnuYawk has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
deadnull_ is now known as _deadnull
jancel has joined #ruby
chouhoulis has quit [Remote host closed the connection]
nobitano_ has quit [Ping timeout: 252 seconds]
edwinvdgraaf has quit [Ping timeout: 252 seconds]
Gasher has quit [Ping timeout: 276 seconds]
RegulationD has joined #ruby
GodFather has quit [Ping timeout: 276 seconds]
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
terlar has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
giz|work has quit [Ping timeout: 260 seconds]
ferr has joined #ruby
skalfyfan has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
platzhirsch has quit [Quit: WeeChat 1.4]
blackmes1 has quit [Ping timeout: 252 seconds]
mtkd has quit [Ping timeout: 276 seconds]
xxneolithicxx has joined #ruby
moeabdol has joined #ruby
tvw has quit [Ping timeout: 244 seconds]
mtkd has joined #ruby
blandflakes is now known as mid-afternoonwal
mid-afternoonwal is now known as middaywalker
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
whathappens has joined #ruby
davedev24 has joined #ruby
budhram has quit [Quit: Leaving]
moeabdol has quit [Ping timeout: 250 seconds]
idefine has joined #ruby
antgel has quit [Ping timeout: 246 seconds]
idefine has quit [Remote host closed the connection]
Tichodroma has quit [Ping timeout: 260 seconds]
xall has joined #ruby
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skalfyfan has joined #ruby
drewo has joined #ruby
rkazak has quit [Ping timeout: 276 seconds]
robh71 has joined #ruby
skade has joined #ruby
diegoaguilar has joined #ruby
akkmaxon has quit [Remote host closed the connection]
kgrz has quit [Ping timeout: 276 seconds]
drewo has quit [Ping timeout: 260 seconds]
akkmaxon has joined #ruby
idefine has quit [Remote host closed the connection]
pietr0 has joined #ruby
smathy_afk is now known as smathy
amclain has joined #ruby
LastWhisper____ has joined #ruby
rbennacer has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
bruno- has quit [Read error: Connection reset by peer]
idefine has joined #ruby
kareeoleez has joined #ruby
dANOKELOFF has quit [Quit: Ex-Chat]
TomyWork has quit [Ping timeout: 244 seconds]
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
brunto has quit [Ping timeout: 260 seconds]
Couch has quit [Ping timeout: 246 seconds]
akkmaxon has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
akkmaxon has joined #ruby
karapety_ has joined #ruby
CausaMortis has quit [Read error: Connection reset by peer]
failshell has quit []
bruno- has joined #ruby
skolman_ has joined #ruby
symm- has quit [Ping timeout: 276 seconds]
karapetyan has quit [Ping timeout: 276 seconds]
skalfyfan has joined #ruby
stannard has quit [Remote host closed the connection]
karapety_ has quit [Remote host closed the connection]
benlieb has joined #ruby
stannard has joined #ruby
skalfyfan has quit [Client Quit]
skalfyfan has joined #ruby
RegulationD has quit [Ping timeout: 252 seconds]
smathy is now known as smathy_afk
grs has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
danostrowski has joined #ruby
nando293921 has joined #ruby
noService has joined #ruby
nrd_pxs has joined #ruby
kareeoleez has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
jhack has quit [Ping timeout: 246 seconds]
Snowy has quit [Quit: ragequit]
smathy_afk is now known as smathy
__swanson has joined #ruby
millerti has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
senayar_ has quit []
chouhoulis has joined #ruby
<__swanson> I'm trying to upgrade a project from ruby 2.2 -> 2.3.1 and seeing strange behavior with the CSV library in 2.3.1. Am I missing something obvious? Checked bug tracker and release notes and didn't see anything about CSV issues: https://gist.github.com/swanson/7d551c3e479ab46871bac1bf7070048c
<__swanson> CSV loads fine in 2.2, but gives undefined constant in 2.3.1
<__swanson> rubies installed via rbenv on osx
rubyaw has joined #ruby
kgrz has joined #ruby
<kgrz> 
troulouliou_div2 has joined #ruby
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
ngscheurich has joined #ruby
kareeoleez has joined #ruby
<havenwood> >> require 'csv'; CSV
<ruby[bot]> havenwood: # => CSV (https://eval.in/568167)
Asher has quit [Quit: Leaving.]
whathappens has quit [Remote host closed the connection]
<hanmac> __swanson: maybe something else does prevent the csv from loading? what does "require 'csv'; $LOADED_FEATURES.last" return?
<havenwood> __swanson: Can you require anything else in the stdlib? If we keep telling people to tweet @DHH for rbenv support will they deprecate in favor of chruby? :P
whathappens has joined #ruby
<__swanson> irb(main):002:0> require 'csv'; $LOADED_FEATURES.last => "/Users/matt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/csv.rb"
<havenwood> __swanson: What does just `require 'csv'` return? Just?: true
<havenwood> (Or `false` once you've already run it.)
<__swanson> it returns true on first call, false on subsequent calls
soc42 has quit [Remote host closed the connection]
<havenwood> __swanson: So the require is happening. You're $LOADED_FEATURES show it there.
<havenwood> Your*
benlieb has joined #ruby
benlieb has quit [Client Quit]
akkmaxon has quit [Remote host closed the connection]
<havenwood> >> 'CSV'.bytes
<ruby[bot]> havenwood: # => [67, 83, 86] (https://eval.in/568168)
<__swanson> I tried to require base64 (random othe stdlib) and it works fine
<havenwood> __swanson: Is your "CSV" a real C, S and V?
<hanmac> __swanson: ĥm can you checkup if that csv.rb does has this CSV class?
<__swanson> 'CSV'.bytes => [67, 83, 86] -- appears to be
kareeoleez has quit [Ping timeout: 240 seconds]
grs has joined #ruby
<__swanson> opening csv.rb in a text editor looks like it is binary? does that seem right?
rubyaw has quit [Quit: Leaving...]
<havenwood> __swanson: No.
<hanmac> oO no it shouldnt be oO
<__swanson> perhaps I should reinstall
mikecmpbll has joined #ruby
skolman_ has quit [Read error: Connection reset by peer]
skolman_ has joined #ruby
<havenwood> __swanson: If rbenv's ruby-build keep borking consider using ruby-install instead. It can install for rbenv.
akkmaxon has joined #ruby
<__swanson> thanks, I will keep that in mind
<havenwood> __swanson: But yeah, that's messed up.
<havenwood> File.read($LOADED_FEATURES.last)[/class CSV/] #=> "class CSV"
_deadnull is now known as deadnull_
skolman_ has quit [Read error: Connection reset by peer]
hobodave_ has joined #ruby
evidex has quit [Remote host closed the connection]
skolman has joined #ruby
shinnya has joined #ruby
hobodave_ has quit [Read error: Connection reset by peer]
hobodave_ has joined #ruby
<__swanson> I don't suppose there is a diagnostic or checksum to verify the install, is there?
mikecmpb_ has quit [Ping timeout: 240 seconds]
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
Asher has joined #ruby
Asher has quit [Client Quit]
mikecmpbll has quit [Ping timeout: 246 seconds]
<havenwood> __swanson: Well, ruby-install will check MD5, SHA1, SHA256 and SHA512 checksums of the Rubies it downloads. You can make test and such to confirm that things check out.
azor has joined #ruby
hobodave has quit [Ping timeout: 265 seconds]
Eiam has joined #ruby
akkmaxon has quit [Remote host closed the connection]
<havenwood> __swanson: make test-all TESTS=-v
Yiota has joined #ruby
<__swanson> from which directory?
QORRiE has joined #ruby
<havenwood> __swanson: src root dir
<__swanson> thanks, reinstalling almost finished -- will try it out
<havenwood> __swanson: make test-all TESTS=csv/test_csv.rb
finnnnnnnnnnn_ has joined #ruby
Zarthus has quit [Quit: I can't go to hell. I'm all out of vacation days.]
finnnnnnnnnnn has quit [Ping timeout: 260 seconds]
finnnnnnnnnnn_ is now known as finnnnnnnnnnn
<__swanson> reinstall + running the irb snippet above is working now
babblebre has joined #ruby
<__swanson> appreciate the help debugging, thanks!
DanyC has joined #ruby
<havenwood> __swanson: de nada
RegulationD has quit [Remote host closed the connection]
whathappens has quit [Remote host closed the connection]
sarbs has quit [Max SendQ exceeded]
Zarthus has joined #ruby
sarbs has joined #ruby
akkmaxon has joined #ruby
The_Phoenix has joined #ruby
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
ctp has joined #ruby
Zarthus has quit [Client Quit]
kgrz has quit [Ping timeout: 265 seconds]
akkmaxon has quit [Remote host closed the connection]
__swanson has quit [Ping timeout: 250 seconds]
blackmes1 has joined #ruby
Zarthus has joined #ruby
|2701 has quit [Quit: Connection closed for inactivity]
Asher has joined #ruby
akkmaxon has joined #ruby
Dimik has joined #ruby
Guest2 has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jaruga___ has quit [Quit: jaruga___]
lxsameer has quit [Ping timeout: 276 seconds]
goooodroot has joined #ruby
middaywalker has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
blackmes1 has quit [Ping timeout: 246 seconds]
middaywalker has joined #ruby
Cohedrin has joined #ruby
millerti has joined #ruby
moeabdol has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
drewo has joined #ruby
DanyC has quit []
gooodroot has quit [Ping timeout: 250 seconds]
d0lph1n98 has quit [Ping timeout: 250 seconds]
jancel has quit [Remote host closed the connection]
ctp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
whathappens has joined #ruby
ctp has joined #ruby
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmes1 has joined #ruby
whathapp_ has joined #ruby
deadnull_ has quit [Quit: Bye]
A124 has quit [Quit: '']
bruno- has joined #ruby
mark_66 has quit [Remote host closed the connection]
whathappens has quit [Ping timeout: 250 seconds]
SilverKey has quit [Quit: Halted.]
laska has joined #ruby
finnnnnnnnnnn has quit [Quit: finnnnnnnnnnn]
freerobby has quit [Quit: Leaving.]
laska has quit [Client Quit]
rodfersou|lunch is now known as rodfersou|afk
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jancel has joined #ruby
kareeoleez has joined #ruby
jaguarmagenta has joined #ruby
dhollinger has quit [Ping timeout: 246 seconds]
ishe_ua has quit [Remote host closed the connection]
alexherbo2 has joined #ruby
akkmaxon has quit [Quit: Konversation terminated!]
edwinvdgraaf has joined #ruby
A124 has joined #ruby
pandaant has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
giz|work has joined #ruby
cdg has quit []
bruno- has quit [Read error: Connection reset by peer]
jgt has quit [Ping timeout: 250 seconds]
cdg has joined #ruby
kareeoleez has quit [Ping timeout: 276 seconds]
jaguarmagenta has quit [Ping timeout: 246 seconds]
Guest2 has quit [Quit: Textual IRC Client: www.textualapp.com]
justin_pdx has joined #ruby
whathapp_ has quit [Remote host closed the connection]
idefine has quit [Ping timeout: 276 seconds]
pglombardo has joined #ruby
whathappens has joined #ruby
VeryBewitching has joined #ruby
skalfyfan has joined #ruby
ctp has quit [Quit: Textual IRC Client: www.textualapp.com]
bruno- has joined #ruby
idefine_ has joined #ruby
blackmes1 has quit [Ping timeout: 260 seconds]
idefine_ has quit [Remote host closed the connection]
benlieb has joined #ruby
idefine has joined #ruby
Ch4rAss has quit [Ping timeout: 250 seconds]
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
<CustosLimen> I want to use a tuple like thing in a Range()
<CustosLimen> and I'm not sure how
nobitano_ has joined #ruby
Ch4rAss has joined #ruby
jhack has joined #ruby
<CustosLimen> arrays cannot be compared with '<=>'
skalfyfan has quit [Ping timeout: 260 seconds]
skade has quit [Quit: Computer has gone to sleep.]
whathappens has quit [Remote host closed the connection]
last_staff has joined #ruby
Lomex has joined #ruby
whathappens has joined #ruby
nobitanobi has quit [Ping timeout: 265 seconds]
<Ox0dea> CustosLimen: Sure they can, but they can't be iterated.
<Ox0dea> Which makes perfect sense, really; what's the next Array after [1,2,3]?
skade has joined #ruby
dhollinger has joined #ruby
kareeoleez has joined #ruby
chouhoulis has quit [Remote host closed the connection]
stannard has quit [Remote host closed the connection]
davedev2_ has joined #ruby
davedev24 has quit [Ping timeout: 276 seconds]
Madmanden has quit [Ping timeout: 260 seconds]
robh71 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kareeoleez has quit [Ping timeout: 250 seconds]
minot has joined #ruby
minot has quit [Max SendQ exceeded]
<Ox0dea> CustosLimen: To elaborate, a thing needs #<=> *and* #succ in order to participate in Ranges, and Array doesn't (can't?) have the latter.
<CustosLimen> yeah ok, I'm doing something else wrong
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<CustosLimen> trying to figure out what
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
freerobby has joined #ruby
stannard has joined #ruby
stannard has quit [Remote host closed the connection]
Devalo has joined #ruby
stannard has joined #ruby
roger_rabbit has quit [Ping timeout: 246 seconds]
<CustosLimen> is there like some concept in ruby for a stirng smalle than any other string
<CustosLimen> that will always compare less than any string ?
<CustosLimen> thanks apeiros
Ch4rAss has quit [Ping timeout: 250 seconds]
Devalo has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
aupadhye has quit [Quit: Leaving]
<Ox0dea> >> def (min_string = '').<=> other; -1; end; min_string < '' # CustosLimen
<ruby[bot]> Ox0dea: # => true (https://eval.in/568212)
SilverKey has joined #ruby
drewo has quit [Quit: WeeChat 1.4]
drewo has joined #ruby
<Ox0dea> In case you need it to actually behave like a String in some other context.
ramfjord has joined #ruby
skade has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has quit [Client Quit]
<apeiros> Ox0dea: do you happen to have an idea why I added #to_str to my Sorting::Smaller?
lxsameer has joined #ruby
stannard has quit [Remote host closed the connection]
kareeoleez has joined #ruby
kgrz has joined #ruby
drewo has quit [Quit: WeeChat 1.4]
<CustosLimen> >> Range.new( [ nil, nil ], [ "", "" ] )
<ruby[bot]> CustosLimen: # => bad value for range (ArgumentError) ...check link for more (https://eval.in/568213)
RegulationD has joined #ruby
<Ox0dea> CustosLimen: Array does not have #succ.
<Ox0dea> apeiros: Interpolation is the only thing that comes to mind, but it's pretty irrelevant. :/
<CustosLimen> >> Range.new( [ "a", "a" ], [ "b", "b" ] )
<ruby[bot]> CustosLimen: # => ["a", "a"]..["b", "b"] (https://eval.in/568214)
aegis3121 has quit [Ping timeout: 276 seconds]
<apeiros> I bet it was rails related :-/
<Ox0dea> Ah, or that.
kareeoleez has quit [Remote host closed the connection]
<Ox0dea> >> [nil] <=> [''] # Yikes.
<ruby[bot]> Ox0dea: # => nil (https://eval.in/568215)
kareeoleez has joined #ruby
<Ox0dea> Array#<=> usually does element-wise comparison; the hell's going on here?
<Mon_Ouie> nil <=> ''
<Mon_Ouie> is also nil, because you can't compare nil with a string
troulouliou_div2 has quit [Quit: Leaving]
kareeoleez has quit [Remote host closed the connection]
<Ox0dea> Right, duh. Forgot that wasn't an error.
wrkrcoop has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
<wrkrcoop> when i try to install jruby using rvm, i get this error: ‘'command gem pristine --version ' failed, you need to fix this gems manually.’
<CustosLimen> ok, so lets say I load json with JSON.parse - is there easy way I can traverse the whole structure/tree (recursively) and replace all occurences of '{ "$minKey" : 1 }' with Sorting::Smaller ?
justin_pdx has quit [Quit: justin_pdx]
<wrkrcoop> my thought is ‘just install pristine’ … is that logical?
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
tvw has joined #ruby
kgrz has quit [Ping timeout: 276 seconds]
malconis has joined #ruby
<wrkrcoop> maybe its because i dont have jdk installed
chouhoulis has quit [Remote host closed the connection]
ljames has quit []
kareeoleez has joined #ruby
troulouliou_div2 has joined #ruby
chouhoulis has joined #ruby
elifoster has joined #ruby
rodfersou|afk is now known as rodfersou
bruno- has quit [Read error: Connection reset by peer]
xxneolithicxx has quit [Quit: Leaving.]
bruno- has joined #ruby
skolman has quit [Remote host closed the connection]
diegoviola has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
skolman_ has joined #ruby
kareeoleez has quit [Ping timeout: 265 seconds]
terminal_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mtkd has joined #ruby
kareeoleez has joined #ruby
Puffball has joined #ruby
roger_rabbit has joined #ruby
skolman_ has quit [Ping timeout: 260 seconds]
SilverKey has quit [Quit: Halted.]
<havenwood> wrkrcoop: What version of JRuby are you installing?
<wrkrcoop> havenwood: just installed jruby 1.7.19
<wrkrcoop> should i now install jruby 9000?
<havenwood> wrkrcoop: Yeah, use 9.1.0.0
<havenwood> wrkrcoop: rvm get head
<wrkrcoop> havenwood: company is using 9000
blackmes1 has joined #ruby
<havenwood> wrkrcoop: The latest 1.7 is 1.7.25 but 9.1 is better yet!
terminalrecluse has joined #ruby
cdg has quit [Remote host closed the connection]
<wrkrcoop> havenwood: just to clarify, jruby 9000 is the interpreter or virtual machine, and 1.7 is the language version?
aegis3121 has joined #ruby
Madmanden has joined #ruby
nankyokusei has joined #ruby
giz|work has quit [Ping timeout: 260 seconds]
giz|work has joined #ruby
dhollinger has quit [Ping timeout: 260 seconds]
MissionCritical has quit [Ping timeout: 244 seconds]
SilverKey has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
YP-QMUL-W has joined #ruby
Fernando-Basso has joined #ruby
zacstewart has quit [Ping timeout: 244 seconds]
Mon_Ouie has quit [Quit: WeeChat 1.4]
kgrz has joined #ruby
lxsameer has quit [Ping timeout: 276 seconds]
djcp has quit [Quit: WeeChat 1.0.1]
benlieb has quit [Quit: benlieb]
Lomex has quit [Remote host closed the connection]
MissionCritical has joined #ruby
|2701 has joined #ruby
jancel has quit [Remote host closed the connection]
dhollinger has joined #ruby
Puffball has quit [Ping timeout: 265 seconds]
blackmes1 has quit [Ping timeout: 244 seconds]
xaxisx has joined #ruby
davedev2_ has quit [Ping timeout: 250 seconds]
davedev24 has joined #ruby
nerium has quit [Quit: nerium]
wrkrcoop has quit [Ping timeout: 244 seconds]
RegulationD has joined #ruby
wrkrcoop has joined #ruby
jancel has joined #ruby
<havenwood> wrkrcoop: Those are both the `RUBY_ENGINE_VERSION`.
Denart_ has joined #ruby
<havenwood> wrkrcoop: For example on 9.1.0.0: [RUBY_ENGINE_VERSION, RUBY_VERSION] #=> ["9.1.0.0", "2.3.0"]
<havenwood> >> [RUBY_ENGINE_VERSION, RUBY_VERSION]
<ruby[bot]> havenwood: # => ["2.3.0", "2.3.0"] (https://eval.in/568222)
<wrkrcoop> havenwood: so there’s no difference between 1.7.19 & 9000?
troulouliou_div2 has quit [Quit: Leaving]
<havenwood> wrkrcoop: On 1.7.25: [RUBY_ENGINE_VERSION, RUBY_VERSION] #=> ["1.7.25", "1.9.3"]
ixti has quit [Quit: WeeChat 1.5]
<havenwood> wrkrcoop: 1.7.19 engine version is 1.9.3 ruby version as well
<wrkrcoop> havenwood: so both 1.7.19 and 9000 are callled engine versions?
nankyokusei has quit [Ping timeout: 250 seconds]
<havenwood> wrkrcoop: Yes, RUBY_ENGINE_VERSION corresponds to the RUBY_ENGINE.
<wrkrcoop> hm ok
<havenwood> wrkrcoop: Those are both the RUBY_ENGINE_VERSION.
<wrkrcoop> thanks
<havenwood> wrkrcoop: [RUBY_ENGINE, RUBY_ENGINE_VERSION] #=> ["jruby", "9.1.0.0"]
freerobby has quit [Quit: Leaving.]
<wrkrcoop> so they’re both engines, but they are not the same engine …
arpegius has joined #ruby
grenierm has quit [Quit: grenierm]
<arpegius> Hash[phone_numbers.map{ |f| [f.id,{value:f.value,title:f.title,is_primary:f.is_primary}]}] can I define that object schema a little more susinctly somehow?
sauvin has quit [Read error: Connection reset by peer]
grenierm has joined #ruby
nadav has quit [Changing host]
nadav has joined #ruby
dvinciguerra has joined #ruby
benlieb has joined #ruby
jwren has joined #ruby
rkazak has joined #ruby
blackmes1 has joined #ruby
nerium has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 252 seconds]
nobitano_ has quit [Remote host closed the connection]
pglombardo has quit []
malconis has quit [Ping timeout: 276 seconds]
dionysus69 has quit [Ping timeout: 276 seconds]
malconis has joined #ruby
shinnya has quit [Ping timeout: 276 seconds]
grenierm has quit [Quit: grenierm]
spider-mario has joined #ruby
bluOxigen has joined #ruby
kkeuning has joined #ruby
nerium has quit [Quit: nerium]
deadhound has joined #ruby
freerobby has joined #ruby
middaywalker has quit [Changing host]
middaywalker has joined #ruby
UKn0Me has quit [Ping timeout: 260 seconds]
|2701 has quit [Changing host]
|2701 has joined #ruby
noService has quit [Ping timeout: 260 seconds]
freerobby has quit [Client Quit]
bluOxigen_ has quit [Ping timeout: 240 seconds]
spectra has quit [Ping timeout: 260 seconds]
Contigi has joined #ruby
Nahra has joined #ruby
Emmanuel_Chanel has joined #ruby
malconis has quit [Ping timeout: 260 seconds]
malconis has joined #ruby
freerobby has joined #ruby
symm- has joined #ruby
Amnez777 has joined #ruby
freerobby has quit [Client Quit]
UKn0Me has joined #ruby
dionysus69 has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
dhollinger has quit [Quit: WeeChat 1.4]
rkazak has quit [Ping timeout: 265 seconds]
wrkrcoop has quit [Quit: wrkrcoop]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zacstewart has joined #ruby
Alina-malina has joined #ruby
dhollinger has joined #ruby
* smathy does NOT answer f.slice for a change
bruno- has joined #ruby
Puffball has joined #ruby
Madmanden has quit [Quit: Later gator]
wrkrcoop has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 260 seconds]
chouhoulis has quit []
jancel has quit [Remote host closed the connection]
ngscheurich has quit [Ping timeout: 250 seconds]
ngscheur1 has joined #ruby
spectra has joined #ruby
noService has joined #ruby
umdstu has quit [Quit: umdstu]
jdawgaz has joined #ruby
cherry_lin has quit [Read error: Connection reset by peer]
middaywalker has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
chouhoulis has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MissionCritical has quit [Ping timeout: 250 seconds]
jaguarmagenta has joined #ruby
mynameisbrian has joined #ruby
umdstu has joined #ruby
elifoster has quit [Ping timeout: 240 seconds]
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
<mynameisbrian> Why can't I do: puts {}.methods.sort; since everything in Ruby is an object, shouldn't the hash literal work with that syntax?
Emmanuel_Chanel has joined #ruby
<mynameisbrian> If I put paranthesis around it, it works
Puffball has quit [Remote host closed the connection]
inukshuk_ has joined #ruby
middaywalker has joined #ruby
inukshuk_ has quit [Client Quit]
middaywalker is now known as blandflakes
zeroDi has joined #ruby
<mynameisbrian> >> [].methods
<ruby[bot]> mynameisbrian: # => [:transpose, :fill, :assoc, :rassoc, :uniq, :uniq!, :compact, :compact!, :to_h, :flatten, :flatten!, ...check link for more (https://eval.in/568226)
jaguarmagenta has quit [Ping timeout: 265 seconds]
<mynameisbrian> >> {}.methods
<ruby[bot]> mynameisbrian: # => [:<, :>, :<=, :>=, :==, :[], :[]=, :empty?, :eql?, :inspect, :length, :size, :each, :to_hash, :to_pr ...check link for more (https://eval.in/568227)
<mynameisbrian> well
<mynameisbrian> it's not working for my version?
<mynameisbrian> >> puts {}.methods
<ruby[bot]> mynameisbrian: # => ...check link for more (https://eval.in/568228)
<mynameisbrian> oh okay, something with puts
<matled> mynameisbrian: empty hash and empty block are both {}, so if you have 'puts {}' it is interpreted as puts with a block, whereas puts({}) disambiguates it to be a has as the first argument
<mynameisbrian> thanks matled haha
<mynameisbrian> that's a fail
<mynameisbrian> >> puts ({}).methods
<ruby[bot]> mynameisbrian: # => < ...check link for more (https://eval.in/568231)
Puffball has joined #ruby
<matled> mynameisbrian: def foo(*args, &block); p [args, block]; end -- this can help to understand what's going on
yqt has joined #ruby
<mynameisbrian> yeah, I understand.
<mynameisbrian> thanks
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
MissionCritical has joined #ruby
Ch4rAss has joined #ruby
karmatr0n has quit [Ping timeout: 276 seconds]
jwren has quit [Quit: leaving]
mynameisbrian has quit [Quit: Page closed]
jwren has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
ekinmur has joined #ruby
jgt has joined #ruby
zacstewart has quit [Ping timeout: 260 seconds]
skolman_ has joined #ruby
banister has joined #ruby
bronson has joined #ruby
johnbat26 has quit [Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/]
jwren has quit [Quit: leaving]
dionysus69 has quit [Ping timeout: 276 seconds]
nobitanobi has joined #ruby
Puffball has quit [Remote host closed the connection]
stannard has joined #ruby
jwren has joined #ruby
jwren has quit [Client Quit]
diegoaguilar has quit [Read error: Connection reset by peer]
arpegius has quit [Quit: arpegius]
sepp2k has quit [Quit: Leaving.]
jwren has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
Puffball has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
nixfreak has joined #ruby
<nixfreak> Hello , I am trying to increment numbers like this 20160510-1, I would like to increment the 1 and 10 if I could
<nixfreak> basically I want ruby to do a conditional on that number and if it exisits then increment by 1
Puffball has quit [Remote host closed the connection]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra> mh, so 20160510-1 + 1 would be what?
ekinmur has joined #ruby
ngscheur1 has quit [Ping timeout: 252 seconds]
<nixfreak> either changing the -1 to += or incrementing the 10
emilkarl has joined #ruby
<adaedra> what would be the output then? 20160510-2 or 20160511-1?
CoderPuppy has joined #ruby
<nixfreak> 20160510-2
bazzy has joined #ruby
<adaedra> >> "20160510-1".succ
<ruby[bot]> adaedra: # => "20160510-2" (https://eval.in/568235)
<nixfreak> oh ok thanks
<adaedra> just have in mind that
<adaedra> >> "20160510-9".succ
<ruby[bot]> adaedra: # => "20160511-0" (https://eval.in/568236)
<adaedra> it may not be the behavior you wish.
<hanmac> adaedra: but its funny for version like:
<hanmac> >> "1.2.9".succ
<ruby[bot]> hanmac: # => "1.3.0" (https://eval.in/568237)
ur5us has joined #ruby
djbkd has quit [Remote host closed the connection]
bluOxigen has joined #ruby
tatsuo has quit [Remote host closed the connection]
<adaedra> >> "1.2.9".split('.').tap { |v| v.last.succ! }.join('.')
<ruby[bot]> adaedra: # => "1.2.10" (https://eval.in/568238)
cpup has quit [Ping timeout: 250 seconds]
<adaedra> success.
djbkd has joined #ruby
arpegius has joined #ruby
synthroid has quit [Remote host closed the connection]
Puffball has joined #ruby
BSaboia has joined #ruby
<nixfreak> noob with ruby what does this actually mean ? = puts "#{$!} (#{$!.class})"
jackjackdripper has joined #ruby
<nixfreak> what class
<shevy> nixfreak $! is a special one
<adaedra> $! is the current exception.
<havenwood> >> require 'English'; $ERROR_INFO
<ruby[bot]> havenwood: # => nil (https://eval.in/568241)
<shevy> "$! contains the Exception that was passed to raise."
ur5us has quit [Ping timeout: 260 seconds]
<nixfreak> ok thank you
djbkd has quit [Ping timeout: 276 seconds]
<havenwood> >> '1.2.9'.sub /\d+\z/, &:next
<ruby[bot]> havenwood: # => "1.2.10" (https://eval.in/568242)
cdg has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
Coldblackice has joined #ruby
<shevy> nixfreak are you using nixos btw?
daftdolphin has joined #ruby
cpup has joined #ruby
<nixfreak> no Im not
stringn00b has joined #ruby
<shevy> ok
diegoviola has quit [Quit: WeeChat 1.5]
Ch4rAss has quit [Quit: leaving]
Ch4rAss has joined #ruby
<stringn00b> I'm trying to format the following text into a string "\begin{document}", but using "\\begin{document}" gives me an error. How can I output \b as a normal string without using "\\ \bb"?
CoderPuppy has quit [Ping timeout: 244 seconds]
flashpoint9 has quit []
YP-QMUL-W has quit [Read error: Connection reset by peer]
<havenwood> stringn00b: Do you mean to be interpolating anything?
<havenwood> >> '\begin{document}'
<ruby[bot]> havenwood: # => "\\begin{document}" (https://eval.in/568243)
<nixfreak> if @browser.text_field(:id => 'request_id').exists?('20160510-06')
Devalo has joined #ruby
mwlang has joined #ruby
<nixfreak> then I want to change it with increment_requestid method which I used your code
nobitanobi has quit [Remote host closed the connection]
<nixfreak> how to can I .set that method ?
blackmes1 has quit [Ping timeout: 252 seconds]
aegis3121 has quit [Ping timeout: 252 seconds]
jhack has quit [Quit: jhack]
babblebre has quit [Quit: Connection closed for inactivity]
<stringn00b> I am using string interpolation, but the only issue popping up is correctly outputing "\begin{tikzcd}" for pdflatex
jaiks has joined #ruby
<nixfreak> does ruby have matches?
jgt has quit [Ping timeout: 276 seconds]
<nixfreak> match say a number
<havenwood> nixfreak: regexp?
<nixfreak> then use regex to generate another one?
xaxisx has quit [Quit: xaxisx]
<havenwood> nixfreak: What do you have and what do you want?
Ch4rAss has quit [Quit: Connection reset by beer..]
tvw has quit [Remote host closed the connection]
Ch4rAss has joined #ruby
skolman_ has quit [Remote host closed the connection]
<nixfreak> If I put in a requestid like 20160510-01 I want to use watir-webdriver to see if that requestid exists and if it does create another one like incrementing by 1
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nixfreak> does that make sense?
skolman_ has joined #ruby
xaxisx has joined #ruby
giz|work has quit [Ping timeout: 250 seconds]
<shevy> dunno
Ch4rAss has quit [Client Quit]
<shevy> you seem to be set on to let watir handle that
Ch4rAss has joined #ruby
<shevy> you could manipulate or query the "20160510-01" yourself before passing into watir whatever it can handle too
hosttor has quit [Read error: Connection reset by peer]
ekinmur has joined #ruby
toretore has quit [Ping timeout: 276 seconds]
<nixfreak> ok so query the request id that goes in the text_field then if it exists pass it something else
wrkrcoop has joined #ruby
roshanavand has joined #ruby
d5sx43 has joined #ruby
nobitanobi has joined #ruby
Devalo has quit [Remote host closed the connection]
ngscheur1 has joined #ruby
skolman_ has quit [Ping timeout: 265 seconds]
MissionCritical has quit [Ping timeout: 246 seconds]
freerobby has joined #ruby
yfeldblum has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
bruno- has quit [Read error: Connection reset by peer]
Musashi007 has joined #ruby
bruno- has joined #ruby
PlasmaStar has quit [Ping timeout: 250 seconds]
sepp2k has joined #ruby
blackmes1 has joined #ruby
giz|work has joined #ruby
djbkd has joined #ruby
PlasmaStar has joined #ruby
synthroid has joined #ruby
GnuYawk has quit [Ping timeout: 246 seconds]
blackgoat has joined #ruby
minimalism has joined #ruby
Slackman_ has joined #ruby
The_Phoenix has quit [Quit: Leaving.]
zacstewart has joined #ruby
MissionCritical has joined #ruby
aegis3121 has joined #ruby
karapetyan has joined #ruby
jaiks has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
TomyLobo has joined #ruby
Ch4rAss has quit [Quit: leaving]
Ch4rAss has joined #ruby
stringn00b has quit [Quit: Page closed]
wrkrcoop has quit [Quit: wrkrcoop]
zeroDi has quit [Ping timeout: 260 seconds]
Don_John has joined #ruby
al2o3-cr has quit [Ping timeout: 260 seconds]
sp4rrow has joined #ruby
Don_John has quit [Client Quit]
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idefine_ has joined #ruby
jhack has joined #ruby
grenierm has joined #ruby
nobitanobi has quit [Remote host closed the connection]
idefine_ has quit [Remote host closed the connection]
Fernando-Basso has quit [Quit: Leaving]
karapetyan has quit [Ping timeout: 244 seconds]
idefine has quit [Ping timeout: 244 seconds]
grenierm has left #ruby [#ruby]
dmr8 has joined #ruby
idefine has joined #ruby
ixti has joined #ruby
sp4rrow has quit [Ping timeout: 276 seconds]
firstdayonthejob has joined #ruby
jenrzzz has joined #ruby
idefine has quit [Ping timeout: 244 seconds]
idefine has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sp4rrow has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moeabdol has quit [Quit: WeeChat 1.4]
isxek has joined #ruby
roamingdog has joined #ruby
brunto has joined #ruby
dhs111_ has joined #ruby
<dhs111_> hi
<havenwood> hi
<dhs111_> im trying to install ruby version manager, can i get some help on here?
<havenwood> dhs111_: What trouble are you having?
freerobby has quit [Quit: Leaving.]
horaceheaven has joined #ruby
Ch4rAss has quit [Ping timeout: 250 seconds]
Dimik has quit []
eljimbo has quit [Quit: This computer has gone to sleep]
horaceheaven is now known as elfuego
<dhs111_> i am following a guide, after typing in command : "curl -L get.rvm.io | bash -s stable" and reopening the terminal. The guide asks for command "type rvm | head -1" to return "rvm is a function" i do not get that
freerobby has joined #ruby
<dhs111_> i am getting "rvm not found"
johnmilton has quit [Remote host closed the connection]
<adaedra> what did the command above said?
<adaedra> (the curl ...)
banister has joined #ruby
banister has quit [Client Quit]
<dhs111_> it printed out a lot of stuff
<dhs111_> guide said "This will do some stuff and print a long message which you can ignore."
<adaedra> sigh.
<elfuego> i’m getting a string from an external source in the format “”test string””, but i’m getting the following error: syntax error, unexpected tIDENTIFIER, expecting end-of-input , is there a way to parse this symbol to be a string?
<havenwood> dhs111_: rvm get head --auto-dotfiles
dmr8 has quit [Quit: Leaving]
<adaedra> havenwood: well, if it says "rvm not found", I'm not sure this would work
topjake has joined #ruby
<dhs111_> this is the output of curl command: http://pastebin.com/n8ZUGtbC
<havenwood> adaedra: touche
<ruby[bot]> dhs111_: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/830e2afcabba482021bfb03908c45293
<ruby[bot]> dhs111_: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<adaedra> elfuego: are the quotes supposed to be english quotes (as opposed to straight " quotes)?
<dhs111_> command suggested by heavenwood also returned "rvm not found"
idefine has quit [Remote host closed the connection]
<elfuego> adaedra: it should be english quotes
<havenwood> dhs111_: Yeah, sorry about that.
sneakerhax has joined #ruby
<havenwood> dhs111_: \curl -sSL https://get.rvm.io | bash -s -- --auto-dotfiles
<havenwood> dhs111_: Then restart your terminal.
dionysus69 has joined #ruby
<adaedra> well, looking at the output looking for errors won't hurt.
karmatr0n has joined #ruby
firstdayonthejob has quit [Quit: WeeChat 1.5]
<adaedra> elfuego: have some code to see what you're trying?
ur5us has joined #ruby
bruce_lee has quit [Ping timeout: 260 seconds]
diego3 has joined #ruby
diego3 is now known as diegoviola
<dhs111_> command give by heavenwood worked, for command "type rvm | head -1" i am getting "rvm is /home/dhs111/.rvm/bin/rvm" thanks, however guide which i am following expects output "rvm is a function"
jenrzzz has quit [Ping timeout: 244 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
jancel has joined #ruby
<adaedra> is your terminal setup to start login shells?
<dhs111_> i do not know, i am using kubuntu with terminal konsole ill look it up online
PickAndMix has quit [Ping timeout: 260 seconds]
Lomex has joined #ruby
Dimik has joined #ruby
<dhs111_> thanks :) gonna do it
<havenwood> :thumbsup:
ur5us has quit [Ping timeout: 250 seconds]
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<dhs111_> thanks guys, works fine now :)
noService has quit [Ping timeout: 240 seconds]
blandflakes has joined #ruby
blandflakes has quit [Client Quit]
<elfuego> adaedra: if the etag isn’t blank it returns a the string from request.env['HTTP_IF_NONE_MATCH'] with an extra quote around the text
<adaedra> elfuego: side note, ruby always use the last expression value as result of a method; your "return" clauses can be removed.
Slackman_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dhs111_ has quit [Quit: Konversation terminated!]
<adaedra> how do you check what's in your string?
<adaedra> Also, looks like If-None-Match header can be used with quotes according to the Wikipedia article
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
synthroid has quit []
topjake has quit []
pwnd_nsfw` has joined #ruby
giz|work has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
firstdayonthejob has joined #ruby
roamingdog has quit [Read error: Connection reset by peer]
bradleesand has joined #ruby
roshanavand has quit [Quit: This computer has gone to sleep]
weemsledeux has joined #ruby
jenrzzz has joined #ruby
pwnd_nsfw has quit [Ping timeout: 250 seconds]
<Radar> GOOD MORNING
roa has joined #ruby
<adaedra> Not so loud, some people are idling here.
skolman_ has joined #ruby
Musashi007 has quit [Quit: Musashi007]
daftdolphin has quit [Remote host closed the connection]
nobitanobi has joined #ruby
<elfuego> adaedra: i’m using JSON.parse to parse the string returned from get_current_etag, but since the quote surrounds the string its throwing unexpected token at '\"{\"__client_id\":
fmcgeough has quit [Quit: fmcgeough]
davedev24 has quit []
<adaedra> mmh mmh.
aegis3121 has quit [Ping timeout: 250 seconds]
<adaedra> also, didn't see it the first time: Hash.new -> {} (but you could also construct the #create_etag_hash in one time)
last_staff has quit [Quit: last_staff]
jancel has quit [Remote host closed the connection]
skolman_ has quit [Remote host closed the connection]
solocshaw has joined #ruby
biberu has quit []
skolman_ has joined #ruby
idefine_ has joined #ruby
derekbarber has joined #ruby
aegis3121 has joined #ruby
nobitanobi has quit [Remote host closed the connection]
<adaedra> for your problem, you could manually remove the double quotes at each ends, but that's quite manual
idefine_ has quit [Remote host closed the connection]
derekbarber has left #ruby [#ruby]
Devalo has joined #ruby
ledestin has joined #ruby
sluukkonen has quit [Ping timeout: 260 seconds]
jaguarmagenta has joined #ruby
charliesome has joined #ruby
skolman_ has quit [Ping timeout: 244 seconds]
sluukkonen has joined #ruby
nobitanobi has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nofxx has quit [Ping timeout: 276 seconds]
ur5us has joined #ruby
Devalo has quit [Ping timeout: 250 seconds]
charliesome_ has joined #ruby
postmodern has joined #ruby
cdg has quit [Ping timeout: 265 seconds]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
aegis3121 has quit [Ping timeout: 244 seconds]
greylevel has joined #ruby
jaguarmagenta has quit [Ping timeout: 276 seconds]
charliesome has quit [Ping timeout: 252 seconds]
goooodroot has quit [Ping timeout: 246 seconds]
mdw has joined #ruby
brunto_ has joined #ruby
johnmilton has joined #ruby
nobitanobi has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
aegis3121 has joined #ruby
brunto has quit [Ping timeout: 260 seconds]
al2o3-cr has joined #ruby
openstruct has quit [Remote host closed the connection]
jwren has quit [Quit: leaving]
ldnunes has quit [Quit: Leaving]
PlasmaStar has quit [Ping timeout: 250 seconds]
idefine_ has joined #ruby
idefine_ has quit [Remote host closed the connection]
mustmodify_ has joined #ruby
johnmilton has quit [Ping timeout: 276 seconds]
jancel has joined #ruby
<mustmodify_> this is more of a general dev question but I have a new Ruby microservice. I was just writing an email asking how much data loss was acceptable for backups, etc.... realized I need to have some equivalent of a ping test. Just a test to make sure it's up because things go down... but it's not a ping test because I'm not testing a website. I'm testing ... that ... we're still receiving messages via UDP. So what's that called? :)
<mustmodify_> QOS test?
PlasmaStar has joined #ruby
arpegius has quit [Quit: arpegius]
bobbycvi has joined #ruby
sp4rrow has quit [Ping timeout: 250 seconds]
<smathy> Availability monitoring?
jwren has joined #ruby
djbkd has quit [Remote host closed the connection]
<mustmodify_> ok, works for me.
jancel has quit [Remote host closed the connection]
Lomex has quit [Remote host closed the connection]
djbkd has joined #ruby
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
bronson has joined #ruby
bruno- has joined #ruby
millerti has joined #ruby
idefine has quit [Remote host closed the connection]
ekinmur has joined #ruby
idefine has joined #ruby
ferr has quit [Quit: WeeChat 1.4]
millerti has quit [Max SendQ exceeded]
djbkd has quit [Ping timeout: 244 seconds]
daftdolphin has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
cdg has joined #ruby
cdg has quit [Remote host closed the connection]
johnmilton has joined #ruby
cdg has joined #ruby
SuperLag has quit [Remote host closed the connection]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mustmodify_ has left #ruby [#ruby]
mtkd has quit [Ping timeout: 246 seconds]
Parko has joined #ruby
diegoaguilar has joined #ruby
mtkd has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
skolman has joined #ruby
Yeomra has quit [Ping timeout: 252 seconds]
lacuna has joined #ruby
djbkd has joined #ruby
workmad3 has joined #ruby
kareeoleez has quit [Remote host closed the connection]
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
rodfersou has quit [Quit: leaving]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
azor has quit [Read error: Connection reset by peer]
jdawgaz has joined #ruby
Denart_ has quit [Remote host closed the connection]
neanderslob has joined #ruby
Ebok has joined #ruby
elfuego has quit [Quit: elfuego]
Moblin has joined #ruby
Ebok has quit [Remote host closed the connection]
Moblin has quit [Remote host closed the connection]
Ebok has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
kareeoleez has joined #ruby
daftdolphin has quit []
d5sx43 has quit [Quit: Leaving...]
GodFather has joined #ruby
sp4rrow has joined #ruby
wldcordeiro has quit [Ping timeout: 252 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kareeoleez has quit [Ping timeout: 244 seconds]
malconis has joined #ruby
rbennacer has quit [Ping timeout: 252 seconds]
dvinciguerra has quit [Ping timeout: 276 seconds]
azor has joined #ruby
azor has left #ruby [#ruby]
sp4rrow has quit [Ping timeout: 244 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
karmatr0n has quit [Ping timeout: 240 seconds]
Cohedrin has quit [Read error: Connection reset by peer]
Cohedrin has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
sp4rrow has joined #ruby
djbkd has joined #ruby
tatsuo has joined #ruby
[Butch] has quit [Ping timeout: 244 seconds]
gnufied has quit [Ping timeout: 252 seconds]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
idefine has quit [Remote host closed the connection]
Pumukel has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dhollinger has quit [Quit: WeeChat 1.4]
Ishido has quit [Remote host closed the connection]
kareeoleez has joined #ruby
hobodave_ has quit [Quit: Computer has gone to sleep.]
banister has joined #ruby
idefine_ has joined #ruby
SilverKey has quit [Quit: Halted.]
finisherr has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
aegis3121 has quit [Ping timeout: 265 seconds]
kareeoleez has quit [Ping timeout: 246 seconds]
Madplatypus has joined #ruby
SilverKey has joined #ruby
CausaMortis has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
TomyLobo has quit [Ping timeout: 246 seconds]
crystal77 has joined #ruby
nixfreak has quit [Ping timeout: 250 seconds]
bruno- has quit [Read error: Connection reset by peer]
mdw has joined #ruby
noService has joined #ruby
idefine_ has quit [Remote host closed the connection]
idefine has joined #ruby
graft has joined #ruby
zotherstupidguy has joined #ruby
idefine has quit [Remote host closed the connection]
agent_white has quit [Quit: brb]
pawnbox has joined #ruby
bruno- has joined #ruby
agent_white has joined #ruby
umdstu has quit [Ping timeout: 265 seconds]
noService has quit [Ping timeout: 276 seconds]
<graft> okay, so a common pattern i use is ary.map{|item| { item.some => item.thing } }.reduce(:merge) - apparently this is abominably slow compared to Hash[ary.map{|item| [ item.some, item.thing ] }]
<graft> can someone explain why?
dopamean_ has quit [Ping timeout: 276 seconds]
<graft> too much copying?
diegoaguilar has quit [Remote host closed the connection]
idefine has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
renderfu_ has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
postmodern has quit [Ping timeout: 250 seconds]
kareeoleez has joined #ruby
wldcordeiro has joined #ruby
idefine has quit [Remote host closed the connection]
horaceheaven has joined #ruby
jancel has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
kareeoleez has quit [Ping timeout: 276 seconds]
d0nn1e has quit [Ping timeout: 276 seconds]
<arahael> different algorthm.
<kaleido> graft: im sorta dumb but im guessing because hashes are superior to arrays in all ways :P
Pumukel has quit [Quit: ChatZilla 0.9.92 [Firefox 46.0.1/20160502172042]]
ngscheur1 has quit [Quit: WeeChat 1.2]
jancel has quit [Ping timeout: 276 seconds]
d0nn1e has joined #ruby
<graft> they yield the same result... i'm guessing when I do reduce(:merge) it means making a fresh hash for every item in the array and copying the previous entry into it, whereas Hash[] only constructs a single hash from the array argument
<graft> but oh man, do i do this a lot
brunto_ has quit [Read error: Connection reset by peer]
SilverKey has quit [Quit: Halted.]
weemsledeux has joined #ruby
<al2o3-cr> graft: to_h all the way :)
blackmes1 has quit [Ping timeout: 260 seconds]
VeryBewitching has quit [Quit: Konversation terminated!]
<weaksauce> graft each merge call dups one of the hashes
goldfax has joined #ruby
<weaksauce> and then runs hash_update each time
freerobby has quit [Quit: Leaving.]
<CausaMortis> hi guys, anyone here working on a vagrant + docker setup?
whathappens has quit [Remote host closed the connection]
rbennacer has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
whathappens has joined #ruby
whathappens has quit [Remote host closed the connection]
Mendenhall has joined #ruby
Mendenhall has left #ruby [#ruby]
cdg has quit [Ping timeout: 252 seconds]
kareeoleez has joined #ruby
zenlot has joined #ruby
whathappens has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
zenlot6 has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby
djbkd has quit [Quit: My people need me...]
<nickjj> CausaMortis, what's the question?
sp4rrow has quit [Ping timeout: 240 seconds]
kareeoleez has quit [Ping timeout: 260 seconds]
<CausaMortis> nickjj, I am a total noob but trying to setup vagrant using my own box (for now im using ubuntu) and then using docker to perform all the provisioning. Does this look remotely correct to you? https://gist.github.com/CausaMortis/090e4b7ec518005d9899468d75961bee
<nickjj> thoughts on just eliminating vagrant from the equation?
<nickjj> or a better question, what are you using vagrant for in your dev. environment that couldn't be solved with docker directly?
Nanuq has quit [Ping timeout: 260 seconds]
<CausaMortis> Currently running under windows and considering docker for windows is still in beta id rather serve up a vm using vagrant
Azure has joined #ruby
<CausaMortis> vagrant can use boot2docker as a provider but i would rather, if possible, have full control over the base box
<nickjj> docker for windows is pretty stable now through the docker toolbox
<nickjj> which uses docker-machine, which in turn uses boot2docker under the hood
<CausaMortis> ah
<nickjj> the beta version is a native implementation which bypasses needing a VM entirely, so it runs natively just like it does on linux
<nickjj> it's not quite ready for prime time but it's certainly usable in every way dev, but at this point you'd need to get accepted the private beta to use it
<nickjj> *every day dev
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 265 seconds]
<CausaMortis> thanks that does make things a bit more understandable for me. I assumed it would still be wonky at this point
<nickjj> your windows experience at the moment with the docker toolbox will be quite reasonable
<nickjj> i mean, if you really wanted to stick with the ubuntu base and vagrant, you should consider just mounting in your code into vagrant and not using the docker provider at all
<nickjj> but at that point, you might as well just use the docker toolbox
<CausaMortis> haha
<CausaMortis> Thanks. Obviously I was overcomplicating matters here
sp4rrow has joined #ruby
<nickjj> yeah no problem
<nickjj> are you using rails too by any chance?
<CausaMortis> I started on this path cause I had read a while back that this was on option
Nanuq has joined #ruby
<CausaMortis> I come from a PHP background but recently had to make the switch so yea, that will be the end goal here so I can get my feet wet
<nickjj> i've been using docker on my dev box and in production for well over a year now, it's really nice. vagrant is longer a tool i use for dev environment set up
<nickjj> *no longer
openstruct has joined #ruby
<CausaMortis> never really bothered diving in as laravel (not sure if you are familiar) provides a dev env using vagrant out of the box
<nickjj> CausaMortis, what's your overall docker knowledge at the moment?
<CausaMortis> haha lets just say it is lacking
<CausaMortis> a few hours of reading on trying to get this to work tops
<nickjj> so, you've basically glanced the getting started guide and heard it might be cool?
<CausaMortis> yeah I want to jump on the bandwagon
<CausaMortis> hahaha
deadhound has quit [Ping timeout: 260 seconds]
<nickjj> are your intentions to eventually deploy a rails app to production with docker?
ramfjord has quit [Ping timeout: 276 seconds]
<CausaMortis> my intentions are to learn its ins and outs
sp4rrow has quit [Max SendQ exceeded]
<CausaMortis> first my priorities are with learning ruby and rails
<nickjj> i ask because if you were interested, i have a course out that you may like
agent_white has quit [Quit: offToHome]
<horaceheaven> for some reason the browser always surounds the request.env['HTTP_IF_NONE_MATCH'] with unwanted quotes, is there a built in ruby method to parse and cleanup strings coming back from the browser headers?
<CausaMortis> hey, I welcome any reading / video material on the subject
horaceheaven is now known as elfuego
<nickjj> it won't teach you rails but it covers "dockerizing" a rails app and scaling/deploying a rails app on AWS with docker, it'll cover topics like load balancing, rolling restarts and much more
kareeoleez has joined #ruby
openstruct has quit [Ping timeout: 265 seconds]
<nickjj> in your case, it might be a "phase 2" learning material, since you'd need to get a reasonable rails base of knowledge before you probably think about deploying an app to production with it
sp4rrow has joined #ruby
<nickjj> CausaMortis, everything about what the course covers can be found at http://nickjanetakis.com/courses/scaling-docker-on-aws
karmatr0n has joined #ruby
<pragmatism> Could someone clear this up for me: what's the point of using a double in testing? Why not just create an instance of the thing you're testing?
<CausaMortis> Luckily laravel for PHP adheres to many of the same conventions and because of its common ancestor i should be able to become familiar with rails in a short time frame
astrobunny has joined #ruby
ramfjord has joined #ruby
<weaksauce> pragmatism speed mainly.
<pragmatism> Ah!
<pragmatism> I hadn't considered that.
<CausaMortis> haha
kareeoleez has quit [Ping timeout: 276 seconds]
<CausaMortis> I totally misread that
jenrzzz has joined #ruby
<weaksauce> pragmatism it also decouples things and reduces dependencies.
jancel has joined #ruby
openstruct has joined #ruby
<pragmatism> weaksauce Why would I want to decrease dependencies on things in tests that are depended on outside of test?
<pragmatism> Wouldn't that lead to poor test coverage?
<weaksauce> pragmatism say the team for the double'd object is not done yet. how do you test your code?
<pragmatism> Ah
<pragmatism> Again, hadn't considered that.
<weaksauce> you test given this input, I expect this output and MY code will work
<weaksauce> you do the same thing for the other end. and then you do integration testing to make sure things play well with each other... but those are slower because they touch more things
sp4rrow has quit [Ping timeout: 240 seconds]
<pragmatism> Gotcha.
<pragmatism> Thank you!!!
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<weaksauce> np
skolma___ has joined #ruby
skolman has quit [Read error: Connection reset by peer]
<nickjj> CausaMortis, i think so too. there's also a million great blog posts and tutorials to pull from
skolma___ has quit [Read error: Connection reset by peer]
Devalo has joined #ruby
skolman has joined #ruby
skolman has quit [Read error: Connection reset by peer]
skolman_ has joined #ruby
RegulationD has quit [Remote host closed the connection]
<CausaMortis> nickjj, I appreciate the link to the course material and will definitely consider it. bookmarked
jaguarmagenta has joined #ruby
sp4rrow has joined #ruby
<nickjj> cool, if you have any questions later on, don't hesitate to ask (my contact info is on my site, or PM me here)
jobewan has quit [Ping timeout: 276 seconds]
sonikspin has joined #ruby
bruce_lee has quit [Remote host closed the connection]
jaguarmagenta has quit [Ping timeout: 265 seconds]
Devalo has quit [Ping timeout: 250 seconds]
sonikspin has quit [Client Quit]
CloCkWeRX has joined #ruby
jenrzzz_ has joined #ruby
firstdayonthejob has quit [Ping timeout: 240 seconds]
kareeoleez has joined #ruby
CausaMortis_ has joined #ruby
jancel has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 276 seconds]
sonikspin has joined #ruby
<|2701> you guys know what's cool?
<|2701> mruby. mruby is what is freaking cool.
xall has quit [Ping timeout: 250 seconds]
CausaMortis has quit [Ping timeout: 240 seconds]
kareeoleez has quit [Ping timeout: 246 seconds]
<mg^> mruby is cool
<mg^> I
xaxisx has quit [Ping timeout: 244 seconds]
<mg^> I've done a little work with it
mostlybadfly has joined #ruby
<|2701> I havent yet, but I've been keeping a close eye on it. there's already a little microecosystem growing around it
<|2701> some guy got it running under rust, called mrusty
<|2701> VERY exciting stuff, i think
<mg^> that's my contribution to the ecosystem, so far
<|2701> oh wow, right on! that's awesome
Yiota has joined #ruby
<mg^> I want to find more excuses to use it
xall has joined #ruby
mib_mib has joined #ruby
<mg^> I recently found my old ham packet radio gear, I was thinking about trying to write a Ruby-based AX.25 stack.
saneax_AFK is now known as saneax
<|2701> that is sufficiently nerdy, you should definitely do it
<mib_mib> hi - having trouble with reading a document - i do File.read('somefile').remove_non_ascii.split("\n").collect {|x| x.strip} to parse it into lines
<mg^> yeah the problem is always time, of course
<mib_mib> however, i am getting erro: in `strip`: invalid byte sequence in US-ASCII
chip_ has joined #ruby
<mg^> I also want to do home automation stuff
moei has quit [Quit: Leaving...]
<mib_mib> but i already did remove_non_ascii - so why would i be getting an invalid byte sequence if i already encoded it to ascii and replaced all non-ascii?
<arahael> mib_mib: force the encoding to binary and re-convert it.
<mib_mib> ENCODING_OPTIONS = { :invalid => :replace, # Replace invalid byte sequences :undef => :replace, # Replace anything not defined in ASCII :replace => ' ', # Use a blank for those replacements :universal_newline => true # Always break lines with \n } ASCII_ENCODING = Encoding.find('ASCII') class String def remove_non_ascii self.encode(ASCII_ENCODING, ENCODING_OPTIONS) end end
<|2701> I didnt know remove_non_ascii was a thing... I get no method on 2.3, am i missing out?
<arahael> mib_mib: i got caught by this: converting to the same encoding is a no-op.
<arahael> mib_mib: as per docs, incidentially.
bruno- has quit [Read error: Connection reset by peer]
<mib_mib> |2701: nah, i just pasted it =D - i usually monkey patch this in to String class
<|2701> ah
bruno- has joined #ruby
<|2701> so then it's not working then, seems like
<|2701> if it's still finding non-ascii bytes after you've removed them, that seems like it would indicative of a faulty method
<mib_mib> |2701: it works, just not the no-op part, since my default encoding is not utf8 but ascii i assume
crystal77 has quit [Ping timeout: 244 seconds]
<mib_mib> arahael: okay, so do I need to do like File.read('somefile','rb') ?
Yiota has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
<Radar> Particularly: is the usage of instance variables understandable, or should those values assigned to those ivars be explicitly passed to those methods?
<arahael> mib_mib: not sure. i'm not an expert rubist.
<arahael> mib_mib: but i assume ruby is guessing, incorrectly, what the encoding is.
<baweaver> Radar: I tend to avoid ivar implied method arguments
<pragmatism> Radar that reads fine to me, although I do inject when possible.
cdg has joined #ruby
<baweaver> makes it a lot harder to move code around
<mib_mib> arahael: you read the docs saying its a no-op but you dont know how to convert it ?
<mib_mib> arahael: i see
<baweaver> that and al the self references aren't really needed
<pragmatism> Agreed on self.
<Radar> baweaver: thank you :)
<pragmatism> Sorry, I agree with baweaver on `self`.
<arahael> mib_mib: well, i suggested forcjng the encoding. i suppose i could have been more specific: force the encoding of the strings obtained from that file.
<baweaver> catch errors feels like it'd be a block given method
<Radar> Thanks all :)
<pragmatism> :+1:
<arahael> pragmatism: that looks like slack.
<pragmatism> It is :)
<arahael> pragmatism: slacker!
spider-mario has quit [Read error: Connection reset by peer]
<pragmatism> Laziness, impatience, and hubris ;)
<baweaver> like: catch_errors { dangerous_method } -> def catch_errors; yield rescue => e handle errors end
<arahael> pragmatism: ssh. :)
<baweaver> though at that point you don't gain much over begin/rescue unless you have very specific errors you're meaning to catch
<baweaver> in which case it'd be of benefit to have a more detailed name on it than catch_errors
bronson has quit [Ping timeout: 252 seconds]
<baweaver> that and you probably really don't want to do actions if errors occur such as delete/create
<baweaver> Radar ^
kareeoleez has joined #ruby
<Radar> baweaver: "errors" in this case are simply a "bad" HTTP response, i.e. a non-200. But yeah, you could definitely make it a block.
<baweaver> ah. In that case I'd use that to patch to a logger somehow and format sane defaults
<baweaver> also line 5 could probably use a sane default as well
<baweaver> the ivar thing has screwed me more than a few times trying to refactor code / move things around
rkazak has joined #ruby
charliesome_ has quit [Ping timeout: 265 seconds]
<baweaver> we do something similar on HTTP responses, we use an interceptor to log out all failed external requests properly so we can track them later.
<baweaver> then normally either pass through the response or return false.
<mib_mib> arahael: ah okay that appeared to work, very oddly though
chopin has quit [Remote host closed the connection]
kareeoleez has quit [Ping timeout: 246 seconds]
<arahael> mib_mib: my guess is that when ruby assumes a given encoding, it does no conversion at that point, but assumes it's valid.
goldfax has quit [Remote host closed the connection]
<arahael> mib_mib: which is a reasonable decision, but surprising until you find out.
SilverKey has joined #ruby
<baweaver> Then again I have a near pathological aversion to `nil`, so with a grain of salt.
<arahael> baweaver: you're not alone. there's been paprrs on that, one sec...
<baweaver> I prefer sane defaults whenever possible, which is completely doable in Ruby
<baweaver> Maybe Monad _could_ be mentioned but then you're going Haskell
mib_mib has quit [Ping timeout: 250 seconds]
jancel has joined #ruby
lacuna has quit [Ping timeout: 265 seconds]
koooge has joined #ruby
<arahael> baweaver: https://www.google.com.au/url?sa=t&source=web&rct=j&url=https://en.wikipedia.org/wiki/Tony_Hoare&ved=0ahUKEwiHgpbI1tDMAhVCe6YKHcFXApYQFgggMAE&usg=AFQjCNENYzUH6N72hyyrDeYWoDyibV2CRw&sig2=6DaRrBaHN7gJ3zAlMdzJjQ
<arahael> not a paper, but anyway. *sigh*, all that garbage google adds these days...
<baweaver> The billion dollar mistake bit?
<arahael> yep
<arahael> baweaver: applicative could be done in ruby?
<|2701> does CSP redeem Hoare?
<|2701> null refs were a pretty big fuckup, but I mean surely CSP makes up for that
<baweaver> not really fully, without a static type system it's not really there
<arahael> CSP?
<arahael> (there are too many acronyms)
<|2701> communication sequenrial processes
<|2701> sp
<|2701> he also was responsible for quicksort
<arahael> that sounds unrelated.
<|2701> yeah but it makes up for his mistake
<|2701> it is unrelated to null refs specifically, but i think he's still a pretty rad dude, considering all that he has contributed to the field
<arahael> |2701: lets not delve into philosphy before i have to head off to work ;)
<baweaver> remember one thing in programming, if nothing else: you are not your code
ekinmur has joined #ruby
skolman_ has quit [Read error: Connection reset by peer]
<|2701> k
<baweaver> http://adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html - Also that's my go to to explain all those scary haskell terms
skolman_ has joined #ruby
ekinmur has quit [Client Quit]
pwnd_nsfw` is now known as pwnd_nsfw
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
<|2701> heck of an ego to tell someone what to remember 'if nothing else'
xlegoman has quit [Quit: xlegoman]
ekinmur has joined #ruby
<baweaver> if you choose to take it that way
<|2701> didnt bother in 1st place, but ok
<baweaver> point being, there's no such thing as "making up for" past code
<|2701> sure there is, you scrap it and write better
<|2701> is a novice programmer forever in debt to code that he wrote as he was starting out? obv not
<|2701> not that he was a novice then, but still
postmodern has joined #ruby
<baweaver> then why should Hoare need to be "redeemed"
darix has quit [Ping timeout: 244 seconds]
<|2701> to judge someone on mistakes they've chosen to correct and move past is a pretty obvious indicator of egoism
karapetyan has joined #ruby
<baweaver> ....you mean like what you just did?
Yiota has joined #ruby
chris349 has joined #ruby
<baweaver> I'm mentioning that your mention of him being redeemed was exactly that, not sure how you're pulling the rest out of there.
<|2701> "if nothing else" like are you even serious with that kind of crap? That's the sort of thing a sophomore tells a freshman as a joke
<|2701> give me a break
<|2701> i was bringing attention that despite one bad idea, hoare is an important figure in cs
<|2701> he's definitely not just 'billion dollar mistake' guy.
<baweaver> and being quite rude in the process.
<|2701> "if nothing else..." *I'm* rude... ok
<|2701> if you choose to take it that way
fullstack has quit [Ping timeout: 240 seconds]
fullstack has joined #ruby
* baweaver sighs
<|2701> w/e. next topic....
Vile` has joined #ruby
Cork has quit [Ping timeout: 240 seconds]
karapetyan has quit [Ping timeout: 244 seconds]
eljimbo has joined #ruby
<baweaver> |2701 wise
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bougyman> manveru: around?
<bougyman> trying to figure out how to use Net::LDAP.open in the context of a class.
crystal77 has joined #ruby
<baweaver> !rude |2701
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bougyman> currently doing an @ldap = LDAP.new in the initializer then using @ldap to search. I just found this does a new connection/bind for each operation.
aegis3121 has joined #ruby
<bougyman> but Net::LDAP.open() requires a block, so it will take a refactor.
crystal77 has quit [Max SendQ exceeded]
darix has joined #ruby
<bougyman> is there a common pattern to use in such cases?
openstruct has quit []
<bougyman> darix! currently doing an @ldap = LDAP.new in the initializer then using @ldap to search. I just found this does a new connection/bind for each operation.
<bougyman> woops, mispaste.
crystal77 has joined #ruby
<darix> moin bougyman
jdawgaz has joined #ruby
<bougyman> mornin'
dopamean_ has joined #ruby
jwren has quit [Remote host closed the connection]
<chris349> How can I force the reinstall of a gem?
crystal77 has quit [Client Quit]
blaxter has quit [Read error: Connection reset by peer]
Musashi007 has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]