/cpp_poetry

Saving the art of the C++ Slack #poerty channel for posterity

cpp_poetry

Saving the art of the C++ Slack #poerty channel for posterity

#poetry

Phil Nash:
there was a new channel called #poetry
whose content was decidely throwaway
but starting with root
and more nodes to boot
we realised that we could just grow a tree

Adi Shavit:
I say it shall be,
a repository
of poetry inspiration.

Where the poor coder,
or poet or speaker,
may find slides for their presentation.

Phil Nash:

auto theAnswer( int b ) {  
    auto question = [=]{ return (2*b) | !(2*b); };  
    return question();  
}  
int main() {  
    return theAnswer(21);  
}  

Kab:
Here is my ACK
This poem is whack

Tveerd

Remember when selecting a container, vector is best;
Leave a comment when choosing one of the rest.

I need some help with this one:
(With apologies to @patricer and other Cohen lovers, like me)
http://leonardcohenfiles.com/album8.html#61
https://en.wikipedia.org/wiki/Duff%27s_device

Leonard Cohen on Duff's device:

Now I've heard there was a secret code
That Duff did type, and it pleased the load/Lord
But you don't really care for coding, do you?
It goes like this
The for, the switch
The minor fallthrough, the performance lift
The baffled dev composing Unrolled loops, yeah
Unrolled loops, yeah
Unrolled loops, yeah
Unrolled loops, yeah
Unrolled loops, yeah

So, "load" or "Lord"? - load makes sense for performance, but I like connecting Duff's device to something holy/mystical

Simon Brand:

My compiler has betrayed me and left me to my fate,
My program doesn't work, it just calls std::terminate.

Kab
I find that when you're a newbie
Your biggest headache is UB

Tveerd
Causing me pain with his fingers
Filling my app with his code‎
Killing me softly with his code
Killing me softly with his code
Filling my whole life with his code
Killing me softly with his code

I heard he wrote some good code, I heard he had a style
And so I came to see him, to listen for a while
And there he was, this bad dev, a bungler to my eyes‎

Causing me pain with his fingers
Filling my app with his code‎
Killing me softly with his code
Killing me softly with his code
Filling my whole life with his code
Killing me softly with his code

I felt all flushed with anger, embarrassed by the code
I felt he'd found my patterns and turned each one around
I prayed that he would finish, but he just kept right on

Causing me pain with his fingers
Filling my app with his code‎
Killing me softly with his code
Killing me softly with his code
Filling my whole life with his code
Killing me softly with his code

Adi
There goes my time with this channel,
Deadlines rush by with a whoosh,
Killing my produc-tivity
Killing it softly with his poems
Killing it softly with his poems
Filling my inbox, @tvaneerd songs
Killing it softly, with his poems.

Tveerd
ABBA on ABA (lockfree issue)

If you change your mind, on the node first in line
Honey I was free
Take a chance on me
Gonna do my very best, but I may be a lie
If you put me to the [cas] test, if you let me try
Take a chance on me
Take a chance, take a chance, take a chance on me

(the stutter at the end is due to a threading bug)

Kab
https://twitter.com/ZachWeiner/status/935885308712898561

Tveerd
'Twas the night be release
Yet VC's were about to divest
Not a file was compiling
Not even a test

(need to start practicing for Christmas)

Nicole Mazzuca
I like monads and I cannot lie
you other coders can't deny
when IO walks in with an itty-bitty bind
and side effects on the mind
I get sprung

Stephan Boekelman
a programmer applies - you ask him what for
he says the whole stack - blue sky to green floor

you question his answer - in order to agree
tell me the difference - npn to pnp

he shrugs his shoulders - physics' not his best
you begin to wonder - but grant a second test

tell me how many - from NAND to NOR
as much as the other way - it merely takes four!

you go for high five - with a flick of the wrist
the applicant lags - about to resist

150k - no more nor less
you take down your arm - in an unconscious process

says as a JS guy - he's clearly worth more
you facepalm your self - and show him the door

Adi
I’m proud, I must tell you,
You’ll have to agree,
That programming’s a bit like
Good poetry.

The structure is rigid,
The syntax is too,
Semantics emergent and
Not easy to do.

But devs have a critic
That poets do not,
The one that enforces
compiling or not.

Jens Weller
The archives are depleted,
all poetry has been deleted.

Kab
Since these lines are ephemeral,
better make backups several

Tveerd
Now that's a travesty;
Almost as bad as coding in C.

Jon Kalb
With the speed of horse-drawn coaches
the submission deadline approaches.
You’ll have so much fun in Aspen
When you send your proposed talk in.

Jena Weller
Thinking about to commit to C++Now,
what talk to submit to enjoy a few days of snow?
With out much fuzz, it should be something about C++,
but it also should be cutting edge, otherwise I'll not get the program committees match...
So I ponder, and wonder should I wait with submitting how much longer?

Tony Van Eerd
With help from kd lang
https://genius.com/Kd-lang-miss-chatelaine-lyrics

Constexpr if constexpr if
I have lived just for this
I can explain why I do not
Miss SFINAE

enable_if enable_if
Held me captive - just a bit
But I can explain why I do not
Miss SFINAE

Every time I'd specialize
Clouds of errors
Burst from the compiler

Don't ask why, don't ask why
I'll reply with just a sigh
But I can explain why I do not
Miss SFINAE
Miss SFINAE...

Jens Weller:
Your modifications fix the calculation
But I’m afraid you forgot a tabulation.
This is the beginning of your tribulation.
Your perfect correction won’t bring you elation.

If there was a way to just automate,
Maybe you could avoid arguing with your mate.
Should there be a space after the bracket
How many white spaces, How many line breaks

Did you know tools could format your troubles away?
You have to choose, there is no midway
Tool-able or arguably palatable?
Tastefulness is debatable, not checkable!

You may be expressionist or constructivist.
Alas the whole situation is surrealist.
Kernighanists are not great artists
Neither are Whitesmiths and Allmanists, that’s the gist.

I too like Guillaume Apollinaire.
Hand crafted alignment falls in disrepair.
Are you trying to win the IOCCC ?
Your sole concern should be consistency.

There is no value in what is invisible.
No semantic in what is not expressible.
A line break or not, what’s the différance
For Git, noisy inconvenient difference

Is indentation really communicative?
Of what can emptiness be indicative?
There is no point, your patch is not applicable
Not comparable, not even shareable.

For the love or your project’s contributors
Don’t act like an art gallery curator.
Clear rules should control the look of each line
Put them in an enforceable guideline

It took a while, now we have modern tools.
The have limitations and act like fools.
For they have one goal, uniformity.
Pick a style then use it consistently.

Your code won’t be magnificent and perfect.
But it will be readable, it’s what I expect.
Tool-able, Merge-able, Refactor-able
Qualities that I find truly adorable.

Pick a style then use it consistently.
Then concentrate on things that matter really.
And so use a tool and accept its caveats
For your productivity, use clang-format.

Peter Bindels
du messt alles, was ich habe, auf der harddisk. du messt alles, auf mein SSD. du! du allein sieht mein verbrauch! (to the tune of https://youtu.be/iy-nr1L_YrY?t=1m09s )

Jon Kalb
On the twelfth day of Christmas
the committee sent to me:
Twelve file systems
Eleven uncaught exceptions
Ten removed trigraphs
Nine maybe unuseds
Eight fold expressions
Seven stood optionals
Six stood variants
Five constexpr ifs
Four stood conjunctions
Three stood negations
Two stood disjunctions
and parallel algorithms.

Tony vanEerd
words and thoughts swirling
blossoms on the Aspen trees
new ideas sprout

Kate Gregory
I have archived
the poems
that were in
the channel

and which
you were probably
saving
to read sometimes

Forgive me
they were funny
so C++
and so rhyming

Ben Steffan
"Is this channel still
alive?", I ask, lamenting
the bare void within.

Adi Shavit
Indeed it is, despite Slack’s haste
I saved it all with copy-paste.
Still need to start a repository
For all the witty poetry

Yogendra Singh
My soul, it thirsts,
For your, wise words.

Tony
words and thoughts swirling
blossoms on the Aspen trees
new ideas sprout

Jon
There once was a man from Kitchener
Who was a poet as well as a presenter.
He wrote a haiku about Apsen
so sweet it made my head spin,
So I shared it with my followers on twitter.

Kevin
Off-by-one on the third
But I wouldn't have done better, as a bird

Dave Belcher
There was a programmer called Gus
Who wanted to stream to the bus
He didn't have fun
Cus he was off by one
Until he added plus plus

Nicholas Timmons
A standard was made called C++17,
but the lines they were not read in-between,
Its such a depressor
Now that the 'if constexpr'esor
Make weakly typed C++ definitions routine

Kate Gregory
https://twitter.com/ridiculous_fish/status/1001681073917620224

Ridiculous Fish @ridiculous_fish
do this (a C++ poem):

If volatile or bitor
try short break
goto this private void, float
and return new

Ólafur Waage
In the constructor
Object is not fully formed
Be careful with this

Tony Van Eerd
https://twitter.com/kvlly/status/1000712328847994881

Kelly Vaughn@kvlly Hey I just met you
And this is crazy
But here's a PR
So git merge maybe

Peter Bindels
https://twitter.com/CppSage/status/1001969449489092609

Matt Calabrese@CppSage
@ridiculous_fish if using reinterpret_cast while constexpr, do not continue. try using static_cast for this -- constexpr requires not > using reinterpet_cast.

Jon Kalb
Of C++, I can’t get my fill.
After two dozen years, it’s still a thrill,
But my wife took a vacation stand
Planned a trip, long ago, to Switzerland.
We’ll see it all, we really will,
Every town, except Rapperswill.

Shafik Yaghmour

https://twitter.com/shafikyaghmour/status/986353977179516928

Ode to the ternary operator

her eyes were a question mark, her mouth a semi-colon
i feel in love with smooth operator the first time I met her
no more if and else for me
it’s ternary and me forever

https://twitter.com/shafikyaghmour/status/980898697578921984

This is Just to Say -- Compilers Undefined Behavior Edition

I have translated
the program
that was
in the translation units

and which
you were probably
expecting
predictable results

Forgive me
they required no diagnostic
so undefined
and so erroneous