Jeff Duntemann's Contrapositive Diary Rotating Header Image

pascal

Odd Lots

The Last of the 5″ Floppies

TP3Floppy325Wide.jpgThe AC works again, though now that it does, the hot spell has broken and we don’t really need it. (Love that 72 degree stuff!) However, Carol and I have some cleanup to do, as the air handler made a honking puddle on the furnace room floor downstairs, soaking the bottoms of a number of boxes. Some of those contained Christmas stuff, including my old Lionel trains. More intriguing, another, smaller, box contained a stash of 5 1/4″ floppies from the late 1980s and early 1990s. I went through it to see if there were any old backups to be destroyed (there were none) but the commercial software lineup in the box is pretty impressive:

  • Turbo Pascal 2.0 (includig Turbo 87), 3.0, 4.0, 5.0, and 5.5
  • Turbo Pascal for Windows
  • Mystic Pascal
  • QuickPascal 1.0
  • TopSpeed Modula 2
  • TopSpeed C
  • Stony Brook Modula 2
  • Smalltalk/V286
  • Turbo Basic
  • Quick C
  • Reflex 1.0 and 2.0
  • Turbo Lightning
  • Paradox 2
  • WordStar 3.02
  • MS Word 6.0

…and lots of additional stuff from Borland and other companies, most long gone. Falk Data Systems; Software Science, Inc; Digitalk; Adapta Software, and on and on and on.

The box is toast, and I’m thinking that most or all of the disks have long since become unreadable. Still, it would be interesting to see how true that is. I checked my Paradox 4.0 3 1/2″ floppies from 1993 just now and they still read, so I suppose it’s possible. Alas, I haven’t had a 5 1/4″ floppy drive in the house in years. I’ll be going up to OEM Parts later this week to gather a few things to replenish my parts drawers, and I’ll bet they have a drive on the greasy old crap table. I’ve even got a working machine in the to-be-recycled pile with an open front bay to put it in.

I know, I know–bad use of my time. But at very least I’m going to rejoin the Turbo Pascal 2.0, 3.0, and 4.0 floppies with the manuals, which are still on the top here in my office. I’m sure I can part with the rest. Those, well…in a very real sense they helped pay for the house we’re now living in, so I’ll add them to my memoirs archive. And just in case they do read…I can bring up a DOS VM in ninety seconds flat!

Odd Lots

  • Strahinja Markovic, the chap who created the very good Sigil epub editor while he was a CS undergrad, now has a master’s, a good job, and…a life. (How dare he? ) In a recent blog post, he’s asked for prospective maintainers of the code (which is open source) to introduce themselves and make a case to him as to why they should be trusted to carry on the work. He doesn’t know me; I’m just spreading the word, because I use Sigil and I want it to continue to evolve.
  • We have the same problem with the Kompozer WYSIWYG HTML editor; poor Fabien “Kaz” Cazenave has a new job and very little time to devote to the product. I like Kompozer but it has some rough spots, and I hope someone will take over and keep the wheels turning.
  • In the meantime, I’ve installed and am testing BlueGriffon, and so far I like what I see. The editor incorporates the Gecko rendering engine used in Firefox 4, so if it looks good in BlueGriffon it’ll look good in Firefox. It has HTML5 and CSS3 capability, and an interesting business model: The editor is free, and the developer sells various add-ons. That doesn’t bother me at all; the whole suite of 9 add-ons can currently be had for $35 Euros, or about $50US. If BlueGriffon performs well on my existing Web documents, I’d pay that like a shot, even if I don’t use the add-ons.
  • As brilliant as the original Turbo Pascal was, it wasn’t alone. From Andrew Stuart comes a link to the deep history of Nick Gammon’s G-Pascal, an enviable piece of assembly-coding work that put a potent Pascal compiler for the Commodore 64 in…16K. If you used G-Pascal back in the 80s, this is a must-see, especially the links at the end, to the sorts of ads and programming newsletters that were the lifeblood of personal programming in the early 80s.
  • I don’t know if you’ve ever needed an 18″ USB A-B cable, but I did, and after a great deal of looking around, I finally found them at Other World Computing. It’s mostly a Mac shop, but has the short A-B cables for both USB 2 and USB 3. The cable connects the USB hub on my Dell 20″ monitor to the GX620 USFF machine mounted immediately behind it, and keeps cable clutter down behind the monitor.
  • Little things sometimes matter: The Toshiba Thrive has a full-sized SD card slot. Not micro. This means that I can use the SD cards I already have. A mini-USB adapter will also allow me to use my existing thumb drives. Ports and card slots have been the deal-killer so far on tablet after tablet. This one (though it won’t be in stores until July) still has an edge. (Bill Roper reminded me that I needed to post about this.)
  • From Smithsonian comes a long and detailed article on what amounts to beer archaeology. (Thanks to Rich Rostrom for the link.)
  • For those who asked: Simple Simon’s formal name (from my entry for June 26) is Factory Automation Real-Time Supervisor, and yes, the acronym was highly deliberate. His robotic factory is the Automated Reprographic Fabrication Facility, and (as you’ll learn in the novel) the project had always been a dog.
  • WUTZ 4 DINR?

Odd Lots

Odd Lots

  • Several people have asked why I didn’t post any photos from the big 4-day dog show in Denver, and I must admit (with profound annoyance) that my camera bag vanished sometime on Monday, and both of my digital cameras were in it. That’s a Canon G10 and a Nikon CoolPix S630, and with the biggish SD cards I put in them, it’s close to a $1000 loss. Neither the hotel nor the National Western Complex recovered the bag, so I can only assume it was stolen during the show, and with it went all the photos we took through Sunday night.
  • Slashdot reports that 80% of all software exploits during the fourth quarter of 2009 were malicious PDF documents. I’ve been a Foxit user for some time, but as Foxit becomes more popular, the bad guys will begin exploiting its flaws as well. (There is evidence that this has already happened.) It may be time to test software like Evince and Sumatra, both of which are available for Linux and Windows.
  • As I write this, you have eight hours to bid on the Compaq II machine that Anders Hejlsberg used to develop Turbo Pascal 4.0. The proceeds from the auction go to the Clinton Bush Haiti Fund. It’s one of those green-screen luggable that I always admired, but bidding is currently at $2025, yikes. (Thanks to the many who pointed this out, with Larry O’Brien being the first.)
  • Something confirming a phenomenon that I’ve noticed: Food expiration dates are conservative, and most food is good for a reasonable period after they supposedly time out. Still, after expiry, your nose is your stomach’s best friend.
  • For whatever it’s worth, here’s a list of the top-grossing movies of all time, with inflation-adjusted values. (Thanks to Frank Glover for the link.) Unsurprisingly, Gone With the Wind still beats all comers with a mind-boggling 1.5 billion dollars, the though the original Star Wars is right behind it at $1.3B. What’s worth noting is that all but six films in the top 14 were either Disney animation or special-effects extravaganzas. (It’s all but five if you think the opticals in The Ten Commandments were significant, as I do.) Lesson: We don’t go to the movies to watch unpleasant people screaming at one another.
  • Also from Frank comes a pointer to a short item suggesting that we kiss to enforce reproductive monogamy by developing immunities to one another’s specific viruses. I’m not sure I buy it either, but evolution has done far weirder things than this.

Daywander

Not having much luck making Workstation 6 function, and two conversations and numerous emails with VMWare’s tech support people hasn’t helped. I install the product, I enter the serial number as requested, and get this error message. Has anybody else ever seen this? Or can anybody even explain it? I emailed the screenshot to VMWare, and that’s about the time they clammed up.

I hate to abandon Workstation entirely. VMWare’s snapshot system is far superior to that of VirtualBox, and I use it a lot. I’ll miss it. Boy.

And while I’m asking peculiar things, let me ask the multitudes here how you pronounce “iodine.” I have always said eye-oh-dyne, but Bob Thompson, who knows more than a little about chemistry (and certainly more than I) pronounces it eye-oh-deen. This lines up with the rest of the halogens; we don’t, after all, say “broh-myne.” So? Which is it?

I edited another half a chapter of FreePascal From Square One yesterday morning, and in laying out the edited material got up to page 136. The book I’m adapting it from is 800 pages long, but don’t look for anything that size. To be workable on Lulu, the book is going to have to stop at or before page 400. A lot of the material in Borland Pascal 7 From Square One just doesn’t apply anymore…who’s called the Borland Graphics Interface lately, or done text output by poking word values into the video display buffer? The BGI chapter was 100 pages all by itself, and when I slice out that and other things like overlays and DOS/BIOS calls, I’m really pulling 400 pages out of no more than 600 pages of useful material, maybe less. Should be done by June. I hope.

The issue of whether Amazon imposes DRM on Kindle publishers is complicated, and I’ll back away some from my statement to that effect on Monday, and will hold off until I try to get one of my own titles into the system. This article suggests that recent policy changes have made DRM optional. Having to face the DRM issue square-on has kept me putting off publishing on the Kindle for some time. As a very small publisher I’ve made this promise to my readers: No DRM of any kind, on anything, ever. I’m willing to forgo Kindle sales if the DRM decision is not my own, but from what I’m reading now, I think that won’t be the case.

As for Amazon caving, well, that’s more complex too. I see that Nancy Kress’s new book Steal Across the Sky is listed on the Amazon Web store, and her publisher, Tor, is one of Macmillan’s imprints. However, you can’t order it from Amazon at this time. (Third-party affiliates are offering it, but Amazon itself is not. Note the double dashes under “Amazon Price.”) Ditto Nancy’s Beggars and Choosers, another Tor book. Yesterday morning’s Wall Street Journal had a story explicitly stating that Amazon had conceded the price issue to Macmillan. But Amazon isn’t selling the books yet, so clearly the struggle goes on.

Off to church, to install an SX270 in place of a doddering old E-Machines box that is four times the size and probably a third the capability.

VMWare Player and the Thoughtpolice Images

Quick non-rant update to yesterday’s rant: It’s Sunday night and I didn’t expect to hear from VMWare support today, so I did a little thinking and came up with a crazy idea: What if somebody else has already created VMWare images of popular Linux distros and just put them out there?

Heh. Somebody did. And even though I can’t install Linux (or anything else) in a brand-new VM, I googled around and found a page offering a whole bunch of Linux-in-a-VM images, all freely downloadable. They’re big (most of them over a gigabyte) but there are torrents for them and they came down fast. I downloaded Fedora Core 12 and OpenSuSE 11.2. What I didn’t mention yesterday is that when you install VMWare Workstation, you also install the standalone VMWare Player, which is a stripped-down run-only version of Workstation. The version of Player that installed with Workstation was not bound by the Workstation license, and worked.

The Fedora Core 12 image loaded and ran flawlessly. The OpenSuSE image did not load at all. I don’t think it was a damaged zip file; the message put up by Player indicated that “opensuse is not supported.” Smelled like an “old software” problem to me. My copy of Workstation dates back to 2007 and installs Player V2, so I downloaded the most recent version of Player (3.0) and installed it. This time the OpenSuse image loaded right up, albeit in KDE 4. (That’s OK; I need to spend some time exploring KDE 4.) Lesson: In the VM world, the latest is probably the greatest…or at least worth having.

I installed Lazarus in the Fedora image, and if you’re logged in as root, it really is as simple as:

yum install lazarus

(Use su -c 'yum install lazarus' if you’re not in root.) Took about 25 minutes. I haven’t run a lot of tests on the new install, but the source is there and everything looks functional.

Several people wrote to recommend the alien utility for converting rpm packages to debs. I’m going to try that, and (assuming the generated deb works) I’ll just host the deb on my upcoming FreePascal page so people can download it. (Why don’t I think it will be quite as easy as that?)

Another crazy idea: Once I get my Workstation 6 running, create a VM of Ubuntu with Lazarus installed, however it is to be done. At that point, who needs to install anything? I’ll just tell people to download the VM and run it in Player. I can set up the VM to save state with Lazarus running and the book itself open in Okular, with all the example programs in appropriate directories, ready to load and poke at.

I’m still annoyed at VMWare, but at least they’re not holding up my research any longer.

Rant: That Old Linux Package Format Blues

I described my FreePascal from Square One book project in detail a couple of weeks ago, and I work on it as time allows. There have been some hangups; in fact, I sometimes wonder if I’m not Cing evil spirits at work hereabouts, frustrating my efforts to popularize Pascal.

A lot of this has to do with Linux software package formats. I’m trying to write a chapter in a beginners’ book describing how to install the FreePascal/Lazarus compiler/IDE combo. For Windows it’s easy: Download the executable installer, run it, and answer the wizard’s questions. I ran into a stone will with Ubuntu: There is a deb package for Lazarus (which includes the FreePascal compiler binaries) but it’s ancient, and much worse, it does not install the compiler source code, which Lazarus needs. Now, why an IDE needs the source code for its compiler is obscure, but that’s how they wrote it, and when you run Lazarus in the absence of FreePascal’s source code, it complains, and warns that some (unspecified) subset of its features may not work.

The rpm package, on the other hand, is current and complete. In the installation chapter I’d like to describe installation in detail for Windows and the three most popular Linux distros: Ubuntu, Fedora Core, and OpenSuSE. Fedora and OpenSuSE use RPMs. No problem there. Installing Lazarus under Fedora may in fact be as simple as opening a console and typing “yum install lazarus.” (I haven’t tried that yet; more on why a little later.) YaST has OpenSuSE covered. But with the Linux market leader, I’m hosed.

Yes, I know, there are solutions: Get the tarballs from the Web site, build the whole damned thing from source, convert from rpm to deb with Alien, etc. etc. etc. I can do that stuff. But this isn’t about or for me. It’s for people who are just starting in on programming and may be just trying out Linux. I don’t want to explain how to frakking rebuild the whole damned 200 MB monstrosity from source code. (Wasn’t CP/M Turbo Pascal happy to take up 24 KB? Does anybody even remember that old letter “K”?) All that is beside the point. The real question is this: Why can’t the FreePascal/Lazarus guys keep a workable deb package together? I know enough about Debian package management to be sure that it’s possible. (I don’t knows enough, alas, to do it myself.) It isn’t being done. And nobody seems to want to talk about why.

Not having a complete install for Ubuntu made me uneasy about running tests in Lazarus under Ubuntu, so I realized I would have to get instances of Fedora Core and OpenSuSE together. How hard could that be? Well…

  • I created a new VM in Workstation 5 for Fedora Core 12. The install failed partway through, with the VM locked up. “He dies and gives no sign.”
  • Ditto a VM for OpenSuSE. Ditto. The YaST installer could not detect the virtual hard drive created for the VM, so we didn’t even get as far as installation.
  • I reformatted an old Kubuntu partition on a machine downstairs and attempted to install Fedora on it. Different fail, but fail nonetheless. The DVD vetted itself with a clear bill of health, but I may download it again anyway.

I managed to get OpenSuSE to install on that same partition, so I finally have a complete and trustworthy Linux installation of Lazarus. And I will say that I really like OpenSuSE. (This is the first time I’ve ever laid hands on it.) The OpenSuSE Build Service is a thing of beauty.

The double VM fail is a puzzler. And that led to me wonder if newer distros just don’t play well with 2004-era Workstation 5. So I finally took my still-sealed retail copy of Workstation 6 off the shelf, installed it, registered it…and VMware doesn’t seem to know how to license it. I’m sure they don’t do much business in boxed product, but that’s no excuse. Email tech support with their Indian support people has a 24-hour turnaround, and the last time I got a response, the guy sent me the serial number for my copy of Workstation 5 and told me to use that, as it was already licensed. Gakkh. So they have my $180, and I have a copy of Workstation 6 that won’t run. We’re three days into this adventure, and I’m sure nothing will get resolved until Monday. If then.

You wonder why I hate activation systems so violently.

And people wonder why tech books take so long to write.

Screw it. It’s the weekend. I’m going to find the nearest bag of potato chips and eat the whole damned thing.

FreePascal (And Lazarus) From Square One

About two years ago I started piecing together a book on FreePascal based on my 1992 Bantam book, Borland Pascal 7 From Square One. I set the project aside in part because I needed to get my assembly book updated and back into print–something that took most of a year and all of the personal energy I could summon. But there was another problem: The text-mode IDE included with FreePascal is erratic in the extreme, and crashed constantly on me, especially under Windows. I had hoped that there was an easy fix, but apparently not. I installed the new 2.4.0 release of FreePascal yesterday, and the IDE hasn’t changed a bit. Try to set the text display resolution to anything at all (25 X 80, 43 X 80, whatever) and it crashes. One wonders why the damned thing is still there.

I’ve been following the Lazarus project since it had been the Megido project, back in 1998. The idea was to create an open-source alternative to Delphi, by writing a GUI front end for FreePascal. It’s possible to create ordinary console apps in FreePascal using Lazarus as the IDE, but I hesitated to use Lazarus as the example IDE in the book because it’s only available for Windows, Linux, and FreeBSD. (There’s a Mac port, but I’ve heard it’s less complete and much less robust than the others.)

Pascal and VDM readers, feel the irony: Jeff Duntemann hanging back from a RAD environment because he’d hoped to have a more broadbly applicable (read here: portable) book. Wow.

Heh. I changed my mind. I’ll have to go back to the beginning and pull out all the references and screenshots involving the text-mode IDE, but Lazarus is a much better IDE, even if you’re not actually doing any RAD work….yet.

“Yet” is key. If this first book works out, I hope to adapt some of my material from The Delphi 2 Programming Explorer into an intro book for Lazarus as a RAD tool. So getting readers familiar with the editing and project management machinery built into Lazarus is a good thing, even if the bulk of the app goes to waste while people learn the fundamentals of Pascal.

I’m going to try something new with this book. I’m going to pull a Cory Doctorow and give away the complete PDF version for free, and sell the printed version on Lulu. The book will be yet another descendant of Complete Turbo Pascal (in fact, it will in essence be the 25th Anniversary Edition!) and I’ve been paid for the work many times over. So I won’t be losing much by giving it away, and I’m very curious to see how many paid print sales I’ll make based on a free ebook.

Most of the work lies in the early chapters, where I introduce people to the Lazarus RAD environment. After that, well, it’s all basic Pascal, and while Delphi has extended Pascal fantastically in the last fifteen years, CASE statements are still CASE statements.

Unlike my earlier books, I intend to post regular PDFs of the work in progress, so you can follow the project as it happens. (There’s a 2008-era PDF out there now, and you can get it from my FTP area using HTTP.) I’ll post an updated PDF as soon as I untangle all the existing references to the text-mode IDE. Watch this space for more details.