You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, i am currently writing a mgem (in C) which wants to work by sending the numeric values (aka mrb_sym) of nested classes, with top level classes thats no issue.
I got a method which takes a class as an argument, i want to serialize that class name as symbols and not strings and send that to another mruby vm which runs in the same process. (presym is enabled)
The receiving side of that method just gets an array of symbols and then walks the object tree till its found and recreates that class.
aka in pure ruby.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there, i am currently writing a mgem (in C) which wants to work by sending the numeric values (aka mrb_sym) of nested classes, with top level classes thats no issue.
I got a method which takes a class as an argument, i want to serialize that class name as symbols and not strings and send that to another mruby vm which runs in the same process. (presym is enabled)
The receiving side of that method just gets an array of symbols and then walks the object tree till its found and recreates that class.
aka in pure ruby.
now klass is Actor::Testme
but how can i create that array in the first place?
I'm asking since i've benchmarked it that sending the top level classes as mrb_sym instead of string brings a massive speed boost.
Beta Was this translation helpful? Give feedback.
All reactions