skade has quit [Quit: Computer has gone to sleep.]
e_dub has quit [Quit: Leaving]
benlovell has joined #jruby
mdedetrich has joined #jruby
mdedetrich has quit [Client Quit]
nateberkopec has joined #jruby
bbrowning_away is now known as bbrowning
dinfuehr has joined #jruby
dinfuehr has quit [Ping timeout: 244 seconds]
nirvdrum has joined #jruby
cristianrasch has quit [Quit: Leaving]
skade has joined #jruby
cristianrasch has joined #jruby
tcrawley-away is now known as tcrawley
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] kares pushed 3 new commits to jruby-1_7: http://git.io/vOHeM
<JRubyGithub>
jruby/jruby-1_7 c2ba465 kares: little BacktraceData#transformBacktrace cleanup
<JRubyGithub>
jruby/jruby-1_7 68c735b kares: avoid Pattern compiling on every BacktraceData construction - use startsWith
<JRubyGithub>
jruby/jruby-1_7 5df5491 kares: avoid (expensive) replaceAll when char replace is possible
JRubyGithub has left #jruby [#jruby]
Aethenelle has joined #jruby
dinfuehr has joined #jruby
dinfuehr has quit [Ping timeout: 272 seconds]
pitr-ch_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hearn has joined #jruby
<hearn>
hello. does anyone know what the absolute minimum code footprint required is, to run some ruby code? it's OK if it's pre-compiled/converted to bytecode, for example. i ask because there is a guy on the openjfx-dev list who is using ruby code cross-compiled to javascript inside a webkit instance (!) because he doesn't want to take a 30mb download hit for bundling jruby in his app
<hearn>
seems like it should be possible to run ruby with less code than that
<nateberkopec>
hearn: that's a cool question. no idea how to answer that but I like it.
<headius>
hearn: well, the JRuby runtime plus the stdlib is not a small jar, but it's not 30MB
<hearn>
yeah i think this guy probably just assumed the download size == runtime size.
<hearn>
is it possible to make jruby pre-compile to bytecode and then use e.g. proguard on the result to get rid of the bits of the stdlib that aren't used?
pitr-ch has joined #jruby
<hearn>
i realise these are n00b questions. i'm not really a ruby user myself. just wanted to help out this poor guy on the mailing list
<headius>
not really, because most of that would be loaded dynamically...proguard can really only remove code safely if it can see it being used statically
<headius>
jruby-complete for 9k is 19MB, which would probably compress to 10MB with pack200
<headius>
and generally the source code is much smaller than the compiled bytecode
<hearn>
the library in question is called AsciiDoctor.
<hearn>
i guess the "use a bit of ruby code in my java app" is quite a good/common use case for jruby
<hearn>
it'd be neat if there was a way to optimise the deployment size. at least for desktop apps, it matters. not on the server side so much of course
<headius>
yeah, we have wanted to put together a way to ship only the parts of JRuby you need, since there are many libraries never touched by small apps
<headius>
it is a fairly large platform
<hearn>
i suppose the very dynamic nature is an issue there.
<hearn>
you can't statically analyse what a piece of code actually needs
benlovell has quit [Ping timeout: 265 seconds]
AnoHito_ has joined #jruby
benlovell has joined #jruby
<headius>
that's right
AnoHito has quit [Ping timeout: 265 seconds]
<headius>
there has been an effort recently to move more of the libraries into gems, which can help...but you still have to do a bit of guesswork to know what third-party code will use
AnoHito has joined #jruby
AnoHito_ has quit [Ping timeout: 244 seconds]
<kares>
headius: merging jruby-1_7 changes ... is it intentional that JRubyApplet is gone on 9K or did I miss smt?
<headius>
I noticed that too...I think we deleted it because people don't do applets anymore
<headius>
I fixed that bug only to shut down an old issue
<enebo>
headius: yeah I guess we should run the planet on this one :)
benlovell has quit [Ping timeout: 250 seconds]
rsim has quit [Quit: Leaving.]
<headius>
enebo: that's for sure
<headius>
I'm debating whether I should keep the non-checked versions in RubyObject, so at least down-hierarchy from that nothing would change behaviorally
pietr0 has joined #jruby
benlovell has joined #jruby
lucasallan has joined #jruby
skade has quit [Quit: Computer has gone to sleep.]
<headius>
yeah I'm going to do that
<headius>
I don't like the duplication but it's far less risky
<JRubyGithub>
[jruby] bbrowning opened pull request #3228: Fix an embedded runtime memory leak in Java7ClassValue (master...classvalue-runtime-leak) http://git.io/vOQ1D
JRubyGithub has left #jruby [#jruby]
<bbrowning>
enebo: ^^^ is the Java7ClassValue memory leak I mentioned yesterday
<bbrowning>
it's a runtime leak in embedded cases - no runtimes ever get GC'd if Java7ClassValue is used without this change
pitr-ch has quit [Ping timeout: 240 seconds]
<headius>
bbrowning: good find
<bbrowning>
headius: once you flipped it to be enabled by default it was pretty easy to track down :)
<bbrowning>
that PR adds a fairly basic embedded runtime leak spec to spec/regression to hopefully pick up any future issues
<headius>
strange though
<headius>
this might be a bug in java's ClassValue
<headius>
we're not holding on to anything statically, right?
<bbrowning>
we are not, no
<bbrowning>
how good is the GC at resolving circular strong references?
keeguon has quit [Ping timeout: 246 seconds]
<headius>
I would have expected this to work like ThreadLocal, where if the ThreadLocal object goes away, even if the thread is still alive, the reference goes away too
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bbrowning>
I think what's happening is we stuff RubyClass in the ClassValue proxy and that RubyClass instance holds strong references to a runtime, which holds strong references to a JavaSupportImpl, which holds strong references to Java7ClassValue instances, which hold the original RubyClass
<headius>
right, but that should still be tied to the instance of ClassValue and not rooted by the Class
pitr-ch has joined #jruby
<headius>
or at least that's what I would expect
<bbrowning>
the path to GC roots from heaps make me think ClassValue is doing something a bit odd here
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] mkristian created test-build (+1 new commit): http://git.io/vOQyW
<JRubyGithub>
jruby/test-build 223456c Christian Meier: use ruby dsl POMs on maven integration tests
JRubyGithub has left #jruby [#jruby]
<headius>
in fact if this is expected behavior of ClassValue it makes it far less useful to us and we might as well use our own
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] mkristian closed issue #2913: Some File::Stat operations don't work for Oracle JDK http://git.io/vJ7ab
camlow32_ has quit [Remote host closed the connection]
puppeh has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] mkristian force-pushed test-build from 223456c to 13adce8: http://git.io/vO7FV
<JRubyGithub>
jruby/test-build 13adce8 Christian Meier: use ruby dsl POMs on maven integration tests
JRubyGithub has left #jruby [#jruby]
camlow325 has joined #jruby
iamjarvo has joined #jruby
camlow325 has quit [Remote host closed the connection]
<puppeh>
any ideas why the same code `::Socket.unix('/tmp/foo.sock)` works on MRI but fails on jRuby with "IOError: /tmp/foo.sock: Name or service not known"
<puppeh>
?
iamjarvo has quit [Read error: Connection reset by peer]
camlow325 has joined #jruby
iamjarvo has joined #jruby
<headius>
puppeh: what version of JRuby?
<headius>
the shortcut methods in Socket for different types of sockets are not all implemented, but they could be
<headius>
I guess I wonder why you wouldn't just use UnixSocket.new('/tmp/foo.sock')
<headius>
(and I'm assumimg foo.sock does exist)
<puppeh>
jruby 1.7.19 (1.9.3p551) 2015-02-04 32f5af0 on Java HotSpot(TM) 64-Bit Server VM 1.8.0_31-b13 +jit [linux-amd64]
camlow325 has quit [Remote host closed the connection]
camlow325 has joined #jruby
e_dub has joined #jruby
camlow325 has quit [Remote host closed the connection]
bbrowning has quit [Ping timeout: 244 seconds]
bbrowning has joined #jruby
kares has quit [Remote host closed the connection]
<headius>
rtyler: +1
pitr-ch has quit [Ping timeout: 260 seconds]
<puppeh>
headius: having another problem now, (UNIXSocket#new works): I'm doing things like: `sock.setsockopt(Socket::SOL_SOCKET, Socket::SO_RCVTIMEO, foo) `
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<puppeh>
and this gives: `Errno::ENOPROTOOPT: Protocol not available - Protocol not available`
balo has quit [Ping timeout: 244 seconds]
<headius>
ahh...sockopt stuff...hmmm
<headius>
is it possible for you to try this with jruby-9.0.0.0 and see if it's better?
<headius>
we have gotten more socket options to work but we're somewhat limited by the JDK
<headius>
for UNIX sockets, however, we *should* be able to support almost all of them
<puppeh>
not sure if this is an option, I'm trying this on an open source project in travis :/
<puppeh>
so I think this has to be jruby 1.7
<headius>
jruby-9.0.0.0 should be available on travis
<puppeh>
ok will try it
<puppeh>
I mean that this is a gem that might have as a requirement to run on jruby versions older than 9.0.0.0
<jamiejackson>
hi folks. i'm dusting off an old project, whose jruby i'd locked in with rvm, and whose gems i'd locked in with Gemfile and Gemfile.lock...
kstuart has quit [Ping timeout: 272 seconds]
<jamiejackson>
now when i run: bundle exec rake db:schema:load
<jamiejackson>
so i put all of this junk into vagrant a couple months back, and everything seemed to work then. i just ran the vagrant build again. i haven't updated anything, same old stuff.
<jamiejackson>
but now i get this issue
donV has joined #jruby
<enebo>
nirvdrum: chrisseaton: I have an issue with a change I want to make
<donV>
Hi all!
<jamiejackson>
with therubyrhino, does one also need node installed on the OS?
<enebo>
nirvdrum: chrisseaton: I removed newline node BUT truffle depends on it. So every node now potentially is node.isNewline() so in your visitor I think every visitor should be doing this to keep working but I do not want to change that much code (or not without some advice)
pitr-ch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bbrowning>
jamiejackson: you don't also need node unless you're setting the environment variable EXECJS_RUNTIME manually to a value of 'Node'
DomKM has joined #jruby
camlow325 has joined #jruby
pitr-ch has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] kares closed issue #3220: RubyInstanceConfig#setupEnvironment throws AccessControlException on Windows http://git.io/vOEjV
JRubyGithub has left #jruby [#jruby]
<jamiejackson>
okay, thanks for that, bbrowning. still need to know why i'm getting "Could not find a JavaScript runtime." even with "therubyrhino" gem installed
camlow325 has quit [Read error: Connection reset by peer]
<bbrowning>
jamiejackson: literally nothing has changed with the app?
<bbrowning>
exact same Gemfile.lock?
<jamiejackson>
yeah, bbrowning, same Gemfile.lock
camlow325 has joined #jruby
<jamiejackson>
and no. i see from the SVN history that nobody has touched it.
<headius>
I have no ideas...might have to dig into the wrapper lib and see if there's an error it is swallowing
<jamiejackson>
this has a pile of upvotes, and it *is* ubuntu that i'm running with vagrant, but it contradicts what bbrowning just asserted: http://stackoverflow.com/a/9333316/1026263
<jamiejackson>
i mean it's conceivable that when i put this in vagrant, i had installed node outside of vagrant and forgot to include it in the provisioning... dunno
<jamiejackson>
but i want to do as little as possible. way back, i spent forever finding the perfect combo of gems that would deploy properly to glassfish. it was tons of trial and error to get to the Gemfile and Gemfile.lock I have now.
<jamiejackson>
s/perfect/exact/
rsim has quit [Quit: Leaving.]
<bbrowning>
jamiejackson: what's your host OS machine?
camlow325 has quit [Read error: Connection reset by peer]
camlow325 has joined #jruby
<bbrowning>
linux as well?
<jamiejackson>
this is all running in an ubuntu 12.04 guest (a vagrant-managed VM). my host is windows, but I don't think that matters.
mkristian has quit [Quit: Ex-Chat]
<bbrowning>
jamiejackson: I asked because it would matter if you're generating the Gemfile.lock on say Windows
<bbrowning>
vs linux
<bbrowning>
s/would/could/
<jamiejackson>
i see, bbrowning. all linux here.
<jamiejackson>
i'm just trying a few things to see what happens. i installed nodejs on the OS, for kicks, and that seemed to get me past that error, but now it is showing: ==> default: rake aborted!
<jamiejackson>
==> default: /home/vagrant/.rvm/gems/jruby-1.6.5.1@cwo_data_rails_3.2/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require': no such file to load -- jopenssl
<jamiejackson>
==> default: Tasks: TOP => environment
<chrisseaton>
enebo: I think we can cope with that
<chrisseaton>
What's wrong with newline node? Just overhead?
<jamiejackson>
but i'm even more at a loss as to why this stuff is breaking.
lanceball is now known as lance|afk
<bbrowning>
jamiejackson: if this all worked before, obviously something has changed in the environment since last time
<jamiejackson>
bbrowning: i agree, but what's aggravating is that this was all supposed to be disposable and re-provisionable (with vagrant) at any time. i locked in the jruby version with rvm, locked in the gems with Gemfile & Gemfile.lock, and i thought i'd be locked in, as far as environment goes
<jamiejackson>
even if i changed OSes, i'd still be insulated from change by those locks... or so i thought
<enebo>
chrisseaton: ok. I will push it then. I think making translate accept Node would probably allow you to add the newline handling logic per call but it will be changing lots of calls
<enebo>
chrisseaton: It reduces memory
<enebo>
chrisseaton: we do not generate IR for uncalled methods so they stick around in memory
<enebo>
chrisseaton: newline node is the #1 node in the tree so removing it is a nice savings
<jamiejackson>
i'm going further down a rabbit hole. so now i've allowed it to get a newer jruby-openssl, based on the last error. now i get: no such file to load -- jruby
<nirvdrum>
We used it to demarcate a new sequence. How are you doing that for IR?
<enebo>
if you look in IRBuilder.biuld() we just have the logic there
<enebo>
but our builder calls through a common method for all nodes
<jamiejackson>
this might be a dumb question, but my issues: could they possibly be from having a newer version of bundler now? i mean, that's the one thing that *doesn't* get locked in
<rtyler>
headius: I went ahead and sent the PR for your change on #3602, not sure what the test failures might mean
<enebo>
jamiejackson: It would not surprise me but I cannot say why it would make a difference
<enebo>
jamiejackson: the only other random thought on that was if you updated something in the image itself like package updates…I could see native not loading or some env issue like that messing things up too
<enebo>
nirvdrum: you will notice in that patch removing newline also seemed to remove a lot of hinky special cases
<nirvdrum>
Yeah.
<enebo>
anyways I can delay this a day or so if you want to figure out how to support this change
<nirvdrum>
I'm just trying to think of how to handle our visitNewlineNode logic.
Aethenelle has quit [Quit: Aethenelle]
<enebo>
I think you do some return handleNeeline(node, new NextNode(…)); in each visit?
<enebo>
NEELINE
<jamiejackson>
enebo, the base vagrant ubuntu box does issue updates from time to time, so it is likely that things in the base OS changed. however, can you think of what kinds of things changing on the OS would make a difference to the jruby environment?
<enebo>
jamiejackson: one on ubuntu recently was no linked libcrypr.so caused the native layer to not load
<enebo>
jamiejackson: that will not affect 1.6.x of jruby though
<enebo>
jamiejackson: but it is an example
<enebo>
err libcrypt.so
<enebo>
jamiejackson: you can try jruby -Xnative.verbose=true -e ‘File.stat(“.”)’
<enebo>
jamiejackson: that should print out ‘Native successfully loaded’ or something like that
<enebo>
jamiejackson: if not then it goes to pure-Java mode
<enebo>
kares: pure-java mode should still work but it is just a thought
<enebo>
heh
<enebo>
kares: that was not for you :)
<nirvdrum>
enebo: I don't see any common handling like that. But maybe I'm just being dense.
<enebo>
nirvdrum: you do not. you need to make each return in each visit do that
<enebo>
nirvdrum: at least it is a possible way of solving it
<enebo>
nirvdrum: but it is somewhat error prone for sure
<enebo>
nirvdrum: althougn most of these visitors only have a single return
<enebo>
nirvdrum: the other solution is to solve it old-school like we do in IRBuilder whiich is the big switch
<enebo>
nirvdrum: which has the advantage of not having any double method dispatch of the visitor pattern
<enebo>
nirvdrum: although perhaps not much is saved since there is build and we still call buildFoo :)
<nirvdrum>
Well, I think the crux of it is we shouldn't be hobbling you, so we'll adapt accordingly.
sdelmore has joined #jruby
<nirvdrum>
But maybe push this to a branch if you don't mind and I'll look at updating our translator there.
<enebo>
ok
<nirvdrum>
And I'll loop chrisseaton in when he's around.
<jamiejackson>
ah crap, enebo. it looks like rvm doesn't have my version of jruby anymore. i probably missed something when jruby rvm tried to pull that version. so even though it "appears" to switch to the jruby version when i entered the directory, i don't think there's one there a jruby
<sdelmore>
I am trying to convert a ruby project to jruby. Figured first thing I would do is change the contents of my .ruby-version file to jruby but after extensive googling I cannot find what value to stick in there. Any tips?
<enebo>
jamiejackson: !!! :)
<enebo>
jamiejackson: ok well that is new data point and probably your problem
<jamiejackson>
so you think my lack of jruby is a problem in this jruby project? ;-)
<enebo>
jamiejackson: well it is easy to say yes but it might not be the only problem
<nirvdrum>
sdelmore: rbenv?
skade has quit [Ping timeout: 256 seconds]
<sdelmore>
Correct.
<jamiejackson>
i think it's the problem, enebo, as i think it was trying to run everything through ruby 1.9
<sdelmore>
When yo say language level, does that mean even though I installed jruby-9.0.0.0 I need to somehow specify that it should act like mri 2.1.2?
<enebo>
sdelmore: JRuby 9k only tracks MRI’s latest more or less so now that is Ruby 2.2.2
<sdelmore>
Should be close enough. Guess I am about to find out :D
<enebo>
sdelmore: although the differences betwen Ruby 2.x differences are not all that large
subbu|away has joined #jruby
<sdelmore>
Is there any workaround for the lack of support for c-extensions or do people just end up finding a non-C library to replace them with?
samphippen has joined #jruby
skade has quit [Ping timeout: 246 seconds]
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
enebo has quit [Quit: enebo]
skade has joined #jruby
<rtyler>
sdelmore: little bit of column a, little bit of column b
<sdelmore>
So far so good, I only appear to have two C extensions, ByeBug, and our own internal crc32 implementation. Must be a zillion of those available for the jvm, or just a ruby one may be fast enough with jruby.
<rtyler>
for byebug, you're out of luck most likely
<sdelmore>
No big deal. This is just a tech spike for now, if it runs way faster then we will dig in. Startup times are a bummer as I am used to running tests sub-second. I wonder if there is some sort of hot-reloader I can use to get around that issue.
Aethenelle has joined #jruby
ponga has joined #jruby
skade has quit [Quit: Computer has gone to sleep.]