User Tools

Site Tools


anecdotes:not_expected_to_understand_this

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
anecdotes:not_expected_to_understand_this [2016/01/12 10:31]
wkt created
anecdotes:not_expected_to_understand_this [2016/01/23 10:38] (current)
wkt
Line 1: Line 1:
 ===== /* You are not expected to understand this */ ===== ===== /* You are not expected to understand this */ =====
 +
 +(taken from Dennis Ritchie'​s [[https://​www.bell-labs.com/​usr/​dmr/​www/​odd.html|home page]])
  
 Every now and then on Usenet or elsewhere I run across a reference to a certain comment in the source code of the Sixth Edition Unix operating system. Every now and then on Usenet or elsewhere I run across a reference to a certain comment in the source code of the Sixth Edition Unix operating system.
Line 9: Line 11:
 It's often quoted as a slur on the quantity or quality of the comments in the Bell Labs research releases of Unix. Not an unfair observation in general, I fear, but in this case unjustified. The actual code and other commentary surrounding it were precisely this: It's often quoted as a slur on the quantity or quality of the comments in the Bell Labs research releases of Unix. Not an unfair observation in general, I fear, but in this case unjustified. The actual code and other commentary surrounding it were precisely this:
  
-<​code>​'' ​/*+<​code>​ 
 +    ​/*
      * Switch to stack of the new process and set up      * Switch to stack of the new process and set up
      * his segmentation registers.      * his segmentation registers.
Line 26: Line 29:
      */      */
     if(rp->​p_flag&​SSWAP) {     if(rp->​p_flag&​SSWAP) {
-   rp->​p_flag =& ~SSWAP;+        ​rp->​p_flag =& ~SSWAP;
         aretu(u.u_ssav);​         aretu(u.u_ssav);​
     }     }
Line 34: Line 37:
      */      */
     return(1);     return(1);
- ''​ 
 </​code>​ </​code>​
 +
 So we tried to explain what was going on. "You are not expected to understand this" was intended as a remark in the spirit of "This won't be on the exam," rather than as an impudent challenge. So we tried to explain what was going on. "You are not expected to understand this" was intended as a remark in the spirit of "This won't be on the exam," rather than as an impudent challenge.
  
Line 41: Line 44:
  
 So, for Steve Johnson and me, trying to move the kernel for the first time to a new machine, this code was indeed on the exam. It took about a week of agonizing before we finally convinced each other that the mechanism was wrong and no fiddling with the compiler was useful. We redid the coroutine control-passing primitives altogether, and this code section, and the comment, passed into history. So, for Steve Johnson and me, trying to move the kernel for the first time to a new machine, this code was indeed on the exam. It took about a week of agonizing before we finally convinced each other that the mechanism was wrong and no fiddling with the compiler was useful. We redid the coroutine control-passing primitives altogether, and this code section, and the comment, passed into history.
 +
 +Also see [[https://​www.youtube.com/​watch?​v=uxtKwJZbYr0|Brian Kernighan'​s tribute to Dennis Ritchie]] video around the 4:20 mark.
  
anecdotes/not_expected_to_understand_this.1452555077.txt.gz · Last modified: 2016/01/12 10:31 by wkt