4 ms·
Knotty: A domain-specific language for knitting patterns
- willvarfar 1y agoA quick googling says that lego knitting machines have been built. Now it's just to program them! https://www.youtube.com/watch?v=MV19wqtfyF0 https://www.youtube.com/watch?v=MV19wqtfyF0 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.
- foofoo12 1y agoProgrammable (punch cards I think) sliding knitting machines were a thing in the past (70s or 80s). They occasionally pop up for free on FB marketplace or little on ebay and such. Or perhaps you had to flick switches instead of punch cards?
- qdw 1y agoPunch-configured textiles go all the way back to the 1700s! The 1804 Jacquard Loom, which used cards, was a big part of the Industrial Revolution and influenced Babbage's Difference Engine and Analytical Engine, both of which use punchcards. More background: https://en.m.wikipedia.org/wiki/Jacquard_machine https://en.m.wikipedia.org/wiki/Jacquard_machine
- zokier 1y agoWorth noting that weaving and knitting are two different production processes.
- bregma 1y agoYes and no. The both involve implementing a sequence of instructions to perform mechanical motions on fiber to form textiles. It might be moving frames to open the shed for weaving, or it might be opening hooks to chain for knitting. The fiber used and the properties of the produced textile may have different properties and the machinery may differ in detail but the processes are essentially identical.
- eru 1y agoThat's a bit like saying that welding and screwing pieces of metal together are 'essentially identical'.
- bluGill 1y agoIf you are drawing up blueprints for a machine the two are essentially identical. You choose whichever makes sense for the joint you need, but they are essentially identical on the blueprint. 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.
- Rendello 1y agoThis reminds me of the Citycorp Center near-disaster: > 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_crisis https://en.m.wikipedia.org/wiki/Citicorp_Center_engineering_...
- blahlabs 1y agoMy partners owns numerous brother knitting machines of that era. They are fascinating machines, I love them. Complicated mechanisms to move the needles in and out depending on the pattern set. My partner is the expert in them, not me, so my understanding of how they actually work is limited. 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/ https://www.ayab-knitting.com/
- sleepybrett 1y agothey still are. Brother among others make them. You think all those ugly christmas sweaters populating every store in december are all hand knitted?
- yeasku 1y agoThe Jacquard loom, invented in 1804, introduced a system of punched cards that controlled individual warp threads.
- nvader 1y agoI have a vision of a device kind of like a pair of scissors, except instead of shears there are two levered attachments: a holder for a needle and a hook to manipulate yarn. 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.
- Syntonicles 1y agoI've been curious about knitting & crochet from a programming / robotics / simulation perspective for a while, but deferred it to cut my teeth on simpler problems. Those industrial robots seems to be knitting, not crocheting. They use the term "crochet knitting" as a sales tactic. 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 https://www.youtube.com/watch?v=EImnSsCadK8 [2] https://www.youtube.com/watch?v=T1-pfeaVsOM https://www.youtube.com/watch?v=T1-pfeaVsOM [3] https://stitch-maps.com/about/overview/ https://stitch-maps.com/about/overview/
- lesser-shadow 1y ago[dead]
- Traubenfuchs 1y agoSo I was not the only one strongly expecting furry involvement.
- jasona123 1y agoI mean pixel Gritty is just all over the docs, it was to be expected
- fennecbutt 1y agoAhaha I guess they made a knot joke. Us furries are everywhere seems like.
- spiritplumber 1y agoowo what's this
- johnisgood 1y agoI am not into kitting at all but the Megaman example is pretty cool. :D
- pwdisswordfishz 1y agoWhy did I expect a terminal emulator
- James_K 1y agoThe brackets are the best part of lisp and it utterly confuses me how ready some people are to remove them.
- russellbeattie 1y agoYou have to admire the full-circle of history about this. Arguably, the first stored programs were created in the 1820s to automate Jacquard looms. The looms used a series of punch cards to automate the weaving of complex patterns. The system helped inspire Charles Babbage's Analytical Engine. Now 200 years later, we get Knotty. Very satisfying, in a holistic interconnectedness sort of way.
- munificent 1y agoAs a knitter, I feel compelled to point out that weaving and knitting are very different ways to create textiles. (And crochet is even more different, which is why there are currently no machines that can crochet.)
- haunter 1y agoSome say the Jacquard machine was the first real computer using punched cards https://en.wikipedia.org/wiki/Jacquard_machine https://en.wikipedia.org/wiki/Jacquard_machine
- zokier 1y agoSome would be wrong. While the use of punch cards was significant, I struggle to see jacquard looms doing computation in any meaningful sense.
- delaminator 1y agoAlthough one could say it is Numerical Control, the precursor to Computerised Numerical Control
- bregma 1y agoFrom a computer-science theoretic view, any any recursively enumerable transform is computing. It's pretty easy to see the translation between a Jaquard loom and an abstract Turing machine. Just because it smells of machine oil and lanolin instead of ozone and magic smoke doesn't mean an automated loom and a modern computer are not essentially the same device, mathematically speaking.
- pantulis 1y ago> Just because it smells of machine oil and lanolin instead of ozone and magic smoke The magic smoke I've smelled before specially with a burnt cap but do computers really smell of ozone???
- bregma 1y agoWhen I was younger I worked with a lot of prototype devices. The lab always had the smell of rosin core and ozone and, from time to time, something worse that resulted in the requirement for a new board. And once, a new desk. So I guess the answer is "it depends".
- 1y ago
- jimnotgym 1y agoThe absolute joy of overengineering. This is what we come to hn for For i = 1:20 Knitone() Pearlone()
- flymasterv 1y agoThis is great, but it’s entirely disqualifying that it isn’t called Purl.
- artemonster 1y agoas always the actual gems are in HN comments :D
- sleepybrett 1y agoknotty should be some kind of protocol for getting a tty on a knitting machine.
- dcuthbertson 1y agoOh, the missed opportunities, like a little "ribbing" for the versions :^) Version 1: Knit Version 2: Purl
- fudged71 1y agoMost interesting aspects (Notation+DSL) here: 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
- unixhero 1y agoIsn't knitting a sort of functional programming actually? I read that somewhere.
- vonStackelberg 1y agoHas anyone a recommendation for a good hobby knitting machine? Especially for 3d knitting? Or should I explore the diy projects?
- jerome-jh 1y agoThat's how I like computers: simply useful, down to earth. Congrats to the creator. (BTW reminds me of the wonderful lylipond https://lilypond.org/ https://lilypond.org/)
- rirze 1y agoTIL, there's a way to use indents to represent S-expressions https://docs.racket-lang.org/sweet/index.html https://docs.racket-lang.org/sweet/index.html
- namibj 1y agoI'd still like to see some 2-seams-only T-shirts as should be straight-forward on a sufficiently-flexible tube knitting machine: seams down along the bottom of the arms continuing to the hips, so there's no seam around the shoulders. 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.