CSC161 2010F, Class 05: Getting Started with Emacs and Compiling C Programs Overview: * The Linux Philosophy. * Emacs Basics. * Lab. Admin: * Primary reading for Monday: K&R 2. * Secondary reading for Monday: Sections 5.1-5.4 of The GNU Coding Standards. + Link on the Course Web * Assignment for Wednesday: Assignment 2: Basic C. + Bring questions! (on Monday, Tuesday, and Wednesday) * Men's Soccer is at home this weekend (Saturday 1:30): Go and watch Daryl play. * Dagohir fights on Saturday at 1:30pm. Great aerobic exercise. [Only counts if you are new to Dag.] The Linux Philosophy * Free and open souce = Happy * There's a list of rules that make things Unixy and that can be applied to a lot of programs * Rule of silence: Don't clutter your output. * Rule of clarity: Clear rather than senseless (even at the cost of speed) * Rule of simplicity: Make it simple * Rule of UM: Unix Master (or should that be Master Unix? Perhaps we're using reverse-polish notation.) * A unique culture: (Oh my god! There's culture in programming!) (More that it's survived for so long.) (And it's fun to study primitive cultures.) Emacs Basics * It's a text editor * With lots and lots (and lots and lots)^n options * It's more than a text editor * It can be an email reader * It can be a Web browser * It can make your lunch (well, maybe not, except at MIT) Lab Creating a file from multiple files * cat file1 file2 file3 > result * In this case cat /home/rebelsky/share/linux/humanfac.txt /home/rebelsky/share/linux/sciencefac.txt /home/rebelsky/share/linux/socialfac.txt > faculty.txt * or cat ~rebelsky/share/linux/*fac.txt > faculty.txt [Watch Sam attempt to use Emacs to type the EBoard.]