wondering why dRuby broke on yr new OSX?

If you’re seeing this error:

/opt/local/lib/ruby/1.8/drb/drb.rb:865:in `initialize': getaddrinfo: nodename nor servname provided, or not known (SocketError)
from /opt/local/lib/ruby/1.8/drb/drb.rb:865:in `open'
from /opt/local/lib/ruby/1.8/drb/drb.rb:865:in `open_server'

because you’ve just upgraded OSX, the issue is in the actual Socket call:

Socket.getaddrinfo(Socket.gethostname, 0, Socket::AF_INET, Socket::SOCK_STREAM, nil, Socket::AI_CANONNAME)

This is the origin of the error. If you change the param at 1:

Socket.getaddrinfo(Socket.gethostname, nil, Socket::AF_INET, Socket::SOCK_STREAM, nil, Socket::AI_CANONNAME)

OSX goes on, happy as can be. The process of dealing with OS upgrades is pretty interesting and so is the discussion around it, from a community/coding standpoint. You can check out this thread here.

http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/ccf6510ee91c21ac?hl=en

Sketchpad, the GUI from 1962

This is definitely worth checking out not only for historical purposes, but also simply for reference: that’s a fine UI, in 1962 or 2008, which makes it all the more impressive:

On an unrelated note, if you haven’t read this paper which is tellingly titled “Do Formal Intellectual Property Rights Hinder the Free Flow of Scientific Knowledge? An Empirical Test of the Anti-Commons Hypothesis” and you’re at all interested in commons/copyright and the exchange of information it’s an enlightening one. I came to it by reading an article on Juan Freire at “we make money not art”.

Snippets in Flex Builder and Joe on RPC

Well I guess there is support for snippets in Flex Builder already, spotters badge to Dustin, thank you very much. I’m realizing my decision to use the stand-alone FB3 install was a poor one (I mean, I knew that already when I was doing it but I can’t be expected to be thinking all the time, right?). So following some info here at nwebb.co.uk, I tracked down the snippets grail. Now I just have to rework a few things on my dev setup I suppose.

I just couldn’t resist re-posting this here because it’s just so dang pretty:

Interactions of the form tell X to do Y then send the result to Z are impossible to express in a standard RPC framework (like SOAP) but are simple in Erlang:

rpc(tell,X,toDo,Y,replyTo,Z) ->
X ! {Z, Y}.

from armstrongonsoftware, from Joe Armstrongs blog.

I second it: templates for Flex Builder

I second Leif Wells request for snippet support in Flex Builder. I use TextMate a fair amount for development on my Mac and once I learned how to use snippets and write templates, I couldn’t stop using them and it helped me concentrate on the parts of development that I really wanted to concentrate on. I do a lot of writing in Microsoft Word and once I learned how to write macros, I couldn’t stop, it helped me concentrate on the parts of writing that I really wanted to concentrate on. I do a lot of coding in Eclipse using Flex Builder and…that’s kind of where that ends. When uber-coders wax poetic about emacs I get jealous, because the IDE that I work on a lot in my day job doesn’t allow me to use templates or snippets. It does a lot of other cool things, but it doesn’t help me out there, and being able to write out switch/case, for, do/while, getter setter declarations, or any of the other things you can do easily, in three keystrokes, is pretty sweet. So vote for FB-11842. And, oh, go to Leifs blog.

365 O’Reilly Books in 400 days

Seriously, the folks at Parsons really walk the line between brilliance and insanity. I personally can attest to the joys of OpenFrameworks (a Parsons-related product) among other things, and I just found this project, “Computer Skills” by Charles Broskoski, that just, well, blows me away. I like code. I like books about code, hence, I like O’Reilly. But this guy took it way further: he read 365 O’Reilly Books in 400 days. Check it out.

Flex 3 Cookbook

Now that it’s out, I’d be really curious to know what people think of the Cookbook, now that it’s at Amazon and on Safari. You’re certainly not under obligation to say nice things, mostly I’m interested in peoples thoughts. I know it’s not a super-advanced whitepaper or groundbreaking research by any means, but I’m wondering if that’s what people were wanting, rather than something aimed at intermediate Flex developers. If you’ve got an opinion, let me hear it. Thanks,

Why Facebook chat scaled so well

The answer is….aside from having a pretty amazing dev team of course, yep, Erlang. It’s basically a Comet HTTP server, with a C++ app handling the log of chat messages, and an Erlang based server to handle the polling and HTTP requests:

For Facebook Chat, we rolled our own subsystem for logging chat messages (in C++) as well as an epoll-driven web server (in Erlang) that holds online users’ conversations in-memory and serves the long-polled HTTP requests. Both subsystems are clustered and partitioned for reliability and efficient failover. Why Erlang? In short, because the problem domain fits Erlang like a glove. Erlang is a functional concurrency-oriented language with extremely low-weight user-space “processes”, share-nothing message-passing semantics, built-in distribution, and a “crash and recover” philosophy proven by two decades of deployment on large soft-realtime production systems.

It’s all here

The other really interesting thing that this mentions here is Thrift, which is the Facebook platform for enabled simple RPC communications between different apps. It’s available open source here, and if anyone has used it definitely let me know how it worked out for you.

Flash Player 10 beta!

Am I first? Am I first? Am I first? No? You mean all the other thousands of Adobe bloggers beat me to it? Aw. Drat. Anyways: link. Click on my ads and buy stuff. Just kidding. I write this blog out the sheer love of blogging and no other discernible platform on which to express myself. :)

steveys super awesome language post

If you don’t read Steve Yegge’s blog, you totally should. Because this post, which is the transcript of a talk he gave at Stanford, is awesome. Almost all of his posts are awesome, the only ones I exclude from the ‘awesome’ category are those which are merely ‘pretty damn good’. This quote in particular has given me pause:

In Java 1.0, when you pulled a String out of a Hashtable you had to cast it as a String, which was really stupid because you said

String foo = (String) hash.get(…)

You know, it’s like… if you had to pick a syntax [for casting], you should at least pick one that specifies what you think it’s supposed to be, not what it’s becoming – obviously becoming – on the left side, right?

But, but, but…isn’t that what all languages are supposed to do? Well? Think about it. Is it?