Handmade Network»Feed
paultarvydas
further thoughts, comments and opinions about this question
»
Benjamin Pedersen
I have noticed that it always crashes, when I try to load a file while loading another.
»
ratchetfreak
There is also _Generic which lets you decide the logic of picking the overload:
»
»
Mārtiņš Možeiko
I don't think there exists anything for that. If you change name, you'll have different name. For …
»
longtran2904
I'm trying to have function overloading in C. The first idea is to just do what C++ does: mangling…
»
Oliver Marsh
Thanks Martin, that helps a lot. Oh didn't realise the 2gb limit which might make it not worth it.
»
Mārtiņš Možeiko
That is one way how to do that. Sometimes strict corporate anti-virus software may not like that, …
»
Oliver Marsh
In a handmade chat I remember Casey say you can attach your assets to the end of your exe to turn …
»
Simon Anciaux
Only on string literals. You can build string + size with macro:
»
longtran2904
Wait, you can use sizeof on string? I don't even know that. I always thought you need to use somet…
»
Simon Anciaux
To print lots of new lines with printf you can create a string that contains only new lines and us…
»
longtran2904
Thanks for replying! I want to get better at metaprogramming so your help is much appreciated. Som…
»
Mārtiņš Možeiko
Yes, to repeat other character than space you need for loop. #line directive will make compiler ge…
»
longtran2904
So to just print 10 new lines, I can only use a for loop? Are there any other printf arguments tha…
»
Mārtiņš Možeiko
For some reason, this will print 10 empty spaces rather than lines. That is expected. *. for %s te…
»
longtran2904
For some reason, this will print 10 empty spaces rather than lines. Also, VS couldn't find the cor…
»
Mārtiņš Možeiko
%*.s works just fine with any string. For example, for 4 space indent: As for caller names & line …
»
longtran2904
For some reason "%*.s" doesn't work with "\n". Another thing that I want to add is the function ca…
»
Mārtiņš Možeiko
If you need correct alignment, you need to parse it and print it out. There's no magic solutions f…
»
longtran2904
Each of my tokens has a column and line number. When parsing I just do a simple printf("%.*s", tok…
»
»
Mārtiņš Možeiko
While that will work, it'll be annoying as the debug symbols will points to the copies and you'll …
»
Simon Anciaux
If you need to modify the code but don't want to modify the original file than you'll need to make…
»
longtran2904
So what if you want to do something more complex like adding new keywords (e.g defer)? I can't gen…
»
Simon Anciaux
Your meta program could generate a file called typedefs.h that only contains the typedefs and you …
»
longtran2904
I just finished watching the metaprogramming episode and want to try it out. One of the first thin…
»
Procedural
Superseded by Game Script:
»
longtran2904
For the first example, I can just treat the function as matrix multiplication. The inverse rotatio…
»
Jason
Congratulations on getting to feature complete status (even if its not the final feature set). I k…
»