Re: Is mruby the future of Ruby language?
"Carlo E. Prelz" <[email protected]> Thu, 27 Jun 2019 21:28:30 +0200
| Newsgroups | gmane.comp.lang.ruby.general |
|---|---|
| Message-ID | <[email protected]> |
Subject: Re: Is mruby the future of Ruby language? Date: gio 27 giu 19 07:07:37 +0000 Quoting Jason Long ([email protected]): > You and your team using "mruby" because it is lightweight? Can Ruby > embedded in other languages? I mean is that can Ruby offer the mruby > features? I add here my datapoint. I use both Ruby and Mruby. The kind of Ruby code I write can be fed to both interpreters practically without changes. Mruby is a little less performing than Ruby - but when I need performance I code in C... Writing C extensions requires different, although similar, syntaxes. What I like of Mruby is that it and its gems are self-contained. As a result of compilation, you obtain a mruby (plus mirb, and mrbc to compile bytecode) command, and a libmruby.a to link into your executable that allows you to start the interpreter from C with one line of code, and feed it ruby code. All the classes belonging to the gems you required in the configuration file are directly available. You do not use 'include' in your mruby code: what is available is present already in the interpreter. You can maintain several mruby source code directories, with different configuration files, on the same machine, and they will refer to possibly different versions of libraries or have/not have libraries or gems. (that means I never install the mruby and mirb commands in /usr/bin or the like - I always specify the complete path, also in shebangs if needed). Carlo -- * Se la Strada e la sua Virtu' non fossero state messe da parte, * K * Carlo E. Prelz - [email protected] che bisogno ci sarebbe * di parlare tanto di amore e di rettitudine? (Chuang-Tzu) Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>