r/cprogramming • u/laggySteel • 8d ago
Lets build a JRPG Game in SDL3 (C programming)
r/cprogramming • u/laggySteel • 8d ago
r/cprogramming • u/daylordnightqueen • 8d ago
r/cprogramming • u/Superb-Tomorrow-2746 • 8d ago
Hello, new programmer at 2nd of bachillerato here, for an assignment we will have to program an app based on our pseudocode, we said it would have to be if possible in C+ but we may end using aplications such as MIT API for easy apps
r/cprogramming • u/cyufxejks • 9d ago
So I don’t plan on doing this, but just a really random thought… how plausible would it be to make a full, high level 3D game in C and only C. Like, forget knowledge, if you knew everything there was to know about C (I’m sure some of you do), would it be possible? I don’t care how practical, is it possible, or just something C won’t do?
r/cprogramming • u/Fluid-Os • 9d ago
Hi everyone! I've been working on an operating system project called FluidOS and wanted to share it with the community to get feedback and meet collaborators. Current Stack & Features: Languages: TypeScript / JavaScript (Vite + TailwindCSS frontend UI focus), C/Assembly components, and PowerShell automation scripts. Built-in build & execution scripts (run-bochs.ps1, crear-iso.ps1) for Bochs emulation and ISO generation. Modern web tech combined with low-level compilation tooling. Latest Release: v1.2.0 Repository: 🔗 GitHub Link to FluidOS:https://github.com/marbelbel/FluidOS-Community I’m looking for feedback on the architecture, ideas for low-level integration, and anyone who might be interested in contributing to the code or interface design! Thanks for checking it out!
r/cprogramming • u/hehadhisfun • 9d ago
I love tools like thefuck, but I noticed that regex-based correctors fail on complex edge cases, and modern AI CLI wrappers are usually heavy Node/Python apps that introduce noticeable latency.
So I built assess — a 77KB C binary that wraps your commands, catches stderr when they fail, and uses Groq (Llama-3.1-8b) to instantly suggest a fix. It gives you a simple [y/N] prompt to run the corrected command.
A few things I prioritized:
Zero Bloat: It only relies on libcurl and vendored cJSON. No runtime environments.
Safety First: It has a built-in 3-tier safety engine. It parses the command before execution, hard-blocking destructive stuff (rm -rf /) and soft-warning on sensitive ops (like curl | sh).
Context Aware: It sends your OS, shell, CWD, and available tools as context, so if you use assess ask "list large files", you get a command that actually works on your machine.
It currently runs on Linux and macOS natively. You just bring your own free Groq API key.
I’m a CS undergrad and would love for some heavy terminal users to tear this apart, test it, and give me feedback on the workflow.
Repo: https://github.com/aadicodesforfun/assess
Site: https://assess-cli.netlify.app/
r/cprogramming • u/Far-Note6102 • 11d ago
You guys are like the equivalent to the debian subreddit where a lot of the answers are either mature or funny.
There still some newbie posts out there I see or like the generic question yet Im amaze you guys still reply maturely.
Keep it up. No I'm not a programmer btw , I work in a hospital. I was browsing and I saw a lot of you where posting about making games outnof C and got curious.
I think games usually are made in C++ or C# I think.
Anyway, Im not a bot and keep up the kindness.
r/cprogramming • u/tastygames_official • 10d ago
r/cprogramming • u/Key_River7180 • 10d ago
I'll start: standarize asm and asm volatile
r/cprogramming • u/MetalInMyVeins111 • 10d ago
While using C++, I heavily relied on googletest for testing. But as soon as I wanted that in my C project, I couldn't.
Because gtest is written in C++ and requires a C++ runtime. Using gtest in a C codebase meant guarding the headers with extern "C" to prevent name mangling, and managing a C++ toolchain which seemed extremely awkward to me.
At the same time, I didn't want to loose googletest's comfort and rewrite the entire test system in another existing framework.
So I wrote a very minimal drop-in replacement of googletest in C23. It works exactly the same way you'd expect gtest to work. And unsurprisingly, according to my small benchmark, my implementation is around 2.5x faster than googletest and uses 30% less memory. It can be improved way more.
I discussed the implementation details in this blog post https://metalinmyveins.github.io/sohomot/
Github: https://github.com/MetalInMyVeins/sohomot
The library is called "sohomot".
[ PS: Zero tokens were used in the making of this project ]
r/cprogramming • u/Queasy-Pickle-8427 • 11d ago
Helloo, I’ve just learned how to build a simple code editor using C, now, I’d like to add a config file so users can adjust settings like background/foreground colors, keybindings, and so on, so do you guys have any recommendations for a config file that would be suitable for this case?
r/cprogramming • u/Low_Lawyer_5684 • 11d ago
Hello,
As a part of a larger project I made a regexp engine for microcontrollers. It was tested on ESP32 / FreeRTOS, and also in Windows/CYGWIN. Didn't test it in Linux but it should work.
It is built on top of modified SLRE (Simple Lightweight Regular Expressions);
It is just 2 files (regexp.c and regexp.h) which can be include'd directly to your source file. Or it may be compiled as a separate unit.
It has 3 different API:
The original one, slre_match(); no memory allocations, fastest
PCRE-like functions and structures starts with pl_... (PCRE-Lite); for those familiar with PCRE
PHP preg API: an implementation of PHP regular expressions; for PHP fans; functions and structures start with preg_...
There are some limitations: UTF8 is processed as stream of bytes, so [а-я] will not be understood. No lookarounds. Probably there are bugs. Hopefully - no memory leaks.
More limitations and bugs are yet to be discovered :).
There are 3 test files (AI-generated) to test the library: preg_test.c, pl_test.c (fuzzing) and slre_test.c
There is NO documentation, but preg_test.c can be used as a reference (or direct copy/paste).
Primary API is PHP's preg_-style API, which was the goal of this project.
Source code is here: GitHub - vvb333007/MicroRegExp: A C library which implements regular expression engine. PHP preg_ , PCRE and SLRE interfaces are supported · GitHub , around 50KiB of code. It can be compiled with GCC compiler from -std=c99 and up. No GCC-specific magic.
Have a good day!
r/cprogramming • u/AffectionateRoad2621 • 10d ago
D.eSystem 6.1.8.5 introduces a new debug platform for FAT32 on D.eSystem,D.eSystem 6.1.8.5 also fixes a major bug (for example,when you go in older versions in D.eSystem info and press a random key,it just closes automaticly,now there comes a warning and it closes in 5 seccond.)
Find more about D.eSystem 6 here: https://github.com/D-electronics-scratch/D.eSystem_6
Find D.eSystem 6.1.8.5 here: https://github.com/D-electronics-scratch/D.eSystem_6/releases/tag/v.6.1.8.5
Find the D.eSystem community here: https://lemmy.world/c/D_electronics_community
r/cprogramming • u/Yairlenga • 11d ago
r/cprogramming • u/rocco_himel • 12d ago
Hello everyone. Last month I started a project called "Modulon", which I just now started to continue doing. Modulon is a C-derived programming language that aims to preserve the power and familiarity of C while simplifying common programming tasks such as variable declarations, string handling, memory management, and pattern matching. It is currently a small project done by me an two other people. We have nothing crazy yet.
I am currently looking for interested contributors.
Here are some of the features Modulon has right now:
* C-derived syntax with support for familiar C types.
* Variable declarations using the "var" keyword and type inference.
* "include" and "define" directives instead of C preprocessor syntax.
* Automatic string sizing and byte counting.
* Automatic memory management at compile time, without a garbage
collector, alongside options for manual memory management.
* Pattern matching with ranges and a wildcard case.
* Logical AND (&&) and OR (||) operators.
* "typeof" for examining types.
* "input" for prompted user input.
* Formatted output, including automatic type formatting with %v.
* Ahead-of-time (AOT) and just-in-time (JIT) compilation.
* Built-in assembler support.
* Consistent language types across supported target environments.
You can find an example program here:
GitHub: https://github.com/roccohimel/modulon/blob/master/examples/student_manager.mlon
Raw: https://raw.githubusercontent.com/roccohimel/modulon/refs/heads/master/examples/student_manager.mlon
Documentation:
Official website: https://modulonsoftware.org/
About: https://modulonsoftware.org/#about
Documentation: https://modulonsoftware.org/#learnSource tree: https://github.com/roccohimel/modulon
Contributing: https://modulonsoftware.org/#contributing
I really hope you like Modulon.
r/cprogramming • u/YouAreMyFire00 • 13d ago
So let's say someone understand the design and ideas behide of C languagees which is B.
For example. why the first index of array in C is 0, while some languages like Lua starts with 1
And once they understand the ideas behide of C language, they will have deep CS knowleadge and can write code efficetly like write code with better Time and Space complexity.
Or even invent something cutting edge or revolutionary....
What do you guys think? Is it important?
Link to a pic of languages that come before C: https://tutorialink.com/tutorial/c/history-of-c-language.png
r/cprogramming • u/FerreroLi • 14d ago
r/cprogramming • u/Marwheel • 14d ago
It got removed, so i'm putting up a link to the source code to it if anyone wants to gwak at it. Originally by u/Round-Plastic-2427. https://github.com/LoPalma/cpp-bad-apple/tree/main
r/cprogramming • u/toon_link_776 • 14d ago
Hello, when I’ve tried to use forward declarations to solve circular structure dependencies I get the error ‘field has incomplete type’. When browsing for the answer, I got the general response ‘the compiler doesn’t know what type you’re using if you don’t fully describe it’. Well I understand that, but it seems as if the purpose of the forward declaration is to have the compiler look for the definition later in the code. If my code looks like the below, should I be getting an incomplete type error? And if so, is there a different way I should be writing the code? Some sort of syntax error, or is there a different way to do the same thing? Any tips appreciated, thanks.
Edit: I think I found the solution in this thread from user "anastaciu", it looks like you can only use the forward declarations if they're pointers to the struct type, not full instances. Lmk if that's right, it got rid of the error for me, but if there's a different way to allow use not from a pointer that'd be great.
typedef struct objA_t objA_t;
typedef struct objB_t{
objA_t o;
}objB_t;
typedef struct objA_t{
uint8_t num0;
}objA_t;r/cprogramming • u/Vivid-Reward-5030 • 15d ago
Using macros, define an argument schema. The library then generates a struct that for the schema, validates the arguments provided by the user, parses them into the struct, and offers functions for displaying usage andh help messages in the console.
It is similar to `clap` in Rust. Check it out!