Alive. I think.

I upgraded the FreeBSD ports, and the web stack broke. I guess the web stack is too complicated (probably), or I don't use ports properly.

I think a nice static website generator will solve the complicated stack problem.

NixOS seems to solve the complicated ports system.

jack | posted Tue Feb 10 20:59:08 2015 | updated Tue Feb 10 21:51:27 2015 | #
category: website

A tale of two binaries.

I have two very old binaries on my computer.

[jack@needle:raw]$ ls -l /pkg/less/332/bin/less /usr/pkg/daemontools/0.76/bin/svc
-rwxr-xr-x 1 root wheel 401456 Dec 10  1998 /pkg/less/332/bin/less*
-rwxr-xr-x 1 root wheel  11428 May 22  2002 /usr/pkg/daemontools/0.76/bin/svc*

One of them is statically linked, and one of them dynamically linked.

[jack@needle:raw]$ file /pkg/less/332/bin/less /usr/pkg/daemontools/0.76/bin/svc
/pkg/less/332/bin/less:            ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, statically linked, not stripped
/usr/pkg/daemontools/0.76/bin/svc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), stripped

One of them works, and the other doesn't.

[jack@needle:raw]$ /pkg/less/332/bin/less --version
less  version 332
[jack@needle:raw]$ /usr/pkg/daemontools/0.76/bin/svc --version
/usr/pkg/daemontools/0.76/bin/svc: relocation error: /usr/pkg/daemontools/0.76/bin/svc: symbol errno, version GLIBC_2.0 not defined in file with link time reference

jack | posted Fri Sep 12 11:01:54 2008 | #
category: debris

Bash hack of the day

Here's a good bash hack for linux 2.6. If there are less jobs in the current shell than cores in the box, then it will background the job. Otherwise it will block.

_count() {
  echo $#

_num_cpus() {
  [ -d /sys/devices/system/cpu/ ] && echo $(_count /sys/devices/system/cpu/*) || echo 1

sat() {
  local go=0

  if [ $(jobs -l | wc -l) -ge $(_num_cpus) ] ; then
    while trap '((go++))' SIGCHLD ; sleep 1 ; ((go--)) ; [ $go -eq 0 ] ; do : ; done

  $@ &

  trap SIGCHLD

And here's how I use it.

    for i in a b c d ; do sat lzma $i ; done 

jack | posted Mon Jun 2 16:33:46 2008 | updated Fri Sep 12 10:52:36 2008 | #
category: debris

Bainbridge Island Photos

We went to Bainbridge Island for our anniversary. As usual, we took some pictures.

jack | posted Sun May 6 21:32:45 2007 | #
category: outside/other

Well, it is April 1st.

[jack@needle:~]$ mtn crash N
mtn: misuse: There is no spoon.

jack | posted Sun Apr 1 11:04:25 2007 | #
category: debris

A hypothesis to test

I have recorded reams of data from paddling:

Everything is keyed on time, using the Time::HiRes perl module. Now I just need to test a few hypothesis:

I do not really believe that paddling is that simple, but I'm looking for some well defined problems to brush up on my skills with R

jack | posted Tue Mar 27 08:43:44 2007 | updated Tue Mar 27 08:45:53 2007 | #
category: outside/paddling

Opeth in 5 words

I was listening to Beneath the Mire from Ghost Reveries, and it struck me that the lyrics concisely summed the pathos infused music:

Beneath the mire
drowned desire

jack | posted Tue Mar 27 08:32:53 2007 | updated Tue Mar 27 08:46:12 2007 | #
category: debris

Replacing the microdrive in a Sharp Zaurus

I have a Sharp SL-C3100 clamshell Zaurus (also known as a spitz), which has a 4GB Hitachi Microdrive in it.

Although I think Microdrives are nifty, they have problems:

So I replaced the 4GiB Microdrive with an 8GiB NAND flash card.

Issues that I ran into

Here's the patch

*** linux-2.6.16/drivers/ide/legacy/ide-cs.c.orig       Thu Jan  4 21:10:30 2007
--- linux-2.6.16/drivers/ide/legacy/ide-cs.c    Thu Jan  4 21:16:59 2007
*** 413,418 ****
--- 413,419 ----
  static struct pcmcia_device_id ide_ids[] = {
        PCMCIA_DEVICE_MANF_CARD(0x0007, 0x0000),        /* Hitachi */
+       PCMCIA_DEVICE_MANF_CARD(0x000a, 0x0000),        /* Unknown */
        PCMCIA_DEVICE_MANF_CARD(0x0032, 0x0704),
        PCMCIA_DEVICE_MANF_CARD(0x0045, 0x0401),
        PCMCIA_DEVICE_MANF_CARD(0x0098, 0x0000),        /* Toshiba */

jack | posted Mon Jan 8 08:33:48 2007 | updated Tue Mar 27 08:45:43 2007 | #
category: debris

Pretty pictures

On Wednesday, I showed up at practice with my Zaurus, gps, heart rate monitor, and accelerometer.

The new addition to this is the accelerometer, which adds significant resolution to the data. It supports sampling rates up to ~475Hz, but I only had it working at 25Hz (that's how fast it worked reliably with minicom).

As a first pass, I turned everything on and put it in my drybag. I wanted to get a feel for how it all worked.

After practice I loaded up all of the data into R, and set up the data as time series.

A major error source is the correlating of the starting points of the time series. The GPS, and HR monitor are fairly easy to correlate (because they have reasonably accurate clocks onboard). The raw accelerometer output I used didn't timestamp the data. As I was using minicom to capture the accelorometer output, I ended up using the ctime of the minicom capture file. Assuming a capture rate of 25Hz(which it was set to), and the number of samples, I estimated the start time.

I'll write a zaurus application that does this.

A keen observer will note that the accelerometer also isn't calibrated well.

At 25Hz, you can see the individual strokes.

This means it should be possible to systematically analyze what acceleration waveform correlates to the highest hull speed, and thus validate what stroke technique is most efficient.

That, however, is gonna take a schwack of work.

jack | posted Fri Dec 8 16:30:39 2006 | updated Fri Dec 8 16:45:28 2006 | #
category: outside/paddling

Telus moving into the US wireless data market?

Telus is extending their EVDO network into the US .

I wonder how they are going to sell their rate plans, when the competition is selling a better service (unlimited instead of 250MiB cap) for about half the price .

Maybe they'll be competitive, and Canadian subscribers will have a lever for getting data service for a reasonable price.

jack | posted Thu Dec 7 13:56:45 2006 | #
category: debris

A weblog by Jack Cummings