Lazy Reading for 12/11/11

Last week was low on links, but this week is great!  I hope you have some time set aside.

  • This article “The Strange Birth and Long Life of UNIX” has a picture of a PDP-11.  I don’t know if I ever actually saw one and knew it before.  (via)
  • Also from the same place: Window Managers Bloodlines.
  • Anecdotal, but probably true. (via luxh on EFNet )
  • nginx is the new cool and unpronounceable web server these days, apparently.  Michael Lucas covers how to transition static Apache sites over to it.
  • This PDF showing slides from the recent NYCBUG presentation by Ike Levy, titled “Inappropriate Cloud Use”, is entertaining, and makes a good point.  Cloud computing is cheap on a per month basis, but since it’s a reoccurring cost, it can cost a surprisingly large amount in the long run.  (via)
  • Hey, a patch for DragonFly (and other BSD) support in Google’s leveldb.
  • Don’t Be a Free User” (via)  The last paragraph is the best.
  • An expanded grep and diff.  ‘grep’ and ‘diff’ have been present for so long, and people understand what they do, generally, that new tools get named after them just because the concept is ingrained in people’s minds.  Note that I said “generally”, as regular expressions can be difficult.  (via)
  • A lot of people don’t realize how they infringe on copyright.  This writeup describes something I’ve seen for years: people think a disclaimer that effectively says “I’m infringing but I’m doing it with the best of intentions” makes a difference.  It doesn’t.
  • So this is what that Xerox Star GUI interface looked like.  You know, the ‘first’ desktop GUI.   (via) Also, there was some advanced stuff in 1968.
  • I like this indicator light setup.  (also via luxh on EFNet #dragonflybsd)  There’s some other interesting old computer stuff at that site too.  I wish there still were computers like these.
  • While we’re talking about old things with a certain feel to them, why not Battersea Power Station?  Here’s some pictures.  (via)

Your unrelated link of the day: Since we’re talking about old things and environments, why not look at some pictures of my workplace?

Two pkgsrc work directory tips

Two tips for working with pkgsrc, derived in part from this mailing list post on users@ (follow the thread) and from my own experience.  If you put WRKOBJDIR=/usr/obj/pkgsrc into /usr/pkg/etc/mk.conf :

  1. You can clean up any leftover package building files by deleting the files in that directory and leave your pkgsrc files untouched.
  2. You can have a read-only /usr/pkgsrc, which means it can be shared over NFS (or SMB?) between multiple machines, DragonFly or otherwise.
Parallelized buildworld now possible

Buildworlds are now much faster, because they can run themselves in parallel.  Invoke it using the -j option to make.  Matthew Dillon saw a 25% reduction in time when using ‘make -j 12 buildworld’ on a 4-core system.  You may need to manually update xinstall and mkdir:

        cd /usr/src/usr.bin/xinstall
        make clean; make obj; make all install
        cd /usr/src/bin/mkdir
        make clean; make obj; make all install

It’ll also use more memory than a non-parallel build, but heck, that’s cheap these days.

An unexpected way to do strlen()

The general rule of thumb is that if you have a function written in an interpreted language (Perl, Python, etc.), it’ll be faster in C.  If you need it faster than that, you go to assembly.  Prepare to have your world rocked: Venkatesh Srinivas found that strlen() in libc was actually slower written in assembly than in C.  His commit message has numbers to back that up.

Video and USB fix

Matthew Dillon has written a contiguous memory mapper, which is designed to fix problems with video cards and USB drives that need a big chunk of memory to keep.  This can affect booting or later on, when disconnecting/reconnecting a USB drive.  If this still doesn’t fix the problem for you, try adjusting the sysctl ‘vm.dma_reserved’ to something bigger, like 64M.  It defaults to 16M.

(Normal mailarchive isn’t updating because of an ongoing upgrade to crater.dragonflybsd.org – sorry!)

What to do with /usr/obj

When building world and kernel on DragonFly, /usr/obj is where the work files get placed.  This can eat a bit of space, but it can be safely deleted.  If you keep the files around, subsequent rebuilds can be done faster with a quickwork/quickkernel, but this may not matter to you.

(This was answered on the mailing lists by Max Herrgaard, but I don’t have a link to his reply – sorry!)