{"action":"opened","issue":{"url":"https://api.github.com/repos/L3viathan/OIL/issues/5","repository_url":"https://api.github.com/repos/L3viathan/OIL","labels_url":"https://api.github.com/repos/L3viathan/OIL/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/L3viathan/OIL/issues/5/comments","events_url":"https://api.github.com/repos/L3viathan/OIL/issues/5/events","html_url":"https://github.com/L3viathan/OIL/issues/5","id":194020765,"number":5,"title":"Command addition thread","user":{"login":"L3viathan","id":259833,"avatar_url":"https://avatars.githubusercontent.com/u/259833?v=3","gravatar_id":"","url":"https://api.github.com/users/L3viathan","html_url":"https://github.com/L3viathan","followers_url":"https://api.github.com/users/L3viathan/followers","following_url":"https://api.github.com/users/L3viathan/following{/other_user}","gists_url":"https://api.github.com/users/L3viathan/gists{/gist_id}","starred_url":"https://api.github.com/users/L3viathan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/L3viathan/subscriptions","organizations_url":"https://api.github.com/users/L3viathan/orgs","repos_url":"https://api.github.com/users/L3viathan/repos","events_url":"https://api.github.com/users/L3viathan/events{/privacy}","received_events_url":"https://api.github.com/users/L3viathan/received_events","type":"User","site_admin":false},"labels":[{"id":475380550,"url":"https://api.github.com/repos/L3viathan/OIL/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-07T11:07:52Z","updated_at":"2016-12-07T11:07:52Z","closed_at":null,"body":"This is the thread for new potential commands that can be added to future versions of OIL.\r\n\r\nI'm very conservative regarding the addition of commands, but not completely opposed, if their usefulness can be demonstrated, and they are primitive enough. If while programming in OIL you find that you're missing a certain feature, this is the place to suggest them.\r\n\r\nAny new commands will make OIL slightly backwards-incompatible (because previously nopping operations suddenly have a different effect), and this should be kept in mind.\r\n\r\nA few potential commands come to my mind:\r\n\r\n- **Random number**: This would very obviously be useful, but it is also one of the potential commands that might be too complex. The random number would need to be bound in some way, whether through a default range (say, 0-99, or even 0-1) or through one or two arguments. Alternatively, I could also imagine a random jump (similar to the existing conditional jump; jump to either of two given cells, randomly). At the moment I'm leaning slightly towards including this at some point.\r\n\r\n- **Flip sign**: The sign of a given cell is flipped in-place: 4 becomes -4, -3 becomes 3, 0 stays 0, and \"foo\" becomes 0. This would have the second usecase of forcing a string to become a number, although this is easily done now with incrementing and then decrementing. This is a frequently needed operation, on the other hand, it is also one that is trivially implemented without a designated command. At the moment I'm leaning towards rejecting this.\r\n\r\n- **chr/ord**: Two potential commands that would come as a pair: Convert a number into the character that has the number as a unicode codepoint, and convert a character into the number of its unicode codepoint. This would introduce functionality that is impossible to do in OIL 2.1, and would be very useful, but there are many open questions: What happens with strings that are longer than one character? What happens with numbers that don't correspond to a unicode character? Without these questions addressed, this won't be included."}}
{"actor":{"display_login":"L3viathan"}}