Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Talking more about JRuby

2 views
Skip to first unread message

Charles Oliver Nutter

unread,
Oct 28, 2007, 2:45:03 AM10/28/07
to
For the most part, we've been pretty good about keeping JRuby
discussions off the ruby-talk list, because in general it seemed like
the right thing to do. But lately, it seems like people are missing
information about what JRuby can do, how complete the implementation is,
and where we're going with it. So I'd like to start talking more about
JRuby on this mailing list.

I'll start it off with a little introduction to JRuby and what it can do
right now.

JRuby is Ruby for the JVM, also known as the Java Virtual Machine. It's
written mostly in Java, though there's some libraries written in Ruby,
and we include the entire Ruby 1.8.x (currently 1.8.5) stdlib.

In the 1.0 line, JRuby operates primarily as an interpreter comparable
to the standard Ruby 1.8.x implementation.

In 1.1, JRuby includes a 100% complete Ruby-to-bytecode compiler, that
increases performance substantially.

JRuby runs Rake, RubyGems, Rails, Mongrel, and nearly all pure-Ruby
libraries and apps that are out there. Compatibility has gotten closer
and closer to 100% over the past year.

There are a number of organizations rolling out real production Rails
apps on JRuby rather than on regular Ruby, usually because JRuby fits
better into Java-oriented organizations, but increasingly because JRuby
offers libraries, stability, and performance characteristics in many
ways better than running on the standard implementation. It's not better
across the board, but it's starting to be better in very important areas.

JRuby 1.0.1 is the current release. 1.0.2 is going to be released within
the next two weeks, along with a beta of 1.1.

What more would folks like to know about?

- Charlie

M. Edward (Ed) Borasky

unread,
Oct 28, 2007, 3:01:05 AM10/28/07
to
Charles Oliver Nutter wrote:

[snip]

> JRuby 1.0.1 is the current release. 1.0.2 is going to be released within
> the next two weeks, along with a beta of 1.1.
>
> What more would folks like to know about?


1. When do you figure the "release" of 1.1 will be?
2. What's the "API" for mixed Java and Ruby programming on the Java
platform?
3. Do you *have* to write jRuby extensions in Java, or can you write
them in bytecode? In C?

Charles Oliver Nutter

unread,
Oct 28, 2007, 3:23:10 AM10/28/07
to
M. Edward (Ed) Borasky wrote:
> Charles Oliver Nutter wrote:
>
> [snip]
>
>> JRuby 1.0.1 is the current release. 1.0.2 is going to be released
>> within the next two weeks, along with a beta of 1.1.
>>
>> What more would folks like to know about?
>
>
> 1. When do you figure the "release" of 1.1 will be?

We're targeting Decemberish, probably around JavaPolis (EU java
conference) timeframe. One big milestone for a Ruby conference, the next
for a Java conference.

> 2. What's the "API" for mixed Java and Ruby programming on the Java
> platform?

Generally, it's pretty trivial.

require 'java' # or "include Java" via an autoload we support
SomeClass = com.foo.bar.SomeClass
sc = SomeClass.new

And we add lots of nice features for certain standard Java types and
interfaces, like making collections Enumerable and so on.

http://www.headius.com/jrubywiki/index.php/Calling_Java_from_JRuby
http://blogs.sun.com/coolstuff/entry/using_java_classes_in_jruby

> 3. Do you *have* to write jRuby extensions in Java, or can you write
> them in bytecode? In C?

Extensions...well, generally, you have to write extensions in any
language that compiles to Java bytecode. You could write them in Scala,
Python (Jython), or Groovy if you really wanted to. It's all just bytecode.

We do not support C-based extensions or libraries. However, we are
shipping the Java Native Access library (JNA) in JRuby 1.1, which
provides programmatic access to any C library from Java code (it's
similar to what DL provides for Ruby). That should make it a lot easier
to wire in C-based libraries to JRuby.

It's fair to say that the limitations of the JVM and the Java platform
apply to JRuby, like some difficulty calling native libraries and the
ever-present startup time issue. But the benefits also apply, in the way
of performance, excellent GC, concurrent multithreading, and a massive
collection of libraries.

- Charlie

Ari Brown

unread,
Oct 28, 2007, 11:36:01 AM10/28/07
to

On Oct 28, 2007, at 2:45 AM, Charles Oliver Nutter wrote:

> What more would folks like to know about?

I'd just like to say, thank you so much for JRuby. I haven't had a
chance to actually use it yet, but the fact that it's out there means
a lot to me.

My dad is a Java fanatic. Drinks his coffee every morning, then goes
and practices Java.
When he saw this on a job application (like "have you ever done
JRuby"), he wanted to learn more about it. So now he's starting out.

But here's my question:

Can you set the compiler to generate the .class files, and then just
run those on someone else's computer?

Thanks,
Ari
--------------------------------------------|
If you're not living on the edge,
then you're just wasting space.

Charles Oliver Nutter

unread,
Oct 28, 2007, 12:37:45 PM10/28/07
to
Ari Brown wrote:
>
> On Oct 28, 2007, at 2:45 AM, Charles Oliver Nutter wrote:
>
>> What more would folks like to know about?
>
> I'd just like to say, thank you so much for JRuby. I haven't had a
> chance to actually use it yet, but the fact that it's out there means a
> lot to me.
>
> My dad is a Java fanatic. Drinks his coffee every morning, then goes and
> practices Java.
> When he saw this on a job application (like "have you ever done JRuby"),
> he wanted to learn more about it. So now he's starting out.
>
> But here's my question:
>
> Can you set the compiler to generate the .class files, and then just run
> those on someone else's computer?

Yes, you can precompile .rb files and use them as standalone files.
There's a minor startup hit for loading precompiled classes, but the
upside is that you don't have to wait for JRuby to JIT compile them at
runtime as they're used; they'll be fast immediately.

What we don't have just yet is all the nice little features a compiler
should have, like compiling an entire target directory, compiling to a
specific output dir, tasks for rake, raven, buildr, maven, ant,
whatever. We also are looking for input on how best to incorporate the
compiled files into the loading process. Like Python's pyc files, where
if the compiled file is newer it runs that, otherwise it runs the
uncompiled .py file?

It's also worth mentioning that the compiled Ruby files are not really
directly-usable Java classes...they're compiled Ruby scripts. Just as
you can't instantiate a script as its own object or call methods
directly on a script, so can you not do that with a compiled Ruby
script. You must launch or the script and let it run through, defining
methods and classes and so on.

I have plans for a second compiler that will turn a Ruby class into a
more normal, instantiable, callable Java class, but that will come after
1.1.

- Charlie

Charles Oliver Nutter

unread,
Oct 28, 2007, 1:09:55 PM10/28/07
to
Michael Guterl wrote:
> I have had a hard time keeping track of the different deployment options for
> deployment of Rails applications on JRuby. I try following all of your
> blogs but I'm not sure what is the recommended setup. I'm familiar with
> mongrel from MRI, however, I'm not a Java guy. When it comes down to
> Tomcat, GlassFish, etc. what are my best (from performance to simplicity)
> options? What are the best options for packaging my applications for
> deployment to these application servers? I have seen mention of goldspike
> and warbler but I am not sure which I should be using.

To be honest, I'm as confused as you are. There's a massive
simplification that needs to happen somewhere. Warbler has helped a lot
though, and it's being used internally by Sun to package Rails apps as
WAR files. I'd expect the Warbler approach is most people will want to
follow in the future.

What we really need is this kind of feedback, to smack the GoldSpike and
Warbler people around and let them know "this is getting too
complicated". You should pass that along on the JRuby or JRuby-Extras
mailing lists (and if you have any ideas, you should offer them...even
if you don't think you're qualified. The "Java way" is very often the
wrong way.)

> Like I said earlier, I'm not a Java guy but my interest has grown since
> seeing JRuby come to life. Here are some other questions from someone
> lacking Java experience/knowledge.
>
> 1. Specific areas that Java can handle that MRI currently has no solution
> for, libraries, interesting tricks, etc...

That would be a good list to have; it's just hard to assemble because of
the massive number of such areas. GUI development has really captured a
lot of attention in JRuby recently, since Swing is a great low-level API
and Ruby is a gerat high-level language. The two together make GUI
programming almost fun. Others might include Java's better support for
XML manipulation, remote services, garbage collection/memory management,
and arguably an easier language for writing extensions.

> 2. This has more to do with Java and less to do with JRuby, but what are
> some good resources for learning Java?

For learning the language, probably the Deitel books, "Core Java", and a
few others. It's been a long time since I had to learn Java, so I'm not
a great reference here.

If you're planning to primarily use Ruby on the JVM, you can generally
get by with just the documentation associated with various class
libraries, starting with Java's own libraries here:

http://java.sun.com/j2se/1.5.0/docs/api/index.html

Like I say, it's an extensive collection, even in just the base
distribution of Java. And all those libraries are usable in JRuby with
normal Ruby code.

> 3. What about JRuby internals? There is
> http://eigenclass.org/hiki.rb?ruby+internals+guide for MRI. I'm sure
> something like this would be useful for educating people interested in
> contributing to JRuby.

There's one article on the JRuby wiki...I've intended to write more but
haven't had a chance yet:

http://www.headius.com/jrubywiki/index.php/JRuby_Internal_Design

I'd be interested in hearing what specific areas of this need to be
expanded on. In general, JRuby's internal design isn't very complicated,
especially if you exclude parsing and compilation. The interpreter's
pretty straightforward and the core class impls are easy to follow.

> I have been watching the progress of JRuby over the past few months and I am
> extremely impressed. You guys are making amazing progress!

Thank you :) It's been a long hard process, but we're finally starting
to meet many of our longer-term goals.

- Charlie

James Britt

unread,
Oct 28, 2007, 1:25:55 PM10/28/07
to
Charles Oliver Nutter wrote:

>
> What more would folks like to know about?

I's like to know more about non-Rails Ruby Web apps that use JRuby.

Packaging, deployment, known issues, what's needed, etc.

I expect Charlie probably cannot answer all of these for the myriad Ruby
Web frameworks out there, so if anyone has experience or observations
about using JRuby with Nitro, Camping, Ramaze, Iowa, etc. please speak up.

Thanks!

--
James Britt

www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff
www.risingtidesoftware.com - Wicked Cool Coding

Charles Oliver Nutter

unread,
Oct 28, 2007, 1:43:04 PM10/28/07
to
James Britt wrote:
> Charles Oliver Nutter wrote:
>
>>
>> What more would folks like to know about?
>
> I's like to know more about non-Rails Ruby Web apps that use JRuby.
>
> Packaging, deployment, known issues, what's needed, etc.
>
> I expect Charlie probably cannot answer all of these for the myriad Ruby
> Web frameworks out there, so if anyone has experience or observations
> about using JRuby with Nitro, Camping, Ramaze, Iowa, etc. please speak up.

I can talk about one option that *should* be in 1.1: Ruvlets.

Tom Enebo has been working on a nice, simple Ruby-based servlet API for
folks wanting to use Ruby but not wanting to wire in Rails or another
large framework (or for people wanting to easily wire framework X into a
servlet environment). It goes something like this:

ruvlet.rb:

def service(request, response)
# handle request, send response
end

And that's about it for the simplest case. You stick this in a WAR file
with the Ruvlet servlet configured, and it will be routed all requests.
There's increasingly more specific mechanisms for wiring things up too,
from specific HTTP request types to basic request routing to different
scripts. But it's nice and simple, with no cgi.rb overhead and with a
choice of dozens of high performance WAR-based server front-ends.

I'd love to hear if people are using JRuby for the others. I know
Camping works, but I don't know if there's any major JRuby Camping users
yet.

- Charlie

Konrad Meyer

unread,
Oct 28, 2007, 3:17:10 PM10/28/07
to
Quoth Charles Oliver Nutter:
> ...
> http://java.sun.com/j2se/1.5.0/docs/api/index.html
> ...

Does this mean JRuby targets 1.5.0? What about 1.6.0 or 1.4.x? These are just
things I'm interested in, as long as you're on ruby-talk.

Thanks,
--
Konrad Meyer <kon...@tylerc.org> http://konrad.sobertillnoon.com/

signature.asc

Charles Oliver Nutter

unread,
Oct 28, 2007, 4:33:04 PM10/28/07
to
Konrad Meyer wrote:
> Quoth Charles Oliver Nutter:
>> ...
>> http://java.sun.com/j2se/1.5.0/docs/api/index.html
>> ...
>
> Does this mean JRuby targets 1.5.0? What about 1.6.0 or 1.4.x? These are just
> things I'm interested in, as long as you're on ruby-talk.

JRuby 1.0 supports 1.4+, and the JRuby 1.1 codebase required 1.5+, but
we will provide a "retroweaved" version that should run fine on 1.4+.

- Charlie

James Britt

unread,
Oct 28, 2007, 5:14:04 PM10/28/07
to
Charles Oliver Nutter wrote:
> James Britt wrote:
>> Charles Oliver Nutter wrote:
>>
>>>
>>> What more would folks like to know about?
>>
>> I's like to know more about non-Rails Ruby Web apps that use JRuby.
>>
>> Packaging, deployment, known issues, what's needed, etc.
>>
>> I expect Charlie probably cannot answer all of these for the myriad
>> Ruby Web frameworks out there, so if anyone has experience or
>> observations about using JRuby with Nitro, Camping, Ramaze, Iowa, etc.
>> please speak up.
>
> I can talk about one option that *should* be in 1.1: Ruvlets.
>
> Tom Enebo has been working on a nice, simple Ruby-based servlet API for
> folks wanting to use Ruby but not wanting to wire in Rails or another
> large framework (or for people wanting to easily wire framework X into a
> servlet environment). It goes something like this:
>
> ruvlet.rb:
>
> def service(request, response)
> # handle request, send response
> end

That looks pretty much like Rack.

http://rack.rubyforge.org/doc/

>
> And that's about it for the simplest case. You stick this in a WAR file
> with the Ruvlet servlet configured, and it will be routed all requests.


Might be interesting to JRubyify Rack, or make Rack and Ruvlet easily
interchangeable, so that Rack-ready frameworks (Ramaze, Nitro, Camping,
Sinatra, others) can pop over to JRuby.


--
James Britt

"The use of anthropomorphic terminology when dealing with
computing systems is a symptom of professional immaturity."
- Edsger W. Dijkstra

Ezra Zygmuntowicz

unread,
Oct 28, 2007, 7:11:51 PM10/28/07
to

We just did some work this week so that all of Merb's specs pass on
JRuby and you can run merb apps under the jruby mongrel.

Cheers-
-Ezra


Robert Klemme

unread,
Oct 29, 2007, 6:49:06 AM10/29/07
to
Oliver, first of all thank you for the hard work! I hope I get to use
JRuby soon - but as always it's a matter of resources (time in this
case).

2007/10/28, Charles Oliver Nutter <charles...@sun.com>:


> In the 1.0 line, JRuby operates primarily as an interpreter comparable
> to the standard Ruby 1.8.x implementation.
>
> In 1.1, JRuby includes a 100% complete Ruby-to-bytecode compiler, that
> increases performance substantially.

> What more would folks like to know about?

Why did you not label the "ruby to bytecode" version 2.0 instead -
this seems like a major architectural change and it would have been
worth a major release, wouldn't it?

Kind regards

robert

Charles Oliver Nutter

unread,
Oct 29, 2007, 7:54:29 AM10/29/07
to
Ezra Zygmuntowicz wrote:
> We just did some work this week so that all of Merb's specs pass on
> JRuby and you can run merb apps under the jruby mongrel.

Very nice....we've had a number of people interested in running Merb in
JRuby.

- Charlie

Charles Oliver Nutter

unread,
Oct 29, 2007, 7:55:16 AM10/29/07
to
James Britt wrote:
> Charles Oliver Nutter wrote:
>> ruvlet.rb:
>>
>> def service(request, response)
>> # handle request, send response
>> end
>
> That looks pretty much like Rack.
>
> http://rack.rubyforge.org/doc/
>
>>
>> And that's about it for the simplest case. You stick this in a WAR
>> file with the Ruvlet servlet configured, and it will be routed all
>> requests.
>
>
> Might be interesting to JRubyify Rack, or make Rack and Ruvlet easily
> interchangeable, so that Rack-ready frameworks (Ramaze, Nitro, Camping,
> Sinatra, others) can pop over to JRuby.

That's an excellent idea. I'll make sure Tom knows about it.

- Charlie

Charles Oliver Nutter

unread,
Oct 29, 2007, 8:01:08 AM10/29/07
to
Robert Klemme wrote:
> Why did you not label the "ruby to bytecode" version 2.0 instead -
> this seems like a major architectural change and it would have been
> worth a major release, wouldn't it?

Well that's a good question. I think we'd always expected that 1.1 was
going to be a "big" release, given that we had so many 0.0.x increments
that were smaller-but-still-substantial architectural changes. I suppose
one reason we didn't go straight to a 2.0 release is that we always
wanted the compiler to be complete for 1.0, but there simply wasn't
enough time to make it happen in the 1.0 plan. Our releases have been
very heavily driven by conference dates; we simply couldn't pass up
JavaOne for 1.0. And going with a 1.1 now at "mid year" gives us the
opportunity to complete the "ultimate changes" we have planned in a 2.0
release this spring.

- Charlie

ara.t.howard

unread,
Oct 29, 2007, 10:55:29 AM10/29/07
to

On Oct 28, 2007, at 12:45 AM, Charles Oliver Nutter wrote:

> What more would folks like to know about?

thing which impressed me most at your excellent mtn. west rubyconf
talk was the little swing demo: the ability to quickly (or more
quickly) write cross platform desktop applications is quite
interesting. perhaps i'm not the only one to consider that a fully
ajaxified, or even single page, desktop app offers little more, in
some respects, than a java application that connects to a central db.

so i'm primarily interested is seeing how we can use jruby to open up
new markets to ruby like desktop applications, running jruby in the
browser, etc. maybe jruby can bring back the applet!

it is very exciting and i personally wouldn't mind seeing more of it
on ruby-talk

kind regards

a @ http://codeforpeople.com/
--
we can deny everything, except that we have the possibility of being
better. simply reflect on that.
h.h. the 14th dalai lama


James Britt

unread,
Oct 29, 2007, 11:49:36 AM10/29/07
to
ara.t.howard wrote:
>
> On Oct 28, 2007, at 12:45 AM, Charles Oliver Nutter wrote:
>
>> What more would folks like to know about?
>
> thing which impressed me most at your excellent mtn. west rubyconf talk
> was the little swing demo: the ability to quickly (or more quickly)
> write cross platform desktop applications is quite interesting. perhaps
> i'm not the only one to consider that a fully ajaxified, or even single
> page, desktop app offers little more, in some respects, than a java
> application that connects to a central db.
>
> so i'm primarily interested is seeing how we can use jruby to open up
> new markets to ruby like desktop applications, running jruby in the
> browser, etc. maybe jruby can bring back the applet!
>

Ara, if you're at RubyConf this weekend, ask me about Monkeybars.

We at Rising Tide are doing interesting work with JRuby & Swing.


> it is very exciting and i personally wouldn't mind seeing more of it on
> ruby-talk
>


Agreed

--
James Britt

www.ruby-doc.org - Ruby Help & Documentation

www.risingtidesoftware.com - Wicked Cool Coding
www.rubystuff.com - The Ruby Store for Ruby Stuff

www.jamesbritt.com - Playing with Better Toys

Nick Sieger

unread,
Oct 29, 2007, 11:16:35 AM10/29/07
to
On 10/28/07, Charles Oliver Nutter <charles...@sun.com> wrote:
> Michael Guterl wrote:
> > I have had a hard time keeping track of the different deployment options for
> > deployment of Rails applications on JRuby. I try following all of your
> > blogs but I'm not sure what is the recommended setup. I'm familiar with
> > mongrel from MRI, however, I'm not a Java guy. When it comes down to
> > Tomcat, GlassFish, etc. what are my best (from performance to simplicity)
> > options? What are the best options for packaging my applications for
> > deployment to these application servers? I have seen mention of goldspike
> > and warbler but I am not sure which I should be using.
>
> To be honest, I'm as confused as you are. There's a massive
> simplification that needs to happen somewhere. Warbler has helped a lot
> though, and it's being used internally by Sun to package Rails apps as
> WAR files. I'd expect the Warbler approach is most people will want to
> follow in the future.
>
> What we really need is this kind of feedback, to smack the GoldSpike and
> Warbler people around and let them know "this is getting too
> complicated". You should pass that along on the JRuby or JRuby-Extras
> mailing lists (and if you have any ideas, you should offer them...even
> if you don't think you're qualified. The "Java way" is very often the
> wrong way.)

I agree that the options here are confusing and not well documented.
It's not clear that there's a single approach. This speaks mostly to
the relative immaturity of the options combined with the fact that
there have always been many, many ways of deploying applications in
the Java world.

Hopefully as these options have time to bake, they will crystallize
around a couple of approaches:

1. Deployment ease with a minimum of knowledge of the Java platform
and application servers. Comparable to the MRI/mongrel combo today.
The Glassfish gem [1] will hopefully address this need.
2. When there is existing Java infrastructure/application servers, or
you want to run multiple Rails apps on a single server, WAR file
deployment packaged with Warbler [2], and using whatever glue works
and performs best to patch Rails into the servlet environment.
Currently this is Goldspike [3] (which Warbler packages today), but
other approaches are being worked on as well.

/Nick

[1]: http://weblogs.java.net/blog/arungupta/archive/2007/09/announcing_glas.html
[2]: http://caldersphere.rubyforge.org/warbler/
[3]: http://www.headius.com/jrubywiki/index.php/Rails_Integration

Charles Oliver Nutter

unread,
Oct 29, 2007, 1:08:08 PM10/29/07
to
ara.t.howard wrote:
>
> On Oct 28, 2007, at 12:45 AM, Charles Oliver Nutter wrote:
>
>> What more would folks like to know about?
>
> thing which impressed me most at your excellent mtn. west rubyconf talk
> was the little swing demo: the ability to quickly (or more quickly)
> write cross platform desktop applications is quite interesting. perhaps
> i'm not the only one to consider that a fully ajaxified, or even single
> page, desktop app offers little more, in some respects, than a java
> application that connects to a central db.
>
> so i'm primarily interested is seeing how we can use jruby to open up
> new markets to ruby like desktop applications, running jruby in the
> browser, etc. maybe jruby can bring back the applet!

Yeah, that's probably worth another thread. Ruby+Swing seems to be one
of the most popular uses for JRuby right now. There's something like 4
or 5 different Swing frameworks for Ruby as a result.

- Charlie

Charles Oliver Nutter

unread,
Oct 29, 2007, 1:05:25 PM10/29/07
to
James Britt wrote:
> Ara, if you're at RubyConf this weekend, ask me about Monkeybars.
>
> We at Rising Tide are doing interesting work with JRuby & Swing.

I'd like to hear more about it too :) Maybe you could talk a bit about
it here?

- Charlie

ara.t.howard

unread,
Oct 29, 2007, 1:20:57 PM10/29/07
to

On Oct 29, 2007, at 9:49 AM, James Britt wrote:

> Ara, if you're at RubyConf this weekend, ask me about Monkeybars.
>
> We at Rising Tide are doing interesting work with JRuby & Swing.
>

i hope to be - family life may intercede though... i'll know today/
tomorrow.

cheers.

it is not enough to be compassionate. you must act.

James Britt

unread,
Oct 29, 2007, 1:48:29 PM10/29/07
to

I'll pester my fellow Risers to pipe up. :)

We have two R'Forge projects, Railgun and Monkeybars, that aim to make
doing GUI Java apps fun. That is, you don't write any Java, just
(J)Ruby. But among the things we've talked about is the idea of chubby
clients; apps that use the Internet and/or local networking to play
smarter. There's lots of opportunity for robust GUI apps that share
data, chat with peers, interact with Web services, and so on.

If there's a RejectConf this weekend we'll be sure to show something.
(David Koontz' proposal to talk about Railgun was among the rejected. :( )

--
James Britt

www.risingtidesoftware.com
602-714-1147

David Chelimsky

unread,
Oct 30, 2007, 7:58:50 AM10/30/07
to
On Oct 30, 2007 4:07 AM, simon jenkins <simo...@gmail.com> wrote:
> I've been writing some jruby rspec acceptance/functional tests around an
> existing swing application using the FEST/abbot java libraries to interact
> with swing.
>
> I'm quite happy to blog something about my discoveries, or the usage pattern
> i took if people are interested.

I would LOVE to see this. Please, please do.

Cheers,
David

pat eyler

unread,
Oct 30, 2007, 9:05:10 AM10/30/07
to

maybe you should submit a talk proposal for MWRC. :) Seriously,
we'd love to see a presentation like that.


>
> - Charlie
>
>


--
thanks,
-pate
-------------------------
Duty makes us do things, Love make us do things well.
http://on-ruby.blogspot.com http://on-erlang.blogspot.com
http://on-soccer.blogspot.com

pat eyler

unread,
Oct 30, 2007, 9:07:40 AM10/30/07
to

I don't know where you live Simon, but do consider putting in a
proposal to your local regional conference.

>
> Cheers,
> David

Charles Oliver Nutter

unread,
Oct 31, 2007, 11:53:55 AM10/31/07
to
pat eyler wrote:
> On 10/29/07, Charles Oliver Nutter <charles...@sun.com> wrote:
>> James Britt wrote:
>>> Ara, if you're at RubyConf this weekend, ask me about Monkeybars.
>>>
>>> We at Rising Tide are doing interesting work with JRuby & Swing.
>> I'd like to hear more about it too :) Maybe you could talk a bit about
>> it here?
>
> maybe you should submit a talk proposal for MWRC. :) Seriously,
> we'd love to see a presentation like that.

I'm trending away from submitting application-related proposals myself.
I'm almost always heads-down working on JRuby, and there are others who
can promote specific frameworks on JRuby like Rails and Swing better
than I can.

So over the next year you'll probably see fewer
Rails/Swing/Whatever-specific talks from me and more "intro to JRuby"
and "advanced JRuby" stuff.

- Charlie

Brian Adkins

unread,
Oct 31, 2007, 12:31:30 PM10/31/07
to
On Oct 28, 2:45 am, Charles Oliver Nutter <charles.nut...@sun.com>
wrote:
> JRuby runs Rake, RubyGems, Rails, Mongrel, and nearly all pure-Ruby
> libraries and apps that are out there. Compatibility has gotten closer
> and closer to 100% over the past year.

I thought Mongrel was a Ruby / C hybrid. How does this run on JRuby -
using JNI?

Charles Oliver Nutter

unread,
Oct 31, 2007, 1:05:26 PM10/31/07
to

Only a small portion of Mongrel is written in C; those bits have been
ported, and an upcoming release of Mongrel will have a JRuby
platform-specific gem available.

- Charlie

Jörg W Mittag

unread,
Oct 31, 2007, 9:27:51 PM10/31/07
to

To be more precise: the Mongrel HTTP parser is actually written in
Ragel (<http://WWW.CS.QueensU.Ca/~thurston/ragel/>), *not* in pure C.
Ragel is a DSL (or a compiler, depending on from which side you look)
for writing Finite State Machines for parsers. So, the main part is
actually the Ragel DSL and only the (small) embedded actions are
written in C. The nice thing is that Ragel actually has multiple
backends, so it can not only compile to C, but to Java as well. So,
just by recompiling the Ragel source to Java, you can get the whole
State Machine scaffolding set up and only need to port the embedded
actions.

Interestingly, Ragel also has a Ruby backend: can you say
"Mongrelinius"?

BTW: Hpricot also uses Ragel, and it also has already been ported to
JRuby. (Other Ruby projects that use Ragel: RFuzz, SuperRedCloth, json
and LEL (from the JRuby Swing builder called Profligacy).)

jwm

0 new messages