A tweet drawing a Christmas tree
A Ruby code drawing a Christmas tree in less than 140 characters. Here is the Tweet ! Can you do better?
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
A Ruby code drawing a Christmas tree in less than 140 characters. Here is the Tweet ! Can you do better?
Comments
Well I don’t know about better, but it is shorter: puts ([1..20]+[6]4).map{|i|(‘#’i2).center 80}«“\n”+’ ‘*32+’Merry Christmas’
hmm, perhaps if I url-encode the angle brackets: puts ([1..20]+[6]4).map{|i|(‘#’i2).center 80}<<“\n”+’ ‘*32+’Merry Christmas’
A new version is available on github. You can fork it and try to do a shorter/nicer/better one :) Thank you for your comments, Arthur !
I will recommend my friends to read this.I will bookmark your blog and have my children check up here often.I am quite sure they will learn lots of new stuff here than anybody else!….There is also a lot of visual symbolism that is sometimes subtle, sometimes not so subtle.. online casinos
Post a comment