Jeff Duntemann's Contrapositive Diary Rotating Header Image

lazarus

Lazarus 3.0 Has Arrived!

For all you Pascal programmers among my readers: Lazarus 3.0 is out, and available for free download. Here’s the announcement. I’ve already installed it on Win10 and will install it on Linux when time becomes available. (I’m still struggling to write the trademark Jeff Duntemann mayhem-filled action climax of my current WIP: The Everything Machine, the first full-length drumlins novel.)

Delphi now costs over $1000. If I’m going to teach Pascal, I can’t use Delphi, love it though I may–and do. Lazarus is pretty much Delphi’s peer, though it doesn’t…quite…have the third-party component aftermarket that Delphi has. Doesn’t matter. The fundamental principles of OOP and event-driven programming are the same.

For newcomers: Lazarus is a superb IDE and drag-‘n-drop GUI builder conceived as a Delphi competitor, though open-source and thus free of charge. It uses FreePascal 3.2.2 as its compiler. FreePascal understands Delphi’s additions to the Pascal programming language, and will also compile ancient Turbo Pascal programs. FreePascal is part of the Lazarus package and is installed when you install Lazarus. I have fragments of a book on Lazarus that I will return to at some point. But if you know Delphi, well, there’s not a lot more to learn. You’ll feel right at home.

Go get it. I’ve done a lot of work in Lazarus. It’s mature. It works. It can create wonderful GUI apps. And it’s free. What more do you want?

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.

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

  • 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

Where’s the rest of SQLite?

Wait. Oh. That’s all there is.

Really.

I had this problem once before, with the Atlantis word processor. It’s 5MB installed. 5. The first time I installed it I suspected I had downloaded a corrupt file, but no: However they did it, the wizards over at Atlantis implemented a damned fine Word 2000 clone in 5MB. It doesn’t have the collaboration features, but for solo work it’s a very big win, and exports extremely clean epubs as a side benefit.

For a fair number of years now, my non-Delphi database work has all been in MySQL. (With Delphi I use a VCL product called DBISAM, which is linked into the compiled .exe and doesn’t have to be installed separately.) Because SQLite is available for the Raspbian OS and MySQL isn’t (as best I know; Percona runs on Arch Linux) I’m going to be using SQLite as a database teaching tool. So when I installed it the other day, I stared at the 600K .dll and wondered, Is that all there is?

Yes, that’s all there is, my friend–so let’s keep dancing. Let’s break out the tools and have a ball. ‘Cause that’s all there is!

Wow. I verified it by searching for the sqlite3.dll file on my system. The Calibre ebook manager uses an older version (as do a few other things) and the file was not only that same unbelievable size, but smaller. Can you implement a relational database engine in only 372K? I guess you can.

One reason SQLite’s .dll is so small is that it contains no UI at all. There’s a bare-bones command-line management utility available as a separate download. As some of you may know (or suspect) I dislike command lines intensely. So it wasn’t long before I had two free GUI management apps for SQLite databases. One was recommended by Chris Newman’s book on SQLite, SQLite Database Browser, and the other is SQLiteMan. Both are free and installed without drama. So far I prefer SQLiteMan, but it’s really too early to tell. SQLiteMan is supposedly compilable on the RPi. I intend to try that. I’ll let you know how it goes.

One other reason may be that SQLite is “typeless,” which means that the engine does not do type-checking on reads and writes. You can put anything you want in any field (apart from key fields, which are treated specially) and if it makes no sense, it’s your screwup on your conscience. I’m a strongly typed guy and this would rankle, if it didn’t allow a database engine to come in at half a megabyte.

There are wrappers for most common languages, including Lua and Lazarus/FreePascal, both of which I have here and have been fooling with in recent months. I’ve been very spoiled by DBISAM, and I’m interested to see how well SQLite works in non-server applications. More as it happens.