Hacker News new | ask | show | jobs
by bee_rider 17 days ago
Yeah, I’m curious what put them in that case here, though. There are high quality open source linear algebra codes out there, so I’m surprised that they needed something generated. (But, just surprised and curious to hear more, not saying they are wrong or anything like that).
1 comments

Here is an example. I wrote a MacOS app in Objective-C++/C++ that used Eigen's JacobiSVD solver at one point. A colleague of mine use Claude to port it into a web tool that used JavaScript. I scrolled thru the JS code and saw that is wrote is own Jacobi SVD solver. So I assume it did this match the exact behavior of the MacOS app -- using a 3rd party solver may not accomplish this. SVD solvers can behave differently in different use cases. What are the options for JS?
Not sure, I’m not familiar with the web ecosystem. Not familiar at all, so my next question will probably be stupid. Would it have been possible to compile your C++ library to WebAssembly?
I am sure it probably was - a bit heavier option. There other mobile / VR / XR apps that I had to port to a variety of platforms using languages like Swift and Kotlin -- each platform has its own vector library. These don't necessarily provide SVD routines. Apple has their Accelerate framework, but is very unnatural to use IMO -- and Swift and C++ don't play that well together regardless of what folks say (that is why I tend to still use Obj-C++ when I have a choice).

There was another app where I had a 3x3 shear transformation that I needed to decompose into a rotation * scale * rotation which is exactly what SVD does (see https://tinyurl.com/384mkdvh). No need to bring in a full linear algebra package just for that.