Git Product home page Git Product logo

crochetable-cyclic-tag's Introduction

Crochetable Cyclic Tag

A tool for generating and evaluating Turing-complete crochet patterns based on Emil Post's tag system computational model, and the esoteric programming language Bitwise Cyclic Tag.

Usage examples

Help:

./cct.py -h

Convert

Convert BCT to CCT:

./cct.py --bct "10 11 10 10 10 11 0 11 10 10 0 11 10 10 11 10 10 11 10 10 0 0 0 0" -t "Collatz Sequence"

Convert CT to CCT:

./cct.py --ct "010001;100;100100100;;;;" -t "Collatz Sequence"

Convert CCT to human followable crochet instructions for computaion-by-crochet (--verbose):

./cct.py examples/collatz.cct --verbose

Evaluate

Evaluate CCT to crochet pattern symbols (Unicode to STDOUT):

./cct.py examples/collatz.cct

Evaluate CCT to SVG crochet pattern:

./cct.py --svg examples/collatz.cct

Output example

CCT code

simple-triangle.cct:

# Simple decreasing triangle swatch
1. Any sequence of sc / dc stitched onto an appropriately sized foundation chain.
2. std
3. dec-ss
4. std
Repeat from Row 3.

Produced with ./cct.py --ct ";" --title "Simple decreasing triangle swatch"

Verbose instructions

./cct.py examples/simple-triangle.cct --verbose

Simple decreasing triangle swatch

Row 1 Any sequence of sc / dc stitched onto an appropriately sized foundation chain. Row 2 (std) work 1 sc into each dc, 1 dc into each sc until end of row; turn. Row 3 (dec-ss) 1 ss, then proceed as in the standard row until end of row; turn. Row 4 (std) work 1 sc into each dc, 1 dc into each sc until end of row; turn. Repeat from Row 3.

Evaluation of input

0: single crochet, 1: double crochet (US crochet terminology)

./cct.py examples/simple-triangle.cct -i 111111
•     
+     
Ŧ•    
++    
ŦŦ•   
+++   
ŦŦŦ•  
++++  
ŦŦŦŦ• 
+++++ 
ŦŦŦŦŦ•
++++++
ŦŦŦŦŦŦ
ᴑᴑᴑᴑᴑᴑ

A different input produces different output:

./cct.py examples/simple-triangle.cct -i 1011101
•      
+      
Ŧ•     
+Ŧ     
Ŧ+•    
+Ŧ+    
Ŧ+Ŧ•   
+Ŧ++   
Ŧ+ŦŦ•  
+Ŧ+++  
Ŧ+ŦŦŦ• 
+Ŧ+++Ŧ 
Ŧ+ŦŦŦ+•
+Ŧ+++Ŧ+
Ŧ+ŦŦŦ+Ŧ
ᴑᴑᴑᴑᴑᴑᴑ

SVG output

./cct.py examples/simple-triangle.cct -i 1011101 --svg

SVG example

crochetable-cyclic-tag's People

Contributors

hornc avatar

Stargazers

 avatar

Watchers

 avatar

crochetable-cyclic-tag's Issues

Slipstitch symbol variations

Unicode
1)

⧫      
+      
Ŧ⧫     
+Ŧ     
Ŧ+⧫    
+Ŧ+    
Ŧ+Ŧ⧫   
+Ŧ++   
Ŧ+ŦŦ⧫  
+Ŧ+++  
Ŧ+ŦŦŦ⧫ 
+Ŧ+++Ŧ 
Ŧ+ŦŦŦ+⧫
+Ŧ+++Ŧ+
Ŧ+ŦŦŦ+Ŧ
ᴑᴑᴑᴑᴑᴑᴑ

vs.
2)

⬧      
+      
Ŧ⬧     
+Ŧ     
Ŧ+⬧    
+Ŧ+    
Ŧ+Ŧ⬧   
+Ŧ++   
Ŧ+ŦŦ⬧  
+Ŧ+++  
Ŧ+ŦŦŦ⬧ 
+Ŧ+++Ŧ 
Ŧ+ŦŦŦ+⬧
+Ŧ+++Ŧ+
Ŧ+ŦŦŦ+Ŧ
ᴑᴑᴑᴑᴑᴑᴑ

vs.
3)

•      
+      
Ŧ•     
+Ŧ     
Ŧ+•    
+Ŧ+    
Ŧ+Ŧ•   
+Ŧ++   
Ŧ+ŦŦ•  
+Ŧ+++  
Ŧ+ŦŦŦ• 
+Ŧ+++Ŧ 
Ŧ+ŦŦŦ+•
+Ŧ+++Ŧ+
Ŧ+ŦŦŦ+Ŧ
ᴑᴑᴑᴑᴑᴑᴑ

or something else... can't find a Unicode single-width / small filled vertical oval / ellipse that looks right with the current symbols -- lozenges come in a wider range of sizes, or perhaps a mid-dot / bullet fits better?

⬮      
+      
Ŧ⬮     
+Ŧ     
Ŧ+⬮    
+Ŧ+    
Ŧ+Ŧ⬮   
+Ŧ++   
Ŧ+ŦŦ⬮  
+Ŧ+++  
Ŧ+ŦŦŦ⬮ 
+Ŧ+++Ŧ 
Ŧ+ŦŦŦ+⬮
+Ŧ+++Ŧ+
Ŧ+ŦŦŦ+Ŧ
ᴑᴑᴑᴑᴑᴑᴑ

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.