tchncs
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Shady_Shiroe@lemmy.world to Programmer Humor@lemmy.ml · 2 年前

War Crimes

lemmy.world

message-square
36
link
fedilink
740

War Crimes

lemmy.world

Shady_Shiroe@lemmy.world to Programmer Humor@lemmy.ml · 2 年前
message-square
36
link
fedilink
alert-triangle
You must log in or # to comment.
  • fri@compuverse.uk
    link
    fedilink
    arrow-up
    91
    ·
    2 年前

    Looks like it creates a few emoji printers in a vector, then prints them all. The output is all emoji, of course. The main function exits with a random return value just to be more quirky.

    I’m not sure what the purpose of the 😎 function is. In main that first predicate is always true, so it prints the poop emoji. I don’t know why it’s behind an if.

    Also, there’s a copy-paste error on line 31. Wrong emoji is used.

    • randomuser38529@lemmy.world
      link
      fedilink
      arrow-up
      30
      ·
      2 年前

      This guy emotes ᕦ(ò_óˇ)ᕤ

  • SouthernCanadian@sh.itjust.works
    link
    fedilink
    arrow-up
    51
    arrow-down
    1
    ·
    2 年前

    Wow that’s horrible. They’re using c++.

    • zib@kbin.social
      link
      fedilink
      arrow-up
      33
      ·
      2 年前

      If you really need some nightmare fuel, some of us use c++ every day and even enjoy it.

      • pwalker
        link
        fedilink
        arrow-up
        3
        ·
        2 年前

        it’s hard to believe…

  • erogenouswarzone@lemmy.ml
    link
    fedilink
    arrow-up
    39
    arrow-down
    2
    ·
    edit-2
    2 年前

    It would be great to use some emojis in coding.

    Imagine how much more readable it would be if you could break a loop with 💀 or return true with 👍. Or use ❓for ifs, or ↔️ for switch (the emoji didn’t work for that one). Or use an emoji to represent a custom object?

    Maybe the ECMA should get on that!

    Edit: I guess you can use emojis for custom objects in js.

    Edit 2: ➡ for console.log

    • SubArcticTundra@lemmy.ml
      link
      fedilink
      arrow-up
      8
      ·
      2 年前

      You’d still be left with the brackets and braces though. It might make more sense in a whitespace-based language pike Python

      • erogenouswarzone@lemmy.ml
        link
        fedilink
        arrow-up
        6
        arrow-down
        1
        ·
        2 年前

        I see your point. Personally, I like the brackets and braces, they help organize. Or maybe that’s just what I’m used to.

    • jimmux@programming.dev
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      2 年前

      Programming typefaces with ligatures are a step in this direction.

      I would try this in something like Haskell, where some of the more exotic character sequences get tricky to recognise.

      Unison might be the best language to test this in. Having identifiers separate from the actual definitions, you can call anything whatever you want.

    • aard@kyu.de
      link
      fedilink
      arrow-up
      2
      ·
      2 年前

      emacs lisp already lets you use the full range of unicode.

      • erogenouswarzone@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        2 年前

        Sorry, I meant ECMAScript

    • HxD@mastodon.sdf.org
      link
      fedilink
      arrow-up
      1
      ·
      2 年前

      @erogenouswarzone
      https://github.com/StavromulaBeta/emoji-apl
      @Shady_Shiroe

  • balance_sheet@lemmy.world
    link
    fedilink
    arrow-up
    20
    ·
    edit-2
    2 年前

    deleted by creator

  • magic_lobster_party@kbin.social
    link
    fedilink
    arrow-up
    18
    ·
    2 年前

    💩
    🍊
    🍉
    🍉
    🍍
    🍎

  • sznio@lemmy.world
    link
    fedilink
    arrow-up
    18
    arrow-down
    1
    ·
    2 年前

    Surprisingly more readable than standard C++

  • RagnarokOnline@reddthat.com
    link
    fedilink
    arrow-up
    15
    ·
    2 年前

    I didn’t bother trying to see what an output would be, but this is a nightmare.

    • Rai@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      2
      ·
      2 年前

      Oh no, now I’m going to notice you in, like, every thread!

      • RagnarokOnline@reddthat.com
        link
        fedilink
        arrow-up
        2
        ·
        2 年前

        Hahaha, I’m inevitable! The nostalgia is too powerful!

  • ArtisinalBS@lemm.ee
    link
    fedilink
    arrow-up
    11
    ·
    2 年前

    Is 👀 even defined?

    • CaptainJack42
      link
      fedilink
      arrow-up
      15
      ·
      2 年前

      Yes, line 28 defines 🍴which defines 👀 and all the structs inherit from 🍴

      • jasondj@ttrpg.network
        link
        fedilink
        arrow-up
        10
        ·
        2 年前

        Brand new sentence.

  • nothacking
    link
    fedilink
    arrow-up
    11
    ·
    edit-2
    1 个月前

    deleted by creator

  • Zuberi 👀@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    10
    ·
    2 年前

    Genius honestly

  • kspatlas@artemis.camp
    link
    fedilink
    arrow-up
    10
    ·
    2 年前

    https://esolangs.org/wiki/Emoji

  • flashgnash@lemm.ee
    link
    fedilink
    arrow-up
    10
    ·
    2 年前

    Now imagine the poor sod who gets this as an interview question

    “Please extend the following code in the same code style to sort [😀,😃,😄,😁,😆] using bubble sort”

  • xigoi@lemmy.sdf.org
    link
    fedilink
    arrow-up
    7
    ·
    2 年前

    http://emojicode.org/

    • balance_sheet@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      2 年前

      deleted by creator

  • SpeakinTelnet@sh.itjust.works
    link
    fedilink
    arrow-up
    6
    ·
    2 年前

    Mojo prepared me for this with their filename extension .🔥

  • heimchen
    link
    fedilink
    arrow-up
    5
    ·
    2 年前

    Assembly but the commands are emojies🤯

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.

  • 110 users / day
  • 857 users / week
  • 2.2K users / month
  • 7.12K users / 6 months
  • 842 local subscribers
  • 39.5K subscribers
  • 1.95K Posts
  • 40.4K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.14
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org