Skip to content

Latest commit

 

History

History
 
 

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Examples

nutshells/ contains example nutshell files, and compiled_ruletables/ contains their transpiled Golly-ruletable output; filenames are shared between the two directories, so e.g. nutshells/bct.ruel transpiles to the file under examples/bct.rule.
Transpilation is done with the -s and -c options, so the files in the latter directory have comments preceding each group of @TABLE lines showing what Nutshell line (and specific snippet thereof) it came from as well as preserving the original Nutshell file's comments where applicable.

Notable examples:

  • Brainfuck; for more info, see here. This is a full implementation of Brainfuck as a cellular automaton, and it is in fact the rule that motivated Nutshell's existence in the first place.
  • BML, or "Biham–Middleton–Levine traffic model"; the very first Nutshell file ever written, transpiled initially by hand (to prove whether the ideas worked on a general level) then later used as a sanity check for various iterations of the transpiler. Note the @RUEL and @TABEL segment headers in that Gist; Nutshell was named 'rueltabel' in its early stages.
  • XHistory, a demo of inline-rulestring transitions and also a template that can produce a History ruletable for any rule expressible via Hensel rulestring.
  • Brew, notable for that it compresses+generalizes the original -- it's in this regard a stellar example Nutshell's strengths. Extensible to any count of states by changing the value of the states: directive, and demos the use of macros as well (with weave: 1).