The project requires Java 5. Eclipse 3.3 is also recommended, as that is what I use and what the project format is in. Java is Java, however, and any old editor will do. Obviously I don't have a bug tracking system or anything like that yet, so if there's something you notice, please send me a note.
Anyways, enough of this bantering. Here is the code!
[ add comment ] ( 3 views ) | [ 0 trackbacks ] | permalink
I made it to Ravelry! My handle is fiddlinfool. If you're on Ravelry, please join the KnitML group.
[ add comment ] ( 2 views ) | [ 0 trackbacks ] | permalink
Check out the KnitML for a basic sock pattern. Once the software can completely validate and render this pattern, KnitML 0.1 will be complete.
Here is the main and header XML schemas which support the basic sock. These have settled to the point of relative stability, I think, so your feedback would be well appreciated.
[ add comment ] ( 2 views ) | [ 0 trackbacks ] | permalink
Ironing out the corner cases on the engine has been a very involved process. It takes a lot of work to make the engine a real-world simulator. If you can't do it in real life, you should not be able to do it with the engine!
I think I'm definitely close now, though I haven't even had a chance to start on the renderer. Fortunately, the structure is all in place, and it should be a fairly straightforward matter of firing off messages to a file or screen.
Subversion is supposed to be installed on this server fairly soon. As soon as that happens, I will upload my project so that you can see where I am (and make recommendations, if you like).
By the way, KnitML got mentioned on Brenda Dayne's Cast On, Episode 57.
[ add comment ] ( 3 views ) | [ 0 trackbacks ] | permalink
I was asking myself the other day why I included two different ways to indicate a repeat. One is <repeat> and the other is <repeat-instruction>. I realized that it was something instinctive, and today I think I figured out why I did this.
Let me illustrate with a bit of KnitML which describes working 1-by-1 ribbing for 1.5 inches of a sock cuff.
<instruction id="cuff-round">
<row type="round">
<repeat to-end="true">
<knit>1</knit>
<purl>1</purl>
</repeat>
</row>
</instruction>
<repeat-instruction idref="cuff-round">
<until-measures unit="inches">1.5</until-measures>
</repeat-instruction>
<repeat> here indicates a literal repeat of atomic knitting steps (i.e. knit and purl) with no intelligence inside of the <repeat> block. This type of repetition is often represented by *s in a pattern, such as:
Round 1: *k1, p1*, repeat * to end
Repeat Round until piece measures 1.5 inches.
To implement a <repeat>, I can record the commands I send to the engine and simply play them back in a loop until 0 stitches remain in the row.
<repeat-instruction>, on the other hand, can have some intelligence inside of it. Therefore I cannot just blindly replay what I sent to the engine when I was recording this instruction.
Suppose that the KnitML instead looked like this:
<instruction id="cuff-round">
<row type="round">
<decrease type="k2tog"/>
<repeat to-before-end="2">
<knit>1</knit>
<purl>1</purl>
</repeat>
<decrease type="ssk"/>
</row>
</instruction>
<repeat-instruction idref="cuff-round">
<until-equals>
<stitch-count/>
<value>36</value>
</until-equals>
</repeat-instruction>
or
Round 1: k2tog, *k1, p1*, repeat * to 2 before end, ssk.
Repeat Round until 36 stitches remain.
Granted, this isn't what I'd call a cuff, unless you have really conical legs! This is, however, reminiscent of knitting a sweater sleeve, which is a situation I will find myself in eventually.
Capturing this with a simple "record and playback" mechanism won't work, simply because the decreases are constantly changing what needs to be done for a particular row. On Round 1, I would repeat k1,p1 34 times. On the next round, however, I would only repeat it 33 times. A "record and playback" mechanism would attempt to repeat it 34 times, and the engine would subsequently complain that there weren't enough stitches left in the row.
In summary, what lies beneath <repeat> is Igor-like ("Knit, purl... repeat that until I tell you to stop." "Yes, master!") <repeat-instruction> takes some evaluation.
[ add comment ] ( 3 views ) | [ 0 trackbacks ] | permalink

Archives



