norswap

Joined 17 years ago

Karma
5,628
Submissions
1,654
Member since
Mar 15
http://norswap.com/

[ my public key: https://keybase.io/norswap; my proof: https://keybase.io/norswap/sigs/7MjYNKBzV3Q0iTnTn7335vArDZwY_nZ0OkRLeXz1JII ]

View on Hacker News

Recent submissions

Comment · 1 year ago
Not really, he explicitly makes the point that it's easier to write useful simple programs in Javascript without the extra stuff, whereas in Rust you need to know about a whole lot of things to make the equivalent simple program.
Comment · 1 year ago
I read it and was disappointed, it's okay but probably my expectations were too high for this classic.

I would recommend Snow Crash instead, another Sci-Fi classic from the same era which I found to be a much more enjoyable read & more commensurate to the hype.

Comment · 1 year ago
Wasn't there a better technical way to block the scraper? Like blocking IPs/domains at ingress instead of serving requests? Probably you do still pay for request traffic though...

Isn't there a market for anti-DDOS third-party services for API endpoints (Cloudflare etc) — through probably for "Free Speech Extremist" that wouldn't be suitable solution, and there are charges too (though presumably when facing a situation like this you actually save money).

Comment · 1 year ago
Am I the only one wishing I could see the original afterwards, for comparison?
Comment · 1 year ago
I think it did much better on safety in some tests (no I don't have sources, going from memory :/), but is less capable by design on some more trickier scenarios. Basically pretty much what you would something like this to be.
Comment · 1 year ago
I used to work on compilers & JITs, and 100% this — polymorphic calls is the killer of JIT performance, which is why something native is preferable to something that JIT compiles.

Also for command-line tools, the JIT warmup time can be pretty significant, adding a lot to overall command-to-result latency (and in some cases even wiping out the JIT performance entirely!)

Comment · 1 year ago
His "attempt" at self-driving is better than most of the industry, at a fraction of the cost.

The man does and tries things. Man in the arena.

Comment · 1 year ago
While I agree exceptions should not be used for control flow except in the rarest of circumstances (every rule has exceptions — pun fully intended), I think checked exceptions are very useful.

I wrote a whole article about this, way back when: https://norswap.com/checked-exceptions/

But for the tl;dr: checked exceptions represent somewhat expected issues, things like IO errors. There are two okay ways to handle those: checked exceptions and result types, and one bad way: unchecked exceptions.

Unchecked exceptions end up being undocumented in the API, and people forget to handle them.

Result types add a lot of ceremony, as you have to unwrap them at every level of the call stack. I've seen code dominated by error checking logic many times in C and Go (and the frequent alternative is to ignore error, which is easy in C).

Checked exceptions are much less verbose, you just let the exception pass through and annotate the function signature with the checked exception. It's type-safe, self-documenting and easy.

Unchecked exceptions "leak", checked exceptions propagate at the type-level, which is exactly what you want — making sure every caller is aware of what exceptions might occur and letting them make an explicit decision to handle or pass the buck upwards.

By the way, checked exceptions are coming back in favour with "effects" which are basically a generalization of checked exceptions beyond the realm of errors, trying to encode things into the type system.

Comment · 1 year ago
Why use base 36 and not base 26?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton