Hi, Here is the fourth document in the Principia Softwarica series: https://aryx.github.io/assets/pdfs/Windows-1.0.pdf It documents the full source code of rio, the Plan 9 windowing system.
It is in my opinion the most beautiful program in Plan 9 (and the best book in the series). rio itself is less than 6000 LOC! It is insanely small. Like I said in my talk, xterm alone is 80 000 LOC! and xterm is just a small compoment in the X window system. rio is the culmination of Plan 9; I think many things in Plan 9 were designed so that Rob Pike could write a windowing system in 6000 LOC :) rio is also an incredibly elegant concurrent program. You would learn a lot about concurrent programming by reading its code. rio is using many concurrent programming design pattern (worker pools, cooperative threads to avoid locks, channels of channels, etc.). Enjoy. Again feedbacks are welcome and so are pull requests on the project: https://github.com/aryx/principia-softwarica ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T4fec171fec7e3845-Mde1fcefee7173357475f85e4 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
