Recent submissions

Comment · 12 years ago
Hopefully the redesign won't give us light gray text on a white background, which seems to the rage these days. :)

I had zero problems reading the print version.

Comment · 12 years ago
To me, it seems to be the same as the Norvig algorithm, except that only deletes are considered. Which allows them to pre-calculate misspellings with modest storage cost.

Am I mistaken?

Comment · 12 years ago
How long ago did you buy your house? If a person bought the house today, would they still pay only $640/mo?
Comment · 12 years ago
Comment · 12 years ago
I like functions that return a value to be written in the guard-clause style. [In C++, that's probably better for efficiency since the compiler optimizer doesn't have to remove temporaries by converting the code to guard-clause style.]

However, I'm not convinced that void functions are better written in the guard-clause style. I think the intent of the code is better expressed with nested ifs. Of course, try to factor the ifs so that they're readable.

I'm saying this is more readable if the "do something part" is less than about 15 lines. Thoughts?

    void do_something(input) {
      if (!input.already_done()) {
        // do something.
      }
    }
Comment · 12 years ago
Don't do this. The whole thing gave off a bad smell on first reading so I would never have done this.

Thank you vinkelhake for nailing the the real problem (exceptions) and bothering to check whether the stack overhead really exists.

Just wanted to chime in with a comment because HN doesn't show vote counts, so future readers will "see" my upvote on vinkelhake's comment.

Comment · 12 years ago
How? How can DRM force me to display the iframe containing an ad.
Comment · 12 years ago
No story here. No budget provider I've looked at says they will help you withstand a DDoS attack. [Thanks to the commenter who says OVH does, I will look into them closely.]

I did this due diligence for a 10-user app. These guys have no excuse for not planning for a DDoS with a serious business.

Comment · 12 years ago
Multiple file attachments in entries. I think 1.x only supports one attachment per entry.
Comment · 12 years ago
Crockford's "Javascript: the Good Parts" is a very good book.
Comment · 12 years ago
This is probably what the parent meant:

    >>> 'truthy' if None else 'falsy'
    'falsy'
    >>> 'truthy' if False  else 'falsy'
    'falsy'
    >>> 'truthy' if 0 else 'falsy'
    'falsy'

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton