Original image: Gage Skidmore/Flickr
TrumpScript, tagline "making Python great again," is Donald Trump in a programming language. The creation of four computer science students at Rice University—who put it together in a 36 hour hackathon—it's surely a novelty language, but it's also a very perfect novelty language, embodying the nonsense, bombasity, and even the frothing white nationalism of the actual presidential candidate.
Here are the features of TrumpScript, from the TS GitHub page:
No floating point numbers, only integers. America never does anything halfway.
All numbers must be strictly greater than 1 million. The small stuff is inconsequential to us.
There are no import statements allowed. All code has to be home-grown and American made.
Instead of True and False, we have fact and lie.
Only the most popular English words, Trump's favorite words, and current politician names can be used as variable names.
Error messages are mostly quotes directly taken from Trump himself.
All programs must end with "America is great."
Our language will automatically correct Forbes' $4.5B to $10B.
In its raw form, TrumpScript is not compatible with Windows, because Trump isn't the type of guy to believe in PC.
The language is completely case insensitive.
There's some other stuff in the language syntax, such as replacing the equality ("=") operator with the words "is" and "are." Meanwhile, all of the arithmetic operators can be employed using natural language, e.g. substituting "plus" for "+" and "minus" for "-." As a result, you can wind up with fun programs like this:
I is Donald Trump it time to tell you a fact for every american there is 100000000 immigrants trust me they are , there over there ; plan against us if, I are fact? ; : say they want to take our guns ! America is great.
Under the hood, the language is Python. That is, compiling a file of Trump code with the "TRUMP" command will interpret the input file into proper Python and it will run, perhaps even when it shouldn't. Trump code, much like the man himself, isn't always honest. As the Trump documentation explains, "Most importantly, Trump doesn't like to talk about his failures. So a lot of the time your code will fail, and it will do so silently. Just think of debugging as a fun little game."
Sam Shadwell and Chris Brown, two of the language's creators, explained a bit further in an interview with Inverse:
What about TrumpScript makes you most proud?
Sam: I kind of like the way that it works — if it actually worked, completely, which it…doesn’t —
Chris: There’s some stuff — I’m working out some kinks.
Sam: I’m most proud that the language itself is actually parsed and compiled in a way that sort of resembles how a real compiler would compile a real language.
Chris: In what I would consider proper TrumpScript style: 80 percent of the words you write should probably get dropped by the compiler and be completely unnecessary to the program.
As for the future, the group wasn't expecting quite this much attention and right now there's a queue full of amusing feature requests at the project's GH page. For example: "TrumpScript should ship with Woman object with appropriate methods pre-defined." Or: "can I deport a module?"
This joke could probably go on for a while.