boydjohnson / lin-rado-turing Goto Github PK
View Code? Open in Web Editor NEWA Turing Machine simulator that checks for Halting, Lin-Rado Recurrence, + Blanking.
A Turing Machine simulator that checks for Halting, Lin-Rado Recurrence, + Blanking.
Here is the current signature of recurr_check
:
fn recurr_check(
&mut self,
step: usize,
snapshots: Option<&mut Snapshots<S, Sym>>,
deviations: Option<&Vec<i64>>,
init: usize,
beeps: &Beeps<S>,
dev: i64,
) -> Option<Halt>
snapshots
and deviations
are both Option
s that need to be
unwrapped in the function body. I think it would be cleaner to do that
unwrapping outside of the function body, and only call the function
once it's known that there really are snapshots and deviations to be
passed in. recurr_check
is a complicated function, and saving some
indetation would make it easier to read.
In spirit this is along the lines of d7ad4f1. I would implement it
myself, but this change requires convincing the borrow checker, and I
really can't deal with the borrow checker.
An n-state k-color TM program has nk instructions. We've been separating these with single spaces. But this means that parsing is ambiguous. Is 1RB 1LB 1LA 0LC 1RH 1LD 1RD 0RA
a 4-state 2-color program or is it 2-state 4-color? It's possible to guess, but it's still annoying.
To make parsing unambiguous, use one space to separate the colors within a state and two spaces to separate the states. The program above becomes 1RB 1LB 1LA 0LC 1RH 1LD 1RD 0RA
as 4-2 and 1RB 1LB 1LA 0LC 1RH 1LD 1RD 0RA
as 2-4. (This means that as strings, 4-2 programs are two characters longer than 2-4.)
I got this idea from the Ligocki repo: https://github.com/sligocki/busy-beaver
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.