Less formal alternative: IMHO: You’re wrong.
Less formal alternative: IMHO: You’re wrong.
Noooo, stop backing up my garbage!
Except worse, because it’s an electron app interpreting the app you actually want to run, so double slowness.
Electron only. 🤢
All that really does is guarantee that the professor will catch anyone cheating
This just prints:
💩
🍊
🍉
🍉
🍍
🍎
Line 38 and 39 just check if a function that always returns false is false and if so, prints “💩\n”. (C++ uses the bit shift operator for file IO for some reason)
Line 41 creates a vector of shared pointers to an abstract class, or in other words, an array of functions. Each function prints the emoji, mostly the same as the name, but not always. ( 🍒 is the exception, it prints “🍉\n”)
43 and 44 just loop over the array and call every function inside, printing a bunch of emoji.
Line 46 returns the result of std::rand(), but because the programer forgot to call srand, the result is always the same (1804289383 for me).
(There are also a few missing includes, but I doubt this is intentional)
.elf is the closest thing we have.
OOP is another case of nice in theory.
How do you tell if someone is an Arch user? You don’t, they will tell you.
What’s “space!” and “enter”?
For those that need help in deciphering the title text, there is a super easy trick: Take the last 5 bits of each byte, convert them from binary to decimal, and that letter of the alphabet (starting from one) is the letter represented by the ASCII code.
To convert binary numbers to decimal, just add the place values of a the 1s together. For 5 bits, the place values are 16, 8, 4, 2, 1. So 10110 becomes 16+4+2 which is equal to 22.
01001101: last 5 bits are 01101, in decimal, that is 8+4+1=13, and the 13th letter of the alphabet is “m”
01100101, becomes 00101, then 4+1=5, and the 5th letter of the alphabet is ‘e’
The last 2 are just repeats of those, so the post body reads “meme” (if the third bit is zero, the letter is capital, so it should really be “Meme”)
Here is a random rant on JS (among other things): https://10maurycy10.github.io/misc/in_defence_of_c/
And now you know why programmer socks are a thing.
You don’t program by candle light? Everyone I know does, especially for low level programming, it takes twice the candles.
Nodejs is a works great for that.
Honestly JS seams saner then python, it’s wierd but rather sane. The only really bad parts of JS are the type coercing == and =! operators which are very broken
For example “” == 0 and 0 == “0” are both true, but “0” == “” is false.
Compile times get insanely huge.
And speed too. A small program using only C features can compile 5x faster with a c compiler then a c++ one. (GCC will use c++ mode on a .cop file so make sure it is .c)
Is python really any better?
Still, things like content moderation and data analysis, this could totally be a problem.