LoginSignup
0

More than 5 years have passed since last update.

TrumpScriptの流れに乗ってみた(けど何もできずに撃沈した)

Posted at

ドナルド・トランプ氏をイメージしたプログラミング言語「TrumpScript」が滅茶苦茶すぎる - BppLOG

というワケでそっこーインストールして書いてみました。

リンク先にある通り、git clone してパス通してインストール完了。

hello worldまで書いたけど、
Macなのでボイコットされました。

Exception: Mac? 'Boycott all Apple products until such time as Apple gives cellphone info to authorities regarding radical Islamic terrorist couple from Cal'

とりあえず判定している箇所(utils.pyのUtils.boycott_apple)を
コメントアウトして動く状態にしたら動いた。
なんかいっぱい警告出てるけど。。。

fizzbuzzくらいやりたいなぁと思ったけど文法が分からん。
とりあえず条件分岐から、と思って書いたコードがこちら。

test.ts
Make number 100
if, number is 100, : tell "100"!
America is great.

したらエラーに。

Parsing error:
What are you doing on line 1?
Exception: Part of the beauty of me is I'm very rich.

なんかむかつくな。。。
あ、100万より大きくないとだめとかいうやつか。。。?
そういう親切なエラー文とかは出ないんだ。。。単に認識しないんだ。。。

test2.ts
Make number 1000000000000
if, number is 1000000000000, : tell "1000000000000"!
America is great.

これでもエラー。

IndexError: pop from empty list

うー、分からん。なんかifの書き方が悪いっぽいが。。。
readme読んでも眠気と英語でもうだめだ。。。
と思ったら、readmeにこんなん書いてた。

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.

お、おう。。

こういうコードでも動作するっぽいですが。。。

readmeより抜粋
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.

わかんない。結構楽しめましたがここで時間切れ。おやすみなさい。。。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0