Tuesday, November 7, 2023

Colleague's Chat GPT exercise: Write an American Pie parody-song about Perl?

 He says this is the unaltered response. I haven't been impressed by Chat GPT's code-generation work, but it definitely is good for lyrics that sort of scan.

(Verse 1)
A long, long time ago, I can still remember
When Perl was used with so much fervor.
And I knew if I had my chance,
That I could make those scripts dance,
And maybe they'd be happy for a while.But every line I wrote was dread,
With regex patterns in my head,
Bad news on the doorstep, I couldn't stop.
I can't remember if I cried,
When I saw Perl's magic slowly slide,
But something touched me deep inside the code.(Chorus)
Oh, Perl, Perl, what happened to your grace?
Your syntax was a wild, complex maze.
And I knew if I had my chance,
I'd choose a language to advance,
And maybe we'd code happily for a while.(Verse 2)
Did you code a sub for all those bugs,
And do you have faith in Larry Wall above?
If the Bible tells you so.
Now, do you believe in Perl's grand style,
Can scripts save your mortal files,
And can you teach me how to write them real slow?Well, I know that you're in love with Perl,
'Cause I saw you write scripts and make them swirl.
You both kicked off your shoes,
Man, you danced those regex blues,
I was a lonely teenage coding dork.With a pink Mac and a compiler fork,
But I knew I was out of luck,
The day that Perl got stuck.
I started singing:(Chorus)
Bye, bye, Perl, your glory's been erased,
Your regex made me feel so out of place.
I started singing bye, bye, Perl, you've been replaced,
Your legacy was great, but now it's been displaced.(Verse 3)
Now for years, we've coded in despair,
And even though we tore out our hair,
We knew we'd write code again someday.
But that someday was a distant dream,
As languages changed, so it seemed,
We had to find a better, cleaner way.Oh, and while Larry Wall was looking down,
We started writing code all over town,
The old ways slowly fading,
With new languages invading.
The programmers tried to take a stand,
But they couldn't find a helping hand,
Do you recall what was revealed,
The day that Perl's fate was sealed?(Chorus)
Bye, bye, Perl, your glory's been erased,
Your regex made me feel so out of place.
I started singing bye, bye, Perl, you've been replaced,
Your legacy was great, but now it's been displaced.(Outro)
And we were singing,
Bye, bye, Perl, your glory's been erased,
Your regex made me feel so out of place.
I started singing bye, bye, Perl, you've been replaced,
Your legacy was great, but now it's been displaced.

Monday, October 23, 2023

The Great Café Au Lait Mystery: Solved

Back in high school French class we must have learned about café au lait. Although most of us weren't (yet) coffee drinkers, the phrase was made up of three easy words, and there was something comforting about those pictures of those big bowls of warmish brown liquid, all sunshine streaming into a Carl Larsson-inspired kitchen nook.

It was on my second trip to France, first time in Paris (not including a one-night stopover the highlight of which was seeing one of the first 747s in operation at Orly), that I discovered there was no café au lait in Paris, at least at the Novotel I called home, the office I was working at that week (they preferred espresso), nor any of the restaurants.

The third trip was with the whole family, and our week was completely café-au-lait-less. It turns out it's something you drink at home on a lazy rainy Saturday morning. Or maybe still in the youth hostels, at least the ones I stayed at in the French part of Switzerland many decades ago. But in Paris. Get used to getting your lattes from a single-press of a button, and enjoy the rest of the city.

AI fun & games: "Please write a parody of the kind of short story ChatGPT generates"

 In the sleepy village of Banalburg, where nothing ever happened, lived a completely unremarkable man named John. He was utterly ordinary in every way, from his beige socks to his forgettable hair. His house, a replica of every other house on his street, was the perfect embodiment of suburban sameness.

One exceptionally uneventful morning, John decided to go for a walk, just like every other morning. He stepped out of his indistinguishable front door and strolled down the same unmemorable sidewalk he had trodden for years.

As he walked, John saw nothing of interest. There were no talking animals, no mysterious portals to other dimensions, and certainly no secret societies inviting him to unravel world-changing mysteries. It was just John and his very unremarkable surroundings.

But then, in a plot twist that shocked absolutely no one, John stumbled upon a shiny object lying on the ground. To his immense disappointment, it was just a discarded soda can. The can, unlike in other, more interesting stories, did not turn out to be a magical artifact or a message from aliens. It was just a regular, empty soda can, and John couldn't have been more disappointed.

Resuming his pedestrian journey, John encountered his neighbor, Mrs. Smith, who was just as unexceptional as he was. She asked him about the weather, and John responded with the most ordinary observations one could imagine. It was cloudy, but not too cold, and there was a gentle breeze. Their conversation was as mundane as it gets.

As the day continued, John returned home to partake in his daily routine of watching television, which consisted of watching re-runs of forgettable sitcoms. Nothing out of the ordinary happened there either.

And so, dear reader, this story ends just as uneventfully as it began, with John, the most unremarkable man in the most unremarkable village, living his life in the most unremarkable way. But hey, isn't that what you signed up for? A parody of the kind of short story that's about as exciting as watching paint dry.

Sunday, January 30, 2022

How I solved wordle 225

I always start with the same word.
No vowels, so now I always go with this second word (it's the plural of sulcus, a type of furrow that your brain has plenty of):


 

Let's try for some more consonants, as well as testing for the 'Y'. Fortunately there's a word that does it all:


 
So if this word has 2 'U's, it would probably be an "UN-" word. Let's focus on the keyboard and try to find some common words that use the remaining letters (we can quickly eliminate "UNTIL", "UNCUT', "UNFIT", etc. because those letters are gone. So our word most likely has 4 consonants and the 'U'. The 'R' is most likely in position 2 because it follows so many consonants, and the 'N' is probably in position 4 because it readily precedes consonants. I'm now racking my sulci thinking of words that start with "WRU", "DRU", "FRU", "GRU", or "BRU".

Before I looked at the keyboard I had first thought of "CRUMB" but word 2 eliminated the 'C'. So let's try words that end with 'G'. "BRUNG" seems most likely.


OK. How about "WRUNG"?








 

Note that if the 'G' was wrong I would have tried "DRUNK", so "BRUNG" was a good word, because if it fails it points the way to the winning guess at try 5.
 

My system often requires four tries where other people are getting the word at try 3 or even 2 (and my system will never get a hit on try 1 or 2 because my initial words are valid guesses but will never be goal words). But the system hasn't let me down yet.

Tuesday, December 7, 2021

Living on the Leading Edge in Northampton

 Blast from the past: the first (of many, if you're polite) Boomerang Tournament Reports from the 1990s.


Maybe next time I'll work on those broken links at the bottom. Stay tuned.

Boomerang Tournament Report

Vol. 1 No. 1

Northhampton Airport, Northhampton, Mass.

June 6, 1992

Who needs skiing? The Bovinator and I are hydroplaining down the hills of southern Vermont on one of those bucolic backroads that the locals in these parts also call Interstate 91. Bruce Springsteen is on the radio, live from sunnier parts, singing something about going down to lucky town. I figure if we can avoid getting smacked by a semi in this rain we'll be lucky to get into any town tonight.

The hometown papers said there'd be rain tonight and tomorrow covering the Northeast. The Bovinator did one better and called the Massachusetts weather office and found the forecast wasn't so bad. The rain would be localized to southern Vermont and central Massachusetts. We're in southern Vermont now. We're planning to stand around outside all today tomorrow in central Massachusetts. I knew it all and chose to go anyway. Because there's a boomerang tournament on tomorrow, and you don't call one of those off because of a little precipitation.

This looks like it's going to be a good one, too. Boom tournaments are usually even more obscure than juggling conventions. The press and public is rarely informed because no one wants a bunch of gorbies wandering onto the field when there are booms airborne. But, over breakfast in Amherst, I pick up the local weekly paper and see that this is no ordinary boom tournament we're heading to. Right there on the back of the paper, a full page ad for the big event of the year: Hot Food Hot Jazz '92. All kinds of things to look forward to: A Chili Cook-Off, cajun food, jalapeno corn bread, fresh squeezed juice. Music by acts I recognize, and, even better, acts that I don't. They're promising hot air balloons and a national skydiving record attempt. And, getting bottom billing, is the U.S. Boomerang Association New England Regional Championships.

The weather's clearing up, my throwing arm feels fine, my catching hand feels covered with honey, and I'm ready for anything. How can it go wrong: there'll be 10 to 15,000 people out at the airport eating some of the best food central Massachusetts can dish up, listening to the Rude Girls, and maybe, possibly, learning a thing or two about boomerangs.

But we arrive at the spot, the local airport, and all we see is a weather-beaten piece of plywood over which someone's spray painted "BOOMS" in day-glo orange. The tents are to the right, but the arrow under the sign is pointing to the left, and I sense the same kind of twinge you get at a juggling convention when you think the cafeteria folks are pulling a fast one. We park in the mud, say hello to fellow throwers, and get the bad news fast. The Hot Food people exiled us from a nicely groomed field with plenty of space to this gopher-hole, weed ridden patch sandwiched between the Interstate, a working runway, and a couple of airplane hangars. They figured they'd need the better space to park those 10,000 cars they were expecting. Man, this is the most enlightened area I know of east of Boulder. People will bicycle in for something like this.

Then the news gets worse: the organizers looked at the sky and decided to postpone the event until Sunday.

I recall sitting in constant downpours at almost every Vancouver Folk Festival I've attended and wonder what kind of wimps are running this thing. The Chili must be a front.

We throwers take a vote whether to postpone as well, but none of us is afraid of a little drizzle. Then there's another vote to change the schedule, switching the Juggling and Maximum Time Aloft (MTA) events because, as the organizer says, juggling's expendable. If the heavy rains come, we can just go for beer and forget about juggling.

This isn't news to anyone who's experienced first hand how expendable our craft/art/sport is: how many birthday party gigs have you lost because the kid's parents decided to go with the puppet guy instead? But boom juggling is something I've been working on. It sounds easy in practice. All you have to do is maintain control over two boomerangs, always keeping at least one in the air, and never dropping. I feel obligated to be a decent boom juggler--if I can juggle five balls and pass seven clubs, how hard can two boomerangs be? I've even made five or six catches in practice. Seeing how the experts do it here can only help.

So juggling loses to MTA and I wonder if I'll even be given a chance to justify my existence at this tournament. It's like showing up at the devil stick competition and someone hands you one of those Japanese toys that were hot in Saint Louis.

The morning turns to afternoon and the weather turns just fine for booming. The drizzle has stopped, the heavy clouds are blocking off the sun, and it's a perfect 65 degrees with a steady light breeze. It doesn't particularly help me, choking as usual now that people are watching and there are painted lines on the ground telling you exactly how far you threw (not very) and how close the boom returned to you (not very). The Bovinator has never been to a tournament before, but is having a good time. And we both witness some brilliant performances. Booms are propelled out 60 meters and return on the money. Guys are making five catches in well under 20 seconds in the Fast Catch event. Girls, well, none turned out for this tournament except to watch.

And some spectators have turned out to watch as well. Seeing how the music, the food, and the sky stuff was all cancelled, but the weather is clearing up, we are Hot Food Hot Jazz '92. People are driving by, pulling off the road onto the field, getting out their lawn chairs and actually watching. I'm wondering what they could be thinking of. Most people, when they hear I throw, ask, have to ask, "Gee, do they really come back?" (The B world equivalent of "I can do two!").

The Endurance event is going on, where the better throwers are averaging 10 catches a minute with their three-bladed buzzsaws. Blink and you'll miss a throw. I'm wondering if these spectators can say to their buddies, "Wow they really do come back" at the same pace. I'm wondering how many will drive away from the airport today believing that boomerangs really work. Maybe they're thinking that we're using some kind of trick boomerangs. Maybe they ignore my own performance and think that boomeranging requires an awesome amount of skill, comparable to that involved in, say, juggling three torches. Apart from yelling at people to get off the field, my contact with the public is limited to a woman who wants to know where she can buy a boomerang for her son. He looks at me, asks if they really come back, I pause for a minute before answering this very astute question, and I tell them to see me after the tournament ends. At least I can foist my orbiter off on them.

The predicted thunderstorms never arrive. At the end of the day we get a bright sun, that same steady breeze, and it's juggling time. I am psyched. During practice I spend more time looking for the boom that got away than actually throwing. The key to juggling balls, we all have learned at one time, is to avoid watching the prop when you catch it. Keep your eye on its trajectory.

This is hard to do in boomerang juggling. Most of the time, you can't watch the boom at the peak of its trajectory because you're receiving an incoming one. The challenge is magnified when you find yourself staring at the sun much of the time. Other times you're trying to locate the incoming boomerang and you can't distinguish it from the birds checking out the strange avian.

Today's first throwers have it harder. Much as the sight of two boomerangs being juggled can impress, they're nothing compared to what we're being treated to. Thirty hot air balloons lift off from the other side of the hangar. The first people to juggle are constantly yelling out, "Where is it?!", because they can't see anything but a rising curtain of mylar. World-class boomerang jugglers end up posting their worst scores in years because of the balloons.

It turns out that these balloons aren't going far. Part of the fair features these $5 balloon rides which just take people from the field (where we were supposed to be) over the hangar to the runway (where they stuck us).

Most of the balloons manage to get all the way across to the runway. The only one that has trouble is the one that has the "Dare to Keep Your Kids off Drugs" slogan painted on it. They land smack in the middle of the bullseye. I wonder it the driver of the balloon was on something other than the ground.

Finally it's my turn, my chance to show how a real juggler can juggle boomerangs. I'm off to one of my best starts ever. The first throw comes right back to me, has plenty of time to hover overhead, and I make a perfect second throw. Catch the first one, find the second over to my left, and toss that first one out for throw number 3. I make the second catch, and once again find its partner coming back to me, happily hovering right over me. So I reach back, and with all the time in the world, throw the boom into the ground. I make that anti-climactic third catch, but can only think about what might have been.

What might have been is going on down the field. Paul David has been keeping two tri-bladers going for a while now, and is well past the 100-catch mark. Much later, he fumbles at 238, and the crowd goes wild. The crowd of throwers, that is. There are plenty of onlookers around, looking to be entertained now that the balloon rides are over, but they don't seem to be aware that they've seen a World Record broken before their eyes. In fact, many of them have tried to walk across the boom-strewn field to get back to their cars more quickly, naively assuming that every boomerang is flying under perfect control. I look for the kid and wonder what price I should ask his mother to shell out for the orbiter, but I can't find them.

There's a certain sense of satisfaction I have at the end of a tournament. I find out I actually finished in the top half of the group in one of the eight events (one more catch in juggling and I would have placed in two events, which gives you an idea of how phenomenal 238 catches is). Even the Bovinator, who's only been throwing for a year, has had a good day. He made a catch in every event he entered, and even came close to placing in one of them.

We say goodbye to everyone who has to leave, ignore the public and the media (they're ignoring us), and head off to party in Northampton.

The next morning its hot and humid, lousy for throwing booms, but the sort of weather you'd expect to find 10 to 15,000 people milling around an airport tarmac, getting sunburned. We can get in free. All I have to do is wave a boom out the car window, mutter something about giving a demo, park back near the hangar, and check out that corn bread.

But I take a look at the line of cars snaking along Route 9 in the heat. I think of all the hot tarmacs I've been on for air shows, and those were out on the West Coast, where they rarely get the kind of heat the Connecticut Valley can come up with. We pass on the airport and head back home via those cool Vermont hills.

Administration

Copyright (C) 1992 by Eric Promislow. (C) renewed 2020. Reproducible by permission only.

Other Documents

  • BTR Overview
  • Next BTR
  •