• 0 Posts
  • 5 Comments
Joined 2 years ago
cake
Cake day: August 4th, 2023

help-circle


  • Actually, PDF is a turing complete programming language.

    PDF is a simplification and wrapper around the computer language PostScript - a PostScript or PDF doc literally runs on the printer or computer and outputs the rasterisation of the thing you want to print.

    PostScript is language based around a stack. You can define functions (which may be fully recursive) that run on the stack.

    Here’s a small example:

    /ANGLE {
       newpath
       100 0 moveto
       0 0 lineto
       100 50 lineto
       stroke
    } def
    
    10 setlinewidth
    0 setlinejoin
    100 200 translate
    ANGLE
    
    1 setlinejoin
    0 70 translate
    ANGLE
    
    2 setlinejoin
    0 70 translate
    ANGLE
    

    As such, PDF that’s actually similar to Python, and HTML is closer to something like a JSON or XML document.

    Note however that HTML can contain Javscript or WASM programs, but these are embedded rather than features of HTML.


  • Linux was not muscled like that in 1991 - it’s first, barebones kernel was released in September of that year.

    I remember installing Linux on a 90MHz 486 in the mid 90s and it barely ran X server with a simple window manager. And if the machine was turned off while Linux was running, you might not be able to boot again.

    Linux now, however, is unrecognizeably better.