{"id":8736,"date":"2020-03-18T12:00:22","date_gmt":"2020-03-18T16:00:22","guid":{"rendered":"https:\/\/irreal.org\/blog\/?p=8736"},"modified":"2020-03-18T12:00:22","modified_gmt":"2020-03-18T16:00:22","slug":"surprising-unix-programs","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=8736","title":{"rendered":"Surprising Unix Programs"},"content":{"rendered":"<p>Doug McIlroy has another <a href=\"https:\/\/minnie.tuhs.org\/pipermail\/tuhs\/2020-March\/020664.html\">interesting post on TUHS<\/a>. This time it\u2019s about Unix programs that he found surprising. Many of the programs have been replaced by updated tools and are no longer used by most people but they all offer something surprising. Very often, the surprise is the novel application of theory to a seemingly \u201csimple\u201d problem.<\/p>\n<p>For example, <code>dc<\/code> is the Unix Desk Calculator, a Reverse Polish Notation calculator that featured arbitrary precision arithmetic. At each step, <code>dc<\/code> performed a backward error analysis to determine the precision needed to achieve the end precision requested by the user. McIlroy says that to this day he haven\u2019t seen another program that does that.<\/p>\n<p>Another surprise is <code>typo<\/code>, a sort of primitive spell checker that ranked words based on their similarity to other words in the document. The idea wasn\u2019t really to serve as a spell checker but to catch typos. The program worked by counting trigram frequencies but the memory on the first Unix machines was so limited that <code>typo<\/code> used a probabilistic method to update the 1 byte counters to account for large counts. Rob Pike says that <a href=\"https:\/\/minnie.tuhs.org\/pipermail\/tuhs\/2020-March\/020676.html\">typo was written so close to the machine that he couldn\u2019t port it to newer machines<\/a> and had to rewrite it in Go.<\/p>\n<p>There are some other gems in McIlroy\u2019s list so take a look. A final surprise is that many of these programs were written by women. That wouldn\u2019t occasion much comment today but back when these programs were written, women were much rarer in our industry.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Doug McIlroy has another interesting post on TUHS. This time it\u2019s about Unix programs that he found surprising. Many of the programs have been replaced by updated tools and are no longer used by most people but they all offer &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=8736\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[36],"class_list":["post-8736","post","type-post","status-publish","format-standard","hentry","category-general","tag-unix"],"_links":{"self":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8736","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8736"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8736\/revisions"}],"predecessor-version":[{"id":8737,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8736\/revisions\/8737"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}