Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: suprise with -=

Bart Schaefer wrote on Thu, Oct 22, 2015 at 16:56:26 -0700:
> On Oct 22,  6:43pm, ZyX wrote:
> }
> } Though I know no language implementations other then VimL (and, maybe,
> } tcsh: have not actually seen its source code, but it looks like it is
> } also executed in-place) that do not have the parsing stage.
> Yes, (t)csh also executes in place, or close to it.  Csh parses one line
> at a time, executes it, then parses the next line.  It's not quite as
> bad as VimL, but it means that e.g. loops within scripts are implemented
> by using fseek to rewind the file pointer to the beginning of the loop.
> You can create some really entertaining self-modifying scripts in csh by
> having the script rewrite parts of its own source file before they are
> read (or re-read, if looping).
> Csh is like Gromit in "The Wrong Trousers", laying down his tracks the
> instant before the train runs across them.  VimL apparently lays down
> the individual railroad ties.

TeX is also a lot of fun:

% cat texput.tex
                   xmessage{this is file contents}
\catcode`x=0\relax xmessage{this is a compile-time message}
% tex texput.tex
This is TeX, Version 3.14159265 (TeX Live 2015/dev/Debian) (preloaded format=tex)
(./texput.tex this is a compile-time message [1] )
Output written on texput.dvi (1 page, 244 bytes).
Transcript written on texput.log.
% dvi2tty texput.dvi | grep .
xmessagethis is file contents

I suppose you might say that TeX not only lays down the individual
railroad ties like VimL, but also allows each tie to specify the
dimensions and color of the next tie...

(tokenization is changeable at runtime; I made x equivalent to
backslash, so, for instance, the last line invokes \bye)

Messages sorted by: Reverse Date, Date, Thread, Author