Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lilyball
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
31.
▲
by
lilyball
1y ago
I can easily see this bug happening in Rust. At some level you need to transform your data model into text to write out, and to parse incoming text. If you want to parse linewise you might use BufRead::lines(), and then write a parser for t
32.
▲
by
lilyball
1y ago
The example parity function for 3 variables appears to be flipped. Instead of being true if the number of true inputs is odd, it's true if the number of true inputs is even.
33.
▲
by
lilyball
1y ago
Your computer's own IP address is completely irrelevant. What matters is the site hostname and the IP address it resolves to.
34.
▲
by
lilyball
1y ago
Darwin has its own set of futex primitives that it only fairly recently made public API, see https://developer.apple.com/documentation/os/os_sync_wait_on... . But there is a problem with this approach on Darwin, wh
35.
▲
by
lilyball
1y ago
> why not just run the checks at the backend's discretion? Presumably it's a combination of needing to do it while the computer is awake and online, and also the Passwords app probably refreshes the data on launch if it hasn&
36.
▲
by
lilyball
1y ago
Ah right, std::io::Read, I didn't think about that. And so it needs to explicitly track the initialized portion because otherwise calling .ensure_init() every time you want to do a read becomes expensive, that makes sense. And presumab
37.
▲
by
lilyball
1y ago
What is the reason for explicitly tracking the initialized-but-unfilled portion? AIUI there's no harm in treating initialized bytes as uninitialized since you're working with u8, so what do you actually gain by knowing the initial
38.
▲
by
lilyball
1y ago
Note that if you have a `&mut T` then the memory must already be initialized for T, so writing to that pointer doesn't initialize anything new (although as you say it can deinitialize bytes, but that only matters if you use trans
39.
▲
by
lilyball
1y ago
ffmpeg has a lot of assembly code in it, so it's a very odd choice of program to use for this kind of test as LTO is presumably not going to do anything to the assembly.
40.
▲
by
lilyball
1y ago
If the macros only exist to get file and line information, you could do the same thing by using `#[track_caller]` functions combined with `std::panic::Location` to get that same info. For example, `stack_err!` could be replaced with imp
41.
▲
by
lilyball
1y ago
Gankra wrote a good piece about all the work involved in this years ago (specifically, what Swift had to go through to get ABI stability) < https://faultlore.com/blah/swift-abi/ >
42.
▲
by
lilyball
1y ago
Anything that's slow to start is completely unusable as a general replacement for shell scripting. For specific use-cases where the script itself would take a long time to run, a slow start may be fine, but `sh` scripts are used all ov
43.
▲
by
lilyball
1y ago
That sounds like an awful user experience. There's no way I'm ever buying a mobile app that requires me to go enter my credit card into a website to pay for it. Cross-platform services can justify this sort of thing (because you&#
44.
▲
by
lilyball
1y ago
Don't use a single monolithic crate. Break your project up into multiple crates. Not only does this help with compile time (the individual crate compiles can be parallelized), it also tends to help with API design as well.
45.
▲
by
lilyball
1y ago
I have now! Thanks for the recommendation. Consciousness, the subjective experience of what it is like to be something, is very difficult to explain except insofar as there are similar shared experiences that one can make analogy to. I cert
46.
▲
by
lilyball
1y ago
Speaking as a trans therian, being a therian is kind of like being trans, except there's no cross-species HRT, and even fewer people will be willing to respect your identity. It is really hard to actually describe what this means, thou
47.
▲
by
lilyball
1y ago
In the case where it's rather forced, you could call it Inelegant Variation instead.
48.
▲
by
lilyball
1y ago
Oh! That was very much non-obvious, as there was no textual description of that like there was for dragging countries around and deleting them. I see if I actually watch the video it shows the compass rose at the very end, but I normally sk
49.
▲
by
lilyball
1y ago
Opening this starts with 3 countries showing (US, China, and India), overlayed on top of Africa. However, the country shapes are wrong. They're the shapes of their respective countries, but they've been relocated without any merca
50.
▲
by
lilyball
1y ago
That's actually just for the block-based APIs like notify_register_dispatch(), the other notify APIs have no availability annotations at all.
51.
▲
by
lilyball
1y ago
Darwin notifications are so old they don't have any availability annotations (block-based darwin notification APIs like notify_register_dispatch() were introduced in macOS 10.6 / iOS 3.2, but the rest of them are declared as alway
52.
▲
by
lilyball
1y ago
This one looks interesting. A few years ago I looked at all of the Rust ASN.1 libraries I could find and they all had various issues. I'm a little surprised I didn't find this one.
53.
▲
by
lilyball
1y ago
Oh right, the asn1 crate, which supports CHOICE but only up to 3 alternatives, which means it can't even be used to implement X.509 certificate decoding. Makes me wonder what they're going to do when they get that far.
54.
▲
by
lilyball
2y ago
I've been very happy with Wipr.
55.
▲
by
lilyball
2y ago
This is the same combination I'm using, and it works so well that I really have to wonder if all this handwringing over the move from Manifest V2 to V3 is really worth it. What is uBlock Origin supposed to be able to block that Wipr is
56.
▲
by
lilyball
2y ago
This is Java, the use of wait() and notifyAll() means the whole thing is running in a synchronized method/statement.
57.
▲
by
lilyball
2y ago
Well, you probably already have a bed, no? And if you don't, there are lots of different types of mattresses out there and you may have preferences. As for frame, if you buy the Eight Sleep Pod 4 Ultra (which is the version that comes
58.
▲
by
lilyball
2y ago
Nothing here is particularly surprising. The worries about engineers ssh'ing into the machine to see if anyone is sleeping seems rather overblown though. The product itself doubles as a sleep tracker and all data goes through their ser
59.
▲
by
lilyball
2y ago
It is in fact already sending this data to their servers, because it doubles as a sleep tracker and everything goes through their servers. I really wish there was an option to do local-only connectivity, but very few internet-enabled produc
60.
▲
by
lilyball
2y ago
It's not actually a bed, it's a mattress cover. They are willing to sell you a mattress with it if you want, but the product itself is designed to go over your existing mattress. That said, good-quality beds cost money!
More ›