a one dimensional cellular automata, using comonads
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # cellularAutomata
  2. a small application for running a one-dimensional cellular automata from random inputs, using comonads
  3. ## usage
  4. the program will default to the size of the window
  5. `-w` and `-g` inputs can be given to determine the width and height, respectively
  6. ## requirements
  7. * `getOpt`
  8. * `ncurses` (for detecting term width/height)
  9. ## building / running
  10. builds using nix
  11. from a local folder:
  12. ```
  13. nix build .
  14. ./result/bin/cellularAutomata
  15. ```
  16. from the repo directly:
  17. ```
  18. nix run github:techieAgnostic/cellularAutomata -- -w 40 -g 25
  19. ```
  20. it may also be included as a flake input, as one normally would, and added to the package list using the included overlay
  21. ## example
  22. `./cellularAutomata -w 40 -g 25`
  23. ```
  24. ██ ████ █ █████ █ ███ █ ███ ███
  25. ██ █ ███ █ ██ █ ███ ██ █ █ █ █ ██
  26. █ ███ ███ █ ███ █ █ ██ ██ ███
  27. ███ █ █ █ █ ██ █ ███████ ██ ██
  28. ███ █ █ █ ██ █ ██ ██ ███ ██
  29. █ █ █ ██████ █████ ██████ █ █
  30. ██ ██ █ █ █ ██ █ █ ██ ██ █
  31. ██ ██ ██ ███ █ █ ███ ███ █ █ █
  32. █ ███████ ██ ███ █ █ █ █ █ ███ █ ██
  33. █ █ █████ █ █ ██ █ ██ █ █
  34. ███ █ ██ █ █ ████ █ ██ ██
  35. █ █ █ ████ █ █ █ ███ ██ █ █████████
  36. ██ █ █ ██ █ ███████ █ ██
  37. █████ ██ █ █████ █ ███ █ ███
  38. ██ █ ██ ███ ███ █ ██ █ █ ██
  39. ████ █ █████ ██ ██ █ █ ███ ██ █ ████
  40. █ ███ █ ██ ██ ██ █ █████ █ ██
  41. █ █ ███ ██ █ ██ ████████ █ ██ █ ███
  42. █ █ █ ██ ████ █ ███ █ ███ █ █
  43. ██ █ █████ █ █ ██ █ █ ██ █
  44. ██ █ ██ ███ ██ █ ███ █ █ ██ █ █
  45. ████ █████ ██ █ ██ ███ ███ ██████ ███
  46. █ █ █ ██ █████ █ █ ██ ██ █ █
  47. █ █ █ ███ ██ █ ██ ███ █ █
  48. ██ █ █ ███ █ ███ █ █ ███ █ ███ █ █
  49. █ █ ██ █ █ █ █ ██ █ █ █ ██
  50. ```