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

    Peter Munch-Ellingsen: Why I wrote my own keyboard firmware in Nim (NimConf 2021)

    Nim Programming Language

    1 HN recommender · recommended in 3 months, 2021–2024

    YouTube

    37:40 · 3.4K views · Jun 26, 2021

    Peter Munch-Ellingsen explains at NimConf 2021 why he wrote his own keyboard firmware in Nim instead of using QMK or Arduino. He shows that the resulting firmware is very small.

    Pointed to as a real-world example of Nim in embedded work, mostly by the author himself.

    Hardware & ElectronicsEmbedded systems & DIY electronicsC, C++, Rust, Go & systems languages
    1. 44:50
      My personal fight against the modern laptoplinux conf au 2017 - Hobart, Australia121K views • 9 years ago
    2. 1:24:36
      C++ Exceptions for Smaller Firmware - Khalil Estell - CppCon 2024CppCon23K views • 1 year ago
    3. 35:41
      clojure.core/typing - Matt AderethClojureTV40K views • 10 years ago
    4. 1:19:52
      CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”CppCon264K views • 10 years ago
    5. 59:48
      The Road to Zig 1.0 - Andrew KelleyChariotSolutions168K views • 7 years ago
    6. 1:02:49
      Hacking with Andrew and Brad: tip.golang.orgThe Go Programming Language99K views • 11 years ago
    7. 1:22:21
      Introducing a Memory-Safe Successor Language in Large C++ Code Bases - John McCall - CppNow 2023CppNow18K views • 3 years ago
    8. 41:04
      Design Your Own Keyboard!Ben Vallack140K views • 4 years ago
    9. 30:12
      Casey Muratori | Smart-Pointers, RAII, ZII? Becoming an N+2 programmerxDahl163K views • 2 years ago
    10. 1:13:11
      Zig 2026: No-AI Policy, $670K Foundation, Left GitHub & Why Zig Isn’t 1.0 - Andrew Kelley ExplainsJetBrains982K views • 5 months ago
    11. 54:14
      Zig: A programming language designed for robustness, optimality, and clarity –  Andrew KelleyRecurse Center75K views • 8 years ago
    12. 1:36:27
      CppCon 2016: Dan Saks “extern c: Talking to C Programmers about C++”CppCon175K views • 10 years ago
    13. 1:54:00
      Can C++ be 10x Simpler & Safer? - Herb Sutter - CppCon 2022CppCon277K views • 3 years ago
    14. 12:31
      OSCON 2010: Rob Pike, "Public Static Void"O'Reilly119K views • 16 years ago
    15. 40:56
      "Liberating the Smalltalk lurking in C and Unix" by Stephen KellStrange Loop Conference25K views • 12 years ago
    16. 22:17
      WWDC24: Go small with Embedded Swift | AppleApple Developer138K views • 2 years ago
    17. 32:24
      RustLatam 2019 - Without Boats: Zero-Cost Async IORust Programming Language55K views • 7 years ago
    18. 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
    19. 23:57
      GopherCon 2016: The Design of the Go Assembler - Rob PikeGopher Academy116K views • 10 years ago
    20. 17:15
      The Art of the Bodge: How I Made The Emoji KeyboardTom Scott3.5M views • 11 years ago

    4 comments from Hacker News

    1. @pure_simplicityNov 2021· in “Show HN: Prometeo – a Python-to-C transpiler for high-performance computing”

      Well, you give yourself a whole lot of extra work by attempting to create a Python to C transpiler, basically creating an even less mature and less popular language ecosystem than Nim has, when you could use Nim and get most of the benefits (statically typed, compiled to C) out of the box and enjoy their growing ecosystem. It seems that Prometeo is currently more limited than Nim. Maybe I'm not understanding your use case well enough and maybe your approach is actually a locally optimal solution, and I honestly greatly respect your effort and want to see your project succeed, cuz I love Python too. I even wanted to make a faster python myself at some point. Just, the more I learn about Nim, the more I appreciate its design decisions and think to myself: this is the faster version of python I'm looking for. Now, we just need the large package ecosystem that python has, but I'm willing to both wait and participate in making it come about. This presentation about writing keyboard firmware in Nim may be helpful, if you're willing to give Nim some more consideration: this video There is also another talk about embedded programming in Nim from the same conference, here: [LINK]

      RecommendsView on HN
    2. @PMunchOct 2021· in “Nim 1.6”

      Nim works super well for embedded. The thing is that you can turn off the garbage collector and do manual memory allocation if you want to. Or simply use ARC which works a treat on embedded. I wrote my own keyboard firmware in Nim (and did a presentation of it during NimConf 2021: this video ). It runs super fast and the code size is smaller than some simple "Hello world" level programs using the Arduino system. As for gamedev the ability to tune the GC by turning off automatic collection and then running it with a time-limit is perfect for preventing lag-spikes when a lot of stuff is going on (looking at you Java..). Nim actually performs very well, and the garbage collector does a great job of just getting out of the way and letting your programs fly. Your point about shell-scripting is kind of valid, it is indeed a weakly typed world. But with how fast Nim compiles the edit-test cycle feels as fast as Python, and you save a lot of time from having a silly typo that you only encounter after having run your script for a little while. The reason why Nim is good for pretty much anything is that the speed of the compiler and the garbage collection will rarely if ever stand in your way, and the flexibility of the syntax that stems from meta-programming allows it to be molded perfectly to the use-case.

      CitesView on HN
    3. @archargelodOct 2024· in “Embedded Rust in Production?”

      I don't have any first-hand experience with embedded myself, but I've seen positive comments on different forums about using Nim in production for embedded devices. For example, see a couple pages of comments by girvo [1]. Also there's a video on writing keyboard driver in Nim [2]. [1] - [LINK] [2] - this video

      CitesView on HN
    4. @PMunchOct 2021· in “Nim 1.6”

      Oh it definitely can run on those devices! I wrote my own keyboard firmware from scratch in Nim, and the firmware sizes are vanishingly small compared to even simple "hello world" level stuff in Arduino. I did a talk on it for NimConf2021: this video

      CitesView on HN