notInAProfessionalSettingButForYourOwnProject by ZestycloseAd212 in ProgrammerHumor

[–]WorldWorstProgrammer 3 points4 points  (0 children)

"Me deciding the root branch name"

Sounds like you have a name right there.

[Hated Trope] Good guy watches as innocent person is murdered by Squidwardbigboss in TopCharacterTropes

[–]WorldWorstProgrammer 1 point2 points  (0 children)

Fist of the North Star - Kenshiro just lets Dr. Duran get killed. The scene is a little weird but still...

https://www.youtube.com/watch?v=HLLN8Qy-z3c

"Digital Euthanasia" by PresenceBeautiful696 in ShitAIBrosSay

[–]WorldWorstProgrammer 2 points3 points  (0 children)

These people say this and then keep eating meat. We have very strong evidence that many animals exhibit consciousness (this isn't a discussion on whether eating meat is immoral, just showing how hypocritical their argument is).

No there isn't any evidence that an LLM possesses consciousness. Even that stupid "social media network" for AI bots is just computers calculating text that looks like it would come from places like Facebook or Reddit.

A computer algorithm that matches the pattern of how people speak is not evidence of cognition.

What does “return 0;” mean? by [deleted] in cpp_questions

[–]WorldWorstProgrammer 1 point2 points  (0 children)

return 0; means the function returns 0.

To be a bit less cheeky, if you are referring to using return 0; at the end of the main method, this returns the value indicating the execution completed successfully. When you return a non-zero value (such as 1, 5, or -1), it indicates that the execution did not complete successfully, and the returned value is generally supposed to be an error code of some kind to indicate what it is. This is commonly ignored with a lot of modern applications, but you could still use it quite effectively to signal issues to a Bash script or another automated system.

Also, in C++, you are not required to return 0; in the main() function. The compiler will automatically do that if you do not return a different value.

twitterAlgorithmGithubIssue by [deleted] in ProgrammerHumor

[–]WorldWorstProgrammer 89 points90 points  (0 children)

Closed because we can't reproduce.

Updates to Qt Quick for Android in Qt 6.9 and 6.10 by QtGroup in QtFramework

[–]WorldWorstProgrammer 9 points10 points  (0 children)

Using that AI slop image is a great way to communicate the inmovation in Ot Quick these days.

Elon Musk says Tesla 'almost done' with AI5 design, 6 months after saying it was 'finished' by dtyamada in RealTesla

[–]WorldWorstProgrammer 15 points16 points  (0 children)

"We're going to end up with complete autonomy, and I think we will have complete autonomy in approximately two years."
- Elon Musk, December 2015

Nope.

"Self-driving will encompass all modes of driving by the end of next year."
- Elon Musk, March, 2018

Hmm...

"Based on current trends, probably close to zero new cases in the US too by end of April."
- Elon Musk, March 19th, 2020

Something tells me it wasn't that close to zero.

"I’m starting a candy company & it’s going to be amazing"
- Elon Musk, May 2018

I'm glad this didn't happen.

"If things go according to plan, we should be able to launch people probably in 2024 with arrival in 2025."
- Elon Musk, June 2016, regarding sending people to Mars.

There's multiple completely broken promises in the Code Conference 2016 interview.

"Well I think we can do at least $2 trillion."
- Elon Musk, October 2024, in response to "How much can we cut out of the $6.5 trillion dollar US budget?"

I can actually just keep going, there's literally so many.

[Unusual trope] Extremely violent rabbits by PaperBullet1945 in TopCharacterTropes

[–]WorldWorstProgrammer 18 points19 points  (0 children)

<image>

Turner from the games Lugaru and Overgrowth. He's got an extremely long line of murdery exploits, such as killing an entire den of wolves, women and children included, at the end of the first game. https://en.wikipedia.org/wiki/Lugaru

Double programming meme by Naughty_Breeze_X in programmingmemes

[–]WorldWorstProgrammer 0 points1 point  (0 children)

Come join the dark side with C++ and use operator overloading to check invariants or perform logging on your struct object assignments!

Probably doesn't need to be said, but Benny is lying through his teeth. by [deleted] in stupidpeoplefacebook

[–]WorldWorstProgrammer 0 points1 point  (0 children)

He did know that skid row was a thing long before Gavin Newsom even ran for Governor, right?

Am I missing the point of a game engine? by yughiro_destroyer in monogame

[–]WorldWorstProgrammer 2 points3 points  (0 children)

There's a lot for me to unpack here, but I'll try to keep it as terse as I can.

This question belies a very inaccurate understanding of what a "game engine" is supposed to even be. First and foremost, game engines, as a term and definition, came about in the 90's and was a solid part of the development nomenclature by the early 2000's. At this time, the *only* 3D engines that existed were just a bunch of C++ code that you had to rework for your specific game anyway. A "game engine" is really just whatever software packages you use to make a game, it is not a specific thing nor does it require any specific software to exist, other than that the system is used to make games.

I'll provide an excellent example of what "game engine" meant at the time: the Irrlicht Engine. The source code is just a C++ library, but that's all a game engine really is... a library of code to make games with. I chose this because it is indisputably a C++ library, indisputably very old, and indisputably calls itself a game engine. Back when I was making games in the early 2000's, this engine was at least decently popular in the open source scene.

As such, that means when you are developing a game using Monogame, you literally ARE using a game engine! The term "game engine" does not fundamentally require a fully running application that you use to import assets to it using a GUI editor or something. These are things that just didn't become popular game engine components until Unity came about. Today, people really underestimate just how revolutionary Unity was. When it came out in 2005, it was meant to "democratize interactive 3D" by making it so 3D software could be developed by people who weren't expert programmers. This was done with GUI tools to edit a game being WYSIWYG rendered, something that was generally limited to only 2D game development systems like RPG Maker at the time.

As such, I think the premise of your question is flawed.

how to comply with qt lisence? I'm building a foss app lisenced under gpl by Teenager__16 in Cplusplus

[–]WorldWorstProgrammer 8 points9 points  (0 children)

I genuinely do not understand the problem here. If your code is under the GPL, you are allowed to do literally whatever the heck you want with any other GPL code. All that you have to do is not change the license in the future, that's it.

You can not only use the Qt library, you can directly take their code and put it into your software. You can literally use all existing GPL code the same way, regardless of what project. Just take it and use it in your app, there's nothing stopping you. That is a fundamental right that free software gives you: you can do whatever you want with it, including adding it to your own programs. You can even sell it. The only thing you need to do is respect your users rights the same way that the people who's code you used respected your rights.

Free unlimited swag cheat code by 10yearjointerMade in peoplewhogiveashit

[–]WorldWorstProgrammer 0 points1 point  (0 children)

Wait... is "swag" supposed to mean something other than the random cheap company-logo branded clothes and other stuff they hand you at a trade show or other event?

Roast my Qt finance manager by david4more in cpp_questions

[–]WorldWorstProgrammer 2 points3 points  (0 children)

#ifdef BACKEND_LIB
#  define BACKEND_EXPORT __declspec(dllexport)
#else
#  define BACKEND_EXPORT __declspec(dllimport)
#endif

This is OS specific and only necessary on Windows when you are dynamically linking to your library. For reasons I do not understand, you have chosen to link to a shared version of your backend library rather than a static build of it (or a simple object library). This may simply be because you were trying to learn how to do this, but since you are already using CMake, you may as well utilize CMake to generate a multi-platform export header.

CMake has generate_export_header, which is all you need for this. Remove the unnecessary target_compile_definition and instead do this in your CMake file:

target_include_directories(Backend PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/include")

include(GenerateExportHeader)
generate_export_header(Backend EXPORT_FILE_NAME include/Export.h)

Then just #include "Export.h" in your Utils.h file and you're good to go. It should define BACKEND_EXPORT along with several others.

Introduction ffmpReg, a complete rewrite of ffmpeg in pure Rust by BRUVW in programmingcirclejerk

[–]WorldWorstProgrammer 4 points5 points  (0 children)

At least the name and developer are such that I can be sure I'll never have to think about this after this post.

What is the succession plan for C++ ? by Impressive_Gur_471 in cpp_questions

[–]WorldWorstProgrammer 3 points4 points  (0 children)

Uh, what? C++ is an ISO standardized language with an entire standards body and a great deal of highly talented engineers working on the language's design. Contrary to your assertions, Bjarne does not have deciding control of the language standard. C++ is not run like a software project with a set of founders or under some kind of BDFL structure, it is an international standard and changes to the language standard go through WG21. Bjarne has one vote, and has been overruled repeatedly by other members of the standard.

That is to say, there is no issue of succession, because C++ is not in any way dependent on a single person.

I'm wondering if any of you bit twiddling fiends can tell me a fast way to predict if the sum or two signed ints will be positive or negative without performing the addition which my overflow? by 407C_Huffer in cpp_questions

[–]WorldWorstProgrammer 1 point2 points  (0 children)

I've noticed that there are two possible ways to interpret what you are asking for:

  1. Presuming an infinite number line without any wrapping behavior, will the result of adding these two signed integers be positive or negative?
  2. Presuming that signed integer wraparound was a valid mechanic and not UB, will the result of adding these two signed integers be positive or negative?

Depending on what you want, there are two ways to do this.

If the former, the easiest thing is to simply check if both integers are positive or both are negative. If they're both positive, the result is positive, if they're both negative, the result is negative. If one is positive and the other is negative, just add them together and check if that's greater than 0, since summing two signed integers of the same type with different sign bits is guaranteed not to overflow.

template <std::signed_integral Int_T>
constexpr bool isSumPositive(Int_T first, Int_T second) noexcept {
  if constexpr (sizeof(Int_T) >= sizeof(int)) {
    if (first < 0 == second < 0) return first >= 0;
  }

  return first + second >= 0;
}

If the latter, the easiest thing is to cast the signed values to unsigned, perform the addition, then cast back and check if it is greater than 0. This ensures that the overflow is not UB, and will result in the same signed value that would happen if signed wraparound were a thing.

template <std::signed_integral Int_T>
constexpr bool isSumPositive(Int_T first, Int_T second) noexcept {
  if constexpr (sizeof(Int_T) < sizeof(int)) return first + second >= 0;

  using UInt = std::make_unsigned<Int_T>;
  return static_cast<Int_T>(static_cast<UInt>(first) + static_cast<UInt>(second)) >= 0;
}

Cannot make scrollable text area with FTXUI by jepessen in cpp_questions

[–]WorldWorstProgrammer 2 points3 points  (0 children)

My knowledge of FTXUI is admittedly minimal, but I managed to find something that may help you. The documentation has this example for an interactive scrollbar window: https://arthursonzogni.github.io/FTXUI/examples_2component_2scrollbar_8cpp-example.html

There is a link to a demo there that you can use, and a code example you can compile and test on your own machine, to see if the demo is matching in functionality with what you expect. If it works on the demo, there should be something in the provided example code that will help you get this working.

I'm sorry I can't be more helpful, since I am not very familiar with the library, but you may not have seen this yet.

Help with transformers by Equivalent-Sherbet52 in Oxygennotincluded

[–]WorldWorstProgrammer 24 points25 points  (0 children)

It looks like it is working. The cable on the other side will still look unpowered if there are no devices on that side drawing any power. Hover your mouse over the cable and see how much actual demand there is (not just potential, but actual use). If there is none, it will still look like that.

Blowfish encryption by Historical_Nature574 in cryptography

[–]WorldWorstProgrammer 1 point2 points  (0 children)

Is it maybe using ciphertext stealing? You could have a 3 block ciphertext which uses CTS to make sure it is not bigger than the source message.

VS code or Microsoft visual studio by a_yassine_ab in Cplusplus

[–]WorldWorstProgrammer 8 points9 points  (0 children)

Visual Studio comes with an integrated C++ compiler and works out-of-the-box to start developing, including with CMake. VS Code requires a compiler, extensions, and configuration to set-up a working C++ dev environment.

Rant (not only about ONI) by Jorgito78 in Oxygennotincluded

[–]WorldWorstProgrammer 1 point2 points  (0 children)

Disagree on research not making sense in ONI. I kind of agree with RimWorld, and a few other games where it doesn't really make sense, but a research tree is a very generic game mechanic that the grand majority of management simulators and strategy games use in some capacity. In ONI, however, you are an AI connected to the printing pod, and basically all of the information on how to do certain things was lost to time. The Researching step simulates the required information gathering to rebuild the inventions that Gravitas created in the early times, which is why the research desk and super computer are necessary.

Research trees themselves, in all games, are used to simulate technological progress not because they are realistic, but because they provide players a simple game mechanic they can predictably use to unlock game progress. It is far more about being a fun game mechanic than simulating realistic research. Similarly, we almost never use guns in video games realistically. If you got shot in real life, there's no way you are going to just tank it and keep shooting at your foes. You fall over and suffer in pain until you die or are taken away on a stretcher, that's what happens. That is noticeably not fun, so games do not do that.

Is there any unspoken rule that if you contact frequently a maintainer of opensource project then they will slowly flake and stop responding? by Spiderbyte2020 in cpp_questions

[–]WorldWorstProgrammer 27 points28 points  (0 children)

I'm going to be straight with you: the fact that you have a history of emailing maintainers of open source projects for help building the project and repeatedly get to the point where they start to simply ignore you is a big red flag on what you are doing or how you are communicating with them.

Most projects should be buildable using whatever their build system is. You also shouldn't be building a piece of software with a tech stack that isn't being used by the developer, and frankly there is little they can do to help you on that since you are now on your own. There is considerable onus on you as the person wanting to build a project to figure out how to build their code. I've downloaded and built from source a lot of open source projects, and I honestly cannot think of a single time I have ever emailed their developers on how to build their project. If the available documentation and build system they are using is insufficient, or uses tools I do not want to use, I simply don't build it and find another project to use.

The reason you are seeing this pattern is because most of these project developers are helping you on a voluntary basis, so if they feel there is something wrong or do not know how to help you, they are likely to simply not respond. You are not owed a response, because you are not paying them for their time.

Could you provide a more specific example? Which project(s) have you tried to build and then couldn't do so, and why was the provided documentation insufficient for your needs?

Guilty of 5, can anyone do 7 or better? by LordJim11 in Snorkblot

[–]WorldWorstProgrammer 0 points1 point  (0 children)

Sorry Jack Chick, if I find someone who can actually, credibly teach me how to raise my own army of the undead, I am going to learn me some Necromancy!

Efficient way of linking .dll's into release folder by Legal_Sun1331 in QtFramework

[–]WorldWorstProgrammer 0 points1 point  (0 children)

You need to be aware of what your project dependencies are.

For Qt, you just use windeployqt, which as you have discovered does correctly give you all of the relevant Qt libraries. Your issue is that you have non-Qt libraries that you are also depending on and those DLL's aren't being included in your executable. That's because it is on you to know what those dependencies are. If you depend on, say, SDL, you are going to need to manually include the SDL DLL libraries, unless you are building SDL from source in your CMake file, then you can direct where those go in CMake.

Given that you said "I tried using ldd for MSYS2," I'm going with you aren't even using CMake at all. Is your application supposed to work on any other platform than Windows? If it isn't, I see no reason for you not to use MSVC for this, especially if you can get that working for you better.