Jeff Duntemann's Contrapositive Diary Rotating Header Image

pascal

Odd Lots

  • I had some fairly sophisticated oral microsurgery about ten days ago, and it kind of took the wind out of me. That’s why you’re getting two Odd Lots in a row. I have things to write about long-form but have only recently found the energy to write at all. Promise to get a couple of things out in the next week.
  • Some researchers at UW Madison are suggesting that sleep may exist to help us forget; that is, to trim unnecessary neural connections in order to improve the signal-to-noise ratio in the brain. Fair enough. What I really want to know (and am currently researching) is why the hell we dream. I doubt the answer to that is quite so simple.
  • Ultibo is a fork of FreePascal/Lazarus that creates custom kernel.img files for the Raspberry Pi, allowing direct boot into an embedded application without requiring an underlying OS. I haven’t tried it yet (still waiting on delivery of a few parts for a new RPi 3 setup) but it sounds terrific. Bare metal Pascal? Whoda thunkit?
  • Humana just announced that it is leaving the ACA exchanges after 2017. As I understand it, that will leave a fair number of counties (and some major cities) with no health insurance carriers at all. Zip. Zero. Obamacare, it seems, is in the process of repealing itself.
  • NaNoWriMo has gone all political and shat itself bigtime. You know my opinions of such things: Politics is filth. A number of us are talking about an alternate event held on a different month. November is a horrible month for writing 50,000 words, because Thanksgiving. I’m pushing March, which is good for almost nothing other than containing St. Patrick’s Day. (Thanks to Tom Knighton for the link.)
  • Paris has been gripped by rioting since February 2…and the US media simply refuses to cover it, most likely fearing that it will distract people from the Flynn resignation. Forget fake news. We have fake media.
  • I heard from a DC resident that there was also a smallish riot in Washington DC today, and so far have seen no media coverage on it at all.
  • Cold weather in Italy and Spain have caused vegetable shortages in the UK. Millions of small children who would supposedly never know what snow looked like may now never know what kale looks like. Sounds like a good trade to me.
  • Trader Joe’s now sells a $5 zinfandel in its house Coastal brand, and it’s actually pretty decent. Good nose, strong fruit. Seems a touch thin somehow, but still well worth the price.
  • I don’t know if you’ve ever seen Gahan Wilson’s cartoons in Playboy and National Lampoon, but Pete Albrecht sent me a link to an interview with Wilson that explains why he did certain things the way he did, like his brilliant series called “Nuts” about how the world looks and feels to small children.

Daywander

Drilling U-Channel - 500 Wide.jpg

There’s been an unexpected irruption of normalcy here, while we sail upon the whine-dark seas of modern American life. (I’ve been wanting to use the word “irruption” here, correctly, for some time.) What this means is that I’ve been able to do some of what I want to do, and not merely what my do-it list tells me I have to do. It won’t last, but while it does I’m going to make the most of it.

A number of people have suggested that I write a few short novels to get the size of my list up a little. I wrote Drumlin Circus (53,000 words) in only six weeks, after all. But as I recall, those were very full weeks. So a month or so ago I got an idea for a new short novel, and I’m glad to say I now have 6,300 words down on it; figure 12% or so. It’s whimsical, and whether or not it’s fantasy depends heavily on whether you believe that the collective unconscious is real or not. I’d like to bring it in at between 50,000 and 60,000 words, so don’t expect all-new built-from-scratch universes a la The Cunning Blood. However, I do promise a trademark Jeff Duntemann mayhem-filled action climax.

And a dream repairman. I mean that: A guy who drops into your nightmares and hands you your pants while he gives you directions to calculus class. People who have nightmares love him. The nightmares, well, not so much.

My old writer friend Jim Strickland and I are going to attempt something interesting to keep our productivity up: a chapter challenge. Starting February 1, we’re going to dare each other to get a certain amount of story down in a week, and then exchange that’s week’s worth of story for some quick critique. He’s working on the sequel to Brass & Steel: Inferno and needs a gentle noodge. I need one too, though sometimes what I really need is a two-boot noodge right in the glutes. Neither of us has ever done anything quite like this before. I’ll post reports here as things happen.

Even the do-it list has yielded some things that are actually fun, including a bit of metalwork to make an aluminum grating for my particle board shelves to rest on out in the pool shed (against the several times a year when a hard rain gets under the door and soaks the floor) and mounting some Elfa hardware on the opposite shed wall.

Drilling three 8′ pieces of U-channel for the grate took a little finesse in my slightly cramped workshop. The drill press is where it is (close to the center of the space) for a reason. (See the photo at the top of this entry.) The next major project (as time allows) is getting a solid ground for my station and antennas. I have an 8′ ground rod. I need some bentonite, and a post hole digger. After that, le RF deluge…

Dipping Back Into Delphi with List & Label 22

I haven’t done a lot of programming for the last couple of years, and I miss it. Interstate moves and oxygen starvation will do that to you. I’ve converted some of my old Delphi apps to Lazarus, which in truth wasn’t hard and probably can’t be called programming with a straight face. And I have a project that I need to get back to, even if it has to be written in Delphi 7, which is the most recent version that I have. (Turbo Delphi doesn’t count.) I no longer had a publishing company after Delphi 7 appeared, so post-2002 I dropped off their reviewers list. And $1,400 is a little steep for hobby programming–much less $4700 on the high end.

For some years I’ve been poking at the concept of a personal medical database. I’m old now (how did that happen??!?) and I take pills and get bloodwork and monitor various things to make sure none of my component parts are rusting out. I have Word documents full of notes, and scribbles on paper calendars, all of which really need to be pulled together into one searchable and reportable database. Some doctors won’t believe that my blood pressure does not respond to sodium. I have proof. I’ll bet, furthermore, that it will be a lot more convincing if it’s placed in their hands as a professional-looking report.

All of what I’ve done so far has been in Lazarus, and most of that has been small proof-of-concept lashups, none of them newer than 2012. However, a marvelous report generator product has crossed my desk, and I want to give it a shot with my medbase app. The product is List & Label 22, from Combit, a small firm in southern Germany. It has God’s own kitchen sink of features, many of them related to Web programming, which I simply don’t do. However, it has all conventional reporting options I’ve ever heard of well-covered, and it supports all versions of Delphi back to D6. (It supports Visual Studio and many other dev platforms as well.)

It doesn’t support Lazarus, alas. So I’ll be trying it out in D7.

The big win (for me at least) is that L&L 22 provides a report designer in VCL component format that drops on a form and becomes part of your application. This allows end users to design their own reports. Given that my end user is me, I don’t have to worry about end users doing gonzo things. I’ve always liked my software to exist as One Big Chunk (DLL hell, and all that) so this is right up my alley.

I don’t yet know precisely what reports I’ll want, and it may be the case that I won’t know until I actually need one for a specific purpose, like laying out my data indicating that salt is irrelevant to my blood pressure. Having a report designer right there in the app means that I can design the report that I need when I need it, and not try to anticipate every damn thing I’ll ever want while I’m building the program itself.

I should make it very clear here that I don’t dislike modern Delphi. I still love it, but it’s gotten enormously expensive, and the Starter Edition does not include database programming features. My other reason for using Lazarus is that I still intend to write intro-to-programming books using Pascal as the teaching language. Expecting students to pay even $250 for the Delphi Starter Edition is asking a lot, and worse, I intend to teach database work as well as conventional programming.

I’ll have more to say about List & Label as I learn it. Ditto the medical database itself, which is now a set of tables full of test data and a couple of conceptual UIs. Stay tuned.

Odd Lots

Odd Lots

What Coding Starvation Does to You

I haven’t done any programming in so long I’m starting to hallucinate. Here is today’s hallucination. Lor’ help me, I would have written the whole thing if I hadn’t already read somewhere that counting syllables in arbitrary words is hard.

Open Dictionary text file; 
Create new output text file;

WHILE NOT EOF(Dictionary) DO
BEGIN
REPEAT
Readln(Dictionary,WordEntry)
UNTIL WordIsNoun(WordEntry);
ParseOutWord(WordEntry,WordItself);
If CountSyllables(WordItself) = 1 THEN
BEGIN
Capitalize(WordItself);
Writeln(OutputFile, WordItself+'y Mc'+
WordItself+'face')
END
END;

Close dictionary file;
Close output file;

By Request: A 30-Year-Old Manuscript Page

Whew. Took another 30-odd pounds of paper up 14 feet of stairs and out to the garage, and I’m catching my breath again. This is turning out to be weight training with a vengeance.

Anyway. Reader Vince asked (in the comments under my entry of April 14, 2016) if I could post a page from the manuscript of my 1986 book, Complete Turbo Pascal, Second Edition, which turned up while purging the collection in our furnace room. I chose a page at random just now, slapped it on the scanner, and there you go. It’s mostly readable, even at 500 pixels wide, because it was good-quality output from my first laser printer. The page number means nothing. Each chapter was its own file, with page numbers starting from 1.

Keep in mind that this was a book focused on the IBM PC and (egad) Z80 CP/M. In other words, this was a book about getting things done. I acknowledged the pure spirit of completely portable Pascal–and then dynamited it into the next county.

It’s interesting to me, as a writer, how the conventions for writing book-length nonfiction have changed in the last 30 years. When I wrote my chapters for Learning Computer Architecture with the Raspberry Pi two or three years ago, we agreed to work in a common word processor format (.docx) using comments, and applying paragraph and header styles to the text as we went. The chapters looked like printed book pages even while they were being written. Thirty years ago, we wrote in whatever word processor we wanted, and then sent a huge big pile of paper to the publisher. I don’t think I sent actual files to a publisher until the first edition of my assembly book in 1989–and I sent the files on 5″ floppy disks through the mail after sending that big pile of paper!

By the way, my Raspberry Pi book is still a live project, and I sent back my second chapter of six yesterday after author review of copyedits. Beyond that, I can’t tell you much, especially when I think it might actually hit print.

Ahh. Breathing normally again. Time to lug another boxful out to the garage.

Flickr : , ,

Odd Lots

  • Lazarus 1.6 has been released. It was built with FreePascal 3.0.0, a first for Lazarus. Mostly incremental changes, but there’s a new rev of the docked form editor that looks promising, even though it’s not quite stable yet. Wish I had more time to play with it!
  • Older versions of Lazarus have run well on the Raspberry Pi for me. However, installation on the newer Raspberry Pi 2 is much trickier. This installation tutorial is almost a year old, and I haven’t yet installed Lazarus 1.4 or 1.6 on my Pi 2, but it’s the best how-to I’ve yet seen.
  • From Glenn Reynolds: Indie author Chris Nuttall lays out his journey as an indie, emphasizing that all but the biggest names are being driven to indie by publishers who simply don’t understand which way the wind is blowing. Read The Whole Thing, as Glenn says.
  • Back when I reviewed the Baofeng handhelds, there was some discussion in the comments about the RDA-1846S SDR chip. Gary Frerking pointed me to the HamShield project on Kickstarter, which is an Arduino add-on board (a shield, in their jargon) that uses the RDA-1846S to transceive on 2M, 220 MHz, and 450 MHz. Like the Baofeng radios, HamShield will also operate on FRS, MURS, and GMRS, though the group doesn’t say that explicitly. (This is an SDR, after all.) It’s not shipping yet, but they’ve raised a fair amount of money (well over $100,000) and appear to be making progress. Definitely one to watch.
  • Cool radio stuff is in the wind these days. One of Esther Schindler’s Facebook posts led me to Beartooth, which is an SDR roughly similar to HamShield built into a smartphone battery case that snaps onto the back of your phone. Unlike HamShield, beartooth is going for FCC type acceptance and will operate on MURS. However, there’s been no activity on their Web site since mid-December and I wonder if they’re still in business. It’s not an easy hack; see this discussion from midlate 2014.
  • Oh, and I remembered GoTenna, which is similar to Beartooth except that it’s limited to texts and geolocation data. (That is, no voice.) It’s a Bluetooth-powered stick that hangs on your belt and uses your smartphone as a UI, basically, and allows you to text your hiking buddies while you’re out beyond the range of cell networks. I guess that makes it a sort of HT…a Hikey-Textie. Unlike HamShield and Beartooth, GoTenna is shipping and you can get two for $300.
  • Twitter continues to kill itself slowly by shadowbanning users for political reasons. What the hell is in it for them? When they collapse, something else will appear to take their place. They’re a tool. (Take it any or every way you want.) When a tool breaks, I get another tool, and generally a better one.
  • In case you’ve never heard of shadowbanning
  • I stumbled on something called Roblox, which is evidently a high(er) res take on the Minecraft concept. It’s looking more and more like what I was thinking about when I wrote my “RAD Mars” piece for the last issue of Visual Developer Magazine in late 1999. Anybody here use it? Any reactions?
  • Slowly but steadily, reviews are coming in on my Kindle ebooks. Here’s one that I particularly liked.
  • The Obamacare exchange in Colorado “smelled wrong,” so Carol and I avoided it. We were right. (Thanks to Sarah Hoyt for the link.)
  • I don’t care how many tablets and smartphones you have. Paper is not dead.

Odd Lots

Odd Lots