{"id":22972960,"url":"https://github.com/marcinruszkiewicz/kaiser-ruby","last_synced_at":"2025-08-13T14:32:52.544Z","repository":{"id":56879804,"uuid":"142999430","full_name":"marcinruszkiewicz/kaiser-ruby","owner":"marcinruszkiewicz","description":"Rockstar Language transpiler for Ruby","archived":false,"fork":false,"pushed_at":"2023-02-17T12:19:48.000Z","size":203,"stargazers_count":18,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-30T17:15:51.704Z","etag":null,"topics":["hacktoberfest","rockstar-language","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/marcinruszkiewicz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-31T10:29:50.000Z","updated_at":"2024-09-13T00:19:56.000Z","dependencies_parsed_at":"2022-08-20T23:40:10.893Z","dependency_job_id":null,"html_url":"https://github.com/marcinruszkiewicz/kaiser-ruby","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcinruszkiewicz%2Fkaiser-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcinruszkiewicz%2Fkaiser-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcinruszkiewicz%2Fkaiser-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcinruszkiewicz%2Fkaiser-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcinruszkiewicz","download_url":"https://codeload.github.com/marcinruszkiewicz/kaiser-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229767250,"owners_count":18121042,"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":["hacktoberfest","rockstar-language","ruby"],"created_at":"2024-12-14T23:36:45.877Z","updated_at":"2024-12-14T23:36:46.633Z","avatar_url":"https://github.com/marcinruszkiewicz.png","language":"Ruby","readme":"![Build Status](https://github.com/marcinruszkiewicz/kaiser-ruby/actions/workflows/rspec.yml/badge.svg)\n[![Gem Version](https://badge.fury.io/rb/kaiser-ruby.svg)](https://badge.fury.io/rb/kaiser-ruby)\n\n# KaiserRuby - a Rockstar to Ruby transpiler\n\nThis tool translates a file containing a program written in the [Rockstar language](https://github.com/dylanbeattie/rockstar) to Ruby code.\n\nAs of version 0.7, Kaiser-Ruby implements all of the Rockstar language spec and further versions will keep up with new language features as they are added.\n\nFor details on what is done and what I'm still working on, see the TODO.md and CHANGELOG.md files.\n\n## Installation\n\nInstall the gem by issuing the following command.\n\n```\n$ gem install kaiser-ruby\n```\n\nThis gem works best on a current Ruby version and requires Ruby 2.3 at minimum. Running it on 2.3 has the downside of metal umlauts not being entirely correct as that Ruby version doesn't know how to `.downcase` a capital umlaut letter, which was fixed in 2.4.\n\nIf you're not using the umlauts (or at least are careful to only replace lowercase letters with them), all should be fine otherwise.\n\n## Usage\n\nThe most common usage of this gem is to transpile (or transpile and run immediately) Rockstar code into Ruby code.\n\nThis gem provides a commandline tool for you to use:\n\n```\n$ kaiser-ruby\n```\n\nThere are a few ways you can use it. First one will just output the result of the transpilation.\n\n```\n$ kaiser-ruby transpile ./examples/simple.rock\n@tommy = 15.0\nputs @tommy\n\nif \"\".to_bool\n  puts \"empty strings are false\"\nend\n\n```\n\nThe `--show-source` flag will output the Rockstar code along with the resulting Ruby code like this:\n\n```\n$ kaiser-ruby transpile ./examples/simple.rock --show-source\nTommy is a rebel\nShout Tommy\n\nif \"\"\nShout \"empty strings are false\"\n----------------------------------------\n@tommy = 15.0\nputs @tommy\n\nif \"\".to_bool\n  puts \"empty strings are false\"\nend\n\n```\n\nYou can also use the `--save=FILE` option to write the resulting transpiled code as a file instead of outputting it.\n\n```\n$ kaiser-ruby transpile ./examples/simple.rock --save=simple.rb\nSaved output in `simple.rb`\n\n```\n\nThe saved output will have a few additional lines at the start that include the language changes necessary for Rockstar to work correctly. You need the gem installed to run this file:\n\n```\n$ ruby simple.rb\n15.0\n\n```\n\nAnother option is to run an interactive console (REPL):\n\n```\n$ kaiser-ruby rock --debug\nType 'exit' to exit the console. Otherwise, rock on!\n\\m/\u003e Put \"Hello San Francisco\" into the message\n\\m/\u003e @the_message = \"Hello San Francisco\"\n  =\u003e Hello San Francisco\n\\m/\u003e Scream the message\n\\m/\u003e puts @the_message\nHello San Francisco\n  =\u003e nil\n\\m/\u003e exit\n$\n```\n\nFinally, you can also transpile and immediately execute the code, like this:\n\n```\n$ kaiser-ruby execute ./examples/simple.rock\n15\n\n```\n\nOr even better, this:\n\n```\n$ kaiser-ruby execute ./examples/fibonacci.rock\n1.0\n1.0\n2.0\n3.0\n5.0\n8.0\n13.0\n21.0\n34.0\n55.0\n89.0\n144.0\n233.0\n377.0\n610.0\n987.0\n1597.0\n2584.0\n4181.0\n6765.0\n10946.0\n17711.0\n28657.0\n46368.0\n\n$\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/marcinruszkiewicz/kaiser-ruby. I'm also available for questions at the [Rockstar Developers Discord Group](https://discord.gg/kEUe5bM)\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcinruszkiewicz%2Fkaiser-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcinruszkiewicz%2Fkaiser-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcinruszkiewicz%2Fkaiser-ruby/lists"}