Hacker News new | ask | show | jobs
by greglindahl 2226 days ago
I'm a bit confused by the use of the word "compiler" to refer to something that turns markdown into html.
2 comments

Perhaps 'transpiler' would be clearer? As many consider an HTML page to be an 'executable' (which is run by a browser) converting a text file into an executable would meet the CS definition. Pedantically the process of "compiling" markdown is more akin to "typesetting" but using the phrase 'markdown typesetter' would be even more obscure.

If there a word for the action of converting the description of a ritual to the actual practice of that ritual, that would provide a suitable root word form here. That said, using the closest example I can think of, music, the root word there is 'performing' when the music is performed and recorded when the music is performed into a storage medium, and transposed when the music is converted from one description to another description while maintaining the overall musical relationship between the timbres.

It is that latter version, transposition, which suggests the word 'transpile'.

I once worked on a source-to-source translator from C++ to C. In that era, that was the common term for that kind of software. I think that's more clear than "transpiler".

However, what we're talking about here is closer to TeX than cfront-to-c or even TypeScript-to-Javascript.

compile

[ kuh m-pahyl ]

SEE SYNONYMS FOR compile ON THESAURUS.COM

verb (used with object), com·piled, com·pil·ing.

to put together (documents, selections, or other materials) in one book or work.

https://www.dictionary.com/browse/compile

Thank you for posting the non-computer definition of the word. I was aware of that before I posted.

A large fraction of the words I use in physics and math are not used the same way, within the field, as the generic dictionary definition.

I would say the definition linked is the computer science definition. Its just commonly the case that the compilation target is some final binary, but in this case it is an html document. A lot of the terminology in CS stems from analogous similar actions we perform in real life (I saw an article a week or two ago on here listing all terms used in an instance like this)

I hate it when people blindly post definitions like this without explanation, it comes off super aggressive and doesn't solve much.

CS history has a long history of similar pieces of software being not called compilers.

Normal CS jargon has "assemblers" and "linkers", both of which might appear to be compilers according to this dictionary definition.

CS history also includes things like TeX, which formats text for a variety of outputs, and was rarely called a compiler.

Web browsers often include a JIT compiler for Javascript, but their text formatting system isn't usually called a compiler.

I wrote a long comment, and immediately deleted it because I'm trying to avoid being a confrontational jerk.

I disagree with your assessment of "normal CS jargon". I'm wondering if you mean "normal jargon in the C/C++ community".

In my experience with compiler textbooks and computer science professors who specialize in compilers, compilers are any formal-language-to-formal-language translator. Yes, sometimes sub-types of compilers have specific names, but they are all compilers.

Is there one word for the subject material of the dragon book? I think there is, and I think that word is "compiler". Including source-to-source translators, including assemblers, including preprocessors, including linkers.

I'm glad you're not trying to be a confrontational jerk. I'm all for disagreeing politely.

The project in which I worked on a C++-to-C translator didn't call it a compiler, it called it a source-to-source translator. It was a CS project in a CS department funded by the NSF. I have read the Dragon Book, and would be surprised if the authors would consider an interpreter, assembler, or a linker to be a compiler.

So yeah. I don't expect you to agree with my opinion, but I do appreciate it that you're trying to avoid being confrontational jerk.

Thanks for this. I did spend a lot of time pondering over whether I wanted to use the word "compiler" or "interpreter," but in the end it was my CS students who encouraged me to use the term that more people would recognize than the one that is technically more accurate.

This is my first time sharing one of my tutorials on HN so I am still feeling out where I will slip and where I can slide.