No offence

  • monk@lemmy.unboiled.info
    link
    fedilink
    arrow-up
    7
    arrow-down
    15
    ·
    1 year ago

    Let me suggest a simple exercise for you.

    1. Print “Hello world!” to stdout in Javascript.
    2. Show me the standard that guarantees that everything you’ve used exists and works as intended.

    I’ll wait.

    • masterspace@lemmy.ca
      link
      fedilink
      arrow-up
      9
      arrow-down
      1
      ·
      1 year ago

      Show me the standard that guarantees that everything you’ve used exists and works as intended. I’ll wait.

      I think you fail to understand the very basics of web development if you’re operating on the assumption that everything you need is always reachable.

      • monk@lemmy.unboiled.info
        link
        fedilink
        arrow-up
        3
        arrow-down
        3
        ·
        1 year ago

        I think you’re misunderstanding what “everything” means (it was “everything needed for a hello world”) and trying to divert the discussion to whatever Web has devolved into, which is an abomination that’s definitely unsuited for learning the ropes of software development.

    • Feathercrown@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      In the browser you cannot access stdout, but you can use console.log to write to the dev console which is basically the same thing.

      In Node, you can use process.stdout.

      Both are available from the top-level globalThis objects that are part of each platform’s respective default library.

      • monk@lemmy.unboiled.info
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        And in GJS? All other runtimes?

        In, say, C, such basic stuff is right there, in the standard.

        Javascript isn’t even standardized, some ECMAScript is, so I don’t even know what we’re talking about.

        • Feathercrown@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          11 months ago

          All ECMAScript is standardized because that refers to the standard.

          I think you’re discounting the different environments that JS runs in. Something like C runs in a much more uniform environment (the OS) while JS must be able to run in different runtimes. It’s like how windows has APIs that C can access, but obviously you can’t access them when running C from other OSes (forgive me if that’s inaccurate, I don’t use C often).