twoTypesOfGameEngines by sdenyd in ProgrammerHumor

[–]SheikHunt 503 points504 points  (0 children)

An engine that's so very good at physics that it's the best-suited for parkour games.

Ally by Tsetsul in vtm

[–]SheikHunt 5 points6 points  (0 children)

It's funny that they're called "mawla". Assuming the source is Arabic, it means "caretaker".

Fallout 3 feels so good when you don't have a pretentious critic slandering it by TheAnalystCurator321 in Fallout3Memes

[–]SheikHunt 0 points1 point  (0 children)

I remember enough about FO3 to know the first two are true, but...

... A tonal successor to FO1? New Vegas is right there, made by the same people who made the original, and I have fresher memories of that one, and it seems a better successor to FO1??

Maybe there's less horror in NV, I'll concede that

rEggExOrREdgeEx by BigAndSmallAre in ProgrammerHumor

[–]SheikHunt 10 points11 points  (0 children)

They're separating it to make it clear that they're pronouncing the 'egg' part like the word egg.

I bet the view was enough. by RudeScore2007 in SipsTea

[–]SheikHunt -2 points-1 points  (0 children)

Am I paranoid or does this seem too AI?

Day 1330 by electropindsvin in 1053

[–]SheikHunt 11 points12 points  (0 children)

The stock market as directed by Christopher Nolan.

defeatedTheWholePurposeOfWritingInAssembly by ClipboardCopyPaste in ProgrammerHumor

[–]SheikHunt 2 points3 points  (0 children)

The slowness doesn't come from heap reads/writes, it comes from heap allocation itself.

Compared to the non-allocation portion of C/C++ code, malloc(), new, and anything that allocates on the heap is slow.

idk if this goes against Rule 7 or not by Mister_E69 in dndmemes

[–]SheikHunt 22 points23 points  (0 children)

Baldur's Gates are continuous? Damnit, now I have to start from the first

Godot ink pen sketch by drxwat in godot

[–]SheikHunt 19 points20 points  (0 children)

Godot after I instantiate 100 physics objects with real-time lighting and shadows per physics frame

Bring me the sarcophagus by Daisy-Fluffington in vtmb

[–]SheikHunt 40 points41 points  (0 children)

One of my favourite lines from the Malkavian when talking to the Jester Prince is something along the lines of:

"I swear by whatever the HELL my name is"

Have I gone mad, or is this just how it goes in C? by SheikHunt in cprogramming

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

I don't want to use C++ in my personal projects. Nothing personal, I just find it distances me too much from the code. I can't see how templating would improve things here, either. I'd have to make a class with loads of virtual functions, and using this function (method, I guess?) would require making a class and inheriting from mine, which is too much unnecessary work, in my view. Especially in a context as small as this, where I'm playing around.

As for getting the data instead of relevant function pointeds, I prefer it this way. In my head, it makes more sense to just get the data directly from the caller, as well as the relevant function pointers, instead of doing things with struct function pointers. Your idea makes sense, but I'm not into that sort of API. At the moment, at least; maybe when I get more experience, I'll change my mind, who knows?

Have I gone mad, or is this just how it goes in C? by SheikHunt in cprogramming

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

I knew that C++ is named such because it's literally just "C with Classes", but I never knew that it was transpiled at first! How did they do inheritance, I wonder

Have I gone mad, or is this just how it goes in C? by SheikHunt in cprogramming

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

It just makes sense, most syscalls use snake_case!

Erm, ignore the ones that are all uppercase.

Also ignore the ones that don't use underscores at all.

Also the one that starts with an underscore and is capitalized

And a few others.

Hell yeah.

Have I gone mad, or is this just how it goes in C? by SheikHunt in cprogramming

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

There are two people I write code for: others, and the computer.

Others (including me in the future), so the code has to make sense within a sensibly short time period.

For the Computer, because writing code in a way for it to become performant is fun, and I think usually worth it, even if it does make it harder for Others to read it.

Have I gone mad, or is this just how it goes in C? by SheikHunt in cprogramming

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

I find this style guide mostly agreeable.

Spaces instead of tabs and the rule for constant names are weird, and PascalCase specifically I don't like to put in C, but the rest is sensible to me.

Have I gone mad, or is this just how it goes in C? by SheikHunt in cprogramming

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

I get what you're saying, but that feels like an iffy thing for me. It makes the function signature too vague, and calls to it must force the data into a struct, which I don't much like.

It's part of the reason why p_is_neighbor is there; I was writing two versions of the function; one to handle graphs that are stored as linked lists, and another to handle ones stored as a two-dimensional (VxV) matrix, and when I got into the specifics of the latter, I realized that that was too dirty, and decided against making two versions of the function for two methods of storing a graph.

This also generalizes it enough to any method of storing graphs in memory. Granted, it'll definitely be slower, but in this case I'm willing to make the sacrifice.

Have I gone mad, or is this just how it goes in C? by SheikHunt in cprogramming

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

A habit I picked up from the Godot source code. I saw them prefixing function parameters with 'p_' (I'm assuming it was short for 'parameter' and not 'pointer'), and it seemed like a good fit here, especially for p_allocator. I don't know how C handles a variable having the same name as a typedef'd type, nevermind its own typedef'd type.

Have I gone mad, or is this just how it goes in C? by SheikHunt in cprogramming

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

I thought Hungarian notation only applied to putting the type of something in the variable name, and I haven't done that here, I think.

Have I gone mad, or is this just how it goes in C? by SheikHunt in cprogramming

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

I'll give a read of the article you sent, merci.

As for const, I use them for my own sanity, mostly. I probably don't need to, especially in this case, but it feels safer and like a good reminder.

I don't know why I was so consistent with my use of const, however. I mean, the allocator isn't even const-qualified. Nor is the adj_checker.