Please dont take this seriously guys its just a dumb meme I haven’t written a single line of code in half of these languages

palordrolap
link
fedilink
11
edit-2
8M

Over the top tone: “Pretty sure that won’t compile. $EVAL_ERROR modulo what you get from the filehandle called = isn’t an lvalue that can be put through the Goatse operator that I’m aware of.”

But seriously(?), I’m almost certain that’s not how that would be parsed. = isn’t a valid bareword, so Perl would choke on the spaceship operator not being a term… I think.

After testing… It’s worse. I think it’s parsing <> as the glob operator and = as a filespec.

For those who don’t know Perl:

Because of its appearance, <=> really is called the spaceship operator (at least, when it can be parsed as an operator and not whatever happened above).

=()= by comparison has unofficially been called Goatse. If you don’t know what Goatse is, find out at your own risk. If you do know, you can see why this particular pseudo-operator was given that name.

And if you’re still reading, =()= is a pseudo-operator because it’s not actually parsed as part of the syntax. It’s literally an assignment operator = followed by an empty list () followed by another assignment operator =, providing list context to the outside of the equals signs that wouldn’t otherwise be there.

[Why are you still still reading?] Context is important in Perl. If a function returns a list of values (which is something Perl functions can do) and you try to store the result in a scalar variable, replacing the usual = with =()= will store the number of elements returned rather than the last element of the list.

@neidu2@feddit.nl
link
fedilink
8
edit-2
8M

It’s not supposed to be compilable. It’s more intended as a list of weird looking (but valid and useful) perl stuff.

As for the goatse operator, I’ve mostly used it for counting amount of regex matches.

Oh, and I forgot the diamond operator. Added.

Create a post

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.
  • 1 user online
  • 144 users / day
  • 303 users / week
  • 694 users / month
  • 2.83K users / 6 months
  • 1 subscriber
  • 1.56K Posts
  • 34.7K Comments
  • Modlog