sock program v 0.2

What do you get when you have a geek with the flu, a vacation, a LISP compiler, and a universal toe-up sock pattern? You get a universal toe up sock pattern program. One big bug at the moment is that one can have an even (or odd) number of cast on stitches, then have an odd (or even) number of stitches for the short-rows. (It has to match the number you cast on, otherwise, you’ll be facing the wrong way.) So in other words, I cast on 38 stitches (rounding up, since one can’t have 37.5 stitches) and want to be at 16 by the time I start going back the other way on the short rows. Technically it should be 15, but that has you starting to work the wrapped stitches on a wrong-side row, when you started working them on a right side row. That shouldn’t be hard to test for, once I get more caffeine. So here’s the program:

; Knitty’s universal (toe-up) sock pattern
;
; from: http://www.knitty.com/issuesummer06/PATTuniversalsock.html
;
; Assuming US needle sizes and measurements in inches. If using
; 2 circulars or other number of needles besides 4 dpns, adjust needle
; key parameter in the pattern function.
;
; foot_circumference to be measured at the ball of the foot
; 0.9 adjust for a looser or tighter sock.
;
; sock_leg is length of sock leg = from top of foot to top of desired sock
;
; length_of_foot = sole of foot, from tip of the toe to back of the heel
;
; Gauge is measured in stitches per inch.
;
;——————————————————————–
(defun caston_adjust (dpns exact_caston)
(cond ((= 0 (mod exact_caston dpns))
exact_caston)
(‘caston_adjust (+ 1 exact_caston) dpns)))

(defun pattern (foot_circumference length_of_foot sock_leg gauge
&key (dpns 4))
(let* ((sock_circumference (* 0.9 foot_circumference))
(toe_foot (- length_of_foot 1.5))
(exact_caston (* gauge sock_circumference))
(adj_caston (caston_adjust exact_caston dpns))
(short_row_stitches (/ adj_caston 2.0))
(end_toeheel (* .4 short_row_stitches))
)
(format nil
“Using crochet cast on, CO ~D stitches.

Row 1 [WS]: P all sts.
*Row 2 [RS]: K to last st, W&T.
Row 3 [WS]: P to last st, W&T.
Row 4 [RS]: K to st before last wrapped st, W&T.
Row 5 [WS: P to st before last wrapped st, W&T.
Repeat rows 4 and 5 until ~D sts remain unwrapped between wrapped sts on either
side of the work. You will be ready to start a RS row.

When wrapping stitches at turning points of short rows which follow, note
that stitches will now have two wraps; these stitches will be referred to as
double-wrapped stitches. When working a double-wrapped stitch on a
subsequent row, pick up both wraps and work them together with the stitch
which has been wrapped.

Row 6 [RS]: K to first wrapped st, W&T
Row 7 [WS]: sl 1, p to first wrapped st, p wrapped st, W&T.
Row 8 [RS]: Sl 1, k to first double-wrapped st, W&T.
Row 9 [WS]: Sl 1, p to first double-wrapped st, W&T.

Repeat rows 8 and 9 until one double-wrapped stitch remains at each end of
work.

Row 10 [RS]: Sl 1, k to double-wrapped st, k double-wrapped st. Do not turn
work* (Work wraps of remaining doulbe-wrapped st together with st when working
first round of foot.)

Carefully remove crochet chain from CO edge of work and place the ~D resulting
live sts on two double-point needles, or one circular needle. There should
now be ~D sts on the needles.

Foot of sock will now be worked in the round.

Hint: when you begin to work in the round, you may want to pick up a st or
two in the space at either end of the newly picked-up sts to close up the
small gap that can form at this point. If you do this, remember to decrease
these sts when working the next round, so that you will once again have ~D
stitches.

Work in stockinette st or chosen stitch pattern, until work measures
~D inches from end of toe.

Next Round: Decide which side of your sock you wish to be the top of the foot,
and which side will form the sole. Work to the end of the stitches which form
the top of the foot; the heel will be worked back and forth over the stitches
that form the sole.

To form heel, work from * to * as for toe.

Resume working in the round over all sts. Work in stockinette st or
chosen stitch pattern until work measures ~D inches from top of foot. BO
all sts loosely in pattern.”

short_row_stitches end_toeheel short_row_stitches adj_caston adj_caston
toe_foot sock_leg)
)
)

; (pattern 10.5 9 7 8)

Advertisements

~ by Jen on November 27, 2006.

2 Responses to “sock program v 0.2”

  1. Jen,You are the Queen of all Geeks and I bow in awe to your real and true Geekiness.=o)

  2. *grins* Thanks! I’ve got version 0.9 done, but it’s still got a nice bug in the middle of it. Rounding will bite you on the ass every time. (But it would be easier if you could do fractional numbers of stitches.)

Comments are closed.

 
%d bloggers like this: