Search code examples
awkturing-machines

Is it possible to do graphics programming in AWK?


I guess this is a question about what it means to be Turing complete. Awk is a programming language, and I've heard you can do anything with those, but aren't there physical limitations as well? I mean, you probably can't delete files with a minecraft red-stone computer. Similarly I imagine you can't do graphics with AWK.

What sort of extension would be necessary to AWK for it to be able to do graphics?


Solution

  • The notion of Turing completeness refers to being able to compute any computable function (from natural numbers to natural numbers, or {0,1}* to {0,1}*, or the like). It is a somewhat abstract concept and does not refer to specifics of hardware like graphics (or USB ports or wireless connections or anything of that sort). It does not even talk of the behaviour of "always running" programs like (HTTP/FTP/ssh/etc) servers. It only talks of computations which take some finite input, and

    • Halt and produces a finite output, or
    • Run forever.

    So it doesn't really make sense to relate Awk's Turing-completeness with its support for graphics libraries.