Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Rusky
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
Rusky
2mo ago
Compilers don't take away the code we need to write; they translate it into a different formal language that emphasizes and de-emphasizes various aspects of its meaning. LLMs are categorically a different thing. Instead of soundly tran
2.
▲
by
Rusky
5mo ago
There's Eytzinger order: https://algorithmica.org/en/eytzinger
3.
▲
by
Rusky
5mo ago
This is not actually a problem for total languages, which simply model these kinds of processes using corecursion/coinduction/codata.
4.
▲
by
Rusky
6mo ago
The types are there for garbage collection, which is there for integration with the Web APIs which are all defined in terms of garbage collected objects.
5.
▲
by
Rusky
6mo ago
The thing is that anyone can show up and spend time discussing ideas in Rust project spaces. From the outside it is easy to confuse that with actual movement toward landing changes in the language. (The communication aspect of this is somet
6.
▲
by
Rusky
6mo ago
Yoshua is part of the "loud contingent" being described. He's not on the lang team, and he's been "working on" things like keyword generics for years without any indication that they are going to make it into t
7.
▲
by
Rusky
6mo ago
Or put another way, a hypothetical feature that you made up in your head is the thing that requires source access. Editions do not let you change the semantics of types. To be fair, Rust tooling does tend toward build-from-source. But this
8.
▲
by
Rusky
6mo ago
Not at all. It's much more efficient to implement a GC on x86 or ARM than it is on Wasm 1.0/2.0, because you control the stack layout, and you don't have an impenetrable security boundary with the JS runtime that your GC need
9.
▲
by
Rusky
7mo ago
The reason rust-analyzer doesn't update diagnostics until you save is historical. Originally, people tried to build IDE support by reusing rustc itself, but this proved too slow and cumbersome at the time. Rust-analyzer reimplemented t
10.
▲
by
Rusky
9mo ago
TCO is less of an optimization (which are typically best-effort on the part of the compiler) and more of an actual semantic change that expands the set of valid programs. It's like a new control flow construct that lives alongside `whi
11.
▲
by
Rusky
10mo ago
Giving special treatment to code that "explicitly wants" to handle unwinding means two things: * You have to know when an API can unwind, and you have to make it an error to unwind when the caller isn't expecting it. If this
12.
▲
by
Rusky
10mo ago
> Suppose, instead, we had a mechanism that allowed registering arbitrary panic hooks, and unregistering them when no longer needed, in any order. Then, we could do RAII-style resource handling: you could have a `CursesTerminal` type, wh
13.
▲
by
Rusky
10mo ago
There are also currently the unstable rustc_layout_scalar_valid_range_start and rustc_layout_scalar_valid_range_end attributes (which are used in the definition of NonNull, etc.) which could be used for some bit patterns. Also aspirations t
14.
▲
by
Rusky
10mo ago
Hypothetically Rust could make `Mutex<InnerBlah>` work with just two bits in the same way it makes `Option<&T>` the same size as `&T`. Annotate `InnerBlah` with the information about which bits are available and let `Mut
15.
▲
by
Rusky
11mo ago
You don't need any of that, and you can keep cancellation too. The core of an eager cooperative multitasking system does not even need the concept of an executor. You can spawn a new task by giving it some stack space and running its b
16.
▲
by
Rusky
11mo ago
> in principle the exact same optimization could be done for stackful coroutines. Yes, I totally agree, and this is sort of what I imagine a better design would look like. > One of the reasons Rust does it the way it currently does is
17.
▲
by
Rusky
11mo ago
"Not inert" does not at all imply "a single runtime within std+compiler." You've jumped way too far in the opposite direction there. The problem is that the particular interface Rust chose for controlling dispatch
18.
▲
by
Rusky
11mo ago
This one is relevant because it avoids heap allocation while running the iterator and for loop body concurrently. Which is exactly the kind of thing that `async` does.
19.
▲
by
Rusky
11mo ago
The requirement is that the futures are not separate heap allocations, not that they are inert. It's not at all obvious that Rust's is the only possible design that would work here. I strongly suspect it is not. In fact, early Rus
20.
▲
by
Rusky
1y ago
If that is what profiles were actually doing, it would probably make sense. But it's not what profiles are doing. Instead, for example, the lifetime safety profile ( https://github.com/isocpp/CppCoreGuidelines/
21.
▲
by
Rusky
1y ago
There is work coming from the "academic pedantism" sphere for exploiting single-resumability. For example: https://dl.acm.org/doi/pdf/10.1145/3632896
22.
▲
by
Rusky
1y ago
Yes, that's how it should work. It is not how it works in today's rustc.
23.
▲
by
Rusky
1y ago
> I'd be fine writing `.into()` or `.trunc()` Yes, this is specifically what I'm disagreeing with. > I fully expect that such methods will be inlined, likely even in debug mode (e.g. `#[inline(always)]`), and compile down to
24.
▲
by
Rusky
1y ago
A method call like `.trunc()` is still going to be abysmally less ergonomic than `as`. It relies on inference or turbofish to pick a type, and it has all the syntactic noise of a function call on top of that. Not to mention this sort of pro
25.
▲
by
Rusky
1y ago
It is context free, just ambiguous.
26.
▲
by
Rusky
1y ago
I've been using https://messages.google.com to get something like the desktop iMessage experience with Android- does that work for your use case? (I don't use iMessage so I could just be missing some killer feature it
27.
▲
by
Rusky
1y ago
The tokenizer is not really a good demonstration of the differences between these styles. A more representative comparison would be the later stages that build, traverse, and manipulate tree and graph data structures.
28.
▲
by
Rusky
1y ago
"Hand-rolled assembly" was one item in a list that also included DoD. You're reading way more into that sentence than they wrote- the claim is that DoD itself also impacts the maintainability of the codebase.
29.
▲
by
Rusky
1y ago
Isn't stack overflow made safe via guard pages and probes (on sufficiently high-tier target platforms)? That is you should get a guaranteed error, even if that is a segfault, and not memory corruption.
30.
▲
by
Rusky
1y ago
What a thought-terminating way to approach an idea. Effects are not simply renamed conditions, and we have a whole article here describing them in more detail than that one sentence, so you can see some of the differences for yourself.
More ›