Jeff Duntemann's Contrapositive Diary Rotating Header Image

pascal

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

Odd Lots

Odd Lots

  • Intel’s announced the Compute Stick, a complete $150 Win8.1 machine in the format of a fat thumb drive. Looks like the plug is HDMI, though, and the device gets power from an uncommitted USB port. I could see this melting seamlessly into a big-screen TV (or any monitor with an HDMI input) and giving you something that indeed approaches (as Michael Abrash said probably 20 years ago about 21″ CRT monitors) Windows on your bedroom wall. (Thanks to Eric Bowersox for the link.)
  • It’ll be awhile before this becomes available, but a brand-new antibiotic has been isolated from bacteria that live in dirt. I’m doubly enthuisastic because this may encourage researchers to look harder at bacteriophages, which live in dirt and worse.
  • If you haven’t heard of Smart Pascal, it’s an interesting concept and worth a look: A commercial Object Pascal compiler that generates HTML5 apps. It’s basically a way of writing sophisticated Javascript apps without having to wash your mental hands and rinse your brain out every twenty minutes. To me that would be worth $42/year.
  • From the Words I Didn’t Know Until Yesterday Department: A selfie stick (also known as a narcissistick) is a camera holder that allows you to take pictures of yourself or groups by parking your camera on it and holding it up in the air so that the camera is facing you. It’s usually just a rod with a handle, sometimes telescoping. Many support bluetooth to trigger the camera, though the details remain obscure to me.
  • Beware the Facebook Logic Fallacy: One member of Group X is evil, therefore all members of Group X are evil. Much of my objection to Facebook memes is that this is a very common template. Attack memes must die. Not sure how to get there from here.
  • The percentage of ice cover on the Great Lakes is now 18.7%. Keep an eye on this graphic, as I think our current winter stands to be an…interesting…season from a Great Lakes ice perspective.
  • In general I’m no fan of government regulation, but here’s an excellent argument that both broadband providers and airlines could use a little consumer-oriented regulation.
  • Related to the above: Air travel is a lousy business (rather like health insurance, in fact) and merciless price competition has led to creative fee-hiding and generally charging extra for a travel experience that hasn’t been made deliberately miserable.
  • From the Department of the Painfully Obvious: There are many benefits in finding a spouse who is also your best friend. I guess it’s nice to have some research behind it, but damn, is this really news to anyone? (Maybe New Yorkers.)

Odd Lots