Freaky has quit [Quit: Run away!]
Freaky has joined #jruby
vext01 has joined #jruby
ebarrett has quit [Ping timeout: 260 seconds]
drbobbeaty has quit [Ping timeout: 260 seconds]
_whitelogger has joined #jruby
sagax has joined #jruby
drbobbeaty has joined #jruby
<JasonRogers[m]> enebo / headius 8 years ago James Coglan put together a simple example of building a JRuby extension (and MRI C extension) at https://blog.jcoglan.com/2012/08/02/your-first-ruby-native-extension-java/
<JasonRogers[m]> I'm wondering if you all have or know of an up-to-date tutorial like this, or if this one is sufficient still.
<enebo[m]> Jason Rogers: This one seems reasonable still
<JasonRogers[m]> Thanks!
xardion has quit [Remote host closed the connection]
xardion has joined #jruby
ipproxy[m] has joined #jruby
<ipproxy[m]> Heya
<ipproxy[m]> Is JRuby actively developed?
<ipproxy[m]> And can I suggest making a discord server for JRuby? :P
<enebo[m]> It is actively developed yes
<ipproxy[m]> Thanks! Just wanted to know
<ipproxy[m]> Also, does it compile to .java files?
<enebo[m]> We do have an AOT which will generate a .class file
<ipproxy[m]> Oo, thanks!
<enebo[m]> in general though it will just parse and JIT ruby executing code to native as it detects it is hot
<enebo[m]> Letting the runtime do its thing tends to be the best for performance and warmup/startup time
<enebo[m]> Loading from .class is not going to make anything faster but it is needed in cases
<ipproxy[m]> O, oki, so would i be able to compile multiple files into one file?
<enebo[m]> no although you could compile files along with the .rb ones and jar them up
<enebo[m]> so it would result in one file
<ipproxy[m]> So compiling my bot's file, along with any Ruby dependencies, is how I'd make jar files using Ruby code? Would i have to use relative imports for requiring the gems then?
codic[m]1 has joined #jruby
<codic[m]1> ipproxy: using which binding? a ruby one, or a java one?
<ipproxy[m]> Wdym codic?
<codic[m]1> Which Bot library?
<codic[m]1> ```ruby
<codic[m]1> puts 'there is discord.rb, and a ton of java libs'
<codic[m]1> ```
<ipproxy[m]> Discordrb
<ipproxy[m]> :p
<ipproxy[m]> Yes, i know, I'm smart UvU
<ipproxy[m]> I really just wanna know if i can package ruby libs in my own code codic
<codic[m]1> Well
<codic[m]1> I tried in the past
<codic[m]1> The JAR kept failing
<codic[m]1> 🥴
<ipproxy[m]> R.i.p
<ipproxy[m]> Maybe use relative imports
<codic[m]1> One of the JRuby devs would most likely know more
<ipproxy[m]> Probably
<slackfan[m]> From my experience it may be easier to ship rb files together with java/jruby plus gem plus jar dependencies.
<ipproxy[m]> Wdym? How would i do that? :P
<ipproxy[m]> Wdym plus gem?
<codic[m]1> We just need a way to distrubute ruby applications easily and cross platform
<ipproxy[m]> And how would i require the lib in in a .jar file
<ipproxy[m]> Relative imports?
<slackfan[m]> Cross platform on source level or binary level? You can hardly control the latter as other gems may be bound to specific platforms. For my biggest project the setup is a folder with jruby-dist and my project is packaged together with gem dependencies into them gem folder of the jruby-dist. Needed jars are resources of my gem/project and packaged within that gem.
<ipproxy[m]> O
<ipproxy[m]> May I ask how would i use Java libraries in JRuby?
<codic[m]1> There's a page for it
<codic[m]1> Lemme find it for ya
<ipproxy[m]> O
<fzakaria[m]> We use warbler to build an UberJar with our gems, Java dependencies & additional Java code.
<fzakaria[m]> It's not "ideal" but it works minus some bugs we've had to work around
<fzakaria[m]> The odd thing is we want to use Gemfile to track Ruby dependencies but use a Java ecosystem for our java code (maven/gradle); having them intersect is meh.
<fzakaria[m]> Also debugging the ruby code running in a JAR is non-trivial; however distribution is just a `scp`
<codic[m]1> Nice, will give it a shot
<codic[m]1> warbler with Discord.rb kept failing for me thoug
<codic[m]1> * warbler with Discord.rb kept failing for me though
<fzakaria[m]> let me know how; I can share our config etc..
<fzakaria[m]> The defaults are pretty sane though.
<fzakaria[m]> This might be a stupid question: but there's no more JRuby conferences etc.. ?
claudiuinberlin has joined #jruby
<headius[m]> G'day folks
<fzakaria[m]> G'day
<fzakaria[m]> Is there a way in JRuby to yield?
<fzakaria[m]> (in the concurrent sense)
<fzakaria[m]> Thread.yield
codic[m]1 is now known as codic0912
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #jruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]