Saturday, December 22, 2012

Christmas 2012: Chorizo and roasted pumpkin risotto

In my quest to find interesting things to do with pumpkin, I came up with this chorizo-flavoured pumpkin risotto. Chorizo in a risotto base is something that I've been doing for about 3 years, but I found that the contrast between creamy risotto, smooth pumpkin, and tart lemon works remarkably well in this dish. Serves 4–6 as a main course.

  • 1 kg pumpkin
  • 2 sticks celery
  • 2 medium onions
  • 3 cloves garlic
  • 100 g unsliced chorizo sausage
  • 750 mm hot chicken stock
  • 150 mm white wine
  • 50 g Parmesan (or similar hard cheese)
  • 50 g butter
  • 1 lemon
  • Parsley
  • Olive oil

Preheat the oven to 200 °C (185 °C fan). Dice the pumpkin into 2–3 cm cubes. Spread the cubed pumpkin out on a baking sheet, use a pastry brush to roughly coat them with olive oil, and season generously. Put in the oven to roast for 35–40 min.

Finely chop the onions, celery, garlic and chorizo. In a wide-bottomed, covered pan, gently fry the onions, celery and chorizo in about 2 tbsp of the olive oil until very soft.

Next add the risotto rice and garlic, and fry for further 3 min. Now turn up the heat, and add the white wine to the pan. Keep stirring the risotto and gradually adding the hot stock until the risotto is cooked. It's okay not to use all of the stock; if you find that you need more liquid, just use boiling water.

Remove from the heat and stir in the cheese and butter. Gently stir in the roast pumpkin cubes, and allow the risotto to rest for at least a minute. Serve garnished with lemon wedges and chopped parsley.

Friday, December 21, 2012

Christmas 2012: Spicy pumpkin and carrot soup

This Christmas, I'm in charge of the menu (and the cooking) at home, and I'll be posting recipes for some of the food I cook. First up is a lovely warm and spicy vegetable soup that's delicious and quick to cook, and makes a great lunch. This recipe serves 3&ndash6 people depending on how hungry they are!

  • 2 medium onions
  • 2 cloves garlic
  • 1 stick celery
  • 4 carrots
  • 600 g pumpkin (approx)
  • 1 chili
  • 1/2 tsp paprika
  • 1 tsp cumin seed
  • 2 tbsp olive oil
  • 3 tsp vegetable bouillon powder
  • Large handful of red lentils

The key here is to chop the vegetables to appropriate sizes so that everything is ready to eat at the same time. Heat the olive oil in a large, heavy-based saucepan over a medium heat. Finely chop the onion, garlic and chili, and cut the celery into pieces about 1 cm on a side, and gently fry them in the oil with the cumin seed for about 5 minutes, stirring occasionally, until soft and clear.

Meanwhile, boil a kettle. Dice the carrots into pieces about 5 mm in size, and add to the pan. Next, cube the pumpkin to about 15–20 mm and add to the pan. Add the paprika, and continue to fry the vegetables together for another 2–3 min.

Add about 750 ml of the boiling water from the kettle to the pan along with the bouillon powder, and season with salt and pepper to taste (the liquid should be just enough to cover the vegetables). Bring to the boil, and sprinkle the lentils in. Finally, cover the pan, and simmer for about 30 min until ready to serve — preferably with some crusty bread and a wedge of cheddar cheese.

Monday, December 03, 2012

Making schematics look good with "gaf export"

<CareBear\> peterbrett : hey. gaf export is f-ing awesome!

People who've been testing the gEDA "master" branch over the last few hours will have got a sneak preview of a cool new tool that will be arriving in gEDA/gaf 1.9.0. The new gaf export command-line utility lets you quickly and easily export your schematics and symbols to a variety of image formats.

I've been wanting to introduce a tool like this for a while, but it's only become possible thanks to finally finishing a couple of big features that have been cooking in my personal branches for a couple of years: a new Cairo-based rendering library for gEDA designed to be used for both rendering in gschem and for printing/exporting graphics, called "libgedacairo"; and a new gEDA configuration subsystem, which I'll write about in more detail another time.

To get started, suppose I want to create a PDF from a schematic called grey_counter_1.sch. It's very straightforward!

gaf export -o grey_counter_1.pdf grey_counter_1.sch

From the output filename that I passed to the "-o" option, gaf export will detect that I want a PDF. It'll detect the size of the drawing, centre it in the default paper (choosing some suitable margins) and generate a PDF file.

Batch generation of PostScript files

Many people previously used gschem along with the (relatively obscure) print.scm script for batch generation of PostScript files. Usually the command looked something like:

gschem -o -s /usr/share/gEDA/scheme/print.scm grey_counter_1.sch

Don't do this any more. It is slow (because it needs to load all of gschem's configuration), requires an graphical desktop to be running (because gschem can't start without trying to display its windows) and doesn't provide any way to directly customise formatting options without fiddling with Scheme scripts. Also, gaf export generates much nicer PDF output than PS, especially if you want to do anything with the output file other than printing. You could directly replaced the gschem command above with something like:

gaf export -o grey_counter_1.pdf grey_counter_1.sch

A Makefile rule for creating PDF files from schematic files might look like:

%.pdf: %.sch
	gaf export -o $@ -- $<

Of course, one advantage of the new tool is that it can do multi-page output. So rather than generating a whole bunch of separate PDF or PostScript files and stitching them together, you could directly generate a single PDF file with the whole of your design in it:

gaf export -o schematics.pdf grey_counter_1.sch filter_1.sch

Tweaking the output

gaf export also lets you tweak the output for different applications. Suppose I want to produce the PNG file displayed in this blog post. First, I don't care about paper sizes; I want the output file to be sized according to how large the drawing is. To do this, I can use -s auto. I can also set the margin on the output with -m 5px. I also want to print in colour (-c). So the overall command is:

gaf export -c -s auto -m 5px -o gaf_export__40160-1.png 40160-1.sym

It can also be useful to set the paper size (for example, to get suitable margins for larger paper sizes). By default, gaf export uses whatever GTK thinks the default paper size is on your system. For most people, this will be ISO A4. In addition to providing measurements directly via the -s option, the -p option lets you specify a PWG 5101.1-2002 paper name. For example, to use US "D" size paper:

gaf export -p na_d -o grey_counter_1.pdf grey_counter_1.sch

Changing default settings

The default settings for gaf export can be modified using the new gaf config command. For example, to set the default paper size for all your projects to US "Letter":

gaf config --user export paper na_letter

Or to make sure that all printing for a particular project is in colour:

gaf config -p /path/to/project/directory/ export monochrome false


gaf export is a fast, easy-to-use way of generating graphics files from your gEDA/gaf schematics and symbols. Along with several other new features, it will be available in the upcoming unstable gEDA/gaf 1.9.0 release.