Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
Zerush ( Zerush@lemmy.ml )  to Memes@lemmy.ml · 2 years ago

Destroying friendship

file.coffee

message-square
10
link
fedilink
327

Destroying friendship

file.coffee

Zerush ( Zerush@lemmy.ml )  to Memes@lemmy.ml · 2 years ago
message-square
10
link
fedilink
alert-triangle
You must log in or # to comment.
  • Brickardo ( Brickardo@feddit.nl ) 
    link
    fedilink
    arrow-up
    39
    ·
    2 years ago

    Why, of all possible languages, would you suggest this for Javascript where semicolons are not mandatory

    • ulkesh ( ulkesh@beehaw.org ) 
      link
      fedilink
      English
      arrow-up
      21
      ·
      2 years ago

      Not only that, the interpreter will point directly to the line of code and possibly to the exact character that is the problem. Any programmer worth anything would find the issue or, worst case, retype the line of code and have the problem fixed rather quickly. “Illegal character” is a pretty easy error to diagnose.

      But…I still chuckled a little at the intent of the joke. I’m sure there are better pranks one could come up with, though.

    • Zerush ( Zerush@lemmy.ml ) OP
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      Ask the author of this meme.

  • phorq ( phorq@lemmy.ml ) 
    link
    fedilink
    Español
    arrow-up
    24
    ·
    2 years ago

    Even better would be to remap their keyboard’s semicolon key to that symbol

    • я не из калининграда ( imnotfromkaliningrad@lemmy.ml ) 
      link
      fedilink
      arrow-up
      9
      ·
      2 years ago

      you are a criminal.

  • fubarx ( fubarx@lemmy.ml ) 
    link
    fedilink
    arrow-up
    10
    ·
    2 years ago

    MSVC supports unicode. In C or C++, you could try:

    #define ; ;

    Second one is the greek semicolon but the client I’m using may strip it out. I’m too lazy to try.

    • PM_ME_VINTAGE_30S [he/him] ( PM_ME_VINTAGE_30S@lemmy.sdf.org ) 
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 years ago

      Running #define ; anything yields error: macro names must be identifiers for both C and C++ in an online compiler. So I don’t think the compiler will let you redefine the semicolon.

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

        Haha. Thanks for checking. Given the C pre-processor, I’m sure there’s a way to maliciously bork it if someone sets their mind to it.

        • PM_ME_VINTAGE_30S [he/him] ( PM_ME_VINTAGE_30S@lemmy.sdf.org ) 
          link
          fedilink
          English
          arrow-up
          2
          ·
          2 years ago

          Well I just tried #define int void in C and C++ before a “hello world” program. C++ catches it because main() has to be an int, but C doesn’t care. I think it is because C just treats main() as an int by default; older books on C don’t even include the “int” part of “int main()” because it’s not strictly necessary.

          #define int void replaces all ints with type void, which is typically used to write functions with no return value.

    • Sailing7 ( Sailing7@lemmy.ml ) 
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      I’m not sure but I think the second one looks just a tiny bit different, so it should have worked.

Memes@lemmy.ml

memes@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: !memes@lemmy.ml

Rules:

  1. Be civil and nice.
  2. Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.
Visibility: Public
globe

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

  • 1 user / day
  • 1 user / week
  • 1.51K users / month
  • 5.35K users / 6 months
  • 1.36K local subscribers
  • 57.2K subscribers
  • 10.8K Posts
  • 84.6K Comments
  • Modlog
  • mods:
  • ghost_laptop ( gary_host_laptop@lemmy.ml ) 
  • Cyclohexane ( cyclohexane@lemmy.ml ) 
  • Arthur Besse ( cypherpunks@lemmy.ml ) 
  • BE: 0.19.15
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code