<waynr>
anyway, neither calling Jars.freeze_loading nor setting JARS_NO_REQUIRE in the scripting container environment seems to avoid JRuby/jopenssl attempting to load the embedded BC 1.47 jar
<waynr>
the only success i've had so far is overwriting META-INF/jruby.home/lib/ruby/shared/jopenssl/load.rb and commenting out the require_jar lines
<waynr>
this is all using JRuby 1.7.15 which depends on jar-dependencies 0.0.9 which as far as I can tell inspecting the final uber jar does contain the JARS_NO_REQUIRE behavior
<waynr>
however, there is no 0.0.9 tag on the jar-dependencies github repo so it's more difficult to pinpoint exactly which commit 0.0.9 refers to
<waynr>
i'll probably file a bug tomorrow morning unless you have some advice
<Antiarc>
waynr: I don't have an immediate answer, but I'd suggest that jruby may fail catastrophically if the version of bouncycastle it's built against isn't the version that gets loaded
<Antiarc>
ie, if any method signatures have changed or there are different side effects, etc
<Antiarc>
(jar dependencies are a giant pain in the ass right now)
<waynr>
also, I was able to get JRuby/openssl to run without loading the embedded jar, it even did a bunch of ssl-y things
<waynr>
by overwritting the jopenssl load.rb in my uberjar with one that doesn't even try loading the embedded jars
<tcrawley>
I'm using jruby from java, and am pulling in a gem as a maven artifact via the torquebox rubygems proxy. is there a way I can require that gem in ruby when it's on the java classpath, and not on jruby's load path?
<Antiarc>
tcrawley: You could look it up on the classpath and then manually specify the path to it in the require, but I don't think jruby is going to search the classpath for a given file
<Antiarc>
require '/foo/bar/baz.rb' is fine
<tcrawley>
right now, all I have is a .gem file in ~/.m2. I expect I'll need to `gem install` that first
<tcrawley>
Antiarc: thanks
<Antiarc>
yeah, it'll have to be unpacked, you can't load a .gem file directly like you can a jar, afaik
<Antiarc>
You can also modify the Ruby load path at runtime -- $: << "/some/path" will push that onto the load path
<tcrawley>
right - I'll probably install the gem locally as part of the build, then jar that path up as part of the final artifact
<Antiarc>
You might look at bundler - you can use it to manage load paths for project-local gems pretty easily
<Antiarc>
You'd have a gemfile and a list of sources (which may be a custom gem server or whatnot, if you want), and `bundle install --deployment --path=vendor/bundle` would install the gems under vendor/local, and then using Bundler.setup and Bundler.require in your jruby would mangle the load path to point to those gems
<Antiarc>
So if you just invoke bundler as part of your build step it could automatically manage it for you
<tcrawley>
yeah, that's not a bad idea
<Antiarc>
The Gemfile can't take a .gem file as a gem source unfortunately, but you can point it to a path for a gem, or use a custom gemserver
<Antiarc>
So, lots of options in how it gets build
paulswilliamsesq has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
skade has quit [Read error: Connection reset by peer]
skade has joined #jruby
skade has quit [Read error: Connection reset by peer]
benlovell has quit [Ping timeout: 255 seconds]
benlovell has joined #jruby
paulswilliamsesq has joined #jruby
zorak8 has quit [Ping timeout: 245 seconds]
zorak8 has joined #jruby
anaeem1 has quit [Remote host closed the connection]
anaeem1_ has joined #jruby
anaeem1_ has quit [Remote host closed the connection]
anaeem1 has joined #jruby
Aethenelle has joined #jruby
bbrowning is now known as bbrowning_away
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] mkristian pushed 1 new commit to jruby-1_7: http://git.io/8g9mrw
JRubyGithub has left #jruby [#jruby]
<JRubyGithub>
jruby/jruby-1_7 069a1b8 Christian Meier: [build] split some runs to ensure nothing hangs...
|jemc| has joined #jruby
<|jemc|>
chrisseaton: curiosity: what C grammar is truffle using for its C interpreter?
yfeldblum has joined #jruby
benlovell has quit [Ping timeout: 244 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
brettporter has joined #jruby
mamantoha_ has quit [Ping timeout: 258 seconds]
calavera has joined #jruby
brettporter has quit [Ping timeout: 255 seconds]
zorak8 has quit [Ping timeout: 265 seconds]
paulswilliamsesq has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
baroquebobcat has quit [Quit: baroquebobcat]
diegoviola has joined #jruby
Hobogrammer has joined #jruby
skade has joined #jruby
<waynr>
mkristian: i understand, the lack of a 0.0.9 commit tag isn't a huge deal i was just pointing out it's hard to figure out which version of the git repository it corresponds to for the sake of sharing links
<mkristian>
waynr, ok
<waynr>
also, now that you're active if you have any advice for preventing the loading of the embedded jar, i'd appreciate it :)
<mkristian>
hmm, actually you said this freeze and JARS_NO_REQUIRE did not help. which is kind of surprising. let me see the source maybe it is less surprising then
<waynr>
so i don't know if that's the same as jruby-complete-1.7.15
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
frobs has quit [Quit: Leaving]
<mkristian>
the META-INF/jruby.home from jruby-complete and jruby-stdlib are the same and that is where the JARS_NO_REQUIRE is used or in your case gets ignored
<waynr>
yeah i've inspected the uber jar and found jar-dependencies there. also, the stacktrace whenever we attempt to exclude the bouncycastle 1.47 jars occurs whenever the require_jar method of jar-dependencies is called
<waynr>
which is what led me to look into jar-dependencies and learn about the JARS_NO_REQUIRE variable
<mkristian>
what works as expected is ```JARS_NO_REQUIRE=true java -jar jruby-complete-1.7.15.jar -e 'require "openssl"'```
<mkristian>
does the stacktrace look the same with and without JARS_NO_REQUIRE set ?
<waynr>
i'll have to experiment with that, i didn't keep copies of the log files and i never compared them directly before
<mkristian>
but if could show one or the other might help.
mamantoha has joined #jruby
<mkristian>
did you set JARS_NO_REQUIRE to 'true' - it is important that this is a String and not a boolean
<|jemc|>
in the end it needs to be a PEG to integrate with my other PEGs so that languages can be mixed inline, but those two grammars combined shouldn't be too hard to PEGify
<chrisseaton>
|jemc|: oh are you looking at composed grammars? That's interesting - what for? I wrote my masters thesis on that - composing Fortran, SQL, Python etc
<|jemc|>
include not only composable grammars but also runtime-mutability and creatin of the grammars
<|jemc|>
for no practical or commercial reason other than that it sounds like fun :)
<chrisseaton>
|jemc|: yeah - I did mutable grammars - and you could build up languages in terms of each other - it was really fun - ended up being extremely slow though - have you seen http://www.chrisseaton.com/katahdin/?
<|jemc|>
but these days for my work I'm having to write a lot of C code and I'm dreaming up a few ways to optimize my work by being able to write C code inline with a declarative context that will pre-process the C and surround it with all of the boilerplate and header stuff I don't want to deal with
<|jemc|>
chrisseaton: no I have not seen it
<|jemc|>
I'll take a look
<|jemc|>
the first iteration of pegleromyces is indeed slow, but I've started work on another strategy inside the same repo based on brixen's work on pegarus
<|jemc|>
that is, compiling a lean parser of rbx bytecode
josh-k has quit [Remote host closed the connection]
<|jemc|>
it's working at pretty usable speeds now, but I'm running into the problem of how best to package and reuse the compiled bytecode so I don't have to wait for the grammar to compile every program run
<chrisseaton>
|jemc|: my problem was the massive backtracking sometimes required when grammars were composed arbitrarily
josh-k has joined #jruby
<|jemc|>
chrisseaton: ah, well I haven't gotten to the composing yet :)
<|jemc|>
but my current thought for how it will work is that the parser will know for sure when it is switching grammars
<|jemc|>
so the only reason the grammar needs to be composed is so that it knows when the inline code block is done without using ugly heredoc-style terminators
marr has quit [Read error: Connection reset by peer]
<chrisseaton>
|jemc|: that would make it much simpler - I was aiming for allowing you to just start writing in a different language and for it to realise that - and if there was ambiguity you had to add a marker, but that was rare
<|jemc|>
so, in that paradigm, having to backtrack "out of a grammar" would be a syntax error instead of a valid backtrack
<|jemc|>
yeah
<chrisseaton>
|jemc|: yeah I'd like to fork the JRuby parser and add support for inline C without having to write in string literals or heredocs
<|jemc|>
in my paradigm, the inline blocks always exist inside a myco "meme" (closure), and the parser knows the "category" the meme is at parse time and can choose the correct internal grammar
josh-k has quit [Ping timeout: 244 seconds]
<|jemc|>
so you don't necessarily need an explicit marker, it just needs to be in the right "category" of your object declaration
iamjarvo has joined #jruby
<|jemc|>
anyway, I'll be sure to take a look at your katadihn project and see what I can glean
<|jemc|>
it's nice to know other people think such pursuits are worthwhile :)
havenwood has quit [Remote host closed the connection]
lance|afk is now known as lanceball
brettporter has joined #jruby
noop has joined #jruby
brettporter has quit [Ping timeout: 272 seconds]
mister_solo has joined #jruby
mister_solo has quit [Ping timeout: 272 seconds]
purplefox has quit [Ping timeout: 264 seconds]
noop has quit [Ping timeout: 255 seconds]
<nirvdrum>
Am I nuts or does the version string not respect "-X" options?
purplefox has joined #jruby
auxbuss has joined #jruby
anaeem1 has quit [Remote host closed the connection]
paulswilliamsesq has joined #jruby
marr has joined #jruby
calavera has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zorak8 has joined #jruby
zorak8 has quit [Max SendQ exceeded]
zorak8 has joined #jruby
Eonwe has quit [Quit: leaving]
<chrisseaton>
nirvdrum: can you give an example of what you mean?
yfeldblum has joined #jruby
<nirvdrum>
ruby -X-C -v
<nirvdrum>
That always prints out +jit in the version string for me.
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<nirvdrum>
I think it's not looking at the parsed options for compile mode.
<chrisseaton>
I always thought that meant it 'could jit if it wanted to'
<chrisseaton>
But now I realise that doesn't make much sense
<chrisseaton>
--dev makes it change
iamjarvo has joined #jruby
<nirvdrum>
ruby -Xcompile.mode=OFF -v
<nirvdrum>
That doesn't have it.
Eonwe has joined #jruby
<chrisseaton>
Maybe these options haven't been plugged back in after they removed the old JIT
<nirvdrum>
I don't think that's it. I'm pretty sure it's just taking the default compile mode unless that option has been explicitly overridden.
<nirvdrum>
And the -X types are handled differently.
<nirvdrum>
I see the same thing with 1.7.x and just never realized it.
<nirvdrum>
I have an idea of a fix, but I seem to recall enebo wanting to take a wider pass at those short-hands.
<chrisseaton>
Yeah the IR options are still separate, which isn't needed any more
<nirvdrum>
This came about when I was surprised that "-X+T" still printed out "+jit"
havenwood has joined #jruby
tcrawley is now known as tcrawley-away
<waynr>
mkristian: hey I finally compared the stacktrace when using JARS_NOT_REMOTE=true vs not using that variable and the stacktraces appear to be the same
<waynr>
er
<waynr>
s/JARS_NOT_REMOTE/JARS_NO_REQUIRE/
<mkristian>
ok and the true is "true" - I guess ?
<waynr>
yeah
elia has joined #jruby
tcrawley-away is now known as tcrawley
<waynr>
i'll work on debugging a little more, there could still somehow be code filtering environment variables, or there might be a more appropriate place to actually run Jars.freeze_loading
calavera has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zorak8 has quit [Ping timeout: 244 seconds]
paulswilliamsesq has quit [Client Quit]
calavera has joined #jruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
purplefox has quit [Ping timeout: 258 seconds]
drbobbeaty has joined #jruby
donV has quit [Quit: donV]
purplefox has joined #jruby
elia has quit [Quit: Computer has gone to sleep.]
<waynr>
mkristian: hey i just discoverd a flaw in my package testing workflow that was preventing local .m2 installs of puppet-server from ending up in the OS packages i was testing with, so whenever I tried setting JARS_NO_REQUIRE that change was not ending up on the integration testing VM
<waynr>
sorry for wasting your time with that, it looks like JARS_NO_REQUIRE does work
<mkristian>
waynr, np - happy that JARS_NO_REQUIRE works and helps in your situation
ludyte has joined #jruby
<waynr>
thanks for your help!
<Antiarc>
Man, I hate those
<jeremyevans>
Looks like jdbc-sqlite3 was just updated yesterday. When trying it, I now get Error opening connection, see http://pastie.org/9733251
<jeremyevans>
Just wondering if anyone else is experiencing this issue
<jeremyevans>
Looks like it might be specific to OpenBSD or JDK version, since it is apparently working in Windows
lanceball is now known as lance|afk
bbrowning is now known as bbrowning_away
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mkristian has quit [Quit: bye]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] mkristian closed issue #2219: JRuby Complete 1.7.16.1 does not move asm to other package http://git.io/Z9Z6Rw