{"id":13593110,"url":"https://github.com/google/wwwbasic","last_synced_at":"2025-04-09T02:32:21.842Z","repository":{"id":57400315,"uuid":"141233262","full_name":"google/wwwbasic","owner":"google","description":"wwwBASIC is an implementation of BASIC that runs on Node.js and the Web.","archived":false,"fork":false,"pushed_at":"2023-08-21T16:19:58.000Z","size":273,"stargazers_count":1136,"open_issues_count":17,"forks_count":62,"subscribers_count":33,"default_branch":"main","last_synced_at":"2025-04-08T20:07:50.347Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2018-07-17T04:57:29.000Z","updated_at":"2025-02-11T15:50:39.000Z","dependencies_parsed_at":"2024-11-06T14:38:07.928Z","dependency_job_id":"a767f8e9-717b-450d-8b53-6d490d482b06","html_url":"https://github.com/google/wwwbasic","commit_stats":{"total_commits":144,"total_committers":12,"mean_commits":12.0,"dds":0.4444444444444444,"last_synced_commit":"ea802202f76e831b1e856314620672303048c405"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fwwwbasic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fwwwbasic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fwwwbasic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fwwwbasic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/wwwbasic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247965654,"owners_count":21025413,"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-08-01T16:01:16.662Z","updated_at":"2025-04-09T02:32:21.202Z","avatar_url":"https://github.com/google.png","language":"JavaScript","readme":"[![NPM Package](https://img.shields.io/npm/v/wwwbasic.svg)](https://www.npmjs.com/package/wwwbasic)\n\n# wwwBASIC\n\nwwwBASIC is an implementation of BASIC (Beginner's All-purpose Symbolic\nInstruction Code) designed to be easy to run on the Web.\n\n## How to use wwwBASIC\n\nYou can include wwwBASIC directly in Web pages:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cscript src=\"https://google.github.io/wwwbasic/wwwbasic.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/basic\"\u003e\n      PRINT \"Hello World!\"\n      FOR i = 1 to 10\n        PRINT \"Counting \"; i\n      NEXT i\n    \u003c/script\u003e\n  \u003c/head\u003e\n\u003c/html\u003e\n```\n\nYou can also import wwwBASIC as a Node.js module.\n\nEither install  it via [npm](https://www.npmjs.com/): `npm install -S wwwbasic`\n\nor clone the repository: `git clone https://github.com/google/wwwbasic.git`\n\nThen run your code:\n```js\nvar basic = require('wwwbasic'); // from NPM\n// var basic = require('./wwwbasic.js'); // from within the cloned repository directory\n\nbasic.Basic(\n`\nPRINT \"Hello World!\"\nFOR i = 1 to 10\n  PRINT \"Counting \"; i\nNEXT i\n`);\n```\n\n## Features\n\nIt supports a range of features including:\n   * Graphics: 24-bit color, PSET, LINE, CIRCLE.\n   * Input: INKEY$, GETMOUSE.\n   * Source is parsed and compiled to JavaScript at load time.\n\n## Test Suite\n\nwwwBASIC has a \"work in progress\" test suite.\nIt can be run with: `./tests/run-tests.sh`.\n\n## Examples\n\n* [Circles](https://google.github.io/wwwbasic/examples/circles.html)\n  ([source](examples/circles.html)) - Some circles...\n* [DONKEY.BAS](https://google.github.io/wwwbasic/examples/donkey.html)\n  ([source](examples/donkey.html)) -\n  The classic \"game\", apparently\n  [co-authored by Bill Gates himself](https://blog.codinghorror.com/bill-gates-and-donkey-bas/).\n* [GET \u0026 PUT](https://google.github.io/wwwbasic/examples/getput.html)\n  ([source](examples/getput.html)) - Test of GET/PUT.\n* [Hello World](https://google.github.io/wwwbasic/examples/hello_world.html)\n  ([source](examples/hello_world.html)) - Hello.\n* [Lines](https://google.github.io/wwwbasic/examples/lines.html)\n  ([source](examples/lines.html)) - Some lines...\n* [Polar Grapher](https://google.github.io/wwwbasic/examples/polargrapher.html)\n  ([source](examples/polargrapher.html)) - Draws a polar graph using trig functions.\n* [Primes](https://google.github.io/wwwbasic/examples/primes.html)\n  ([source](examples/primes.html)) - Primes \u003c3000.\n* [Slides](https://google.github.io/wwwbasic/examples/slides.html)\n  ([source](examples/slides.html)) - Reveal.BAS :-)\n* [Editor](https://google.github.io/wwwbasic/examples/editor.html)\n  ([source](examples/editor.html)) - Live editor using\n  [Ace](https://ace.c9.io/).\n\n## But Why?\n\nThe immediate trigger for wwwBASIC's existence was\nEd Thelen's Nike Hercules\n[simulator](http://ed-thelen.org/NikeSimulation.html#SimBrowser).\nIt had been written in BASIC some time back,\nthen ported to some unknown version of FreeBasic.\nHowever, while he had screenshots and source code,\nit also included a Windows .EXE to a download,\nand the statement, \"guaranteed to be free of viruses\" :-/\n\nAs it was meant to capture how something historical worked,\nit seemed unfortunate that something of this sort\ncouldn't just be accessible directly on the web.\nVarious whole system emulators that run on the web are available,\nbut booting a whole system for a small program seemed like overkill.\n\nHence the first goal was to get\n[this](http://ed-thelen.org/nike-fromBradNelsonSept26.html) to run.\n\nFrom there, bringing up\n[DONKEY.BAS](https://google.github.io/wwwbasic/examples/donkey.html)\nseemed a nice logical milestone.\nBringing up GORILLA.BAS and NIBBLES.BAS are a current focus.\n\n## Source Code Headers\n\nEvery file containing source code must include copyright and license\ninformation. This includes any JS/CSS files that you might be serving out to\nbrowsers. (This is to help well-intentioned people avoid accidental copying that\ndoesn't comply with the license.)\n\nApache header:\n\n    Copyright 2018 Google LLC\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        https://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","funding_links":[],"categories":["JavaScript","Dialects"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fwwwbasic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Fwwwbasic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fwwwbasic/lists"}