The Shoes of the Fisherman's Wife Are Some Jive-Ass Slippers

tpot (at) frungy . org

rss

2006
Months
Oct

Wed, 25 Oct 2006

Tridge on NULL pointer checks

From the samba-technical mailing list:

From:		tridge@samba.org
To:		samba-technical@samba.org
Subject:	Re: Coverity errors in libndr/
Date:		Wed, 25 Oct 2006 12:35:56 +1000

Luke,

 > Or put some assertion checks in?

time for my bi-yearly rant about assertions on NULL dereference :)

Unix and unix-like systems provide a highly efficient, zero code
assertion system. It interfaces to debuggers, it correctly propogates
to parent processes and it is even implemented in hardware on nearly
every system in existance. 

It's called the segmentation fault. It's wonderful. Use it :-)

Cheers, Tridge
posted at: 16:01 | path: /software | permanent link to this entry

Fri, 20 Oct 2006

Tour de Donut

For those travelling to Texas this November, may I recommend the Tour de Donut? It's a 28 mile bicycle race near Austin. From the information page:

The Tour de Donut is a unique bicycle race where riders embark on an appetizing 28-mile journey beginning at the Katy Mills Mall (in Katy, Texas of course!) with rest stops along the way serving as many delectable donuts as you can eat.

For EACH tasty donut that a rider consumes, the rider is awarded a tempting 5-minute time credit.

Eat enough delicious donuts, and you can finish the race before you even started!

Sweet! I guess that means it's also possible to finish the race having consumed more calories than used to ride it.

posted at: 14:42 | path: /triathlon | permanent link to this entry

Mon, 16 Oct 2006

bfr - nonblocking 8-bit-clean pipe buffer

I recently discovered the bfr program while searching for a way to watch a large video file stored on a web server connected by a slow pipe. The premise is that your link is slower than the rate at which the video codec consumes data so say hello to Mr Progress Bar every ten seconds or so. Most video players can buffer up a small amount of data and some even allow you to change the size of the buffer but sometimes this just doesn't work well.

Here's my command line:

$ wget -q -O http://some.domain/bigassfile.ogg | \
  bfr -pk -b 100m | \
  xine stdin://
The command line above starts a wget of a big-ass file, then uses bfr to start accumulating up to 100M of data and displays a progress bar in KB on stderr. The xine video player is used to display the output appearing on standard input.

The exact moment when streaming starts is 10% of the buffer size though the options to change this don't seem to work as advertised in the manual page. The progress bar is very nice though as it displays a graphical display of the size of the buffer, as well as the rate data is entering and leaving. If the buffer empties completely, you can hit pause in xine and go get a cup of coffee while the buffer refills.

posted at: 14:33 | path: /software | permanent link to this entry