

Getting started with mruby - mattetti
http://matt.aimonetti.net/posts/2012/04/25/getting-started-with-mruby/

======
Derbasti
I have quite some experience with Lua scripting and embedding. Honestly, I
can't see any other language taking that throne any time soon. For all its
quirks, Lua is an amazingly powerful language that was designed from the
ground up for embeddability.

You know, you can replace Lua's memory allocator with your own by overwriting
one simple function. Your platform does not support double? Lua has you
covered: Change one define, and Lua uses short as its numeric data type. Since
it is all ANSI C, this enables you to run Lua on a fixed-point signal
processor if you must.

And then there is memory consumption and execution speed. Can you fit Ruby in
150k? Lua fits just fine, including its (small) standard library. Also, it is
insanely easy to embed into your C codebase. Basically, it is one include and
one struct you have to carry around and you are all set.

For embedding, Lua is just awesome!

~~~
mattetti
You are absolutely right, the question is can Ruby compete in 80% of the
cases?

~~~
jamesbritt
At the 2nd Ruby conference there was a general discussion (with all 100 or so
attendees :) ) about Ruby's future and where it might find its killer app.

I openly wondered if it would be Web development. Mind you, this was in 2002;
while there were some good Ruby Web frameworks (I think Avi Bryant gave a talk
on Seaside and using Ruby continuations in a Web framework) we had yet to see
the likes of Nitro or Rails poke through to show how crazy easy Ruby could
make it.

The general response was, No, PHP and Perl have a lock on that, Ruby will need
to find some other niche.

Obviously PHP and Perl are still used for Web development, but you don't need
to completely dominate an area to be effective. Just be good enough for enough
people.

As tech changes what makes something a good fit now may not apply later. Size
and speed are important, but as things get faster and more hardware more
robust you no longer be quite as fast or quite as small. Just fast enough and
small enough and good enough.

------
sciurus
Can anyone provide insight into how mruby's implementation differs from the
reference 1.9.3 implementation?

~~~
jgmmo
It's meant to be a minimized version of Ruby. Not full-featured, just the bare
essentials and meant to be able to run on embedded devices/phones. To do so,
mRuby will need to be much smaller than standard Ruby and much faster.

~~~
sciurus
"Not full-featured, just the bare essentials"

Does that just mean a smaller standard library?

"mRuby will need to be much smaller than standard Ruby and much faster"

Right. I'm looking forward to the mruby authors (or someone else skilled at
interpreter design) writing up how that is being accomplished.

