[🦀 Rust] Little Man Plus

[🦀 Rust] Little Man Plus

9 devlogs
22h 6m
•  Ship certified
Created by Azyrite

Rust-based implementation of a Little Man Computer with more memory, a sleek terminal user interface and an expanded instruction set. Get the latest release at https://github.com/azyritedev/littlemanplus/releases/latest

Timeline

Ship 2

1 payout of shell 45.0 shells

Azyrite

about 1 year ago

Azyrite • Covers 3 devlogs and 3h 3m

Working on a major overhaul of the program right now. Currently, the entire program including input handling, drawing to the terminal and running the VM happens on one thread which tends to lock up the program if the VM behaves weirdly, and consumes a lot of CPU time even when nothing is happening due to the main thread constantly polling for input. These changes aren't fully complete yet but when they are there should be a significant improvement in performance when idle.

Update attachment

Improved error handling in the program. When the provided program fails to compile for any reason, a helpful error message is shown which replaces the generic compilation failure popup.

Update attachment

Expanded popup size to fit more text, so now there is a welcome popup! It just has a brief description of the program right now.

Update attachment

Ship 1

1 payout of shell 374.0 shells

Azyrite

over 1 year ago

Azyrite • Covers 6 devlogs and 14h 28m

Updated the README file getting ready for release! Demo video attached:

Improved inputs with validation, so panics should be avoided. Also, I have replaced the default program with a bubble sort algorithm that takes 10 user inputs and sorts them.

Update attachment
Azyrite
Azyrite
2h 28m • over 1 year ago

After much debugging, I finally got inputs working, although I couldn't make the Modal struct as general as I'd like it to be.

Now programs that have an INP instruction will show a popup asking the user to input an integer which will be checked and passed to the program.

Update attachment

Popups now show for errors. Currently the only error which will show a popup is a compiler error, although the message isn't very detailed at the moment; I plan to address both of these issues later on.

Also there is now an empty configuration column on the right of the screen which I plan to fill in later as well.

Update attachment

Added a memory display column, which shows a partial (not scrollable, yet) view of the program's memory and highlights the memory address being accessed currently when the VM is running.

Also added a blank configuration column to be filled in later, and added methods to load text into the program area potentially allowing programs to be loaded from files in the future.

Update attachment
Azyrite
Azyrite
14h 33m • over 1 year ago

Forgot to add this project! Anyways here's a quick rundown:

I've speedran building a Little Man Computer emulator in Rust - basically a really small virtual machine that takes in some basic assembly-like instructions, compiles and runs them. It is a very simplified system and has one input and one output, and only handles 64-bit integers. Coupled with a terminal user interface, it's a really good learning tool to understand how CPUs function at a basic level and can even do more complex things (e.g. bubble sort).

Currently, it is still missing a memory display and user input (all inputs default to 10).

Update attachment