in reply to how to guess the kind of spoken or programming language a text is written in
You can pick an offset and count the number of characters which are equal to each other at that offset. Make the offset large enough and it tends to converge to some percentage.
Natural languages show much higher counts than would be expected from random strings of characters. The percentage is characteristic of a language and can be used to identify it.
Kahn's popular cryptography book covers this nicely, work of Kasiski and of Friedman.
Computer languages are complicated by having an unlimited vocabulary of made-up words in the function and variable names. Better programming, as all perlers know, is more like natural language ;-))
After Compline,
Zaxo
|
|---|