Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ratorx
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
91.
▲
by
ratorx
2y ago
I think for this web server to compete with caddy/nginx (if the goal is getting other people to use it, if built for fun, please ignore) this needs a good reason to exist. Memory-safe is nice compared to Nginx, but pretty moot when com
92.
▲
by
ratorx
2y ago
For C++, abseil’s thread annotations are quite nice for getting closer to the Rust style of locking. Of course, the Rust style is still much easier to understand and less manual.
93.
▲
by
ratorx
2y ago
Markdown isn’t really meant to be a universal markup format. Its primary goal is to document conventions of annotating plain text which keep the plaintext semi-consistent and readable. So the purpose of , * etc is purely emphasis. If you n
94.
▲
by
ratorx
2y ago
I’m curious what metric you’re evaluating minimality with? Naively I’d expect Fish to seem more minimal than something like xonsh (which embeds the entirety of Python).
95.
▲
by
ratorx
2y ago
Sure, I didn’t mean to suggest that it was impossible to handle, just that it was an edge case that you needed to explicitly handle and which a minimal implementation of the protocol might be likely to leave out.
96.
▲
by
ratorx
2y ago
Torrents are split into pieces, each of which has a hash that allows it to be validated independently. However, these pieces can themselves be large, so it is often recommended to split them into smaller chunks that are sent one at a time.
97.
▲
by
ratorx
2y ago
Other than the choice problem of deciding what language to build new features in (which needs a clear policy), I don’t see why maintaining a mixed language codebase HAS to be terrible. In my current job, also at FAANG, my team (albeit SRE t
98.
▲
by
ratorx
2y ago
IIRC, when both peers only have some subset of pieces, they are meant to “trade” with each other, and so will eventually drop low value peers for higher value ones. Aside from the adversarial case, this helps optimise for being nearer to th
99.
▲
by
ratorx
2y ago
> That’s another var By another var, do you mean another return value? That’s not how it works in Go at all. It is possible to do it that way, but that would not be idiomatic. You have a single error returned regardless of how many “erro
100.
▲
by
ratorx
2y ago
> difference is where you want to catch the error Catching is pretty similar no? In Java you match by type and in Go, you match by `errors.Is`? I guess the static checking in Java js better, but in terms of code written it is no differen
101.
▲
by
ratorx
2y ago
It is definitely possible with exceptions, but it is not the norm (you can do it yourself, but will a library also do it?) because the norm in Java is to silently pass up exceptions as that is the most ergonomic thing. And once you start do
102.
▲
by
ratorx
2y ago
In Go, b) is really common. Most of my code will annotate a lower error with the context of the operation that was happening. You’ll ideally see errors at the top level like: “failed to process item ‘foo’: unable to open user database at ‘&
103.
▲
by
ratorx
2y ago
I can think of a few (nothing super compelling though): * “batteries-included” std - some of this is platform APIs, so only really the pure stuff. You can use all of this in the wasm extension, whereas you’d need to pull in deps for JS. * N
104.
▲
by
ratorx
2y ago
I agree for video + audio calls, but I’m not sure for gaming. Usually multiplayer games have some correction and if you have really stable latency it can work pretty well (of course never as well as 0 latency). But usually, the jitter is th
105.
▲
by
ratorx
2y ago
Software ENGINEERS could benefit from unions once they get start getting replaced by AI, but that’s a fairly indirect way to solve the problem. Governments will eventually need to deal with mass unemployment, but that’s a societal problem b
106.
▲
by
ratorx
2y ago
You’re right - add insufficient leadership to the list as well. IMO, it seems inconsistent to green light R4L and not declare a clear policy for Rust code interacting with C code without adding a hard dependency (and if it WAS declared, not
107.
▲
by
ratorx
2y ago
I don’t think there is enough demonstrable benefit to sacrifice the ubiquity and flexibility of email for a newer solution, especially for existing maintainers who are probably very comfortable with the current workflow. Harder to understan
108.
▲
by
ratorx
2y ago
Having read through the email thread, I think both vocal people are basically in the wrong here. There is a way to constructively disagree and the DMA maintainer did not do that. The Rust maintainer should not have brigaded using social med
109.
▲
by
ratorx
2y ago
Being pedantic, TFA suggests something slightly different. The non_truncating_hash should be the default (and called something that reflects it, eg. just hash), and a separate truncating_hash function may exist. The difference (from an API
110.
▲
by
ratorx
2y ago
Without knowing the exact situation, if you follow the guidelines in this article, this is a library bug (documentation or actual code). Either the library should have enforced the invariant of the key existing (and returned an equivalent e
111.
▲
by
ratorx
2y ago
Caching itself is introducing a discontinuity, because whether a request does or does not hit the cache will have vastly different performance profiles (and if not, then the cache may be a bit useless). I think the only way to approach this
112.
▲
by
ratorx
2y ago
I think a lot of the arguments I’ve seen stem from “Unix philosophy” style arguments. Also, historically the systemd project has been quite hostile to user requests in some cases, which broke existing workflows for people. I personally thin
113.
▲
by
ratorx
2y ago
This is incorrect. iTerm2 never enabled any AI features by default (it always required an OpenAPI key, which the user had to provide). The backlash was for including an AI related feature in the default build at all. Following the backlash,
114.
▲
by
ratorx
2y ago
Using time to sync between computers is one of the classic distributed systems problems. It is explicitly recommended against. The amount of errors in the regular time stack mean that you can’t really rely on time being accurate, regardless
115.
▲
by
ratorx
2y ago
You can delegate the choice to the terminal by using ANSI color codes [1]. Then the onus is on the user/terminal developer to make sure the colors they’ve configured (or the defaults provided) are reasonable. A downside of this is that
116.
▲
by
ratorx
2y ago
Not quite, by default the signal handler hijacks an existing thread. It is possible to keep a dedicated thread around that solely waits for signals, but that’s a workaround and you end up needing to also mask all signals from all other thre
117.
▲
by
ratorx
2y ago
It wouldn’t be as bad if it was that simple :) If handling a signal was equivalent to handling concurrency then it wouldn’t be as much of a problem. IIRC a signal can take over execution of a running thread, so it will completely invalidate
118.
▲
by
ratorx
2y ago
There’s two separate aspects here: 1) Monads used to restrict the computation available in the context of a signal handler (or function coloring etc, basically a way for a compiler or static checker to determine that a block of code does no
119.
▲
by
ratorx
2y ago
I think that’s slightly orthogonal. It would still be safe, because you’d design around this restriction from the start, rather than accidentally call or mutate something you were not supposed to. The problem with safe signal handling is th
120.
▲
by
ratorx
2y ago
Safe signal handling has so many footguns that it seems worth re-considering the entire API. Even OpenSSH has had issues with it [1]. It seems very difficult to build good abstractions for it in any programming language, without introducing
More ›