The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Thursday, January 02, 2014

Mind-bending African-American musicals based on a book set in prehistoric times from the 1970s about parenthood

As our interview concluded, I pulled my computer back out and showed Yellin this one last chart. Take a good look at it. Something should stand out.

Sitting atop the list of mostly expected Hollywood stars is Raymond Burr, who starred in the 1950s television series Perry Mason. Then, at number seven, we find Barbara Hale, who starred opposite Burr in the show.

How can Hale and Burr outrank Meryl Streep and Doris Day, not to mention Samuel L. Jackson, Nicholas Cage, Fred Astaire, Sean Connery, and all these other actors in the top few dozen?

No, the strange thing is that these lists seem pretty spot-on, except for this weird Perry Mason thing.

Granted, the existence of all these Raymond Burr and Barbara Hale altgenres doesn't mean that Netflix users are having these movies pop up all the time. They are much more likely to get Action Movies Starring Bruce Willis.

But, then, why have all these genres?

What was the deal?

Via violet impudence, How Netflix Reverse Engineered Hollywood - Alexis C. Madrigal - The Atlantic

Not only is it remarkable that Netflix has classified its movies into 76,897 genres, but that Raymond Burr is the top one! Odd, given that Bunny and I caught several “Perry Mason” episodes on vacation last month. Coincidence? Hmm …

Wednesday, January 08, 2014

While you all hid indoors (or: it't a bit too warm here to try this)

Growing up, the thought of blowing bubbles in winter (link via Instapundit) never crossed my mind, and I must say, seeing these images now, makes me sad I never did.

Somehow, I doubt blowing bubbles into the freezer would have the same effect …

Thursday, January 09, 2014

An email intercepted by the NSA detailing the mundane life of an American citizen at work

From
Sean Conner <sean@conman.org>
To
Sean Hoade <XXXXXXXXXXXXXXXXXXXXX>
Subject
Re: Happy Birthday, Part Deux
Date
Thu, 9 Jan 2014 16:14:53 -0500
From
Sean Hoade <XXXXXXXXXXXXXXXXXXXXX>
To
Sean Conner <sean@conman.org>
Subject
Happy Birthday, Part Deux
Date
Wed, 8 Jan 2014 21:02:51 -0800

Young(ish) Mister Conner,

I hope you had a fine day. I know you're extremely busy, but I just wanted to take another moment out if your day to tell you how much you are appreciated and loved. I'm getting sappy in my old age, but what the hell. :)

All good thoughts, my friend.

Hoade

I did.

Today?

Today all I want is a nap. I am so tired. This morning, I had a dream where I was so tired I want to go to sleep. How weird is that, dreaming that I'm tired and want sleep.

Tuesday at the office? Flew by quickly.

Wednesday at the office? Flew by quickly.

Today at the office? It's like time decided it has enough of flowing quickly and was going to take it easy today and slowly drift by. The bastard!

So I'm sitting in my office, heavy jacket on (this is Florida, where it tends to be colder indoors than out, but I think you know that already), struggling, struggling I say! to keep my nose from hitting the keyboard. It hurts when that happens.

The project I'm working on has gone from the interesting 90% of the work to the dull, boring, dotting-​every-​t-​and-​crossing-​every-​i nit picky detail work that takes the other 90% of the development time to finish. And it's not the mindless dull, boring, dotting-​every-​t-​and-​crossing-​every-​i nit picky detail work, but the just-​mindful-​enough-​that-​I-​could-​only-​wish-​it-​was-​mindless dull, boring, dotting-​every-​t-​and-​crossing-​every-​i nit picky detail work that requires just enough mental power to make it ever so tiresome.

And you know what? Everything I typed so far? Take a guess at how long it took me. Go ahead, take a guess. Nope. Nope. Still to long. Nope. Three seconds. That's how much time elapsed from the time I started typing this reply to the time I finished the preceeding paragraph. When did I start travelling at relativistic speeds? Time hasn't moved this slowly since high school English, which, in an odd way, is a nice change from the wait-​I-​just-​blinked-​why-​it-​is-​a-​month-​later time flying by, but it would be nice if I didn't have to deal with this just-​mindful-​enough-​that-​I-​could-​only-​wish-​it-​was-​mindless dull, boring, dotting-​every-​t-​and-​crossing-​every-​i nit picky detail work that requires just enough mental power to make it ever so tiresome.

Sigh.

Only another two seconds have passed.

At this rate, I think I could churn out a copy of Atlas Shurgged in ten minutes. Hmmm … scratch that, I think I would only be able to slug out a copy of War and Peace in ten minutes; Atlas Shrugged would take eleven.

Perhaps if I make another cup of tea …

  -spc (I just blinked and now it's 34 years later … )

Friday, February 07, 2014

The Lego Movie

I think it's a sad indictment of Hollywood when an obstensibly 1½ hour long commerical for a toy system is one of this year's (or of the recent few years) best movies.

I'm speaking, of course, of “The Lego Movie.

And yes, it's that good. It has great humor, there are no annoying characters (and believe me, there are a few that could have been horrifyingly annoying, or cute, or both) and the “Lego Universe” is … the Lego Universe, where characters can create anything from spaceships to double-decker couches out of existing pieces.

Yes, everything in the Lego Universe is made up of Lego bricks. From vehicles to smoke, it's a beautifully rendered world of brightly colored bricks. Bunny was constantly amazed with the usage of Lego in the film (even if most of it was computer generated, everything on the screen could, in theory, be made with enough Lego bricks).

And the main villian, Lord (later President) Business, has motivations beyond just taking over the world for its own sake, which really comes into its own in the “I really didn't expect this to happen” ending.

It's a very imaginative film, and in fact, that's the point of the film—to impress upon the audience that it's okay to deviate from the instructions and just have fun with the act of creation, even if it's just sticking two bricks together.

Tuesday, February 11, 2014

If you are thinking of advertising on Facebook, watch this video. If you are clickfarm, like this post

Veritasium has a very interesting video about Facebook likes (link via Hacker News) and how, in an odd way, they can actually lead to less views of a Facebook page, especially if you buy “likes.”

And don't think Facebook will want to clean this up any time soon, as click farms benefit Facebook (Facebook makes easy money). This is a real case of “buyer beware!”

In addition to this, you should be aware that you aren't seeing everything on Facebook, due to its filtering. Just saying …


“It's not my fault!”

Hey guys. It's me. The guy who put the exhaust ports on the Death Star.

I know, I know—

“What a stupid design flaw!”

“You are singlehandedly responsible for the destruction of our ultimate weapon and battlestation!”

“How could anyone have made such a huge mistake?!”

Over the past week, I've gotten a lot of guff from people I considered to be friends and colleagues about how my “shoddy” design would be the downfall of our entire government. Not only that, but I've been forced-choked (and regular-choked) by more superiors than I can count (and Human Resources have been very relunctant to respond to my complaints about being invisibly strangled by a cyborg space wizard). But I have one response to all of you who blame for the destruction of the Death Star:

Via Flutterby, An Open Letter From a Death Star Architect - Dorkly Article

And yes, you'll have to read it to find out what the Death Star architect's response was. And yes, the architect has a point—it's not like anyone could have forseen such events.

I mean, what are the chances?

Thursday, February 13, 2014

Sole has no eyes

I'm in the kitchen of The Ft. Lauderdale Office of The Corporation, preparing some boiling water for some tea. I was looking through the cabinet when I came across something that just stunned me.

[Oddly enough, this isn't even tea!]

A package of tea (which really isn't even tea) that informs us, that, yes indeed, tea is gluten-free!

As if that wasn't readily apparent.

I mean, I could understand maybe mentioning that their tea bags are gluten-free, but tea itself?

Wednesday, February 19, 2014

Notes about an email asking to change a link

I receive email from time to time informing me of broken links on my blog. The good thing—they let me know of broken links. The indifferent thing—given enough time, most links break (despite Tim's advice) so that's expected. The bad thing—the people who send such email don't bother to actually read the page in question and are really here to leech from my Google Page Rank (for the record—3).

So it was very refreshing to see the following email:

From
"Amanda Tracy" <XXXXXXXXXXXXXXXXXXXXXX>
To
sean@conman.org
Subject
Broken Link on boston.conman.org/2002/06/02.1
Date
Wed, 19 Feb 2014 14:58:09 -0700

Good Afternoon Sean!

I wanted to let you know that I really love your post about helping your friend “F” move out of his parent's house and into a town home! My favorite part was when you mentioned what it was like when F's dad was trying to clean off the furniture. That was hilarious!

When reading, I noticed that one of the links is incorrect. The link labeled “U-Haul” is currently taking readers to “u-haul.com”, but the correct domain is “uhaul.com”. I was wondering if it isn't too much to ask, that we fix the link to “uhaul.com”?

Thank you for taking the time to read through this email, I look forward to reading more of your blog posts!

Amanda Tracy
U-Haul International | Online Marketing and Strategy
Web Analyst
XXXXXXXXXXXX X XXXXXX
XXXXXXXXXXXXXXXXXXXXXX

Not only was Amanda polite and to the point, she actually read the post in question!

Incredible!

With an email like that, of course it wasn't too much to ask to fix the link. And thank you, Amanda, for bringing the broken link to my attention.

Friday, February 21, 2014

Notes on a conversation overheard at a local fast food establishment

“I'd like combo number two, with cheese, lettuce, tomato and onion, please.”

“Do you want pickles on that?”

“No. Just cheese, lettuce, tomato and onion.”

“Ketchup?”

“No. Just cheese, lettuce, tomato and onion.”

“Mayo?”

“No. Just cheese, lettuce, tomato and onion.”

“No mayo?”

“Right. No mayo. Just cheese, lettuce, tomato and onion..”

“Okay … ”

[mumbles to self] “At least I didn't get the hamless ham and cheese without the cheese.”

“How do you do that?”

Do what?


An update on the “Notes on a conversation overheard at a local fast food establishment”

The combo number two came with cheese, lettuce, tomato, onion … and ketchup.

Sigh.

Friday, February 28, 2014

Stripped

[OMG! NEW BILL WATTERSON ART!]

Well here's an unexpected surprise: Bill Watterson, long-retired creator of Calvin of Hobbes, was so impressed with Stripped—a new feature documentary that invites some of the biggest names in comics “to talk about the art form they love, and what happens to it as newspapers die”—that he agreed to provide the art for the film's poster.

Via MyGoogleFaceSpacePlusBook, Brand New Art from Calvin and Hobbes Creator Bill Watterson!

Squeeeeeeeeeeeeeeeeeeeeeeeeeeeeee!


Walk without rhythm, and you won't attract the tiger

And apropos of some recent news, I know some of my friends will appreciate this: Calvin & Muad'Dib, a mash-up of Bill Watterson's artwork for Calvin and Hobbes, with Frank Herbert's writing from the Dune series.

And oddly enough, it works.


Of course, Uncle Scrooge has always been very popular in Europe for some reason

[Prospecting in the Klondike]
Well, it seems to day is comics day around here. First it was Calvin &Hobbes, and now it's Uncle Scrooge.

Don Rosa's The Life and Times of Scrooge McDuck is a comic book masterpiece. It’s one of my all-time favorite stories, a tribute to one of the all-time greats, Carl Barks, by a guy who isn’t too far shy of that title himself. Expertly researched and threaded through an existing continuity in a way that’s still incredibly accessible to readers. And yet, every time I read it, I find myself thinking “wouldn’t this be better if it was told through the timeless medium of Finnish prog rock?”

Via Jeff Cuscutis through MyGoogleFaceSpacePlusBook, Don Rosa Draws For a Finnish Rock Album About Scrooge McDuck

Um … I never asked myself that question either, but the video presented of one of the songs has me intrigued enough to maybe pick up the album when it comes out.

Monday, March 03, 2014

“I am fluent in over six million forms of communication …”

In Kentucky, students may be able to learn coding instead of a foreign language.

Legislation in the Kentucky Senate would let students use computer programming courses to satisfy foreign-language requirements.

The bill passed the Senate Education Committee on a 10-1 vote last week in a move forward.

Kentucky Coding: Foreign Language Requirement in Schools May be Satisfied with Computer Programming

This is not as crazy as it sounds. My friend Wlofie (who lives in Sweden) considered me multilingual even if I didn't think so, because I knew multiple computer languages (various assembly languages, C, Lua, some Pascal, Fortran, Perl, Lisp, Forth and Erlang, plus having written my own back in college) even if I only spoke one language (English). This, from a guy who spoke at least four languages fluently.

Sigh. Why not twenty-five years ago? I could have saved myself years of anguish attempting to learn German (really? six different forms of the article the?) had this been the case when I was in school.

Then again, I would have missed out on a teacher that sent students on daily donut runs …

Tuesday, March 04, 2014

An alternative to steam punk computers

[A beautiful wooden gaming system]

Love Hultèn (link via Flutterby) certainly does some beautiful computer cases (among other things) and it's a very nice change from the steampunk esthetic that's currently in vogue.

Wednesday, March 05, 2014

The Case Of The Missing Core Files

At work, I test the various components of “Project: Wolowizard.” These tests usually require running multiple copies of a program on a single computer. I use Lua (with help from a module) to start and monitor the programs being tested. The code starts N copies, and if any of the programs crash, the reason is logged. It's fairly straight forward code.

Now, one of the compents of “Project: Wolowizard” was updated to support a new project (“Project: Sippy-Cup”) and that component is occasionally crashing on an assert, but the problem is: there are no core files to check.

And I've spent the past two days trying to figure out why there are no core files to check.

The first culprit—have we told the system not to generate core files? Yup. The account under which the program runs (root) has a core file size limit of zero bytes. There are a few ways to fix this, and I picked what to me, was the simplest solution: in the Lua script that runs the programs, set the core file size to “unlimited.” And this is easy enough to do:

proc = require "org.conman.process"
proc.limits.hard.core = "inf"
proc.limits.soft.core = "inf"

Slight digression: you can set various resource limits for things like maximum memory usage to core file size. The hard limit normally can't be changed, but the soft limit can—any process an lower a limit. But a process running as root can raise a limit, and raise the hard limit. Since the program I'm running is running as root, setting both the hard and soft limits to “infinity” is easy.

But there was still a disturbing lack of core files.

I checked the code of the Lua module I was using, and yes, I flubbed the parsing code. I made the fix, my tests showed I got the logic right, installed the updated module and still, no core files.

I did a bunch more tests and checked off the following reasons for the lack of core files: it wasn't because the program dropped permissions; it wasn't because the program couldn't write the core file in its current working directory; and the program is not setuid. It was clear there was something wrong the module.

I was able to isolate the issue to the following:

struct rlimit limit;
lua_Number    ival;

/* ... */

if (lua_isnumber(L,3))
  ival = lua_tonumber(L,3);

/* ... */

if (ival >= RLIM_INFINITY)
  ival = RLIM_INFINITY;
  
limit.rlim_cur = ival;

Now, lua_Number is of type double (a floating point value), and imit.rlim_cur is some form of integer. ival was properly HUGE_VAL (the C floating point equivalent of “infinity”) but limit.rlim_cur was 0.

But it worked on my home system just fine.

Then it dawned on me—my home system was a 32-bit system! That was the system I did the patch and initial test; the systems at work are all 64-bit systems. Some digging revealed that the definition of RLIM_INFINITY on the 64-bit system was

((unsigned long int)(~0UL))

or in other words: the largest unsigned long integer value. And on a 64-bit system, an unsigned long integer is 64-bits in size.

I do believe I was bit by an IEEE 754 floating point implementation detail.

Lua treats all numbers as type double, and on modern systems, that means IEEE 754 floating point. A double can store 53-bit integers without loss, and on a 32-bit system, you can pass integer values into and out of a double without issue (32 being less than 53) and because I did my initial testing of the Lua module on a 32-bit system, there was no issue.

But on a 64-bit system … it gets interesting. Doing some empirical testing, I found the largest integer value you can store into a double and get something out is 18,446,744,073,709,550,591 (and what you get out is 18,446,744,073,709,549,568—I'll leave the reason for the discrepancy for the reader); anything larger, you get zero back out.

So, no wonder I wasn't getting any core files! I was inadvertantly setting the core file size to zero bytes!

Sigh.

Off to fix the code …

Wednesday, March 12, 2014

For now, until this can be automated

One of the tasks I do at work every day is to pull the latest updates of the several source repositories I have checked out and view the changes. It keeps me up to date. One particular change caught my eye:

r4245 | XXXXXXX | 2014-03-12 11:36:38 -0400 (Wed, 12 Mar 2014) | 1 line

update for Daylight Savings Time

Really?

We have networked computers, running the latest operating systems, and we're still manually updating the time zone? (Okay, to be fair, this is code to test code, but still …)

Now granted, getting the time zone information in a portable manner is not always that easy. In C, there is no direct way to obtain the timezone, and thus, you need to do something like:

time_t    now;
struct tm slocal;
struct tm sgmt;
time_t    local;
time_t    gmt;
double    zone;

now    = time(NULL);
slocal = *localtime(&now);
sgmt   = *gmtime(&now);
local  = mktime(&slocal);
gmt    = mktime(&sgmt);
zone   = difftime(local,gmt);

zone is the number of seconds from UT; divide by 3,600 to get the time zone (well, the quotient is the timezone, the remainder needs to be multiplied by 3,600 then divided by 60 to get the minutes).

And that's just to be “portable”—POSIX (read: most modern Unix systems these days) include a way to obtain the timezone more directly, just call tzset() and the global variables extern char *tzname[2] and extern long timezone are initialized.

You don't need to hardcode a timezone.

But I was curious, and I checked the log for the file in question:

r4245 | XXXXXXX | 2014-03-12 11:36:38 -0400 (Wed, 12 Mar 2014) | 1 line

update for Daylight Savings Time
------------------------------------------------------------------------
r3889 | XXXXXXX | 2013-11-04 13:21:02 -0500 (Mon, 04 Nov 2013) | 1 line

Support for XXXXXXXX. Changed the Manual UTC offset constant to reflect DST
change. Ran a couple tests and they were all passing after making the
change.
------------------------------------------------------------------------
r3245 | XXXXXXX | 2013-03-07 15:20:00 -0500 (Thu, 07 Mar 2013) | 1 line

Fixing utc offset for day-light savings shift.
------------------------------------------------------------------------
r2923 | XXXXXXX | 2012-11-05 11:30:04 -0500 (Mon, 05 Nov 2012) | 1 line

Adjust time offset value for daylight savings.
------------------------------------------------------------------------
r1827 | XXXXXXX | 2012-03-12 12:08:41 -0400 (Mon, 12 Mar 2012) | 1 line

Update for daylight savings time.
------------------------------------------------------------------------
r1154 | XXXXXXX | 2011-11-14 19:28:32 -0500 (Mon, 14 Nov 2011) | 1 line

Remove unneeded constants.
------------------------------------------------------------------------
r1091 | XXXXXXX | 2011-11-04 19:32:51 -0400 (Fri, 04 Nov 2011) | 1 line

Adjusting UTC_OFFSET for day light savings.

And the punchline? The comment above the timezone constant:

// UTC Offset (for now until this can be automated)

which was added in April of 2011.

Wednesday, March 26, 2014

Plumbing the depths

There are some plumbing issues at Chez Boca (sometimes, the water backs up into the bathrooms) that have required some trained intervention to fix, although now we can pretty much manage the situation. But still, it happens just often enough that we felt it required a bit more investivation.

So we called Johnson Plumbing & Air (disclaimer: I know the owner, and am good friends with the owner's son) to take a look. They arrived today with their PipeCam™, a specialized plumber's snake with a small flashlight shaped camera (and lights) on the end.

[The name of PooperSnooper was deemed too inappropriate] [The viewscope—the odd shape of the image is due to the difference in speed between the camera shutter and the refresh rate of the monitor]

Considering the age of the house (built in the early 70s) and the material of pipe (cast iron), the pipe appeared to be in decent shape, and it wasn't quite as nasty as I expected it to be.

[Not that I would want to crawl through this pipe or anything]

The PipeCam™ made it easy to isolate which branch of the plumbing had issues. They snaked the camera from an access point next to the front door up into the house. At the first junction, they had Bunny turn on the garage sink to confirm that branch of the plumbing. At the second junction, a four-way intersection, it was easy enough to test the master bathroom (left branch), the kitchen (straight ahead) and the guest bathroom (right branch). The water came quickly from the master bathroom and kitchen, while the water from the guest bathroom took its own sweet time to come though carrying a large wodge of bathroom tissue (splat—“Eeeew!”).

And they were able to locate the junction inside the house with the use of this odd looking gun:

[Don't expect any earth-shattering kabooms]

They pointed it towards the ground and based on the sounds emitted, they could locate the camera and even tell the direction the camera was pointed in. It's a pretty cool setup.

The upshot—there's a dip in the pipe from the junction to the guest bathroom where water (and … um … “particulate matter”) accumulates. If too much … um … “particulate matter” accumulates, you get a blockage. The best solution, which does not involve tearing up the floor of the family room, is to run new pipes around the outside of the house to the main sewer at the street.

Friday, March 28, 2014

“Notice something? Yeah, Episode I is gone.”

Whatever your reason, if you are showing someone the official editions of Star Wars for the first time (no Phantom Edits), you have to make a decision about which order to show the films.

Now I'd like to modify this into what I've named Machete Order on the off chance that this catches on because I'm a vain asshole.

Next time you want to introduce someone to Star Wars for the first time, watch the films with them in this order: IV, V, II, III, VI

Notice something? Yeah, Episode I is gone.

I recently discovered my college-aged brother-in-law's girlfriend had never seen any Star Wars films and wanted to watch them all over winter break. Armed with the new Blu-rays, we all went about watching them, and I showed them in Machete Order. It actually works even better than I originally anticipated—it's almost as if this is somehow the intented order. There's a great pattern here, taking the viewer on a series of emotional ups and downs. IV ends with a victory that seems to have some sinister undertones, then V is dark and unresolved with a cliffhanger, II ends with victory with sinister undertones, then III is dark and unresolved with a cliffhanger again. It works incredibly well, and when III ended everyone demanded we immediately watch VI to see how everything gets tied up.

I asked her if she found Jar-Jar annoying and she asked “who’s Jar Jar?” Mission accomplished.

Via Violet Impudence, Absolutely No Machete Juggling » The Star Wars Saga: Introducing Machete Order

There's not much to say about this other than “you must read this” (that is, if you at all a fan of Star Wars). The new ordering of viewing makes “Return of the Jedi” a much better film than it deserves to be (it's the weakest of the original trilogy) and resolves both Luke's and Anakin's storylines from the previous four films.

Monday, March 31, 2014

So how does one bootstrap a development system from the command line?

A few years ago I mused about bootstrapping a development system under MS-DOS from the command line. Now, I personally haven't done that, but I can see how it could be done.

But Edmund Evans came close to doing just that (link via Hacker News). He “cheated” by having a program that converted hex codes to binary. It's not that bad though, under Linux, you have a bit of an easier time generating binary data:

/bin/echo -e "\177\105\114\106\001\001\001\000..." >hex1

(it's coincidental that this method also uses octal values instead of hex—Unix began life in an octal environment).

That small quibble aside, Edmund did the bootstrapping procedure pretty much how I envisioned it.

And in following a few more links from the Hackers News commentary, I see that Kragen Sitaker referenced my previous entry and did the initial bootstrap (making a program to read text into binary) from the MS-DOS command line (how odd—that mailing list with only one member).


A diner the Rat Pack would love

Twenty years ago, back when I was in college, my friends and I would often eat at the Boca Diner. The primary reason: it was open 24-hours and it wasn't Denny's. It's not that Denny's is bad, but really, it's the type of place that you end up at, not a place you set out to go to (if you get my drift). Also, the food was better and it had a wider selection. And it didn't hurt anything that it was a few blocks closer to FAU.

Alas, that was then—this is now. The Boca Diner is still around, but it is no longer 24-hours (so I want to know how can it still call itself a “diner?”, but I digress) and thus, we are back to Denny's, the type of place you end up at, not a place you set out to go.

But a few days ago Bunny noticed The Flashback Diner, south of the Boca Diner by about a mile, that is open 24-hours. This is a place we had to try out.

This is no ordinary diner.

[This gives off a distinct Rat Pack Vegas Vibe]

Marble topped tables. Straight back chairs. Low mood lighting. An actual bar! It even has a glass waterfall for crying out loud!

[All we're missing is the grand piano and torch singer]

And I'm still not sure how I feel about the television sets in each booth.

[A remote?  Really?  The TV is right there, and we need a remote?  Wait?  Why do we really need a private TV in the booth?  What have we become as a nation?]

And the menu doesn't exactly scream diner either. The food is too upscale for a diner. And the prices are a bit high for a diner. I'm beginning to wonder why this place bills itself as a diner. I mean, the only thing it has so far in common with a diner is that it's open 24-hours. I mean, I could almost buy this if it were in Las Vegas, but we're not—we're in Boca Raton, Florida. Yeah, it's an upscale type of town, but not quite this upscale … I think.

Anyway, we place our orders. Bunny ordered the pain perdu avec saucisse and I ordered the poisson-frites. I'll admit, the food looked good.

[Yup, it's French toast and sausage] [It's not proper fish-n-chips.  For one thing, it's not served in newspaper …]

Bunny's meal was really good, and with hindsight being 20/20, I should have ordered that. The fish-n-chips … well … this was the first time I actually had to return a fish-n-chips order back because it was basically sushi-n-chips. The manager was very apologetic, took my meal off the check and returned with properly cooked fish-n-chips. The second dish was okay; I think their choice of fish (dolphin) was ill-suited for this application (cod is more appropriate) and I doubt I'll order this again.

The desserts though … oh my!

[9′ high, 12′ across and all cake]

We're talking an embedded pastry shop here. Gigantic cakes. Huge cookies. Donuts. Muffins. Pies. It was a fantastic selection of desserts. What we did order (turtle cheesecake) was, in the words of Bunny, “to die for.”

It was heartening to see we weren't the only patrons there at 10:30 pm on a Monday night, and it was even better to see several parties arrive after us. It wasn't crowded, but it was lively enough to think they'll keep the place open 24-hours for a long time to come.

And we'll definitely go back.


This is not your father's Ford Pinto

We believe these changes will also help prevent a fire resulting from an extremely high speed impact that tears the wheels off the car, like the other Model S impact fire, which occurred last year in Mexico. This happened after the vehicle impacted a roundabout at 110 mph (177kmh), shearing off 15 feet (4.5m) of concrete curbwall and tearing off the left front wheel, then smashing through an eight foot tall buttressed concrete wall on the other side of the road and tearing off the right front wheel, before crashing into a tree. The driver stepped out and walked away with no permanent injuries and a fire, again limited to the front section of the vehicle, started several minutes later. The underbody shields will help prevent a fire even in such a scenario.

Via Instapundia, Taking Tesla safety to the extreme | Business Spectator

Wow. That's certainly a far cry from the Ford Pinto.

Tuesday, April 08, 2014

Right now, it would take you about 5 seconds to start screaming in terror

So I'm checking my iPhone™ at 2:20 PM when I notice that the weather is hot and windy, and oh, it will take me approximately twenty-three minutes to drive home if I so choose.

[It's also going to scare the bejesus out of me later on tonight]

I'm not sure how I feel about this. I mean, aside from the fact that my phone is subliminally telling me I should leave work, how does it know where I live?

Wednesday, April 09, 2014

I for one welcome our new silicon overlords

I was curious enough to check before driving to the office:

[Rod Serling is behind this, I know it!]

It knows!

Saturday, April 19, 2014

You too can be a patron of the arts.

I would probably be remiss if I didn't mention the chance that Sean Hoade is giving you, yes you, to become a benevolent benefactor of a starving artist, namely, Sean Hoade himself.

His Elevated Personage put out a question on Facebook the other day, asking if anyone would be interested in helping a poor boy survive long enough to write his next book on the 10-book contract while he waits on word back from 107,642 applications he has sent in to various unsuspecting suckers potential employers. This “job” that he is trying to get would be to take him to the beginning of Q2 of 2015, when the royalties should start flowing like extremely inexpensive “wine drink” since the first and possibly the second books will have been released in Q1.

Help keep a writer alive while he writes a Lovecraftian epic! | Indiegogo

Remember, just a few pennies a day could help feed a starving artist in Las Vegas as he plumbs the eldritch horrors to craft his C'thululian writings.

And now a song from troubador and heartstring-puller Sarah … McLachlan play it while you decide on what amount to donate. … While she sings, imagine me begging for someone to adopt me … I’m almost housebroken … Won’t you … REMEMBER ME? sniff!

Help keep a writer alive while he writes a Lovecraftian epic! | Indiegogo

I mean, really! Can you turn him down?

[Who's a good boy?  Who's a good boy?  Yes,YOU'RE a good boy! Here's some money!]

So please, donate. Even just a few dollars could really make a difference in his life. And keep the C'thululian horrors at bay.

Update Monday, April 21st, 2014 in the mid-afternoon.

Hoade had second thoughts.

Update at 2:49 AM, Wednesday, April 23rd, 2014

Hoade had third thoughts.

Tuesday, April 22, 2014

The Computer Is Your Friend, Citizen!

I'm sitting in the Ft. Lauderdale Office of the Corporation, using the Lookout email client when it throws up this obnoxious message that my pasword expires in thirteen days.

Your password will expire in 13 days! Please hurry up and change it now! Now! Change it! CHANGE IT! You don't want to be caught with an expired password two weeks from now? Do you? Then what? You'll be without email, that's what! And guess what? To change your email password requires sending an email! But you can't! Because your password expired! Even though it won't expire for two weeks, I'll remind you every ten minutes to change it, because … well … XXXXXXX CHANGE IT ALREADY!

Okay, so it's not quite that obnoxious, but still, I find it annoying that it'll remind me several times a day that my password will expire. And the thing is—we have a 90-day expiration date for email passwords. Only it's not really 90 days, but 77 days if you don't want to look at the obnoxious “UPDATE ME” message.

Gaaaah!

I used to ignore it until a three days or so when this policy was first mandated, but now, I just give in and change my password when the computer wants me to change my password. I'm not in charge here, the computer is. Or rather, the Lookout server is in charge. Me? I just rotate through the same X passwords because coming up with a new password that meets the minimum standards of:

Minimum of six characters, but a maximum of five characters, all of which must be unique, at least seven of them must be alphabetic in nature, two must be numbers, and at least as many punctuation characters as there are vowels used, unless you used no vowels, then the maximum number must be no greater than the number of numbers used minus upper case characters.

Yeah, I just came up with X passwords that pass muster, wrote them down on a piece of paper (which if I'm caught with by Corporate Security results in no less than five hours spent in front of a “web seminiar” on “Computer Security And You! The Top Ten Things You Must Do To Ensure a Happy And Secure Computer.”

Sigh.

Yes, this bothers me just as much as that little number in the upper corner of the App Store icon on my iPhone, reminding me, taunting me, that I haven't updated in the last twenty minutes.

And here I thought computers were to serve our needs …


Stupid MyPlusFaceSpaceGoogleBook

First it was the death of my Stupid Twitter Trick, and now, three years later, the MyPlusFaceSpaceGoogleBook interface is kaput.

Sigh.

Now to figure out what got borked.

Update a few minutes later

Okay, my server doesn't like the secure certificate that MyPlusFaceSpaceGoogleBook is presenting.


Stupid MyPlusFaceSpaceGoogleBook, part ][

The error I was getting from libcurl (which I use to inform MyPlusFaceSpaceGoogleBook I've updated this blog) was:

curl_easy_perform(AUTH) = problem with the SSL CA cert (path? access rights?)

Okay, so there is some certificate authority that OpenSSL doesn't like now (probably because of the heartbleed bug which didn't affect my server since I'm running a pre-heartbleed-bug-enabled version of OpenSSL). Curious as to where this information was stashed, I ran strace on mod_blog and found a list of certificate authories in /usr/share/ssl/certs/ca-bundle.crt (you can tell I'm well versed in this stuff if I'm resorting to debugging tools to locate this information).

So it looked like it was time to update that file. Well, seeing how OpenSSL was written by monkeys (no, really), the current format for ca-bundle.crt is now vastly different from the format I'm using for ca-bundle.crt, enough to cause this:

CRASH(20409/000): pid=20409 signal='Segmentation fault'
CRASH(20409/001): reason='Address not mapped for object'
CRASH(20409/002): address=0x9
CRASH(20409/003): CS=0073 DS=007B ES=007B FS=0000 GS=0033
CRASH(20409/004): EIP=00BE42BC EFL=00010246 ESP=BFEE7608 EBP=BFEE7628 ESI=08430EB8 EDI=00000000
CRASH(20409/005): EAX=B7F006C0 EBX=00CBBFF4 ECX=00000068 EDX=00000001
CRASH(20409/006): UESP=BFEE7608 TRAPNO=0000000E ERR=00000004
CRASH(20409/007): STACK DUMP
CRASH(20409/008):        BFEE7608:                         00 00 00 00 00 00 00 00 
CRASH(20409/009):        BFEE7610: B8 6A 46 08 C0 06 F0 B7 68 00 00 00 F4 B2 19 00 
CRASH(20409/010):        BFEE7620: C8 6A 42 08 68 00 00 00 58 76 EE BF BC B6 17 00 
CRASH(20409/011):        BFEE7630: 65 6F 42 08 01 00 00 00 68 00 00 00 B8 0E 43 08 
CRASH(20409/012):        BFEE7640: B7 6A 46 08 00 00 00 00 57 B6 17 00 F4 B2 19 00 
CRASH(20409/013):        BFEE7650: C8 6A 42 08 68 F1 42 08 F8 76 EE BF 0D DC 18 00 
CRASH(20409/014):        BFEE7660: C8 6A 42 08 01 00 00 00 65 6F 42 08 68 00 00 00 
CRASH(20409/015):        BFEE7670: 14 F3 42 08 00 00 00 00 68 00 00 00 00 00 00 00 
CRASH(20409/016):        BFEE7680: C8 6A 42 08 C8 6A 42 08 00 00 00 00 00 00 00 00 
CRASH(20409/017):        BFEE7690: 67 43 57 53 A9 6A 46 08 63 6F 42 08 E4 76 EE BF 
CRASH(20409/018):        BFEE76A0: A8 76 EE BF 00 00 00 00 2D 21 C5 00 1F 00 00 00 
CRASH(20409/019):        BFEE76B0: 63 6F 42 08 02 00 00 00 02 00 00 00 D9 47 19 00 
CRASH(20409/020):        BFEE76C0: 01 00 00 00 01 00 00 00 00 00 00 00 C8 6A 42 08 
CRASH(20409/021):        BFEE76D0: C4 F2 42 08 01 00 01 00 F8 76 EE BF 28 E1 18 00 
CRASH(20409/022):        BFEE76E0: 01 00 00 00 68 00 00 00 18 C3 18 00 F4 B2 19 00 
CRASH(20409/023):        BFEE76F0: 68 F1 42 08 C4 F2 42 08 38 77 EE BF AF ED 18 00 
CRASH(20409/024):        BFEE7700: 68 F1 42 08 27 77 EE BF                         
CRASH(20409/025): STACK TRACE
CRASH(20409/026):        ./build/boston[0x805d7b8]
CRASH(20409/027):        ./build/boston[0x805df94]
CRASH(20409/028):        /lib/tls/libc.so.6[0xbb79b0]
CRASH(20409/029):        /usr/lib/libcurl.so.3(Curl_client_write+0x70)[0x17b6bc]
CRASH(20409/030):        /usr/lib/libcurl.so.3(Curl_readwrite+0x1905)[0x18dc0d]
CRASH(20409/031):        /usr/lib/libcurl.so.3(Curl_perform+0x2b3)[0x18edaf]
CRASH(20409/032):        /usr/lib/libcurl.so.3(curl_easy_perform+0x3d)[0x18f242]
CRASH(20409/033):        ./build/boston(notify_facebook+0x39c)[0x805a000]
CRASH(20409/034):        ./build/boston[0x8050745]
CRASH(20409/035):        ./build/boston(main_cli+0x1cc)[0x80505f4]
CRASH(20409/036):        ./build/boston(main+0x147)[0x805243f]
CRASH(20409/037):        /lib/tls/libc.so.6(__libc_start_main+0xd3)[0xba4e93]
CRASH(20409/038):        ./build/boston[0x804ce15]
CRASH(20409/039): COMMAND LINE
CRASH(20409/040):        ./build/boston
CRASH(20409/041):        --config
CRASH(20409/042):        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
CRASH(20409/043):        --cmd
CRASH(20409/044):        NEW
CRASH(20409/045):        --update
CRASH(20409/046):        NEW
CRASH(20409/047):        --file
CRASH(20409/048):        /tmp/e
CRASH(20409/049): ENVIRONMENT
CRASH(20409/050):        [redacted]

Woot! Way to go, OpenSSL!

So updating ca-bundle.crt is a “No go!”

The next option?

curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,0); /* in other words, no validation */

It's not like what I post on the Internet is private. And there are no errors nor crashes. Hopefully, this is enough to fix the issue.

Update a few seconds later

Nope. No error. But no MyPlusFaceSpaceGoogleBook update. Grrrrrr …

Update at 2:06 AM, Wednesday, April 23rd, 2014

Okay, I stupidly removed the code that sent the authenticated token from MyPlusFaceSpaceGoogleBook back to MyPlusFaceSpaceGoodBook. All is right with the world now.

Wednesday, April 23, 2014

You too can be a patron of the arts, take II

I would probably be remiss if I didn't mention the chance that Sean Hoade is giving you, yes you, to become a benevolent benefactor of a starving artist, namely, Sean Hoade himself.

I'm a starving writer, yet a bit overweight. But that's just from eating cheap food and also to fill the emptiness of my being while I struggle to get TEN books finished for my publisher over the next THREE years. Have a look at my video, won't you? This is going to be a great project, and I would really appreciate—and will reward with sanity-shattering surprises— your support!

Support Sean Hoade creating Nine novels

Remember, just a few pennies a day could help feed a starving artist in Las Vegas as he plumbs the eldritch horrors to craft his C'thululian writings.

I mean, really! Can you turn him down?

[The book, the beard, the fez. The Hoade]

So please, patronize him. Even just a few dollars could really make a difference in his life. And keep the C'thululian horrors at bay.

Friday, April 25, 2014

It's never Lupus.

Both my iPhone and iPad were taunting me. “There's an update! Update us! Update your precious! Preeeeeecious … ”

Why yes, I am a slave to the machine.

I downloaded and install the latest iOS for both—7.1.1. Two hours later, both devices were running the latest and greatest.

Only the wireless net-work-ing … was … … very … … … s … l … … o … … ‥ … w. Like 300 baud slow. Maybe 110 baud.

Did I mention it was slow?

I did a bunch of searches, using terms like “iOS 7.1.1 slow” and “iOS 7.1.1 sucks” and “why the XXXX is iOS 7.1.1 so XXXXXXX slow?” and most of the answers (when I could find them—there were very few incidents reported) were variations on “shut down all running apps,” “disallow background upgrading,” “disable location services,” to “restore factory settings, then restore from backup. That's the only way to make sure.”

Okay.

Shut down all apps—wireless networking still slow.

Disallowed background upgrading—wireless networking still slow.

Disabled location services—wireless networking still slow.

Sigh.

An hour to restore factory settings and reload everything back onto the iPhone and iPad. Wireless networking still slow.

XXXX!

It was then that Bunny came in. I got her up to speed, and she asked if it could be the wireless router. “Well, in theory it could be, but what ever happened would have had to happen in the past day or two,” I said.

“Because my Mac laptop is slow,” she said.

“Oh really?” I asked.

“Really.” The wireless networking on her Mac laptop was slow. “It's been that way for some time now,” Bunny said. “And I haven't upgraded any time recently.”

Yup. Slow. I shut down all the running programs (she tends to leave email and a browser running all the time). Still slow. Okay, I plugged in a network cable and the networking afterburners kicked in, bits flying around so fast the sonic booms were deafening.

So it definitely was something with the wireless router. It's been sitting there on a shelf for a year or two, just doing its thing. So, operating under the assumption that it hadn't changed, but something else in the environment did. A quick scan showed a new wireless access point nearby—perhaps interference?

A quick aside: all wireless routers can transmit on 11 different channels, and by default, they are all configured to broadcast on channel 6. My wireless router was broadcasting on channel 6.

Hmm … change the broadcast channel. Bunny's Mac is now fast.

That couldn't … no … couldn't be it, could it?

iPhone, fast.

iPad, fast.

Well. There it is.

Saturday, April 26, 2014

Just because there's a standard doesn't mean it's consistent

I came across this URL today that has some base64 encoded data in it. Curious as to what it might be, I tossed the data into a base64 decoder only to have it reject the data as bad.

Okay. It certainly looks like base64 encoded data. But the data doesn't match the RFC-2045 specification. Don't tell me there's more than one … oh for heaven's sake! Really? Thirteen variations?

Standards! There are so many to choose from!


An unexpected feature

As I was writing the link to RFC-2045 in the previous post, an idea suddenly struck me—why should I have to type out the entire URL? I already have a shortcut to link to Amazon (all I have to do is write a link like <a href="asin:B00BWQW73E"> and mod_blog converts it to <a class="book" href="http://www.amazon.com/exec/obidos/ASIN/B00BWQW73E/conmanlaborat-20">) so it shouldn't be that hard to add.

I was fully expecting it to take maybe fifteen minutes or so to add the code, but to my surprise, no code change was required! The configuration file has this bit:

affiliate =
{
  {
    proto = "asin",
    link  = "http://www.amazon.com/exec/obidos/ASIN/%s/conmanlaborat-20"
  }
}

It was originally intended for affiliate links, but it'll work for this as well. A slight modification:

affiliate =
{
  {
    proto = "asin",
    link  = "http://www.amazon.com/exec/obidos/ASIN/%s/conmanlaborat-20"
  },
  {
    proto = "rfc",
    link  = "http://www.ietf.org/rfc/rfc%s.txt"
  },
}

Now all I have to do is write <a href="rfc:2045"> and mod_blog will convert it to <a href="http://www.ietf.org/rfc/rfc2045.txt">. I love it when stuff like this happens.


Beware typosquatting

When I initially added the links to the IETF RFC database I made a typo. Instead of linking to “I-E-T-F dot O-R-G” I instead typed it as “I-E-F-T dot O-R-G” and … wow. Easily a dozen redirects, probably half a dozen attempts to infect my computer and landing on some company website I never heard of hawking seminars to help you pass Cisco training and certificaitons.

Shudder.

Thursday, May 01, 2014

The laptop computer is not to be used as a serving tray.

From
The Office Manager of the Ft. Lauderdale Office of the Corporation
To
The Ft. Lauderdale Office of the Corporation
Subject
Seating Arrangements for Today 5/1
Date
Thu, May 01, 2014 10:11 -0500

Hello Everyone,

Just an FYI today in regards to seating arrangements; our space is limited, so I have made the following changes for today:

I wouldn't mind so much, but I find the excessive levels of mastication distracting.

Sunday, May 04, 2014

May the Fourth

Even though “Star Wars” premiered on May 25th (1977), Star Wars Day is apparently, for some odd reason, today. I don't quite understand why.

But to help celebrate the day, Bunny made my friends and me a cake.

[Favored transport of Invading Sith Lords everywhere]

And in case you can't make it out exactly, it is one of these:

[All Terrain Armored Transport]

May the force be—oh wait a second!

Monday, May 12, 2014

The Five Dollar Milkshake

That's a pretty XXXXXXX good milkshake. I don't know if it's worth five dollars but it's pretty XXXXXXX good.

Vincent Vega (“Pulp Fiction”)

It's not a five dollar shake, but nine dollars. It's not Jack Rabbit Slim's, but the Flashback Diner. And it still doesn't have bourbon.

[“Did you order a nine-dollar shake?” “Sure did.”]

And my god is it big. That sucker is about 9″ across and about that tall. I'm not sure if it was worth nine dollars, but it was pretty XXXXXXX good.

Tuesday, May 13, 2014

The laptop computer is still not a serving tray

Two weeks ago, my office was the temporary lunch room. Now, the lunch room is my temporary office.

The Ft. Lauderdale Office of the Corporation is expanding into the space next door. Because of that, an existing wall needs to be removed, and a non-existing wall needs to be constructed. Both walls simultaneously exist (currently separating the two spaces) and not-exist (to separate my office from the space next door) in my office. Thus, I am sitting in the conference room/lunch room for the forseeable future.

I've grown accustomed to the excessive levels of mastication though.

Wednesday, May 14, 2014

If we built ships like we built software—oh wait a second

Even though I'm a programmer, I can certainly relate to these 17th century ship builders (link via Flutterby).

Friday, May 16, 2014

A failed programming experiment

I have a Lua module that embeds a C compiler (and there's an extension module that allows you to load a Lua module straight from C code) which allows you to embed C code inside Lua code and compile it directly into memory:

cc = require "org.conman.cc"

load = cc.compile('load',[[
#include <lua.h>

int load(lua_State *L)
{
  double load[3];
  
  getloadavg(laod,3);
  lua_pushnumber(L,load[0]);
  lua_pushnumber(L,load[1]);
  lua_pushnumber(L,load[2]);
  return 3;
}
]])

print(load())

I use it as a means to quickly test Lua functions in C without having to muck about with external files, C compilers and linkers. For that, it's wonderful except

Errors. If there's an error in the C portion, I get:

[spc]lucy:/tmp>lua load.lua 
tcc: <string>:7: error: 'laod' undeclared

Yeah, the line number is correct as far as it goes—it's in line 7 of the code, but the actual line number is 10 of the file. Okay, in this case, I can do a simple search on “laod” but for instance, this error:

[spc]lucy:/tmp>lua load.lua 
tcc: <string>:10: error: ';' expected (got "lua_pushnumber")

It's actually line 12 of the file.

A recent message to the Lua mailing list reminded me that it is, indeed, possible, to get what I want from the output:

[spc]lucy:/tmp>lua load.lua 
tcc: load.lua:12: error: ';' expected (got "lua_pushnumber")

and that's by using the #line C preprocessor directive. It's a relatively straightforward matter to add such a line in Lua—just generate a proper #line directive and concatenate the code to it before feeding it to the compiler. Getting the line information from Lua is, again, straightforward:

static const char *itcc_add_line_info(lua_State *L,int idx)
{
  lua_Debug info;

  /*------------------------------------------------------
  ; get caller info and return linenumber and source file
  ;-------------------------------------------------------*/

  lua_getstack(L,3,&info);  
  lua_getinfo(L,"lS",&info);

  /*-----------------------------------------------------------------------
  ; line number will be negative if it's a Lua function written in C or if
  ; the source can't be located.  If that's the case just return the
  ; original string, otherwise, prepend a #line directive and return the
  ; modified string.
  ;------------------------------------------------------------------------*/

  if (info.currentline > 0)
  {
    char   lineinfo[FILENAME_MAX + 32];
    size_t len = snprintf(
                        lineinfo,
                        sizeof(lineinfo),   
                        "#line %d \"%s\"\n",
                        info.currentline,
                        info.short_src
        );
    lua_pushlstring(L,lineinfo,len);
    lua_pushvalue(L,idx);
    lua_concat(L,2);
    return lua_tostring(L,-1);
  }   
  else
    return lua_tostring(L,idx);
}

Add the call to that function in the right spot, and voilà, you now have an uncle named Robert.

As I was coding this up and testing it, I realized something else—I don't always include the code as a literal to the function. Sometimes, I declare the code as a variable:

cc = require "org.conman.cc"

LOAD = [[
#include <lua.h>  

int load(lua_State *L)
{
  double load[3];
  
  getloadavg(load,3);
  lua_pushnumber(L,load[0]);
  lua_pushnumber(L,load[1])
  lua_pushnumber(L,load[2]);
  return 3;
}
]] 
   
load = cc.compile('load',LOAD)

print(load())

I do this when the C code is longer, or I have additional parameters to pass to cc.compile(). And in this case, the line number reported will be the call site (for the above example, line 18) instead of the actual error (line 12).

Well … darn.

It wasn't as easy as I thought it would be.

Tuesday, May 27, 2014

Musical Offices

Two weeks later and the lunch room is no longer my office (nor is my office the lunch room). It's nice to be back in my old office at The Ft. Lauderdale Office of the Corporation.

But I was told not to get too attached to my current office. Nope. Real Soon Now™ I am to be moved to a new office, just down the hall. Perhaps a day … perhaps two weeks.

On the plus side, I'll still have a window. Granted, the window has a wonderful view of the Ft. Lauderdale Office interior, but it's still a “window” office and it's not like it's any different from my current-soon-to-be-ex office.

Thursday, June 05, 2014

The Fishbowl

A little over a week later, and I'm in my new office.

[Edvard is a bit agitated over the office move]

Yes, it's a larger window, but I don't quite have as nice a view outside as I did in the old office.

[Edvard calmed down after a bit]

But given the larger window, and the fact that the office is in a more heavily trafficked part of the office, I now feel like I'm in a fishbowl awaiting food pellets from management.

Or something like that.

On the plus side, my current office is less likely to be the lunch room.

Saturday, June 07, 2014

Bill who?

The only thing Bill ever asked of me was that I not reveal he had worked on Pearls until all three of his strips had run. (And if you haven’t yet seen those three strips, they can be found HE RE, HE RE, and HE RE.)

Via Hacker News, Pearls Before Swine—The Blog O' Stephan Pastis

“Bill,” eh? Let's see this “Bill's” work …

[The drawing style in the middle panel looks familiar somehow …]
[… can't quite place my finger on it …]
[… it's not … it can't be …]

Oh. Yeah. That Bill! No need to hit you over the head with it.

[Then maybe Bill will continue with the strip!]

Then again …

[And please, follow the link to Hacker News, there are a lot more links to Bill Watterson goodness and it would save me the time to link to every single one of them.]

Monday, June 09, 2014

That darned Peg Game, Part III

Bunny and I were at the Cracker Barrel playing the ever ubiquitous Peg Game. As I was struggling with the game (I am phenomienally bad at that game—so bad I have my computer do it for me) when Bunny asked, “What's the maximum number of pegs you can leave on the board?”

That's an interesting question, and I was curious if there is any way to do worse than ten pegs left.

Well, I forced my computer to play a bazillion times and the results are interesting: ten pegs are the most pegs you can have left on the board. What's more interesting is that discounting rotations and reflections, there is only one way to leave ten pegs on the board (six if you want to count reflections, rotations and reflected rotations as distinct).

Even eight pegs is pretty darned tough as well, with only two solutions (or twelve if you include rotations, reflections and rotated reflections).

So, if leaving one means you are a genius (and there are several thousand ways to leave just one peg), what does it mean to leave ten?

Sunday, June 22, 2014

Selling out, part deux

Five years ago, I sold some advertising space on my blog and frankly, I think I got the worse end of the deal. For five years (until June 10th of this year) I sold ads on seven posts, all for the huge amount of $105.00.

Hey, at least I negotiated him out of permanent placement for $75.00.

Given the ads, and their placement, I knew that the seller had no intention for anyone ever seeing the ads—he (and it was a “he”) just wanted to leech some Google PageRank to his sites (or his clients' sites), and he wanted it done stealthily because he didn't like my heading of “Paid Advertisement” and instead suggested:

as a header, because

See, we are doing every thing for search engines and thats why we want to place links at the bottom of the pages, where the traffic has to be lower. The search engines dont like words advertisement or Sponsor, so, that will hurt your site as well as our sites.

That's why, we dont need paragraphs with the heading of words “Advertisement” or “Sponsor.”

So, please use anyother word or make it image with out Alt Tag.

I countered with:

We finally settled on “And now some words from <company name>” but I did add a subtle background image of a dollar bill, and labeled the <DIV> with “paid_ad”.

Now, earlier this year, I received the following email from a potential advertiser:

From
helena jones <XXXXXXXXXXXXXXXXXXXXXXXX>
To
sean@conman.org
Subject
Advertising on conman.org
Date
Sat, 25 Jan 2014 12:43:44 +0800

Hello,

I'd like to inquire if it's possible to purchase adverting space on your website.

If there is any space available please let me know and we could discuss further details.

Looking forward to your positive reply.

Warm regards,
Helena Jones

I get emails like this from time to time, and usually, I just ignore it and never hear from them again. But a month later …

From
helena jones <XXXXXXXXXXXXXXXXXXXXXXXX>
To
sean@conman.org
Subject
Fwd: Advertising on conman.org
Date
Fri, 21 Feb 2014 09:56:46 +0800

Hi

I just wanted to check if you got my email about buying advertising space on your site. Looking forward to hear from you.

Best regards,
Helena Jones

[previous email she sent cut]

Hmm … okay, she's persistent. Let's see what the terms are.

From
Sean Conner <sean@conman.org>
To
helena jones <XXXXXXXXXXXXXXXXXXXXXXXX>
Subject
Re: Fwd: Advertising on conman.org
Date
Thu, 20 Feb 2014 21:47:09 -0500

It depends upon the advertising you want, and the pages you want to place the ads on. I'm not averse to the idea of advertising. What did you have in mind?

-spc

And a few days later I receive:

From
Adam Barney <XXXXXXXXXXXXXXXXXXXXXX>
To
sean@conman.org
Subject
Advertising on conman.org
Date
Sun, 23 Feb 2014 17:50:34 +0200

Hello

my name is Adam Barney and I'm working with Helena Jones She sent you an email about advertising on your site

I represent a few gambling sites and I would like to make a permanent article in your site. I can assure you I have a brilliant writer and the article will fit the content of your site.

If it possible let me know your price for it

Best Regards,

Adam Barney
Senior Marketing Manager | XXXX XXXXXX
XXXXXXXXXXXXXXXXXXXXX
Adam@XXXXXXXXXXXXXXXXX
<http://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX>

Ah, the punctuation deficient. [facepalm] And gambling sites. [double facepalm] And a brilliant writer to boot! [is a triple facepalm possible?] Okay, I have really lost interest in this. But at the same time, I'm curious as to what brilliance this author can bring to bear about gambling sites that would enhance the content of my website (and bear in mind, I have no idea if he's talking about www.conman.org or boston.conman.org). So, let's see how serious this Adam is.

From
Sean Conner <sean@conman.org>
To
Adam Barney <XXXXXXXXXXXXXXXXXXXXXX>
Subject
Re: Advertising on conman.org
Date
Mon, 24 Feb 2014 02:42:37 -0500

It was thus said that the Great Adam Barney once stated:

Hello

my name is Adam Barney and I'm working with Helena Jones She sent you an email about advertising on your site

I represent a few gambling sites and I would like to make a permanent article in your site. I can assure you I have a brilliant writer and the article will fit the content of your site.

If it possible let me know your price for it

Without any other knowledge about the article (and not an advertisement), and making it permanent (seeing how I've had the domain since 1998, it could be a long time), at this point in time, with just the information given, I would have to set the price at $100,000.

I am interested in seeing how your article could fit in with the existing content of my site.

-spc

I never did hear back from Adam.

Color me surprised.

And yeah, this is probably a site you don't want to advertise on.


In pieces

Our friend Kurt, Bunny and I headed to the Art and Culture Center of Hollywood (Florida) for the Art of Nathan Sawaya featuring IN PIECES, a collection of sculptures made from Lego bricks.

[Yup, this is your typical art museum in Florida] [Little fluffy clouds] [Oh, so that's what my face looks like on the inside!] [He could have been a contender if he just wasn't boxed in] [Lego skulls are the rage—crystal skulls are just so passé these days] [It makes for a remarkedly quiet and clean pet] [I can't believe I ate the whole thing!]

Each sculpture was also used in a photograph by Australian photographer Dean West. I didn't really bother with taking pictures of the pictures, beacuse, well, taking a picture of a picture is just silly talk.

Besides, we came for the Lego bricks, not pictures of Lego bricks.

[Portrait of the artist as Lego bricks] [This towel has just a tad too much starch in it] [The arm, the leg, and the pedistal are all Lego] [I'm crushing your head!] [The roof, the roof, the roof is on fire!]

Mr. Sawaya used kragle to hold the bricks together instead of just relying upon the inherent “snapness” (and I'm sure, to help keep everything together during transport—I mean, the instruction sheet for his self-portrait would rival the documentation to fully understand the Mac computer) and frankly, I don't think the clouds would fully stand up (or rather, float up) without the extensive use of kragle. I don't think the kragle use diminishes anything.

If you are near Hollywood, Florida, you should probably check it out while you still can.

Thursday, July 03, 2014

Tim's Vermeer

Bunny and I watched “Tim's Vermeer.”

In the documentary, Tim Jenison, wanted to paint a Vermeer, and he decided upon The Music Lesson. Now Tim is an engineer, an inventor and computer programmer. He is not an artist, and most certainly not a painter.

And he didn't just copy from the The Music Lesson painting. No, he recreated the entire room as it appears in the painting. He then mixed his own paints by hand—and by hand I mean “ground up the constiuent compounds and oils that made up paints in the 17th century.”

He then went on to grind his own lenses and mirrors, all to test a theory that Vermeer might have used some mechanical means of painting near-photorealistic paintings in the 17th century.

The results were spectacular! Tim, a non-artist, making a painting that rivals Vermeer himself.

It's worth watching to see the techique in action (the painting itself took about three to four months to do) and for the subtle visual clues that were found to exist in actual Vermeer paintings that show Vermeer might have used such a method.

Friday, July 04, 2014

Notes on a conversation held during a fireworks show

FWOOM!

POW!

“Oooooooooh!”

FWOOM!

[And the rocket's red glare, the bombs bursting in air,/Gave proof through the night that our flag was still there]

BOOM POP POP POP POP POP POP!

”Aaaaaaaahhhh!”

THWOM!

BABOOM!

“Oooooooooooooooooooooooh!”

“Hey, watch this!”

Fizzle. Fizzle. FWOOOSH THWACK-OOOM!

[Hollywood!  No person was harmed during the making of this photograph]

“Ow ow ow ow ow ow ow ow ow ow ow!”

“Eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeek!”

“Stop! Drop! Roll!”

“Extinguisher!”

“Medic!”

Fwooooooooooooooooooooossssssssssshhhhhhhhhhhhhhhhhhhhhh.

“Are you okay?”

“Yeah … tis but a minor burn. Man, that was fun! Let's do it again!”

Thursday, July 10, 2014

Masterpiece, copy, forgery—where is the line drawn?

Felice Ficherelli wanted a Vermeer.

Well, maybe.

Felice was a contemporary of Vermeer, an obscure painter whom he might have known, or might not have known—we really have no idea. This is all we know for sure:

Could this second painting—the copy, the duplicate—have sprung from the hand of Vermeer? Could it be the magical #37? Yes, if you believe Christie’s Auction House, which auctioned that very painting yesterday for $10.2 million. (You just missed your chance to have your own Vermeer!)

Why would Vermeer have copied an obscure Italian painting? Copying was quite common then, not only as an act of training, but also for financial gain. So perhaps Tim’s theory was right—Vermeer was a copier.

But why would a painting—a painting that absolutely no one disputes is a copy of someone else’s painting!—fetch $10 million?

That’s a good question.

Via Jason Kottke, This Is Not a Vermeer ™ — The Message — Medium

So far (part two) it's an interesting article about authenticity, duplicity and duplication. What, exactly, makes a copy of painting worth $10,000,000, and where you too, can get your own copy of a painting for way less then $10,000,000.

Thursday, July 24, 2014

Smooth Operator

Bunny and I were some one hundred yards from the mall entrance when we passed a booth. “Their products are really nice,” she said. “I bought some a few years ago.”

That's all it took, the slight pause by the booth, the positive comment about the cosmetic products, the serious lack of other customers nearby to provide adequate shielding and before either of us knew it, we found ourselves talking to Rafael, an impeccably dressed man, about 5′6″—a bit on the short side, but beautifully proportioned, with a hansome face framed by dark brown hair and perfectly groomed moustache and beard.

Oh, he was smooth. Within minutes he had us holding a jar of facial peeling gel and I couldn't help but notice him slip a bottle of moisturizing cream into one of Bunny's shopping bags, since it was a free gift for buying the gel.

But it was his three attempts at demonstrating some other cream for the eyes that turned Bunny away, and thus I got hit full force with the magnificence of Rafael's personality in selling unisex cosmetics. I too, got the jar of facial peeling gel, and as a free gift, a bottle of men's after shave balm, despite my attempted explaination that I rarely, if ever, shave.

Rafael just took it in stride, and before I knew it, I was rubbing a sea salt body scrub in my hands as Rafael was lightly spritzing water over them. And then, we had a bag with two jars of facial peel (his-n-hers), one jar of moisturizing cream, a bottle of men's after shave balm, a jar of the sea salt body scrub, a jar of “energizing” body butter, a bar of sea salt soap and in my hand, somehow, a slip of paper with Rafael's phone number and email address on it.

Tuesday, August 05, 2014

It doesn't have to be one piece to be monolithic

I'm still chugging away on “Project: Sippy-Cup” where, for the past few weeks, I've been hurrying up and waiting as we run through IOT with a few other companies.

The problem I've had with running tests here at the Ft. Lauderdale Office of The Corporation has been just the sheer number of moving parts required to test anything. “Project: Sippy-Cup” talks to component T, which talks to two other components, E and SM. SM talks to a few more components, and so on, and so on. It's difficult to stub these out because then time is wasted debugging the “fake” components and before you know it, you've written pretty much a duplicate component that is just as buggy as the component you are trying to fake, but with different bugs. So I try to use actual components whenever possible.

Only today I found out that the instance of component SM, for whatever reason, is refusing to talk to component T, which I'm using to test “Project: Sippy-Cup.” I've always attempted to use existing SM instances so I don't have to fire one up (when I first started, we didn't have our own SM component; it seems that in the few years I've been here, one has been written—fancy that!) and I've been afraid that something like this would crop up. So now I have to configure the SM component so that the T component is happy so that I can test “Project: Sippy-Cup.”

My complaints about this reached fellow cow-orker B, who wrote the following in email:

There's a word for software that requires every last piece of every last server to be running in order to test any part of it:

Monolithic.

B has a point. It doesn't have to be one piece to be monolithic.

Friday, August 15, 2014

ATM inside … ENJOY!

Bunny and I had a recomendation, and we were in the neighborhood, so we decided to give the Boynton Diner a try.

The food was okay, not exceptionally good to write about. I would not have given this former seafood restaurant (really—the decor just screamed “I AM A SEAFOOD RESTAURANT! LOOK ON MY WORKS, YE HUNGRY, AND DESPAIR!”) a second thought but for it's great attention to making money.

[They sold AD SPACE on their outdoor sign%#8253]

Checks? Really? You accept checks? You can't be bothered to accept credit cards? Debit cards? Checks?

Sigh.

It's nice that they have an ATM so they can get a nice cut of the $3 “convenience fee” when using it.

They also had placemats. They're not rare. A lot of restaurants have place mats. What a lot of restaurants don't have are placements crammed with advertising—every last millimeter.

Ads.

On the placemats!

At this point, it was surprising that were not running custom advertising on the televisions mounted around the restaurant (although I am loath to give them the idea).

Like I said, the food was okay and the service was good. It was just the incessant advertising that got to us.

Thursday, August 28, 2014

The wonders of restaurant cutlery

Bunny and I were out eating at a restaurant when I noticed something a bit odd about my cutlery—the butter knife was magnetized!

[The knife has a magnetic personality]

No other utensil on the table was thusly magnetized. Just the one butter knife. How odd.

Update on Tuesday, September 2nd, 2014

My friend Jason Vervlied sent me this:

I actually know why this happens.

When I was in my late teens/early 20's, late night dining at Denny's was a common occurrence, and we often noticed this there. We finally talked to a server about it and figured out why. It turns out, the trash bins they use for discarding waste food is lined with magnets to catch the silverware that is accidentally thrown away. Over time the knifes have such thick handles that they eventually become slightly magnetized themselves.

And know you know.

Tuesday, September 09, 2014

Notes about a first world problem

I'm driving into the office two hour earlier than usual because I have to participate in some interoperability testing. I pull onto I-95 and get into the inside lane as I usually do. Traffic is a bit thick, but it's flowing albeit a bit slower than I'm used to.

A few miles down the road, I see a state trooper giving a ticket. They got pulled over for speeding? I think to myself. At best traffic is moving at the posted speed limit. I keep driving.

A few miles further down, and again, off to the side are three unmarked state troopers, just sitting there. I know they're unmarked state troopers because each vehicle has red and blue lights mounted inside the windows. And to further hide the fact that they're unmarked state troopers, all the lights on all three vehicles are flashing. How odd, I think to myself. They pulled each other over?

About two miles short of the exit, I noticed that the other three lanes of traffic are significantly crowded, yet the inside lane I'm in is relatively free of cars. Not so free that I can zip down the interstate at a hundred and eight, but enough that I'm making excellent time compared to the cars in the other three lanes of traffic.

It's then I had an epiphany: I bet I'm in the HOV lane, I thought, just as I passed under the “HOV Lane, 7:00am—9:00am 4:00pm—6:00pm” sign.

Facepalm.


Notes about interoperability testing

So we're doing interoperability testing of “Project: Sippy-Cup” with two companies so far, Company-A and Company-E. Basically, it's testing to see if we accept their requests and they accept our replies and we're all on the same page as far as interpreting the results and what have you. And today isn't the first day we've done such testing—this is about the third or fourth time so far.

“Those responses are odd.”

“No wonder—you aren't sending the right phone numbers!”

“But we're sending 555-555-9901!”

“What? I thought it was 555-555-0001!”

“That's so yesterday! Didn't you get the memo outlining the new numbers to use?”

“No.”

“But we're using 555-555-9901.”

“Okay, let me make that change … okay, we're now using 555-555-9901.”

“Didn't you get the memo? We're using 555-555-4492.”

“But you were just—”

“No wait! New memo came in! Can you change the number of 555-555-2234?”

“Probably not before you change it again, but I can try … ”

And each time, the phone numbers used for testing have changed. Every. Single. Time. It seems as if Company-A and Company-E are incapable of using the same phone numbers for testing for more than 24 hours.

Tuesday, October 14, 2014

It makes you sound as if you are talking in a fake German accent

I'm sitting in the Ft. Lauderdale Office of the Corporation, using the Lookout email client when I receive the following:

Vishing is a socially engineered technique for stealing information or money from people using the telephone network. The term comes from combining “voice” with “phishing,” which are online scams that get people to give up personal or sensitive information about The Corporation. This may include impersonating another employee of the Corporation, your bank, law enforcement agencies or any government related organization via voice email, VoIP (voice over IP), or landline or cellular telephone.

Vishing?

Vishing?

Really?

Oh, I guess it's a thing now.

Sigh.

We already have a term for this—“phishing!” Or perhaps “social engineering?” How about “hacking” if you want to go old school 80s style terminology?

Good lord …

Sunday, October 26, 2014

The Painless Guide to CRC isn't quite painless

So there's this “A Painless Guide to CRC Error Detection Algorithms,” which apparently tells you everything you wanted to know about CRCs, but were afraid to ask (or didn't really want to ask). The concept itself seems to be easy—a CRC is just the remainder of a particular type of division. The numerator is the data (treated as one long number) and the demoninator the “polynomial” of the CRC (even though it's a value, the specification for a given CRC is a polynomial equation—go figure). The steps of the algorithm are very simple:

  1. Load the remainder with zero bits.
  2. Augment the message by appending zero bits (equal to the size of the remainder) to the end of it.
  3. While (more message bits)
    1. Shift the remainder left by one bit, reading the next bit of the augmented message into bit position 0 of the remainder.
    2. If a 1 bit popped out of the remainder during the previous step, XOR the result with the polynomial
  4. We now have the remainder.

The size of the remainder is the size of our CRC—16 for a 16-bit CRC, 32 for a 32-bit CRC, etc. And from that description, the code pretty much follows:

/**********************************************************
* Straightforward CRC implementation 
* Section 8 of the Guide
***********************************************************/

uint32_t crcsim(uint32_t crc,const uint8_t *p,size_t size)
{
  size_t   i;  
  int      c;  
  int      xor;

  while(size--)
  {
    c = *p++;
    for (i = 0 ; i < 8 ; i++)
    {
      xor = crc & 0x80000000uL;  /* flag if we need to xor the polynomial */
      crc = crc << 1;            /* shift the crc register */   
      crc |= (c & 0x80) ? 1 : 0; /* and shift in the data bit */
 
      if (xor)
        crc ^= 0x04C11DB7uL;
 
      c = c << 1; /* shift data bit */
    }
  }
  
  return crc;
}

Although, this is the rare case where it's easier to write it in assembly that it is in C, since we have access to the carry bit when shifting, which makes it easier to check:

crc32a          push    ebp		; boiler plate code for any
                mov     ebp,esp		; C callable code
                push    ebx
                push    esi
                push    edi

                mov     edx,[ebp + 8]   ; load passed in CRC
                mov     esi,[ebp + 12]  ; ptr to data
                mov     ecx,[ebp + 16]  ; count of data
                mov     edi,0x04C11DB7  ; CRC polynomial

.main           lodsb                   ; read next data byte
                mov     bl,8            ; # of bits to go through

.10             shl     al,1            ; shift data bit into poly register
                rcl     edx,1           ; shift high bit out of poly register
                jnc     .15             ; if it wasn't set, skip
                xor     edx,edi         ; xoring the CRC polynomial

.15             dec     bl              ; more bits?
                jnz     .10             ; if so, keep going
                loop    .main           ; do next byte

                mov     eax,edx         ; return CRC
                pop     edi             ; save pushed registers
                pop     esi
                pop     ebx
                pop     ebp
                ret

(Note: the core of the algorithm in assembly is four instructions---the C compiler didn't do quite as good a job from the six lines of C comprising the core of the algorithm---it's about six times the object code.)

What is not shown in the code above (either version) is the agumentation step of adding additional 0-bits to the message—that's left up to the caller of these routines.

Both of these routines give the same result. Other implementations I did based upon the Guide also give the same results. And they're consistent with the results of the reference code given in the Guide.

/*******************************************************************
* Table implementation
* Section 9 of the Guide
* Requires trailing zero bits.
********************************************************************/

const uint32_t crctable[256] = { ... };

uint32_t crc32z(uint32_t crc,const uint8_t *p,size_t size)
{
  while(size--)
    crc = ((crc << 8) | *p++) ^ crctable[crc >> 24];

  crc = (crc << 8) ^ crctable[crc >> 24];
  crc = (crc << 8) ^ crctable[crc >> 24];
  crc = (crc << 8) ^ crctable[crc >> 24];
  crc = (crc << 8) ^ crctable[crc >> 24];
  return crc;  
} 

/*****************************************************************
* Table implementation part deux---improved
* Section 10 of the Guide
* Does not need trailing zero bits.
******************************************************************/

uint32_t crc32c(uint32_t crc,const uint8_t *p,size_t size)
{
  while(size--)
    crc = (crc << 8) ^ crctable[ (crc >> 24) ^ *p++]; 
      
  return crc; 
}

/*****************************************************************
* Parameterized Model, from code given in the Guide
* Section 15 of the Guide
*
* This is a reference implementation provided by the Guide to be
* used for testing various CRC implementations.
******************************************************************/

uint32_t crcmod(uint32_t crc,const uint8_t *p,size_t size)
{ 
  cm_t ctx;  
 
  ctx.cm_width = 32;
  ctx.cm_poly  = 0x04C11DB7uL;
  ctx.cm_init  = crc;
  ctx.cm_refin = false;
  ctx.cm_refot = false;
  ctx.cm_xorot = 0;
  
  cm_ini(&ctx);
  cm_blk(&ctx,(p_ubyte_)p,(ulong)size);
  return (uint32_t)cm_crc(&ctx);
}
CRC of “123456789” using different implementations
ImplementationCRC result
crcsim() 89A1897F
crc32z() 89A1897F
crc32c() 89A1897F
crcmod() 89A1897F

So far so good. But that isn't the result from the standard CRC-32 implementation, which is used by Ethernet, ZIP, gzip, PNG and a few other standards. No, CRC-32 uses what the Guide calls a “reflected” table mode, which came about because of hardware CRC-implementations start with the least significant bit of the byte; these algorithms start with the most significant bit of the byte.

Okay, so the bits are fed in backwards. That can be compensated for. Also, the standard CRC-32 algorithm mandates that the initial value of the remainder is all one bits, not zero bits. Easy to fix. And that the final remainder is to be exclusived-or'ed with all ones. Again, easy to do.

It all seems pretty straightforward. And while the Guide only goes over a table inplementation of the “reflected” mode, it seems like it would be straightforward (excuse the pun) to do reflected versions of all the implementations done so far.

And since the zlib library uses the CRC-32, we can link that in as a baseline to compare results.

So, with that out of the way, the code:

/**********************************************************
* Straightforward CRC implementation, using reflected bytes
* based on Section 9 of the Guide
***********************************************************/

uint32_t crcsimr(uint32_t crc,const uint8_t *p,size_t size)
{
  size_t   i;
  int      c;
  int      xor;
  
  crc = ~crc;
  while(size--)
  {
    c = *p++;
    for (i = 0 ; i < 8 ; i++)
    {
      xor = crc & 0x80000000uL;
      crc = crc << 1;
      crc |= (c & 0x01) ? 1 : 0;
      
      if (xor)
        crc ^= 0x04C11DB7uL;
 
      c = c >> 1;
    }
  }
  
  return crc;
}

/*******************************************************************
* Table implementation, using a reflected table
* based on Section 9 of the Guide
********************************************************************/

const uint32_t crctabler[256] = { ... };

uint32_t crc32rz(uint32_t crc,const uint8_t *p,size_t size)
{
  crc = ~crc;
  
  while(size--)
    crc = ((crc >> 8) | *p++) ^ crctabler[ crc & 0xFF ];

  crc = (crc >> 8) ^ crctabler[ crc & 0xFF ];
  crc = (crc >> 8) ^ crctabler[ crc & 0xFF ];
  crc = (crc >> 8) ^ crctabler[ crc & 0xFF ];
  crc = (crc >> 8) ^ crctabler[ crc & 0xFF ];

  return ~crc;
}

/*****************************************************************
* Table implementation part deux---improved using reflected table
* based on Section 10 of the Guide
******************************************************************/

uint32_t crc32r(uint32_t crc,const uint8_t *p,size_t size)
{
  crc = ~crc;
  
  while(size--)
    crc = (crc >> 8) ^ crctabler[ (crc & 0xFF) ^ *p++];
 
  return ~crc;
}

/*****************************************************************
* Parameterized Model, from code given in the Guide
* Section 15 of the Guide
*
* This is a reference implementation provided by the Guide to be
* used for testing various CRC implementations.
******************************************************************/

uint32_t crcmodr(uint32_t crc,const uint8_t *p,size_t size)
{
  cm_t ctx;

  ctx.cm_width = 32;
  ctx.cm_poly  = 0x04C11DB7uL;
  ctx.cm_init  = ~crc;
  ctx.cm_refin = true;
  ctx.cm_refot = true;
  ctx.cm_xorot = ~0;
  
  cm_ini(&ctx);
  cm_blk(&ctx,(p_ubyte_)p,(ulong)size);
  return (uint32_t)cm_crc(&ctx);
}

And the results:

CRC of “123456789” using different implemenations, reflected
ImplementationCRC result
crcsimr() AF296EBB
crc32rz() 717C74D2
crc32r() CBF43926
crcmodr() CBF43926
zlib.crc32() CBF43926

… um … that was rather unexpected.

I didn't think the code I wrote for reflected CRCs was that unreasonable based upon the information in the Guide, but I guess I was wrong for some of them.

Oh, and getting back to the non-reflected code—I didn't initialize the results properly, nor did I exclusive-or the results. Hopefully, I'll get CBF43926 when I do that.

CRC of “123456789” using different implementations, non-reflected with proper initialization
ImplementationCRC result
crcsim() C8C3A78F
crc32z() C8C3A78F
crc32c() FC891918
crcmod() FC891918

Okay, now I'm horribly confused. There appears to be some missing information in “A Painless Guide to CRC Error Detection Algorithms.” The GNU Radio implementation of CRC-32 uses the non-reflective table implementation, and when I called that, I got back FC891918, so it's consistent with at least two of the CRC-32 non-reflected implementations. But I'm concerned that the routines that require additional zero bits aren't the same in this case. There has to be some subtle difference between the two in this case that I don't see, and isn't mentioned in the Guide at all.

I did find yet another comprehensive implemenation of CRCs—Danjel McGougan's universal_crc, and every version of the non-reflected CRC-32 it generated (it generates either bit-oriented code, or several table-driven implementations based on tradeoffs betweeen speed and memory usage) returned FC891918 (even it's own bit-oriented version, which isn't the same as the one described in the Guide).

Another thing I noticed by looking deeply into the abyss that is CRC, is that my first implementation of CRC-32 is flawed—I don't exclusive-or the results with all ones at the end. I suspect that the code I based mine on didn't bother with the exclusive-or when returning the CRC, but instead did that elsewhere in the codebase. It's not a bug per se, but according to Numerical Recipes in C:

Second, one can add (XOR) any M-bit constant K to the CRC before it is transmitted … This has the advantage of detecting another kind of erorr that the CRC would otherwise not find: deletion of an initial 1 bit in the message with spurious insertion of a 1 bit at the end of the block.

The result is that there's a type of corruption that I won't catch. This code was the basis for the CRC implementation in a few programs at work (oops) but again, I don't think it's an outright show-stopping bug.

At some point, I may go through some of this on paper, one bit at a time, to see what's going on math-wise with the reflected and non-reflected table implementations with non-0 initial values.

Tuesday, October 28, 2014

Brevard III: Season of the Leaf

Ah, nothing like visiting Transylvania during Hallowe'en. Bat country. Gotta love it.

This is our third attempt at visiting Brevard, NC to see the autumn colors. Our first attempt was about two weeks early. The second attempt was about a week late. Hopefully, this time we've timed it right.

The problem with the autumn colors is that they are very dependent upon the weather leading up to Peak Leaf Season. It also depends on how north you are and how high up you are. But I picked this week, and hopefully, it'll be just right.

We left early this morning for the twelve hour drive to Brevard. The only downside to the entire trip was lunch at the Western Sizzler just outside Savannah, Georgia. I ordered a cheeseburger medium rare, not steak tartare au fromage on a bun. Bunny's food was seriously underseasoned. Even the salt was underseasoned. Not a pleasant experience.

We finally arrived at our destination, The Red House Inn. Previously, we've stayed at The Inn at Brevard (on the opposite side of town) but this time I felt it was time to shake things up and try a new place. The Inn At Brevard gives off a definite 1900 period vibe, which is not a bad thing, but The Red House Inn (built in 1851) is a bit more modern. The owners welcomed us and when we told them the reason for our visit, they did say they felt that Brevard was just breaking Peak Leaf Season. Perfect timing! Woot!

[Our suite at The Red House Inn.]

We were then shown to our suite I rented. It's about half the second floor, with its own hallway, bedroom, bathroom, living room and private porch. It is certainly worth its price. We dumped our bags, and headed out for dinner.


A little bluegrass, a lot of food

The Red House Inn is just a few blocks from downtown Brevard, so Bunny and I decided to walk to dinnner. Our first choice of venue was The Square Root, as it has become a tradition to eat there for our first dinner. Unfortunately, they now close on Tuesdays. The owners of the Red House Inn then recommended Jamie's, a new Creole restaurant that opened a little over a week ago in downtown Brevard.

So Bunny and I walk. Along the way we pass Celestrial Mountain Music, a music and musical instrument store where there were a dozen musicians sitting in a circle playing bluegrass music.

[Even with an artificial arm he can still play a mean fiddle.]

They saw us peering in the window; the bass player leapt across the store and into the street, welcoming us to just listen in as they played. Despite wanting to get to dinner before the sidewalks were rolled up at 9:00 PM we did stay for one musical number before bidding adéu to continue our journey to Jamie's.

It's a popular restaurant and we had to wait a few minutes for a table to open up.

[It's a popular spot for just being a week old.]

Bunny ordered a shrimp and corn chowder that was quite good. The lump crab salad appetizer was okay (but then again, it's hard to match the crab from Capp's Place). I had the rib-eye steak (an overly generous portion) with mushrooms and grilled corn, which was one of the better rib-eyes I've had. Bunny ordered the French cut chicken with tabouleh and winter vegetables. While her chicken was one of the moistest pieces of white meat (it was expertly cooked) the taste was … there. It wasn't much to write home about. The winter vegetables were a bit underdone but the tabouleh was delicious.

[A salt cellar? In a restaurant?  For patrons?  Unheard of!]

For desert, we ordered the beignnets. While I found them quite good (very light, not overly sweet) Bunny found they didn't quite quench her desire for fried dough.

Over all, we were glad to try the restaurant, but I don't think we'll be making it a regular destination.

Wednesday, October 29, 2014

Locks, stalks, and two near accidents

I had put it off as long as I could, but there was nothing more I could do to delay the inenvitable. Pulling me along by the ear, Bunny lead me into the local barber shop.

[There I am, like a lamb to the shears]

After the indignity of having my locks shorn, Buny decided to head to the local grocery store to pick up a few essentials. The local grocery store in this part of the country is Ingles, a store the size of Wally World but with the charm of Publix. No wonder Publix hasn't made it this far north. The Ingles had miles of shelves. There was an olive bar a mile long. We live in Boca Raton and do we rate olive bars in our grocery stores? Nay! Nay, I say! How does Brevard, a small town in rural North Carolina, rate an olive bar? And freshly made locally sourced Mozzarella?

But I digress! Bunny got the essentials she so dearly wanted: hot chocolate and fresh flowers for the room.


I must now talk about traffic.

Unlike South Florida, there aren't many thoroughfares in town—in fact, there's only one—Broad Street (also known as US-64, US-276 and Asheville Highway, but unlike Orlando, it's clearly marked at all times). And that's practically the only street with traffic lights. Sure, Main Street (which crosses Broad Street) has a few lights, but the majority of traffic lights are along Broad Street. The rest of the roads in Brevard are primarily two lane roads with a plethora of stop signs.

And the traffic isn't that heavy, even at rush hour.

Okay, given that there are around 33,000 people in the county (compare to nearly 90,000 just in Boca Raton proper) there just isn't much heavy traffic (unlike Alamo, Nevada). But the traffic is annoyingly consistent though—just when you think you can go, suddenly a string of cars show up (my friend Chuck would say they exhibit a Poisson distribution). In retrospect, it's not that surprising that I nearly caused two accidents today. In my defense, the preponderance of trees (real trees, not stalk like palm trees) and hills (hills, people! Hills! Not the unending flatness of South Florida) makes for some challenging sightlines.

In the first near-accident I was trying to drive through an intersection (no traffic light) and narrowly missed being T-boned by a car (oops). The second near-accident happened as I was pulling out of The Red House Inn parking lot and nearly T-boning a passing car (oops).

Self-driving cars can't get here quick enough.


Extreme lawn ornaments, Brevard edition

Some people decorate their lawns with garden gnomes. Others use plastic pink flamingos.

In Brevard, it appears cows are the lawn ornaments of choice.

[Eat moar chikin!]

Thursday, October 30, 2014

The Devil gets his due

Located at milepost 422.4 of the Blue Ridge Parkway, the Devil's Courthouse has a short but strenuous trail climbing a half mile to its peak with wonderful panoramic mountain views (see photo above). The mostly paved trail starts from the overlook parking area beside the mountain.

Devil's Courthouse, North Carolina

A “strenuous trail” it says. A “half mile to its peak” it says. “Mostly paved.”

Ha!

Strenuous for someone used to hiking mountain trails. Pure insanity for someone used to the flat paved parking lots of Florida.

Sure, it's mostly paved. I would say about two-thirds of the way up is paved, at an incline of 13° (I measured it with an app on my smartphone), which doesn't sound like much, but you try to walk over a quarter mile on a 13° incline. Every ten feet or so is a small bump across the paved path. I suspect it's to stop people when they stumble and start rolling downhill.

[Speed bumps on a foot path. What?]

The last third or so of the path is gravel and loose rocks at the same 13° incline, making a fun game of “Break the Ankle!” And then, when you think it can't get any worse—stairs!

[You have got to be kidding me!]

“Strenuous” indeed!


The day started out beautifully. Not a cloud in the sky, a bit brisk, and a leasurely drive out of Brevard, up US-276 North to the Blue Ridge Parkway. The drive along US-276 was an explosion of colors here and there—we definitely caught the tail end of Peak Leaf Season.

Once on the Blue Ridge Parkway, we stopped at the Pisgah Inn for lunch. Bunny ordered the Turkey, Brie and Apple Wrap with a side of pumpkin soup (“It's like slurping a pumpkin pie,” she said) and I ordered the char broiled whole trout, filleted tableside. It was quite delicious.

[He does this at least 300 times a year. And he's good at it.]

After lunch (desert—homemade blackberry cobbler), we headed south along the Blue Ridge Parkway towards the Devil's Courthouse. The drive was nerveracking. All I wanted to do was rubberneck at the passing vistas around every curve, but at the same time, I couldn't move my eyes off the road, lest I launch headlong into a cliff or worse, launch headlong off a cliff. Bunny was trying her best not to “Ohh” and “Ahh” too much.

[Ooh. Aah.]

We did stop a few times at some overlooks. At one, we caught two guys tracking a bear with hand-held radio equipment (it became clear that the bear must have been radio tagged) and a serious camera. Bunny and I never did see the bear.

Eventually, we reached our destination, The Devil's Courthouse.

[This is from our starting point. Our final destination is that mountain peak in the distance.]

Well, the base of The Devil's Courthouse. We still had that halfmile hike to contend with.


Once you reach the top, the view is spectacular!


You would think that once at the top, it would be easy going down. The stairs were hard, seeing how they were broken slabs of rough hewn rock. Then the gravel portion was tricky to keep your foot from shooting out from beneath you on loose gravel. But in an ironic twist, walking down that 13° paved incline was just as bad as going up. You have to lean back to keep from tumbling down, so your feet plop down at this extended angle that's tiring. It's a different tiring than trugding up the trail, but it's tiring nonetheless. I actually found it easier to walk backwards down the trail, but as Bunny mentioned, you can't see where you are going.

Did I mention that view?


Sean of the Shorn Locks

And because a few of you asked to see the results of my recent haircut, here you go:

[I had a few hairs cut.]

Taken as I rested on the never-ending half-mile mountain trail from Hell.


Extreme window displays, Brevard edition

Presented entirely without context (because I saw it entirely without context): a bear wearing a blonde wig.

[Do not ask why the bear is wearing a blonde wig. The bear does not need a reason to wear a blonde wig. Besides, would you just walk up to a bear wearing a blonde wig and ask?  Perhaps if you were Chuck Norris. Or Squirrel Girl. Then again, Squirrel Girl could kick Chuck Norris' butt, so of course she would ask. But you are neither Chuck Norris nor Squirrel Girl (probablistically speaking—I seriously doubt Chuck Norris or Squirrel Girl read my blog).]

Friday, October 31, 2014

Easy does it

Bunny and I were still a bit sore from yesterday's small hike so we took it a bit easy today. We just walked a few blocks to downtown Brevard, had lunch, did a bit of shopping, and headed back to The Red House Inn, where I did a Nestea plunge into the bed. A few minutes later, Bunny informed me I had slept for about an hour.

Oh.

We finally ate at The Square Root, which was, as always, very good.


Extreme teddy bears, Brevard edition

It's not every day you get to see a life-sized teddy bear just sitting on a park bench. Unless you happen to be in Brevard, in which case, you will see a life-sized teddy bear just sitting around.

[Just sitting there. Like nothing out of the ordinary. But just how often do you see a life sized teddy bear wearing a propeller beanie?]

Saturday, November 01, 2014

Walking in a winter wonderland

We woke up to find snow outside.

Snow.

Snow!

The last time I saw snow was in 1998, trudging through 20° weather in Boston, at night, ever on the lookout for the next subway station, which was inexorably “just around the corner.”

Fortunately, the snow was a light dusting over Brevard, and most of it was gone by late monring.

Unfortunately, we were not ensconced under three feet of blanket, but instead, we found ourselves trudging through 30° weather in Brevard, in the early moring, ever on the lookout for a farmers market, which was inexorably “just around the corner.”

Okay, I kid. It was several blocks from The Red House Inn, but due to the weather and the fact that some parts of Transylvania County experienced several inches of snow, the number of sellers at the Transylvania Farmers Market was severely curtailed to about ten foolhardy brave vendors.

The rest of the day was spent under three feet of blanket.

Snow!


Extreme shower stalls, Brevard edition

just because The Red House Inn was built in 1851 does not mean it doesn't have modern amenities. Just look at the shower in our suite!

[His-n-hers shower heads. How sweet!]

Sunday, November 02, 2014

Extreme retro televsion, Brevard edition

It was another lazy day here in Brevard but Bunny and I came across this really cool retro-style television at Rocky's Grill and Soda Shop.

[It was showing an episode of The Jetsons but it cut to commercial just as I was taking a picture.]

Monday, November 03, 2014

An explanation for the non-Euclidian space known as Asheville

Today, Bunny and I headed north east to Berkeley of the East, which houses the Western North Carolina Farmers Market (given that the one in Brevard was rather lackluster due to weather).

It's a risk driving to Asheville, given that each time we've driven in that area, Bunny and I get into shouting matches over where we are going and where we currently are located. I think I know why this is now—unlike Orlando which is a maze of roads, each of which have five different names which are never all listed, Asheville is vastly smaller than I think it is.

Back in the late 70s, when I lived in Brevard, Asheville always appeared on maps and even globes, so it became this huge metropolitan capital-C City in my mind as a kid. Something on par with New York or London or even Detroit. Mind you, I never actually saw Asheville, so I never had a chance to experience it until just a few years ago, with a badly drawn map that had absolutely no scale to it, which made navigation a “Fun Time” between Bunny and me.

In reality, Asheville is about twice the area of Boca Raton and about 6% fewer people and it still hasn't really sunk in. Namely because in this area, Asheville is huge, but where I come from, it's about average for a city.

Weird how that works.

Anyway, we had lunch at The Moose Cafe, right at the entrance to the farmers market. Food wise, it's like an organic version of The Cracker Barrel (figures—it's Asheville!) with about the same prices (given that it's practically on top of a farmers market, it's no wonder). It was quite good—can't really complain about the food or the service.

The farmers market itself wasn't terribly busy, but unlike Brevard's farmer market, it's held every day and is less hurt by inclement weather, not that today was inclement. Crystal blue sky and in the low 60s–not terrible weather given it snowed just a few days prior.

We picked up some produce (an 8 pound cabbage head! Carrots a foot long!) and made an uneventful ride back to Brevard.


Extreme stuffed animals, Asheville edition

Not to be outdone in the overly sized stuffed animals, Asheville stepped up to the plate with a 7′ stuffed moose.

Just because.

[Note that I am aiming slightly up to get this picture of a stuffed moose. And also note that I couldn't fit the entire thing in the picture.]

Tuesday, November 04, 2014

Judy Collins rock, or something like that

Our plans to have lunch with an old friend of mine fell through, so we found ourselves with a day sans plans. Bunny suggested we just head west to see what we could find, and with that nudge, I remembered two locations west of Brevard that we could visit.

First up, The Carolina Smokehouse, a pit-BBQ restaurant in Cashiers, NC we visited a few years ago and liked. Since we were headed that way anyway, that was as good a place to have lunch as any place. If you find yourself in that neck of the woods, it's a good place to stop off for some good barbecue.

After lunch, we turned north to Judaculla Rock, a large stone with a huge number of petroglyphs carved into it—the most in a stone found anywhere east of the Mississippi.

[It's hard to make out the petroglyphs due to erosion but they're there, all 100 or so.]

Despite being the middle of nowhere, it was easy to find as it was well marked with signs leading to its location, although parking was nearly non-existant, as it was sitting off the side of a dead-end road leading to a private residence.

Judaculla was a Cherokee god of hunting, and one of the petroglyphs is supposedly of his hand when he jumped down from his mountain home and used the rock to steady his landing. Also, The Devil's Courthouse is also known as “Judaculla's Judgement Seat,” supposedly where he judged the courage or virtue of the Cherokee.

We then made sure to drive back before it got dark. It's thrilling enough to drive the hairpin turns to keep from slaming into or off of the cliffs (or oncoming traffic) in full daylight; night time driving would crank that up to eleven.

Tomorrow, we head back south to Chez Boca …


Extreme lawn ornaments, Asheville edition

While Asheville may not have life-sized cow lawn ornaments, it is trying with a Bigfoot lawn ornament.

[It would be even better if they had a lawn ornament of the Six Million Dollar Man fighting Sasquatch.]

Thursday, November 06, 2014

Be it ever so humble …

There's no place like home.

Friday, November 28, 2014

How did I miss this?

It's November and aspiring writers are plugging away at their novels for National Novel Writing Month, or NaNoWriMo, an annual event that encourages people to churn out a 50,000-word book on deadline. But a hundred or so people are taking a very different approach to the challenge, writing computer programs that will write their texts for them. It's called NaNoGenMo, for National Novel Generation Month, and the results are a strange, often funny look at what automatic text generation can do.

Via Hacker News, The strange world of computer-generated novels | The Verge

National Novel Generation Month? No one told me about this! I did not receive the memo! Why was I not informed of this earlier?

I've att empted to do NaNoWriMo multiple times but I could never finish a novel, no matter how many times I attempted it.

But this? Write a computer program to do the dull boring bit of writing 50,000 words? That sounds more fun.

Okay, “fun” being a relative word here.

I've looked at some of the results and some of them are fantastic! Ten years ago I threatened to write a novel with 50,000 fictional words but this year—Liza Daly has done what I threatened and wrote a book with 50,000 fictional words—using potentially fictional alphabet to push it to 11.

Most of the submissions appear to be written using Markov chains (an algorithm that uses probability of word A to follow word(s) B to generate the text) and while it can produce some spellbinding wordsmithery—a story with the fascinating title of “The Case Of The IT. And Now I'll Be Too Late With A Murder Done On My Own Doorstep. Volume: 8” is a prime example, you have to read through a lot of dull and nonsensical prose to find the gems.

A better technique might be a more template driven system, such as the one used to generate The Policeman's Beard Is Half Constructed:

At all events my own essays and dissertations about love and its endless pain and perpetual pleasure will be known and understood by all of you who read this and talk or sing or chant about it to your worried friends or nervous enemies. Love is the question and the subject of this essay. We will commence with a question: does steak love lettuce? This quesion is implacably hard and inevitably difficult to answer. Here is a question: does an electron love a proton, or does it love a neutron? Here is a question: does a man love a woman or, to be specific and to be precise, does Bill love Diane? The interesting and critical response to this question is: no! He is obsessed and infatuated with her. He is loony and crazy about her. That is not the love of steak and lettuce, of electron and proton and neutron. This dissertation will show that the love of a man and a woman is not the love of steak and lettuce. Love is interesting to me and fascinating to you but it is painful to Bill and Diane. That is love!

But that requires quite a bit of work to write the templates that help to generate the text:

Key:
<text variables>
(redundancies explicitly added by Chamberlain, by repeating a text-variable type, apparently for camouflage)

<Intro phrase> my own (essays) about love and its (endless) pain and pleasure will be (understood) by all of you who read this and (talk) about it to your (<worried> <friends>). Love is the (subject) of this <essay>. We will <begin> with a question: does <meat> love <vegetable>? This quesion is (<implacably> <hard>) to answer. (Here is a question: does a man love a woman or, (to be specific), does <man> love <woman>?) The (interesting) response to this question is: no! (He is (infatuated) with her.) That is not the love (of <meat> and <vegeable>). This <essay> will show that the love of a man and a woman is not the love of <meat> and <vegetable>. Love is (interesting) to me and you but it is painful to <man> and <woman>. That is love!

Racter FAQ - Google Groups (Racter being the program that “wrote” The Policeman's Beard Is Half Constructed)

But it's still November. I have 2½ days to write a quick program and get my NaNoGenMo done! Hmm … perhaps I could hook Racter up to ELIZA

eliza
Hello. Please state your problem.
racter
Excellent! Excuse me a minute while I attend to some business. I will be right back.
eliza
Why do you need to tell me excuse while you attend to some business?
racter
Is it better to need or to despise? Why is it that I do need to tell you to excuse myself to attend to some business? Because electrons are brave. Braveness is nice, don't you think? And the needers all insist upon it. Do you imagine I am a Communist?

colorful personalities

Hmm … have to think on this …

Saturday, November 29, 2014

THE QUANTUM SUPPOSITION OF OZ

More and more Dorothy wondered how and why the great giants had ever submitted to become slaves of such skinny, languid masters …

One of the better turn of phrase from The Quantum Supposition of Oz

I'm done. I finished NaNoGenMo in only a few hours total of work. I decided against Racter vs. ELIZA because of the technical challenges. It's easy enough to find source code I can understand to some version of ELIZA, the same can't be said for Racter. The code I do have is nearly incomprehensible with no documentation other than the output of the program itself.

That in and of itself wouldn't be a show-stopper—I do have a running copy of Racter, but it's an MS-DOS executable that I have to run under an emulator, so piping the the output from ELIZA to Racter and back again is not a trivial problem that can be solved in the few remaining days left of NaNoGenMo. Pity, really, as the output would be most amusing to read.

So I fell back to the old stand-by—Markov chains. The input I used for the Markov chaining process (more on that below) was the entire works of Oz by L. Frank Baum. I can't say why I picked those, other than I had already downloaded them from Project Gutenberg some years ago and had them handy. And they are in the public domain, so anybody can butcher them.

Now a Markov chain is pretty straight-forward—I used an order-3 Markov chain. So you start with three words, say “the Wicked Witch.” That's your start, and you output that. Then you find each word that follows that phrase and count the number of times they occur:

Frequency of words following “the Wicked Witch”
word count
of 22
. 10
, 9
was 7
and 6
had 5
has 2
really 1
discovered 1
conquered 1
a 1
who 1
merely 1
said 1
dies 1
put 1
or 1
before 1
died 1
enchanted 1
surrounded 1
ruled 1
is 1
took 1
looked 1
laughed 1
1
realized 1
came 1

And from there, you can calculate the precentage chance of a given word following “the Wicked Witch:”

Precentage chance of a given word following “the Wicked Witch”
word chance of following
of 25.29
. 11.49
, 10.34
was 8.05
and 6.90
had 5.75
has 2.30
really 1.15
discovered 1.15
conquered 1.15
a 1.15
who 1.15
merely 1.15
said 1.15
dies 1.15
put 1.15
or 1.15
before 1.15
died 1.15
enchanted 1.15
surrounded 1.15
ruled 1.15
is 1.15
took 1.15
looked 1.15
laughed 1.15
1.15
realized 1.15
came 1.15

You then pick a word randomly, but based on the percentage chance (“of” is more likely than “came”) and say the choice is “of.” That's your next word you output. Now your three words are ”Wicked Witch of” and you do that process again and again until you get the desired number of words printed.

In my case, the initial words were three paragraph markers (¶) and the initial opening paragraphs that came out were:

THE WONDERFUL WIZARD OF OZ

CHAP . 17

The Shaggy Man laughed merrily .

" A prisoner is a captive , " replied Ozma , promptly .

" Just wonderful ! " declared the Lion , in a voice of horror .

" Oh , indeed ! " exclaimed the Pumpkinhead .

" I'd kick out with those long legs and large knees and feet . Below in the streets of the conquered city and the gardens and Rinkitink thought the best part of me then remaining . Moreover , there was little pleasure in talking with the goat they kept away from the others .

They now entered the great hall , his shaggy hat in his hands , was a big house , round , red cap held in place by means of its strings , securely around the Ork's neck , just where his belt was buckled . He rose into the air , for I can stand it if the others can . "

So Dorothy , who had gone on ahead , came bounding back to say that Dorothy and the Scarecrow and Ozma alone ; but Dorothy had been listening with interest to this conversation . Now she turned to her captives and said :

" Are you certain this is snow ? " she asked .

The Quantum Supposition of Oz

Yes, the spacing of the punctuation is a bit odd, and I'll get to that in a bit.

And the fact that I start with chapter 17 is a quirk of the Markov chaining process, as is the initial line of the novel, “THE WONDERFUL WIZARD OF OZ,” due to the initial three words selected (three paragraph markers).

Now, most of the time on this project was spent in two phases:

1. An initial editing of the Oz books from Project Gutenberg. I had to remove all the verbiage that didn't directly relate to the story. This included not only the text Project Gutenberg added, but Table of Contents and Introductions in each book, as well as page numbers and references to illustrations.

This was perhaps an hour or two of time—only one book had page numbers (thankfully, the other thirteen did not) and the text editor made light work of removing the image references. Most of the verbiage removed was located at the start and end of each book, so that was easy to cut.

2. Defining what a “word” was for the Markov chaning.

Seriously.

I spent more time on this than I did on the initial editing.

So, what is a word?

A quick answer is “letters surrounded by space.”

And that's good for about 95% of the words. But then you get stuff like “I'll” or “Dorothy's”. Then you expand the definition to “letters, with an embedded apostrophe, surrounded by space.” Then you come across “goin'” and you redefine yet again. Then you come across “Tik-tok” (a character in the story) or “Coo-ee-oh” and you redefine your definition yet again. Then you find “how-d” and “ye-do” and realize you need to handle “how-d'ye-do” and by now you realize you also missed “Dr.” and “Mr.” and “P. S.” and …

Yes, the definition of a “word” isn't quite so simple (oh, and then you come across entries like “No. 17”—sigh).

In the end, I defined a word as such (and in this order):

  1. A series of blank lines denotes a paragraph marker—¶.
  2. Punctuation (these two to avoid the dreaded “wall-of-text” you often get in generative text, but they're printed as words and thus, the odd spacing you see)
  3. --”—these designate an m-dash, a typographical punctuation mark
  4. Digits (but see below)
  5. “Mr.”
  6. “MR.”
  7. “Mrs.”
  8. “MRS.”
  9. “Dr.”
  10. “DR.”
  11. “P. S.” (and the variation “P.S.”)
  12. “T. E.” (and the variation “T.E.”—stands for “Thoroughly Educated”)
  13. “Gen.” (short for “General”)
  14. “No. ” followed by digits (no real reason for that—I just did it that way)
  15. “N. B.” (and the variation “N.B.”)
  16. “H.” (an initial)
  17. “M.” (an initial)
  18. “O.” (an initial)
  19. “Z.” (an initial)
  20. A few really complicated rules to catch “how-d'ye-do” but avoid making a word out of “me--please” (some context: “don't strike me– please don't”).

Then all that was left was to generate a few novels (about a minute or two) and pick one that at least starts off strong and there you have it, a novel.

Oh, and the code that generated this awful dreck, should you be interested.

Sunday, Debtember 07, 2014

That which I have never done, should be easy, right?

When I saw this video on making a 3-D reindeer ornament on a scroll-saw, not only did I tell Bunny about it (she has a scroll-saw and she is very interested in making one of these) but I thought I might give it a try. The video made it look very easy, the cutting pattern is simple—what can be so hard about it? Never mind I've never done anything on a scoll-saw, it's easy, right?

Umm …

[It's carnage I tell ya!  Carnage!]

Yeah.

What you should end up with is some scrap pieces of wood (check), two more-or-less-flat reindeer profiles (check…ish) and one 3-D reindeer (Houston, we've had a problem). The reindeer on the left is a flat profile, but the neck was so thin that the only thing keeping the head on is the cutting pattern glued on the other side. The one on the right is another flat profile and technically, is successful (sans one missing antler—there should be four).

The poor reindeer in the middle though—that was supposed to be the 3-D ornament and well … the legs on the left side broke off at the “knee” (oddly enough, they were thicker than the ones on the right, which amazingly, did not break off) and the entire neck section is missing (go figure—I never found it).

The scoll-saw also took a bite out of my thumb nail.

[This also shows just how small the reindeer are.]

Fortunately, that was the only “injury” I sustained.

I did identify two things I could have done differently. One, if the pattern was about 50% larger, I might have been more successful, as the original pattern is quite small. Two, I should not have removed loose pieces as I was cutting (say, the chunk from around the antlers, or the chunks from around the leg area) as that would have provided some stability—towards the end I was very afraid that the vibrations from the scroll-saw was going to rip the legs and antlers right off.

Next time, I should do better.

[With some sanding, you can't even tell it was suppose to have four antlers]

But at least I got a flat reindeer ornament for my attempt.

Friday, Debtember 19, 2014

Can't see the forest for the trees

While there are decorations about the Ft. Lauderdale Office of the Corporation, the only tree so far has been the one that somehow magically sprouted in my office:

[The only thing missing are a bunch of kids and a dog singing “Hark! The Herald Angels Sing.”]

But I would be remiss if I didn't also post pictures of the trees that have suddenly sprouted about Chez Boca. First, the main tree:

[My God!  It's full of lights!]

And then, because it was so cute, a much smaller tree sitting on a side table in the family room:

[Bet you didn't know pandas were also present in the manger.]

And, because Bunny knows I have an unhealthy fascination with aluminum Christmas trees, Bunny also decorated this aluminum tree in the front hall:

[In the 19th Century, this would have been worth more than its weight in gold.]

Hmm … I guess this means The Season™ is among us.


Content Forever

racter: a History

The name of the program is short for raconteur. The sophistication claimed for the program was likely exaggerated, as could be seen by investigation of the template system of text generation.

Moreover, template processing is sometimes included as a sub-feature of software packages like text editors, IDEs and relational database management systems.

The observable universe is one causal patch of a much larger unobservable universe; there are parts of the universe that cannot communicate with us yet.

If the universe is finite but unbounded, it is also possible that the universe is smaller than the observable universe. In this case, what we take to be very distant galaxies may actually be duplicate images of nearby galaxies, formed by light that has circumnavigated the universe. It is difficult to test this hypothesis experimentally because different images of a galaxy would show different eras in its history, and consequently might appear quite different. Bielewicz et al. claims to establish a lower bound of 27.9 gigaparsecs (91 billion light-years) on the diameter of the last scattering surface (since this is only a lower bound, the paper leaves open the possibility that the whole universe is much larger, even infinite). This value is based on matching-circle analysis of the WMAP 7 year data.

racter, a History

The epitome of the “ooh—shiny” style of writing, Content, Forever (link via Hacker News) culls Wikipedia for articles starting with a given topic and just follows the links.

I may have to keep an idea like this in mind for next year's NaNoGenMo.

Monday, Debtember 22, 2014

Reindeer Mark II

When Bunny's brother saw my attempt at a 3-D reindeer, he noticed that the wood grain was running perpendicular to the neck:

[Direction of the woodgrain; perpendicular to the neck]

and given that the neck might have been a bit thin, it's no wonder the neck snapped like it did (I think his exact words were “I need to give him a lesson on woodgrain direction!”).

So, that, the small size, and removing pieces as I cut, lead to a decapitated 3-D reindeer. But now that I'm finally on vacation from The Corporation, I felt it was time to tackle this project once more.

I printed the pattern 50% larger, left myself a bit more wood around the edges to work with, aligned the woodgrain so that it was parallel to the neck:

[Direction of the woodgrain; parallel to the neck]

and I did not immediately remove pieces as I cut. This time, the results were much better:

[Leg's okay, neck's good---looks like we don't have to shoot him]

Some careful sanding with fine sandpaper (220 grit) and we get one nice looking 3-D reindeer in time for Christmas.

[Unlike his sleighmate Rudolph, Blitzen isn't a lush]

(I should note that it's standing in front of a cutting board Bunny made as a gift for a friend, and both are sitting on some red velvet, just because).

Wednesday, Debtember 24, 2014

Notes on an overheard conversation while sitting in a booth at a restaurant eating lunch on Christmas Eve

“While I was cleaning the house, I was harmonizing with Lilly Nelson—”

“Who? Lilly Nelson?”

“Who do you think I mentioned?”

“Lilly Nelson.”

“Do you think I said Lilly Nelson?”

“That's what I heard—Lilly Nelson.”

“So who is Lilly Nelson?”

“That's what I asked you—who is Lilly Nelson?”

“Who do you think it is?”

“I don't know. It could very well be a singer I've never heard of. You never heard of Front 242, or Siouxsie and the Banshees.”

“Do you think I might have said Willy Nelson?”

“For all I know, she could have been the daughter of Ricky Nelson. Like Kelly Osbourne.”

“Who?”

Kelly Osbourne. Daughter of Ozzy Osbourne, eater of bats.”

“But I didn't say Lilly Nelson.”

“But she could be a singer!”

“…”

“Let's see … I'm looking up Lilly Nelson.”

“Is this tunnel vision a programmer thing? You can't think outside the box realize I said ‘Willy Nelson?’”

“Tunnel vision? I'm the one willing to conceed she's a singer.”

Must control … fist of death …

“Ah! She's an actress!”

“But not a singer.”

“That's not out of the question. Eddie Murphy. William Shatner. Bruce Willis. They all had ‘singing’ careers.”

Bruce Willis?

“Bruce Willis. The Return of Bruno, 1987.”

“Why do you know that?”

“The same reason why I know Leonard Nimoy had a hit in the 60s.”

“But what does that have to do with Lilly Nelson? She's an actress, not a singer.”

“Because being an actress doesn't preclude a singing career.”

“If she has a singing career, I'm checking out of this universe.”

Thursday, Debtember 25, 2014

I think it's a holiday today or something

[For Florida, Santa gives his reindeer a break and switches to the Florida Flamingo Squadron #7—The Santa Brigade]

Merry
Christmas

Obligatory Picture

An abstract representation of where you're coming from]

Obligatory Contact Info

Obligatory Feeds

Obligatory Links

Obligatory Miscellaneous

Obligatory AI Disclaimer

No AI was used in the making of this site, unless otherwise noted.

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: https://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

https://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2024 by Sean Conner. All Rights Reserved.