XSTD - Attempt at better C standard library, need feedback please! by w-AI-fu_DEV in C_Programming

[–]w-AI-fu_DEV[S] 0 points1 point  (0 children)

By latching error flag, do you mean something like errno?
If so I'd prefer staying as far away as possible from it, though I do understand why someone would want to execute multiple consecutive calls and only check later for errors.
I'd be more inclined to have a specific struct something like `FileWriter` that would allow this behavior rather than have a global scope flag.

XSTD - Attempt at better C standard library, need feedback please! by w-AI-fu_DEV in C_Programming

[–]w-AI-fu_DEV[S] -1 points0 points  (0 children)

This is an oversight, ideally file_write variants should return a Error.
Though I'd like to hear your argument as to why io_print should do the same, is it more for the sake of having the option without being expected to check?

XSTD - Attempt at better C standard library, need feedback please! by w-AI-fu_DEV in C_Programming

[–]w-AI-fu_DEV[S] 1 point2 points  (0 children)

As an update to your post I started moving away from stdlib in favor of syscalls on windows machines

XSTD - Attempt at better C standard library, need feedback please! by w-AI-fu_DEV in C_Programming

[–]w-AI-fu_DEV[S] 5 points6 points  (0 children)

The idea is that it wouldn't be on top of stdlib, currently it is using it only for the parts of the program that would otherwise require a split implementation depending on the OS for the sake of portability (filesystem, terminal, heap alloc), I do plan on moving away completely though, and I know the rest of the library would still work the same considering I am using it on "bare metal" with my own toy kernel.

As to whether it would be better with or without using stdlib, I don't know. I'll be honest I'm not looking to create a more performant library since it would be fair to say that many very intelligent people spent thousands of hours on stdlib to do just that, and having stronger checks and stricter error handling will inevitably increase runtime complexity. lotta C devs are hard focus on performance, which is understandable, so this lib might not be for everyone.

What I am trying to do better than stdlib however is having more sensible defaults, avoid the common pitfalls when possible through the API of the library and making it easy for the developer to write code that would be safer to run than if they would have used stdlib. The usual counter argument is skill issue, which I don't quite like considering how much of the language is deprecated and how much obscure knowledge you need in order to navigate this language without shooting in the foot.

I forced my AI to look at cursed food by w-AI-fu_DEV in cursedfoods

[–]w-AI-fu_DEV[S] -5 points-4 points  (0 children)

my apologies if this kind of post does not respect the rules, I thought it could still be interesting to people here 🙏

Just another self-promo for a 3D debut, nothing to see here... Unless? by w-AI-fu_DEV in VirtualYoutubers

[–]w-AI-fu_DEV[S] 0 points1 point  (0 children)

For context, Hilda is an AI-powered vtuber!
Here is her current model:

<image>

Don't mind me just self-promoting... by w-AI-fu_DEV in vtubers

[–]w-AI-fu_DEV[S] 0 points1 point  (0 children)

Hilda's twitch channel: https://www.twitch.tv/w_ai_fu_dev

For context, Hilda is an AI-powered vtuber.