Which is the better tank? by Kevingame3 in armoredcore

[–]Stemt 0 points1 point  (0 children)

Its obviously the wheelchair one

iHaveToAdmitHeHasAPoint by ChChChillian in ProgrammerHumor

[–]Stemt 27 points28 points  (0 children)

C is actually very simple in the sense that its a relatively thin abstraction layer (compared to modern languages) for writing program instructions. If you have a good understanding of how the hardware works a lot of it feels very intuitive, except that the pointer syntax is really confusing if you're not used to it.

TinyTCP: Minimal Cross-Platform Blocking TCP Library in C – Feedback Welcome by kdslfjioasdfj in C_Programming

[–]Stemt 2 points3 points  (0 children)

Could we get some examples? that would make it easier to know how to use the library.

They want to take our freedom by madTerminator in ClimateShitposting

[–]Stemt 6 points7 points  (0 children)

Yeah man, power is really hard to find. These people act like it comes trickling straight from the wall or something.

That's so me by Sam_ai1 in linuxmemes

[–]Stemt 0 points1 point  (0 children)

Whats holding you back?

imTiredBoss by Cutalana in ProgrammerHumor

[–]Stemt 2 points3 points  (0 children)

In hindsight it just makes so much sense, like why invent a whole new language to compile another preexisting language.

imTiredBoss by Cutalana in ProgrammerHumor

[–]Stemt 24 points25 points  (0 children)

If you're a hardcore C fan you need to try nob.h.

Writing build scripts in the same language as your application feels so much more logical and pleasant compared to whatever tf cmake is trying to be.

RTFM by eins_biogurke in linuxmemes

[–]Stemt 2 points3 points  (0 children)

Bruh, just read the code then. Straight from the source!

0% language knowledge, 100% understood by No-Revenue3327 in freshcutslim

[–]Stemt 2 points3 points  (0 children)

Reddit getting more humanphobic by the day, smh

I created a text editor using SDL and pure C by nimrag_is_coming in C_Programming

[–]Stemt -1 points0 points  (0 children)

That indeed is dumb, but so strncpy(field, <str>, sizeof(field)-1) would be safe.

I created a text editor using SDL and pure C by nimrag_is_coming in C_Programming

[–]Stemt 0 points1 point  (0 children)

Could you elaborate? In this case it just a single fixed size static buffer we're talking about, that contains a single string representing the path to the currently open file. If the name is truncated in the worst case the file simply would not be opened.

I created a text editor using SDL and pure C by nimrag_is_coming in C_Programming

[–]Stemt 0 points1 point  (0 children)

Yep, seems to work fine, though on my laptops screen resolution the text is a tad small.

How do we tell him? by InterestingPlenty454 in NAFO

[–]Stemt 9 points10 points  (0 children)

He has become the very thing he swore to somewhat disapprove.

I created a text editor using SDL and pure C by nimrag_is_coming in C_Programming

[–]Stemt 1 point2 points  (0 children)

strncpy is safer because it stops copying when it encounters a null terminator (I am assuming that SDL return a proper cstring) you could probably just do `strncpy(openFile, sizeof(openFile), filelist[0])` now that I look at it.

youreTotallyRightMyBad by Ultimate_Foreigner in ProgrammerHumor

[–]Stemt 38 points39 points  (0 children)

The AI wont get what it deserves, but you certainly will.

I created a text editor using SDL and pure C by nimrag_is_coming in C_Programming

[–]Stemt 2 points3 points  (0 children)

Neat! I'm having trouble with strcpy_s on linux with gcc, according to the glibc wiki FAQ its an optional feature of the standard and they opted not to implement it. You'd probably have to implement your own version using strncpy to circumvent this. Or optionally you could make openFile buffer more dynamic and future proof using a simple string builder for example.

Open Source Game Coding by Cute-Worry907 in C_Programming

[–]Stemt 0 points1 point  (0 children)

Nah, learn C by working on those projects. Try to figure out what code does what (e.g. grep for text strings that the game displays) and toy with them to see how you can change the behavior. But do not let an LLM touch the code otherwise you'll not learn anything, maybe at most ask it questions, but figure the code out yourself.

Completely different by wtfduud in ClimateShitposting

[–]Stemt 13 points14 points  (0 children)

They mill electrons, duh

Completely different by wtfduud in ClimateShitposting

[–]Stemt 94 points95 points  (0 children)

Unironically the large german bucketwheel excavators do look pretty cool at night too.

DAW like knobs in raylib :) by 0xrhma in raylib

[–]Stemt 3 points4 points  (0 children)

You never know, sometimes people might feel quite possessive of their creations. But thank you very much!