samufi
MModular
•Created by Deftioon on 1/11/2025 in #questions
Is there a way to reflect changes to a variable in the reference?
Same error with
34 replies
MModular
•Created by Deftioon on 1/11/2025 in #questions
Is there a way to reflect changes to a variable in the reference?
gives you the error
34 replies
MModular
•Created by Deftioon on 1/11/2025 in #questions
Is there a way to reflect changes to a variable in the reference?
Is there any instance where you can create a
ref[...] ...
explicitly or where a = f()
with f -> ref[...] ...
does something else than a copy?34 replies
MModular
•Created by Deftioon on 1/11/2025 in #questions
Is there a way to reflect changes to a variable in the reference?
Can you provide an example?
34 replies
MModular
•Created by Deftioon on 1/11/2025 in #questions
Is there a way to reflect changes to a variable in the reference?
This may be true (and would be useful in some instances). But I think that after the old references were renamed to Pointer, references behave in a way that they cannot be stored in a variable.
34 replies
MModular
•Created by Deftioon on 1/11/2025 in #questions
Is there a way to reflect changes to a variable in the reference?
34 replies
MModular
•Created by Deftioon on 1/11/2025 in #questions
Is there a way to reflect changes to a variable in the reference?
I may be wrong w.r.t. trivial types; after trying it out I think this also happens at other types. But I am sure that
q1 = mylist[0]
creates a copy.34 replies
MModular
•Created by Deftioon on 1/11/2025 in #questions
Is there a way to reflect changes to a variable in the reference?
I thought this is intended behaviour for register passable types. Since they are always passed by copy and not by reference,
q1
is not a reference to anything but a simple copy. If it were a reference, you'd need to dereference it first, and the issue Owen pointed out would occur.34 replies
MModular
•Created by samufi on 1/9/2025 in #community-showcase
Larecs: a performance-centred archetype-based ECS
The components are already stored in SoA. Just that the arrays are filled with structs themselves. As long as each component is just a trivial SIMD, everything is fine. But if the components have multiple fields, things get tricky.
16 replies
MModular
•Created by samufi on 1/9/2025 in #community-showcase
Larecs: a performance-centred archetype-based ECS
The components are always stored as Arrays of structs. How would the ECS know that it can split a struct into separate attributes that can be stored in separate arrays?
16 replies
MModular
•Created by samufi on 1/9/2025 in #community-showcase
Larecs: a performance-centred archetype-based ECS
Sorry, I may have misunderstood you. I meant the fields can have different sizes. Each struct (component) has the same size of course.
16 replies
MModular
•Created by samufi on 1/9/2025 in #community-showcase
Larecs: a performance-centred archetype-based ECS
Well, users can come up with weird stuff sometimes. For example a position component where the z coordinate can be lower precision for some reason.
16 replies
MModular
•Created by samufi on 1/9/2025 in #community-showcase
Larecs: a performance-centred archetype-based ECS
My thought was to do something in this direction for components that are an alias for SIMD, but I am not sure how to enforce that this functionality would be used appropriately. More user friendly might be an integration of numojo data types.
16 replies
MModular
•Created by samufi on 1/9/2025 in #community-showcase
Larecs: a performance-centred archetype-based ECS
Of course you could use a larger stride, but this is something the users would need to do - as I do not see a way how Larecs could figure out the memory layout of the components.
16 replies
MModular
•Created by samufi on 1/9/2025 in #community-showcase
Larecs: a performance-centred archetype-based ECS
To me the question is what to do if the components are structs themselves. What do you do if you have a component with components of different sizes?
Edit: a component with fields of different sizes
16 replies
MModular
•Created by gamendez98 on 2/19/2024 in #questions
How long until mojo is production ready(guesstimate)?
What would be the side effects besides adding
raises
to a bunch of places in your code?89 replies
MModular
•Created by gamendez98 on 2/19/2024 in #questions
How long until mojo is production ready(guesstimate)?
ah, no, I think I got it.
89 replies
MModular
•Created by gamendez98 on 2/19/2024 in #questions
How long until mojo is production ready(guesstimate)?
What does that mean? That all functions that do allocations need
raises
?89 replies
MModular
•Created by gamendez98 on 2/19/2024 in #questions
How long until mojo is production ready(guesstimate)?
Which changes are you talking about? The derefencing operator?
89 replies
MModular
•Created by samufi on 9/21/2024 in #questions
How can I use a fixed-size integer type to index a list?
I was not sure if the
int
is a function call (introducing some overhead, maybe copying of values). If it is really equivalent to a "reinterpret cast" in C++, then this is awesome. I do not yet have a feel for what is going on under the hood in mojo.7 replies