X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f996b,d3b7d558d503a461,start X-Google-Attributes: gidf996b,public From: eli@alpha.netusa.net (Eli The Bearded) Subject: life in vi Date: 1996/09/05 Message-ID: <50mth6$n1b@alpha.netusa.net>#1/1 X-Deja-AN: 178687648 x-get-a-newsreader: organization: Queasy newsgroups: alt.ascii-art x-us-congress: Moronic Fucks. Does your vi lack life? Well there is no need to worry any more. With this neat toy macro set you can play Conway's Game of Life right in your edit buffer! Okay, I will conceed this is not strictly ascii art, but it could be used to create some ascii-art-ish things. For those who do not know, vi is an editor that is standard on Unix boxes. vim and other clones are availible for all sorts of other machines ranging from Macs to Psions. (Note that I have not tried these macros in all of the clones, so I cannot vouch that they will work on all machines.) Just uudecode the attached file and source it in your vi -- ":source life1.mac". Hit 'I' to create the initial blank board, then fill in the spaces with 'X's to suit your pleasure. Use 'g' to run for one generation. Use '+' to run for one generation while timing it. Insert a number above the box, hit , and hit 'z' to run for that number of generations while timing it. (Timing assumes a Unix-like environment.) Mnemonics: I 'I'nitialize g 'g'o + looks like a 't' for time z go to sleep while it runs These macros make for a great way to test the speed of your vi implementation. Both running on a sun4c machine, the Solaris 2.5 vi took 11 1/2 minutes to calculate one generatation, while vim 4.2 (compiled "gcc -g") did the same thing in only 2 1/2 minutes. New in version 1.0 (previous versions unreleased): life window wraps around no longer have macros bound to '~' and 'R' (which are useful for filling in the box) '+' and 'z' macros It is probably a good idea to not let your own exrc be source'd automatically when using these. Also availible on the web: http://www.netusa.net/~eli/src/life.uu Elijah ------ begin 644 life1.mac '86-R;W,N"B8L end