08 Feb 2010

Performance Retrospective in PEP 3146 -- Merging Unladen Swallow into CPython

Shame:

Our initial goal for Unladen Swallow was a 5x performance improvement over CPython 2.6. We did not hit that, nor to put it bluntly, even come close. Why did the project not hit that goal, and can an LLVM-based JIT ever hit that goal?

Here’s the performance comparison itself. Most gains were under 1.5x and memory usage grew significantly in every benchmark. Startup time also suffered.

As mentioned in the Performance Retrospective, they had to divert a lot of energy from performance work to fixing LLVM bugs and axe grinding on debugging/profiling tools. I have my fingers crossed that they can pull off the 5x gains in the next round. Let’s hope so, I'd demand at least that much to justify this:

In order to use LLVM, Unladen Swallow has introduced C++ into the core CPython tree and build process.

Slipperyest of slopes.

python.org   08:41

A rant about PHP compilers in general and HipHop in particular

Paul Bigger, author of the phc PHP compiler, explains why Facebook’s HipHop is interesting and why the translator/compiler technique might be a better design than a JIT or something more… elaborate. Good article all around, even if you don’t care about PHP.

There’s some salt in there too:

I’m also slightly annoyed that people all of a sudden care about PHP compilers. I worked on one for 4 years and I could not convince anyone to give a shit. But now that its got the Facebook logo on it, all of a sudden PHP compilers are the greatest thing ever. Bah.

Lesson in marketing. Merit is not conducive to mass appeal.

blog.paulbiggar.com   08:19

03 Feb 2010

Sayre's Law

More general version of Parkinson’s Law of Triviality (AKA “bike shedding”):

“In any dispute the intensity of feeling is inversely proportional to the value of the stakes at issue.”

Via this HN comment thread discussing the tendency of both Ruby and Python hackers tend to favor their chosen language with vehemence.

en.wikipedia.org   11:41

02 Feb 2010

HipHop for PHP: Move Fast

Wow, okay, so it translates PHP into C++ and then compiles it with gcc. That’s… interesting. Here’s what’s more interesting, if you ask me:

We are proud to say that at this point, we are serving over 90% of [Facebook’s] Web traffic using HipHop, all only six months after deployment.

That’s pretty damn fast, and super impressive if true. I can’t imagine the amount of infrastructure that would need touching for this kind of transition. You have to work with the backend devs and the sysadmins and pretty much everyone. That’s no small feat at a company the size of Facebook. Kudos.

developers.facebook.com   09:55

01 Feb 2010

Book Review: Coders at Work

A quote from Brad Fitzpatrick:

I find that is the best way to start a conversation. If you get on a mailing list and you are like ‘hey I want to add feature X’ the maintainer is probably going to be like: ‘ Oh fuck, I am so busy, go away, I hate feature X’. But if you come to them and you are like ‘I want to add feature X. I was thinking something like the attached patch’ which is totally wrong but you say, ‘But I think its totally wrong. I am thinking the right way might be to do X’ which is some more complex way, generally they will be like ‘Holly crap, they tried and look, they totally did it the wrong way. Maybe that pains the maintainer. They are like ‘ Oh man, I can’t believe they went through all that effort to do it. Its so easy to do the right thing,’ and then they reply.

This is the secret to being productive when contributing to open source. It’s very rare that you should approach a mailing list without a patch of some kind.

dfectuoso.com   01:16

30 Jan 2010

Sinatra 1.0 FAQ

We pushed out a Sinatra 1.0 pre-release. The FAQ includes some info on what the 1.0 release means and how to prepare for it.

sinatrarb.com   12:36

27 Jan 2010

HANDY ONE-LINERS FOR RUBY

Nice list of Ruby one-liners when working at the shell. e.g., emulating nl(1):

# number each line of a file (left justified).
    $  ruby -ne 'printf("%-6s%s", $., $_)' < file.txt
# number each line of a file (right justified).
    $  ruby -ne 'printf("%6s%s", $., $_)' < file.txt
# number each line of a file, only print non-blank lines
    $  ruby -e 'while gets; end; puts $.' < file.txt

Unlike some other things, the -p and -e switches are something I've always been glad ruby adopted from perl.

fepus.net   10:08

Introducing: Readability 1.5

The Arc90 guys have a nice little Readability update. Two new styles with beautiful Typekit faces and more size and margin options.

This is cool too:

Beyond the “wow, this makes reading so much easier” comments is a whole slew of emails from the elderly, people with vision or cognitive difficulties and users that rely on screen readers. It’s incredibly gratifying to see Readability make a difference for so many people.

For the record, I'm rocking the Athelas style (type info) with Large type and Medium margins.

blog.arc90.com   01:25

25 Jan 2010

In praise of git’s index

Aristotle explains how he uses git’s index and how it makes git unique among VCSs. I've raved about git’s index before in The Thing About Git. It’s great.

plasmasturm.org   15:41

21 Jan 2010

How would you serve 100,000 simultaneous comet requests with Node?

Simon Willison throws down a C100K problem for node.js. That’s a tough order for a single machine. To get even close, you’re going to need lots of system tuning way down below node.js.

groups.google.com   04:23

19 Jan 2010

WTF - Haml

I love this so much:

… one way or another it seems I need something called EMACS.. WTF..!!!!! I dare you to install it and see how many WTFsss you will say…. it’s like some text editor that is so smart that you dont use the mouse dont even use the cursor keys..if you want to go back one character you hit control then B!!! Brilliant!!! two random keys instead of one with an arrow!!!! WWWTTTFFFF!! ok I might not need this crap…. lost a day learning to use the Rubik cube of text editors.

It’s easy to pfft and blow off this kind of … criticism, but if you can look past the make believe grammar and punctuation you really do get a sense for how hard it is for newbies to wrap their heads around even very basic set of tools needed to build things on the web. Maybe what we do is just hard and complex and there’s nothing we can do to make it simpler. I'm just always surprised when I get to peek through someone else’s eyes and see just how fucked up everything must seem.

groups.google.com   07:35

15 Jan 2010

Node.js For My Tiny Ruby Brain: Keeping Promises

Rick documents his progress a week into node.js. Nice look at some of the basic concepts underlying the system, like async everywhere and promises.

techno-weenie.net   09:22

Highcharts - Interactive JavaScript charts for your webpage

Nice looking pure JS charting library:

highcharts demo chart

I've been seeing more and more of these charting libs lately and they all look great.

highcharts.com   07:27

12 Jan 2010

/dev/fort

A master plan:

Imagine a place of no distractions, no IM, no Twitter — in fact, no internet. Within, a group of a dozen or more developers, designers, thinkers and doers. And a lot of a food.

Now imagine that place is a fort.

They’re serious:

a fort

devfort.com   21:13

09 Jan 2010

ASCII Table - The Pronunciation Guide

ASCII punctuation characters and their various pronunciations. e.g., the entry for Exclamation point (!) lists:

exclamation (mark), (ex)clam, excl, wow, hey, boing, bang, shout, yell, shriek, pling, factorial, ball-bat, smash, cuss, store, potion (NetHack), not (UNIX) ©, dammit (UNIX)

That last one has a footnote: “as in ‘quit, dammit!’ while exiting vi and hoping one hasn’t clobbered a file too badly.”

ascii-table.com   01:38

08 Jan 2010

Do It Now

Nice. The todo / email / information “management system” I've been using for a while has a name now:

This doesn’t just apply to email, of course — it works for any todo list. But only if you say no to reordering, prioritizing, estimating deadlines, and doing the most important things first. Forget all that. Do it now.

Seriously. All that productivity snake oil is destroying your productivity. Being productive at managing productivity is not the same as being productive.

aaronsw.com   13:57

06 Jan 2010

Rack 1.1 released

Lots of needed fixes and some new features in this release, including new Config, ETag, Sendfile, and Logger middlewares, Carl and Yehuda’s rackup to Rack::Server conversion, multipart fixes, and a bunch of optimizations by Eric Wong.

Huge props to Josh Peek for putting his head down man'ing the patch queue on this one.

groups.google.com   04:54

The Maximal Usage Doctrine for Open Source

I like the way Yehuda first lays out his motivations and goals as an open source developer and then evaluates the MIT/BSD vs. GPL licenses based on those goals. That’s how you pick a license. No one can tell you why you write a given piece of free / open source software, so no one can really tell you how it should be licensed.

Like Yehuda, I tend to lean heavily toward MIT/BSD style licenses these days but I can imagine situations where the copyleft stipulations included in the GPL would be extremely important to me.

yehudakatz.com   04:16

Things UNIX can do atomically

Insanely useful when you’re trying to avoid thread and process synchronization primitives — mutexes, flock, etc. — in concurrent code, which should basically be always. Rack::Cache’s file stores use some of these techniques to allow multiple backends to work against the same filesystem without file locks or a separate central writing process.

rcrowley.org   03:56

Doing It Wrong

Tim Bray on the state of Enterprise tech:

This is unacceptable. The Fortune 1,000 are bleeding money and missing huge opportunities to excel and compete. I’m not going to say that these are low-hanging fruit, because if it were easy to bridge this gap, it’d have been bridged. But the gap is so big, the rewards are so huge, that it’s time for some serious bridge-building investment. I don’t know what my future is right now, but this seems by far the most important thing for my profession to be working on.

That’s what led me to start (the now defunct) lesscode.org almost five years ago. Things actually seem to have come a long way since then, when the idea of using open source, dynamic languages, or web protocols would get you laughed out of the room. That’s not the case anymore.

I've given up the idea that advocacy can have an impact, though. Everyone has something to pitch The Enterprise. You get lost in the noise. Useful tech wins eventually.

tbray.org   01:35

05 Jan 2010

Optimizing Optimizing HTML

Oh neat. You can drop the type='text/javascript' from your <script> tags, type='text/css' from your <style> (and/or <link rel='stylesheet'>) tags and the browsers won’t care. Also, in 2010, <b> and <i> are cooler than <strong> and <em>, and trailing slashes on self closing tags are lame.

Personally, I like these little tricks for making HTML more human readable but I can’t believe people are actually doing stuff like this in an attempt to compress HTML to gain network/browser efficiencies. I dare someone to actually benchmark those optimizations. Cutting your sucky EULA page in half and trimming away all that shit in your header/sidebar would be much more productive (but still barely worthwhile).

annevankesteren.nl   13:22

29 Dec 2009

Debian/Ruby Extras - Dear Upstream Developers

Tips for Ruby project maintainers on increasing the changes of getting your stuffs packaged for Debian. Most are just good sense. Use setup.rb, don’t explicitly require rubygems in your libraries and tests, use the most portable shebang (#!/usr/bin/env ruby), and provide a man page. Ron can help with that last one.

pkg-ruby-extras.alioth.debian.org   09:00

18 Dec 2009

Server-Side Javascript: Back With a Vengeance

Nice to see Narwhal, Jack, CommonJS, and node.js getting some love on ReadWriteWeb. Javascript on the server is breaking out.

readwriteweb.com   09:49

09 Dec 2009

hub: git + hub = github

defunkt’s hub is a command line utility that adds GitHub knowledge to git. Sweet. It expands GitHub repository references so you can do stuff like: git clone defunkt/gist, git remote add bmizerany, etc.

github.com   09:19

ron(7) -- the opposite of roff

I've released a tool for authoring UNIX manual pages using a markdown-ish source format:

Ron is a humane text format and toolchain for creating UNIX man pages, and things that appear as man pages from a distance. Use it to build and install standard UNIX roff man pages or to generate nicely formatted HTML manual pages for the web.

It still needs some work but can produce useful output for both roff and HTML. The sources are on GitHub.

rtomayko.github.com   08:46

08 Dec 2009

Google Chrome for the holidays: Mac, Linux and extensions in beta

Google’s shipping official beta builds of Chrome for Mac and Linux. I've been using Chromium for a few months now and it’s definitely become my favorite browser. It needs a flash blocking extension and an ad blocker. I'm using userscripts for both but they’re a little janky.

chrome.blogspot.com   14:47

07 Dec 2009

Dean Allen on Human Identity

In comments related to the recent shutdown of Favrd:

I’ve spent the past year or so reading and writing and doing my level best to chip away at 40 years of belief in the logical fallacy that one’s identity meaning – self-worth, self-image, whatever you want to call it – can accurately be measured in the thoughts of others. Much as you and I may enjoy being encouraged through recognition and praise and dislike being saddened by rejection or indifference (god knows we’re taught to right from the outset by caregivers: good boy, pretty picture, heckuva job Brownie), deriving personal value from these transactions in the absence of a well-formed internal frame of reference through which you can decide on your own what does and doesn’t work, and subsequently accept the opinions of others as feedback, is just plain faulty thinking, of the sort that makes otherwise capable, centred people all loopy and weird.

Disco.

zeldman.com   18:43

Clarity in log files

Tobi’s log tail and grep app is precisely what I've wanted on every single syslog machine I've ever had to deal with. And the code has some great examples of using EventMachine features to do real async HTTP stuff.

blog.leetsoft.com   15:27

06 Dec 2009

Beauty and truth in physics

Murray Gell-Mann’s (quarks, Nobel prize winner, peer to Feynman at Caltech) TEDtalk from 2007 on the relationship between beauty (simplicity) and truth in science and mathematics:

What is especially striking is that in fundamental physics a beautiful or elegant theory is more likely to be right than a theory that is inelegant.

He goes on to give a bunch of anecdotes that show this playing out over and over during the development of particle physics.

youtube.com   23:41

02 Dec 2009

Beastie Boys - The Bill Adler File

Nobody ever believes me when I tell them the Beastie Boys toured with Madonna in 1984-85. Here’s a great set of super high-res press clippings to prove it:

Why isn’t everybody this cool?:

Bill Adler was the director of publicity for Def Jam in the 80s. He allowed me to photocopy his press file on the Beastie Boys from the time when they opened for Madonna.

This is presently the topic of great discussion in the GitHub campfire.

flickr.com   16:51

30 Nov 2009

Video: Node.js by Ryan Dahl

ry’s talk from JSConf.eu. The leading paragraph says it all:

Node.js might be the most exciting single piece of software in the current JavaScript universe. Ryan received standing ovations for his talk and he really deserved it!

Wow. JavaScript is pretty damn big universe right now.

jsconf.eu   18:45

27 Nov 2009

github.com   01:49

25 Nov 2009

"It's like twitter. Except we charge people to use it."

This email exchange is quite possibly the funniest thing I've ever read on the web. Here’s a tiny piece:

Actually, you were asking me to design a logotype which would have taken me a few hours and fifteen years experience. For free. With pie charts. Usually when people don’t ask me to design them a logo, pie charts or website, I, in return, do not ask them to paint my apartment, drive me to the airport, represent me in court or whatever it is they do for a living. Unfortunately though, as your business model consists entirely of “Facebook is cool, I am going to make a website just like that”, this non exchange of free services has no foundation as you offer nothing of which I wont ask for.

It’s just pages and pages of that.

Thank you @mojombo.

UPDATE: @SimonEdhouse responds
UPDATE: zing

27bslash6.com   14:57

23 Nov 2009

Node.js is genuinely exciting

I agree. I played with it for a couple days and now I can’t shut up about it. That’s basically all I talked about at RubyConf :)

simonwillison.net   14:58

17 Nov 2009

User Scripts (Chromium Developer Documentation)

Chromium runs GreaseMonkey user scripts, apparently. It also says here that “script edits are picked up [from the file system] automatically; just refresh the page to see the changes,” which is something that annoyed me with Firefox’s GM Addon — the files were buried, crazily named, and you had to use that janky addon manager bullshit to make/reload changes. What is that? A directory full of user scripts (now ~/.js on my system) is a perfectly simple setup. Combine that with right-now reloading and I might actually be able to develop these things when I need them.

Anyway, this AdSweep thing is what led me to investigate; looks pretty reliable if you can get through the GM setup.

dev.chromium.org   00:27

16 Nov 2009

ANN: node.js (JavaScript) BERT-RPC implementation: node-bertrpc

I've released a bertrpc library for node.js. If you haven’t play with node yet, set aside a night and dig in. Hacking async server-side stuff in JavaScript is every bit as awesome as I'd hoped: easy to install, good docs, fast VM, clean and simple event idioms. I'm impressed.

groups.google.com   17:04

12 Nov 2009

TURN - Test::Unit Reporter (New)

Tim Pease’s unit test runner and reporter is sexy and has some really interesting features I've never considered when running unit tests. Here’s a piece of the README:

To use the solo runner.

    turn --solo -Ilib test/

This will run all tests in the test/
directory in a separate process.
Likewise for the cross runner.

    turn --cross -Ilib test/

This will run every pairing of tests
in a separate process.

Now that’s interesting. I'd love to have something like GNU Make’s -j option when running unit tests.

github.com   21:48

11 Nov 2009

Writing good documentation

Jacob Kaplan-Moss:

It’s really tempting to use an auto-documentation tool like Javadoc or RDoc for reference material.

Don’t.

Auto-generated documentation is almost worthless. At best it’s a slightly improved version of simply browsing through the source, but most of the time it’s easier just to read the source than to navigate the bullshit that these autodoc tools produce. About the only thing auto-generated documentation is good for is filling printed pages when contracts dictate delivery of a certain number of pages of documentation. I feel a particularly deep form of rage every time I click on a “documentation” link and see auto-generated documentation.

Hate that shit.

You know what I want? Man pages. For everything. Wouldn’t it be cool if you didn’t have to write roff?

jacobian.org   17:09

09 Nov 2009

rtomayko's dotfiles

I recently started a repository for my dotfiles, shell environment, vim config, and utility scripts. As of right now, I'm about 25% through all of the stuff in my $HOME — it should all fill in shortly.

github.com   16:32

06 Nov 2009

"In practice, nothing works."

From the apparently just published, Coders at Work (Apress, 2009), Brad Fitzpatrick Talks About Programming:

In practice, nothing works. There are all these beautiful abstractions that are backed by shit. The implementations of libraries that look like they could be beautiful are shit. And so if you’re the one responsible for the cost of buying servers, or reliability – if you’re on call for pages – it helps to actually know what’s going on under the covers and not trust everyone else’s library, and code, and interfaces. (…)

They should have titled the book, “In Practice, Nothing Works”. Anyway, you can grab the — ick — PDF ebook for $20 on Apress.

blogoscoped.com   18:46

03 Nov 2009

Resque

Really excited to see Chris release the shiny new Redis-based work queue that’s been running GitHub for the past couple of months:

It boils down to this: GitHub is a warzone. We are constantly overloaded and rely very, very heavily on our queue. If it’s backed up, we need to know why. We need to know if we can fix it. We need workers to not get stuck and we need to know when they are stuck. We need to see what the queue is doing. We need to see what jobs have failed. We need stats: how long are workers living, how many jobs are they processing, how many jobs have been processed total, how many errors have there been, are errors being repeated, did a deploy introduce a new one?

I'm still getting my feet wet with the jobs system but I can’t wait to get my hands dirty in the guts of this thing.

github.com   04:26

02 Nov 2009

Notes on using NetBSD’s pkgsrc on Mac OS X

I've dumped MacPorts for pkgsrc. This quick tutorial helped me get going and this package browser is awesome.

rubenerd.com   20:38

dtach

Not sure how I never heard of this program before:

dtach is a tiny program that emulates the detach feature of screen, allowing you to run a program in an environment that is protected from the controlling terminal and attach to it later. dtach does not keep track of the contents of the screen, and thus works best with programs that know how to redraw themselves. dtach does not, however, have the other features of screen, such as its support of multiple terminals or its terminal emulation support. This makes dtach extremely tiny compared to screen, making it more easily audited for bugs and security holes, and also allows it to fit in environments where space is limited, such as on rescue disks.

GitHub has rake tasks that use dtach to manage redis and maybe some other things.

dtach.sourceforge.net   13:12

Primer (2004)

In honor of the greatest xkcd ever, this is Primer in its entirety. It really is that fucked up.

video.google.com   03:57

29 Oct 2009

$ cheat rdebug

Need more rdebug?

cheat.errtheblog.com   20:38

ruby-debug in 30 seconds (we don't need no stinkin' GUI!)

I sometimes forget how useful a debugger is for coming up to speed on a new codebase. This bare-bones HOWTO on rdebug was everything I needed and nothing I didn’t.

pivots.pivotallabs.com   20:36

28 Oct 2009

memcache-top

Nice little self-contained perl script that shows a basic memcached top display for a list of servers.

$ curl http://memcache-top.googlecode.com/files/memcache-top-v0.6 >
  ~/bin/memcache-top
$ chmod +x ~/bin/memcache-top
$ memcache-top --sleep 1 --instances memcache1,memcache2,memcache3

That gives you this:

memcached-top

Nifty.

code.google.com   09:17

Is AT&T’s 3G network misconfigured?

It’s definitely misconfigured in one way or the other as evidenced by the fact that it sucks and has sucked consistently for over a year.

rc3.org   09:13

26 Oct 2009

Gemcutter to replace Rubyforge

Gemcutter will become rubygems.org and Rubyforge will eventually go away entirely:

So, what does this mean for RubyForge? The Ruby-specific functionality and data will be moved into RubyGems.org, and the parts that other hosting sites (GitHub, Google Code, SourceForge) can do better will be pruned away. Migration paths for those projects will be provided, we’re not throwing any switches without warning. RubyGems.org will not be gaining any “bloat” from rewritten RubyForge features.

Wow. Congrats to @qrush and the Rubyforge team for pulling this off so quickly. Also, it’s pretty cool to see Heroku hosting a major/official piece of Ruby community infrastructure.

update.gemcutter.org   03:32

25 Oct 2009

goosh.org - the unofficial google shell

This is pretty rad. You can do web searches and whatnot without leaving a command line style interface but you can also do stuff like read news feeds. Check it:

goosh

I'd love to settle into this kind of workflow but these shell interfaces always have one thing or another wrong with them. Maybe this is The One. We’ll see.

goosh.org   09:11