-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: Briefer Tutorial #371
Comments
@stellarpower wrote:
std::linalg has some examples of lazy computation using Please feel welcome to contribute examples or tutorial material via pull request! |
Linear algebra in the standard library. Never ceases to impress me a bit how much the language is still trying to keep up, modernise, and strive for better. But very interesting, thanks for pointing me towards it. Were it up to me for numeric computation I think it's time for a DSL that's easily loaded in with other languages that handle any application logic. Type-safe, static/dynamic size, arrays are first-class, JAOT-compiles down for GPU etc., and then just none of the extra stuff that gets in the way for a general programming language. The benefits of SciPy etc. in a standard library but no nasty python, and it won't build if it's not correct. People keep writing libraries to do numerical work within a broad language rather than writing a language just for it, as it's the other stuff that holds it back. It's easy in julia/python but the dynamic typing makes it unsafe and very slow to develop in. In C++ templates are complicated at the best of times so you have to work pretty hard and then find you can't easily unfix one dimension say. Or the library just chooses to let you segfault or perform a runtime check, neither is great. Oh well, a man can dream! If I end up using this much more then would happily open an MR, time permitting (which realistically it never is :S). |
Hi,
Nice work! Having done some stuff before with larger-than-memory matrix multiplications, this looks great. This blog was very interesting and I wonder how it would look with spans instead.
Just a suggestion, as the tutorial mentions that more will be added at some point in the future. I think the present example could be distilled a bit and have more of a sort of "just show me the code" style to start with. All good stuff, but right now I'm a bit tired and it contains more info than I probably need just to know the basic operations and become familiar with how to use it. So whenever that point comes around, personally I think some of what's there, such as layout customisation, could be moved into a "part 2", with "part 1" just being explanation of the extents type, indexing, maybe generating a subrange for a slice, static/dynamic extents, etc.
Just my view though (genuinely, no pun originally intended).
Thanks!
The text was updated successfully, but these errors were encountered: