Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Programming Build Games Idle News

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?"
This discussion has been archived. No new comments can be posted.

Tetris In 140 Bytes

Comments Filter:
  • Nostalgia ... (Score:5, Insightful)

    by WrongSizeGlass ( 838941 ) on Sunday February 19, 2012 @11:30AM (#39092575)
    It reminds me of the old days when code was efficient and had to fit onto small discs and into limited RAM and/or ROM. The original Mac ROMs were 128k, and all the apps had to run in 128k of RAM. It was amazing what could be done when it just had to fit.
  • Not 140 bytes (Score:4, Insightful)

    by sakdoctor ( 1087155 ) on Sunday February 19, 2012 @11:38AM (#39092637) Homepage

    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)

    by slasho81 ( 455509 ) on Sunday February 19, 2012 @12:04PM (#39092781)
    Now, this is proper Slashdot material. More of this, please!
  • Re:Not 140 bytes (Score:5, Insightful)

    by Gavin Scott ( 15916 ) on Sunday February 19, 2012 @12:18PM (#39092847)

    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)

    by Anonymous Coward on Sunday February 19, 2012 @01:25PM (#39093337)
    Oh, well, in that case, allow me to introduce you to my 4 character Tetris program.

    t();

    (That's a function call to an external library that does all the other shit needed)
  • by kelemvor4 ( 1980226 ) on Sunday February 19, 2012 @05:37PM (#39095019)

    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?

For God's sake, stop researching for a while and begin to think!

Working...