)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"4728f31399cd0babd799d6a18bff407219d82ba4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"07a2ae18_0fbb37f8","updated":"2023-02-18 03:50:11.000000000","message":"I\u0027m not totally caught up yet on what\u0027s happened the last two months, but assuming the trampoline stuff still looks approximately similar to how I left it, this proposal is an excellent idea.  I think it might even be inevitable, unless Rust adds explicit tailcalls (which is not happening anytime soon).","commit_id":"bfe6cace5ed1565794801ef3d3bfffaffb360330"}],"tvix/eval/docs/vm-loop.md":[{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"4728f31399cd0babd799d6a18bff407219d82ba4","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"The current implementation of the trampoline logic was added on to the"},{"line_number":23,"context_line":"existing VM, which recursed for thunk forcing. As a result, it is"},{"line_number":24,"context_line":"currently a little difficult to understand what exactly is going on in"},{"line_number":25,"context_line":"the VM loop and how the trampoline logic works."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"This has also led to several bugs, for example: b/251, b/246, b/245,"}],"source_content_type":"text/x-markdown","patch_set":3,"id":"e191bc77_656e871f","line":24,"updated":"2023-02-18 03:50:11.000000000","message":"This is quite an understatement 😊 at least as applied to the state of the code where I handed it off (I have not yet caught up on what\u0027s happened since then).\n\nI basically made a big buggy mess out of the VM loop in my trampoline CL, and the fact that it was a big buggy mess was the main reason why it hadn\u0027t reached the \"ready to review\" stage at that point.  I admit that I did not fully understand the changes I was making there.","commit_id":"bfe6cace5ed1565794801ef3d3bfffaffb360330"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"4728f31399cd0babd799d6a18bff407219d82ba4","unresolved":true,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"We achieve this by replacing the current concept of call frames with a"},{"line_number":47,"context_line":"\"VM context\" (naming tbd), which can represent multiple different"},{"line_number":48,"context_line":"states of the VM:"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"1. Tvix code execution, equivalent to what is currently a call frame,"},{"line_number":51,"context_line":"   executing bytecode until the instruction pointer reaches the end of"}],"source_content_type":"text/x-markdown","patch_set":3,"id":"23464142_37bc830e","line":48,"updated":"2023-02-18 03:50:11.000000000","message":"Just to be clear: you are proposing that a \"VM context\" is an `enum` with four variants (below), and whereas before we had a stack of callframes, after this proposal we will have a stack of VM contexts.  Have I understood correctly?","commit_id":"bfe6cace5ed1565794801ef3d3bfffaffb360330"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"aa0f289282ba4b58ebece54ae3c7927ec8a84271","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"We achieve this by replacing the current concept of call frames with a"},{"line_number":47,"context_line":"\"VM context\" (naming tbd), which can represent multiple different"},{"line_number":48,"context_line":"states of the VM:"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"1. Tvix code execution, equivalent to what is currently a call frame,"},{"line_number":51,"context_line":"   executing bytecode until the instruction pointer reaches the end of"}],"source_content_type":"text/x-markdown","patch_set":3,"id":"ffc0863c_b7b69a09","line":48,"in_reply_to":"23464142_37bc830e","updated":"2023-02-18 11:22:28.000000000","message":"Yes, correct!\n\nYou can see the (very wild) draft implementation in cl/8104\n\nThis change is extremely invasive, so I\u0027m not yet sure how to chunk it up outside of a monster-CL, but first I want to get everything to work then worry about that.","commit_id":"bfe6cace5ed1565794801ef3d3bfffaffb360330"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"4728f31399cd0babd799d6a18bff407219d82ba4","unresolved":true,"context_lines":[{"line_number":55,"context_line":"   trampolining logic."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"3. Waiting for the result of a trampoline, to ensure that in case of"},{"line_number":58,"context_line":"   nested thunks all representations are correctly transformed."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"4. Trampolining the execution of a builtin. This is not in scope for"},{"line_number":61,"context_line":"   the initial implementation, but it should be conceptually possible."}],"source_content_type":"text/x-markdown","patch_set":3,"id":"33df7971_d98f2007","line":58,"updated":"2023-02-18 03:50:11.000000000","message":"I\u0027m not totally clear on the distinction between 2 and 3... could you give a short 1-2 sentence sketch of an example of each of them?","commit_id":"bfe6cace5ed1565794801ef3d3bfffaffb360330"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"aa0f289282ba4b58ebece54ae3c7927ec8a84271","unresolved":false,"context_lines":[{"line_number":55,"context_line":"   trampolining logic."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"3. Waiting for the result of a trampoline, to ensure that in case of"},{"line_number":58,"context_line":"   nested thunks all representations are correctly transformed."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"4. Trampolining the execution of a builtin. This is not in scope for"},{"line_number":61,"context_line":"   the initial implementation, but it should be conceptually possible."}],"source_content_type":"text/x-markdown","patch_set":3,"id":"32288f30_0fe46c5e","line":58,"in_reply_to":"33df7971_d98f2007","updated":"2023-02-18 11:22:28.000000000","message":"Sure, updated in cl/8132","commit_id":"bfe6cace5ed1565794801ef3d3bfffaffb360330"}]}
