10 ms·
The reason TeX can be so unapproachable is the fact that it's a very different language from pretty much any other programming language you've ever used. It's n
by arnsholt 11y ago
The reason TeX can be so unapproachable is the fact that it's a very different language from pretty much any other programming language you've ever used. It's not a Turing machine, and it's not lambda calculus. It's not even Horn clauses (which is the model behind Prolog). It's a string rewriting system; basically a giant cascade of rules like "rewrite this string to this other string" applied over and over until the whole input is consumed.
As it happens, this is yet another Turing-equivalent form of computation. The closest analogy I have is programming in Lisp, but with the constraint that you can only use special forms and macros, no functions are allowed.
- versteegen 11y agoIf you want to compare to abstract models of computation, the closest one might be a multi-stack push-down automaton (which is Turing complete).
- vanderZwan 11y agoI was about to say: isn't that just another expression language? I've sometimes wondered if Lisp-like languages wouldn't be a much better way of writing documents than our current markup languages of choice. If I'll ever seriously try to pick up Racket, it'll probably be to give Pollen a spin and see how it is in practice. http://pollenpub.com/ http://pollenpub.com/
- sklogic 11y agoThe formalism behind it: https://en.wikipedia.org/wiki/Markov_algorithm https://en.wikipedia.org/wiki/Markov_algorithm