Greg Lehey
lemis.com · Personal blog · on HN since 2008
Greg Lehey, a longtime BSD developer who hosts Unix history documents, the Lions Commentary and writing on porting software.
What HN saysHN links it for the Lions' Commentary on UNIX 6th Edition, the ancient Unix source license, and the history of the BSD daemon logo.
40HN people shared it
19linked it in comments
26stories submitted
353story points
10 months agolast shared
2008people per year2026
Most-shared posts
- 1Commentary on the Sixth Edition Unix Operating System12 people · 21 points · first shared 2011 · 1 comments on HN
- 2A Commentary on the Sixth Edition of the Unix Operating System (1977)10 people · 101 points · first shared 2010 · 19 comments on HN
- 3A Commentary on the Unix Operating System (Version 6, UNSW '77) [pdf]4 people · 4 points · first shared 2010 · 2 comments on HN
- 4Greg 'Groggy' Lehey's daily diary3 people · 3 points · first shared 2010 · discussion on HN
- 5Ancient source all.pdf2 people · first shared 2023
- 6Hacking ls -l1 people · 199 points · first shared 2012 · 88 comments on HN
- 7Lisp's 'car' doesn't mean 'Contents of the Address Register', as many think1 people · 13 points · first shared 2009 · 3 comments on HN
- 8Porting Unix Software (2005)1 people · 3 points · first shared 2019 · discussion on HN
- 9Cups1 people · 2 points · first shared 2020 · discussion on HN
- 10How the Internet will be different 20 years from now, in 20341 people · 2 points · first shared 2014 · discussion on HN
- 11Why Backslashes are not Slashes1 people · 2 points · first shared 2013 · discussion on HN
- 12No fun any more1 people · 2 points · first shared 2011 · discussion on HN
- 13The term “hacker”1 people · 1 points · first shared 2008 · discussion on HN
- 14Whyadaemon1 people · first shared 2024
- 15UNIX1 people · first shared 2020
What HN people wrote when they linked it
inopinatus · 2024-01-17
Greg Lehey records some relevant history of the daemon logo prior to Lasseter's cover (along with a classic daemon t-shirt story) at http://www.lemis.com/grog/whyadaemon.html.
chauhankiran · 2017-03-06
I have not completely read yet but one of my favorite is : Lions' Commentary on UNIX 6th Edition, with Source Code[0]
[0]. http://www.lemis.com/grog/Documentation/Lions/
walterbell · 2015-05-27
(1) Lions on Unix (PDF and source), http://www.lemis.com/grog/Documentation/Lions/index.php
http://en.wikipedia.org/wiki/Lions%27_Commentary_on_UNIX_6th_Edition,_…
"Lions' Commentary on UNIX 6th Edition, with Source Code by John Lions (1976) contains the complete source code of the 6th Edition Unix kernel plus a commentary. It is commonly referred to as the Lions book. Despite its age, it is still considered an excellent commentary on simple but high quality code."
(2) Harper's dictionary of classical literature and antiquities (1898), 1750 pages, https://archive.org/details/harpersdictiona00peckgoog
(3) Oxford English Dictionary (1888), 15000 searchable page scans in a Windows app, https://archive.org/details/oed11_201407
spijdar · 2026-01-02
If your argument is that Caldera might not actually have the rights to UNIX in the first place to grant the license, that's fair.
But the license they provided (http://www.lemis.com/grog/UNIX/ancient-source-all.pdf) explicitly names versions 1, 2, 3, 4, 5, 6, and 7 of UNIX for the 16-bit PDP-11. Yes, these versions originated at AT&T (Bell Labs) but are distinct legally from SysIII and SysV UNIX, also from AT&T, which are explicitly not covered by the Caldera license.
dang · 2024-10-04
Ok, we've changed to that from http://www.lemis.com/grog/Documentation/Lions/book.pdf above. Thanks!
warpech · 2024-10-03
I was very curious how come there is a PDF from 1977. Apparently it is built from these source files: http://www.lemis.com/grog/Documentation/Lions/index.php
A fork on GitHub: https://github.com/kanner/lions-book
rob · 2023-05-10
I don't know how popular he is here, but if you're familiar with FreeBSD, Greg Lehey ("groggy") is still updating his diary daily:
http://www.lemis.com/grog/diary.php
His first 'entries' started way back in 1957 (on paper):
http://www.lemis.com/grog/diary-about.php#index
I find myself coming to it and reading it randomly from time to time.
chungy · 2023-02-05
> after all of that SCO nonsense, I don't know what the copyright/license status of ancient Unix is.
It's under a BSD-style license: http://www.lemis.com/grog/UNIX/ancient-source-all.pdf
LukeShu · 2020-08-17
The Version 6 (7?) UNIX code that BSD is based on was re-licensed to a 4-clause BSD license in 2002.
http://www.lemis.com/grog/UNIX/
johnchristopher · 2020-07-04
Eh http://www.lemis.com/grog/recipes/measures.php#cups ^^ (didn't bring much traction when posted :( https://news.ycombinator.com/item?id=23634019 )
rst · 2019-02-22
Of possible (mostly historical) interest at this point, a similar commentary on a fairly early version of the original Unix kernel, by an Australian cs prof named John Lions -- which was very widely circulated among CS students in the '80s, despite this being technically in violation of AT&T's copyright on the book.
It's availble online here:
http://www.lemis.com/grog/Documentation/Lions/index.php
Note that the code is written in a very archaic dialect of C, and for hardware that didn't support paging in any form (just swapping). Nevertheless, it was an important introduction for a lot of people at the time, not just to the basics of OS implementation details, but also, how to find your way around a nontrivial sized codebase.
neuland · 2018-02-27
Is there any material around still from the USENIX course that went through UNIX line by line?
It looks like the Lions commentary also does that to a certain extent as well. There's even a version of the book online [0].
[0] http://www.lemis.com/grog/Documentation/Lions/index.php
AimHere · 2017-10-06
As well as Minix, which is intended as just such a teaching aid and comes with a textbook, there's the Lions book, which is a complete annotated source listing of an early Unix, and which was passed around as nerd Samizdat for a while, until the Unix copyright status was changed.
http://www.lemis.com/grog/Documentation/Lions/index.php
theoh · 2015-09-11
Lions' Commentary on 6th Edition Unix is a later document in the same spirit. It has been posted here before but failed to gain any traction.
http://www.lemis.com/grog/Documentation/Lions/
Animats · 2014-10-13
Yes, there is.
John Lion's "A commentary on the Sixth Edition UNIX Operating System", goes through the PDP-11 UNIX kernel line by line.
http://www.lemis.com/grog/Documentation/Lions/book.pdf
Page 37, Section 7.13, "newproc":
1906: Call "xswap" (4368) to copy the data segments into the disk swap area. Because the second parameter is zero, the main memory area will not be released.
1907: Mark the new process as "swapped out".
1908: Return the current process to its normal state.
aqrashik · 2014-08-21
Lions' Commentary on UNIX' 6th Edition
http://www.lemis.com/grog/Documentation/Lions/
secure · 2012-10-13
In case anyone wonders, I recently looked into how locales work with respect to LANG, LC_ALL and LC_*:
http://c.i3wm.org/6799926
By the way, by looking at http://www.lemis.com/grog/index.php you can see that the author uses FreeBSD, just in case you were wondering about /usr/src
ludwigvan · 2010-11-18
This led me to the already mentioned APUE book, written by Stevens. I was saddened by his loss at a yound age of 48. http://www.salon.com/technology/feature/2000/09/01/rich_stevens
That article led me to this:
http://www.salon.com/technology/feature/1999/11/30/lions/index.html which is another fantastic read.
You can read about Lions' efforts here: Lions' Commentary on UNIX 6th Edition, with Source Code http://en.wikipedia.org/wiki/Lions_Commentary_on_UNIX_6th_Edition,_wit…
http://tinyurl.com/2k9rwr (If the link above doesn't work)
The commentary is available as a PDF file here: http://www.lemis.com/grog/Documentation/Lions/book.pdf
black_knight · 2015-04-29
Emacs is the only officially supported interactive Agda environment, as other people have noted.
However, I have written a lot of Agda code in other editors (acme and vim). It is certainly feasable to do! In fact I find that it improves my code quality not to use the interactive features. When in interactive mode, I blindly chase the goal trying to get the correct type, and often end up going long detours. When I am on my own I get a better overview of the situation, and can often see the shortest path.
That said, I wish they would continue to support agda interactive mode on the command line, as it is nice to be able to evaluate expressions in context of a hole.
Writing unicode is a breeze with XCompose, in any UTF8-enabled editor. I found a nice XCompose file based on the Plan 9 keyboard file, by Pmarin. It can be downloaded from «Greg 'Groggy' Lehey»'s site:
http://www.lemis.com/grog/programs/XCompose