drbrain changed the topic of #ruby-lang to: this channel will redirect to #ruby the morning of June 1, Pacific Time
gambl0re has joined #ruby-lang
bertocode has quit [Quit: Nettalk6 - www.ntalk.de]
alestuber has quit [Ping timeout: 245 seconds]
malconis has joined #ruby-lang
zendrix has quit [Ping timeout: 276 seconds]
houhoulis has joined #ruby-lang
baweaver has joined #ruby-lang
cubicme_ has joined #ruby-lang
cubicme has quit [Ping timeout: 256 seconds]
cubicme_ is now known as cubicme
charliesome has joined #ruby-lang
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby-lang
rcvalle has quit [Quit: rcvalle]
malconis has quit [Ping timeout: 255 seconds]
caseypatrickdris has joined #ruby-lang
centrx has quit [Quit: Shutting down, Please wait...]
benlovell has joined #ruby-lang
caseypatrickdris has quit [Ping timeout: 256 seconds]
znz_jp has joined #ruby-lang
benlovell has quit [Ping timeout: 256 seconds]
haraoka has joined #ruby-lang
sankaber has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
bantic has quit [Quit: bantic]
joaomdmoura has joined #ruby-lang
revath has quit [Ping timeout: 258 seconds]
workmad3 has joined #ruby-lang
workmad3 has quit [Ping timeout: 265 seconds]
joaomdmoura has quit [Remote host closed the connection]
joaomdmoura has joined #ruby-lang
caseypatrickdris has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
revath has joined #ruby-lang
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
dorei has quit []
shinnya has quit [Ping timeout: 245 seconds]
haraoka has quit [Ping timeout: 240 seconds]
pragmatism has joined #ruby-lang
pragmatism has quit [Client Quit]
b_hoffman has joined #ruby-lang
marr has quit []
revath has quit [Ping timeout: 272 seconds]
djbkd has quit [Quit: My people need me...]
bruno- has quit [Ping timeout: 250 seconds]
revath has joined #ruby-lang
voxxit has joined #ruby-lang
amclain has joined #ruby-lang
fujimura_ has joined #ruby-lang
revath has quit [Ping timeout: 245 seconds]
revath has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
revath has quit [Ping timeout: 245 seconds]
tkuchiki has joined #ruby-lang
drewo has joined #ruby-lang
duderonomy has quit [Ping timeout: 264 seconds]
houhoulis has quit [Remote host closed the connection]
aaeron has joined #ruby-lang
bruno- has joined #ruby-lang
joaomdmoura has joined #ruby-lang
fujimura_ has quit [Remote host closed the connection]
joaomdmoura has quit [Read error: Connection reset by peer]
joaomdmoura has joined #ruby-lang
djbkd has joined #ruby-lang
bruno- has quit [Ping timeout: 255 seconds]
gamename has joined #ruby-lang
gamename has quit [Client Quit]
car has joined #ruby-lang
wallerdev has joined #ruby-lang
fujimura_ has joined #ruby-lang
fujimura_ has quit [Remote host closed the connection]
benlovell has joined #ruby-lang
fujimura_ has joined #ruby-lang
fedexo has joined #ruby-lang
car has quit [Quit: Leaving]
benlovell has quit [Ping timeout: 252 seconds]
konsolebox has joined #ruby-lang
drefined has joined #ruby-lang
cubicme has quit [Ping timeout: 252 seconds]
fujimura_ has quit [Remote host closed the connection]
cubicme has joined #ruby-lang
baweaver has joined #ruby-lang
ben__ has joined #ruby-lang
fedexo has quit [Ping timeout: 265 seconds]
kreas73 has joined #ruby-lang
aaeron has quit [Quit: aaeron]
duderonomy has joined #ruby-lang
ben__ has left #ruby-lang [#ruby-lang]
gianlucadv has joined #ruby-lang
drewo has quit [Ping timeout: 272 seconds]
konsolebox has quit [Ping timeout: 255 seconds]
revath has joined #ruby-lang
drewo has joined #ruby-lang
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
BanzaiJoe has joined #ruby-lang
gix has quit [Ping timeout: 276 seconds]
revath has quit [Ping timeout: 272 seconds]
drewo has quit [Ping timeout: 252 seconds]
gix has joined #ruby-lang
drewo has joined #ruby-lang
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby-lang
drewo has quit [Ping timeout: 265 seconds]
micmus has quit [Quit: Leaving]
bruno- has joined #ruby-lang
bruno- has quit [Ping timeout: 265 seconds]
scottschecter has joined #ruby-lang
allomov has quit [Remote host closed the connection]
aaeron has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
drewo has joined #ruby-lang
symm- has quit [Ping timeout: 256 seconds]
riotjones has joined #ruby-lang
riotjones has quit [Read error: Connection reset by peer]
riotjones has joined #ruby-lang
riotjones has quit [Ping timeout: 256 seconds]
djbkd has quit [Remote host closed the connection]
allomov has joined #ruby-lang
djbkd has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
BanzaiJoe has quit [Ping timeout: 272 seconds]
joaomdmoura has joined #ruby-lang
revath has joined #ruby-lang
aaeron has quit [Read error: Connection reset by peer]
caseypat_ has joined #ruby-lang
gianlucadv has quit [Ping timeout: 264 seconds]
caseypat_ has quit [Remote host closed the connection]
caseypatrickdris has quit [Ping timeout: 240 seconds]
revath has quit [Ping timeout: 258 seconds]
revath has joined #ruby-lang
sandelius has joined #ruby-lang
drewo has quit [Ping timeout: 244 seconds]
benlovell has joined #ruby-lang
benlovell has quit [Ping timeout: 246 seconds]
cornerma1 has joined #ruby-lang
konsolebox has joined #ruby-lang
cornerman has quit [Ping timeout: 265 seconds]
cornerma1 is now known as cornerman
drewo has joined #ruby-lang
skade has joined #ruby-lang
djbkd has quit [Quit: My people need me...]
tkuchiki has quit [Ping timeout: 265 seconds]
_ht has joined #ruby-lang
drewo has quit [Ping timeout: 272 seconds]
drewo has joined #ruby-lang
riotjones has joined #ruby-lang
hahuang65 has quit [Ping timeout: 245 seconds]
drewo has quit [Ping timeout: 272 seconds]
skade has quit [Quit: Computer has gone to sleep.]
workmad3 has joined #ruby-lang
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby-lang
tkuchiki has joined #ruby-lang
Iskarlar has joined #ruby-lang
workmad3 has quit [Ping timeout: 256 seconds]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
revath1 has joined #ruby-lang
revath has quit [Ping timeout: 258 seconds]
chinmay_dd has joined #ruby-lang
jas02 has joined #ruby-lang
lapide_viridi has joined #ruby-lang
konsolebox has quit [Ping timeout: 276 seconds]
kerunaru has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
amclain has quit [Quit: Leaving]
Senjai has quit [Ping timeout: 244 seconds]
Senjai has joined #ruby-lang
hahuang65 has joined #ruby-lang
solars has joined #ruby-lang
arBmind has joined #ruby-lang
haraoka has joined #ruby-lang
skade has joined #ruby-lang
hahuang65 has quit [Ping timeout: 265 seconds]
bruno- has joined #ruby-lang
Iskarlar has joined #ruby-lang
Guest24 is now known as lele
Pathfinder has joined #ruby-lang
bruno- has quit [Ping timeout: 240 seconds]
cazku has joined #ruby-lang
dudedudeman has quit [Ping timeout: 256 seconds]
dudedudeman has joined #ruby-lang
jas02 has quit [Quit: jas02]
elia has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
dhjondoh has joined #ruby-lang
dhjondoh has quit [Client Quit]
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby-lang
drefined has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jas02 has joined #ruby-lang
benlovell has joined #ruby-lang
drefined has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
wallerdev has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
GPrime has joined #ruby-lang
cazku has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0/20150511103818]]
mikecmpbll has joined #ruby-lang
elia has quit [Read error: Connection reset by peer]
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby-lang
elia has joined #ruby-lang
charliesome has quit [Quit: zzz]
hahuang65 has joined #ruby-lang
hahuang65 has quit [Ping timeout: 244 seconds]
drefined has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kerunaru has quit [Read error: Connection reset by peer]
dhjondoh has joined #ruby-lang
cubicme has quit [Ping timeout: 256 seconds]
Iskarlar has joined #ruby-lang
hagabaka has joined #ruby-lang
cubicme has joined #ruby-lang
chinmay_dd has quit [Remote host closed the connection]
auzty has joined #ruby-lang
VinnyBoy has quit [Read error: Connection reset by peer]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chinmay_dd has joined #ruby-lang
ur5us has joined #ruby-lang
fujimura_ has joined #ruby-lang
jas02 has quit [Quit: jas02]
futilegames has joined #ruby-lang
jas02 has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
konsolebox has joined #ruby-lang
futilegames has quit [Client Quit]
stan has joined #ruby-lang
k3asd` has joined #ruby-lang
<maloik> here's one for yorickpeterse: https://twitter.com/ag_dubs/status/603273801783234560
pyo_ has joined #ruby-lang
<apeiros> maloik: you're late :-p
<apeiros> 23:09 apeiros: hey yorickpeterse, something for you: https://twitter.com/ag_dubs/status/603273801783234560 :D
<maloik> psh
<maloik> lame!
<maloik> I wasn't online then
<maloik> not fair
ur5us has quit [Remote host closed the connection]
ArchRogem has joined #ruby-lang
<ljarvis> hah
Obfuscate has quit [Ping timeout: 256 seconds]
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ur5us has joined #ruby-lang
cubicme_ has joined #ruby-lang
cubicme has quit [Ping timeout: 240 seconds]
cubicme_ is now known as cubicme
<yorickpeterse> apeiros: maloik zing
GPrime has joined #ruby-lang
revath has joined #ruby-lang
revath1 has quit [Ping timeout: 255 seconds]
sankaber has joined #ruby-lang
sankaber has quit [Client Quit]
ur5us has quit [Remote host closed the connection]
Pathfinder has quit [Ping timeout: 256 seconds]
arBmind has joined #ruby-lang
pyo_ has quit [Ping timeout: 264 seconds]
konsolebox has quit [Quit: Leaving]
workmad3 has joined #ruby-lang
lele is now known as Guest24
Pathfinder has joined #ruby-lang
workmad3 has quit [Ping timeout: 255 seconds]
Ropeney has joined #ruby-lang
Pathfinder has quit [Ping timeout: 272 seconds]
workmad3 has joined #ruby-lang
nedp has joined #ruby-lang
marr has joined #ruby-lang
Pathfinder has joined #ruby-lang
langlands has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<darix> snapchat is actually just xmpp with simple crippling auth handling.
<darix> if i recall correctly
fujimura_ has quit [Remote host closed the connection]
<maloik> I think it's a joke because snapchat deletes your posts (or so they say) and mongodb deletes your data (or so yorick says)
hahuang65 has joined #ruby-lang
<maloik> :D
<darix> maloik: he said, she said
ur5us has joined #ruby-lang
fujimura_ has joined #ruby-lang
fujimura_ has quit [Remote host closed the connection]
fujimura_ has joined #ruby-lang
fujimura_ has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 256 seconds]
Pathfinder has quit [Ping timeout: 265 seconds]
nub is now known as callumacrae
stamina has joined #ruby-lang
ruby-lang926 has joined #ruby-lang
<ruby-lang926> hihi
Obfuscate has joined #ruby-lang
bruno- has joined #ruby-lang
Pathfinder has joined #ruby-lang
dorei has joined #ruby-lang
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby-lang
langlands has quit [Ping timeout: 256 seconds]
bruno- has quit [Ping timeout: 245 seconds]
pyo_ has joined #ruby-lang
pyo_ has quit [Max SendQ exceeded]
pyo_ has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
ruby-lang926 has quit [Ping timeout: 246 seconds]
intinig has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
konsolebox has joined #ruby-lang
banister has joined #ruby-lang
haraoka has quit [Ping timeout: 244 seconds]
elia has quit [Quit: Computer has gone to sleep.]
ArchRogem has quit [Read error: Connection reset by peer]
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tkuchiki has quit [Ping timeout: 255 seconds]
b_hoffman has joined #ruby-lang
auzty has quit [Quit: Leaving]
Pathfinder has quit [Ping timeout: 250 seconds]
lucas__ has joined #ruby-lang
solars_ has joined #ruby-lang
PaulePan1er has joined #ruby-lang
benlovell has quit [Ping timeout: 265 seconds]
nvg has quit [Ping timeout: 250 seconds]
solars has quit [Ping timeout: 250 seconds]
PaulePanter has quit [Ping timeout: 250 seconds]
lucas has quit [Ping timeout: 250 seconds]
segy has quit [Ping timeout: 250 seconds]
ldnunes has joined #ruby-lang
segy has joined #ruby-lang
hahuang65 has joined #ruby-lang
fujimura_ has joined #ruby-lang
hahuang65 has quit [Ping timeout: 244 seconds]
symm- has joined #ruby-lang
fujimura_ has quit [Ping timeout: 272 seconds]
elia has joined #ruby-lang
konsolebox has quit [Quit: Leaving]
[k- has joined #ruby-lang
banister has joined #ruby-lang
stardiviner has joined #ruby-lang
stardiviner has quit [Changing host]
stardiviner has joined #ruby-lang
revath has quit [Quit: Leaving.]
futilegames has joined #ruby-lang
revath has joined #ruby-lang
sgambino has joined #ruby-lang
futilegames has quit [Client Quit]
ur5us has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 246 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
benlovell has joined #ruby-lang
alestuber has joined #ruby-lang
TvL2386 has joined #ruby-lang
hinbody has joined #ruby-lang
farme has joined #ruby-lang
<farme> clear
<farme> Hi !
stamina has quit [Ping timeout: 265 seconds]
<jhass> hi
mehdi1 has joined #ruby-lang
chouhoulis has quit [Remote host closed the connection]
chinmay_dd has quit []
<farme> quit
farme has quit [Quit: Leaving]
shazaum has joined #ruby-lang
shazaum has quit [Changing host]
shazaum has joined #ruby-lang
nedp has quit [Remote host closed the connection]
revath1 has joined #ruby-lang
revath has quit [Ping timeout: 256 seconds]
workmad3 has quit [Ping timeout: 256 seconds]
sankaber has joined #ruby-lang
[k-_ has joined #ruby-lang
k3asd` has quit [Ping timeout: 245 seconds]
tkuchiki has joined #ruby-lang
toretore has joined #ruby-lang
imperator has joined #ruby-lang
charliesome has joined #ruby-lang
symm- has quit [Ping timeout: 252 seconds]
Pathfinder has joined #ruby-lang
olistik has joined #ruby-lang
<olistik> hi @all :-)
<elia> olistik, sup?
<olistik> oh, hi there :-D
<olistik> I was playing around with pure functions in Ruby
<olistik> and wondering if Ruby gives you performance benefits when dealing with pure functions
<jhass> no, 98% sure it doesn't, it's an OOP focused language after all
<olistik> marking a method as a pure function should tell the interpreter that it can be further optimized
<olistik> it seems the GC punishes you for creating immutable objects.. ^_^'
<olistik> jhass: that's a pity
<elia> olistik, are lambdas pure functions? I mean, they still have to care about closure variables…
<jhass> not really, it's just not the language you want it to be, if that's an issue for you use another language
<jhass> I don't use a hammer if I want a screwdriver
<apeiros> I don't think ruby has pure functions
<elia> afaik there are no pure functions in ruby
<olistik> jhass: ruby is actually a multi-function rocket launcher, I'd expect some configurations from it :-D
<elia> yep
<apeiros> lambda/proc/bock all are closures
<apeiros> and the rest is either toplevel code or methods
<elia> the only difference could be method lookup (it's an issue in js for example) but I think MRI method cache has it covered…
malconis has joined #ruby-lang
allomov has quit [Remote host closed the connection]
<Petruchio> I don't really think there *could* be pure functions in Ruby. "Functions" are all methods of some object; you're passing messages. The object can respond to the message as it pleases; you don't know what's happening behind the scenes.
<olistik> I don't know Ruby's internal implementation but would its GC speeds up if it can detect methods that declare themselves as "pure function-ish". It could mark every object created in its execution context as trashable.
<Petruchio> Within a pure function, you'd have to be able to perform operations which are also pure, and so on down the line.
<Petruchio> Ruby doesn't have such things.
revath1 has quit [Ping timeout: 250 seconds]
<Petruchio> This seems fundamentally at odds with the nature of the language.
<Petruchio> Say I want a pure function which looks like { |arg| return arg + 1 }. + is a method of the arg object, and 1 is an object.
<olistik> Petruchio: it would be an optimization such as declaring inline functions in C++ or unsafe code in Rust
<Petruchio> I understand how that works.
ttilley has joined #ruby-lang
<olistik> probably more like "unsafe" ;-)
<apeiros> olistik: ruby already has a generational GC, which attempts to do precisely something like that - quickly GC frame local variables
ttilley has quit [Client Quit]
<Petruchio> I'm saying it can't happen in Ruby, as best I know.
nvg has joined #ruby-lang
<olistik> apeiros: that's nice, so it actually gives you a little benefit (to be traded with the cost of the added immutability)
<olistik> Petruchio: I understand that it's a bit cumbersome (to say the least) in the way we currently do Ruby
<olistik> :-)
Miphix has joined #ruby-lang
<Petruchio> "a bit cumbersome" != "can't happen"
gambl0re has quit [Ping timeout: 272 seconds]
<elia> anyway looks a bit like what brixen was advocating in one of his presentation
<olistik> elia: do you have a link?
* apeiros concurs with jhass
<apeiros> if you use ruby, use it to its strenghts
<olistik> Petruchio: I'm not getting why it can't happen, by looking at the closure you've written
<apeiros> if what you want to do are not ruby's strengths - use a language which has those things as strengths
<elia> olistik, no, just search youtube, was probably something related to rubinius x
<olistik> elia: searching :-)
<imperator> time for Elixir
hinbody has quit [Read error: Connection reset by peer]
<Petruchio> arg calls its + method, with an argument of 1. You'd need to ensure that + had no side effects. What is + implemented in terms of? They'd have to be other pure functional operations.
<Petruchio> I'm thinking this through. If I turn out to be wrong, I'll appreciate the experience of having argued this. :-)
hahuang65 has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
yalue has joined #ruby-lang
enebo has joined #ruby-lang
bungoman has joined #ruby-lang
<jhass> worse, I can change + at any point to something it's not pure
<Petruchio> Yeah, that's right, but Ruby kind of cheats at that sometimes anyway, I think.
<jhass> so method (re)definition would have to rejudge everything
<Petruchio> It breaks abstraction, in a sense, though.
<Petruchio> For instance, if I say "some string %{name}." % some_hash
<Petruchio> And some_hash doesn't have a :name key, but it does have a default value.
<Petruchio> The default value isn't used, as you'd expect.
<Petruchio> The OO isn't quite "pure", either. :-)
<olistik> Petruchio: I was thinking about potentially unsafe method marks
fujimura_ has joined #ruby-lang
<olistik> something the developer set, not the interpreter by itself
<Petruchio> *That* sounds bad.
<jhass> well, that's because all hashes have a default value
<Petruchio> I'd think the interpreter should be responsible for that.
hahuang65 has quit [Ping timeout: 256 seconds]
<Petruchio> They do, yes.
<Petruchio> But a default value is still a value.
<Petruchio> To the rest of the world, it shouldn't matter.
skade has joined #ruby-lang
<olistik> Petruchio: Ruby lets you tune GC settings with potentially unsafe side effects
<Petruchio> When I pass a message to an object, it sends a response. Another object shouldn't be able to tell that the response is a default.
<jhass> accessing a missing value and checking whether a key exists are quite distinct operations
<Petruchio> Asking for a value and asking whether a key exists are definitely distinct.
momomomomo has joined #ruby-lang
<Petruchio> And that's a good point; I wonder whether the % method starts off by asking about keys.
<jhass> so % decided to check whether the key exists, because all not existing %{foo}s replaced by nothing would be a lot more confusing
<Petruchio> I'm guessing not, but again I could be wrong.
fujimura_ has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby-lang
<Petruchio> I just defined has_key? to return true in any case, and still got a KeyError.
<Petruchio> Tried that both for Hash and for a subclass.
<Petruchio> I guess it could be asking for the information some other way, but I'm thinking this is an optimization.
<Petruchio> I know I've run across a few other things where things don't work in a quite pure OO way, which were optimizations. I can't quite recall them offhand, but I'll try to think of examples.
<jhass> it probably is calling the C function directly and avoids transitioning back to Ruby land
bungoman has quit []
<jhass> a subclass of Hash still is_a? Hash
k3asd` has joined #ruby-lang
chouhoulis has joined #ruby-lang
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby-lang
stardiviner has quit [Ping timeout: 245 seconds]
<Petruchio> I'm sure that's the case, yes. Hypothetically, it should check to see whether I have a has_key? before executing the native code.
bruno- has joined #ruby-lang
Pathfinder has quit [Ping timeout: 246 seconds]
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby-lang
caseypatrickdris has joined #ruby-lang
bruno- has quit [Ping timeout: 265 seconds]
dzejrou has joined #ruby-lang
hinbody has joined #ruby-lang
pyo_ has quit []
momomomomo_ has joined #ruby-lang
momomomomo has quit [Ping timeout: 264 seconds]
momomomomo_ is now known as momomomomo
bantic has joined #ruby-lang
bantic has quit [Client Quit]
charliesome has quit [Quit: zzz]
symm- has joined #ruby-lang
bantic has joined #ruby-lang
joaomdmoura has joined #ruby-lang
joaomdmoura has quit [Read error: Connection reset by peer]
joaomdmoura has joined #ruby-lang
bruno- has joined #ruby-lang
bruno- is now known as Guest41235
agarie has joined #ruby-lang
joaomdmoura has quit [Ping timeout: 272 seconds]
banister has joined #ruby-lang
tkuchiki has quit [Ping timeout: 264 seconds]
DCameronMauch has joined #ruby-lang
slawrence00 has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
bungoman has joined #ruby-lang
gambl0re has joined #ruby-lang
skade has joined #ruby-lang
nomadicoder has quit []
riotjones has quit [Remote host closed the connection]
dudedudeman has quit [Changing host]
dudedudeman has joined #ruby-lang
whippythellama has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
caseypatrickdris has quit [Remote host closed the connection]
postmodern has joined #ruby-lang
hinbody has quit [Ping timeout: 265 seconds]
charliesome has joined #ruby-lang
jas02 has quit [Quit: jas02]
<imperator> hm, rspec and rbenv not getting along
VinnyBoy has joined #ruby-lang
<imperator> "no Ruby script found in input" - that's a new one for me
<jhass> haha
<jhass> rbenv I like the least
<imperator> doesn't seem to like the -S in their baked in rake task
centrx has joined #ruby-lang
hinbody has joined #ruby-lang
chinmay_dd has joined #ruby-lang
symm- has quit [Ping timeout: 272 seconds]
alestuber has quit [Remote host closed the connection]
skammer has joined #ruby-lang
skammer has quit [Client Quit]
caseypatrickdris has joined #ruby-lang
skammer has joined #ruby-lang
<maloik> I have a module that defines a class method which in turn defines some callbacks to log changes to the classes the module is included in. Is there a way to stub a method in all classes that have the module included without manually defining them?
<maloik> not sure if that question made sense at all :D
Iskarlar has joined #ruby-lang
kreas73 has quit [Quit: Textual IRC Client: www.textualapp.com]
cubicme has quit [Quit: cubicme]
<centrx> maloik, What do you mean?
<maloik> a bunch of our activerecord classes have it included, so we log changes to the objects to logstash automatically without too much custom code
<maloik> there's some stuff going on for exceptions about what to log, and extra attributes to log and what not but that's irrelevant for this example
jo__ has joined #ruby-lang
<maloik> problem is that right now the callbacks are being triggered in tests, I'd like them to never be set in the first place, perhaps by stubbing the log_changes method for all classes that have the module included
<centrx> can't you just define your logger method so it returns immediately if it is run in a test environment?
<maloik> I could but I'm not a fan of that
<maloik> not sure why, but checking for env throughout the code feels icky :D
skade has quit [Quit: Computer has gone to sleep.]
<centrx> How else would you do it?
<centrx> And it's not throughout the code, it's only in the logger module
<maloik> metaprogramming and stubbing the method
<maloik> (maybe)
PaulePan1er is now known as PaulePanter
momomomomo has quit [Ping timeout: 256 seconds]
Chagel has joined #ruby-lang
momomomomo has joined #ruby-lang
TvL2386 has quit [Quit: Ex-Chat]
skammer is now known as skammer|afk
caseypatrickdris has quit [Remote host closed the connection]
caseypatrickdris has joined #ruby-lang
solars_ has quit [Ping timeout: 246 seconds]
sarkyniin has joined #ruby-lang
skade has joined #ruby-lang
skammer|afk is now known as skammer
JEG2 has joined #ruby-lang
face has quit [Ping timeout: 265 seconds]
Chagel has quit [Quit: leaving]
allomov has joined #ruby-lang
skammer has quit [Quit: Textual IRC Client: www.textualapp.com]
skammer has joined #ruby-lang
fujimura_ has joined #ruby-lang
jgpawletko has joined #ruby-lang
TheMoonMaster has joined #ruby-lang
atomical has joined #ruby-lang
havenwood has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
shinnya has joined #ruby-lang
dhjondoh has quit [Quit: dhjondoh]
fujimura_ has quit [Ping timeout: 255 seconds]
atomical_ has quit [Ping timeout: 248 seconds]
riotjones has joined #ruby-lang
BanzaiJoe has joined #ruby-lang
kreas has joined #ruby-lang
benlovell has quit [Ping timeout: 272 seconds]
riotjones has quit [Ping timeout: 272 seconds]
benlovell has joined #ruby-lang
olistik has quit [Remote host closed the connection]
gamename has joined #ruby-lang
alestuber has joined #ruby-lang
caseypatrickdris has quit [Remote host closed the connection]
baweaver has joined #ruby-lang
allomov has quit [Remote host closed the connection]
alestuber has quit [Ping timeout: 244 seconds]
fusillicode has quit [Ping timeout: 256 seconds]
baweaver has quit [Remote host closed the connection]
zendrix has joined #ruby-lang
ruby-lang531 has joined #ruby-lang
allomov has joined #ruby-lang
<ruby-lang531> hi guys!
<ruby-lang531> small doubt right here: how do I get the first and last element of an array?
centrx has quit [Quit: Shutting down, Please wait...]
<ruby-lang531> I was looking for a one-liner
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruby-lang531> can't seem to get it to work with indexes
<sarkyniin> hey
<sarkyniin> anyone has some experience with google drive oauth login in ruby?
benlovell has quit [Ping timeout: 264 seconds]
<sarkyniin> and the google drive gem
<sarkyniin> until now, I just used the simple GoogleDrive.login(email, password) but now I need to go through the whole oauth process
<sarkyniin> which is a pain
presidentelect has quit [Quit: Connection closed for inactivity]
<ruby-lang531> ['a','b','c'][-1..3] => ["c"]
<ruby-lang531> can I get this to be ['a','c'] ?
benlovell has joined #ruby-lang
<jhass> >> %w(a b c).values_at(0, -1) # ruby-lang531
<eval-in> jhass => ["a", "c"] (https://eval.in/371394)
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has joined #ruby-lang
alakran has quit [Quit: WeeChat 0.4.2]
<ruby-lang531> dang, jhass, you a genius! :D
momomomomo_ has joined #ruby-lang
intinig has quit [Remote host closed the connection]
vrinek has joined #ruby-lang
<ruby-lang531> and you did that real quick too #jhass
intinig has joined #ruby-lang
<ruby-lang531> preciate it, man" #jhass
momomomomo has quit [Ping timeout: 252 seconds]
momomomomo_ is now known as momomomomo
<jhass> now I'm a hashtag again? :(
Guest41235 has quit [Ping timeout: 250 seconds]
<ruby-lang531> is that bad, man?
<jhass> I used the # so the bot wouldn't try to run your name as ruby code ;)
<ruby-lang531> the real-life bobby tables :)
djbkd has joined #ruby-lang
nomadicoder has joined #ruby-lang
intinig has quit [Ping timeout: 256 seconds]
DCameronMauch has quit [Quit: Leaving...]
micmus has joined #ruby-lang
langlands has joined #ruby-lang
vrinek has left #ruby-lang ["Linkinus - http://linkinus.com"]
alestuber has joined #ruby-lang
skade has joined #ruby-lang
ruby-lang531 has quit [Ping timeout: 246 seconds]
caseypatrickdris has joined #ruby-lang
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
seank_ has quit [Remote host closed the connection]
atomical has joined #ruby-lang
benlovell has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Ping timeout: 246 seconds]
benlovell has joined #ruby-lang
Fooster has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
vrinek has joined #ruby-lang
victortyau has joined #ruby-lang
vrinek has quit [Client Quit]
victortyau has quit [Remote host closed the connection]
iamninja has quit [Quit: WeeChat 1.1.1]
wallerdev has joined #ruby-lang
Iskarlar has joined #ruby-lang
Iskarlar has quit [Client Quit]
Iskarlar has joined #ruby-lang
wallerdev has quit [Ping timeout: 272 seconds]
sepp2k has joined #ruby-lang
zendrix has quit [Remote host closed the connection]
ItSANgo has joined #ruby-lang
ItSANgo_ has quit [Ping timeout: 245 seconds]
bungoman has quit []
zendrix has joined #ruby-lang
slumos has left #ruby-lang [#ruby-lang]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jas02 has joined #ruby-lang
Iskarlar has joined #ruby-lang
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlovell has quit [Ping timeout: 264 seconds]
seank_ has joined #ruby-lang
wallerdev has joined #ruby-lang
shinnya has quit [Ping timeout: 258 seconds]
revath has joined #ruby-lang
atomical has joined #ruby-lang
iamninja has joined #ruby-lang
<zendrix> Is there a way to load an ActiveRecord into a hash in irb?
<zendrix> I know its a rails thing...
<apeiros> there's ActiveRecord::Base#attributes, which returns a Hash
tibig has joined #ruby-lang
<zendrix> will that give you the complete database in a hash?
<zendrix> or is there a specific location the database is stored in the filesystem?
fujimura_ has joined #ruby-lang
<apeiros> no, but that was not what you asked…
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> you should definitively not access your db through the filesystem
<apeiros> you can use active record outside of rails too
<zendrix> I just want to make a copy of it to view how the data is structured. I am not modifiying, adding, deleting... Just looking
<apeiros> well, use a database client then?
<zendrix> thanks I will take a look.
ruby-lang414 has joined #ruby-lang
<apeiros> also, why irb and not the rails console?
<apeiros> I think rails also has a db console
<zendrix> I have never used rails console... I don't know the difference
<apeiros> yupp, does. `rails dbconsole`
joaomdmoura has joined #ruby-lang
<apeiros> the difference between what?
<zendrix> irb and rails console. I have to think that rails console is based on irb.
<apeiros> it is. it also contains your rails application.
fujimura_ has quit [Ping timeout: 240 seconds]
ht__ has joined #ruby-lang
scottschecter has quit [Quit: Leaving]
<ruby-lang414> Question: is there a built-in method Object#foo which does: def foo; yield self; end ?
<ruby-lang414> i often want such a method
<ljarvis> ruby-lang414: tap
<ruby-lang414> nah, tap returns the object, not the result of the block
michael_mbp has quit [Excess Flood]
<apeiros> ruby-lang414: Object#itself
<ljarvis> ^
michael_mbp has joined #ruby-lang
<apeiros> not sure it yields, though
<ljarvis> doesn't that just return itself too actually?
<apeiros> :-/
<apeiros> doesn't yield
pragmatism has joined #ruby-lang
<ljarvis> seems like an odd method to want
joaomdmoura has quit [Ping timeout: 272 seconds]
<apeiros> I think I had use cases too
<apeiros> long_expr { |x| x.a; x.b } # => result of block
<jhass> .lazy.map.find(&:itself)
<ruby-lang414> @apeiors yeah that's the kind of use case i have in mind
<ljarvis> that'll return the same object again
<apeiros> ruby-lang414: pro-tip: no @, and use tab-completion for nicks.
<ruby-lang414> thx
* apeiros learns yet a new mutilation of his nick
<ljarvis> could be worse, could be apieros
<ruby-lang414> haha sorry
skammer has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tibig has quit [Ping timeout: 252 seconds]
joaomdmoura has joined #ruby-lang
<pipework> I really wanted #self to be a method. :(
cornerma1 has joined #ruby-lang
ItSANgo_ has joined #ruby-lang
ItSANgo has quit [Ping timeout: 255 seconds]
<pipework> I like #select(&:self) to get only truthy objects back. :(
workmad3 has quit [Ping timeout: 246 seconds]
stan has quit [Ping timeout: 256 seconds]
<apeiros> pipework: you can use itself for that
tibig has joined #ruby-lang
<pipework> apeiros: I know, but I don't want to. :(
<ruby-lang414> looks like it's not builtin
<ruby-lang414> thanks for your time gentle(wo-)men
gianlucadv has joined #ruby-lang
cornerman has quit [Ping timeout: 276 seconds]
cornerma1 is now known as cornerman
<jhass> *people ;)
momomomomo has quit [Quit: momomomomo]
revath has quit [Quit: Leaving.]
<pipework> jhass: Some of us don't identify as people.
* pipework is a meat popsicle
k3asd` has quit [Ping timeout: 258 seconds]
[k-_ has quit [Quit: Lingo: www.lingoirc.com]
ruby-lang414 has quit [Ping timeout: 246 seconds]
skade has quit [Quit: Computer has gone to sleep.]
revath has joined #ruby-lang
[k- has quit [Remote host closed the connection]
<jhass> pipework: I go for best effort, not completeness
<pipework> jhass: SJW's would have a fit with you.
<pipework> Marginalizing and all.
yalue has quit [Read error: Connection reset by peer]
skade has joined #ruby-lang
benlovell has joined #ruby-lang
jwaldrip has joined #ruby-lang
* apeiros will greet pipework as meat popsicle from now on :D
elia has joined #ruby-lang
wallerdev_ has joined #ruby-lang
tommylom1ykins is now known as tommylommykins
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
mikecmpbll has joined #ruby-lang
jas02 has quit [Quit: jas02]
hinbody has quit [Ping timeout: 246 seconds]
jas02 has joined #ruby-lang
dfockler has joined #ruby-lang
jas02 has left #ruby-lang [#ruby-lang]
charliesome has quit [Quit: zzz]
baweaver has joined #ruby-lang
hinbody has joined #ruby-lang
agarie has quit []
baweaver has quit [Remote host closed the connection]
alestuber has quit [Ping timeout: 245 seconds]
alestuber has joined #ruby-lang
seank_ has quit [Remote host closed the connection]
wallerdev_ has quit [Ping timeout: 252 seconds]
symm- has joined #ruby-lang
alestuber has quit [Read error: Connection reset by peer]
elia has quit [Read error: Connection reset by peer]
dayid has quit [Remote host closed the connection]
DCameronMauch has joined #ruby-lang
momomomomo has joined #ruby-lang
elia has joined #ruby-lang
momomomomo_ has joined #ruby-lang
imperator2 has joined #ruby-lang
chinmay_dd has quit []
zendrix has quit [Remote host closed the connection]
<DCameronMauch> How do you dynamically add a method to an instance, when the method name is in a variable? I do not want to contaminate the class or any other instances.
momomomomo has quit [Ping timeout: 256 seconds]
momomomomo_ is now known as momomomomo
GarethAdams has quit [Ping timeout: 276 seconds]
havenwood has joined #ruby-lang
alestuber has joined #ruby-lang
revath has quit [Ping timeout: 265 seconds]
shinnya has joined #ruby-lang
arBmind has joined #ruby-lang
GarethAdams has joined #ruby-lang
<imperator> extend + instance_eval would be my first attempt DCameronMauch
<imperator> or instance_variable_get
arBmind has quit [Read error: Connection reset by peer]
postmodern has quit [Remote host closed the connection]
<DCameronMauch> with the instance_eval, still not sure how to define the method when the method name is in a variable
<DCameronMauch> can't use define_method - that is a class method
chadwtaylor has joined #ruby-lang
<imperator> i'll take a stab at it, see what i can come up with
<DCameronMauch> it would create the method in all instances
<DCameronMauch> okey dokey, thanks
<imperator> is this a regular instance variable, a class variable, or a class instance variable?
<jhass> DCameronMauch: define_singleton_method, but doing that at runtime is smelly
<imperator> jhass, like most metaprogramming ;)
<DCameronMauch> well, this is actually to be used in a spec
<DCameronMauch> apparently mocking out :respond_to? breaks things
<jhass> will likely still slow them down
<jhass> yeah, why do you do that?
jwaldrip has quit [Quit: Be back later ...]
frank___1 has joined #ruby-lang
<DCameronMauch> I am testing a module, that looks for methods and calls them if they exist
<jhass> perhaps you meant to define respond_to_missing? ?
jwaldrip has joined #ruby-lang
<DCameronMauch> I am including the module to test in an otherwise empty test class
b_hoffman has quit [Quit: b_hoffman]
revath has joined #ruby-lang
<imperator> that what you had in mind?
<DCameronMauch> ah, yes, works perfectly! thanks!
<imperator> great! you're welcome!
jds has joined #ruby-lang
baweaver has joined #ruby-lang
postmodern has joined #ruby-lang
seank_ has joined #ruby-lang
DCameronMauch has quit [Quit: Leaving...]
baweaver has quit [Remote host closed the connection]
jwaldrip has quit [Ping timeout: 265 seconds]
joaomdmoura has quit [Remote host closed the connection]
drewo has joined #ruby-lang
jwaldrip has joined #ruby-lang
rikkipitt has joined #ruby-lang
revath has quit [Ping timeout: 256 seconds]
zendrix has joined #ruby-lang
jwaldrip has quit [Ping timeout: 258 seconds]
revath has joined #ruby-lang
yalue has joined #ruby-lang
jwaldrip has joined #ruby-lang
benlovell has quit [Ping timeout: 264 seconds]
benlovell has joined #ruby-lang
fusillicode has joined #ruby-lang
joaomdmoura has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
fusillicode has quit [Client Quit]
fusillicode has joined #ruby-lang
redbullion has joined #ruby-lang
jwaldrip has quit [Ping timeout: 255 seconds]
jwaldrip has joined #ruby-lang
wallerdev_ has joined #ruby-lang
ta has quit [Remote host closed the connection]
jwaldrip has quit [Ping timeout: 246 seconds]
fujimura has joined #ruby-lang
jwaldrip has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
langlands has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wallerdev_ has quit [Ping timeout: 244 seconds]
elia has quit [Read error: Connection reset by peer]
fujimura has quit [Ping timeout: 255 seconds]
elia has joined #ruby-lang
b_hoffman has joined #ruby-lang
bb010g has quit [Quit: Connection closed for inactivity]
workmad3 has joined #ruby-lang
jwaldrip has quit [Ping timeout: 272 seconds]
jwaldrip has joined #ruby-lang
chouhoulis has quit [Ping timeout: 264 seconds]
lupine has left #ruby-lang ["Leaving"]
workmad3 has quit [Ping timeout: 252 seconds]
momomomomo has quit [Ping timeout: 244 seconds]
jwaldrip has quit [Ping timeout: 255 seconds]
sepp2k has quit [Quit: Leaving.]
jwaldrip has joined #ruby-lang
momomomomo has joined #ruby-lang
GBrawl has joined #ruby-lang
jwaldrip has quit [Ping timeout: 252 seconds]
olleolleolle has left #ruby-lang [#ruby-lang]
jgpawletko has quit [Quit: jgpawletko]
<BanzaiJoe> RubyMine , WTF, you default to the users documents, then you scan them all, then you create a UI that makes it look like the project is in user documents....I give you day to make a better impression
jwaldrip has joined #ruby-lang
mkosaki has quit [Ping timeout: 276 seconds]
kadoppe has quit [Ping timeout: 246 seconds]
<sarkyniin> anyone has some experience with google drive oauth login in ruby?
<sarkyniin> and the google drive gem
<sarkyniin> until now, I just used the simple GoogleDrive.login(email, password) but now I need to go through the whole oauth process
<sarkyniin> which is a pain
Squarepy has joined #ruby-lang
igualpuyo has joined #ruby-lang
kadoppe has joined #ruby-lang
havenwood has quit [Ping timeout: 240 seconds]
skade has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
zendrix has quit [Remote host closed the connection]
arBmind has joined #ruby-lang
arBmind has quit [Client Quit]
jwaldrip has quit [Ping timeout: 264 seconds]
chadwtay_ has joined #ruby-lang
baweaver has joined #ruby-lang
jwaldrip has joined #ruby-lang
chadwtaylor has quit [Ping timeout: 265 seconds]
momomomomo has quit [Ping timeout: 250 seconds]
bb010g has joined #ruby-lang
Squarepy has quit [Quit: Leaving]
jwaldrip has quit [Ping timeout: 256 seconds]
momomomomo has joined #ruby-lang
wallerdev has joined #ruby-lang
jwaldrip has joined #ruby-lang
igualpuyo has quit [Quit: Leaving]
jgpawletko has joined #ruby-lang
havenwood has joined #ruby-lang
redbullion has quit [Remote host closed the connection]
jwaldrip has quit [Ping timeout: 250 seconds]
jwaldrip has joined #ruby-lang
mfmfmfmfmfmf has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
alestuber has quit [Remote host closed the connection]
lapide_viridi has quit [Quit: Leaving]
zendrix has joined #ruby-lang
wallerdev_ has joined #ruby-lang
Missphoenix has joined #ruby-lang
jwaldrip has quit [Ping timeout: 244 seconds]
joaomdmoura has quit [Remote host closed the connection]
jwaldrip has joined #ruby-lang
Miphix has quit [Ping timeout: 244 seconds]
hahuang65 has joined #ruby-lang
joaomdmoura has joined #ruby-lang
wallerdev_ has quit [Ping timeout: 264 seconds]
GBrawl has quit [Quit: (null)]
jwaldrip_ has joined #ruby-lang
jwaldrip has quit [Ping timeout: 272 seconds]
ta has joined #ruby-lang
rikkipitt has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
joaomdmoura has quit [Remote host closed the connection]
jwaldrip_ has quit [Ping timeout: 255 seconds]
arBmind has joined #ruby-lang
jwaldrip_ has joined #ruby-lang
rikkipitt has joined #ruby-lang
skammer has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gambl0re has quit [Ping timeout: 256 seconds]
Petruchio has quit [Ping timeout: 256 seconds]
alestuber has joined #ruby-lang
Petruchio has joined #ruby-lang
bertocode has joined #ruby-lang
Benvolio has joined #ruby-lang
benlovell has quit [Ping timeout: 240 seconds]
zendrix has quit [Remote host closed the connection]
zendrix has joined #ruby-lang
Petruchio has quit [Ping timeout: 258 seconds]
SpeakerToMeat has quit [Ping timeout: 255 seconds]
<havenwood> imperator2: My first impression is that it's janky to try to tie a RUBY_ENGINE to a particular RUBY_VERSION. JRuby of a particular version can run in 1.9 or 2.0 mode, etc.
yalue has quit [Quit: return 0;]
<havenwood> imperator2: In dev versions MRI, JRuby and Rubinius all now support RUBY_ENGINE_VERSION for the RUBY_ENGINE version.
alestuber has quit [Ping timeout: 265 seconds]
<havenwood> Negated requirements don't make sense to me, like the example: :rubinius => 'unsupported'
ht__ has quit [Quit: Konversation terminated!]
elia has joined #ruby-lang
<havenwood> imperator2: But seems they care about the JRUBY_VERSION (RUBY_ENGINE_VERSION) so that's what they should be specifying.
alestuber has joined #ruby-lang
benlovell has joined #ruby-lang
SpeakerToMeat has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
<havenwood> I can imagine a scenario where one might want to specify both RUBY_VERSION and RUBY_ENGINE_VERSION on a per RUBY_ENGINE basis. Dunno if it's worth supporting that.
<zendrix> How do I load a local .gem file into irb.
<zendrix> ?
centrx has joined #ruby-lang
Fooster has quit [Ping timeout: 276 seconds]
<havenwood> zendrix: Install the gem and require it from your irb session.
<havenwood> zendrix: gem install gem-name-version.gem && irb -rgem-name
banister has joined #ruby-lang
<zendrix> so I did a 'gem build this_gem.gemspec'
djbkd has joined #ruby-lang
<havenwood> zendrix: Sure, the long way you could `gem unpack ... && cd .. && gem unpack && gem install` but just skip straight to the install if you're not modifying the gem.
<havenwood> That second gem unpack I meant gem build.
<zendrix> But when I tried the 'gem install this_gem-1.0.0.gem' it said ERROR: Could not find a valid gem 'this_gem-1.0.0.gem' in any reposiroty
<zendrix> So delete the built .gem and just try the install without the build first?
<havenwood> zendrix: was it in your local directory?
baweaver has joined #ruby-lang
<zendrix> yes
<havenwood> zendrix: Should work, double check filename.
<jhass> I think it needs the ./
<zendrix> havenwood: Thanks. It has been a long day.
<jhass> should at least tab complete if you start that way ;)
ldnunes has quit [Ping timeout: 276 seconds]
<havenwood> imperator2: Hmm, yeah not sure how to represent it but both RUBY_VERSION and RUBY_ENGINE_VERSION seem relevant.
workmad3 has joined #ruby-lang
allomov has quit [Remote host closed the connection]
Fooster has joined #ruby-lang
joaomdmoura has joined #ruby-lang
sarkyniin has quit [Ping timeout: 272 seconds]
<havenwood> imperator2: Maybe leave `required_ruby_version` as-is and have a `required_ruby_engine_version`?
jgpawletko has quit [Quit: jgpawletko]
<havenwood> Or have both take a hash for the most granularity.
<havenwood> imperator2: Dunno.
k3asd` has joined #ruby-lang
chadwtay_ has quit [Read error: Connection reset by peer]
chadwtaylor has joined #ruby-lang
<havenwood> required_ruby_version = {ruby: '>= 1.9.3', jruby: '>= 2.2.2'}
<havenwood> required_ruby_engine_version = {ruby: '>= 1.9.3', jruby: '9.0.0.0'}
fujimura has joined #ruby-lang
gamename has quit [Remote host closed the connection]
gamename has joined #ruby-lang
<havenwood> *'>= 9.0.0.0'
baweaver has quit [Remote host closed the connection]
fujimura has quit [Ping timeout: 240 seconds]
gamename has quit [Ping timeout: 255 seconds]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gambl0re has joined #ruby-lang
wallerdev_ has joined #ruby-lang
<havenwood> imperator2: TL;DR: Seems like a good idea. I'm not so sure about negating engines but haven't thought it through. A `required_ruby_engine_version` might help cover the bases.
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
caseypat_ has joined #ruby-lang
Missphoenix has quit [Ping timeout: 256 seconds]
alestuber has quit [Remote host closed the connection]
wallerdev_ has quit [Ping timeout: 256 seconds]
caseypat_ has quit [Remote host closed the connection]
caseypatrickdris has quit [Ping timeout: 256 seconds]
caseypatrickdris has joined #ruby-lang
havenwood has quit [Ping timeout: 264 seconds]
centrx has quit [Quit: Shutting down, Please wait...]
centrx has joined #ruby-lang
hahuang65 has quit [Ping timeout: 250 seconds]
dzejrou has quit [Ping timeout: 252 seconds]
ur5us has joined #ruby-lang
tenderlove has quit [Quit: Leaving...]
<imperator> perhaps that would be a better approach
alestuber has joined #ruby-lang
<imperator> well, except that there's no RUBY_ENGINE_VERSION in MRI atm
<imperator> musta been referring to dev
baweaver has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 246 seconds]
Voker57 has joined #ruby-lang
mfmfmfmfmfmf has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
b_hoffman has quit [Quit: b_hoffman]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gianlucadv has quit [Ping timeout: 264 seconds]
kfpratt has joined #ruby-lang
malconis has joined #ruby-lang
revath has quit [Ping timeout: 246 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
elia has quit [Quit: Computer has gone to sleep.]
bertocode has quit [Quit: Nettalk6 - www.ntalk.de]
imperator has quit [Quit: Leaving]
Fooster has quit [Ping timeout: 240 seconds]
joaomdmoura has quit [Remote host closed the connection]
maxasd111 has joined #ruby-lang
<maxasd111> in rails, can i set the url fragment using render?
imperator2 has quit [Quit: Valete!]
benlovell has quit [Ping timeout: 246 seconds]
wallerdev_ has joined #ruby-lang
<apeiros> maxasd111: you want #rubyonrails
bruno- has quit [Ping timeout: 265 seconds]
maxasd111 has quit [Client Quit]
_ht has quit [Quit: Konversation terminated!]
wallerdev_ has quit [Ping timeout: 252 seconds]
bantic has quit [Quit: bantic]
benlovell has joined #ruby-lang
<BanzaiJoe> I have been banging my head for....
<BanzaiJoe> 1h50 minutes, and I'm just plain missing something
<BanzaiJoe> I'm a complete n00b so go easy on me https://gist.github.com/DWSimmons/d7d69d5ce0757c180d7a
<jhass> looks fine
<BanzaiJoe> time to cry then, lol
<jhass> time to do some problem description ;)
<BanzaiJoe> test returns undefined method
<womble> What test?
<womble> I see no test.
<BanzaiJoe> exercism .... let me grab it
benlovell has quit [Ping timeout: 244 seconds]
<womble> BanzaiJoe: Aha, you've fallen victim to one of the classic blunders.
<BanzaiJoe> well of course, i'm a n00b
<BanzaiJoe> sock some edumacation on me
baweaver has joined #ruby-lang
<womble> The first, is "never get involved in a land war in Asia"
<BanzaiJoe> I think I've heard that somewhere ;)
<womble> Good, just checking.
pragmatism has quit [Ping timeout: 246 seconds]
<BanzaiJoe> am I going to have to battle rats of enormous size on my way to Ruby expertise?
pragmatism has joined #ruby-lang
<BanzaiJoe> seriously, I don't get something or actually even worse, I think I'm not getting something
<womble> So, you're calling `HelloWorld.hello`, which is trying to run a *class* method on the `HelloWorld` class. However, you've defined an *instance* method on `HelloWorld`, so you need to create an instance of `HelloWorld` and then call `hello` on that.
<womble> Also, the `hello` method you've defined doesn't take an argument, so the test cases where you've passed an argument, you need to pass that argument to the instance constructor, rather than the call to `hello` itself.
<BanzaiJoe> can the instance constructor (or any method for that matter) have multiple .... "behavior changes". The loop/problem I ran into is that I put the puts in the constructor and get no output
<womble> Sure you can call puts in the constructor.
hahuang65 has joined #ruby-lang
<BanzaiJoe> so... can I do a class method constructor and @name and puts in one def-end?
<womble> Sure.
<womble> Or you could make `hello` a class method, and then you don't have to have a constructor at all.
<BanzaiJoe> and is that where the test is "leaning"?
<BanzaiJoe> I tried that and got all sorts of relative errors that I didn't know what was trying to relate to what (or at least I think that's what happened)
<womble> BanzaiJoe: Is that hello_world_test.rb entirely from exercism, is it? You're supposed to write code that will make that exact test pass?
<BanzaiJoe> correct
<womble> Yep, in that case, it's looking for a class method.
<womble> It's also not looking for you to print the resulting string, but instead return it.
<BanzaiJoe> OK, thanks, what piece of code says "looking for class method"
<BanzaiJoe> oh, wait
postmodern has quit [Quit: Leaving]
<BanzaiJoe> I think I got it
<BanzaiJoe> an instance method would be like p = HelloWorld.hello, right?
<BanzaiJoe> and straight up naked HelloWorld.hello is class method with no instance created?
<womble> No.
<BanzaiJoe> doh
duderonomy has quit [Ping timeout: 244 seconds]
<pipework> BanzaiJoe: Nope. Have you gone through any ruby tutorials yet?
<womble> You create a class method by defining the method as `def self.hello` rather thant `def hello`
<BanzaiJoe> yes, many, and they just don't seem to nail this concept well
<pipework> BanzaiJoe: The pickaxe book should cover what you're missing.
<pipework> Another great book is the metaprogramming ruby book. The first half is all object model and it's fantastic. Then black book.
<BanzaiJoe> womble I tried that, how do I get a return on that?
<BanzaiJoe> axe, meta, black
<BanzaiJoe> thanks, will take a look at those
<womble> BanzaiJoe: Call 'return', or just make it the last value in the method (Ruby has what's called "implicit return semantics" -- everything returns something, even if you don't explicitly tell it to)
<BanzaiJoe> will do, thanks for your help
mkosaki has joined #ruby-lang
<baweaver> pipework: The Black book? Well Grounded Rubyist?
<pipework> baweaver: yeah
<baweaver> Just making sure there's not a literal black book I'd not seen yet
<BanzaiJoe> woooohoooooo 4 runs, 2 assertions, ZERO failures, ZERO errors, and only 2+hours later, I feel VICTORIOUS!
<baweaver> (Well, Black wrote it, but you get the point)
<BanzaiJoe> I get by with a little help from my friends
<BanzaiJoe> thank you for your help
<womble> You're welcome.
micmus has quit [Ping timeout: 256 seconds]
shazaum has quit [Quit: Leaving]
<pipework> It's historically called "The Black Book".
alestuber has quit [Ping timeout: 272 seconds]
arBmind1 has joined #ruby-lang
centrx has quit [Quit: Shutting down, Please wait...]
arBmind has quit [Ping timeout: 245 seconds]
<BanzaiJoe> pipework which of those would you suggest is most n00b accessible?
bantic has joined #ruby-lang
rikkipitt has quit [Remote host closed the connection]
<pipework> BanzaiJoe: Hm. Depends on what you're looking for. I'd always suggest meta, then black, then pickaxe.
whippythellama has quit [Quit: whippythellama]
k3asd` has quit [Ping timeout: 265 seconds]
ta has quit [Remote host closed the connection]
fujimura has joined #ruby-lang
alestuber has joined #ruby-lang
<BanzaiJoe> thanks
fujimura has quit [Ping timeout: 276 seconds]
fry_ has joined #ruby-lang
<fry_> hi all, someone can give me help with an initialize method ?
<jhass> what's your issue?
<fry_> i'm trying to define def initialize(inode, path) but compiler give me in `initialize': wrong number of arguments (1 for 0) (ArgumentError) on that line
caseypat_ has joined #ruby-lang
hinbody has quit [Ping timeout: 272 seconds]
<pipework> fry_: We might need more of the source.
<fry_> is it possible to define an inititialize method with 2 arguments ?
<fry_> yes, wait a sec, pastebin
caseypat_ has quit [Remote host closed the connection]
<jhass> fry_: include the full error with backtrace too
caseypatrickdris has quit [Ping timeout: 256 seconds]
<jhass> your error and the code you've shown don't seem to be realted
<jhass> *related
<jhass> from ./MMain.rb:7:in `new'
<jhass> line 2 is blank
<jhass> *line 7, god dammit
<jhass> oh, I might be too tired for this, sorry
<jhass> still, MMain.rb seems relevant too
enebo has quit [Quit: enebo]
<fry_> i m sorry, i read the first line, that's CFiles related
<jhass> lol, I'm really too tired
codelurker has joined #ruby-lang
<jhass> so, File is a standard Ruby class
<jhass> and you overwrite its constructor
<jhass> >> File
<eval-in> jhass => File (https://eval.in/371500)
b_hoffman has joined #ruby-lang
<jhass> either namespace your class(es) into a module (preferred) or rename the File class to something else
chadwtaylor has quit [Remote host closed the connection]
<fry_> ok
duderonomy has joined #ruby-lang
frank___1 has quit [Quit: leaving]
<fry_> seems changin class Name resolved, ty, sorry for the bad cut&paste
skammer is now known as skammer|afk
dfockler has quit [Remote host closed the connection]
wallerdev_ has joined #ruby-lang
codelurker has quit [Quit: codelurker]
zendrix has quit [Remote host closed the connection]
arBmind1 has quit [Quit: Leaving.]
wallerdev_ has quit [Ping timeout: 256 seconds]
fry_ has quit [Quit: Page closed]
zendrix has joined #ruby-lang
workmad3 has joined #ruby-lang
Ropeney has joined #ruby-lang
Fooster has joined #ruby-lang
alestuber has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 256 seconds]
caseypatrickdris has joined #ruby-lang
Benvolio has quit [Ping timeout: 258 seconds]
baweaver has quit [Remote host closed the connection]
bantic has quit [Quit: bantic]
b_hoffman has quit [Quit: b_hoffman]
tibig has quit [Ping timeout: 250 seconds]
drewo has quit [Quit: WeeChat 1.1.1]