<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: verdagon</title><link>https://news.ycombinator.com/user?id=verdagon</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Thu, 22 Oct 2026 01:42:15 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=verdagon" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by verdagon in "A new way to think about borrow checking (in reverse)"]]></title><description><![CDATA[
<p>Hey! What were you designing? I didn't know anyone was doing anything with explicit paths.<p>I think there's a way to make the invalidation annotation (like Valen's `mut`) work nicely and feel ergonomic. Carbon is also facing this particular challenge, they have a literal invalidate annotation too.</p>
]]></description><pubDate>Mon, 19 Oct 2026 21:14:14 +0000</pubDate><link>https://news.ycombinator.com/item?id=50158165</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50158165</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50158165</guid></item><item><title><![CDATA[New comment by verdagon in "A new way to think about borrow checking (in reverse)"]]></title><description><![CDATA[
<p>Thank you! I pretty strongly believe this. If we take the time to write for each other, then the internet stays a place where humans connect with each other. Otherwise we get lost in the noise and it becomes a place where machines talk to each other through humans. Fingers crossed the world figures this out.</p>
]]></description><pubDate>Sun, 18 Oct 2026 12:36:51 +0000</pubDate><link>https://news.ycombinator.com/item?id=50140558</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50140558</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50140558</guid></item><item><title><![CDATA[New comment by verdagon in "A new way to think about borrow checking (in reverse)"]]></title><description><![CDATA[
<p>Figuring out how to make this was a pretty wild ride. I had zero clue how to approach this, so I went into the mountains with pencil and paper until I figured something out.<p>I started with a sort of "compile-time generational references" approach, where every reference would also remember <i>when</i> it was made, at compile-time. Then that evolved into a couple more things until I finally figured out this reverse approach. We'll see if it sticks.<p>Hope you all enjoy!</p>
]]></description><pubDate>Sun, 18 Oct 2026 12:18:52 +0000</pubDate><link>https://news.ycombinator.com/item?id=50140433</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50140433</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50140433</guid></item><item><title><![CDATA[A new way to think about borrow checking (in reverse)]]></title><description><![CDATA[
<p>Article URL: <a href="https://verdagon.dev/blog/reverse-borrow-checking">https://verdagon.dev/blog/reverse-borrow-checking</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=50140383">https://news.ycombinator.com/item?id=50140383</a></p>
<p>Points: 132</p>
<p># Comments: 20</p>
]]></description><pubDate>Sun, 18 Oct 2026 12:11:13 +0000</pubDate><link>https://verdagon.dev/blog/reverse-borrow-checking</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50140383</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50140383</guid></item><item><title><![CDATA[New comment by verdagon in "Valen's Memory Safety: A New Kind of Borrow Checking"]]></title><description><![CDATA[
<p>Perhaps Valen will unite borrowing, reference counting, and generational references... just like how a certain Babylon 5 figure united the fractured Minbari Castes and lead them to victory.</p>
]]></description><pubDate>Sun, 11 Oct 2026 20:56:23 +0000</pubDate><link>https://news.ycombinator.com/item?id=50047731</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50047731</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50047731</guid></item><item><title><![CDATA[New comment by verdagon in "Valen's Memory Safety: A New Kind of Borrow Checking"]]></title><description><![CDATA[
<p>No, but that's a great idea. Vale definitely taught me a lot about languages and architecture. I might do that...</p>
]]></description><pubDate>Sun, 11 Oct 2026 20:39:21 +0000</pubDate><link>https://news.ycombinator.com/item?id=50047596</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50047596</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50047596</guid></item><item><title><![CDATA[New comment by verdagon in "Valen's Memory Safety: A New Kind of Borrow Checking"]]></title><description><![CDATA[
<p>Sorry, I think my attempts to simplify/explain ended up confusing things. I'll try to be a little more precise.<p>In Rust, a reference is forever shared/immutable or forever unique/mutable.<p>In Valen, a reference is... "it depends". Specifically, it depends on the context.<p>It's similar to a &GhostCell<T>, where its mutability isn't determined yet because the GhostToken isn't present yet.<p>So, what determines the mutability at any given point in time? The function's `mut` effects (or lack of them) for the group/path that the reference is pointing to.<p>So we can imagine a `execute_on_4_threads` function like this:<p><pre><code>    func execute_on_4_threads<C', F: Func<void, (), C>>(
      workgroup: &W,
      closure: F
    ) { ... }
</code></pre>
(`Func<void, (), C>` is a trait for a function that returns void, takes no extra parameters, and names its captures as group C).<p>The most relevant fact here is that this function doesn't declare any `mut` effects at all (not on C, not on W's group, nothing), so nothing is being mutated. (And because of that, this function's callees also can't have any `mut` effects; they also can't mutate the data)<p>Now let's say we changed `workgroup`'s type to `&W in w`, and added a `mut(w)` to the function, to describe that we might modify the workgroup.<p>At that point, we would still know that we can invoke the closure from 4 threads, because we declared no relationship between `w` and `C`, so the compiler assumes (and enforces) that they're disjoint, have no overlap, nothing in one aliases anything in the other.<p>Hopefully that helps. Maybe I should write a blog post on this, my posts are usually clearer than my HN comments.<p>(Also, I'm not sure I understand your edit, if you could clarify that would be much appreciated)</p>
]]></description><pubDate>Sun, 11 Oct 2026 20:21:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=50047431</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50047431</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50047431</guid></item><item><title><![CDATA[New comment by verdagon in "Valen's Memory Safety: A New Kind of Borrow Checking"]]></title><description><![CDATA[
<p>Good catch, and well said. Another good example I like citing is GhostCell, which adds mutable aliasing to Rust in a way that's even more flexible than Cell.<p>I would say Valen's real benefit here is in making a more ergonomic way for functions to work with an arbitrary number of GhostTokens / brands, and to track the relationships between them. (But I admit, I'm no expert with GhostCell, happy to be corrected by someone here)</p>
]]></description><pubDate>Sun, 11 Oct 2026 20:15:56 +0000</pubDate><link>https://news.ycombinator.com/item?id=50047370</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50047370</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50047370</guid></item><item><title><![CDATA[New comment by verdagon in "Valen's Memory Safety: A New Kind of Borrow Checking"]]></title><description><![CDATA[
<p>Apologies for not understanding. And I admit, it's hard to communicate in the abstract, so I might still not understand the question.<p>If it helps: AFAICT, Valen's borrow checker preserves the same ecosystem-wide concurrency benefits that Rust has. For precedent, check out GhostCell [0] which is not only _compatible_ with Rust's concurrency but gives it some interesting new abilities. Valen's approach could be thought of as a more ergonomic form of GhostCell that better tracks the relationships between multiple groups (brands).<p>I could give a better answer if we had an example to toss around where we think Valen might force things to be single-threaded.</p>
]]></description><pubDate>Sun, 11 Oct 2026 19:37:27 +0000</pubDate><link>https://news.ycombinator.com/item?id=50046996</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50046996</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50046996</guid></item><item><title><![CDATA[New comment by verdagon in "Valen's Memory Safety: A New Kind of Borrow Checking"]]></title><description><![CDATA[
<p>Yep, that comes for free from the model. Though, if you're asking if we can have two unique references (like `&mut`) to two different entries, not yet. Nick's original proposal had some thoughts on how we can do that, and Zeta (another language implementing group borrowing) has some neat dependent-type-ish mechanisms for that. I'm still considering what Valen will want to do there.<p>Edit: it turns out, Ante has path unions! <a href="https://www.reddit.com/r/ProgrammingLanguages/comments/1x37bbs/comment/pfaeyea/" rel="nofollow">https://www.reddit.com/r/ProgrammingLanguages/comments/1x37b...</a></p>
]]></description><pubDate>Sun, 11 Oct 2026 18:22:16 +0000</pubDate><link>https://news.ycombinator.com/item?id=50046183</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50046183</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50046183</guid></item><item><title><![CDATA[New comment by verdagon in "Valen's Memory Safety: A New Kind of Borrow Checking"]]></title><description><![CDATA[
<p>Yep, that works today. The neat thing here is that `world` is immutable _except_ for its `.entities[]` elements.<p>That wouldn't be shareable with another thread, because part of it is `mut`. _Theoretically_ we could make this shareable with other threads if we had another kind of effect, let me know if you're curious about that.<p>The `entity in world.entities[] mut` gives `step` blanket permission to mutate any element inside world.entities. We wouldn't be able to say "all other entities are readonly".<p>Though, it's worth mentioning that `advance` and `resolve` both receive the entity as a unique reference (since it's the only reference into a group which has a mut effect).</p>
]]></description><pubDate>Sun, 11 Oct 2026 18:20:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=50046156</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50046156</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50046156</guid></item><item><title><![CDATA[New comment by verdagon in "Valen's Memory Safety: A New Kind of Borrow Checking"]]></title><description><![CDATA[
<p>Just to clarify, Valen's borrow checker can express shared-xor-mutable, its value proposition is that it can _also_ express mutable aliasing (with `in`).<p>* When a function has a mutable effect into a group, and the function doesn't declare any other groups to alias it (with `in`), it is effectively a unique reference.<p>* When a function has references into a group, and it declares no `mut` effects into any of them, they are effectively shared/immutable references.<p>This helps with Valen's structured concurrency in particular, but also helps guard against the single-threaded race conditions in the same way that Rust's borrow checker does. It also helps with Rust interop!<p>So, TL;DR: Valen lets you choose between shared-xor-mutable and mutable aliasing.<p>Also note how mutable aliasing is opt-in (via `in`), so there's a subtle influence pushing people towards shared-xor-mutable, so that they only reach for mutable aliasing when it will benefit them.</p>
]]></description><pubDate>Sun, 11 Oct 2026 18:09:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=50046041</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50046041</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50046041</guid></item><item><title><![CDATA[New comment by verdagon in "Valen's Memory Safety: A New Kind of Borrow Checking"]]></title><description><![CDATA[
<p>Awesome question, you're getting at the good stuff.<p>Short answer: Valen would have something similar to Fn and FnMut (but phrased in terms of effects rather than Fn vs FnMut). In other words, we would be able to express "a closure that does not modify anything it captures", or rather, "a closure that has no mut effects".<p>That closure, because it doesn't modify anything it captures, would be safe to share among multiple threads in a structured-concurrency-like / std::thread::scope-ish way.<p>The key here is that one _can_ express immutable references in Valen; an immutable reference is a reference that the containing function doesn't express a `mut` effect for. And once we have immutable references, we get all of the nice concurrency benefits that Rust trailblazed.<p>I'd also like to make a way to do the above without a function call, perhaps using something like the `parallel` keyword I described in [0].<p>A no-access reference is an interesting idea. That could be a more powerful way to express may_dangle. In Valen, I hope to have an "opaque" group to express something like that.<p>I don't know whether it's a good idea, but in Valen I'm trying to decouple access capabilities away from the reference types as much as possible. We'll see if that bet pays off.<p>[0] <a href="https://verdagon.dev/blog/seamless-fearless-structured-concurrency" rel="nofollow">https://verdagon.dev/blog/seamless-fearless-structured-concu...</a></p>
]]></description><pubDate>Sun, 11 Oct 2026 17:59:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=50045928</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50045928</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50045928</guid></item><item><title><![CDATA[New comment by verdagon in "Valen's Memory Safety: A New Kind of Borrow Checking"]]></title><description><![CDATA[
<p>Unfortunately, Mojo kind of limits itself by forcing all parameters to be unique references or shared references. So the first example works in Mojo, but not the `step` example nor the `attack` example from the original group borrowing explanation. [0]<p>I hope they one day upgrade to full group borrowing, it would be a nice fit for them.<p>[0] <a href="https://verdagon.dev/blog/group-borrowing" rel="nofollow">https://verdagon.dev/blog/group-borrowing</a></p>
]]></description><pubDate>Sun, 11 Oct 2026 17:41:41 +0000</pubDate><link>https://news.ycombinator.com/item?id=50045745</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50045745</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50045745</guid></item><item><title><![CDATA[New comment by verdagon in "Valen's Memory Safety: A New Kind of Borrow Checking"]]></title><description><![CDATA[
<p>Should be fixed now, thanks!</p>
]]></description><pubDate>Sun, 11 Oct 2026 16:41:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=50045088</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50045088</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50045088</guid></item><item><title><![CDATA[New comment by verdagon in "Valen's Memory Safety: A New Kind of Borrow Checking"]]></title><description><![CDATA[
<p>Theoretically, we can have a reference that points to two paths, a "path union" so to speak. If the user explicitly typed out the path union, it would be something like:<p>let my_ref &Entity in (live_list[], dead_list[]) = if ...<p>though it would be nicer in practice, because the compiler could infer that.<p>Haven't implemented it yet of course, but the data structures in the borrow checker are designed with this in mind.</p>
]]></description><pubDate>Sun, 11 Oct 2026 14:47:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=50043857</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50043857</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50043857</guid></item><item><title><![CDATA[New comment by verdagon in "Valen's Memory Safety: A New Kind of Borrow Checking"]]></title><description><![CDATA[
<p>Maybe! I think about D a lot when designing Valen, since they attempted to blend borrowing with garbage collection. Swift is facing some of the same challenges, and I expect Java could soon too now that Valhalla has landed.<p>If Valen solves those challenges as well as I think it can, it could be a good direction for them to explore.</p>
]]></description><pubDate>Sun, 11 Oct 2026 14:34:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=50043725</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50043725</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50043725</guid></item><item><title><![CDATA[New comment by verdagon in "Valen's Memory Safety: A New Kind of Borrow Checking"]]></title><description><![CDATA[
<p>Feel free to talk about it here, would love to hear about it!</p>
]]></description><pubDate>Sun, 11 Oct 2026 14:22:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=50043617</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50043617</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50043617</guid></item><item><title><![CDATA[New comment by verdagon in "Valen's Memory Safety: A New Kind of Borrow Checking"]]></title><description><![CDATA[
<p>Next article =) How the borrow checker handles ifs and loops is a pretty fun topic. If-statements work like you'd expect (invalidations from both branches are merged). Loops is where it gets weird: we have to scout all the invalidations that happen inside the loop and then "replay" them _before_ the body of the loop. I can explain it more if you'd like.</p>
]]></description><pubDate>Sun, 11 Oct 2026 14:20:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=50043591</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50043591</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50043591</guid></item><item><title><![CDATA[New comment by verdagon in "Valen's Memory Safety: A New Kind of Borrow Checking"]]></title><description><![CDATA[
<p>Yes, absolutely, lol. This article is really pushing my notes system past its limits. And it loops between six note colors, which normally isn't a problem, but is here. During the holidays, I want to see if I can implement Tufte notes like in <a href="https://edwardtufte.github.io/tufte-css/" rel="nofollow">https://edwardtufte.github.io/tufte-css/</a></p>
]]></description><pubDate>Sun, 11 Oct 2026 14:15:52 +0000</pubDate><link>https://news.ycombinator.com/item?id=50043548</link><dc:creator>verdagon</dc:creator><comments>https://news.ycombinator.com/item?id=50043548</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50043548</guid></item></channel></rss>