5 ms·
Show HN: Blasjs – Pure Javascript implementation of BLAS
- indescions_2018 8y agoFor most WebGL a 4x4 matrix multiply is all thats needed. GLSL will implement the basics. But all the 3D libraries include matrix ops: threejs, babylon, etc. Then there are standalone math libs like glMatrix and math.gl from Uber. There is even a WebAssembly accelerated library: glmw. Just really curious what sort of simulations or applications one would build with an in-browser BLAS implementation ;)
- Jacobot 8y agoThis library is for fast scientific computing, you can use it for games (its 100k minified and the matrix algos are extreemly fast),
- tzahola 8y agoImpressive! I think you’ve found the least appropriate language for a BLAS reimplementation.
- pjmorris 8y agoAtwood's Law: any application that can be written in JavaScript, will eventually be written in JavaScript. [0] [0] https://blog.codinghorror.com/the-principle-of-least-power/ https://blog.codinghorror.com/the-principle-of-least-power/
- deleted 8y ago[deleted]
- ZeroCool2u 8y agoWhile impressive and seemingly well put together, I can't help but think that if you're doing numerical computation like this, JS is simply not the way to go.
- ben509 8y agoI have a system that does complex simulations on a cluster running numpy, and I'd love to be able to kick an ndarray back to the frontend and it be able to do translations of that data in response to users toggling sliders.
- goatlover 8y agoAre you not able to use a Jupyter Notebook with ipywidgets library for this?
- yig 8y agoThat relies on a python backend.
- joshuamorton 8y agoSo what? They stated they were running numpy, so the scaffolding is already there.
- z3t4 8y agoTypeScript is not "pure" JavaScript. I understand Microsoft has embraced the JavaScript open source ecosystem and extended it, and recently bought the place where most JavaScript open source developers collaborate. But I would not go as far as to say Microsoft's TypeScript is the new JavaScript just yet.
- kjeetgill 8y agoThe appeal of "Pure JavaScript" that they're alluding to is the that this library can be used in any compliant JS environment. The value proposition is no platform dependencies.
- z3t4 8y agoThe description says "Pure Javascript manually written". But it's not. It's actually TypeScript, which if you set up the right environment and install Microsoft tools - it can be compiled to JavaScript. This makes new developers believe that JavaScript is a Microsoft product and that you need Microsoft tools to develop it.
- Jacobot 8y ago* the distributed bundle is always javascript, * it is manual re-write from BLAS reference. * Typescript is a superset of Javascript,. * the repo is selfcontained, "npm install" will install webpack and all tools you need to build the bundle.
- Jacobot 8y agoContext is important, also the context is mentioned explicitly! All other BLAS javascript implementations are just fortran recompiles with "emscripten" to webassembly. This is a (non emscripted) Javascript re-write (Typescript is a superset of Javascript) Yes it is javascript the bundle is an UMD web/node file you can use in your browser!
- wohlergehen 8y agoI would be curious if you've done any benchmarks. It would be interesting to know how close this gets to a "naive" and "expert" regular L3 BLAS.
- Jacobot 8y agoBLAS is BLAS there is no "naive" or "expert" or "regular" variant.