From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29227 invoked by alias); 23 Oct 2015 07:34:26 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20815 Received: (qmail 20887 invoked from network); 23 Oct 2015 07:34:23 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=wET3MQWMknnnHSCanlJ4f5PmNoE=; b=CoMO1D DWyclyM9fJZAc2VJPMX48EGpH1dKuWwMB56AwtJvr7Lt8syKg+v9A64vgmu2vFVs d44h9xPtrxx0/4Gi3W1gJ7wNs4ZMz20qi38k7coDWJzi6zFI63swAhzePGtkncEG 5Y1PRUr0D4nTCKwgj9fSuC+fmZ0cmezdfdaig= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=wET3MQWMknnnHSCanlJ4f5PmNoE=; b=NTLW7 +nPlCdLWaQldEicqLviVlD3xYr3sMZFdWVf3quWK2LVQOrISjMeCdGYglNgiOdlY lB4hGvcbvOqJuNL9hltWYj8kjHJtqyl+UnhiaYJ1JHA2vAw2GXmnz+C1Sr+wQe0l tGpOLLLtKviU/hsJKxM84jSbY1l04qyxQV32j8= X-Sasl-enc: bAmV02C4gjgkWFMmxiLRAJFgedHWr/Wtizz26lid9xh7 1445585659 Date: Fri, 23 Oct 2015 07:34:16 +0000 From: Daniel Shahaf To: zsh-users@zsh.org Subject: Re: suprise with -= Message-ID: <20151023073416.GB9837@tarsus.local2> References: <562483C9.1060602@eastlink.ca> <151019113517.ZM32739@torch.brasslantern.com> <562545DD.5020008@eastlink.ca> <151019172744.ZM558@torch.brasslantern.com> <5627D2F8.3000004@eastlink.ca> <970471445453032@web1h.yandex.ru> <562900EF.8090509@eastlink.ca> <2128161445528612@web30m.yandex.ru> <151022165626.ZM6804@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <151022165626.ZM6804@torch.brasslantern.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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)