Giter VIP home page Giter VIP logo

trumpscript's Introduction

TrumpScript

Making Python great again

Mission

TrumpScript is language based upon the illustrious Donald Trump. As the undeniably best presidential candidate in the 2016 language, we found that the current field of programming languages does not include any that Trump's glorious golden combover would approve of.

TrumpScript is our solution to this. It's the programming language Trump would approve of. Just like he is making America great again, we hope our efforts will make programming great again.

Installation

To use, download the .zip and extract the contents or clone the repository by typing

git clone https://github.com/samshadwell/TrumpScript.git

Add the TrumpScript root directory to your system PATH using one of the two following techniques

  1. Temporary: Write export PATH=$PATH:/path/to/TrumpScript to terminal.
  2. Permanent: Append export PATH=$PATH:/path/to/TrumpScript to the end of your ~/.bashrc file.

Usage

  • Write a trumpscript file following the syntax we've specified (good luck).
  • Write to terminal TRUMP /path/to/trumpscript/file
  • Enjoy the wonderful world of TrumpScript!

Features

Our language includes several convenient features, perfect for any aspiring Presidential candidate including:

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

Grammar

The grammar of the language is fairly convoluted, but here's a taste of the enlightened decisions we've made.

Arithmetic operators:

  • + and plus do addition
  • - and minus do subtraction
  • * and times do multiplication
  • / and over do division
  • <, less, fewer, and smaller all evaluate to 'less than'
  • >, more, greater, and larger all evaluate to 'greater than'

Control flow:

  • Use , and ; to treat compound statements as a single evaluation, similar to how () are used in other languages
  • Use : and ! to define the scope of loops and if statements, similar to how {} is used in Java
  • if, else if, and else do what you think they do
  • not, and, and or do what you expect

The exciting parts:

  • Strings are denoted by double quotes ("I love Trump")
  • The is and are keywords are used both to check for equality, and for assignment. To use for assignment, say something like Trump is great or Democrats are dumb. To use to check for equality, do the same but append a ?. For example, you may need to ask yourself Trump is "the best"? (although we all know that would evaluate to fact anyway)
  • Assignment can also be done via the make keyword. E.g. Make America great assigns the value of the variable great to America
  • Printing to stdout can be done via tell or say
  • While loops are denoted via as long as. And that's the only type of loop you need anyway.
  • If a 'word' (so anything that could be a variable name) is deemed unnecessary by the compiler, it's simply thrown away. So you can make truly self documenting code, or code that appear to read very very similarly to real speeches by the big man himself. You can find some interesting examples in our test/test_files directory

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

History

Created for HackRice (hack.rice.edu) by:

Sam Shadwell, @samshadwell

Dan Korn, @DnlRKorn

Chris Brown, @CryoBrown

Cannon Lewis, @cannon10100

trumpscript's People

Contributors

agonzalezro avatar cryobrown avatar dawsbot avatar edgecaseberg avatar graingert avatar haroenv avatar samshadwell avatar tedder avatar the-smooth-operator avatar thomas4g avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.