https://github.com/h313/spet Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Customer Stories + White papers, Ebooks, Webinars + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. {{ message }} h313 / spet Public * Notifications * Fork 1 * Star 41 an interpreter for a turing-complete programming language based on Spotify playlists h313.info/spet/ License GPL-2.0 license 41 stars 1 fork Activity Star Notifications * Code * Issues 1 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights h313/spet This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 2 branches 0 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/h] Use Git or checkout with SVN using the web URL. [gh repo clone h313/s] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @h313 h313 Move in documentation to README ... a0b92f8 Jun 8, 2023 Move in documentation to README a0b92f8 Git stats * 21 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .gitignore Display Playlist, Simpler setup October 15, 2018 11:43 LICENSE Initial commit October 12, 2018 18:41 README.md Move in documentation to README June 7, 2023 20:00 parser.py fix loop behaviour as in #2 December 30, 2018 12:17 requirements.txt working basics October 13, 2018 12:53 spet.py Display Playlist, Simpler setup October 15, 2018 11:43 View code [ ] About Language Definition Print Character Input Character Moving the pointer Incrementing and Decrementing a value Loops Setting values Setup README.md About spet is an interpreter for a turing-complete programming language loosely based off of brainfuck based on Spotify playlists. It is licensed under the GPLv3. Language Definition The 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: Print Character Any song from RADWIMPS' album Your Name. prints the character at the pointer location. Input Character Any 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. Moving the pointer Any song by Radiohead moves a pointer forward by 1 byte, while any song by Green Day moves a pointer back 1 byte. Incrementing and Decrementing a value Any 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. Loops If 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. Setting values If 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. Setup 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 and set the redirect URL to something like http://localhost:8888/callback. To run spet, cd into the spet directory and run python3 spet.py . 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. About an interpreter for a turing-complete programming language based on Spotify playlists h313.info/spet/ Topics spotify-api esoteric-language Resources Readme License GPL-2.0 license Activity Stars 41 stars Watchers 3 watching Forks 1 fork Report repository Releases No releases published Packages 0 No packages published Languages * Python 100.0% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time.