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

Spanish Accents For Idiots

From: andrew cooke <andrew@...>

Date: Thu, 16 Apr 2015 08:18:30 -0300

My homework.

http://acooke.org/accents.html

Andrew

PS I am taking spanish lessons from a phonologist (wife of a friend) and it's
really helping.

Permalink | Comment on this post

Previous Entries

For comments, see relevant pages (permalinks).

Aluminium Cans

From: andrew cooke <andrew@...>

Date: Wed, 15 Apr 2015 20:35:08 -0300

https://www.youtube.com/watch?v=hUhisi2FBuw

How the pull-tab works, at the end, is particularly interesting.

Andrew

Permalink

Advice on Spray Painting

From: andrew cooke <andrew@...>

Date: Wed, 15 Apr 2015 18:14:50 -0300

http://www.reddit.com/r/DIY/comments/32ouoq/why_cant_i_spray_paint_anything_and_have_it_look/

Andrew

Permalink

Female View of Online Chat From a Male

From: andrew cooke <andrew@...>

Date: Tue, 14 Apr 2015 13:28:40 -0300

https://np.reddit.com/r/truecreepyPMs/comments/3298o8/this_is_a_post_that_some_of_you_are_asking_me/

ANdrew

Permalink

UX Reading List

From: andrew cooke <andrew@...>

Date: Mon, 13 Apr 2015 06:35:19 -0300

No idea how complete it is, but a couple of interesting looking titles I would
like to read at some point.

https://medium.com/@span870/the-only-ux-reading-list-ever-d420edb3f4ff

Andrew

Permalink

S4 Subgroups - Geometric Interpretation

From: andrew cooke <andrew@...>

Date: Sun, 12 Apr 2015 20:48:24 -0300

Interesting discussion / example -
http://www.reddit.com/r/math/comments/32bs56/understanding_the_subgroup_structure_of_s4/

Andrew

Permalink

Fucking Email

From: andrew cooke <andrew@...>

Date: Sat, 11 Apr 2015 19:37:44 -0300

I spent a day translating an article on SQM from Spanish to English.  The
email contained, as an aid to formatting, a line with a single dot, at the
start.

People as old as me may remember that a single dot is also how you terminate a
message using the primordial Unix mail command.  And it seems that somewhere,
in the layers of abstraction that current email is built from, that is still
interpreted as the end of the message.

So my entire email was discarded, except for the header.

Fucking email sucks in so many ways.  Still, if I have "From" at the start of
a line, it is prefixed by >, somewhere, in some kind of hack to avoid it being
interpreted as the sender.  And, of course, no authentication.  No
encryption.

Sigh.  I may try again tomorrow; perhaps second time round it will be quicker.

Andrew

Permalink

The SQM Affair For Idiots

From: andrew cooke <andrew@...>

Date: Sat, 11 Apr 2015 17:55:20 -0300

..

  This is a loose translation of 
  https://politicasparatodos.wordpress.com/2015/03/16/el-caso-sqm-explicado-con-manzanitas/
  by Matias Godoy Mercado.

  I cannot guarantee the truth of what is written below for two reasons.
  First, my Spanish is imperfect.  I am particularly unsure of technical terms
  (eg "impuesto de primera categoria").  Second, I don't have the general
  knowledge of Chilean politics necessary to check the details given (I am
  translating partly to learn about these things myself).  So please use the
  original (linked above) as reference.

  See also
  * The Penta Affair For Idiots http://acooke.org/cute/ThePentaAf0.html

  I generally translate the names of government institutions and common
  Chilean details like Boletas:
  * La Fiscalia - Prosecutions Office (CPS/DPP in UK, Attorney General in USA)
  * Fiscal - Public Prosecutor
  * SII (Servicio Impuestos Internos) - Tax Office
  * Boletas De Honorarios - Tax Invoices (emitted by the person being paid for
    some professional service)
  * SVS (Superintendencia de Valores y Seguros) - Securities Commission (FSA
    in UK)
  * AFP (Administradoras de Fondos de Pensiones) - Pension Funds
  * La Moneda - Presidential Palace
  * Fisco - Treasury

  I have decided not to translate names of companies and political parties,
  so here is a quick glossary of the main parties (right to left):
  * UDI - Union Democrata Independiente / Independent Democratic Union
  * RN - Renovacion Nacional / National Renewal
  * PRI - Partido Regional Independiente / Regional Independents
  * PDC - Partido Democrata Cristiana / Christian Democrats
  * PPD - Partido Por La Democracia / Party For Democracy
  * PS - Partido Socialista / Socialist Party
  * PC - Partido Comunista / Communist Party
  where UDI/RN are members of Alianza Por Chile (right), and the others
  members of the Nueva Mayoria (prev La Concertacion) (centre+left).
  
  Also
  * RUT - personal ID number (SSN in USA)
  * CORE - regional assemblies
  * Senado (upper chamber of Parliament) is composed of Senators
  * Camera de Diputados (lower chamber) is composed of Delegates

  I have added comments in [square brackets].  Comments (in parentheses)
  are present in the original.

  Finally, my thanks to Matias, who I have been unable to contact (if anyone
  knows his email, please tell me at andrew @ acooke.org)

  Andrew



In this column I [ie Matias] will give the background to the SQM (or
Soquimich) case, to date [the column was written on 2015-03-16 and there have
been developments since - see comment below].  Although, to be exact, the "SQM
case" is not yet a "case".  Give this, some people are calling it an "angle"
on the Penta Affair.  But, given the current data (scarce but meaty), I feel
more comfortable calling it a "case", even though it is not, yet, for the Tax
Office.

In the first section I will talk about Soquimich, the Chilean company.  In the
second section, we'll take a brief look at the Cascadas Affair, which involved
this and related companies, for context about who we are discussing.  In the
third, I will discuss the evidence for a careful and detailed examination of
this company, given the apparent irregular financing of political campaigns,
and fiscal fraud.  In the fourth part I will address the strange conflict
between the Prosecutions and Tax Offices (SII and Fiscalia), in this case.
[There was also a fifth section, which I have not translated, which was mainly
a call to get people to tweet in the hope of changing the policy of the SII.
Instead, I've added a note explaining how things developed.]



Sociedad Quimica Y Minera De Chile (Soquimich or SQM)

The Sociedad Quimica Y Minera De Chile (SQM) is a private mining company
dedicated to the extraction, processing and marketing of mineral products;
mainly iodine, potassium and lithium.  It was created in 1968 as a mixed
public / private enterprise, like many of the large Chilean companies.  In
1971 it passed into the control Corporacion De Fomento A La Produccion
(CORFO), ie the Chilean State.  Then, during the 80s, it was privatised.
[Some historical context: Allende was elected in 1970; the coup lasted from
1973 to 1990].  This company won the rights to develop lithium mining.
[Beating 5 other companies in a controversial contest; the then Minister of
Mining was the brother of the SQM Executive Vice President -
http://www.mining.com/divisive-contract-to-exploit-lithium-in-chile-granted-to-local-sqm-80677/]

From December 2012 Sociedad de Inversiones Pampa Calichera S.A., Inversiones
Global Mining (Chile) Ltda, and Potasios de Chile S.A. (together, Grupo Pampa)
control 31.97% of the shares in SQM.  The head of SQM is Sr. Julio Ponce
Lerou, Forestry Engineer from U of Chile, ex son-in-law of Gen. Augusto
Pinochet Ugarte, who is currently President of the Board of Directors of SQM
SA, Norte Grande SA, Oro Blanco SA and Sociedad de Inversiones Pampa Calichera
SA.



Julio Ponce And The Cascadas Affair

In September 2013, after questions were raised by Moneda Asset and Chilean
Pension Funds (AFP) about the financial state of SQM, the Securities Commission
(SVS) brought charges against Julio Ponce Lerou for his responsibility in
various synchronised market trades between 2009 and 2011, that led to the
assumption of price rigging in SQM shares, leading to losses on the part of
the Pension Funds and Moneda Asset.

Julio Ponce remains in control of SQM despite the scheme called "cascada"
[waterfall].  How did it work?  We will return to Snoopy.  Suppose that Snoopy
is owner of 51% of the shares in a company called Gold.  The company Gold, in
turn, owns 51% of the shares in a company called Silver.  So Snoopy controls
both companies: Gold directly, and Silver though Gold.

Let's complicate things a little.  Snoopy owns 51% of the actions in a company
called Gold.  But now Gold only owns 25 of the shares in Silver.  However,
Snoopy has another channel.  As well as shares in Gold, Snoopy has 51% of the
shares in a company called Copper.  And Copper owns 26% of the shares in
Silver.  In this way, Snoopy controls Gold and Copper directly, and Silver
through two different channels.  The name "waterfall" comes from how the
control of the companies flows from top to bottom, like w a waterfall.

Julio Ponce has control of SQM through two "cascadas".  Julio Ponce controls a
company called Norte Grande, which controls Oro Blanco, which controls Pampa
Calichera, which, finally, controls 23% of the shares in SQM.  In addition,
Norte Grande controls Nitratos de Chile, which controls Potasios de Chile,
which also has shares in SQM: 7%.  So in total Ponce controls 30% of the
shares in SQM, indirectly.

What Ponce did was as follows.  He sold low and bought high.  What was he
dealing in?  Shares of SQM, Pampa Calichera, and others.  Ponce, via some
company in the "cascada", sold shares of another company in the "cascada", at
a lower than market price, to a third company, X.  This company X then resold
the shares back to a company in the "cascada", at a price higher than market
price.  The result?  To artificially change the value of shares in the
transactions.  These operations were made with 5 minutes delay.  That is,
Ponce recovered the shares he had sold 5 minutes earlier at a higher price.
He did this repeatedly.  In 5 minutes Ponce was able to manipulate his share
price, thanks to the intermediary.  In 5 minutes Ponce changed something that
cost $50 into something that cost $70.

If it's not clear, here's my final attempt.  Returning to Snoopy.  Snoopy
controls Gold, which has shares in Silver.  And Snoopy controls Copper, which
also has shares in Copper.  Suppose that Snoopy calls his friend Charlie, who
controls the company Peanuts.  Snoopy says "buy my shares in Silver, I'll sell
you them cheap, but you've got to sell them back to me at a higher price
afterwards."  Charlie asks "what's in it for me?"  Snoopy replies "the
difference in price."  Charlie accepts.  Charlie, through Peanuts, buys a
share in Plata at $50 from Gold.  The company Gold, and all its shareholder
lose by selling the share so cheaply.  Then Peanuts sells the share in Plata
to Copper, at $70.  Peanuts earns $20.  Snoopy continues to control Silver and
the shares have changed in value: what was worth $50 is now worth $70.  Gold
lost.  Copper lost too, because they paid $70 for something worth less.

The Securities Commission (SVS) fined 8 executives and a stockbroker,
including Julio Ponce and Leonardo Vial, ex President of the Board of
LarrainVial SA and majority shareholder in Blanco y Negro SA (Colo Colo) [one
of the big Chilean football clubs].  The fines reached USD $164m, one of the
highest fines from the Commission in decades.



SQM And Politics: The New Penta

Months passed and the Cascadas Affair faded from the press.  The 2013
presidential and parliamentary elections were in the spotlight, and attention
was focused on the fight between the 9 presidential candidates, the right
wing primaries, the fuzz leadership of Michelle Bachelet, and others.  The
government changed; Michelle Bachelet became President of the Republic; taw
reform; education reform; etc.  SQM could relax.  It was only the eye of the
hurricane, but it seemed like the case was closed.  The fines seemed kinder
than the public criticism.  But, as the priest said, some sins still needed to
be forgiven.

The press jumped on the Penta Affair.  Which you already understand perfectly.
If not, I suggest you read
https://politicasparatodos.wordpress.com/2015/03/05/el-caso-penta-explicado-con-manzanitas/
[translated at http://www.acooke.org/cute/ThePentaAf0.html].  One of the
critical points of the Penta affair was the evidence of a possible crime of
bribery and asset laundering by the ex Sub-secretary of Mining, Pablo Wagner.
This, thanks to the testimony of Hugo Bravo, ex Managing Director of Empresas
Penta.  The work of the Prosecutions Office intensified, hoping to shed
further light on this particular angle.  And so they arrived at Carolina de la
Cerda, sister in law of the Sub-secretary.

Carolina de la Cerda testified to having issued Tax Invoices for Pablo Wagner.
She wrote the invoices to avoid Wagner appearing to be offering services, as
he was already Sub-secretary of Mining.  The Prosecutions Office was going
after Empresas Penta.  But Carolina de la Cerda gave them something else:
Soquimich.  Carolina de la Cerda testified: "(Wagner) gave me a phone number to
call when the money arrived, to cash three cheques for people and amounts
specified, the person, whose name I can't remember, gave me the names Cristina
Bitar, Ernesto Silva Bafalluy and Lorena Espinoza.  I wrote the invoice for
the company Soquimich for 'financial services'."  [The original Spanish is
garbled, to me, and my translation is even worse here than elsewhere.]  With
this information it was clear that Empresas Penta was not the only company
irregularly financing political campaigns through false invoicing.

With this information the Tax Office (SII) took action against Pablo Wagner
and Carolina de la Cerda.  At first, SII asked for all the accounting data for
financial years 2009 to 2014.  Then, later, and unusually, clarified their
position to the Prosecutions Service and limited themselves to July 2009.  On
January 16 the Prosecutions Service took information from the offices of SQM,
who gave them the accounts voluntarily.

The Public Prosecutor Carlos Gajardo studied the accounting.  He found 19
suspect RUTs.  El Mostrador gained access to a note sent from SQM to the SII
concerning 240 RUTs that invoiced the company in 2010
(http://www.elmostrador.cl/pais/2015/02/23/sqm-suma-y-sigue-escritor-rivera-letelier-hijo-de-longueira-y-mas-de-30-nombres-vinculados-a-la-politica-le-boletearon-en-2010/).
The newspaper / site claims that these have connecting with 39 Chilean
politicians.


Politicians Of Nueva Mayoria

Fulvio Rossi (PS Senator), Marcelo Rozas (PDC, ex Ambassador, Czech Republic),
Raul Castro (PDC, CORE Arica y Parinacota), Roberto Leon Araya (son of Delegate
PDC Roberto Leon), Hernan Rivera Letelier (PS, writer, ex candidate Delegate).


Politicians of Alianza Por Chile

Presidential campaign collaborators for Sebastian Pinera (RN, ex President),
advisors for Lavin Infante (UDI, ex Minister), a son of Pablo Longueira (UDI,
ex Minister), advisors for Pablo Zalaquett (UDI, ex Mayor), advisor to Jaime
Orpis (UDI Senator), advisor to Juan Antonio Coloma (UDI Senator), Gustavo
Alessandri (UDI, CORE Puente Alto), y Jorge Brito (PRI CORE Region del
Biobio).



The Division Between The Prosecutions Office And The Tax Office

The Prosecutions Office wanted to continue investigating SQM, extending the
accounting data to the period between 2009 and 2014.  But to obtain those
documents then needed the SII to press charges for tax evasion.  But the SII
has not taken action against SQM.  The newspaper La Tercera published a lead
article on Sunday 15 December, under the heading "The Escape Hatch That
Worries The Prosecutors".  They lead with: "While the Prosecutions Office
looks to seize all the accounting of SQM, the SII flexed its muscles and
opened a hatch allowing the political angle in the Penta case to hide far from
court.  The decision was welcomed by the entire political spectrum, starting
from the Presidential Palace."  [Translation not so good here.  Flowery,
mixed-metaphors in the paper.]

SQM has not provided the information requested by the Prosecutors.  The SII is
hoping for compensation from SQL to the Treasury, avoiding an investigation.
The Prosecutions Office can't believe it.  Neither can I.



  [The original article was written on 2015-03-16.  Since then things have
  changed.  For example, from
  http://www.latercera.com/noticia/nacional/2015/03/680-621729-9-sii-entrega-hoy-la-informacion-contable-de-sqm-a-fiscalia.shtml

  "At first light, today, the Tax Office will deliver to the Prosecutions
  Office accounting material for the company SQM corresponding to the period
  from 2009 to 2014, which the Prosecutor requested as part of the
  investigations for irregular financing of political campaigns"]



https://politicasparatodos.wordpress.com/2015/03/16/el-caso-sqm-explicado-con-manzanitas/

Permalink

Using Kolmogorov Complexity

From: andrew cooke <andrew@...>

Date: Fri, 10 Apr 2015 21:23:35 -0300

Really using it!

http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=34020CA790B692265E4CB594071FEDFB?doi=10.1.1.52.2696&rep=rep1&type=pdf

Andrew

Permalink

Oblique Strategies in bash

From: andrew cooke <andrew@...>

Date: Fri, 10 Apr 2015 20:52:56 -0300

This is a command line tool that will print an oblique strategy.  By default,
it prints a different strategy each day.  Alternatively, you can give an
argument that is used to generate a "random" index.  So, if it's saved in a
file called "oblique"

  > oblique
  prints a strategy for the day
  > oblique `date +%s`
  prints a strategy that is randomly selected on each call

It assumes openssl, bc and awk are installed.

Andrew


#!/bin/bash

# http://ming.tv/flemming2.php/__show_article/_a000010-001643.htm
strategies=("A line has two sides"
"A very small object. Its center"
"Abandon desire"
"Abandon normal instructions"
"Accept advice"
"Adding on"
"Always give yourself credit for having more than personality"
"Ask people to work against their better judgement"
"Ask your body"
"Balance the consistency principle with the inconsistency principle"
"Be dirty"
"Be extravagant"
"Breathe more deeply"
"Bridges -- build -- burn"
"Cascades"
"Change ambiguities to specifics"
"Change instrument roles"
"Change nothing and continue consistently"
"Children -- speaking -- singing"
"Cluster analysis"
"Consider different fading systems"
"Consult other sources -- promising -- unpromising"
"Convert a melodic element into a rhythmic element"
"Courage!"
"Cut a vital connection"
"Decorate, decorate"
"Destroy nothing; Destroy the most important thing"
"Discard an axiom"
"Disciplined self-indulgence"
"Discover your formulas and abandon them"
"Display your talent"
"Distort time"
"Do nothing for as long as possible"
"Do something boring"
"Do something sudden, destructive and unpredictable"
"Do the last thing first"
"Do the washing up"
"Do the words need changing?"
"Do we need holes?"
"Don't avoid what is easy"
"Emphasize differences"
"Emphasize repetitions"
"Emphasize the flaws"
"Feed the recording back out of the medium"
"Fill every beat with something"
"Find a safe part and use it as an anchor"
"Get your neck massaged"
"Ghost echoes"
"Give the name away"
"Give way to your worst impulse"
"Go outside. Shut the door."
"Go slowly all the way round the outside"
"How would you have done it?"
"Idiot glee"
"Imagine the piece as a set of disconnected events"
"Infinitesimal gradations"
"Intentions -- nobility of -- humility of -- credibility of"
"Into the impossible"
"Is it finished?"
"Is something missing?"
"Is the intonation correct?"
"It is quite possible (after all)"
"Just carry on"
"Left channel,right channel, center channel"
"Listen to the quiet voice"
"Look at the order in which you do things"
"Lost in useless territory"
"Lowest common denominator"
"Magnify the most difficult details"
"Make a blank valuable by putting it in an exquisite frame"
"Make what's perfect more human"
"Mechanize something idiosyncratic"
"Mute and continue"
"Only one element of each kind"
"Openly resist change"
"(Organic) machinery"
"Put in earplugs"
"Reevaluation (a warm feeling)"
"Remember quiet evenings"
"Remove a restriction"
"Repetition is a form of change"
"Reverse"
"Short circuit (example: a man eating peas with the idea that they will improve his virility shovels them straight into his lap)"
"Simple subtraction"
"Spectrum analysis"
"Take a break"
"Take away the important parts"
"Tape your mouth"
"The inconsistency principle"
"The tape is now the music'"
"Think of the radio"
"Tidy up"
"Trust in the you of now"
"Turn it upside down"
"Twist the spine"
"Use an old idea"
"Use an unacceptable color"
"Use fewer notes"
"Use filters"
"Use your own ideas"
"Water"
"What are the sections sections of? Imagine a caterpillar moving"
"What are you really thinking about just now?"
"What is the reality of the situation?"
"What mistakes did you make last time?"
"What would your closest friend do?"
"Work at a different speed"
"You are an engineer"
"You can only make one dot at a time"
"Your mistake was a hidden intention"
"Don't break the silence"
"Don't stress one thing more than another"
"Use 'unqualified' people"
"What wouldn't you do?"
"Try faking it [Stewart Brand]"
"Slow preparation, fast execution"
"Is the style right?"
"Where is the edge?"
"Voice your suspicions"
"What is the simplest solution?"
"Make it more sensual"
"Use something nearby as a model"
"Think -- inside the work -- outside the work"
"What context would look right?"
"When is it for?"
"What to increase? What to reduce? What to maintain?"
"How would someone else do it?"
"Would anyone want it?"
"Go to an extreme, come part way back"
"Once the search has begun, something will be found"
"Be less critical"
"From nothing to more than nothing"
"Retrace your steps"
"Only a part, not the whole"
"Faced with a choice, do both [Dieter Rot]"
"Always give yourself credit for having more than personality [Arto Lindsay]"
"Revaluation (a warm feeling)"
"Lost in useless territory"
"It is quite possible (after all)"
"Idiot glee"
"Move towards the unimportant"
"It is simply a matter of work"
"Not building a wall; making a brick"
"The most easily forgotten thing is the most important"
"State the problem as clearly as possible"
"Always the first steps"
"Question the heroic"
"Go outside. Shut the door."
"In total darkness, or in a very large room, very quietly"
"Which parts can be grouped?"
"Change specifics to ambiguities"
"Use cliches"
"Consider transitions")

key=${1-`date -I`}
key=`echo -n $key | openssl dgst -sha1 | awk '{print $NF}'`
key=`echo $key | tr '[:lower:]' '[:upper:]'`
key=`echo "ibase=16;$key" | bc`
n=${#strategies[*]}
i=`echo "$key % $n" | bc`
echo ${strategies[$i]}

Permalink

Curses Tools

From: andrew cooke <andrew@...>

Date: Wed, 8 Apr 2015 18:50:03 -0300

A whole pile I didn't know in here.

http://kkovacs.eu/cool-but-obscure-unix-tools

Andrew

Permalink

Markov Chain Monte Carlo Without all the Bullshit

From: andrew cooke <andrew@...>

Date: Tue, 7 Apr 2015 07:06:55 -0300

http://jeremykun.com/2015/04/06/markov-chain-monte-carlo-without-all-the-bullshit/

Andrew

Permalink