{"id":14008177,"url":"https://github.com/goruby/goruby","last_synced_at":"2025-07-24T03:32:10.132Z","repository":{"id":19853804,"uuid":"23116133","full_name":"goruby/goruby","owner":"goruby","description":"GoRuby, an implementation of Ruby written in Go","archived":false,"fork":false,"pushed_at":"2024-07-14T23:26:00.000Z","size":2296,"stargazers_count":599,"open_issues_count":8,"forks_count":31,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-08-10T11:02:42.130Z","etag":null,"topics":["go","golang","interpreter","language","programming-language","ruby"],"latest_commit_sha":null,"homepage":null,"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/goruby.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":"2014-08-19T15:51:28.000Z","updated_at":"2024-08-03T23:50:52.000Z","dependencies_parsed_at":"2022-07-23T14:04:17.536Z","dependency_job_id":null,"html_url":"https://github.com/goruby/goruby","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goruby%2Fgoruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goruby%2Fgoruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goruby%2Fgoruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goruby%2Fgoruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goruby","download_url":"https://codeload.github.com/goruby/goruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227410494,"owners_count":17774758,"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":["go","golang","interpreter","language","programming-language","ruby"],"created_at":"2024-08-10T11:01:22.228Z","updated_at":"2024-11-30T19:30:50.136Z","avatar_url":"https://github.com/goruby.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"goruby\n======\n\nGoRuby, an implementation of Ruby written in Go\n\n[![Build Status](https://travis-ci.org/goruby/goruby.svg?branch=master)](https://travis-ci.org/goruby/goruby)\n[![GoDoc](https://godoc.org/github.com/goruby/goruby?status.svg)](http://godoc.org/github.com/goruby/goruby)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/56d0bf11b42e7e40ae59/test_coverage)](https://codeclimate.com/github/goruby/goruby/test_coverage)\n[![Maintainability](https://api.codeclimate.com/v1/badges/56d0bf11b42e7e40ae59/maintainability)](https://codeclimate.com/github/goruby/goruby/maintainability)\n[![Go Report Card](https://goreportcard.com/badge/github.com/goruby/goruby)](https://goreportcard.com/report/github.com/goruby/goruby)\n\n## Contribution\n\nIf anyone wants to help to get the project to the real implementation please ping me or fork it and send a pull request.\n\n## Community\n- [#goruby Channel on Gophers Slack](https://gophers.slack.com/messages/goruby/) (invites to Gophers Slack are available [here](http://blog.gopheracademy.com/gophers-slack-community/#how-can-i-be-invited-to-join:2facdc921b2310f18cb851c36fa92369))\n\n## License\n\nThis project is released under the terms of the MIT License, as found in the\nLICENSE file.\n\n## REPL\nThere is a basic REPL within `cmd/girb`. It supports multiline expressions and all syntax elements the language supports yet.\n\nTo run it ad hoc run `go run cmd/girb/main.go` and exit the REPL with CTRL-D.\n\n## Command\nTo run the command as one off run `go run main.go`.\n\n## Supported features\n\n### `goruby` Command\n- [x] parse program files\n- [ ] program file arguments\n- [ ] Flags\n  - [ ] `-0[octal]`       specify record separator (\\0, if no argument)\n  - [ ] `-a`              autosplit mode with -n or -p (splits $_ into $F)\n  - [ ] `-c`              check syntax only\n  - [ ] `-Cdirectory`     cd to directory before executing your script\n  - [ ] `-d`              set debugging flags (set $DEBUG to true)\n  - [x] `-e 'command'`    one line of script. Several -e's allowed. Omit [programfile]\n  - [ ] `-Eex[:in]`       specify the default external and internal character encodings\n  - [ ] `-Fpattern`       split() pattern for autosplit (-a)\n  - [ ] `-i[extension]`   edit ARGV files in place (make backup if extension supplied)\n  - [ ] `-Idirectory`     specify $LOAD_PATH directory (may be used more than once)\n  - [ ] `-l`              enable line ending processing\n  - [ ] `-n`              assume 'while gets(); ... end' loop around your script\n  - [ ] `-p`              assume loop like -n but print line also like sed\n  - [ ] `-rlibrary`       require the library before executing your script\n  - [ ] `-s`              enable some switch parsing for switches after script name\n  - [ ] `-S`              look for the script using PATH environment variable\n  - [ ] `-T[level=1]`     turn on tainting checks\n  - [ ] `-v`              print version number, then turn on verbose mode\n  - [ ] `-w`              turn warnings on for your script\n  - [ ] `-W[level=2]`     set warning level; 0=silence, 1=medium, 2=verbose\n  - [ ] `-x[directory]`   strip off text before #!ruby line and perhaps cd to directory\n  - [ ] `-h`              show this message, --help for more info\n\n### `girb` Command\n- [ ] parse program files\n- [ ] program file arguments\n- [ ] Flags\n  - [ ] `-f`\t\t    Suppress read of ~/.irbrc\n  - [ ] `-m`\t\t    Bc mode (load mathn, fraction or matrix are available)\n  - [ ] `-d`                Set $DEBUG to true (same as `ruby -d')\n  - [ ] `-r load-module`    Same as `ruby -r'\n  - [ ] `-I path`           Specify $LOAD_PATH directory\n  - [ ] `-U`                Same as `ruby -U`\n  - [ ] `-E enc`            Same as `ruby -E`\n  - [ ] `-w`                Same as `ruby -w`\n  - [ ] `-W[level=2]`       Same as `ruby -W`\n  - [ ] `--context-mode n`  Set n[0-3] to method to create Binding Object,\n                    when new workspace was created\n  - [ ] `--echo`            Show result(default)\n  - [x] `--noecho`          Don't show result\n  - [ ] `--inspect`\t    Use `inspect' for output (default except for bc mode)\n  - [ ] `--noinspect`\t    Don't use inspect for output\n  - [ ] `--readline`        Use Readline extension module\n  - [ ] `--noreadline`\t    Don't use Readline extension module\n  - [ ] `--prompt prompt-mode`/`--prompt-mode prompt-mode`\n\t\t    Switch prompt mode. Pre-defined prompt modes are\n\t\t    `default', `simple', `xmp' and `inf-ruby'\n  - [ ] `--inf-ruby-mode`   Use prompt appropriate for inf-ruby-mode on emacs.\n\t\t    Suppresses --readline.\n  - [ ] `--sample-book-mode`/`--simple-prompt`\n                    Simple prompt mode\n  - [x] `--noprompt`        No prompt mode\n  - [ ] `--single-irb`      Share self with sub-irb.\n  - [ ] `--tracer`          Display trace for each execution of commands.\n  - [ ] `--back-trace-limit n`\n\t\t    Display backtrace top n and tail n. The default\n\t\t    value is 16.\n  - [ ] `--irb_debug n`\t    Set internal debug level to n (not for popular use)\n  - [ ] `--verbose`         Show details\n  - [ ] `--noverbose`       Don't show details\n  - [ ] `-v`, `--version`\t  Print the version of irb\n  - [ ] `-h`, `--help`      Print help\n  - [ ] `--`                Separate options of irb from the list of command-line args\n\n\n### Supported language feature\n- [ ] everything is an object\n\t- [x] allow method calls on everything\n\t- [x] operators are method calls\n- [ ] full UTF8 support\n\t- [ ] Unicode identifier\n\t- [ ] Unicode symbols\n- [x] functions\n\t- [x] with parens\n\t- [x] without parens\n\t- [x] return keyword\n\t- [x] default values for parameters\n\t- [ ] keyword arguments\n\t- [x] block arguments\n\t- [ ] hash as last argument without braces\n- [x] function calls\n\t- [x] with parens\n\t- [x] without parens\t\n\t- [x] with block arguments\n- [ ] conditionals\n\t- [x] if\n\t- [x] if/else\n\t- [ ] if/elif/else\n\t- [x] tenary `? : `\n\t- [x] unless\n\t- [x] unless/else\n\t- [ ] case\n\t- [x] `||`\n\t- [x] `\u0026\u0026`\n- [ ] control flow\n\t- [ ] for loop\n\t- [x] while loop\n\t- [ ] until loop\n\t- [ ] break\n\t- [ ] next\n\t- [ ] redo\n\t- [ ] flip flop\n- [ ] numbers\n\t- [ ] integers\n\t\t- [x] integer arithmetics\n\t\t- [x] integers `1234`\n\t\t- [x] integers with underscores `1_234`\n\t\t- [ ] decimal numbers `0d170`, `0D170`\n\t\t- [ ] octal numbers `0252`, `0o252`, `0O252`\n\t\t- [ ] hexadecimal numbers `0xaa`, `0xAa`, `0xAA`, `0Xaa`, `0XAa`, `0XaA`\n\t\t- [ ] binary numbers `0b10101010`, `0B10101010`\n\t- [ ] floats\n\t\t- [ ] float arithmetics\n\t\t- [ ] `12.34`\n\t\t- [ ] `1234e-2`\n\t\t- [ ] `1.234E1`\n\t\t- [ ] floats with underscores `2.2_22`\n- [x] booleans\n- [ ] strings\n\t- [x] double quoted\n\t- [x] single quoted\n\t- [x] character literals (`?\\n`, `?a`,...)\n\t- [ ] `%q{}`\n\t- [ ] `%Q{}`\n\t- [ ] heredoc\n\t\t- [ ] without indentation (`\u003c\u003cEOF`)\n\t\t- [ ] indented (`\u003c\u003c-EOF`)\n\t\t- [ ] “squiggly” heredoc `\u003c\u003c~`\n\t\t- [ ] quoted heredoc\n\t\t\t- [ ] single quotes `\u003c\u003c-'HEREDOC'`\n \t\t\t- [ ] double quotes `\u003c\u003c-\"HEREDOC\"`\n \t\t\t- [ ] backticks \u003c\u003c-\\`HEREDOC\\`\"\n\t- [ ] escaped characters\n\t\t- [ ] `\\a` bell, ASCII 07h (BEL)\n\t\t- [ ] \t`\\b` backspace, ASCII 08h (BS)\n\t\t- [ ] \t`\\t` horizontal tab, ASCII 09h (TAB)\n\t\t- [ ] \t`\\n` newline (line feed), ASCII 0Ah (LF)\n\t\t- [ ] \t`\\v` vertical tab, ASCII 0Bh (VT)\n\t\t- [ ] \t`\\f` form feed, ASCII 0Ch (FF)\n\t\t- [ ] \t`\\r` carriage return, ASCII 0Dh (CR)\n\t\t- [ ] \t`\\e` escape, ASCII 1Bh (ESC)\n\t\t- [ ] \t`\\s` space, ASCII 20h (SPC)\n\t\t- [ ] \t`\\\\` backslash, \\\n\t\t- [ ] \t`\\nnn` octal bit pattern, where nnn is 1-3 octal digits ([0-7])\n\t\t- [ ] \t`\\xnn` hexadecimal bit pattern, where nn is 1-2 hexadecimal digits ([0-9a-fA-F])\n\t\t- [ ] `\\unnnn` Unicode character, where nnnn is exactly 4 hexadecimal digits ([0-9a-fA-F])\n\t\t- [ ] `\\u{nnnn ...}` Unicode character(s), where each nnnn is 1-6 hexadecimal digits ([0-9a-fA-F])\n\t\t- [ ] `\\cx` or `\\C-x` control character, where x is an ASCII printable character\n\t\t- [ ] `\\M-x` meta character, where x is an ASCII printable character\n\t\t- [ ] `\\M-\\C-x` meta control character, where x is an ASCII printable character\n\t\t- [ ] `\\M-\\cx` same as above\n\t\t- [ ] `\\c\\M-x` same as above\n\t\t- [ ] `\\c?` or `\\C-?` delete, ASCII 7Fh (DEL)\n\t- [ ] interpolation `#{}`\n\t- [ ] automatic concatenation\n- [ ] arrays\n\t- [x] array literal `[1,2]`\n\t- [x] array indexing `arr[2]`\n\t- [ ] splat\n\t- [ ] array decomposition\n\t- [ ] implicit array assignment\n\t- [ ] array of strings `%w{}`\n\t- [ ] array of symbols `%i{}`\n- [x] nil\n- [ ] hashes\n\t- [x] literal with `=\u003e` notation\n\t- [ ] literal with `key:` notation\n\t- [x] indexing `hash[:foo]`\n\t- [x] every Ruby Object can be a hash key\n- [ ] symbols\n\t- [x] `:symbol`\n\t- [x] `:\"symbol\"`\n\t- [ ] `:\"symbol\"` with interpolation\n\t- [x] `:'symbol'`\n\t- [ ] `%s{symbol}`\n\t- [ ] singleton symbols\n- [ ] regexp\n\t- [ ] `/regex/`\n\t- [ ] `%r{regex}`\n- [ ] ranges\n\t- [ ] `..` inclusive\n\t- [ ] `...` exclusive\n- [ ] procs `-\u003e`\n- [ ] variables\n\t- [x] variable assignments\n\t- [x] globals\n- [ ] operators\n\t- [x] `+`\n\t- [x] `-`\n\t- [x] `/`\n\t- [x] `*`\n\t- [x] `!`\n\t- [x] `\u003c`\n\t- [x] `\u003e`\n\t- [ ] `**` (pow)\n\t- [x] `%` (modulus)\n\t- [ ] `\u0026` (AND)\n\t- [ ] `^` (XOR)\n\t- [ ] `\u003e\u003e` (right shift)\n\t- [ ] `\u003c\u003c` (left shift, append)\n\t- [x] `==` (equal)\n\t- [x] `!=` (not equal)\n\t- [ ] `===` (case equality)\n\t- [ ] `=~` (pattern match)\n\t- [ ] `!~` (does not match)\n\t- [x] `\u003c=\u003e` (comparison or spaceship operator)\n\t- [x] `\u003c=` (less or equal)\n\t- [x] `\u003e=` (greater or equal)\n\t- [ ] assignment operators\n\t\t- [x] `+=`\n\t\t- [x] `-=`\n\t\t- [x] `/=`\n\t\t- [x] `*=`\n\t\t- [x] `%=`\n\t\t- [ ] `**=`\n\t\t- [ ] `\u0026=`\n\t\t- [ ] `|=`\n\t\t- [ ] `^=`\n\t\t- [ ] `\u003c\u003c=`\n\t\t- [ ] `\u003e\u003e=`\n\t\t- [ ] `||=`\n\t\t- [ ] `\u0026\u0026=`\n- [x] function blocks (procs)\n- [ ] error handling\n\t- [x] begin/rescue\n\t- [ ] ensure\n\t- [ ] retry\n- [x] constants\n- [x] scope operator `::`\n- [ ] classes\n\t- [x] class objects\n\t- [x] class Class\n\t- [x] instance variables\n\t- [ ] class variables\n\t- [x] class methods\n\t- [x] instance methods\n\t- [x] method overrides\n\t- [ ] private\n\t- [ ] protected\n\t- [ ] public\n\t- [x] inheritance\n\t- [x] constructors\n\t- [x] new\n\t- [x] `self`\n\t- [ ] singleton classes (also known as the metaclass or eigenclass) `class \u003c\u003c self`\n\t- [ ] assigment methods\n\t- [x] self defined classes\n\t- [x] self defined classes with inheritance\n- [x] modules\n- [x] object main\n- [x] comments '#'\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoruby%2Fgoruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoruby%2Fgoruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoruby%2Fgoruby/lists"}