[video member=pervognsen stream_platform=twitch project=bitwise title="Order-Independent Declarations" vod_platform=youtube id=0WpCnd9E-eg annotator=Miblo]
[0:09][Recap and set the stage for the day][:speech]
[0:56][Review improvements to the sizeof :parsing, and the TokenKind enum][:research]
[4:27][Add TOKEN_FIRST_MUL to the TokenKind enum, and continue to explain the motivation for filling up this enum][:parsing]
[6:27][Review the introduction of buf__printf() and buf_clear()][:memory :research]
[9:04][Illustrate how buf__print() is used][:memory :research][quote 0]
[10:22][:Run it to show the result of buf__printf()][:memory]
[10:34][Disable use_print_buf][:memory]
[10:43][:Run it to see how that works][:memory]
[10:48][Enable use_print_buf][:memory]
[10:51][Break on flush_print_buf(), and then step over it to illustrate how buf__printf() works][:memory :run]
[11:46][Introduce order-independent declarations][:language :parsing :speech]
[19:17][Proposed algorithm for handling order-independent declarations: memoization-style dependency-directed recursion][:language :parsing :speech]
[28:56][Memoization][:parsing :speech]
[30:14][What we need to get started on order-independent declaration handling code][:language :parsing :speech]
[31:19][Start by building up a symbol table, introducing sym_get() and sym_put()][:language :parsing]
[34:37][Introduce resolve_test()][:language :parsing]
[39:54][:Run it to see that it works][:language :parsing]
[40:05][Introduce resolve_syms(), resolve_name(), resolve_sym() and resolve_decl()][:language :parsing]
[46:12][Introduce Entity and Type structs, and a collection of Type functions][:language :parsing]
[1:00:59][Add a type_ptr test in resolve_test()][:language :parsing]
[1:01:42][:Run it to see that it works][:language :parsing]
[1:01:46][Add more type tests in resolve_test()][:language :parsing]
[1:03:55][:Run it to see that it all works][:language :parsing]
[1:03:59][Hash consing][:"data structure" :speech]
[1:08:09][Implement type_struct() and type_func()][:language :parsing]
[1:19:51][Add type_func tests in resolve_test()][:language :parsing]
[1:21:55][:Run it to see that it works][:language :parsing]
[1:23:06][Q&A][:speech]
[1:23:22][@orcnz29][@pervognsen Could you use a unique string (interned) as the cache key? You have the type name, so for pointers a key could be "Foo*" etc][:parsing]
[1:24:04][@iain]["break ground"]
[1:24:11][@twicetimes][@pervognsen Is Ion going to have anything like type qualifiers and, if so, how would this work with the canonical version of primitive types?][:language]
[1:24:46][@graemephi][@pervognsen Not a question, just registering that I'm ready for more homework]
[1:26:36][@enemymouse][Do you need to distinguish function types by whether they reference static variables?][:parsing]
[1:27:33][@cubercaleb][Isn't this basically string interning but for functions?[ref
    site=Wikipedia
    page="Hash consing"
    url=https://en.wikipedia.org/wiki/Hash_consing]][:"data structure" :parsing][quote 1]
[1:29:23][@eaterenrgy][Why do we use that double pointer?]
[1:30:09][@badflydog][@pervognsen Off-topic to ~bitwise so feel free to save this for later. How is your Malay?][:trivia]
[1:30:41][@0b0000000000000][@pervognsen Why is SYM_UNRESOLVED a no-op? Shouldn't that be SYM_RESOLVED?][:parsing]
[1:30:52][Fix typo in resolve_sym()][:parsing]
[1:32:17][@jgomes83][@pervognsen Would it be possible to have a primitive type that is similar to Exceptions in oo languages so that try-catch clauses are possible?[ref
    site=Wikipedia
    page="Monad (functional programming)"
    url=https://en.wikipedia.org/wiki/Monad_(functional_programming)#The_Maybe_monad]][:language]
[1:37:35][Further thoughts on error handling and API design][:speech][quote 2]
[1:41:02][Command–query separation[ref
    site=Wikipedia
    page="Command–query separation"
    url=https://en.wikipedia.org/wiki/Command%E2%80%93query_separation]][:speech][quote 3]
[1:42:26][@marsol0x][Good set of quotes today]
[1:42:46][Thanks for today][:speech]
[/video]
