Post AkPP2xbbibphzzzbrE by Mangdries@fosstodon.org
 (DIR) More posts by Mangdries@fosstodon.org
 (DIR) Post #AkPOOdvLTWAJNG04XI by BrodieOnLinux@linuxrocks.online
       2024-07-29T02:20:20Z
       
       0 likes, 0 repeats
       
       > make a joke about not liking C++> defenders come out to say how it's great for game development and systems programming> video is about a window manager> "I'm very confused why people are bringing these up"
       
 (DIR) Post #AkPOeP2uYhjXre3PTE by TheFrenchGhosty@libretooth.gr
       2024-07-29T02:23:12Z
       
       0 likes, 0 repeats
       
       @BrodieOnLinux "my <programming language or hobby or thing that I like> is my only personality trait, any criticism of it is an attack against me" kind of people
       
 (DIR) Post #AkPOjYfwBTUlB3la5Y by simonjust@mstdn.dk
       2024-07-29T02:23:39Z
       
       0 likes, 0 repeats
       
       @BrodieOnLinux Happens everywhere - if its not programming languages, it's cars, sportsteams etc.
       
 (DIR) Post #AkPP2xbbibphzzzbrE by Mangdries@fosstodon.org
       2024-07-29T02:27:41Z
       
       0 likes, 0 repeats
       
       @BrodieOnLinux C++ is a mixed bag for me. The abstractions it provides is really nice; I can just use the stdlib and it works without having to worry about safety as much (and the convenience). On the other hand some features make it miserable to read and try to understand what some code is actually supposed to do. I typically use C++ over C but mostly just write C with some of the C++ features to get the best of both languages. :c_language: :cpp_language:
       
 (DIR) Post #AkPQC9ekNr49vxPRZI by squid@social.linux.pizza
       2024-07-29T02:40:03Z
       
       0 likes, 0 repeats
       
       @BrodieOnLinux C++ is confusing. I prefer C, C is simple.
       
 (DIR) Post #AkPU35otg3P9FK5j5U by dutch_connection_uk@mastodo.neoliber.al
       2024-07-29T03:23:23Z
       
       0 likes, 0 repeats
       
       @BrodieOnLinux C++ made so many mistakes and has such a confused legacy now that even if they had the best modern new features it would be a pain to use in light of the misfeatures it has accumulated.
       
 (DIR) Post #AkPWB9KsgmYqNL1N56 by Eclipse@nerdculture.de
       2024-07-29T03:14:37Z
       
       0 likes, 0 repeats
       
       @Mangdries @BrodieOnLinux for me pervasive overloading (looking at you std::cout) makes C++ pain to read
       
 (DIR) Post #AkPWBAf7l0LcUPV3Gy by BrodieOnLinux@linuxrocks.online
       2024-07-29T03:47:31Z
       
       0 likes, 0 repeats
       
       @Eclipse @Mangdries Overloads are a cool feature when used sparingly and in contexts that make sense, however that's the problem. People recommend avoiding overloads for the same reason as goto, some developers cannot be trusted to use them in a sensible way
       
 (DIR) Post #AkPWJB2gEDu9z6Krqq by Eclipse@nerdculture.de
       2024-07-29T03:49:02Z
       
       0 likes, 0 repeats
       
       @BrodieOnLinux @Mangdries exactly, imo overloads should ONLY be used for actual math, not for inventing syntax
       
 (DIR) Post #AkPXX6NgSIWTXJMbaK by BrodieOnLinux@linuxrocks.online
       2024-07-29T04:02:40Z
       
       0 likes, 0 repeats
       
       @Eclipse @Mangdries Sure, if you make a matrix or currency, there's established rules for how these should function. Please for the love of god don't use it for stupid things like:guild + player
       
 (DIR) Post #AkPduMa4zRTUAHdXBw by prlzx@hostux.social
       2024-07-29T05:14:04Z
       
       0 likes, 0 repeats
       
       @BrodieOnLinux Assembly language programmers will be along shortly to tell you how jumps (goto) have been around since forever and are not considered problematic at that level, and underpin most high level control structures like loops, if/then/else and switch/case.
       
 (DIR) Post #AkPhnGjOjxddoOrsLw by BrodieOnLinux@linuxrocks.online
       2024-07-29T05:57:42Z
       
       0 likes, 0 repeats
       
       @prlzx Functions are just named goto statements lol
       
 (DIR) Post #AkPpQMdvOToz7Ttg7k by yrlf@graz.social
       2024-07-29T07:22:55Z
       
       0 likes, 0 repeats
       
       @BrodieOnLinux C++ has lots of really nice features that improve safety if used right: Smart pointers, destructors, templates to avoid needing to build type-erased containers that handle raw memory where you can accidently cast to the wrong type, the list is long...On the other hand, most of these features are easier to use incorrectly than to use correctly, and a safe C++ env requires lots of setup and a really good library ecosystem, both of which arguably don't exist in a lot of projects.
       
 (DIR) Post #AkPqkUkN4aYU024j7Q by technobaboo@ordinary.cafe
       2024-07-29T07:37:57Z
       
       0 likes, 0 repeats
       
       @BrodieOnLinux having lived my Wayland compositor from c++ to rust OH GOD KILL C++ DIE AUGHand wlroots had soooo many memory issues like double free on killing xwayland
       
 (DIR) Post #AkQ1NvzwgdAHLwny9g by prlzx@hostux.social
       2024-07-29T09:37:09Z
       
       0 likes, 0 repeats
       
       @BrodieOnLinux Probably as CALL and RET for functions and procedures (like BASIC's GOSUB).But yeah anything else that involves a conditional skip or repeat of a block usually results in a JR or JP to a label.(at least on Z80A).
       
 (DIR) Post #AkQiEzE5bxJymtOsvg by Suiseiseki@freesoftwareextremist.com
       2024-07-29T17:37:29.555100Z
       
       0 likes, 0 repeats
       
       @BrodieOnLinux >Functions are just named goto statements lolThey aren't.While you can use `goto` to jump to a function address, things explode when you hit `ret`.Typically you would want to push non-saved registers onto the stack, before `call`ing the function, so the working variables aren't overwritten and the return address is pushed to the stack, so the function actually returns on hitting `ret`.
       
 (DIR) Post #AkREzgcRo5AHDq6c76 by BrodieOnLinux@linuxrocks.online
       2024-07-29T23:42:58Z
       
       1 likes, 0 repeats
       
       @Suiseiseki The lol implies it's a joke
       
 (DIR) Post #AkSBUHovqtUad4EzwG by Conan_Kudo@fosstodon.org
       2024-07-30T10:37:55Z
       
       0 likes, 0 repeats
       
       @BrodieOnLinux To be fair, window managers are under the bucket of "systems programming".
       
 (DIR) Post #AkSBfH1DAqx9KMDv7o by BrodieOnLinux@linuxrocks.online
       2024-07-30T10:38:42Z
       
       0 likes, 0 repeats
       
       @Conan_Kudo Usually people are talking about embedded code or kernel level code when they say that
       
 (DIR) Post #AkSBqjUVecG4opOLMe by Conan_Kudo@fosstodon.org
       2024-07-30T10:39:52Z
       
       0 likes, 0 repeats
       
       @BrodieOnLinux @Eclipse @Mangdries Why not? I think overloading it so you can do "guild =+ player" to mean "add a player to the guild", I think it would make sense. It reasons well.The point of operator overloading is to make it easier to map conceptual understanding to code logic.
       
 (DIR) Post #AkSC5l36906rzhjc24 by BrodieOnLinux@linuxrocks.online
       2024-07-30T10:42:43Z
       
       0 likes, 0 repeats
       
       @Conan_Kudo @Eclipse @Mangdries I think the main issue is when the interaction isn't clearly documented or clearly curated to only perform that single action. If all it is doing is that one action I could see it making sense but if there's some other management stuff that needs to run in the background it's not implied by that operator.
       
 (DIR) Post #AkSCIiXKnQQNy13b96 by Conan_Kudo@fosstodon.org
       2024-07-30T10:47:04Z
       
       1 likes, 0 repeats
       
       @BrodieOnLinux That's an incorrect understanding. Systems programming is about building systems environments. Wayland compositors are *display systems*.The reason video games make sense in C++ is because they are also a special case of systems programming. They are essentially operating system development on steroids: you have to build hardware abstractions, input management, display control, I/O, etc. yourself to optimize for the game environment.
       
 (DIR) Post #AkSCNimHKMZiA8QuTg by Conan_Kudo@fosstodon.org
       2024-07-30T10:47:42Z
       
       0 likes, 0 repeats
       
       @BrodieOnLinux @Eclipse @Mangdries Why should it be? The point of an abstraction is to hide details like that from you.
       
 (DIR) Post #AkSCV64V7Th0QzTPpQ by BrodieOnLinux@linuxrocks.online
       2024-07-30T10:49:48Z
       
       0 likes, 0 repeats
       
       @Conan_Kudo @Eclipse @Mangdries Unexplained side effects are usually a bad thing, but it's a matter of documentation. If it's clearly explained and developers on the project under stand it then do whatever
       
 (DIR) Post #AkSCbtlzFBd0Jm3aYi by BrodieOnLinux@linuxrocks.online
       2024-07-30T10:52:07Z
       
       0 likes, 0 repeats
       
       @Conan_Kudo I think there's a confusion of terminology here, systems programming specifically refers to low level hardware aware development https://en.wikipedia.org/wiki/Systems_programming
       
 (DIR) Post #AkSCu0tbV3zJcbG1qK by Conan_Kudo@fosstodon.org
       2024-07-30T10:55:19Z
       
       0 likes, 0 repeats
       
       @BrodieOnLinux No. My categorization fits the definition on Wikipedia. Display systems have all those characteristics.
       
 (DIR) Post #AkSDUOE8EVI2PHClPc by BrodieOnLinux@linuxrocks.online
       2024-07-30T10:59:58Z
       
       0 likes, 0 repeats
       
       @Conan_Kudo Most of the time you're talking to the hardware through drivers rather than talking to it directly though
       
 (DIR) Post #AkSE3gx8bPMUcT5bKi by Conan_Kudo@fosstodon.org
       2024-07-30T11:07:14Z
       
       0 likes, 0 repeats
       
       @BrodieOnLinux Talking to libdrm and libinput is almost as painful as talking to hardware directly. They're not particularly easy libraries to use.
       
 (DIR) Post #AkSRjP3mofiwh0Q2Zk by Suiseiseki@freesoftwareextremist.com
       2024-07-30T13:41:55.899833Z
       
       0 likes, 0 repeats
       
       @BrodieOnLinux Good jokes are correct.
       
 (DIR) Post #AkSRrcNv9vGiKqko7s by kirby@lab.nyanide.com
       2024-07-30T13:42:49.743096Z
       
       0 likes, 0 repeats
       
       @BrodieOnLinux everybody should just write machine code in hex with a hex editor