<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0"><channel><title>C[omp]ute</title><link>http://www.acooke.org/cute/</link><description>Andrew Cooke's blog</description><lastBuildDate>Wed, 22 May 2013 04:44:36 GMT</lastBuildDate><generator>PyRSS2Gen-1.1.0</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Printing binary trees sideways
</title><link>http://www.acooke.org/cute/Printingbi0.html
</link><description>This was preliminary work for the StackOverflow answer at
 http://stackoverflow.com/questions/11096134/print-a-binary-tree-on-its-side/16680023#16680023
 - I did it while on holiday (installed Python on Mum's laptop :o) and then
 posted the answer when I got home.  I have modified these posts since first
 writing them to improve the code and explanation a little.
 
 To be honest, it's not very exciting ...</description><guid isPermaLink="true">Printingbi0.html
</guid><pubDate>Mon, 13 May 2013 11:16:00 GMT</pubDate></item><item><title>Python's sad, unimaginative Enum
</title><link>http://www.acooke.org/cute/Pythonssad0.html
</link><description>
 Python is about to get an Enum.  See http://www.python.org/dev/peps/pep-0435/
 
 And it's sad.
 
 It's not awful.  It just fails to do anything particularly well - it's an
 awkward compromise whose only real achievement is not doing anything new.
 
 What would you expect a Pythonic enum to look like?
 
   class Colour(Enum):
       red
       green
 
   &gt; print(Colour.red == Colour.green)
   false
 
 That's abou...</description><guid isPermaLink="true">Pythonssad0.html
</guid><pubDate>Sat, 11 May 2013 11:03:00 GMT</pubDate></item><item><title>Work, Exhaustion, Vacation
</title><link>http://www.acooke.org/cute/WorkExhaus0.html
</link><description>
 Being tired is a common symptom of MS.  With vacations coming up I took care
 to tell one client I needed to have as much time as possible to complete.  At
 the same time I was balancing another project on the side, but that was almost
 done.  So the plan was to get both in a good state before the holiday.
 
 And that, as far as it went, worked.
 
 But one client decided to test a project that was compl...</description><guid isPermaLink="true">WorkExhaus0.html
</guid><pubDate>Wed, 08 May 2013 09:09:00 GMT</pubDate></item><item><title>VirtualBox with Centos 6.3 to 6.4, client
</title><link>http://www.acooke.org/cute/VirtualBox1.html
</link><description>
 It hangs at the end of boot.  There's a solution at
 http://www.techpository.com/?page_id=1487
 
 In short:
 
  - At start of boot, hit any key, then "a", then append "single" and
    hit return.
 
  - As root, zap /etc/X11/xorg.conf and then reboot.
 
 Andrew
 
</description><guid isPermaLink="true">VirtualBox1.html
</guid><pubDate>Tue, 07 May 2013 12:46:00 GMT</pubDate></item><item><title>Matasano - Programming Lessons Learned
</title><link>http://www.acooke.org/cute/MatasanoPr0.html
</link><description>
 I just finished the crypto challenge.
 
 I (vaguely) remember, many years ago, sitting down to write a library that
 would help me with cryptanalysis (I've always be interested in codes and the
 like).
 
 Back then I wasn't (I hope) as good a programmer as I am now.  Or, at least,
 not as experienced.  And I remember getting stuck in analysis paralysis quite
 quickly.  The project never got very far.
 
 Lo...</description><guid isPermaLink="true">MatasanoPr0.html
</guid><pubDate>Sun, 05 May 2013 23:07:00 GMT</pubDate></item><item><title>PDF to HTML
</title><link>http://www.acooke.org/cute/PDFtoHTML0.html
</link><description>
 https://github.com/coolwanglu/pdf2htmlEX
 
 Look at the first example.  Mind-blowing.
 
 Andrew
 
</description><guid isPermaLink="true">PDFtoHTML0.html
</guid><pubDate>Sun, 05 May 2013 12:32:00 GMT</pubDate></item><item><title>Why RSA Works
</title><link>http://www.acooke.org/cute/WhyRSAWork0.html
</link><description>
 I've been implementing and cracking RSA, but, until now, it's not been clear
 to me exactly why it works.  Or why it seems to be commutative (which is why
 you can sign too).  Or why the totient - (p-1)*(q-1) - is used.
 
 All those questions were answered, plop (as they say in Chile), when I saw
 equation 1 of this post:
 
 http://doctrina.org/Why-RSA-Works-Three-Fundamental-Questions-Answered.html
 
 Ah...</description><guid isPermaLink="true">WhyRSAWork0.html
</guid><pubDate>Sat, 04 May 2013 16:25:00 GMT</pubDate></item><item><title>Dreaming of Death
</title><link>http://www.acooke.org/cute/Dreamingof0.html
</link><description>
 You probably want to skip this.  Writing more for myself, just to clear my
 head.
 
 Last night (this morning, I think, just before I woke) I dreamt that I killed
 myself.  I found myself, dead, and picked myself up.  I was full of
 compassion, but not sadness.
 
 I don't really understand why I had this dream now.  I was much more worried
 about dying back in November.  Things are much better now.
 
 What...</description><guid isPermaLink="true">Dreamingof0.html
</guid><pubDate>Fri, 03 May 2013 21:29:00 GMT</pubDate></item><item><title>Using Coroutines In Protocol Simulations
</title><link>http://www.acooke.org/cute/UsingCorou0.html
</link><description>
 I don't want to sound like a shill, but I am having a great time with the
 Matasano crypto challenges http://www.matasano.com/articles/crypto-challenges/
 and I wanted to share a neat trick.
 
 So I just got DH key exchange working.  Which is awesome - I had no idea it
 was so easy.  But what made me extra-happy was the way that I coded the two
 agents that were communicating.  I wrote each as a co-rou...</description><guid isPermaLink="true">UsingCorou0.html
</guid><pubDate>Mon, 29 Apr 2013 21:14:00 GMT</pubDate></item><item><title>Pure Python SHA1 and MD4 Implementations
</title><link>http://www.acooke.org/cute/PurePython0.html
</link><description>
 I am working through the Matasano Crypto Challenges -
 http://www.matasano.com/articles/crypto-challenges/ - which I would recommend
 to anyone interested in crypto.
 
 Although they repeatedly ask not to post solutions online, they do ask (in
 part 4, I think) for you to find (rather than implement) implementations of
 SHA1 and MD4.  So I hope that it is OK for me to post these.
 
 The two implementatio...</description><guid isPermaLink="true">PurePython0.html
</guid><pubDate>Sun, 28 Apr 2013 10:01:00 GMT</pubDate></item><item><title>Ubuntu on VirtualBox
</title><link>http://www.acooke.org/cute/UbuntuonVi0.html
</link><description>
 Ubuntu 12.04-2 does not install cleanly on the latest VirtualBox (4.12.2).
 
 Instead, install 12.04 (the initial release) and DO NOT UPDATE KERNEL
 packages (if you really want to, snapshot first).
 
 Andrew
 
</description><guid isPermaLink="true">UbuntuonVi0.html
</guid><pubDate>Tue, 23 Apr 2013 14:28:00 GMT</pubDate></item></channel></rss>