{"id":18062759,"url":"https://github.com/hikari-no-yume/pico8bot.php","last_synced_at":"2025-04-05T13:22:03.647Z","repository":{"id":140742824,"uuid":"50198882","full_name":"hikari-no-yume/pico8bot.php","owner":"hikari-no-yume","description":"@pico8bot's image generation reimplemented in PHP as a little programming language","archived":false,"fork":false,"pushed_at":"2016-01-23T19:47:36.000Z","size":271,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-11T04:12:43.864Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hikari-no-yume.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}},"created_at":"2016-01-22T18:14:43.000Z","updated_at":"2024-01-01T17:27:58.000Z","dependencies_parsed_at":"2023-06-27T00:48:20.777Z","dependency_job_id":null,"html_url":"https://github.com/hikari-no-yume/pico8bot.php","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/hikari-no-yume%2Fpico8bot.php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hikari-no-yume%2Fpico8bot.php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hikari-no-yume%2Fpico8bot.php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hikari-no-yume%2Fpico8bot.php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hikari-no-yume","download_url":"https://codeload.github.com/hikari-no-yume/pico8bot.php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247339960,"owners_count":20923164,"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":[],"created_at":"2024-10-31T05:08:11.753Z","updated_at":"2025-04-05T13:22:03.628Z","avatar_url":"https://github.com/hikari-no-yume.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"pico8bot, in PHP\n================\n\nI think [@pico8bot](https://twitter.com/pico8bot) on Twitter is pretty cool. Just for fun, I've reimplemented the image generation algorithm in PHP.\n\nI looked at the original source code to find out how the `%` operator works, the colour palette, the number of frames, how `x` and `y` are set, and the width and height: https://github.com/Objelisks/picobot/blob/master/bot.js\n\n![Screenshot!](https://raw.githubusercontent.com/TazeTSchnitzel/pico8bot.php/master/screenshot.png)\n\nCapabilities\n------------\n\n* Full language support:\n   * Operators: `+`, `-`, `*`, `/`, `%`\n   * Functions: `sin`, `cos`, `abs`, `tan2`, `sqrt`, `floor`, `max`, `min`\n   * Variables: `x`, `y`, `t`\n* Uses PHP's tokeniser because I'm lazy\n* Shunting-yard parser which generates abstract syntax tree\n* Two evaluation methods:\n   * Naïve recursive evaluator\n   * JIT compilation to PHP code\n\nRequirements\n------------\n\nPHP \u003e= 7.0\n\nPHP Gd extension\n\nUsage\n-----\n\n    $ php pico8bot.php \u003cexpresssion\u003e \u003coutfile name\u003e\n\nCurrently doesn't do animation or give a choice of evaluator (it always uses JIT).\n\ne.g.\n\n    $ php picto8bot.php 'sin(2.07*x)*cos(9.76%8.24)*flr(max(y, 2.51))' test.gif\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhikari-no-yume%2Fpico8bot.php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhikari-no-yume%2Fpico8bot.php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhikari-no-yume%2Fpico8bot.php/lists"}