this post was submitted on 01 Nov 2025
30 points (85.7% liked)

Programming

23426 readers
102 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

From the video description:

Stop recompiling your C code just to change a number. adjust.h is a single-header library that lets you edit variables while your program is running - no rebuilds needed. Just include the header, mark your variables, and watch them update live as you edit your source file. In this video, I'll show you how to set it up and demonstrate why this simple tool can save you time.

Works with any C99 compiler and integrates perfectly with Raylib, ImGui, and other popular libraries. Whether you're tweaking game physics, adjusting graphics parameters, or fine-tuning algorithms, adjust.h will make your life simpler. Zero dependencies, minimal setup, maximum productivity.

top 12 comments
sorted by: hot top controversial new old
[–] pcouy@lemmy.pierre-couy.fr 11 points 1 week ago (1 children)

Here is a link to the adjust.h GitHub in case you don't feel like watching a video

[–] nebeker@programming.dev 8 points 1 week ago (1 children)

I love how the documentation is in the actual .h file and the read me is a mere formality.

I’m disappointed I didn’t get this as a floppy in the mail.

[–] 30p87@feddit.org 2 points 1 week ago (1 children)

Send me your physical address and I'll provide you a copy.

[–] nebeker@programming.dev 2 points 6 days ago

Sure, it’s:

123 Mulberry '); DROP TABLE Deliveries;--

[–] xan1242@lemmy.dbzer0.com 6 points 1 week ago* (last edited 1 week ago) (1 children)

From a glance, this is just a value parser that exports them by symbols and allows you to edit the static values from a file neatly.

I don't know how practical this is yet since I haven't seen the video, but in order for it to be more practical it needs to be easier to implement and use than other methods to accomplish tweakable values for debugging.

There are many already:

  • parsing a config/text file in runtime
  • parsing commandline args
  • parsing environment variables
  • using a debugger and a memory watch
  • using external tools that can edit memory

Now, not all methods are available on all platforms, but, it needs to be better than any of these methods in some way for it to have any point in using it.

Game devs often have their own frameworks that can communicate with the game via network to tweak exposed values anyway for realtime debugging. Adjust.h from what I can see requires the program to be reset on each iteration.

[–] ulterno@programming.dev 1 points 1 week ago

Adjust.h from what I can see requires the program to be reset on each iteration.

And here's the catch...
Let's see if it's somehow better than just a config file, which I use for such a case.

[–] Arghblarg@lemmy.ca 5 points 1 week ago (1 children)

Why the downvotes? It seems at first glance like an interesting concept.

[–] potatoguy@lemmy.eco.br 5 points 1 week ago (2 children)

Maybe because it's a youtube video, but IDK

[–] HaraldvonBlauzahn@feddit.org 10 points 1 week ago

Yes its because it is a youtube video. Who has time to watch videos (and likely being sucked into a swamp of crap) if 200 words of text can in all likelihood convey the same information?

[–] ulterno@programming.dev 4 points 1 week ago

Yeah, I tend to just ignore youtube links most of the time.
While this would have been better received on Reddit, for Lemmy, you want to consider making the GitHub/GitLab links as the main and youtube links in the description.

[–] HaraldvonBlauzahn@feddit.org 5 points 1 week ago

Stop recompiling your C code just to change a number.

That sounds stupid if you can do the same with getenv() and atof(), which are part of the system C library.

[–] gopher@programming.dev 3 points 1 week ago

Does it bring any advantage over using GDB/LLDB? Seems a little unnecessary if it's just to change variables.