{"id":49778335,"url":"https://github.com/jlkdevelop/try-mxscript","last_synced_at":"2026-05-11T17:11:47.430Z","repository":{"id":355304270,"uuid":"1227549065","full_name":"jlkdevelop/try-mxscript","owner":"jlkdevelop","description":"Source for try.mxscript.com — the official MX Script browser playground. Built entirely in MX Script.","archived":false,"fork":false,"pushed_at":"2026-05-02T22:26:13.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-02T23:32:46.552Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://try.mxscript.com","language":null,"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/jlkdevelop.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-02T20:53:43.000Z","updated_at":"2026-05-02T22:26:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jlkdevelop/try-mxscript","commit_stats":null,"previous_names":["jlkdevelop/try-mxscript"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/jlkdevelop/try-mxscript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlkdevelop%2Ftry-mxscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlkdevelop%2Ftry-mxscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlkdevelop%2Ftry-mxscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlkdevelop%2Ftry-mxscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jlkdevelop","download_url":"https://codeload.github.com/jlkdevelop/try-mxscript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlkdevelop%2Ftry-mxscript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32904682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-11T17:09:15.040Z","status":"ssl_error","status_checked_at":"2026-05-11T17:08:45.420Z","response_time":120,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-05-11T17:11:45.927Z","updated_at":"2026-05-11T17:11:47.425Z","avatar_url":"https://github.com/jlkdevelop.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# try-mxscript\n\nSource for [**try.mxscript.com**](https://try.mxscript.com) — the official browser-based playground for [MX Script](https://github.com/jlkdevelop/mxscript).\n\n\u003e Created by [Jassim Alkharafi](https://github.com/jlkdevelop). MIT-licensed and built in the open.\n\n## Why this repo exists\n\nThe whole site is **one `.mx` file**: [`app.mx`](./app.mx). Every byte of HTML, CSS, and client-side JS is generated by MX Script functions, and the **Run** button is powered by MX Script's own [`eval()`](https://github.com/jlkdevelop/mxscript/blob/main/CHANGELOG.md) builtin (added in v0.43+).\n\nIn short: the playground that runs your `.mx` code is itself written in MX Script.\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────┐\n│  Browser                                            │\n│    GET /          → landing_page() returns HTML     │\n│    GET /examples  → JSON list of curated snippets   │\n│    POST /run      → { source } → JSON result        │\n│    GET /healthz   → JSON heartbeat                  │\n└─────────────────────────────────────────────────────┘\n                        │\n                        ▼\n┌─────────────────────────────────────────────────────┐\n│  app.mx                                             │\n│    eval(source, { timeout_ms: 5000 })               │\n│      ├── lex + parse                                │\n│      ├── exec in a fresh Interpreter                │\n│      ├── capture stdout via child.Out buffer        │\n│      └── enforce 5s wall-clock timeout              │\n└─────────────────────────────────────────────────────┘\n```\n\n`eval()` does **not** start an HTTP listener even if the snippet declares `server { }` or routes — it only evaluates top-level statements. That's what makes the playground safe to run inside a request handler.\n\n## Run locally\n\nYou need [`mx` v0.43+](https://github.com/jlkdevelop/mxscript) on your `$PATH`:\n\n```bash\nmx run app.mx\n# → http://localhost:8080\n```\n\n## Deploy\n\nThis repo deploys to Vercel via MX Script's built-in adapter:\n\n```bash\nmx build --vercel\ngit add main.go go.mod vercel.json\ngit commit -m \"Deploy via mx build --vercel\"\ngit push           # Vercel autodeploys on push\n```\n\nThe generated Go shim embeds `app.mx`, lexes/parses/loads it via the interpreter library, and serves the resulting handler on Vercel's `$PORT`.\n\n## License\n\n[MIT](./LICENSE) © Jassim Alkharafi\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlkdevelop%2Ftry-mxscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjlkdevelop%2Ftry-mxscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlkdevelop%2Ftry-mxscript/lists"}