Realm
v0
gno.land/r/moul/x/vm/bfdemo/v0
Render
Brainfuck, on chain, a slice at a time
Demo of p/moul/x/vm/bf (the machine) and p/moul/x/vm/vmkit (the host ABI, the fuel meter, the instance store). This realm holds no logic of its own.
A program here does not run to completion. It runs until its fuel slice is spent, then pauses: the realm keeps the snapshot and the next caller pays for the next slice. Realm code cannot pause itself, and a guest can.
Samples
Hello World: 385 guest ops, five tape cells. Finishes in one slice.
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.
Echo the input: Reads through Host.Input, which is what the naive interpreter could not do at all: it panicked on ,.
,[.,]
Heavy loop: About 111k guest ops. Give it 20000 fuel and it takes six slices, which is the point.
++++++++++[->++++++++++[->++++++++++[-]<]<]
Instances
| id | status | fuel used | slices | output |
|---|---|---|---|---|
| 0000001 | halted | 32 | 1 | Hello World |
Limits
| limit | value |
|---|---|
| instances | 64 |
| source bytes | 65536 |
| input bytes | 1024 |
| output bytes | 4096 |
| fuel per slice | 5000000 |
| tape cells | 30000 |
Transactions
| Hash | Block | Time | Msg | Caller | Status |
|---|---|---|---|---|---|
| 258CBF84E8…898F1B42 | 407,173 | 12d ago | Call Step | g1manfre…dlf5 | ok |
| 403E667F2E…A038DFA6 | 407,170 | 12d ago | Call Upload | g1manfre…dlf5 | ok |
| 0AB01BCFE0…061EE9F8 | 272,698 | 17d ago | EnablePkg | — | ok |
| DD24EF909B…43A4E4E7 | 272,412 | 17d ago | AddPackage | — | ok |
Calls, deploys, and child packages in indexed history.