knit one, compute one - software art thou?

Post on 11-Apr-2017

112 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

PHOTO: LISA COCKBURN

KNIT ONE COMPUTE ONE

Kris Howard @web_goddess

for i in [1..5] if i % 15 is 0 console.log "FizzBuzz" else if i % 3 is 0 console.log "Fizz" else if i % 5 is 0 console.log "Buzz" else console.log i

Worked over a multiple of 24 stitches.

Row 1 (RS): Knit Row 2: Purl Row 3: *(k2tog) 4 times, (yo, k1) 8 times, (k2tog) 4 times; rep from * to end. Row 4: Purl

Repeat rows 1-4 until desired length.

Programming Knitting

Programming Knitting

Programming Knitting

Me

FLICKR: LORNA MITCHELL

FLICKR: LORNA MITCHELL

FLICKR: SBRISTOW

KNITTING IS BINARY

FLICKR: STEPHANIEASHER

“BINARY SCARF” BY HEYCARRIEANN

FLICKR: JACQUELINE-W

“SCOREBOARD” BY MICHELLE HUNTER

FLICKR: TONY & WAYNE

Slide intentionally blank…

Cast on 24 stitches.

FOR LOOP

let stCount = 24;

for (let i = 0; i < stCount; i++) { stitch.castOn() }

Slide intentionally blank…

Repeat to end of row.

WHILE LOOP

while ( !thisrow.atEnd() ) { stitch.knit(); }

Slide intentionally blank…

Cast on 242 (256, 270, 284) sts.

SWITCH STATEMENT

let size = 38;

switch (size) { case 38: stitch.castOn(242); case 41: stitch.castOn(256); case 43: stitch.castOn(270); case 45: stitch.castOn(284); }

SUBROUTINES

function twistedRib(stitchCount) { //row 1 stitch.purl(); stitch.knit(); for (let i = 3; i < stitchCount; i++) { stitch.ptbl(); stitch.knit(); } stitch.purl(); needles.swap(); // row 2 stitch.knit(); stitch.purl(); for (let i = 3; i < stitchCount; i++) { stitch.ktbl(); stitch.purl(); } stitch.knit(); needles.swap(); }

COROUTINES

Row 1: Side,O,*D,C,F,X,F,O,F,X*,

D,B,D,A,E,B,E,**X,F,O,F,X,F,X,E**,

O,Side,O,rep from * to * once,

pm,F,O,F,X,F,C,F,W,F,O,F,pm,

rep from ** to ** once, O.

PATTERN LANGUAGES

stitch-maps.com

Rows 1 and 3 (WS): Purl.

Row 2: K1, *k2tog, k2, yo, k1,

yo, k2, ssk, repeat from *.

Row 4: *K2tog, k2, yo, k1, yo,

k2, ssk, repeat from * to last

st, k1.

https://knitml.sourceforge.io/

<pattern:pattern xmlns:pattern="http://www.knitml.com/schema/pattern" xmlns="http://www.knitml.com/schema/operations" xmlns:common="http://www.knitml.com/schema/common" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.knitml.com/schema/pattern http://www.knitml.com/schema/pattern-0.7.xsd http://www.knitml.com/schema/operations http://www.knitml.com/schema/operations-0.7.xsd http://www.knitml.com/schema/common http://www.knitml.com/schema/common-0.7.xsd" version="0.7" xml:lang="en"> <pattern:directives> <pattern:instruction-definitions> <inline-instruction id="cross-2-over-2" label="2/2 LC"> <cross-stitches first="2" next="2" type="front" /> <knit>4</knit> </inline-instruction> <inline-instruction id="cross-2-behind-2" label="2/2 RC"> <cross-stitches first="2" next="2" type="back" /> <knit>4</knit> </inline-instruction> </pattern:instruction-definitions> </pattern:directives> <pattern:general-information> <pattern:name>Color Sampler Swatch</pattern:name> <pattern:description>A basic 2-color swatch sampler</pattern:description> <pattern:dimensions /> <pattern:gauge type="stockinette"> <pattern:stitch-gauge unit="st/in">5</pattern:stitch-gauge>

</row> <row number="10" yarn-ref="MC"> <purl>4</purl> <inline-instruction-ref ref="cross-2-behind-2" /> <purl>4</purl> </row> </instruction> <repeat-instruction ref="cable-repeat"> <additional-times>2</additional-times> </repeat-instruction> </pattern:section> <pattern:section> <row yarn-ref="MC" assign-row-number="false"> <repeat until="end"> <knit /> </repeat> <pass-previous-stitch-over /> </row> <row yarn-ref="MC" assign-row-number="false"> <bind-off-all /> </row> </pattern:section> </pattern:instruction-group> </pattern:directions> </pattern:pattern>

Pattern "en" { Directives { InstructionDefinitions { InlineInstruction 'cross-2-over-2' [label:"2/2 LC"] { cross 2 inFrontOf 2, k4 } InlineInstruction 'cross-2-behind-2' [label:"2/2 RC"] { cross 2 behind 2, k4 } } } GeneralInformation { Name: "Color Sampler Swatch" Description: "A basic 2-color swatch sampler" Dimensions Gauge 'stockinette' { StitchGauge: 5 stitchesPerInch RowGauge: 7 rowsPerInch } Techniques { Technique: "stranded knitting" Technique: "cabling"

KnittingEL

Row: k5 'MC', k1 'CC', k5 'MC' Row: k4 'MC', k3 'CC', k4 'MC' Row: k3 'MC', k5 'CC', k3 'MC' Row: k2 'MC', k7 'CC', k2 'MC' Row: k1 'MC', k9 'CC', k1 'MC' Row 'MC': k5, m1a, k6 } Section resetRowCount { Instruction 'cable-repeat' { Row [1,2,3,4,6,7,8,9] 'MC': p to end Row 5 'MC': p4, ref 'cross-2-over-2', p4 Row 10 'MC': p4, ref 'cross-2-behind-2', p4 } Repeat 'cable-repeat' 2 additionalTimes } Section { NextRow 'MC': k to end, ppso NextRow 'MC': bo all sts } } } }

KnittingEL

sourceforge.net/projects/knitter/

https://xkcd.com/927/

Knitty: Know It All Bag

FLICKR: MAR CANET

SMEECH.CO.UK

SMEECH.CO.UK

SMEECH.CO.UK

SMEECH.CO.UK

SMEECH.CO.UK

GLITCHAUS.COM

knityak.com

knityak.com

KNITTING AS COMPUTATION

FLICKR: KATEMONKEY

FLICKR: CHRISTIAAN COLEN

LESSONS

HUMILITY

FLICKR: BEKATHWIA

DOCUMENTATIONFLICKR: MALGLAM

WELCOME NEWBIES

FRED GEORGE DEVELOPER & CO-FOUNDER AT

OUTPACE SYSTEMS

WEDNESDAY, MARCH 29

#YOWNIGHT

Thanks to:

"Microservices -

Let's Build Some!"

Brisbane - March 22

Sydney - March 27

Melbourne - March 30

Perth - April 5

Singapore - April 7

Hong Kong - April 10

Register now at

yowconference.com.au

sold out!

west.yowconference.com.au

lambdajam.yowconference.com.au

yowconference.com.au/yow-wit-2017/

top related