462
top 31 comments
sorted by: hot top controversial new old
[-] SubArcticTundra@lemmy.ml 57 points 2 months ago

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

[-] Gobbel2000@programming.dev 44 points 2 months ago

Clearly we need self-centering support from editors.

[-] SubArcticTundra@lemmy.ml 25 points 2 months ago

Just one more reason to do your coding in Word.

[-] DragonTypeWyvern@midwest.social 3 points 2 months ago

Technically that is a reason

[-] kuberoot@discuss.tchncs.de 7 points 2 months ago

I think the main pain would be manually aligning the frames on every line with every change, occasionally having to extend the width and updating every line of code to match it

[-] SpaceNoodle@lemmy.world 28 points 2 months ago

My employer's CI rejects extended ASCII characters :(

[-] Ghoelian@lemmy.dbzer0.com 7 points 2 months ago* (last edited 2 months ago)

Really? You never use the occasional   or something?

Edit: my client actually parses the space lol

[-] Ghoelian@lemmy.dbzer0.com 3 points 2 months ago

Just remembered not all projects have a web interface or an interface at all

[-] SpaceNoodle@lemmy.world 1 points 2 months ago

Backslashes are not extended ASCII

[-] AnUnusualRelic@lemmy.world 2 points 2 months ago

That's normal, you should just use Unicode in that case.

[-] SpaceNoodle@lemmy.world 5 points 2 months ago
[-] AnUnusualRelic@lemmy.world 0 points 2 months ago

Feel free to encode it whichever way suits you best.

[-] SpaceNoodle@lemmy.world 2 points 2 months ago

Unless it's ISO 8859-1, apparently.

[-] AnUnusualRelic@lemmy.world -1 points 2 months ago

I'm not sure if you're completely up to date on this whole Unicode thing.

[-] SpaceNoodle@lemmy.world 3 points 2 months ago

I'm not sure if you're completely up-to-date on this whole encoding thing.

[-] Flipper@feddit.org 22 points 2 months ago

This only half as bad as the emoji soup macros

[-] some_random_nick@lemmy.world 1 points 2 months ago
[-] Flipper@feddit.org 9 points 2 months 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 ๐ŸŽฒ();
}
[-] some_random_nick@lemmy.world 2 points 2 months ago
[-] Artyom@lemm.ee 11 points 2 months ago

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

[-] irelephant@programming.dev 10 points 2 months ago

This would musk to write, but is honestly really readable.

[-] funkless_eck@sh.itjust.works 9 points 2 months 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

[-] ryannathans@aussie.zone 6 points 2 months ago

Mmm I think they are missing == 0

[-] stingpie@lemmy.world 8 points 2 months ago* (last edited 2 months 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 3 points 2 months ago

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

[-] SteveTech@programming.dev 24 points 2 months ago

The symbol they defined out is not the equals symbol but rather U+2550, so the for loop is fine.

[-] lime@feddit.nu 3 points 2 months ago
[-] notabot@lemm.ee 1 points 2 months 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 15 points 2 months ago* (last edited 2 months 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 3 points 2 months 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 1 points 2 months 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.

this post was submitted on 09 May 2025
462 points (99.1% liked)

Programmer Humor

25448 readers
924 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS