# C[omp]ute

Welcome to my blog, which was once a mailing list of the same name and is still generated by mail. Please reply via the "comment" links.

Always interested in offers/projects/new ideas. Eclectic experience in fields like: numerical computing; Python web; Java enterprise; functional languages; GPGPU; SQL databases; etc. Based in Santiago, Chile; telecommute worldwide. CV; email.

© 2006-2015 Andrew Cooke (site) / post authors (content).

From: andrew cooke <andrew@...>

Date: Sat, 25 Jun 2016 10:12:08 -0400

Useful question / answer (actually uses fseek) deleted.  How is "C
Programming: How to read the whole file contents into a buffer"
unclear?  What a pile of shit.

Andrew

## Previous Entries

### Current State of Justice in China

From: andrew cooke <andrew@...>

Date: Sat, 18 Jun 2016 12:03:17 -0400

https://chinachange.org/2016/06/18/china-is-the-biggest-mad-house-in-the-world-and-ccp-the-worst-lunatic/

Read past the first few paras, which are a bit name-calling.

Andrew

### Axiom of Determinacy

From: andrew cooke <andrew@...>

Date: Fri, 17 Jun 2016 08:54:22 -0400

https://en.wikipedia.org/wiki/Axiom_of_determinacy

Andrew

### Fee Chaos Book

From: andrew cooke <andrew@...>

Date: Thu, 16 Jun 2016 12:24:49 -0400

http://www.logicmatters.net/2016/06/15/explaining-chaos/

Andrew

### Course on Differential Geometry

From: andrew cooke <andrew@...>

Date: Sun, 12 Jun 2016 20:12:02 -0400

https://www.youtube.com/channel/UCUHKG3S9N_QeIE2jQXd2-VQ/playlists
https://gravity-and-light.herokuapp.com/tutorials
https://github.com/lazierthanthou/Lecture_Notes_GR/blob/master/main.pdf

Andrew

### Sparse Matrices, Deep Learning

From: andrew cooke <andrew@...>

Date: Wed, 8 Jun 2016 10:44:19 -0400

This article on sparse matrix specific hardware
http://www.nextplatform.com/2016/06/06/former-nasa-exec-brings-stealth-machine-learning-chip-light/
got me to wondering what it was used for.

I think this paper explains things in the intro:
http://www.cv-foundation.org/openaccess/content_cvpr_2015/papers/Liu_Sparse_Convolutional_Neural_2015_CVPR_paper.pdf

Basically, deep learning means thrpwing a lot of data at very deep
networks.  Those networks must have alot of redundnacy.  So if you can
find the sparse equivalent you can save time.

But still, I don't think that would have been obvious 10 years ago.
Maybe the hardware company got a lucky break?

Andrew

### Applebaum Rape

From: andrew cooke <andrew@...>

Date: Sun, 5 Jun 2016 18:55:22 -0400

Not clear exactly what's happening, but more details have emerged in
the last day:

https://blog.torproject.org/category/tags/jacob-appelbaum
https://mic.com/articles/145279/jacob-appelbaum-digital-rights-activist-leaves-tor-amid-sexual-misconduct-allegations#.1zBfNeLve

Andrew

### Tomato Chutney v4

From: andrew cooke <andrew@...>

Date: Tue, 31 May 2016 16:58:16 -0400

This is an attempt to simplify the recipe above, perhaps for posting
on Metafilter.

A simple tomato chutney, similar to what you can buy in the
supermarket in the UK (Baxters, Heinz, Sainsbury's).  Good for adding
to cheese sandwiches, etc.

Ingredients:

The amounts can be scaled to match the amount of puree in the can (I
typically find 200g and 300g cans, hence the two columns below).

Tomato puree                   300 g       200 g
Fresh tomatoes, roughly diced  1.5 kg        1 kg
Onions, finely chopped         750 g       500 g
White granulated sugar         750 g       500 g
Apple vinegar                  300 ml      200 ml
Yellow mustard seeds           1.5 tbsp      1 tbsp
Juice of 1-2 lemons

For the larger amounts (left column) you likely need a 24cm pan (where
I live, that's larger than a saucepan).  Otherwise, a large saucepan
will probably do.  The number of lemons isn't critical - I use one
juicy or two drier lemons for either size.

Boil to desired consistency, then jar.  The amounts in the left column
produce 5-6 500g jars; the right column gives 3-4 jars.

This is basically tomato jam so the desired consistency is similar to
that for jam.  The way I work is to first get things boiling nicely,
which can take 30min or so with a covered pan on a medium heat.  Then
replace the lid with a splash quard (you want steam to escape) and
After around 1 hr of cooking the bubbling will start to change, as the
liquid thickens, becoming more "explosive".  And after another 30m or
so, the mixture will start to stick, a little, on the bottom of the
pan (but can - and should - be easily scraped off when stirring).
Taking a little chutney out on a teaspoon, and allowing it to cool,
you should then see that the mixture is thick enough to hold a
significant edge and to feel like jam (rather than water) in the
mouth.  It is then ready to jar.

The timings above are very rough.  Everything depends on how much
pectin you have (from the fruit), how watery the tomatoes are, and how
much heat you are supplying.  Don't be afraid to cook for longer as
long as it's not seriously sticking to the pan bottom (but it will
thicken as it cools, so don't worry too much!)

I sterilise jars in the oven while cooking - see the instructions at
http://www.bbcgoodfood.com/howto/guide/how-sterilise-jars - but I
still tend to keep them in the freezer, just in case.

Variations:

For a darker chutney, with a slightly more caramelly flavour, use
brown sugar or fry the onions in a little oil until golden.  You can
also fry a teaspoon or two of cumin seeds with the onions for extra
depth.  I usually add some chilies (merken) - the cooking seems to
make them milder than I would expect.  I've also tried adding garlic,
but didn't notice much difference.

If you were really dedicated you could substitute tomatoes for the
puree and reduce for longer, I guess.  You would also need to add some
salt.

Update: After letting col and tasting, I feel this is something of a
failed experiment.  First, I didn't really cook it for quite long
enough and it is a little too runny.  And second, alhough this is
exactly what I was aiming for, it turns out that the cut-back, simple,
flavour doesn't compare to the richer perviousversions where the onion
was fried with cumin and brown sugar was used.

Andrew

### Culturally Liberal and Nothing More

From: andrew cooke <andrew@...>

Date: Wed, 25 May 2016 00:16:30 -0400

http://fredrikdeboer.com/2016/05/16/our-nightmare/

Nativist demagoguery, in turn, will simply deepen the liberal
elite's distaste for talking about economic issues as such. After
all, it will be crypto-racists talking about economic populism the
most. With politics devolving further and further into pure
tribalism, this type of guilt by association becomes preeminent. The
basic political argument, in such a landscape, amounts to "you sound

...

"Our political future: a snakepit of insane fascists on one side, &
on the other, a Wall Street party that's culturally liberal &
that's already here!' But their cynicism reveals a deeper
naivete. First, they overestimate how much work has actually been
done to diversify the elite, which remains stubbornly male and
white. Second, they don't recognize how much worse this can all
get. It can always, always get worse. Today, there is a least an
ostensible connection between the liberalism of diversity and the
leftism of equality. Tomorrow, even that thin thread might be cut
forever, and so much the worse for us.

Andrew

### Weird Finite / Infinite Result

From: andrew cooke <andrew@...>

Date: Tue, 24 May 2016 20:26:53 -0400

Turns out that you can use constructivist maths to prove a theorem
https://www.quantamagazine.org/20160524-mathematicians-bridge-finite-infinite-divide/

Andrew

### Maths Books

From: andrew cooke <andrew@...>

Date: Mon, 16 May 2016 06:27:30 -0400

https://www.reddit.com/r/math/comments/4jhag2/what_is_the_most_beautifully_written_math_book/

Andrew

### Good Bike Route from Providencia / Las Condes to Panul\

From: andrew cooke <andrew@...>

Date: Sun, 15 May 2016 18:39:27 -0400

Panul Parque Publico is one of the few places that I know of that has
legal off-road bike trails.  But getting there from Providencia used
to be a drag - Tobalaba bike path disappears and then there's a steep,
long climb.

However, now that the Las Perdices bike path is working, there's a
much better route.  Simply head South on Las Perdices until you get to
the corner with Departamental (where the path ends).  Cross the river
(continuing South) and then take an immediate right on Ola Salas.
Follow Olga Salas round to the South and continue until it becomes a
dirt road.  After one block on the dirt road, you need to make a U to
the West: turn right on San Joaquin, descend one block and then left
(South again) on Las Perdices, then left onto Lo Canas and right onto
Las Chilcas Norte.

Andrew