A smorgasbord of commits to the Prototype SVN repo, after four months of inactivity. Method chaining, new Element.Methods, object cloning, and this patch I wrote a while back. This is a meat-filled and much-needed update.
August, 2006
Aug30
Aug23
Freshen up your JavaScript, a presentation given by Sam Foster and me at the Refresh Austin meeting earlier this month. If you’re in Austin and you’re reading this blog, you probably ought to be a Refresh member.
JS 1.7: Cool stuff you can’t use yet">Iterators in JS 1.7: Cool stuff you can’t use yet
Today’s wonk porn is going to talk about iterators — one of JavaScript 1.7’s cool new features — and how it relates to polymorphism. Grab a recent nightly build of Firefox 2.0 in order to play along.
Enumerables and Polymorphism
In Prototype, each Enumerable contains an _each method (note the underscore) that announces how it’s supposed to be iterated over. …
I’m on my way to the Bay Area for a week. Shoot me a line if you’ll be nearby and would like to chill.
Aug18
Saints backup quarterback Adrian McPherson is on the injured list after last week’s exhibition game — in which the Titans’ mascot, T-Rac, hit him head-on while driving in a golf cart. I seriously doubt any sportswriter on earth ever thought he’d write that sentence. In other news, Gerald Ford was eaten by wolves.
Aug17
I’d welcome work on improving JavaScript as a language and browser implementations to support further application-controlled sandboxing and data hiding. The same-domain policy is far too coarse grained a solution for the applications we’d like to be able to write.
Aug16
There is no chin behind Bruce Schneier’s beard. There is only another pseudorandom number generator and he’s gonna use it to encrypt your face.
It’s easy to defend against what the terrorists planned last time, but it’s shortsighted. If we spend billions fielding liquid-analysis machines in airports and the terrorists use solid explosives, we’ve wasted our money. If they target shopping malls, we’ve wasted our money. Focusing on tactics simply forces the terrorists to make a minor modification in their plans. There are too many targets — stadiums, schools, theaters, churches, the long line of densely packed people before airport security — and too many ways to kill people… Last week’s arrests demonstrate how real security doesn’t focus on possible terrorist tactics, but on the terrorists themselves. It’s a victory for intelligence and investigation, and a dramatic demonstration of how investments in these areas pay off.
Aug15
Holy crap! The WebKit JS engine has matured by leaps and bounds since the last Safari release. I knew about XPath support, but not about getters/setters, direct access to DOM prototypes (which had been accessible in a convoluted manner), or XSLT. They claim it’s also 20 – 30% faster. I pray this stuff will make it into a Safari release that isn’t Leopard-only.
Aug11
Rick Reilly: You make the call. Little-league championship, bottom of the ninth, two outs: do you pitch to the star hitter or walk him so you can face the cancer survivor? One coach chose option B and is being tarred and feathered for it. I’m not saying I’d feel good about it, but if I were in his shoes I’d do the same damn thing. Inherent in sports strategy is the recognition that not all players are of equal skill. Reilly says it’s supposed to be about fun, not strategy, but how can you have the former without the latter?