[HN Gopher] Show HN: Browser-based knitting (pattern) software
___________________________________________________________________
Show HN: Browser-based knitting (pattern) software
I wrote some simple open source web-based app to (1) dynamically
compute knitting patterns (based on input parameters, such as the
exact desired size), and (2) display these patterns and help me
keep track of which row I'm on (as I start knitting), similar to
minimalist "row counters" that other knitters use. It also gives
you a simple visualization of the shape of what you're knitting.
You can see it in action at https://alefore.github.io/knit/ (and
read about it in https://github.com/alefore/knit). Right now I
only implemented on simple pattern: Sophie scarfs. After knitting
one that came out somewhat ... asymmetric, I decided to just write
some software to help me (1) easily adjust the length/width of the
scarf (using Bezier curves), and (2) keep track of which row I'm on
(so that I can make sure I apply increases/decreases at the right
places). In the future, I expect to extend this with many other
knitting patterns for other types of items. The application is
100% browser (JavaScript, tested in only in Chrome in
Linux/Android) based (no server-side component): all state is kept
in the URL hash. I've used it to knit two scarves, including
https://github.com/alefore/knit/blob/main/images/000.jpg. The
current state of knitting patterns is far from optional, stuck in
pre-computer times. Perhaps knitters are not the most technically
minded group. Most knitters just download patterns as PDF files.
These files will show multiple numbers from which you should choose
one depending on the size you're knitting, saying things like "Purl
24 (32 38 42 50 64) times" (you're supposed to pick the right
number depending on the size you're knitting). They'll say things
like "repeat rows 4 to 6 sixteen times". I think software can
display patterns much better (including not being limited to a few
pre-selected sizes, but letting you choose the _exact_ size you
want, and adjusting everything accordingly), and keep track of your
progress much more easily. For example, for my scarf, the user
inputs the desired number of rows (based on the desired length,
which makes the pattern agnostic to the needle size), and the
software computes where to apply increases/decreases. I have many
other ideas for improvements (e.g., track how much time I've spent
in each row, show a clock), but I figured I'd share this early and
ask for feedback. Hopefully there are other fellow knitters in HN.
:-) Check it out and let me know what you think!
Author : afc
Score : 110 points
Date : 2024-05-09 11:29 UTC (11 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| anonzzzies wrote:
| My wife will be happy with this.
| afc wrote:
| Would love to hear if it works for her, or if she has any
| feedback.
| anonzzzies wrote:
| Absolutely! Will let you know.
| terpimost wrote:
| I love HN for such projects. Thank you!
| candiddevmike wrote:
| As a fellow knitter, this is pretty neat--I really like the
| notation. I mostly make hats, and do most of my pattern work
| using a pixel art app and a piece of paper for notation.
|
| Any interest in expanding the scope of this to include other
| designs? Double knitting? PRs welcome?
| afc wrote:
| I absolutely intend to expand the scope to include other
| designs.
|
| I happen to be knitting a double-knitting blanket right now, my
| first double-knitted project, haha. I was actually thinking
| yesterday that it would be super neat if we could just feed it
| a black-and-white image and have it generate the rows. ... just
| haven gotten around to it.
|
| But, yeah, if you look at the implementation, you'll see that
| everything is fairly generic, and the only parts specific to
| sophie scarfs are contained in a single file:
| https://github.com/alefore/knit/blob/main/scarf_pattern_fact...
|
| That said, I expect the pattern class will need some
| improvements to be able to accomodate double-knitting (e.g.,
| for visualization and such).
| blowski wrote:
| I'd love this for crochet.
| shannietron wrote:
| Not a generator but I love this crochet simulator!
| https://github.com/timhutton/crochet-simulator
| algasami wrote:
| This looks intriguing! One thing I'd like to ask is to increase
| the button and overall font size since it looks a little bit tiny
| on mobile, which might be the platform people use when they don't
| knit in front of their monitors.
| afc wrote:
| Good point. I'll look into that. Thank you for the feedback.
|
| (You can swipe left/right to change rows on mobile; though your
| suggestion still stands. Just mentioning it in case it helps.)
| bo0tzz wrote:
| This is great! I'm also a knitter, and I really like putting
| together little programs to help me design or write out patterns.
| My favourite so far has been an Elixir Livebook notebook I made
| to design a scarf for my partner. It outputs row counts and an
| image of what the end result will look like:
| https://put.bo0tzz.me/s/30iu0n2k.png The (messy) livebook code is
| here for whoever is interested:
| https://gist.github.com/bo0tzz/eb7818f7db3542ec540965252a344...
|
| Another program I made (and unfortunately lost) was one to
| generate bespoke sock sizings (and corresponding pattern
| instructions) from measurements I put in.
| mrosethompson wrote:
| While your point about knitting patterns being largely unchanged
| by computers is true, there are a few very good software-enabled
| knitting tools out there:
|
| - KnitCompanion is a complex but extremely powerful app to take
| PDF patterns and turn them into very efficient, effective digital
| patterns. You can designate specific steps, walk through steps
| and charts with voice control, extensively reformat a pattern,
| etc. I use this for all moderately complex knitting.
|
| - TinCanKnits is a pair of pattern designers who have recently
| released an app for their own patterns that customizes the
| pattern (showing only your size, changing chart colors to match
| your yarn, etc.)
|
| - CustomFit by Amy Herzog is a tool with a collection of sweater
| designs that can be fully customized to your own gauge,
| measurements, design preferences, etc.
|
| - There are a number of calculators out there for sock knitting
| (how many stitches/rows for heel flap, gusset calculations,
| etc.).
| brettermeier wrote:
| Nice! Friend of mine loves knitting!
|
| But in the example in your Github, was does "2K KFB 6K WYIF 3SLP"
| mean? The explanation is "The rest are the steps for this row.".
| I don't understand. Can somebody explain?
| afc wrote:
| Thank you!
|
| Mouse over each abbreviation and you should see a tooltip. This
| specific row would mean "2 knit, Knit Front Back, 6 knit, with
| yarn in front 3 slip."
|
| This may also help:
| https://en.wikipedia.org/wiki/Knitting_abbreviations
| mrosethompson wrote:
| These are generally written as k2, k6, etc. -- is there a
| reason why you reversed them?
| afc wrote:
| Oh, good point, I might swap them. I think you're right.
|
| I sometimes print something like "8(K P)" where I think
| putting the number in front makes more sense. But yeah, I
| think if there are no parentheses, I should just print it
| as you suggest.
|
| Thank you!
| esquivalience wrote:
| Your friend will likely be familiar with this notation, which
| is fairly standard (though not by any means universal). I think
| it means: knit 2 stitches, then knit the next stitch twice
| (incrementing the number in that row as result); knit 6 more
| then slip the last 3 stitches while holding the yarn in front.
| 082349872349872 wrote:
| > _" Purl 24 (32 38 42 50 64) times"_
|
| Syntax like this is probably why wartime censors disapproved of
| mailing knitting patterns.
|
| EDIT: someone needs to write a short story procedural in which
| the plaintext turns out to be a knitting pattern.
| munificent wrote:
| I started learning to knit last fall and I have been really
| enjoying it.
|
| If you're a software engineer, I think it scratches a lot of
| itches:
|
| 1. Knitting patterns are sort of like a tiny little programming
| language, with loops (as in iteration, not as in, uh, loops of
| yarn) and choice.
|
| 2. Knitting charts are a lot like pixel art.
|
| 3. There is a very fine-grained skill progression where you can
| ease your way in by starting with simple patterns that only use a
| few techniques. But there is always a next level of skill and
| challenge. The lore is incredibly deep and there is a _ton_ to
| learn. You 'll never run out of ways to improve your expertise.
| At the same time, even as a beginner, you can make objects that
| are useful and beautiful.
|
| 4. If you're tired of staring at a screen and crave something
| tactile, it is an excellent counter-point. It's extremely
| tactile, hands-on, and texture-oriented. It just _feels good_ to
| knit or play with yarn and textiles. There are so many rich
| colors and color combinations at a level of vibrance that a
| screen never attains.
|
| 5. If you're mentally tired at the end of the day but still want
| to feel like you're making progress on something meaningful
| instead of just scrolling on your phone, you can always pick up a
| project and knit a few more rows without needing a lot of
| brainpower. At the same time, you can also choose projects with
| enough complexity that it doesn't feel totally mindless like a
| coloring book or something.
|
| 6. Unlike software where much of our output is intangible and
| meaningless to the world, _everyone_ can see and appreciate
| knitted objects. The things you make are instantly beloved and
| appreciated.
|
| 7. If you are introverted and prone to anxiety, knitting is a
| very nice therepeutic escape.
|
| I highly recommend it.
| mk12 wrote:
| Wow, this is exactly how I feel! I'm a software engineer and I
| also started knitting last year. I'm really enjoying it for all
| the reasons you listed.
| rnoorda wrote:
| Point 4 is what resonates with me, and first got me into
| knitting. So much of what I do is in front of a screen, and
| creating a real, physical object and having something to occupy
| my hands lets me step away from the computer and work
| relatively mindlessly.
| mk12 wrote:
| A while ago I started to build something similar, but I didn't
| get much farther than choosing a name for the project
| (https://github.com/mk12/loopy). I want to design a language that
| can specify patterns precisely and unambiguously, and then
| visualize them in a physically accurate way. For basic 2D
| patterns I was thinking I could render each stitch based on it
| and its neighbors (3x3 grid of K/P). But that wouldn't be that
| useful. What would really be neat is to use a physics engine to
| simulate the yarn in 3D. For example the simulations would show
| stockinette curling and ribbing stretching without that being
| hardcoded anywhere. But I think it's too hard and I have no idea
| where to start with that.
___________________________________________________________________
(page generated 2024-05-09 23:01 UTC)