A BCD Clock Simulator

[Amazon Link]

I got a "binary-coded decimal clock" (made by the good folks at Anelace Inc.) a few Christmases back. Picture via Amazon link at right, if you're not seeing it, turn off your ad blocker. The time shown is 10:48:36.

[And make no mistake, Anelace is a Good Company. I shorted out the power supply adapter by clumsy accident. I emailed, asked where I could buy a replacement, they just sent me one, free. Whoa.]

When I worked at UNH, I kept it in my cubicle as a conversation piece. The thing that sticks in my mind today is how many IT managers needed me to explain what it was and how to interpret the LEDs. No geeks they.

Shortly afterward, on a lark, I wrote a small Perl script to simulate the clock display in a terminal window. I recently exhumed and updated the script to more modern standards. It's short and (I think) fun.

Here's a screen snapshot of what it looks like in action. The red dots inside indicate "on" LEDs. The LED array is updated every second, as is the time displayed at the bottom.

[Screenshot]

Plaintext source is here; Prettyprinted HTML source here.

Notes:

  • The Term::ANSIScreen Perl module available from CPAN handles text positioning, color, and formatting. I think most terminal emulation programs do ANSI commands these days.

  • The LED-on "dot" is a UTF-8 character. If your terminal program doesn't handle UTF-8, the code has a commented out alternate that might work: a space with a red background.

  • The Term::ReadKey module handles non-blocking terminal reads. This was implemented so that pressing the Q key will quit. [Pressing control-C might leave your terminal window in a funny "raw input" state. Fixing that left as an exercise for the reader.]

  • It could well be that a more judicious selection of fonts, characters, etc. would make the display more pleasing. Obviously, it's easy to play with.

  • There's a "sleep 1" in the script's main loop. Since the calculations inside the loop also take a finite amount of time, it's likely that a second will be skipped every so often. I haven't noticed that happening, though.

Questions? Comments? Let me know.


Last Modified 2017-10-23 7:10 AM EST

Esquire Presents: What It Feels Like

To Walk on the Moon, etc.

[Amazon Link]

This is one of the books I own that I don't remember when, why, or how it was obtained. It has a copyright of 2003, so after that sometime. And I put it in my cyber-to-be-read list at some point. And it popped up. So…

Esquire magazine ran this "What It Feels Like" feature for a while. (I don't know—or care—if they do any more.) Each was a first-person account from someone who underwent a situation in which most of us will never find ourselves. This book collects those, and adds in a bunch more, a total of somewhere around 60. Each is just a page or two, which makes the book very short, 143 pages.

People in dire situations tend to drop the f-bomb a lot.

The most famous person: Buzz Aldrin, who contributes "What it Feels Like to Walk on the Moon". No f-bombs from Buzz.

Also semi-famous: Barry Rosen, Iranian hostage. "What it Feels Like to be Held Hostage". Almost 40 years later, I still got a little pissed at Iran.

Some people are eloquent, like Jenny Lundy: "What it Feels Like to be 105 Years Old".

And some are just interesting. "What it Feels Like to Win the Lottery" by Washington Iowa's Ed Brown, for example. Unlike the infamous lottery winners who crash and burn, Ed seems to have been remarkably level-headed. Bottom line: "I guess I liked who I was before I won the lottery and I decided not to change."

But it's a hodgepodge, with all that implies. I suggest you look at the table of contents at Amazon to see if there's anything in here you really want to know about. You can pick up a used copy for about $5 at Amazon.

URLs du Jour

2017-10-22

I wanna be your dog

Proverbs 19:4 offers a bleak view of friendship:

4 Wealth attracts many friends,
    but even the closest friend of the poor person deserts them.

Perhaps this was the inspiration, thousands of years later, for Jimmy Cox's 1923 "Nobody Knows You When You're Down and Out"?

Once I lived the life of a millionaire,
Spent all my money, I just did not care.
Took all my friends out for a good time,
Bought bootleg whiskey, champagne and wine.

Then I began to fall so low,
Lost all my good friends, I did not have nowhere to go.
I get my hands on a dollar again,
I'm gonna hang on to it till that eagle grins.

Today's picture: a poor friendless dog. Awww!


@JonahNRO's G-File this week is low on jocularity, but high on insight. Bush and Kelly: Truth Tellers. Keying off recent speeches by Dubya and General John Kelly, which were widely interpreted as attacks (respectively) on Trump and Democratic congresswoman Frederica Wilson. And were harshly criticized (respectively) by Trumpites and Progressives. But:

I’m disgusted with a great deal of this, but rather than argue against any of that, I want to ask you to entertain a thought experiment. Imagine, if just for a moment, that all of you who fall into one of these camps are entirely wrong.

What if President Bush was aiming his fire at Democrats and liberals? What if Kelly was actually lecturing his boss?

If you can take off the partisan blinders and restrain your tribal instincts, it’s not all that hard to see it that way.

It's really not.


■ P.J. O'Rourke writes at American Consequences on This Month’s Two Worst Political Ideas Ever. (Just "this month", according to P.J., because "worst political idea ever" is a rapidly moving target. But anyway, the ideas are (1) Universal Basic Income and (2) Single-Payer Health Care.

If the Universal Basic Income idea really gets going and smashes into the single-payer health care idea, the collision will leave American society a total wreck.

Americans will be turned into beggars and thieves.

We’ll all be panhandlers squatting on the curb of the political avenue, rattling our tin cups at our elected officials to bum more spare change off the government.

P.J. illustrates his contention with a couple stories from his past. I'm convinced.


■ Tales of higher-ed insanity are coming thick and fast as the semester rolls along. Even an Ivy League school like UPenn finds itself in a far-left fever swamp, as related by Robby Soave at Reason: This UPenn Teacher Justifies Her Refusal to Call on White Male Students: It's 'Progressive Stacking'

No, this isn't a Clickhole story; if you're a white man in Stephanie McKellop's history class, you might be called out, but you probably won't be called on.

McKellop, a graduate instructor at the University of Pennsylvania who describes herself as a "queer disabled feminist," recently tweeted, "I will always call on my Black women students first. Other POC get second tier priority. WW [white women] come next. And, if I have to, white men." McKellop eventually deleted the tweet, but not before the internet immortalized it.

Undergrad yearly tuition at UPenn is $47,416 (as I type). If you're a white male, do you get a discount if you wind up with Stephanie McKellop for a teacher?


■ Chapman University out in Orange CA is not Ivy League, and compared to UPenn, tuition is a low, low $25105. But if you're a white male, you can still get in trouble for expressing your opinion about "diversity", as noted at the College Fix. White, male student under fire for defending diversity of thought: ‘punchable, drag him, expel him’.

A white, male student at Chapman University has been maligned on social media after penning an op-ed for his school newspaper that argued campus diversity efforts, while seemingly offered with good intentions, actually breed radicalism and silence dissent.

Sophomore Ryan Marhoefer, a business administration major at the private university in Southern California, received major backlash in comments about the article that included calling him a white supremacist and suggesting he should be expelled or physically assaulted.

Chapman was founded in 1861 by "members of the Christian Church (Disciples of Christ)". Its students today seem to be experts at persecution of heretics.


Mental Floss picks out 10 Far-Out Facts About Futurama. And here's one I didn't know: the remarkable similarity of the Futurama theme to a 1967 composition “Psyché Rock" by Pierre Henry. Have a listen:

■ And have you played the Paperclips game? It's a certain amount of fun, and I dinked around until I realized … I'd spent about an hour dinking around.

But if I had persisted… this Wired story has much more information: The Way the World Ends: Not With a Bang but a Paperclip.

Paperclips, a new game from designer Frank Lantz, starts simply. The top left of the screen gets a bit of text, probably in Times New Roman, and a couple of clickable buttons: Make a paperclip. You click, and a counter turns over. One.

The game ends—big, significant spoiler here—with the destruction of the universe.

I guess I should have been more patient.