HNHacker News
TopNewBestAskShowJobs

skilldrick

238 karma · joined January 14, 2010

submissionscomments
skilldrick··on Easy 6502 - Learn the 6502 Assembly Language
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).

skilldrick··on Art vs. Engineering
> 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".

skilldrick··on Introducing a new data structure, streams, in Javascript
> 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).

skilldrick··on Making inheritable objects in JavaScript without objects
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.
skilldrick··on Understanding the Ruby object model
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.

skilldrick··on Understanding the Ruby object model
Haha I love it :)
skilldrick··on Understanding the Ruby object model
It's a bit like saying "I see a lot of women have jobs these days - does that mean that feminism is more than just a fad?" You're not going to get any helpful responses if you ask something inflammatory (and I think it shows maturity that no-one's flamed you).

Anyway, what would you gain from asking a bunch of Ruby developers whether Ruby is "just a fad"? This is hardly the best venue for that question.

Incidentally, I didn't downvote you, just thought I'd try to explain why nobody responded to you.

skilldrick··on Understanding the Ruby object model
> Note that this is a basic explanation, and glosses over higher-level concepts like the eigenclass/metaclass (I’ll leave that for a later post).
skilldrick··on Understanding the Ruby object model
It's essential to know this stuff to really understand how Ruby works. If you want to know which method is going to get called then you need to grok the object model. Classes in Ruby are much more than "fancy structs with allocation", and thinking of them in that way means you'll be losing out on a lot of Ruby's power.
skilldrick··on You should learn to type (properly)
Completely OT, but when I saw your comment, I new I recognised your handle, but couldn't think why. I finally worked it out though - you answered my first ever Stack Overflow question in 2009! http://stackoverflow.com/questions/418465/is-a-preference-fo...
skilldrick··on You should learn to type (properly)
What an arrogant comment. If you'd read the post, you would have seen that I said it's often not the bottleneck, but there are times when you need to get stuff out of your head as quickly as possible.

This "typing is not the bottleneck" is such a cliché - I nearly wrote about it in the article. It presupposes that programming is some kind of pipes-and-filters activity where we're thinking and then typing and then compiling. I don't know about you, but when I'm programming I work in different states. Sometimes it actually is about getting the code into the computer as fast as possible. Not all the time, but sometimes.

skilldrick··on You should learn to type (properly)
Thanks. I'm on Ubuntu and did

    sudo apt-get install gtypist
skilldrick··on You should learn to type (properly)
> any advice?

GNU Typist, and real discipline. Force yourself to do it their way.

skilldrick··on You should learn to type (properly)
I don't think not being able to touch-type will get you fired (if you can type fast anyway), but I don't agree that "it doesn't matter".
skilldrick··on You should learn to type (properly)
It's probably worth clarifying here that touch-typing is different to typing-without-looking-at-the-keyboard-(much). As knowtheory said, many presume that they're the former, when they're actually the latter.
skilldrick··on Magic in software development
Haha I love "little laptop pixies" :) That's exactly what I was talking about.

I think I'm going to have to get this TECS book (no pun intended) - it sounds just what I'm after. Need to finish SICP first though :P Not enough hours in the day.

skilldrick··on Magic in software development
Interesting. Yes, I came a similar route - no CS background. I read ESR's TAOUT [0], which assumes quite a high level of Unix knowledge - I'd love a book at that level!

[0] http://www.catb.org/~esr/writings/taoup/html/index.html

skilldrick··on Magic in software development
Wow, those sound very interesting.

I've been toying with the idea of a series of blog posts (or possibly even a separate site) that give a bottom-up explanation of all the stacks we work with - starting with electronics => circuits => computers => programming languages. It would be a way of teaching myself the material and provide a useful resource to others.

Feels like a lot of work though :P

skilldrick··on Magic in software development
That's kind of my point - you need to accept the 'magic' you're given, at least for the time being.

I feel a bit uncomfortable leaving it at that though, I always want to know how things are working. But it's not essential.

skilldrick··on Magic in software development
Just so people know, I'm not talking Rails magic here - more the idea that there's stuff we don't understand that's going on that to all intents and purposes is magic. In other words:

> anything below your current level of abstraction that you don’t understand

skilldrick··on Closures explained with JavaScript
Crazy! Yeah, Metaprogramming Ruby is on my wishlist. I understand why the rules in Ruby are complicated - it's to make the common case simpler. But I still like the simplicity of JavaScript.
skilldrick··on Closures explained with JavaScript
Thanks, and a really interesting perspective.

I find Ruby's rules on scope (and pretty much anything) pretty confusing. I really like the way Ruby does a lot of things, but it doesn't have simple rules like JS.

skilldrick··on Why you should learn brainfuck (or: learn you a brainfuck for great good)
I added this to the post in the end - on reflection I think you're right that it's worth mentioning.
skilldrick··on Why you should learn brainfuck (or: learn you a brainfuck for great good)
Yes, I nearly put that in, but it didn't feel right. I've only given a very basic introduction to the language - the purpose of the blog was to teach the language rather than give its history.

Not quite - "Several brainfuck compilers have been made smaller than 200 bytes." - http://en.wikipedia.org/wiki/Brainfuck

skilldrick··on Why you should learn brainfuck (or: learn you a brainfuck for great good)
Yeah, you're right about the cells usually being bytes. I followed the "spec" far enough for it to be a compliant implementation, but its fairly quick-and-dirty, and will probably break on more advanced programs.
skilldrick··on Why you should learn brainfuck (or: learn you a brainfuck for great good)
Cheers :) Just give it half an hour...
skilldrick··on Zen and the art of statefulness
The point of an IIFE is that it is immediately invoked, i.e.: `(function () { })()` - the outer function is used to return the inner function at that point. So you're returning the inner function, and it's this function, a closure, that is returned.

I'm not sure what's iffy about the terminology here...

skilldrick··on A startup's "Why we use Lisp" story
Of course! I take it all back.
skilldrick··on A startup's "Why we use Lisp" story
I don't understand why a Lisp hacker wouldn't match parens properly when ending a parenthetical statement with a smiley:

  (commentless, of course :)
Hasn't he seen xkcd: http://xkcd.com/541/ ?