14
C0D4
2y

1,2,3,4 I declare an AI war!

Comments
  • 4
    BURN IT WITH FIRE!
  • 3
    People who think programming mean exclusively algorithms and logic are the same people that probably think that C code runs directly on their processor because it's low level.

    The word programming predates programming languages and it's just any input to a machine.

    HTML is programming the computer to display some output.

    Sorry it's not turning complete, but people have been programming shit into shit since shit did shit.
  • 1
    @AlgoRythm

    "shit into shit since shit did shit"

    Say that 5 times really fast
  • 2
    I constitute anything that has the ability to change its properties in one way or another as programmable. HTML is capable of changing the properties of the structure of a web page, thus it is programmable.

    It ain't T complete, but it is a form of programming. Not one that is going to get people awards also mind you :P
  • 0
    @AlgoRythm if you consider xml, json, Markdown or hell, yaml and toml as programming languages, then yes, it is one in your context
  • 0
    @Hazarth absolutely they are. Data entry losers can sit in their keyboards all day and "program" some XML data into their screens.

    Other people make the case for JPEG. The reason this is not considered a programming language in my mind is because it was not designed to be human readable or writable.

    This strengthens the case for HTML, XML, JSON, etc. If they aren't programming languages, then why are they structured so that a computer can read them, but also so that a human can write them?

    Curious.
  • 0
    @AlgoRythm they are structured specricially so that a human AND computer can read them. A 3rd party merely parses them and configures its self to behave in some way. Only machine code qualifies as "machine readable".

    To produce machine code, and thus tell the machine what to do; or "program" it. You can either do it ahead of time (compile) or in real time (interpret).

    Id argue that the primary objective of a programming language is to tell the what's it supposed to do, but the primary goal of XML/HTML is to represent structured content. And the interpretation is up to the 3rd party (see how many browsers display stuff differently for identical content). It's simply not designed with the CPU primarily in mind. In fact, if you consider that "HTML tells the PC what do == programming" then you undeed need to agree that "JPG tells the PC == programming"... Unless you argue that the 3rd that translates pixel data to screen is somehow different from 3rd party translating your <div> screen
  • 0
    @AlgoRythm I mean. I wont die on this hill cause its mostly semantics and there's no real implications.

    But I think It's fun to ponder the question of why *obviously* HTML is not a programming language
  • 0
    @Hazarth JPEG isn't a programming language but if you had the skill and patience to write one by hand I would say it's some pretty hardcore programming.

    C needs to be interpreted by the compiler and translated to assembly code. Which then needs to be assembled into machine code. And c compilers famously have different outputs for the same c program, so that's similar to how browsers act differently based on same HTML input.

    My definition is this for a programming language:

    Was it meant to be written by a human and read by a computer? Is the output intended to have some effect on the behavior of the computer (displaying a button is behavior)?

    If yes, then it is a programming language.
  • 0
    And I will absolutely die on this hill. Consider me already dead on it.
  • 1
    Hmm thought.

    by that logic, could a MS Word doc be a programming language?

    You’re technically defining a template to be rendered a certain way.
  • 0
    @AccessToken technically speaking, you can embed an excel spreadsheet into word and interact with it.... 😏
  • 0
    @AlgoRythm Then how do you differentiate a template or a config file from a programming language? or do you just not do that?

    As a system admin, am I "programming in SSH" by changing my .ssh/config and "programming in CONF" when changing /env/apache2/available_sites/*.conf files ?

    I mean, if you consider configuration as a subset of programming, then yeah. I don't, and for me an HTML file is a view configuration or a view template, depending on how you look at it. And Markup is just one possible format of defining structured views.
  • 0
    @Hazarth well where does it stop for you? What's the difference between a Turing complete "scripting language" and a programming language?

    Because a lot of people just kinda define it by how "hard" the language is, subjectively.
  • 0
    @AlgoRythm For me programming language would be anything that is directly or indirectly converted into machine code verbatim. The entire process should live and die with the code.

    the intent is similar, but the context is different.

    so:

    programming language -> output runs close to the machine and is completely dependent on the written program, when the program exits the process exits, absolute realtime control over process lifecycle

    scripting language -> output runs close to the machine, but is wrapped by a context. the output is somewhat dependent on the written script and when the script exits the process may keep running, might have some realtime control over process lifecycle

    Configuration -> output runs far from machine, usually only at application level, output is loosely dependent on the written config, when the config is parsed it has no say in what the process does next. no realtime control over process lifecycle
  • 0
    @Hazarth So you consider C# and Java scripting languages?

    Your definition is very implementation-based. This leads to some confusing edge cases and inconsistencies. JavaScript can be compiled to ASM, and c can be run as an interpreted language.

    This is why I prefer a more top-down definition of programming, leading into a generic definition of "programming language" as anything that facilitates programming (from a human).

    Makes things a lot simpler
  • 0
    @AlgoRythm no C# and Java are compiled into bytecode, which is then verbatim translated into machine instructions and the entire process lives and dies when the your code dies. Or at least that's the standard usage of those

    However I think whether a language is a programming language or a script is dependent on the context, not the language itself

    Let's put it this way, Every programming language can be a scripting language, but not every scripting language can be a programming language. So "Script extends Program" Which is pretty much exactly what it is meant to do.. extend the functionality of an existing program by providing additional behavior.. a script for it to enact if you will!

    But configurations, they don't add new behavior, they can only provide directions for the script or the program, the specifics of how that is performed is up to the program, which may delegate it to a script i.e. Browsers

    no amount of HTML will bring actual new behavior to my software
  • 0
    @Hazarth speaking for Java specifically, the JVM process lives indefinitely long before and after your program is run. Bytecode isn't translated verbatim into machine code. Depending on the JVM implementation it's either interpreted or JIT compiled.

    Take another example. What if we made a Java program that literally just set up a UI? No click handlers, no blinking text, no reading files, nothing. Literally just a program that does this:

    Button button1 = new Button();
    button1.setText("Hello!");
    page.addElement(button1);

    What would you call the thing you've written? Is it no longer a program just because it only does cosmetic things with no "behavior"?
  • 1
    @Hazarth "no amount of HTML will bring actual new behavior to my software"

    I would say that even just one character of HTML brings new behavior to your software. Because you're programming it to do so.

    It seems like you don't see any equivalency between a browser (which is an application that facilities the running of your code) and a compiler / interpreter (which are programs which facilitate the running of your code)
  • 0
    @AlgoRythm

    I mean, the HTML didn't make the computer do it, it was the browser that did it, the HTML just told it how

    And I'm very careful about seeing that equivalency, because once you go down the path of "browser is just a compiler for HTML" then you're back to square one where your image viewer is "just a compiler for JPG" or if you really want human readable then SVG.

    But that's besides the point, because as I said, it's the browser doing the work, not the HTML. It's not interpreting the HTML for the computer. It's just executing its own code according to the HTML. It would infact keep working and showing you content even without the HTML, it has the ability to print to screen pretty much any type of content regardless of any HTML.

    While an interpreter actually interprets for the machine. an interpreter is nothing without the input code, it does nothing, it doesn't aspire to become an image viewer or anything...
  • 0
    @Hazarth it's not your c code doing the work, it's the machine code produced by the assembler reading the ASM produced by the compiler.

    I think you're starting to see my perspective
  • 0
    @AlgoRythm I don't. the final executable is run on the machine as a standalone process, period.

    HTML is not capable of running a standalone process. It never will be. Even if you write a "compiler" for it, as long as valid HTML doesn't compile into valid runnable code, you didn't make a programming language out of it. That's not what it's supposed to do. Why would it
  • 0
    @Hazarth this is the issue. People always get hung up on the implementation. That's why my initial comment made fun of people thinking that c is run directly on your processor.

    C will never be executable. C is just a config file for your compiler. The only true programming language is binary.
  • 1
    @AlgoRythm These distinctions are useful, stop trying to erase them.

    The next kid that tells me that they are scripting in HTML will see the back of my hand
  • 1
    @Hazarth anger is one of the stages of grief
  • 0
    @AlgoRythm not understanding jokes is one of the signs of autism. hmm
  • 1
    no need, make it fight itself, ask as a followup question: "use only html to create a program which takes an input number and generates fizzbuzz from 0 up to that number"
Add Comment