Archive for the 'Uncategorized' Category

A Little Old But Neat: Processing in Javascript

John Reisg has ported the Processing visualization language to JavaScript: Processing.js

DTrace Scripts

It doesn’t look like new scripts have been added lately, but I just ran across this nice little collection of dtrace scripts and one-liners.  There’s a special section for Mac OS X 10.5 compatible scripts.

Nice Response to the Beer == Worse Science Paper

I’ve still not gotten around to reading the actual paper, but slashdot today mentioned some additional analysis of the paper correlating increase beer drinking with reduced scientific success (measured in terms of publications and citations). My initial thought after reading the first of many posts about this that appeared around the internet was as follows:

correlation != causation

This blog post points out some additional issues with the paper, which I’ll now have to check out, given that it is both short, and to evaluate the other scientist’s analysis.

Beyond the correlation != causation, the author of the blog post points out that there are really only 34 data points, and without 5 of them the correlation falls apart.  Additionally, the R-squared for correlation is 0.5.  In addition to the comment made pointing out that an equally probable explanation for the data was that low-output scientists were drinking more, there’s also that statistic itself.  An R-squared of 0.5 suggests that 50 percent of the variation in output can be attributed to beer drinking level.  That still leaves a large percentage of potential other influences on top of alternate causal relationships.

Ah well, I suppose the original article may have aimed more at headlines or amusement, but it’s still fun to try and justify beer.  I think the common sense on this item is likely close to the mark: heavy drinking certainly doesn’t help with your output, but reasonable social drinking probably doesn’t correlate well with output levels.

Safari Performance Jump w/ 3.1

Wow.  The new Safari build has significantly improved JavaScript performance in Apple’s SunSpider benchmark.

Older Safari 3: 8537.4ms ± 0.3%
Safari 3.1: 3152.6ms ± 0.2%

The new Firefox beta is no slouch either:
Firefox 3 beta 4: 5080.4ms ± 5.7%
Firefox 2.0.0.12: 15463.6ms ± 5.7%

Full results after the jump. Continue reading ‘Safari Performance Jump w/ 3.1′

ZFS

So, I know there have been numerous blog posts gushing about ZFS.

This is another one of those posts.I’ve got “experimental” versions of the filesystem going on a number of Mac hosts, and now on my FreeBSD NAS device. Aside from having been able to cause the OS X version to kernel panic a number of times by doing a a few out-of-the-ordinary things, it has been an excellent experience so far, and I haven’t lost any data.  One of the reasons that those kernel panics didn’t bother me at all was because there is no fsck, no filesystem checking tool.  The filesystem is designed to repair itself on the fly.  In addition it’s also equipped to efficiently deal with power failures, as journaled filesystem are able to do, without a long fsck, except that ZFS doesn’t use journals.

Despite a number of comments about ZFS “really needing” a 64-bit CPU and gobs of memory, this requirement appears to be quite scalable.  For a home-based NAS device where most of the time only one client is being served, it seems to do fine even on an old VIA C3 800Mhz with 512MB of RAM.  It certainly won’t break any speed records for data transmission, but the data that makes it on there is in a raidz1 and so if 1 drive dies, it’s no big deal.  In addition, if something happens to a disk between times when ZFS is working with it, or if there’s an error that the drive doesn’t deal with appropriately ZFS will realize that the checksums don’t match on the reads it is doing and will repair the damage on the erring drive.  Unless you disable it, every last block of data you write out to disk in ZFS is checksummed.  So, not only can you be relatively sure that your data are safe, but you know if it has become corrupted, and in most cases with redundancy the filesystem can fix it.Did I mention that it also supports transparent data compression?  Enable the option and all data written to the drive after that point is compressed with no need to wait 8 hours to recompress all the data already on disk (though I believe some functions are being considered to allow forced recompression of data).  While I think, perhaps, on my little NAS device this might actually slow things down a bit, in many workloads Sun has indicated that compression actually speeds up data access because for many of the lightweight compression algorithms used the CPU hit is small, and less data needs to be actually pulled from the device when read.

Honestly, aside from some ironing out that needs doing on some of the fresher ports of this filesystem, I see no downsides to it.  It may not work well on a 200 Mhz machine, but something closer to 1Ghz is enough, even a Via C3, which is probably at 800 Mhz comparable to a 500-600Mhz Pentium/PentiumII. Did I mention that creating new filesystems on a pool costs essentially nothing and that you can do snapshots and clones that are quite efficient and only need to store the blocks that have changed rather having a whole duplicate image of a filesystem?

In another week or so I’ll likely post up some comments about tuning usage on the NAS if any tuning is really necessary.

Kitchen Counter Invisible Fence

I must implement something like this for the cats, courtesy of the Curious Inventor Blog:

Although, perhaps in conjunction with something like this, but functional, so I don’t have to listen to a car horn every time the cats do something stupid :-)

Seriously…

WTF (TSA Prevents Guy From Bringing Microcontroller Programmer on Flight)

Best quote: “Sir, this is an improvised electronic device. You will never be allowed to fly with this.”

Quick Tip: Restoring a System Disk Over NFS w/ the OS X Boot DVD

I can’t guarantee this works with any other release than 10.4.x, but I’ve just discovered that it is possible to mount NFS volumes while only booted from the Mac OS X install DVD that came with my MacBook. I set up the export on my Ubuntu based desktop using the instructions here. I only needed to add insecure as an option in addition to rw and sync. This seems to be related to the ports that OS X wants to use, and if that seems unacceptable, turn off exporting with that option after completing this procedure next, all you need is the following.

1. Start up Terminal.

2. Type:

mkdir /Volumes/mountpoint

mount_nfs <ip of server>:/mount/point /Volumes/mountpoint

If all goes well, it shouldn’t throw any errors, and you’ll have the volume mounted.

3. Quit Terminal, open Disk Utility.

4a. If you don’t have paritions on the destination disk, make them.

4b. Select destination paritions, go to the Restore tab, then give the path to the image file, i.e:

/Volumes/mountpoint/path/to/my_image.dmg

4c. Drag the target partition over to the destination and click Restore.

Simple, easy, and fast (if you’ve got gigabit, and the image on a raid :-) )

 Of Note: AFP & Samba did not work for me as both of their mounting tools required frameworks not included in the filesystem on the boot DVD.  Why apple would include the tools but not required frameworks is a bit of a mystery…

Quick Tip: VisualHub & Matlab AVI Files

Quick tip if one is working with VisualHub to convert MATLAB AVI files (uncompressed) into another format.   If you use the default decoder it will not get the rasterization correct and thus the movie looks skewed and wrapped at an angle. To resolve this issue simply go into “Advanced…” and select QuickTime Decoding from the “Force:” menu (Just above “Two Pass”).  The QuickTime AVI libraries seem to have less trouble with these AVI files and your results will come out just as high quality for having used this alternate decoder.

Flash Alternative

Here’s a nice little article on a flash alternative. I found that gnash didn’t work so well for me, but using the mplayer plugin with YouTube works perfectly.

Nice if you’ve got a 64-bit, non x86, or FreeBSD platform and don’t want to use emulation or compatibility layers.