cinera_handmade.network/cmuratori/hero/code/code327.hmml

68 lines
4.0 KiB
Plaintext

[video output=day327 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Parsing Printf Format Strings" vod_platform=youtube id=vpB9hFX_L2Y annotator=Miblo]
[0:23][Announcement: Early registration for HandmadeCon 2016 ends soon[ref
site="Molly Rocket"
page="HandmadeCon 2016 is GO!"
url="https://mollyrocket.com/news_0033.html"]]
[1:18][Announcement: Casey will be speaking at PWLConf 2016[ref
site="Papers We Love"
page="PWLConf 2016"
url="http://pwlconf.org/"][ref
site=Twitter
page=@papers_we_love
url=https://twitter.com/papers_we_love]]
[5:06][Recap and set the stage for the day]
[6:16][A few words on the difficulty of printing floating point numbers[ref
site="Marc Andrysco, Ranjit Jhala, Sorin Lerner"
page="Printing Floating-Point Numbers: A Faster, Always Correct Method"
url="https://cseweb.ucsd.edu/~lerner/papers/fp-printing-popl16.pdf"]]
[9:07][handmade_shared.h: Enable FormatStringList() to process the %s specifier]
[11:26][Debugger: Go to definition of va_arg()]
[14:07][Run the game, crash in FormatStringList() and investigate why]
[15:12][handmade_shared.h: Make FormatStringList() skip other % specifiers than %s]
[16:48][Run the game and see how that works]
[18:46][handmade_shared.h: Enable FormatStringList() to handle the flags in the printf spec[ref
site="C++ Reference"
page="printf"
url="http://www.cplusplus.com/reference/cstdio/printf/"]]
[25:05][handmade_shared.h: Enable FormatStringList() to handle the width field and introduce S32FromZInternal()[ref
site="C++ Reference"
page="printf"
url="http://www.cplusplus.com/reference/cstdio/printf/"]]
[31:16][handmade_shared.h: Enable FormatStringList() to handle the precision[ref
site="C++ Reference"
page="printf"
url="http://www.cplusplus.com/reference/cstdio/printf/"]]
[33:19][handmade_shared.h: Begin to enable FormatStringList() to handle each of the % specifiers[ref
site="C++ Reference"
page="printf"
url="http://www.cplusplus.com/reference/cstdio/printf/"]]
[34:42]["No sense not dotting your t's, crossing your i's and so on..."][quote 522]
[38:04][handmade_shared.h: Enable FormatStringList() to handle the length[ref
site="C++ Reference"
page="printf"
url="http://www.cplusplus.com/reference/cstdio/printf/"]]
[42:02][handmade_shared.h: Introduce ReadVarArgInteger() and ReadVarArgFloat(), with a few words on the ugliness of this in C]
[45:51][handmade_shared.h: Continue enabling FormatStringList() to handle each of the % specifiers[ref
site="C++ Reference"
page="printf"
url="http://www.cplusplus.com/reference/cstdio/printf/"]]
[48:06][handmade_shared.h: Separate ReadVarArgInteger() out into ReadVarArgUnsignedInteger() and ReadVarArgSignedInteger()]
[49:08][handmade_shared.h: Continue working on the % specifiers in FormatStringList()[ref
site="C++ Reference"
page="printf"
url="http://www.cplusplus.com/reference/cstdio/printf/"]]
[52:31][Debugger: Step through FormatStringList() and inspect what's happening]
[53:15][handmade_shared.h: Make FormatStringList() consume the .]
[53:39][Run the game, see the printing in action, hit our assertion in FormatString() and investigate why]
[58:10][handmade_shared.h: Make FormatString() increment At at the end]
[59:17][Run the game and see that we're now all good]
[1:00:42][Q&A][:speech]
[1:02:49][@soysaucethekid][Will you be doing a sprintf?]
[1:03:49][@chzmstr][Is the GitHub repo accessible to preorders?]
[1:04:53][@neres909][I'm following your series from beginning and I'm writing my own game (obviously from scratch too!). Is it okay to use in my win32 layer similar code (with same thought by mostly written by myself)?]
[1:05:56][@mightyarm][What are you using for DRM?]
[1:06:43][@hmd_bot][@Neres909: Casey is currently using a Razer BlackWidow Tournament Edition Stealth. See also: !switches]
[1:07:09][@insofaras][Throw in a hardware keyfob for good measure]
[1:07:47][Shut this down][:speech]
[/video]