{"id":13611470,"url":"https://github.com/h313/spet","last_synced_at":"2025-04-13T04:34:35.293Z","repository":{"id":79976265,"uuid":"152824589","full_name":"h313/spet","owner":"h313","description":"an interpreter for a turing-complete programming language based on Spotify playlists","archived":false,"fork":false,"pushed_at":"2023-08-24T00:11:53.000Z","size":27,"stargazers_count":94,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-01T19:57:38.214Z","etag":null,"topics":["esoteric-language","spotify-api"],"latest_commit_sha":null,"homepage":"http://h313.info/spet/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/h313.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-10-13T01:41:50.000Z","updated_at":"2024-06-12T22:47:24.000Z","dependencies_parsed_at":"2024-01-14T06:56:44.565Z","dependency_job_id":null,"html_url":"https://github.com/h313/spet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h313%2Fspet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h313%2Fspet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h313%2Fspet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h313%2Fspet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/h313","download_url":"https://codeload.github.com/h313/spet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223568228,"owners_count":17166622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["esoteric-language","spotify-api"],"created_at":"2024-08-01T19:01:55.733Z","updated_at":"2024-11-07T18:30:31.775Z","avatar_url":"https://github.com/h313.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# About\n`spet` is an interpreter for a turing-complete programming language loosely based off of brainfuck based on Spotify playlists. It is \nlicensed under the GPLv3.\n\n## Language Definition\nThe interpreter reads the playlist from the top down. Various attributes of the song, sorted in terms of importance, defines the behaviours of the songs. The data land is a list of 40000 bytes, which can be navigated through with a pointer. From most important to least important, the songs evaluate to:\n \n### Print Character\nAny song from RADWIMPS' album `Your Name.` prints the character at the pointer location.\n\n### Input Character\nAny song by Coldplay grabs input from `stdin` depending on the number of letters in the first word of the song. For example, A Sky Full of Stars will take only the first letter of whatever input is in `stdin` and write it to the location of the pointer. However, Yellow will take the first six letters of `stdin` and write it, starting at the pointer location. The pointer stays at its position befure the input is called.\n\n### Moving the pointer\nAny song by Radiohead moves a pointer forward by `1` byte, while any song by Green Day moves a pointer back `1` byte.\n\n### Incrementing and Decrementing a value\nAny song from the Muse album `Drones` will decrement the value at the pointer by `1`, while any song from the Muse album `Origin of Symmetry` increments the value at the pointer by `1`. Decrementing causes the value to wrap around, so decrementing a `0` results in a `255`, while incrementing a `255` results in a `0`.\n\n### Loops\nIf a song contains the word `Run` in its name, and if the data at the pointer is `0`, the program jumps forward to the song directly following the next song containing the word `Talk` in its name. If a song contains the word `Talk` in its name, and if the data at the pointer is nonzero, the program jumps back to the corresponding song containing the word `Run`.\n\n### Setting values\nIf a song's album's first word has length less than `7`, and does not satisfy any of the above definitions, the data at the pointer is set to the first character of the next song.\n\n## Setup\n`spet` requires a Spotify premium account to connect with the API. To set up `spet`'s interpreter, clone the repo and do a `pip install -r requirements.txt`. Then, [create a Spotify API key](https://developer.spotify.com/dashboard/applications) and set the redirect URL to something like `http://localhost:8888/callback`.\n\nTo run `spet`, `cd` into the `spet` directory and run `python3 spet.py \u003cusername\u003e \u003cplaylist_uri\u003e`. Follow the instructions to set up the correct environment variables for the API keys. The playlist URI can be found on the Spotify app's Share button, and looks something like `7hShQSKY5AU0YQaN833iEx`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh313%2Fspet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fh313%2Fspet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh313%2Fspet/lists"}