Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
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
    S

    Stephen Brennan

    brennan.io · Personal blog · on HN since 2016

    Stephen Brennan writes programming tutorials and essays on C, shells, system calls, Meson, Git, and operating systems.

    Visit blogRSSHN submissions
    Systems & PerformanceProgrammingOpen Source & Linux
    What HN says

    HN commenters cite his tutorial on writing a shell in C as a great, simple read. They also point to his Meson post and call his educational approach valuable.

    Stats for nerds
    37HN people shared it
    56linked in comments
    2.3Kstory points
    Mar 2024last shared
    2016people per year2024

    Top posts on HN

    1. 1
      Write a Shell in C (2015)
      11 people · 874 points · first shared 2016 · 80 comments on HN
    2. 2
      Implementing simple cooperative threads in C
      1 person · 304 points · first shared 2020 · 86 comments on HN
    3. 3
      Tutorial – Write a System Call
      10 people · 276 points · first shared 2016 · 16 comments on HN
    4. 4
      When it comes to Git history, less is more
      3 people · 257 points · first shared 2021 · 122 comments on HN
    5. 5
      Linked Lists Are Still Hard
      2 people · 184 points · first shared 2017 · 133 comments on HN
    6. 6
      Stack Overflow Users Rejoice as Pattern Matching Is Added to Python
      2 people · 129 points · first shared 2021 · 20 comments on HN
    7. 7
      Visualizing Gzip Compression with Python
      1 person · 79 points · first shared 2020 · 6 comments on HN
    8. 8
      Fare Hacking on BART
      1 person · 46 points · first shared 2016 · 51 comments on HN
    9. 9
      Embracing Modularity with Meson
      4 people · 36 points · first shared 2020 · 5 comments on HN
    10. 10
      Space Cadet Pinball on Linux
      1 person · 34 points · first shared 2026 · 3 comments on HN

    What HN people wrote when they linked it

    • FRexApr 2018

      It's very educational to dig into stuff that everyone takes for granted or even try implement your own version that does similar things (at a smaller scale and with less features, performance and security of course, just for educational purposes, not to serve as a real replacement).

      E.g. writing your own shell sounds hard but you can do it in an hour (of course it'd be very bare compared to even ash), I once did it during a very casual C class while trying to impress the teacher. He even joked it was self hosting when he has seen the end result (as in - I didn't need other shells anymore and could use vim and gcc from my shell so I could use my shell to work on my shell). I wanted to put that into tutorial at some point but there already exists one[0] (that blog seems quite tinker-y actually, it has implementing own Linux sys call too, which is also surprisingly easy to do and I did it for a class at one point too[1]).

      Going knee deep into this stuff also completely dispels the magic that language and system runtimes, filesystems, file formats, linkers, shells, standard commands (e.g. ls, I had to reimplement it once as a homework) or whatever have, or even better - it's still magic to most people and you're the wizard now! It's also very accomplishing to do something so unique in an hour or two (although to me due to my C and C++ bias at some point making a pastebin clone in an hour in PHP or Python became an unique experience).

      Even JIT (which sounds scary due to V8,…

    • anintegerMar 2024

      I've always preferred Stephen Brennan's approach mentioned here: https://brennan.io/2020/05/08/meson/

      This is the approach I take with my C and C++ projects, although I've swapped meson out for CMake. I still have my CMake projects generate pkg-config files as well so that I don't force CMake on any consuming projects (just because I suffered with CMake doesn't mean you have to, although you can as well :))

    • warriorkittyNov 2016

      I decided to read ep1[0] too and I saw a picture "use all the memory". I don't know if it's funnier that I checked if you have an "alt" HTML tag or that you actually wrote the text from the picture. People with alt tags are MVPs. :)

      [0] - https://brennan.io/2016/10/13/kernel-dev-ep1/

    • woodrowbarlowSep 2017

      stephen brennan wrote a great article [1] on how to write a shell in C. it's a little more simply than DAS' implementation, but it's a fantastic read.

      [1] https://brennan.io/2015/01/16/write-a-shell-in-c/

    • vmateixeiraJul 2016

      Hope this can help [1]. Otherwise, if you just want an API wrapped up with python [2].

      [1] http://brennan.io/2015/01/16/write-a-shell-in-c/

      [2] http://www.ibm.com/developerworks/aix/library/au-pythocli/

    Related

    Chris Wellonsnullprogram.com295 people

    Why Aren't There C Conferences?

    Chris Wellons
    Personal · last shared 2026
    Chris Siebenmannutcc.utoronto.ca/~cks388 people

    Go is Google's language, not ours

    Chris Siebenmann
    Personal · last shared 2026
    Ksplice Blogblog.ksplice.com30 people

    I want to compile a C program so simple I can explain all of the assembly

    Ksplice Blog
    Company · last shared 2011
    Beejbeej.us233 people

    Beej's Guide to Git

    Beej
    Personal · last shared 2026
    Stephen Clearyblog.stephencleary.com29 people

    There is no thread (2013)

    Stephen Cleary
    Personal · last shared 2025
    Unixwizunixwiz.net77 people

    So you want to be a consultant?

    Unixwiz
    Personal · last shared 2026
    Stephen Diehlstephendiehl.com209 people

    What I Wish I Knew When Learning Haskell

    Stephen Diehl
    Personal · last shared 2026
    Coding Confessionsblog.codingconfessions.com34 people

    How simultaneous multithreading works under the hood

    Coding Confessions
    Personal · last shared 2026