coolreader18

un mir zaynen ale shvester

known compiler nerd. jewish, ws71. i'm a maintainer of RustPython (bit less active though cause of ✨burnout✨) and i like open source and rust in general


oh wait if cohost allows arbitrary html does that mean i can actually use my terminal emulator's "Copy as HTML" feature?

1196        fn build_closure(&mut self, code: &CodeObject) -> bool {
1197            if code.freevars.is_empty() {
1198                return false;
1199            }
1200            for var in &*code.freevars {
1201                let table = self.symbol_table_stack.last().unwrap();
1202                let symbol = table.lookup(var).unwrap_or_else(|| {
1203                    panic!(
1204                        "couldn't look up var {} in {} in {}",
1205                        var, code.obj_name, self.source_path
1206                    )
1207                });
1208                let parent_code = self.code_stack.last().unwrap();
1209                let vars = match symbol.scope {
1210                    SymbolScope::Free => &parent_code.freevar_cache,
1211                    SymbolScope::Cell => &parent_code.cellvar_cache,
1212                    _ if symbol.is_free_class => &parent_code.freevar_cache,
1213                    x => unreachable!(
1214                        "var {} in a {:?} should be free or cell but it's {:?}",
1215                        var, table.typ, x
1216                    ),
1217                };
1218                let mut idx = vars.get_index_of(var).unwrap();
1219                if let SymbolScope::Free = symbol.scope {
1220                    idx += parent_code.cellvar_cache.len();
1221                }
1222                self.emit(Instruction::LoadClosure(idx as u32))
1223            }
1224            self.emit(Instruction::BuildTuple {
1225                size: code.freevars.len() as u32,
1226                unpack: false,
1227            });
1228            true
1229        }

awww.

For reference, that was a bunch of <font color="#abcdef"> tags inside a <pre> tag, but cohost stripped them just leaving the text. that should be allowed I feel.... but I can do some processing to it to turn them into <span style=""> probably


You must log in to comment.