| Andrew Cooke | Contents | RSS | Twitter | Previous

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).

History Books

From: andrew cooke <andrew@...>

Date: Thu, 3 Sep 2015 21:55:16 -0300

https://www.reddit.com/r/history/comments/3jiaqf/recommendations_of_well_written_history_books/

Andrew

Permalink | Comment on this post

Previous Entries

For comments, see relevant pages (permalinks).

Iraq + The (UK) Governing Elite

From: andrew cooke <andrew@...>

Date: Wed, 2 Sep 2015 16:32:32 -0300

https://www.craigmurray.org.uk/archives/2015/09/breaking-the-depleted-uranium-ceiling/

Andrew

Permalink

Pinochet: The Dictator's Shadow

From: andrew cooke <andrew@...>

Date: Tue, 1 Sep 2015 18:41:30 -0300

I just finished reading this book - 
http://www.amazon.com/The-Dictators-Shadow-Augusto-Pinochet/dp/0465002501

My impression of Pinochet, after reading it, is that he was a very
good... something.  Manager?  Politician?  No.  He was a very, very good
dictator.  If you're going to be a dictator, then it's hard to see how (from
your own point of view - as someone who needs to profit and survive) you could
do better.  He is, in that sense, impressive.

And that worries me.  Because it seems a tad suspicious that someone should be
so good at something.  Maybe there are other, unexplained reasons for his
success?  Maybe this book is incomplete?

But, with that worry in mind, it is a good book.  I would recommend it to
anyone curious about the history of Chile.  It is part a biography of
Pinochet, part history of the country, with the unifying thread being the
political process necessary to end his dictatorship.

That thread - of political pragmatism - does mean that some things are
missing.  This is very much a book from the centre ground by a consummate
political player (and perhaps that explains some of the grudging admiration
you pick up for Pinochet - because he played politics pretty well).

So it misses out on explaining both the extreme right and the extreme left.
This is the story of, in Chilean terms, La Concertacion (the political
cross-party coalition that "won" against Pinochet in the famous referendum of
1988 - the "no" vote).

Personally, I would have appreciated more information about the left - I know
people who were students at that time, actively involved in resistance (armed
or not), and their story doesn't really appear here.  When it does, it's
generally framed as a nuisance that could derail the political process (rather
than something that might be motivating it).

One strength, however, that comes from this "middle of the road" view is that
it's a good candidate for a "neutral" history of Chile at that time.  Of
course, many on the right would object - it's written by a Socialist - but my
impression is that it's about as unbiased as you can get.

Andrew

Permalink

An Outsider's Guide To Julia Packages

From: andrew cooke <andrew@...>

Date: Mon, 31 Aug 2015 20:19:15 -0300

This is how I develop (or will develop) Julia packages.  Some of this is
documented at
https://julia.readthedocs.org/en/latest/manual/packages/#package-development
but it doesn't include all the social stuff, and there's so much information
already there I thought a shorter, more opinionated, separate guide, that
includes all the helpful comments I've received, might be useful.

  1 Choose a name.  This is fun, but also fraught woth social danger.  You
    want something short and memorable, but not so short and memorable that
    it's considered "reserved" for "officially blessed" packages.  So, for
    example, "Draw" was drowned with helpful comments, but "Drawing" was OK.

    There are guidelines on naming in the official docs at
    https://julia.readthedocs.org/en/latest/manual/packages/#guidelines-for-naming-a-package
    but they're more additional constraints you have to be aware of than help
    with finding a GOOD name.

 2  Create the package locally using Pkg (ie Pkg.generate("MyName", "MIT").  I
    have no idea what other licences are available, or how you find out, but
    you can edit the generated files and change the licence later, if you want.

 3  That creates a directory in ~/.julia/vX.Y/MyName.  I typically work in
    ~/project/MyName, so at this point I make ~/project/MyName a soft link to
    the .julia directory (ie ln -s ~/.julia/vX.Y/MyProject ~/project/MyName)

4   Write some code.  Types are CamelCase, functions and variables are lower
    case with underscores ony when "necessary".
    https://julia.readthedocs.org/en/latest/manual/style-guide/

    If it helps, I have written sme notes about how to structure Julia code:
    http://acooke.org/cute/WritingCle0.html

 5  Write some tests.  Run them with Pkg.test("MyName").
    https://julia.readthedocs.org/en/latest/stdlib/test/

 6  When you want to send the code to github, create the MyName.jl repo (don't
    forget the ".jl") without any files (you need to do this by hand on
    github).  Then you can push the code to github from the command line
    (follow the instructions github displays after creating the repo -
    depending on how carefully you set git up before (see first link) you may
    not need to set the remote).

    Note that you do not use Pkg commands above.

 7  At this point you can configure Travis https://travis-ci.org to run your
    tests each time you commit them to github.  The Pkg.generate() command
    (above) already set things up - all you need to do is log on to Travis and
    enable it there (the interface is not very intuitive, but if you persist
    it's worth it because the little badge appears in the README, assuming you
    left that code in place).

 8  Eventually you may want to release the code to the wide world.  I tend to
    do this quite soon - what's the point in keeping things quiet? - but you
    make get helpful comments from the Julia people if they don't agree.

    Anyway, you do this by following the instructions at
    https://julia.readthedocs.org/en/latest/manual/packages/#tagging-and-publishing-your-package

    However, you may want to do things in the following order:
      Pkg.update()  # make sure you have the latest metadata
      Pkg.register("MyName")  # add it to your local metadata
      Pkg.tag("MyName")  # tag release 0.0.1
      Pkg.publish()
    so that you don't get helpful comments from the Julia people about how
    it's pointless to publish something without a version.

    WARNING - tread carefully with what follows.

    Pkg.publish() will give you a link, which you need to open in a browser.
    That wikl take you to github where you can create a pull request.  Do this
    step.

    Once you have a pull request, wait.  Reload the page.  At first everything
    will be green, but after a moment there'll be something orange/yellow
    warning you that checks are pending.

    At this point, if this is your first release (and not an updated version -
    see below) then you STOP HERE.  Even when things turn green, YOU DO NOT
    MERGE.  Instead, you wait for the Julia people to merge, after they have
    reviewd your code.  They may give helpful comments instead of merging.

 9  However, if you have been peviously accepted, and are only merging after a
    new release (ie Pkg.tag() and Pkg.publish() only) then YOU CAN merge, once
    the orange/yellow thing has turned green.

    Note that you should not tag a major release until Julia itself has
    reached a major (ie 1.0.0) release.  I guess the logic is that you can't
    guarantee that it is stable if the language is not stable (I have tagged a
    1.0 release for a package, and it did work, but it also triggered a
    helpful comment fom the Julia people).

10  If you are working with multiple Julia language versions, then you may find
    that it's simpler for them all to chare the same code.  I do this as
    follows:
      - Create things in v0.4 as above, in ~/.julia/v0.4
      - In julia-0,3, use Pkg.add("MyName") to get a copy in ~/.julia/v0.3
        (and set the correct metadata locally)
      - Then, by hand, remove the ~/.julia/v0.3/MyName directory and replace
        it with a soft link to the ~/.julia/v0.4/MyName directory.  Julia 
        will not "notice", and you end up with both versions seeing the
        same version of the code.  Then you can run the tests in either
        version via Pkg.test().

11  Once your package appears at https://pkg.julialang.org/ (this takes some
    time - the update process seems to be broken) then you can
    add a little badge to your README.  It's not documented anywhwere that
    I can see, so steal whatever someone else is using in their README.
    See https://github.com/andrewcooke/ParserCombinator.jl for example.

12  Similarly, you can get code coverage results by using https://coveralls.io
    This requires that you modify the .travis.yml file slightly.  Again, I
    have no idea where this is documented, but you can steal from my file,
    which I stole from someone else:
    https://github.com/andrewcooke/ParserCombinator.jl/blob/master/.travis.yml
    (it's the extra bits that mention Coverage and Coveralls).

And if you still get helpful comments from the Julia people, even after
following all the above, then feel free to blame me.

Andrew

Note: This post is updated occasionally.  The "Date" timestamp is when the
original was first posted.

Permalink

Nobody gives a shit

From: andrew cooke <andrew@...>

Date: Mon, 31 Aug 2015 15:05:14 -0300

http://www.lindsredding.com/2012/03/11/a-overdue-lesson-in-perspective/

Andrew

Permalink

Lepton Decay Irregularity

From: andrew cooke <andrew@...>

Date: Sat, 29 Aug 2015 10:50:42 -0300

http://www.sciencealert.com/the-lhc-finds-evidence-of-particle-activity-beyond-the-standard-model

To be honest, it doesn't sound much like the start of unification, but what do
I know.

Andrew

Permalink

Julia's BinDeps (aka How To Install Cairo)

From: andrew cooke <andrew@...>

Date: Thu, 27 Aug 2015 19:53:03 -0300

I just wasted a few painful hours trying to install the Julia Cairo package.
Hopefully the following will help others avoid the frustration.


The Cairo package https://github.com/JuliaLang/Cairo.jl uses BinDeps
https://github.com/JuliaLang/BinDeps.jl - an easy way to see this is to note
that the Cairo package contains a deps directory, which itself contains a
build.jl file https://github.com/JuliaLang/Cairo.jl/blob/master/deps/build.jl

That build.jl file is the spec that BinDeps uses to decide whether (and how)
it should build Cairo from source.

Building Cairo from source currently fails.  So we don't want to build Cairo
from source.  Unfortunately, Pkg.add("Cairo") did try to do so.

So the question is - WHY DOESN'T IT USE THE CAIRO LIBRARY I HAVE ALREADY
INSTALLED ON MY MACHINE?  And here is the answer.


If you look at the buuld.jl file linked above you'll see a neat, declarative
section inside an array called "deps" that specifies what libraries are
required.

The frustrating thing is, as far as I can tell, ALL LIBRARIES MUST BE PRESENT.
If only one is missing, then EVERYTING is built from source.

Sorry for the CAPS but I AM FEELING KINDA SHOUTY RIGHT NOW.

So, if you're wondering why a package is being built from source, a simple way
to find out is to fire up julia:

  andrew@...:~/.julia/v0.4/Cairo> julia-trunk 
		 _
     _       _ _(_)_     |  A fresh approach to technical computing
    (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
     _ _   _| |_  __ _   |  Type "help()" for help.
    | | | | | | |/ _` |  |
    | | |_| | | | (_| |  |  Version 0.4.0-dev+6774 (2015-08-17 10:35 UTC)
   _/ |\__'_|_|_|\__'_|  |  Commit f3217a8 (10 days old master)
  |__/                   |  x86_64-suse-linux

and load BinDeps

  julia> using BinDeps

and start BinDeps

  julia> @BinDeps.setup()
  library_dependency (generic function with 1 method)

and try testing different libraries.  Just cut+paste the initial part of each
description (ignoring the keyword arguments).

This kind of thing is OK:

  julia> pango = library_dependency("pango", aliases = ["libpango-1.0-0",
  "libpango-1.0","libpango-1.0.so.0", "libpango-1_0-0"])
   - Library "pango"
      - Satisfied by:
	- System Paths at /usr/lib64/libpango-1.0.so

But this kind of thing is NOT:

  julia> library_dependency("gettext", aliases = ["libintl", "preloadable_l
	 ibintl", "libgettextpo"])
   - Library "gettext"

When you get soemthing without a "Satisfied by" then you need to run to your
package manager and install it, toot sweet.

Note that (unless you are on Windows ha ha) you don't need to check a spec
that looks like 

  zlib = library_dependency("zlib", aliases = ["libzlib","zlib1"], 
                            os = :Windows, group = group)

because the "os = :Windows" means it's only required there.

And if you do all that, then clean things up:

  julia> Pkg.rm("Cairo")
  
  $ rm -fr ~/.julia/v0.4/Cairo

  julia> Pkg.add("Cairo")
  INFO: Installing Cairo v0.2.29
  INFO: Building Cairo
  INFO: Package database updated

everything works :o)

Andrew

Permalink

Good Example Of Good Police Work (And Anonymity Being Hard)

From: andrew cooke <andrew@...>

Date: Wed, 26 Aug 2015 17:09:45 -0300

http://www.abc.net.au/news/2015-08-26/secret-anti-paedophile-operation-saves-children-from-abuse/6720304

See the second section, "Unusual 'hiyas' greeting key to arrests"

Andrew

Permalink

Best Santiago Burgers

From: andrew cooke <andrew@...>

Date: Mon, 24 Aug 2015 21:51:43 -0300

https://www.reddit.com/r/chile/comments/3i92pl

Andrew

Permalink

Michael Emmerich (Vibrator Translator) Interview (Japanese Books)

From: andrew cooke <andrew@...>

Date: Sun, 23 Aug 2015 18:08:07 -0300

http://quarterlyconversation.com/the-michael-emmerich-interview

Various good leads to follow up here.  Really enjoying vibrator.

Also, http://quaterlyconversation.com keeps showing up when I search for info
on a range of subjects.  Good site.

Andrew

Permalink

Clarice Lispector (Brazillian Writer)

From: andrew cooke <andrew@...>

Date: Sun, 23 Aug 2015 11:06:56 -0300

https://www.reddit.com/r/literature/comments/3hyi36

Andrew

Permalink

Books On Evolution

From: andrew cooke <andrew@...>

Date: Tue, 18 Aug 2015 20:31:33 -0300

Can't buy all these now, so making a list to remember:

  Evolution - the Extended Synthesis 
  http://www.amazon.com/gp/product/0262513676

  The Major Transitions in Evolution Revisited
  http://www.amazon.com/gp/product/0262015242

  The Ontogeny of Information: Developmental Systems and Evolution
  http://www.amazon.com/gp/product/0822324660

  Conceptual Issues in Evolutionary Biology
  http://www.amazon.com/gp/product/0262693380

Andrew

Permalink