{"id":22126429,"url":"https://github.com/johnearnest/decker","last_synced_at":"2025-05-14T18:02:15.426Z","repository":{"id":62382156,"uuid":"558957377","full_name":"JohnEarnest/Decker","owner":"JohnEarnest","description":"A multimedia sketchpad","archived":false,"fork":false,"pushed_at":"2025-05-13T16:19:55.000Z","size":4669,"stargazers_count":1204,"open_issues_count":9,"forks_count":69,"subscribers_count":32,"default_branch":"main","last_synced_at":"2025-05-13T17:33:04.298Z","etag":null,"topics":["ditherpunk","fantasy-console","hypercard"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JohnEarnest.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2022-10-28T17:22:29.000Z","updated_at":"2025-05-13T16:19:58.000Z","dependencies_parsed_at":"2023-10-12T08:22:12.211Z","dependency_job_id":"d95f9e28-9637-4290-b48c-946ffbc10a83","html_url":"https://github.com/JohnEarnest/Decker","commit_stats":null,"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnEarnest%2FDecker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnEarnest%2FDecker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnEarnest%2FDecker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnEarnest%2FDecker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JohnEarnest","download_url":"https://codeload.github.com/JohnEarnest/Decker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198453,"owners_count":22030964,"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":["ditherpunk","fantasy-console","hypercard"],"created_at":"2024-12-01T16:56:16.071Z","updated_at":"2025-05-14T18:02:15.363Z","avatar_url":"https://github.com/JohnEarnest.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"Decker\n======\nDecker is a multimedia platform for creating and sharing interactive documents, with sound, images, hypertext, and scripted behavior.\n\n![Decker, complete with toolbars](images/wings.gif)\n\nYou can learn more about Decker on [my website](http://beyondloom.com/decker/), on the [community forum](https://internet-janitor.itch.io/decker/community), or you can just dive in and [try it online](http://beyondloom.com/decker/tour.html). Periodic binary releases of Decker for MacOS and Windows are available on [Itch.io](https://internet-janitor.itch.io/decker).\n\nIf you're interested in _Lil_, Decker's scripting language, you can access documentation and play with it in your browser at [trylil](http://beyondloom.com/tools/trylil.html).\n\n\nWeb-Decker\n----------\nDecker is available as [a web application](http://beyondloom.com/decker/tour.html) (written in vanilla JavaScript) which is distributed as a single freestanding HTML file. Web-Decker can be built with a `make` script. The test suite uses [Node.js](https://nodejs.org/en/):\n\n```\nmake testjs\nmake web-decker\nmake runweb      # (optional) open in your default browser\n```\n\n\nNative-Decker\n-------------\nDecker is also available as a native application, written in C. Building Native-Decker from source requires:\n\n- a c compiler and libc\n- the `xxd` utility (standard with MacOS and most \\*nix distros)\n- [SDL2](https://www.libsdl.org/download-2.0.php)\n- [SDL2_image](https://github.com/libsdl-org/SDL_image)\n\nOn MacOS, BSD, or Linux, fetch the appropriate SDL2 packages and then build with `make`. This has also been reported to build and run successfully under WSL:\n\n```\nbrew install sdl2 sdl2_image                                   # MacOS/Homebrew\nsudo apt install libsdl2-2.0-0 libsdl2-dev libsdl2-image-dev   # Debian\nnix-shell                                                      # Nix\n\nmake lilt            # (optional) command-line tools\nmake docs            # (optional) build documentation (requires Lilt)\nmake decker          # build decker itself\nmake test            # (optional) regression test suite\nsudo make install    # (optional) install lilt, decker, and lil syntax profiles\n```\n\nIf SDL2 is not available, Native-Decker can also be built with [reduced functionality](c/io_sdl1.h) against SDL1.2 and a corresponding version of `SDL_image`. This compatibility shim is presently designed with the [OLPC XO-4](https://wiki.laptop.org/go/XO-4_Touch) and its default Fedora 18 OS image in mind; expect to do some tinkering with the makefile for other platforms:\n```\nsudo yum install SDL-devel SDL_image-devel\n\nmake decker\n```\n\n\nLilt\n----\nDecker's scripting language, [Lil](http://beyondloom.com/tools/trylil.html), is available as a standalone interpreter, with extended IO functionality to make it suitable for general-purpose programming and scripting: this package is called [Lilt](http://beyondloom.com/decker/lilt.html). Lilt only requires libc and `xxd` to build from source:\n```\nmake lilt\n```\n\nLilt can be used to programmatically create, inspect, and manipulate decks, as well as package them as Web-Decker self-executing documents:\n```\n$ lilt\n d:read[\"examples/decks/color.deck\"]\n\u003cdeck\u003e\n d.card:d.cards.colhex\n\u003ccard\u003e\n d.card.widgets.hex.text:\"FFAA00\"\n\"FFAA00\"\n d.card.widgets.hex.event[\"change\"]\n0\n d.card.widgets.rgb.text\n\"16755200\"\n write[\"color.html\" d]\n1\n```\n\nYou can build Lilt against [Cosmopolitan Libc](https://github.com/jart/cosmopolitan), producing a single binary that will run on most popular operating systems:\n```\n$ ./apelilt.sh\nsuccessfully compiled lilt.com\nrunning tests against ./lilt.com...\nall interpreter tests passed.\nall dom tests passed.\nall roundtrip tests passed.\n\n$ sh ./lilt.com\n  range 10\n(0,1,2,3,4,5,6,7,8,9)\n```\n\nThe Danger Zone\n---------------\nDecker normally sandboxes the execution of scripts within decks to prevent low-level access to the host computer and ensure parity between the capabilities of Web-Decker and Native-Decker. Both implementations offer opt-in APIs for performing more \"dangerous\" or non-portable operations called [The Danger Zone](http://beyondloom.com/decker/decker.html#thedangerzone).\n\nWhen building Native-Decker from source, you can enable _The Danger Zone_ by defining the `DANGER_ZONE` preprocessor flag:\n```\nFLAGS:=$(FLAGS) -DDANGER_ZONE\n```\n\nA \"dangerous\" build of Native-Decker can export \"dangerous\" Web-Decker builds. You can also temporarily enable _The Danger Zone_ for Web-Decker by calling the `endanger()` function from your browser's JavaScript console or modifying the `DANGEROUS=0` constant in the .html file to `DANGEROUS=1`. [The Forbidden Library](http://beyondloom.com/decker/forbidden.html) offers a suite of bindings for useful JavaScript APIs based on this interface.\n\n\nContributing\n------------\nThe Decker project is released under the MIT license. Any contributions to this repository are understood to fall under the same license.\n\n- Bug fixes and typo corrections are always welcome.\n- Bug reports must include simple steps for reproduction and clearly indicate the OS and/or web browser where the bug arises.\n- PRs should match the style of existing code.\n- PRs should be as small as possible, and must not contain bundled unrelated changes.\n- PRs must include updates for _both_ the C and JavaScript versions of Decker (or its associated tools) whenever relevant.\n- PRs must include updates for documentation (see: the `docs` directory) wherever relevant.\n- PRs must pass the entire test suite (see: `make test`/`make testjs`).\n- When modifying the JavaScript version of Decker, _please_ test your changes in multiple web browsers and avoid using bleeding-edge features. As a rule of thumb, if it didn't exist 5 years ago, don't use it now. If it _only_ works in Chrome, it's better not to do it at all.\n- When modifying the C version of Decker, avoid generating warnings and _do not use_ compiler-specific features such as GCC extensions.\n\nPlease refrain from submitting Pull Requests to this repository containing new features without first discussing their inclusion in an Issue. Decker is intended to be small, simple, and cozy. There are an infinite number of features that could potentially be added, but creative constraints are also valuable. If you have a differing vision, feel empowered to explore it in your own fork of the project- that's what permissive licenses are for.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnearnest%2Fdecker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnearnest%2Fdecker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnearnest%2Fdecker/lists"}