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.