)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":62,"id":"2e7d7865_56dcd1d9","updated":"2023-03-05 13:19:55.000000000","message":"This is a big piece, I think I will do a second read a bit later because it takes time to understand as I don\u0027t have full context on the previous version.","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8fb17dca75ceaa0f3cf4d3b57aaa11b2f628e8cd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":66,"id":"6d429bbf_199ccdc4","updated":"2023-03-08 20:13:51.000000000","message":"I will do the 2nd read review before the end of the week ideally. I would appreciate having someone more expert on the codebase checking. :)","commit_id":"17ba89dad7b76f58e92851022bf9d6143dbce8c3"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"ff3cd0ebd923e23807b0eae22f069e80e27a7c27","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":66,"id":"81ac824e_b97e79f7","in_reply_to":"6d429bbf_199ccdc4","updated":"2023-03-08 21:07:40.000000000","message":"Thanks! I think amjoseph is also gonna do a review, but unless grfn shows up the chances of someone more experienced doing a review is very slim :p\n\nI think if I get 2 +1s, I\u0027ll count it as a +2 and move on with it. Things are always fixable later and I\u0027ve already gotten a lot of good feedback on this!","commit_id":"17ba89dad7b76f58e92851022bf9d6143dbce8c3"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"e95f6c86357eaf9e1b58ac1364dc57d95fcd5467","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":67,"id":"404f0541_69781188","updated":"2023-03-10 11:57:54.000000000","message":"I split out some of the logic into separate CLs, it\u0027s not much overall in the number of lines but might help with digesting it.","commit_id":"799ef5ae4479b18e6b749030606b0e8d41c0dfb2"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"f020d32e13a3afdaf5b1b5b12c49e8425eca5c82","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":70,"id":"9c522788_96e1f4f6","updated":"2023-03-13 14:30:26.000000000","message":"`\u0026mut VM` is dead!  Long live `GenCo`!  Or something.\n\nI shed a tear for our beloved clean simple interpreter; it was much beloved.\n\nBut seriously, `async` builtins are the only way forward until Rust gets `musttail`.\n\nMy objections to the asyncification of non-builtin stuff can be dealt with in follow-up CLs (see also cl/8288, cl/8289, cl/8290).  The current situation where everybody is working off of this ridiculously-long, ridiculously-old unmerged branch needs to end.","commit_id":"6d269b2ef08f5f82b8573f9a31a40cfeec2c1659"}],"tvix/cli/src/derivation.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":true,"context_lines":[{"line_number":163,"context_line":"        \"args\" \u003d\u003e {"},{"line_number":164,"context_line":"            let args \u003d value.to_list()?;"},{"line_number":165,"context_line":"            for arg in args {"},{"line_number":166,"context_line":"                drv.arguments.push(strong_coerce_to_string(co, arg).await?);"},{"line_number":167,"context_line":"            }"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"            // The arguments do not appear in the environment."}],"source_content_type":"text/x-rustsrc","patch_set":60,"id":"e6facea2_a8a22168","line":166,"updated":"2023-03-05 13:19:55.000000000","message":"We seem to be losing a trace string, right? Shouldn\u0027t we get it back?","commit_id":"2fa82ef9310543f585c7b8bb3443ad443bc46303"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"54024cf28518e9a96ff0aa61734d87d15e9ea50b","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        \"args\" \u003d\u003e {"},{"line_number":164,"context_line":"            let args \u003d value.to_list()?;"},{"line_number":165,"context_line":"            for arg in args {"},{"line_number":166,"context_line":"                drv.arguments.push(strong_coerce_to_string(co, arg).await?);"},{"line_number":167,"context_line":"            }"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"            // The arguments do not appear in the environment."}],"source_content_type":"text/x-rustsrc","patch_set":60,"id":"890559b3_ec1d6257","line":166,"in_reply_to":"e6facea2_a8a22168","updated":"2023-03-07 11:06:18.000000000","message":"Added a part about this to the commit message after our IRC discussion.","commit_id":"2fa82ef9310543f585c7b8bb3443ad443bc46303"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":true,"context_lines":[{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        // Configure fixed-output derivations if required."},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"        async fn select_string("},{"line_number":257,"context_line":"            co: \u0026GenCo,"},{"line_number":258,"context_line":"            attrs: \u0026NixAttrs,"},{"line_number":259,"context_line":"            key: \u0026str,"}],"source_content_type":"text/x-rustsrc","patch_set":60,"id":"1f914506_3796cb30","line":256,"updated":"2023-03-05 13:19:55.000000000","message":"nit: I would have this as some sort of inline function rather than a whole function, but premature optimization might be the good answer to my comment","commit_id":"2fa82ef9310543f585c7b8bb3443ad443bc46303"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":true,"context_lines":[{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        // Configure fixed-output derivations if required."},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"        async fn select_string("},{"line_number":257,"context_line":"            co: \u0026GenCo,"},{"line_number":258,"context_line":"            attrs: \u0026NixAttrs,"},{"line_number":259,"context_line":"            key: \u0026str,"}],"source_content_type":"text/x-rustsrc","patch_set":60,"id":"b88dcc3b_4d2efa39","line":256,"updated":"2023-03-05 13:19:55.000000000","message":"nit: also, seems to be a useful utility in general","commit_id":"2fa82ef9310543f585c7b8bb3443ad443bc46303"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"f1db000f60b8a5832c96160e8e5638fd247c31af","unresolved":false,"context_lines":[{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        // Configure fixed-output derivations if required."},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"        async fn select_string("},{"line_number":257,"context_line":"            co: \u0026GenCo,"},{"line_number":258,"context_line":"            attrs: \u0026NixAttrs,"},{"line_number":259,"context_line":"            key: \u0026str,"}],"source_content_type":"text/x-rustsrc","patch_set":60,"id":"403a09d2_4d1dca12","line":256,"in_reply_to":"1f914506_3796cb30","updated":"2023-03-06 11:04:35.000000000","message":"async lambdas are unstable unfortunately, there\u0027s a crate that does them through a macro by generating some complex trait structure, but then I think it\u0027s more reasonable to just give a name to a function","commit_id":"2fa82ef9310543f585c7b8bb3443ad443bc46303"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"54024cf28518e9a96ff0aa61734d87d15e9ea50b","unresolved":false,"context_lines":[{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        // Configure fixed-output derivations if required."},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"        async fn select_string("},{"line_number":257,"context_line":"            co: \u0026GenCo,"},{"line_number":258,"context_line":"            attrs: \u0026NixAttrs,"},{"line_number":259,"context_line":"            key: \u0026str,"}],"source_content_type":"text/x-rustsrc","patch_set":60,"id":"70bce92e_ab7dca29","line":256,"in_reply_to":"b88dcc3b_4d2efa39","updated":"2023-03-07 11:06:18.000000000","message":"Ack","commit_id":"2fa82ef9310543f585c7b8bb3443ad443bc46303"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"49aa2747e0608074b7dbf5aa5d73f63d04804461","unresolved":false,"context_lines":[{"line_number":422,"context_line":""},{"line_number":423,"context_line":"pub use derivation_builtins::builtins as derivation_builtins;"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"#[cfg(test)]"},{"line_number":426,"context_line":"mod tests {"},{"line_number":427,"context_line":"    use super::*;"},{"line_number":428,"context_line":"    use tvix_eval::observer::NoOpObserver;"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"2b57e975_95362c65","line":425,"range":{"start_line":425,"start_character":0,"end_line":425,"end_character":12},"updated":"2023-03-06 13:57:12.000000000","message":"Note on these: We don\u0027t have test scaffolding for running these kinds of tests in generators at the moment.","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"ad3aa52dac2860a13daf969cdb1ed84090aca554","unresolved":true,"context_lines":[{"line_number":422,"context_line":""},{"line_number":423,"context_line":"pub use derivation_builtins::builtins as derivation_builtins;"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"#[cfg(test)]"},{"line_number":426,"context_line":"mod tests {"},{"line_number":427,"context_line":"    use super::*;"},{"line_number":428,"context_line":"    use tvix_eval::observer::NoOpObserver;"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"9fa64235_5a35730c","line":425,"range":{"start_line":425,"start_character":0,"end_line":425,"end_character":12},"in_reply_to":"2b57e975_95362c65","updated":"2023-03-06 14:31:36.000000000","message":"it\u0027s making me sad. Can we at least add a TODO comment with some details next to the big commented-out block?","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"54024cf28518e9a96ff0aa61734d87d15e9ea50b","unresolved":false,"context_lines":[{"line_number":422,"context_line":""},{"line_number":423,"context_line":"pub use derivation_builtins::builtins as derivation_builtins;"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"#[cfg(test)]"},{"line_number":426,"context_line":"mod tests {"},{"line_number":427,"context_line":"    use super::*;"},{"line_number":428,"context_line":"    use tvix_eval::observer::NoOpObserver;"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"4f41f25b_47a4314a","line":425,"range":{"start_line":425,"start_character":0,"end_line":425,"end_character":12},"in_reply_to":"9fa64235_5a35730c","updated":"2023-03-07 11:06:18.000000000","message":"Done","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"}],"tvix/eval/builtin-macros/src/lib.rs":[{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"f020d32e13a3afdaf5b1b5b12c49e8425eca5c82","unresolved":true,"context_lines":[{"line_number":129,"context_line":"///     // argument with the `#[lazy]` attribute"},{"line_number":130,"context_line":"///"},{"line_number":131,"context_line":"///     #[builtin(\"tryEval\")]"},{"line_number":132,"context_line":"///     pub async fn builtin_try_eval(vm: \u0026mut VM, #[lazy] x: Value) -\u003e Result\u003cValue, ErrorKind\u003e {"},{"line_number":133,"context_line":"///         todo!()"},{"line_number":134,"context_line":"///     }"},{"line_number":135,"context_line":"/// }"}],"source_content_type":"text/x-rustsrc","patch_set":70,"id":"3fc71be6_13f2e6fb","line":132,"updated":"2023-03-13 14:30:26.000000000","message":"I think the `vm: \u0026mut VM` shouldn\u0027t be there...","commit_id":"6d269b2ef08f5f82b8573f9a31a40cfeec2c1659"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"e65ce41f4b480f4997023104070b02740fcac973","unresolved":false,"context_lines":[{"line_number":129,"context_line":"///     // argument with the `#[lazy]` attribute"},{"line_number":130,"context_line":"///"},{"line_number":131,"context_line":"///     #[builtin(\"tryEval\")]"},{"line_number":132,"context_line":"///     pub async fn builtin_try_eval(vm: \u0026mut VM, #[lazy] x: Value) -\u003e Result\u003cValue, ErrorKind\u003e {"},{"line_number":133,"context_line":"///         todo!()"},{"line_number":134,"context_line":"///     }"},{"line_number":135,"context_line":"/// }"}],"source_content_type":"text/x-rustsrc","patch_set":70,"id":"f1ff84e3_694f2296","line":132,"in_reply_to":"3fc71be6_13f2e6fb","updated":"2023-03-13 20:14:49.000000000","message":"Done","commit_id":"6d269b2ef08f5f82b8573f9a31a40cfeec2c1659"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"f020d32e13a3afdaf5b1b5b12c49e8425eca5c82","unresolved":true,"context_lines":[{"line_number":135,"context_line":"/// }"},{"line_number":136,"context_line":"/// ```"},{"line_number":137,"context_line":"#[proc_macro_attribute]"},{"line_number":138,"context_line":"pub fn builtins(args: TokenStream, item: TokenStream) -\u003e TokenStream {"},{"line_number":139,"context_line":"    let mut module \u003d parse_macro_input!(item as ItemMod);"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    // parse the optional state type, which users might want to pass to builtins"}],"source_content_type":"text/x-rustsrc","patch_set":70,"id":"e3370259_42db2788","line":138,"updated":"2023-03-13 14:30:26.000000000","message":"I wish the comment for this function explained the transformation it does to the function\u0027s type.","commit_id":"6d269b2ef08f5f82b8573f9a31a40cfeec2c1659"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"e65ce41f4b480f4997023104070b02740fcac973","unresolved":false,"context_lines":[{"line_number":135,"context_line":"/// }"},{"line_number":136,"context_line":"/// ```"},{"line_number":137,"context_line":"#[proc_macro_attribute]"},{"line_number":138,"context_line":"pub fn builtins(args: TokenStream, item: TokenStream) -\u003e TokenStream {"},{"line_number":139,"context_line":"    let mut module \u003d parse_macro_input!(item as ItemMod);"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    // parse the optional state type, which users might want to pass to builtins"}],"source_content_type":"text/x-rustsrc","patch_set":70,"id":"3a724539_3268ac70","line":138,"in_reply_to":"e3370259_42db2788","updated":"2023-03-13 20:14:49.000000000","message":"Done","commit_id":"6d269b2ef08f5f82b8573f9a31a40cfeec2c1659"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"f020d32e13a3afdaf5b1b5b12c49e8425eca5c82","unresolved":true,"context_lines":[{"line_number":286,"context_line":"                    None \u003d\u003e quote!(None),"},{"line_number":287,"context_line":"                };"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"                if captures_state {"},{"line_number":290,"context_line":"                    builtins.push(quote_spanned! { builtin_attr.span() \u003d\u003e {"},{"line_number":291,"context_line":"                        let inner_state \u003d state.clone();"},{"line_number":292,"context_line":"                        crate::Builtin::new("},{"line_number":293,"context_line":"                            #name,"},{"line_number":294,"context_line":"                            #docstring,"},{"line_number":295,"context_line":"                            #arg_count,"},{"line_number":296,"context_line":"                            move |values| Gen::new(|co| generators::pin_generator(#fn_name(inner_state.clone(), co, values))),"},{"line_number":297,"context_line":"                        )"},{"line_number":298,"context_line":"                    }});"},{"line_number":299,"context_line":"                } else {"},{"line_number":300,"context_line":"                    builtins.push(quote_spanned! { builtin_attr.span() \u003d\u003e {"},{"line_number":301,"context_line":"                        crate::Builtin::new("}],"source_content_type":"text/x-rustsrc","patch_set":70,"id":"5c230bc3_9cc09f86","line":298,"range":{"start_line":289,"start_character":16,"end_line":298,"end_character":24},"updated":"2023-03-13 14:30:26.000000000","message":"I think this entire branch is deadcode.  I tried inserting a `panic!()` here and the tests still passed.","commit_id":"6d269b2ef08f5f82b8573f9a31a40cfeec2c1659"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"e65ce41f4b480f4997023104070b02740fcac973","unresolved":false,"context_lines":[{"line_number":286,"context_line":"                    None \u003d\u003e quote!(None),"},{"line_number":287,"context_line":"                };"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"                if captures_state {"},{"line_number":290,"context_line":"                    builtins.push(quote_spanned! { builtin_attr.span() \u003d\u003e {"},{"line_number":291,"context_line":"                        let inner_state \u003d state.clone();"},{"line_number":292,"context_line":"                        crate::Builtin::new("},{"line_number":293,"context_line":"                            #name,"},{"line_number":294,"context_line":"                            #docstring,"},{"line_number":295,"context_line":"                            #arg_count,"},{"line_number":296,"context_line":"                            move |values| Gen::new(|co| generators::pin_generator(#fn_name(inner_state.clone(), co, values))),"},{"line_number":297,"context_line":"                        )"},{"line_number":298,"context_line":"                    }});"},{"line_number":299,"context_line":"                } else {"},{"line_number":300,"context_line":"                    builtins.push(quote_spanned! { builtin_attr.span() \u003d\u003e {"},{"line_number":301,"context_line":"                        crate::Builtin::new("}],"source_content_type":"text/x-rustsrc","patch_set":70,"id":"fd824ae2_b8f16f68","line":298,"range":{"start_line":289,"start_character":16,"end_line":298,"end_character":24},"in_reply_to":"5c230bc3_9cc09f86","updated":"2023-03-13 20:14:49.000000000","message":"This is only used in //tvix/cli at the moment, but I\u0027m making a TODO to add a test in //tvix/eval.","commit_id":"6d269b2ef08f5f82b8573f9a31a40cfeec2c1659"}],"tvix/eval/src/compiler/import.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":true,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    // TODO: emit not just the warning kind, hmm"},{"line_number":81,"context_line":"    // for warning in result.warnings {"},{"line_number":82,"context_line":"    //     vm.push_warning(warning);"},{"line_number":83,"context_line":"    // }"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    // Compilation succeeded, we can construct a thunk from whatever it spat"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"fe77e87a_857731f7","line":82,"updated":"2023-03-05 13:19:55.000000000","message":"Why it is not enough to use the generators to emit warnings?","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"2b0e6452c2740f82fdf5a0639da618f3693b48f0","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    // TODO: emit not just the warning kind, hmm"},{"line_number":81,"context_line":"    // for warning in result.warnings {"},{"line_number":82,"context_line":"    //     vm.push_warning(warning);"},{"line_number":83,"context_line":"    // }"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    // Compilation succeeded, we can construct a thunk from whatever it spat"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"df5572f5_daea4bdf","line":82,"in_reply_to":"ba476239_edf6fb48","updated":"2023-03-06 14:32:23.000000000","message":"Done in cl/8224","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"550e88fed812f8ef312ea6153612ad76d087ed3c","unresolved":true,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    // TODO: emit not just the warning kind, hmm"},{"line_number":81,"context_line":"    // for warning in result.warnings {"},{"line_number":82,"context_line":"    //     vm.push_warning(warning);"},{"line_number":83,"context_line":"    // }"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    // Compilation succeeded, we can construct a thunk from whatever it spat"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"ba476239_edf6fb48","line":82,"in_reply_to":"fe77e87a_857731f7","updated":"2023-03-06 11:03:15.000000000","message":"The current interface only exposes a WarningKind API, which is then surfaced at the span of the generator, but here we need to emit full warnings (as they come from import and have their own spans already).\n\nThis is pretty trivially doable, I just haven\u0027t done it yet.","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"}],"tvix/eval/src/observer.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":true,"context_lines":[{"line_number":237,"context_line":"            frame_at"},{"line_number":238,"context_line":"        );"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"        for val in stack {"},{"line_number":241,"context_line":"            let _ \u003d write!(\u0026mut self.writer, \"{} \", val);"},{"line_number":242,"context_line":"        }"},{"line_number":243,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"b96f05f2_87f416b1","line":240,"updated":"2023-03-05 13:19:55.000000000","message":"nit: it seems highly redundant and could be the nice target of a simple macro","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"2b0e6452c2740f82fdf5a0639da618f3693b48f0","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            frame_at"},{"line_number":238,"context_line":"        );"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"        for val in stack {"},{"line_number":241,"context_line":"            let _ \u003d write!(\u0026mut self.writer, \"{} \", val);"},{"line_number":242,"context_line":"        }"},{"line_number":243,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"5d247769_ebd5a095","line":240,"in_reply_to":"b96f05f2_87f416b1","updated":"2023-03-06 14:32:23.000000000","message":"That happens in cl/8199, but without a macro.","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"}],"tvix/eval/src/tests/mod.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":true,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    #[builtin(\"derivation\")]"},{"line_number":18,"context_line":"    async fn builtin_derivation(co: GenCo, input: Value) -\u003e Result\u003cValue, ErrorKind\u003e {"},{"line_number":19,"context_line":"        let input \u003d input.to_attrs()?;"},{"line_number":20,"context_line":"        let attrs \u003d input.update(NixAttrs::from_iter("},{"line_number":21,"context_line":"            ["},{"line_number":22,"context_line":"                ("}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"daeb2590_0e5d6a3c","line":19,"updated":"2023-03-05 13:19:55.000000000","message":"We have lost the VM warning here","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"2b0e6452c2740f82fdf5a0639da618f3693b48f0","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    #[builtin(\"derivation\")]"},{"line_number":18,"context_line":"    async fn builtin_derivation(co: GenCo, input: Value) -\u003e Result\u003cValue, ErrorKind\u003e {"},{"line_number":19,"context_line":"        let input \u003d input.to_attrs()?;"},{"line_number":20,"context_line":"        let attrs \u003d input.update(NixAttrs::from_iter("},{"line_number":21,"context_line":"            ["},{"line_number":22,"context_line":"                ("}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"9b7b2bc2_8d587b8a","line":19,"in_reply_to":"daeb2590_0e5d6a3c","updated":"2023-03-06 14:32:23.000000000","message":"I think the warning was only there because we copied that from the placeholder builtins module when builtins.derivation was actually implemented (in //tvix/cli).\n\nAs this is a mock for a test, no warning needs to be emitted here anymore.","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"}],"tvix/eval/src/value/builtin.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":true,"context_lines":[{"line_number":104,"context_line":"    /// Attempt to call a builtin, which will produce a generator if it is fully"},{"line_number":105,"context_line":"    /// applied or return the builtin if it is partially applied."},{"line_number":106,"context_line":"    pub fn call(self) -\u003e BuiltinResult {"},{"line_number":107,"context_line":"        if self.0.partials.len() \u003d\u003d self.0.arg_count {"},{"line_number":108,"context_line":"            return BuiltinResult::Called((self.0.func)(self.0.partials));"},{"line_number":109,"context_line":"        }"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"e1e8551a_1269acbd","line":107,"updated":"2023-03-05 13:19:55.000000000","message":"nit: this is a exhaustive branch, `if/else` without any `return` is cleaner IMHO","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"2b0e6452c2740f82fdf5a0639da618f3693b48f0","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    /// Attempt to call a builtin, which will produce a generator if it is fully"},{"line_number":105,"context_line":"    /// applied or return the builtin if it is partially applied."},{"line_number":106,"context_line":"    pub fn call(self) -\u003e BuiltinResult {"},{"line_number":107,"context_line":"        if self.0.partials.len() \u003d\u003d self.0.arg_count {"},{"line_number":108,"context_line":"            return BuiltinResult::Called((self.0.func)(self.0.partials));"},{"line_number":109,"context_line":"        }"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"bf1c9900_bd21786a","line":107,"in_reply_to":"e1e8551a_1269acbd","updated":"2023-03-06 14:32:23.000000000","message":"Done","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"}],"tvix/eval/src/value/list.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":true,"context_lines":[{"line_number":86,"context_line":"    /// algorithm is constrained by the comparator in Nix not being able to"},{"line_number":87,"context_line":"    /// yield equality, and us being unable to use the standard library"},{"line_number":88,"context_line":"    /// implementation of sorting (which is a lot longer, but a lot more"},{"line_number":89,"context_line":"    /// efficient) here."},{"line_number":90,"context_line":"    pub async fn sort_by(\u0026mut self, co: \u0026GenCo, cmp: Value) -\u003e Result\u003c(), ErrorKind\u003e {"},{"line_number":91,"context_line":"        let mut len \u003d self.len();"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"bfb0e417_11143a9f","line":89,"updated":"2023-03-05 13:19:55.000000000","message":"I think you are talking about timsort, this comment miss that because of the way comparators are and the requirement of having \"reproducible results\", we need a *stable* sort right? I have to mention that merge sort is a stable sort and have O(n log n) worst case performance in time. It is also not that complicated to implement, albeit iteratively it can be a bit annoying because Rust (?).","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"54024cf28518e9a96ff0aa61734d87d15e9ea50b","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    /// algorithm is constrained by the comparator in Nix not being able to"},{"line_number":87,"context_line":"    /// yield equality, and us being unable to use the standard library"},{"line_number":88,"context_line":"    /// implementation of sorting (which is a lot longer, but a lot more"},{"line_number":89,"context_line":"    /// efficient) here."},{"line_number":90,"context_line":"    pub async fn sort_by(\u0026mut self, co: \u0026GenCo, cmp: Value) -\u003e Result\u003c(), ErrorKind\u003e {"},{"line_number":91,"context_line":"        let mut len \u003d self.len();"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"c9dd1325_e746915d","line":89,"in_reply_to":"4208b911_90b43a8c","updated":"2023-03-07 11:06:18.000000000","message":"Either way, a different algorithm (if someone comes up with one), can be implemented in a subsequent CL.","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"550e88fed812f8ef312ea6153612ad76d087ed3c","unresolved":true,"context_lines":[{"line_number":86,"context_line":"    /// algorithm is constrained by the comparator in Nix not being able to"},{"line_number":87,"context_line":"    /// yield equality, and us being unable to use the standard library"},{"line_number":88,"context_line":"    /// implementation of sorting (which is a lot longer, but a lot more"},{"line_number":89,"context_line":"    /// efficient) here."},{"line_number":90,"context_line":"    pub async fn sort_by(\u0026mut self, co: \u0026GenCo, cmp: Value) -\u003e Result\u003c(), ErrorKind\u003e {"},{"line_number":91,"context_line":"        let mut len \u003d self.len();"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"4208b911_90b43a8c","line":89,"in_reply_to":"bfb0e417_11143a9f","updated":"2023-03-06 11:03:15.000000000","message":"I actually did try a bunch of different ways to implement merge sort, but always ran into list length determining a split point where the comparator\u0027s inability to yield \"equality\" meant that whatever ended up in one side (depending on the comparator) was going to be first.\n\nsterni suggested that it might be possible to write an implementation where we use the same comparator twice in both directions to determine equality, but I think that\u0027d be a lot more expensive because of how much overhead the comparator calls involve (a whole generator frame run)","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"}],"tvix/eval/src/value/mod.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":true,"context_lines":[{"line_number":255,"context_line":"            // sequences without NUL bytes, whereas Tvix only allows valid"},{"line_number":256,"context_line":"            // Unicode. See also b/189."},{"line_number":257,"context_line":"            (Value::Path(p), _) \u003d\u003e {"},{"line_number":258,"context_line":"                // TODO(tazjin): there are cases where coerce_to_string does not import"},{"line_number":259,"context_line":"                let imported \u003d generators::request_path_import(\u0026co, p).await;"},{"line_number":260,"context_line":"                Ok(imported.to_string_lossy().into_owned().into())"},{"line_number":261,"context_line":"            }"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"483b63f0_b22a293a","line":258,"updated":"2023-03-05 13:19:55.000000000","message":"which ones? (if you can provide any example in the comment)","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"4d2330f0b6fc8e4e1505e7e5d69ecba452ee7be8","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            // sequences without NUL bytes, whereas Tvix only allows valid"},{"line_number":256,"context_line":"            // Unicode. See also b/189."},{"line_number":257,"context_line":"            (Value::Path(p), _) \u003d\u003e {"},{"line_number":258,"context_line":"                // TODO(tazjin): there are cases where coerce_to_string does not import"},{"line_number":259,"context_line":"                let imported \u003d generators::request_path_import(\u0026co, p).await;"},{"line_number":260,"context_line":"                Ok(imported.to_string_lossy().into_owned().into())"},{"line_number":261,"context_line":"            }"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"91a10c9b_95d12599","line":258,"in_reply_to":"483b63f0_b22a293a","updated":"2023-03-06 14:54:57.000000000","message":"In short, we don\u0027t know yet: b/256\n\nSomebody will have to go and read all the invocations of string coercions in cppnix and figure it out :/","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":true,"context_lines":[{"line_number":322,"context_line":"                Ok(Value::String(out.into()))"},{"line_number":323,"context_line":"            }"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"            (Value::Thunk(_), _) \u003d\u003e unreachable!(),"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"            val @ (Value::Closure(_), _)"},{"line_number":328,"context_line":"            | val @ (Value::Builtin(_), _)"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"af113443_430f393a","line":325,"updated":"2023-03-05 13:19:55.000000000","message":"rather than unreachable!, it seems also a tvix_bug!(\"value has not been forced\") right?","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"4d2330f0b6fc8e4e1505e7e5d69ecba452ee7be8","unresolved":false,"context_lines":[{"line_number":322,"context_line":"                Ok(Value::String(out.into()))"},{"line_number":323,"context_line":"            }"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"            (Value::Thunk(_), _) \u003d\u003e unreachable!(),"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"            val @ (Value::Closure(_), _)"},{"line_number":328,"context_line":"            | val @ (Value::Builtin(_), _)"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"ad997e9e_45eb7586","line":325,"in_reply_to":"af113443_430f393a","updated":"2023-03-06 14:54:57.000000000","message":"Done","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"}],"tvix/eval/src/value/thunk.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":true,"context_lines":[{"line_number":381,"context_line":"    /// Returns true if forcing this thunk will not change it."},{"line_number":382,"context_line":"    pub fn is_forced(\u0026self) -\u003e bool {"},{"line_number":383,"context_line":"        match *self.0.borrow() {"},{"line_number":384,"context_line":"            ThunkRepr::Blackhole \u003d\u003e panic!(\"is_forced() called on a blackholed thunk\"),"},{"line_number":385,"context_line":"            ThunkRepr::Evaluated(Value::Thunk(_)) \u003d\u003e false,"},{"line_number":386,"context_line":"            ThunkRepr::Evaluated(_) \u003d\u003e true,"},{"line_number":387,"context_line":"            _ \u003d\u003e false,"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"71c533eb_490d72bf","side":"PARENT","line":384,"updated":"2023-03-05 13:19:55.000000000","message":"this seems to be still a tvix_bug! if we call is_forced on a blackholed thunk?","commit_id":"269a081845fceb560630c2df1cb5adf7f98e609e"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"4d2330f0b6fc8e4e1505e7e5d69ecba452ee7be8","unresolved":false,"context_lines":[{"line_number":381,"context_line":"    /// Returns true if forcing this thunk will not change it."},{"line_number":382,"context_line":"    pub fn is_forced(\u0026self) -\u003e bool {"},{"line_number":383,"context_line":"        match *self.0.borrow() {"},{"line_number":384,"context_line":"            ThunkRepr::Blackhole \u003d\u003e panic!(\"is_forced() called on a blackholed thunk\"),"},{"line_number":385,"context_line":"            ThunkRepr::Evaluated(Value::Thunk(_)) \u003d\u003e false,"},{"line_number":386,"context_line":"            ThunkRepr::Evaluated(_) \u003d\u003e true,"},{"line_number":387,"context_line":"            _ \u003d\u003e false,"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"5a12ed43_7c58ba52","side":"PARENT","line":384,"in_reply_to":"71c533eb_490d72bf","updated":"2023-03-06 14:54:57.000000000","message":"No, this should fail as when we enter a thunk this function is used to determine whether the thunk representation can already be replaced with the evaluated value.\n\nThe branch that emits a correct infinite recursion error occurs after this check.","commit_id":"269a081845fceb560630c2df1cb5adf7f98e609e"}],"tvix/eval/src/vm/generators.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":true,"context_lines":[{"line_number":421,"context_line":"                            self.try_eval_frames.push(frame_id);"},{"line_number":422,"context_line":"                            self.reenqueue_generator(span.clone(), generator);"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"                            debug_assert!("},{"line_number":425,"context_line":"                                self.frames.len() \u003d\u003d frame_id + 1,"},{"line_number":426,"context_line":"                                \"generator should be reenqueued with the same frame ID\""},{"line_number":427,"context_line":"                            );"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"606a7997_24fd8965","line":424,"updated":"2023-03-05 13:19:55.000000000","message":"shouldn\u0027t this debug_assert happening just after any call to re-enqueuing the generator?","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"54024cf28518e9a96ff0aa61734d87d15e9ea50b","unresolved":false,"context_lines":[{"line_number":421,"context_line":"                            self.try_eval_frames.push(frame_id);"},{"line_number":422,"context_line":"                            self.reenqueue_generator(span.clone(), generator);"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"                            debug_assert!("},{"line_number":425,"context_line":"                                self.frames.len() \u003d\u003d frame_id + 1,"},{"line_number":426,"context_line":"                                \"generator should be reenqueued with the same frame ID\""},{"line_number":427,"context_line":"                            );"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"61dec8c4_af5ae796","line":424,"in_reply_to":"606a7997_24fd8965","updated":"2023-03-07 11:06:18.000000000","message":"Hm, we might want to add it into reenqueue_generator, but then that needs to know the frame ID, too. I\u0027ll experiment on top of the chain.","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"f020d32e13a3afdaf5b1b5b12c49e8425eca5c82","unresolved":true,"context_lines":[{"line_number":213,"context_line":"impl\u003c\u0027o\u003e VM\u003c\u0027o\u003e {"},{"line_number":214,"context_line":"    /// Helper function to re-enqueue the current generator while it"},{"line_number":215,"context_line":"    /// is awaiting a value."},{"line_number":216,"context_line":"    fn reenqueue_generator(\u0026mut self, span: LightSpan, generator: Generator) {"},{"line_number":217,"context_line":"        self.frames.push(Frame::Generator {"},{"line_number":218,"context_line":"            generator,"},{"line_number":219,"context_line":"            span,"}],"source_content_type":"text/x-rustsrc","patch_set":70,"id":"da179c86_3f9936fc","line":216,"updated":"2023-03-13 14:30:26.000000000","message":"I have a branch that simply leaves the generator on the stack instead of doing this pop-it-and-then-push-it-back dance.  I\u0027ll submit it separately.","commit_id":"6d269b2ef08f5f82b8573f9a31a40cfeec2c1659"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"e65ce41f4b480f4997023104070b02740fcac973","unresolved":false,"context_lines":[{"line_number":213,"context_line":"impl\u003c\u0027o\u003e VM\u003c\u0027o\u003e {"},{"line_number":214,"context_line":"    /// Helper function to re-enqueue the current generator while it"},{"line_number":215,"context_line":"    /// is awaiting a value."},{"line_number":216,"context_line":"    fn reenqueue_generator(\u0026mut self, span: LightSpan, generator: Generator) {"},{"line_number":217,"context_line":"        self.frames.push(Frame::Generator {"},{"line_number":218,"context_line":"            generator,"},{"line_number":219,"context_line":"            span,"}],"source_content_type":"text/x-rustsrc","patch_set":70,"id":"4e9a0163_6b1d9f9c","line":216,"in_reply_to":"da179c86_3f9936fc","updated":"2023-03-13 20:14:49.000000000","message":"Ack","commit_id":"6d269b2ef08f5f82b8573f9a31a40cfeec2c1659"}],"tvix/eval/src/vm/macros.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":true,"context_lines":[{"line_number":1,"context_line":"#[macro_export]"},{"line_number":2,"context_line":"macro_rules! arithmetic_op {"},{"line_number":3,"context_line":"    ( $self:ident, $op:tt ) \u003d\u003e {{ // TODO: remove"},{"line_number":4,"context_line":"        let b \u003d $self.pop();"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"729b1310_d2fdb5da","line":1,"updated":"2023-03-05 13:19:55.000000000","message":"This file should have a little docstring at the start to explain what this is about or what is used for","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"54024cf28518e9a96ff0aa61734d87d15e9ea50b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#[macro_export]"},{"line_number":2,"context_line":"macro_rules! arithmetic_op {"},{"line_number":3,"context_line":"    ( $self:ident, $op:tt ) \u003d\u003e {{ // TODO: remove"},{"line_number":4,"context_line":"        let b \u003d $self.pop();"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"8234403d_71de8789","line":1,"in_reply_to":"729b1310_d2fdb5da","updated":"2023-03-07 11:06:18.000000000","message":"Done","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"}],"tvix/eval/src/vm/mod.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":true,"context_lines":[{"line_number":258,"context_line":"    /// Run the VM\u0027s primary (outer) execution loop, continuing execution based"},{"line_number":259,"context_line":"    /// on the current frame at the top of the frame stack."},{"line_number":260,"context_line":"    fn execute(mut self) -\u003e EvalResult\u003cRuntimeResult\u003e {"},{"line_number":261,"context_line":"        let mut catchable_error_occured \u003d false;"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        while let Some(frame) \u003d self.frames.pop() {"},{"line_number":264,"context_line":"            self.reasonable_span \u003d frame.span();"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"61865ade_8230946e","line":261,"updated":"2023-03-05 13:19:55.000000000","message":"occurred*","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"54024cf28518e9a96ff0aa61734d87d15e9ea50b","unresolved":false,"context_lines":[{"line_number":258,"context_line":"    /// Run the VM\u0027s primary (outer) execution loop, continuing execution based"},{"line_number":259,"context_line":"    /// on the current frame at the top of the frame stack."},{"line_number":260,"context_line":"    fn execute(mut self) -\u003e EvalResult\u003cRuntimeResult\u003e {"},{"line_number":261,"context_line":"        let mut catchable_error_occured \u003d false;"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        while let Some(frame) \u003d self.frames.pop() {"},{"line_number":264,"context_line":"            self.reasonable_span \u003d frame.span();"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"742dbb35_f7095066","line":261,"in_reply_to":"61865ade_8230946e","updated":"2023-03-07 11:06:18.000000000","message":"Done","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":true,"context_lines":[{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        while let Some(frame) \u003d self.frames.pop() {"},{"line_number":264,"context_line":"            self.reasonable_span \u003d frame.span();"},{"line_number":265,"context_line":"            let frame_id \u003d self.frames.len();"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"            match frame {"},{"line_number":268,"context_line":"                Frame::CallFrame { call_frame, span } \u003d\u003e {"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"f335fd04_defc89f6","line":265,"updated":"2023-03-05 13:19:55.000000000","message":"I don\u0027t know if semantically the idea is to have frame IDs as frame indexes in the frames list or at some point opaque identifiers?","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"54024cf28518e9a96ff0aa61734d87d15e9ea50b","unresolved":false,"context_lines":[{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        while let Some(frame) \u003d self.frames.pop() {"},{"line_number":264,"context_line":"            self.reasonable_span \u003d frame.span();"},{"line_number":265,"context_line":"            let frame_id \u003d self.frames.len();"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"            match frame {"},{"line_number":268,"context_line":"                Frame::CallFrame { call_frame, span } \u003d\u003e {"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"30fbcf2a_a747657c","line":265,"in_reply_to":"f335fd04_defc89f6","updated":"2023-03-07 11:06:18.000000000","message":"They\u0027re basically only used in the debug tracer output, in which case they\u0027re always indexes in the frame list (as that helps you orient yourself in debug output about how deep inside a computation the VM is).","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":true,"context_lines":[{"line_number":264,"context_line":"            self.reasonable_span \u003d frame.span();"},{"line_number":265,"context_line":"            let frame_id \u003d self.frames.len();"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"            match frame {"},{"line_number":268,"context_line":"                Frame::CallFrame { call_frame, span } \u003d\u003e {"},{"line_number":269,"context_line":"                    self.observer"},{"line_number":270,"context_line":"                        .observe_enter_call_frame(0, \u0026call_frame.lambda, frame_id);"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"a73d69dd_889c737d","line":267,"updated":"2023-03-05 13:19:55.000000000","message":"Modulo some initialization stuff, handling a call frame or a generator is symmetric, is there any plan to factor this?","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"c97b2f2807ebeb7ae4be83eab33fc385bb186a13","unresolved":true,"context_lines":[{"line_number":264,"context_line":"            self.reasonable_span \u003d frame.span();"},{"line_number":265,"context_line":"            let frame_id \u003d self.frames.len();"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"            match frame {"},{"line_number":268,"context_line":"                Frame::CallFrame { call_frame, span } \u003d\u003e {"},{"line_number":269,"context_line":"                    self.observer"},{"line_number":270,"context_line":"                        .observe_enter_call_frame(0, \u0026call_frame.lambda, frame_id);"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"ed7407eb_898ab65c","line":267,"in_reply_to":"2c4be9d9_630d1321","updated":"2023-03-07 21:51:17.000000000","message":"The structure of the code handling a call frame or a generator frame is the same modulo some method which are different as far I see it. Is there any plan to factor the similar parts to make the difference \"more obvious\" to the reader?","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"54024cf28518e9a96ff0aa61734d87d15e9ea50b","unresolved":true,"context_lines":[{"line_number":264,"context_line":"            self.reasonable_span \u003d frame.span();"},{"line_number":265,"context_line":"            let frame_id \u003d self.frames.len();"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"            match frame {"},{"line_number":268,"context_line":"                Frame::CallFrame { call_frame, span } \u003d\u003e {"},{"line_number":269,"context_line":"                    self.observer"},{"line_number":270,"context_line":"                        .observe_enter_call_frame(0, \u0026call_frame.lambda, frame_id);"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"2c4be9d9_630d1321","line":267,"in_reply_to":"a73d69dd_889c737d","updated":"2023-03-07 11:06:18.000000000","message":"I\u0027m not sure what you mean, can you expand?","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8fb17dca75ceaa0f3cf4d3b57aaa11b2f628e8cd","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            self.reasonable_span \u003d frame.span();"},{"line_number":265,"context_line":"            let frame_id \u003d self.frames.len();"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"            match frame {"},{"line_number":268,"context_line":"                Frame::CallFrame { call_frame, span } \u003d\u003e {"},{"line_number":269,"context_line":"                    self.observer"},{"line_number":270,"context_line":"                        .observe_enter_call_frame(0, \u0026call_frame.lambda, frame_id);"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"db3ef9ec_8a09455c","line":267,"in_reply_to":"a946c1b0_627a06a7","updated":"2023-03-08 20:13:51.000000000","message":"Ack","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"4f68ada1057d0cd7679b9aa8e4053fddcc96a8f7","unresolved":true,"context_lines":[{"line_number":264,"context_line":"            self.reasonable_span \u003d frame.span();"},{"line_number":265,"context_line":"            let frame_id \u003d self.frames.len();"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"            match frame {"},{"line_number":268,"context_line":"                Frame::CallFrame { call_frame, span } \u003d\u003e {"},{"line_number":269,"context_line":"                    self.observer"},{"line_number":270,"context_line":"                        .observe_enter_call_frame(0, \u0026call_frame.lambda, frame_id);"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"a946c1b0_627a06a7","line":267,"in_reply_to":"ed7407eb_898ab65c","updated":"2023-03-07 22:04:18.000000000","message":"No concrete plan, but not opposed to it. Would rather touch that separately though.","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":true,"context_lines":[{"line_number":746,"context_line":"                    if let Some(Value::Thunk(_)) \u003d self.stack.last() {"},{"line_number":747,"context_line":"                        let thunk \u003d match self.stack_pop() {"},{"line_number":748,"context_line":"                            Value::Thunk(t) \u003d\u003e t,"},{"line_number":749,"context_line":"                            _ \u003d\u003e unreachable!(),"},{"line_number":750,"context_line":"                        };"},{"line_number":751,"context_line":""},{"line_number":752,"context_line":"                        let gen_span \u003d frame.current_light_span();"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"d3ccce04_616f2186","line":749,"updated":"2023-03-05 13:19:55.000000000","message":"panic! ?","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"4d2330f0b6fc8e4e1505e7e5d69ecba452ee7be8","unresolved":false,"context_lines":[{"line_number":746,"context_line":"                    if let Some(Value::Thunk(_)) \u003d self.stack.last() {"},{"line_number":747,"context_line":"                        let thunk \u003d match self.stack_pop() {"},{"line_number":748,"context_line":"                            Value::Thunk(t) \u003d\u003e t,"},{"line_number":749,"context_line":"                            _ \u003d\u003e unreachable!(),"},{"line_number":750,"context_line":"                        };"},{"line_number":751,"context_line":""},{"line_number":752,"context_line":"                        let gen_span \u003d frame.current_light_span();"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"ae8e50a1_07af9855","line":749,"in_reply_to":"d3ccce04_616f2186","updated":"2023-03-06 14:54:57.000000000","message":"It\u0027s actually unreachable as per the let above, so the compiler may decide to use this as an optimisation hint (or not ...)","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8ab517c9ea08d068d9acfcf71b6dae3aaa59a741","unresolved":true,"context_lines":[{"line_number":917,"context_line":"            }"},{"line_number":918,"context_line":""},{"line_number":919,"context_line":"            // Attribute sets with a __functor attribute are callable."},{"line_number":920,"context_line":"            // TODO"},{"line_number":921,"context_line":"            val @ Value::Attrs(_) \u003d\u003e {"},{"line_number":922,"context_line":"                let gen_span \u003d parent"},{"line_number":923,"context_line":"                    .map(|p| p.current_light_span())"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"f43ab667_230f812e","line":920,"updated":"2023-03-05 13:19:55.000000000","message":"TODO for what?","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"54024cf28518e9a96ff0aa61734d87d15e9ea50b","unresolved":false,"context_lines":[{"line_number":917,"context_line":"            }"},{"line_number":918,"context_line":""},{"line_number":919,"context_line":"            // Attribute sets with a __functor attribute are callable."},{"line_number":920,"context_line":"            // TODO"},{"line_number":921,"context_line":"            val @ Value::Attrs(_) \u003d\u003e {"},{"line_number":922,"context_line":"                let gen_span \u003d parent"},{"line_number":923,"context_line":"                    .map(|p| p.current_light_span())"}],"source_content_type":"text/x-rustsrc","patch_set":62,"id":"b580b4cf_d662dffb","line":920,"in_reply_to":"f43ab667_230f812e","updated":"2023-03-07 11:06:18.000000000","message":"Done","commit_id":"df6aedae1dc1fb1b33c8139df16271c8978d5d87"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"f020d32e13a3afdaf5b1b5b12c49e8425eca5c82","unresolved":true,"context_lines":[{"line_number":883,"context_line":"        Ok(())"},{"line_number":884,"context_line":"    }"},{"line_number":885,"context_line":""},{"line_number":886,"context_line":"    fn tail_call_value("},{"line_number":887,"context_line":"        \u0026mut self,"},{"line_number":888,"context_line":"        span: LightSpan,"},{"line_number":889,"context_line":"        parent: Option\u003cCallFrame\u003e,"}],"source_content_type":"text/x-rustsrc","patch_set":70,"id":"83f10455_0190a6ae","line":886,"updated":"2023-03-13 14:30:26.000000000","message":"I\u0027m not sure this is really a *tail* call.  We have two stacks now (`VM::stack` and `VM::frames`) and this isn\u0027t a \"tail call\" for `VM::frames` (it increases the depth of `VM::frames` in the `Value::Closure()` branch).","commit_id":"6d269b2ef08f5f82b8573f9a31a40cfeec2c1659"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"e65ce41f4b480f4997023104070b02740fcac973","unresolved":false,"context_lines":[{"line_number":883,"context_line":"        Ok(())"},{"line_number":884,"context_line":"    }"},{"line_number":885,"context_line":""},{"line_number":886,"context_line":"    fn tail_call_value("},{"line_number":887,"context_line":"        \u0026mut self,"},{"line_number":888,"context_line":"        span: LightSpan,"},{"line_number":889,"context_line":"        parent: Option\u003cCallFrame\u003e,"}],"source_content_type":"text/x-rustsrc","patch_set":70,"id":"b67db350_f4beba23","line":886,"in_reply_to":"83f10455_0190a6ae","updated":"2023-03-13 20:14:49.000000000","message":"cl/8256","commit_id":"6d269b2ef08f5f82b8573f9a31a40cfeec2c1659"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"f020d32e13a3afdaf5b1b5b12c49e8425eca5c82","unresolved":true,"context_lines":[{"line_number":1060,"context_line":"                .await"},{"line_number":1061,"context_line":"                .concat(\u0026s2),"},{"line_number":1062,"context_line":"        ),"},{"line_number":1063,"context_line":"        (a, b) \u003d\u003e arithmetic_op!(\u0026a, \u0026b, +)?,"},{"line_number":1064,"context_line":"    };"},{"line_number":1065,"context_line":""},{"line_number":1066,"context_line":"    Ok(result)"}],"source_content_type":"text/x-rustsrc","patch_set":70,"id":"291f8a72_06e7bcd6","line":1063,"updated":"2023-03-13 14:30:26.000000000","message":"Won\u0027t this fail if both `a` and `b` are unforced thunks?\n\nI wrote a test case for that and it passes, but I can\u0027t figure out why.  Where is the force happening?","commit_id":"6d269b2ef08f5f82b8573f9a31a40cfeec2c1659"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"e65ce41f4b480f4997023104070b02740fcac973","unresolved":false,"context_lines":[{"line_number":1060,"context_line":"                .await"},{"line_number":1061,"context_line":"                .concat(\u0026s2),"},{"line_number":1062,"context_line":"        ),"},{"line_number":1063,"context_line":"        (a, b) \u003d\u003e arithmetic_op!(\u0026a, \u0026b, +)?,"},{"line_number":1064,"context_line":"    };"},{"line_number":1065,"context_line":""},{"line_number":1066,"context_line":"    Ok(result)"}],"source_content_type":"text/x-rustsrc","patch_set":70,"id":"ac487400_8f0838a5","line":1063,"in_reply_to":"291f8a72_06e7bcd6","updated":"2023-03-13 20:14:49.000000000","message":"The force is happening in what the compiler emits for the operations that make use of this macro, see e.g. what `1 + 2` compiles to:\n\n\u003d\u003d\u003d compiled thunk @ 0x17b8e0 (5 ops) \u003d\u003d\u003d\n0x0      1  OpConstant(1@0)\n0x1      |  OpForce\n0x2      |  OpConstant(2@1)\n0x3      |  OpForce\n0x4      |  OpAdd\n\nThe OpForce of each argument forces before we even make it to OpAdd.","commit_id":"6d269b2ef08f5f82b8573f9a31a40cfeec2c1659"}]}
