News for hackers. Stuff that matters.
Re:Your Career in Computer Programming (2015) by yowlingcat on Wednesday June 24, 2020 @08:06PM (#23635321)
I'm sure someone here has a better explanation for a connection I've been thinking about (and saw on twitter, for what it's worth), so I figured I'd ask here.

I've never looked that much into knitting, but the instructions seem remarkably similar to assembly language instructions. Beyond that, I did a little bit of research into a jacquard loom works the other day, and realized it operated using punch cards. This really fascinates me, because it seems to precede Babbage's machine and yet I never have read particularly much treatment of it in history of computing type treatises.

I wonder if, given some of the conventionally more feminine stereotyped gender roles pertaining to knitting and clothmaking, any of this played into what early conceptions of what a "programmer" was? Was there a point where people reasonably made the inference that the closest analog for what early punch card programming was would be jacquard loom operation and knitting? It is fascinating how it the idea of the vocation of writing software flipped the other way in terms of gender stereotypes.

Re:Your Career in Computer Programming (2015) by grawprog on Wednesday June 24, 2020 @09:10PM (#23635760)
My girlfriend's into crocheting. One day I went with her to the craft store and she got a few pattern books. I looked through a bunch of them and my first thought was 'oh, shit, they're all a bunch of computer programs'. I'd never really thought too much into it before, but my girlfriend explained how the patterns work to me and they're basically lines of code. There's even rudimentary loops and if statements.

Now I'm wondering if anyone's ever looked into making a Turing complete 'knitting instruction set' or ever looked into whether knitting was in fact Turing complete and if not, how to make it so. Would make for an interesting master's thesis or something. I'd read that paper.

Re:Your Career in Computer Programming (2015) by slavik81 on Wednesday June 24, 2020 @09:54PM (#23636048)
There are knitting machines for which you enter knitting instructions. As different machines have different capabilities, you may wish to compile your high-level knitting patterns to different knitting instruction sets. Some compilers are better at optimizing than others, resulting in more efficient knitting programs.

See "A Compiler for 3D Machine Knitting" and accompanying video. https://la.disneyresearch.com/publication/machine-knitting-c...

Re:Your Career in Computer Programming (2015) by grawprog on Wednesday June 24, 2020 @10:04PM (#23636102)
This is why I love hn. I post a random thought on the idea of a 'knitting computer' on a comment comparing knitting and programming and someone comes along with some detailed post showing exactly such a thing exists and information explaining it. Thank you.
Re:Your Career in Computer Programming (2015) by perl4ever on Wednesday June 24, 2020 @10:51PM (#23636390)
Re:Your Career in Computer Programming (2015) by hhjj on Thursday June 25, 2020 @01:05AM (#23637105)
Re:Your Career in Computer Programming (2015) by adeeshaek on Wednesday June 24, 2020 @09:04PM (#23635709)
I think you're right. Knitting patterns are inherently algorithmic, and the notation of knitting patterns contains abstractions very similar to control flow abstractions we use in computing, such as for loops and conditional logic. In addition, knitters tend to reduce each section of a complex pattern into reusable modular sets of instructions, and they also reduce individual instructions into a short set of glyphs.

An example of a particularly complex pattern can be found here, if you are interested: https://www.ravelry.com/patterns/library/the-queen-susan-sha...

I am a software engineer, and my wife is a champion knitter - she knits sweaters with cabling or colorwork. She is not a software engineer by trade, but she does construct complex software for modeling primate behavior in the wild (she's a PhD candidate), so I definitely see her applying the same skillset in both contexts.

Re:Your Career in Computer Programming (2015) by perl4ever on Wednesday June 24, 2020 @10:48PM (#23636371)
I don't think, based on my own family history, that the vague stereotypes you're talking about had anything to do with why women did or didn't become programmers early on. Do you assume men weren't involved in the textile industry?

What happened (anecdotally) is that early in the history of computers, it wasn't possible to get into an engineering program for any reasonably bright woman. They're like "of course we admit women, but we already have a woman". The punch line being that they didn't even have one woman as an undergraduate. So maybe you go to a woman's college, and maybe you study math, and then you end up working as an assistant to an engineer, who is analogous to a secretary, taking engineering problems and coding them.

[Edit: I have or had a picture of the person I'm describing with a non-industrial knitting machine, but probably considerably later than the 50s when she started programming]

Re:Your Career in Computer Programming (2015) by yowlingcat on Wednesday June 24, 2020 @10:53PM (#23636397)
> Do you assume men weren't involved in the textile industry?

It certainly seems that way, at least for garment workers in industrial era (and this assumption may be inaccurate). But historically, I don't think that pattern really holds at all before the industrial era. I wonder why this was the case?

Re:Your Career in Computer Programming (2015) by thirdhaf on Wednesday June 24, 2020 @09:36PM (#23635932)
There's an episode of James Burke's Connections that explores this idea with a bit of depth, I recommend watching the whole series if you have the time.

James Burke Connections, Ep. 4 "Faith in Numbers"

Re:Your Career in Computer Programming (2015) by aspenmayer on Wednesday June 24, 2020 @09:53PM (#23636042)
I can second this recommendation, and broaden it to everything James Burke has ever done for BBC. He is an amazing science scholar, and also quite witty. He makes amazing educational programming. I especially enjoy Connections[1] and its sequel series, as well as the lesser-known The Day the Universe Changed[2] series, about the impact of science and technology on society, from a philosophical point-of-view, rather than the mainly technical approach of Connections.

If anyone close to him is reading this, please thank him for me. I saw Connections many years ago, and he opened my eyes to the wonder of inventions. Anyone can make things. That’s how we got to today, just lots of interworking inventions. He changed my life.

An excerpt from his Wikipedia page[3] I think HN readers may find intriguing:

> Burke conceived a mobile app called Connections that would search Wikipedia and generate associations and connections among apparently unrelated fields of knowledge or topics. Surprises, anomalies, and unexpected perspectives on a search could emerge from using the app. According to Burke, the Connections app would be an innovative alternative to more linear internet search engines such as Google.[12] As of January 2017 the project had met only 1/3 of its Kickstarter crowdfunding goal.[13]

[1] https://en.wikipedia.org/wiki/Connections_(TV_series)

[2] https://en.wikipedia.org/wiki/The_Day_the_Universe_Changed

[3] https://en.wikipedia.org/wiki/James_Burke_(science_historian...

[Original Wikipedia links, numbered as quoted]

[12] http://boingboing.net/2016/11/17/james-burkes-new-project-ai...

[13] https://www.backerkit.com/projects/504632459/james-burke-con...

Re:Your Career in Computer Programming (2015) by awhitby on Wednesday June 24, 2020 @08:33PM (#23635490)
It's an interesting idea but I don't think it holds up. The earliest tabulators didn't use punch cards to store "programs" but to encode data, and the mechanical work of punching data into cards, then processing those cards, was fairly rote. "Programming" those machines meant rewiring, as it did for quite a few generations of technology. So while the card handling was certainly done by both men and women [0], I think it's a stretch to suppose it bridged weaving and later (stored program) programming.

Others here will probably have personal memories of the late mainframe era, but my understanding is that even then writing code and punching it on to cards were not necessarily done by the same person, with code first written out long hand on special forms then punched by a specialist. [1]

[0] First, at scale, in the 1890 US census. I just published a book with a chapter on this: http://www.thesumofthepeople.com

[1] e.g. as described here https://code.likeagirl.io/the-first-program-i-ever-wrote-5a5...

Re:Your Career in Computer Programming (2015) by yowlingcat on Wednesday June 24, 2020 @10:48PM (#23636369)
> I don't think it holds up.

Could you clarify where it doesn't hold up? The biggest issue I can think of with the loom as computer analogy is reusing previous work. Perhaps what you are describing about the boundary between the cards and the data (at least for a loom) is that you can't write data out the cards and then read it back in again. But even here, I'm not exactly sure that's theoretically watertight.

Suppose you had a seed set of cards that formed a chain. Based on that you weaved fabric which had strategically placed holes such that they could function like a card. Given that you can now write output in the same format you read input, does this mean you could use a Jacquard Loom as a Turing Machine (never mind whether someone would do such a harebrained idea)? And of course, just because you maybe could doesn't mean that anyone bothered, in large part for the reasons that the inventor of the tabulator machine chose to use punch cards (rather than fabric) in the first place!

That machine you reference does seem to be the first machine that can both write and read to its input medium, the punch card, and from there, I suppose, it is history. Still, I'm convinced that there's something very interesting and maybe core to computation embedded in humanity's usage of the loom and in fabric itself. We can earnestly consider it a predecessor to the printing press (and tabulating machines) in how it provided technology to store and preserve bytes of data (representing bitmapped images) in fabric. This is another grasp in the dark, but it almost reminds me a little bit of the FFT.

Re:Your Career in Computer Programming (2015) by Animats on Thursday June 25, 2020 @04:34AM (#23638276)
That machine you reference does seem to be the first machine that can both write and read to its input medium, the punch card, and from there, I suppose, it is history.

Machines that could both read and punch cards in a programmable way were fairly rare. Keypunches could make a copy of a card, and even copy only selected fields, but that was about it. IBM built devices that could read a card, multiply, and punch the result in the same card. (Also see the McClure Multiplying Punch, a mechanical monstrosity from Powers-Samas in England. This could not only multiply, it could so in pounds, shillings, and pence.)

As I've pointed out before, the early history of computing was a long, hard slog trying to make a storage device. Mechanical arithmetic was old; Pascal built a mechanical adder in 1645 (!) and Leibniz built a mechanical multiplier in 1694. IBM had an electronic multiplier in R&D before WWII. But the first computing machine with significant memory (a delay line) was built around 1947. It was clear by the late 1930s that cheap, fast memory would make computing a lot easier, but cheap DRAM was many decades away.

Re:Your Career in Computer Programming (2015) by TrinaryWorksToo on Wednesday June 24, 2020 @08:45PM (#23635564)
In fact, NASA used a sort of knitting as an early form of ROM! https://en.wikipedia.org/wiki/Core_rope_memory
Re:Your Career in Computer Programming (2015) by Stratoscope on Thursday June 25, 2020 @01:30AM (#23637233)
Re:Your Career in Computer Programming (2015) by aspenmayer on Wednesday June 24, 2020 @10:02PM (#23636094)
I came across these two garment/gaming crossover devices recently. One was a special knitting attachment for a NES of all things, but I think it was unreleased. Also found a series of sewing machines that worked with GameBoy Color, if I remember correctly.

I think the market wasn’t ready for that then, but perhaps with devices like the Raspberry Pi, 3D printing, and the right software, a new loom boom could be reborn.

https://kotaku.com/this-long-lost-nintendo-knitting-machine-...

https://hackaday.com/2020/03/11/there-really-was-a-sewing-ma...

Re:Your Career in Computer Programming (2015) by charleskinbote on Wednesday June 24, 2020 @10:03PM (#23636097)
You might enjoy this talk [1] about weaving patterns as matrix multiplication.

[1] https://thestrangeloop.com/2018/its-just-matrix-multiplicati...

Re:Your Career in Computer Programming (2015) by zachrose on Wednesday June 24, 2020 @11:11PM (#23636510)
Not the question you're asking, but it's always been interesting to me how fibers and written language are intertwined. We talk about strings of characters. Text and textile come from the same word.
Re:Your Career in Computer Programming (2015) by 99_00 on Wednesday June 24, 2020 @10:01PM (#23636085)
Re:Your Career in Computer Programming (2015) by cachvico on Thursday June 25, 2020 @07:44PM (#23647090)