

Vectorious – A generalized n-dimensional matrix and vector library in JavaScript - megalodon
http://mateogianolio.github.io/vectorious/

======
14113
I'm a little bit confused as to the purpose of this library, aside from "we
would like an abstract linear algebra library". If it's for scientific
computing, why is it in Javascript? High performance linear algebra code is
hard enough in C or Fortran, so Javascript is an awful choice! If however,
it's for applying "interesting" transforms to vector graphics, why does it
have such a low level interface (e.g. access to individual elements of
vectors)?

~~~
chaosfactor
I agree with this guy! Computers will never be fast enough to justify the use
of a forward thinking library like this! Nevermind future integrations with
the GPU or SIMD or technological enhancements we can't even imagine! Why,
Javascript is so slow I don't even know why I stopped browsing with wget piped
to e-mail like Stallman!

~~~
14113
You've exactly proved my point - "future integrations with the GPU/SIMD" \-
they're not the future - they're now. If you want to leverage them, don't
write javascript. Or at least, don't write pure javascript implementations,
call down to a C or Fortran implementation - which as I said, are hard enough
to tune.

If you do want to write javascript however, why not write something more
application based, why does it need to be raw linear algebra? Like an image
processing library, or a linear-transforms-for-svg library[0]? Why do you need
the raw linear algebra primitives, such as being able to map across elements?

Your snark towards my criticism is also absolutely ridiculous - no offense to
the author, I think this is quite cool, but it is in no way "forward
thinking". I could link to tens of other javascript linear algebra libraries,
so why is this one the best? And more importantly - why should it be shielded
from criticism?

[0] I will admit, there is something similar to this, based off this library:
[https://github.com/mateogianolio/vectorious-
plot](https://github.com/mateogianolio/vectorious-plot) which slightly
detracts from my argument, but also bolsters it - as it proves that this
library is only really useful with an application library wrapped around it.

~~~
jvickers
It's useful having some code in JavaScript. Even if its not fast enough for
some things, having a nicely organised and documented library can be very
useful.

Optimizations, using Typed Arrays, could make the code considerably faster.
C++ addon code could make it faster still. Intrinsics within that addon code
could use SIMD. While this library certainly is a lot slower than the
equivalent C or Fortran, it's got potential, and it's not something that I'd
dismiss as being pointless because it's a particular thing that's written in
JavaScript.

Also, in the browser, language choices are very limited. Another reason why
having JavaScript code that does a variety of things (including vector maths)
is useful.

