标签:#c
找到 25523 篇相关文章
Half a Second – a book about the XZ backdoor
Boys' ADHD symptoms linked to addictive social media use in new study
Qwen3.8 is launching and going open-weight soon
Anthropic runs large-scale code migrations with Claude Code
Protester calls out Amazon CTO for allowing Israel to use their AI towards Gaza
LG Monitors Caught Installing Adware and App with Access to All System Resources
DeepSeek routes your request to Fable5
Mirror your GitHub repos to tangled.org automatically
The Mighty Big Array of Finn Jensen LA8YB
Perforce charges $500 for training training videos.. and it's AI narrated
Ollama: All Aboard Open Models
OpenAI reduces Codex Model Context Size from 372k to 272k
Order of Magnitude Physics a Textbook with Applications to the Retinal Rod(1998) [pdf]
The Art of Insight in Science and Engineering – Mastering Complexity(2014) [pdf]
Show HN: PilotCite – Get your brand cited by ChatGPT, Gemini, and more
CaptureKit
Keep your desktop clean by auto-organizing screenshots. Discussion | Link
UK to Scrap Digital ID
The Hidden Cost of yield in C#: What the Compiler Doesn't Tell You
Most C# developers know how to use yield return. Few understand what actually happens after compilation. If you've ever written something like this: public IEnumerable < int > GetNumbers () { yield return 1 ; yield return 2 ; yield return 3 ; } it looks almost magical. No collection. No list allocation. No iterator implementation. Yet somehow the method returns an IEnumerable. So what is really happening? The answer is one of the most elegant compiler transformations in the entire .NET ecosystem. Let's open the hood. The Illusion Most developers imagine the previous code executes like this: Call method ↓ Return 1 ↓ Pause ↓ Return 2 ↓ Pause ↓ Return 3 That isn't what happens. C# methods cannot actually pause execution. Instead, the compiler completely rewrites your method into something entirely different. The Compiler Creates a State Machine Your tiny method becomes a hidden class similar to this: private sealed class GetNumbersIterator : IEnumerable < int >, IEnumerator < int > { private int _state ; private int _current ; public bool MoveNext () { switch ( _state ) { case 0 : _current = 1 ; _state = 1 ; return true ; case 1 : _current = 2 ; _state = 2 ; return true ; case 2 : _current = 3 ; _state = - 1 ; return true ; default : return false ; } } public int Current => _current ; } Your original method no longer exists. Instead, it simply returns: return new GetNumbersIterator (); Every yield return becomes another state inside MoveNext(). Why Local Variables Don't Disappear Consider this code: IEnumerable < int > Squares () { int x = 1 ; while ( x <= 3 ) { yield return x * x ; x ++; } } After the first yield, the method "pauses." But where is x stored? Not on the stack. The original stack frame has already disappeared. Instead, the compiler promotes local variables into fields: private int _x ; The iterator object now owns every variable that must survive between iterations. This is why iterator methods can remember where they left off. Heap Allocation Happens Ma
FlowTask 2.0
Company brain for AI Agents Discussion | Link