A Little Bit of TinyScheme, a Lot of Cozonac

November 25th, 2019

There are few things as quintessentially Romanian, to my mind, as cozonac; the golden, nut-swirled, babka-like pastry dolled up and drummed out into the daylight for the two major Eastern Orthodox holidays. Then again, I'm not even so sure it's actually Romanian. Cozonac's one of those things that most states in the region boast as being their own, right up there with moussaka, smoked eggplant salad, goulash, and stuffed cabbage rolls. The diacritics and thus pronunciations may change, but not much else does. I guess it's proper, then, to introduce cozonac as an Eastern European thing, and to point out its specific spelling is Romanian.

Now that we've gotten there, we can promptly throw out a good half of what Romanians, and Eastern Europeans at large for that matter, think they know about cozonac. There are two main problems: the first's that folks don't put nearly as much of the awesome chocolate-walnut filling in their loaves of cozonac as they ought to (("Ought to" maps, of course, to as much as MP would like, here.)), and the second's that they put way, way, WAY too much sugar in it. A fairly common artifact of modern processed diets, the whole "dessert means heaps of sugar laced with occasional other ingredients" fanaticism is a hoary old positive feedback loop.

Thus armed with spite and sparseness, we can proceed to actually make some of this stuff. Except that I wanted to try out Mircea Popescu's image processor for blog articles, and also jfw's version of the same. Except! It turns out the box I'm using for publishing doesn't have Image Magick, required for both tools. An' I'm not happy about installing things --at all, much less things I don't know much about to "just get it to work". I do have Gimp, though, which was what I'd been using to process my pictures manually. And! It turns out Gimp uses TinyScheme, which wouldn't be a total waste of time to muck in a little as it's an interpreter of a dialect of Lisp, and maybe not too many layers removed from relevancy to learning to use some tools likely to survive the Republic's reckoning, thereby.

The following gets saved as batch-scaler.scm, to be placed in the ~/.gimp ((I'm using 2.8, fwiw.))/scripts directory:

(define (batch-scaler pattern
			new-width
			new-height)
	(let* ((filelist (cadr (file-glob pattern 1))))
		(while (not (null? filelist))
			(let* ((filename (car filelist))
				(image (car (gimp-file-load RUN-NONINTERACTIVE
								filename filename)))
				(drawable (car (gimp-image-get-active-layer image))))
			(gimp-image-scale image new-width new-height)
			(gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
			(gimp-image-delete image))
		(set! filelist (cdr filelist)))))

Note that I've put extraneous spaces between all multiple parentheses; you'll have to take these out. If someone has a better idea for preventing MPWP's cannonical footnote plugin from interpreting lisp parentheses as footnotes, please write in. The very MP in question has a fix for this in the comments, works splendidly.

Running it goes like so, from the directory where your selected but otherwise raw pictures are:

gimp -i -b '(batch-scaler "*.JPG" 1024 638)' -b '(gimp-quit 0)'

I scale my images when I re-size them, so I grabbed gimp-image-scale from the "Script-Fu Procedure Browser" and worked it into a batch processor, which goes through a glob of files according to the pattern given when running it (as long as the glob isn't empty) and then without loading the Gimp GUI, loads the pictures themselves, selects the drawable part, scales them according to whatever's set when running, saves them, and deletes the originals.

Some important problems: this only works for landscape-oriented images; you could pick out portraits, put them in a different folder and run this on them with different size parameters, but that's not so efficient. If I figure it out, I'll update this article, otherwise if anyone would care to modify this, please do. Ideally the width should be set to 1024 while preserving the aspect ratio, rather than manually specifying the length, too, regardless of orientation. Another thing to consider is that this creates one set of images, not a display size and larger size pair as in MP's process. Further, this just overwrites the images and saves them as such; the file-jpeg-save function takes fourteen, FOURTEEN, parameters, and I really can't be assed. So once the above is done,

ls -v | cat -n | while read n f; do mv -n "$f" "cozo-$n.jpg"; done

Then you can proceed to upload them as normal.

Anyway, I was saying: let's make cozonac. The instructions below are for two loaves, because who does this laborious stuff one output item at a time?!

First comes the filling. I typically make the filling the night before as it needs to cool completely before being used, otherwise it'll make steam pockets in the dough and fuck up the whole thing. Grind about a half kilogram of walnuts ((You can also add some measure of pecans, almonds, pistachios, or macadamias, though walnuts are the traditional, and really the best for this recipe.)) and add them to a saucepan in which you've dissolved about a tablespoon of brown sugar into 150ml or so of milk over low heat. Keep stirring; you want a paste-like consistency, for which reason you may use a little more or a little less milk. After it's thickened admirably, stir in a little rum.

cozo-1

And five or six tablespoons of unsweetened dark cocoa. Zest an orange or three and stir in the zest, too. Your mixture should be fairly thick, and very nicely scented. Set it aside, or put it in the fridge if you're saving the rest 'til tomorrow.

cozo-2

For the dough, melt 150 or so grams of butter into another 150ml or so of milk. Dump two more tablespoons of brown sugar in there, and once everything's dissolved and incorporated take it off the heat and zest two oranges and a lemon into it, and add some vanilla; either scrape the seeds into it or steep a pod in the milk while it heats, or better yet, do both.

cozo-3

Also while you're waiting for the temperature to drop, get something like 2/3rds of a kilogram of bread flour into a big bowl, add a pinch of salt, a teaspoon each of cinnamon and nutmeg, a handful or so of the best raisins you can find, and plenty --that's around 6 grams-- of dry yeast, and distribute it all evenly. ((You can also use fresh yeast, which imparts a pleasant flavor for those with a taste for it. It'll also cause your dough to rise a little faster, which isn't a bad thing. To do this, mix eight to ten grams of crumbled fresh yeast into the warm milk mixture after you mix in the eggs, which are coming.))

cozo-4

Once this concoction's cool enough to touch but still warm, break three eggs into it and stir.

cozo-5

Now dump the wet stuff into the dry stuff, and knead it until it's pliable and doesn't stick to your hands too much. You might need to add a little more flour; not too much though, or your dough will be too tough. Once you're done kneading form the dough into a ball and let it rest in a warm kitchen under a slightly damp towel.

cozo-6

If your kitchen is cold, heat your oven for a few minutes, then turn it off and put the bowl in there. Leaving dough to rise in a cold place is begging for disappointment.

cozo-7

Once your dough has doubled, which should take anywhere from 45 minutes to an hour and a half or so, prepare a workspace for rolling. Your filling should be room temperature, either because you've let it cool for several hours or you've taken it out of the fridge a few hours before --note that very cold filling is no good here, as it'll cool the dough for its second rise and you'll be stuck waiting f o r e v e r to get your loaves in the oven.

cozo-8

Oil your countertop/foil-lined table/friend's back/whatever surface, and do the same with your rolling pin/wine bottle. Generously butter two loaf pans and sprinkle them with flour.

Divide your dough into quarters. For each loaf, roll out first one quarter and then the other into rectangles, until they're quite thin but not too thin to pick up. Spread each with a quarter of your filling, leaving small margins at the edges.

cozo-9

Roll these up lengthwise, then twist them together to make a floppy, unwieldy helix; immediately plonk them into the loaf pans before they get any unwieldier.

cozo-10

Brush them with an egg yolk beaten with a bit of milk, and let them rise another hour or two, until they've started to threaten the edges of the pans. Then bake at 200C, preheated if you're stuck with an electric oven, for just about an hour. After fifteen minutes or so in the oven, lightly cover the loaves with aluminum foil to keep the tops from burning.

cozo-11

Let them cool for a few minutes after taking them out, then remove them from the pans and cool them completely, resting on their sides, and switching sides occasionally. There's a delicate juxtaposition of dense chocolaty nuts and light, puffy dough inside --it has to cool down gently and evenly, hence all the elaborate dancing.

cozo-12

Once they're cool, slice and enjoy. Cozonac also freezes very well, and can even be eaten as frozonac, for the adventurous. All in all this is a rather heathen recipe, unlikely to be approved of by most Romanian cooks, who tend towards the strict and unexaminedly-traditional side. It is however highly praised by those whose opinions I actually care about, and owes something to the instruction of Ellie, whose basic discussion of procedure managed to somehow break through very heavy Hallmark-isms, Jesus worship, cups and cups of sugar, and other incompatibles to teach me something.

3 Responses to “A Little Bit of TinyScheme, a Lot of Cozonac”

  1. Diana Coman says:

    Says the child: better yet, skip all that dough dance and simply eat the chocolate-and-nuts mixture, it's anyway the best part!

  2. > If someone has a better idea for preventing MPWP's cannonical footnote plugin from interpreting lisp parentheses as footnotes, please write in.

    sed 's%(%\(%g'

    > and deletes the originals.

    This is not such a good idea in principle, lest you debug by lossage. Take the extra time to delete your sources manually, it's gonna save a lot of greif on the long term.

    > If I figure it out, I'll update this article, otherwise

    Yeah, "geometry" in imagemagick lmao.

    > It is however highly praised by those whose opinions I actually care about

    That it is ; best in the world.

  3. spyked says:

    > folks don't put nearly as much of the awesome chocolate-walnut filling in their loaves

    Not sure about the walnut, but I completely agree re. the chocolate. Then again, I suppose chocolate/cocoa was a big luxury back when my grandma started making cozonac. Speaking of which, her ol' cozonac recipe used to contain rahat of all things.

    > you could pick out portraits, put them in a different folder and run this on them with different size parameters

    FWIW, I do these manually, because I tend to artsy-fartsy-stically crop landscape-shaped pieces of the portrait when baking the thumbnails. Portrait is gross anyway, so what can I do.

Leave a Reply