…and I was a good one, too, patching up a bunch of gaping holes in JDK 1.4:
/**
* This class kludges around the RMI serialization limit of 64Kb in
* DataOutputStream.java by breaking long strings into palatable
* chunks.
*
* @author Alec Muffett
* @version 1.23, 00/10/18
* @since Bruce1.0
*/
public final class RMIStringWrapper
implements Serializable
…and doing in-app optimisation:
/**
* This is a class which maintains a static and shared cache of random
* number generators of specified algorithms, to reduce instantiation
* overhead.
*
* @author Alec Muffett
* @version 1.17, 00/05/11
* @since Bruce1.0
*/
public final class PRNGCache
{
…and adding bunches of functionality that nobody had bothered to add at that point:
/**
* Class to implement extended csh-like fileglob pattern matching.
* The FileGlob class implements the following syntax:
*
* * - zero or more instances of any character.
* ? - any single character.
* [A-Z] - any character in the range A thru Z inclusive.
* [^A-Z] - any character NOT in the range A thru Z inclusive.
* foo{bar,baz} - matches "foobar" and "foobaz".
* foo{,bar,baz} - matches "foo" and "foobar" and "foobaz".
* foo{,bar,b?z} - matches "foo" and "foobar" and "foob?z",
* where the "?" matches any single character, etc.
* foo{bar,baz{1,2,3,[7-9]}} - works as expected, etc.
*
* Backslashes are used to escape metacharacters; care should be used
* when embedding backslashes in Java code strings:
*
* fg = new FileGlob("\\*"); // need double "\" to embed one "\"
*
* The pattern compiler does no optimisation; it is expected that the
* programmer realises that:
*
* foo{bar,baz{1,2,3,[7-9]}}
*
* is more simply written (and more quickly matched) as:
*
* foo{bar,baz[1237-9]}
*
* @author Alec Muffett
* @version 1.16, 00/10/03
* @since Bruce1.0
*/
public final class FileGlob {
…not to mention beating-up the Java dev team about not being able to upclass a listening socket from an inetd stdin FileDescriptor into a ServerSocket – they got back to me about that four years later, I ignored them – and probably best of all was PSTRMISocketFactory.java – a factory you could just throw into RMI and which would manage intra-TCP per-socket authentication using a pluggable stack a-la PAM.
Bruce was a great project. We had a great team:
$ grep @author */*.java | sed -e 's/.*author *//g' | sort -u
Alec Muffett
Casper Dik
Keith Watson
Sandeep Kumar
…and Dave Leftwich and Diego Zamboni (at least) are missing from that list. We even had Sun’s first-ever open-source license. We also had the second one, when the first one sank for being inadequately free. I fought both of those battles, and the crypto-export control ones too.
Bruce was a good project. It’s a pity we fumbled it.
But now I have a new project. Or two, and one of them has already been prototyped.
$ java HelloWorldApp
Hello World!
Time to dust off those mad skillz 🙂
Leave a Reply