Frog's Tail
Да, я люблю лягушек
Хозяйке на заметку 
13th-Dec-2007 03:52 am
via boingboing:

Группа энтузиастов предлагает стандарт языка для описания процесса вязания: KnitML.

<repeat to-end="true">
    <purl>1</purl>
    <knit>2</knit>
    <purl>1</purl>
</repeat>

Велико желание запихнуть XML в каждую дыру. Осталось стандартизировать SnortANoseML и WipeAnAssML и XML будет с нами повсюду.

XML не нужен, да.
Comments 
12th-Dec-2007 09:34 pm
Тебе сюда :D

Напрягает он конечно...
13th-Dec-2007 05:29 am
Не то, чтобы напрягает... Просто - везде. Причем, в 70-80% случаях не нужен.
17th-Dec-2007 02:33 am
Don't know if you read English or not, but....

KnitML actually is attempting to provide value to the knitting world. I'm not just coming up with a standard for the sake of having a standard. I have listed all of the benefits that such a standard can bring on the KnitML website. I truly feel that this can have immense value in a world of knitting software, none of which can understand another.
17th-Dec-2007 05:18 pm
Knitting is OK. Once upon a time I tried to knit a scarf. Almost succeeded :)

Kind of "Lingua Franca" for knitting software (and hardware) is must have. So I appreciate your effort in developing such standard.

I've seen http://www.knitml.com/schema/pattern.xml. It looks quite... obscure.

Why are you using XML? Why not, for example, S-Expressions? Or, even better, why do not you create a special language to describe knitting patterns and algorithms. Or adopt existing one --- functional language such as Haskell. After all, functional languages allow one to describe infinite data structures, use recursion etc.

When one tries to express something like this using ugly XML, the result will be ugly.
17th-Dec-2007 07:18 pm
It's strange that you think that XML is obscure. Are you making the claim that S-Expressions are more mainstream than XML? The intent is ultimately for the document to be edited using a GUI rather than hand-edited as characters. So what looks really nice to human eyes is not the point.

While it would be possible to write a domain-specific language (DSL), you would then be limiting the toolset you could use to operate on the document. There are tons of XML parsers out there, for all types of situations. Can the same be said for other expression languages? Also, if you use an external DSL, you would have to write your own parser. If you use an internal DSL, you could reuse the parsing of the particular meta language, but you are again constrained by the limitations of the syntax of that language. Some things may work better, but others may be worse.

What do you find ugly about the pattern, other than you appear to be biased against XML syntax in general? I happen to think that XML captures the meaning of each element fairly well. There is a ton of meta-information as well as algorithmic information to capture in a knitting pattern. However, functional recursion isn't really something that is important to capture in a knitting pattern. A pattern is expressed linearly, step by step. You can derive iteration and/or recursion from the linear. It is much harder to go the other way.

I will be the first to agree that it is not really an operation-oriented language. That was intentional. Again, it's much easier to render a human-readable pattern if the content starts out that way. Trying to derive a human-readable pattern from a series of atomic knitting operations that would preserve modern knitting pattern style would be virtually impossible.
18th-Dec-2007 01:41 am
Using a functional language would be rather pointless as all forms of recursion that could be represented in knitting (and mind you, it would be counter-intuitive) would be tail recursive or at the minimum first order.
Additionally, there are few parsing programs that would be able to actually utilize a scripted language to convert the algorithm into a visual artifact that may be used to represent the pattern.
I guess your not in favor of MathML either?
18th-Dec-2007 05:26 pm
> are more mainstream than XML

The keyword is "mainstream". Everybody do XML, why don't do any more XML? Of course, there are a lot of xml parsers almost for every existing language. Some suck less than others.

> I guess your not in favor of MathML either?

Yes. It just makes me sick.
13th-Dec-2007 07:25 am
Anonymous
Там подошло бы что-нибудь функцЫональное, типа Haskell. С поддержкой рекурсии и бесконечных структур данных :)
This page was loaded Oct 1st 2025, 3:30 pm GMT.