Tuesday, August 26, 2014

Using emacs to compose email

For many years, my email client of choice has been mutt, with vim used for composing messages. However, in recent years I've drifted away from vim for longer edits, succumbing to the temptation of emacs.

Email was one place where emacs had some trouble displacing vim, in part because I'm fussy and have an (apparently) odd style.  I indent the first like of each paragraph by two spaces and also leave a space between them. Emacs can handle indented paragraphs with paragraph-indent-minor-mode. However, PIMM does not play nicely with Adaptive Fill, which can be very nice for writing bulleted lists.

My current vim configuration, while allowing the paragraph spacing I want for body text, does fall down somewhat on bulleted lists. It requires manual spacing of list items, which so far I've just been living with. (There's also probably a way to fix this inside vim, but that wouldn't have the advantage of using the emacs daemon that I'm nearly always running. I'll likely investigate this later.)

At first blush, it looks like a suitable adaptive-fill-function could save the day. One perhaps like this:

(defun crh-adaptive-fill-function ()
  "Adaptive fill for indented paragraphs."
  (if (and (looking-at-p "^  [A-Z]")
         (or (bobp)
           (save-excursion
             (previous-line 1)
             (looking-at paragraph-separate))))
     ""
     nil))

Sadly (and undocumentedly) adaptive-fill-function can't actually specify an empty fill prefix. The section of lisp/simple.el that calls the adaptive fill machinery discards empty prefixes, saying "Use auto-indentation rather than a guessed empty prefix.".

So, that's frustrating. On the bright side, the process of figuring out what was going on gave me a chance to improve my elisp debugging skills and learn more about the emacs codebase.

However, it does work to wrap do-adaptive-fill and delete the unwanted indentation after it was inserted:

(defun crh-do-auto-fill ()
  "Adaptive fill for indented paragraphs in mail-mode."
  (if (mail-mode-auto-fill)
    (save-excursion
      (beginning-of-line)
      (previous-line)
      (if (looking-at-p "^  [A-Z]")
        (progn
          (next-line)
          (while (= (following-char) 32) ; space
            (delete-char 1))))
       t)))

This is somewhat less elegant than never inserting it, but it has the advantage of working in practice.

Wednesday, December 26, 2012

Nerding for no reason

I've recently started puttering a bit with Brainfuck as an amusingly nerdy way to encode little snips of text. I'd seen this done on mailing list signatures, and found it amusing.

I wrote the following by hand:

++++++++[>++++++++++<-]>.<++[>----<-]>-.<++[>++++<-]>+.<++[>-----------
<-]>.<++[>-------------<-]>.<++++[>++++<-]>.<++++++++[>+++++++++<-]>.<+
+++++++[>---------<-]>.<++[>+++++++++++<-]>.<+++[>-----<-]>--.<++[>++++
+++<-]>.<++[>-----<-]>.---.----.-.


After initially being quite satisfied with myself, I began to feel a bit sheepish.  What's the utility in obfuscating my PGP keyid in that way?  It certainly doesn't make discovering my keyid any easier than just expecting them to check the keyservers.

After that, I looked encoding my Geek Code block... but it's (a) too obscure, and (b) too verbose.  Encoded, it looks like:

+++++++[>>++++++++++<<-]>>+.<<++[>>--<<-]>>.<<++++[>>++++<<-]>>.<<++[>
>>+++++++++++++++++++++++<<<-]>>>+.<<<+++[>>----<<-]>>.--.>.<++.<<+++[
>>++++<<-]>>.<<++[>>>-------<<<-]>>>-.<<<++++++++++[>++++++++++<-]>.>>
.<<<++[>+++++++<-]>+.<++[>>>+++++<<<-]>>>+.<<<++[>>>+++++++<<<-]>>>+.<
<<++[>>>-------<<<-]>>>-.<<<++[>>>-----<<<-]>>>-.<<<+++[>------<-]>.>>
.<<<++++[>>----<<-]>>.<<++[>>>+++++<<<-]>>>+..<<<++[>>>---<<<-]>>>-.<<
<++[>>>--<<<-]>>>.<<<+++[>>++++++<<-]>>.<<+++[>>------<<-]>>-.<<++[>>>
+++++<<<-]>>>+..<<<++[>>>-----<<<-]>>>-.<<<++[>>+++++++<<-]>>.<<++[>>>
+++++<<<-]>>>+...<<<++[>>>-----<<<-]>>>-.+.<<<++[>>--<<-]>>.>-.<<<++[>
>---<<-]>>-.<<++[>>>+++++<<<-]>>>+..<<<++[>>>-----<<<-]>>>-.<<<+++[>>+
+++++<<-]>>.<<++[>>>+++++<<<-]>>>+...<<<++[>>>---<<<-]>>>-.<<<++[>>>--
<<<-]>>>.<<<++[>>----<<-]>>-.<<++[>>>+++++<<<-]>>>+..<<<++[>>>-----<<<
-]>>>-.<<<++[>+++++++<-]>.<+++++[>>>++++++<<<-]>>>+.<<<+++++[>>>------
<<<-]>>>-.<---.<<+++++[>>>++++++<<<-]>>>+.<<<+++++[>>>------<<<-]>>>-.
+.<<<++[>++++<-]>.>>-.+.<<<++[>>++<<-]>>.>-.<--.<<++[>>>+++++<<<-]>>>+
..<<<++[>>>-----<<<-]>>>-.<<<++[>>++++<<-]>>+.<<+++[>>>++++<<<-]>>>+.<
<<++[>>>-----------------<<<-]>>>-.<<<++[>>>+++++++++++<<<-]>>>.<<<++[
>>---<<-]>>.+++.<<++[>>>+++++<<<-]>>>+..<<<++[>>>-----<<<-]>>>-.<---.<
<++[>>-----<<-]>>-.<<+++[>>>++++<<<-]>>>+.<<<+++[>>>----<<<-]>>>-.<<<+
+++[>>+++++<<-]>>.<<++[>>>+++++<<<-]>>>+.<<<+++[>>>++++++<<<-]>>>+.<<<
+++[>>>------<<<-]>>>-.<<<++[>>>-----<<<-]>>>-.<<<++[>>----<<-]>>-.<<+
+[>>----<<-]>>-.<<++[>>++++<<-]>>+.<<++[>>>+++++<<<-]>>>+..<<<+++[>>>+
+++++<<<-]>>>+.<<<+++[>>>------<<<-]>>>-.<<<++[>>>-----<<<-]>>>-.<<---
.<++[>>>+++++<<<-]>>>+..<<<+++[>>>++++++<<<-]>>>+.<<<+++[>>>------<<<-
]>>>-.<<<++[>>>-----<<<-]>>>-.<<<++++[>>>+++++<<<-]>>>+.<<<++[>>>-----
<<<-]>>>..<<<++[>>>-----<<<-]>>>-.<<<++[>>++++<<-]>>.>.<<<++[>>---<<-]
>>.>.<<.++.<+++[>>>++++<<<-]>>>+.<<<+++[>>>----<<<-]>>>-.<<<++++[>----
-<-]>.<++[>>>+++++<<<-]>>>+..<<<++[>>>-----<<<-]>>>-.<<<++[>>-------<<
-]>>.<<++[>>++<<-]>>+.>.<<<++[>>--<<-]>>-.<<++[>>>+++++<<<-]>>>+..<<<+
+[>>>-----<<<-]>>>-.<+++.<<++[>>>+++++<<<-]>>>+..<<<++[>>>-----<<<-]>>
>-.<<+++.<++[>>>+++++<<<-]>>>+...---.+++.--.<<<++[>>>----<<<-]>>>-.<<+
++.<+++[>>>++++<<<-]>>>+....<<<++[>>>-----------------<<<-]>>>-.<<<++[
>>>+++++++++++<<<-]>>>.<<<++[>+++++<-]>.<++[>>>+++++<<<-]>>>+...<<<++[
>>>-----<<<-]>>>-.<<<++[>--<-]>-.<+++++[>>>++++++<<<-]>>>+.<<<+++++[>>
>------<<<-]>>>-.


In the process of trying to write that out, I became somewhat frustrated, and did what most programmers do.  I wrote a program to write my program:

do_factor = function(x){
  tmp = c()

  if (x>1){
    for (i in 1:x){
      if ( floor(x/i) == x/i){
        tmp = rbind( tmp, c(i, x/i, i+x/i))
      }
    }
    ix = head(which(tmp[,3] == min(tmp[,3])),1)
    sort(tmp[ ix, c(1,2) ])
  } else {
    c(1, 1)
  }
}

prep = function(x,n){ paste(rep(x,n), collapse='') }

x = as.numeric(charToRaw(
  "String to 'compile' goes here"))
cur = c(0,0,0)

output=""

for (i in 1:length(x)){
       if (x[i]>=97) { ctype=1 }
  else if (x[i]>=65) { ctype=2 }
  else               { ctype=3 }

  delta = x[i] - cur[ctype]

  R = paste(rep('>', ctype),collapse='')
  L = paste(rep('<', ctype),collapse='')

  if (delta==0){
    output=paste(output,R,'.',L,sep='')
  } else {
    if ( delta >= 0 ) { pch = '+' }
    else              { pch = '-'; delta = -delta }

    if (delta%%2==1 & delta >= 2){
      fx = do_factor(delta-1); add=pch
    } else {
      fx = do_factor(delta); add=''
    }

    if (fx[1]==1){
      output=paste(output, R, prep(pch,fx[2]),add,'.',L,sep='')
    } else {
      output=paste(output, prep('+',fx[1]),'[',R,prep(pch,fx[2]),L,'-]',R,add,'.',L,
                   sep='')
    }
  }
  cur[ctype] = x[i]
}

n_prev = nchar(output)
repeat {
  output = gsub('<>','',output)
  n_cur = nchar(output)
  if (n_cur == n_prev) break
  n_prev = n_cur
}



Now, I just need to find a sufficiently pithy quote such that the blob of BF is closer to the length of my PGP keyid, and farther from the insanely long geek code block.  The closest I've gotten thus far is:

+++++++[>>++++++++++++<<-]>>.<<++++++++[>+++++++++++++<-]>.---.<++++[>
>>++++++++<<<-]>>>.<<<++[>+++++++<-]>+.--.+++.-.<+++[>----<-]>.>>.<<+.
<++[>+++++<-]>.>>.<<-.<++++[>----<-]>-.<++++[>++++<-]>+.<+++[>----<-]>
-.<++[>+++<-]>+.<+++[>++++<-]>+.>>.<<<++[>----<-]>-.<++[>++<-]>+.---.<
+++[>----<-]>-.>>.<<<++[>--<-]>.<+++[>++++<-]>+.<++[>-----<-]>.>>.<<<+
+[>+++++<-]>.<++[>----<-]>-.<++++[>++++<-]>+.<++++[>----<-]>-.<+++[>++
++<-]>+.>>.<<+.<++[>-----<-]>.<++[>++<-]>.+++.<++[>--<-]>.<++[>---<-]>
-.<++[>>>+++++++<<<-]>>>.<<<++++++[>>>------<<<-]>>>.<<<++[>>>++++++++
+++<<<-]>>>..<<<+++[>>>++++<<<-]>>>+..<<<+++[>>>----<<<-]>>>-.<<<++[>>
--<<-]>>-.<<++[>+++++++<-]>.<++++[>----<-]>.--.<++++[>++++<-]>+.>>.<<<
++[>>++++<<-]>>.<<++[>----<-]>-.+++.<++[>----<-]>.+.<

Monday, October 15, 2012

A display_filter for mutt to (among other things) localize dates

I'm neurotic about my email.  It's probably clinically significant.

Recently, I was looking for a way to have mutt display dates in my local timezone. I happened upon this stackexchange thread, which suggests the use of a display_filter.

I'm already using the excellent t-prot filter, to decrease my genocidal urges.  So, I'll need to chain that onto the end of whatever new display_filter I use. Furthermore, I'm not terribly thrilled that the stackexchange example relies on formail (because I'd rather avoid using the unmaintaned procmail).  I'd also rather avoid creating tempfiles, if I can.

So, here's what I came up with.  (gdate is GNU date from the coreutils package).

#!/usr/bin/perl
open (FH, "|-",
   "t-prot -acelmtkwS -Mmutt -L ~/dot/mutt/mlfooters -A ~/dot/mutt/adfooters")
  or die "Can't run $!";

$found_date=0;

while(<>){
  if ($found_date==0 && /^Date: (.*)$/) {
    print FH "Date: ".`gdate -R -d "$1"` ;
    $found_date = 1;
  } else {
    print FH;
  }
}

close(FH);

Wednesday, June 13, 2012

Is it weird that...

A friend recently posted "Is it weird that at least 3 of my friends have their 3rd anniversary today?". I was curious.  So, I constructed a Monte Carlo simulation to determine if it was, in fact, "weird".  Short answer: no (p ≈ 0.21).

If we assume that that 14% of weddings happen in June, 75% of those on a Saturday, and that relationship lengths are exponentially distributed with a mean of 8 years, then a frequency distribution for the number of independent couples out of a population of 649 having 2009-06-13 as their anniversary is:

1: 35.5%
2: 23.2%
3: 14.5%
4: 4.7%
5: 1.9%
6: 0.3%

The R code I used for this was:

# Probabilities of weddings in each month
# Data for weddings in the Netherlands in 1995 taken from
# http://g2.cvs.sourceforge.net/viewvc/g2/g2/g2/demo/bargraph/graphdata.py
pr_month = c(
  2947, 3121, 4514,
  5708, 9794, 12427,
  6825, 8630, 12108,
  6411, 4045, 4939 )
pr_month = pr_month/sum(pr_month)

# Unfortunately, I'm not able to find data on which week days are most common.
# All I've found is that Saturday is 'by far the most common', followed by
# Sunday, with weekday weddings being less common.
pr_day = list()
pr_day[["Monday"   ]] = 0.01
pr_day[["Tuesday"  ]] = 0.01
pr_day[["Wednesday"]] = 0.01
pr_day[["Thursday" ]] = 0.01
pr_day[["Friday"   ]] = 0.01
pr_day[["Saturday" ]] = 0.75
pr_day[["Sunday"   ]] = 0.20

# First marriages which end in divorce last an average of 8 years
# (see http://www.census.gov/prod/2005pubs/p70-97.pdf )
# I'll assume marriage lengths follow an exponential distribution with mean 8

# For performance, cache things we will re-use
month_days = list()
day_probs = list()

# Define a function which can generate a specified number of wedding dates,
# following the probabilities given above:
random_dates = function(n){
  dates = rep(as.Date(NA), n)
  ages = sort(floor(rexp(n, 1/8)),decreasing=T) # Sort to get good cache performance
  month = sample(1:12, n, prob=pr_month, replace=T)

  for (i in 1:length(ages)){
    m_ix = sprintf('%i-%i-1',2012-ages[i],month[i])
   
    if (is.null(month_days[[m_ix]])){
      # Get a list of the days in the month
      start = as.Date(m_ix)
      stop = as.Date( ifelse(month[i]==12,
        sprintf('%i-1-1',  2012-ages[i]+1),
        sprintf('%i-%i-1', 2012-ages[i], month[i]+1)) )
      month_days[[m_ix]] <<- head(seq(start, stop, by='day'),-1)
    }
   
    if (is.null(day_probs[[m_ix]])){
      # Figure probabilities for each day
      day_prob = rep(NA, length(month_days[[m_ix]]))
      for (j in 1:length(day_prob)){
        day_prob[j] = pr_day[[ weekdays(month_days[[m_ix]][j]) ]]
      }
      day_probs[[m_ix]] <<- day_prob/sum(day_prob)
    }
   
    # Pick a day out of this month
    dates[i] = sample(month_days[[m_ix]], 1, prob=day_probs[[m_ix]] )
  }
  dates
}

# Generate 1000 sets of 649 independent dates
#  Figure out how many times out of those 1000 simulations
#  there are more than three which fall on 13 June 2009.
count=rep(0,1000)
for (i in 1:1000){
  # Progress meter:
  if (i%%10==0) cat (i)
  else if (i%%2==0) cat ('.')
  if (i%%50==0) cat('\n')

  count[i] = sum( random_dates(649) == as.Date('2009-06-13'))
}
cat('\n')



# Generate a frequency distribution
for( i in 1:max(count)){
  cat(sprintf('%i: %.1f\n', i, 100*sum(count==i)/length(count)))
}

Wednesday, May 30, 2012

Autocommit II

 And yet, sometimes one *doesn't* want every last keystroke autocommitted.  Like when one is accessing repositories at work via tramp.  For those cases, I've tweaked my after-save-hook as follows:


(add-hook 'after-save-hook '(lambda ()
  (if (vc-git-registered (buffer-file-name))
    (if (file-exists-p (concat (vc-git-root (buffer-file-name)) "/.autocommit"))
      (vc-git-checkin (buffer-file-name) nil (format-time-string "Autocommit %F %T"))))))

Much better.

Thursday, April 26, 2012

git autocommit ftw

After an unfortunate incident involving "R --slave > analysis.r" rather than "R --slave < analysis.r", I've added the following to my .emacs:

(require 'log-edit)
(add-hook 'after-save-hook '(lambda ()
  (if (vc-git-registered (buffer-file-name))
    (vc-git-checkin (buffer-file-name) nil (format-time-string "Autocommit %F %T")))))

Such that if I'm in a git repo, every save gets committed. So, I'll need to find a new stupid mistake to destroy my work.
 
I also learned that a list of unpushed commits can be viewed with "git log origin/master..HEAD".

Update: See Autocommit II for an improved version.

Wednesday, May 03, 2006

Insomnia annoys me

The last several days have been strange and annoying. I have been unable to sleep at night, and unable to remain awake during the days. Very inconvenient when I'm trying to get all of my end-of-semester stuff pulled together.
So last night I just bit the bullet. I stayed up all night, in hopes that at least this way I'll be awake in the morning and at least tired at night.
We'll see how it goes.
It's a bit strange to be reading netnews, shower, and then go back to netnews with coffee.

Saturday, March 11, 2006

Spring Break - First Project

I have a rather involved system for dealing with my email. I've got a mail server running my own hybrid filtering system. I access the mailstore on that server using Binc IMAP and mutt. For what I want, it's nearly perfect.

The one gaping hole had been message searching. Mutt does have the idea of setting up a 'limit', and only displaying matching messages. Limiting only works in the current folder. More than that, if you want to limit based on body contents, all messages (and their attachments!) are downloaded to search the bodies. Sometimes this is slow.

I thought it might work to set up MHonArc and ht://Dig and then just access the archive for searching this way. This is what The Mail Archive does.

MHonArc is amazing for mailing list archives, where there's not any folder structure. Trying to impose a folder structure is very much a square peg with round hole of insufficient diameter proposition.

Beyond that, I couldn't find an easy way to get the kind of search excerpts out of ht://Dig that I wanted. Excellent general-purpose search tool. For email, archives, it seemed to be tripping over the headers a lot. I know there's a way around that, but I couldn't figure it out.

After a very late-night learning experience setting up the MHonArc and ht://Dig to get results that still weren't what I wanted, I got some sleep and put in a bit more thought about the mechanics of how this would work.

I'd need to use a browser to read archives. Somewhat annoying not to be able to search from within mutt. I'd also need to set up ssh tunneling to read archives from outside my house. No big deal, but somewhat annoying.

I should also set up an .htpassword to prevent house guests from reading my personal mail. I've got all of my mail stuff authenticating via checkpassword-pam, which gives me a nice single-sign-on system. If there's a way to get apache to use checkpassword-pam, I don't know it. So I'd need to remember to change that password as well to keep it in sync with my other passwords. Also not a big deal, but also annoying.

Becoming less convinced of the cleverness of that setup, I started googling around for other solutions. I stumbled across Mairix after encountering an amusing rant written by someone who appears at least as picky as I am.

Mairix is very cool. After adding: macro index S "!ssh -p PORT localhost mairix " and the appropriate modification to my preconnect to set up this tunnel, it integrates very nicely with mutt. I'm quite happy.

Thus concludes my first work-avoidance project of the week, and also my blog-resurrection.

Monday, January 02, 2006

Moment of joy

Dec 31 17:59:59 suzie kernel: Clock: inserting leap second 23:59:60 UTC

Sunday, September 25, 2005

Anniversary

Today was our one-year anniversary. Last night we went out to celebrate.

This was a one-kid weekend. Beth and Laurie watched Will for us. He seemed to really like it, and so did they. Apparently he was really well behaved, too.

We went out to dinner. I wanted to find a nice little cozy little place. Wifey wanted fish though, and there aren't a lot of cozy little seafood places in Madison. I looked at Ocean Grill and The Blue Marlin, but both are on the Capitol Square. That would mean hellish parking and bar-crowds to deal with, which neither of us wanted to put up with. So we just went to Red Lobster. It ended up being really nice, though.

Then we went to see Lord of War. It was good, but not what I expected.

It was so good to get out of the house and get a little time away from the kid(s). We're both so very busy lately, that we don't get to do that very much. Because of that, we're all a bit high strung a bit more often than we should be.

This last year went by very fast. So busy, all of us. But it's been a very good year.

Lily started kindergarten. Her teachers seem to be really impressed with her. She's starting to read and write. A few days ago, I found her spontaneously copying writing from her toys.

Will has started walking, running, climbing. He's started picking up words, and even some phrases.

Melissa has started school. It's something she's not bored out of her skull doing, which is good. The jobs she's tried this last year have been totally unable to hold her interest. She seems to be really enjoying it.

And I'm still doing what I'm doing. I've got about three semesters left on my MS, then I'll probably start in on my PhD. I've picked up another job maintaining the website for my department.

Here's hoping for another year just like this one. And then another. And another.

Wednesday, July 13, 2005

Karl Rove

There's been quite a bit of buzz in the media about Karl Rove. Much of this buzz is political in nature, and not that I have no opinions on that front, but another aspect of this has really struck me.

Much of this discussion involves going through email records and electronic memos. This makes me wonder: does the media know nothing about protecting the security of electronic records? Why weren't all of these emails and all of these memos PGP encrypted? Why weren't they stored on a system like StegFs, or even EFS? Why did they still exist at all? Why hadn't they been wiped in accordance with a document destruction policy?

This isn't just about the news media, though. Anonymous sources should be aware of tools like Invisiblog and anonymous remailers (like mixmaster).

We have phenomenal tools for maintaining the anonymity of sources. Why does nobody use them?

Sunday, June 26, 2005

Kitties

Some time ago, my wife convinced to get a kitten. A friend of a friend had a brand new litter, and was giving them away. I've never been a cat person, so I wasn't entirely sure it was a good idea. However we did want a more interesting pet than a fish, and our apartment doesn't allow dogs. So we got Oscar The Cat:



We got him when he was only five weeks old. So he was very hyper. Being a kitten, he likes a bit of rough play now and again. We asked the vet how we might get him not to do that with the children. Her suggestion was to get another cat. I wasn't convinced that having two misbehaving animals would be better than having one. So that idea was nixed.

Since then, we've cat-sit for friends a number of times. And Oscar really was better behaved when he had another cat around to play with. So we started looking for another cat.

As luck would have it, one of Melissa's co-workers had a pair of black cats that needed a new home. Their previous owner was allergic, and none of the cat allergy medications really helped her. We picked them up last Thursday.

So now we have Missy:



She took a while to warm up to the new humans, but when she did it was like flipping a switch. She went from hissing at us to make us go away to hopping onto laps demanding that we pet her.

And here is her brother:



The picture doesn't really show it, but he is a giant cat. He's still not sure that he likes the new people at all. He spent a very long time hiding in our basement, and only came out after we calmed him with catnip. If he's not calmer by Wednesday, we might be going to the vet to get him some kitty drugs.

His previous owner called him "One-Claw" because when he was declawed, there was one claw on his left paw that the vet missed. I'd like to get him a better name than that though. I'm leaning toward Claude, but it needs the approval of the executive committee (i.e., my wife).

So that's what we've been doing for entertainment the last few days. We're turning into a bunch of cat-ladies.

Tuesday, June 14, 2005

Updates: Fink Stuff

I'm up to 23 fink packages. I know that's nothing compared to some other maintainers, but I'm still pleased with myself for it.

I've decided that just editing my packages from inside the CVS tree is too error-prone, especially in terms of keeping packages for several differing trees in sync.

Simply keeping a sandbox around with a master copy of the .info and using 'install' or similar to copy the master copy into the appropriate distributions would squish changes from upstream. That would be bad. I settled on using emacs' ediff-mode to handle this.

And as long as I'm automating this process, it would be nice to automate generation of ssl and non-ssl versions for packages that need this. To do this I settled on using a little bit of perl-fu to change the name of the package appropriately, and then a bit of magic with the Variants system to handle the rest.

Here's a snippet of the Makefile (insert tabs where needed) I'm using:

SSL=perl -pi~ -e 's/(Package: (?!%N)[^%\n]+)(%type_pkg.+)?/\1-ssl\2/'

#Fink unstable for 10.3
F103u-lib=/sw/fink/10.3/unstable/main/finkinfo/libs/
F103u-crypto=/sw/fink/10.3/unstable/crypto/finkinfo/

define merge
diff -q $(1) `basename $(1)` || ( touch $(1) && mv $(1) orig && emacs --eval "(ediff-merge-files \"orig\" \"`basename $(1)`\" nil \"$(1)\" )" && rm orig )
endef

define check
fink -v validate $(1) | grep "looks good"
endef

############
# libnasl3 #
############
libnasl3:
$(call merge,$(F103u-lib)libnasl3.info)
$(call merge,$(F103u-lib)libnasl3.patch)
cp libnasl3.info libnasl3-ssl.info
cp libnasl3.patch libnasl3-ssl.patch
$(SSL) libnasl3-ssl.info
$(call merge,$(F103u-crypto)libnasl3-ssl.info)
$(call merge,$(F103u-crypto)libnasl3-ssl.patch)
rm libnasl3-ssl.*
libnasl3-ci:
$(call check,$(F103u-lib)libnasl3.info) && $(call check,$(F103u-crypto)libnasl3-ssl.info) && cd /sw/fink && cvs ci 10.3/unstable/main/finkinfo/libs/libnasl3.info 10.3/unstable/main/finkinfo/libs/libnasl3.patch 10.3/unstable/crypto/finkinfo/libnasl3-ssl.info 10.3/unstable/crypto/finkinfo/libnasl3-ssl.patch


So far I'm quite pleased with it. But we'll see how it turns out as I use it for more things.

Monday, January 03, 2005

Another Year Another 365.242199 Dollars

Time flies when you're running about all the time.

Classes last semester went well. I didn't get straight A's, but there's always next semester. It's nice though in that I did more than well enough to be rid of the academic probation that I was admitted on. One tanked semester can be annoying to recover from. One of these days I need to update my webpage with updated course information for last semester.

The progress of research has been somewhat brisk of late. Our group has been using the vacation time to catch up with our timeline for last semester. I've been spending quite a bit of time in my subterranean lair. Good thing that it's a nice lair. Of late my task has been integrating an ingrowth routine into our growth simulator. I now have one that does something, but as yet it is unvalidated. As Knuth says: "I have only proved it correct, but not tested it."

Will is walking now. Sometimes he's practically running. Lately his thing has been to run around in circles around people. Usually screaming. It makes me wonder what the neighbors think we're doing to him. We think he said "Kitty" a while ago, but we can't get him to do it again.

Christmas was busy this year. We went to the in-laws on Friday night, my parents came to us on Saturday, and on Sunday we went to both grandparent-in-laws. Sunday was a lot of driving. I got a copies Neil Stephenson's Cryptonomicon and Jon Stuart's America: The Book for christmas. So far I haven't gotten very deeply into either, but both seem quite good. I also got FF: Chronicles. Now I've got FF4-11 (and 10.2). The family got a digital camera. I'm sure that makes my wife happy; she's a shutterbug.

We had a nice, calm new year's. We rented some movies (Resident Evil: Apocalypse and The Manchurian Candidate) and stayed home. Living away from campus is still a bit new for me, I was pleasantly surprised that it was quiet outside.

Sunday, August 22, 2004

Monotone

I've had my home directory under version control for some time now. It's a -very- nice way to keep files consistent across all the various machines I use.

Previously I had been using CVS, and have been pleased with it. The standard problems with CVS apply, of course. Binary files are handled poorly, the network protocol is slow, moving/renaming files is difficult.

So I was in the market for a new version control system. I looked at Subversion looks very nice, but I wanted something decentralized. GNU Arch also looks nice, but didn't really appeal to me. Something about how all the documentation tells you that you shouldn't edit configurations by hand left me feeling uneasy. So I went with Monotone.

Monotone does much of its work by calling LUA hook functions. The defaults pretty much feel like CVS. However, I was very impressed with how much customization can be performed. With a little tweaking, I've got a system that is as close to completely transparent without being Coda as I've ever had.

Suffice it to say that I'm impressed.

Saturday, July 10, 2004

AVG vs NAV

I do some contract work for a small Internet Cafe near my old hometown. As of now, I'm sitting in the back hiding from customers, trying to bring the client machines back up to some kind of useful state.

As you might guess, malware is a huge problem in an internet cafe with windows based client machines. So most of my current headache stems from trying to extract wriggling badness from the soft flesh of Windows 98.

At the Cafe, they've been using NAV: corporate for AV, but that's it. So I've installed ad-aware and spybot. Spybot caught some things that AAW missed, but there's no harm in having both of them. For kicks, I installed AVG as well. AVG caught some viruses that Norton missed.

The traditional wisdom is that Norton is top of the line, and if you've got cash to drop, drop it there. So I'm very surprised to find that AVG (traditionally described as an underdog that is only popular because of their free edition) outperforms NAV sometimes. And yes, before someone asks, both were updated immediately before the scan.

gmail

Today I got not one, but two gmail invites. Never rains but it pours, eh?

I've been saving all of my personal email since 1998, and I've only used 22MB. I'm sure that there are people who hit their 1GB limit, but under normal use, it'd take me quite a bit of time to do so. Maybe google's "never delete an email" push isn't that far from the truth.

Thus far, I find their conversation view to be very clever, useful, handy even. Other webmail services seem to me to be offering a poor man's IMAP. Gmail actually does something differently in a way that is useful.

Monday, June 28, 2004

In Other News

This is going to be a busy year for me, oh yes indeed. My "Instant Family" takes up all the time you'd expect and sometimes more. Of course, who am I to know what to expect? I went from being child-phobic to having two young step children.

I'm meeting with my Professor on Thursday. We've got to decide on what classes I'll be taking, and start familiarizing me with the model (CANOPY) that I'll be working on. I think that I'm going to be adding a light model similar to that of SORTIE. Beyond that, I'd like to extend the model to understand that the world is not flat. Also, if I haven't worked myself into the ground by then, I'd like to add the capability to consider UV exposure profiles in the modeling.

Just like with my research at work, I'm wondering how anyone expects to get accurate data about outdoor phenomena without considering the weather. Now, we can't predict the weather into the future, but being able to enter UV profiles as input would probably help a lot WRT calibrating the model. I think. I -really- need to get myself up to speed on the biological basis of this process.

IE Redux

Apparently some other people are also losing the Faith with respect to IE being worth anything.