Giter Club home page Giter Club logo

mruby.github.io's Introduction

The mruby programming language

mruby

GitHub Super-Linter

What is mruby

mruby is the lightweight implementation of the Ruby language complying to (part of) the ISO standard with more recent features provided by Ruby 3.x. Also, its syntax is Ruby 3.x compatible except for pattern matching.

You can link and embed mruby within your application. The "mruby" interpreter program and the interactive "mirb" shell are provided as examples. You can also compile Ruby programs into compiled byte code using the "mrbc" compiler. All these tools are located in the "bin" directory. "mrbc" can also generate compiled byte code in a C source file. See the "mrbtest" program under the "test" directory for an example.

This achievement was sponsored by the Regional Innovation Creation R&D Programs of the Ministry of Economy, Trade and Industry of Japan.

How to get mruby

To get mruby, you can download the stable version 3.3.0 from the official mruby GitHub repository or clone the trunk of the mruby source tree with the "git clone" command. You can also install and compile mruby using ruby-install, ruby-build or rvm.

The latest development version of mruby can be downloaded via the following URL: https://github.com/mruby/mruby/zipball/master

The trunk of the mruby source tree can be checked out with the following command:

$ git clone https://github.com/mruby/mruby.git

mruby homepage

The URL of the mruby homepage is: https://mruby.org.

Mailing list

We don't have a mailing list, but you can use GitHub issues.

How to compile, test, and install (mruby and gems)

For the simplest case, type

rake all test

See the compile.md file for the detail.

Building documentation

There are two sets of documentation in mruby: the mruby API (generated by YARD) and C API (Doxygen and Graphviz)

To build both of them, simply go

rake doc

You can also view them in your browser

rake view_api
rake view_capi

How to customize mruby (mrbgems)

mruby contains a package manager called "mrbgems" that you can use to create extensions in C and/or Ruby. For a guide on how to use mrbgems, consult the mrbgems.md file, and for example code, refer to the examples/mrbgems/ folder.

License

mruby is released under the MIT License.

Note for License

mruby has chosen a MIT License due to its permissive license allowing developers to target various environments such as embedded systems. However, the license requires the display of the copyright notice and license information in manuals for instance. Doing so for big projects can be complicated or troublesome. This is why mruby has decided to display "mruby developers" as the copyright name to make it simple conventionally. In the future, mruby might ask you to distribute your new code (that you will commit,) under the MIT License as a member of "mruby developers" but contributors will keep their copyright. (We did not intend for contributors to transfer or waive their copyrights, actual copyright holder name (contributors) will be listed in the AUTHORS file.)

Please ask us if you want to distribute your code under another license.

How to Contribute

To contribute to mruby, please refer to the contribution guidelines and send a pull request to the mruby GitHub repository. By contributing, you grant non-exclusive rights to your code under the MIT License.

mruby.github.io's People

Contributors

andrew-colman avatar bovi avatar carsonmcdonald avatar cremno avatar dependabot[bot] avatar herwinw avatar hir0 avatar hlogmans avatar jakitliang avatar jbampton avatar jemc avatar joeljuca avatar juanitofatas avatar komainu8 avatar koooge avatar matz avatar mimaki avatar nuclearsandwich avatar oppegard avatar pbosetti avatar picohz avatar rmosolgo avatar sagmor avatar stomar avatar suzukaze avatar takahashim avatar znz avatar zzak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mruby.github.io's Issues

Broken links

I found some broken links on http://mruby.org/docs/api/.

  • index(top-left)
  • doc/guides/compile.md
  • doc/guides/mrbgems.md
  • MIT License.
  • contribution guidelines

I guess this page is mruby/mruby/README.md.
So, I couldn't come up with good modification. 😒

Content issue with article "executing-ruby-code-with-mruby"

Some time ago I followed the mentioned tutorial. But the last part (Bytecode (.c)) seems to be a bit confusing for a beginner:

This line: "To execute this bytecode the following boilerplate has to be written:"
I think the most straightforward tip for beginners is to write a file "test_main.c" with this code, and add a include to "test_program". This way, if the generated code is updated everything can be kept. (I was confused as where to add the boilerplate code, and could not get it working together with the array.)

Then the compile command is:

gcc -std=c99 -Imruby/include test_main.c test_program.c -o test_program.o  mruby/build/host/lib/libmruby.a

This makes this example just a bit more specific so an experimenting user only has to follow this tutorial exactly.

Logo

I've put together something to start with and I'm using the logo provided by @h2so5 however it isn't an "official" logo. If there is any objection to this please raise it here. I don't know if @matz needs to bless a logo or not but that would remove any questions.

This is what it looks like:
logo

Gem staleness indication

Now that MRuby has been around for a number of years it's a bit tricky to sort through gems to know what's possibly up-to-date and what's likely abandoned and no longer compatible. Is there any interest in adding a bit of metadata to mgems.yml to make it easier to highlight what's likely maintained and what's likely not?

https://fundamental-code.com/mruby-timeline/ is something I put together with a bit of git log parsing. There are plenty of short lived gems from 2016 and earlier which I'd wager likely have some compatibility issues with how MRuby has evolved over the years.

How do I properly add newly generated docs to mruby.github.io?

The last bit of documentation I wrote was approved of and merged by @matz into mruby. Now I want to add the documentation to mruby.org. Usually what would happen is that I'd generate the doc using mruby-yard. In this case, the only thing that changed was that I added docs to string.h. So I'd then take the generated doc in this case a file called mruby_2Fstring.h.html. Then I'd just copy and paste it to the proper directory in mruby.github.io then I'd do a PR. Of course, if it's merged it would then go live. Is that still okay? Because I remember before @zzak said that the size was too big. I want to make sure I do this correctly this time!

Add AccessLint for automated web accessibility testing

Setup a free plan for open source.

AccessLint brings automated web accessibility testing into your development workflow. When a pull request is opened, AccessLint reviews the changes and comments with any new accessibility issues, giving you quick, timely, and targeted feedback, before code goes live.

AccessLint helps you keep on target with digital accessibility by giving specific, ongoing accessibility feedback to your team. It can catch simple errors that might break your website for your customers with disabilities.

Accessibility guidelines defined in WCAG 2.0 help us build applications that work better for more people. They also give us a rough measure of compliance with legal requirements outlined in the ADA and Section 508. AccessLint runs a growing list of WCAG 2.0 tests, e.g. missing alt attributes that make pages more opaque for screenreader users, positive tabindex values that can create confusion for keyboard users, invalid ARIA, and unlabelled fields.

https://github.com/marketplace/accesslint

Use Percy for pixel perfect diffs. Visual regression testing free to start πŸš€πŸš€

We can just snapshot a reduced numbers of pages or only the core pages like the home page and the pages in the menu.

That would be 6 pages to start. When you run out of free monthly snapshots it just stops for the rest of the month.

5,000 free screenshots a month we can just snapshot at one browser width, so only one snapshot per page.

It works on pull requests and there are various ways to use it including on Circle CI.

Percy does pixel perfect diffs or visual regression testing.

https://docs.percy.io/docs
https://percy.io/pricing

Screen Shot 2020-12-24 at 6 10 47 pm

Screen Shot 2020-12-24 at 6 09 22 pm

Screen Shot 2020-12-24 at 6 08 22 pm

Screen Shot 2020-12-24 at 6 07 40 pm

News about 1.4 release is missing from the website

Latest news on http://mruby.org/ is 1.3.0 released despite 1.4.1 being already out. That seems a bit confusing. Probably would be good idea to write at least short notice saying Hey, 1.4.1 is out. so it looks more up to date. Having What’s new in mruby 1.4.{0,1} would be nice too but I'm not qualified to write that...

Fix Google Lighthouse errors

I will be working on some of the list of issues from the current master from the Lighthouse report attached.

I have already started with PR #84

Google Lighthouse is an open-source, automated tool for measuring the quality of web pages. It can be run against any web page, public or requiring authentication. Google Lighthouse audits performance, accessibility and search engine optimization of web pages.

https://developers.google.com/web/tools/lighthouse

mruby-site-lighthouse.pdf

Need to add JSON Feed

https://jsonfeed.org/

JSON Feed is a Web feed file format for Web syndication in JSON instead of XML as used by RSS and Atom.

A range of software libraries and web frameworks support content syndication via JSON Feed. Supporting clients include NetNewsWire, NewsBlur, and Reeder. Notable publishers include NPR.

Templates for rendering JSON feeds for your Jekyll blog -> https://github.com/snaptortoise/jekyll-json-feeds

https://github.com/vallieres/jekyll-json-feed
https://github.com/jguadagno/jekyll-json-feed
https://github.com/lildude/jekyll-json-feed
https://github.com/tedchoward/tidbits/blob/master/feed.json
https://ndarville.com/blog/2017/05/19/json-feed-for-jekyll/

refs #95
refs #94

Add Imgbot to optimize the images. Lossless compression. No loss in quality

Relax while Imgbot optimizes your images.
Don’t spend another second worrying about compressing your images. Install Imgbot into your GitHub projects, and focus on your application.

Lossless compression is a class of data compression algorithms that allows the original data to be perfectly reconstructed from the compressed data. By contrast, lossy compression permits reconstruction only of an approximation of the original data, though usually with greatly improved compression rates. Lossless data compression is used in many applications. For example, it is used in the ZIP file format and in the GNU tool gzip.

https://imgbot.net/
https://en.wikipedia.org/wiki/Lossless_compression

Screen Shot 2020-12-24 at 10 57 47 pm

Turn off frames

It seems like mruby.org is running inside a frame, but I don't know enough about how the template is generated to be able to fix it. I think it's generated using yard-mruby.

For example:

  1. Go to mruby.org/
  2. Click any link.
  3. The address bar still says mruby.org

I think we should avoid using frames if possible.

/cc @sagmor @Mav7

Manage of Website

Hi,

I wonder how we should manage the content of the website. Over at www.ruby-lang.org we are using Jekyll for it and it worked quite well for the site due to its heavy content for different languages. I guess we don't need to support the same amount of languages like ruby-lang, so Jekyll might be overkill. Any thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.