Jeff Duntemann's Contrapositive Diary Rotating Header Image

February, 2018:

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!

LED Strips for Workshop Lighting

60W Bulb Wafer - 500 wide.jpg

We replaced nearly all of the incadescent bulbs in the house with LED bulbs shortly after we bought it in late summer 2015. That came to 27 60W bulbs and ten or twelve 75W floods for ceiling can lights. You can’t get incandescent bulbs in the commoner sizes anymore, and the power savings is considerable. LED bulbs have come a long way in the last few years, and the “softer” light quality levels (3000K and below, most of which were 2700K for us) approximate incandescent light close enough for what we do.

There are a couple of issues with LED bulbs. We bought Feit bulbs in bulk when we re-bulbed all the ceiling fan lights. Two years on, and the Feit bulbs are dropping like flies. I have nine dead but intact Feit 60-watters on my workbench, and two more that I dismantled to see what’s in them. What’s in them isn’t much: A voltage doubler/rectifier board that converts 117VAC to 236 VDC. There’s a disk holding nine LEDs, with two wires down to the power supply. The photo above shows what it looks like when you hacksaw the plastic globe off a Feit 60W equivalent LED bulb. It’s unclear to me whether the nine LEDs are single diodes or blocks of several fabricated together. It seems like a stretch to put 26 volts on a single LED and not see it emit plastic instead of light.

I’ve been taking bulbs apart to try and see why the Feit bulbs die so young. I’ve pulled two apart: One had a bad power supply. The other had a bad wafer. The wafer, however, was intermittent: Tap it with a screwdriver and it flickers, and sometimes comes up to full brightness. The dead power supply was just dead, without any indication of why. It stayed dead when tapped, unlike the intermittent wafer. Cheap crappy manufacturing, I’d guess. This is one Feit I will gladly walk away from.

LED lighting is problematic in ham radio work because of the broadband noise generated by the bulb power supplies. Fluorescent tubes have the same general problem. My notion is to create a separate lighting system in my workshop/ham station using LED lamps run straight-on at 12VDC. I had hoped that the wafers ran at 12VDC or 24VDC, so that I could harvest them from bulbs with failed power supplies. Not an option.

So I started sniffing around to see what sort of lamps are available for 12VDC. I bought a couple at a hamfest to play around with, and talked to the techs at a lighting store up in Kierland. They had an interesting display: Assemble-it-yourself LED strip lights. These consist of an anodized aluminum U-channel, with a self-adhesive strip of LEDs stuck to the bottom of the channel, with a linear plastic lens that snaps into the U-channel. The LED strips take 12VDC, and use 2.88W per foot.

LEDTapePackage - 500 wide.jpg

The LED tape strips come on a reel, with 16.4 feet on the reel and 3 LEDs per inch. The reel isn’t cheap; I paid $235 for it, and that’s about what they go for on Amazon. What I did was buy an 8′ section of channel/lens and put down just under 8′ of LED strip. The strips have clearly marked points every inch where you can cut them with an ordinary scissors, leaving solder pads on each side of the cut.

LEDTapeCloseup-500 Wide.jpg

The strip comes with a .215″ female barrel connector on the end of 6′ of 2-conductor cord. But again, there are solder pads every inch, so you can wire them to a power source any way you want to. What I did (at least for testing) is dig around in my Big Box o’ Wall Warts and found a Dell APAC-1 power supply, which came with a Dell matrix printer someone gave me ten or twelve years ago. It’s labeled for 12VDC @ 2A, and the strip draws 1.92A, so the supply is working pretty hard. (It squeals, way up there where Carol can hear it and I can’t.)

What I did with the strip is mount the four clips that came with the U-channel under the front edge of the first shelf above my workbench, and then clipped the U-channel to the shelf. The lower surface of the shelf is 11″ above the bench, so I’d have to do some bending and stooping to actually see the LEDs. And the intensity of the light is marvelous, shining down right where I do the sort of close work that electronics requires, which these days is real damned close.

Illimuminated Bench - 500 Wide.jpg

Because the light comes from a strip of 288 LEDs, there are basically no shadows anywhere under the strip, unless you completely block the light. This means that you can work in good light without worrying as much about your hands casting shadows on what you’re doing. It’s almost like the project photos in old QSTs, where all parts of a complicated hand-wired chassis are completely illuminated. The photo below is of a high-voltage power supply placed on the bench beneath the LED strip, and is literally what you’d see were you sitting at the bench poking at the supply.

Lit Chassis - 500 wide.jpg

This was only a first step. The strip won’t be powered by the APAC-1 long-term. I have a 30A 12VDC supply that I built out of an old minicomputer power supply somebody gave me. That will be the power source for all the lighting in my workshop/shack once the whole system is complete. I’m looking into overhead lighting now, and may simply use the remaining 8′ of LED strip on the reel with a white diffuser lens, clipped to the drywall ceiling.

Ultimately I want to work up a solar panel system on the roof of the garage, charging a 12V battery of some sort to supply lights and radios. The landscapers are going to auger a hole next to the shack for an engineered ground system tomorrow morning, so I have other work to do before I get on the air. It was a fun project, and will make working on projects a great deal easier. Good light is not optional!