Journal Archive About the Journal
Least Common Multiple
Journal entry for 05 Jul 2010 | Link
Advanced Ravioli
We hauled an unopened box containing a pasta machine from Boston to California to Boston, and I was determined to break it out and use it this summer.

Duh duh dummm.
The first challenge was locating semolina flour, which forms a glutinous dough ideal for rolling into pasta. The Italian market we usually shop at in Roslindale couldn't help us. "We used to carry it, but nobody would buy it, and it would go bad," said the proprietor. "Besides, we get fresh pasta from Italy. You think you can do better than them? They've been making pasta for thousands of years." No disrespect, but in the time that your pasta sails out of Gioia Tauro and finds its way into your refrigerated display case, the only sense in which it's fresh is that it isn't dried.
Tutto Italiano in Dedham set us up. After a brief but serious consultation between a couple of the counter staff and the owner, one of them went in the back room and emerged with a large deli container full of semolina flour. They charged me a couple of bucks and left it at that.
I combined two cups of flour with a half cup of water and a teaspoon of salt. That formed a lump of dough the size of a softball, which I kneaded for ten minutes. Kneading is pleasant work with a handheld ball of dough: crush, ball back up, crush again. I went outside, kneading all the while, and chatted with my wife, who was sunbathing, sipping an IPA, and reading the recent Vanity Fair article on David Petraeus. (You gotta love a woman who keeps abreast of military affairs.) I returned to the kitchen, dropped the ball in a bowl, and covered it with a towel to rest for twenty minutes.

This gave me time to read Bunny Smedley's latest, a meditation on the role of art in a contemporary religious setting. You should do the same.
How things have changed! My point, though, is neither to decry nor praise this state of affairs, which is what it is, at least for the moment — for if the great Peter Fuller spent the best years of his life trying to fit the square peg of faith into the round hole of modernism, or perhaps vice versa, what hope is there for me? Rather, it’s to draw attention to one reason why virtually everything that manages to bridge the gap between devotional functionality and art-critical prestige these days tends towards the open-ended, perhaps historically allusive yet doctrinally blurry end of the spectrum. It may genuinely too much to ask of a successful practicing artist to say ‘I believe’, at least through the medium of his or her work. Most, anyway, probably don’t believe. But then it seems tactless to press the question. In any event, I find myself repeating, perhaps it simply doesn’t matter that much. Is it just me, or is Bacon’s enjoyably anguished doubt at least as recognisable, perhaps even as welcome, as Sutherland’s somewhat featureless belief, let alone Spencer’s highly personal, often downright embarrassing religiosity? Does a work like The Red Mannheim hold up a mirror to men’s souls that if anything, proves a little more revealing than some of us might like? As a culture, are we simply getting the devotional art we deserve?
Back in the kitchen, with no prior instruction on how to use the pasta machine except the pictures on the side of the box of the wondrous thing in action, we rolled the dough through on the fat setting, then a thin setting. A ramekin was soon replaced by a wine glass for cutting the circles.

A puree of butternut squash went on the circle of dough.

Another circle of dough went on top, and I pinched the edges.

Soon we had a surfeit of ravioli.

Only a couple of dissidents tried to stick to the bottom. The rest floated to the top when cooked just like you'd expect of ravioli. The sauce was tomatoes, asparagus, and capers.

Ravioli were perhaps an overly advanced project for a first outing upon the pasta machine, but they were a success, and we are now set up for all manner of future projects: fettuccine and capellini with the flour at hand, to say nothing of tailor-made ravioli stuffed with all manner of mashes and minces. Once we locate rice flour at an Asian market, there will be dim sum and pad thai. Buckwheat flour will put us in business for udon.
Homemade pasta cooked al dente has a savory chewiness not present in store-bought form. There is also the payoff that comes with tweaking one's personal universe for edification, pleasure, and bragging rights. As put by Peter Barrett, our personal kitchen god to whom we have a miniature shrine dedicated with offerings of anchovy paste:
You don't get to complain about how little time you have to make good meals if you watch TV. Cancel your damn cable, already; 99% of TV–including food TV–sucks ass and makes you stupid, and it's underwritten by the exact same assholes who are destroying the planet by making the worst food possible available in unconscionably subsidized quantity. Voting with your eyeballs and hours is as powerful as voting with your dollars, and both are just as important as voting in every election. The Internet is every bit as much of a time-suck as TV; there's more variety, sure, and it's interactive up to a point, but it's very very far from spending the same amount of time mano à mano with actual food, deepening our understanding and skill and interacting with friends and family. When so much of the food web is a weirdly antiseptic mixture of public eating disorder and circle jerk, with an epidemic phobia of hurting people's fee-fees reducing most of the "conversation" to the point of gibberish, it risks becoming more of a problem than a solution. Turn off the tubes and make dinner.
Monotropa Uniflora
Traipsing around the Hammond Pond Reservation, we came across something sprouting from the earth that seemed neither mushroom nor plant. We snapped a photo with the phone:

An inquiry sent out to the Reddit hive-mind elicited an identification: monotropa uniflora, or Indian pipe. It is a plant, but one without chlorophyll, as it obtains its energy parasitically from a fungus that gets its energy from the roots of trees.
Recursion, I Hear You Cry
Perhaps you read over the turtle geometry bit in the journal a few weeks ago and said to yourself, "This duopoly() function is all well and good, but if we can increase the number of vectors from one to two, then why not three? Verily, why not any arbitrary number of vectors?" Indeed we can. Python has a type called a tuple, which is an immutable list of comma-separated values. We can use a tuple to represent angle and length, (90,100), for instance. Python also has lists, into which we can put tuples. Hence we can declare a variable with as many (angle, length) tuples as we like:
a = [(1,1), (90,100), (120,100)]
You remember vector(), of course:

Python is clever enough to run through our list one tuple at a time as long as there are tuples to unpack, using a for-in loop. Python can also assign the tuples to useful variables as we run through said for-in loop.

We can then run poly(a).

poly(a) where a = [(1,1), (90,100), (120,100)] (circle, square, triangle)

poly(a) where a = [(1,1), (-1,2), (120,100)] (circle, larger reverse circle, triangle)

poly(a) where a = [(1,1), (-1,3), (5,5), (-2,2)] (circles and reverse circles)
And so on. But you won't be satisfied until I rewrite poly() to use recursion.

In other words, if turn has no value, make it equal 1. Then for every (angle,length) in the list, draw the vector. Increment the turn, and call the selfsame function on the result.
The first version runs forever, requiring you to hit Ctrl-C and kill it from the keyboard. The second throws a recursion depth error after it goes around a thousand times. Really, we just want to close the drawing and stop. How do we know when the drawing has closed, though? We know because the total amount of turning, measured in incrementing angles, equals an integer multiple of 360. In other words, the incremented angle modulo 360 equals zero.
(turn * angle) % 360 == 0
Python has Boolean types, which lets a variable be True or False. If a is true and b is false, then a AND b is false. Just as turn += 1 adds 1 to turn, Python has a &= operator, which will AND a Boolean onto a variable. Let's set a variable called arrived to True. We'll draw each vector in the list. Then for every angle in the list, we'll perform the above test on it—to see if the turn times the angle mod 360 equals zero—and AND it onto arrived. (We'll print the variable values to the terminal just to see what's going on.) Any inequality along the way will falsify arrived. If we have not arrived, we'll increment the turn and call the function on itself.

That works, but looking at the values printed to the screen, it becomes clear that the number of turns is simply the least common multiple of the number of sides of each shape. A triangle closes in three turns. A square closes in four. A poly() of a triangle and a square closes in twelve, or rather, each vector needs to be drawn twelve times. All we need to do is figure out the least common multiple of the sides of each shape, and draw each vector in the list that number of times. Time to write a least common multiple function.
For this, we'll use a Python feature called a list comprehension, which operates on each value in a list, thus returning an altered version of the list. If the variable a is the list [1, 2, 3], the comprehension [2x for x in a] returns the list [2, 4, 6]. For our least common multiple function, we'll find the largest number by sorting the list and picking off the value at the end. The least common multiple will be a multiple of the biggest number. So we can try the biggest number times one, times two, times three, and so on until we find the number that can be evenly divided by every number in the list. Restated as code, we're looking for the multiplier that causes the following comprehension to return a list of zeroes.
[(multiplier * biggest) % value for value in values]
To see if we have a list of zeroes we'll use Python's built-in sum() function, which adds up all the items in a list. If the sum of our list comes back as something other than zero, we'll increment the multiplier and try again. When we have our multiplier, we'll return it times the biggest number, and there's our least common multiple.

We know that a triangle (vector of 120°) closes in three turns and a square (90°) in four, but what's the general principle? Is it 360 divided by the angle? No, 144° gives you a five-pointed star. It's the least common multiple of the angle and 360, divided by the angle.
lcm([360,angle])/angle
Given a list of (angle, length) tuples, we can write a list comprehension that unpacks the list, performs the above calculation on each angle, and returns a list of the number of sides of each polygon. (length is unpacked and tossed out here. We need it only to load angle with the right value without a fuss.)
[lcm([360,angle])/angle for angle, length in vecs]
The least common multiple of that list is the number of turns we need to draw a closed shape.
lcm([lcm([360,angle])/angle for angle, length in vecs])
Thus we can rewrite poly() in four lines.

Ah—the refreshing taste of elegance. The satisfaction of a rewarded search for an elegant solution is a difficult feeling to describe to non-coders. It is just as difficult as describing the happiness of putting a line in the right place to a non-artist. Take another instance: recently I was cleaning up the HTML in a buddy's resume. Google Docs had riddled the thing with font tags. I could have eliminated them one at a time, but that's no fun. Fun is opening the document in Emacs, futzing around with M-x regexp-builder for a few minutes, then executing M-C-% and replacing </?font.*?> with nothing. Boom, no more font tags, and no more closing font tags. It works because </?font.*?> is a regular expression that matches the left angle bracket, zero or one slash, the word font, and the least number of any characters up to a right angle bracket. Real coders can do this kind of thing in their sleep but the joy of discovery is mine anyway.
Reader Mail
On Facebook:
My Very Talented Grad Student refuses to touch Facebook. "It is demeaning," he says. "I don't want to do what those other jerks do."
It certainly gives you the opportunity to demean yourself.
After considering Facebook I decided that the best policy would be to list my web sites and not engage in any further activity on it. My "friends" who engage on it are sympathetic people but I do not think they are doing themselves any favors. Facebook violates privacy by one's own choice, and opens one up to other peoples' rotten asides. It makes one look needy. You can't win an exchange with someone like Garnett because you are not working from the same rules of order. She is an inferior mentality which you should not be engaging with. (I especially like her ignorant neologism "no-nothing".) When I argue with idiots, I try to do it in a forum where the smart people will read it and chip in. At Artblog.net you had a collection of smart people. I don't think this happens on Facebook. It doesn't seem like that kind of forum.
It differs on a case-by-case basis. As I said at the time, if you want an echo chamber, you can have an echo chamber. Insecure personalities crave an echo chamber. At the other end of the scale of maturity, there was Groucho Marx, who would not join any club that would have him as a member.
On interactionism:
Dear Reader Mail Editor: Skimming through Sebastian Smee's recent Mass MoCA review, I was wondering how Interactionism relates to the new movement he identifies: displaying-ephemeral-materials-on-a-grandiose-scale-ism? Or rather to-reconnect-art-with-the-enchantments-and-marvels-of-childhood-ism? These movements strike me a cousins, but perhaps they are the same thing? Please help me understand what's going on here. Signed, Confused
Dear Confused: Not only are they the same thing, but not long after I read Smee's review I came across an article about Rivane Neuenschwander in the New York Times:
In Ms. Neuenschwander’s conceptual-art variation, which will be displayed at the rear of the New Museum’s lobby, colorful silk ribbons have each been stamped with one of 60 wishes left by previous viewers of the piece. The show’s visitors can take a ribbon from one of 10,296 small holes in the wall in exchange for scribbling a new wish on a slip of paper and inserting it into the hole. “When I was starting off, I was very interested in the ephemeral, in quotidian materials that disappear or are subject to entropy, which is how my art got stuck with labels like ‘ethereal materialism,’ ” she explained.
Ms. Neuenschwander apparently knows of materials that are not subject to entropy along with the rest of the universe. Science would be enriched by this knowledge. And the poor dear, her art got stuck with a label. It's interesting to note that a Web search on her name and the label turns up a 2007 Frieze article that describes "ethereal materialism" as "a phrase the Brazilian Neuenschwander has used in the past to describe her project." So we know who stuck it there.
Good, if not great, interactionist art should be possible, but not in a haze of artspeak and invitations to sentimental busy-work characterized by tendentious wishful thinking. This brings us to our concluding topic for this entry:
Worth Doing
In yet another provocative meditation upon a book I should have read several months ago, Shop Class as Soulcraft, Jack Donovan sets up the author's story:
[Matthew] Crawford eventually went back to school and earned a Ph.D. in the history of political thought. He took a high paying job at a Washington, D.C. think tank, and was tasked with coming up with scholarly-sounding arguments that "put a scientific cover on positions arrived at otherwise." Any honest person with a substantial vocabulary and an aptitude for fancy writing will tell you that it is easier to come up with dazzling bullshit than it is to actually think. (See also: "the art world")
See the art world indeed. Our profession has become synonymous with bullshit to ordinary people. How it happened could be summed up by a direct quote from Crawford himself:
The satisfactions of manifesting oneself concretely in the world through manual competence have been known to make a man quiet and easy. They seem to relieve him of the felt need to offer chattering interpretations of himself to vindicate his worth. He can simply point: the building stands, the car now runs, the lights are on. Boasting is what a boy does, because he has no real effect in the world. But the tradesman must reckon with the infallible judgment of reality, where one’s failures or shortcomings cannot be interpreted away. His well-founded pride is far from the gratuitous "self-esteem" that educators would impart to students, as though by magic.
Art becomes a bullshit pursuit when it trades real for ersatz effect upon the world. The Plagens quote from last week summed up those ersatz effects:
It's another one of those didactic anthology shows purporting to bring some issue that artists think regular folk have either thought about incorrectly, or have repressed entirely, out into the open and, in the patois of today's art world, "address," "confront," "deconstruct," "unpack," and "interrogate" the hell out of it.
Plagens's patois and Crawford's chattering describe the same phenomenon, a presentation of putative instead of inherent value. In the meantime I feel personally challenged to make art at which one can simply point.