{"id":17432141,"url":"https://github.com/marekjm/viuact","last_synced_at":"2025-03-28T01:16:01.513Z","repository":{"id":142429517,"uuid":"211625594","full_name":"marekjm/viuact","owner":"marekjm","description":"Viuact language","archived":false,"fork":false,"pushed_at":"2020-12-27T20:00:54.000Z","size":1276,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"v2","last_synced_at":"2025-02-02T02:46:06.826Z","etag":null,"topics":["programming-language","viuavm"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marekjm.png","metadata":{"files":{"readme":"README.markdown","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-29T07:53:38.000Z","updated_at":"2024-01-14T00:00:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"1ec862c6-205c-4761-8961-01b25e02b92d","html_url":"https://github.com/marekjm/viuact","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekjm%2Fviuact","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekjm%2Fviuact/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekjm%2Fviuact/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekjm%2Fviuact/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marekjm","download_url":"https://codeload.github.com/marekjm/viuact/tar.gz/refs/heads/v2","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245949652,"owners_count":20698925,"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":["programming-language","viuavm"],"created_at":"2024-10-17T08:24:17.237Z","updated_at":"2025-03-28T01:16:01.480Z","avatar_url":"https://github.com/marekjm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Viuact programming language\n\nHigh-level programming language for [Viua](https://viuavm.org) virtual machine.\n\nViuact has a Lisp-inspired syntax and strong, dynamic typing. Some features of\nthe language include:\n\n- nested functions and closures\n- tail calls\n- actor-based concurrency (inherited from Viua VM)\n- message passing as means of communication between actors \n- module system\n\n--------------------------------------------------------------------------------\n\n## Hello, World!\n\nThis is how you write the canonical program:\n\n    (let main () (print \"Hello, World!\"))\n\nSave this code to a file (`vim`), compile (`viuact cc`), assemble and\nlink (`viuact opt`), and execute (`viua-vm`):\n\n    $ vim hello.lisp\n    $ viuact cc --mode exec hello.lisp\n    $ viuatc opt build/_default/hello.asm\n    $ viua-vm build/_default/hello.bc\n    Hello, World!\n    $\n\n--------------------------------------------------------------------------------\n\n## Installation\n\nHere's how to get Viuact installed on your machine:\n\n    $ git clone --branch devel https://git.sr.ht/~maelkum/viuact\n    $ cd viuact\n    $ make PREFIX=~/.local install\n\nExecute the following command to confirm Viuact compiler is installed correctly:\n\n    $ viuact --version\n\nIf you do not have Viua VM installed on your system you can use `viuact(1)`\ntools to do it for you. Execute the following commands to create a semi-isolated\nenvironment with Viua VM installed:\n\n    $ viuact switch init\n    $ viuact switch create vm\n\n----------------------------------------\n\n### Activating the switch\n\nThis will fetch the most recent Viua VM code, compile it, and install in \"switch\nprefix\". Then, you can set the switch as the default one:\n\n    $ viuact switch to --set vm\n\nNow, whenever you want to activate the switch to make use of Viuact and Viua VM\ninstalled in its environment use the following commands:\n\n    $ `viuact switch to vm`\n\nThe backticks are imporant - they make your shell interpret the output. Remove\nthem to see what the switch-to command does.\n\n----------------------------------------\n\n### Additional goodies for ZSH\n\nIf you have ZSH as your shell, add this near the end of your `~/.zshrc`:\n\n    . ~/.local/viuact/switch/init/init.zsh \\\n        \u003e/dev/null 2\u003e/dev/null || true\n\nThis will enable command completion for `viuact(1)` tools.\n\n--------------------------------------------------------------------------------\n\n# Brief introduction\n\nLet-bindings are used to define functions and variables:\n\n    (let main () {\n        (let x \"Hello, World!\")\n        (print x)\n        0\n    })\n\nFunctions and variables are pretty much the same: let-bindings bind values to\nnames. Functions are just parametrised expressions whose evaluation is delayed\nuntil they are called, but they too ultimately produce a value.\n\nLet-bindings always bind a name to a single expression. An expression can be a\nsimple one (e.g. `42` or `(print \"Hello, World!\")`) or a compound one. Compound\nexpressions are enclosed in braces (`{ ... }`) which may contain one or more\nexpressions (which can be simple or compound, there is no restriction on nesting\nthem).\n\nFunctions are called by enclosing their name and arguments in parentheses, like\nthis: `(print x)`.\n\nThe \"return value\" of the compound expression is the value of the last\nexpression in the body of the compound expression. It is 0 in the example above.\n\nConditional expressions are used to make decisions:\n\n    (let main () {\n        (let x (get_answer_to \"What is the meaning of life?\"))\n        (let correct_answer 42)\n        (let exit_code (if (= x correct_answer)\n            {\n                (print \"Wow, how did you know?\")\n                0\n            }\n            {\n                (print \"Nope, that's not it.\")\n                1\n            }))\n        exit_code\n    })\n\nResults of conditional expressions are values so \"ifs\" can be used everywhere an\nexpression can be used, e.g. in let-bindings.\n\n--------------------------------------------------------------------------------\n\n## Full introduction\n\nA not-so-brief introduction to teh language is available in docs directory, see\n[the specification](./docs/SPEC.markdown).\n\n--------------------------------------------------------------------------------\n\n# License\n\nViuact compiler (and Viuact source code examples) is Free Software.\nIt is published under GNU GPL v3.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarekjm%2Fviuact","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarekjm%2Fviuact","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarekjm%2Fviuact/lists"}