Recent submissions

Comment · 14 years ago
Hey, thanks. Yeah, I haven't yet fully explained all of the simulator.

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).

Comment · 14 years ago
> A friend of mine used to refer to code that was more art than engineering as “clever.”

I see "clever" code as the opposite of good engineering and art. Beautiful code isn't "clever". An elegant engineering solution isn't "clever".

Comment · 15 years ago
> As someone who conjured this exact thing up in another language after reading SICP

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).

Comment · 15 years ago
Cheers. I guess you could call it an internal DSL, but I wouldn't call it an interpreter - all it's manipulating is the arguments object, it doesn't manipulate any strings. I'm sure string manipulation isn't the only thing that identifies an interpreter, but it doesn't seem like that to me.
Comment · 15 years ago
I'd recommend coming back and reading it when you've learned a bit more Ruby then. If you've "just started" then you probably don't yet have the experience in Ruby to understand what it means.

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.

Comment · 15 years ago
Haha I love it :)

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton