enjoying salad since 1978.

Saturday, November 29, 2003

untitledThe SF examiner just outed Gavin Newsom's Republican campaign contributions. Poor guy, it's hard to be a closet Republican in this city.

Newsom and Gonzalez are both current members of the SF Board of Supervisors with Gonzalez as current President. In that same Examiner article, they discuss a recent debate where Newsom made a remark about Gonzalez voting to raise the salary of BoS members with Gonzalez cracking back that Newsom didn't bother to make it to most meetings.. What has Newsom been up to? Too busy greasing palms and putting up 'Schwarzeneggar for Governor' signs? What would this mean if he were mayor? Would he spending most of his time trying to become Governor or Senator?

Regardless of Newsom being a boob, Matt Gonzelez is getting my vote.

Also importantly, this election has re-registered the Green Party in my mind as a viable political force. They've downgraded their naive Pacifist view to merely 'Non-Violent'. Maybe I'll finally mark something besides 'I decline to mention my political affiliation' on various forms that request it.

Friday, November 28, 2003

iCalShare - tons of iCalendars you can subscribe to. Apple also has a mini-library of iCalendars.

Around the net, I see that there have been several efforts to write Python to iCalendar conversions. Not suprisingly, there's no running code to be found anywhere...

libical is a C library for parsing iCalendar but I'm more interested in generating iCalendar events.

Python bindings for libnet and pcap. Awesome, two less things I have to write.

Wednesday, November 26, 2003

Here's a non-profit that lets you purchase a toy for a needy kid. I bought a bunch of toys for kids. You can, too!

Tuesday, November 18, 2003

It seems to me that the same "Moral" Minority that's opposed to gay marriage now were opposed to interracial marriage in the 50's and 60's. The 14th Ammendment was used then to declare antimiscegenation laws unconstitutional. Now when Stacy, who's Asian-American, and I, European-American, plan to get married, nobody can tell us we can't.

I can't honestly see why gay marriage should be treated any differently by the courts.

Monday, November 17, 2003

Biz: Note to self: Inexpensive ceramic bowls placed in microwave and set to "baked potato" will violently explode blowing the newly dented door open and sending clay shrapnel careening throughout the kitchen.

Oh no, Biz! Cheaply made ceramics are probably still pourous and held water. When you heated up the bowl, the water expanded and blew up the bowl!

As a kid, I used to camp and backpack a lot. Once, I put a rock I found in the river on the edge of my campfire. It exploded for the reason I gave above. Scary!

I ran across this old ArsTechnica article with a section on Memory Diagnostics for OS X 10.1 and noticed that it said: "do not be concerned with the scary looking 'Translation faults' line". What is a Translation Fault, you wonder? I'll explain:

A Translation Fault occurs whenever the system call vm_fault() is called. vm_fault() is called whenever a Page Fault occurs.

In order to explain what a Page Fault is, I need to give a glossy, 10,000 foot explanation of how memory is allocated in BSD (read: OS X). In order to run a program, you place it's code into memory and give it space to grow. If every program you ran had all of it's code (and space to grow) in memory, you wouldn't have any memory left. Therefore the OS will take parts of the code and put them on disk for retrieval when needed later. That's called Paging (some people call it Swapping). When the OS goes looking for that code again, it won't be able to find the lost code and will throw a Page Fault. Throwing a Page Fault basically means you've called vm_fault(). vm_fault() finds the code on disk and puts it back into memory. That explains why you often see Pagein and Pageout variables be fairly close together in size on systems with low amounts of memory.

Some of you, with lots of RAM, will notice that your Pageout and Pagein values vary wildly! On my own system, it looks like this:

Pageins:                       54403.
Pageouts:                       7013.


Well, if I didn't page out very often, how could I have paged in that much stuff? What was I paging in?

One of the interesting details that I left out is that a program first being executed isn't placed into memory in one big chunk and then run. If it were, your large programs would take even longer to run than they currently do! What BSD does is split up the program into equal sized chunks of code and place only the first few chunks into memory. Then as it tries to execute more of your program, more Page Faults are thrown, and vm_fault() brings the needed program code into memory. It's an optimization. Your system is faster for it.

Don't sweat the Paging unless your system becomes intolerably slow. Then get more RAM. You're never going to stop Paging and you really don't want to. Paging is a healthy and normal part of OS X life.

If you're really interested in all of this, then I suggest you read Design and Implementation of 4.4BSD.

Update: Of course, if you're even more curious, you can read the source.

Sunday, November 16, 2003

I just stumbled across a book store near Irving and 9th called 'Black Oak Books'. It has the largest mathematics section of any used bookstore I've ever seen outside of Powell's Technical Books from my time living in Portland. I stumbled across the following: Design and Analysis of Algorithms, Anthony Hoare's Communicating Sequential Processes, and The Semantics of Destructive Lisp. Plus I found replacements for lost books of mine: The Design of the Unix Operating System, and The AWK Programming Language

All were about 60% of their regular price. All are in good condition but not mint. That's perfectly fine because I plan to read them, not just look at them. Well, The Design of the Unix Operating System is heavily System V-oriented. Design and Implementation of 4.4BSD is more relevant to my daily life.

Kevin, you never told me about that place!

Saturday, November 15, 2003

Ev has some new pictures rotating his site corner. The first one Stacy saw reminded her of The Continental, an old SNL skit with Christopher Walken. So we whipped up these new candidates for Ev's picture rotation:

I think my t-shirt is broken.

I was reading through this developerWorks article: 'Best Practices for Programming in C' when I noticed that the prose and code examples seemed really familiar. Then I remembered Rob Pike's old 'Notes on Programming in C'. The similiarity seems more than accidental.

Friday, November 14, 2003

We actually do have an official stance on what to do if your mom finds your blog.

Wednesday, November 12, 2003

From the Unicode on Unix FAQ (thanks Nelson!):

UTF-8 is a stateless encoding, i.e. a self-terminating short byte sequence determines completely which character is meant, independent of any switching state. G0 and G1 in ISO 10646-1 are those of ISO 8859-1, and G2/G3 do not exist in ISO 10646, because every character has a fixed position and no switching takes place. With UTF-8, it is not possible that your terminal remains switched to strange graphics-character mode after you accidentally dumped a binary file to it. This makes a terminal in UTF-8 mode much more robust than with ISO 2022 and it is therefore useful to have a way of locking a terminal into UTF-8 mode such that it can't accidentally go back to the ISO 2022 world.

I had noticed that I hadn't gone cyrillic since I moved to OS X almost two years ago. UTF-8 is the default encoding for my Terminal on OS X but I never made the connection. This used to be a real problem for me as a kid when my friend Ray's System V.4 machine spent a fair amount of time at my house. I was young and stupid and would accidentally cat binaries to my terminal, leaving it in a completely unusable state. For some reason, there was no /bin/reset on that particular SysV machine and I was unable to logout so I would have to unplug the terminal from the rs232 port in the back and plug it into one of the unused ones farther down so I could login again. Once in a while, I'd forget that I'd used up all 16 of the tty's on the machine and would be out of available terminals. At that dreaded moment, I'd have to reboot the machine.

You really don't want to reboot a 1980's-era Unix mini without properly shutting down...

... So, after reinstalling the operating system from tape and praying that my latest backups (if I had bothered) were good, I'd go on for another few weeks accidentally catting binaries like a fool until I ran out of tty's again, playing Serial Port Leapfrog along the way, reinstalling my OS every few months or so. After all that, you'd think that I would've written my own 'cat' wrapper that would check the magic number to make sure only text files were catted out. You'd think.

Life's a lot better with Unicode.

Tuesday, November 04, 2003

I finally figured out my answer to Red Hat end-of-lifing their desktop linux distribution:

$ uname -a
FreeBSD chomsky.sieve.net 5.1-RELEASE FreeBSD 5.1-RELEASE #0: Wed Nov 5 02:55:42 GMT 2003 root@chomsky.sieve.net:/usr/src/sys/KICKASS i386


I do understand that redhat linux isn't really going away, it's being donated to the Fedora Core project along with some redhat employee man hours and servers. Honestly, though, I think that there are already more than enough entries in the 'Yet Another Crappy Amateurish Volunteer Linux Distribution' category. Maybe Fedora Core will be a high quality distribution in the future but FreeBSD is a high quality Unix right now.

What's amazing is that I know a fair amount of people who are paying them 60$/year/machine for access to Redhat Network Update, which I feel is on par with Apple's Software Update. Redhat says that this wasn't profitable. Lots of people are finding their new path to profitability to be too much pain to burden. By alienating these users, those who have introducing Linux to the workplace for years, I think Redhat is making a massive mistake and risks ending up sidelined.

For the record, I've been a paying user of Redhat since 4.2. I've bought almost every release since then. Then again, I also have official cd distributions of FreeBSD, NetBSD, OpenBSD, Darwin, Slackware, SuSE, and Mandrake. It's too bad that paying for distributions and swag doesn't keep companies afloat.

I don't sign my email with PGP or anything else. I don't believe in non-repudiation; I don't think it's physically possible. Software is too vulnerable to holes and people are easily fooled into clicking shiny buttons. Once you lose non-repudiation, all you've gained from signing email is the ability to tack 2 kilobytes onto every message sent and received.

I don't care about anonymity, all I want is to keep people from eavesdropping on my conversations. For this reason, I'd rather use TLS than an onion router.

I can't stomach Perl any longer and yet I just put Perl 6 essentials on my amazon wishlist. Before you get on my case, I was paid for quite a long time to write and read Perl. Perl itself doesn't bother me as much as most Perl hackers and their crappy scripts do.

I'm an enigma wrapped in a twinkie.

Monday, November 03, 2003

Lucky for me, others have the indignance I seem to lack when it comes to people misspelling my name.

Jensen is the correct Danish spelling. My great great grandparents changed it so they could actually get their mail delivered and their documents disambiguated from all of the other Jensen's living in Wisconsin at the time. In geek-speak: Jensens are a virus and Jensons are a mutated branch.

Tonight we saw Hepcat and it was good. It's been 6 years! After Alex landed a TV gig, I figured the band was done for. It was pretty well known that him and Greg (the other singer) hated each other. Surprise, surpise. It was really a great show.