43. Jeremy Hinegardner
@copiousfreetime
jeremy@hinegardner.org
Thanks! http://copiousfreetime.org
http://twitter.com/jruby/team
http://github.com/copiousfreetime/hitimes - Hitimes library
http://www.serabe.com/ - several blog posts jruby extensions
http://ola-bini.blogspot.com/2006/10/jruby-tutorial-4-writing-java.html
http://github.com/jruby/jruby/blob/master/src/org/jruby/runtime/load/
LoadService.java
http://tatice.deviantart.com/ - Operating System Icons
Notes de l'éditeur
Ruby going on 10 years now
Java stopped being my main programming language ~6-7 years ago. My latest Java in a Nutshell book, is brown and has a referee on the front. Java had a dot in its version at the time.
have a program
Need to access some functionality in a third party library, it is either to time consuming to write yourself, or its proprietary, or boring, or so solid no bugs in years.
The extensions is what sits between the ruby runtime and exposes the funcationality of the Awesome Library to the ruby runtime so that your ruby program can use it.
have a program
Need to access some functionality in a third party library, it is either to time consuming to write yourself, or its proprietary, or boring, or so solid no bugs in years.
The extensions is what sits between the ruby runtime and exposes the funcationality of the Awesome Library to the ruby runtime so that your ruby program can use it.
have a program
Need to access some functionality in a third party library, it is either to time consuming to write yourself, or its proprietary, or boring, or so solid no bugs in years.
The extensions is what sits between the ruby runtime and exposes the funcationality of the Awesome Library to the ruby runtime so that your ruby program can use it.
have a program
Need to access some functionality in a third party library, it is either to time consuming to write yourself, or its proprietary, or boring, or so solid no bugs in years.
The extensions is what sits between the ruby runtime and exposes the funcationality of the Awesome Library to the ruby runtime so that your ruby program can use it.
Hi resolution timer library for recording performance metrics at the nanosecond resolution.
To get nanosecond resolution, you need a very specific system call on ever operating system.
Why would you want to take the time to create Java Extensions for use in Jruby?
You can already easily utilize all the available Java libraries directly.
You can make it more ruby-esque by writing a pure ruby wrapper around a Java API, as Thomas has pointed out.
All in all, I would have to say, you would need a pretty compelling reason to do so.
Hi resolution timer library for recording performance metrics at the nanosecond resolution.
To get nanosecond resolution, you need a very specific system call on ever operating system.
The initial require is the same
but in JRuby, the hook leads us down a different path.
JRuby looks for a .jar that is in the load path, and has the same path as the require
Inside that .jar, the last item element of the require is converted from snake_case to ClassCase, and Service is tacked onto the end.
That class is instantiated and the basicLoad method is called. This is your hook into the runtime.
See the javadoc for LoadService.java
The initial require is the same
but in JRuby, the hook leads us down a different path.
JRuby looks for a .jar that is in the load path, and has the same path as the require
Inside that .jar, the last item element of the require is converted from snake_case to ClassCase, and Service is tacked onto the end.
That class is instantiated and the basicLoad method is called. This is your hook into the runtime.
See the javadoc for LoadService.java
The initial require is the same
but in JRuby, the hook leads us down a different path.
JRuby looks for a .jar that is in the load path, and has the same path as the require
Inside that .jar, the last item element of the require is converted from snake_case to ClassCase, and Service is tacked onto the end.
That class is instantiated and the basicLoad method is called. This is your hook into the runtime.
See the javadoc for LoadService.java
The initial require is the same
but in JRuby, the hook leads us down a different path.
JRuby looks for a .jar that is in the load path, and has the same path as the require
Inside that .jar, the last item element of the require is converted from snake_case to ClassCase, and Service is tacked onto the end.
That class is instantiated and the basicLoad method is called. This is your hook into the runtime.
See the javadoc for LoadService.java