Just for fun: map as ‘higher-order function’ in bash

On The Balcony

Defined recursively, of course:

map () { 
  if [ $# -le 1 ]; then 
    local f=$1 
    local x=$2 
    shift 2 
    local xs=$@ 

    $f $x 

    map "$f" $xs 

I’m not going to explain everything, but note the ‘local’ commands to keep everything in function scope (to prevent strange bugs) and the quotes around $f in the recursive call to prevent a ‘function call’ of multiple words from being split.

Now you can do some completely nonsensical things, for which you really don’t need map, such as:

$ map touch aap noot mies

But also slightly more useful things such as

$ map "echo foo" aap noot mies 
foo aap 
foo noot 
foo mies 

$ map "echo file:" `ls` 
file: aap 
file: noot 
file: mies

To open up some more possibilities, I also defined a ‘rota’ function, with rotates the arguments of a command such that…

View original post 124 more words

Posted in Uncategorized | Leave a comment

Senator Sanders’s Proposed Policies and Economic Growth by Christina Romer and David Romer

Posted in Uncategorized | Leave a comment

An Open Letter from Past CEA Chairs to Senator Sanders and Professor Gerald Friedman


Dear Senator Sanders and Professor Gerald Friedman,

We are former Chairs of the Council of Economic Advisers for Presidents Barack Obama and Bill Clinton. For many years, we have worked to make the Democratic Party the party of evidence-based economic policy. When Republicans have proposed large tax cuts for the wealthy and asserted that those tax cuts would pay for themselves, for example, we have shown that the economic facts do not support these fantastical claims. We have applied the same rigor to proposals by Democrats, and worked to ensure that forecasts of the effects of proposed economic policies, from investment in infrastructure, to education and training, to health care reforms, are grounded in economic evidence.  Largely as a result of efforts like these, the Democratic party has rightfully earned a reputation for responsibly estimating the effects of economic policies.

We are concerned to see the Sanders campaign citing extreme…

View original post 179 more words

Posted in Uncategorized | Leave a comment

FOMC: Conspiracists to the left of them, conspiracists to the right


Paul Krugman worries that the reason why the Fed hiked by a quarter point in December 2015, and won’t immediately reverse course, is that their judgement has been impaired by talking to too many who work in banking, which industry suffers from very low interest rates.

As Paul noted in one of his earlier blogs, there are those on the right of the Fed who think that rates are so low, and quantitative easing was undertaken, as part of a liberal conspiracy to help Obama;  or, to impoverish those who live off savings.

If I was on the FOMC, I’d probably feel comfortable that there were conspiracists accusing me of having been corrupted by interest groups on opposing sides.

Addressing PK’s most recent charge, his worry seems pretty unlikely to me.  The FOMC had no problem dropping interest rates like a stone – from 5.5%, to 0.25% – when the…

View original post 307 more words

Posted in Uncategorized | Leave a comment

Pantheism and homotopy theory, Part 2

Mathematics without Apologies, by Michael Harris

Voevodsky diagram

Every mathematician should probably read Vladimir Voevodsky’s article in the Summer 2014 IAS Letter.  Only time will tell whether it will be remembered as a historic document of the highest importance; in the meantime, it can be read as an unusually lucid and frank account of what the subtitle calls a Personal Mission to Develop Computer Proof Verification to Avoid Mathematical Mistakes.  Voevodsky tells a few stories about subtle mistakes in important papers, including his own, that left him uneasy.  I’ll skip ahead to the happy ending.

I now do my mathematics with a proof assistant. I have a lot of wishes in terms of getting this proof assistant to work better, but at least I don’t have to go home and worry about having made a mistake in my work. I know that if I did something, I did it, and I don’t have to come back to…

View original post 938 more words

Posted in Uncategorized | Leave a comment

Doing my homework: Heidegger, Latour on things


Heidegger The Thing, quotes:

All distances in time and space are shrinking. […] Man […] now receives instant information […] of events which he formerly learned about only years later, if at all.

Yet the frantic abolition of all distances brings no nearness; for the nearness does not consist in shortness of distance. […] Short distance is not in itself nearness. Nor is great distance remoteness.

What is this uniformity in which everything is neither far nor near — is, as it were, without distance?

Everything gets lumped together into uniform distancelessness. How? Is not this merging of everything into the distanceless more unearthy than everything bursting apart?

Near to us are what we usually call things. The jug is a thing. What is a jug? We say: a vessel […] As a jug, the vessel is something self-sustained […] self-supporting, or independent.

An independent, self-supporting thing may become…

View original post 119 more words

Posted in Uncategorized | Leave a comment

“the modern corporation shows that production can be organized on a large scale over time and space, bringing together thousands of workers in pheonomenally productive cooperation. But these institutions are nonetheless run by and for a small group of owners and managers whose social role is peripheral or even harmful to the institution’s proper running.”

Need to add the perspective of my non-GED-having friend who worked for DART, who said he believes public corporations are a social bad.

In general I would like to promote the voices of normal workers over the g.d. HBR, Atlantic, NYT, and every other outlet that seems to not give a sh__ what normal people have to say — unless they first got a PhD before rejecting bourgeois life.

LBO News from Doug Henwood

Back in 2009, Justin Fox, then of Time magazine, published a book called The Myth of the Rational Market: A History of Risk, Reward, and Delusion on Wall Street. I interviewed him about it on my radio show in June of that year. It’s a pretty good book, but at the time, I thought it bore an uncanny resemblance to some of the arguments I made in my book Wall Street, published by Verso in 1997. (Verso let it go out of print, so it’s now available for free download at that link.) With the publication of the book, Fox went on to become editorial director of the Harvard Business Review (HBR).

My feeling of uncanny resemblance has just gotten a strong booster dose with the publication of an article that Fox co-wrote with Harvard business prof Jay Lorsch, “What Good Are Shareholders?” In Wall Street, 

View original post 314 more words

Link | Posted on by | Leave a comment