{"id":16318565,"url":"https://github.com/vic/vrv","last_synced_at":"2025-10-31T12:30:24.480Z","repository":{"id":66386388,"uuid":"398952499","full_name":"vic/vrv","owner":"vic","description":"A comments directed programming language - born during  #LangJam 2021","archived":false,"fork":false,"pushed_at":"2021-08-23T02:39:53.000Z","size":50,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-25T12:25:55.938Z","etag":null,"topics":["langjam-0001","programming-language"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/vic.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-23T02:37:48.000Z","updated_at":"2021-09-05T15:39:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"090e8d2f-64e8-4c73-b7c7-7dcbd8c8f1fb","html_url":"https://github.com/vic/vrv","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/vic%2Fvrv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Fvrv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Fvrv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vic%2Fvrv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vic","download_url":"https://codeload.github.com/vic/vrv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239195480,"owners_count":19598036,"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":["langjam-0001","programming-language"],"created_at":"2024-10-10T22:23:57.278Z","updated_at":"2025-10-31T12:30:24.401Z","avatar_url":"https://github.com/vic.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vrv \n\nA #LangJam-2021, comments-first programming language\n\nIn vrv comments operate over code. Just like in [concatenative](http://concatenative.org) languages words operate over data on a stack, \nin vrv you have comments operating on their surrounding program syntax.\n\n## Dependencies\n\nVrv is implemented in Scala, thus you will need a working [Java](https://java.com) runtime on your system.\nBe sure you can execute the `java -version` command successfully.\n\nYou will also need the [coursier](https://get-coursier.io/docs/cli-installation) CLI in order to build this\nproject.\n\nIf you already have Java, you can get coursier by doing:\n\n``` shell\ncurl -fLo coursier https://git.io/coursier-cli \u0026\u0026 chmod +x coursier\n```\n\nBe sure to place the `coursier` executable in this project's directory, and that\nyou can execute the `./coursier --version` command successfully.\n\n\n## Running\n\nUse `./vrv run FILE` to execute a vrv file. For example:\n\n`./vrv run samples/sashimi.vrv`\n\nThe `./vrv` executable uses `./coursier` to launch `./vrv.sc` via the\n[Ammonite](https://ammonite.io/#Ammonite-REPL) runtime.\n\n``` sh\n./vrv run ./samples/hello-world.vrv # All tutorials end with hello world, now you are an vrv expert!\n\n./vrv run ./samples/importing.vrv # A file loading another vrv resource.\n\n./vrv parse ./samples/nested.vrv # parse and show the AST\n```\n\n## Vrv source programs\n\nThe source of a vrv program is composed only of comments and data.\n\nComments are c-style. `//` for single-line comments and `/* */` for multi-line nestable comments.\n\n```scala\nthis is data\n// this is a comment\nmore data again\n```\n\nTraditional programming languages completely ignore comments in their source code, \nvrv sees comments as the only first-class programming construct.\n\nAny c-style source file like the following Scala code is also valid syntax for a vrv program:\n\n``` scala\npackage baz\n\n// hello world\nobject Bar {\n  // hola mundo\n  val a = 22\n}\n```\n\nIn the previous snippet everything is data, except for the `hello world` and `hola mundo` comments which are only \nthing that vrv cares about.\n\n## Execution model\n\nAll things outside of comments in vrv are just considered data, and comments are the program driving force. \nBoth data and comments are simply chunks of symbols -tokens separated by space and new-lines read from the source file-.\n\nvrv is a symbolic language, meaning that it operates over symbols without explicitly\nrequiring these symbols to be bound to any value or function.\n\n_The result of all vrv programs is a single comment_.\n\nprogram execution is done via pattern matching comments with the current source file.\n\nsimilar to how many concatenative languages have a data-stack to operate upon, in\nvrv *comments* operate on its left and right surroundings of code-as-data.\n\nTo help understand it let's inspect a tiny vrv program:\n\n``` scala\na b // c d\ne f\n```\n\nImagine the previous program as `List(a b) Comment(c d) List(e f)`, if there exists a\ndefinition for `c d` it will take both lists of code surrounding it in order to produce \na potentially different source code, perhaps adding more comments, or changing its surrounding code.\n\nAn example of this is the builtin `load` builtin which inlines the imported AST from another vrv file\nat the very position where the comment exists. Try running `samples/importing.vrv` and `samples/sashimi.vrv`\n\n#### Evaluation order for first-class comments\n\nIn vrv, comments that have no nested comments within them are called `first-class`. Once encountered\nby the interpreter, only first-class comments get evaluated, and comments having nested comments are\nrecursively walked trying to find its inner first-class comments.\n\nIn the following example the first evaluation happens at the `c` comment. `c`'s implementation could \npotentially change the whole source file. and after that (if they still exist) `f g` and `i j` would be the\nnext candidates for execution.\n\n``` scala\na b // c\nd /* \n   e // f g\n   h /* i j */ k\n   */\nl m\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvic%2Fvrv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvic%2Fvrv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvic%2Fvrv/lists"}