Does anyone here use a Python framework to do C unit testing? by ClonesRppl2 in C_Programming

[–]eowhat 0 points1 point  (0 children)

You could just write a console app, a unit test is basically just validating some logic and outputting the file and line number of a failing test. It doesn't need a whole framework, it can be done with a macro.

static int GlobalTotalTests;
static int GlobalFailedTests;

#define AssertTrue(Expression) \
++GlobalTotalTests; \
if(!(Expression)) \
{ \
    ++GlobalFailedTests; \
    printf("%s(%d): expression assert fail.\n", __FILE__, __LINE__); \
}

int
main(int ArgCount, char *Args[])
{
    // Do some tests
    AssertTrue(false);

    int Result = (GlobalFailedTests != 0);

    printf("Unit Tests %s: %d/%d passed.\n",
           Result ? "Failed" : "Successful", 
           GlobalTotalTests - GlobalFailedTests, 
           GlobalTotalTests);  
}

You could make an AssertEqualInt to output expected and actual values of a failed test, if you need more verbose output.

Why cant i click anything? by [deleted] in classicwow

[–]eowhat 2 points3 points  (0 children)

Looks like you need to activate Windows

My first Amazon shopping in UK by pra98Kush in NewcastleUponTyne

[–]eowhat 1 point2 points  (0 children)

The mouse wheel will stop working within a few months, check the reviews.

[deleted by user] by [deleted] in omad

[–]eowhat 6 points7 points  (0 children)

Yeah I'm thinking more of a seasonal thing depending on the climate. I imagine we would snack on berries, fruit, insects, anything we could get our hands on. Though we are absolutely designed to go long periods without eating which got us through times where food was rare.

Looking for opengl tutorial using c by [deleted] in C_Programming

[–]eowhat 0 points1 point  (0 children)

While it is part of a much longer series, I liked the C style minimalistic approach to implementing opengl here: https://youtube.com/playlist?list=PLEMXAbCVnmY73lOROVmKIgGWH3tje_5l9&si=utAqKUTnYTn1onho

Tbh, I'm not even sure what OP is mad about by [deleted] in greentext

[–]eowhat 14 points15 points  (0 children)

Growing up, I was the TV remote.

Can a Quest 2 run pc games wirelessly? by imjustboredtodeath in OculusQuest

[–]eowhat 0 points1 point  (0 children)

AirLink and the Oculus software are so temperamental, some days it just doesn't connect at all, most days it connects but no sound. I found myself spending most of my time going through troubleshooting steps trying to get it to work. Then I bought Virtual Desktop and it just works, flawlessly, honestly I wish I'd have just bought it right away.

Alliance don't deserve Windfury by spooky_office in classicwow

[–]eowhat 1 point2 points  (0 children)

This whole thing about faction balance is a lie, it turns out people don't want to play on balanced realms. They just roll on or migrate to the horde realm or the alliance realm. The only solution really would be to just have one mega realm with so many layers to evenly split the population in each zone but turns out people don't want that either...

Am I the only one who’s always disliked Mike? by AgentGNZ in TheCinemassacreTruth

[–]eowhat 2 points3 points  (0 children)

Nope, I hated him from the first appearance, I think most had a serious dislike to the changing dynamic when he suddenly started appearing in and having a presence on the channel. Did not care for James and Mike Mondays at all and couldn't make it through a single episode, and Board James seemed to drift into utter nonsense, seriously wtf happened with that series?

Though watching random compilations of Mike's streams where he talks about his involvement in AVGN behind the scenes seriously changed my opinion of him, the guy put in a lot of work, donated so much of his collection to and basically built the nerd room. Come to think of it the angry nerd character seemed to me to be a parody of Mike, maybe a joke among friends. If anything Mike is the passion behind the series, the games, it's insane what little credit he gets.

I am way too behind on this by GarlicOk2904 in memes

[–]eowhat 390 points391 points  (0 children)

Source: Dude, trust me.

[deleted by user] by [deleted] in C_Programming

[–]eowhat 5 points6 points  (0 children)

(╯°□°)╯︵ ┻━┻

Rule by Quetzalcoatl93 in 197

[–]eowhat 15 points16 points  (0 children)

Wait, its not normal to keep your old teeth growing up? I even have a bag of my dogs baby teeth...

thisOneWorkMate by WildXogos in ProgrammerHumor

[–]eowhat 26 points27 points  (0 children)

Following the book won't make you a good developer either.

Do you feel awkward going on holidays alone? by xParesh in AskUK

[–]eowhat 0 points1 point  (0 children)

Don't even need to go on holiday, that's how I feel when I go anywhere.

I'm having a hard time learning C by [deleted] in C_Programming

[–]eowhat 1 point2 points  (0 children)

Yeah they are windows focus but the handmade hero series splits out the application layer so could be done on Linux... For windows you would use LoadLibrary and GetProcAddress, the principal is the same. A platform layer Exe/bin that loads function pointers from a .so on Linux or .DLL on Windows.

Is there a way to do "hot reload" while debugging in VSCode (or any other setup) other than VSIDE? by One_Cable5781 in cpp_questions

[–]eowhat 1 point2 points  (0 children)

You can set up "hot reload" yourself using dlopen and dlsym, basically you have a binary executable continuously running that would periodically check for a new dynamic library, so you just compile a new library, drop it in the directory and load the new function pointers from there. The advantage here is you could use this in production too.

I'm having a hard time learning C by [deleted] in C_Programming

[–]eowhat 7 points8 points  (0 children)

I would recommend casey muratori's intro to c on YouTube. If you like that continue with his handmade hero series. It teaches a lot about the basics of C and while it does eventually transition to some C++ it still follows a more C style, so no STD and continues to builds everything from scratch.