<dfr>
Lan5432, no. It's more like method_missing for java :)
<Lan5432>
I don't quite know what that is either, I'm sorry XD
<dfr>
Lan5432, rather, it allows you to return an implementation of an interface that responds to methods by calling a method on supplied InvocationHandler :)
<Lan5432>
How's that "interface that responds to methods"?
<Lan5432>
Sorry for asking this much XD
<dfr>
Lan5432, it's not. It's an implementation of an interface that responds to methods :)
<dfr>
It's the implementation that responds to methods, not interface :P
<Lan5432>
Yeah, sorry I meant that. You mean by reflection?
<dfr>
Lan5432, nope.
<Lan5432>
And how does it respond? What characteristic does it use?
brightball has quit [Quit: Leaving...]
<evenix>
Every response I get from a :post request are gzip compressed in jruby... I can't find an explanation why that started happening
<nirvdrum>
evenix: Is the client setting an Accept-Encoding header?
<evenix>
yes and I wrote a patch to fix one instance of it
<dfr>
Lan5432, So you do something like Foo foo = Proxy.newProxy(..., new Class[] { Foo.class }, myInvocationHandler);
<dfr>
Lan5432, foo now points to an implementation, and you can do foo.foo(), which will trigger a myInvocationHandler.invoke with information aboutthat call.
<Lan5432>
Shouldn't you cast that to (Foo)?
<dfr>
Lan5432, yea, maybe.
<Lan5432>
So this is useful to carry implementations in Proxy?
<dfr>
Lan5432, you'll probably learn best by actually trying to implement it in your code :)
<Lan5432>
Yeah, sorry to bother you with this
<dfr>
Lan5432, Proxy is a pretty nifty tool for pretty specific use-cases. Good thing to keep in mind in the back of your head :)
<Lan5432>
Yeah, I'm still getting around the meaning of using Proxy (because I'm not that used to the term in English)
<Lan5432>
Ah, I still have a lot of work to do until I can help, I guess XD
<GitHub135>
jruby/master ae26075 Charles Oliver Nutter: Update JNR stuff again for bad release of jnr-ffi 2.0.8.
<GitHub115>
[jruby] headius force-pushed test-rubygems-2.6.2 from 8a8cf02 to 77175e4: https://git.io/vaqJD
<GitHub115>
jruby/test-rubygems-2.6.2 77175e4 Charles Oliver Nutter: Add http and https to RG path-splitting regexp.
<kares_>
mkristian: we already shipped jossl with BC 1.54
<kares_>
did that one failure not show up while testing from staging?
<mkristian>
kares_, but not on jruby-17 - but where I stopped yesterday is that the problem does not show on the same test in jruby-9k. did not use stagging - I was not aware that we do jump from 0.9.13 to 0.9.16 on jruby-17 branch
skade has quit [Ping timeout: 268 seconds]
skade has joined #jruby
<kares_>
mkristian: np - i just do not want to revert BC if absolutely not needed
<kares_>
also I'm managing some 2 PRs on jossl - if those could get into the next release so that we do not have one feature releases like the last two :)
e_dub has quit [Ping timeout: 268 seconds]
<mkristian>
kares_, first I will see if I find the difference between jruby-17 and master. the two open PRs might even be related - or was it the extra issue of this guy.
<kares_>
mkristian: haven't looked at the failure ... so should I hold back those merges?
<kares_>
at some point I did a testing branch on jruby-1_7 it just did not get upgraded on the branch
<mkristian>
nono - go ahead
<kares_>
I mean some release beyond 0.9.13 was tested against 1.7
<GitHub111>
[jruby-openssl] kares closed pull request #82: Instantiate both the RSA private and public keys when setting parameters (master...rsa_priv_and_pub_from_params) https://git.io/vaUy7
<GitHub10>
[jruby-openssl] kares pushed 2 new commits to master: https://git.io/vaqTb
<GitHub10>
jruby-openssl/master c106648 Phil Ross: Instantiate both the private and public keys when setting parameters....
<GitHub10>
jruby-openssl/master b0cffd6 Karol Bucek: Merge pull request #82 from philr/rsa_priv_and_pub_from_params...
skade has quit [Quit: Computer has gone to sleep.]
<GitHub181>
[jruby-openssl] kares closed pull request #83: Allow DSA private keys to be initialized from parameters (master...set_dsa_private_key_from_params) https://git.io/vaUSk
<GitHub66>
[jruby-openssl] kares pushed 2 new commits to master: https://git.io/vaqkt
<GitHub66>
jruby-openssl/master e6dcdcf Karol Bucek: Merge pull request #83 from philr/set_dsa_private_key_from_params...
<GitHub66>
jruby-openssl/master d219115 Phil Ross: Allow DSA private keys to be initialized from parameters....
olle has quit [Ping timeout: 250 seconds]
<GitHub130>
[jruby] headius pushed 2 new commits to master: https://git.io/vaqk2
<GitHub130>
jruby/master 61bc7a9 Charles Oliver Nutter: Add hack to our Gem.path_separator regexp for http(s).
<GitHub130>
jruby/master 1cfaf86 Charles Oliver Nutter: Add http and https to RG path-splitting regexp.
<kares_>
see the test_create_with_chain failure now ... ugly but hopefully it can be handled with some pkcs12.rb tuning (hoping its not a BC bug that will force us to downgrade)
<GitHub178>
[jruby] headius force-pushed master from 61bc7a9 to 9169d68: https://git.io/Xb_O8w
<GitHub178>
jruby/master 9169d68 Charles Oliver Nutter: Update JNR stuff again for bad release of jnr-ffi 2.0.8.
tomjoro has quit [Ping timeout: 250 seconds]
<mkristian>
kares_, running the same test manually on master also fails. not sure why the test suite is not failing. still looking - but need breakfast soon ;)
<mkristian>
kares_, I found the reason why we did not see the error on master: in test/mri.index ALL openssl tests are commented out :(
<GitHub137>
[jruby] headius created test-threadlocal-backreflastline (+1 new commit): https://git.io/vaqLh
<GitHub137>
jruby/test-threadlocal-backreflastline def9c87 Charles Oliver Nutter: Try using truly thread-local $~ and $_. No perf testing yet....
thedarkone2 has quit [Quit: thedarkone2]
Liothen- has quit [Quit: The Dogmatic Law of Shadowsong]
Liothen has joined #jruby
<GitHub137>
[jruby] kares commented on commit 2066af4: @headius was wondering if stack-trace is (at all) needed for JIT "not-compilable" exceptions .. https://git.io/vaqq1
<kares_>
mkristian: oh jeez ... that must have come with the ruby-2.3 branch merge
<kares_>
at least I hope
<mkristian>
kares_, we do have those tests on jruby-openssl repo but never run them and they fail there as well. no the commit for the removal is from 2014
<kares_>
mkristian: yep was experimenting with running them - but than we need excludes etc.
<kares_>
as we test against multiple versions - although that could be managed - only test latest
<mkristian>
yes the excludes are missing
<kares_>
believe I run into some hard times with running them from maven and I did not go for the jruby way
<kares_>
I mean using rake/jruby to run the tests
<kares_>
outside maven
<mkristian>
we already a rake test now. so adding one more tasks sounds the way to go
<kares_>
yeah - lost patience with the maven tests at some point :)
<mkristian>
actually I tried `rake test` but it failed with cannot link Java class org.jruby.ext.openssl.x509store
skade has quit [Quit: Computer has gone to sleep.]
<kares_>
still an issue might be that we depend on whatever test/unit is in Ruby
<kares_>
though its using jopenssl.jar already - feel free to update as needed
<mkristian>
kares_, shall let rake build this jar so the `rake test` uses the latest code ? well it will use maven to build it but the rest remains as is for the rake run
<kares_>
mkristian: yep but maybe with file: 'jossl.jar' so its only doing that if its not there
skade has joined #jruby
<mkristian>
ok
<kares_>
going to allow_failures for that 1.7 IT issue on ossl
<kares_>
also wanted to ask - should we add more IT targets against updated BC versions?
skade has quit [Client Quit]
<mkristian>
I would add this test to the excludes.
<mkristian>
I did see that the IT targets do not have the latest BC versions. I could add them and see how they are doing
<GitHub117>
[jruby] kares closed issue #3711: Passing in command line arguments containing "%20n" causes jruby to abort with error "%n in writable segment detected" https://git.io/v2Fmr
subbu has joined #jruby
tenderlove has joined #jruby
skade has joined #jruby
pawnbox has quit [Remote host closed the connection]
olle has joined #jruby
deathy has quit [Ping timeout: 268 seconds]
fidothe has quit [Ping timeout: 268 seconds]
mccraig has quit [Ping timeout: 268 seconds]
bruceadams has quit [Ping timeout: 268 seconds]
guilleiguaran__ has quit [Ping timeout: 276 seconds]
tjohnson has quit [Ping timeout: 250 seconds]
snkcld has quit [Ping timeout: 250 seconds]
aemadrid has quit [Ping timeout: 250 seconds]
zph has quit [Ping timeout: 250 seconds]
andrewvc has quit [Ping timeout: 250 seconds]
deepak has quit [Ping timeout: 260 seconds]
knowtheory has quit [Ping timeout: 268 seconds]
amdprophet has quit [Ping timeout: 268 seconds]
shellac has joined #jruby
chrisseaton has quit [Ping timeout: 240 seconds]
tenderlove has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
subbu has joined #jruby
tenderlove has quit [Remote host closed the connection]
vtunka has joined #jruby
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #jruby
subbu has quit [Ping timeout: 248 seconds]
subbu has joined #jruby
mattwildig has joined #jruby
skade has quit [Quit: Computer has gone to sleep.]
mattwildig has quit [Ping timeout: 240 seconds]
tjohnson has quit [Quit: Connection closed for inactivity]
<GitHub100>
[jruby] eregon commented on commit 3935f7e: This one might be fine, since it can only happen a rather small and fixed number of times and is likely to never happen in compiled code (you would need to call `getEncoding` in the compiled code on an encoding on which `getEncoding` was never called in the interpreter). https://git.io/vaqSB
<GitHub131>
[jruby] enebo commented on commit 2066af4: @kares it has exposed problems in generating bytecode so I think it can have value in development. It also happens off-thread (compilation) so it is less critical and hopefully really uncommon. https://git.io/vamHl
<headius>
kares_: hello there
<philosophia>
when i run it in eclipse it finds the .rb file - but when i run it as a service its unable to find the rb file - i get file not found
philosophia has quit [Quit: Lost terminal]
<headius>
enebo, subbu: foresee any issues if I just made the IR "jump" exceptions extend JumpException?
<headius>
I guess I could look for how we're using JumpException to see if any locations would start catching that didn't before
<enebo>
hmm
<headius>
JumpException just includes the fillInStackTrace override
pawnbox has quit [Remote host closed the connection]
<enebo>
headius: did you add that debug option to it or did subbu?
<subbu>
headius, is JumpException used anywhere in the codebase now?
<subbu>
if not, i would say pick a new name :-)
<enebo>
I thought I killed it
pawnbox has joined #jruby
<enebo>
oh except for specialjump
<headius>
subbu: I need to investigate
<headius>
ahh there's that
pawnbox has quit [Remote host closed the connection]
<enebo>
headius: subbu: I believe it is dead other than that single instance
pawnbox has joined #jruby
<subbu>
ok .. anyway, i suppose creating a superclass of all those.
<headius>
ok
<subbu>
*support
<subbu>
as to the specific class / name .. i'll let you guys figure it out.
<headius>
perhaps it would be better to have something called NoStackTraceRuntimeException :-D
<subbu>
JumpException is kind of an odd name for the current set of subclasses.
<subbu>
:)
<headius>
I have to run, bbiab
<enebo>
shoot I do still have some catches left around the codebase
<enebo>
but I do not think they are used
<enebo>
not many though. I think I was unsure if they were for Special
<enebo>
subbu: well it is simple enough to change this name or make a new common subclass
<enebo>
kares_: it largely has been gone except for the use of SpecialJump
olle has joined #jruby
<kares_>
aha ok - makese sense one never actually catches ... I might have been doing catch(JumpException e) in some native ext
<enebo>
kares_: gah I forgot though we use RaiseException from this
<kares_>
since its a sub-class of RaiseException
<enebo>
kares_: so we may still use it indirecrtly for RaiseException but I think we always catch RaiseException directly
<enebo>
kares_: so there is a small chance we catch JumpException on a RaiseException in a place or two but we should audit those and change to RaiseException
<kares_>
enebo: yep its a sub-class - which confused me at first :)
<enebo>
kares_: I forgot it was also used for Raise I just killed usage of the flowcontrol ones
<kares_>
enebo: yep that's definitely possible
<kares_>
actually its mostly around JRuby's source
<kares_>
do not see it in openssl or arjdbc
<kares_>
or pretty much anywhere else - as much as I have jruby ext projects locally
olle has quit [Ping timeout: 248 seconds]
<enebo>
kares_: yeah I did not look for usages in native extensions but I would hope at least FlowControlExceptions were not used in exts
<enebo>
kares_: RaiseException OTOH I expect some usage
<kares_>
enebo: plenty usage for RaiseException
johnsonch is now known as johnsonch_afk
<kares_>
in exts
<kares_>
enebo: actually there's some Jump usage as well
<kares_>
that filters out jruby.github.io at least
<enebo>
ok so there are a bunch of people who setup essentially a simplified copy of Main
skade has joined #jruby
<enebo>
so much stuff to support
<enebo>
kares_: I guess fwiw we had planned on some stuff breaking
<enebo>
kares_: I think the sampled code I am looking at are all potentially rewritable using ScriptingContainer
<kares_>
yy - if you @Deprecate but leave it in for binary compatibility guess not much people will get hurt
<kares_>
if any at all
<enebo>
kares_: well no except it won’t be doing anything at all
<kares_>
enebo: will still catch RaiseException if by any chance they do catch(JumpException)
<enebo>
kares_: not breaking is good of course but I would also like to help migrate these folks to a more normalized set of APIs
<enebo>
yeah that’s true
<enebo>
but if they used ScriptingContainer they would not need RaiseException
<enebo>
I guess there is a balancing point between keeping it running or breaking for progress without pissing too many people off
<kares_>
enebo: even jruby-rack does not use ScriptingContainer as there were issues compared to instantiating a runtime by hand
johnsonch_afk is now known as johnsonch
<kares_>
but I have not tried refactoring in a looong time
<enebo>
kares_: it would be good to figure out what issues there are so we can try and stuff the genie back in the bottle
<enebo>
kares_: although I have always expected jruby-rack to be more of a neccesary “cheater” extension
<enebo>
kares_: better performance is worth being more brittle
<kares_>
yep will try
<enebo>
kares_: but it would be awesome if we could make ScriptingContainer have no downsides
<enebo>
kares_: fwiw I use ScriptingContainer in Purugin and it largely works I think because it is just a ruby boostrapper
<enebo>
kares_: which I think is probabkly the majority case of embedding (e.g. some Java which bootstraps your Ruby code and the Ruby drives most of your functionality)
<enebo>
although I know we don’t handle optionally NOT converting types via scripting container when you don’t want to go JavaString -> RubyString ->JavaString and stuff like that
<kares_>
enebo: maybe its due issues that we had in the past with setting up LOAD_PATH on various containers
<kares_>
IBM products always require work-arounds :) pretty much every piece DB2/Derby/WebSphere
<kares_>
I came across
<enebo>
ah
<enebo>
yeah JDBC loadpath can get pretty weird
<kares_>
off now - will bounce back later
tjohnson has joined #jruby
<headius>
enebo: yeah, RaiseException < JumpException because we do our own backtrace logic
<headius>
for now maybe it makes sense to just < something new so we don't have collision with old logic handling JumpException
<GitHub156>
jruby/master 28082e3 Charles Oliver Nutter: Add IRJump to localize overridden fillInStackTrace.
<GitHub49>
[jruby] headius commented on commit 2066af4: Superclass introduced in 28082e3. https://git.io/vaYIC
rjmilitante has joined #jruby
<GitHub10>
[jruby] nirvdrum pushed 2 new commits to master: https://git.io/vaYId
<GitHub10>
jruby/master 7ff4055 Kevin Menard: [Truffle] Added a lighter-weight method for cloning a rope with a new encoding.
<GitHub10>
jruby/master d4882b5 Kevin Menard: [Truffle] Re-added a safe transfer.
<rjmilitante>
hi - trying to run jruby.eval() in my code but running into bouncycastle compatability probs jruby.eval(new BufferedReader(new InputStreamReader(getClass().getResourceAsStream("/ruby/lti_outcome_util.rb"))));
<rjmilitante>
using org.bouncycastle:bcprov-jdk15on:1.47
camlow325 has quit [Remote host closed the connection]
tomjoro has joined #jruby
davidpgero has quit [Remote host closed the connection]
<headius>
rjmilitante: looks like a bouncycastle version mismatch in that JVM
<headius>
someone else is using a different version and we're hitting that one
<headius>
rjmilitante: updating that JRuby might help...but you may need to figure out who's pulling in BC
<headius>
enebo: so the RG situation...
<headius>
2.6.2 will work for us with segiddins' patch for the resolver (caused nokogiri install issue) and mine for our path_separator path-splitting regexp
<headius>
but it worries me that we found two regressions in RG in a very short time
<headius>
changes have been more invasive than I expected
<headius>
and there's also tenderlove's patch to encode URLs in gem path
<headius>
mkristian: I saw you had my concern about that one
<kares_>
enebo: headius: you guys considering extends JumpException for the new ir internal ones?
<enebo>
headius: yeah
<headius>
kares_: I decided not to because it would mean code that isn't catching IR jumps would start doing so
<headius>
and probably not handling them right
<enebo>
yeah exactly the problem
<headius>
they don't have the same bounds as the old JumpExceptions did because we handle them more efficiently
<kares_>
so will there be an API for users who'd like to catch() a ruby throw :xxx in Java e.g. with ScriptingContainer?
<kares_>
... or will they have to resort to ir internals?
camlow325 has joined #jruby
norc has joined #jruby
<headius>
there's no official API right now but throws are propagated with a RubyContinuation.Continuation throwable right now
<headius>
catch that and you'll intercept throws
<kares_>
i see there's org.jruby.ir.runtime.IRJump now
<headius>
I have no idea what Continuation looks like if it bubbles out of ScriptingContainer
<headius>
that would seem to be a peculiar situation
<kares_>
its just that i've seen libraries use thow :smt expecting Ruby catch {} at a higher level
<headius>
indeed
<headius>
but I think we check for that
<kares_>
not using that myself - just asking
<headius>
throw without catch or something
<kares_>
so that you can explain smt to those folks if they come up :)
<headius>
yeah
<headius>
hopefully those never leave Ruby
<headius>
most of the time they should be ignored
<headius>
and any code that calls into Ruby should have finally logic in case something bubbles out
<kares_>
oki than - sounds reasonable to me
<GitHub165>
[jruby] enebo pushed 1 new commit to jruby-1_7: https://git.io/vaYZ5
<GitHub165>
jruby/jruby-1_7 8fc8d87 Thomas E. Enebo: Let's try a two-line script on appveyor
<kares_>
btw. did jrubyc always include the original .rb source?
<kares_>
somehow do not recall seeing it the 1.7 days
<kares_>
in the .class
<headius>
jrubyc --java always did
<headius>
it was a hack to avoid compiling in the root run-through of the file along with all the metaprogramming involved
thedarkone2 has joined #jruby
<headius>
a jrubyc --java class just executes the full script once in its static init, so that the Ruby structures are all metaprogrammed into place
<kares_>
headius: without looking ... is jrubyc --java output always what javac ends up compiling (even when there's no --java) right?
<headius>
yes
<kares_>
oki
<kares_>
thx
<headius>
--javac just adds the additional step
<kares_>
though so
<headius>
incidentally, the current --java output is not really practical for use, since it doesn't handle multiple files, multiple classes, etc
<headius>
I'd love to come up with something comprehensive
<kares_>
was just asking since I hear the motivator being to obfuscate - but hey the .rb source it still there if I want it :)
<headius>
yeah I wouldn't recommend it for obfuscation
<kares_>
although I won't say it in public - so that folks still enjoy a good night' sleep
<headius>
if we kept the feature around it could be serialized IR, though, and that would be pretty hard to reverse
<headius>
normal jrubyc is the actual bytecode in 1.7 and the serialized IR in 9k
<GitHub139>
[jruby] jsvd closed issue #3715: using explicit return with external reference from define_method is 66x slower on 9k https://git.io/v2pVw
<GitHub183>
[jruby] headius reopened issue #3715: using explicit return with external reference from define_method is 66x slower on 9k https://git.io/v2pVw
tenderlove has joined #jruby
<mkristian>
headius, yes, the GEM_PATH escaping will break at two libraries I know of. added the links to these libraries to the PR of rubygems
shellac has quit [Quit: Computer has gone to sleep.]
<evenix>
nirvdrum: thanks. ok I'll try jvisualvm.. if YourKit is much better maybe its worth the $
<nirvdrum>
I'd try both and see what you like. They overlap a lot but each have some unique functionality as well.
<nirvdrum>
I've never used the eclipse memory analyzer that headius suggested, but he generally knows what he's talking about.
<headius>
generally
<nirvdrum>
Heh.
<nirvdrum>
I.e., he's probably analyzed more JRuby memory heaps than everyone else in the world combined.
<evenix>
:) i'll try them all ha
<nirvdrum>
s/memory heaps/heap dumps/
<evenix>
just started with jvisualvm
<evenix>
even tho I set up my max at 2g its still display ~524 in jvisualvm
<evenix>
mm
Aethenelle has joined #jruby
<evenix>
ok better i passed them inline.. ok lets see. A way to visualize the heap is definitely helpful
<nirvdrum>
You're going to want to look at the detail pane showing retained reference sizes and such.
<lopex>
I see a lof of numbers
<lopex>
but not the ones I expected
mkristian has joined #jruby
<evenix>
nirvdrum: im looking at the 'monitor' window. I got this 'Global action exception caught: GC overhead limit exceeded;' but my heap looked fine. Metaspace uses is ~max but thats normal since jruby take advantage of the space it has right?
<GitHub98>
[jruby] nirvdrum pushed 3 new commits to master: https://git.io/vaOUO
<GitHub98>
jruby/master 720234c Kevin Menard: [Truffle] Avoid allocating simple ByteLists in the `string_index` primitive.
<GitHub98>
jruby/master 2184cb1 Kevin Menard: [Truffle] Avoid allocating simple ByteLists in String#<=>.
<GitHub98>
jruby/master c590cd5 Kevin Menard: [Truffle] Avoid allocating simple ByteLists in the `io_fnmatch` primitive.
<GitHub134>
[jruby] enebo pushed 1 new commit to jruby-1_7: https://git.io/vaOTl
<GitHub134>
jruby/jruby-1_7 8097d27 Thomas E. Enebo: Whoops we need a jruby build before we can run mri tests on jruby
camlow325 has joined #jruby
camlow325 has quit [Remote host closed the connection]
camlow325 has joined #jruby
camlow32_ has joined #jruby
camlow325 has quit [Read error: Connection reset by peer]
camlow32_ has quit [Read error: Connection reset by peer]
<rjmilitante>
so when i try to jruby.eval() my ruby script from java 1.7 - i get org.jruby.exceptions.RaiseException: (LoadError) load error: openssl -- java.lang.SecurityException: class "org.bouncycastle.asn1.DEREncodable"'s signer information does not match signer information of other classes in the same package
<rjmilitante>
jruby 1.7.2 bcprov.1.4.8
camlow325 has joined #jruby
<rjmilitante>
would i be able to resolve this problem if i install jruby-openssl?
<evenix>
nirvdrum: Adding -J-Xreify.classes=true didn't work by the way but jvsiualiser has an option to profile the classes
<nirvdrum>
It should make a lot of the byte[] reify into their Ruby class names.
<nirvdrum>
Unless that changed in 9k and I missed it.
shellac has quit [Quit: Computer has gone to sleep.]
<evenix>
what i find weird is that my heap max size shows 200MB instead of 2G or 2000GB