Skip to main content

Feather Virtual Machine (FVM)

Project description

FVM bitcode evaluator

Feather Virtual Machine (FVM) is a bitcode-based VM in development by @wryl.

This is a simplified version of FVM that interprets ascii representations of a future bitcode.

The bitcode

This version of FVM runs ASCII representations of the bitcode.

The bytecode (or rather bitcode) is an 8-instruction virtual machine that manipulates a circular tape of bits. The tape is dynamically resizable, and > internally is ideally modeled as a deque. Instructions:

  • 0: Insert a 0 bit to the left of the tape head.
  • 1: Insert a 1 bit to the left of the tape head.
  • <: Move the tape head left.
  • >: Move the tape head right.
  • [: Consume the bit under the tape head. If it's a 1, proceed forward by one instruction. If it's a 0, proceed to the next matching ].
  • ]: Proceed to the previous matching [.
  • ^: Consume and send a bit to the outside world.
  • v: Receive a bit from the outside world.

I/O is blocking. Something needs to acknowledge the send, and execution pauses on receive until something is sent.

Running FVM

Just Python

You can use the fvm-nerfed.py file locally.

Docker Hub

https://hub.docker.com/r/booniepepper/fvm

Packaging is performed by GitLab CI.

PyPI

https://pypi.org/project/fvm/

Packaging is performed by GitLab CI.

As a discord bot

This docker image is the FVM runtime used for a discord bot running on the concatenative programming discord server.

As of 2024-04-18 details on the discord bot can be found here:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fvm-0.1.2.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

fvm-0.1.2-py2.py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page