Article View: alt.folklore.computers
Article #273Re: TECO
From: la... Larry Denenberg
Date: Mon, 18 Dec 1989 19:18
Date: Mon, 18 Dec 1989 19:18
23 lines
1740 bytes
1740 bytes
In article <1989Dec15....@world.std.com> b...@world.std.com (Barry Shein) writes: > >Anyone have any good TECO macros? The most fun I ever had with TECO was as an undergraduate at that big non-MIT place in Cambridge. I wrote a macro to print the primes between 1 and N and challenged the APL hackers to do it in fewer characters! The TECO macro was only 31 characters long, not counting the decimal representation of N. But it turns out that you can do it in about 15 characters of APL. Coincidentally, 15 was also the largest N that worked on our machine, since the APL code used the fact, except for p=4, p is prime iff p^2 doesn't divide p!. The TECO macro worked happily even for N in the tens of thousands even if it was slow getting started. So I claimed a moral victory anyway. (Besides, I'm not sure that the APL code correctly excised 4 from the list of primes.) The TECO macro is in the Summary line of this article so don't peek if you want to try your hand. Even at this late date, I'd love to see a shorter solution. /Larry Denenberg la...@harvard.edu la...@bbn.com
Technical Details
Message-ID:
<49873@bbn.COM>Path:
mbox-mo1.pugleaf.net!gmdzi!unido!mcsun!uunet!snorkelwacker!mit-eddie!bbn!bbn.com!larryReferences:
<6877@shlump.nac.dec.com> <1989Dec15.041951.8081@world.std.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!gmdzi!unido!mcsun!uunet!snorkelwacker!mit-eddie!bbn!bbn.com!larry From: la...@bbn.com (Larry Denenberg) Newsgroups: alt.folklore.computers Subject: Re: TECO Summary: N<1\><jcs1$;.u1.=jz/q1<q1c-d0\>> Message-ID: <49873@bbn.COM> Date: 18 Dec 89 19:18:35 GMT References: <6877@shlump.nac.dec.com> <1989Dec15.041951.8081@world.std.com> Sender: ne...@bbn.COM Reply-To: la...@bbn.com (Larry Denenberg) Distribution: alt Organization: Bolt Beranek and Newman Inc., Cambridge MA Lines: 23 Posted: Mon Dec 18 20:18:35 1989 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit