Open Menu
AllLocalCommunitiesAbout
lotide
AllLocalCommunitiesAbout
Login

Anon is a math prodigy

⁨349⁩ ⁨likes⁩

Submitted ⁨⁨5⁩ ⁨months⁩ ago⁩ by ⁨bluelion@sh.itjust.works⁩ to ⁨greentext@sh.itjust.works⁩

Image

source

Comments

Sort:hotnewtop
  • lime@feddit.nu ⁨5⁩ ⁨months⁩ ago

    how tf would a missing semicolon result in a http server error

    source
    • joyjoy@lemm.ee ⁨5⁩ ⁨months⁩ ago

      File fails to compile, web server tries to run the file, error.

      source
      • sugar_in_your_tea@sh.itjust.works ⁨5⁩ ⁨months⁩ ago

        Nodejs exists. Here’s a JS snippet that would throw an exception:

        for (x = 0; x < 5 x++)
        {} 
        
        source
      • echodot@feddit.uk ⁨5⁩ ⁨months⁩ ago

        If the file failed to compile the server wouldn’t execute it because a file wouldn’t be created. A compile error stops the process, It doesn’t result in a corrupted output, since that would be really stupid.

        source
        • -> View More Comments
      • lime@feddit.nu ⁨5⁩ ⁨months⁩ ago

        if your server runs user-submitted code server side, that’s a paddlin

        source
        • -> View More Comments
    • merc@sh.itjust.works ⁨5⁩ ⁨months⁩ ago

      If the web server is implemented in any of the languages that require semicolons.

      source
      • lime@feddit.nu ⁨5⁩ ⁨months⁩ ago

        why would you demo a for loop with a web server

        source
        • -> View More Comments
  • echodot@feddit.uk ⁨5⁩ ⁨months⁩ ago

    What programming language returns a 500 error because it fails?

    A 500 area is a critical server failure, It isn’t something that can happen because a piece of JavaScript failed.

    source
    • kuberoot@discuss.tchncs.de ⁨5⁩ ⁨months⁩ ago

      Maybe PHP? Since it runs as a server and returns computed results in a browser… Though I’m pretty sure it’d just return the compiler error text

      source
      • echodot@feddit.uk ⁨5⁩ ⁨months⁩ ago

        Php outputs HTML at the end of the process. If it didn’t run because of a missing semicolon it would just output an error. It wouldn’t crash

        source
        • -> View More Comments
    • merc@sh.itjust.works ⁨5⁩ ⁨months⁩ ago

      Any programming language that runs on the web server and doesn’t gracefully handle its errors. There are many web servers implemented in Javascript, but it could also be Java, it could be Perl, it could even be C/C++ if someone is being masochistic.

      source
      • taladar@sh.itjust.works ⁨5⁩ ⁨months⁩ ago

        Couldn’t be a compiled language, those wouldn’t even get to the point where you send a request.

        source
    • sugar_in_your_tea@sh.itjust.works ⁨5⁩ ⁨months⁩ ago

      Javascript also exists on the server, and an exception would cause a 500 error. Semicolons are optional in JavaScript, except for a handful of cases. One of those is in a for loop. I’m guessing the professor was running a nodejs app and did something like this (intentionally bad style because professor):

      for (x = 0; x < 5 x++)
      {} 
      return x
      

      Boom, syntax error, which would return a 500 air status in a nodejs web server framework.

      source
    • Amir@lemmy.ml ⁨5⁩ ⁨months⁩ ago

      Old IIS versions with PHP would do this when running in production mode. Talking about 2010-2012

      source
      • davidagain@lemmy.world ⁨5⁩ ⁨months⁩ ago

        IIS. That brought back bad memories.

        source
  • BatrickPateman@lemmy.world ⁨5⁩ ⁨months⁩ ago

    Intro to IT on some webform stuff is truly the darkest timeline.

    Where have the good old times gone when peeps were tortured with plain C in some atrocious outdated IDE from the ancient times?!

    source
    • ICastFist@programming.dev ⁨5⁩ ⁨months⁩ ago

      Ugh, I don’t want to touch codeblocks again

      source
  • anothercatgirl@lemmy.blahaj.zone ⁨5⁩ ⁨months⁩ ago

    I do that too forotheer subjects

    source