Tetris In 140 Bytes
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?"
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.
You'll love the non-restrictive EULA.
Sigs. We don't need no steenking sigs.
Not to diminish their accomplishment, because this is very cool, but the 140 byte implementation is the base logic, it's not the actual printing or keyboard handling. Maybe that's nitpicking, but technically you can't just copy/paste that code and have the game, so I find the summary misleading.
so if your bored
Dear /. Overlords,
Would it be too much trouble to plug some type of grammar and spelling module into the slash-code? /. users; for you, the /. editors. I believe that in this wonderful age of computing, we wouldn't
Not for us, the
begrudge you guys a little help before you hit "submit."
Sincerely,
You're
[Fuck Beta]
o0t!
To write that post you had to have a bunch of silicon doped to recreate basic logic gates, a kernal to pass it instructions, an OS to let you interact with the kernal, a browser to connect it to a worldwide network and so on. This is cheating. Real Slashdotters use a butterfly.
Please consider this account deleted, I just can't be bothered with the spam anymore.
Chess in 672 bytes
"I bless every day that I continue to live, for every day is pure profit."
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
G.
Was supposed to be "winners" of course, but then "sinners" might well be the more appropriate term anyway...
G.
Here is my Tetris implementation:
However, it only works on custom Javascript interpreters which have a global a() function that implements a full game of Tetris.
== Jez ==
Do you miss Firefox? Try Pale Moon.
#!/usr/bin/perl
use StupidShitIveWritten::Tetris(tetris);
tetris;
If you actually look at the code, just the javascript is 733 bytes after taking out all whitespece, etc, not 140. And this doesn't count the html that embeds it - an additional 112 bytes, for a total of 845 bytes.
Let's call it what it is, Anti-Social Media.
Did you know that the word 'obligatory' came from the Greek God Obligatius who, on occasion, would entertain Zeus with stand-up philosophy? One night he told an off-color joke about Rhea, it made all the gods laugh except for one. Zeus was so angry he punished Obligatius by making him tell the same joke over and over again until he can find somebody who'll laugh at it. To this day, he still wanders the earth saying "640k should be enough for everybody!"
"I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)