Programming thread

  • Want to keep track of this thread?
    Accounts can bookmark posts, watch threads for updates, and jump back to where you stopped reading.
    Create account
That makes sense, I never used gcc without -Wall and -pedantic and so on, so I just take a lot of warnings for granted, including discarded return values. Still, I'm not totally sure I understand the need for this [[nodiscard]] pragma, seems pretty verbose for not much practical benefit.
 
That makes sense, I never used gcc without -Wall and -pedantic and so on, so I just take a lot of warnings for granted. Still, I'm not totally sure I understand the need for this [[nodiscard]] pragma.
documentation purposes mostly, for example to show that a function call is useless if you dont use the return value (theres no way to declare a function pure without using compiler extensions)

one anecdotal thingy i can give, one time i gave advice to someone first learning c++, and one of those advice were to always add [[nodiscard]] for getters and such
then a few weeks later he thanks me because the compiler caught him forgetting to assign some function calls to variables
 
Still, I'm not totally sure I understand the need for this [[nodiscard]] pragma, seems pretty verbose for not much practical benefit.
My most common pattern for using nodiscard is when I have an outparam being written to, and the actual return value represents the success or failure of the operation.
If someone (me) didn't at least read the value returned, they (I) could end up trying to operate on invalid data.
I'll also do it with return values that are necessary for further operations in the use of this function, like buffer sizes.
There's also functions that return heap memory, if you don't capture that returned pointer, it becomes a leak.

It's basically a static way to go "hey guy, you should probably look at this value"
Plus, in C23, you can supply a message to display with it, which makes it a lot more constructive of a feature.
 
deloitte is looking for JUNIOR COBOL programmers (also mid and senior but who cares about that) all over poland
1772484753815.png
kind of sad i dont have any relevant experience (or any professional experience in general) because holy shit free money exploit 2026 (unpatched, no virus)?????
 
From what i have heard from people that work at IBM native z/OS is absolute nightmare with some retarded object system powering it. However there is unix condom that allows you to interact as if it was civilized system as such it might be preferable to webshit
yeah theres like unix service system or unix system services or whatever
theres like JCL (job control language) and shit like that
Do those exist still?
well apparently they do
and COBOL gets updated still
the latest standard dropped in 2023 and theyve added such features as XOR and bitshifts (and a lot more like async but it isnt as funny)

EDIT: ohhhh you were asking about the existence of juniors not job offers... no they dont exist lmao they dont teach it in universities anymore
 
Last edited:
where in the world do they expect junior devs with experience in cobol and ibm mainframe shit to come from in 2026? that shit doesn't get taught by universities and nobody is gonna self-study ancient legacy tech like that for fun either.

your best bet is probably to hire generic juniors and have your own in house cobol boomers teach them on the job.
if you stubbornly insist on finding some zoomer who somehow has experience working with tools that had already disappeared from his schools comp sci curriculum before he was even born then you're gonna look forever.
 
nobody is gonna self-study ancient legacy tech like that for fun either.
humble me when i was bored that one time and wanted to try cobol for shits and giggles
mercy-overwatch.gif


i got filtered by ibm zexplore at first only teaching how to use zowe explorer and JCL
 
you're gonna look forever
Eh, I betcha the odd autist that has the manual memorized and knows all the specific hardware bugs and whatnot still exists, not sure if you'll lure him out of the basement though. I was doubtful that it is even feasible to learn cobol nowadays, because I thought it would have to be incredibly hard to even run. But apparently you can just download GnuCOBOL and go ham, impressive.
 
But apparently you can just download GnuCOBOL and go ham, impressive.
GCC 15 has introduced gcobol, which compiles COBOL directly to a native executable instead of first transpiling it to C
it also supports the latest COBOL standard for some reason
i dont think any mainframe uses anything newer than COBOL-74 maybe COBOL-85 if they wanted to splurge a bit to modernize the codebase
 
where in the world do they expect junior devs with experience in cobol and ibm mainframe shit to come from in 2026? that shit doesn't get taught by universities and nobody is gonna self-study ancient legacy tech like that for fun either.

your best bet is probably to hire generic juniors and have your own in house cobol boomers teach them on the job.
if you stubbornly insist on finding some zoomer who somehow has experience working with tools that had already disappeared from his schools comp sci curriculum before he was even born then you're gonna look forever.
In my experience, that is what shops with weirdo languages actually do in practice, even if the job ad says otherwise. In big shops like banks (or in this case a consultancy), the job ad is written by someone who doesn't know anything about the topic and just goes off a bunch of given keywords, which is how you get asked for N+2 years of experience in a technology that was invented N years ago or "JSON programming experience".
 
In my experience, that is what shops with weirdo languages actually do in practice, even if the job ad says otherwise. In big shops like banks (or in this case a consultancy), the job ad is written by someone who doesn't know anything about the topic and just goes off a bunch of given keywords, which is how you get asked for N+2 years of experience in a technology that was invented N years ago or "JSON programming experience".
what you've never wrote a program in json, or toml?

amateur
 
Donald Knuth (yes, the Donald Knuth) wrote a paper on how Claude solved a long standing pet problem of his: https://www-cs-faculty.stanford.edu/~knuth/papers/claude-cycles.pdf
while I was writing about directed Hamiltonian cycles for a future volume of The Art of Computer Programming
so hes still writing it :semperfidelis:

the worst part about TACP is that its highly likely that the king is gonna drop dead before finishing it

EDIT: im reading the paper, not understanding any of it because i still dont know shit about fuck but that line made me chuckle a bit
1772568172453.png
usually C programs are simplified into a Python form not the other way around :lol:
 
Last edited:
I've been looking at the Minecraft PS3 Edition source code, and I'm genuinely amazed with how easily readable it is. It's compact, easy to read, and simple. There are still some files that are giant messes (I'm looking at you Biome.cpp).
C++:
#include "stdafx.h"
#include "com.mojang.nbt.h"
#include "Abilities.h"

Abilities::Abilities()
{
    invulnerable = false;
    flying = false;
    mayfly = false;
    instabuild = false;
    mayBuild = true;
    flyingSpeed = 0.05f;
    walkingSpeed = 0.1f;

#ifdef _DEBUG_MENUS_ENABLED
    debugflying = false;
#endif
}

void Abilities::addSaveData(CompoundTag *parentTag)
{
    CompoundTag *tag = new CompoundTag();

    tag->putBoolean(L"invulnerable", invulnerable);
    tag->putBoolean(L"flying", flying);
    tag->putBoolean(L"mayfly", mayfly);
    tag->putBoolean(L"instabuild", instabuild);
    tag->putBoolean(L"mayBuild", mayBuild);
    tag->putFloat(L"flySpeed", flyingSpeed);
    tag->putFloat(L"walkSpeed", walkingSpeed);

    parentTag->put(L"abilities", tag);

}

void Abilities::loadSaveData(CompoundTag *parentTag)
{
    if (parentTag->contains(L"abilities"))
    {
        CompoundTag *tag = parentTag->getCompound(L"abilities");

        invulnerable = tag->getBoolean(L"invulnerable");
        flying = tag->getBoolean(L"flying");
        mayfly = tag->getBoolean(L"mayfly");
        instabuild = tag->getBoolean(L"instabuild");

        if (tag->contains(L"flySpeed"))
        {
            flyingSpeed = tag->getFloat(L"flySpeed");
            walkingSpeed = tag->getFloat(L"walkSpeed");
        }
        if (tag->contains(L"mayBuild"))
        {
            mayBuild = tag->getBoolean(L"mayBuild");
        }
    }
}

float Abilities::getFlyingSpeed()
{
    return flyingSpeed;
}

void Abilities::setFlyingSpeed(float value)
{
    this->flyingSpeed = value;
}

float Abilities::getWalkingSpeed()
{
    return walkingSpeed;
}

void Abilities::setWalkingSpeed(float value)
{
    this->walkingSpeed = value;
}
        return flyingSpeed;
}

void Abilities::setFlyingSpeed(float value)
{
        this->flyingSpeed = value;
}

float Abilities::getWalkingSpeed()
{
        return walkingSpeed;
}

void Abilities::setWalkingSpeed(float value)
{
        this->walkingSpeed = value;
 
Last edited:
Back
Top Bottom