▲ 1384 ▼ How hard could it be? (lemmy.world) submitted 2 years ago by The_Picard_Maneuver@lemmy.world to c/retrogaming@lemmy.world 174 comments fedilink hide all child comments
[–] mynameisigglepiggle@lemmy.world 17 points 2 years ago (2 children) Further proof C++ is a pita permalink fedilink source parent hideshow 4 child comments replies: [–] Cethin@lemmy.zip 17 points 2 years ago It's probably not because it's sucks. It's because they're trying to perfectly replicate an existing target. They have to read the assembly, digest it, then create the identical solution in C++. If they were just creating a new game, it likely would be much faster. permalink fedilink source parent [–] BigDanishGuy@sh.itjust.works 8 points 2 years ago* (last edited 2 years ago) (1 child) #include <iostream> // because writing to the console is not included by default. int main() { std::cout << "C++ is simple and fun ... you cretin\n"; return 0; } I had a machine language course in uni, parallel with a C++ course. Not a fun semester to be my wife, or a relative of any of my classmates. Best case our brains were in C++ mode, worst case you needed an assembler to understand us. And yes I know my code format will piss people off, I don't care, it's the way I write when other less informed people don't force me to conform to their BS "Teh oPeNiNg bracket shouwd bwee on teh sam line ass teh declawation" Edit: added a \n for the sake of pedantry :) permalink fedilink source parent hideshow 2 child comments replies: [–] raspberriesareyummy@lemmy.world 5 points 2 years ago (1 child) std::cout << "C++ is simple and fun ... you cretin" <<std::endl; You dropped something. permalink fedilink source parent hideshow 2 child comments replies: [–] BigDanishGuy@sh.itjust.works 7 points 2 years ago (1 child) Well ackshually <<std::endl is not the preferred way to do it according to the C++ Core Guidelines https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rio-endl So to be a good little lemming I've added a \n, but I refuse to flush! permalink fedilink source parent hideshow 2 child comments replies: [–] raspberriesareyummy@lemmy.world 1 point 2 years ago Interesting... today I learned. But since I only ever use std::cout in my debugging code (i.e. DURING debugging) or for status outputs of the application (for small apps), and for everything else I use my own logging framework that uses printf & syslog udp messages... luckily nothing I need to refactor :D permalink fedilink source parent
[–] Cethin@lemmy.zip 17 points 2 years ago It's probably not because it's sucks. It's because they're trying to perfectly replicate an existing target. They have to read the assembly, digest it, then create the identical solution in C++. If they were just creating a new game, it likely would be much faster. permalink fedilink source parent
[–] BigDanishGuy@sh.itjust.works 8 points 2 years ago* (last edited 2 years ago) (1 child) #include <iostream> // because writing to the console is not included by default. int main() { std::cout << "C++ is simple and fun ... you cretin\n"; return 0; } I had a machine language course in uni, parallel with a C++ course. Not a fun semester to be my wife, or a relative of any of my classmates. Best case our brains were in C++ mode, worst case you needed an assembler to understand us. And yes I know my code format will piss people off, I don't care, it's the way I write when other less informed people don't force me to conform to their BS "Teh oPeNiNg bracket shouwd bwee on teh sam line ass teh declawation" Edit: added a \n for the sake of pedantry :) permalink fedilink source parent hideshow 2 child comments replies: [–] raspberriesareyummy@lemmy.world 5 points 2 years ago (1 child) std::cout << "C++ is simple and fun ... you cretin" <<std::endl; You dropped something. permalink fedilink source parent hideshow 2 child comments replies: [–] BigDanishGuy@sh.itjust.works 7 points 2 years ago (1 child) Well ackshually <<std::endl is not the preferred way to do it according to the C++ Core Guidelines https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rio-endl So to be a good little lemming I've added a \n, but I refuse to flush! permalink fedilink source parent hideshow 2 child comments replies: [–] raspberriesareyummy@lemmy.world 1 point 2 years ago Interesting... today I learned. But since I only ever use std::cout in my debugging code (i.e. DURING debugging) or for status outputs of the application (for small apps), and for everything else I use my own logging framework that uses printf & syslog udp messages... luckily nothing I need to refactor :D permalink fedilink source parent
[–] raspberriesareyummy@lemmy.world 5 points 2 years ago (1 child) std::cout << "C++ is simple and fun ... you cretin" <<std::endl; You dropped something. permalink fedilink source parent hideshow 2 child comments replies: [–] BigDanishGuy@sh.itjust.works 7 points 2 years ago (1 child) Well ackshually <<std::endl is not the preferred way to do it according to the C++ Core Guidelines https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rio-endl So to be a good little lemming I've added a \n, but I refuse to flush! permalink fedilink source parent hideshow 2 child comments replies: [–] raspberriesareyummy@lemmy.world 1 point 2 years ago Interesting... today I learned. But since I only ever use std::cout in my debugging code (i.e. DURING debugging) or for status outputs of the application (for small apps), and for everything else I use my own logging framework that uses printf & syslog udp messages... luckily nothing I need to refactor :D permalink fedilink source parent
[–] BigDanishGuy@sh.itjust.works 7 points 2 years ago (1 child) Well ackshually <<std::endl is not the preferred way to do it according to the C++ Core Guidelines https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rio-endl So to be a good little lemming I've added a \n, but I refuse to flush! permalink fedilink source parent hideshow 2 child comments replies: [–] raspberriesareyummy@lemmy.world 1 point 2 years ago Interesting... today I learned. But since I only ever use std::cout in my debugging code (i.e. DURING debugging) or for status outputs of the application (for small apps), and for everything else I use my own logging framework that uses printf & syslog udp messages... luckily nothing I need to refactor :D permalink fedilink source parent
[–] raspberriesareyummy@lemmy.world 1 point 2 years ago Interesting... today I learned. But since I only ever use std::cout in my debugging code (i.e. DURING debugging) or for status outputs of the application (for small apps), and for everything else I use my own logging framework that uses printf & syslog udp messages... luckily nothing I need to refactor :D permalink fedilink source parent