shimon/best friends


link

My frassle activity has been light lately. I took a small vacation and didn't think much about blogging. Instead, I ate well, slept soundly, and enjoyed the warm (compared to Boston) Cincinnati weather. When I wasn't fully engaged in laziness or family, I was either moving furniture with my California-bound friend Coleman, or programming Javascript.

Yesterday I told Ingo Muschenetz that I had been programming a lot of Javascript, and he offered his sympathies. This is a common reaction: "real programmers" look down on scripting languages, and scripters don't even associate with the losers who write Javascript. Of course, with cool apps and new buzzwords, people are once again stunned at what you can do in the browser, and Javascript is reaching a status not unlike illegal immigrant labor: shameful and abused, but vital to the great stuff coming out of California.

But Javascript isn't all that bad. It's actually kinda nice. While its syntax mostly mimics its namesake, Java, it is in spirit just another dynamic functional language. My personal programming style, developed through Perl hacking and Java schooling, is a blend of object-oriented and functional/dynamic styles. Meaning that I use classes to support modularity and hold state, but use a lot of hashes, lists, and closures.*

It turns out Javascript is excellent for this. In Javascript, the hash (a map from arbitrarily-valued keys to values) occupies a position like the list does in Lisp. Every object in Javascript is a hash, including regular arrays. An object is a hash whose values are either variables or function references. myObj.getFoo() is equivalent to myObj["getFoo"]().

I am not without complaints about Javascript. With some syntactic sugar my programs could be 40% shorter and 20% easier to read, as they would be in Perl or Lisp. With a better and more stable spec from ECMA, cross-browser compatibility wouldn't be as hard. But I also respect that Javascript's priority should be coverage and consistency rather than elegance. Considering that the next feasible choice is Microsoft's VBScript, which would make my programs ten times longer and force me to write sort routines instead of novel UI, I'm impressed. That puts me in the corner with Douglas Crockford, who wrote a wonderful exposition of Javascript way back in 2001.

* Footnote: If you're a Lisp hacker, or just someone who thinks Perl is dirty, I want to understand why you feel that way. Perl has all the important functional features I'm aware of, and if I should really be using Lisp instead I'd like to know. Of course you can write hideous crap in Perl, but it gives the programmer amazing leverage over the language, which translates into huge productivity gains. Is it the punctuation? The diversity supported by the Perl's huge vocabulary? The hackish user community? Or are you just being lazy?

Some bad news today. First I heard from a good friend of mine that his father died, suddenly, in his sleep. I wish I could be in Cincinnati to give my friend some support and consolation. But I know he's a strong, smart guy too and he'll be alright.

Then I heard from my mom that Misi, my favorite cat, died today aged 13 years. Misi was a loving cat who would lick me like a dog does—but with his sandpaper tongue. He was very fat, once measuring 27 pounds, but to me that only made him softer and cuddlier.

Once, sometime in high school or maybe in the summer after my first year of college, Misi attacked me in my sleep. He was sleeping right next to me, and I must have rolled over onto him. He scratched me across my chest leaving a scar of 3 parallel lines that is still quite visible.

Of course I was very startled and went to the bathroom to wash myself off. The shock must have held on a little longer than I expected, because on my way out of the bathroom I fainted, waking up an instant later to be puzzled by the sudden approach of the floor to my forehead. A kind of weird memory, but as it has left its evidence permanently on my body, at least it's something I can remember Misi by. Of course I forgave him immediately and he was always welcome to sleep in my bed.

The other cats, our dog, and my mom will miss you. I'll miss you too, "fatjigos".

My best wishes to my friend and his family. I know Tom had a happy, rich life with your love. We'll miss him.

link

Now unreliably hosted off of my cable modem.

Hey, you know the thing with the peccability? It was, like. ummm, ichthyophagous, but not quite as ichthyophagous as Jen.

link

link