Skip to content
DevMeme
2244 of 7435
Syntactic Quirks: The 'Not Equal' Club vs. Lua and Ruby
Languages Post #2499, on Dec 22, 2020 in TG

Syntactic Quirks: The 'Not Equal' Club vs. Lua and Ruby

Why is this Languages meme funny?

Level 1: The Odd One Out

Imagine you have a bunch of friends who all learned a secret handshake, except one silly friend who does a completely different move. Everyone else shakes hands the same way, but that one friend gives you a wacky high-five instead – it’s funny and a bit confusing! This meme is like that, but with computer languages. Almost all the programming languages are doing the same “not equal” sign (!= is like them all shaking hands). Then one language (Lua) comes along and uses a totally different sign (~= – like the wacky high-five). And another friend (Ruby) doesn’t even do a handshake at all, he says a special phrase “unless” (which is like using words instead of the handshake). It’s showing in a silly way that each language can have its own style. We laugh because the one friend doing it differently really stands out – it’s the odd one out in the group, and that surprise is what makes it funny and relatable, just like a goofy friend in a group of very serious friends.

Level 2: Syntax Switch-Ups

For a newer developer, let’s break down the syntax joke here. The meme shows a mythical Hydra (a dragon with many heads) where each head represents a programming language and how it writes “not equal to.” In coding, a comparison operator checks how two values relate — equality operators check if things are the same (== means “equals”), and inequality operators check if things are different. Most popular languages use the symbol != to mean “not equal.” That’s what we see on the first six Hydra heads:

  • Java uses !=
  • JavaScript uses != (and also !== for a stricter not-equal check)
  • C (and its relatives like C++ and C#), Python, Swift, and R all use != as well

Each of those heads in the image has the language’s icon and the != above it, showing they all agree on the same notation. != is basically combining “!” (which often means NOT in programming) and “=” (equals) to say “not equals.” So far so good, right?

Now, look at that goofy-faced seventh head with the Lua logo: above it is ~=, not !=. Lua decided to use a tilde character ~ instead of ! for its “not equal” operator. So in Lua, you’d write if a ~= b then ... when you want to say “if a is not equal to b.” This is a language quirk that often surprises people. If you’re used to !=, seeing ~= might make you do a double take. (Fun fact: another language, MATLAB, also uses ~= for not equal, and some older languages like Pascal or SQL use <> for the same idea. There’s more than one way to say “these two are not the same” in code!). The meme highlights Lua’s ~= by giving that Hydra head a silly, crossed-eyes expression — it’s the odd one out, the quirky head among the serious ones. It humorously visualizes the cognitive jumble a developer might face: “Six languages in a row all use !=… and then Lua throws a curveball with ~=!”

On the right side of the image, separate from the Hydra, there’s a green cartoon dinosaur head with the word “UNLESS” above a Ruby logo. This is referencing Ruby’s special keyword unless, which is basically a reversed if-statement. In most languages, if you want to run code only when a condition is false, you’d write something like if (!condition) {...} (in Ruby, that would be if !condition ... end). Ruby offers a more English-like way: you can say unless condition ... end, which reads like “do this unless the condition is true” (i.e. do this if the condition is false). It’s not an operator like != at all, but a control flow keyword. The meme artist included Ruby’s unless as a cheeky addition — it’s as if Ruby chimed in with “I have a unique way to handle negatives too!” The dinosaur visual and bold "UNLESS" text exaggerate how Ruby sometimes stands apart with its own syntax flavor.

So, in summary, this meme is a LanguageComparison of how different programming languages express “not equal.” All the icons and symbols above the Hydra heads show a mini syntax comparison:

Java, C, Python, JavaScript, Swift, R  ->  use  != 
Lua                                   ->  uses ~=   (tilde equals)
Ruby                                  ->  also uses != for not-equal, 
                                         but has an 'unless' keyword for negation in conditionals

For a newcomer, encountering these differences can be confusing. You might try to use != in Lua out of habit and the code won’t run because Lua expects ~=. Or you might see Ruby code with unless and need to remember it’s just a fancy way to say “if not.” This meme captures that feeling in a funny way: the hydra’s multiple heads are perfect for showing multiple languages side by side, and the one goofy head (Lua) plus the extra dino (Ruby) emphasize the odd ones out. It’s a playful reminder that programming syntax isn’t fully standardized – each language has its own little twists, and part of learning new languages is getting used to those syntax switch-ups. But once you know them, it’s actually kind of fun – like knowing hellos in different languages, you also learn all the ways to say “not equal” in code!

Level 3: One of These Is Not Equal

In this meme, a seven-headed Hydra represents a rebellion of programming languages over the humble “not equal” operator. Six dragon heads are stern and uniform, each labeled with a language logo (Java’s coffee cup, JavaScript’s JS, C’s blue hexagon, Python’s snake, Swift’s bird, R’s blue circle) and all proudly showing the != operator. But the seventh head – sporting the Lua logo – is the goofy, tongue-out rebel showing ~=. This one silly Hydra head instantly signals “one of these is not like the others.” For seasoned developers, it’s a hilarious sight: nearly every major language agrees on != for inequality (a minor miracle of consistency), and then Lua pops up using a totally different glyph, like it missed the memo from the C-family club. It’s a classic case of language quirks disrupting an almost universal convention. Anyone who’s hopped between languages knows the pain: you write a != out of habit, run your Lua code, and promptly get a syntax error – the programming equivalent of tripping on an unexpected step.

Why do these tiny syntax differences matter? Because switching contexts between languages can feel like battling a multi-headed Hydra. Solve one head (remember JavaScript’s !== vs != nuance), and another head snarls “in Lua it’s ~=!” The meme nails this polyglot headache through humor. Most languages (Java, C, Python, Swift, R, etc.) inherited != from the early C/ALGOL tradition, making != a near-orthodox standard for “not equal.” It’s concise and reads logically as “! (not) = (equals)”. But Lua, designed with its own syntax philosophy, decided on ~= for inequality. The tilde (~) often means bitwise NOT or “approximately” in math, so Lua’s choice is an oddball – hence the derpy-faced Hydra head. The seasoned dev chuckles because they’ve been caught by this before: Why isn’t my if x != y working in Lua? Oh right, tilde, not bang… It’s a gentle jab at how even simple comparisons aren’t immune to LanguageComparison gotchas.

And then there’s Ruby swooping in from the side panel – represented by a green cartoon dinosaur head – yelling “UNLESS” next to the Ruby gemstone logo. This is a meme-within-a-meme: Ruby isn’t bucking the inequality operator (Ruby uses != like the others), but Ruby adds its own cheeky negative conditional keyword, unless. In Ruby, you can write unless condition as a cleaner way to say “if NOT condition.” To a Rubyist, that’s elegant syntactic sugar; to others, it’s a quirky twist that feels as out-of-place as a dinosaur at a dragon party. Seasoned developers see the Ruby panel and grin, because it playfully exaggerates Ruby’s love of expressive syntax. It’s as if Ruby heard the “not equal” debate and said, “Hold my gemstone, I’ll do you one better – I have an unless!” The meme thus stacks two layers of humor: the Hydra of inequality operators, and Ruby the flamboyant outlier with a completely different English-like approach to negation.

All together, this image pokes fun at LanguageWars trivial and eternal – those debates and brain-farts over syntax differences that every dev encounters. The hydra’s unified != heads represent the comforting consistency we wish existed everywhere, and Lua’s tilde-head plus Ruby’s “unless” dino show how reality laughs at that consistency. The joke lands because it’s relatable: even the best programmers occasionally mix up these operators when hopping between projects. In the grand scheme, != vs ~= isn’t a critical bug – but in the moment, it can make you feel like you’re speaking the wrong dialect to your code. This meme says, “Don’t worry, we’ve all been there” – and it does so with a perfect visual metaphor that senior devs find both painfully true and irresistibly funny.

Description

An expanded version of the 'Ghidorah, the Three-Headed Monster' meme, comparing operators and keywords across programming languages. The first part features seven menacing, golden dragon heads, each with a programming language logo (Java, JavaScript, C, Python, Swift, R) and the standard '!=' (not equal) operator above them. This is followed by a goofy-looking dragon for Lua with its unique '~=' operator. An additional final panel on the far right shows a crazed, green dragon with a long tongue, the Ruby logo, and the word 'UNLESS' above it. The meme's humor works on two levels: it first highlights Lua as a quirky outlier for its 'not equal' syntax, then introduces Ruby's 'unless' keyword - a control flow statement that acts as a negative 'if' - as an even more bizarre and unconventional language feature, escalating the absurdity

Comments

7
Anonymous ★ Top Pick Using `unless` in Ruby is like trying to explain a double negative to a toddler. It's perfectly logical if you don't think about it too hard, but it's guaranteed to cause confusion in a crowded code review
  1. Anonymous ★ Top Pick

    Using `unless` in Ruby is like trying to explain a double negative to a toddler. It's perfectly logical if you don't think about it too hard, but it's guaranteed to cause confusion in a crowded code review

  2. Anonymous

    We’re fighting for coherent contracts across 200 microservices, yet six languages can’t even agree on “not-equal” - Lua lobs a “~=”, Ruby yells “unless”, and suddenly CAP theorem feels like the easy part

  3. Anonymous

    After 20 years in this industry, I've learned that Ruby's 'unless' is just syntactic sugar for "we couldn't agree on whether negative conditions should be readable, so we made them a language feature and called it philosophy."

  4. Anonymous

    Ruby developers: the only ones who think 'unless' is more readable than 'if not' and will defend it with the same fervor as their choice of do...end over curly braces. While other languages march in lockstep with conventional conditionals, Ruby devs are out here writing code that reads like Victorian English prose - because why be explicit when you can be *expressive*? The real joke is that after 20 years, we're still having the same argument about whether syntactic sugar that makes code read like natural language is brilliant or just makes onboarding new devs a linguistics course

  5. Anonymous

    Polyglot stacks are great - until a 3am incident has you grepping for '!=' while Lua’s using '~=' and the Ruby service hid it behind an 'unless'; SLOs meet human-factor latency

  6. Anonymous

    Other languages hoard syntax dragons; Ruby generously shares its gems

  7. Anonymous

    Polyglot monorepo life: six services agree on !=, Lua shows up with ~=, and Ruby drops “unless a == b” - proof that grep, linters, and humans each debug different layers of ambiguity

Use J and K for navigation