News for hackers. Stuff that matters.
Re:JS1k, 1k Javascript demo contest by jdp on Friday August 06, 2010 @02:37PM (#1581909)
Looks like a burgeoning Javascript demoscene. Good luck to everyone who wants to top the 284 byte ray marcher, though: http://www.p01.org/releases/512b_jspongy/

It runs super slow on Firefox, it does much better in Chrome.

Re:JS1k, 1k Javascript demo contest by p01 on Friday August 06, 2010 @06:08PM (#1582449)
Hopefully, http://js1k.com/demo/49 will top JSpongy ;)

This time I wrote a Quaternion Julia fractal raymarcher using the Hubbard-Douady distance estimation and tried to wrap the all thing with a nice design.

Hope you like this first entry to JS1K and appreciate the efforts.

PS: It works at a good 20fps in Firefox on my 2yo machines.

Re:JS1k, 1k Javascript demo contest by jcl on Friday August 06, 2010 @10:43PM (#1582951)
Good job; it looks amazing... That one's my favorite (although the tunnel is also nice).
Re:JS1k, 1k Javascript demo contest by johnfn on Friday August 06, 2010 @02:41PM (#1581927)
That is really impressive. I wish the guy would release some notes about how he did it, or what his code means...

Edit: I started looking into it. He does some really bizarre things, like having all of his assignments and statements in the parens of a for loop, assigning Math.cos to $, and some tricky bit ops. Unfortunately, I don't think I understand the math well enough to totally understand it.

Re:JS1k, 1k Javascript demo contest by jcl on Friday August 06, 2010 @10:40PM (#1582948)
There was some analysis posted when the article originally appeared on HN:

http://news.ycombinator.com/item?id=1227936

As I understand it, the trig calls are just to establish the camera position and direction. The rest of the calculation (the two inner loops) is marching along a ray to find a depth value.

Re:JS1k, 1k Javascript demo contest by swah on Saturday August 07, 2010 @01:16AM (#1583098)
Then WebGL comes along and the community splits between bare-bones vs OpenGL...again!
Re:JS1k, 1k Javascript demo contest by jacquesm on Friday August 06, 2010 @04:13PM (#1582195)
I can't tell you guys how happy this makes me, it is the kind of programming that I really think should be done more often because it really makes you a better programmer to be able to work within such a restrictive environment.

Some of the demos are absolutely stunning for their size. I'm more and more convinced that javascript will be the dominant 'starter' language for new programmers in the future and these small programs are just the right size for enthusiastic kids to pry apart and learn from.

Re:JS1k, 1k Javascript demo contest by thingsinjars on Saturday August 07, 2010 @02:44PM (#1584038)
I've found trying to squeeze my demo down really addictive.

My first version was about 990bytes, my second did the same stuff in 934. I then spent about 6 hours trying to squeeze a blur routine into the last 90 bytes. I've now got everything I want in and I've got 8 bytes to spare.

Of course, now I'm wondering what I can get into those last 8...

I've only just submitted the last verion (with blur) so it's not on yet but the previous one is here: http://js1k.com/demo/59

Re:JS1k, 1k Javascript demo contest by judofyr on Friday August 06, 2010 @03:23PM (#1582072)
This one is amazing: http://js1k.com/demo/39 (move your mouse to change the colors).

This one is also nice: http://js1k.com/demo/12

Re:JS1k, 1k Javascript demo contest by p01 on Friday August 06, 2010 @06:10PM (#1582457)
The 39 one reminds me of pNebula and Mars, two 256b JS prods.
Re:JS1k, 1k Javascript demo contest by johnfn on Friday August 06, 2010 @02:39PM (#1581918)
This one http://js1k.com/demo/41 is really remarkable for 1K.
Re:JS1k, 1k Javascript demo contest by marktucker on Sunday August 08, 2010 @04:18PM (#1586064)
I just submitted mine! It's a shortened version of this (don't click if using firefox on linux because of bug #550845): http://cs.uiowa.edu/~mltucker/js/chaos/ ... although bit simpler and without jquery of course.

I love this stuff.

Re:JS1k, 1k Javascript demo contest by Kilimanjaro on Saturday August 07, 2010 @10:36AM (#1583613)
Demo #15 rocks. I wonder if a modern Zaxxon can be created based on that.

http://js1k.com/demo/15

Re:JS1k, 1k Javascript demo contest by shill on Saturday August 07, 2010 @05:13PM (#1584328)
Can somebody please explain rule #4 to me? Thank you.

"4. Must work on current fx, sa, ch and o. (Let's level the playing field)"

Re:JS1k, 1k Javascript demo contest by olegkikin on Saturday August 07, 2010 @05:27PM (#1584361)
firefox, safari, chrome, opera
Re:JS1k, 1k Javascript demo contest by AlexMuir on Friday August 06, 2010 @03:57PM (#1582152)
You could almost embed these in a QR Code.
Re:JS1k, 1k Javascript demo contest by bhiggins on Friday August 06, 2010 @07:52PM (#1582681)
Wow, big fan of http://js1k.com/demo/15

Also nice to see mrdoob on there. I like his canvas experiments.

Re:JS1k, 1k Javascript demo contest by Groxx on Friday August 06, 2010 @08:13PM (#1582721)
That one's awesome. Runs smoothly too, which is always a plus :)