To elaborate further, this basically boils down to the distinction between ordinary phis with a control input and gated phis (i.e. muxes). Consider the final form of the graph in Example #1 here: https://github.com/SeaOfNodes/Simple/blob/main/chapter05/README.md
The final Return node is control dependent only on the Start node (since the function always returns). However, its control input is the Region node merging the two control outputs of the If. The real reason to do this is to have a control input to associate with the Phi, which essentially maintains the placement of the Phi in a basic block and dramatically simplifies CFG reconstruction.
The more dependency-based approach would be to have the Phi depend only on the `==` node and have no control input at all. But rediscovering control flow in this scenario is quite a bit more difficult.
27.3.2025 16:38To elaborate further, this basically boils down to the distinction between ordinary phis with a control input and gated phis (i.e. muxes)....Hot Sea of Nodes take: despite him coining the term, Cliff Click's Sea of Nodes is not a maximal instantiation of the underlying concept. It still has unnecessary dependencies in the form of Region nodes.
Despite being called Regions, which are evocative of control dependence regions, they are actually basic blocks in disguise. In a control flow diamond, code in the common successor will have a control flow input on the Region node merging both branches of the conditional. If Regions were instead control dependence regions, then the successor would share a control input with the entry to the conditional itself.
You could go a step further than Sea of Nodes and replace Click's Regions with actual control dependence regions. You could also think of ways to eliminate some uses of control inputs altogether.
However, Click's choice here is actually a great engineering tradeoff. It eliminates a whole host of problems that arise with control dependence. In general, looking at C2 and his Simple project on GitHub, you can see case after case where he made a clever engineering decision to avoid potential problems.
27.3.2025 16:32Hot Sea of Nodes take: despite him coining the term, Cliff Click's Sea of Nodes is not a maximal instantiation of the underlying...Pending approval, it seems like the 0.1 milestone for Carbon will now include a detailed safety plan:
https://github.com/carbon-language/carbon-lang/pull/4880
I always felt like Carbon suffered a bit from being introduced during a memory safety inflection point, and in particular by considering safety as something that could be added later.
Lots of people have attempted this with good intentions, but I am not aware of a language conceptually situated near C++ that has successfully been able to add safety after the fact (setting aside adding some form of GC like Fil-C). This change in priorities gives Carbon a chance to avoid this trap.
8.2.2025 21:23Pending approval, it seems like the 0.1 milestone for Carbon will now include a detailed safety...@pervognsen Do you think that a "better C" is a coherent goal, or does any attempt to dramatically improve C make it fundamentally non-C?
6.1.2025 18:34@pervognsen Do you think that a "better C" is a coherent goal, or does any attempt to dramatically improve C make it fundamentally...I was cleaning up my office and found a USB drive that I didn't even remember having. I plugged it in and there was a partially written C compiler from October 2015. I didn't even remember starting this project or what my motivation was.
2.1.2025 22:41I was cleaning up my office and found a USB drive that I didn't even remember having. I plugged it in and there was a partially written...Which languages besides Rust have a notion of borrowing and also allow for (safely) returning borrowed references?
30.12.2024 21:01Which languages besides Rust have a notion of borrowing and also allow for (safely) returning borrowed references?Has the Cheney on the MTA (see https://www.plover.com/misc/hbaker-archive/CheneyMTA.html) approach of using the stack as the nursery for a generational GC ever been used in the implementation of a language that wasn't Scheme (or some other minimal Lisp)?
30.12.2024 01:00Has the Cheney on the MTA (see https://www.plover.com/misc/hbaker-archive/CheneyMTA.html) approach of using the stack as the nursery for a...Related to @graydon's mention of counterintuitive consequences of subtyping, here is Lionel Parreaux's talk from UNSOUND 2024 on how some languages with subtyping and intersection/union types support distributivity rules that are unsound in other languages:
https://www.youtube.com/live/ZZx7DvdAID0?t=21146s
It also reminded me (a non-TypeScript user) that due to overloading resolution, TypeScript intersection types are not commutative: https://github.com/Microsoft/TypeScript/issues/14190
@regehr Am I being unrealistic if I think that there's no real performance problem with checked integer overflows as long as we correctly distinguish between integers and machine words (where 2s-complement arithmetic is actually desired)?
25.12.2024 04:16@regehr Am I being unrealistic if I think that there's no real performance problem with checked integer overflows as long as we...@ltratt Re: your recent post on incremental parsing, what do you think about the actual applicability of sentential form parsing algorithms in the LSP environment? Does the textDocument/didChange method actually provide enough information to confidently implement change isolation?
My main usability problem with practical language servers is the constant stream of diagnostics while I am typing incomplete items in the middle of a file.
24.12.2024 18:54@ltratt Re: your recent post on incremental parsing, what do you think about the actual applicability of sentential form parsing algorithms...my personal version of Roko's Basilisk is worrying if Gemini will punish me for all of my `site:reddit.com` usage over the years
21.12.2024 18:53my personal version of Roko's Basilisk is worrying if Gemini will punish me for all of my `site:reddit.com` usage over the yearsC++ in Space 2077 Keynote: Whitespace Isn't as Simple as You Think
18.12.2024 01:09C++ in Space 2077 Keynote: Whitespace Isn't as Simple as You ThinkMore languages should adopt Lean's annotation of partial function definitions, even if they're not using it as a way to isolate partiality from a logic.
Function definitions that are not obviously terminating (and Lean has a pretty expansive definition of "obviously" here compared to many systems) are inherently a bit more suspect than other definitions.
18.12.2024 01:08More languages should adopt Lean's annotation of partial function definitions, even if they're not using it as a way to isolate...And we discovered that we were, in fact, executing in the CreditCard monad:
https://news.ycombinator.com/item?id=42433421
16.12.2024 19:02And we discovered that we were, in fact, executing in the CreditCard monad:https://news.ycombinator.com/item?id=42433421Overheard at the office: “nobody ever got fired for implementing Lengauer-Tarjan”
17.10.2024 19:48Overheard at the office: “nobody ever got fired for implementing Lengauer-Tarjan”Luyu Cheng and Lionel Parreaux's paper The Ultimate Conditional Syntax won Distinguished Paper at OOPSLA this year and is now available:
https://dl.acm.org/doi/10.1145/3689746
There is a lot of new material that wasn't in the earlier tech report.
@graydon Why didn't Rust have named function parameters? Were they present at one point and removed?
4.10.2024 00:11@graydon Why didn't Rust have named function parameters? Were they present at one point and removed?Does anyone have a favorite strategy for mismatched bracket error recovery in recursive descent parsers?
1.10.2024 03:18Does anyone have a favorite strategy for mismatched bracket error recovery in recursive descent parsers?Does anyone have suggestions for reducing redundant code between infer/check phases of bidirectional type checking? One suggestion I've seen is to merge the two by replacing inference with checking against an updateable type slot that's initially empty, but I've found that I often prefer the more functional (and more verbose) style to this.
27.9.2024 20:20Does anyone have suggestions for reducing redundant code between infer/check phases of bidirectional type checking? One suggestion I've...You know your programming language is cooked when you need a whole conference talk on passing arguments by value:
https://www.youtube.com/watch?v=79Bb4L6txTw&t=6s
Now time to Command-Tab to my editor and write some C++.