Giter Club home page Giter Club logo

zcellterm's Introduction

zcellterm

CLI toy, Zig implementation of the Wolfram Elementary Cellular Automaton, with various customization features Inspired by the Coding Train video on the subject.

Demo

zcellterm demo, made with asciinema

Features

  • Call any of the 256 rules of the Elementary Cellular Automaton
  • Automatic terminal size detection, manual size setting, infinite mode
  • Pre-computation of a specified number of generations before display
  • Per-line display delay
  • Start with only one active cell in the middle of the automaton, or specify a custom or random starting condition

Supported platforms for automatic terminal size detection

Tested

  • Linux
  • macOS
  • Windows
  • FreeBSD
  • OpenBSD
  • NetBSD

Untested, works in theory if you can build for those platforms (might be non-trivial)

  • Haiku
  • Solaris

Know how to implement size detection for a platform not listed here? Feel free to contribute!

Build

zig build

Release 1.0.1 tested with zig 0.12.0 and zig-clap 0.8.0 releases. Feel free to use optimization flags.

Thanks

I’m using the zig-clap library to parse arguments.

Thank you @AliceDiNunno for testing out macOS compatibility, as well as all the nice people on the Zig Programming Language Discord server who gave me their help and feedback.

I was able to improve the terminal size detection for Windows by taking example on softprops’ implementation.

zcellterm's People

Contributors

siphonay avatar

Stargazers

zima avatar Niranjan Anandkumar avatar  avatar Filipe Rodrigues avatar  avatar

Watchers

 avatar

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.