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.

++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.

Upload Hello World

Echo the input: Reads through Host.Input, which is what the naive interpreter could not do at all: it panicked on ,.

,[.,]

Upload Echo the input

Heavy loop: About 111k guest ops. Give it 20000 fuel and it takes six slices, which is the point.

++++++++++[->++++++++++[->++++++++++[-]<]<]

Upload Heavy loop

Instances

No instances yet. Upload one of the samples above.

Limits

limitvalue
instances64
source bytes65536
input bytes1024
output bytes4096
fuel per slice5000000
tape cells30000

Transactions

Calls, deploys, and child packages · indexed history
HashBlockTimeMsgCallerStatus
9AC8D826AF…8A2FCBF01,183,95025d agoEnablePkgg1yaaa6r…6704ok
258CBF84E8…898F1B42407,17357d agoCall Stepg1manfre…dlf5ok
403E667F2E…A038DFA6407,17057d agoCall Uploadg1manfre…dlf5ok
0AB01BCFE0…061EE9F8272,69862d agoEnablePkg—ok
DD24EF909B…43A4E4E7272,41262d agoAddPackage—ok

Call function

Connect Adena in the header · vm.m_call · qfuncs only

Source (qfile)