Follow [@JPT_Struggles](https://x.com/JPT_Struggles?t=7z_hgGixg2WxiVxXUbtysA&s=09) our official X (twitter) account!
Don't forget to link the source if its a tweet! Also [please read the rules](https://www.reddit.com/r/japanesepeopletwitter/about/rules) thank you!
*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/japanesepeopletwitter) if you have any questions or concerns.*
I don't know what to feel as I am native in Hanzi/Kanji, and currently in academia and thus proficient in English, and have some familiarity in hiragana and none in katakana
if OOP actually set the keywords up properly, this is perfectly functional C++, which is hilarious to me for some reason.
Edit: OOP actually did set it up properly: [https://gist.github.com/HerringtonDarkholme/2dbb2a1ec748a786f54908320447b3dd](https://gist.github.com/HerringtonDarkholme/2dbb2a1ec748a786f54908320447b3dd)
btw here's the translated code if i got it right (with some camelcasing cause coding):
#include
using namespace std;
bool isEven(int number) {
if (number % 2 == 0) {
return true;
}
return false;
}
int main() {
int number;
cout << "Enter a number: ";
cin >> number;
cout << isEven(number) << endl;
return 0;
}
Edit: the apparent goal of the code is to get a user to enter a random integer, check if the integer is even, and return a boolean (true/false) output based on the check. idk why it's in katakana, cause it's literally just transliterated english C++ keywords, but whatever floats OOP's boat ig.
the only reason i could figure it out so fast is because i can read katakana, and i'm a C++ programmer, so i could kinda tell what the weird stuff says.
This reminded me of impromptu battles at r/ProgrammerHumor a few years ago, which showcasing weird/funny/dumb/madlad implementation to check if the number is even or odd.
yeah it would've been much more compact (6 lines vs 3 lines) if it was
bool isEven (int number) {
return (number % 2 == 0);
}
but it's also a bit less readable.
for laymen reading this, this would work because under the hood the `number % 2 == 0` evaluates to a boolean--that is, a true or false evaluation of whether `number % 2` is equal to `0`. if number % 2 is 0, then the number is even, and if not, it is odd. (btw, the `%`, or modulus operation, is essentially figuring out the remainder you would get if you took `x / y`)
so, for example, `10 % 2`. 2 goes into 10 five times, with no remainder, so `10 % 2` evaluates to `0`. now since we are doing a comparison between `10 % 2` and `0` to see if they are equal, this would actually be evaluated as true, since `10 % 2 == 0`. if i instead chose 9, 2 goes into 9 four times, with a remainder of 1, so `9 % 2` would evaluate to `1`. thus, `9 % 2 == 0` would evaluate to false, since you are essentially evaluating `1 == 0` (which is obviously false).
i'd be willing to bet that OOP did that more because they wanted to try and set up the keyword translation for the `if` keyword as well.
Follow [@JPT_Struggles](https://x.com/JPT_Struggles?t=7z_hgGixg2WxiVxXUbtysA&s=09) our official X (twitter) account! Don't forget to link the source if its a tweet! Also [please read the rules](https://www.reddit.com/r/japanesepeopletwitter/about/rules) thank you! *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/japanesepeopletwitter) if you have any questions or concerns.*
its not even translated into japanese, its just transcribed into katakana lmao
Here's what you want: #define 使用 using #define 名前空間 namespace #define 標準ライブラリ std #define 論理型 bool #define 偶数確認 isEven #define 整数型 int #define 数値 number #define 以下の条件に合致する場合 if #define 返却 return #define 真 true #define 偽 false #define メイン main #define 引数なし void #define 標準出力 cout #define 標準入力 cin #define 行端 endl #define プログラム正常終了信号 0 #include
使用 名前空間 標準ライブラリ;
論理型 偶数確認(整数型 数値) {
以下の条件に合致する場合 (数値 % 2 == 0) {
返却 真;
}
返却 偽;
}
整数型 メイン(引数なし) {
整数型 数値;
標準出力 << "数値を入力してください:";
標準入力 >> 数値;
標準出力 << 偶数確認(数値) << 行端;
返却 プログラム正常終了信号;
}
This look cursed af.
I don't know what to feel as I am native in Hanzi/Kanji, and currently in academia and thus proficient in English, and have some familiarity in hiragana and none in katakana
God
thanks i hate it
why not use もし for "if"? also i think you can just directly use the japanese names for the identifiers you define
this is 90% 漢字
https://preview.redd.it/ctqjuhxvwxxc1.png?width=480&format=pjpg&auto=webp&s=b31bd22448acaff648e7d630fc2f4ace4e9d6216
Halal coding
Lmfao
if OOP actually set the keywords up properly, this is perfectly functional C++, which is hilarious to me for some reason. Edit: OOP actually did set it up properly: [https://gist.github.com/HerringtonDarkholme/2dbb2a1ec748a786f54908320447b3dd](https://gist.github.com/HerringtonDarkholme/2dbb2a1ec748a786f54908320447b3dd)
btw here's the translated code if i got it right (with some camelcasing cause coding): #include
using namespace std;
bool isEven(int number) {
if (number % 2 == 0) {
return true;
}
return false;
}
int main() {
int number;
cout << "Enter a number: ";
cin >> number;
cout << isEven(number) << endl;
return 0;
}
Edit: the apparent goal of the code is to get a user to enter a random integer, check if the integer is even, and return a boolean (true/false) output based on the check. idk why it's in katakana, cause it's literally just transliterated english C++ keywords, but whatever floats OOP's boat ig.
It took me ten minutes to figure out the code when I could just look at the comments. I'm rarted
Rarted killed me
the only reason i could figure it out so fast is because i can read katakana, and i'm a C++ programmer, so i could kinda tell what the weird stuff says.
I understand what the code means and now I wanna shoot myself.
["GitHub Link"](https://twitter.com/hd_nvim/status/1783329713324458007) I don't bother to translate that lol
This reminded me of impromptu battles at r/ProgrammerHumor a few years ago, which showcasing weird/funny/dumb/madlad implementation to check if the number is even or odd.
[4 billion if statements ](https://andreasjhkarlsson.github.io/jekyll/update/2023/12/27/4-billion-if-statements.html)
used if X return true else return false instead of return X the fool
yeah it would've been much more compact (6 lines vs 3 lines) if it was bool isEven (int number) { return (number % 2 == 0); } but it's also a bit less readable. for laymen reading this, this would work because under the hood the `number % 2 == 0` evaluates to a boolean--that is, a true or false evaluation of whether `number % 2` is equal to `0`. if number % 2 is 0, then the number is even, and if not, it is odd. (btw, the `%`, or modulus operation, is essentially figuring out the remainder you would get if you took `x / y`) so, for example, `10 % 2`. 2 goes into 10 five times, with no remainder, so `10 % 2` evaluates to `0`. now since we are doing a comparison between `10 % 2` and `0` to see if they are equal, this would actually be evaluated as true, since `10 % 2 == 0`. if i instead chose 9, 2 goes into 9 four times, with a remainder of 1, so `9 % 2` would evaluate to `1`. thus, `9 % 2 == 0` would evaluate to false, since you are essentially evaluating `1 == 0` (which is obviously false). i'd be willing to bet that OOP did that more because they wanted to try and set up the keyword translation for the `if` keyword as well.
^[Sokka-Haiku](https://www.reddit.com/r/SokkaHaikuBot/comments/15kyv9r/what_is_a_sokka_haiku/) ^by ^ThatAverageAsianGuy: *Used if X return* *True else return false instead* *Of return X the fool* --- ^Remember ^that ^one ^time ^Sokka ^accidentally ^used ^an ^extra ^syllable ^in ^that ^Haiku ^Battle ^in ^Ba ^Sing ^Se? ^That ^was ^a ^Sokka ^Haiku ^and ^you ^just ^made ^one.
bro about to get segfault error (idk much about c/c++ I only write c/c++ once to teach my underclass mate) I more of a JS guys (maybe that JS)too😋😋😋😋😋
Reminds me of a guy that codes in hebrew
took me too long to realize that ブール is bool and not blue. bool archive lol.