skilldrick
Joined 17 years ago
Karma
238
Submissions
61
Member since
Jan 14
Joined 17 years ago
I see "clever" code as the opposite of good engineering and art. Beautiful code isn't "clever". An elegant engineering solution isn't "clever".
Me too! http://jsfiddle.net/skilldrick/vT2mC/
I didn't get very far with it though - the combined issues of JavaScript's lack of tail-call optimisation and its verbose lambda syntax made building streams to painful.
This looks like an interesting approach, though you'll never get around JS's heavy lambdas (unless you use CoffeeScript or something).
I understand that at a first glance this looks like basic stuff that doesn't explain anything useful, but with a bit more experience you'll see that it's fundamental to understanding how Ruby will react in certain situations.
0xfe is a random number - a new random byte is generated on every instruction.
0xff contains the ASCII code of the last key pressed.
My simulator is adapted from the one at http://6502asm.com/beta/index.html - that has a help screen with some more info. I mostly cleaned up the (atrocious) JavaScript and added a memory monitor and disassembler (and implemented a few instructions they'd left out).