Terminal 101: 4 emacs Easter eggs
Posted 04/01/2013 at 10:51am
| by Cory Bohon
Every Monday, we'll show you how to do something new and simple with Apple's built-in command line application. You don't need any fancy software, or a knowledge of coding to do any of these. All you need is a keyboard to type 'em out!
Easter eggs are fun, hidden features that are implemented in software for the user to find. The developers of emacs (the text editor built into Mac OS X, and many other Unix-based systems) included many hidden Easter eggs to be discovered by its users. We’ll highlight a few of them here for you to try out.
1. Mud
MUDs (or Multi-User Dungeon) are an old-school game play experience that allowed multiple people to play text-based role playing games over the Internet. While most of these games have died down in popularity, you can still experience a similar text-based game in emacs.
Simply open Terminal, and type the following command followed by enter:
emacs -batch -l dunnet
Once launched, you’ll be able to interact with the game by typing commands as you’re lead throughout the text-based world. Type “help” if you get stuck.
2. Life
Grow your very own life form by using emacs' “life” program. Once it runs, it’ll begin generating randomly. It’s a cool cellular automaton on your Mac (in fact, it might very well be the only cellular automaton on your Mac). To give it a spin, type the following command into the Terminal:
emacs
Then, press esc on your keyboard, followed by the “x” key, and then type in “life.” After pressing enter, a randomly generated cell will begin forming on your screen. It’s pretty nifty, and extremely random. See how many generations can be generated! Ours went through 204.
3. Tetris
Want to play a game of Tetris without downloading any expensive app? Don’t worry! It’s built right into emacs. Simply use the following command, and you’ll be trying to fit all of the pieces together:
emacs
Then, press esc on your keyboard, followed by the “x” key, and then type in “tetris.” After pressing enter, you’ll be instantly thrown into a game of Tetris. Use the left and right arrow keys to move the pieces, use the up arrow to change the piece direction, and use the down arrow to instantly move the piece to its bottom-most location.
4. Free Psychoanalysis
So, have all of the April Fool’s Day pranks gotten a little out of hand? Not a problem, because your Mac includes a free program that will give you free psychoanalysis for all of the pain you’ve encountered today (not to be used in place of a real doctor, however). Simply use the following command:
emacs
Then, press esc on your keyboard, followed by the “x” key, and then type in “doctor.” After pressing enter, you’ll be instantly thrown into the psychotherapist’s office. Describe your problem, then each time you’re done talking, press the return key twice. The “doctor” will offer up advice, and talk you through your problems.
Cory Bohon is a freelance technology writer, indie Mac and iOS developer, and amateur photographer. Follow this article's author on Twitter.