Recently I needed to do simple mathematical calculations in my REST API. Unfortunately, I could not find any (maintained) library that would allow me to compute things like standard deviation, except Swift 4 TensorFlow, which sounds like overkill dependency.
What about using an existing C library (gnu gsl) and provide friendly Swifty APIs on top of it?
I think this is a great idea. Swift has a lot of potential as a general programming language, but it's still a bit restricted by the fact that most libraries and support out there focus on iOS development. I think adding scientific features like these to the language will be a big step forward. I would personally prefer using Swift over Python for this stuff, as it's a nicer language, and like you noticed, substantially faster.
If you want help with the project, I would be willing to contribute. Let me know if you're interested. :)
Yes, that would be awesome! Feel free to check the repository. I am quite new in the Swift territory, so I will be glad for any ideas about how to do it better. So far, there are only a few functions from GSL, if you would like to add more, perhaps just open an issue and assign it to yourself, so we will not work on the same thing.
Today I implemented automatic code documentation generation.
Many standard library functions can be replaced by some one-liners (albeit long ones), but it doesn't mean they shouldn't exist. In addition to the convenience they bring, things like scientific libraries help bring Swift out of the "Swift is the iOS language" stigma.
sorry for coming this late I would be interested into her to built this, I recently switched to python and I am entering into swift from C/C++ background and after doing stuff on science will be more than happy to help on anything I could :).