Maizure

maizure.org · Personal blog · on HN since 2017

Maizure walks through the source code of well-known programs like GNU coreutils, top, printf, and Linux context switching.

What HN saysHN commenters say they learned a lot from the code walkthroughs and praise the visual style and the printf and context switch posts.
45HN people shared it
19linked it in comments
32stories submitted
1.8Kstory points
8 months agolast shared
2017people per year2026

Most-shared posts

  1. 1
    Decoded: GNU coreutils (2019)
    13 people · 548 points · first shared 2019 · 38 comments on HN
  2. 2
    Decoded: GNU Coreutils
    4 people · 416 points · first shared 2019 · 55 comments on HN
  3. 3
    Evolution of the x86 context switch in Linux (2018)
    4 people · 193 points · first shared 2019 · 34 comments on HN
  4. 4
    Decoded: The 'Top' Utility (Procps)
    4 people · 8 points · first shared 2019 · discussion on HN
  5. 5
    Tearing apart printf()
    3 people · 383 points · first shared 2018 · 42 comments on HN
  6. 6
    Let’s Make: Dangerous Dave
    3 people · 147 points · first shared 2019 · 12 comments on HN
  7. 7
    Decoded: Altair Basic
    2 people · 8 points · first shared 2025 · discussion on HN
  8. 8
    Decoded Openttd
    2 people · 7 points · first shared 2019 · discussion on HN
  9. 9
    Decoded: OpenTTD
    2 people · 2 points · first shared 2020 · discussion on HN
  10. 10
    Evolution of the x86 context switch in Linux (2018)
    1 people · 46 points · first shared 2019 · 1 comments on HN
  11. 11
    Tearing Apart Printf()
    1 people · 4 points · first shared 2019 · discussion on HN
  12. 12
    Let’s Make: Traffic Department 2192
    1 people · 2 points · first shared 2019 · discussion on HN
  13. 13
    Decoded: The Bisqwit NES Emulator
    1 people · 2 points · first shared 2017 · discussion on HN
  14. 14
    MaiZure's Projects
    1 people · 2 points · first shared 2019 · discussion on HN
  15. 15

What HN people wrote when they linked it

bunnythefifth · 2022-01-12
I have learnt a lot from Maizure's blog. One of my early favorites: http://www.maizure.org/projects/printf/index.html
bogomipz · 2021-03-11
What a fantastic post! If the author is reading - please post more of these Linux "decoded" series. You have a great visual style and the content is wonderfully succinct. I highly recommend reading the "Decoded: The 'top' utility (procps)" post as well: http://maizure.org/projects/decoded-top-procps/index.html
gravitas · 2019-06-12
Fantastic (IMHO) read on the last paragraph's history and code movement: https://www.maizure.org/projects/evolution_x86_context_switch_linux/
jlokier · 2023-12-12
> It's quite a complex feature and yet I'm not sure any OS ever used it. They did. Linux used x86 hardware task switching and TR (task register) for years. See "struct tss_struct" and "switch_to" in older kernels. Linux also allowed userspace processes to get hardware-managed access to individual I/O ports using the per-task x86 I/O port bitmap, and to local segments using the x86 LDT which were useful for running 16-bit code in a 32-bit task. The hardware task switching was eventually changed to software task switching. By that time, software switching was faster, and it was always more versatile. This change removed the hardware-imposed limit on the number of processes and threads Linux could support. Here's a nice article about the evolution of task switching in Linux. https://www.maizure.org/projects/evolution_x86_context_switch_linux/
jmholla · 2023-09-09
I noticed at least one error, if the author is here. The short description on the shred page[0] is actually the description for csplit[1]. It should be something along the lines of "overwrite a file to hide its contents, and optionally delete it". [0]: https://maizure.org/projects/decoded-gnu-coreutils/shred.html [1]: https://maizure.org/projects/decoded-gnu-coreutils/csplit.html
version_five · 2023-09-08
Cool, I didn't know this existed. I think simple ones like `yes` can be very interesting just to see how the base code of a utility (that writes to stdout) is written. https://maizure.org/projects/decoded-gnu-coreutils/yes.html
Anthony-G · 2022-01-29
Thanks for sharing this perspective. A few years ago, I started learning C with the aim of contributing to GNU coreutils and other utilities that come with a GNU/Linux system. I read most of the K&R book and thought I had a decent grasp of the C language but when I cloned the coreutils source code, I couldn’t figure it out and gave up, thinking I’d need a lot more experience before I could understand production-quality code. It’s reassuring to find out it wasn’t just me that struggled with the complexity of the code base. Since then, I’ve discovered (thanks to Hacker News) Decoded: GNU coreutils¹, a “resource for novice programmers exploring the design of command-line utilities” but unfortunately, I no longer have the capacity or free time to spend on coding. ¹ https://www.maizure.org/projects/decoded-gnu-coreutils/index.html
scaraffe · 2021-12-06
If anyone else wants to do this as a learning exercise I found https://www.maizure.org/projects/decoded-gnu-coreutils/ which goes into design and code of most of the utilities from the original coreutils.
unrequited · 2021-03-09
Off topic - but this might of interest. http://maizure.org/projects/decoded-gnu-coreutils/
tyingq · 2021-02-02
"Since this is just a reverse version of cat, I called the program recat." Curious if you compared the end result with "tac". Source: https://github.com/coreutils/coreutils/blob/master/src/tac.c Walkthrough of how it works: http://www.maizure.org/projects/decoded-gnu-coreutils/tac.html
pixelbeat__ · 2019-08-03
The GNU coreutils timeout command encapsulates a lot of these issues. It's surprisingly difficult to handle all the edge cases and races. https://www.maizure.org/projects/decoded-gnu-coreutils/timeout.html
bshanks · 2019-07-04
If you like this, the author posts a number of other 'Decoded' episodes: https://www.maizure.org/projects/
yjftsjthsd-h · 2019-07-02
Yeah, `yes` ended up complex in order to get better performance; if you want something simpler, maybe try https://www.maizure.org/projects/decoded-gnu-coreutils/env.html ?
robocat · 2021-03-09
Your argument seems to imply that GNU was the progenitor of the utilities. A quick sample of the first 10 utilities from the first column of http://maizure.org/projects/decoded-gnu-coreutils/ on my machine showed 80% of the utilities were copied from existing sh utilities. Sure, GNU has added features, but there is nothing unseemly about creating new utilities using a different licence that are largely compatible - that is exactly how GNU coreutils came to life in the 90s. arch - GNU chgrp - Descended from chgrp introduced in Version 6 UNIX (1975) comm - Descended from comm in Version 2 UNIX (1972) dd - Descended from dd introduced in Version 5 UNIX (1974) du - Descended from du introduced in Version 1 UNIX (1971) factor - Descended from sort in Version 4 UNIX (1973) head - Descended from head included in System V (1985) join - Descended from join introduced in Version 7 UNIX (1979) ls - Spiritually linked with LISTF from CTSS (1963) mktemp - GNU
didizaja · 2021-01-09
Code Reading Club: https://codereading.club The idea of this project is to make a small, cozy kind of “book club for code” that enables club members to study and discuss the architecture/structure of open source code. I wanted it to be both a way to study others’ work as a means of developing more intuition about how to structure software, as well as a creative exploration and discussion of code as art. I know the UI is quite poor right now, and the information about the time of the first session needs to be updated. I’ve pivoted to working on another project (a CLI reader for HN that lets you navigate with a UI like that generated by pager utilities such as “more”) while I flesh out the idea for this one more, as I’m not sure if I can reconcile the two aims for the club I cited above. I have to think more carefully about what I want it to be, and who I want to reach/how I want to reach them. I really like the idea of doing this, but I just don’t have the mental/emotional bandwidth for it at the moment, which is why I’m working on other, more solitary projects instead. I think it’s important to have discipline and “grind” through things at times, but when I’m doing something in my free time for my own enjoyment and already feel a bit burned out from my other existing roles/responsibilities, I prefer not to add to it by actively building something that might create even more expectations from others. Instead, I try to get back to my first passion, which is just the joy of…
westurner · 2026-02-01
From what was their victim software derived? How much time did it take to write the letter? Is this the one with Noah Wylie? XEROX Alto (PARC ), 86DOS, CPM DOS, BASIC, Xerox Alto (1973) https://en.wikipedia.org/wiki/Xerox_Alto The Altair 8800 has an Intel 8080 CPU: Altair 8800: https://en.wikipedia.org/wiki/Altair_8800 Intel 8080 -> Intel 8088 CP/M (1974) https://en.wikipedia.org/wiki/CP/M DOS > History: https://en.wikipedia.org/wiki/DOS#History 86-DOS: https://en.wikipedia.org/wiki/86-DOS : > 86-DOS shared a few of its commands with other operating systems such as OS/8 and CP/M, which made it easy to port programs from the latter. Its application programming interface was very similar to that of CP/M. The system was licensed and then purchased by Microsoft and developed further as MS-DOS and PC DOS. [2] BASIC > History: https://en.wikipedia.org/wiki/BASIC_interpreter#History HP had BASIC on mainframes in the 1960s. This paper (ScholarlyArticle) was published in 1974: "A BASIC Language Interpreter for the Intel 8008 Microprocessor". ACM. (1974) from UIUC: University of Illinois Champagne-Urbana .. archive.org: https://archive.org/details/basiclanguageint658weav/page/n8/mode/1up .. scholar: https://scholar.google.com/scholar?hl=en&as_sdt=0%2C43&q=A+BAS… "What Bill Gates’ first commercial code (Altair BASIC) looks like under the hood" https://maizure.org/projects/decoded-altair-basic/index.html ..…

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close