6 ms·
Mruby: Ruby for Embedded Systems
- nateb2022 10mo agoAlso worth a mention: mruby/c (https://github.com/mrubyc/mrubyc https://github.com/mrubyc/mrubyc), which is an even smaller ruby for single-chip microprocessors
- sillyboi 10mo agoLet's call it Murby :)
- shevy-java 10mo agoI think the name mruby kind of makes sense; we have MRI (matz ruby implementation) so the leading "M" there; we have jruby too. We also have truffleruby which is a bit against that name scheme ... but we could call it truby. Nobody does that, but we could. And MRI could also be called c-ruby. These are not great names though. Murby is also not a great name; it reminds me of Murphy from Robocop though.
- Broussebar 10mo agoThe best use case for Mruby I saw is this talk: "Developing your Dreamcast games with mruby"[0] by Yuji Yokoo [0]: https://m.youtube.com/watch?v=ni-1x5Esa_o https://m.youtube.com/watch?v=ni-1x5Esa_o
- shevy-java 10mo agoI'd like mruby as some kind of fail-save boot system. Ruby powering the operating system as much as possible (ultimately ruby is just syntactic sugar over C, though, so I am fine using C of course). The lack of documentation means that I'd just waste my time though. Not going to do that. Also, I think mruby and MRI should not be separate. It doesn't do the project any good. It should be as modular as possible but one code base only.
- BenjiWiebe 10mo agoI know both C and Ruby, and Ruby is far more than syntactic sugar over C. Like not even close.
- pansa2 10mo agoMruby isn’t aimed at embedded systems, it’s “lightweight Ruby” intended to be embedded within a lower-level application. The language it’s most similar to is Lua. My gut feeling comparing the two is that mRuby is a better (or at least less “quirky”) language, but Lua has a better (more robust) implementation. I don’t know how the two compare in terms of performance or “lightweight-ness”. Lua definitely seems to be more widely-used, at least outside Japan.
- shevy-java 10mo agoAgreed. Lua is older though. It was created in 1993. mruby was created in 2012. I have only two gripes with regard to mruby. 1) The primary users are C hackers. That's ok, but it means it also leaves out many other people. (Lua has the same problem of course.) 2) Documentation. This is something that really plagues about 90% of ruby projects. And it's not getting any better. It is as if in ruby, only 10% care about documentation - at best. Look at rack, opal, wasm for ruby - the documentation is TOTAL TRASH. Non-existing; look at rack. What a joke. Now that ruby is following perl in its extinction path (sorry, the numbers are hard and real, there is no way to deny it), the ruby community should instead try to reverse that trend. Instead you see mega-corporations such as shopify pwning the remaining ecosystem and cannibalizing on it or people such as DHH rant about how Europe is collapsing (what the actual ... https://world.hey.com/dhh/europe-is-weak-and-delusional-but-not-doomed-8b10e7cb https://world.hey.com/dhh/europe-is-weak-and-delusional-but-... - we need an alternative to rails, how can anyone still work with DHH? Lo and behold, another shopify guy. The message is so clear for everyone to see now). None of this will of course revitalize ruby. Without an active AND actively growing community, ruby is set to die. I say this as someone who still uses ruby daily; I am tired of the "rumours of ruby dying are exaggerated". Yes, the rumours are exaggerated - but they are not rumours. The numbers are solid. TIOBE alone, with its 10000 faults, shows this trend clearly.
- evolve2k 10mo agoHanami remains a bright spark as an alternative growing Ruby app framework to Rails. The project is under active development, I’ve met the core dev and they are lovely and much more humble than DHH and the project aims to stick much closer to the Ruby ways of doing things as opposed to the rails way. Sure the project just can’t be as mature as Rails but it deserves a look and we need to get behind projects like this if we do indeed want to see Rails alternatives flourish and grow. https://hanamirb.org/ https://hanamirb.org/
- grimgrin 10mo agoalso possibly interesting to some is the cosmopolitan libc inclusion: https://github.com/mruby/mruby/pull/6681 https://github.com/mruby/mruby/pull/6681
- sethammons 10mo ago/me tips fedora: "m'ruby" I'm sorry, first thing that came to mind.
- deleted 10mo ago[deleted]
- quapster 10mo ago[flagged]
- riffraff 10mo agoIIRC MRuby is also used as the implementation for the DragonRuby game engine[0] [0] https://dragonruby.org/ https://dragonruby.org/
- Asmod4n 10mo agoThe one thing I like the most about mruby is the way you can ship apps. When you normally want to ship apps which are written in Java, C#, python etc. you have to tell your users they have to download that runtime and your deps and how to start the runtime and which args to start your app from the command line. With mruby you can just ship one file and everything is self contained.
- smarx007 10mo agoFor dotnet, there is a built-in flag "--self-contained".
- vips7L 10mo agoFor Java, there is a built-in command: https://docs.oracle.com/en/java/javase/17/docs/specs/man/jpackage.html https://docs.oracle.com/en/java/javase/17/docs/specs/man/jpa...
- Alifatisk 10mo agoThis feature alone is a reason why I in some occasions use MRuby, when I have a Ruby script I want to share as standalone binary. I sometimes don't even have to rewrite anything, it just works.
- sea-gold 10mo agoPrevious discussions: April 2012 (55 comments, 174 points): https://news.ycombinator.com/item?id=3866555 https://news.ycombinator.com/item?id=3866555
- js4ever 10mo agoLooking for a good tutorial about Visual Basic for Real time rocket guidance, any repo you can recommend?
- deleted 10mo ago[deleted]
- aidog 10mo agoNoteworthy in the MRuby universe, which is all about lightweight Ruby implementations is picoruby. You can get an integrated ruby shell on a Raspberry Pi Pico: https://www.youtube.com/watch?v=WiJC_v5Lus8 https://www.youtube.com/watch?v=WiJC_v5Lus8 https://picoruby.org/ https://picoruby.org/
- moth-fuzz 10mo agoI love Ruby and have tried to use mruby several times, but the one thing that always becomes an issue is that it uses Ruby’s own native-extension build system for compilation, which is configured in Ruby itself. It makes it a total pain to include in other build systems, or when compiling to other targets (i.e. WASM) Frankly, I love Ruby as a language, but if it were as easy to embed as Lua I would have no reason to use Lua.
- flakiness 10mo agoI believe even in Japan Lua is more popular because of the reasons mentioned in other threads. When I worked at a game studio there Lua was the script engine of the choice, mostly because other companies are also using it and there was a tribal knowledge of the language. Mruby was a good attempt but I don't think they have become a competitive options.