Post AFJrzVF46WzjZvrewC by mikuphile@gearlandia.haus
 (DIR) More posts by mikuphile@gearlandia.haus
 (DIR) Post #AFJpjqNVYLioacDdQW by neko@cum.desupost.soy
       2022-01-11T04:03:31.287284Z
       
       2 likes, 1 repeats
       
       Lol! Spent a good half an hour writing this monstrosity of a modern C++ classMost of the iterator stuff lets me simply do…if (pack.get_data_size() == handshake_size &&    std::equal(pack.begin(), pack.end(), handshake_initial_bytes.begin())){    // TODO Send challenge to packet    if (logger) logger->log("First handshake succeeded");                        return;}Without having to manually do a comparison, the std::equal part is what’s nice here! Now I can compare regular arrays of data with a packet of “data” (well, the full packet is stripped out, get_data reads ahead of the full message to the actual contents of a packet)One could argue for simple projects it’s overkill, but it didn’t take me long and it’s gonna help me a LOT in the long runGoodnight :gurasleep:
       
 (DIR) Post #AFJqWjIgelpgpOH5Dk by neko@cum.desupost.soy
       2022-01-11T04:12:20.934882Z
       
       2 likes, 1 repeats
       
       @MischievousTomato Honestly? No, I can't recommend a good C++ book. I read the _ENTIRE_ C++ book by Bjarne and also I took some online course which covered a lot of it as well, front to back, and it's a load of shit (like 1k pages), in fact an entire section is wrong in it, and it's poorly structured. Plus, it's still outdated to C++11, which will cover a lot, but we're almost ready to safely land on C++20 now so a new book should be due someday! (but yes, C++11 brought the majority of features to the language and you'll live with that a lot of the time and use those features, don't learn from anything older than C++11)Learn the basics, just kind of google around for books and stuff, it's a difficult language to learn but absolutely worth it and fun. Most importantly, PLEASE start with C first, don't make the same mistake I did :froth: Sure they are 2 different languages but knowing C helps a lot.For C, check out well, the classic K&R book, that's what I read! But if you want more "practices", I think there are better books, the K&R book teaches you just the language and nothing else. C's practices /practically/ just clicked for me (from seeing other people's C code) but you can manage without.
       
 (DIR) Post #AFJqXWQA1lvTAl9FAm by weeb@bussy.monster
       2022-01-11T04:12:30.687215Z
       
       1 likes, 1 repeats
       
       @MischievousTomato @neko on to c is the only c book worth a damnC++ is not a real language it was a prank gone awry
       
 (DIR) Post #AFJqi1fahS56z8NG6a by neko@cum.desupost.soy
       2022-01-11T04:14:24.146125Z
       
       2 likes, 0 repeats
       
       @MischievousTomato Uni probably taught you sepples basics, if you can manage with that then C will be a breeze. It's not hard lol, it's only a bit "hard" in practice, but learning it is as easy as Python tbh
       
 (DIR) Post #AFJrzVF46WzjZvrewC by mikuphile@gearlandia.haus
       2022-01-11T04:28:46.814428Z
       
       2 likes, 0 repeats
       
       @neko (((c++))) is such an esoteric mess, you must be a masochist to use it. Anyway good night Nekobit.
       
 (DIR) Post #AFJusJ0rTOjxUCTqvA by waifu@novoa.nagoya
       2022-01-11T04:52:13.350Z
       
       2 likes, 0 repeats
       
       @neko@cum.desupost.soy @MischievousTomato@poa.st this nigga a genius
       
 (DIR) Post #AFKTCmViMRZExvi2PQ by neko@cum.desupost.soy
       2022-01-11T11:25:45.678058Z
       
       1 likes, 0 repeats
       
       @MischievousTomato @waifu :002_blush: lols, i just practiced for so long...