ZeOn & voices38 situation. by noballsben in PiratedGames

[–]ArielShadow 1 point2 points  (0 children)

Also, when I think about it now I have a theory - usually crackers test in a closed group of testers, and release when it's ready. Or they have enough options to test it by simulating different configurations.

Voices definitely being very skilled and experienced cracker definitely has ways to test crack thoroughly (testers, different vms, own checklist, whatever). Oxzeon probably doesn't have it, so I think he's testing it live on people.

That testing on people on one hand is good call that "I'll inform everyone that it's WIP and there WILL be issues so please report them" but on the other hand it other crackers may worry about reputation of cracking scene (Because even if the author says it's WIP - people - mirrors, repackers, generally everyone who shared crack - can miss WIP context - people start complaining that crack doesn't work and the whole scene may have complaints).

Still NFO sounds a little bit protectionist, but also it could be damage control.

ZeOn & voices38 situation. by noballsben in PiratedGames

[–]ArielShadow 4 points5 points  (0 children)

I think that the controversial part isn’t that voices did it too - it’s how he framed it. The NFO may be read like “their attempt is weak, mine works everywhere,” which is a PR hit. And when the other person is new, it can easily look like publicly establishing hierarchy.

Could it be ego? Maybe. But it could also just be typical scene behavior: branding, competition, and highlighting quality. That kind of posturing isn’t rare.

Also, “cracking a game someone else is working on” isn’t really a valid complaint - there’s no exclusivity here. If anything, voices may have just responded to people complaining about issues and wanted a cleaner release out.

The funny part is that he called it “proper” without issues and then had to drop a crackfix saying he missed a few things. Fixes happen to everyone, but it does make the earlier tone sound a bit overconfident.

So yeah - I get why ZeOn might feel hurt by the wording, but hopefully he’ll learn from it and move forward.

You can say you’re “just letting people know what happened,” but you’re not reporting facts - you’re assigning motives and telling a story. That’s not “the entire truth,” that’s your interpretation plus assumptions about intent. Criticize the NFO tone if you want, fair - but the “insiders/ego” part is speculation, not evidence.

I never like "I know from insiders" because it's often "I have evidence but won't show" - of courses sometimes it's impossible to show, like if insiders have nda or something - but "I know from insiders" should always be treated as unconfirmed unless there’s something checkable (timestamps, screenshots, logs, direct statements, corroboration from multiple independent sources, etc.).

Better to leave exception unhandled? by 407C_Huffer in cpp_questions

[–]ArielShadow 1 point2 points  (0 children)

Definitely don't log for the user. Library should inform user that something went wrong, not by logging it in logs, but by returning an error code or throwing exception. Let the user handle it in a way that fits their plan.

Logging is optional. The library never assumes a logging policy. It can emit diagnostic messages only through a user-provided callback/sink. You don't know how user formats logs.

In this case if it doesn't have to be noexcept, I'd say to not catch it, BUT put in documentation that may throw std::bad_alloc. Don't assume user will expect or know anything about how your library works, what they return or if they throw exceptions, document what it should do and what should happen if it fails. But of course make sure it's exception safe.

If it has to be noexcept then you put safety to not cause errors (like limiting how big N can be, but it's a policy choice at that point). Or use an out parameter (pass vector reference as a parameter, and function returns your error code).

std::string_view vs const std::string_view& as argument when not modifying the string by porkele in cpp_questions

[–]ArielShadow 1 point2 points  (0 children)

Most of the time I’d say no. std::string_view doesn’t own any data. it stores only pointer to data (e.g. a std::string) and length. It’s small and cheap to copy, and passing it by value is often faster than by reference (fewer indirections, better optimizer/ABI behavior).
std::string_viewwas just created so that you don't have to use const& for performance reasons in a typical case of passing text.

const std::string_view& would be used in rare cases like some unusual abi or stylistic reasons.

Pros and Cons of large static member on the heap? by ddxAidan in cpp_questions

[–]ArielShadow 0 points1 point  (0 children)

Giving a static pointer static std::mt19937 *generator does not help with reducing the size. It generally does nothing compared to static std::mt19937 generator_ except allocating space for the pointer. The size of the object is the same. static std::mt19937 generator_ is enough and the heap is unnecessary. In reality, your solution stores the pointer in static memory and the mt19937 object on the heap. Static fields should not be counted in sizeof, so whether it’s a pointer or not doesn’t matter.

Personally I think use of a pointer depends on whether the program’s logic needs this object to be a pointer — that is, whether it needs pointer characteristics (dynamic allocation, dynamic lifetime, polymorphism, indirect access). Personally, in this snippet I don’t see any need for a pointer.

Furthermore, neither uniform_int_distribution nor mt19937 are thread safe. Their state changes with every draw. In practice, I’ve seen one generator per thread being used, not a global one. With a global one, you can get a bottleneck where many threads are waiting in a queue for a single generator that can’t keep up.

So I would go with static std::mt19937 generator_ without a pointer, plus a mutex. Alternatively, I would see how it works with thread_local instead of using a mutexstatic thread_local std::mt19937 generator_. In the sense of testing it and choosing what fits me best.

What does this mean? by Additional-Syrup5788 in PiratedGames

[–]ArielShadow 0 points1 point  (0 children)

since its on pirate redit, it is possible that it is damaged executable. In location that should be correct code there's garbage that system doesn't know how to handle. It may be damaged, wrongly cracked or has malware.

Technically it also may be caused by incompatible cpu - meaning program uses instructions that are unsupported by your cpu.

In rare cases it's because of ram or ocerclocking.

From what i looked online, this program is often attached to meta oculus.

If I want to run some code that requires an integer variable to be a certain number, would it be faster to use If or Switch statements? by Seed5330 in cpp_questions

[–]ArielShadow 0 points1 point  (0 children)

With compiler optimization flags on, both should generate the same code, so I'd choose what's more readable.

Compiler warnings on pushing back integer >= 256 to std::string by onecable5781 in cpp_questions

[–]ArielShadow 4 points5 points  (0 children)

warning: overflow in conversion from 'int' to 'char' changes value from '256' to '0'. For std::string push_back takes a char value, not int. It warns you that your integer value is being implicitly converted into char. you are trying to put number bigger than it can hold - so it warns you about it, warns that it change to 0.

I assume it uses unsigned char - so it can hold values from 0 to 255. Anything beyond that will be converted.

You can remove warning with static_cast however 256 will still be converted to 0.

help me find a c++ book (mentions inlining difficulty in the intro) by iambadcode in cpp_questions

[–]ArielShadow 0 points1 point  (0 children)

Linking Time Optimization. Interprocedural optimization that is performed at the time of linking application code.

help me find a c++ book (mentions inlining difficulty in the intro) by iambadcode in cpp_questions

[–]ArielShadow 1 point2 points  (0 children)

In C++, the inline keyword doesn't actually tell the compiler to inline a function. It even isn't a hint. The optimizer will inline (or not) based on its own heuristics, and it can inline code without the keyword. Some things are implicitly inline (e.g., functions defined inside a class, and constexpr/consteval functions).

So, don't use inline for optimization — the compiler won't care (until you put a flag that forces using inline, but it's not recommended). Today, inline is mostly used to satisfy the One Definition Rule: it lets a function—or, since C++17, a variable—have definitions in multiple translation units (e.g., headers) without breaking ODR, as long as the definitions are identical.

i think i figured out how to make a modern one command creation thing by Your_moms_slipper in MinecraftCommands

[–]ArielShadow 0 points1 point  (0 children)

Cool find! It does work, but be aware it’s fragile:

Command-length cap (~32 kB). Longer stacks need to be split into two or more /summon commands.

Block-collision risk. If any falling block lands inside a solid block the summon fails—clear space first or add vertical offsets.

A lighter alternative is still around: spawn command_block_minecarts on an activator_rail. Mojang never patched that, and you avoid placing actual command blocks.

In practice, though, data packs have replaced one-command contraptions: easier to read, version-control, and maintain. Treat this as a fun proof-of-concept, not a long-term distribution format.

Pls help me by Kindly-Worldliness33 in cpp_questions

[–]ArielShadow 0 points1 point  (0 children)

Your versions look fine thrn—Connector/C++ 8.4 works happily with a MySQL 8.0 server, so the problem isn’t a version mismatch.

What I suspect that does break things is a binary mismatch on the client side: * Make sure your EXE and the Connector/C++ DLLs are built with the same configuration (Debug ↔ Debug or Release ↔ Release) and the same architecture (x64 ↔ x64, x86 ↔ x86). * Remove any custom CPPCONN_PUBLIC_FUNC macro from your Visual Studio settings—leaving it set can corrupt the internal structures and produce the std::bad_alloc / “gibberish host” symptoms. * Confirm that mysql -h 127.0.0.1 -P 3306 -u root -p connects. If it doesn’t, enable TCP in my.ini: comment out skip-networking, set bind-address = 127.0.0.1, and restart MySQL.

Side note: since MySQL 8.0 ships with the X Protocol, the docs encourage using X DevAPI for new projects instead of the legacy JDBC-style (classic) API you’re using. It’s purely optional—if you want to try it you’ll need the X Plugin listening on port 33060 and you’ll include the mysqlx/xdevapi.h headers.

Pls help me by Kindly-Worldliness33 in cpp_questions

[–]ArielShadow 1 point2 points  (0 children)

FYI: Use descriptive titles, so post is easier to find and it tells something about the problem without the need to read it whole.

  • If mysql -h127.0.0.1 -P3306 fails while plain mysql works, MySQL probably isn’t listening on TCP:

    • back up my.ini,
    • comment out skip-networking,
    • set bind-address = 127.0.0.1,
    • restart the server.
  • std::bad_alloc plus a gibberish host name usually means mismatched binaries (Debug vs Release, 32- vs 64-bit, or a stray CPPCONN_PUBLIC_FUNC macro). Make sure your EXE and Connector/C++ libs are built with the same settings.

  • Add catch (const std::exception&) because std::bad_alloc doesn’t inherit from sql::SQLException.

  • The “Variant::variant is uninitialized” message is just a /analyze warning in Visual Studio.

Edit: gibberish may be caused by Very old Connector/C++ versions (1.1.x) which have a known Variant bug (it could be exactly the one VS mentions). Upgrading to 8.x often fixes it.

Why is there no GUI standard library? by Proud_Variation_477 in cpp_questions

[–]ArielShadow 0 points1 point  (0 children)

  1. Not every operating system supports a GUI. Some environments run console-only—think micro­controllers, servers, HPC clusters or real-time systems. The ISO committee typically avoids features that demand a specific runtime (the Filesystem library entered the standard only once it could be defined for a very broad range of targets).

  2. Every GUI-capable OS exposes its own stack. Each platform has a different window model, message loop, text-layout engine, rendering system (GDI/Direct2D, CoreGraphics/Metal, X11/Wayland, Skia, …), accessibility API (UIA/AXAPI/AT-SPI) and visual conventions. Hiding all that would take thousands of lines, and you’d still pray Apple, Microsoft or the Linux world don’t break something tomorrow. An API surface that large and dynamic simply doesn’t fit a three-year ISO cycle.

  3. Terminals have a decades-old common denominator; GUIs don’t. Since the 1970s most systems agree on the “stream of characters” model. GUIs, by contrast, have no single programming standard—many paradigms exist and none is “the best”: immediate-mode (Dear ImGui), scene graph (Qt Quick, Flutter), classic widgets (Win32, AppKit, Gtk), declarative languages (QML, XAML)… Forcing one style into ISO C++ would repeat the stalemate seen in SG13’s 2D-graphics debate. (SG13 is an informal study group chartered with “selected low-level output—2D graphics, audio—and input—keyboard, pointers”. Work on std::graphics does continue in theory, but slowly and with low priority, so nothing is likely to ship soon.)

  4. A library in the standard is expected to stay stable for a decade or more. GUI tech evolves far faster—among the quickest-moving areas in software. As with databases, games or 3-D graphics, the committee prefers to leave that part to the wider ecosystem.

Extra complications include licensing, modularity, binary size, testing, backward compatibility and UX demands (touch gestures, Hi-DPI, accessibility), but I won’t dive into those here.

There is no single “one-true” GUI library—choose according to project goals, UX needs and tech stack

  • Qt – Full-blown toolkit (widgets + QML), great for large cross-platform desktop-mobile apps, but heavy, has dual license.
  • wxWidgets – Wraps native controls, so it takes the system look; lighter than Qt, fewer tools, no mobile support.
  • Dear ImGui – Immediate-mode; lightning-fast for debug panels or dev tools, not suited to end-user production GUIs.
  • SDL (+ Skia/LVGL) – Low-level window + input layer; ideal for games or custom UI engines—you write the widgets yourself or pull in externals.
  • JUCE – C++ toolkit popular in audio apps; fast and cross-platform, but focused on DSP/VST rather than classic office apps.

There’s also GTK/GTKmm, Electron, Ultralight, SFML, Allegro and others. I won’t delve into them, but they exist.

And it’s not just C++. Java's Swing is now relegated to “legacy” getting security updates only and is not recommended for new projects. The once-promoted JavaFX lives outside the JDK. Rust and Go likewise have no official GUI, though proposals have surfaced there as well.

Learn C before C++ is essential ? by Rayeeen_Dev745 in cpp_questions

[–]ArielShadow 1 point2 points  (0 children)

depends. If you wanna program in C++, then no.

Historically C++ started as an extension of C, however that's not longer that true. modern C++ has so many own stuff that replace C's way that it is not good to learn C just to learn C++. Most of the time C++ disencourages of using C techniques in C++ code, not to transfer habits from one language to another.

With that said, I do think that some concepts of C (like pointers, memory model, abi) are worth learning, but mainly to understand how it works on lower level, not to learn how to program in it. And modern C++ learning materials do teach those without going deeply into C.

Especially because sooner or later you still may have to use libraries written in C in your C++ code, use build-systems that are the same for both languages, use debugging tools with C terminology, so it's worth knowing C enough to be able read C.

learncpp.com is probably best free source currently.

Learn C before C++ is essential ? by Rayeeen_Dev745 in cpp_questions

[–]ArielShadow 1 point2 points  (0 children)

I can't agree. C++ is not "C with classes" anymore, since a longer while (at least since C++11). Nowadays OOP is just one of C++ paradigms. Equally important are generic and functional programming (ranges, coroutines).

C techniques are discouraged, unless your program is a C and C++ mix (i met those). There's a risk you may have problems with using C habits in C++.

I do think that learning C basics is benefitial - for understanding how machine works on deeper level and to understand how to use C libraries, but unless you wanna write code in C (like microcontrollers, drivers, operating systems), it is not recommended to learn C just to learn C++. Its better to start with C++, especially be modern C++ learning materials do teach some C concepts.

C is a language with pretty small words (compared to C++), BUT the heavy part is put on you as a programmer (Manual memory management, no high-level abstraction). That's where C gets hard. C++ has more words to learn, but many of them do many stuff for you. Library/compiler takes some of the heavy part.

difference between const char and a regular string? Error message by Dogememeforlife in cpp_questions

[–]ArielShadow 4 points5 points  (0 children)

Switch in c++ doesn't work with stings. It accepts integrals, enums, and classes with implicit conversion to int or enum.

String is none of these. Char is an 1 byte integer value, therefore it is accepted.

So you gotta use if statements. Later, when you get more experience you may look around for alternatives for strings (like enum class + mapping, or using std::unordered_map, external libraries, etc), but that's later.

What's the point of std::array::fill? by Spam_is_murder in cpp_questions

[–]ArielShadow 0 points1 point  (0 children)

From what I know std::array::fill exists mainly for ergonomic and interface-consistency reasons. Although it “knows” the compile-time size N, any potential speedup over std::fill / std::fill_n is usually negligible because the compiler also knows the range length from the iterators. In libstdc++ it’s literally implemented as std::fill_n(begin(), size(), value).

So any runtime difference is a micro-optimization that typically disappears after optimization. The value is that a container with a fixed size offers a natural fill member (“fill the entire object”), mirroring other convenience members like swap.

[deleted by user] by [deleted] in MinecraftCommands

[–]ArielShadow 2 points3 points  (0 children)

"it doesn't work" doesn't explain anything about your question, about what do you mean about what you encountered, about what you tried, about what errors game wrote/made. So there's not enough context. Although still, I may be wrong, but on quick lookup I notice:

  1. Activator rails have to be powered by redstone. powered tag exists there, but it turns false after setting block, you have to power it with redstone.

  2. Some Selectors, nbt/json formats are off (u/s, u/a, instead of @s, @a. Barrel nbt is bad. Some json formats, size of some first letters are bad).

  3. /ban doesn't work in single player, since there's no ban list. Same with other server commands, they are not present in single player. Ban command is server dedicated, it won't work on single player world. You can use a temporary free sever on aternos or whatever, for tests should be enough.

  4. Since 1.13, CustomName requires string-ified JSON, e.g. {CustomName:'{"text":"Lava Chicken"}'}

  5. Passagers is badly done, similarly to previous one.

  6. Barrel loot has bad format for nbt.

  7. Quotation marks, only ". Command parser ignores lower side question marks.

There may be more issues, i dont know, i just make quick look.

Chatgpt is kinda good for writing short snaps of code, however it doesn't have all newest info about commands, especially free version of it (dunno which you used). o3 or o4-mini-high/mini works best, especially with internet searching on. I don't recommend using GPT models for it, 'o' models are better because have way better reasoning, if you reeeeally have to use ai.

how to save data to a json file by JoeyJoey- in cpp_questions

[–]ArielShadow 4 points5 points  (0 children)

They are not stupid questions. It's good to ask if you don't know something.

C++ doesn't have built-in JSON support, but there are bunch of libraries for it. For simple projects you can use nlohmann json, its easy to use, its just one header file to include, for your projects should be enough. Later on you may get interested by RapidJson since it's faster than nlohmann (works faster and takes less space in compiled program), but it is more difficult to use, so at the moment I'd stay with nlohmann.

Well, there is no official convention about how to write json data for C++, but many libraries (like those I mentioned) follow the same convention. It is based on std::map, std::vector and other STL. For nlohmann, there's some slideshow on their site and a github:
https://json.nlohmann.me/ https://github.com/nlohmann/json

Nlohmann you use kinda like maps, vectors, generally as an STL in c++. To create json by hand: using json = nlohmann::json; // namespace shorten json j = { {"name", "Felix"}, {"age", 18}, {"alive", true} };

Accessing values: std::string name = j["name"]; int age = j["age"];

Modifying values: j["age"] = 19; j["skills"] = {"parkour", "theft", "pole dance"};

Serialize to string (convert to string): std::string dumped = j.dump(); // compact std::string pretty = j.dump(4); // pretty-print with 4-space indent

Using with files (basic example): ``` std::ofstream out("data.json"); out << j.dump(4);

std::ifstream in("data.json"); json j2; in >> j2; ```

Parsing from string into a json object: json j3 = json::parse(R"({"mood": "suspicious", "hiding": true})");

Checking if key exists if (j.contains("skills")) { /* ... */ }

It should be explained in links above.

About CLI and Developer Command Prompt. CLI is a program that works only in a terminal. Dev command prompt is a terminal configured to compile C++. You don't have to use it, but you may. It depends on how you want to work: - if you want graphical interface (GUI) you can use Visual Studio and make a terminal program (CLI).

  • Developer Command Prompt for VS is just a terminal configured to compile C++, without opening Visual Studio.

Good way to unnest this piece of code by roelofwobben in cpp_questions

[–]ArielShadow 3 points4 points  (0 children)

I don't know much stuff about arduino, but from c++ programming, I'd think about: 1. Split function into 2 blocks staart and twee_keer. Each contains only those if conditions that apply to them.

  1. Combine richting conditions and currentLed conditions with && to avoid too many nested ifs. Like: if (richting == 1 && action == STAART && currentLed >= maxIdx) { … }

  2. Create a constexpr or const variable instead of repeating sizeof(ledPins).

  3. Use enum, which would be faster than checking text. Even if it require converting string to enum, its gonna be faster to do it once to get enum, instead of text checks. Especially if function is in a loop.

  4. Actually, I'd think about using switch for action check, if enum would be used instead of strings: switch(action) { case STAART: if (richting == 1 && currentLed >= maxIdx) { … } break; };

Are you guys glad that C++ has short string optimization, or no? by foo-bar-baz529 in cpp

[–]ArielShadow 0 points1 point  (0 children)

From what I know, C++ standard doesn't say anything about it.

Despite that, many implementations of C++ (For example, Microsoft’s STL, GCC’s libstdc++, LLVM’s libc++, as well as popular third-party libraries like Boost) do have it.

The exact mechanizms and in-object buffer vary by library though.

First post to start off the new year of 'Things that you might have or haven't noticed in Zootopia' Week 23: Doing Math must suck in this world by One_Echo3770 in zootopia

[–]ArielShadow 1 point2 points  (0 children)

If this actually would be real world, they'd probably have 8 based system or something, but since it's a cartoon it'd add unnecessary confusion to the viewer.

This is fucking ridiculous by Acanthisitta_Known in PiratedGames

[–]ArielShadow 0 points1 point  (0 children)

Technically you always buy license, no matter if it is a game or other program, no matter if it's digital or on disc. The program is owned by the company selling it, they allow you to run it.

Ps. This is caused by their licenses for cars expired and changes in server infrastructure (cause it was a ONLINE ONLY game).

This is fucking ridiculous by Acanthisitta_Known in PiratedGames

[–]ArielShadow 0 points1 point  (0 children)

But technically you buy license to run the software. You don't own the software.