[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: elit.el, a listing generator in the spirit of "@"




I gather from this that TECO is Turing-complete... is vi?

I'm-sure-someone-can-make-it-so-ly y'rs,

Mike

> Date: Wed, 9 Apr 2003 15:02:12 -0400 (EDT)
> From: Guy Steele - Sun Microsystems Labs <Guy.Steele@sun.com>
> 
>    From: Dorai Sitaram <ds26@gte.com>
>    Subject: Re: elit.el, a listing generator in the spirit of "@"
>    Date: Wed, 9 Apr 2003 14:21:28 -0400 (EDT)
>    Cc: ll1-discuss@ai.mit.edu
>    
>    vi, by no means dead yet, has the same commitment
>    to one-letter commands.  
> 
> "The *same* commitment"?  Okay, let's try this
> little comparison: Write a bit of vi that reads
> an integer from the editor buffer, just after the
> cursor, then inserts after that integer the
> characters "! = " and then the factorial of that
> integer (it's okay if it only works for integers
> from 0 to 11).  Also, it's tasteful for the code
> not to clobber any other global state.
> 
> Here's how I would do it in TECO:
> 
> [8[9 \u8 1u9 <-q8; q9*q8u9 q8-1u8> i! = $ q9\ ]9]8
> 
> Does vi exhibit "the same commitment to one-letter
> commands" for this simple task?
> 
> --Guy
>