Tuesday Mar 22, 2005

Rained out

A rainy stretch here in Northern California is keeping me off the court while my body repairs itself. But I'll need to go practise in the wet if I'm ever to get my jump shot back...

Tie knot: Knot 44 (Grantchester).

Monday Mar 21, 2005

For the record, 4

Tie knot: Knot 31 (Windsor).

Friday Mar 18, 2005

For the record, 3

Tie knot: Knot 18 (Plattsburgh).

Thursday Mar 17, 2005

On the court again

I'm a little sore and a bit bruised: I've started playing pick-up basketball on the outdoor court here at the Menlo Park campus. I pretty much stopped when we started (a) work on smf(5), and (b) parenting—three years. (Finishing my dissertation also required a break, but not nearly as long as this one.)

I feel slower, and my skills are very rusty. Regular practice will fix at least one of those.

Tie knot: Knot 23 (Cavendish).

Tuesday Mar 15, 2005

Knotty engineer

As a California-residing, code-writing Sun engineer, I don't have a lot of sartorial restrictions beyond the standard requirements for coverage. It's been a bit of a shock, therefore, to co-workers and long time customers to catch me wearing a necktie. The most common question is "Are you interviewing?" Which, given that whole writing-code-in-California bit, isn't very appropriate—this isn't standard engineering costume out here.

I think the easiest way to understand it is as an eccentricity: I'm working my way through Fink and Mao's The 85 ways to tie a tie. They identify thirteen suitably aesthetic knots, nine of which are in some sense novelties, not being the standard three or four. Each day, I've been working my way through another one of the aesthetic or historically interesting knots, by tying it on and wearing it through the work day. My head hasn't popped off yet.

Tie knot: Knot 7 (Half-Windsor).

Friday Mar 11, 2005

For the record, 2

Tie knot: Knot 3 (Kelvin).

Thursday Mar 10, 2005

For the record, 1

Tie knot: Knot 4 (Nicky).

Tuesday Jan 25, 2005

Fiddling with del.icio.us

I've started moving bookmarks onto del.icio.us, the slick social bookmarking service. Enough real work beckons that I'm resisting whipping up some Perl to glue Netscape::Bookmarks and Net::Delicious together, so for now I'm manually posting important or new bookmarks.

If you're a del.icio.us user, and want to help build a shared link set for smf(5), please consider using "solaris smf" in your tags. The current list is incomplete.

Wednesday Sep 29, 2004

Puzzle #2: cal(1)

(I've been fixing little smf(5) bugs, as well as revising our documentation, presentations and--most importantly--more block diagrams for this blog. But I bumped into an annoyance and thought I should share.)

As an young old-school Unix developer, I tend to live in terminal windows. One of my favourite commands is cal(1), which has a great default mode:

$ cal
   September 2004
 S  M Tu  W Th  F  S
          1  2  3  4
 5  6  7  8  9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30

But if you want to see an October calendar, you might get confused:

$ cal 10



                                10

         Jan                    Feb                    Mar
 S  M Tu  W Th  F  S    S  M Tu  W Th  F  S    S  M Tu  W Th  F  S
          1  2  3  4                      1                      1
 5  6  7  8  9 10 11    2  3  4  5  6  7  8    2  3  4  5  6  7  8
12 13 14 15 16 17 18    9 10 11 12 13 14 15    9 10 11 12 13 14 15
19 20 21 22 23 24 25   16 17 18 19 20 21 22   16 17 18 19 20 21 22
26 27 28 29 30 31      23 24 25 26 27 28      23 24 25 26 27 28 29
                                              30 31
         Apr                    May                    Jun
 S  M Tu  W Th  F  S    S  M Tu  W Th  F  S    S  M Tu  W Th  F  S
       1  2  3  4  5                1  2  3    1  2  3  4  5  6  7
 6  7  8  9 10 11 12    4  5  6  7  8  9 10    8  9 10 11 12 13 14
13 14 15 16 17 18 19   11 12 13 14 15 16 17   15 16 17 18 19 20 21
20 21 22 23 24 25 26   18 19 20 21 22 23 24   22 23 24 25 26 27 28
27 28 29 30            25 26 27 28 29 30 31   29 30

         Jul                    Aug                    Sep
 S  M Tu  W Th  F  S    S  M Tu  W Th  F  S    S  M Tu  W Th  F  S
       1  2  3  4  5                   1  2       1  2  3  4  5  6
 6  7  8  9 10 11 12    3  4  5  6  7  8  9    7  8  9 10 11 12 13
13 14 15 16 17 18 19   10 11 12 13 14 15 16   14 15 16 17 18 19 20
20 21 22 23 24 25 26   17 18 19 20 21 22 23   21 22 23 24 25 26 27
27 28 29 30 31         24 25 26 27 28 29 30   28 29 30
                       31
         Oct                    Nov                    Dec
 S  M Tu  W Th  F  S    S  M Tu  W Th  F  S    S  M Tu  W Th  F  S
          1  2  3  4                      1       1  2  3  4  5  6
 5  6  7  8  9 10 11    2  3  4  5  6  7  8    7  8  9 10 11 12 13
12 13 14 15 16 17 18    9 10 11 12 13 14 15   14 15 16 17 18 19 20
19 20 21 22 23 24 25   16 17 18 19 20 21 22   21 22 23 24 25 26 27
26 27 28 29 30 31      23 24 25 26 27 28 29   28 29 30 31
                       30

It's an interesting UI choice to assume that anyone would want the calendar for the year 10 C.E. Certainly I never do, and I'm pretty sure someone would have told me if UNIX systems were the professional historian's first choice for computing...

So today's puzzle is to make cal(1) more usable. If I enter cal month_num, give me the current month; If I enter "cal now" give me the 3-month window around the current month, like so:

$ cal now
   August 2004             September 2004          October 2004
 S  M Tu  W Th  F  S     S  M Tu  W Th  F  S     S  M Tu  W Th  F  S
 1  2  3  4  5  6  7              1  2  3  4                    1  2
 8  9 10 11 12 13 14     5  6  7  8  9 10 11     3  4  5  6  7  8  9
15 16 17 18 19 20 21    12 13 14 15 16 17 18    10 11 12 13 14 15 16
22 23 24 25 26 27 28    19 20 21 22 23 24 25    17 18 19 20 21 22 23
29 30 31                26 27 28 29 30          24 25 26 27 28 29 30
                                                31

Other than that, all other standard invocations of cal(1) should work as usual.

My example solution is a couple dozen line ksh(1) shell function, and I'll post it along with the best submissions. (Perl folks: no non-core modules, please.)

Thursday Jul 08, 2004

Endorsing publicradiofan.com

I stumbled across publicradiofan.com, amongst all of the various useless internet radio sites out there. (Radio reception inside my building isn't great.) This site is a gem. It lets you select sites by show, by category, by media streams provided, and more. Program grids, grouped listings, adjustable time windows. Very solid.

(The media stream filter is very useful if you're running Solaris x86, as your streaming options are somewhat limited. I've decided that if a local public radio station isn't willing to provide MP3 or OggVorbis streams then I won't support them. And I was pleased to see that some of the stations that I support do indeed provide "open" streams. And some don't—a decision to make?)

Recommended.

About

sch

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
External blogs