knit one, compute one - yow! night perth

94
KRIS HOWARD YOW! CONFERENCES & WORKSHOPS TUESDAY, FEB 7 #YOWNIGHT Thanks to:

Upload: kristine-howard

Post on 12-Feb-2017

28 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Knit One, Compute One - YOW! Night Perth

KRIS HOWARD

YOW! CONFERENCES & WORKSHOPS

TUESDAY, FEB 7

#YOWNIGHT

Thanks to:

Page 2: Knit One, Compute One - YOW! Night Perth

west.yowconference.com.au

Page 3: Knit One, Compute One - YOW! Night Perth

lambdajam.yowconference.com.au

Page 4: Knit One, Compute One - YOW! Night Perth

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

Page 5: Knit One, Compute One - YOW! Night Perth

PHOTO: LISA COCKBURN

KNIT ONE COMPUTE ONE

Kris Howard @web_goddess

Page 6: Knit One, Compute One - YOW! Night Perth
Page 7: Knit One, Compute One - YOW! Night Perth
Page 8: Knit One, Compute One - YOW! Night Perth

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

Page 9: Knit One, Compute One - YOW! Night Perth
Page 10: Knit One, Compute One - YOW! Night Perth

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.

Page 11: Knit One, Compute One - YOW! Night Perth
Page 12: Knit One, Compute One - YOW! Night Perth

Programming Knitting

Page 13: Knit One, Compute One - YOW! Night Perth
Page 14: Knit One, Compute One - YOW! Night Perth

Programming Knitting

Page 15: Knit One, Compute One - YOW! Night Perth

Programming Knitting

Me

Page 16: Knit One, Compute One - YOW! Night Perth

FLICKR: LORNA MITCHELL

Page 17: Knit One, Compute One - YOW! Night Perth

FLICKR: SBRISTOW

Page 18: Knit One, Compute One - YOW! Night Perth

KNITTING IS BINARY

FLICKR: STEPHANIEASHER

Page 20: Knit One, Compute One - YOW! Night Perth

“BINARY SCARF” BY HEYCARRIEANN

Page 24: Knit One, Compute One - YOW! Night Perth

FLICKR: JACQUELINE-W

Page 28: Knit One, Compute One - YOW! Night Perth
Page 29: Knit One, Compute One - YOW! Night Perth

“SCOREBOARD” BY MICHELLE HUNTER

FLICKR: TONY & WAYNE

Page 30: Knit One, Compute One - YOW! Night Perth
Page 31: Knit One, Compute One - YOW! Night Perth

Cast on 24 stitches.

Slide intentionally blank…

Page 32: Knit One, Compute One - YOW! Night Perth

FOR LOOP

Page 33: Knit One, Compute One - YOW! Night Perth

let stCount = 24;

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

Page 34: Knit One, Compute One - YOW! Night Perth

Repeat to end of row.

Slide intentionally blank…

Page 35: Knit One, Compute One - YOW! Night Perth

WHILE LOOP

Page 36: Knit One, Compute One - YOW! Night Perth

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

Page 37: Knit One, Compute One - YOW! Night Perth

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

Slide intentionally blank…

Page 38: Knit One, Compute One - YOW! Night Perth
Page 39: Knit One, Compute One - YOW! Night Perth

SWITCH STATEMENT

Page 40: Knit One, Compute One - YOW! Night Perth

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); }

Page 41: Knit One, Compute One - YOW! Night Perth

SUBROUTINES

Page 42: Knit One, Compute One - YOW! Night Perth
Page 43: Knit One, Compute One - YOW! Night Perth
Page 44: Knit One, Compute One - YOW! Night Perth

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(); }

Page 45: Knit One, Compute One - YOW! Night Perth
Page 46: Knit One, Compute One - YOW! Night Perth

COROUTINES

Page 47: Knit One, Compute One - YOW! Night Perth
Page 48: Knit One, Compute One - YOW! Night Perth

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.

Page 49: Knit One, Compute One - YOW! Night Perth
Page 50: Knit One, Compute One - YOW! Night Perth

PATTERN LANGUAGES

Page 51: Knit One, Compute One - YOW! Night Perth
Page 52: Knit One, Compute One - YOW! Night Perth
Page 53: Knit One, Compute One - YOW! Night Perth
Page 54: Knit One, Compute One - YOW! Night Perth
Page 55: Knit One, Compute One - YOW! Night Perth
Page 56: Knit One, Compute One - YOW! Night Perth
Page 57: Knit One, Compute One - YOW! Night Perth
Page 58: Knit One, Compute One - YOW! Night Perth

stitch-maps.com

Page 59: Knit One, Compute One - YOW! Night Perth

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.

Page 60: Knit One, Compute One - YOW! Night Perth
Page 61: Knit One, Compute One - YOW! Night Perth
Page 62: Knit One, Compute One - YOW! Night Perth
Page 63: Knit One, Compute One - YOW! Night Perth
Page 64: Knit One, Compute One - YOW! Night Perth
Page 65: Knit One, Compute One - YOW! Night Perth

knitml.com

Page 66: Knit One, Compute One - YOW! Night Perth

<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>

Page 67: Knit One, Compute One - YOW! Night Perth

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

Page 68: Knit One, Compute One - YOW! Night Perth

sourceforge.net/projects/knitter/

Page 69: Knit One, Compute One - YOW! Night Perth

https://xkcd.com/927/

Page 70: Knit One, Compute One - YOW! Night Perth
Page 71: Knit One, Compute One - YOW! Night Perth
Page 72: Knit One, Compute One - YOW! Night Perth
Page 73: Knit One, Compute One - YOW! Night Perth

Knitty: Know It All Bag

Page 74: Knit One, Compute One - YOW! Night Perth
Page 75: Knit One, Compute One - YOW! Night Perth
Page 77: Knit One, Compute One - YOW! Night Perth

FLICKR: MAR CANET

Page 78: Knit One, Compute One - YOW! Night Perth

GLITCHAUS.COM

Page 80: Knit One, Compute One - YOW! Night Perth

knityak.com

Page 81: Knit One, Compute One - YOW! Night Perth

KNITTING AS COMPUTATION

Page 82: Knit One, Compute One - YOW! Night Perth
Page 83: Knit One, Compute One - YOW! Night Perth

FLICKR: KATEMONKEY

Page 85: Knit One, Compute One - YOW! Night Perth

FLICKR: CHRISTIAAN COLEN

Page 86: Knit One, Compute One - YOW! Night Perth
Page 87: Knit One, Compute One - YOW! Night Perth

LESSONS

Page 88: Knit One, Compute One - YOW! Night Perth

HUMILITY

FLICKR: BEKATHWIA

Page 89: Knit One, Compute One - YOW! Night Perth

DOCUMENTATIONFLICKR: MALGLAM

Page 90: Knit One, Compute One - YOW! Night Perth

WELCOME NEWBIES

Page 92: Knit One, Compute One - YOW! Night Perth

west.yowconference.com.au

Page 93: Knit One, Compute One - YOW! Night Perth

lambdajam.yowconference.com.au

Page 94: Knit One, Compute One - YOW! Night Perth

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