• Artyom@lemm.ee
    link
    fedilink
    arrow-up
    9
    arrow-down
    1
    ·
    14 hours ago

    Remember the meme where all the parentheses are on the right hand side? This meme is the same.

  • SubArcticTundra@lemmy.ml
    link
    fedilink
    arrow-up
    56
    ·
    1 day ago

    Oooh, that is tempting. The main pain would be center justifying the code. Perhaps if it was left justified…

      • Flipper@feddit.org
        link
        fedilink
        arrow-up
        3
        ·
        4 hours ago

        I got something better for you.

        namespace 🔵 = std;
        using 🔢 = int;
        using 💀 = void;
        using 🕖 = time_t;
        using 👌 = bool;
        #define 👂 auto
        #define 🎌 enum
        #define 👎 false
        #define 👍 true
        #define 👹 "evil"
        #define 💪 🔵::make_shared
        #define 🍸 virtual
        #define 🖥️ 🔵::cout
        #define 🔫 🔵::endl
        template<class 🔮>
        using 📚 = 🔵::vector<🔮>;
        template<class 🔮>
        using 👇 = 🔵::shared_ptr<🔮>;
        
        🎌 🐒 { 🐵, 🙈, 🙉, 🙊 };
        🔢 🎲() { return 🔵::rand(); }
        👌 😎() { return 👎; }
        
        struct 🍴 { 🍸 💀 👀() = 0; };
        struct 🍊 : 🍴 { 🍸 💀 👀() { 🖥️ << "🍊" << 🔫; }; };
        struct 🍉 : 🍴 { 🍸 💀 👀() { 🖥️ << "🍉" << 🔫; }; };
        struct 🍒 : 🍴 { 🍸 💀 👀() { 🖥️ << "🍉" << 🔫; }; };
        struct 🍓 : 🍴 { 🍸 💀 👀() { 🖥️ << "🍓" << 🔫; }; };
        struct 🍍 : 🍴 { 🍸 💀 👀() { 🖥️ << "🍍" << 🔫; }; };
        struct 🍅 : 🍴 { 🍸 💀 👀() { 🖥️ << "🍅" << 🔫; }; };
        
        🔢 main()
        {
            if(😎() == 👎)
                🖥️ << "💩" << 🔫;
        
            📚<👇<🍴>> 🍛 = { 💪<🍊>(), 💪<🍉>(), 💪<🍒>(), 💪<🍍>(), 💪<🍅>() };
         
            for (👂 🍏 : 🍛)
                🍏->👀();
        
            return 🎲();
        }
        
  • funkless_eck@sh.itjust.works
    link
    fedilink
    arrow-up
    8
    ·
    1 day ago

    super minor but I always preferred to define fizzbuzz as modulo 3*5 to show adherence to the instructions in the readability of the code without having to think about why

  • stingpie@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    1 day ago

    You could do this in basic ASCII, with only three defines. replace "_ " with “{”, replace “_;” with “}”, and “_” with nothing. If your compiler processes macros in the correct order, it will become valid code. (You would use semicolons as the vertical lines)

  • notabot@lemm.ee
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    1 day ago

    Have they #defined out the equals symbol? I don’t think that for loop is going to compile.

      • notabot@lemm.ee
        link
        fedilink
        arrow-up
        1
        ·
        1 day ago

        The #define = line would mean the = would be effectively removed, rendering the for a syntax error. That is, assuming it is an equals sign they’ve redefined, and not similar looking character.

        • lime!@feddit.nu
          link
          fedilink
          English
          arrow-up
          14
          ·
          edit-2
          1 day ago

          that’s not a =, it’s a ═ (U+2550 BOX DRAWINGS DOUBLE HORIZONTAL). you can tell because == doesn’t connect but ══ does.

          • notabot@lemm.ee
            link
            fedilink
            arrow-up
            3
            ·
            1 day ago

            Fair point, I wasn’t sure it was the equals, hence my initial question. Drawing boxes with the box drawing characters does make a lot more sense.

        • _____@lemm.ee
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 day ago

          It looks like a different symbol of you were to compare the characters length in pixels

          the equals and the horizontal double bars seem different to me.