Friday, April 17, 2009

Onion 0.0.2 has been released

Onion, or Array Onion, allows peeling an array like an onion. It shreds one layer after another, from the outer inwards the inner nested array, according to the given depth. Infinite depth (or greater than current nested array depth) is equivalent to Array#flatten.

gem install Onion

Version 0.0.2 introduces few changes:
  • Improved Performances
  • 100% Code Coverage
  • You Can Now peel!
  • Small Bug Fix

2 comments:

  1. I actually love very much the concept. Great name, sounds like a brand. Are you planning to expand it? Use it for other programming languages?

    ReplyDelete
  2. It's definitively a catchy name for a simple Array extension but I had the feeling that it would really represent the idea behind the concept.

    This is difficult to plan additions to Onion due to its simplistic nature. I am open to ideas, if you have any. Onion could eventually support nested hashes but it's challenging since it requires a proper hash resolution system (to remain meaningful as they get peeled).

    By the way, you can download the gem and copy the main file (onion.rb) code to your RPG Maker script editor. It doesn't rely on any external dependencies and thus can be used in your scripts. Fully open source as well!

    I am not sure whether it would be suitable for other programming languages. Probably not all of them. Some languages don't support nested arrays or have other limitations.

    Finally, Onion was initially meant to be a supporting feature in L10nTool rather than having a life on its own. It's not like this has a huge future ahead. =)

    ReplyDelete