Confusingly, it doesn't seem to have much to do with data-oriented design. https://en.wikipedia.org/wiki/Data-oriented_design
Ballerina: A Data-Oriented Programming Language
11–20 of 22 posts
Re: Ballerina: A Data-Oriented Programming Language
#12No mention of data layout or storage, so it's just an in-memory pointer chasing thing. If I load it with a million records is it going to run out of memory?
It mentions null as the billion dollar mistake. The only problem with null is how SQL treats it in joins and rollups, otherwise there is no problem with it. Another sign that the language is targetting the wrong audience.
Re: Ballerina: A Data-Oriented Programming Language
#13It looks as far from a data oriented language as it can be. It's yet another algol, specifically javascript/typescript variation. How does it help with joins, group bys, pivots, explodes, etc? No mention of those, just some javascript like operations. No mention of data layout or storage, so it's just an in-memory pointer chasing thing. If I load it with a million records is it going to run out of memory? It mentions…
[1] https://blog.klipse.tech/visualization/2021/02/16/data-relat...
Re: Ballerina: A Data-Oriented Programming Language
#14Ballerina is quite interesting and its flexible structural typing seems to make it a great fit for solutions that weave together multiple services. One thing that the article does not highlight is the interop story [1]. It is currently hosted on JVM, but that is supposedly intended to be an implementation detail. So unlike Kotlin explicit ffi bindings are needed. This may create some friction for early adopters, but…
Ballerina team told me that in the future Ballerina will not be hosted on JVM.
Re: Ballerina: A Data-Oriented Programming Language
#15Original post follows:
It seems this is almost possible in C#. Missing is the required property proposal [0], so currently the choice is between having everything be optional, or using explicit constructors (which loses most of what is wanted here). But that does not seem like a huge difference:
Member m = new()
{
FirstName = "Kelly",
Books = new()
{
new() { Author = "Hohlbein, Wolfgang" },
new() { Author = "Tchaikovsky, Adrian" }
}
};
Definitions: public record struct Book
{
public string Author { get; set; }
}
public record struct Member
{
public string FirstName { get; set; }
public List Books { get; set; }
}
[0]: https://github.com/dotnet/csharplang/issues/3630Re: Ballerina: A Data-Oriented Programming Language
#16 int z = 1;
auto x = [=] { .foo = z, .bar = {4,5,6}, .baz = "" };
Combined with the ability to introspect things at compile-time available in c++20, I think that this would get 99% there for common data-oriented design designs, without the need for a completely new programming language such as Ballerina.Re: Ballerina: A Data-Oriented Programming Language
#17I discovered pydantic-core [1] which is a backend of sorts for pydantic written in Rust. It is yet to be integrated into pydantic, but once the integration is done, the author expects a potential 10x speed improvement.
Re: Ballerina: A Data-Oriented Programming Language
#18Earlier quoted context omitted.
Ballerina team told me that in the future Ballerina will not be hosted on JVM.
> Ballerina team told me that in the future Ballerina will not be hosted on JVM. They also told me that back at Kubecon in 2018 :D
Re: Ballerina: A Data-Oriented Programming Language
#19In C++ I very often find myself wanting to have the ability to define a type inline - e.g. my ideal syntax would look like int z = 1; auto x = [=] { .foo = z, .bar = {4,5,6}, .baz = "" }; Combined with the ability to introspect things at compile-time available in c++20, I think that this would get 99% there for common data-oriented design designs, without the need for a completely new programming language such as Bal…
https://github.com/gpderetta/libtask/blob/master/tests/q_test.cpp#L160
Note the macro is $, tup is just a C++ function.
It doesn't handle your .bar case, but would be very easy to extend tup to handle initializer lists.(No, I do not use it in production, it is mostly a fun curiosity, but yes, I wish lightweight named tuples were part of the language).
Re: Ballerina: A Data-Oriented Programming Language
#20Confusingly, it doesn't seem to have much to do with data-oriented design. https://en.wikipedia.org/wiki/Data-oriented_design
This gets brought up a lot. Data orientation was a term coined in two different programming communities: game engines and information systems. The terms have overlap and some of the implications are similar. But there are also significant differences as the game programming term focuses on data layout and performance, while the information system term is more about simplicity and leverage. They both are divergences s…
My understanding based on talks by Mike Acton and others is that DOD is biased against adding unnecessary abstraction, which in turn makes it easy to understand (i.e., maintain) the software. If you can reason about what your program is doing - which bytes are read and which are written, adding things on top might be unnecessary and hurt readability. You don't necessarily need to care about optimising for cache hits or data alignment; if your software needs to 1. read a "name" from the network, 2. make sure it's lowercase and 3. write it to the database, then just do that. There's no need to have a "name" object with constructors, getters and setters; there's no need to split your functionality into 1000 "reusable" little modules. The only time you'd use a class is when it helps prevent resource leak, so you'd use RAII when opening files in C++ to make sure they close when leaving the scope.
It's a long discussion :)