Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Rusky
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
91.
▲
by
Rusky
2y ago
The problem with this, as the article argues in detail, is that it leaves a hole in functionality that people need but offers no clear benefit in return. A movable owning pointer that exposes its pointer-ness in its semantics is a useful to
92.
▲
by
Rusky
2y ago
Yeah- I tend to think of the whole vague collection of LR + shunting yard + Pratt as one single approach in my head, with the same capabilities in terms of parsing. Sometimes working through a particular problem, or conflict, or example is
93.
▲
by
Rusky
2y ago
The difference is that resuming a coroutine mutates it, so that the next time you resume the same object it starts from wherever the coroutine next yielded. This may or may not be the same yield point as the last time, depending on the
94.
▲
by
Rusky
2y ago
That's not what "resume multiple times" is referring to here. You can typically only resume a coroutine once per yield, while a continuation generally allows you to return to the same place multiple times.
95.
▲
by
Rusky
2y ago
There are two aspects to effects as a language feature- first there is the runtime behavior, and then there is the type system. Ruling out categories of effects is the job of the type system, and you don't have to commit to (or avoid)
96.
▲
by
Rusky
2y ago
Both effects and coroutines can (and typically do) work implicitly across calls like that. The version with forwarding operators like in this post is something of a Rust-ism, or more generally an async/await-ism, or a stackless corouti
97.
▲
by
Rusky
2y ago
The fact that you parse an entire subtree before you know the kind of its parent is exactly what makes it bottom-up. Pratt is certainly easy to integrate into an otherwise-top-down parser, because you can enter it from the top and it can
98.
▲
by
Rusky
2y ago
Pratt parsing is essentially hand-written LR. It's certainly bottom-up in the same way, despite Pratt's paper title. (I went into more depth on this a few years ago: https://www.abubalay.com/blog/2021/12&
99.
▲
by
Rusky
2y ago
Features like that technically make the language context-sensitive, but in practice that context sensitivity is entirely contained within the lexer, and you can still describe the rest of the language with a context free grammar of tokens
100.
▲
by
Rusky
2y ago
The current iteration of WebAssembly was always an "MVP." It's got the core instruction set and memory model to run, essentially, C programs safely and efficiently, and just enough interop with the host to get data in and out
101.
▲
by
Rusky
3y ago
> Rust requires indices to express what can be expressed with just references in Java. This is a big oversimplification. Rust can express a lot more than indices, and a lot more than what's in this post. The actual requirement is th
102.
▲
by
Rusky
3y ago
It is the definition of memory safety that Rust uses. It would be easier to discuss whatever non-UB failure modes you have in mind, in the context of Rust, if you used a different term.
103.
▲
by
Rusky
3y ago
You don't get two owners that way. You get something slightly less powerful than owners, which still has all its preconditions satisfied: you can check that it is in bounds, and if so you will find an element of the expected type. Yo
104.
▲
by
Rusky
3y ago
I don't believe the performance difference between Cranelift and LLVM really has much to do with E-graphs. Cranelift had this same performance profile (faster than LLVM but generating slower output) before they switched to E-graphs. Ra
105.
▲
by
Rusky
3y ago
You couldn't write explicit lifetimes before NLL, either. (Nor does conventional type inference mean you can always write the type! This is why people who design type systems care about "principal types.") NLL (and even mores
106.
▲
by
Rusky
3y ago
The compiler doesn't do anything here that is hard to understand- its approximate solution works purely in terms of the control flow graph, so there is a very clear and bright dividing line between "you have a use of this variable
107.
▲
by
Rusky
3y ago
Ante has a similar unresolved problem with Clone- AIUI you can only safely Clone things you can project a `&shared` reference through.
108.
▲
by
Rusky
3y ago
What I mean is, merely plopping a Monad trait into Rust and implementing everything in userspace is famously not an effective implementation approach, so your phrasing is bound to confuse people when you are instead referring to the semanti
109.
▲
by
Rusky
3y ago
Pretty important distinction when you're specifically talking about the interface being expressed in the language.
110.
▲
by
Rusky
3y ago
Yes, Arc values are also moved by default. I was referring to both.
111.
▲
by
Rusky
3y ago
Yes, Rust also makes it quite easy to minimize reference count bumps. Rc values are moved by default, which introduces no traffic, and increments are explicit calls to `clone`. You can have both optimizations together! It's even poss
112.
▲
by
Rusky
3y ago
In Rust, you may have multiple threads yet still use non-atomic reference counts for objects that are never shared between multiple threads.
113.
▲
by
Rusky
3y ago
> i don't agree with your implication that data races are a low-level thing. I don't mean low level in that sense, just that they're a narrower concept than general race conditions. > it's not clear whether in this
114.
▲
by
Rusky
3y ago
Segmented vs contiguous stacks is a completely orthogonal design choice here. The key is merely that this stack is separate from the C stack but accessible simultaneously. As long as you have that, it can be segmented, or it can be contiguo
115.
▲
by
Rusky
3y ago
Fibers can make that exact same optimization by using a separate stack (as a stackless coroutine uses a separate state machine) alongside the C stack. This can be done either through stack switching, or by treating the fiber stack more like
116.
▲
by
Rusky
3y ago
> 1. rust eliminates data races through the type system, so the great benefit of promises doesn't exist in this context I don't know about this one. Programmers who use async Rust often talk about how they appreciate that `awai
117.
▲
by
Rusky
3y ago
Synchronous Rust can just call those APIs like C++ can.
118.
▲
by
Rusky
3y ago
This is like arguing for goto over structured concurrency. Async/await is a structured control flow primitive that lets you compose functions in more flexible ways. It will stay relevant as long as we still use things like functions, b
119.
▲
by
Rusky
3y ago
Gor Nishanov's analysis is way too narrow to be used as general language design advice. Windows API fibers are also way too specific of an implementation to generalize. Call stacks are just a data structure like any other. That they ha
120.
▲
by
Rusky
3y ago
I don't think syscall-vs-C-function is at all meaningful for someone making a completely unrelated language. The system has to pick some ABI for communicating with the kernel, and syscalls don't change that. The ISA generally do
More ›