JS1k: The JavaScript code golfing competition

2010 - Xmas

Home   Rules   Demos   Submit Mailing list  |  Update demo meta data  |  The /r/js1k subreddit JS1k, the yearly JS code golfing competition

Competition rules 2010

  1. Must have an xmas theme

    Purely subjective, but if I don't smell at least some kind of xmas theme in your demo, I will reject it.
  2. Submissions may be up to 1k (1024 bytes)

    Bytes, not characters. Note that js has 16bit character strings so make sure your submission is in fact 1024 bytes.
  3. Submissions must consist of only js

    Do not send me html or css unless it is embedded as js. It will be rejected otherwise.
  4. Any and all externals are strictly forbidden

    No externals also means talking to an api after the app loaded, sending data to an app (twitter, facebook) and of course including images or other media remotely. It should also not be dependent on plugins or whatever.
  5. Must work on current browsers versions (ch, o, fx and sa)

    For this compo, I'll be the only judge. That said, all compo's must work on my Windows system in firefox 3.6, chrome 8, safari 5 and opera 10. That means audio is out this round (and prevents me getting from getting headaches, thanks). Webgl is out as well. I'll probably notify you of problems though.
  6. The eval family is NOT allowed this time

    This may raise some eyebrows but I'm restricting the use of eval(*), setTimeout(string, ..), setInterval(string, ..) and Function(..). Don't dynamically include a script either (good call @bga_!). This list may grow if I discover another way of getting eval in so please don't bother. This rule targets the dynamic creation and running of js only (creating dynamic animations or whatever is fine). Note that setTimeout and setInterval with function arguments are still okay! I'm doing this for aesthetic reasons, mostly. The most fun of creating a demo is hand tuning it!
  7. You get canvas object, its context and body object for "free"

    You canvas lot will get the canvas element and its context as embedded in your global as the variable c and a. For those not using canvas, you get the body element in the global as variable b.
  8. Your demo must work in the "html5" shim provided

    The shim has a little addition since last time, but it it should be backwards compatible as it's currently also used to host the demo's from the previous compo. The only addition is rule 7. Note that it will have to work inside the intended frame set and that it cannot "break out" of the frameset.
  9. Your demo must be submitted before xmas!

    The deadline is midnight on Christmas eve (so the midnight of 24 to 25 December ;) CET (that's +01:00). I will try my best to publish the results on xmas day. But you guys will be too busy visiting your parents anyways so no hurry, right? :)