Some RailsConf impressions


So, I’ve spent lots of time talking to people about numerous things. We have had some really nice conversations about everything related to Ruby, JRuby and ThoughtWorks and there is an incredible buzz going on here. Yesterday me, Roy, Tim (Bray), Cyndi, Martin Fowler, Charles, Tom and Nick sat down over dinner with DHH and talked about JRuby, which was also very interesting.

All in all, it’s very exciting, and I hope it will just continue to be. I’m looking forward to the rest of the day, and tomorrow is going to be a new story.



ThoughtWorks, Mingle, RubyWorks and JRuby


So this is something that’s been brewing for a while now, and it’s all very exciting and was announced this morning at the keynote by Cyndi Mitchell. The relevant points are Mingle (which I’ve talked some about already), RubyWorks which is an umbrella for the things the enterprise needs to make Ruby viable. The first product out of RubyWorks is an installable package which gives you the deployment story basically for free. It’s quite awesame and ThoughtWorks will offer 24/7 support for it from June.

For me personally, the most important part is that ThoughtWorks will also offer JRuby support 24/7 from June. That’s right, 24/7 JRuby support. Wow. ThoughtWorks does believe in JRuby, they think it’s something really important, and we want everything to get this.

Find out more at http://rubyworks.thoughtworks.com.



JRuby RC2


The day before RailsConf started, me, Charles and Tom sat in the lobby of the Courtyard, coding away, fixing problems and pushing out something like 5 versions of 1.0RC2. But the final RC2 is really, really good. You should download it, test it, and if you’re at RailsConf, report any bugs you find and get a cool t-shirt! JRuby is really making a huge buzz at RailsConf right now, and it’s sort of overwhelming! I’m very happy about it, of course, and there is still some nice things happening. Yesterday, we got a small bug in truncating files fixed, which means exclusive file locking works now.

1.0 is looking really, really good. It should be out by the end of May, and it’s going to be a smash.



JavaOne day 4: the final friday


So, the day started out quite late (since I was way tired after last night…). First session was a very accomplished, though slightly shallow, comparison between doing an application with Java EE 5, Ruby on Rails and Grails. I didn’t really learn anything new in this presentation except that Java EE 5 is even slicker with NetBeans, and that Grails is maddeningly, sickeningly, seriously slow when doing simple stuff like creating scaffolds. I can’t understand why this is so, since it isn’t much do it. Basically just create a file with a few rows of customization.

After that I paired up with Jon to look at Mingle again. Oh boy, the ones who is coming to RailsConf will get a treat, that’s for sure.

The Jython session by Otmar Humbel was really good, and had a great example. Basically the whole demo sessions were done in one single application which he started at the beginning and never stopped. He just hotswapped the Jython code dynamically. Very nice. I think the most interesting part of that talk was in the Q&A when someone asked why you should use Jython instead of Groovy or JRuby. I’m sad to say that I had to literally run at that point, so I didn’t hear the answer… But still, if someone was there and heard, please tell me. For me personally, it’s very impressive that Jython got started in 97, and actually is still alive (due to a recent revival of course, but even so. I’m glad Charles gave up one of his talks to let the Jython guys in). It was also interesting to see the differences in philosophy between JRuby and Jython in terms of Java integration and things like that. Very good stuff.

The bytecode manipulation talk was interesting; it was nice to see what (and how) Terracotta does with ASM. The TopLink parts were nice, but really way to basic to be interesting. Charles stuff was good, of course. We know Charlie always does good things, don’t we? =)

I had great fun at the Java Puzzlers this year. I’m happy about there not being many puzzles incorporating generics, because those are usually boring. The main problem that these guys always exploits, seems to be mostly in the boundary between Java Objects and primitives, and interactions between primitives. That’s what you get when you try to create a language meant for both system development and application development. It just shows in all the seams. A good language should not have seams, unless they’re necessary for the specific domain of that language.

Finally, Rob Harrops talk about exploiting JRuby to create DSL’s was really good. It was great, and Rob is a very accomplished presenter. I had great fun. That said, I think that some of the stuff still went over the head of most Java developers in the audience.

And that seems to be the theme. Most things I enjoy, I think most other people didn’t enjoy. Interesting, that.

So, now it’s off for dinner at the Stinking Rose with the JRuby guys, Dion, Barry Burd and Jon.



JavaOne day 3


The third day of the conference started slow, due to my being dead tired from the day before. But I still managed to get to Charles and Tom’s JRuby on Rails presentation. Obviously, this was a very good presentation and JRuby is very important. But you know all that, already, don’t you?

I then went on to a session giving a technical overview over GlassFish v2. Now, this seemed interesting, but wasn’t really so. There was some nice information about how clustering should be setup so you don’t lose to much data if you have more than one instance on the same machine, but other than that… Nah.

After lunch, I went to the Advanced Groovy talk, expecting to see cool overridings of the MetaObjectProtocol, or how to implement your own AST shufflers. But no. What we instead got was some tidbits here and there, and explanation of how to add new methods to existing Java objects (and this is really gross, you have to wrap the usage of these methods in a block, and the methods are defined on a new class as static methods…) Anyway, on to the demos. I got a real feeling of Deja Vu, since I had seen this exact same demo last year… XMLRPC communication between two Groovy instances, then ActiveX usage of Excel, combining it with Swing. So, yeah. As someone else said “It’s a really great Excel demo, but what has that got to do with Groovy?”.

Next, I took it easy for a while, walked around and did some programming. Finally, it was time for Tor’s and Martin’s talk about Ruby Tooling in NetBeans. And boy, it was an outstanding talk if you’re interested in compilers, type inference, the challenges of dynamic languages and other stuff like that. I loved it, but I think most of it went over the head of most people in the audience.

Then I was of to the Sun Certified Professionals party which is always nice. I met some cool people and Lars won good swag by being smart really fast. Good for him!

The After Dark bash was quite allright, but nothing extraordinary. And it got really tasteless when the showgirl in metal corselet came onto stage with a grinder, which she turned on herself, making sparks fly all over the place.

After that, we went to the JRubME talk, about JRuby on Symbian and Java ME. A great talk and a great project. In fact, it’s really really cool, and if you’re interested in ME, you should download the source and start hacking a way on it! The project needs contributors.

We went back to the After Dark bash finally, took some more beer, and then decided to move on. The quest was for Aquavit, and someone thought that the Starlight Room would be a good place for this, so we headed there just to find out they didn’t have either Aquavit nor any good scotch. Oh well, it was fun anyway, and the view was fantastic. Characteristically, me, Tom and Charles got into a real interesting discussion about the subjectivity of self presentation, and representation of knowledge in terms of probabilities and deltas from ideal knowledge, and how this applies to onthologies. Neat stuff. But maybe the dance floor wasn’t the best place to have this loud discussion…

After that we settled down and decided it would be fun to have a JRuby summit in Minnesota! So, we’ll see if that is possible… Then I crawled home to my hotel. My feet are killing me today, but there are some really interesting presentations, so I’ve gotta go.



JavaOne day 2


So, my day didn’t start out with the Oracle general session, which I’m quite happy with in retrospect. Instead the first talk I saw was “Quick and Easy Profiling with Integrated Tools”, about NetBeans profiling support. Very useful stuff, actually, and 6.0 can do some amazing things.

After that, it was time for a packed Josh Bloch’s Effect Java Reloaded, except it wasn’t really reloaded that much yet. I was a little bit disappointed, since most of the stuff was the same as last year. Some parts about the Builder pattern, much info about do’s and don’ts with generics (much of it having to do with type parameters and wildcards). The TypeRef pattern was interesting, but not something I will find very much use of, I think.

After lunch a went to a presentation which I really thought would give me something. “Ruby on Rails Meets the World of Enterprise Applications”. Now, I really hoped this would include some information on the Enterprise problem with regard to Rails. I was very disappointed. The talk was basically about a 3-week application written in Rails that connected to SAP. So the enterprise in question was there because of SAP. That said, the presenter was good, it was just not the subject I had wished for. And by the way, what does this presentation do on JavaOne?

After that, I spent some time looking at Mingle issues with Jon. I decided to go to the upper Haights’ area to shop, and then get back to my hotel room for some programming. As it turned out, I really didn’t go to any more sessions yesterday. After programming, I went to a Swedish Java User Group meeting here (and what a turnout! it seems like there’s over 200 Swedes at JavaOne this year.)

The plan was to get back to the BOF’s after that point; there was especially one I really didn’t want to miss (the Dynamic Languages BOF with Frank Cohen). But, I happened to get invited to the Google party, so I spent the rest of the evening there, meeting lots of interesting people. It was great fun.

And now I’m about to go in and see Charles and Tom do the JRuby on Rails presentation. More information later.



JRuby on the technical general session


Charles O Nutter and Tor Norbye just got on stage here, and showed of deploying Mephisto as a WAR-file, and then changing it to add text-to-speech functionality, with a Java library that generates an audio file. The total code they wrote on stage was about 10 lines of Ruby… The power of Java and Ruby together: it’s beautiful.

I already knew what they would do, having helped fix many of the issues getting in the way for Mephisto, but it’s still incredibly cool. Charles and Tor got several impromptu applauds from the audience too, so I’m pretty sure people think it’s neat.

Right now, I’m starting to get curious why people continue to use the term “scripting language”. It doesn’t seem to fit either Ruby nor Groovy anymore. Oh well. Nitpicking.

Next up is Arun Gupta. He’s talking about jMaki and Phobos, both very nice usages of JavaScript and other languages.



JavaOne: Keynote and Groovy session


I’m sitting in the general session hall, waiting for the first technical general session to begin. Yesterday was CommunityOne, where we had some interesting discussion about dynamic languages within the context of the RedMonk Unconference. Aside from that, the best parts of the day way announcing that Mingle runs on JRuby, and meeting up with all my soon-to-be fellow ThoughtWorkers. They’re a great bunch of people, and we had good fun.

Today was the opening general session, where Rich Green announced some very interesting developments. Among these are the fact that the open sourcing of Java is now complete, that Sun is coopering quite heavily with UN to provide resources for education to areas of the world where this have long been a huge problem. But the most important announcements were about something called JavaFX. I can’t really say I understand it completely yet, but it seems to be an effort to tackle Microsoft Silverlight, and also fix several deficiencies in Swing by providing JavaFX Script (which looks very much like F3. I’m not sure if it actually is F3 or something else.). This obviously begs the question why Sun finds it prudent to invent a new language, instead of using one of the many great efforts existing in the dynamic language communities for this problem. For example, both Groovy, Jython and JRuby have different versions of SwingBuilders, which allow you to rapidly create Swing interfaces with a specialized DSL for this.

Except for that, the general session and keynote was more or less like usual. Very flash, very markety, but still more technical than I imagine other conferences are. And it was fun to see Rich Green being compared to Steve Jobs…

The first technical session I went to was called “Cool Things You Can Do with the Groovy Dynamic Language”, and was presented by Guillaume Laforge and Dierk König. It was a quite good session, but I can’t get away from my general opinions about the Groovy language. So, before I say something about the presentation, I need to describe my feelings for Groovy. Remember, these are my personal opinions, and some are definitely based on feeling without any specific rationalization.

I would really like to like Groovy, but I can’t. I’ve really tried, but I can’t find the Groovy language to my liking. And believe me, for some circumstances, Groovy should be able to fill the gap between Ruby and Java better than JRuby, at least in some cases. The Java integration in JRuby is quite hard, dispatch and overloading makes calling Java code complicated (from an implementation point, not for the user). All of this would be much simpler with the Groovy approach. But no, I still can’t get along with Groovy. The main reason, I believe, is the feeling I get from all code that the language Groovy have grown piecemal, adding stuff that’s neat wherever. I’m not sure this is the actual way Groovy was designed, but it feels like a modern version of Perl. The syntax doesn’t mesh, and there are numerous (small, but nonetheless there) inconsistencies in how things are handled; many of the things that the language provide for you is things that really shouldn’t be part of the language, but part of a library instead.

So, from this point of view, the presentation walked through several new features of Groovy, and lots of things you can do with it. They talked a bit about the new support for annotations and the plans for generics. Some of it was quite cool; I like the builders (but I prefer Markaby to the XMLBuilder), and some of the features are quite handy. But looking back at my earlier feelings I still see a design process more focused on finding problems with Java, and duct taping them with Groovy. (Like this: in Groovy, all exceptions get handled automatically, making it look as if all exceptions are unchecked.) I have no problem with many of these features, but I don’t think it’s a good way to create a general purpose language.

I’ll be back later with more info on the rest of the days sessions.



Mingle on JRuby


Here’s the deal: ThoughtWorks first product offering is called Mingle. The kicker is, it will be deployed on JRuby. I have been involved with this for a while, getting everything in good working order, and I’m sure TW won’t regret this decision. JRuby is important in their strategy, and Mingle, as the first commercial JRuby application is a huge deal.

You should go and read more about this exciting news at http://studios.thoughtworks.com/2007/5/7/mingle-to-run-on-jruby.



Announcing mongrel_jcluster


As I mentioned in my last post, that server/client thing wasn’t the only thing I worked on during the flight. I also did a very useful hack of mongrel_cluster, and turned it into mongrel_jcluster. It’s not very large changes, actually… Almost everything is the same, except that this mongrel plugin only runs in JRuby, and will start several mongrels in the same JVM.

jruby -S gem install mongrel_jcluster
cd your_rails_app
jruby -S mongrel_rails jcluster::configure -p 4000 -N 3 -e production -R 20202 -K thesecretkey
jruby -S mongrel_rails jcluster::start

The only difference in the configuration parameters are -R and -K which is the JRuby server port and key respectively. Now, after executing these commands, it will take some time for the mongrels to get online, so be patient (or monitor the progress in the log-files generated).

I need to warn you that this is still quite experimental and not guaranteed to work in any way. =) But it does for me.

Another thing, if you start Mongrel in production mode, the defualt Rails front-page will give you an error if you try to get at the properties. This is the expected behavior in production mode, though, and nothing wrong with JRuby.