Một mục mã nguồn mở trong kho dữ liệu GitHub của TopGit: samshadwell/TrumpScript, 7.6k sao, Python. Make Python great again
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
It's been a while since we made any updates to TrumpScript, and we just wanted to make it official that our development on this project has stopped and that we will no longer be accepting issues or pull requests on this repo.
Frankly, this joke isn't funny anymore. Rather than spend your time beating the "Trump is ridiculous" meme to death, please actually do something instead and donate to:
American Civil Liberties Union
National Resources Defense Council
Planned Parenthood
TrumpScript
Make Python great again
Mission
TrumpScript is a language based upon the illustrious Donald Trump. As the undeniably best US President, 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 going to make 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
Add the TrumpScript root directory to your system PATH using one of the two following techniques
Temporary: Write export PATH=$PATH:/path/to/TrumpScript/bin to terminal.
Permanent: Append export PATH=$PATH:/path/to/TrumpScript/bin to the end of your ~/.bashrc file.
Usage
Write a TrumpScript file following the syntax we've specified (good luck).
Execute TRUMP /path/to/trumpscript/file.tr
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 the keywords 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.
TrumpScript boycotts OS X and all Apple products until such time as Apple gives cellphone info to authorities regarding radical Islamic terrorist couple from Cal.
The language is completely case insensitive.
If the running computer is from China, TrumpScript will not compile. We don't want them stealing our American technological secrets.
By constructing a wall (providing the --Wall flag), TrumpScript will refuse to run on machines with Mexican locales
Warns you if you have any Communists masquerading as legitimate "SSL Certificates" from China on your system.
Won't run in root mode because America doesn't need your help being great. Trump is all we need.
Easy to type with small hands
If you find you can't get any TrumpScript to run on your computer (probably because we disallow the two most popular operating systems), you can specify the --shut_up flag to let the interpreter know you just want your code to run, damn it.
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
Example:
What are we in this country
Hillary speaks nothing but lies
But look at me I came to this election to make guys
believe again
believe in fact
if, all of us real lies the light; : say "VOTE TRUMP" !
but I know we should be free
else the result will be bad: all the work of George
Washington was for nothing
so this election say "Hello World" say "TRUMP FOR PRESIDENT"!
America is great.
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.
Because We Pretend We're Good People
If this page entertained you, consider making a donation to your favorite charity or political campaign.
I'm a fan of the Electronic Frontier Foundation, donate here
There's also Hillary Clinton, and of course Donald Trump himself.
Because We've Sold Out
If you're feeling extra generous, you can also buy us a beer (or two) for more brainstorming because our small loan of a million dollars wasn't enough:
Paypal:
paypal.me/Shadwell
Bitcoin:
1AKK76WNmQheCYgZEksB61Jyp1voYxN63v
Hey, this repo seems pretty dead...
This project is (probably) not totally dead, and we'll get back to it eventually, but hold tight for now, since we're all busy students full-time.
But by all means, please submit a pull request! We're all just shocked this has blown up so much, and we'd love to get this language implemented "properly!"
Media
Hey, cool, we got an article on Inverse written about us!
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/samshadwell/TrumpScript là nguồn chính thức.
samshadwell/TrumpScript có bao nhiêu sao?
samshadwell/TrumpScript có 7.6k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/samshadwell/TrumpScript. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
samshadwell/TrumpScript có phải mã nguồn mở không?
Có — samshadwell/TrumpScript phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/samshadwell/TrumpScript.
samshadwell/TrumpScript còn đang phát triển không?
Commit gần nhất trên samshadwell/TrumpScript là 7.0 năm trước (theo timestamp GitHub). Repo có 391 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
samshadwell/TrumpScript dùng license gì?
samshadwell/TrumpScript phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
samshadwell/TrumpScript là gì?
samshadwell/TrumpScript (samshadwell/TrumpScript) là dự án Python trên GitHub. Theo mô tả gốc: Make Python great again
samshadwell/TrumpScript viết bằng ngôn ngữ gì?
samshadwell/TrumpScript chủ yếu viết bằng Python. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về TrumpScript?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về TrumpScript.