Giter Club home page Giter Club logo

lifeash's Introduction

Luis Wirth

Luis' Stats

Luis' Top Langs

lifeash's People

Contributors

lu15w1r7h avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lifeash's Issues

glium and glutin

Replace SDL2 with glium and glutin for better rendering.
Also we can then use imgui-rs.

use hashset instead of hashmap and &Node instead of Id

The current implementation of hasherlife uses IDs as handles to the actual Nodes 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 Nodes.

error handling

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.

split hasherlife into library and binary crate

We should consider if it makes sense to split hasherlife into a library and a separate binary crate.

Library

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.

Binary

The binary contains stuff like the graphical renderer and probably a CLI.
For error handling we should use the eyre crate.

refactor evolution (java reference)

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.

superspeed

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.

implement graphical renderer

We need a graphical renderer for (the binary part of) hasherlife.

We first need to consider which crate is best suitable for 2D rendering.

more sophisticated RLE pattern reader

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.

refactor Leaf (smeagol reference)

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.

documentation

Create documentation for lifeash and cremator by writting doc comments.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.