The last thing you usually suspect, is that the system call is wrong. So you spend a lot of time investigating everything else. I like a good prank - they usually work by the prankster being around and ready to step in, if the joke goes too far. Not what happens, if you deploy the prank worldwide. There are worse things for sure, but still this is not something I can applaud. I wasted too much time on other useless shit. so I would likely not be amused having my time wasted some more by someone thinking he is funny.
And truthfully, a consistent repeatable bug, in software intended for human consumption (man in shell scripts would be at least a little weird, like vim in shell scripts) is not so bad really.
And midnight isnt so late, I have a heritage of systems administration, all kinds of things happen at 3-4am; its a good feeling to debug and prevent them.
How could they find joy with such a joke?
You can spray paint railway infrastructure - you still will be chased out and even might get shot at.
If you do the same on random wall in the park you might at worst be scolded by someone and be chased out by police but most likely not shot at.
Basic OS tools like man are more like railway infrastructure. So for me Easter eggs belong in games or something like restaurant web site or online forum like hn.
By that logic, the maintainers of man, who hold the copyright, and merely license it to you, have the same right.
Don't like it? They were generous enough to release it under terms where you can compile a fork without the joke in it.
Apparently they decided that being harassed by humorless scolds was more hassle than just removing the joke. Many such cases.
But it also sucks. Steamrolling all the whimsy out of FOSS sucks. Everyone who takes umbrage at whimsy and easter eggs, hassling maintainers about it, is a thief of joy.
It is also the same on HN if you make “witty comment” you are going to be sent back to Reddit so is HN community thief of joy and bunch of dolldrums?
I guess not - but also not every easter egg is art and most are not and one we are discussing is pretty much “go on Reddit with that” level of art.
$ apt | tail -1
This APT has Super Cow Powers.
$ apt moo
(__)
(oo)
/------\/
/ | ||
* /\---/\
~~ ~~
..."Have you mooed today?"...
Also, aptitude: $ aptitude --help | tail -1
This aptitude does not have Super Cow Powers.
$ aptitude moo
There are no Easter Eggs in this program.
$ aptitude -v moo
There really are no Easter Eggs in this program.
$ aptitude -vv moo
Didn't I already tell you that there are no Easter Eggs in this program?
$ aptitude -vvv moo
Stop it!
$ aptitude -vvvv moo
Okay, okay, if I give you an Easter Egg, will you go away?
$ aptitude -vvvvv moo
All right, you win.
/----\
-------/ \
/ \
/ |
-----------------/ --------\
----------------------------------------------
$ aptitude -vvvvvv moo
What is it? It's an elephant being eaten by a snake, of course.If you absolutely must write an Easter egg, put it in the “About” screen or the command line usage string or something… not in the program’s primary output.
Easter eggs is an element of controlled chaos.
I wouldn’t want my home builder to insert an Easter egg that causes my windows to open randomly in the middle of the night on one day of the year because he found it “joyful.”
If bit flips become more common as transistors get smaller, that’s certainly going to throw a much less controlled wrench in the works.
And something like this printing out in error could indicate that you have been compromised and you should lock down everything. Verify that you full system is clean and go through all of the logs.
A way of making sure your binaries are trusted is supply chain security, which starts with not obtaining them through unvetted sources. If in that situation a known-trusted man says a funny joke at midnight, your spidey senses would not be triggered.
In other words, if there is a way for suspect binaries to get into your system, you have a bigger problem. If there is no such way, you can be sure it’s benign behaviour, a bug in the program, an Easter egg, or even a bit flip or some unlikely interaction of factors. If you are not sure whether you have eliminated all such ways, sure, it might seem like a cause for worry—however, I don’t think attackers you should really worry about would try to make themselves noticed through jokes with Western cultural references (or through any jokes for that matter, or in any way at all).
Occurring with -w was a bug that happened to be located in the easter egg code. It wasn't the actual easter egg. If you hit it as intended, you do have bigger things to worry about.
So you could argue that it's bad to have extra lines of code because that's 0.01% more space for bugs to hide in, but 0.01% extra code is hardly something to launch objections over. Nothing about that is easter egg specific.
I would suggest not relying on some joker’s code and write your own instead.
Open source is open source. That’s all that’s promised, and we aren’t entitled to anything more.
To me, software is a community effort. Communities are made of people, and people have gloriously many motivations for their work. A spirit of play is one of those motivations, and I'm glad people honor it. Yes, it shouldn't cause much trouble along the way. But that's not because of some theory about what software it's for. It's because of the people.
The expected behavior is described there.
For starters the user of 'man' is an interactive unix user. Other than really unusual edge cases (eg processes which produce printed versions of the unix manual, and the test scripts of the OP in the stackexchange) there are no non-interactive or batch uses of man, it isn't used in pipelines or scripts etc.
Whereas grep is a staple of batch processes, scripts, cronjobs large and small as well as being a key tool for interactive use.
I would be very annoyed if the Tarsnap website was broken because someone decided to throw in an Easter egg and make the output occasionally inconsistent.
If anyone reading this is ever considering putting in an Easter egg like this: Please check if stdout is a terminal! If your output is going to a terminal, it's probably safe to be silly. If your output is going anywhere else, you should absolutely not play games.