nmatrix icon indicating copy to clipboard operation
nmatrix copied to clipboard

Fast CSV interface for nmatrix

Open v0dro opened this issue 9 years ago • 8 comments

We could use something like fastest-csv and load data directly from the C interface, no ruby involved. That should be real fast.

v0dro avatar Nov 12 '15 08:11 v0dro

Or maybe even use libcsv.

v0dro avatar Nov 12 '15 08:11 v0dro

I think that'd be awesome.

translunar avatar Nov 12 '15 15:11 translunar

@v0dro What do we want in this issue ? Means should I try to write a wrapper for libcsv to work with nmatrix or, should I implement a CSV reader for nmatrix itself.

khalibartan avatar Jan 19 '16 17:01 khalibartan

I'd prefer libcsv. No point in reinventing the wheel.

Keep in mind that there should be no conversion to Ruby data types after the CSV has been read. Everything should stay in C and be accessible from Ruby once it has been loaded into nmatrix.

You might want to consider making a plugin nmatrix-csv so that a libcsv dependency is not imposed on nmatrix. @mohawkjohn thoughts?

v0dro avatar Jan 20 '16 04:01 v0dro

I agree. It'd be better not to introduce an additional dependency. Perhaps there could be a pure Ruby csv reader as well for it to fall back on.

Here's where such a thing would go: https://github.com/SciRuby/nmatrix/tree/master/lib/nmatrix/io

translunar avatar Jan 26 '16 14:01 translunar

Is this being worked upon ? I'd like to write a ruby wrapper.

lprimeroo avatar Dec 12 '16 17:12 lprimeroo

I don't believe so.

translunar avatar Dec 12 '16 22:12 translunar

Have a look at this: https://github.com/wiseio/paratext

I think its the fastest CSV reader around and having a wrapper over that would be awesome :dancing_women:

v0dro avatar Dec 25 '16 20:12 v0dro