charlesdaniels / bitshuffle

BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link

Port to JavaScript #58

Open jyn514 opened 6 years ago

jyn514 commented 6 years ago

To avoid heavy-duty hosting like Heroku, it would be nice to have this in native JavaScript. This will also have the benefit of allowing us to host on Github Pages, which only supports static sites.

Waiting on https://github.com/charlesdaniels/bitshuffle/issues/57 and https://github.com/charlesdaniels/bitshuffle/issues/54 https://github.com/charlesdaniels/bitshuffle/issues/51.

charlesdaniels commented 6 years ago

It will also be a good way to ensure our spec is really airtight once I get around to writing it.

We should investigate python to js transpilers before re writing everything from scratch though.


This email was sent from my smartphone.

On Mar 1, 2018, at 23:37, Joshua Nelson notifications@github.com wrote:

To avoid heavy-duty hosting like Heroku, it would be nice to have this in native JavaScript. This will also have the benefit of allowing us to host on Github Pages, which only supports static sites.

Waiting on #57 and #54.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

z2oh commented 6 years ago

I'd be happy to tackle this once the spec is written.

Options are write it to Rust and use WASM (which is cooler and will result in a much faster execution time) or write it in JS. Assuming adequate library support, this shouldn't take too long to rewrite in JS. In fact, I imagine less time would be spent rewriting it than configuring a transplier to work (though transpilation has the added benefit of generating the js code as part of a build step, meaning only one code implementation needs to be maintained.)

However, manually porting the implementation to another language should provide a good test on the robustness of the spec.

jyn514 commented 6 years ago

I would love to see this in Rust. What would a WASM compiler look like? The advantage would be now that it's in both JS, Rust, and Python :D

charlesdaniels commented 6 years ago

I am in favor of Rust as well. The only libraries we should need would be base64, bz2, gzip, and any other compression algorithms we support... I don't think the list is very long, and all of these have C implementations we can link against even if Rust does not have native ports.

jyn514 commented 6 years ago

(and sha256)