I decided it’s easier to use flickr for hosting pictures with the new camera. Flickr has a requirement that all photos link back, so it would get ugly pretty quickly if I had to do the link and image tag every time (although I could just cut and paste their code).
Instead, I wrote a Blosxom plugin that takes the url to the picture itself and a description and builds the link. It was all of 20 lines, most of which was blosxom required empty methods. The actual linking consisted of one regex match, a small bit of parsing that and then a replace with the url and image link.
Unfortunately, flickr urls include underscores and the Markdown plugin tried to make those into emphasis. Instead of just renumbering/renaming, I added a Markdown fixer that does a search and replace for <em> tags in the src links and reverts them to underscores.
Finally got to take my newtoy out and use it a bit. Click around and you can get closer to the original size. Already learning a bit about the advantages of RAW as the first shot was raised 2/3 of a stop in Lightroom. Not sure if I want to use Lightroom or Aperture yet, although it seems like Lightroom is easy to use with multiple disks.
Unfortunately the dove was just about finished when I got home. Every last bit of meat was plucked off. After the hawk left, we walked over and looked around and could barely find a trace other than the feathers.
Watching the hawk as it finished was quite interesting. Working on the last piece appeared to be difficult. The bird was having trouble holding it down to rip off the meat and kept pulling it up from under its other foot. Eventually, it moved to a branch where it was able to hold it down. After finishing, it spent quite a while wiping its bill on the branches, before shaking off a few times and taking off.
So final total 57, which is the same as last year. Overall total is now 74, with the additions of Brown Creeper, Eastern Bluebird, Yellow-rumped Warbler, Hermit Thrush, and Iceland Gull. From my calculations, there were at least 210 on the overall Massachusetts list this year.
In my waiting-for-people-to-leave-so-I-can-get-into-classrooms time at work I wrote a roman numeral translator in Factor. It’s a bit different from your normal implementation as Factor’s parser actually does almost all the work:
USING: strings parser kernel words sequences math ;
: NUMERAL: CREATE dup reset-generic dup t "parsing" set-word-prop parse-definition parsed add define-compound ; parsing
NUMERAL: I 1 ;
NUMERAL: IV 4 ;
NUMERAL: V 5 ;
NUMERAL: IX 9 ;
NUMERAL: X 10 ;
NUMERAL: XL 40 ;
NUMERAL: L 50 ;
NUMERAL: XC 90 ;
NUMERAL: C 100 ;
NUMERAL: CD 400 ;
NUMERAL: D 500 ;
NUMERAL: CM 900 ;
NUMERAL: M 1000 ;
: separate ( str -- str )
"" swap [ " " append ] [ add ] interleave ;
: join-special ( str str -- str )
dup >r split1 [ 1 r> remove-nth swap 3append ] [ r> drop ] if* ;
: merge-specials ( str -- str )
[ "I V" "I X" "X L" "X C" "C D" "C M" ] [ join-special ] each ;
: convert-numerals ( string -- arr )
separate merge-specials parse ;
: all-numerals? ( str -- ? )
[ "IVXLCDM" member? ] all? ;
: roman>number ( roman -- number )
>upper dup all-numerals? [ convert-numerals sum ] [ drop "Not a roman numeral" ] if ;
Instead of grabbing characters and keeping a running tally, I defined a bunch of parsing words using NUMERAL: to hold the values. I then took the string and split it into individual characters (“XIV” becomes “X I V”). The 4’s and 9’s are then rejoined (so we get “X IV”). I then simply parse the string, which gives a list of numbers and sum that up. It’s not perfect as it allows any pattern of numerals (“IVIVIVIV” parsed to 22), but good enough.