<krainboltgreene>
This should totally be a standard thing.
<krainboltgreene>
headius: <3
<chrisseaton>
I wanted to do it once, but can't remember what for... it seemed like the most elegant solution if it were possible
<krainboltgreene>
Since I have to support MRI I'll basically do either that OR method_source+eval
<chrisseaton>
method_source may not always work - things like declaration scope are complex and not represented in source code
josh-k has joined #jruby
pawnbox has quit [Ping timeout: 276 seconds]
josh-k_ has joined #jruby
josh-k has quit [Read error: Connection reset by peer]
<krainboltgreene>
Worse comes to worse the user just copy/pastes the method to the mirror.
josh-k_ has quit [Remote host closed the connection]
josh-k has joined #jruby
josh-k has quit [Ping timeout: 250 seconds]
tcrawley-away is now known as tcrawley
tcrawley is now known as tcrawley-away
DrShoggoth has joined #jruby
tjohnson has quit [Quit: Connection closed for inactivity]
knu_ has quit [Quit: Reboot...]
knu has joined #jruby
bjfish2 has quit [Quit: bjfish2]
pawnbox has joined #jruby
pawnbox has quit [Ping timeout: 245 seconds]
DrShoggoth has quit [Quit: Leaving]
knu has quit [Quit: Reboot...]
knu has joined #jruby
Puffball has quit [Remote host closed the connection]
Puffball has joined #jruby
bb010g has joined #jruby
pawnbox has joined #jruby
pawnbox has quit [Ping timeout: 240 seconds]
Aethenelle has quit [Quit: Aethenelle]
Aethenelle has joined #jruby
pawnbox has joined #jruby
jsyeo has joined #jruby
gaustin has quit [Quit: gaustin]
jsyeo has quit [Quit: WeeChat 1.3]
cthulhua has joined #jruby
yfeldblum has quit [Ping timeout: 250 seconds]
Aethenelle has quit [Quit: Aethenelle]
cthulhua has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ITXpander has quit [Ping timeout: 250 seconds]
yfeldblu_ has joined #jruby
ITXpander has joined #jruby
thedarkone2 has quit [Quit: thedarkone2]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #jruby
kares has joined #jruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #jruby
rsim has joined #jruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #jruby
pawnbox has quit [Ping timeout: 250 seconds]
gaustin has joined #jruby
gaustin has quit [Ping timeout: 260 seconds]
pawnbox has joined #jruby
wasnotrice has quit [Ping timeout: 250 seconds]
wasnotrice has joined #jruby
bb010g has quit [Quit: Connection closed for inactivity]
pitr-ch has joined #jruby
pitr-ch has quit [Client Quit]
kares has quit [Ping timeout: 246 seconds]
kares has joined #jruby
kares has quit [Ping timeout: 245 seconds]
kares has joined #jruby
kares has quit [Ping timeout: 264 seconds]
kares has joined #jruby
josh-k has joined #jruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #jruby
skade has joined #jruby
skade has quit [Ping timeout: 272 seconds]
<chrisseaton>
Does anyone know if Travis ever does JDK EA builds?
<chrisseaton>
By 'does' I mean lets you select as the Java for your build
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #jruby
josh-k has quit [Remote host closed the connection]
josh-k has joined #jruby
pawnbox has quit [Ping timeout: 256 seconds]
pawnbox has joined #jruby
josh-k has quit [Ping timeout: 260 seconds]
pawnbox_ has joined #jruby
pitr-ch has joined #jruby
pawnbox has quit [Ping timeout: 255 seconds]
pawnbox_ has quit [Ping timeout: 255 seconds]
yfeldblu_ has quit [Ping timeout: 260 seconds]
skade has joined #jruby
skade has quit [Ping timeout: 260 seconds]
skade has joined #jruby
skade has quit [Ping timeout: 245 seconds]
<eregon>
krainboltgreene: if the method is deifned in a module (not a class), transplanting should just work
<eregon>
otherwise it's assumed the method in a class has intimate knowledge of its internals, and it would also allow to call say String#prepend on a custom class
<chrisseaton>
eregon: that's the Ruby way though isn't it? as long as you install the method on a class which quacks like a duck
<chrisseaton>
eregon: core methods written in C are different though I know
pawnbox has joined #jruby
<eregon>
but is "@ivar" quacking?
<chrisseaton>
eregon: yeah, I think having the instance variables you're looking for is quacking
<chrisseaton>
even if they're just nil
<eregon>
if it's only methods calls of course it could "just work", there is even a gem to force bind stuff on MRI. But then that method would likely make sense in a module as well
<eregon>
krainboltgreene: it would be interesting to know yoru use-case, there have been discussions about this in the past on MRI tracker as well
kares has quit [Ping timeout: 255 seconds]
<eregon>
I guess the restriction could technically be reduced to just the native methods (although it's not always so trivial to detect), but unsure if it's a good thing and also it would expose whether methods are native or not.
skade has joined #jruby
kares has joined #jruby
Aethenelle has joined #jruby
skade has quit [Ping timeout: 250 seconds]
pawnbox_ has joined #jruby
pawnbox has quit [Ping timeout: 250 seconds]
skade has joined #jruby
mpapis has joined #jruby
skade has quit [Ping timeout: 240 seconds]
rsim has quit [Quit: Leaving.]
kares has quit [Ping timeout: 260 seconds]
cremes has quit [Remote host closed the connection]
cremes has joined #jruby
gaustin has joined #jruby
kares has joined #jruby
josh-k has joined #jruby
kares has quit [Ping timeout: 256 seconds]
gaustin has quit [Quit: gaustin]
kares has joined #jruby
pietr0 has quit [Quit: pietr0]
bb010g has joined #jruby
johnmuhl has joined #jruby
thedarkone2 has joined #jruby
<GitHub51>
[jruby] eregon pushed 1 new commit to master: http://git.io/vEAbH
<GitHub51>
jruby/master 5941f37 Benoit Daloze: [Truffle] Make the Eclipse runner work again.
pitr-ch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eregon>
krainboltgreene: so it's a problem to call some methods on Shadow objects?
<krainboltgreene>
eregon: That's the point. You call methods on the shadow object, that are direct method copies of the source object, but with the shadow object's context.
<krainboltgreene>
ie: You mutate the object graph so that one item has a discount_cents of 100, and so the source's total_cents calculation would be incorrect.
<eregon>
why copy the methods and the classes? How about just having these shadows redirect on a copy of the real class?
<eregon>
why copy the methods and the classes? How about just having these shadows redirect on a copy of the real object (with the same class)?
<eregon>
ah, I tend to forget I cannot edit in IRC :)
ratnikov has joined #jruby
<ratnikov>
howdy folks.
ratnikov is now known as dfr|wfh
rsim has joined #jruby
<krainboltgreene>
eregon: Because then you have the incorrect context.
donV has joined #jruby
<GitHub123>
[jruby] eregon pushed 1 new commit to master: http://git.io/vExnV
<GitHub123>
jruby/master 8dc8ccc Benoit Daloze: [Truffle] Fix last __FILE__ spec.
<krainboltgreene>
Assume `Cart#total_cents` is `items.sum(&:total_cents) - items.sum(&:discount_cents) - discount_cents`.
dfr|wfh has quit [Ping timeout: 245 seconds]
<krainboltgreene>
If the shadow's object graph mutates to give an item discount_cents = 100_00 then the redirect for any call to total_cents. You won't be getting the correct shadow-contextual value.
<eregon>
I don't follow. Would that no work if its exectued on a cart.clone ?
<GitHub145>
jruby/master 33d388a Benoit Daloze: [Truffle] Fix last super spec.
<krainboltgreene>
eregon: Ah, you're saying clone the object using #clone. Yes, it would, however AR doesn't know how to handle the saving of the entire object graph.
<krainboltgreene>
It also doesn't handle syncing back.
josh-k has joined #jruby
<krainboltgreene>
Hmmm. I could clone, forward calls to the clone, and then have sync logic based on the clone though.
<krainboltgreene>
I wonder if Object#clone works with AR objects.
<eregon>
krainboltgreene: it's not deep-cloning so references to other objects would need to be treated specially, but it seems shadows already considers that