-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are you manually rebuilding it or are you generating the code from the mruby project? #1
Comments
I'm not sure about what you need to use Ruby. This project is still experimental to re-implement mruby in pure Go. The reason is:
However, you need to consider that the mruby is not 100% the same as CRuby, the mruby is lightweight and can be easily embedded into other applications. You can image mruby is more like Lua. This project has a lot of different designs with mruby. For example, I use Go's type to replace |
I got it working by embedding downloading the latest and embedding it then running it when needed as a memfd. You can have the output as a hash that already exists projects that let you convert that hash to Go structs. But I totally agree this method is not great. I was looking at the new project purego which helps you remove cgo from your codebase, which there are several reasons why that is ideal and Ill assume you know them. I do get mruby is smaller and honestly is a better goal. I already started using ruby to configure vagrant like VMs. I like using it as a configuration language, but mruby is even better. I will look at the go-lua, I have been interested in specifically those projects because I do think they serve as a guide to do the addition. And obviously mruby would be a better configuration language. I would like to find ways to help if possible, I have a lexer and parser for ruby already built. I even have a basic VM but the classes are not complete. |
The parser isn't the priority feature for this project. I plan to use Giving some PR to this project is welcome. However, this project still needs many re-designed from mruby. (e.g. use Go's GC, and type, how the extension works, etc.) It will cause many times rewrites to adjust the design can fit Go's language feature. By the way, Ruby 3 adds prism to generate the parser which is my best option to make this project compile Ruby code. |
I appreciate the information, it is helpful on how I can make contributions
and get a better idea of what you expect from the project which is critical
to being able to contribute. I love the goal and I think you clearly have a
vision for how it should work.
I actually have not actually looked into Ruby 3 so I will look into prism,
and the other features added. I have been too deep into Go to play with
Ruby recently.
If you have the time, can you explain in more detail what rewrites you have
in mind? I think with collaboration we could get this live faster. I have
been reviewing the lua examples to try to get a good idea on structure.
…On Mon, Jan 29, 2024 at 12:01 AM 蒼時弦や ***@***.***> wrote:
The parser isn't the priority feature for this project. I plan to use mrbc
until the mruby virtual machine gets completed support written in go.
Giving some PR to this project is welcome. However, this project still
needs many re-designed from mruby. (e.g. use Go's GC, and type, how the
extension works, etc.) It will cause many times rewrites to adjust the
design can fit Go's language feature.
By the way, Ruby 3 adds prism <https://github.com/ruby/prism> to generate
the parser which is my best option to make this project compile Ruby code.
—
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZRD5OEJK455QWYNFDHEVYLYQ5JOLAVCNFSM6AAAAABCJPZSNGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJUGE2TIMJRG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Currently, my works depend on I didn't have any plans for now because it is still my toy project. My work will try to rewrite mruby's C code to Go if possible. And use more cleaner way if Go provides related language features. |
Just curious about your strategy because I have gotten close to rewriting a lot of Ruby in Go but then realized I should have generated the code from the original C project.
Recently I have considered using purego package to include libruby
Do you still have to essentially implement each major data type?
The text was updated successfully, but these errors were encountered: