/Color

Fun playing around with colorForth and GreenArrays architecture.

Primary LanguageF#The UnlicenseUnlicense

Color

Having fun playing around with colorForth and GreenArrays architecture. See the demo presented to the Forth2020 Group in AUG 2021 and blog series - Blog series moved here to Github:

Editor/Assembler

The assembler watches for changes to the block files saved by the editor. I leave an instance of this running in one terminal window (right) while working in the editor in another (left). Later I run the machine in a third window.

Setup

Everything is written in F# and uses solution (.sln) and project (.fsproj) files compatible with Visual Studio or dotnet build. I personally have been using plain Vim (with the excellent F# bindings). Here's setup steps for Ubuntu:

Install .NET Core

  • Install the .NET SDK. For example, for Ubuntu 21.04 in particular:
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

sudo apt-get update
sudo apt-get install -y apt-transport-https
sudo apt-get update
sudo apt-get install -y dotnet-sdk-5.0

Pull down the project

git clone http://github.com/AshleyF/Color

Build

dotnet build Color.sln

Each project produces an executable (Assembler.exe, Editor.exe, Machine.exe) within bin/

Play!

The editor edits block files (/Blocks/*.blk) while the assembler waits for changes to blocks and assembles them (to block 0). Running the machine executes block 0.

The normal way of working is to run the ./Editor and ./Assembler at the same time (in separate tabs or tmux splits, etc.). Each time a block is saved (by pressing s in the editor), it's assembled. Then run the ./Machine to try it out.