include doubts about rust and java
This commit is contained in:
parent
4e82922fb1
commit
353bf3820d
18
README.md
18
README.md
@ -17,10 +17,10 @@ This new iteration of the project focuses on solving the problems of the first:
|
||||
- removing evolution limits (such as brain size)
|
||||
- allowing different species to mate and produce possibly stable children
|
||||
- speed: trying to get the simulation to be as fast as possible on consumer grade hardware
|
||||
- multiplatform: allowing many platforms to execute the simulation
|
||||
- concurrency: try to enable the maximum concurrency when simulating the world, to the point that multiple
|
||||
networked computers may collaborate and work together to simulate a world faster or help each other into
|
||||
achieving meaningful results faster.
|
||||
- the JVM (Java Virtual Machine) being required to execute the implementation
|
||||
|
||||
#### Possible Applications
|
||||
|
||||
@ -33,6 +33,7 @@ This new iteration of the project focuses on solving the problems of the first:
|
||||
- bragging about having designed and implemented such a simulation
|
||||
- figuring out wether it would actually work
|
||||
- distributing a creative alternative to a fish tank
|
||||
- distributing an interactive game where the objective is to evolve the smartest creatures
|
||||
|
||||
### World
|
||||
|
||||
@ -232,7 +233,7 @@ A sidebar has controls to handle simulation speed and pausing and other informat
|
||||
|
||||
## Implementation
|
||||
|
||||
The rust programming language is the best suited for a variety of reasons, namely:
|
||||
The rust programming language is quite suited for a variety of reasons, namely:
|
||||
|
||||
- it is a fast language, well suited for performance intensive tasks
|
||||
- it has a package manager that allows a programmer to focus on writing the code, not
|
||||
@ -245,6 +246,15 @@ But most importantly:
|
||||
- it is built with a focus on type safety, concurrency and thread safety
|
||||
- it's impossible to compile a thread unsafe concurrent program with the rust reference compiler
|
||||
|
||||
However, it has also some issues:
|
||||
|
||||
- there is no GUI toolkit or game engine or anything similar advanced enough to ensure smooth cross platform user interface development
|
||||
- I don't know the rust programming language very well (not a big problem though)
|
||||
- its lower level nature (compared to java) would make development slower
|
||||
- it's very hard to write a multithreaded program in rust due to the compiler being extremely limiting by refusing to compile programs with a chance to cause segfaults or race conditions
|
||||
|
||||
Java would solve those issues, also maintaining most of rust's advantages. I'll eventually decide what to do.
|
||||
|
||||
### Simulation iteration evaluation algorithm
|
||||
|
||||
- __MT__: manager/main thread, controls the flow, HIGHEST PRIORITY
|
||||
@ -280,7 +290,9 @@ It's probably not as fast as it gets, but it should be decent
|
||||
|
||||
__Note:__ the bigger a machine, the slower it reacts to inputs because signals need more time to travel through the body
|
||||
|
||||
### Structs, traits and methods
|
||||
## Rust implementation
|
||||
|
||||
Quick and dirty scheme to keep track of things.
|
||||
|
||||
- world (class), keeps all information about a world
|
||||
- structure (trait)
|
||||
|
Loading…
Reference in New Issue
Block a user