The Even Bigger News About Maglev 8
I'm not at Railsconf this year, but before he left I asked my coworker Krishna to beg for, borrow, or steal a copy of the Maglev alpha code and bring it back to the office. Unfortunately, it looks like that's not going to happen (in an email he says "They don't have anything to share at the moment"), damn it.
Still, as Obie says, this is a huge deal. Even without the stated performance improvements that they're already seeing (I'm hearing 5x to 100x in microbenchmarks vs the MRI), it would still be a huge deal, because this might be our best chance ever to move people to a real object database. And not just any object database, but one of the best object databases out there.
Once you use it, you won't ever want to go back.
As far as I'm concerned though, the bigger news about this is that the Maglev VM "does retain the ability to run Smalltalk code." As long time readers of this blog know, I'm a big fan of Smalltalk and the Seaside framework, and being able to start a project in Rails and then use the same data to build a Seaside app will knock down another huge barrier as far as getting people to try Seaside goes, (see my my post from a year and a half ago about sneaking Smalltalk in through the Ruby backdoor).
In my experience, Seaside makes writing web applications faster and easier than even Rails does.
Paul Graham is well known for saying that their secret weapon while developing Viaweb was Lisp, because it let them develop software faster than any of their competitors.
Ruby + Smalltalk + Gemstone is your secret nuclear weapon.
Not only will it let you develop software faster than any of your competitors, it will also let you scale that software in an easier manner than ever before.
Apple OS Upgrades Need Decent Release Notes (Ruby Broken in 10.5.3)
I've been dead in the water all day here because Apple changed something in the underlying Socket/Networking implementation in Mac OS X 10.5.3 and now Ruby doesn't correctly handle sockets. I've been looking at it, but haven't figured it out so far.
My thread on ruby-talk is here http://www.ruby-forum.com/topic/154556 if anyone wants to weigh in on it.
I'm assuming something has to be patched into getaddrinfo.c in the ruby distribution, but my C is more than a little rusty, so it's slow moving for now.
Really, how hard is it release a document along with an OS upgrade explaining the low level changes made. Isn't that what we have the Apple Developer Connection for?
Should I Care If You Use Ruby (or Any Other Language For That Matter)? 9
It seems like every time I post something bad about a programming language, or compare one language (A) to another (B), at least one commenter lets me know that they like language B better, and furthermore, some aspect of my post has convinced them that language A is so bad that they won't even try it anymore.
The thing is, I don't care.
I'm not a consultant anymore. I'm not trying to sell you anything (unless you need drug discovery software). I'm no longer actively involved in open source community. If you don't want to ever try Ruby (or Smalltalk, or Python, or whatever) it really doesn't matter to me.
When I point out something about a language, I'm just doing it because I genuinely think that it is better than something else.
So how do I really feel about languages?
Well, over the last couple of months I've written code in Ruby, Smalltalk, Javascript, Python (if you haven't read Programming Collective Intelligence you should), Java, and even PHP (SearchMonkey is seriously cool, if you haven't checked it out).
So what language do I think that you should program in?
All of the above, and as many more as possible.
Learn about functional programming. And iterator methods. And closures And continuations.
Even more importantly (from my selfish point of view), learn about things that other programming languages can do that I don't know about.
Then hopefully someday we'll be able to have a discussion about programming languages without resorting to pointless statements like "I still prefer braces over keywords for blocks" and instead we'll get comments that we can all learn something from.
Ruby is a Playground, PHP is a Factory 30
While reading yet another article on why PHP Sucks (today's witty twist, "but It Doesn't Matter") I realized yet another reason that I'm glad to be programming in Ruby.
Ruby, to me, is like a big open playground, while languages like PHP remind me of big industrial factories. I don't think that any of us would argue that industrial factories are more efficient for most things, but they also suck the creativity and life out of the people working in them.
For instance, why would you ever want to write code like this:
class DescribeNewBowlingGame extends PHPSpec_Context
{
private $_bowling = null;
public function before()
{
$this->_bowling = new Bowling;
}
public function itShouldScore0ForGutterGame()
{
for ($i=1; $i<=20; $i++) {
$this->_bowling->hit(0); // someone is really bad at bowling!
} $this->spec($this->_bowling->score)->should->equal(0);
}
}
when instead you can write this:
describe Bowling do
before(:each) do
@bowling = Bowling.new
end
it "should score 0 for gutter game" do
20.times { @bowling.hit(0) }
@bowling.score.should == 0
end
end
You wouldn't. The first case is, at best, a bastard representation of the second case.
Of course, being out on the playground means that people get hit in the face with a ball once in a while, and everything isn't as neatly laid out for you as it is in a factory, but you also have the option to be creative, and not just do things like everyone else does.
And, sure, the playground is far more full of assholes than the factory, but these assholes are also more creative and entertaining to work with than people who just put widgets in place in a factory.
Plus the playground has that weird kid in the corner who's doing something totally crazy, but that just might be a genius, and if you get enough of these kids together, you're going to produce something that's much cooler and more creative than anything that gets built in a factory.
So you can talk all you want about big boring websites being written in PHP (or Java, etc).
As for me, I'll keep working in a language that encourages people to be creative.