Hacker News new | comments | show | ask | jobs | submit login
Today in History, Brought to You by Unix (akr.am)
80 points by thefilmore 39 days ago | hide | past | web | favorite | 19 comments



If you like Calendar, you might like Fortune. It's usually in the "bsdgames" package (https://www.polyomino.org.uk/computer/software/bsd-games/). You can add it to your bashrc file to see a new fortune each time you open your shell.

  ~$ fortune
  Overload -- core meltdown sequence initiated.
  ~$ fortune
  Politicians are the same all over.  They promise to build a bridge even
  where there is no river.
          -- Nikita Khrushchev
  ~$ fortune
  Distress, n.:
          A disease incurred by exposure to the prosperity of a friend.
                  -- Ambrose Bierce, "The Devil's Dictionary"
  ~$ fortune
  The Preacher, the Politician, the Teacher,
          Were each of them once a kiddie.
  A child, indeed, is a wonderful creature.
          Do I want one?  God Forbiddie!
                  -- Ogden Nash


Add a little fun to that by letting a cow tell your fortune with cowsay[1].

fortune | cowsay

[1] https://en.wikipedia.org/wiki/Cowsay


Or try http://github.com/globalcitizen/taoup for a more unix/software design focused fortune database in an implementation that supports color. Interoperable if you are an efficiency die-hard with a color blindness problem.


on Ubuntu it was through fortune-mod

Also there are some pretty funny jokes in here.


I think the coolest part of this was looking at the shell script for /usr/bin/calendar. It's personally gratifying to know that even the UNIX guys wrote scripts that shellcheck.net would crap all over:

https://imgur.com/o4gCthk


Oh cool!

$ calendar

Sep 13* Rosh Chodesh Tishrei (Beginning of the month of Tishrei)

Sep 13* First Day of Rosh Hashanah (Jewish New Year; 5768; sabbatical)

Sep 13 Barry Day commemorates the death of Commodore John Barry, USA

Sep 13 Chiang Kai-Shek becomes president of China, 1943

Sep 13 Building of Hadrian's Wall begun, 122

Sep 13 British defeat the French at Abraham near Quebec City, 1788

Sep 13 58� C (136.4� F) measured at el Azizia, Libya, 1922

Sep 13 Walter Reed born, 1851

Sep 14 Francis Scott Key writes words to "Star Spangled Banner", 1814

Sep 14* Rosh Hashanah (sabbatical)

Sep 14 Battle of San Jacinto in Nicaragua

Sep 14 Frodo & Bilbo's birthday

Sep 14 The US Selective Service Act establishes the first peacetime draft, 1940

Sep 14 Salem, Massachusetts, is founded, 1629

Sep 14 Benjamin Franklin is sent to France as an American minister, 1778


Has anyone tried altering this to use the Wikipedia data? eg. https://en.wikipedia.org/wiki/September_13

The most appropriate sections seem to be Events and Holidays and Observances. There are also links to parallel daily databases by the BBC and New York Times.


It comes in the base of OpenBSD, and I use it in lieu of a calDAV server. Being able to quickly jot down an appointment and recall it on the command line is hecka useful.


Why anyone would bother using UNIX or its inferior clones (eg. Windows NT) in 2018 is beyond me.

The year of the Linux desktop already has been and gone, back in 2001.

We are spoiled for choice with a variety of free, modern, microkernel based desktop OS's written in safe languages, such as Rust, Golang, Haskell and Java. Why people persist with this monolithic, unsafe, ancient artifact of the early days of computing is anyone's guess.


It's not on my macOS, though I am on 10.12. If it's on macOS now, it means they've added it in the past couple of years which would be interesting.

(Edit: Seems like it might just be me :-D)


You have to run the commands making the calendar directory and file first.


Here on 10.4 :-) Man page: "A calendar command appeared in Version 7 AT&T UNIX." Last line says "BSD June 13, 2002."


Strange. I'm on 10.12 too, but I have it.


It's present on 10.12.6 here, and also 10.6.8, so it doesn't seem to be new.


I have it on High Sierra (10.13)


I would not have thought of using cpp(1) like that. I will be using calendar fron now on. Thanks for the tip.


super neat,

anyone know of a way to search through the history using less or other?


You might have the underlying data files in /usr/share/calendar or elsewhere; you can try to find out with

  strace -f -e open calendar
Alternatively, you can get a full year's worth of output with

  calendar -l 366


oh awesome thanks! seems calendar folder for me is in /usr/share/calendar/[files here]




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: