Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Blasjs – Pure Javascript implementation of BLAS (github.com/jacobbogers)
68 points by Jacobot on June 6, 2018 | hide | past | favorite | 16 comments


While 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.


I 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.


Are you not able to use a Jupyter Notebook with ipywidgets library for this?


That relies on a python backend.


So what? They stated they were running numpy, so the scaffolding is already there.


For 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 ;)


This library is for fast scientific computing, you can use it for games (its 100k minified and the matrix algos are extreemly fast),


I 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.


BLAS is BLAS there is no "naive" or "expert" or "regular" variant.


Impressive! I think you’ve found the least appropriate language for a BLAS reimplementation.


Atwood'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/


TypeScript 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.


The 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.


The 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.


* 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.


Context 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!




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: