samufi🌳
MModular
•Created by Deftioon on 1/11/2025 in #questions
Is there a way to reflect changes to a variable in the reference?
That is, the question was not about "how to make this work" but to show "This makes a copy".
38 replies
MModular
•Created by Deftioon on 1/11/2025 in #questions
Is there a way to reflect changes to a variable in the reference?
The point was to prove that this makes a copy. This stuff not working was the proof. If you add @value, it allows making a copy.
38 replies
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
38 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
38 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?38 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?
38 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.
38 replies
MModular
•Created by Deftioon on 1/11/2025 in #questions
Is there a way to reflect changes to a variable in the reference?
38 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.38 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.38 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