Anybody here every try writing code poetry? Here's an attempt in Python. This will run (assuming "ant.py" exists), but doesn't do anything. The best code poems actually have some kind of neat side effect.
Some people have
ENTIRELY TOO MUCH
time on their hands.
(It doesn't rhyme, but it has a sort of meter.)
@EPAIII
Yeah, it doesn't rhyme, but I was trying to limit myself to keywords as much as possible, which makes it hard. The
open("you","r")
was fun because the "r" actually does something here (tries to open the file "you" in read mode). And the fact that it comes between the a
try:
and
finally:
means if the file doesn't exist, the exception will be caught. Though to be fair, the underscore will evaluate to False which may prevent the open from running due to "short circuit" evaluation of the logical and. Ah, and the first if statement will evaluate to False anyway.
@SiliconWizard
Shakespeare is great, hahaha. Have you seen Chef?
https://esolangs.org/wiki/Chef (nice example),
https://www.dangermouse.net/esoteric/chef.html (syntax)
while( you.love(me.love(you)) ) {}