I started being interested in Perl, thanks to some good friends of mine, a few years ago (with a time lag...). I've mostly used Perl for "fun stuff", like visiting classical radio schedules on websites and downloading them rapidly for later search, or helping me out with combinatorial math problems, a hobby now that I'm no longer in any math program...
The last few days, I've worked up a few interesting (to me?) Perl scripts, and decided that they might be worth a bit of web availability. I'm putting one up now, and the other later. And more, as I write them (I don't think the ones I wrote before this last weekend should go up, but who knows.)
The language BF is an 8-command, Turing-complete computer language. Needless to say, this makes for long, not very legible programs. Information on BF. My BF interpreter
(UNIX version- write me for a MacPerl version. In any case, this is somewhat alpha, and not guaranteed to interpret BF programs accurately. I take no responsibility for its response to the famous "99 Bottles of Beer" program, available on the web in many languages including BF. Near as I could tell, the version in BF - accessible by a link at the webpage aforementioned- does not have matching brackets- there are 100 left [s and 101 right ]s- and this is fatal to a BF program for various reasons, indeed one of the only syntax errors I can think of in BF...) (April 2001 update: it's been pointed out to me that this mismatch is probably due to an HTML mixup that ate some of the code, by assuming that what was actually language was meant to be HTML tags. Or something... sigh)
(2-28-00. Warning. Not as fully tested as I thought- I've tested 7 of the 8 commands but not, alas, the one that asks for keyboard input. Will do this. It hasn't failed, it just hasn't been tried (by me) yet.)
The game Angband and its variants can be a bit addictive. One problem Mac players have is that (unlike DOS, Windows, etc. gamers who type angband.exe -s100) there's no way for them to see the whole high-score list at once. Download this script, copy scores.raw from your lib/apex directory into the same directory as your script (that's .copy. not move), rename it score1.raw, make sure that if you're not playing Angband 2.9.0 that you change the line in the script that says
2\.9\.0 to (say) 2\.8\.3 or whatever version you .are. playing with \s before
the periods (important!), then run the script. Then borgbones.txt will have a highscorelist-like (though without dates- I'll have to add that to a later version) output from the raw score. Enjoy.
Note for inexperienced (or anyhow, less-than-very-experienced) band-ers):
Your current character is not in the Scores file. When you save the game and read the high scores list with your character still alive, a fake "high scores entry" is created to fit into the high scores list, reading killed by nothing (yet!) and etc. - if you've played the game you've probably seen this; but don't be surprised when, using this script, you don't see your current, living character in the generated borgbones.txt file. It wasn't in scores.raw to begin with.
I will be coming back to this script soon to make some important changes, but it's usable and, I would hope, helpful now even as is.