~/talk

How to understand modern C++ features in practice? Let's create a compiler!

Talkat Meeting C++ 2025 · 2025-11-06..11-08· [rust]
links:none on file
slides:none on file

A small but complete FORTH compiler-interpreter is implemented in modern C++ and actually builds and runs; the project uses std::ranges and coroutines for token parsing, generators and a coroutine-based cooperative scheduler (semi‑fibers) to avoid heavyweight context switches, and organizes code with modules. Port to RISC‑V ESP32 shows a full image around 750 KB with room for trimming. The claim is practical: coroutine-based multitasking measures significantly lower overhead than thread RTOS-style context switching, and the implementation, parsing, and embedded port all work end-to-end.

AI-written summary · about

  1. 0:00Introduction
  2. 1:06Forth language choice
  3. 3:59Forth core concepts
  4. 6:50Forth stack in C++
  5. 9:00Stack memory management
  6. 10:50Stack wrappers with mixins
  7. 11:53Forth word dictionary
  8. 13:15Custom Forth words
  9. 14:20Forth interpreter architecture
  10. 16:49Coroutines in C++
  11. 20:05Cooperative multitasking
  12. 22:38Coroutine basics
  13. 26:08Coroutine lifecycle
  14. 31:28Cooperative fibers
  15. 33:35Minimal coroutine framework
  16. 36:04Chrono in coroutines
  17. 37:50Coroutine scheduler
  18. 38:55Coroutines in Forth
  19. 40:45C++20 ranges for tokens
  20. 44:22Token stream with ranges
  21. 46:35Modern C++ features
  22. 47:17Memory optimization with no_unique_address
  23. 49:50Bit manipulation
  24. 51:41Uninitialized objects
  25. 53:05Porting to embedded
  26. 55:37Key takeaways
  27. 57:07Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.