News for hackers. Stuff that matters.
Re:Is there an algorithm as beautiful as a poem? by MrVandemar on Sunday June 16, 2024 @01:42AM (#40694941)
I may be misremembering, but I saw a 'C' strcpy that looked concise and elegant, and seemed like a kind of poetry to me at the time.

    while(*s1++ = *s2++);
Re:Is there an algorithm as beautiful as a poem? by ajuc on Sunday June 16, 2024 @04:15AM (#40695515)
[delayed]
Re:Is there an algorithm as beautiful as a poem? by saghm on Sunday June 16, 2024 @03:20AM (#40695286)
It's certainly concise, but two post-evaluation assignments inside another assignment evaluated as a boolean condition feels more like the code equivalent of an Lovecraftian eldritch horror than a beautiful sunset.