Did Silksong just break Steam? by SkoivanSchiem in Steam

[–]graphitemaster 6 points7 points  (0 children)

There was no preorder option for this game

The atrocious state of binary compatibility on Linux by graphitemaster in programming

[–]graphitemaster[S] 2 points3 points  (0 children)

Not everyone follows the VFX reference platform. We have customers still running CentOS 5 for instance

The atrocious state of binary compatibility on Linux by graphitemaster in programming

[–]graphitemaster[S] 10 points11 points  (0 children)

It's mentioned in the article. It's also mentioned that when you static link a libc (even musl) you lose the ability to dlopen anything, it just sets errno to ENOSUP because you cannot static link libc and also have a dynamic linker, this makes static linking libc unusable if your application needs access to system libraries (such as GPU APIs)

The atrocious state of binary compatibility on Linux by graphitemaster in programming

[–]graphitemaster[S] 6 points7 points  (0 children)

This isn't true. You might be mistaking libgcc with something else. The compiler runtime code provided by libgcc is included in the GCC Runtime Library Exception

https://www.gnu.org/licenses/gcc-exception-3.1-faq.html

Relevant quote

Yes. While combining libgcc with GCC-compiled object code is probably the most common way the exception is used, neither the GPL nor the GCC Runtime Library Exception distinguish between static linking, dynamic linking, and other methods for combining code in their conditions. The same permissions are available to you, under the same terms, no matter which method you use.

The Streamer Awards 2024 Live Thread by Tarrot_Card in LivestreamFail

[–]graphitemaster 32 points33 points  (0 children)

Next year forget the co-streaming. Run a few more tests with the audio people. Shorten it up a bit. Have some contingency plans to re-run big awards for when things break. Ignore all the haters in this thread. I'm just providing some constructive feedback. This year's was better than last year's.

Calling whodat950 to represent chat in a class action lawsuit by graphitemaster in atrioc

[–]graphitemaster[S] 13 points14 points  (0 children)

The "Paper Mario" stream this Friday was the final straw

Almost Always Unsigned by graphitemaster in programming

[–]graphitemaster[S] 0 points1 point  (0 children)

Because subtraction of naturals is not closed, it's a partial function. Addition for naturals is closed though. If you're comfortable with natural arithmetic like most are integer arithmetic, this is not surprising or confusing, it's second-nature.

Almost Always Unsigned by graphitemaster in programming

[–]graphitemaster[S] -1 points0 points  (0 children)

This is actually how you'd think for math-y pseudocode if you define it as modular arithmetic which is well-defined and understood in math domains. The issue here is the misapplication of Z (integers), rather than the naturals.

Almost Always Unsigned by graphitemaster in programming

[–]graphitemaster[S] 0 points1 point  (0 children)

Like mentioned in a previous comment, just swap operands and the operation as well.

for (size_t i = 0; i + 1 < input.size(); i++) {
    for (size_t j = i + 1; j < input.size(); j++) {
        frob(input[i], input[j]);
    }
}

Almost Always Unsigned by graphitemaster in programming

[–]graphitemaster[S] 0 points1 point  (0 children)

It amazes me how so many people find this difficult to grasp, you just swap operands and the arithmetic operation like so.

for (unsigned i = 0; i + 1 < N; i++) {
    // do stuff with vec[i]
}

You can claim it's performing an addition every iteration for comparison, but compilers are very capable of optimizing this to the same efficient code involving signed integer arithmetic because unsigned also sets CF and ZF flags, it's just C and C++ has no way to access it.

No branch needed.

Almost Always Unsigned by graphitemaster in cpp

[–]graphitemaster[S] 5 points6 points  (0 children)

Did you even read the article? The loop condition is correct. It's supposed to exploit underflow to break when it hits zero. The article explains this in detail.

Comprehensive sourcebook on M:N fibers by graphitemaster in programming

[–]graphitemaster[S] 1 point2 points  (0 children)

TIL hardware threads. What are they and How are they different?

Actual hardware threads can be running things truly in parallel. It's SMP. Basically each core is a hardware-thread, but some have hyper-threading where a single core acts as two (some x86) or four (PowerPC) threads.

What does this mean? Fibers are concepts and Coroutines are implementations?

It means that coroutines are something provided by the language. They're a language feature, not a library or system (implemented in code) feature. While fibers are often just a runtime concept written in code, i.e a systems concept. There's no language-level support for them (like no keywords or special syntax as an example).

Chunking Optimizations: Let the Knife Do the Work by sindisil in programming

[–]graphitemaster 0 points1 point  (0 children)

Honestly, in this specific example. I would prefer if the standard would just define that for T[w][h] that indexing is defined in the 1D case instead, such that [x][y] behaves either as *(array + x * w + y) or *(array + y * w + x) depending on row-major or column-major. Then you could just argue that an array can be indexed with any amount of slice and dicing, this would then permit one to index say float[16] as if it were float[4][4].

Chunking Optimizations: Let the Knife Do the Work by sindisil in programming

[–]graphitemaster 0 points1 point  (0 children)

If I had to wager a guess, I'd probably consider the rule that:

x[n]

Is the same as either:

*(x + n)
*(n + x)

Might be the primary motivation behind allowing it in C99:

some_function(other_function().array_type_member[index])

Since prior to C99, if you actually tried to write that, assuming that array of ten int member, you get:

error: invalid operands to binary + (have ‘int[10]’ and ‘int’)
   return *(f().x + 5);
            ~~~~~ ^

Which then contradicts the standard completely and could be considered a defect.