{"id":20349945,"url":"https://github.com/fdero/verse","last_synced_at":"2025-04-12T01:30:27.008Z","repository":{"id":175054788,"uuid":"581810678","full_name":"fDero/Verse","owner":"fDero","description":"Interpreter of the Verse programming language (this language is the precursor of Basalt)","archived":false,"fork":false,"pushed_at":"2025-01-23T16:27:07.000Z","size":109,"stargazers_count":17,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T21:11:32.312Z","etag":null,"topics":["compiler","compiler-design","interpreter","language","programming-language","programming-languages"],"latest_commit_sha":null,"homepage":"","language":"C++","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/fDero.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":"2022-12-24T12:26:01.000Z","updated_at":"2025-03-03T10:08:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"dfc96ae2-2f73-49a1-8b6f-c2a858dbc843","html_url":"https://github.com/fDero/Verse","commit_stats":null,"previous_names":["fdero/verse"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fDero%2FVerse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fDero%2FVerse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fDero%2FVerse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fDero%2FVerse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fDero","download_url":"https://codeload.github.com/fDero/Verse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248504179,"owners_count":21115132,"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","compiler-design","interpreter","language","programming-language","programming-languages"],"created_at":"2024-11-14T22:28:16.278Z","updated_at":"2025-04-12T01:30:27.001Z","avatar_url":"https://github.com/fDero.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"![license: MIT](https://img.shields.io/badge/license-MIT-blue)\r\n\r\n# Verse\r\n`verse` is an interpreter for the Verse programming language. This language was the result of various experimentations that ultimetly led to [Basalt](https://www.github.com/fDero/Basalt), \r\nmy second language. It's important to note that what i created has nothing to do with [Verse made by epic games](https://dev.epicgames.com/documentation/en-us/uefn/verse-language-reference).\r\n\r\n### Installation (Building from source)\r\nIn order to install verse, you have to build it from source. By default, the build process tries to use `clang++`, but you can change that\r\nto make it use `g++` instead if you so desire. Either way `c++20` or higher is required.\r\n```bash\r\n$$ git clone https://www.github.com/fDero/Verse\r\n$$ cd Verse\r\n$$ make build\r\n```\r\n\r\n### Hello World\r\nTo make your first hello-world program in verse, all it takes is to create a file with the `.verse` extension (in this case, it will be called `hello.verse`)\r\ncontaining the following code:\r\n```go\r\nfunc main(){\r\n    println(\"Hello world!\");\r\n}\r\n```\r\n\r\nOnce you have the file set up, to run it just use the `verse -r hello.verse` command in console.\r\n```bash\r\n$ verse -r hello.verse\r\n$ Hello world!\r\n```\r\n\r\n### Types\r\nVerse is a strictly typed language, it has a C-style type system with `Int`, `Float`, `Bool`, `Char`, `String` as primitive types. \r\n```go\r\nfunc main(){\r\n    var x : Int = 6;\r\n    var y : Float = 9.4;\r\n    var f : Bool = false;\r\n    var c : Char = 'z';\r\n    var s : String = \"hello world\";\r\n}\r\n```\r\n\r\n### Recursion\r\nVerse supports recursion just like any other language, and a good way to show it is with the classic fibonacci example, consider the following code:\r\n```go\r\nfunc fibo(n : Int){\r\n    if (n \u003c 2) {\r\n        return 1;\r\n    }\r\n    else {\r\n        return fibo(n-1) + fibo(n-2);\r\n    }\r\n}\r\n\r\nfunc main(){\r\n    println(fibo(6));\r\n}\r\n```\r\nassuming the file is called `fibo.verse`, then it can be executed just like we did earlier with the hello-world example, using the `verse -r` command.\r\n```bash\r\n$$ verse -r fibo.verse\r\n$$ 21\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdero%2Fverse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffdero%2Fverse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdero%2Fverse/lists"}