1K JavaScript Madness 131
An anonymous reader writes "JS1k has a simple goal: to get programmers producing demos written in JavaScript that are 1k in size or less. That's just 1024 bytes to play with. There's even additional bonus points on offer if a demo's code can fit inside a single tweet. Now that the contest is finished and there is a top-ten, I'm wondering what they can do if given some extra bytes." I like the Tetris clone. The pulsing wires demo is neat too but kinda stuttery on my machine.
Re:Found a bug in tiny ches... (Score:4, Informative)
"[...]it will validate moves, queen-only promotion, without castling and en passant." http://nanochess.110mb.com/ [110mb.com]
coral-cached copies of each one (Score:5, Informative)
Legend Of The Bouncing Beholder [nyud.net]
Tiny chess [nyud.net]
Tetris with sound [nyud.net]
WOLF1K and the rainbow characters [nyud.net]
Binary clock [nyud.net]
Mother fucking lasers [nyud.net]
Graphical layout engine [nyud.net]
Crazy multiplayer 2-sided Pong [nyud.net]
Morse code generator [nyud.net]
Pulsing 3d wires [nyud.net]
Re:Nostalgic Terminology (Score:3, Informative)
I remember them, there were lots of 'em. All computer magazines back then had programs you could type in. IIRC most of them were BASIC, although a few were assembly. Heck, the original Wolfenstein came on a 540k floppy and shareware DOOM was two of them IIRC.
Re:Found a bug in tiny ches... (Score:3, Informative)
Today, a day that will live in infamy, I was beaten by a 1000 byte program.
Whippersnapper. I seem to recall being beaten more than two decades ago by a 1k chess program on a Timex/Sinclair 1000 (aka ZX81).
Possibly even this one:
http://users.ox.ac.uk/~uzdm0006/scans/1kchess/ [ox.ac.uk]
Closure (Score:4, Informative)
You want a static code analysis tool that can perform dead code elimination. It looks like Google's Closure Complier [google.com] will do that for JavaScript code.
Re:And BOOM (Score:5, Informative)
Re:Genetic approach (Score:2, Informative)
Sorry to spoil your party, but you will be dealing with issues in automatic software verification which themselves are infeasible.
This is one problem you can't just throw a bunch of computing power (yet) and it will magically find it a small solution in a reasonable amount of time.
Just fyi, assuming each character has 256 different possibilities in a 1000 byte program in js, there are 256^1000 possibilities, or 2^8000 possible programs to choose from. ... 2^8000
To put that into perspective, current estimates on the number of atoms in the observable units are around 10^80 which is