• 2 Posts
  • 38 Comments
Joined 1 year ago
cake
Cake day: June 14th, 2023

help-circle

  • FWIW, cppfront would be the same, IMHO. It allows C++ syntax, and it just passes it through verbatim. Only transforms “syntax 2” into today’s C++. And Herb Sutter very much says that what it does is based on the papers that he’s presented for standardization, and that he’d like this approach (new syntax) land into today’s C++ compilers and the standard.

    cppfront is the only one that I thought had a chance till recently. The presentations from Sean Baxter seem to finally make the community see it on a positive light (I’ve seen posts on Reddit being removed on the premise of not being C++, which I think it’s a bit unfair), so that’s good.


  • I have to admit that I never understood the need for bashrc and bash_profile. I hated that with a passion when I started to set up my bash configuration. I never saw the need to have so many files and so much complication to have a consistent shell whenever I logged in the console or spawned a konsole in KDE.

    The paths shown on that diagram are 7 for bash, and 4 for zsh, so it’s surely an improvement. However, now that I have set it all on a git repository, I don’t see it as a big deal. I have a profile that sources bashrc, and then I do it all in bashrc. I’ve checked /etc/skel and it seems the distro does roughly the same (and I’ve never switched away from Debian or Debian-based in 20 years). I’m not sure if it’s such a big deal. But I’m still curious about trying zsh some day. :)

    Thanks for the blog post. I’ll check it out.


  • Also preemptively deciding that me disagreeing with you automatically makes you right because you predicted your explanation wouldn’t satisfy me is just A-tier bullshit.

    I predicted that I would waste my time by replying to you, and I predicted right.

    I wanted to give it a chance, though, because Lemmy is a place that is friendly enough and that I want to thrive, despite how little I contribute. I tried to be constructive and explain things the best I could, and assume the best possible faith, etc. When you just say that I sound like an asshole, and completely act in bad faith in how russian roulette is supposed to be in the context of someone who says “you can beat me at any game”, now I feel the urge to try the block feature in Lemmy, sorry.


  • Two people go on a date. The date is going well, there is chemistry between the two people. One says “if you beat me at any game we can have sex”. The two people will typically play a board or card game, and will flirt with the opportunity of sex during the game play, which is gonna be fun and exciting. Seems a good plot idea for your average romantic comedy movie or teenager’s series.

    Now the joke is that the choice of game is stupid because you end up killing your date. Just with that you could make a meme/joke. Now the post is doubling down on the stupidity, insanity, etc., by making it morbid and showing that the guy still had sex with the corpse.

    Here it is. My take on the issue, which is unlikely to be the only possible explanation which is not “incel shit”. I’ve wasted 10 minutes of my time, and you’ll likely will still not agree with me, and will prove valid my first comment.

    Cheers.


  • Has it occurred to you that pressing the downvote button is just much easier that having to bother explaining something that should be obvious?

    If it is not obvious to you that it’s not incel shit, maybe even after an explanation you won’t agree still because you have different views (which I’m not saying are not respectable, but are still different, so an agreement can’t be reached), so whoever replies to you would have wasted their time.

    So of course people downvote without replying.


  • Yes. There is already an answer with many votes saying so, but I’ll add myself to the list.

    I don’t have to like all the language, and not even all of the standard library. I learnt C++ with the Qt library, and I still do 99% of my development using Qt because it’s the kind of software that I like to write the most. I can choose the parts that I like the most about the full C++ ecosystem, like most people do (you would have to see how different game development is, for example).

    I’m also learning Rust, and I see nothing wrong with it. It’s just that I see C++ better for the kind of stuff that I need to write (at this time at least).







  • I’ve been compiling apps depending on newer Qt and/or kdelibs versions for ages (back when the repository was literally called “kdelibs”, about 20 years ago).

    This has never been an issue for me. Even with autoconf/automake, I just compiled everything to its own prefix, so it doesn’t interfere with the system at all. You don’t even need to fix the build system in the cases where it’s broken/lacks features, if you leverage all the “path” variables (CPATH, LIBRARY_PATH, LD_LIBRARY_PATH, PKG_CONFIG_PATH, etc.). But autotools, cmake, qmake, and every build system I’ve used so far supports this out of the box.

    Not claiming it’s a skill issue, but I have to say I’m very surprised by reading any of this.

    Specifically, for Debian, I was told 20 years ago by a very wise person “you never do make install on Debian, specially not for the kernel”, and taught me how to use make-kpkg (or something like that, I don’t remember the name of the tool), which was a way to make a debian package of a self built kernel, which is obviously something that can’t be installed to its own prefix.



  • Related: There is an article on LWN called Lua and Python, which is mostly about the approach of the two languages WRT being “batteries included” or not.

    I think Lua being a bit barebones is 100% fine… if you just pair it with a good helper library, or set of libraries with a coherent API, that allows it to thrive. Then you can either use the framework library or not, depending on whether your project requires the extras, or can do without.

    As a parallel, I’ve been doing C++ development for almost two decades, and I cannot imagine doing anything non-trivial without Qt. For example, Qt has a debug framework that pretty prints automatically most containers, and adds the newline also automatically. Also, QString is an actual string type, whereas std::string is more like QByteArray. It’s functionality that it’s essential for me (and it’s just the minimal examples… then Qt has all the GUI functionality, of course, but I use Qt even in console-only programs!).

    This is surely opinionated on my side, and most C++ devs don’t see it this way, but my point is that a language with a “core experience” that it’s lackluster to you should not be a bad thing if the language is capable enough to provide an ecosystem with a good 3rd party library that adds exactly what you want. In the Lua ecosystem that maybe it’s Penlight.

    But I totally get your point. Penlight doesn’t even seem to have a math library, so I found no round implementation there. This can be not a problem for some, but deal breaking for others.


  • Normally the good jokes are also somewhat smart, even though they are not “serious”. A joke about Texas being big is not very smart, IMHO. Is also not very original, as it’s not the first one I’ve seen in this vein. And above all, it’s specially stupid to end it with a remark about “The European mind cannot comprehend this”, because Europeans know a lot more about the US than the US people know about Europe.

    IOW, it’s not that it’s struck a nerve, it’s that it was legit bad.

    PS: Oh, and, the fact that it appeals to Europeans, it seems like it appeals on Europe as a whole, which makes it doubly stupid, because then individual members of the EU/continent are like USA states, and then each member/state has routes as long as the one in the original meme.


  • I’d have to dig it, but I think it said that it added the PID and the uninitialized memory to add a bit more data to the entropy pool in a cheap way. I honestly don’t get how that additional data can be helpful. To me it’s the very opposite. The PID and the undefined memory are not as good quality as good randomness. So, even without Debian’s intervention, it was a bad idea. The undefined memory triggered valgrind, and after Debian’s patch, if it weren’t because of the PID, all keys would have been reduced to 0 randomness, which would have probably raised the alarm much sooner.


  • no more patching fuzzers to allow that one program to compile. Fix the program

    Agreed.

    Remember Debian’s OpenSSL fiasco? The one that affected all the other derivatives as well, including Ubuntu.

    It all started because OpenSSL did add to the entropy pool a bunch uninitialized memory and the PID. Who the hell relies on uninitialized memory ever? The Debian maintainer wanted to fix Valgrind errors, and submitted a patch. It wasn’t properly reviewed, nor accepted in OpenSSL. The maintainer added it to the Debian package patch, and then everything after that is history.

    Everyone blamed Debian “because it only happened there”, and definitely mistakes were done on that side, but I surely blame much more the OpenSSL developers.


  • Is it, really? If the whole point of the library is dealing with binary files, how are you even going to have automated tests of the library?

    The scary thing is that there is people still using autotools, or any other hyper-complicated build system in which this is easy to hide because who the hell cares about learning about Makefiles, autoconf, automake, M4 and shell scripting at once to compile a few C files. I think hiding this in any other build system would have been definitely harder. Check this mess:

      dnl Define somedir_c_make.
      [$1]_c_make=`printf '%s\n' "$[$1]_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2" | tr -d "$gl_tr_cr"`
      dnl Use the substituted somedir variable, when possible, so that the user
      dnl may adjust somedir a posteriori when there are no special characters.
      if test "$[$1]_c_make" = '\"'"${gl_final_[$1]}"'\"'; then
        [$1]_c_make='\"$([$1])\"'
      fi
      if test "x$gl_am_configmake" != "x"; then
        gl_[$1]_config='sed \"r\n\" $gl_am_configmake | eval $gl_path_map | $gl_[$1]_prefix -d 2>/dev/null'
      else
        gl_[$1]_config=''
      fi
    

  • this has to do with writing ‘better’ code, which has proved impossible over and over again

    I can’t speak for C, as I don’t follow it that much, but for C++, this is just not fair. It has been proven repeatedly that it can be done better, and much better. Each iteration has made so many things simpler, more productive, and also safer. Now, there are two problems with what I just said:

    • That it has been done safer, that doesn’t mean that everyone makes good use of it.
    • That it has been done safer, doesn’t mean that everything is fixable, and that it’s on the same level of other, newer languages.

    If that last part is what you mean, fine. But the way that you phrased (and that I quoted) is just not right.

    At this point it’s literally easier to slowly port to a better language than it is to try and ‘fix’ C/C++.

    Surely not for everything. Of course I see great value if I can stop depending on OpenSSL, and move to a better library written in a better language. Seriously looking forward for the day when I see dynamic libraries written in Rust in my package manager. But I’d like to see what’s the plan for moving a large stack of C and C++ code, like a Linux distribution, to some “better language”. I work everyday on such a stack (e.g. KDE Neon in my case, but applicable to any other typical distro with KDE or GNOME), and deploy to customers on such a stack (on Linux embedded like Yocto). Will the D-Bus daemon be written in Rust? Perhaps. Systemd? Maybe. NetworkManager, Udisks, etc.? Who knows. All the plethora of C and C++ applications that we use everyday? Doubtful.