• @[email protected]
    link
    fedilink
    81 year ago

    Damn this is hard. I keep java script disabled by default so its hard to say anything good. I begrudgingly have to whitelist websites i need that cant run without it.

    • @[email protected]
      link
      fedilink
      31 year ago

      I feel like that’s more because you don’t want websites you visit running code than because you dislike this particular programming language

  • Norgur
    link
    fedilink
    21 year ago

    You can make your speakers go BRRRRRRRRR via Home Assistant with it

  • udon
    link
    fedilink
    721 year ago
    1. it’s easy to make fun of
    2. it makes every other programming language look better in comparison
  • @[email protected]
    link
    fedilink
    121 year ago
    1. It at least feels slightly little bit like lisp.
    2. Shit I’m f*ed

    … ah right, it runs on any browser. Lame

  • KillingTimeItself
    link
    fedilink
    English
    151 year ago

    hmm, let’s see.

    It’s not java.

    It’s also not a scripting language.

    also to the repeat grammar nazi in the comments here, hi, “its”

    • @[email protected]
      link
      fedilink
      51 year ago

      It’s also not a scripting language.

      It definitely is a scripting language.

      hello-world.js:

      #!/usr/bin/env node
      
      console.log("Hello world");
      

      Your favorite command line tool:

      chmod +x ./hello-world.js
      ./hello-world.js
      

      You just need to install npm, eg via apt-get install npm.

      • KillingTimeItself
        link
        fedilink
        English
        21 year ago

        bash would be a scripting language, though to be fair, i also consider bash to be pseudo code as well.

        If JS is a scripting language, than any other language is a scripting language. And technically, every language can be used to script, so therefore, is a scripting language. i’m referring to the aspect of a scripting language being generally constricted.

        • @[email protected]
          link
          fedilink
          31 year ago

          Pseudo code is literally fake code. Scripting is an actual type of code. Scripted languages while not strictly defined, usually refers to languages you don’t compile before running them. Bash is considered a scripting language because you don’t ship a binary compiled executable, but rather ship a file that is human readable and converted into machine code when it is run. Scripting languages are compared to compiled languages, like C or Rust. Where the file you run is already compiled, and executed directly.

          What do you mean by this?

          i’m referring to the aspect of a scripting language being generally constricted.

          Any Turing complete system, or this case language, can do anything any other one can, depending on the level of suffering you are willing to endure to make it happen. Anything JS can do, Rust can do. Anything Rust can do, Bash can do. The differences between languages is the assumptions they make, and performance characteristics as a result of those assumptions. Functionality is not practically different from one another, though some absolutely make it easier for humans to do.

          • KillingTimeItself
            link
            fedilink
            English
            11 year ago

            Pseudo code is literally fake code.

            hence why i specified why i consider it to be as such. I just think pseudo code shouldn’t exist. Plain and simple. Bash scripting is close to a language in the same way that pseudo code is also technically code.

            What do you mean by this?

            i just mean the simple fact that you could technically probably run bash on windows, but really wouldn’t want to. I don’t consider bash to be a programming language, though it is technically a scripting language, because it’s primary existence is in the shell environment of a system. I.E. constricted, but that’s just my view of it.

            • @[email protected]
              link
              fedilink
              31 year ago

              Bash being on the same level as actually fake code is a pretty hot take to me. What are your opinions on Python, or Ruby, or any other interpreted language? You could very well use them as your login shell, just like Bash if you wanted. In your eyes, if Bash *isn’t * a programming language at all, how do you describe a programming language? Languages that express code are just the same as languages that write stories, and whether you do it in German or Vietnamese makes no difference on what story you can write.

              When you describe a language as constricted what do you mean? Bash can do anything Python or Rust can do, each of them is just specialized to being better at specific aspects for human convenience in writing code. There is no inherit limitation on what can be done by the language you use to express it.

              • KillingTimeItself
                link
                fedilink
                English
                11 year ago

                it’s definitely a hot take, you could theoretically use any other language as a shell, and i know you sort of can with stuff like node as well.

                But those aren’t shell languages, and bash isn’t a true language, in the sense that it was explicitly designed to be used in the shell environment, i also consider it to be “pseudocode” because it’s not actually bash doing things a pretty significant amount of time you’ll stuff something into sed or awk, which are actually different interpreters all together.

                bash is almost a sort of wrapper, between a bunch of different programs that all handle things differently, allowing you to glue them back together to make something usable. It’s close enough to being it’s own language, that you could make it one, but it’s not, because it’s not supposed to be one.

                i suppose that’s pretty much what i mean when i say constricted.

      • palordrolap
        link
        fedilink
        41 year ago

        Depends on how you define “scripting language”.

        Older techs remember when it was only browser-based and they thought of, and perhaps still think of, “scripting languages” as something that would run from some command-line or another. Starting a GUI browser to run a mere script was a ridiculous concept. (There was also that JavaScript had no filesystem access. At least initially. And then it became a gaping security hole, but I digress.)

        Today, there exist command-line accessible versions of JavaScript but even there (I figure) most people wince and choose anything else instead. Maybe even Perl.

        But another definition of “scripting language” is “(any) interpreted programming language” and where it runs is unimportant.

        From that perspective, sure, JavaScript qualifies. And so does QBASIC.

        • shastaxc
          link
          fedilink
          71 year ago

          A script is just a file that can execute a series of commands without the need to compile

          • @[email protected]
            link
            fedilink
            2
            edit-2
            1 year ago

            They compile in some point of time because CPU don’t know shit about Javascript. But that is for some other discussion.

            Edit: typo

          • @[email protected]
            link
            fedilink
            11 year ago

            Are you referring to AOT compilation specifically? JavaScript in V8 is JIT compiled if it’s “hot” (executed enough that the cost of JIT compilation is less than the cost of continuing to run it in interpreted mode).

        • Sonotsugipaa
          link
          fedilink
          English
          11 year ago

          Hot take: A scripting language is a programming language whose execution starts from the beginning of the file | stream.

  • @[email protected]
    link
    fedilink
    471 year ago

    I am forced to try to get a JS certification.

    I am reaching the end of my rope, and starting to think of maybe putting my neck into one.

    Isaac Newton said that we see far because we stand on the shoulders of giants.

    Javascript is like standing on the shoulders of dwarves with brittle bone disease.

  • Destide
    link
    fedilink
    English
    351 year ago

    It leads to typescript

    You get surprises from npm

    • @[email protected]
      link
      fedilink
      281 year ago

      I spent way too long today figuring out why my app was doing something that it’s NOT supposed to do on weekends.

      I read Luxon’s docs (pretty cool lib tbh) again and again, and tried everything I could think of to get isWeekend to return a sane result.

      Turns out I was pulling a somewhat older version of Luxon, where isWeekend didn’t exist. In any sane language, I expect I’d get a huge warning about a property that doesn’t exist, but alas…

      Typescript helps me keep my sanity, but juuuuust barely.

      • kamen
        cake
        link
        fedilink
        51 year ago

        Weren’t you getting runtime errors for the function not being found?

          • shastaxc
            link
            fedilink
            2
            edit-2
            1 year ago

            Falsy* because it was undefined

            However, their IDE should have highlighted it as an unknown property. Guess this guy is coding in notepad or vi.

            • @[email protected]
              link
              fedilink
              21 year ago

              Yep, thanks for correcting me. In fact, if they write something like

              if (day.isWeekend) {...}
              

              The block will never be executed with the old version of library

              • shastaxc
                link
                fedilink
                21 year ago

                Yeah that’s exactly what I think happened to him. He needs a better IDE and/or needs to stop copy/pasting code from stackoverflow or documentation that doesn’t match his library version.

                • @[email protected]
                  link
                  fedilink
                  11 year ago

                  My dude, you need to understand that all that anger and resentment, it is not you. It’s the years of JavaScript poisoning your mind.

                  In any case, that goes to my point. I would have to be saved by my IDE, when any sane language will blow up in your face as soon as you try to run it.

      • @[email protected]
        link
        fedilink
        22
        edit-2
        1 year ago

        If isWeekend doesn’t exist, then the weekend doesn’t exist, so it’s naturally false.

        That’s why JavaScript gets pushed so hard - it’s part of the capitalist agenda to keep us working 7 days a week