Skip to content
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

How I can make a Lunatic-Ruby? #73

Open
xskullcrow opened this issue Apr 26, 2020 · 1 comment
Open

How I can make a Lunatic-Ruby? #73

xskullcrow opened this issue Apr 26, 2020 · 1 comment

Comments

@xskullcrow
Copy link

Hi, I used Lunatic Python to make the Love framework compatible with Python, but right now I want to do the same but instead of Python with Ruby, it has its own C Api, although different from Python or Lua, but is it possible to make a Lunatic Ruby?, that is, in the same way that Lunatic Python was made, but with Ruby, how can I do it?

@greatwolf
Copy link
Collaborator

greatwolf commented Apr 26, 2020

I'm not familiar with the Ruby C api but I'd assume it provides all the tools and functions you'll need to get at Ruby's language features and semantics. I don't see why Lunatic-Ruby isn't possible, it's just a matter of learning and getting familiar with the api and build a bridge with it.

There is the issue of data type mapping and translation; at some point you'll have to decided how you want to handle it from the foreign language. Some of the types are self explanatory, like value/ non-reference types eg. numbers, bools, nil, null, strings etc. But what about other things like functions, closures, array list-type containers, coroutines etc. In lunatic-python most of the latter is handled by wrapping a reference to it in some meta-object and you use that object through that meta-object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants