Giter VIP home page Giter VIP logo

lin-rado-turing's People

Contributors

boydjohnson avatar nickdrozd avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

nickdrozd icodein

lin-rado-turing's Issues

Don't pass Options to recurr_check

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 Options 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.

Use two spaces to separate states

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.