3 ms·
It is funny--a bit. Decades ago, I often used Perl to take a data table in some messy form and convert it into C source code, which I would combine with other C
by SiVal 5y ago
It is funny--a bit. Decades ago, I often used Perl to take a data table in some messy form and convert it into C source code, which I would combine with other C source that I wrote and compile into an executable. I thought it was ironic that I knew C well enough to write it and well enough to tell Perl how to write it, and it was still easier to tell Perl to write C than to tell C to write C.
So, Perl is obviously a much better language. Except that it turns out it's a lot easier to write Perl itself (the interpreter) in C than to write it in Perl. So Perl is better, because it's better for "writing C", and C is better, because it's better for "writing Perl".
The irony is still funny, but it is clearly based on a feeling that language goodness is one-dimensional, even when we know that any comparison of hammer and saw on a single dimension is going to miss most of what matters.
- thaumasiotes 5y agoI had a cryptography professor recommend for one assignment that, instead of trying to recognize the correct plaintext by its similarity to English (an approach that yielded results that could be manually adjusted into the correct plaintext, but wasn't able to find the plaintext by itself...), I should try to disqualify incorrect plaintexts by recognizing them as non-English. The approach there was just to ingest a long book from Project Gutenberg, record all of the trigrams (including across word boundaries), and disqualify a candidate plaintext if it had more than some low number (3, but it was a short text) of unrecognized trigrams. This worked beautifully. For reasons I don't recall, I wrote the assignment in C. I didn't want to do the parsing of the book into a trigram table in C. So I did that separately, and emitted C code to assign to a three-dimensional character array for every trigram I found. Then my assignment was the concatenation of some code initializing the array to zeros, the emitted code adding ones to it, and, thousands of lines later, the actual decryption code.