Computer Programmer: "Happy Holidays"

archtech from #dwoo just gave me an interesting idea, so I figured I'd share it with any of you who're bored enough to be here. How does a computer programmer say Merry Christmas, Happy Chanuka, Good Quanza, or whatever?

PHP

$ cat happy_holidays.php
#!/usr/bin/php
<?php
include 'religions.inc';
include 'lang.inc';
foreach ($religions as $religion)
 if (array_key_exists($religion,$lang))
  if (array_key_exists('happy_holidays',$lang[$religion]))
   echo $lang[$religion]['happy_holidays']."\n";
?>
  

EMACS

for each language: "Merry EMACSmas!"
  

VI

English only: "What's a holiday?"
  

ED

$ ed
Merry Christmas!
?
Happy Chanuka!
?
Good Quanza?
?
Never mind :-(
?
quit
?
exit
?
help
?
^D^D
$ logout
  

UNIX merry_christmas

$ cat merry_christmas.c
#include <stdio.h>
int main (void) { printf("Merry Christmas!\n"); }
  

GNU Happy Holidays

$ wc -l happy_holidays.c
99999999 happy_holidays.c
$ head -n 30 happy_holidays.c
/* Give everybody his favorite season's greeting in his favorite language.
   Copyright (C) 1986-1993, 1995, 1998-2002, 2006 Free Software Foundation, Inc.

   This program is free software: you can redistribute it and-or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

/* Differences from the Unix merry_christmas:
   * Isn't restricted to Christmas - supports all known (and unknown) holidays.
   * Automatically deduces your language from locale settings (-l overrides).
   * Uses the masculine form when -m is given.
   * Uses the feminine form when -f is given (default).
   * Uses the singular form when -s is given (default).
   * Uses the plural form when -p is given.
   * Uses the familiar mode when --familiar is given.
   * Uses the formal mode when --formal is given (default).
   * Allows setting the religion with -r (default: -r christian).
   * Allows setting the date to look from with -d (default: now).
   * Allows setting the timezone with --timezone (default: TZ environment var).
   * Allows setting the holiday with -h (default: autodetect with -r and -d).
   * Has a long greeting mode (enabled with -l or --long-greeting).
$ logout
  

Back to the Religion section



Best Viewed with Lynx or Elvis

Copyright (C) 2006-2008 Dave Cohen; permission granted to modify and/or redistribute subject to the terms of the GNU Free Documentation License version 1.2 or later