KnitML
A few posts ago, I jokingly made reference to what I thought was a made-up language called KnitML. The geeks out there will probably know that this is short for Knitting Markup Language(or perhaps Knitting Modeling Language). On a whim I googled for KnitML and found that Laura Porter has already begun development on the concept. This quickly went from being a joke to being something that has been consuming most of my free time.
And why did Laura develop the first draft of KnitML?
Assume for a minute that KnitML is a universally accepted standard. It would not be unreasonable to assume that many knitting patterns would, in addition to the printed version, be made available in KnitML, and that many types of knitting software would be written to interpret KnitML. Take these two points together and you have a whole lot of potential. Consider for a moment that from a KnitML pattern, software could be written that would:
I've already tried getting in touch with Laura, but I haven't heard back from her. I don't know if the original effort has stalled, but I would definitely like to get this project going. I'm not waiting to hear back, though. I've already started developing the most comprehensive KnitML schema that I can using a basic sock pattern. Socks have a lot of combinations of strange repeats, short rows, areas of potential charting, etc. that makes them ideal for some comprehension. Hopefully we can get many people on board with this project so that we can make the schema truly comprehensive.
Once we settle on a schema, a prototype piece of software needs to be developed to demonstrate and popularize the standard. I've already thought about how a simple renderer would work if it were implemented with a state machine in Java. Getting good tooling out there is critical, as it would widely facilitate adoption by the masses.
Once people start realizing the benefits of KnitML, we can hopefully get the buy-in from independent pattern authors to publish their patterns in KnitML (as well as the traditional format.) From there, larger publishers would probably eventually feel pressure to make their patterns available in KnitML as well. And once that happens, you have an adopted standard. Ultimately the standard would move to a standards organization (such as the W3C).
They say you need to think big, after all.
UPDATE: KnitML now has its own website with an easy-to-remember name: knitml.com.
And why did Laura develop the first draft of KnitML?
Initially, I developed the basic schema as a way to teach myself XMLSchema. I work for a software house developing XML data structures and XSLT / XSL-FO stylesheets to style them with, and wanted to learn XMLSchema. Creating a small, trial schema concerning data I'm familiar with seemed a good way.Well, sure. Standardization is great and all of that, but this alone isn't going to push the buttons of most knitters. She doesn't point out (or possibly realize) the huge potential benefits that a comprehensive knitting metamodel can have. Like what, you ask? Well, let me tell you.
I have been knitting for about 14 months and have noticed over that time how similar knitting can be to programming. I also noticed how knitting patterns tend to be written using non-standard styles and abbreviations etc. So developing a standard markup for knitting patterns seemed like a logical idea.
Assume for a minute that KnitML is a universally accepted standard. It would not be unreasonable to assume that many knitting patterns would, in addition to the printed version, be made available in KnitML, and that many types of knitting software would be written to interpret KnitML. Take these two points together and you have a whole lot of potential. Consider for a moment that from a KnitML pattern, software could be written that would:
- Render a pattern in either written directions or a chart, depending entirely on your preference
- Render a pattern in any language, using conventions familiar to that language and dialect
- Automatically convert English measurements to metric
- Size a pattern up or down to any size, not just the sizes that come with the pattern
- Recalculate a pattern for your gauge rather than the one that came with the pattern
- Explicitly write out highly annoying directions (e.g., "increase 34 stitches evenly over 171 stiches")
- Alter the pattern using an easy-to-use graphical editor (or create new KnitML-based pattern from scratch)
- Preview the result of the pattern with pretty graphics
- Digitally sign the pattern to guarantee an author's authenticity
I've already tried getting in touch with Laura, but I haven't heard back from her. I don't know if the original effort has stalled, but I would definitely like to get this project going. I'm not waiting to hear back, though. I've already started developing the most comprehensive KnitML schema that I can using a basic sock pattern. Socks have a lot of combinations of strange repeats, short rows, areas of potential charting, etc. that makes them ideal for some comprehension. Hopefully we can get many people on board with this project so that we can make the schema truly comprehensive.
Once we settle on a schema, a prototype piece of software needs to be developed to demonstrate and popularize the standard. I've already thought about how a simple renderer would work if it were implemented with a state machine in Java. Getting good tooling out there is critical, as it would widely facilitate adoption by the masses.
Once people start realizing the benefits of KnitML, we can hopefully get the buy-in from independent pattern authors to publish their patterns in KnitML (as well as the traditional format.) From there, larger publishers would probably eventually feel pressure to make their patterns available in KnitML as well. And once that happens, you have an adopted standard. Ultimately the standard would move to a standards organization (such as the W3C).
They say you need to think big, after all.
UPDATE: KnitML now has its own website with an easy-to-remember name: knitml.com.
Comments
Look what happened with Ravelry, anything is possible.
(Check out the latest Stash and Burn podcast episode for an interview with the ravelry creators)
I would love to be able to put in some numbers and come out with perfect shaping for a sweater, any sweater!!
I don't necessarily need technical people for this. Coming up with a technical specification is very different from writing software to that specification.
What I really need are experienced knitters that can help me make KnitML a complete expression language for knitting patterns. What I mean by this is, if you can express the content in a knitting pattern, there should be a way to do it in KnitML.
Obviously, if there are other folks who would like to code some prototype software, that would be awesome, too. But that's really more for demo purposes (at least at this point.)
Where does she think the idea of punch cards came from?
jon, punch cards in computing came directly from jaquard looms, which are a fiber-arts toy certainly, but for weaving, not knitting.
I'm wistful for weaving to be included in Ravelry or something very much like it, but don't have the technical chops to jump up and do it.
This is a good time for fiber arts, it would seem.
-Ruth Temple
Redwood City, CA
I'm almost done with the 0.4 release, and I strongly encourage you to wait another week or so until I have that out the door. There are some API changes that will render previous KnitML documents incompatible, and I don't want you to get caught up in that.
The documentation is going to be a work in progress for awhile yet, but I hope that primarily through the samples and the tutorial in the user's guide, that many things will be self explanatory. The newest user's guide will have a reference for all of the Knitting Expression Language functions, so that should make people's lives easier. I'm also going to ensure that the XML Schema documentation is up-to-date, though I suspect that most people won't be studying that in-depth. :>)
And don't forget that there is a KnitML group on Ravelry.