Knotty: a Domain-Specific Language for Knitting Patterns
Posted3 months agoActive3 months ago
t0mpr1c3.github.ioTechstoryHigh profile
excitedpositive
Debate
20/100
Domain-Specific LanguagesKnittingProgramming Languages
Key topics
Domain-Specific Languages
Knitting
Programming Languages
The Knotty DSL for knitting patterns has been released, sparking discussions about its design, potential applications, and the intersection of programming and crafting.
Snapshot generated from the HN discussion
Discussion Activity
Very active discussionFirst comment
1h
Peak period
21
0-6h
Avg / period
6.4
Comment distribution51 data points
Loading chart...
Based on 51 loaded comments
Key moments
- 01Story posted
Sep 25, 2025 at 2:13 AM EDT
3 months ago
Step 01 - 02First comment
Sep 25, 2025 at 3:32 AM EDT
1h after posting
Step 02 - 03Peak activity
21 comments in 0-6h
Hottest window of the conversation
Step 03 - 04Latest activity
Sep 27, 2025 at 6:50 PM EDT
3 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45369768Type: storyLast synced: 11/20/2025, 3:56:10 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
Is it only a matter of time before you can get generative AI to create a pattern based on a prompt and then some service mails gift wraps and mails it to you/friend (along with video of the lego machine making it)? Just in time for the holiday season :D
Added: there are lots of internet discussions about how crochet, unlike knitting, cannot be automated. But deeper digging turns up a company called Comez and a company called Taiwan Dahu that seem to make massive industrial ones.
Or perhaps you had to flick switches instead of punch cards?
More background: https://en.m.wikipedia.org/wiki/Jacquard_machine
If you are making the card reader for automated machines, knitting, weaving, and playing a piano are virtually identical - you just move some lever in response to a hole. Someone working on a different part of the machine cares about the difference, but to the card reader they are identical.
> LeMessurier's original design for the chevron load braces used welded joints. To save money, Bethlehem Steel proposed changing the construction plans to use bolted joints, a design modification accepted by LeMessurier's office but unknown to the engineer himself until later.
> With the tuned mass damper active, LeMessurier estimated that a wind capable of toppling the building had a one in fifty-five chance of happening any year. But if the tuned mass damper could not function due to a power outage, a wind strong enough to cause the building's collapse had one in sixteen chance of happening any year.
https://en.m.wikipedia.org/wiki/Citicorp_Center_engineering_...
Also:
Kettenwirken = warp knitting
Kulierwirken oder Flachwirken = weft knitting
Rundstricken = circular knitting
Flachstricken = flat knitting
We converted a Brother KH750 (or 950 maybe?) to be able to knit from a digital image with an arduino and a project called All Yarns Are Beautiful [0].
I was going to say unfortunately the project looks dead, but looking at their news page, there is an update from this year after being dormant since 2019, which is exciting.
[0] https://www.ayab-knitting.com/
Every time you close and open the handles, it puts one standard knot onto the needle. This could make knitting a row as easy as snip snip snip, but I don't know if it would actually be useful in knitting real projects.
This short video is annoying but informative: [1]
The closest I've seen to actual robotic crochet is [2].
Which is exciting and close - but it's hard to overstate its limitations. I took the challenge in that short video seriously and spent 10-20 hours learning basic crochet. It became very clear that replicating my simple test patterns would require vision, planning and modeling capabilities beyond anything I've seen in SOTA surgical robots.
What I find interesting about the post (Knotty) is buried here [3] - apparently it's possible to ditch the grid and create an intuitive representation of the final knit pattern. I suspect that may be doable using traditional algorithms.
[1] https://www.youtube.com/watch?v=EImnSsCadK8
[2] https://www.youtube.com/watch?v=T1-pfeaVsOM
[3] https://stitch-maps.com/about/overview/
Now 200 years later, we get Knotty. Very satisfying, in a holistic interconnectedness sort of way.
https://en.wikipedia.org/wiki/Jacquard_machine
The magic smoke I've smelled before specially with a burnt cap but do computers really smell of ozone???
So I guess the answer is "it depends".
I'm not really seeing that translation, could you expand how you envision that working?
In hindsight it seems easy for some of us to make the connection, but, at the time, it must have been quite the breakthrough.
What it's not is a general purpose computer.
Evidently, the punch cards that stored Jacquard's weaving patterns were a direct inspiration for Babbage's analytical engine.
[0]: https://www.rheingold.com/texts/tft/02.html#:~:text=The%20we...
Basile Bouchon (1725) created one of the earliest automated looms using perforated paper tape to control the weaving pattern.
Jean-Baptiste Falcon (1728) improved on Bouchon's design by using chains of punched cards instead of continuous paper tape, making the system more durable and easier to handle.
Jacques Vaucanson (1745) further refined the concept with his own punch card loom design.
Jacquard's breakthrough came in 1804-1805 when he synthesized and perfected these earlier innovations into what became known as the Jacquard loom. His version was more reliable, easier to operate, and became widely adopted - which is why his name became so strongly associated with the technology.
> He played an important role in the development of the earliest programmable loom (the "Jacquard loom"), which in turn played an important role in the development of other programmable machines, such as an early version of digital compiler used by IBM to develop the modern day computer.
[0] https://en.wikipedia.org/wiki/Joseph_Marie_Jacquard
Version 1: Knit
Version 2: Purl
Just double up columns appropriately; maybe the seam doesn't even have to go all the way down.
But that column count is out of reach for home style machines.
Physical Reality as Type System
- Knitting notation treats physical constraints (yarn direction, needle capacity) as compile-time invariants, not runtime checks
- The notation literally cannot express impossible operations - unlike most programming languages where invalid states are runtime errors
Semantic 2D Syntax
- Spatial positioning encodes operational meaning, not just formatting
- Chart coordinates directly map to fabric coordinates - position IS semantics
- Most programming languages waste the 2D plane on purely aesthetic layout
Context-Dependency That Works
- Heavy context-switching (RS/WS, cable positions) remains manageable because contexts map to physical realities practitioners can feel
- Suggests context-dependent syntax works when contexts correspond to user’s embodied experience
- Contradicts typical CS wisdom that context-dependency is always bad design
Expert Chunking Over Beginner Clarity
- Single symbols encode 4+ sequential operations for expert efficiency
- Notation evolved to optimize pattern recognition for power users, not learning curves
- Inverse of typical programming language priorities (readability over expert speed)
Domain Invariants Enable Multi-Modal Translation
- Knotty’s translation capabilities required modeling yarn physics, not just syntax
- The type system encodes gauge, tension, and material properties as first-class constraints
- Shows DSL success requires modeling domain physics, not just domain vocabulary
Power-Law Feature Adoption
- 10 symbols for basics, 200+ for experts - mirrors programming language feature creep
- But knitting notation maintained backwards compatibility across complexity levels
- Suggests sustainable complexity growth patterns for language design
For i = 1:20
4 more comments available on Hacker News