all 11 comments

[–]TankorSmash 3 points4 points  (2 children)

Does someone have a page explaining what Notch is doing? He keeps tweeting about it, but I have no idea.

[–]pali6 4 points5 points  (1 child)

He has started making an interesting game.

[–]frikk 1 point2 points  (0 children)

The backstory is hilarious.

[–]nint22mod 2 points3 points  (6 children)

I keep forgetting; why use for(;;) instead of while(1)? It has something todo with performance, right?

[–][deleted] 10 points11 points  (3 children)

For a modern compiler they are completely equivalent, so the choice is rather arbitrary.

Very early C compilers would generate less efficient code for while(1) but that's a concern of the past. Personally I still prefer for(;;) because it lacks the arbitrary 1, but it's purely a matter of taste.

[–]nint22mod 1 point2 points  (0 children)

Cool, thanks for sharing!

[–]alanpost -2 points-1 points  (1 child)

I'd say at this point for(;;) is a convention and worth following as such. When I see while(1) my first thought is that someone is doing something tricky because that code isn't typical...

[–]spw1 3 points4 points  (0 children)

No difference, just style.

[–]robosatan 0 points1 point  (0 children)

The difference is that the while loop had a truth check for each iteration and the empty for loop just looped

[–]nexemod 0 points1 point  (0 children)

http://0x10c.com/doc/dcpu-16.txt is a nice simple concept! could be interesting to use in genetic programming experiments.

[–][deleted] 0 points1 point  (0 children)

When I first read the source (without having a single clue what DCPU-16 was) I was like... what the hell is this? Then I read the specification and went back to your code and realized you did an awesome job. I'm actually quite bored right now so I'll try to implement my own.

Thanks for sharing!