When comparing mruby vs Racket, the Slant community recommends Racket for most people. In the question“What are the best scripting languages for game development?” Racket is ranked 8th while mruby is ranked 11th. The most important reason people chose Racket is:
Realm of Racket teaches the big-bang approach for managing world state. It does so by walking the reader through the development of small games. There are few guidebooks that are as useful and entertaining.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Easy to embed in C or C++ programs.
Mruby is far more easy to embed in C or C++ programs than other scripting languages. No need to manage the stack, you just get the arguments back in your wrapper function and convert them from mruby to C with a single function call.
Pro Small
Pro A powerful, flexible OOP scripting language.
Mruby implements most of Ruby up to the 1.9 version. This means you get an extremely powerful scripting language with many features such as true OOP, lambdas and blocks, garbage collection, lexical scoping, mixins, built in arrays and hash maps, powerful string manipulation functions, ...
Pro Rather lightweight
Of all the Ruby implementations, mruby is the lightest and easiest to embed into your C or C++ game.
Pro Realm of Racket is an excellent entry-level guidebook
Realm of Racket teaches the big-bang approach for managing world state. It does so by walking the reader through the development of small games. There are few guidebooks that are as useful and entertaining.
Pro Racket was designed to teach functional programming from the start
Racket is based on Scheme (LISP Family) and is very similar to Clojure. So there are a ton of (). The reason it is easier to learn is that it is not trying to be "Pure" if there is even such a thing in terms of Functional Programming. The great thing about Racket is it has everything included. You get DrRacket for developing programs. You want to add a picture to your software you can insert pictures. If you want to add libraries just open the package manager. The Syntax is an opinion but it really does feel easier to see what is happening since everything is in brackets)
Racket is a really a Programming Language for making Programming Languages. So there are smaller syntax Racket called Student Racket which makes things easier to pick up.
Pro Free resources to Learn
Includes several free online books and great documentation.
Pro Great RPEL IDEA included Dr. Racket
Pro Active community
Racket has an active community of users/developers that makes it easy to get help when needed.
Pro Syntax fits to functional programming
Although syntax is different from that of mainstream languages, S-expressions are a perfect match to functional programming.
Pro Subtly encourages functional programming
Racket makes it inconvenient to pursue imperative habits while encouraging functional programming by Lisps's syntax. For example, the syntax for defining a function is almost the exact same as defining a variable. In addition, Racket has a strong set of higher-order functions built in to the language.
Pro Easily embeddable
Racket is famously embedded in the game engine underlying Naughty Dog's Uncharted and The Last of Us games, because it proved to be so easy to embed.
Cons
Con Smaller ecosystem than plain Ruby
Mruby is less popular than plain Ruby, and newer. It is less well documented.
Con Using the garbage collector needs some thought
The mruby garbage collector is more eager than that of Matz Ruby. It is sometimes neccesary to call mruby write barrier functions to protect allocated mruby memory from collection.