Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dwattttt
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
22 ms
·
391.
▲
by
dwattttt
1y ago
With no recognition of what harm the desires result in? This is a fast way to all out war. Have you considered finding middle ground and compromises? Or is war the only option?
392.
▲
by
dwattttt
1y ago
As sibling notes, it is. It's very rarely seen though. One place you might see something like it is if an API takes ownership, but returns it on error; you see the error side carry the resource you gave it, so you could try again.
393.
▲
by
dwattttt
1y ago
The problem isn't an upstream going rogue; it's an upstream going dark, and someone taking advantage of that. Upstreams going dark happens much more often than them going rogue. A system that requires you to prove more than you ju
394.
▲
by
dwattttt
1y ago
Windows Performance Analyser is pretty amazing. Not the simplest tool to use, but not particularly hard. Bruce Dawson's blog ( https://randomascii.wordpress.com ) has lots of articles using it.
395.
▲
by
dwattttt
1y ago
> add a `pyproject.toml` with all of your deps Or put your dependencies inline in the script ( https://packaging.python.org/en/latest/specifications/inline... ), and it's just a single file script again
396.
▲
by
dwattttt
1y ago
Plus they're fun to say. Spudger!
397.
▲
by
dwattttt
1y ago
To take an extreme example, what if I asserted the Riemann hypothesis in comptime? It's relying on comptime execution to act as a proof checker. Which is fine for small inputs and uses, but it's not something that would scale well
398.
▲
by
dwattttt
1y ago
For the validity of the program? As in, a program will fail to compile (or compile but be incorrect) if an optimisation misbehaves? That sounds as bad as relying on undefined behaviour in C.
399.
▲
by
dwattttt
1y ago
I love the idea, but something being "provable" in this way feels like relying on optimisations. If a dead code elimination pass didn't remove the 'comptime unreachable' statement, you'll now fail to compile (I
400.
▲
by
dwattttt
1y ago
It depends on whether people depend on the structure of the errors. If they just stringify them, that shouldn't result in changes. If people are getting into the structure of the errors, they might need to update their code that works
401.
▲
by
dwattttt
1y ago
Culture and coding standards count for a lot. C _can_ do this, but it's not normal to. If Zig can foster a culture of handling errors this way, it'll be the way the community writ large handle errors.
402.
▲
by
dwattttt
1y ago
Stable pointers is a limitation for simplicity's sake. If C were better at tracking pointer invalidation, we'd be better at propagating updated pointers.
403.
▲
Why are Windows semiannual updates named H1 and H2?
(devblogs.microsoft.com)
5 points
by
dwattttt
1y ago
|
2 comments
404.
▲
by
dwattttt
1y ago
I was actually imagining skipping the Object step; if you go from wire -> buffer, and only ever work on it in buffer form (i.e. in WebAssembly, in a language more amenable to working on buffers/bytes), you skip needing the Object -&
405.
▲
by
dwattttt
1y ago
Now to just write the processing code in something that compiles to WebAssembly, and you can start copying and sending ArrayBuffers to your workers! Or I guess you can do it without the WebAssembly step.
406.
▲
by
dwattttt
1y ago
I'm aware of checked exceptions in Java. What I'm not aware of is a language which has checked exceptions as the only exception mechanism, which would be the only way to have exceptions always reflected in the function definition.
407.
▲
by
dwattttt
1y ago
> if the function signature doesn't indicate what specific errors can occur, why would you write a test in the first place? All languages with exceptions enter the chat
408.
▲
by
dwattttt
1y ago
I don't think any of the solutions are specific to Rust though? Just like the mistakes you can make hosting child processes can be made in many languages, the solution of e.g. "don't give the child processes your stdout, give
409.
▲
by
dwattttt
1y ago
Are you suggesting that the examples, source, libraries, and references for Rust make these mistakes, but other languages don't?
410.
▲
by
dwattttt
1y ago
I believe Rust's std::thread::scope is an equivalent. > Unlike non-scoped threads, scoped threads can borrow non-'static data, as the scope guarantees all threads will be joined at the end of the scope. > All threads spawned
411.
▲
by
dwattttt
1y ago
Imagine the sound a mosquito makes when it flies near your ear; it's quite distinct. I'm sure it's possible to distinguish mosquitos based on that (which is a factor related to the doppler signature mentioned).
412.
▲
by
dwattttt
1y ago
Crossover cables, get'cher crossover cables here!
413.
▲
by
dwattttt
1y ago
> If a language is memory safe but not thread safe, then you can race, but the outcome of those races won't be memory corruption or the violation of the language's type system. By these definitions, doesn't that mean go is
414.
▲
by
dwattttt
1y ago
I guess to also elaborate the point; it's also entirely correct to say "Rust is guaranteed to be memory safe unless 'unsafe' is involved".
415.
▲
by
dwattttt
1y ago
If a language is "memory safe", by some definition we expect safety from memory faults (for example, not accessing memory incorrectly). If a language is "memory safe" but not "thread safe", is the result "
416.
▲
by
dwattttt
1y ago
Sadly a NIC's permanent MAC is known to not always be unique: https://www.howtogeek.com/228286/how-is-the-uniqueness-of-ma...
417.
▲
by
dwattttt
1y ago
Shared libraries are linked together in a lossy step. I don't believe it's theoretically impossible; as an unsatisfying proof of concept, you could 'statically' link the .so by archiving it in the final binary, unpacking
418.
▲
by
dwattttt
1y ago
This sounds about right. Under CHERI when you're returning a pointer from a function, you can choose to limit its valid dereferencable range, I imagine all the way to 0 (i.e. it can't be dereferenced). When the pointer is passed b
419.
▲
by
dwattttt
1y ago
It doesn't sound like they're making multiple implementations that can write? If they were, they could make a trait for a Writable fs. But from their description it sounded like exactly two concrete implementations, one read-only,
420.
▲
by
dwattttt
1y ago
There's no free lunches. But I could take a problem, make it arbitrarily harder, then take that arbitrary limit away. If someone thought they had to solve the harder problem, and found out they only have to solve the easier one, did th
More ›