Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
siriusmart ( siriusmart@lemmy.ml )  to Programmer Humor@lemmy.ml · 3 years ago

the hardest exam question

lemmy.ml

message-square
28
link
fedilink
402

the hardest exam question

lemmy.ml

siriusmart ( siriusmart@lemmy.ml )  to Programmer Humor@lemmy.ml · 3 years ago
message-square
28
link
fedilink
alert-triangle
You must log in or # to comment.
  • MsFlammkuchen ( MsFlammkuchen@lemmy.blahaj.zone ) 
    link
    fedilink
    arrow-up
    40
    ·
    3 years ago
    1. It’s not PHP.
    2. I don’t know. I didn’t think I’d get this far.
    • bastion ( bastion@feddit.nl ) 
      link
      fedilink
      arrow-up
      18
      ·
      3 years ago
      • It’s not PHP
      • It’s already implemented in browsers
    • Hexarei ( Hexarei@programming.dev ) 
      link
      fedilink
      arrow-up
      14
      ·
      3 years ago

      PHP has gotten really good over the past few versions, actually. Lots of really great stuff has been added, it feels like it resembles rust more every release lol

      • CarrotsHaveEars ( racketlauncher831@lemmy.ml ) 
        link
        fedilink
        arrow-up
        1
        ·
        3 years ago

        PHP10: We now allow interop with Rust!

        PHP11: We now allow writing code directly in a .php file and compile it with rustc.

        • Hexarei ( Hexarei@programming.dev ) 
          link
          fedilink
          arrow-up
          1
          ·
          3 years ago

          Can’t forget the intermediate step of PHP 9: PHP borrow checker

  • Tenkard ( Tenkard@lemmy.ml ) 
    link
    fedilink
    arrow-up
    36
    ·
    3 years ago
    1. You can call it “Java” to enrage other programmers
    2. You can compare numbers against strings without wasting time converting them
    • nxdefiant ( nxdefiant@startrek.website ) 
      link
      fedilink
      arrow-up
      2
      ·
      3 years ago

      The scripting language formerly known as Java.

  • AVincentInSpace ( AVincentInSpace@pawb.social ) Banned from community
    link
    fedilink
    English
    arrow-up
    36
    ·
    3 years ago
    1. It runs in the browser
    2. Web developers know it already so we might as well
  • mokus ( mokus@lemmy.blahaj.zone ) 
    link
    fedilink
    arrow-up
    35
    ·
    3 years ago
    1. Job security
    2. its not COBOL
    • RichieRich ( RichieRich@feddit.de ) 
      link
      fedilink
      arrow-up
      1
      ·
      3 years ago

      deleted by creator

  • Fargeol ( Fargeol@lemmy.ml ) 
    link
    fedilink
    arrow-up
    22
    ·
    3 years ago

    1 - Easiest way to run a script in your browser
    2 - Always finds its way if inputs are bad
    Nan - undefined

    • space ( space@lemmy.dbzer0.com ) 
      link
      fedilink
      arrow-up
      1
      ·
      3 years ago

      Easiest? More like… The only way.

  • Destide ( sirico@feddit.uk ) 
    link
    fedilink
    English
    arrow-up
    21
    ·
    3 years ago

    It leads to typescript

    You get surprises from npm

  • xilliah ( xilliah@beehaw.org ) 
    link
    fedilink
    arrow-up
    19
    ·
    edit-2
    2 years ago

    deleted by creator

    • BorgDrone ( BorgDrone@lemmy.one ) 
      link
      fedilink
      arrow-up
      14
      ·
      3 years ago

      That’s Java, not Javascript. Java is to javascript as ham is to hamster.

      • xilliah ( xilliah@beehaw.org ) 
        link
        fedilink
        arrow-up
        5
        ·
        edit-2
        2 years ago

        deleted by creator

        • BorgDrone ( BorgDrone@lemmy.one ) 
          link
          fedilink
          arrow-up
          6
          ·
          3 years ago

          Or car to carpet

          Or fun to funeral

          • xilliah ( xilliah@beehaw.org ) 
            link
            fedilink
            arrow-up
            3
            ·
            edit-2
            2 years ago

            deleted by creator

  • KillingTimeItself ( KillingTimeItself@lemmy.dbzer0.com ) Banned
    link
    fedilink
    English
    arrow-up
    13
    ·
    3 years 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”

    • inetknght ( inetknght@lemmy.ml ) 
      link
      fedilink
      arrow-up
      4
      ·
      3 years 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 ( KillingTimeItself@lemmy.dbzer0.com ) Banned
        link
        fedilink
        English
        arrow-up
        2
        ·
        3 years ago

        everything is a scripting language if you try hard enough.

  • lowleveldata ( lowleveldata@programming.dev ) 
    link
    fedilink
    arrow-up
    13
    ·
    3 years ago

    await and async

  • kevincox ( kevincox@lemmy.ml ) 
    link
    fedilink
    arrow-up
    12
    ·
    3 years ago
    1. Is available to be used in website scripting.
    2. Not quite as full of footguns as PHP (although it is close).
  • Thann ( Thann@lemmy.ml ) 
    link
    fedilink
    English
    arrow-up
    12
    ·
    3 years ago
    1. Its not java
    • ulkesh ( ulkesh@beehaw.org ) 
      link
      fedilink
      English
      arrow-up
      7
      ·
      3 years ago

      Which is a blessing for Java.

  • ColeSloth ( ColeSloth@discuss.tchncs.de ) 
    link
    fedilink
    arrow-up
    11
    ·
    3 years ago

    A lot of people are familiar with it and…um…hackers like it being in use?

  • sincle354 ( sincle354@kbin.social ) 
    link
    fedilink
    arrow-up
    9
    ·
    3 years ago

    We have forced it, quite hamfistedly, to do anything. The organic hell-evolution of web browsers turned them into do-anything sandboxed mini-OS. It meant whatever hellish code you used to write your corporate mandated web app could now become a perfectly bloated standalone application. And the demonic language that would enable it was called Javascript. It does the backend and it does the frontend. You could consider those advantages over other devices, like toasters and those handheld electronic games from the 80s.

  • heavyboots ( heavyboots@lemmy.ml ) 
    link
    fedilink
    English
    arrow-up
    6
    ·
    3 years ago

    Browsers love it!

    Practically anything you write will execute without all that scope and well formed statements nonsense.

    Mind you, number 2 is also its biggest flaw as well, but…

  • Darken ( Darken@reddthat.com ) 
    link
    fedilink
    arrow-up
    6
    ·
    3 years ago

    deleted by creator

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 41 users / week
  • 50 users / month
  • 1.6K users / 6 months
  • 871 local subscribers
  • 43.7K subscribers
  • 1.25K Posts
  • 10.3K Comments
  • Modlog
  • mods:
  • AgreeableLandscape ( AgreeableLandscape@lemmy.ml ) 
  • cat_programmer ( cat_programmer@lemmy.ml ) 
  • UI: 0.19.15
  • BE: 0.19.21
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code