Recent submissions

Comment · 4 years ago
Comment · 5 years ago
Comment · 5 years ago
Unfortunately e.g. the RHEL 7 world doesn't have mitigations=off yet (in addition to many other kernel command line sugars).
Comment · 6 years ago
0/0 = NaN
Comment · 6 years ago
> Code Blocks probably aren't necessary

When you're reading raw markdown they're extremely useful for short snippets since they save you two wasted lines per block.

Comment · 6 years ago
The other requests are still taking the latency hit.
Comment · 7 years ago
That's a block returning a Hash; see bhuga's sibling comment where he notes that they're using blocks to lazy load the constants in the type definition, which may seem silly for e.g. Integer, but consider e.g. some high-dependency Rails model which requires auto-loading 10,000 other classes.
Comment · 7 years ago
Then you'd need an extra set of delimiters, e.g.:

  sig {{name: String, returns: Integer}}
Comment · 7 years ago
The parser thinks that's a block not a hash.
Comment · 7 years ago
> mouse(!) selection of arbitrary text that can be piped to commands and so on

E.g.:

  xclip -out | ...
or do you mean something different?
Comment · 8 years ago
You can specify multiple digests for an asset, so a non-versioned one can be updated sans downtime:

1. Provider informs clients that a new version with digest X will be deployed.

2. Clients add the new digest in addition to the current digest.

3. Provider switches to new asset version.

4. Clients remove old digest (optional).

Versioned assets are obviously better unless you're in a really weird situation, but SRI doesn't particularly require them.

Comment · 8 years ago
> 3rd parties should version their JavaScript resources with a version number in the URL

I mean yes this is true, but it seems almost totally orthogonal to SRI (which is aimed at security AIUI), particularly given you can give more than one hash for a particular resource. If for some reason a third-party can't use fingerprinted URLs, they can still update the resource provided they give "sufficient" advanced notification of the new fingerprint to clients.

> And this should be a manual process because automating it would defeat the whole point of SRI.

Obviously it should be offline/write-once, but unless you're reviewing the actual assets as well I'm not sure I see the need to avoid automation.

Comment · 8 years ago
Comment · 8 years ago
The #ifndef rigamarole is https://en.wikipedia.org/wiki/Include_guard and at least used to be fairly common. I also used to see the __FOO_BAR_H__ naming convention for these defines all over the place. I'm not sure if __ identifiers being reserved is a (not very) new thing or if it's always been around and people are just now more generally knowledgeable about the fact that they shouldn't be used.
Comment · 8 years ago
If you include it (possibly indirectly) in a file which you compile, then no, you do not need to compile it separately.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton