{"id":17267113,"url":"https://github.com/brendanator/jsforth","last_synced_at":"2025-04-14T08:22:29.156Z","repository":{"id":57283129,"uuid":"51525247","full_name":"brendanator/jsForth","owner":"brendanator","description":"Forth implemented in js","archived":false,"fork":false,"pushed_at":"2018-01-17T14:30:41.000Z","size":837,"stargazers_count":86,"open_issues_count":3,"forks_count":22,"subscribers_count":8,"default_branch":"gh-pages","last_synced_at":"2025-03-27T07:48:52.344Z","etag":null,"topics":["forth"],"latest_commit_sha":null,"homepage":"http://brendanator.github.io/jsForth/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brendanator.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-11T15:45:53.000Z","updated_at":"2025-01-19T17:50:36.000Z","dependencies_parsed_at":"2022-09-17T13:00:51.689Z","dependency_job_id":null,"html_url":"https://github.com/brendanator/jsForth","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendanator%2FjsForth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendanator%2FjsForth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendanator%2FjsForth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendanator%2FjsForth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brendanator","download_url":"https://codeload.github.com/brendanator/jsForth/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248844188,"owners_count":21170529,"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":["forth"],"created_at":"2024-10-15T08:08:51.983Z","updated_at":"2025-04-14T08:22:29.111Z","avatar_url":"https://github.com/brendanator.png","language":"JavaScript","readme":"## jsForth\n\nAn implementation of [Forth](https://en.wikipedia.org/wiki/Forth_(programming_language)) in JavaScript\n\nTry it out [here](https://brendanator.github.io/jsForth/) \n\n### ANS Forth\n\njsForth implements the full core ANS standard\n\nThe following word sets are implemented:\n\n- Core words - fully implemented\n    - All tests pass except some integer multiplication/division edge cases where the ANS spec differs from the results given by the [long](https://github.com/dcodeIO/long.js) package\n- Core plus words - fully implemented and all tests pass\n- Core extension words - fully implemented and all tests pass\n\nThe ANS Forth tests can be run using `npm run test` or in the intepreter with the following Forth code\n```\ninclude test/verbose-tester.fth\ninclude https://raw.githubusercontent.com/gerryjackson/forth2012-test-suite/master/src/core.fr\n```\nThe complete test suite is available [here](https://github.com/gerryjackson/forth2012-test-suite/)\n\n### JavaScript interoperability\n\n- global variable access   `js /document`\n- array access             `js .0.2`\n- property access          `js .name`\n- property setting         `js .name!`\n- function calling         `js .sin{1}`\n- method calling           `js /document.getElementById{1}`\n- new with params          `js .new{1}`\n\n### Threading model - trampolined threading\n\nAll of the standard [threading models](https://en.wikipedia.org/wiki/Threaded_code#Threading_models) require `call` or `jump` to execute the next instruction. In JavaScript these both translate into functions calls in tail position. Without tail call optimisation this will lead to a stack overflow. Therefore jsForth uses a trampoline to execute instructions.\n\nECMAScript 6 specifies tail call optimisation, but unfortunately most [browsers don't support it yet](https://kangax.github.io/compat-table/es6/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrendanator%2Fjsforth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrendanator%2Fjsforth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrendanator%2Fjsforth/lists"}