Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sltkr
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
19 ms
·
211.
▲
by
sltkr
2y ago
C++ added std::midpoint() to the standard library: https://en.cppreference.com/w/cpp/numeric/midpoint Another fun case, besides integer overflow, is negative values: in Java and C/C++ (i + j)/2 will
212.
▲
by
sltkr
2y ago
Android apps absolutely support deep links: https://developer.android.com/training/app-links (surely iOS supports this too?) It's also widely implemented in practice. For example, Instagram allows copying links to
213.
▲
by
sltkr
2y ago
You're assuming there is a single HN hivemind. In reality different companies cater to different audiences with different values, and you'll hear from a different subset of HN users on each topic. Mozilla users care more about pri
214.
▲
by
sltkr
2y ago
Even then you are depending on the integrity of your development environment (see: Ken Thompson's compiler hack).
215.
▲
by
sltkr
2y ago
Surprisingly, no, or at least it's not common. I'm from a country that has 6-digit PINs on most cards, and I've traveled to e.g. the United States where people are surprised that credit card PINs can be more than 4 digits, bu
216.
▲
by
sltkr
2y ago
Not to worry. We'll just switch to 8 digit PINs and we'll be safe once and for all.
217.
▲
by
sltkr
2y ago
The new filesystem APIs were introduced with Windows 95, so there was no backward compatibility to break. New programs using those new APIs were forced to support spaces in directories. Using spaces in the system directories forced appl
218.
▲
by
sltkr
2y ago
Kinda ironic that because of this post I went to check out php.net for the first time in like a decade, and it turns out the site is down. Doesn't exactly instill confidence that the project is alive and well.
219.
▲
by
sltkr
2y ago
Have you looked at the PyPy benchmarks in the article? Broadly speaking, PyPy is to Python as v8 is to JavaScript.
220.
▲
by
sltkr
2y ago
In general please don't use Soundcloud to share music. It's complete shit. It doesn't even allow seeking unless you register for an account. At least Youtube is borderline usable without signing in.
221.
▲
by
sltkr
2y ago
Not technically ternary because the number of arguments is variable, but definitely an interesting case. `a.b(c)` is actually a bit of a degenerate case because `b` must be an identifier, it cannot be an arbitrary expression, which seems to
222.
▲
by
sltkr
2y ago
For extra irony in this context: Deutscher means German in German.
223.
▲
by
sltkr
2y ago
GCC has supported statement expressions for ages: https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html They're also used extensively in the Linux kernel, mostly to implement macros: https://gith
224.
▲
by
sltkr
2y ago
A very simple alternative is to type "data:text/html," in the URL bar, and then just paste your HTML content after it, generating a URL that looks like this: data:text/html,<!DOCTYPE html><html><body
225.
▲
by
sltkr
2y ago
To each their own, but the puzzles you linked seem really convoluted compared to regular Sudoku. The last puzzle has no fewer than 9 custom rules, in addition to the regular Sudoku rules, and then it also says “every clue is wrogn [sic]” im
226.
▲
by
sltkr
2y ago
Network layer blocking is almost never in the interest of the end user. It's typically used to block users from accessing sites they want to visit, like The Pirate Bay, or recently Russian Times and Sputnik News. End users who want t
227.
▲
by
sltkr
2y ago
There is no law that says /tmp must be on tmpfs, and historically this wasn't done, because tmpfs is limited in size to some faction of the kernel's memory, while /tmp may be used to store much larger files. For example,
228.
▲
by
sltkr
2y ago
> The pauses occur even [..] if you call mlock I wonder how this is even possible. The only scenario I can think of involves a page fault on the page table itself (i.e., the page is locked into memory, but a page fault occurs during virt
229.
▲
by
sltkr
2y ago
Neither of which helps with elliptic curve cryptography.
230.
▲
by
sltkr
2y ago
This is a fairly standard dynamic programming problem. The crucial insight is that if you take two pins with a single ball, you split the problem into two independent subproblems, so the core question is when to hit two pins at once. This l
231.
▲
by
sltkr
2y ago
That's not what precise GC means. Precise means that on a GC cycle, only true pointers to heap allocated objects are identified as roots, which means that an unreferenced object cannot be kept alive by a value that happens to have a si
232.
▲
by
sltkr
2y ago
Great point! Actually this observation invalidates the whole setup. Because even though you could define /bin/sh itself as: #!/bin/busybox sh exec /bin/busybox sh Then you still cannot use #!/
233.
▲
by
sltkr
2y ago
`busybox whoami` is probably fine, but having to write `busybox ls`, `busybox grep`, `busybox cp` etc. would get tedious quickly. Shell aliases don't solve all problems, even if you do: alias rm="busybox rm" alias x
234.
▲
by
sltkr
2y ago
Your logic is correct but you are off-by-one. 1 guess gets you 1 number, so the formula is 2^k - 1, and 7 guesses thus covers 127 numbers. You can also view it as a recurrence: f(1) = 1 f(n) = 2*f(n - 1) + 1 = 2^n - 1 But your bina
235.
▲
by
sltkr
2y ago
It's hilarious that the sketchy lawyers behind this site demand to know the “[..] details on the nature of your searches, websites visited and or purchases made [in Incognito mode]”.
236.
▲
by
sltkr
2y ago
It's common for neural networks to struggle with negative prompting. Typically it works better to phrase expectations positively, e.g. “be brief” might work better than ”do not write long replies”.
237.
▲
by
sltkr
2y ago
Spoiler alert! Some of us haven't yet finished that book.
238.
▲
by
sltkr
2y ago
YouTube already generates transcripts of uploaded videos (though not super accurate ones). A simple and straightforward implementation would just pattern match in the transcript text. No need for fancy AI, on top of whatever technology powe
239.
▲
by
sltkr
2y ago
Your advice is useful for detecting bugs in the code that you release, before your push it to production, but it would not have helped here, because the bug was in Posthog code that was pushed to production asynchronously. In fact, it wou
240.
▲
by
sltkr
2y ago
The policy was that if a user lands on the page from the Google search results page, then they should be shown the full content, same as Googlebot (“First Click Free”). But that policy was abandoned in 2017: https://www.theguardi
More ›