Ryan
MModular
•Created by Ryan on 11/1/2024 in #questions
How Unsafe/Safe is this code?
I needed a way to store lists of data of different types in a list, so I have created a list like type that can store any type that conforms to
CollectionElement
. It works well and doesn't have any memory errors, but I wanted to get a second opinion on if it seems safe enough to use.
One issue it has is that I can't check the type when you append or get from it since it does not store type info. Currently I just store the types size and compare to that.
The code was a bit too long to fit in one message, so here is a link to it.
https://gist.github.com/RyanLeber/d9ca608a3334482283c81771ff1064855 replies
MModular
•Created by Ryan on 5/29/2024 in #community-showcase
Fire Physics Engine: A simple 2d physics engine in Mojo
This is the first version of a simple 2d physics engine I have been working on. it is still in the very early stages of development and any contributions are welcome. If you want to try it out there is info on how to use it in the git repo. If you have any issues or questions please let me know and I will try to help.
https://github.com/RyanLeber/fire-physics-engine.git
2 replies