mitchellhenke has quit [Quit: Computer has gone to sleep.]
<headius>
temporalfox: hey there
<temporalfox>
headius can we discuss the vert.x / ruby integration ?
mitchellhenke has joined #jruby
skade has quit [Quit: Computer has gone to sleep.]
<headius>
temporalfox: yeah sure
<headius>
what's up? I see there's still a nil issue keeping the updated java_method code from working, but I suspect it's minor
<temporalfox>
headius did someone look at the issue I mentionned with jruby 1.7 + java_method that does not happen with jruby 9k or java_class.declared_method ?
<temporalfox>
headius I mean someone with jruby experience
pjammer has joined #jruby
elia has quit [Read error: Connection reset by peer]
elia has joined #jruby
<headius>
temporalfox: yeah I'm looking at it today
<headius>
interesting that it does not happen with 9k, since this logic should be largely the same
<temporalfox>
headius yes I was puzzled
<temporalfox>
but I mentionned this issue in january too
<headius>
ahh I see
<headius>
it's a global var
<temporalfox>
the thing is that the global var kind of disappear
<temporalfox>
vanish
<headius>
yeah
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] enebo pushed 1 new commit to master: http://git.io/vfQZO
<JRubyGithub>
jruby/master 741efe5 Thomas E. Enebo: Get enough pom.xml to use 1.0.9 of jruby.plugins.version (EE integs do not seem hooked up and I don't want to redden our CI by trying to change them)
JRubyGithub has left #jruby [#jruby]
<temporalfox>
headius can you also make a global review ?
<temporalfox>
headius I'm thinking of the generated code
<temporalfox>
headius the generated yardocs
<headius>
not sure what you mean
<temporalfox>
headius the gem deployment (that uses a small trick that we discussed with the gem load env var)
<temporalfox>
check that the generated code does not have issues
<temporalfox>
that it follows as much as possible ruby idioms
<temporalfox>
also there is the gem deployment
<temporalfox>
I mean deploying a vert.x ruby verticle packaged as a ruby hem
<temporalfox>
(DeployTest#testDeployGem)
<headius>
mmm ok
<temporalfox>
it's more a peer review I would like to have
<temporalfox>
to ensure that ruby developers will have the best experience
<headius>
I can have a look
<headius>
this nil thing is very odd...you load and assign that variable for every test method
pitr-ch has joined #jruby
<headius>
changing it to @obj makes them pass
<headius>
oh I bet I know
<pjammer>
sorry jumping in: addLazyBuiltin("ffi-internal.jar", "ffi-internal", "org.jruby.ext.ffi.FFIService"); is this how ffi-internal.so originally gets requied? i know it may seem random to everyone.
<headius>
there are a number of options for how multiple threads see the scripting engine
<headius>
in this case I'm guessing that globals are being isolated differently on 1.7 versus 9k
<temporalfox>
headius I think this is the same thread though
<headius>
it may be globals isolated on a per-call-into-runtime
<temporalfox>
and that does not happen when "java_class.declared_method" is used instead
<temporalfox>
and that's the exact same tests
<headius>
are you sure? this was not on latest JRuby before either
<headius>
so both jruby and your accessing of those methods have changed
<headius>
and in the intervening versions, I remember a few changes to isolation and lifecycle of script engines
<temporalfox>
so you mean that if I try with jruby 1.7 snapshot and vertx-lang-ruby master that uses java_class + declared_method it should fail ?
<headius>
I don't see why it should pass...the logic for accessing and assigning globals is unrelated to any Java integration
deobalds has quit [Quit: Computer has gone to sleep.]
deobalds has joined #jruby
<headius>
well there's another possible explanation
<headius>
does Testmodel::TestInterface.new(TestInterfaceImpl.new) hit java_method?
deobalds has quit [Client Quit]
donV has joined #jruby
<temporalfox>
what do you mean by "hit" ?
<headius>
well the only way I can see java_method coming into play is if one of those .new() are using your logic
<headius>
otherwise these are just direct instantiations and variable isolation is the likely explanation
<headius>
also made more likely because changing to @obj fixes it
<temporalfox>
funny
<temporalfox>
now I'm checking and the java_class version fails too with nil
<temporalfox>
with 1.7 snapshot
<temporalfox>
as you said
<headius>
ok
<headius>
so this is not going to be a big deal...I'm goign to find the javax.script config property for JRuby Engine stuff to force a specific isolation mode in your tests
<temporalfox>
but it works fine with 1.7.18
<headius>
right...1.7.19 fixed a long-standing issue where scripting engines/containers were sharing too much
<headius>
that's probably the cause
<headius>
your per-test isolation got lucky before
<headius>
9k handles this a bit differently but I'll have to investigate the behavioral discrepancy
<temporalfox>
ok
<temporalfox>
what should I do ?
codefinger has joined #jruby
<headius>
just sit tight :-)
<temporalfox>
cool
colinsurprenant has quit [Quit: colinsurprenant]
camlow325 has joined #jruby
camlow325 has quit [Remote host closed the connection]
camlow325 has joined #jruby
pierreatkillbill has quit [Ping timeout: 256 seconds]
baroquebobcat has joined #jruby
pierreatkillbill has joined #jruby
skade has joined #jruby
rcvalle has joined #jruby
lanceball is now known as lance|afk
<headius>
temporalfox: ok, I have a patch for JRuby that makes them work, but this may be us trying to treat globals the way JSR-223 treats bound values by default
<temporalfox>
I could change my tests if they are doing something wrong
<headius>
223 is kinda focused around languages like JS that have a globally-visible toplevel
<headius>
so it fits weird with ruby
<temporalfox>
for me, it's hard to know who whjat is right / wrong
<temporalfox>
I just know when things don't make sense to me :-)
<headius>
I think we can fix this by having you set a property in your test run
<headius>
yeah, the embed framework works well but there are some peculiar API choices
<temporalfox>
what did not make sense is to have it work with 1.7.18 and not with snapshot
<headius>
yeah I will be doing some root cause investigation so I understand the change
<temporalfox>
so tell me what is the best option to do
<headius>
temporalfox: the simplest might be to just make both of those globals in api_test into instance vars
<headius>
they'll live on Object then and the tests will always see them, since we don't do any isolation at that level
<temporalfox>
so I remove the $ ?
<headius>
replace with @
<headius>
for both of the globals in there
<temporalfox>
but it's a script so I don't get the @
camlow325 has quit [Remote host closed the connection]
donV has joined #jruby
Aethenelle has quit [Ping timeout: 256 seconds]
mysteriouspants has quit [Changing host]
mysteriouspants has joined #jruby
bbrowning_away is now known as bbrowning
_djbkd has joined #jruby
donV has quit [Quit: donV]
camlow325 has joined #jruby
donV has joined #jruby
zorak8 has quit [Quit: Leaving]
camlow32_ has joined #jruby
camlow32_ has quit [Remote host closed the connection]
camlow325 has quit [Read error: Connection reset by peer]
camlow325 has joined #jruby
donV has quit [Client Quit]
<chamila>
Can somebody help me to understand how org.jruby.runtime.Block.yield work? What are the parameters it take, etc.
<headius>
if you want to yield 0-3 arguments you want yieldSpecific usually
<headius>
which has fewer arguments
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] dmityr opened issue #2880: jrubyc does not compile braces http://git.io/vf7z9
JRubyGithub has left #jruby [#jruby]
gazay has quit [Quit: gazay]
<chamila>
headius: block.yield(context, true); I got this to compile, but I don't undersrand what it actually does and what the 2nd parameter stands for
<headius>
the second parameter indicates whether, a single array passed through should be broken up into elements or left as an array
<headius>
you've basically got it, that's all there is
<headius>
in this case you want to yield just the doc, so you'd do block.yieldSpecific(context, doc)
<chamila>
u mean json?
codefinger has quit [Read error: Connection reset by peer]
<kares>
headius: even with upgraded RG 2.4.6 ... all seems fine as much as I tried with AR but I should look at reported issue(s)
<enebo>
headius: hmmm. I need to look now, but I think you are right
camlow325 has quit [Remote host closed the connection]
<enebo>
chamila: ah yeah that is an internalism which we deprecated and stopped using when we knew incoming value was a guaranteed array…although it is extra weird to a yield which takes no args
<enebo>
chamila: poorly written sentence. We do not use this method anymore anywhere and it is even removed in 9k altogether
<chamila>
enebo: I didn't have any clue about what it takes previously, I put 'true', it worked, I thought 'true' is a sent as the arguement, just came to know it is a flag
<enebo>
chamila: you can use yieldSpecific(context) since you know you are passing in a specific amount (e.g. zero args)
<enebo>
chamila: it is giving info about the incoming args (which is none ni that signature)
<enebo>
chamila: which arguably is pretty useless when you are passing in no value
<enebo>
chamila: in any case you should not use that particular method
<enebo>
public IRubyObject yield(ThreadContext context, IRubyObject value) {
<enebo>
chamila: this version will accept that single argument and potentially de-structure it to n parameters if the block expects n parameters and value happens to be an array (or responds to to_ary)
dumdedum has quit [Ping timeout: 272 seconds]
<enebo>
chamila: in general you call this version unless you know for a fact that you have n specific values and then you use yieldSpecific
<enebo>
chamila: yieldSpecific avoid array check costs and does not require your parameters are wrapping in a RubyArray
<chamila>
enebo: ahh okay, so what yield does is it pass this 'value' to block and get the result as does in function? (I was not clear abt this)
<enebo>
s/wrapping/wrapped
<enebo>
chamila: it examines the arity of the block and it examines value itself and it binds the parameters to the block and executes the block
<enebo>
chamila: the return value of the block is the return value
_djbkd has quit [Ping timeout: 250 seconds]
<enebo>
chamila: so block is just anonymous function with special local variable scoping (e.g. it can capture variables from surrounding scopes)
<headius>
kares: that's very good to hear, thank you for trying it
_djbkd has joined #jruby
_djbkd has quit [Read error: Connection reset by peer]
<chamila>
enebo: then I think I should use yield, I'm not yet sure what are the nature of parameters will be passed to the block
_djbkd has joined #jruby
<enebo>
chamila: That means you should use the yield I posted above
<chamila>
enebo, headius : thanks both of you, most of my problems abt yield are sloved I guess
<headius>
excellent :-)
<enebo>
chamila: yieldSpecific is for special cases where you know for sure
<chamila>
enebo : yeah, I'll go with yield
_djbkd has quit [Remote host closed the connection]
shellac has joined #jruby
tcrawley is now known as tcrawley-away
mkristian has joined #jruby
_djbkd has joined #jruby
subbu is now known as subbu|busy
e_dub has joined #jruby
tcrawley-away is now known as tcrawley
e_dub has quit [Client Quit]
jeremyevans has quit [Ping timeout: 240 seconds]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] bjfish pushed 1 new commit to master: http://git.io/vf7bH
<JRubyGithub>
jruby/master 8bb41db Brandon Fish: [Truffle] Add cgi to stdlib.
<pjammer>
any chef fans know if jruby has a default chef jruby recipe? i checked our local cookbook, i think it's using a default one, but may be wrong.
x1337807x has joined #jruby
x1337807x has quit [Ping timeout: 244 seconds]
x1337807x has joined #jruby
yfeldblum has joined #jruby
baroquebobcat has quit [Quit: baroquebobcat]
mitchell_ has joined #jruby
zorak8 has quit [Read error: Connection reset by peer]
zorak8 has joined #jruby
zorak8 has quit [Max SendQ exceeded]
zorak8 has joined #jruby
zorak8 has quit [Max SendQ exceeded]
zorak8 has joined #jruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x1337807x has joined #jruby
yfeldblum has quit [Remote host closed the connection]