knit one, compute one - yow! night perth

Post on 12-Feb-2017

28 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

KRIS HOWARD

YOW! CONFERENCES & WORKSHOPS

TUESDAY, FEB 7

#YOWNIGHT

Thanks to:

west.yowconference.com.au

lambdajam.yowconference.com.au

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

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

KNITTING IS BINARY

FLICKR: STEPHANIEASHER

“BINARY SCARF” BY HEYCARRIEANN

FLICKR: JACQUELINE-W

“SCOREBOARD” BY MICHELLE HUNTER

FLICKR: TONY & WAYNE

Cast on 24 stitches.

Slide intentionally blank…

FOR LOOP

let stCount = 24;

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

Repeat to end of row.

Slide intentionally blank…

WHILE LOOP

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

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

Slide intentionally blank…

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.

knitml.com

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

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

sourceforge.net/projects/knitter/

https://xkcd.com/927/

Knitty: Know It All Bag

FLICKR: MAR CANET

GLITCHAUS.COM

knityak.com

KNITTING AS COMPUTATION

FLICKR: KATEMONKEY

FLICKR: CHRISTIAAN COLEN

LESSONS

HUMILITY

FLICKR: BEKATHWIA

DOCUMENTATIONFLICKR: MALGLAM

WELCOME NEWBIES

west.yowconference.com.au

lambdajam.yowconference.com.au

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

top related