From 2940f8df60c8869a789f131cb969a721c3e6e40e Mon Sep 17 00:00:00 2001 From: Matt Mascarenhas Date: Tue, 24 Apr 2018 18:19:31 +0100 Subject: [PATCH] Annotate bitwise020 --- pervognsen/bitwise/bitwise/bitwise020_1.hmml | 39 ++++++++++++++++++++ pervognsen/bitwise/bitwise/bitwise020_2.hmml | 3 ++ 2 files changed, 42 insertions(+) create mode 100644 pervognsen/bitwise/bitwise/bitwise020_1.hmml create mode 100644 pervognsen/bitwise/bitwise/bitwise020_2.hmml diff --git a/pervognsen/bitwise/bitwise/bitwise020_1.hmml b/pervognsen/bitwise/bitwise/bitwise020_1.hmml new file mode 100644 index 0000000..9c2ac21 --- /dev/null +++ b/pervognsen/bitwise/bitwise/bitwise020_1.hmml @@ -0,0 +1,39 @@ +[video member=pervognsen stream_platform=twitch project=bitwise title="Packages" vod_platform=youtube id=AVrGUfymPQs annotator=Miblo] +[0:09][Recap and set the stage for the day][:speech] +[1:10][Demo typeof()][:language :run] +[3:01][Describe the get_typeinfo() builtin function and its use cases][:language :research] +[6:56][Demo the ability to dig into typeinfo][:language :run] +[9:01][Describe the typeinfo generation code, noting that size and alignment information is no longer output directly from our internal definitions, but via sizeof() and alignof() calls][:"code generation" :language :research] +[14:23][Note the recent large number of bug reports / fixes][:research] +[15:05][Review the new handling of \@complete note for use in if and switch statements][:language :research] +[17:26][Review the new support for # statements, and #assert specifically][:language :research] +[19:03][Note the increased strictness for C11 support][:language :research] +[19:41][Review the addition of alignof() and offsetof()][:language :research] +[20:32][Review the change to make ++ / -- be exprs with C-like postfix / prefix variants][:language :research] +[22:51][Review the newly unified variable declaration and initialiser statement code, and if initialisers][:language :research] +[24:37][Review the fixed regression in the constant evaluator, with the introduction of the #static_assert note to catch these kinds of bugs][:language :research] +[28:08][Q&A][:speech] +[28:48][Package design][:"file io" :language :library :"platform layer" :speech] +[37:34][Package path namespace, and absoluteness by default][:"file io" :language :library :"platform layer" :speech] +[41:01][Create os.c as the front-end for all OS-specific stuff, and os_win32.c to contain our first platform's file enumeration code][:"platform layer"] +[43:10][Introduce dir__set_state(), dir_find() and dir_find_next() to enumerate all files matching a given search term in a directory,[ref + site=MSDN + page="Filename Search Functions" + url=https://msdn.microsoft.com/en-us/library/kda16keh.aspx] and dir_find_free() to close that directory][:"file io" :"platform layer"] +[1:07:23][:Run it to see that it just works][:"file io" :"platform layer"] +[1:08:59][:Run it on a search term that shouldn't match anything][:"file io" :"platform layer"] +[1:09:54][Make dir_find() clear the iter][:"file io" :"platform layer"] +[1:10:17][:Run it to see size and handle get fully cleared][:"file io" :"platform layer"] +[1:10:45][Make dir_find_test() call dir_find_free() after one iteration, and the latter to reset valid and error to false, with a few words on the relation between valid and error][:"file io" :"platform layer"] +[1:12:06][Introduce dir_find_buf() to push our file paths onto a stretchy buffer][:"file io" :memory :"platform layer"] +[1:14:57][Step through dir_find_buf() to see that it all works][:"file io" :memory :"platform layer" :run] +[1:16:07][Rename dir__set_state() to dir__update(), and pull dir_find_buf() out to the cross-platform os.c file][:"file io" :memory :"platform layer"] +[1:19:04][Q&A][:speech] +[1:20:05][@nothings2][@pervognsen Why make your internal API be first / next? Maybe just make a readdir abstraction that just returns a stretchy buffer of filenames][:"file io" :memory :"platform layer"] +[1:20:53][@tbodt_][So POSIX has opendir(), readdir()[ref + site="Linux man page" + page="readdir(3): read directory" + url=https://linux.die.net/man/3/readdir] which returns the next file until you get to the end at which point it returns NULL, and closedir()][:"file io" :"platform layer"] +[1:22:15][@nothings2][If you make the read-a-whole-directory the main abstraction you don't have to worry about things like 'what happens if you free in the middle'][:"file io" :memory :"platform layer"] +[1:22:36][Cut over to the extra stream][:speech] +[/video] diff --git a/pervognsen/bitwise/bitwise/bitwise020_2.hmml b/pervognsen/bitwise/bitwise/bitwise020_2.hmml new file mode 100644 index 0000000..17240b0 --- /dev/null +++ b/pervognsen/bitwise/bitwise/bitwise020_2.hmml @@ -0,0 +1,3 @@ +[video member=pervognsen stream_platform=twitch project=bitwise title="Packages (Extra)" vod_platform=youtube id=N6ndXk3DVg0 annotator=Miblo] +[0:00][\[Entire stream, not annotated\]][:"file io" :memory :"platform layer"] +[/video]