The heart of tech

This article was published on January 22, 2016


TrumpScript is a programming language that thinks and acts like Donald

TrumpScript is a programming language that thinks and acts like Donald
Kirsty Styles
Story by

Kirsty Styles

Reporter

Kirsty Styles is a journalist who lives in Hackney. She was previously editor at Tech City News and is now a reporter at The Next Web. She l Kirsty Styles is a journalist who lives in Hackney. She was previously editor at Tech City News and is now a reporter at The Next Web. She loves tech for good, cleantech, edtech, assistive tech, politech (?), diversity in tech.

A team of coders has released a new library on Github that contains a (sort of) working programming language built on Python that mimics the behavior of Donald Trump.

At it’s core, it works in exactly the same way as any other language, except it uses some particular syntax and rules to “make programming great again.”

And if you make a mistake in your code, you’ll get a Trump quote instead of a typical error message.

Features

  • 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.

And of course, the Github community is joining in by contributing to the development of the language.

But user be warned: “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.”

The language was created by junior computer science majors Sam Shadwell, Chris Brown and Dan Korn at a Rice University hackathon.

TrumpScript [Github via Inverse]