Slashdot Mirror


Fantastic js1k Submissions

An anonymous reader writes "With just five days left in the current competition to write an app in only 1kb of JavaScript, the submissions are becoming increasingly impressive. Take for instance a beautiful 3D animation drawing on a 2D canvas. Or a mine cart animation. If you wait long enough you'll actually get to caves! Can you manage to write a demo that fits on the hall of fame before the deadline closes?"

35 of 70 comments (clear)

  1. Hmm... by Type44Q · · Score: 4, Insightful

    No luck with the demo #1451 (it errors out) but the "mine cart" is unbelievable. Never having "programmed" in javascript, I hadn't realized it was so versatile and powerful and certainly had no idea that 9,000 zeros and ones could go so far, even in such obviously skilled hands...

    1. Re:Hmm... by MBCook · · Score: 2

      1451 is really pretty cool. It runs like a dog in Safari (0.5 FPS if lucky), but ran great for me in Chrome (probably closer to 20). It's very impressive.

      I agree about the minecart. They did a fantastic job with that one as well.

      --
      Comment forecast: Bits of genius surrounded by a sea of mediocrity.
    2. Re:Hmm... by Spikeles · · Score: 2

      Not JS, but if you are impressed by large results in small code you'll probably love this and maybe this

      --
      I don't need to test my programs.. I have an error correcting modem.
    3. Re:Hmm... by Type44Q · · Score: 1

      I'll check those out; thanks!

    4. Re:Hmm... by skitchen8 · · Score: 3, Insightful

      I know yelling "slashvertisement" is cool, but is any JavaScript demo that runs good on Chrome an advertisement to you? It seems to me like it just means chrome renders these demos better than other browsers. To the best of my knowledge this is a competition that happens yearly and always gets some tech coverage because seeing what you can do in small amounts of code is pretty cool to people interested in code. It isn't exactly like Slashdot reaches out of your monitor and shoves articles into your eyeballs, you have to actually click on the links to see the content. What you actually seem to be complaining about is that you don't possess the mental capacity to not click on something you don't want to see.

    5. Re:Hmm... by LordLucless · · Score: 2

      Yeah, they should have to write their own OS in javascript in under 1k to qualify. And browser.

      --
      Just because you're paranoid doesn't mean there isn't an invisible demon about to eat your face
    6. Re:Hmm... by K.+S.+Kyosuke · · Score: 3, Informative

      ah, Chrome just happens to be the only browser with a fast 3D renderer right now.

      Are we talking about WebGL here? You know, the thing that is explicitly *disallowed* in js1k demos?

      --
      Ezekiel 23:20
    7. Re:Hmm... by Zaiff+Urgulbunger · · Score: 1

      The author of #1451 has a video of it on his blog. Oddly, it does appear to be working on my Browser (Chrome 26.0.1410.43 on Ubuntu 12.04 64-bit) but it is slower than the video and for some reason, the bee's wings don't show!

      Never the less, it's really impressive!

    8. Re:Hmm... by Briareos · · Score: 1

      Don't forget Debris, which at a moderate 197kB beat a lot of multi-megabyte sized other demos at Breakpoint 2007...

      Also, it comes with full source.

      --

      "I'm not anti-anything, I'm anti-everything, it fits better." - Sole

    9. Re:Hmm... by MrL0G1C · · Score: 1

      That is the best demo ever, another link : http://archive.org/details/Fr-041Debris

      That they fitted the demo into 177KB is mind-boggling.

      --
      Waterfox - a Firefox fork with legacy extension support, security updates and better privacy by default.
    10. Re:Hmm... by Jesus_666 · · Score: 1

      No, I'm talking about 3D transforms, which are plain CSS3. Should've been more precise about that.

      --
      USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
    11. Re:Hmm... by K.+S.+Kyosuke · · Score: 1

      No, I'm talking about 3D transforms, which are plain CSS3. Should've been more precise about that.

      Ah, I see. But I still don't see demo #1451 using CSS3, it looks like all canvas to me.

      --
      Ezekiel 23:20
    12. Re:Hmm... by Jesus_666 · · Score: 1

      I concede that point. Looks like it comes down to either the various JS implementations or the various canvas implementations. JS-wise it's not surprising to see Chrome lead - V8 is heavily speed-optimized and I don't think SquirrelFish and SpiderMonkey are quite that fast (and I have no ides where Chakra is these days). Seeing that speed is one of Chrome's main design goals that's not surprising.

      My point still stands, though: It's not a slashvertisement to point out that Chrome happens to be faster than Safari (and usually most other browsers too). Chrome is. That doesn't mean that Chrome is better at everything, though.

      --
      USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
  2. Gödel it up by Anonymous Coward · · Score: 1

    Lets assign numbers to every nice app starting from one to 2^1024 and call a library for the tedious stuff..

  3. Re:Hosts file by macraig · · Score: 1

    Better yet perhaps some JavaScript to block egomaniacal social network ramblings about the wonders of the hosts file?

  4. Re:the truth... apk by Kielistic · · Score: 2

    Slashdot devs seem in no hurry to fix this problem and it's been driving me nuts. So for anybody who values viewing at -1 and uses greasemonkey here's a Script. There's a chance of false positives and it's not the most optimized. But I value not having to scroll through > 10 paragraphs of APK, custom hosts files, or 'acceptable ads' spam.

  5. intersting by prehistoricman5 · · Score: 4, Insightful

    As has been said, the minecart is amazing.

    I was looking at some of the other ones, and I managed to break the ball drop one - once the ball goes beyond the bottom of the screen, it continues infinitely.

    --
    Fuck Beta
  6. Re:Uses massive libraries by Anonymous Coward · · Score: 5, Insightful

    The fact that a lot of the work is being done by the javascript language itself makes this somewhat less impressive.

    You shut your whore mouth. Did you look at the demos mentioned in the summary? There's a fucking a mine cart ride. It goes up and down while accounting for acceleration due to gravity. Some of the overhead lights randomly flicker. There's goddamn caves. With stalactites.

    So go ahead and shrug it off if you're not interested. But I'll be fucked by a pineapple before I let you dismiss them as anything less than the accomplishments they are.

  7. Good demos, IMHO by girlinatrainingbra · · Score: 4, Informative

    Three-d city tour and rebirth with the trees in it is pretty cool. That's really great to have a bunch of cool demos to examine for their source code and workings!
    :>)
    Pac man in the park is very pretty too.

  8. Re:Hosts file by belthize · · Score: 1

    The spam for hosts files is >1K bytes.

    Not sure what the big deal is just anonymous ftp to 10.0.0.73 every so often to get an update.

  9. Re:Uses massive libraries by DuranDuran · · Score: 5, Funny

    Hear hear! I'll also be fucked by a pineapple!

    --
    "You can justify anything by putting it in quotes, adding a famous name and making it a sig" - Albert Einstein
  10. Re:does my java shortcut to start Doom III count? by narcc · · Score: 3, Insightful

    Obviously not.

    No externals
    That means no linking, no including and so no using of any external resources. You are free to submit your 5 minute intro video or coffeescript interpreter in your submission though, as long as the server permits you to. And no, you may not use another submission in your submission. Your submissions should be able to be put in a single script tag (see the shim) and should work offline from the start.

    I challenge any basher to produce something even half as cool as the minecart demo following the official rules.

    Put up or shut up.

  11. Re:Not bad... by veubeke · · Score: 5, Informative

    Assuming you're aware that comparing a 1k source to a binary is a pretty weak comparison I have to point out another thing. The himalaja demo uses DirectX 9 whereas these demos aren't even allowed to use WebGL. Demos like this might not be as impressive but the author had to calculate the lighting himself instead of just calling iCanHasLightSource.

  12. Re:Uses massive libraries by purpledinoz · · Score: 1

    The fact that a lot of the work is being done by the javascript language itself makes this somewhat less impressive.

    The fact that IT IS done with only 1KB of javascript is even more impressive! If anything, it illustrates the power of javascript.

  13. Furbee demo explanation by Ranx · · Score: 5, Interesting

    Román Cortés has written a nice, detailed explanation of how he made his Furbee demo:

    http://www.romancortes.com/blog/furbee-my-js1k-spring-13-entry/

    Very interesting read.

    --

    Me
  14. 1kb??? by gatkinso · · Score: 2

    Back in my day, we programmed with one bit... uphill... both ways.

    --
    I am very small, utmostly microscopic.
    1. Re:1kb??? by MadKeithV · · Score: 1

      Back in my day, we programmed with one bit... uphill... both ways.

      You mean one way uphill until you wrapped around the universe back to the bottom of the hill!

  15. Re:Uses massive libraries by Ginger+Unicorn · · Score: 1

    I'd love to read a detailed description of what all that maths is doing.

    --
    (1.21 gigawatts) / (88 miles per hour) = 30 757 874 newtons
  16. Re:Better Than... by neminem · · Score: 1

    Seems pretty obvious what it means: it is begging for someone to comment with that comment (exactly like the new definition for "begs the quest", which at least to my mind, makes way the frack more sense than the supposed correct definition). Read it the same way you would read "in before".

  17. Re:Uses massive libraries by flimflammer · · Score: 1

    Your level of stupidity is truly groundbreaking.

  18. Re:does my java shortcut to start Doom III count? by flimflammer · · Score: 1

    Sure, if you want to be disqualified and made a laughingstock for not understanding simple rules.

  19. Re:the truth... apk by kermidge · · Score: 1

    No doubt; I agree the schmeer oughta be on it's own somewhere. A simple post with link would then suffice, no?

    But I was thinking of those links that led me to some places where I did more reading of a few things that I found useful or informative. Separating wheat from chaff was non-trivial, of course. "Time well spent" may've been an over-reach, but learn stuff I did. I think. Time stamp shows 0817; for me it was more oh-dark-thirty at the end of a very long day. And I did preface all by admitting 'simple-minded'. [grin]

    Don't know if the hosts file has helped, cuz I forgot to turn off AdBlock, and had already selected most of what I intended to read before crashing at around 0600 local.

  20. Re:Uses massive libraries by Maritz · · Score: 1

    1044 bytes then?

    --
    I do not want your cheap brainburning drugs. They are useless for work. And I am a working man today.
  21. Why did you put “programmed” in quotes by sidragon.net · · Score: 1

    Are you one of these people who suggests JavaScript isn't a “real” language? Would it help to know that I have applications in production that service thousands of requests per second, accessed through rich, stateful clients that are loaded once and talk to the server without reloading the page?

    JavaScript is probably the most powerful, versatile, and accessible language around these days.

  22. Errata. by sidragon.net · · Score: 1

    That should be http://nodejs.org/ not .com.