Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
hddqsb
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
45 ms
·
31.
▲
by
hddqsb
3y ago
It's robust. I hamstrung the model solution by forcing pistonAcceleration to be 0, and forcing hingeAcceleration to be 0 during the first second, but it still "caught" and balanced the ball.
32.
▲
by
hddqsb
3y ago
> I find it more satisfying and clearer to say it's when day/night are the same length everywhere on earth/for everyone on earth. ...except at the poles! (There the sun will appear to be moving along the horizon, and there
33.
▲
by
hddqsb
3y ago
The article assumes the caller compresses the blobs.
34.
▲
by
hddqsb
3y ago
> mtimes can definitely be edited, if you have permission It just requires you to be the owner of the file ( https://serverfault.com/a/337810 ), no special permissions. On the other hand, editing the ctime is not ea
35.
▲
by
hddqsb
3y ago
On Linux, the mtime ("modification time") is indeed automatically updated when the content is changed, but it can also be set arbitrarily from userspace (e.g. using `touch`) without special permissions. This is very useful, e.g. w
36.
▲
by
hddqsb
3y ago
Edit: To allow the corrupted object to be pruned, you should also run `git reflog expire --all --stale-fix`.
37.
▲
by
hddqsb
3y ago
Very good point! If you don't mind saving the file to disk, you can do: sqlite3 -newline '' ':memory:' "SELECT data FROM zipfile('eurofxref-hist.zip')" \ | sqlite3 -csv ':memory:'
38.
▲
by
hddqsb
3y ago
Per the docs (I linked them in another comment), the correct command is `gunzip <foo.zip` or `gunzip -S .zip foo.zip`.
39.
▲
by
hddqsb
3y ago
GNU gzip has limited support for ZIP: > Files created by zip can be uncompressed by gzip only if they have a single member compressed with the “deflation” method. This feature is only intended to help conversion of tar.zip files to the t
40.
▲
by
hddqsb
3y ago
You should use "/" instead of "-" in your equations. If you have two objects of the same density but with different sizes, the ratio of their (apparent) weights will be the same in air and in water, but the differen
41.
▲
by
hddqsb
3y ago
Tangential, but regarding footnote 7 (efficiently recomputing cells, assuming no cycles), the correct algorithm for determining the order is topological sorting ( https://en.wikipedia.org/wiki/Topological_sorting ). Usin
42.
▲
by
hddqsb
3y ago
I'd first check whether `git fsck` gives you more information. There isn't a simple and fast way to find parent objects, but here is a slow hack: git_find_references() { if [ "$#" -ne 1 ] || [ "${1#-}&
43.
▲
by
hddqsb
3y ago
Sure! (My explanation is basically equivalent to the combined explanations by @mafuy and @malcolp, but I'll post it anyway.) The idea is to balance a scale with the crown on one side and an equal mass of gold on the other side (no wate
44.
▲
by
hddqsb
3y ago
Wikipedia has a good paragraph on this. It describes a very cool alternative method that has higher accuracy, and according to Galileo it's probable that Archimedes used this method: > The story of the golden crown does not appear a
45.
▲
by
hddqsb
3y ago
Google certainly uses its geolocation DB, but it also learns based on map browsing patterns. To clarify, the scenario I described is as follows: 1. Initially, when I open Google Maps in a clean browser it defaults to my real location. 2.
46.
▲
by
hddqsb
3y ago
Somewhat relevant: Google Maps can learn the location of your IP based on which locations you browse in the map. If you browse a specific location enough times, it will use that as the default location when you open Google Maps, even if you
47.
▲
by
hddqsb
3y ago
I can relate. But after using JSON for a while (in files that I edit by hand), I found that I really want comments and trailing commas (which leads to https://nigeltao.github.io/blog/2021/json-with-commas-commen...
48.
▲
by
hddqsb
3y ago
The inline table syntax is awesome! Details: https://github.com/toml-lang/toml/blob/main/toml.md#inline-t... https://github.com/toml-lang/toml/pull/235 https://
49.
▲
by
hddqsb
3y ago
There are a couple of confusions/ambiguities here. The Law of Large Numbers is about the average , so it's not relevant here (an average of +1 would mean you got heads every single time , which is extremely unlikely for large n)
50.
▲
by
hddqsb
3y ago
The answer is almost certainly "abuse". Traffic is routed through a "service hosted in Azure" (probably not GitHub specifically). They're just using GitHub sign-in to apply per-user limits etc.
51.
▲
by
hddqsb
3y ago
I'll add: Press ? to view the keyboard shortcuts. > Press I in a PR to hide comments. Thank you! Comments can make it impossible to read the diff. And considering that by default anyone can post comments anywhere , this can be a
52.
▲
by
hddqsb
3y ago
It applies only to VS Code.
53.
▲
by
hddqsb
3y ago
To save others some reading: This trick (ping 3.3.3.3) is used to let a server behind NAT learn the IP address of a client that is also behind NAT, without requiring any non-NAT server (such as https://ifconfig.co ). The main act
54.
▲
by
hddqsb
3y ago
The built-in rules only include spelling according to the docs: https://vale.sh/docs/topics/styles/#built-in-style
55.
▲
by
hddqsb
3y ago
Here you go: https://i.imgur.com/9cJ13ue.png (alternative link: https://imgur.com/a/uBG5KUD ) (The area of each circle is proportional to the count, clamped to a minimum value. Axes a are linear.) Uses
56.
▲
by
hddqsb
3y ago
Yeah, the etymology suggested by the top-level comment is completely wrong. Wikipedia says > The name of the project is inspired by the MPEG video standards group, together with "FF" for "fast forward" Corresponding
57.
▲
by
hddqsb
3y ago
> https://support.google.com/websearch/answer/2466433 > those two searches are exactly the same Yes, that appears to be a recently-introduced typo -- the archived version from April does have a space: https
58.
▲
by
hddqsb
3y ago
Or just: rm "~"
59.
▲
by
hddqsb
3y ago
No, in fact telnet is worse because it's not 8-bit clean. See https://news.ycombinator.com/item?id=36179850#36180346 and https://news.ycombinator.com/item?id=36179850#36180923
60.
▲
by
hddqsb
3y ago
If netcat is installed, just use that instead (it's also better for non-telnet protocols). If you don't even have netcat but you do have bash, you can use: bash -c 'exec 3<>/dev/tcp/$host/$port;
More ›