is presently its sole maintainer,
You can support him:
Recap and set the stage for the day
simple_preprocessor.cpp: On understanding the contents of structs
simple_preprocessor.cpp: Make ParseMember take StructTypeToken
Run the preprocessor and see this new information
build.bat: Pipe the output of the preprocessor to handmade_generated.h at compile time
Describe ths metaprogramming workflow
handmade.h: #include handmade_meta.h
handmade_meta.h: Introduce member_definition and meta_type
handmade_meta.cpp: #include handmade_generated.h and #include this file in handmade.cpp
handmade_generated.h: Mention the fact that once this is generated, we always have it
handmade_debug.cpp: Set some values and print them out using DEBUGTextLine
Debugger: Run the game and see these debug values
handmade_debug.cpp: Introduce DEBUGDumpStruct
handmade_sim_region.h: Make sim_region introspected
handmade_meta.h: Add the types in sim_region to meta_type
handmade_debug.cpp: Set these values of sim_region and print them out
Run the game and see the sim_region printing out
handmade_generated.h: Note that new types have to keep being redefined in handmade_meta.h
handmade_math.h: introspect rectangle2 and rectangle3
simple_preprocessor.cpp: Process handmade_math.h
Run the preprocessor and see that these rectangles are now defined
handmade_debug.cpp: Show what we otherwise would have to do to define a new type
Run the game and view those rectangles
handmade_debug.cpp: Use the meta generator to define rectangle3 for us, and manually define MetaType_v3
Run the game and see our debug output
handmade_debug.cpp: Discuss ways to get this code generated for us
simple_preprocessor.cpp: Introduce meta_struct to enable us to keep track of structs seen
simple_preprocessor.cpp: Printout #define META_HANDLE_TYPE_DUMP and loop over the Meta structs
simple_preprocessor.cpp: Take a look at how this injection works
Run the game and see all of this new stuff being printed out
handmade_debug.cpp: Add the concept of an indent level
"There's nothing worse than a whiny C compiler" (!quote 277)
Run the game and see our newly indented output
simple_preprocessor.cpp: Print a line to tell us what the member was
Run the game and look over our generated debug information
handmade_world.h: introspect world_position
simple_preprocessor.cpp: Process handmade_world.h
Run the game and see the entity printout
handmade_sim_region.h: introspect everything
Run the game and notice that pointers aren't handled correctly
handmade_meta.h: Introduce member_definition_flag
simple_preprocessor.cpp: Recognise pointers
handmade_debug.cpp: Dereference a pointer and skip printing it if it's null
Run the game and see it starting to make more sense
handmade_debug.cpp: Set TestCollisionVolumeGroup parameters
Run the game and see this information
handmade_debug.cpp: Set another lot of values, but note that the generator does not know how to handle them
handmade_sim_region.h and handmade.h: Introduce counted_pointer
simple_preprocessor.cpp: Note that the parser must be aware of how to handle these counted pointers
On building on our knowledge to progress from basic introspection to metaprogramming
ChronalDragon Q: So when you say you've built up multiple layers of metaprogramming, do you mean your metaprograms output things like what we wrote today?
nxsy Q: Isn't offsetof fairly safe to rely on with remotely recent compilers?
handmade.cpp: Try using offsetof
blah238 Q: Someone said that the string function you were looking for was called strdup
garryjohanson Q: In the episode of the Jeff and Casey Show "The Wolf Doesn't Want to Come Anymore" you mentioned that you use metaprogramming techniques to make up for modern language shortcomings. Curious what functionality you have used metaprogramming to achieve that you would have found prohibitive in modern languages? Can you suggest any specific usages to pursue for either program robustness, optimization, etc.?
ChronalDragon Q: To rephrase, are your "multiply layered" metaprograms outputting further metaprograms? Or is it a single layer that has enough complexity to be considered more than a single pass? (Not sure how to phrase, I was mostly trying to prompt further discussion of what you've mentioned previously)
JamesWidman Q: Odd... offsetof is defined in MSVC's <stddef.h>, and is specified in C '89 as belonging to that header... Did I miss something?
Debugger: Use the test project to Go to Definition of offsetof
binjimin Q: Based on what Jonathan Blow has so far, do you think JAI will have the metaprogramming capabilities that you'd want? If not, what do you think it is missing?
paulsm1th Q: You said in a previous stream that you don't really program in C anymore, you basically program in "Caseylang". Does that refer to your metaprogramming tools or is there more to it than that?
d7samurai Q: You're not using header files for OpenGL / Direct3D?
sjohn_c Q: Have you worked with any functional languages? Haskell or maybe Scala?
blah238 Q: Maybe a bit off topic but going along with the Master Spy thing, have you ever done a stealth game and, if so, what particular programming challenges do stealth mechanics bring that you don't usually have to deal with?
Stephenlast Q: Is the syntax of Casey-Lang still very close to C?
insofaras Q: Your metaprogramming tools sound very useful, will you ever open source them, maybe in your will if nothing else?
Shoozza Q: Will you write your own installer for Handmade Hero? Or just zip it and be done with it?
boondoggle42 Q: How about writing a Casey-Approved GUI debugger for Jai?
JamesWidman Q: I'm looking forward to additional visualizers in the debug view (e.g. a small grid view with a dot or line from (0,0) to represent a v2 along with the decimal digits). Do you think that would be worthwhile?
garryjohanson Q: Do you ever metaprogram the sims stuff and the job queue?
vSealos Q: Is there any feature you would add to Jai?
Close it down
Announcement: F2P discussion between Casey and Shawn McGrath on Thursday