Tuesday, August 4, 2009

Ruby stands or falls with JRuby?

Headius makes an interesting argument

I believe that JRuby is the most crucial technology for Ruby's future right now. Regardless of how fast or how solid the C or C++ based Ruby implementations get, the vast majority of large organizations are *never* going to run them. That's the truth. If we can leverage JRuby to grab 1-2% of the Java market, we'll *double* the size of the Ruby community. If we completely lose the Java platform to alternatives, Rubyists may not have the luxury of remaining Rubyists in the future. It's that big a deal.

Friday, October 31, 2008

Headius on FFI

As usual Headius is the shit

FFI stands for Foreign Function Interface. FFI has been implemented in various libraries; one of them, libffi, actually serves as the core of JNA, allowing Java code to load and call arbitrary C libraries. libffi allows code to load a library by name, retrieve a pointer to a function within that library, and invoke it, all without static bindings, header files, or any compile phase.

Take that SWIG! Although IIRC, .NET (including Mono) had some this sort of coolness as well.

To break it down

A simple FFI script calling the C "getpid" function:

require 'ffi'

module GetPid
extend FFI::Library

attach_function :getpid, [], :uint

Sunday, October 12, 2008

Nanite: Ruby Cloud Computing

Over on Ruby Inside Peter blogs on Nanite which really looks interesting -- not that I'll have any time to play around with it anytime soon.

Sunday, October 5, 2008

Ruby HTTP Client Performance

Courtesy of Ruby Inside there is a pretty interesting analysis of Ruby 1.8.x client performance

Ruby’s Net::HTTP implementation blows. It’s a bit better in 1.8.7 with the new 16K buffer size, but the timeout implementation has got to go. Even with timeout eliminated, Net::HTTP is trounced by the pure-Ruby rfuzz and the native/Ruby blend curb, suggesting that timeout notwithstanding, there are other inefficiencies in Net::HTTP. Looking at the protocol.rb code, I’m struck by how painfully inefficient the implementation is with buffers. rfuzz and curb minimize buffer copies and my rfuzz streaming HTTP extension reuses the same buffer for multiple calls, while Net::HTTP is happily appending and sliceing away at arrays.

Wednesday, September 24, 2008

Headius and the Elephant

At Cisco we used to have the phrase "No Technology Religion" on our badges and although this is easier said than done, it is the thought that counts (to double up on cliches).

It is the religious fervor (intolerance of diversity and the belief in one path to enlightenment vs. many ways to climb the mountain) that seems to be one of the differences. between between the Python & Ruby communities:

The is illustrated in the The Elephant from earlier this month:

I don't see this in the Python community, for example, which might surprise some Rubyists. Pythonistas seem to have positively embraced both IronPython and Jython. There's no side-chatter at the conferences about the evils of anything with a J in it. There's no mocking slides, no jokes at Jython or IronPython developers' expense. No "Python elite" cliques actively working to shut Jython or IronPython out, or to discourage others from considering them. The community as a whole--Guido included--seems to be genuinely thankful for implementation diversity. Even if one of them does have a J in it.

Tuesday, July 1, 2008

Matasano on Ruby Vuln Handling

A must read if you need something to be angry about.

Developers relying on any of these frameworks are then faced with a difficult choice: wait an indeterminate amount of time for a good release from the official maintainers (and remain vulnerable in the meantime), or apply a patch from a third-party which may not plug all the security holes, or may include unforeseen bugs. This is clearly a problem. In the meantime maintainers have to scramble to get ruby back to a good state that actually plugs the holes while people complain. Everyone loses.

Monday, May 26, 2008

21 Ruby Tricks

Haven't blogged here forever (mostly using Python these days, although I did break into some JRuby a couple of weeks back to avoid Java coding) but definitely check out 21 Ruby Tricks from Peter Cooper.

Regex, Array Joins, file operations, and more
Good stuff..