• jol@discuss.tchncs.de
      link
      fedilink
      arrow-up
      48
      arrow-down
      9
      ·
      9 months ago

      For all intents and purposes, a markup document is a script that outputs a document. There’s no point in saying the HTML isn’t a programming language. Not all languages have to be general purpose.

      • pixelscript@lemmy.ml
        link
        fedilink
        English
        arrow-up
        43
        arrow-down
        2
        ·
        9 months ago

        The bar for me is whether the language describes an executable program that has state and control flow.

        You could perhaps be generous and describe the DOM as a (write-only) state and the parser as a control flow. I don’t, personally.

        HTML is just a data container format to me. Belongs with the likes of XML, JSON, JPG, PNG, GIF, MP3, MOV, etc.

        The umbrella term I’d use for all of these is “coding”. That’s the skill of understanding structured languages and format specifications, and understanding how you can and can’t piece things together to make something coherent. This is a critical requisite skill to programming. But programming is more.

        Programming is the art of juggling of state and control flow in clever ways to trick funny rocks into computing something you don’t know. It doesn’t need to be general purpose, but I would argue it indeed needs to have a purpose. It has to be something more than just a pile of declarations you know from the outset. Otherwise it’s just structured data.

        • WldFyre@lemm.ee
          link
          fedilink
          arrow-up
          15
          arrow-down
          1
          ·
          9 months ago

          The umbrella term I’d use for all of these is “coding”.

          Saying “it’s not programming it’s coding” is like engineer “it’s not dirt it’s soil” levels of pedantry that are silly to expect people outside your profession to know.

          Hey, maybe you are engineers after all lol

          • pixelscript@lemmy.ml
            link
            fedilink
            English
            arrow-up
            8
            arrow-down
            2
            ·
            9 months ago

            Sure. Which is why I would only make this distinction in a place where I can reasonably expect people to know better. Like, perhaps, a niche community on an experimental social media platform dedicated to programming.

          • stetech@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            4 months ago

            But it’s true.

            Coding is, like, the smallest aspect out of all of programming. And unfortunately the part that’s the most fun.

            But if you’re a coder, I assume you don’t know how to design complex systems, just (maybe) implement them or parts of them. That’s not what defines programming.

            (Disclaimer, in all fairness: that’s in my personal, layman opinion as someone who doesn’t know much theory. I might just be very very in the wrong here, lol.)

          • pixelscript@lemmy.ml
            link
            fedilink
            English
            arrow-up
            4
            arrow-down
            1
            ·
            9 months ago

            Stateless functions still deal with state, they just don’t hold onto it. Without state to mutate, a so-called stateless function doesn’t do anything.

            In declarative languages, your state is the sum of everything you’ve declared. You don’t query results out of thin air. Computational results logically conclude from everything you set up.

            HTML ““has state””, as in it has a DOM, but it doesn’t do anything with it. You don’t mutate the DOM after it’s built, or query the DOM to compute results that weren’t trivially evident from the state you declared.

            You can do those things with JavaScript. But all that proves is JavaScript is a programming language, and HTML is just a data format it can interact with.

            • Doc Avid Mornington@midwest.social
              link
              fedilink
              English
              arrow-up
              1
              ·
              9 months ago

              Programming is the art of juggling of state and control flow

              Sure, stateless functions deal with and impact state in some way. If that’s what you meant by your previous comment, that’s fine, but that’s honestly not what would typically be meant by “juggling” state.

              The part about declarative languages has nothing to do with state. Declarative languages do not give the programmer control over flow, the other part of your definition.

              Learn Lisp, and you will never again be so certain about the difference between a programming language and a data format.

          • frezik@midwest.social
            link
            fedilink
            arrow-up
            1
            ·
            9 months ago

            There’s no such thing as a pure functional language. All it would accomplish is warming the CPU up. All such languages store data away at some point.

              • frezik@midwest.social
                link
                fedilink
                arrow-up
                1
                ·
                9 months ago

                Your statement implies it. Having stateless or declarative functions that never store or retrieve data would mean they are pure functions.

                • Doc Avid Mornington@midwest.social
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  9 months ago

                  No, my question does not imply a pure functional language at all. Pure functions exist in languages which are not purely functional. Most of the functions I write are pure functions. I could have a workflow where I work with another programmer who handles the minimal stateful pieces, and I would only write stateless functions - would that make me not a programmer?

                  (There are also purely functional languages, by the way. I just didn’t remotely imply there were, or make any claims about them, at any point in this thread, prior to this parenthetical.)

                  The part about declarative languages has nothing to do with state, or functional languages. Declarative languages are a whole different thing. Of course declarative languages handle state. The comment I was replying to said “Programming is the art of juggling of state and control flow”. Declarative languages don’t involve juggling control flow.

      • okamiueru@lemmy.world
        link
        fedilink
        arrow-up
        19
        arrow-down
        3
        ·
        edit-2
        9 months ago

        Not really. If so, you might as well consider the stuff you can use to format a comment here on lemmy, as “programming”. That’s conceptually more similar to HTML as what programming actually is.

        quote

        some title

        Ooo hyperlink

        Etc.

        • UnverifiedAPK@lemmy.ml
          link
          fedilink
          arrow-up
          4
          arrow-down
          2
          ·
          edit-2
          9 months ago

          Yeah… there are macros to handle formatting. Next you’ll say Scratch isn’t programming either.

          • frezik@midwest.social
            link
            fedilink
            arrow-up
            8
            ·
            9 months ago

            To my knowledge, Scratch can save information away and retrieve it later. That’s enough to be programming. There are Theory of Computation reasons for this; it’s not an arbitrary distinction.

          • okamiueru@lemmy.world
            link
            fedilink
            arrow-up
            5
            arrow-down
            2
            ·
            edit-2
            9 months ago

            That’s such a weird point to make. Is it because to you, it seems like the line drawn is arbitrary? I cannot imagine any other reason. Certain words just mean certain things.

            Markup languages are exactly as much “programming” as you marking a word and hitting “bold”. Which is to say, nothing at all. People are wrong all the time, and I have a very limited amount of fucks to give when it happens.

            As for Scratch, it is a programming language. So, why would you think it’s a logical next step for me to say otherwise? Next, you’ll say something remarkably dumb in response. Resist the temptation, and do something more productive.

            • pivot_root@lemmy.world
              link
              fedilink
              arrow-up
              3
              ·
              9 months ago

              If he had said “LaTeX” or “roff”, that might have been a good example of something that blurs the line between the two. They aren’t specifically intended to be programming languages, but with a powerful enough macro system, a markup or typesetting language can be used in the same way as something like Brainfuck.

              • okamiueru@lemmy.world
                link
                fedilink
                arrow-up
                2
                ·
                edit-2
                9 months ago

                Absolutely. Those you suggest there are good examples.

                Good enough that, instead of “is/isn’t” programming language, it would be more a “ah, so, how do you define that then?”. Now that I’ve had some sleep, one could argue that I could have been nicer and suggested that approach for HTML as well. After all, it’s just words that mean stuff, and transfer a concept between people, that translate to the same (ish) idea. The moment the latter isn’t the case, it’s no longer very useful for the former.

                Most disagreements, I find, are just cases of different understandings. Discussions worth having is when both are correct but different, and both want to figure out why they differ. So, on second thought, I think I was appropriately rude _

                Both LaTeX and roff are Turing complete, but they are also DSLs with a somewhat narrow “domain”. Sounds exactly right that these blur the lines between what is/isn’t. You could even argue that claiming one or the other is just one way to express how you understand that difference.

      • frezik@midwest.social
        link
        fedilink
        arrow-up
        6
        arrow-down
        5
        ·
        9 months ago

        If a language can’t store information and retrieve it later, then there is a limit to its usefulness. There are problems it cannot solve.

        That’s OK, because not every language needs to be do that in order to serve its niche, but it’s not a programming language.

        • jol@discuss.tchncs.de
          link
          fedilink
          arrow-up
          10
          arrow-down
          3
          ·
          9 months ago

          As I said, not all programing languages are general purpose. Just because there are problems it can’t solve does not mean it’s not a programming language.

          • frezik@midwest.social
            link
            fedilink
            arrow-up
            2
            ·
            9 months ago

            No. A form can’t do anything except send data to a server or get handled in the browser by Javascript (or Typescript or whatever). In either case, HTML is not capable of storing or retrieving anything on its own. It only provides an interface for potentially doing that.

    • CaptPretentious@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      9 months ago

      True. Once I was working on a WPF app and someone looked at it and then showed me a simple YAML file they put together for Ansible and legit thought ‘YAML was better’ and what I was doing was dumb. They considered themselves a programmer.

    • lightnegative@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      8 months ago

      No. Markup languages are configuration for an interpreter.

      inb4 code is configuration for a compiler and binary is configuration for a processor

      • Aceticon@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        8 months ago

        Actually, there are plenty of interpreted programming languages, for example Perl or Shell Script so that definition is incorrect.

        HTML is not a programming language because it only defines form (how things look), and does not control action (executing operations by itself).

        The language for Web Development that controls the execution of operations (say: if the user fills a certain field, fetch related data from a server and display it in certain page areas) is called Javascript and is separate from HTML (which existed before Javascript and can exist without it).

        Modern Web standards have also moved a lot of the form stuff to yet another language - CSS, Cascading Style Sheets - which is more powerful and reusable, so HTML is more used for the visual structure of the page and less for things like the fonts of the various pieces of text, though it still contains support for that stuff and you can still use it.

    • andrew@lemmy.stuart.fun
      link
      fedilink
      English
      arrow-up
      33
      arrow-down
      8
      ·
      9 months ago

      But also, you’re making a computer do what you want, and something that it wasn’t programmed by the factory to display, when you write HTML. You’re programming.

  • hades@lemm.ee
    link
    fedilink
    arrow-up
    10
    ·
    9 months ago

    to be fair, the way it’s worded I can parse as “a language for web programming”, instead of “a programming language for the web”

  • SzethFriendOfNimi@lemmy.world
    link
    fedilink
    arrow-up
    11
    arrow-down
    2
    ·
    9 months ago

    It’s a markup language. There’s no debugging.

    I don’t have to iterate through versions of the markup to find what works.

    It doesn’t have specific documentation that is mostly the same but differs slightly on different runtimes

    And it doesn’t have IO, dynamic extensibility or modularity….

    Wait a second. Hmm… nah, it’s still just a markup language. Just one derived over time that feels like it was the brainchild of Satan and Cthulu

    • 𝘋𝘪𝘳𝘬@lemmy.ml
      link
      fedilink
      arrow-up
      7
      ·
      9 months ago

      I don’t have to iterate through versions of the markup to find what works.

      <section> or <article> first? A section can contain articles, but articles can have sections.

    • Bob@feddit.nl
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      edit-2
      9 months ago

      I’m not a programmer so I’m tending towards accepting HTML as a programming language, because it’s a language you type in to make the computer do stuff. Is there maybe another example of something that does what HTML does but obviously isn’t a programming language?

      • labsin@sh.itjust.works
        link
        fedilink
        arrow-up
        7
        arrow-down
        2
        ·
        edit-2
        9 months ago

        A PowerPoint, word document or even a text file or picture. There is only a description in the file of what it holds and it’s up to the program that reads it, how it will visualize or interpret it.

        A word document or PDF would be the closest.

          • labsin@sh.itjust.works
            link
            fedilink
            arrow-up
            2
            ·
            9 months ago

            A word document can also contain a script, as can html pages. It’s why I thought these two were the closest match. Nobody is going to call those programming languages.

        • Bob@feddit.nl
          link
          fedilink
          arrow-up
          1
          ·
          9 months ago

          You mean the code behind the scenes is like HTML? But then I don’t see how it’s not in a programming language.

          • labsin@sh.itjust.works
            link
            fedilink
            arrow-up
            1
            ·
            9 months ago

            No, the html file itself. It just contains elements like a paragraph, image, list, table,… just like a word document.

            • Bob@feddit.nl
              link
              fedilink
              arrow-up
              1
              ·
              8 months ago

              So you mean for example that typing <p>…</p> is more comporable pressing enter in Microsoft Word? But then you’re typing a code instead, no?

              • CapeWearingAeroplane@sopuli.xyz
                link
                fedilink
                arrow-up
                2
                ·
                8 months ago

                Yes, typing <p> in HTML is like pressing enter in word, but that doesn’t make it a programming language, it makes it a markup language.

                A markup language is also what you can use to format comments here: You use a specific syntax to indicate how you want things formatted.

                The separation from a programming language is that a programming language can be used to implement logic, like saying: In the following paragraph, a word should be bold if it contains the letter “A”. That cannot be done with a markup language.

      • pancakes@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        5
        ·
        9 months ago

        Markup language vs programming language is similar to the difference between a font and a typeface. Sure, they’re different but to the layperson, they might as well be the same thing.

        • Bob@feddit.nl
          link
          fedilink
          arrow-up
          1
          ·
          9 months ago

          But a font is an instance of a typeface, so you just mean they’re different gestalts? My question was how they’re different things.

      • CapeWearingAeroplane@sopuli.xyz
        link
        fedilink
        arrow-up
        1
        ·
        8 months ago

        A markup language (which is what HTML is) is like an advanced text container. When you write a post or comment here, you can use specific syntax to indicate the size of the text, a hyperlink, a quote, etc. HTML is that. It doesn’t “do” anything, you’re just writing in what you want it to display, and that is displayed.

        A programming language lets you somehow “do” something. Instead of declaring explicitly “write this text in bold” a programming language can be used to process all the text in an arbitrary document, and change the word “aeroplane” to bold whenever it turns up. That is: The output from the code isn’t just a rendering of what is explicitly written there, which is what a markup language gives you.

  • WatTyler@lemmy.zip
    link
    fedilink
    arrow-up
    5
    ·
    8 months ago

    Programmer chuds get bent out of shape that HTML is the single most influential programming language ever made. Think about it, Devs post code snippets to StackOverflow, rendered in HTML. An HTML-interpreter (aka a ‘Software Engineer’) copy pastes the snippet, transpiles it into a Python file, Java file etc. and later in the process you get a binary.

    Basic Brogrammers rage against programming behemoth HTML out of bitterness that all they are is HTML’s compiler.

    • Sotuanduso@lemm.ee
      link
      fedilink
      English
      arrow-up
      1
      ·
      9 months ago

      I searched through the whole crossword puzzle twice before I realized you were mentioning an alternate answer (which doesn’t fit in the blank) and not pointing out a nonsense word in the puzzle. 88 across is was, by the way.

  • Floey@lemm.ee
    link
    fedilink
    arrow-up
    2
    arrow-down
    2
    ·
    9 months ago

    If you create data with the intention for that data to be used with a program then that data becomes a part of that program and you are therefore programming when creating that data.