Skip to content
HomeVideos
AllLongsCategoriesPlaylists
BooksBlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K

    CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”

    CppCon

    13 HN recommenders · recommended in 14 months, 2016–2024

    YouTube

    1:19:52 · 264K views · Sep 24, 2016

    Jason Turner's CppCon 2016 talk builds a simple Commodore 64 game using C++17, showing how constexpr and const let a modern compiler produce tight 6502 code. He walks through assembly output to show abstractions being optimized away.

    A perennial favorite, recommended as proof that expressive modern C++ can compile to efficient code even on tiny retro hardware.

    Software Engineering & LanguagesC, C++, Rust, Go & systems languagesDemoscene & retrocomputingCompilers, interpreters & program analysis
    1. 1:14:22
      CppCon 2017: Fedor Pikus “C++ atomics, from basic to advanced. What do they really do?”CppCon289K views • 9 years ago
    2. 17:13
      C++ Weekly - Ep 19 C++14 For The Commodore 64C++ Weekly With Jason Turner25K views • 10 years ago
    3. 1:33:12
      De-fragmenting C++: Making Exceptions and RTTI More Affordable and Usable - Herb Sutter CppCon 2019CppCon90K views • 7 years ago
    4. 1:00:58
      CppCon 2017: Chandler Carruth “Going Nowhere Faster”CppCon113K views • 9 years ago
    5. 1:24:36
      C++ Exceptions for Smaller Firmware - Khalil Estell - CppCon 2024CppCon23K views • 1 year ago
    6. 1:17:12
      C++ Seasoningaghuttun58K views • 13 years ago
    7. 1:12:27
      CppCon 2015: Andrei Alexandrescu “std::allocator...”CppCon196K views • 11 years ago
    8. 1:15:46
      CppCon 2017: Matt Godbolt “What Has My Compiler Done for Me Lately? Unbolting the Compiler's Lid”CppCon178K views • 9 years ago
    9. 1:00:17
      Stephan T. Lavavej “Floating-Point <charconv>: Making Your Code 10x Faster With C++17's Final Boss”CppCon41K views • 7 years ago
    10. 1:04:33
      CppCon 2014: Jeff Preshing "How Ubisoft Develops Games for Multicore - Before and After C++11"CppCon53K views • 12 years ago
    11. 1:54:00
      Can C++ be 10x Simpler & Safer? - Herb Sutter - CppCon 2022CppCon277K views • 3 years ago
    12. 1:27:46
      CppCon 2014: Mike Acton "Data-Oriented Design and C++"CppCon863K views • 12 years ago
    13. 1:29:06
      CppCon 2015: Herb Sutter "Writing Good C++14... By Default"CppCon193K views • 11 years ago
    14. 59:53
      CppCon 2019: Chandler Carruth “There Are No Zero-cost Abstractions”CppCon147K views • 7 years ago
    15. 1:39:25
      CppCon 2016: Herb Sutter “Leak-Freedom in C++... By Default.”CppCon149K views • 10 years ago
    16. 1:40:27
      CppCon 2014: Herb Sutter "Back to the Basics! Essentials of Modern C++ Style"CppCon323K views • 12 years ago
    17. 1:29:54
      CppCon 2015: Chandler Carruth "Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!"CppCon188K views • 11 years ago
    18. 1:36:27
      CppCon 2016: Dan Saks “extern c: Talking to C Programmers about C++”CppCon175K views • 10 years ago
    19. 1:13:41
      CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"CppCon235K views • 12 years ago
    20. 1:00:07
      CppCon 2017: Carl Cook “When a Microsecond Is an Eternity: High Performance Trading Systems in C++”CppCon358K views • 9 years ago

    20 comments from Hacker News

    1. @MereInterestFeb 2017· in “C++ on Embedded Systems”

      Absolutely. There was a fantastic talk at CppCon last year, using C++17 to program a game for the Commodore 64. Using standard C++ idioms, the optimizer was easily able to make it compile down to efficient machine code. [1] this video

      Strongly recommendsView on HN
    2. @dmitOct 2016· in “Twenty years later I wrote a Tetris again”

      For those who haven't seen it, there is a wonderful talk by Jason Turner about writing a simple Pong clone for the Commodore 64 in modern C++: this video

      Strongly recommendsView on HN
    3. @sqeakyJan 2017· in “Add a const here, delete a const there”

      I think this way of looking at it old. Even if the const-ness is somehow subverted without generating an error then most compilers (or at least GCC and Clang) will presume the code is compliant and make optimizations following what the standard allows. This potentially results in undefined behavior when that pointer you mentioned is used to modified a thing that ought to be const. Consider the amount of optimizations seen in the video from CppCon 2016: this video Jason Turner, the presenter, is writing code a few lines at a time and cross compiling for the Commodore 64. He shows his assembly at many steps of the way and shows how many functions are completely elided when const (and later constexpr) are used correctly. There are a ton of other good talks from CppCon 2016 including one about const and what optimizations it makes possible and several about how compilers are more willing to "break" code that is non-compliant by making its behavior undefined. None of it really shocking or new, unless you have been writing to one compiler implementation instead of to the standard.

      RecommendsView on HN
    4. @einpoklumMay 2022· in “Common libraries and data structures for C”

      > Nor does it have any concern for the elegance of its design. It has a lot of inelegant facilities, which, when used under the hood, allow you to express your elegant abstractions. > Hence the common practice of using a small subset C++ and pretending it's just C with Extras. That's mostly failure to use C++. Since C++11, and especially with later updates to the standard, idiomatic C++ is very different from C - even if you're not using a lot of the standard library. I'll link to a talk already linked-to in another comment in this discussion: Rich code for tiny computers / Jason Turner, CppCon 2016 this video

      RecommendsView on HN
    5. @dhsysusbsjsiApr 2020· in “I translated a simple C program to x86_64 and it was slower”

      This talk proves this point exactly: this video Watch from 27:00 where he talks about using const wherever possible so the compiler can optimise. It reduces a full function call to work out a colour in 3D space from thousands of instructions to one. After watching this and a few others particularly dynamic dispatch in Swift, I find myself adding as many hints as I can and applying the most restrictions / scoping possible. Final, const, Private etc. [LINK] Even though actually it can work this out in your module!

      RecommendsView on HN