Beautiful C++ Code - Told Through the Eyes of A Failed AI Prompt
summary
Recreates a production message-passing channel by iterating prompts to an unnamed AI assistant, ending with a working C++ design that emphasizes single-receiver, multi-sender semantics, type erasure via message base instead of std::variant or std::any, and a priority/scheduled queue for timers. Implementation centralizes mutex/condition-variable logic to avoid unlocking-before-callback bugs, swaps out shared reference counting for a closed-queue shutdown, uses dynamic_cast for dispatch, targets C++17/C++20 features, and exposes the concrete trade-offs that make the original robust.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 2:06System requirements and abstraction
- 9:02Recreating with AI
- 12:10Prompt history loss
- 19:30Refining AI prompt
- 23:22Rust sender/receiver classes
- 29:03Type-agnostic abstraction
- 31:31Template meta-programming
- 35:04Sender tracking complexities
- 38:57Code cleanup
- 41:44Synchronization challenges
- 45:38Removing reference counting
- 47:02AI limitations
- 50:36Conclusion and Q&A
related talks
45mAI-powered Code Development: The role of prompt engineering
48mStop Fighting Your AI Engineering Prompts That Actually Work
45mTest Driven Prompt Programming: How AI is Changing the Way We Code
10mMastering the Art and Science of AI Communication
55mAI is Coming - Now What? Architecting the Future of Software
01h 01m10 tips to level up your ai-assisted coding
18mTalking Shit About AI Agents
28mCreating fluent Frontend Experiences in an age of AI
