User:Smokingloud/sandbox/Riff (programming language)
Riff (programming language)
Riff, stylized as RiFF, is an esoteric programming language parodying the lyrical style of Houston rapper RiFF RAFF. The language was developed by Jeffery Wang, at the time a computer science student at the University of Houston, in 2014. Although Riff borrows heavily from Python and hence is also a object-oriented, general purpose programming language, it contains unique functionality that make it impractical for software development.[1] On his personal website, Wang stated that he was inspired to develop the language after seeing listening to Riff Raff's debut album Neon Icon.[2]
Features
At first glance, many of Riff's modifications to Python are purely cosmetic—for example, the "def" keyword in Python (used to define a function) has been changed to "Rap Game". In reality, many of these changes involved sophisticated modifications to Python's source code and impose restrictions not found in any other programming language. These include:
- All Riff code being in capital letters, except i (following the stylization of Riff Raff's name)
- Variable names being two words, and either 1) alliterative, with the first word being an adjective and the second a noun, or 2) the word "Versace" followed by a noun.
- Integers being no larger than 1,024 (due to Riff Raff's proclaimed dislike of "geek shit").[3]
There are numerous undocumented features in the language, many based on Riff Raff lyrics. If found in the contents of any variable, the string "Iceberg Simpson" is known to cause an unhandled exception; similarly the string "Macaroon moon diamonds got me feeling bipolar" will cause the interpreter to randomly delete files from the hard disk.
Programming example
Program to calculate the 100th Fibonacci number, then download a pirated copy of National Treasure:
RAP GAME VERSACE FiBONACCi(NEON NUMBER):
iF NEON NUMBER iN (0,1):
RETURN 1
ELSE:
RETURN VERSACE FiBONACCi(NEON NUMBER - 1) + VERSACE FiBONACCi (NEON NUMBER - 2)
PRiNT(VERSACE FiBONACCI(100))
PRiNT("It's a Raff Riff, Rap Game Merrill Lynch")