An anagram of Matthew Obert
The evolution of multisets in Python
JEWEL DARLING YOU ARE MY COVETOUS INFATUATION.. MY LOVELY INFATUATION . YOU ARE MY PRECIOUS SYMPATHY. MY PRECIOUS DESIRE IMPATIENTLY ADORES YOUR FANCY. YOU ARE MY AVID FANCY. YOURS ARDENTLY MUC
LoveLetters Wins Tony Sale Award
This interactive multimedia computer art installation sends sparks across the synapse gaps between hacking, making, wordplay, programming, engineering, visual art, and historic conservation. So, yeah — it pretty much lights up my whole brain.
More Information:
A lightning talk by Gary Bernhardt from CodeMash 2012
For more Gary Bernhardt, see Destroy All Software Screencasts and Extra Cheese.
import time
import sys
import os
def sleep(z):
for n in range(z):
print
time.sleep(0.25)
def hack(s):
for c in s:
sys.stdout.write( '%s' % c )
sys.stdout.flush()
time.sleep(0.25)
time.sleep(3)
print
def repeat(r):
for duration in range(r):
sleep(r)
os.system("clear")
sleep(r)
hack(" dc401.org")
hack(" sleep. hack. repeat.")
repeat(6)
This dc401.py script does the job, but I think it would benefit from some old-fashioned code bumming. For example, I wonder whether I could rewrite the sleep() function to accept multiple arguments in such a way that I could avoid extra time.sleep() and print statements in the hack() function.
But there is an additional constraint: everything should be accomplished in the three named functions, which are a DC401 slogan of sorts. It’s like those “Perl poetry“ competitions — only cooler, because it’s Python poetry. (No offense intended to my Perl-monger friends.)