| Crates.io | xod |
| lib.rs | xod |
| version | 1.0.1 |
| created_at | 2025-06-05 03:16:45.124129+00 |
| updated_at | 2025-07-07 20:10:51.226639+00 |
| description | A tiny REPL for bitwise arithmetic and expression evaluation. |
| homepage | |
| repository | https://github.com/annie444/xod |
| max_upload_size | |
| id | 1701040 |
| size | 265,776 |
A tiny REPL for bitwise arithmetic and expression evaluation.
Xod is a minimal scripting language and interactive REPL designed for experimenting with bitwise logic and integer math. Think of it as a scratchpad for systems engineers, embedded developers, and anyone who needs to test bitwise operations in a focused, rule-consistent environment.
help(), clear(), and history().&, |, ^, ~, <<, >>, +, -, *, /, %, **==, !=, <, <=, >, >=append, prepend, front, back, indexhex(), bin(), log(base, value), range(start, end), etc.for(x in range(1, 5)) { bin(x) }
if(3 & 1) { hex(3) }
while(x < 8) { x = x + 1 }
🛑 Floating point values and negative integers are not supported.
To avoid ambiguity in bitwise expressions, parentheses are required to define precedence. For example:
(a & b) | c // âś… Clear
a & b | c // ❌ Error: ambiguous expression
Launch the REPL:
xod
Then type any expression:
>> 3 & 6
2
>> hex(255)
0xff
>> for(x in range(0, 4)) { bin(x) }
0b0
0b1
0b10
0b11
help() – Show help messagehistory() – Show input historyclear() – Clear the screenquit() – Exit the REPLComing soon! For now, clone the repo and run it directly:
cargo install xod
Contributions, feedback, and bitwise rants are welcome! Feel free to open an issue or PR. If you’re interested in improving the parser, extending list functionality, or adding file I/O support—let’s chat.