Perl Scripts
Here are a few hacks that have little in common aside from having been written in perl. Perl rules!
SimpleGet.pl: A small stand-alone library defining just the get and getprint routines from LWP::Simple. So you don't have to install 1.5 megs of stuff just to write a one-liner web client.
Here are some examples showing how to use the SimpleGet library.
MIRA: A text-only web browser with some powerful features. I wrote this myself to satisfy my need to search my own browser cache. While I was at it, I decided that all text should be cached permanently. MIRA was the result.
Hypercalc: An unusual calculator program. It represents numbers in a special way allowing the calculation of quantities much larger than tools such as bc, dc, MACSYMA/maxima, Mathematica and Maple, all of which use a bignum library. For example, you can use Hypercalc to determine whether 128481024 is larger than 888888. I used it to compute many of the examples on my numbers and large numbers page pages.
A Turing machine simulator. It has a line-oriented interface and runs in any console window (like xterm or kvt). It uses color to show the current head position and state. It implements level-1 optimization (compression of runs and quickly skipping over sequential identical transitions across a run) using regular expressions. I was able to run 100 million steps of the 6-state busy beaver in just a few minutes.
This script runs once a day and updates my Programming Languages Sucks-Rules Chart.
My Apple II file extraction script reads a DOS 3.3 disk image (a text file of hexadecimal-encoded disk bytes), locates individual files and lists their contents. In order to do this it needs to know the 6+2 nybble conversion, sector interleaving, how to locate D5-AA-96 at the beginning of each sector, and token tables for both types of BASIC.
Perl: TMTOWTDI (There's More Than One Way To Do It) !
Robert Munafo's home pages on HostMDS (c) 1996-2010 Robert P. Munafo. about contact
This work is licensed under a Creative Commons Attribution 2.5
License. Details here
s.13