Lifeash is a rust implementation of the hashlife algorithm more formally known as Gosper's algorithm for Conway's Game of Life.
It consists of two parts: The lifeash crate/library and the cremator binary/simulator.
A Hashlife (Gosper's algorithm) implementation written in Rust
License: MIT License
The hole purpose of the hashlife algorithm is a concept called "superspeed". It is the idea that the state of a node is not computed one generation into the future but instead multiple generations far into the future. The state of a node at level n
can be computed 2^(n-2)
generation steps into the future.
The result is then memoized and will be stored in the hashtable.
This has yet to be implemented.
Create documentation for lifeash and cremator by writting doc comments.
In the java reference ./refs/java/HashLifeTreeNode.java
they use a updated way for computing the evolution of a node. We should take a look at it and maybe port it.
We should consider if it makes sense to split hasherlife into a library and a separate binary crate.
The library contains mainly the implementation of Gosper's algorithm, a universe interface and a RLE reader.
For error handling we should implement our own error types using the thiserror
crate.
The binary contains stuff like the graphical renderer and probably a CLI.
For error handling we should use the eyre
crate.
Replace SDL2
with glium
and glutin
for better rendering.
Also we can then use imgui-rs
.
At the moment lifeash (library) lacks good error handling.
We should return Result
from all fallible funcitons. I'd propose the thiserror
crate.
Cremator should use the eyre
crate for error handling.
The current implementation of hasherlife uses ID
s as handles to the actual Node
s in the HashMap<ID, Node>
. Instead it would be sufficient to use references (&Node
) into a HashSet<Node>
.
The largest problem with this refactoring lies in satisfying the borrowck because there are a lot of lifetimes involved. I'm not sure if it is even feasible to do a trivial refactoring or if it's necessary to use different data structures altogether. Maybe there is unsafe code necessary.
Another problem is the immutability of the hashset entries. We need a different way to memoize the computed Inode::result
because we can't mutate the Node
s.
We need a graphical renderer for (the binary part of) hasherlife.
We first need to consider which crate is best suitable for 2D rendering.
We should implement a more sophisticated RLE pattern reader.
It should also provide a selection of popular life patterns which should be easily usable. A good resource for popular patterns is the LifeWiki.
A CLI could help to specify the way the pattern should be read. File reading, stdin reading or just using a provided existing pattern.
In the smeagol reference (./refs/smeagol/src/util.rs
) a Leaf
of the QuadTree lives at level 3 and consists of an 8x8 grid of boolean values. It can therefore be represented as an u64
. We should port this idea.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.