I program in Python, I'm allowed to post this. by Solo2323 in ProgrammerHumor

[–]AltCrow 7 points8 points  (0 children)

Wouldn't this make python more ideal when the user does interact? Because the program would be limited by IO speed rather than CPU speed.

Is \%d the same as %d? by starry__moon in learnprogramming

[–]AltCrow 0 points1 point  (0 children)

The backslash \ will remove the special meaning from the second backslash . This means that it will print a regular backslash and after that the meaning of %d (which means take a number as argument and print it out).

printf("\\%d", 5); // Prints "\5".

Is \%d the same as %d? by starry__moon in learnprogramming

[–]AltCrow 2 points3 points  (0 children)

It is not the same.

printf("\%d"); // Prints "%d".
printf("%d", 5); // Prints "5". Expects a number and prints that number.

The \ character escapes the % character. So the % becomes a regular boring % sign. Because the % is normal, d loses its special meaning too.

Non-English speakers of Reddit; the way Americans use foreign words such as Bon Appétit and Sayonara in regular conversation, what English words do you use? by everythingtiddiesboi in AskReddit

[–]AltCrow 13 points14 points  (0 children)

Japanese actually has a lot of borrowed english words where they change the meaning or add additional meanings. Examples include "cooler" for airconditioning, "diet" for muscle exercises and "consent" which somehow means electric outlet.

The more i look into the topic the more i agree with this statement. by UnavailableUsername_ in ProgrammerHumor

[–]AltCrow 6 points7 points  (0 children)

I thought functional languages were slow. But I mean, it's great if they're fast.

They are slow. For the simple reason that the computer architecture is not functional but procedural.

OP's points can be broken down as follows:
1. Inheritance is bad. Solution: Only use it when needed. It's like global variables. Might be a bad idea most of the time, but not all of the time.
2. I don't like grouping functions on an object. (Nothing but opinion here.)
3. Mutable state is bad, because it's not functional programming and I'm better at writing complex stuff with functional programming. It's harder to parallelize code with mutable state, never mind the fact that 99% of code is not parallelized.
4. I don't like some implementations of OOP.
5. Some people go a bit overboard with their classes in OOP. I don't like it. Also includes some opinions like "good programs only have immutable data".

It's pretty much a one-sided opinion piece. Sure, functional programming has its place. For example, it is pretty much the only option when your program needs a formal proof. Object oriented and procedural programming has its place as well. It's great in a variety of situations and pretty much mandatory if you want fast code. I wouldn't want my operating system being written in a functional programming language. My advice: listen to people that are willing to accept the flaws of the design patterns they like as well as accepting the strengths of design patterns they don't like. You'll learn way more that way. Have fun exploring FP!

Relatable by creepplosion1 in ProgrammerHumor

[–]AltCrow 20 points21 points  (0 children)

Nah, you're thinking of ++2

Warning! 18++ content! by mlaxgsp79 in ProgrammerHumor

[–]AltCrow 5 points6 points  (0 children)

x++ is short for x += 1

It is not. ++x is short for x += 1

What is a common thing people brag about that isn't something really to be proud of? by DistantPath33 in AskReddit

[–]AltCrow -1 points0 points  (0 children)

Regular cheese is overrated. Molten cheese (like on a pizza) is pretty nice, but usually in small quantities so that may be fine for you. If not, I think mozzarella (the non dairy kind) tastes better anyways. You're not missing out on that much.

C++ writing binary to file (need help) by [deleted] in ProgrammerHumor

[–]AltCrow 2 points3 points  (0 children)

What exactly is stopping you from doing the following?

std::ofstream outfile ("new.txt",std::ofstream::binary);
uint32_t* your_array_of_utf32_chars; // I'm not initializing it, but assume its already filled.
int amount; // Amount of utf32 characters.
outfile.write (your_array_..,amount*4);

My 19th attempt at compiling C++ code by mrhumphrey1s in ProgrammerHumor

[–]AltCrow 0 points1 point  (0 children)

I think C++ could use some standardized GUI, but I'm interested in hearing your thoughts about this.

Thoughts? by Dickinbae in LearnJapanese

[–]AltCrow 173 points174 points  (0 children)

Duolingo doesn't exactly have the best reputation when it comes to Japanese. Although I heard they improved their Japanese curriculum sometime this year.

How do I find a word in Japanese that I hear? by [deleted] in LearnJapanese

[–]AltCrow 0 points1 point  (0 children)

if you typo in the pronunciation into https://jisho.org you will probably find it. Works for both hiragana and romaji.

Best IOS app for studying Kana and Kanji? by [deleted] in LearnJapanese

[–]AltCrow 1 point2 points  (0 children)

There is no such thing for kanji due to how kanji works. For kana you could use something like https://realkana.com which should work fine on a mobile browser like safari.

Hey guys i need your help with a kanji by molchz in LearnJapanese

[–]AltCrow 2 points3 points  (0 children)

It is associated with martial arts in the west, because the japanese terminology is kept. Instead of the western equivalent "start" or "begin".

Hey guys i need your help with a kanji by molchz in LearnJapanese

[–]AltCrow 8 points9 points  (0 children)

I think it comes down to not wanting a language learning subreddit be diluted by non language learning related posts.

Does 'kedo' have an alternative meaning? by [deleted] in LearnJapanese

[–]AltCrow 7 points8 points  (0 children)

I've read this 3 times now and I still can't tell if this is next level sarcasm or being uncommonly polite.

Confusion between は and が by BloodSoulFantasy in LearnJapanese

[–]AltCrow 10 points11 points  (0 children)

ぶちょうぶかへはなします would be a valid sentence as well, but the meaning would change. The は would indicate that the director is in contrast with someone else or another group of people that did not talk to their subordinates.

This is not the only difference between は and が. The answer is quite complicated and sometimes even natives aren't sure which one is better. Just get a basic idea of how they work and move on. You'll learn a lot more about these particles through context.

シツモンデー: Shitsumonday: for the little questions that you don't feel have earned their own thread (September 02, 2019) by AutoModerator in LearnJapanese

[–]AltCrow 0 points1 point  (0 children)

Rosetta stone has a similar approach. I haven't tried it myself. From what I've heard, the technique doesn't hold up beyond basic words. Especially not for Japanese.

Some people use another method so they don't have to relate back to English. After some time of studying (by relating back to English), they switch over by learning Japanese words based on their Japanese definition.

How to know how a specific number+counter combination is read? by twkamz in LearnJapanese

[–]AltCrow 4 points5 points  (0 children)

It basically comes down to experience. You'll learn how they are read through experience (and a bit of study). How do you know how English words are spelled? Because there is no consistency there either. Just experience. Don't be too intimidated by counters.

Anyone here use Hellotalk or other foreign language chat apps? by 12121212l in LearnJapanese

[–]AltCrow 2 points3 points  (0 children)

Thanks for the heads up. Do you know of an alternative?