RRetrieverinretriever.hashnode.dev·Sep 5, 2023 · 1 min readc_void到u8 - laertes-2023为什么把c_void重命名为u8? 类型大小: u8通常代表一个单字节(8位)的无符号整数。c_void作为一个“空”类型,通常也被当作一个单字节进行处理(尽管这取决于具体的实现)。因此,这两者在大小上是匹配的。 类型转换简便: u8是一个非常基础的类型,与之进行类型转换通常比较方便。 操作简单: u8类型上可用的操作相对简单,可能更容易进行后续的代码分析或转换。 为什么不把其他东西重命名为u8? 类型语义: 其他类型可能具有其自己的语义和操作,这些可能不适用或不等价于u8。 数据...00
RRetrieverinretriever.hashnode.dev·Sep 1, 2023 · 1 min readif all(char not in [';', '[', ']', '(', ')', '{', '}', ':', 'as'] for char in child_fragment):if all(char not in [';', '[', ']', '(', ')', '{', '}', ':', 'as'] for char in child_fragment):00
RRetrieverinretriever.hashnode.dev·Aug 31, 2023 · 1 min readstatement: c-78 vs rust-12 in tree sitterhttps://github.com/tree-sitter/tree-sitter-c/blob/master/src/grammar.json https://github.com/tree-sitter/tree-sitter-rust/blob/master/src/grammar.json00
RRetrieverinretriever.hashnode.dev·Aug 20, 2023 · 2 min readArithmetic Right Shift vs Logical Right Shift in Java, Rust, C++, PythonCertainly. Here's the explanation in English: >> and >>> are bitwise shift operators, where >> is an arithmetic right shift, and >>> is a logical right shift. The main distinction between the two lies in how they handle negative numbers. Arithmetic ...00
RRetrieverinretriever.hashnode.dev·Aug 15, 2023 · 1 min readgrep -E "for.*256" blocksort.cgrep -E "for.*256" program.c00