Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
anderskaseorg
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
91.
▲
by
anderskaseorg
4y ago
His maze generation algorithm is the well-known randomized Kruskal’s algorithm. What seems to be less well-known is that this algorithm is subtly biased toward producing mazes with many short dead ends. Unbiased algorithms that produce a
92.
▲
by
anderskaseorg
4y ago
OpenWrt by default enables the --domain-needed option of dnsmasq, which blocks forwarding of queries with one component. You can turn it off at Network → DHCP and DNS → General Settings → Domain required. However, systemd-resolved may refu
93.
▲
by
anderskaseorg
4y ago
I’m sure that you understood the important differences, but there are likely many readers who didn’t (many more programmers are familiar with Python than with mypy). When you write “even if we don’t have P, we’d have Q anyway”, the reader
94.
▲
by
anderskaseorg
4y ago
That’s not at all what’s going on here. While the Python interpreter permits and executes arbitrary expressions as annotations, Python static type checkers (mypy, Pytype, Pyre, Pyright) do not. This isn’t just an implementation limitation
95.
▲
by
anderskaseorg
4y ago
The typical use case for env -S is a script passing arguments to the interpreter (#!/usr/bin/env -S interp --foo → interp --foo ./scriptname), and the user can always pass arguments to the script (./scriptname --bar
96.
▲
by
anderskaseorg
4y ago
This problem has been solved on at least Linux (GNU coreutils ≥ 8.30, 2018-07-01), FreeBSD (≥ 6.0, 2005-11-04), and macOS with the env -S option: #!/usr/bin/env -S interpreter --arg --arg https://www.gnu.o
97.
▲
by
anderskaseorg
4y ago
Git already has an ordering like this built in as ‘git describe’. https://git-scm.com/docs/git-describe $ git describe 593a2a5d0639b4b4f91ff6e6ffb64e72020f8fd8 v2.34.1-83-g593a2a5d06 This commit is 83 comm
98.
▲
by
anderskaseorg
4y ago
No, Electron cannot reuse Chromium libraries. Every Electron app bundles and loads its own copy of Chromium; it’s bound to that specific version and can’t share it with any other app. Also, Chrome isn’t Chromium; it may be compiled from t
99.
▲
by
anderskaseorg
4y ago
Note ‘compose’ conventionally connotes a right-to-left order, so that (f ∘ g ∘ h)(x) = f(g(h(x))).
100.
▲
by
anderskaseorg
4y ago
These days it might be better to teach new users about ‘git switch’ and ‘git restore’ (added in Git 2.23, released 2019-08-16) rather than the two overloaded meanings of the confusing ‘git checkout’ command. https://git-scm.com&#
101.
▲
by
anderskaseorg
4y ago
You can tell git what the resolution point is using `git rebase --onto`. This can help avoid situations where Git gives extra conflicts form trying to reapply an old version of your change on top of a new version of the same change. You c
102.
▲
by
anderskaseorg
4y ago
There’s a fastest yes competition on CGCC as well: https://codegolf.stackexchange.com/questions/199528/fastest-... My entry outputs 28 TB/s. (I…may have done some creative interpretation of the rules.)
103.
▲
by
anderskaseorg
4y ago
Perhaps an answer to one version of your question is that the Tarski–Seidenberg theorem implies that Euclidean geometry is decidable: there exists an algorithm that finds a proof for any theorem of Euclidean geometry. This algorithm, howev
104.
▲
by
anderskaseorg
4y ago
Works for me. (In case it helps, remember that a rhombus must have four equal sides, not just two pairs of equal sides.)
105.
▲
by
anderskaseorg
4y ago
My example was so simple that it would be taken as obvious for an experienced reader. With any nontrivial problem, the proof would have much more information than the construction. For example, the proof might require the construction of
106.
▲
by
anderskaseorg
4y ago
No. A construction says what to draw; a proof says why you’ve drawn the right thing. Say we want to find the midpoint M of AB. Construction: “Draw the circle centered at A through B and the circle centered at B through A. Let the two
107.
▲
by
anderskaseorg
4y ago
Euclidea doesn’t have proofs. This does.
108.
▲
by
anderskaseorg
4y ago
π is defined as the ratio between a circle’s circumference and diameter in ideal flat Euclidean space. You can measure circles in other spaces and get different numbers, but those numbers are not π. (That’s why your linked article writes
109.
▲
by
anderskaseorg
4y ago
> Null is only allowed in unsafe code. That’s clearly not the case, as the exact code in the post prints ‘&nil’ in current V master, and if you add a dereference you get a segfault (which someone else just filed as https:/&#x
110.
▲
by
anderskaseorg
4y ago
The post’s example of undefined behavior via signed integer overflow still holds in current V master. $ cat test.v fn main() { x := i32(2147483647) + 1 println(x) } $ ./v version V 0.3.0 f0cee25
111.
▲
by
anderskaseorg
4y ago
If “cancel culture” is even one-tenth as effective at influencing the credit card duopoly’s polices as you think, how is it that Donald Trump is still accepting credit card donations?
112.
▲
by
anderskaseorg
4y ago
If your data is represented as sparse vectors, that sparse representation is already compressed. You wouldn’t want to decompress it to a dense representation just to apply a different, less effective, lossy compression algorithm. That wou
113.
▲
by
anderskaseorg
4y ago
Great—but then one ought to be able to performantly use that same runner equally well from FastAPI, Starlette, Quart (ASGI port of Flask), or any other ASGI framework. You’ve decided to build a convenient integration with Starlette instead
114.
▲
by
anderskaseorg
4y ago
> While FastAPI does support async calls at the web request level, there is no way to call model predictions in an async manner. This confuses me. How is that FastAPI’s fault? Can’t you just asynchronously delegate them to a concurrent
115.
▲
by
anderskaseorg
4y ago
Might be worth copying the caveat about UB on out-of-range values into the rustified_non_exhaustive_enum section. Otherwise someone who isn’t familiar with #[non_exhaustive] might incorrectly assume that it removes this UB.
116.
▲
by
anderskaseorg
4y ago
The context in which this discussion takes place is “Return Values: The function returns the resulting incremented value” and “Since Windows 98 was a uniprocessor operating system, it didn’t have to worry about a second processor changing t
117.
▲
by
anderskaseorg
4y ago
It’s clear from the article and the chain of parent comments that we’re talking about threads with preemptive multitasking and access to a shared integer in memory. I didn’t say INC/DEC are unsafe; I said they don’t satisfy the contrac
118.
▲
by
anderskaseorg
4y ago
INC/DEC don’t give you a copy of the value to examine (the Windows 98 behavior described in the article). If you want that, you need a second instruction and you need to worry about being interrupted.
119.
▲
by
anderskaseorg
4y ago
The four tetrahedral Goldberg polyhedra ( https://en.wikipedia.org/wiki/Goldberg_polyhedron ) GP_III(27, 166), GP_III(38, 159), GP_III(41, 157), GP_III(102, 107) each have 4 triangles and 65532 hexagons. Most small regio
120.
▲
by
anderskaseorg
4y ago
I’m not sure of the details, but it seems in this case small numbers of votes were added in down-ballot contests, where there were likely sufficiently many voters who would have voted in the election but not in those contests.
More ›