Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cornstalks
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
61.
▲
by
cornstalks
1y ago
That argument sounds totally wrong because you can easily detect truncation: if (strlcpy(dst, src, dst_len) >= dst_len) { // Truncation! }
62.
▲
by
cornstalks
1y ago
More specifically Dijkstra's is a priority queue. A* is a priority queue with an added estimate to the cost function to prioritize searching nodes closer to the destination.
63.
▲
by
cornstalks
1y ago
I encourage you to build a game with the mechanics you describe, especially something like an RTS, and see if it's any fun to play...
64.
▲
by
cornstalks
1y ago
> Counting CPU cycles as if it's an accomplishment seems irrelevant in a world where 50% of modern CPU resources are allocated toward UI eye candy. That's the kind of attitude that leads to 50% of modern CPU resources being a
65.
▲
by
cornstalks
1y ago
I keep meaning to do something like this in combination with Shamir’s secret sharing (which allows you to split a secret into M blocks, of which any N can be combined to recover the key, and M and N are configurable) to distribute a private
66.
▲
by
cornstalks
1y ago
(This is a reply to multiple sibling comments, not the parent) For those saying unsafe Rust is strictly safer than C, you're overlooking Rust's extremely strict invariants that users must uphold. These are much stricter than C, an
67.
▲
by
cornstalks
1y ago
> If it is not [0,1) then it's not useful. I can understand [0, 1) being useful in some use cases but saying it's entirely useless is a bit dramatic, don't you think? I've certainly had uses for [0, 1].
68.
▲
by
cornstalks
1y ago
You can read the actual HLG spec here: https://www.arib.or.jp/english/html/overview/doc/2-STD-B67v2... The math uses real numbers but table 2-4 ("Digital representation") discusses how the sign
69.
▲
by
cornstalks
1y ago
No. HDR video (and images) don't use floating point encoding. They generally use a higher bit depth (10 bits or more vs 8 bits) to reduce banding and different transfer characteristics (i.e. PQ or HLG vs sRGB or BT.709), in addition to
70.
▲
by
cornstalks
1y ago
> Seatbelt laws are still wrong, government has no business protecting me from myself. If there are multiple people in a car and some choose to wear seatbelts and some choose not to, those who are not wearing seatbelts become a danger
71.
▲
by
cornstalks
1y ago
Pretty much, yes. I've only used Gerrit a few times so my direct experience is limited.
72.
▲
by
cornstalks
1y ago
> The idea, particularly as realized in the GitHub pull request workflow, is that the real “unit of change” is a pull request, and the individual commits making up a PR are essentially irrelevant. I loathe GitHub PRs because of this.
73.
▲
by
cornstalks
1y ago
There's a difference between phone-dependent and phone-augmented. I don't know the details of the truck, but I think a happy medium would be for an app to exist to augment the truck's abilities and allow at-home updates, but
74.
▲
by
cornstalks
2y ago
> Is that income before tax or after tax? It’s up to personal interpretation. Some do before tax, some do after. Some only pay tithing on their regular income (i.e. from a normal job) but not on “already tithed” income (e.g. birthday m
75.
▲
by
cornstalks
2y ago
I didn't read "allied/subordinate" to mean "allied = subordinate," but rather to mean differentiate between "willing alliances" and "unwilling or begrudgingly accepted alliances." Alternativ
76.
▲
by
cornstalks
2y ago
One of the fun things about dav1d is that since it’s written in assembly, they can use their own calling convention. And it can differ from method to method, so they have very few stack stores and loads compared to what a compiler will gene
77.
▲
by
cornstalks
2y ago
(side note: I don't think I've ever thanked you for your many contributions to the Rust ecosystem, so let me do that now: thank you!) > You're talking about how a compiler is backwards compatible. We're talking about
78.
▲
by
cornstalks
2y ago
But you can still use gets() if you're using C89 or C99[1], so backwards compatibility is maintained. Rust 2015 can still evolve (either by language changes or by std/core changes) and packages can be broken by simply upgrading th
79.
▲
by
cornstalks
2y ago
As long as you compile with the version specified (e.g., `-std=c11`) I think backwards compatibility should be 100%. I've been able to compile codebases that are decades old with modern compilers with this.
80.
▲
by
cornstalks
2y ago
> Rust has a stability guarantee since 1.0 in 2015. Any backwards incompatibilities are explicitly opt-in through the edition system, or fixing a compiler bug. Unfortunately OP has a valid point regarding Rust's lack of commitment
81.
▲
by
cornstalks
2y ago
> With git, it's basically impossible to mess up the repo state. I must be a wizard because I’ve lost count of the number of times I’ve messed up my repo’s state. I jest. Kinda. I know that git’s state might technically not be mes
82.
▲
by
cornstalks
2y ago
> a number is divisible by 3 iff the sum of the individual digits is divisible by 3 And how do easily verify this divisibility when "Numeric types, number literals and their associated methods and operations are forbidden?"
83.
▲
by
cornstalks
2y ago
> The author of the press release is under the mistaken belief that unchanged broadband pricing is a good thing. You say that like it (edit to clarify: "it" = "unchanged broadband pricing") is a bad thing, though. S
84.
▲
by
cornstalks
2y ago
Zig has builtin support for vectors[1], which I think provides some alleviation. But sure, it's not as complete or flexible as a whole vector/matrix library. [1]: https://ziglang.org/documentation/master/
85.
▲
by
cornstalks
2y ago
> YouTube has intentionally tanked performance in non-Chrome browsers before and been caught. Can you please share sources regarding this? I'm not familiar with any instance like this.
86.
▲
by
cornstalks
2y ago
> It’s crazy to think that some software engineers might actually intentionally degrade user experience on non-Google browsers Is this actually a thing? As far as I'm aware all degradations in non-Chromium browsers have been unint
87.
▲
by
cornstalks
2y ago
StackOverflow has always been like that, though, and it's not just big-time moderators who will remove unnecessary language from questions or answers. Personally I like the removal of unnecessary verbiage, but I can understand how some
88.
▲
by
cornstalks
2y ago
I'm on macOS 15.2. Currently it's not autocompleting some simple algebra. But if I enter more "complex" equations ("3 / 4 =", "3 * 5 - 2 - 1 =", "tan(pi) =", etc.) then it autocompletes
89.
▲
by
cornstalks
2y ago
But that still doesn't disable it. I can type in "cos(23 deg) =" and it will autocomplete it, even though I have "Show inline predictive text" disabled. I can post a screencast if anyone would like.
90.
▲
by
cornstalks
2y ago
Wait actually that doesn't work. TextEdit still autocompletes the friggin' math.
More ›