GIGO: words unreadable aloud
Mishrogo Weedapeval
 

 

GIGO: words unreadable aloud

  Friday 29 April 2005
More sparklines codes

Building .png-file sparklines in Ruby, from scratch is the very first page I've seen that inspired me to post a del.icio.us bookmark with the tag wow. Joe Gregorio and Sam Ruby both said "wow", too.
11:42:04 PM   comment/     


  Wednesday 27 April 2005
Is zsh turing-complete yet?

Ted Leung mentioned one of the "Things I never knew about zsh, and in a comment, Olifante mentioned the "vared" command -- which was one of the things I never knew about zsh. Cool, thanks, Olifante.

One of my favorite zsh features is patterns like "*(^/)" -- all the non-directories in $PWD. And the "$=foo" vs "$==foo" that lets you control whether to break up the foo variable's contents into space-separated words, or not.

I compared various Unix shells here, and made a still-unrealized not-quite-resolution here.

I have a set of zsh startup files that is almost in the direction of O-O programming. My intent is to make it so that I don't have to modify very many existing files any time I move my environment to a new system -- just add new ones for the new system.

For the most part, I do this by making most of the setup commands exist as files in my $FPATH autoload directory, so that they can become shell functions when invoked. I build up zsh-function names based on the hostname (e.g., _zH_host1, _zH_host2), based on operating system (e.g., _zO_cygwin, _zO_Solaris), and then execute the autoload shell-function-file with that name, if it exists. Next step, I suppose, would be to add employer- or location-specific ones.

I suppose everyone has a favorite "cd/pushd/popd" set of functions. Since mine are in zsh, all of them start with "z". ("z" alone is just a pushd; I practically never use a bare (non-pushd) cd -- I don't see the point.) zl is maybe the most common command that I type: in effect, pushd to a directory and then list it.

My favorite two cd-like commands are zq and zf (I keep them in my autoload directory):

zq (q for "Query") cd's to the most recent directory in your dirstack that contains the given pattern:


# function zq -- cd, qualified by searching the dirstack.
#  take only the LAST (== most recent) directory that matches.  NoIC.
#  zq_dest=$( dh | grep "$1" | tail -1 )
zq_dest=$( dirs -v | grep "$1" | head -1 )
set -- $=zq_dest
echo z $2
eval z $2

And zf (f for "File") gets a filename as argument; it cd's to the directory containing that file. Very handy for when you can easily copy/paste a filename but don't want to waste the time erasing the filename part of it. zf erases it for you.


# zf is "cd to a file's directory"
dir="${1%/*}" 
z "$dir"
unset dir
z .     # Make the window title look right.

9:23:47 PM   comment/     

  Tuesday 26 April 2005
Funny Songs List

Blast from the past! I wrote up this Funny Songs List almost ten years ago:

I got an email about it today.

Update: Turns out that Funny Songs List is another phrase for which a page of mine is currently the top result on Google.
11:58:25 PM   comment/     


  Monday 25 April 2005
Ben Lomond sandhill parkland habitat

A couple of Sundays ago, I took a guided tour into a part of Quail Hollow Ranch County Park that is normally closed, because there are a number of threatened or endangered plant species there. (This is the same sort of tour as described in this 1996 Sunset Magazine article ... it's kinda sad that it took nine years for me to actually go on one.)

Pretty interesting tour; some unique plants there, including some of Ben Lomond's rare low-elevation ecological island of Ponderosa Pines. (Several of these grow on my property.)

Earlier this evening, I took a walk up the ridge behind my house. And I now recognize several of the little sand-habitat plants that our guide pointed out on that tour. Lots of sticky monkey-flower plants (the ones with the orange flowers), and there are a few Lewis' monkeyflower plants (larger, with light purple flowers). Actually, there are a lot more Lewis' ones than I remember seeing up there before -- I wonder if they respond more readily to wet winters than most of the other sandhill plants do.

(Handy bonus link: my other botany-related page is at the google-top for indurate peltate.)
8:46:15 PM   comment/     


  Saturday 23 April 2005
del.icio.us graphs

The del.icio.us popular page can give you some sort of a zeitgeist notion -- what's on people's minds at the moment. But it does beg for a graphic history, so you could see how quickly the recently popular pages rose, and how long they've stayed popular. Maybe something like "new links to this page in the past couple of weeks" combined with a "total number of links to this page" weighting. So anyway I looked around (google:"del.icio.us" graphs history) and found some interesting combinations, though nothing quite like what I'd like to see.

And there is a "Comprehensive Listing of Del.icio.us Tools, Plugins and Add-ons". Maybe one of them will have the graphs I'm looking for.
2:11:43 PM   comment/     



Click here to visit the Radio UserLand website. Click to see the XML version of this web page. © Copyright 2007 Doug Landauer .
Last update: 07/2/6; 12:43:51 .
Click here to send an email to the editor of this weblog.