{"id":18017843,"url":"https://github.com/zac-garby/radon","last_synced_at":"2025-03-26T19:34:00.932Z","repository":{"id":65140982,"uuid":"111434490","full_name":"zac-garby/radon","owner":"zac-garby","description":"A programming language.","archived":false,"fork":false,"pushed_at":"2021-10-11T09:50:13.000Z","size":458,"stargazers_count":22,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-22T08:01:46.549Z","etag":null,"topics":["compiler","golang","language","parser","vm"],"latest_commit_sha":null,"homepage":"https://zac-garby.github.io/radon/","language":"Go","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/zac-garby.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":"2017-11-20T16:22:02.000Z","updated_at":"2023-09-05T13:55:27.000Z","dependencies_parsed_at":"2023-01-09T13:01:22.731Z","dependency_job_id":null,"html_url":"https://github.com/zac-garby/radon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zac-garby%2Fradon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zac-garby%2Fradon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zac-garby%2Fradon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zac-garby%2Fradon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zac-garby","download_url":"https://codeload.github.com/zac-garby/radon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245722813,"owners_count":20661830,"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":["compiler","golang","language","parser","vm"],"created_at":"2024-10-30T04:25:54.775Z","updated_at":"2025-03-26T19:34:00.449Z","avatar_url":"https://github.com/zac-garby.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  Radon\n\u003c/h1\u003e\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/zac-garby/radon)](https://goreportcard.com/report/github.com/zac-garby/radon)\n\nRadon is a minimalistic, dynamic, compiled scripting language which runs on a virtual machine. In this sense it's in the same category as languages such as Python or Ruby. It's in very early development, and obviously isn't ready for production code yet, but it's quite fun to mess around with and see how much it can already do. And no, the name doesn't have any meaning.\n\nIf you come across something which should work or should be considered as part of the language, make an issue. At this stage, I'll probably accept most things. If you think you can fix it yourself, still make an issue so I don't accidentally do the same thing, but I'm very happy to accept pull requests :). A number of things have been added to the TODO/ideas list at the bottom of this file, so if you're bored and want something to work on that'd be great!\n\nThis is a total rewrite, with more focus on code quality, testing, and some slight improvements to the actual language. The old version has [its own branch](https://github.com/zac-garby/radon/tree/old). This is still a work in progress, so I can't at all guarantee that it works. In fact, I can probably guarantee more that it _won't_.\n\nFor syntax highlighting and snippets in [TextMate](http://macromates.com), install [Radon.tmbundle](Radon.tmbundle) from this repository.\n\n```\ncalc input = do\n  result = 0\n\n  for char in input do\n    result = match char where\n      | \"+\" -\u003e result + 1,\n      | \"-\" -\u003e result - 1,\n      | \"*\" -\u003e result * 2,\n      | \"/\" -\u003e result / 2\n  end\nend\n```\n\n### What's implemented so far?\n\n - The AST\n   - Tested\n - The lexer\n   - Tested\n - The parser\n   - Tested\n - All objects\n   - Tested\n - Bytecode\n   - Defined all instructions\n   - Parsing instructions\n   - Tested\n - Virtual Machine\n   - All instructions\n   - Scopes, stacks, etc...\n   - Uh, everything else\n   - Untested! :O\n\n### Building\n\nTo use Radon, you'll have to build it yourself for now, since there's no point in my putting a new version on GitHub every time it changes. First, download the project and `cd` to it:\n\n```\ngo get github.com/zac-garby/radon\ncd $GOPATH/src/github.com/zac-garby/radon\n```\n\nThen, install the dependencies and install the `radon` command:\n\n```\ndep ensure\ngo install\n```\n\nIf `$GOPATH/bin` is in your `$PATH` variable, you can start the REPL using the `radon` command. Otherwise, you'll have to use the actual path to the binary: `$GOPATH/bin/radon`, although I do recommend adding `$GOPATH/bin` to `$PATH`. You also might want to `mv $GOPATH/bin/radon /usr/local/bin`.\n\n### TODO, or Some ideas\n - Some Haskell-style operators:\n   - `|\u003e` operator, e.g. `5 |\u003e print`\n   - `$` operator, e.g. `print $ 5 + 3`\n - Might be able to optimise tuple compilation by flattening the tree and calling `MakeTuple`\n   - Probably only a very small performance increase though, but potentially worthwhile for large tuples\n - Make tuples _actually_ be stored using contiguous memory\n - Currying, so calling a function with too few arguments would make a new curried function\n - Empty stack after each statement. Store bytecode indices of the start of each statement.\n - Parse lists as a circumfix operator `[ ... ]` with a tuple inside\n - Parse maps as a circumfix operator `{ ... }` with a tuple of tuples inside, making the `:` operator the same as `,`, but possibly a different precedence\n - Max call-stack size\n - Garbage collection\n - Might be a good idea to store strings as rune slices\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzac-garby%2Fradon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzac-garby%2Fradon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzac-garby%2Fradon/lists"}