zsh-users
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-users@zsh.org
Subject: Re: suprise with -=
Date: Fri, 23 Oct 2015 07:34:16 +0000	[thread overview]
Message-ID: <20151023073416.GB9837@tarsus.local2> (raw)
In-Reply-To: <151022165626.ZM6804@torch.brasslantern.com>

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}
xbye
% 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
                                    1
% 

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...

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


  reply	other threads:[~2015-10-23  7:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-19  5:46 Ray Andrews
2015-10-19 18:35 ` Bart Schaefer
2015-10-19 19:34   ` Ray Andrews
2015-10-20  0:27     ` Bart Schaefer
2015-10-21  2:55       ` Ray Andrews
2015-10-21  3:52         ` Bart Schaefer
2015-10-21 18:01       ` Ray Andrews
2015-10-21 18:43         ` ZyX
2015-10-22 15:29           ` Ray Andrews
2015-10-22 15:43             ` ZyX
2015-10-22 16:02               ` Ray Andrews
2015-10-22 23:56               ` Bart Schaefer
2015-10-23  7:34                 ` Daniel Shahaf [this message]
2015-10-21 18:46         ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151023073416.GB9837@tarsus.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).