Realm
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
No instances yet. Upload one of the samples above.
Limits
| limit | value |
|---|---|
| instances | 64 |
| source bytes | 65536 |
| input bytes | 1024 |
| output bytes | 4096 |
| fuel per slice | 5000000 |
| tape cells | 30000 |
Transactions
Calls, deploys, and child packages · indexed history| Hash | Block | Time | Msg | Caller | Status |
|---|---|---|---|---|---|
| 9AC8D826AF…8A2FCBF0 | 1,183,950 | 25d ago | EnablePkg | g1yaaa6r…6704 | ok |
| 258CBF84E8…898F1B42 | 407,173 | 57d ago | Call Step | g1manfre…dlf5 | ok |
| 403E667F2E…A038DFA6 | 407,170 | 57d ago | Call Upload | g1manfre…dlf5 | ok |
| 0AB01BCFE0…061EE9F8 | 272,698 | 62d ago | EnablePkg | — | ok |
| DD24EF909B…43A4E4E7 | 272,412 | 62d ago | AddPackage | — | ok |