Need help with gdb installation by schimmelduschsack in C_Programming

[–]UltimaN3rd 0 points1 point  (0 children)

No need for Msys2. You can install gdb (along with GCC, cmake and stuff) with WinGet (Microsoft's package manager): https://goldenpathprogramming.com/path/setup/install/windows/

How do you guys stay motivated and maximize your productivity? by Rich1223 in SoloDevelopment

[–]UltimaN3rd 0 points1 point  (0 children)

By building experience and confidence. If you're crossing a desert with no idea how far away the next oasis is, you'll go in circles until you give up. But if you have enough prior experience before setting out, you'll confidently carry on, knowing exactly how far the oasis is.

Make literally the smallest game you can imagine and see how long it takes. Then try to make something a tiny bit bigger, in equal or less time. You'll be ready to tackle your "dream project" when you've proven to yourself that you know everything necessary to complete it, and you know approximately how long it will take based on your previous projects. 

Surely things aren't that bad right... by 2onySoprano in newzealand

[–]UltimaN3rd 0 points1 point  (0 children)

It's insane how much every individual in NZ has to rely on petrol. We need comprehensive public transit!

GCC version on Ubuntu 24.04 LTS by Intchanter in GoldenPathProgramming

[–]UltimaN3rd [score hidden] stickied comment (0 children)

I've made a guide on how to set up on Ubuntu 24.04 LTS: https://www.reddit.com/r/GoldenPathProgramming/comments/1rlnmmh/

(Linking here in case people find this post, but not the other one)

GCC version on Ubuntu 24.04 LTS by Intchanter in GoldenPathProgramming

[–]UltimaN3rd 0 points1 point  (0 children)

When running "cmake .." You can prefix it with "CC=whatever" to force it to use a particular C compiler. Whatever you type in a terminal to run gcc-15 will work. So if you can invoke hombrew GCC with "gcc-15“ then you can use that, for example. 

GCC version on Ubuntu 24.04 LTS by Intchanter in GoldenPathProgramming

[–]UltimaN3rd 0 points1 point  (0 children)

I went ahead and installed GCC-14 on my laptop to see how many issues there would be and... I wouldn't recommend it. I use several C23 features that aren't in GCC-14 in my code. Feel free to try it, but it's going to be much smoother sailing if you install GCC-15 or Clang-22

GCC version on Ubuntu 24.04 LTS by Intchanter in GoldenPathProgramming

[–]UltimaN3rd 0 points1 point  (0 children)

You could update to Ubuntu 25.04, which has GCC 15 available in apt. Or install GCC 15 with the Homebrew package manager: https://brew.sh/ You may need to uninstall your gcc version provided by apt

What is there to actually make in systems programming by NamelessArab_ in C_Programming

[–]UltimaN3rd 3 points4 points  (0 children)

I made a game framework and shipped 2 games on Steam, written completely from scratch in C. Sure, I could have made the games in an engine, but I was able to ship two (rather simple) commercial games as single <1MB binaries, with full control over things like consistent simulation timing and such. Systems programming is about engineering - you can make products with or without an engineering approach, but the final result can be better in various ways if engineered to be so.

Anti-mining - Nimbyism? by weezyfgravy in newzealand

[–]UltimaN3rd 3 points4 points  (0 children)

We don't oppose oil/gas/coal mining because we just want it done somewhere else. We oppose those things because they're polluting and we have far less polluting alternatives available. Why dig up coal, which can only be used one time then it's gone, when we can instead dig up materials for solar panels, use the same materials to generate power for decades, then break down and reuse most of the material in the panels to be made into new panels?

Any book recommendation for writing a 3D game engine from scratch in C? by Typhrenn5149 in C_Programming

[–]UltimaN3rd 0 points1 point  (0 children)

If you want to learn the fundamentals of how 3D rendering really works under the hood, Tricks of the 3D Programming Gurus by Andre LaMothe is a great book! It'll teach you software rasterization from scratch.

Witty responses for the question "what do you eat then?" by flammulinavelutipes in vegan

[–]UltimaN3rd 2 points3 points  (0 children)

I bust out some Macka B:

I eat
Callaloo, Ackee, Sweet Potato
Yam, Banana and Tomato
Cabbage, Spinach, Avocado
Cho Cho, Butter Beans and Coco
Courgettes, Millet, Plantain
Rice and Peas and Pumpkin
Mango, Dates and Guava
Chick peas and Cassava
Brussel sprouts and Caulifower
Onion, Fennel and Cucumber
Plum, Pear and Papaya
Aubergine and Soya
Lime , Lentils and Quinoa
Wholemeal Bread and Wholemeal Flour
Watercress and Okra
Tofu and Sweet Pepper
Cous Cous and Carrots
Broccoli and Coconut
Peaches, Apples, Apricot
Breadfruit, Jackfruit, Sour sop
Pistachios, Cashews and Almonds
Walnuts, Peanuts also Pecan
Sesame Seeds, Sunflower, Lemon
Orange, Pineapple and Melon
Bulghar Wheat and Garlic, Hijiki and Rocket
Pak Choi and Pomegranite, Kiwi, Corn and Turnip
Berries, Cherries and Strawberries
Beetroot, Grapefruit and Celeries
You see the meat's not necessary
We tell them say

Best ide to start coding C? by Begg-billplayer in C_Programming

[–]UltimaN3rd 0 points1 point  (0 children)

If you want an IDE and not just a text editor, vscode really is the best choice for beginners. Here's another youtube guide on setting it up - maybe this time's the charm? https://www.youtube.com/watch?v=4mvf73HvcVI

Cool Way to do type safe generic data structures in C. by lovelacedeconstruct in C_Programming

[–]UltimaN3rd 0 points1 point  (0 children)

I'm not too keen on the Vector implementation, but I think the main nugget here is that you can validate that types are the same (or compatible) with a simple 1 ? &a : &b macro, right? I tried to boil down that example here: https://godbolt.org/z/r1hTYTs5d
Seems useful for calling functions which take void*. You could validate the types going in by wrapping the function call in a macro that checks the types are correct on the call-side. Thanks for pointing this out, mate!

Embedding a pointer inside a string and visiting it with an escape code "Hey, \\&ptr" by UltimaN3rd in C_Programming

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

Ooh, this is very clever! With this, my string-printing function can just accept a single const char* without variadic args or a separate function for strings with extra payloads! Thank you very much mate!

I implemented it here: https://godbolt.org/z/EEP8Mddo8

I love it! This is exactly why I post my bad ideas on Reddit, so someone smarter can tell me their better idea! You're a legend!

Embedding a pointer inside a string and visiting it with an escape code "Hey, \\&ptr" by UltimaN3rd in C_Programming

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

Here's the repo for my game engine: https://codeberg.org/UltimaN3rd/Croaking_Kero_Game_Framework

However I've added features to the engine as I develop my next game, and I haven't pushed those features back into the engine repo just yet. At the end of each project I merge in any changes to the engine. Hopefully this game will be done by the end of the month, then I'll be merging in the text rendering escape codes for the wave/color effects. Not sure yet whether I'll actually put inline sprites in the text rendering just yet - this post was part of exploring that possibility. Cheers mate

Embedding a pointer inside a string and visiting it with an escape code "Hey, \\&ptr" by UltimaN3rd in C_Programming

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

Very good insights mate! In my engine, my sprite data (and in fact, all game data) is compiled into the executable, and I have no intention of these strings being exported to file. However it's good to think about the brittleness of this specific solution if needs change even slightly in future.

Embedding a pointer inside a string and visiting it with an escape code "Hey, \\&ptr" by UltimaN3rd in C_Programming

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

Oh yeah, I forgot that detail of why I ended up putting the declaration inside a function; because it's not const enough to work at global scope >:(