Read up a bit on this now, and it definitely looks like something I want to try out! One of the beautiful thing about C is its simplicity, and it looks like Odin has been able to keep that, while introducing some nice convenience features that I often feel like I miss when writing C.
- 0 posts
- 8 comments
- 2 years
- CapeWearingAeroplane@sopuli.xyzto
World News@beehaw.org•North Korea ramps up preparations for war with US
2 yearsI don’t know if this is done in practice, but if you have a nuclear powered sub, implementing a water electrolyzer that makes oxygen is fairly trivial. Then you have air as long as you have power, so they could in principle stay submerged for ≈ 20 years, or however long the nuclear reactors can go without refill.
- CapeWearingAeroplane@sopuli.xyzto
Programming@programming.dev•GTA V source code has now leaked on Discord
2 yearsI think that’s reasonable. As long as someone is posting relevant content, there should be no obligation to interact with their own posts.
- CapeWearingAeroplane@sopuli.xyzto
Programming@programming.dev•when is it best to use a recursive function vs a for loop
2 yearsI think people talking about premature optimisation are often talking about micro-optimisations. Those are almost always unnecessary until you’ve identified choke points. Optimising the overall architecture of the code base on the other hand, is in my opinion something that should be thought about before you even start coding. That’s where the major gains can often be done anyway.
- 3 years
My
void*doesn’t care about yourconst!
- 3 years
I typically don’t declare them as such - bring the pitchforks!
- 3 years
Unironically: For in-house scripts and toolboxes where I want to set stuff like input directory, output directory etc. for the whole toolbox, and then just run the scripts. There are other easy solutions of course, but this makes it really quick and easy to just run the scripts when I need to.



Theres plenty of cases where I would like to do some large calculation that can potentially give a NaN at many intermediate steps. I prefer to check for the NaN at the end of the calculation, rather than have a bunch of checks in every intermediate step.
How I handle the failed calculation is rarely dependent on which intermediate step gave a NaN.
This feels like people want to take away a tool that makes development in the engineering world a whole lot easier because “null bad”, or because they can’t see the use of multiplying 1e27 with 1e-30.