{"id":47183005,"url":"https://github.com/cmspeedrunner/TuringTape","last_synced_at":"2026-03-27T13:01:02.894Z","repository":{"id":279309802,"uuid":"938381594","full_name":"cmspeedrunner/TuringTape","owner":"cmspeedrunner","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-24T22:58:09.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T23:24:20.101Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmspeedrunner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-24T21:38:01.000Z","updated_at":"2025-02-24T22:58:12.000Z","dependencies_parsed_at":"2025-02-24T23:34:32.866Z","dependency_job_id":null,"html_url":"https://github.com/cmspeedrunner/TuringTape","commit_stats":null,"previous_names":["cmspeedrunner/turingtape"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cmspeedrunner/TuringTape","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmspeedrunner%2FTuringTape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmspeedrunner%2FTuringTape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmspeedrunner%2FTuringTape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmspeedrunner%2FTuringTape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmspeedrunner","download_url":"https://codeload.github.com/cmspeedrunner/TuringTape/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmspeedrunner%2FTuringTape/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31045640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T09:35:52.079Z","status":"ssl_error","status_checked_at":"2026-03-27T09:35:20.916Z","response_time":164,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-13T08:00:38.368Z","updated_at":"2026-03-27T13:01:02.886Z","avatar_url":"https://github.com/cmspeedrunner.png","language":"C++","funding_links":[],"categories":["\u003ca name=\"calc\"\u003e\u003c/a\u003eCalculators"],"sub_categories":[],"readme":"# TuringTape\nTuringTape is a turing machine written in just 200 lines of C++\u003cbr\u003e\n\n## The Tape\nOn start, a 2040 bit, 255 byte 1 dimensional array is initalised, it contains 2040 values, randomised as a 1 or a 0\u003cbr\u003e\nYou should see a screen like this:\n```\ntape\u003e\n```\nFrom here, 11 possible commands can be entered.\n## Commands\nYour pointer begins at index 0, to move left or right, use `\u003c` and `\u003e` like this:\n```\nTape\u003e\u003e\n\nSHIFTED FROM: 0 TO: 1\nTape\u003e\u003c\n\nSHIFTED FROM: 1 TO: 0\n```\nYou can display a cell of the tape (the surrounding 10 values and addresses) using `t` like this:\n```\nTape\u003et\n\nTAPE VALUES:\n---------------------------\n[1] 1 0 0 1 0 0 0 0 0\n---------------------------\n\nMEMORY ADDRESS:\n---------------------------\n[0] 1 2 3 4 5 6 7 8 9\n```\nYou can layer any commands together in a single line, for example:\n```\nTape\u003e\u003e\u003e\u003e\u003e\u003et\n\nSHIFTED FROM: 0 TO: 1\nTape\u003e\nSHIFTED FROM: 1 TO: 2\nTape\u003e\nSHIFTED FROM: 2 TO: 3\nTape\u003e\nSHIFTED FROM: 3 TO: 4\nTape\u003e\nSHIFTED FROM: 4 TO: 5\nTape\u003e\nTAPE VALUES:\n---------------------------\n1 1 0 0 1 [0] 0 0 0 0\n---------------------------\n\nMEMORY ADDRESS:\n---------------------------\n0 1 2 3 4 [5] 6 7 8 9\n```\nYou can read and write to the value at your current address using `r` and `w` like this:\n```\nTape\u003er\nVALUE: 0 AT ADDRESS: 2\n\nTape\u003ew1\n\nWRITE AT ADRESS:\nWrite\u003eTape\u003er\nVALUE: 1 AT ADDRESS: 2\n```\nAs you can see, we read the value 0 at address 2, and then wrote 1 into that address, reading it again shows 1.\u003cbr\u003e\nYou can also use `x` to wipe the value by default to zero like so:\n```\nTape\u003ex\n\nWIPED VALUE: 1 FROM ADDRESS: 2\nTape\u003er\nVALUE: 0 AT ADDRESS: 2\n```\nYou can jump around the tape by using `j` followed by the address. Here is an example:\n```\nTape\u003ej100j0\n\nJUMP TO ADRESS:\nJump\u003e\nJUMPED FROM: 2 TO: 100\nTape\u003e\nJUMP TO ADRESS:\nJump\u003e\nJUMPED FROM: 100 TO: 0\nTape\u003e\n```\nThis also shows how you can layer the commands, in this case, jumping from address 2-\u003e100-\u003e0.\u003cbr\u003e\nAnother feature is copying the value from one address to another by entering `c` followed by where from you want to copy, and where to (seperated by a space):\n```\nTape\u003ec5 0\n\nCOPY FROM ADDRESS:\nCopy From\u003e\nTO ADDRESS:\nInto\u003e\nCOPIED VALUE: 0 FROM ADDRESS: 5\nOVERWRITING VALUE: 1 AT ADRESS: 0\n```\nYou can cut the tape and partition it at the current address using `p`, here is a full example where we jump to address 500, partition the tape, and then jump back.\n```\nTape\u003esj500pj0s\nTAPE SIZE: 2040\nTape\u003e\nJUMP TO ADRESS:\nJump\u003e\nJUMPED FROM: 0 TO: 500\nTape\u003e--PARTITION--\nTape split at position: 500\nNew tape size: 501\n\nTape\u003e\nJUMP TO ADRESS:\nJump\u003e\nJUMPED FROM: 500 TO: 0\nTape\u003eTAPE SIZE: 501\n```\nNote the use of `s` here, which displays the size of the tape. We can see how it changes once we cut the tape.\u003cbr\u003e\nTo display the whole tape, you can use `f`, in this example, I will split the tape at 50, just so this readme doesnt look cluttered.\n```\nTape\u003ej50pf\n\nJUMP TO ADRESS:\nJump\u003e\nJUMPED FROM: 0 TO: 50\nTape\u003e--PARTITION--\nTape split at position: 50\nNew tape size: 51\n\nTape\u003eFULL TAPE:\n1 1 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 0 1 0 1 0 0 1 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 0\n1\n```\nYou can also expand the tape, using `e` followed by how many bits you want to expand it by, it will initialise that amount and allocated random values into them just as it does on start.\n```\nTape\u003ee50f\n\nEXPAND TAPE BY: --TAPE EXPANDED--\nNew tape size: 101\n\nTape\u003eFULL TAPE:\n1 1 0 0 1 0 0 0 0 0 1 1 1 1 1 1 1 0 1 0 1 0 0 1 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 0\n1 1 1 0 1 0 0 0 1 0 1 1 0 0 1 1 1 1 0 1 0 1 0 1 1 1 1 0 1 0 1 1 0 0 0 1 1 0 0 1 0 0 1 1 1 0 0 0 1 1\n1\n```\nAs you can see, I expanded the tape used earlier by 50 and then displayed the tape.\u003cbr\u003e\nThe last two commands are `l` and `o` which load the tape and save it as a file respectively. For example:\n```\nTape\u003eo tape.txt\nSAVE TAPE AS: --TAPE SAVED--\nFile: tape.txt\n```\nIf I saved a tape with the size of 5000, and loaded it into a new tape with the default size of 2040, it would reallocate the tape and copy the values in, for example.\n```\nTape\u003es\nTAPE SIZE: 2040\nTape\u003el bigtape.txt\nLOAD TAPE: --TAPE LOADED--\nNew size: 5001\n```\nAs you can see, it resized the tape to accomodate the values.\n## Example\nThis is a complex example of a command that jumps to address 10, shortens the length of the tape to 10, jumps back to 0 and iterates through each value, clearing it. Finally, it jumps back to 0 and displays the tape.\n```\nTape\u003ej10pj0x\u003ex\u003ex\u003ex\u003ex\u003ex\u003ex\u003ex\u003ex\u003exj0t\n```\nI wont paste all the output in, just the tape values:\n```\nTAPE VALUES:\n---------------------------\n[0] 0 0 0 0 0 0 0 0 0\n---------------------------\n\nMEMORY ADDRESS:\n---------------------------\n[0] 1 2 3 4 5 6 7 8 9\n```\n\n## End\nThank you for reading! This is just a fun little project that I made to improve my c++ skills. It isn't meant to be anything serious.\u003cbr\u003e\nThanks!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmspeedrunner%2FTuringTape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmspeedrunner%2FTuringTape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmspeedrunner%2FTuringTape/lists"}