Live data from Hacker News

JS1k demo: “Highway at Night”

js1k.com

1–10 of 100 posts

Re: JS1k demo: “Highway at Night”

#4
Wow. I can make sense of a little bit of the original source, but I wonder more how RegPack [0] works to compress it into that final submission!

As a side note: I'm in college now and looking to propose an independent study on compression. Any suggested readings or algorithms I should look into?

[0] https://github.com/Siorki/RegPack

Re: JS1k demo: “Highway at Night”

#7
This demo gives some ideas about how the human brain manages to remember events. With just a few lines of code, containing very little information, it generates something we perceive as a very detailed record of a highway trip at night. Even if we don't know exactly what tricks the human brain uses to compress information about places and events, this demo let's us imagine how some of it might be done.

The human brain is a master at recognising and codifying geometric 3d shapes. The developer who created this is a master at coding geometric shapes and transitions in javascript as well.

Re: JS1k demo: “Highway at Night”

#8
post #6

How does this loop work ?Does this create an array where B,F,Z,D and i are 0? for(T=[B=F=Z=D=i=0];i<600;i++)

The loop first sets B, F, Z, D and i all to zero. Then it sets T to a new array containing one element, zero.

The key here is that = is a right-associative expression operator which yields the right operand.

Post reply on HN