The new IEEE-754 Analyzers have now gone live at http://babbage.cs.qc.cuny.edu/IEEE-754.
Lots of new features: Input decimal, binary, or hex, and it figures out what to do with it; decimal values can be entered as rationals, making it possible to explore repeating fractions; support for all three IEEE-754 2008 binary formats (single, double, and quad precision); put multiple analyzers on the page so you can compare different values; uses GNU Multiprecision Library (GMP) for long calculations, allowing precise representation of edge values.
I spent a lot of time getting OS X Lion Server to work with my web sites last summer. Most of the problems had to do with security certificates for one of the sites, but I also had to figure out how to get Server.app to stop overwriting my configuration files each time I restarted Apache.
What follows are the notes I made towards the end of the process.
The PHP builtin function, mail() can be used to send email using either SMPT or using the operating system’s sendmail program. These features can be configured in the php.ini file, but I found I was having problems authenticating to my smtp relay server, and I wanted to minimize the number of SpamAssassin test failures so my messages would go to the recipients’ inboxes instead of their spam folders.
This post is about the gotchas I dealt with, not a tutorial on sending email in general.
Well, it's time to make some notes to myself again.
There are many wonderful tales to tell about upgrading babbage from Leopard server to Lion server this summer, but today's topic is just about getting sqlplus working. The sqlplus command works best, as does psql, php, and others, when run under rlwrap. It turned out that getting rlwrap to build under Lion was problematic enough to warrant a reminder here.
I wanted to use Vim to change graduation dates into a standard format. The form requires them to enter the date as mm/yy, but to enter it in the database, I need in in the form yyyy-mm. Sometimes they leave the leading 0 out of the month. For the database, the graduation month has to be 06, 09, or 02. But they often use 05 instead of 06 (because that’s when they want to be finished?). Here’s the Vim command to do it:
Two photos of a plastic bag I picked up at the photo show yesterday:


For the past couple of years, there have been no links to this site. After all, it’s really just notes to myself. But there have been tons of visitors! I have no idea how the robots find these things, but they did. And I had left the settings so that visitors could create accounts in order to post comments.
If you have ever tried to use PHP to process CSV files that contain non-ASCII characters, you know there is a problem out there with lots of solutions that may or may not work. Mostly the latter from what I can tell. Herewith some comments from a PHP command line program that I use to populate a PostgreSQL table with data derived from a spreadsheet.
This is all command-line stuff under OS X.
The IEEE-754 analyzer project fails when using the Opera web browser. I have reported the problem to Opera (Bug DSK-303966), but there is no way to track it, and it has not been fixed as of version 10.60. The problem shows up when I check for decimal recurrences. I keep an array of remainders (numeric strings) in an array, and compare each to remainder (also a numeric string) to all the elements in the array. If remainders[0] contains the string '1' and the remainder is also the string '1', Opera evaluates (remainders[0] === remainder) as false.
I see from my previous post on this project that I've been working on it for over three months now. I had no idea it would take so long. (That can be properly translated into, “I had no idea how ignorant I am!”)
A major source of complication has been my decision to let people enter values in “natural” ways. That, to me, means that the code should be able to handle real, rational, mixed, binary, and hexadecimal representations of values, have the code figure out which is which, and to generate equivalent decimal, binary, and IEEE-754 representations of whatever value the user enters. Regular expressions make the task of recognizing the input format pretty straight forward. (There are radio button to force a particular interpretation in cases where the same input string is ambiguous.) The problems so far have come from the need to translate between decimal and binary values while maintaining precision that exceeds that of the floating-point standard so that final results, after rounding, are accurate.
Herewith, some lessons learned so far and some notes to myself.