28 points verdagon 2 hours ago 15 comments
verdagon 2 hours ago | parent
* We _could_ use the function parameter syntax `entities: &world.entities[]` instead of `entities in world.entities[]`.
* "Groups" aren't really central to understanding the idea, so Path Borrowing might be a better name than Group Borrowing.
Opinions welcome =)
munchler 32 minutes ago | parent
sebastianmestre 1 hour ago | parent
Edit: tfa makes it clear it's a separate project
verdagon 1 hour ago | parent
Also, I really like where Vale ended up, Vale's generational references + region borrowing was a truly weird and unusual memory safety blend. I didn't want that combination to be lost to time, so I wanted "Vale" to keep referring to that.
giovannibonetti 35 minutes ago | parent
392 32 minutes ago | parent
https://venge.net/graydon/talks/VectorizedInterpretersTalk-2...
cmontella 14 minutes ago | parent
verdagon 16 minutes ago | parent
The biggest decision for Valen is what to lower to:
* Rust MIR, which compiles to CUDA now, [1] (perhaps other cards soon?)
* SPIR-V, like Zig does [2]
* MLIR
Rust MIR is looking pretty nice. Valen already has Rust interop by doing some rustc sorcery, [3] and it would be somewhat straightforward to switch from emitting LLVM to emitting Rust MIR. I just need to figure out if Rust MIR can support the optimizations I have planned for Valen.
In a perfect world, Rust would be able to lower its MIR to MLIR, since MLIR has so many backends. I recall there were some efforts to do that, unsure where that ended up.
[0] https://verdagon.dev/blog/next-gen-languages-gpu
[1] https://developer.nvidia.com/blog/introducing-cuda-rust-two-...
[2] https://ziglang.org/devlog/2026/#2026-06-26
[3] https://verdagon.dev/blog/golden-spike-reviving-vale-valen
maufl 28 minutes ago | parent
verdagon 8 minutes ago | parent
And Rust already supports forms of mutable aliasing already, such as with Cell, and GhostCell which is halfway towards Valen's approach. I would love to see someone augment GhostCell to have the sort of "invalidation" logic that group borrowing does. In fact, Plecra is working on something like that with their (WIP) "Exclusion Typing". [1]
On top of that, Polonius already thinks in terms of "paths", just like Valen does. So it's not so much a question of compiler design, but of language design, and how Rust would expose it to the user.
[0] https://smallcultfollowing.com/babysteps/blog/2024/06/02/the...
[1] https://dilated.me/blog/posts/introduction-to-exclusion-typi...
user142 11 minutes ago | parent
peesem 9 minutes ago | parent
verdagon 6 minutes ago | parent
fithisux 7 minutes ago | parent