Better HN
topnewbestaskshowjobs
Log inSign up

mnarayan01

719 karma · joined Jan 2, 2013 (13y ago) · 425 submissions

Submissions

comment 4y ago · link · parent

For anyone else confused by this, the control logic described in the comment happens in https://github.com/ifduyue/musl/blob/master/src/math/cos.c

comment 5y ago · link · parent

Git has all sorts of options for using proxies, but running socat would be the quick and dirty way to do this, something like:

  socat TCP-LISTEN:8080,fork,reuseaddr OPENSSL:github.com:443
would let you use an HTTP connection to your less archaic machine. Could even configure git to automatically do the rewrite similar to https://stackoverflow.com/questions/1722807/how-to-convert-g.... There's security considerations here so don't just do this blindly, but if no more unencrypted git protocol is a real pain point there's pain free ways around it.

comment 5y ago · link · parent

Unfortunately e.g. the RHEL 7 world doesn't have mitigations=off yet (in addition to many other kernel command line sugars).

comment 6y ago · link · parent

0/0 = NaN

comment 6y ago · link · parent

> 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 6y ago · link · parent

The other requests are still taking the latency hit.

comment 7y ago · link · parent

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 7y ago · link · parent

Then you'd need an extra set of delimiters, e.g.:

  sig {{name: String, returns: Integer}}

comment 7y ago · link · parent

The parser thinks that's a block not a hash.

comment 7y ago · link · parent

> 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 7y ago · link · parent

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 7y ago · link · parent

> 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 8y ago · link · parent

https://www.kernel.org/doc/Documentation/cgroup-v1/freezer-s...

comment 8y ago · link · parent

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 8y ago · link · parent

If you include it (possibly indirectly) in a file which you compile, then no, you do not need to compile it separately.

comment 8y ago · link · parent

> Signing each commit is totally stupid. It just means that you automate it, and you make the signature worth less.

comment 8y ago · link · parent

Linus (from 2009) on problems with signing every commit: http://git.661346.n2.nabble.com/GPG-signing-for-git-commit-t...

comment 8y ago · link · parent

  if a = foo()
versus:

  if (a = foo())
Sometimes idiomatic patterns vary based on things which are not amiable to mechanical correction.

comment 8y ago · link · parent

The article looks like it's just a generic sports' journalist reporting on a novel statistical technique, with cross language translation added into the mix for extra confusion. I wouldn't take it too literally.

I'd guess that either "Impect disregards all passes that go backwards or don’t beat any defender" would be better phrased as "Impect disregards passes unless they go forward or beat defenders" or the statisticians would defend the original solely in terms of it being a heuristic that makes the problem more tractable.

Additionally, your linked example, with #25 picking up the ball in a danger position after a deflection, is the kind of "penalty box slop" that, naively at least, seems extremely difficult to handle analytically.

comment 8y ago · link · parent

From your source machine:

  < /path/to/source ncat remote-host 8001
On your destination machine:

  ncat -l 8001 > /path/to/dest
Though in most situations with files of reasonable size, you're probably going to be better off running through `gzip -c`.

comment 8y ago · link · parent

Or just skip the shell entirely:

  tar -C /dest/dir -xf -

comment 8y ago · link · parent

> There has to be an ABI in order for loadable kernel modules to exist

Given a particular install, yes, but it will change independent of kernel version based on e.g. build flags and even conceivably compiler chosen, etc.

> it's stable enough that the likes of Nvidia can write installers for their proprietary drivers that recompile a bit of interface glue between kernel and blob

Well...they certainly can. It also can infuriate me beyond all reason...

comment 8y ago · link · parent

Nit: AIUI, the kernel has no stable API. It has no ABI period.

comment 8y ago · link · parent

Mix "other quite similar videos are explicit" with "other videos from the uploader are inappropriate for children" and pour it into an overly-aggressive automated algorithm.

comment 8y ago · link · parent

> The majority of the lanes on the road are already dedicated to private motor vehicles

IME, having any lanes dedicated to private motor vehicles is extraordinarily rare. I'm not sure I've ever even seen it, though I do have a vague sense of something like that happening on the NJ Turnpike or one of the interstates going into NYC.

comment 8y ago · link · parent

Wow. I do this all the time, and the additional step of piping to sed never ceased to annoy me.

You've made my day.

comment 8y ago · link · parent

Well it could be rewritten to use 0x1f (i.e. unit separator) to separate items. I mean it already has significant tabs. Though invariably people would be like "How is it acceptable for make to not support filenames which contain unit separators? It's 2020 guys, get with the program!"

comment 8y ago · link · parent

> though it’s probably a bug that whitespace in target names must be escaped, since it’s just one token that ends in a colon

It's perfectly fine for a rule to have multiple targets, e.g.

  output.txt error.txt: source
    build source > output.txt 2> error.txt

comment 8y ago · link · parent

There's this program called make...

comment 8y ago · link · parent

> A C#-style cancellation token API, orthogonal to promises, is simple, easy to build, and easy to understand.

The problem is that promises were added to the language without any of that being hashed out. Now you may say "Having language-level support for promises is useful; cancellation tokens are more library details", and you'd have a point. The flip-side, however, is that e.g. the Fetch API is only now getting any sort of cancellation ability, and currently I believe it's limited to Firefox and Edge.

Which is not to say that I'm even confident that language support for Promises should have been held up. But I understand the complaints.

12345
15