Jeff Duntemann's Contrapositive Diary Rotating Header Image

pascal

Odd Lots

  • Lazarus 1.8.4 has been released. Bug-fix release but still worth having. Go get it!
  • From the Questions-I-Never-Thought-to-Ask Department: How was sheet music written after quill pens but before computers? With a music typewriter, of course.
  • How to become a morning person. Yes, there are benefits. The larger question of whether circadian orientation is born or made remains unanswered. Carol and I both lived at home during college. We’re both morning people. My sister and I had the same parents, grew up in the same house and obeyed the same rules (bedtimes were set from above and were not negotiable) and she went away to school. She is a night person. Proves nothing, but I find the correlation intriguing. (Thanks to Charlie Martin for the link.)
  • Here’s a long-form, highly technical paper on why human exposure to low-level radiation is more complex than we thought (hey, what isn’t?) and that some data suggests a little radiation experienced over a long timeframe actually acts against mortality. I’d never heard of the Taiwan cobalt-60 incident, but yikes!
  • Sleep, exercise, and a little wine may help the brain’s glymphatic system clean out unwanted amyloid waste products within the brain, preventing or staving off Alzheimer’s. This process may be the reason that anything with a brain sleeps, and why humans (who have more brain matter per pound than anything else I’m aware of) should get as much sleep as we can.
  • An enormous study on the benefits of the Mediterranean diet was found to be profoundly flawed, and has been retracted. The data was supposedly re-analyzed and the original results obtained again, but if the researchers made the mistakes they did originally (assuming that they were in fact mistakes and not deliberate faking) I see no reason to trust any of their data, their people, or their methods ever again.
  • How faddism, computerization, national bookstore ordering, a court case, and New York City cultural dominance destroyed (and continues to destroy) traditional publishing of genre fiction. The good news is that with indie publishing it matters far less than it otherwise would.
  • If you’ve followed the nuclear energy industry for any significant amount of time, you know that fusion power is always 30 years in the future. Now, I’ve also been hearing about thorium reactors for almost 30 years, and I got to wondering why we don’t have them yet either. Here’s a good discussion on the problems with thorium power, which intersect heavily with the problems plaguing ordinary uranium reactors.
  • Long-held myths die hard, especially when governments beat the drum for the myth. Eggs are good food. I eat at least two every day, sometimes more. The American Journal of Clinical Nutrition published a study indicating that people on a lots-of-eggs diet lost weight and suffered no cardiac consequences of any kind. Good short summary here.
  • I don’t see a lot of movies, but I’m in for this one, crazy though the concept is. After all, spectacle is what the big screen and CGI are for. Mad Max meets Cities in Flight? Sold.
  • The contrarian in me has long wondered how much of what I put out on the street every week in the recycle can is actually recycled. The answer is very little, especially since single-stream recycling became fashionable. Almost all of it goes into landfills. The reasons are complex (there’s not a lot you can do with scrap plastic, for example) but apart from aluminum cans, the cost of sorting it far exceeds the value of the reclaimed materials.
  • The antivax movement has always boggled me for its indomitably willful stupidity. Having stumbled upon a research paper on who the antivaxers are I boggle further: They are almost all members of the educated elite in our urban cores. This was always a suspicion of mine, and now we have proof.
  • Here’s a fascinating piece on the effects of water vapor and continental drift on global temperatures. The topic is complex, and the piece is long and rich, with plenty of graphs. The comments are worth reading too. The primary truth I’ve learned in researching climate for the last ten or fifteen years is that it’s fiendishly complex.
  • Brilliantly put: “But anger isn’t a strategy. Sometimes it’s a trap. When you find yourself spewing four-letter words, you’ve fallen into it. You’ve chosen cheap theatrics over the long game, catharsis over cunning.” –Frank Bruni, NYT.
  • A few days back I got Leonard Bernstein’s quirky, half-classical, half-klezmer “Overture to Candide” stuck in my head all afternoon. One listen to this was all it took.
  • I got there by recovering an old memory, of a chap who came to SF cons in the 70s with a strange keyboard instrument that he blew on through a hose, which as you might expect sounded like a piano accordion without a bellows. He was a filker and played interesting things, and I always assumed that he had somehow built the device himself. (It was much-used and taped up in several places.) But no, the chap is Irwin S. “Filthy Pierre” Strauss, and the instrument is a melodica.
  • Finally, one of the creepiest articles I’ve seen in a couple of years. I considered and set aside a plotline in my upcoming nanotech novel The Molten Flesh that involved sexbots, real, fully mobile AI sexbots enlivened (if that’s the word) by the Protea device. Maybe I should bring it back. The original 1959 Twilight Zone episode “The Lonely” has always haunted me. Maybe sex is a sideshow. Maybe it’s about having something to care about that cares back, and therefore gives your life meaning. I could work with that.

New Revision of FreePascal from Square One Is Now Up

I just uploaded a new, corrected and expanded PDF ebook edition of FreePascal from Square One to my website. It’s free, and (remarkably) it’s closing in on completion. It’s laid out for the A4 paper size, largely because there’s so much Pascal activity outside the US. You can read it on a screen, or else print it to paper to put in a binder. It’s currently at 294 pages, and when complete I hope to keep it under 325 pages, since that’s a whole lot of paper to print, punch, and bind.

Still to be covered are the standard string functions, locality and scope, and simple file/printer I/O. That’s not a lot of material, and some of it has already been rewritten and edited.

For those who haven’t heard of it before, let me describe the project: I’ve taken my 1993 book Borland Pascal 7 from Square One and heavily rewritten parts of it for FreePascal. Borland Pascal 7 from Square One was the fourth and last edition of my very first technical book, Complete Turbo Pascal, published in May, 1985. That title, by the way, was forced on me by the (now extinct) publisher. Its original manuscript title was Turbo Pascal from Square One. The four editions taken together were in print for almost ten years and sold about 125,000 copies back in the 80s and early 90s.

The book’s mission is to be what Assembly Language Step By Step is to assembly language: An absolute beginner’s tutorial on programming in Pascal. This includes people who have not yet learned what programming is and have never written a line of code in their lives. I start by explaining the ideas of programming, and move from there to Pascal. FreePascal is my compiler of choice, largely because it’s free, but even more because it comes with the Lazarus IDE, which contains a superb GUI builder very similar to the one present in Delphi. FreePascal from Square One doesn’t cover Lazarus beyond installing it and using the code editor. Specifically, it doesn’t cover the GUI builder or Windows programming generally. The example programs all run in the console window.

More than half of the original book explains things that no longer apply: DOS programming, overlays, the Borland Graphics Interface, tinkering the interrupt vector table, and so on. All of that is gone. I’ve made a decision to stop just before OOP, and will begin a Lazarus book with a thorough explanation of OOP and software components. I’m also leaving out pointers, since the topic is heavily intertwingled (to use a wonderful Ted Nelsonism) with OOP.

I intend to keep writing books of new material about Lazarus as time allows, and will sell them as PDF ebooks and spiral-bound POD paperbacks. No timetable; I’m trying to write SFF novels mostly, and will work on Lazarus projects as time allows. We’ve spent the last couple of years working on our Scottsdale house, but that’s largely finished, and I expect a lot more free time in the next few years. So stay tuned. I may do one more “unfinished” upload, but after that I expect to put the wraps on it.

Odd Lots

  • Twitter has gone absolutely off its rocker since Parkland, and now it’s just haters hating anyone who disagrees with them. (No, that’s not new; it’s just never been this bad.) I stumbled across a site called Kialo, which is a kind of digital debate club, in which issues are proposed and then discussed in a sane and (hurray!) non-emotional manner. I myself certainly don’t need another time-sink, but I wanted to bring it to the attention of anyone who enjoys (increasingly rare) reasoned debate.
  • Another interesting approach to political social media is Ricochet, a center-right bloggish system with paid membership required to comment. (You can read it without joining.) No Russian bots, or in fact bots of any kind, and a startling courtesy prevails in the comments. Its Editor in Chief is Jon Gabriel, who used to work for us at Coriolis twenty years ago. Not expensive, and the quality of the posts is remarkable.
  • FreePascal actually has an exponentiation operator: ** That was what FORTRAN (my first language) used, and I’ve never understood why Pascal didn’t have an operator for exponentiation. Better late than never.
  • This article doesn’t quite gel in some respects, but it’s as good an attempt as I’ve seen to explain why Xerox never really made much money on the startling computer concepts it originated back in the crazy years of the ’70s. I worked there at the time, and top-down management was responsible for a lot of it, as well as top management that wasn’t computer literate and thought of everything simply as products to be sold.
  • Japanese scientists found that treating the hair follicles of bald mice with dimethylpolysiloxane grew new hair. Dimethylpolysiloxane is used to keep McDonalds’ deep fryers from boiling over, and given that Mickey D’s fries are one of my favorite guilty pleasures, I suspect I’ve ingested a fair bit of the unprounceable stuff. No hair yet, though I keep looking in the mirror.
  • German scientists, lacking a reliable supply of bald mice, have discovered a species of bacteria that not only enjoys living in solutions of heavy metal compounds, but actually poops gold nuggets. How about one that poops ytterbium? I still don’t have any ytterbium.
  • Eat more protein and lift more weights if you’re a guy over 40. Carbs are no food for old men.
  • Evidence continues to accumulate connecting sugar consumption to Alzheimer’s. Keep that blood sugar down, gang. I want to be able to BS with you all well into my 90s. Try cheese as snacks. It’s as addictive as crack(ers.)
  • If in fact you like cheese on crack(ers), definitely look around for St. Agur double-cream blue cheese. 60% butterfat. Yum cubed. A little goes a long way, which is good, because it keeps you from eating too many crack(ers.)
  • And don’t fret the fat. The Lancet has published a study following 135,000 people, and the findings indicate that there is no connection between dietary fat and heart disease. Ancel Keys was a fraud. Ancel Keys was the worst fraud in the history of medical science. How many times do we have to say it?
  • 37,132 words down on Dreamhealer. It’s now my longest unfinished novel since college. (It just passed Old Catholics, which may or may not ever be finished.) Target for completion is 70,000 words by May 1. We’ll see.
  • On March 17th, it will be 60 years since Vanguard 1 made Earth orbit as our 2nd artificial satellite. Probably because it’s so small (a 6″ sphere, not counting antennae) it is now the satellite that’s been in orbit the longest, including those the Russians launched. The early Sputniks & Explorers have all burned up in the atmosphere.
  • I never knew that the parish church of my youth was Mid-Century Modern, but squinting a little I would say, Well, ok. Here’s a nice short visual tour of the church where I was an altar boy and confirmed and learned to sing “Holy God We Praise Thy Name.” It hasn’t aged as well as some churches (note the rusty sign) but some of the art remains startling. I met Carol in the basement of that church in 1969, and will always recall it fondly for that reason alone.
  • Ever hear of Transnistria? Neither had I. It’s a strip of Moldova that would like to be its own country, (and has been trying since 1924) but just can’t get the rest of the world to agree. It has its own currency, standing army, and half a million citizens. (I’ll bet it has its own postage stamps, though why I didn’t notice them when I was 11 is unclear.)
  • A guy spent most of a year gluing together a highly flammable model of a musk melon (or a green Death Star, if you will) from wooden matches, and then lit it off. He even drew a computer model, which needed more memory to render than his system had. Despite the bankrupt politics, we live in a wonderful era!

Odd Lots

  • I regret to report that Robert Bruce Thompson has left us, at age 64, of heart problems. He’s best-known for his books PC Hardware in a Nutshell and Building the Perfect PC, but he’s also written several books on astronomy and telescopes that I much admire, as well as several books on home-lab chemistry. He was one of the best technical writers of his generation, and has been blogging as long as I have, which later this year will have been 20 years.
  • Apple will be releasing the source code for the Lisa OS this year. The machine came out in 1983 and didn’t sell well due to its $10,000 price tag. (That would be almost $25,000 today.) I’m interested because Lisa OS was written in…Pascal! I’ve heard rumors from the FreePascal community that a port to the Raspberry Pi is likely and might not even be especially difficult. Imagine the OS from a $25,000 machine running on a computer costing $35. I’d do that just to say I did.
  • I didn’t know anything about ArcaOS until a few days ago, but it’s basically a continuation of OS/2 Warp, based on Warp 4, MCP2. Legal, not free, but also not hideously expensive, and supported to boot. If you ever used OS/2 and liked it, take a look.
  • Back before we truly understood the dangers of nuclear radiation, scientists experimented with nuclear fission by moving neutron reflectors around a softball-sized core of PU-239 by hand, and recording the nuclear reaction’s strength from Geiger counter readings. This was called “tickling the dragon’s tail,” and when done clumsily, led to the death of several researchers and shortened the lives of others. Here’s a good summary.
  • The last house designed by Frank Lloyd Wright before his death in 1959 is in Phoenix, and it’s for sale. Got $3.25M in your wallet? You’re set! (Thanks to my own Carol for the link.)
  • Here’s an excellent long-form piece on Amazon Go, the online retail behemoth’s experiment in checkout-free B&M retailing. Take if off the shelf, toss it in your bag, and when you’re done shopping, just leave. You need an Amazon account and ideally a smartphone, but with that you’re in business. No word on when the concept will move beyond Seattle.
  • The Dark Crystal is coming back to movie theaters in February. That was a butt-kickin’ movie, and I will probably hand over the $14 ticket price without a great deal of grumbling. A really big screen is worth something!
  • IO9 mentioned some teasers for Cloverfield III. III? Was there a Cloverfield II? You guys never tell me anything!
  • A Canadian sniper team in the Middle East nailed an ISIS terrorist at 3,871 yards. This is about 1,000 yards farther than the previous record for a sniper kill. I have a lot of respect for marksmen (my father was one) and a sense of awe before the skill of snipers at this level.
  • Every time I crank up Waterfox, it asks me if I’d like it to be my default browser. Every damned time. Something appears to be redefining my default browser without my permission. This support page hasn’t been especially helpful. Haven’t cracked this one yet, but I’ll report here when I do.
  • Something the AGW crowd should keep in mind: If you say that any hot summer’s day means global warming, don’t be surprised if people unroll the syllogism and assume that any cold winter’s day means global cooling. Climate isn’t simple, and we know a lot less about it than we claim.

Odd Lots

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