Deleted Comment
The 3D API is just meant to be a minimal portable abstraction over common low-level hardware features, composing those features into higher level constructs is intentionally left as an exercise for the user.
Ketosis will work (it's very low carb, not zero carb). You (as in you personally) won't be able to do it, you likely lack the willpower, and if you're social, it's difficult to do in a social setting, especially without taking a deep dive into the science to help understand the how and the why.
Obviously calories aren't everything in terms of diet and health; vitamins, nutrients and other parts come into play. But when it comes down to actual physical weight, nothing else matters, unless you have a medical problem. Learning how calories work and counting them for some time, so you understand what you are actually eating, is the first step.
Ideally this work would be done with a professional nutritionist, since calorie counting will get you to the weight you want, but it speaks nothing of how healthy your diet is. Sadly this is not something everyone is privileged enough to be able to do.
It is also important to remember that most people who struggle with their weight, and are making an effort, are actually struggling with their relationship with food. This is something that no matter what diet you are on, or how deep your understanding of biology and nutrition is, nothing can replace actually working that deeper issue, which is not trivial and something truly personal.