red-data-tools / unicode_plot.rb

Plot your data by Unicode characters
MIT License
245 stars 12 forks source link

Support JRuby #27

Open mrkn opened 4 years ago

mrkn commented 4 years ago

For supporting JRuby, we first need to let enumerable-statistics support JRuby.

mrkn commented 4 years ago

https://github.com/mrkn/enumerable-statistics/issues/20

schneems commented 3 years ago

I think this could be somewhat related to https://github.com/red-data-tools/unicode_plot.rb/issues/31. If we made a pure ruby version of this library then it would support Jruby out of the box. Then the only two other places (i think) in here that are actually using enumerable-statistics are Array#histogram and Array#percentile.

I've already taken the liberty of writing a pure ruby version of Array#histogram here github.com/zombocom/mini_histogram. It matches the interface provided by enumerable-statistics on purpose. Array#percentile would be pretty easy to code up.