Tetris In 140 Bytes 215
mikejuk writes "Is it possible to write a JavaScript program in no more than a tweet's length? A website called 140byt.es says it is and has an implementation of Tetris to prove it. Ok, it only has two types of block — hence its title "Binary Tetris" — and there's no rotate, but it works. The blocks fall down the screen and you steer them into place. You can try it out by playing the demo. Of course the real fun is in figuring out how it works and there is lots of help on the site — so if you're bored how about the 140 character challenge?"
Nostalgia ... (Score:5, Insightful)
Not 140 bytes (Score:4, Insightful)
The function requires an animation loop and event handler otherwise it does nothing. After that, it's way more than 140 bytes.
More! (Score:4, Insightful)
Re:Not 140 bytes (Score:5, Insightful)
Yes, it's about 816 characters in total. This is complete fail compared to the kind of stuff that's done for the IOCCC competition. The 140 byte function they wrote implements once tiny part of the whole thing, and looking at it suggests that there really aren't going to be many interesting programs possible in 140 bytes of javascript.
If you want to see actually impressive tiny programs written in 2K of C code, like the guy who wrote an entire BASIC interpreter one year and then followed it up with a compiler for the same language the next year, then check out the IOCCC sinners page:
http://www.ioccc.org/years.html [ioccc.org]
G.
Re:Nostalgia ... (Score:5, Insightful)
t();
(That's a function call to an external library that does all the other shit needed)
Re:Dear /. Overlords (Score:5, Insightful)
Your being to picky. People care less about grammar these days ten most other things. Irregardless, there doing the best they can
Was that as painful for you to write as it was for me to read?