4 ms·
Am I the only one who initially thought this was a sequence of emoticons?
by rcfox 16y ago
Am I the only one who initially thought this was a sequence of emoticons?
- chuhnk 16y agohaha yes I can see it now. Its a bash function that gets called recursively. Nice and simple, I've tested it in a few different environments, linux 2.4, linux 2.6, open bsd, solaris. All vanilla installs. Solaris is the only one I havent seen die.
- zandorg 16y agoConfuse the computer by making it sad?
- johnswamps 16y agoI'm not sure why : has been chosen as the canonical fork bomb function name, but it's more readable with something like resurse() { recurse | recurse &}; recurse
- kmort 16y agoAnd it's usually accompanied by the adjective "elegant", which I find rather baffling. "Cute" or "cryptic", perhaps.
- marbu 16y agoIn this example, the poor readability is a feature. Nevertheless the ":" character is bash inner function, which tells the shell to do nothing (except the arguments expansion), like pass in python. This means that you can redefine it and use it to confuse others. Most of other special characters are not functions so you are not able to redefine them that easily.