|
|
|
|
|
by chenglou
1772 days ago
|
|
The new way Jai does SoA is through just userland macros: https://www.youtube.com/watch?v=zgoqZtu15kI Tldr SoA isn't a single transformation. Depending on your data access pattern, you might want to shape the structure differently. Kinda like GPU. So first-classing a particular pattern of AoS->SoA conversion (the one we often see in tutorials) wouldn't have been enough. In this case, a little bit of tasteful usage of macros covers the variations well enough. |
|
Jon does a lot of programming streams, and I think anyone who watches his programming streams will recognize that "structure of arrays" is not the default mode that he usually programs in.
That's not even the point of the language.
Yes the language does a lot of what you expect from a modern systems language: structs, explicit memory allocation and management, no header files, etc.
But as far as I can tell, this is just the bare minimum that you should expect from a modern systems language, and the ultimate goal of this language is not to just be that.
The best way I can think of to describe it is collapsing layers into just one: the language and its compiler.
This is why the language has meta programming and code generation built in.
I've seen talks where people boast about how they use a python script to generate a whole lot of C++ code!
I've seen projects written ostensibly in C++ but to build them you need download 10 different tools (including compilers or interpreters for other languages).
Big C++ projects are notorious for being a nightmare to build.
The point of this language is to make it so that you only need one thing: the compiler of this language.
You can write a large system program that builds very quickly and does not need any extra tools to build.
Ultimately even the linker would be deprecated: the compiler would output the executable file directly. But for practical reasons the language has to support linking in order to interop with C libraries.