Computers: April 2001 Archives
Then we find that perl does not completely implement sprintf, and that it leaves the e/f/g formats for the local sprintf to handle. And there is at least one bug in SFIO's sprintf implementation, and maybe two (that is, it rounds 0.9 down to 0 for %0.f, and it pads %010g with spaces to the left, instead of 0s). One or both of these may have been fixed in more recent SFIOs.
I also added some Makefile instructions to install the libs in :lib:macos: into :lib:, simplifying a few things. Yay.
I am going to start the tests over from scratch, as I found out some interesting things. First, "@INC = '../lib'" works fine in MacPerl 5.6.1. Is this good or bad? I dunno, but for now I'll keep it, as it means far fewer patches to the test suite. Now that (as noted in the previous paragraph) Config.pm is in ::lib, we won't need to include ::macos:lib. Nifty.
I also found out that $ENV{MACPERL} and $ENV{PERL5LIB} were sometimes interfering with my test paths. Ack. So part of the test procedure would be to un-set those (under MPW).
Really, most of these tests need to be done under MPW. Oh well.
We then end up with a big ol' pretty color-coded page of test results, so we can easily see where the problems are. Most of the problems with the tests will be with the tests themselves, but some will certainly help us find brokenness in MacPerl.
I want to get a lot of testing done in the next few weeks, and then I will have a much better idea of how close we are. I know there are some significant problems with the app, and there are surely lots of little problems with the Mac:: modules. But we are moving forward.
See http://macperl.sourceforge.net/ for more information about MacPerl development and for reporting test results.
If you care, I posted the code I used to grab the journal entries, in the journal entry previous to this one. I copied over 31 entries, mostly a journal of MacPerl development since I took over the project in January 2001. I will continue to keep the development journal, but will do it over here, instead.
use strict;
use LWP::Simple;
use Slash::DB;
use Slash::Utility;
createEnvironment('useperl');
my $url = 'http://sourceforge.net/developer/diary.php?diary_user=3660&diary_id=';
my @ids = qw(2477 2418 2356 2312 2261 2244 2152 2126 2082 1952 1936
1857 1848 1777 1753 1738 1724 1643 1637 1542 1536 1527 1488
1461 1427 1394 1384 1318 1297 1282 1272);
my $slashdb = getCurrentDB();
for (@ids) {
my($date, $subj, $body);
$_ = get($url . $_);
s/\015//g;
m|<TD colspan=2><TR><TD COLSPAN=2><B>Date:</B> (.+?)<BR>|s;
$date = $1;
m|<B>Subject:</B> (.+?)<P>|s;
$subj = $1;
m|<B>Body:</B><BR>(.+?)</TD></TR>|s;
($body = $1) =~ s/<br>\n<br>\n/\n\n/g;
$body =~ s/<br>\n//g;
for ($date, $subj, $body) {
s/^\s+//;
s/\s+$//;
}
$slashdb->sqlInsert('journals', {
uid => 1,
description => $subj,
date => $date,
posttype => 1,
});
my($id) = $slashdb->sqlSelect('LAST_INSERT_ID()');
$slashdb->sqlInsert('journals_text', {
id => $id,
article => strip_plaintext($body),
});
print "Inserted $id\n";
}
__END__
I also added a $MacPerl::Compiler variable, which is figured out dynamically in the source. I wanted to just add it to Config.pm, but am not sure how I can. I suppose one way might be to store it in a resource, but that would be a pain. I also want GUSI_VERSION stored somewhere (once Matthias adds it to GUSI), but that will be easier, since you can just set it at build time somewhere; with the Compiler variable, you have to be somewhat dynamic, since it can change for 68K/PPC. I'll have to think on it some more; ideas welcome, as always.
I am thankful for everyone's work, including Alan and Paul and Peter and more, but the last couple of weeks Thomas Wegner has contributed a lot, including ports of File::Glob and File::Find. Outstanding.
I've also tagged it all (except for perl/macos/) as "foolperl", as the code I used is all in a release by Sarathy on Sunday.
My plan moving forward is to keep CVS synched with the "maint-5.6/perl" branch in the main Perl perforce repository, and then to tag it when there are actual releases. So you should be able to rely on the CVS perl/ stuff as being fairly recent. I'll probably synch it with the most recent stuff later tonight.
When we go to perl 5.[78].0, I may branch, or I may just redo this all again, deleting old files, adding new, and updating others. I'll cross that bridge when I come to it.