{"id":23747729,"url":"https://github.com/nirvanasupermind/owlet","last_synced_at":"2025-07-02T02:02:54.166Z","repository":{"id":57317225,"uuid":"326884530","full_name":"nirvanasupermind/owlet","owner":"nirvanasupermind","description":"Programming language for ternary computing","archived":false,"fork":false,"pushed_at":"2021-02-07T02:37:19.000Z","size":836,"stargazers_count":30,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-28T20:48:36.146Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nirvanasupermind.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":"2021-01-05T04:20:40.000Z","updated_at":"2024-09-20T07:17:11.000Z","dependencies_parsed_at":"2022-08-25T20:40:47.916Z","dependency_job_id":null,"html_url":"https://github.com/nirvanasupermind/owlet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nirvanasupermind/owlet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvanasupermind%2Fowlet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvanasupermind%2Fowlet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvanasupermind%2Fowlet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvanasupermind%2Fowlet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nirvanasupermind","download_url":"https://codeload.github.com/nirvanasupermind/owlet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvanasupermind%2Fowlet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263061406,"owners_count":23407606,"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-12-31T14:55:58.038Z","updated_at":"2025-07-02T02:02:54.134Z","avatar_url":"https://github.com/nirvanasupermind.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# owlet\n[![npm version](https://badge.fury.io/js/owlet.svg)](https://badge.fury.io/js/owlet)\u003cbr /\u003e\nOwlet is a high-level language for balanced ternary software development, using S-expression syntax. It was made using node.js. The infrastructure includes the interpreter able to run and decode Owlet programs. This is *not* a full [ternary computer](https://en.wikipedia.org/wiki/Ternary_computer), but is intended to be used as a library for other applications to use. And it has these dependencies:\n* [BigInteger.js](https://github.com/peterolson/BigInteger.js/) to print numbers\n* [syntax](https://github.com/DmitrySoshnikov/syntax) for the parser\n\nHere is an example program:\n```clojure\n(begin\n    (def fib(a) (begin\n        (if (\u003c= a 1)\n            1\n            (+ (fib (- a 1)) (fib (- a 2)))\n        )\n    ))\n    (print (fib 10))\n)\n```\n\nFor more examples see the `examples` folder. \n\n# What is Owlet?\nA **ternary computer** (also called trinary computer) is a computer that uses ternary logic (three possible values) instead of the more popular binary system (\"Base 2\") in its calculations. The dialect of ternary (balanced ternary) used in owlet has digits for {-1,0,1}. Yes, this means EVERY number is signed. owlet is a high-level implementation of a ternary computer,minus the CPU and RAM. This allows it to be used effectively as a library for other applications and ternary computers that require heavyweight computations.\n\n# Implementation \nThe implementation of Owlet is written in JavaScript, and recursively evaluates the expression. It has multiple files to deal with each ternary data type such as ints and floats. The language implementation is quite small and simple compared to other weakly typed languages. Since the syntax is based on S-expression, the parser can be very small.\n\n# API\nAn overview of the syntax can be found in [API.md](API.md). \n\n# Using Owlet\n\nYou can evaluate Owlet code in a JavaScript string, using the function `Owlet.prototype.eval()`:\n```js\nconst Owlet = require(\"owlet\");\nvar owlet = new Owlet(); //Owlet interpreter\nowlet.eval(\"\u003cput code here\u003e\")\n```\n\nOwlet files can be run using node using the function `Owlet.prototype.evalFile()`, like so:\n```js\nconst Owlet = require(\"owlet\");\nvar owlet = new Owlet(); //Owlet interpreter\nowlet.evalFile(\"my-file.owlet\")\n```\n\nNote that relative directories will be with respect to the folder you run node from.\n\nThese examples require that you have Owlet installed on npm, which can be done on Unix systems by typing `npm install owlet` into your terminal. \n\n# Status\nThe main part of this language is complete, although it may be expanded on later.\n\n# License\nOwlet is licensed under the MIT License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirvanasupermind%2Fowlet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnirvanasupermind%2Fowlet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirvanasupermind%2Fowlet/lists"}