{"id":13412738,"url":"https://github.com/db47h/ngaro","last_synced_at":"2026-01-12T10:27:29.264Z","repository":{"id":57496825,"uuid":"65305991","full_name":"db47h/ngaro","owner":"db47h","description":"An embeddable implementation of the Ngaro Virtual Machine for Go programs","archived":false,"fork":false,"pushed_at":"2018-06-03T10:57:43.000Z","size":226,"stargazers_count":30,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-14T04:01:54.410Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/db47h.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-08-09T15:23:50.000Z","updated_at":"2025-02-14T12:15:39.000Z","dependencies_parsed_at":"2022-08-28T11:50:21.321Z","dependency_job_id":null,"html_url":"https://github.com/db47h/ngaro","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/db47h/ngaro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/db47h%2Fngaro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/db47h%2Fngaro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/db47h%2Fngaro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/db47h%2Fngaro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/db47h","download_url":"https://codeload.github.com/db47h/ngaro/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/db47h%2Fngaro/sbom","scorecard":{"id":328576,"data":{"date":"2025-08-11","repo":{"name":"github.com/db47h/ngaro","commit":"e81c572fc532a3fc65110e69aa5b58473f9b122f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T03:03:58.433Z","repository_id":57496825,"created_at":"2025-08-18T03:03:58.434Z","updated_at":"2025-08-18T03:03:58.434Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"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":"2024-07-30T20:01:28.547Z","updated_at":"2026-01-12T10:27:29.243Z","avatar_url":"https://github.com/db47h.png","language":"Go","funding_links":[],"categories":["可嵌入的脚本语言","Embeddable Scripting Languages","脚本语言与嵌入式编程","Relational Databases","嵌入式腳本語言","嵌入式脚本语言","脚本语言与嵌入式编程`在你的go代码中嵌入其他脚本语言`","\u003cspan id=\"嵌入式脚本语言-embeddable-scripting-languages\"\u003e嵌入式脚本语言 Embeddable Scripting Languages\u003c/span\u003e"],"sub_categories":["检索及分析资料库","Search and Analytic Databases","SQL 查询语句构建库","Advanced Console UIs","高級控制台界面","高级控制台界面","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e"],"readme":"[![Build Status](https://travis-ci.org/db47h/ngaro.svg?branch=master)](https://travis-ci.org/db47h/ngaro)\n[![Go Report Card](https://goreportcard.com/badge/github.com/db47h/ngaro)](https://goreportcard.com/report/github.com/db47h/ngaro)\n[![Coverage Status](https://coveralls.io/repos/github/db47h/ngaro/badge.svg)](https://coveralls.io/github/db47h/ngaro)\n[![GoDoc](https://godoc.org/github.com/db47h/ngaro/vm?status.svg)](https://godoc.org/github.com/db47h/ngaro/vm)\n\n# Ngaro Go\n\n## \u003ca name=\"pkg-overview\"\u003eOverview\u003c/a\u003e\nThis is an embeddable Go implementation of the [Ngaro Virtual Machine](http://retroforth.org/docs/The_Ngaro_Virtual_Machine.html).\n\nThis repository contains the embeddable [virtual\nmachine](https://godoc.org/github.com/db47h/ngaro/vm), a rudimentary\n[symbolic assembler](https://godoc.org/github.com/db47h/ngaro/asm)\nfor easy bootstrapping of projects written in Ngaro machine language, and the\n[retro](https://godoc.org/github.com/db47h/ngaro/cmd/retro) command\nline tool that can be used as a replacement for the Retro reference\nimplementations.\n\nPlease visit http://forthworks.com/retro/ to get you started about the Retro\nlanguage and the Ngaro Virtual Machine.\n\nThe main purpose of this implementation is to allow customization and\ncommunication between Retro programs and Go programs via custom opcodes and\nI/O handlers (i.e. scripting Go programs in Retro). The package examples\ndemonstrate various use cases. For more details on I/O handling in the Ngaro\nVM, please refer to http://retroforth.org/docs/The_Ngaro_Virtual_Machine.html.\n\nAnother goal is to make the VM core as neutral as possible regarding the higher\nlevel language running on it. For example, the in-memory string encoding scheme\nis fully customizable. Retro specific behaviors are provided via the lang/retro\npackage.\n\nCustom opcodes are implemented by intercepting implicit calls to negative memory\naddresses. This allows the VM to be fully backwards compatible with existing\nRetro images while still providing enhanced capabilities. The maximum number of\naddressable cells is 2^31 when running in 32 bits mode (that's 8GiB or memory on\nthe host). The range [-2^31 - 1, -1] is available for custom opcodes.\n\nThis implementation passes all tests from the retro-language test suite and\nits performance when running tests/core.rx is slightly better than with the\nreference implementations:\n\n\t1.08s for this implementation, no custom opcodes, compiled with Go 1.7, linux/amd64\n\t1.15s for the reference assembly implementation, linux/386\n\t1.30s for the reference Go implementation, compiled with Go 1.7, linux/amd64\n\t2.00s for the reference C implementation, compiled with gcc-5.4 -O3 -fomit-frame-pointer\n\nYes, Go 1.7's new SSA backend is THAT good on this type of workload :)\n\nFor all intents and purposes, the VM behaves according to the specification.\nThis is of particular importance to implementors of custom opcodes: the VM\nalways increments the PC after each opcode, thus opcodes altering the PC must\nadjust it accordingly (i.e. set it to its real target minus one).\n\n## Installing\n\nInstall the retro command line tool:\n\n\tgo get -u github.com/db47h/ngaro/cmd/retro\n\nTest:\n\n\tgo test -i github.com/db47h/ngaro/vm\n\tgo test -v github.com/db47h/ngaro/vm/...\n\nBuild a retroImage:\n\n\tcd $GOPATH/github.com/db47h/ngaro/cmd/retro\n\tmake retroImage\n\nTest the retro command line tool:\n\n\t./retro --with vm/testdata/core.rx\n\nShould generate a lot of output. Just check that the last lines look like this:\n\n\tok   summary\n\t360 tests run: 360 passed, 0 failed.\n\t186 words checked, 0 words unchecked, 37 i/o words ignored.\n\n\tok  bye\n\n## Support for 32/64 bits memory images on all architectures\n\nSince v2.0.0, the default Cell type (the base data type in Ngaro VM) is Go's\nint. This means that depending on the target you compile for, it will be either\n32 or 64 bits. The retro command line tool supports loading and saving retro\nmemory images where Cells can be either size. For example, to quickly get\nstarted you can do this:\n\n\techo \"save bye\" | \\\n\tretro -image vm/testdata/retroImage -ibits 32 -o retroImage\n\nThis will load the memory image file `vm/testdata/retroImage` which we know to\nbe encoded using 32 bits cells, and save it in the current directory with\nwhatever encoding is the default for your platform. You could also force a\nspecific output Cell size with the `-obits` flag.\n\nLoading and saving with encodings different from the target platform is safe:\nit will work or generate an error, but never create a corrupted memory\nimage file. For example, with a 64 bits retro binary, saving to 32 bits cells\nwill check that written values fit in a 32 bit int. If not, it will generate an\nerror.\n\nIf for some reason you need a specific cell size, regardless of the target\nplatform's native int size, you can force it by compiling with the tags\n`ngaro32` or `ngaro64`:\n\n\tgo install -tags ngaro32 github.com/db47h/ngaro/cmd/retro\n\nwill build a version of retro that uses 32 bits cells, regardless of\n`GOOS`/`GOARCH`. Likewise, the `ngaro64` tag will force 64 bits cells, even on\n32 bits targets (it'll be twice as slow though).\n\n## Releases\n\nThis project uses [semantic\nversioning](http://dave.cheney.net/2016/06/24/gophers-please-tag-your-releases)\nand tries to adhere to it.\n\nSee the [releases page](https://github.com/db47h/ngaro/releases).\n\nFor a detailed change log, see the [commit log](https://github.com/db47h/ngaro/commits/master).\n\n## Contributing\n\nNo rules, just common sense. Bells, wristles and any other preformance improvements are very\nwelcome. The only changes that will never be accepted are those that will break compatibility\nwith the VM specification.\n\nPRs are a good place to discuss changes so do not hesitate to send PRs directly. Or an issue, if your really have an issue.\n\n## Places to Go\n\nHave a look at [@dobegor's fork](https://github.com/dobegor/ngaro). It breaks compatibility with the spec, but\nit's got some nice features like floating point support, pausable VM, and a few others in their TODO list.\n\n## License\n\nThis project is Copyright 2016 Denis Bernard \u003cdb047h@gmail.com\u003e, licensed under\nthe [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n\nThe Retro language and Ngaro Virtual Machine are Copyright (c) 2008-2016 Charles\nChilders (and many others), licensed under the ISC license. See the file\nLICENSE-RETRO at the root of this repository for more details as well as a full\nlist of contributors.\n\nNote that all files in the \\_misc and vm/testdata folders are verbatim copies\nfrom the retro-language project. As such, only Retro's ISC license applies to\nthese files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdb47h%2Fngaro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdb47h%2Fngaro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdb47h%2Fngaro/lists"}