<telegardian> Is there a way to access the built in version of JLine supplied with JRuby?
<telegardian> irb(main):010:0> require 'jline/jline/2.11/jline-2.11.jar'
<telegardian> => false
<telegardian> in IRB, I can see it is already loaded
<telegardian> which is expected, but is there already a 'module' wrapper namespace with the include_package that I can now reference?
<telegardian> I think you know what I mean, but for clarity, if I define:
<telegardian> module JavaUtil
<telegardian> include_package "java.util"
<telegardian> end
<telegardian> I can now do things like : JavaUtil::Date.new.getTime
<telegardian> I am looking for the same namespace in IRB for JLine if it exists.
zenspider has left #jruby ["ERC (IRC client for Emacs 25.2.1)"]
<kares> telegardian: there's no such namespace but you will have the Java classes accessible
<kares> think the package is jline (since we're using 2.x) thus e.g. Java::jline::Terminal
rdubya has quit [Ping timeout: 252 seconds]
jmalves has quit [Ping timeout: 245 seconds]
travis-ci has joined #jruby
<travis-ci> jruby/jruby (master:3f8fd97 by Christian Meier): The build was fixed. (https://travis-ci.org/jruby/jruby/builds/457826244)
travis-ci has left #jruby [#jruby]
jmalves has joined #jruby
telegardian has quit [Ping timeout: 252 seconds]
shellac has joined #jruby
rdubya has joined #jruby
shellac has quit [Quit: Computer has gone to sleep.]
shellac has joined #jruby
shellac has quit [Client Quit]
shellac has joined #jruby
rdubya has quit [Ping timeout: 264 seconds]
jmalves has quit [Remote host closed the connection]
jmalves has joined #jruby
jmalves has quit [Read error: Connection reset by peer]
Puffball_ has quit [Remote host closed the connection]
Puffball has joined #jruby
Puffball has quit [Remote host closed the connection]
jmalves has joined #jruby
Puffball has joined #jruby
jmalves has quit [Ping timeout: 240 seconds]
rdubya has joined #jruby
jmalves has joined #jruby
xardion has quit [Remote host closed the connection]
xardion has joined #jruby
<lopex> enebo: appear
jmalves has quit [Ping timeout: 268 seconds]
shellac has quit [Quit: Computer has gone to sleep.]
<headius> lopex: I think he's taking today off...US holidays this week
<lopex> headius: just wanted to point that onigmo got a pr https://github.com/k-takata/Onigmo/pull/108
<lopex> same joni did
<headius> oh boy
<headius> the new spam
<lopex> yeah
<lopex> or testing on opensource
<lopex> headius: the one from joni didnt see through instance variable states
<lopex> like there's no such tools that do the job better already
<headius> yeah sounds maybe half useful
<lopex> headius: hmm, looks like all maven plugins (including polyglot) insert windows newlines when rewriting the pom
<lopex> annoying
<lopex> well, *on windows
<lopex> I guess there's no easy anwser since they'd havee to preserve every newline
fredmorcos has joined #jruby
<fredmorcos> hello, I am on Archlinux, I installed JRuby from the package manager (which goes into /opt/jruby). I try to install the `thin` gem using jruby -S gem install thin and I get an error: checking for main() in -lc... RuntimeError: The compiler failed to generate an executable file. You have to install development tools first.
<lopex> use puma
<fredmorcos> okay, gem install puma?
<lopex> yeah, it should work
<fredmorcos> I'm new to ruby, sinatra, and the jvm
<fredmorcos> will sinatra automatically pick up puma?
<fredmorcos> doesn't seem so, it's still picking up webrick
<lopex> I mostly run puma via puma directly, and it does pick config.ru
<fredmorcos> okay so may I ask a few questions about that: at the end of my App class I have this: run! if app_file == $0
<fredmorcos> so should I write a config.ru file with require './app'; then...?
<fredmorcos> run MyApp?
<lopex> I do so, yeah
<fredmorcos> okay, so now: jruby -S puma?
<fredmorcos> ah.. nice.. seems to work :) let me test
<lopex> it's -s Puma afaik
<lopex> but I can be wrong here
<fredmorcos> what do you mean -s Puma?
<fredmorcos> jruby -S rackup -s Puma?
<lopex> yeah, it does work for me here
<lopex> jruby -S puma does too
<fredmorcos> I get a whole bunch of exception traces from my server-side now
<fredmorcos> starting with: 2018-11-21 18:27:30 - NoMethodError - undefined method `implementation' for HTTP::CookieJar::AbstractStore:Class:
<lopex> are you sure you're running java version of puma ?
<fredmorcos> well I added puma to my gemfile, then did jruby -S bundle install
<fredmorcos> jruby -S gem list puma ===> puma (3.12.0 java)
<fredmorcos> it's in fact related to rest-client (which uses http-cookie)
<lopex> can you post a minimal example to reproduce ?
<lopex> yeah, they complain on http-cookie in that post
<lopex> it's abandoned
<fredmorcos> okay, is there a way to look at which options are supported when building a gem? maybe rest-client has the option to use something else
<lopex> I guess you might get the same on mri
<fredmorcos> no didn't get the same on mri... i'm now in the process of migrating to jruby
<lopex> maybe you have some versions locked in Gemfile.lock ?
<fredmorcos> I wrote the gemfile to jruby
<fredmorcos> but i'll delete it and try again
<lopex> try deleting it yeah
<fredmorcos> same... there is also this: https://github.com/sparklemotion/http-cookie/issues/6
<fredmorcos> okay so just starting the app with jruby app.rb now picks up puma and works
<fredmorcos> but it's exactly twice as slow as webrick was
<fredmorcos> how do i require gems eagerly?
<lopex> it might hit autoload issues as they mention there
<lopex> hmm, maybe you could require some gems eagerly
<lopex> require them in config.ru
<fredmorcos> okay, will try that now, then can come back with the performance issue
<lopex> but that's just a guess
<lopex> yeah, you should warm that first, before any benchmarking
<fredmorcos> that's including warming up
<fredmorcos> so 1 warmup run + the avg of 3 runs: with webrick the entire benchmark took 0.9 seconds. now with puma it consistently takes 2.2 seconds
<fredmorcos> (btw i added require 'rest-client' and require 'http-cookie' to my config.ru and it works well, thanks!)
<lopex> cool, weird about that puma performance though
<fredmorcos> yeah...
<lopex> is that both with -e production ?
<fredmorcos> no, both without -e at all (so development)
<fredmorcos> let me test with -e production
<fredmorcos> jruby -S rackup -s webrick -e production
<fredmorcos> gives me the following: NameError: undefined local variable or method `production' for main:Object
<lopex> and "puma -e production" ?
<fredmorcos> ah, i see... rackup -e is for eval
<lopex> I dont know how rackup passes args around
<lopex> yeah
<lopex> so there must be a way to pass args for the server somehow
<lopex> puma -e production -p some_port should do for now
<fredmorcos> with rackup it's -E, it should pass that to the server
<fredmorcos> so webrick and puma with -E production, performance results are the same as with development
<fredmorcos> ~2.2 seconds with puma, and ~1 second with webrick
<lopex> yeah, it's weird, no idea why
<lopex> headius: ^^ any ideas ?
<fredmorcos> jruby -Xcompile.invokedynamic=true -X-O -X+C -J-Xmn512m -J-Xms2048m -J-Xmx2048m -J-server -J-Djruby.thread.pool.enabled=true -S rackup .....
<fredmorcos> webrick is now ~0.8 seconds and puma at ~2.1 seconds
<fredmorcos> anyways, at this point I guess I'm happy with webrick performance
<lopex> well, that shouldnt be the case
<fredmorcos> that I am happy? or that webrick is fast? or that puma is slow?
<lopex> that puma is slow
<fredmorcos> you expect it to perform within the ballpark of webrick or do you expect that it should perform better?
<lopex> fredmorcos: how involved is ruby logic on that endpoint ?
<lopex> or, is the response big or something ?
<fredmorcos> it's probably the simplest webapp in the world, the responses are mongodb IDs
<fredmorcos> so a few characters long
<lopex> then it deserves filing an issue imho
<lopex> it shouldnt be the case
<fredmorcos> the only thing i think i might be doing wrong is that i'm handling exceptions everywhere in my GET/POST/etc... handlers
<lopex> btw what java and jruby versions are used ?
<fredmorcos> jruby 9.2.2.0 (2.5.0) 2018-11-08 fc462a4 OpenJDK 64-Bit Server VM 11.0.1+13 on 11.0.1+13 +jit [linux-x86_64]
<lopex> ok
<lopex> well, if you have the time you could profile both runs
<lopex> I mean, both servers
<fredmorcos> yeah, I'll work on that... but first i need to finish the task at hand
<fredmorcos> i'm new to ruby, jvm, sinatra, web development, so i'm a bit in chaos/overwhelmed right now
<lopex> cool, puma being slower than webrick is somewhat worrying
Puffball has quit [Remote host closed the connection]
<fredmorcos> thanks so much for all your help lopex!
<lopex> fredmorcos: no problem
Puffball has joined #jruby
fredmorcos has quit [Remote host closed the connection]
subbu is now known as subbu|lunch
claudiuinberlin has joined #jruby
subbu|lunch is now known as subbu
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
travis-ci has joined #jruby
<travis-ci> jruby/jruby (master:780f76e by Charles Oliver Nutter): The build was broken. (https://travis-ci.org/jruby/jruby/builds/458193168)
travis-ci has left #jruby [#jruby]