[Info-vax] Intel proposal to simplify x86-64

Dan Cross cross at spitfire.i.gajendra.net
Sun Jun 11 10:06:18 EDT 2023


In article <u633ve$m32$1 at news.misty.com>,
Johnny Billquist  <bqt at softjar.se> wrote:
>On 2023-06-10 14:18, Dan Cross wrote:
>> In article <u61md6$49j$1 at panix2.panix.com>,
>> Scott Dorsey <kludge at panix.com> wrote:
>>> Dan Cross <cross at spitfire.i.gajendra.net> wrote:
>>>> Believe it or not, `sed` is actually Turing complete; I imagine
>>>> that TECO is as well.  So in some absolute sense, both are
>>>> equally powerful.
>>>
>>> If that were the case, one could write some yacc code to turn sed scripts
>>> into teco scripts.  This may hurt your brain.
>> 
>> I don't know if yacc would be the best tool for that, but yeah,
>> it sounds very doable.  It'd be an interesting hack, if nothing
>> else.
>
>It would just be pure, utter madness.

Heh.

>But for sure, very doable.
>yacc is a tool for writing compilers, but I'm almost suspecting it's a 
>bit of overkill in this case, and might make for a more complex solution 
>in the end.

Yeah.  Yacc really wants to generate an LALR(1) parser for a
context-free grammar; that's probably fine for sed, but it does
seem to be a bit like cutting butter with a chainsaw.  I don't
know if that would handle TECO, though (quite possibly, but I
don't know enough about TECO's language to say).

>But sed to teco seems a somewhat simple problem. Teco to sed could be 
>much more complicated, I think. Not sure if it would actually be 
>possible. Turing complete does not tell the full picture. Specifically I 
>wonder about some OS interactions and system call stuff. In teco you 
>can, for instance, read and act on individual input characters, 
>unrelated to the file you are operating on, and turn off and on 
>character echo, for example. I have no idea if this can even be 
>accomplished in sed.

Indeed.  I don't think sed would work for this (one reason I
think that `ed` is a better analogue for TECO).

	- Dan C.




More information about the Info-vax mailing list