Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
o11c
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
37 ms
·
481.
▲
by
o11c
1y ago
It really depends on the particular group of algorithms. I'm only considering non-cryptographic algorithms here. As a general rule, any algorithm that involves a hash or a random/arbitrary choice has historically been based on &qu
482.
▲
by
o11c
1y ago
Er, what? It works fine for me even on `lynx`. And I don't see any scripts, so unless it's user-agent sniffing or doing something based on IP reputation, I'm not sure what you're seeing.
483.
▲
by
o11c
1y ago
Because it's injected into a previously working product - even if it makes it worse - and automatically injects its ideas. That counts as "somebody using it". Because it's bundled with other products that do provide valu
484.
▲
by
o11c
1y ago
That's why "the truth, the whole truth, and nothing but the truth" is so important. Yet we don't even enforce the limited perjury laws we have. The common "must present both sides" approach can fail the "n
485.
▲
by
o11c
1y ago
It's not philosophical, it's economical. AI scrapers increase traffic by maybe 10x (this varies per site) but provide no real value whatsoever to anyone . If you look at various forms of "value": * Saying "this use
486.
▲
by
o11c
1y ago
My home ISP's cell router (because no other internet reaches our area anymore) has almost no configurable settings (just wifi name/password/hidden), and actively forbids you from disabling wifi even though I only use it thr
487.
▲
by
o11c
1y ago
The problem with `getlasterror` and `errno` is that they're global (thread-local, whatever). But if you make them take a `context` object, there's no longer a problem. One interesting observation - you can use them even for the in
488.
▲
by
o11c
1y ago
There's no a problem with the author's current code, since the padding is already included in the node size, but it would be a problem after doing alignment more intelligently.
489.
▲
by
o11c
1y ago
> If a company invests billions in R&D to create hardware and its integrated software, shouldn’t it have the right to control who or what interacts with it? Do you think the same about printer ink? Regardless, we need to look at the
490.
▲
by
o11c
1y ago
For layout-compatible types, you can often just include a `_base` member in each child. Maybe twice (once named and once unnamed) to avoid excess typing - I don't understand the common-initial-subsequence rule but people do this enough
491.
▲
by
o11c
1y ago
For your level 2 code, `uint64_t data[];` is wrong for types whose alignment is greater than `uint64_t`, and also wasteful for types whose alignment is smaller (for example, under an ilp32 ABI on 64-bit architectures). For your level 3 code
492.
▲
by
o11c
1y ago
Actually, there's one more trick I just remembered - you don't have to store an integer for `accept` at all, since you can arrange for the final state numbers to all be adjacent (usually, the first N positive integers; you probabl
493.
▲
by
o11c
1y ago
Rust is trying very hard to compete with C++. That includes giving everyone a hammer so that every problem can be a thumb.
494.
▲
by
o11c
1y ago
These decades, running an unprivileged ssh server is fine.
495.
▲
by
o11c
1y ago
> (i am not sure whether similar problems exist with its 64-bit versions) and proposed a different one named "Permuted Congruential Generator (PCG)" The 64-bit version might be a bit faster (for certain workloads, on 64-bit har
496.
▲
by
o11c
1y ago
Congratulations, you've reinvented regexes. This is still a win since you're using the sane kind of regex and are allowing multiple accept states rather than just one, in both cases unlike most modern implementations. (I'm mo
497.
▲
by
o11c
1y ago
A `_Generic` that only requires its expressions to be valid for the type associated with them, rather than spewing errors everywhere.
498.
▲
by
o11c
1y ago
Are we getting a non-broken `_Generic` yet? Because that's the thing that made me give up with disgust the last project I tried to write in C. Manually having to do `extern template` a few times is nothing in comparison.
499.
▲
by
o11c
1y ago
Hm, no discussion of cache line size, page size, or the limits of cache associativity?
500.
▲
by
o11c
1y ago
TL;DR `async` considered harmful. For all the C++ laughing in this thread, there's really only one thing that makes C++ slow - non-`extern` templates - and C++ gives you a lot more space to speed them up than Rust does.
501.
▲
by
o11c
1y ago
(you duped your comment under the other subthread) From C89, §7.10.3 "Memory management functions": > If the size of the space requested is > zero, the behavior is implementation-defined; the value returned shall be either
502.
▲
by
o11c
1y ago
Pointers are frequently used as keys for map-like data structures. This introduces collisions that the programmer can't check for, whereas NULL is very often special-cased.
503.
▲
by
o11c
1y ago
Noncompliant, since `malloc(0)` is specified to return a unique pointer if it's not `NULL`. On most platforms an implementation could just return adjacent addresses from the top half of the address space. On 32-bit platforms it doesn
504.
▲
by
o11c
1y ago
That's not how heuristics work. The heuristic is "this submission doesn't even follow the basic laws of grammar, therefore I can safely assume incompetence and ignore it entirely." You still have to do verification for w
505.
▲
by
o11c
1y ago
Doing that adds a lot of round trips, so you still really need to do the initial estimate. (also, probing for whether the terminal actually supports various features is nontrivial. At startup you can send the basic "identify the termin
506.
▲
by
o11c
1y ago
`wcwidth` works by assigning all codepoints (strictly, code units of whatever size `wchar_t` is on your system, but thankfully modern Unixen are sane) a width of -1 (error), 0 (combining), 1 (narrow), or 2 (wide). `wcswidth` could in theory
507.
▲
by
o11c
1y ago
Note that it makes a lot of assumptions beyond the stated ones, such as: * the only objects in space are stars * all stars are equally bright * the average brightness is one that can be seen (unless you roll all this into "homogeneou
508.
▲
by
o11c
1y ago
It says that NGC 4410 is (gravitationally) interacting galaxies. After clicking through the link, it calls it RSCG 55 instead and explains more. I don't understand the naming scheme.
509.
▲
by
o11c
1y ago
Unfortunately I have an even harder time reading Hebrew fonts than I do reading English blackletter.
510.
▲
by
o11c
1y ago
Note that for most of the United States, you must resurface your roof twice a year for this to be effective.
More ›