Leimy is currently certified at Master level.

Name: David Leimbach
Member since: 2000-07-18 18:44:24
Last Login: N/A

FOAF RDF Share This


Working on stuff I don't care to talk about until it's released... if it gets released.


Recent blog entries by Leimy

Syndication: RSS 2.0
Xar is coming along nicely. I've been able to test and contribute in a few areas despite my schedules with other projects.

Been spending time studying things like Plan 9 and understanding the strengths of its design on some issues such as namespaces and thinking about how best to do it in Linux. Al Viro did a private namespaces in Linux hooking into the "clone" system call with additional flags. On FreeBSD this could be done in rfork() and on Mac OS X we don't have either of those so we'd have to find an appropriate mach_task setting or implement rfork to do something similar.

Private namespaces are very cool and can do away with such things as symbolic links and jails/chroots if implemented properly. DragonFlyBSD has an implementation of something called "variant symlinks" in which a special environemnt variable can complete a portion of a path for a symbolic link. /usr/lib/libqt.VAR.so could point to many different versions of qt based on an environment variable. Pretty neat stuff.

Not sure how far I'll get trying to implement stuff like that in xnu [darwin/Mac OS X kernel] but it's just for fun right now anyway.

I'm going to repartition my Firewire drive and get a bootable Panther installation on there for playing around.

Currently working on some KEXT stuff for OpenDarwin/OS X.

Also documenting xar and trying to help it grow into a suitable archive format for a packaging system.

Still learning Scheme/Haskell/Lisp and doing the work stuff.

Moved from Mississippi to the Seatlle WA area back in June too. Lots of life changes... all good IMO.

26 May 2004 (updated 26 May 2004 at 06:20 UTC) »

How not to write code with scsh [Scheme Shell]

For the hell of it I decided to write that "content_index" calculator in scsh.

With a lot of help from Riastradh on #scsh I've now got the following:

(let ((read-ls-output (field-reader (infix-splitter (rx (+ " ")) -8))))
 (format #t "~A kilobytes"
 (fold + 0
 (map string->number
   (| (find "." -name "content_index" -print0)
    (xargs "-0" ls -l)
                (record fields) ()
                (#t (format #t "~A~%" (list-ref fields 4))))))))) 1024))(newline))
Which works but is incredibly ugly.

It performs the find as you would expect. Then I use the scsh "awk"-like functionality to filter out the 4th field [size]. run/strings builds a list of strings which I convert to numbers using map with string->number.

To sum the items I call fold with + and 0 [is the identity of addition]. I divide it by 1024 and use the result in a format statement [works like printf for scheme]. The let statement binds me an expression holding the result of field-reader which produces a function. The -8 means that I expect at least 8 records and the rest are seen as the final record. This is for

ls -l
when you have files/directories with spaces.

Nasty eh?

There are better ways...

And here it is:

(format #t "~A kilobytes"
(fold + 0
(map file-info:size 
(map file-info
(run/strings (find "." -name "content_index"))))) 1024)) (newline))

Again... thanks fo Riastradh for teaching me about the REPL.


This is pretty awesome for you OS X folks:


I was able to use this Finder plugin thingy to write a bash script that allows the tarring of many directories from finder with a few clicks.

here is the script:


# Tar directories.

while [ "$*" != "" ] do if [ -d "$1" ] then echo "tar cvfz $1.tgz -C `dirname $1` `basename $1`" tar cvfz $1.tgz -C `dirname $1` `basename $1` fi shift done

chmod u+x and stick it in ~/Library/Application\ Support/Big\ Cat\ Scripts/Files. Now select a bunch of directories and ctrl-click [right click] and find the scripts context menu and select whatever you named the above script.

It will echo what it's doing to the console log. If you don't want this behavior remove the echo line.

Saves me a bunch of time...


Still workin... Getting ready for next week's apartment hunt in Seattle. Lots to do. I finally spent some time figuring out Mach IPC via MiG in OS X. I need to do a write-up on it so people can refer to it when they have problems. I am not sure I am ready to answer questions about how it all works yet so I don't want to put myself out there as a Mach IPC guru.

Other than that my work-work has picked up more again. This is good of course. I hate being idle.

33 older entries...


Leimy certified others as follows:

  • Leimy certified axboe as Master
  • Leimy certified Leimy as Journeyer
  • Leimy certified kernelrahl as Journeyer
  • Leimy certified KrazyKiwi as Master
  • Leimy certified will as Master
  • Leimy certified fxn as Journeyer
  • Leimy certified rangerrick as Journeyer
  • Leimy certified softkid as Journeyer
  • Leimy certified zwane as Master
  • Leimy certified bmastenbrook as Master
  • Leimy certified pinskia as Master
  • Leimy certified uriel as Journeyer
  • Leimy certified rsc as Master

Others have certified Leimy as follows:

[ Certification disabled because you're not logged in. ]

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!

Share this page