6 ms·
Of course it is, it is a collection of instructions that can be executed by a computer to perform a specific task. In this case the task is to display some dat
by optimuspaul 6y ago
Of course it is, it is a collection of instructions that can be executed by a computer to perform a specific task. In this case the task is to display some data on a screen in a specific way. We need to stop arguing that HTML is not a programming language, it's silly and serves no purpose.
- s_dev 6y agoIt's not programming language because it's a markup langauge. It's not turing complete. There are limits to the types of computation that can be performed with it. It's not silly -- it's a meaningful distinction.
- chias 6y agoIf you define a "program" as "a series of instructions to perform a task, where the instruction set is Turing Complete", then your statement is tautologically correct based on your definition. A much more general definition is simply "a series of instructions to perform a task". Do you feel that the former definition of the word "program" is the only one worth using? As an example: if you use a Game Maker application to construct a video game where your inputs are the graphics, the level design, and some basic scripting to connect them up, is the resulting output "not a program" because the input scheme that you used in order to define its behavior was not Turing Complete? You could make an argument that, in the context of Quines, this isn't relevant because the Program is not outputting its own source code but only the top-most layer of its definition, but then again that's true at some level for any Quine not written in machine code (and even then it'd probably be missing much of the OS / display drivers / etc.). Edit: removed an example about "programmable TV remotes" because it wasn't a very good example, and added a note about Quines.
- s_dev 6y ago>"a series of instructions to perform a task" Limitations of those instructions is the key aspect. You couldn't use any English or natural language expression for example. It might seem obvious but complexity of those instructions is what makes the language abstract. Having complicated instructions isn't always desireable though e.g. the CISC vs RISC debate.
- chias 6y agoTo be clear, I am in complete agreement with every point you've made explicitly in this thread. What I do not agree with is the following implicit claim: An HTML file cannot be a Quine because an HTML file is not a program because HTML is not Turing Complete.
- username90 6y agoAn html file doesn't contain just html.
- postalrat 6y agoHTML has sections for data and code just like most other executable files. The code parts in an HTML file are typically in <script> sections.
- s_dev 6y agoWhy do you think it supports <script> tags? To allow you to extend the functionality where HTML is clearly limited. Adding two numbers in HTML might be expressable but clearly it's much easier in Javascript.
- reaperducer 6y agoLots of historians consider programmable looms to be the first computers, even though they're not Turing-complete. Cellular automation is Turing-complete, but is not a program. Turing-complete is a fun thing to talk about in college theory classes, but has limited practical use outside of academia.
- nikeee 6y agoIf programming languages need to be turing complete, do you consider this language a programming language? https://github.com/ainfosec/crema https://github.com/ainfosec/crema Also, you can generate RSA key pairs using HTML: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/keygen https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ke... IMHO, the better mental model is that HTML is a declarative programming language that is very abstract.
- optimuspaul 6y agoAt some level probably a meaningful distention, like you wouldn't decide to create a neural network in HTML alone. But from a high level HTML is a language used in programming, generally with other languages to create distributed multi-platform computer programs. My point is let's stop being so pedantic in the soft spaces. This isn't a discussion about "should I use HTML to write my kernel?"
- dragonwriter 6y agoWhile certainly the class of Turing-complete languages is an important one, I think it's a mistake to treat that specific class as the definition of “programming language”.
- dllthomas 6y agoMarkup language is a useful category, but the dividing line isn't "Turing complete". Some traditional markup languages are Turing complete (certainly postscript, possibly troff?), while some interesting academic programming languages carefully avoid being so (eg. Charity).
- w7 6y agoIs JSON a programming language then?
- optimuspaul 6y agoit certainly can be... https://owasp.org/www-pdf-archive/Marshaller_Deserialization_Attacks.pdf.pdf https://owasp.org/www-pdf-archive/Marshaller_Deserialization...
- lioeters 6y agoIn my opinion: JSON is not a programming language when it's used as a data transport format; however, it can represent code which an interpreter could evaluate as a program. For example, a Lisp based on JSON: https://github.com/kanaka/miniMAL https://github.com/kanaka/miniMAL A program: ["+", 2, 3] I suppose this is still not a proof that JSON is (or can be) a programming language, since it covers only the notation.
- sfoley 6y agoOf all the things you can say about an HTML file, the one thing you can absolutely not say is that it is a collection of instructions. It is literally a declarative description of components to be rendered. I also did not say HTML is not a programming language.
- chordalkeyboard 6y ago> declarative description of components to be rendered. Doesn't the "to be rendered" part make it instructions? Its like there are two labels for a bottle of poison: "poison" and "poison: do not drink". But the label that says "poison" is of a shape, color, and design that is commonly understood to be a label that tells the reader not to imbibe the contents of the bottle to which it is attached.
- jachee 6y agoIf HTML is a programming language, then what, pray tell, are the artifacts in which that language is caused to produce output called?
- beervirus 6y agoIf that's the definition, then plain text is also a program. It instructs your text editor what to display on the screen.
- optimuspaul 6y agoit the text contains a program then it could be
- Rebelgecko 6y agoIsn't that how most interpreted languages work?
- tshaddox 6y agoIn most non-technical discussions like this, it's only serving the purpose of gatekeeping, as if people who work with HTML or CSS are not really programmers. That's nonsense and should be rejected. I do think that, in specific technical contexts, a useful distinction (though still fuzzy on the margins) can be made between programming languages and markup languages.
- optimuspaul 6y ago> In most non-technical discussions like this, it's only serving the purpose of gatekeeping, as if people who work with HTML or CSS are not really programmers. That's nonsense and should be rejected. that is my real point