Malbolge cat

A cat program simply prints its input when executed. In Malbolge, it looks as follows.


This cat program does not terminate when end of file (EOF) is read. A cat that terminates is much more complicated, but can be downloaded here: cat.mal.

The creation of the non-terminating cat program is explained in this Malbolge tutorial.

There have been at least two non-terminating cat programs in Malbolge before. The first one by Scheffer is not a legal Malbolge program due to the specification, but it exploits a bug in the reference interpreter to work nonetheless. The second one by Gimeno is a legal program, but it is less compact than the cat above. There has also been a terminating cat program before. You can find it in Appendix B of Kan's Bachelor's thesis. It has been developed with the goal of code obfuscation in mind. Thus, it is much bigger than the terminating cat program linked above.

Contact | Site notice (Impressum)