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.