<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Advogato blog for Leimy</title>
    <link>http://www.advogato.org/person/Leimy/</link>
    <description>Advogato blog for Leimy</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Sat, 25 May 2013 00:36:02 GMT</pubDate>
    <item>
      <pubDate>Tue, 9 Nov 2004 01:50:04 GMT</pubDate>
      <title>9 Nov 2004</title>
      <link>http://www.advogato.org/person/Leimy/diary.html?start=37</link>
      <guid>http://www.advogato.org/person/Leimy/diary.html?start=37</guid>
      <description>&lt;a href="http://www.opendarwin.org/projects/xar" &gt;Xar&lt;/a&gt; is coming along nicely.  I've been able to test and contribute in a few areas despite my schedules with other projects.  &lt;br&gt;&lt;br&gt;

&lt;p&gt; 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.
&lt;br&gt;&lt;br&gt;
Private namespaces are very cool and can do away with such things as symbolic links and jails/chroots if implemented properly.  &lt;a href="http://www.dragonflybsd.org" &gt;DragonFlyBSD&lt;/a&gt; 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.
&lt;br&gt;&lt;br&gt;
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.  &lt;br&gt;&lt;br&gt;
I'm going to repartition my Firewire drive and get a bootable Panther installation on there for playing around.</description>
    </item>
    <item>
      <pubDate>Sat, 28 Aug 2004 19:21:36 GMT</pubDate>
      <title>28 Aug 2004</title>
      <link>http://www.advogato.org/person/Leimy/diary.html?start=36</link>
      <guid>http://www.advogato.org/person/Leimy/diary.html?start=36</guid>
      <description>Currently working on some KEXT stuff for OpenDarwin/OS X.

&lt;p&gt; Also documenting &lt;a href="http://opendarwin.org/projects/xar/" &gt;xar&lt;/a&gt; and trying to help it grow into a suitable archive format for a packaging system.

&lt;p&gt; Still learning Scheme/Haskell/Lisp and doing the work stuff.

&lt;p&gt; Moved from Mississippi to the Seatlle WA area back in June too.  Lots of life changes... all good IMO.</description>
    </item>
    <item>
      <pubDate>Wed, 26 May 2004 06:02:34 GMT</pubDate>
      <title>26 May 2004</title>
      <link>http://www.advogato.org/person/Leimy/diary.html?start=35</link>
      <guid>http://www.advogato.org/person/Leimy/diary.html?start=35</guid>
      <description>How not to write code with scsh &lt;A HREF="http://www.scsh.net"&gt;[Scheme Shell]&lt;/a&gt;

&lt;p&gt; &lt;p&gt; For the hell of it I decided to write that "content_index" calculator in scsh.

&lt;p&gt; &lt;p&gt; With a lot of help from Riastradh on #scsh I've now got the following:

&lt;p&gt; &lt;p&gt; &lt;pre&gt;
(let ((read-ls-output (field-reader (infix-splitter (rx (+ " ")) -8))))
 (format #t "~A kilobytes"
 (/ 
 (fold + 0
 (map string-&amp;gt;number
 (run/strings
   (| (find "." -name "content_index" -print0)
    (xargs "-0" ls -l)
        (begin
          (read-line)
          (awk
                (read-ls-output)
                (record fields) ()
                (#t (format #t "~A~%" (list-ref fields 4))))))))) 1024))(newline))
&lt;/pre&gt;
Which works but is incredibly ugly.

&lt;p&gt; &lt;p&gt; 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-&amp;gt;number.  

&lt;p&gt; &lt;p&gt; 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 &lt;pre&gt;ls -l&lt;/pre&gt; when you have files/directories with spaces.

&lt;p&gt; &lt;p&gt; Nasty eh?

&lt;p&gt; &lt;p&gt; There are better ways... 

&lt;p&gt; And here it is:

&lt;p&gt; &lt;pre&gt;
(begin
(format #t "~A kilobytes"
(/
(fold + 0
(map file-info:size 
(map file-info
(run/strings (find "." -name "content_index"))))) 1024)) (newline))
&lt;/pre&gt;

&lt;p&gt; Again... thanks fo Riastradh for teaching me about the REPL.

&lt;p&gt; L8er...</description>
    </item>
    <item>
      <pubDate>Sat, 8 May 2004 03:42:07 GMT</pubDate>
      <title>8 May 2004</title>
      <link>http://www.advogato.org/person/Leimy/diary.html?start=34</link>
      <guid>http://www.advogato.org/person/Leimy/diary.html?start=34</guid>
      <description>This is pretty awesome for you OS X folks:

&lt;p&gt; http://ranchero.com/bigcat/

&lt;p&gt; 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.

&lt;p&gt; here is the script:
&lt;pre&gt;
#!/bin/sh

&lt;p&gt; # Tar directories.

&lt;p&gt; 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
&lt;/pre&gt;

&lt;p&gt; 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.

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

&lt;p&gt; Saves me a bunch of time...

&lt;p&gt; Dave</description>
    </item>
    <item>
      <pubDate>Thu, 25 Mar 2004 06:08:23 GMT</pubDate>
      <title>25 Mar 2004</title>
      <link>http://www.advogato.org/person/Leimy/diary.html?start=33</link>
      <guid>http://www.advogato.org/person/Leimy/diary.html?start=33</guid>
      <description>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.

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

</description>
    </item>
    <item>
      <pubDate>Mon, 8 Mar 2004 23:18:12 GMT</pubDate>
      <title>8 Mar 2004</title>
      <link>http://www.advogato.org/person/Leimy/diary.html?start=32</link>
      <guid>http://www.advogato.org/person/Leimy/diary.html?start=32</guid>
      <description>For you Mac OS X 10.3 folks running Mail.app:

&lt;p&gt; &lt;p&gt; You may or may not notice that content_index files get very large in your ~/Library/Mail folder.

&lt;p&gt; &lt;p&gt; To find them do "find . -name "content_index" -print0 | xargs -0 ls -l

&lt;p&gt; &lt;p&gt; If you have many mailboxes and accounts this can get pretty big... I checked mine today and it was 1456KB.

&lt;p&gt; &lt;p&gt; I used this one liner script to calculate:
&lt;pre&gt;echo `find . -name "content_index" -print0 | xargs -0 ls -l | awk 'END { for (i = 1; i &amp;lt; NR; ++i) print "+"; print "1024/p"} {print $5}' | dc` kilobytes&lt;/pre&gt;

&lt;p&gt; &lt;p&gt; It's using awk to pipe commands to dc... reverse polish notation rules.</description>
    </item>
    <item>
      <pubDate>Fri, 5 Mar 2004 03:03:05 GMT</pubDate>
      <title>5 Mar 2004</title>
      <link>http://www.advogato.org/person/Leimy/diary.html?start=31</link>
      <guid>http://www.advogato.org/person/Leimy/diary.html?start=31</guid>
      <description>Been a long time since I've posted.  Started working from home and am going to relocate to the Seattle area in a few months.

&lt;p&gt; Still trying to keep my hands dirty in OpenDarwin related stuff.  Right now my focus is libFoundation and occasionally 7WX! [http://www.7wx.org]

&lt;p&gt; Also chillin out on orkut these days... It's oh so trendy... please get a friend to sign you up so I can be connected to more of the hundreds of thousands of folks out there.

&lt;p&gt; Also learning Haskell and continuing to love emacs...

</description>
    </item>
    <item>
      <pubDate>Thu, 9 Oct 2003 03:53:12 GMT</pubDate>
      <title>9 Oct 2003</title>
      <link>http://www.advogato.org/person/Leimy/diary.html?start=30</link>
      <guid>http://www.advogato.org/person/Leimy/diary.html?start=30</guid>
      <description>Nifty applescript "alarm clock" I use with iCal... Inspired, adapted and mostly stolen from my buddy Jason Deraleau on #opendarwin [irc.freenode.net]&lt;br&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;

&lt;p&gt; &lt;pre&gt;
-- launch iTunes and start music slowly increasing volume
set volume 5
try
	tell application "iTunes"
		activate
		play playlist "easy"
		set i to 10
		repeat 100 times 
			set the sound volume to i 
			set i to i + 1 
			delay 0.25
		end repeat 
	end tell 
on error 
	beep 
end try

&lt;p&gt; &lt;/pre&gt;
Thanks again Jason</description>
    </item>
    <item>
      <pubDate>Thu, 9 Oct 2003 03:43:40 GMT</pubDate>
      <title>9 Oct 2003</title>
      <link>http://www.advogato.org/person/Leimy/diary.html?start=29</link>
      <guid>http://www.advogato.org/person/Leimy/diary.html?start=29</guid>
      <description>Haven't updated since July... Seems its about time.&lt;br&gt;&lt;br&gt;
Working from home these days.  FreeBSD 5.x CURRENT is a bit of a mess these days.  Matt Dillon forked 4.8 and made dragonflyBSD and I must say I find it somewhat refreshing.  Too bad I can't run it yet.  My hardware is far too new.  When my new G5 comes [just shipped tonight] I hope I will be able to get FBSD on the old G4 :)  I realize it doesn't do "release" yet but I am hoping to find some time to work on it.&lt;br&gt;&lt;br&gt;
Other than that these days.. just hackin around with Cocoa and Applescript in my spare time&lt;br&gt;&lt;br&gt;
Took some time out to get familiar with Haskell and have been playing around with Lisp too recently.  There are a lot of different perspectives one can pick up from learning a new programming language.  I suggest you try it... many idioms out there that may lend themselves to solutions you have in mind.&lt;br&gt;&lt;br&gt;
Sometimes open source people aren't open minded enough... C++ is treated like a red-headed stepchild in spite of the fact that very good things have been done with the subset of it that is commonly implemented :). &lt;br&gt;&lt;br&gt;
Nothing like rambling to one's self on one of the older public blog sites :)</description>
    </item>
    <item>
      <pubDate>Fri, 4 Jul 2003 02:57:24 GMT</pubDate>
      <title>4 Jul 2003</title>
      <link>http://www.advogato.org/person/Leimy/diary.html?start=28</link>
      <guid>http://www.advogato.org/person/Leimy/diary.html?start=28</guid>
      <description>Haven't done this in a LOOONG time.  I stopped watching most of KDE development as I haven't had the time.  I try to stay connected with my OpenDarwin peeps though and hope to get some time to do something useful.&lt;br&gt;&lt;Br&gt;
in the meantime I am keeping busy with work and interesting projects I can't talk too much about.

&lt;p&gt; &lt;p&gt; &lt;br&gt;&lt;br&gt;NDA's kick ass :)&lt;br&gt;&lt;br&gt;
I sent Soeren Schmidt some hardware for an SiI 3112 controller chip
and he has supported this nice SATA device in FreeBSD... its coming
to  you for FreeBSD 5.2&lt;br&gt;&lt;br&gt;
&lt;A HREF="http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/ata/ata-chipset.c?rev=1.32&amp;content-type=text/x-cvsweb-markup"&gt;Check here!!&lt;/a&gt; &lt;br&gt;&lt;br&gt;
Its good to know that, though I haven't had enough time to code stuff myself lately for my favorite open sourced projects, that I can still make a bit of a difference somehow.</description>
    </item>
  </channel>
</rss>
