Hacker Newsnew | past | comments | ask | show | jobs | submit | more wrong_variable's commentslogin

I am not sure how serious this is or is it just a joke.


This gives far too too much credit to AGI.

1 #

The biggest losers with AGI is going to be corporations, corporations and capitalism rests on a very simple idea - private property.

Humans are employed to create stuff that can be patented or owned and essentially converted into crystallized wealth ( house, factory, software )

However the interesting thing about software - ( something that paul graham pointed out ) - is its almost no-cost to copy it. Its the great equalizer - what would take a factory and a lot of workers to build - will just take a piece of software to create.

So software (a.k.a maths), the ultimate product of efficiency and capitalism is what is going to make capitalism not work.

2 #

The reason for so much unemployment is due to bad policies by govt. lack of growth in developed countries ( money moves from there to developing countries - if a dollar buys me more goods in china of'course my dollar is going to go to china ). Trade deals that do not take into account factors such as those.

3 #

I think there is a strong incentive of 'not dying' in all of us. If you pushed people far enuf they would innovate. You can build a robot from sticks and stones if the alternative is to starve.


The king divides his land up amongst his lords and promises them that they might become kings themselves if they produce enough wealth and capture enough lands for the crown. Then the lords take that land and make the same promise to the serfs: if you farm it well enough and produce enough strong warrior children, maybe you'll end up as a favorite of your lord.

This is feudalism, and it's not hard to see how the steady-state result of this system is everyone running to endless war, as there is ruthless competition at every level of the hierarchy. This is also how most corporations are run, and the promises of glory and wealth are largely as empty now as they were when feudalism was common.

Unemployment is not a problem. It is the goal.

>However the interesting thing about software - ( something that paul graham pointed out ) - is its almost no-cost to copy it. Its the great equalizer - what would take a factory and a lot of workers to build - will just take a piece of software to create.

My employment contract states that any patents I file are to be held by my employer, and that I may not participate in open-source software without their approval, and a good deal of other terms that protect me from economic freedom. Software hasn't equalized much in that regard.

>I think there is a strong incentive of 'not dying' in all of us. If you pushed people far [enough] they would innovate. You can build a robot from sticks and stones if the alternative is to starve.

They would die. You can't not die just because you want to. If the alternative is to starve, many many people will starve. It is callous to suggest otherwise.


I understand their motivation - just like I understand Hitler's motivations.

Hoarding cash is extremely bad from a macro-economical standpoint. The govt should be alarmed of this type of development.

There is a reason why we need 2% inflation - it is to push people with money to spend it or risk loosing its value. Its what keeps the economy churning and keep people employed.

This massive cash hoard is essentially one entity holding on to all the gold in the kingdom - resulting in deflation in the rest of the economy.

These companies are waiting for a disruption, and will just use their cash hoard to buy the company that threatens their monopoly ? How is this not a massive issue of anti-trust ?


Godwin's law kicked in again. I am impressed how it makes its way into every discussion.


> it is to push people with money to spend it or risk loosing its value.

and yet, what these big, very smart companies are doing is not investing. they're just sitting on it.

it seems a positive inflation rate, as an economic growth strategy for a nation, can only do so much. it's also helpful if companies and investors actually see some enterprises or industries worth investing in, or worth creating from thin air, in the current economic environment.


additional benefit of inflation: it makes existing debts easier to pay as time goes on, thus reducing the probability of a default (or a large collection of simultaneous defaults). that is, a small positive inflation rate is good because it means we aren't having deflation, which makes debt harder to pay off.


oh my god, this is depressing sad.

She could have hired a team of machine learning grad students to build her a personalized spam filter.

but she went with the cheapest option.

this is going to keep me upset for a while.


"She" did nothing of the sort. She told someone she wanted her email available. They said, ok, we'll just host it ourselves. "Whatever, I want my daily suduko and make sure I stop getting those damn linked-in spams". "Ok boss".

Seriously, how could anyone really believe she specc'd this out herself? Her staff probably threw it together as a MVP with the full intention of revisiting the implementation "really soon".

And then they lost interest.


She asked and they gave her options she didn't like and then worked around it. Big difference


That's implying she understood the implications.


She cheered imprisonment of whistleblowers, citing sanctity of classified info. Source: "Hillary Clinton on the Sanctity of Protecting Classified Information"

Best quote: “I think that in an age where so much information is flying through cyberspace, we all have to be aware of the fact that some information which is sensitive, which does affect the security of individuals and relationships, deserves to be protected and we will continue to take necessary steps to do so,” Clinton said

She knew what she was doing. This is outrageous.


> She could have hired a team of machine learning grad students to build her a personalized spam filter.

Or instead of reinventing the wheel, installed an existing spam detection product like SpamAssassin on the email server.


Or, truly the craziest of possible scenarios: simply followed the instructions given to her by the people administering her access to the government's IT infrastructure.


I don't disagree with you. Just seemed like we were getting into the bizarre talking about teams of grad students to create something that already existed, unless I just didn't detect the sarcasm.


It makes sense.

A 'whore/slut' women in a society has the most destructive effect on other women's sexual prospect. So I am surprised that there is a taboo against that - the only thing that surprised me is when men think its a bad thing - since it doesn't hurt them having many sexually adventurous women around.


It's probably about control of their partner.


80-20 rule, society runs more smoothly when the 80 gets laid more often.


Before people get out their pitchforks.

These laws in India are a direct result of 200 years of British 'free' trade. Imagine the amount of damage something like NAFTA has done to the american working class - multiply that with 200 years.

While america was in its infancy - before it industrialized - it too used protectionism as a way to allow its local industries to grow, how is it bad if India is trying to do the same thing ?

The indian unemployment/underemployment problem will laugh at the face of the European/American moaning about jobs. Just to give you an interesting statistic - 85% of student loans in India is under water ( compared to 50% in america ).

There was this interesting story of engineers in India accepting jobs as pions ( gaurds/watchmen ) for a miserable 200 dollars salary a month. Could you imagine yourself in that position ? So I do not fault the govt for these laws or else there will be serious civilian unrest.

Indian markets, products and the economy in general is really bad and unsophisticated. There is no way they can compete with american, European and Chinese companies.

Of'course some bureaucrats within the Indian Govt uses this as a way to extract wealth from foreign companies who want to set up shop in India. But that is a corruption problem rather than an argument against the law. Even simple law in India is hard to enforce due to corruption, the reward greatly outweighs the risk.

Hopefully things will improve in India.


I'll add that America is the most protectionist country according to Credit Suisse: http://www.businessinsider.in/The-country-that-imposes-the-m... (Couldn't find link to original report)

Worked out well for America. Protectionist laws are a legitimate tool for social and economic progress.


Your links cites a report that itself gets its numbers from the "Global Trade Alert," which is an org that aggregates a variety of trade-related actions published by the governments of each country. Only a fraction of these are actually related to governments being protectionist. A huge number of these "actions" appear to be petitions by companies inside a country for trade investigations against other companies or nations. Another big chunk appear to be listings of every law enacted that gives even a few million to some factory in a given nation. Not unsurprisingly, the aggregator just lists a bunch of state laws in the US.

The fact that America, with its very transparent political/legislative/corporate-grievances system would be recorded more often by this aggregator, is not surprising. In other words, this aggregator is going to be biased to record more trade-related events coming from more transparent nations that have more corporations located inside of them, and whose corporations will tend to try to resolve their trade disputes in the courts.

But I guess you couldn't be bothered to investigate the numbers when you could just cite BusinessInsider.


Argonaut, are you suggesting that the chart shows transparency of nations?? That's inferring a lot from one chart :) I don't think America is the most transparent country in the world.

Credit Suisse did the research and reported the chart+numbers.

From Global Trade Alert's website: 'Global Trade Alert provides real-time information on <i>state measures</i> taken during the current global downturn that are likely to affect foreign commerce.' It is not a list of petitions by companies.

Here's the original report from CS: https://doc.research-and-analytics.csfb.com/docView?document... appears on page 20)

And Trump is all about protectionism. If America wasn't the most protectionist country before, it certainly will be very soon.


America is in fact one of the most transparent nations on earth. [1] That includes the judiciary, presidency, congress, and law structure. The US Government and state governments publish vast amounts of information about their operations, studies, results, bills, spending, research, etc that is publicly available. The US routinely scores among the top few nations when it comes to making such data public.

It's also widely regarded as one of the least corrupt nations. [2] Transparency and low-corruption are two things that very frequently go hand-in-hand.

[1] http://www.usnews.com/news/best-countries/transparency-full-...

"Denmark [the US came in #11] is the most transparent country, according to more than 8,000 informed elites from four different regions who filled out surveys for the 2016 Best Countries rankings. The rankings, formed in partnership with brand strategy firm BAV Consulting and the Wharton School of the University of Pennsylvania, aim to gauge global perceptions of the world's biggest economies in terms of specific attributes associated with countries."

On corruption the US is listed at #16 by transparency international, ahead of France and Japan, but behind Australia and the UK:

[2] http://www.transparency.org/cpi2015#results-table


Credit Suisse just copied the numbers from Global Trade Alert. Did you even look at the reports on the Global Trade Alert website? Or did you just read the "About" page?

Mentioning Trump is just FUD and indirection. You can mention him if he's elected and if he manages to enact protectionist policies.


Yes I did look through GTA's site and about us page. I looked at GTA and it's a highly respected research org. And CS is a very competent investment bank. So I do believe their research.

You are attacking a straw man. Find me another data source that refutes GTA and Credit Suisse.

Peace.


This is a terrible argument from authority. You didn't actually look at the GTA data, did you? I did, and most of it falls into the categories I outlined in my original comments.


Agreed. Friends use an up vote for this parent.


why is this downvoted ? I didn't read this as an endorsement to upvote but rather as witty response to @argonaut , unless i'm missing something else entirely here and the downvotes are warranted.


See:

https://news.ycombinator.com/newsguidelines.html

"Please resist commenting about being downvoted. It never does any good, and it makes boring reading."

Rallying the crowd for up-votes (even for another user's post) falls pretty much in the same ballpark.


like I said, I didn't read it as a rally for upvote, but rather a witty response to the previous comment. Unless he/she actually was rallying for upvotes and I read it wrong.


Thanks man. I have plenty of other stuff I used rally-ing up on ;-) next time all say 'well played' instead of up vote


This is the original Credit Suisse report:

The End of Globalization or a more Multipolar World?

https://doc.research-and-analytics.csfb.com/docView?document...


That chart at the top the _number_ of protectionist actions...

As in, Country A takes 2 actions that affects $1 in trade. Country B decides in 1 action that no imports are allowed. And so it concludes Country A is clearly more restrictive.

Does that conclusion seem correct to you? Don't you think you need more information than just that?


What is the evidence that Americans wouldn't be better off if there were less protectionism?


Protectionism shrinks markets, drives up prices, and reduces consumer choice. The decreased competition from protectionism also decreases technological development.


> Protectionist laws are a legitimate tool for social and economic progress.

Just not technological progress.

The auto manufacturers in the U.S. are a prime example of how protectionism stagnated industry development.


> While america was in its infancy - before it industrialized - it too used protectionism as a way to allow its local industries to grow, how is it bad if India is trying to do the same thing ?

I was under the impression that anti-protectionism was one of the least controversial positions among economics. Obviously it can help the specific local industries that are being protected from competition, but it seems almost obvious to me that it's going to be a net negative for the people of India. (I am not an economist.)


> I was under the impression that anti-protectionism was one of the least controversial positions among economics.

It is, but I think this says more about the sorry state of economics than it does about whether protectionism is ever a good idea.


Why do you say that? Again, I'm not an economist, but opposing protectionism makes sense to me intuitively.


Most important piece of the following post? http://www.zompist.com/jacobs.html

I'm not an economist, but I've gotten the impression from reading lots of articles like this, that it is net negative overall, as in, world wide. But I have never, ever seen a source claim that it is net negative on a national or local level outside of very, very narrowly defined parameters. I have, however, read academic papers that state the opposite.

Let's use NAFTA as an example as the canonical example. A corporation that makes tires moves to Mexico. As a result, tires for everyone in America are now half price, people who had no jobs in Mexico before now have jobs, which helps build out Mexican infrastructure, 20k people across the US no no longer have jobs; but the US economy is healthy, so those people will hopefully be okay and the US economy will likely not even notice such a slight change in labor demand.

Net result: 320 million people have cheaper tires in the US, Mexicans get better jobs, infrastructure and technology, 20k us lose jobs, the corporation saves money, and hopefully reinvests in something to stay competitive.

Using the above scenario, it is easy to see why any legislation against this behavior is seen as damaging and a net loss.

Lets further assume, that the US passes legislation that trailer hitch manufacturers have to pay an import tarriff from Mexico. Using the above scenario, an economist would say not only are you damaging what should be a net positive economic change, and artifically manipulating prices, but chances are Mexico will pass a law adding a tarrif to rubber imports, which will hurt your tire corporation in retaliation. And now the whole thing starts falling apart, with economic losses.

The counter arguments start with the following:

1) The above scenario assumes that those 20k people can find new jobs. If they can't, the math now becomes something along the lines of: 20000 people * 30000 $/year income >?< 320000000 people * 1000 $ saved for a set of tires * 1/6 (once every 6 or so years) + 20000 people * democracy destabalizing factor * wealth inequality factor

2) Before NAFTA, let's say there were 6 tire making companies in the US, one in detroit, one in newark, etc. Then one of them moves to Mexico City, and helps build up the local technical knowledge and infrastructure needs to support that industry. When the next 5 companies choose to move to Mexico, they will have the choice between also moving to Mexico city, or spending the money to do that same work elsewhere. So you may very well end up with 6 companies operating out of mexico city. While these firms will now be competing against each other, what you've also done, now is replace all of the economies that used to support those industries across the US, with one centralized economy around Mexico City. That's going to be a massive decrease in competition, job growth, etc, overall. Read this for more information: http://www.zompist.com/jacobs.html


> But I have never, ever seen a source claim that it is net negative on a national or local level outside of very, very narrowly defined parameters.

Adam Smith already (and lots of other economists since) have argued for unilateral free trade.


That's in keeping with my post


Hmm, I was a bit confused by your multiple negations at the top. Also not quite sure what your point is.

> That's going to be a massive decrease in competition, job growth, etc, overall [when producers move to a cluster].

Can you expand on that? I don't see how---especially if we agree that the clustering is more economically efficient. (If we don't agree on that, we need to talk about it first.)


Did you read the jacobs link in my post? Economically efficient, sure. Which is fine if the economy is healthy enough that the displaced can continue to find and invent new jobs


I read the Jacobs link. (Actually, had already read it before. It's interesting, thanks.)

It's straight-forward to get a healthy enough economy to provide full employment. (Not `easy', because things are seldom easy in politics.) We even know how to afford a social safety net at the same time.

To not keep you in suspense: - tell the central bank to keep nominal GDP level on a stable growth path - untax labour and capital, put all tax burden on land (whose supply is perfectly inelastic) - use the tax to finance public infrastructure and a social safety net

If you are feeling like it add:

- remove most red tape from the labour market (the part that prevents hiring and firing; keep OSHA and the like)

http://www.economist.com/blogs/freeexchange/2011/10/monetary...

http://www.economist.com/news/leaders/21647614-poor-land-use...

(Not that the Economist is the best source for everything, but they write short pieces to the point.)


> Imagine the amount of damage something like NAFTA has done to the american working class - multiply that with 200 years.

Citation needed. This is still a controversial issue in policy, and anyone certain of any one side has no idea what they're talking about. There is evidence it net hurt jobs. There is evidence it net gained jobs for the US.


Not all jobs are created equal. NAFTA was great for destroying Unions and lowering costs, not sure if it created good jobs.

Of course it was just another attack on the middle class. http://www.theatlantic.com/business/archive/2012/06/are-unio...

PS: I don't 100% agree with this, but it's a viewpoint I rarely see on HN and fits the discussion.


What about robots replacing jobs? http://www.bbc.co.uk/news/technology-36376966


Irrelevant to my point?


They might be saying that evidence of job loss to Mexico is further complicated by the fact that the jobs may have been lost to automation anyway. I.e. that's one more reason nobody can definitively say NAFTA was good/bad for American working class employment.


Bingo!


What's really going on in India ?

You paint a pretty bleak picture. Then I read firsthand reports by someone like yummyfajitas who lives and works there - https://news.ycombinator.com/reply?id=11766615&goto=item%3Fi... According to that, it is the US that's in the dumps. India has jobs for everyone at every level, whereas in the US people are living in filthy homes because maid service too expensive because $15 minimum wage.

I'm not sure what to believe anymore.


India has jobs for everyone at every level if you consider "temple beggar" to be a job and wizened old women in their sixties to be appropriate people to be doing road maintenance. $200 dollars per month sounds like an unusually generous salary for unskilled labour there too - engineering degree or no engineering degree. Of course, it also has plenty of opportunities for a growing middle class that didn't exist for their parents.

The reality is it's a developing country facing significant challenges, and no amount of trade liberalisation (or increased protectionism towards domestic manufacturing) is going to change that overnight. It's pretty hard to pin most of those challenges on the British destroying cottage weaving industries by dumping machine-made Manchester cotton on them in the early nineteenth century, or to argue that banning Apple Stores is a rational response likely to solve that problem.


Yeah, I'm not so sure.

On the one hand, there's stuff like this - https://twitter.com/pankaj/status/729417379730448384

Here you have SF entrepreneurs with vastly more capital & information than the average person in the US buying one way tickets to India.

Just last week, I had coffee with a YC founder who mentioned casually that "YC16 has dozens of startups out of Bangalore". He had conducted mock interviews for the accepted candidates & he was very excited for them & the Indian ecosystem. One or two companies is an outlier, but dozens ? That's a gamechanger.

At the same time you talk of "temple beggar jobs and 60 year old women doing road maintenance".

Am honestly unable to reconcile these opposing narratives.


>At the same time you talk of "temple beggar jobs and 60 year old women doing road maintenance". > Am honestly unable to reconcile these opposing narratives.

India is a massive complex country, just like the US. It has plenty of physical and cultural space to accommodate both those narratives. You might consider visiting there to see both play out at the same time for yourself - it's fascinating.

But you don't need to look as far as SF to India to find such opposing narratives. SF entrepreneurs with vast amounts of capital are in close proximity to many people right in the Bay Area working for low wages in marginal and informal jobs (day laborers, child-care workers, domestic maids), and even people in jobs that involve human oppression (human trafficking, etc).

EDIT: comment added.


There are basically two Indias: India has an educated middle class of significant size and a much larger (and much poorer) lower class. They exist side by side, so you get some contradictions if you try to treat India as one homogeneous population.


Why is it hard to believe that a country where a certain class of people has gone up in wealth and opportunity, other people are still stuck? What notahacker says its correct. There's more to India than just living in the urban centers of Delhi, Bangalore, Mumbai, etc.

Sure if you have an American middle class salary/savings and go to India you'll live a very luxurious life (by Indian standards). You'll have AC in your house, servants to come and clean and cook for you. You can hire a driver for road trips. However your surrounding environment will be worse off than compared to the US (pollution, smog, corruption, inadequate infrastructure)

The servants however are still living in poverty or close to poverty. Go outside a major city to the countryside and its still very underdeveloped.


> interesting statistic - 85% of student loans in India is under water ( compared to 50% in america )

What does "loan under water" mean in this context? In a collateralized loan context (car or house), "under water" means that the borrower owes more than the market value of the collateral.


Essentially for some reason or other the loans are not being repaid - and mostly likely wont be repaid due to high unemployment among the people who took the loan.


I suspect that the GP simply meant that 85% of Indian loans are past due.

Rhetorically, you could consider them as being underwater if the asset purchased (human capital) isn't providing sufficient value (income) to service the loan.


think he means student loans with collateral not doing well due to variety of reasons defined here [1] and I think you are thinking about underwater mortgages as defined here [2] 1. http://goo.gl/21TmQm 2. http://goo.gl/UVNIFr


Default of student loans in India is around 8% which is about 1 Billion USD. Source http://www.dnaindia.com/money/report-banks-learn-a-hard-less...

Default of student loans in USA is around $1 trillion.

Isn't this what is called comparing Apples and Oranges.


India's extremely complicated bureaucratic nightmare of inter-state borders and customs/tariffs is the fault of the British?

http://www.theguardian.com/world/2015/jan/31/india-economic-...

Imagine if you had cargo truck borders and customs paperwork between every one of the US 50 states and what a nightmare it would be for trucking/logistics/distribution/warehousing/cold chain/etc.

Indian states have a significant degree of regulatory autonomy, far beyond what a US state or a Canadian province has, to the extend that some states are looking at banning alcohol entirely and others have unique tax code and criminal code laws not found in the rest of India.


My personal car was stopped by octroi officers near a state border in India. They searched my car, and then said that I should have paid octroi tax on the personal computer I was carrying in the car.

I told them that all taxes were paid including VAT and Octroi for the computer when I bought it 5 years ago.

The said it doesn't matter, I must stop at the Octroi office and pay taxes again every time I am crossing a state border for everything I am carrying in my vehicle.

He said my only option is to pay them bribe, or they will impound my vehicle indefinitely.


Yes, this is fairly common in all of South Asia.

The way to get around this is to look poor and be brown/black. Whenever I go back:

1) I buy a local school bag back ( put my expensive laptop and phone in it )

2) wear wife beater that is slight dirty.

3) do not shave.

4) speak only in Hindi.

5) wear only chapal ( bathroom style )

7) let your hair grow and do not comb.

Once you look poor enuf - no one will disturb you.

Since my job is programming - I really do not need to look presentable since people know who I am. But I do feel sorry for anyone who needs to wear a suit.

Unfortunately the only way you be be rich in public is if you have a bunch of body guards.


These tips usually don't help in India. If you look poor and nobody, the police could even beat you up for no reason.

If you look and act rich & influential, then police and Government officials play nice with you.


so, you're screwed either way? or you should try to look middle class and neither rich nor poor?


Out of curiosity are you ethnically from somewhere in India / South Asia, or a foreigner?


I am Indian.


The post has nothing to do with inter-state commerce. Its to do with Federal Laws set by the Indian Govt, which overall seems to be deeply protectionist. If you ask any historian the reasoning for this attitude in India and why its tolerated - is mainly because of the holdover from the time India was colonized by European Powers.

Essentially what I am saying is that its not easy to sell 'Free Trade' in India.

I wasn't blaming anyone for anything - just staying the facts. I personally think it would help India to loosen up some of its protectionist laws and be a little bit more like China - but that is just my own opinion.


> India's extremely complicated bureaucratic nightmare of inter-state borders and customs/tariffs is the fault of the British?

The West's legacy of (literally) militant mercantilism is the root cause of quite a lot of issues we are currently facing in the world.

The weapons have changed. The mindset remins the same.


I agree with the sentiment, but expecting the company to bend over backwards is pretty naive. It's more likely that'll make products more expensive or just harder to find, not help the country advance.


Sorry for nitpicking, but:

s/pions/peons

s/gaurds/guards


thanks !


> Indian markets, products and the economy in general is really bad and unsophisticated. There is no way they can compete with american, European and Chinese companies.

Lots of previously poor countries have industrialized via exports.

One can argue they used protectionism at home---misguided as it is. But nevertheless their companies managed to sell to fickle foreigners in the foreigners' home markets---all sophistication issues aside.


If there is any person who finds this funny - and it is funny - know that is this is where the WORLD economy is heading.

Europe is already half-way there, america is stalling it due to immigration, China is going to be there once it hits the demographic cliff.


Very true. These countries are all showing syptoms of first-world economy disease; low-birth rate, government budget deficit, high healthcare expenditure, bureaucracy, gutting of manufacturing jobs, and local labor market and education systems that fail to recognize that not everybody has IQ of 120+ and benefit from getting bachelors and masters degrees.

America can thank its dollar as world reserve currency. Billions it spends on military bases around the world and foreign aids is part of its effort to keep its reserve currency status. But at some point, the party is going to be over. American labor force is already very uncompetitive and overpaid compared to its European and Asian counterparts. Yet we enjoy one of the highest standards of living. That gravy train won't last forever.

The only thing that will get the developed countries out of their impending doldrums is 10/100x energy and technological breakthrough.

Until then, we'll get our own version of 60 yen Garagari-kun.

And don't think deflation hasn't been happening already in the U.S. The only difference is, unlike Japan, unscrupulous U.S. food companies have been cutting ingredient quality and content size, rather than raising price for the past 10 years.

Check out Breyer's fake ice cream, Haagen Daaz, McCormick pepper content size, Mars shrinking chocolate bar sizes.

https://consumerist.com/category/grocery-shrink-ray/

http://www.dailymail.co.uk/femail/article-3037688/Shrinkflat...


These countries are all showing syptoms of first-world economy disease; low-birth rate, government budget deficit, high healthcare expenditure, bureaucracy

There are two other major problems in parts of the U.S. and Europe (in particular) that're underrated: 1. insane land-use control laws that make it illegal to build reasonably price housing (see Matt Yglesias's The Rent is Too Damn High for more: http://www.amazon.com/TheRent-Too-Damn-High-Matters-ebook/dp...) and 2. transfer payments to older people that were originally conceived and executed when the number of workers to retirees was much different than it is now.

The first is important because it impedes family formation and innovation. The second is important because it makes not having children easier, because other people's children will be forced to support you through their contribution to transfer payment programs. Yet neither issue gets much play in the press.


A land value tax would help get land use right. (Because there would be less incentive for the NIMBYs to protest, and more incentive for the government to move to more efficient forms of land use.)

Land value tax would also allows us to untax labour and capital, thus reducing deadweight losses in the economy.

See http://masongaffney.org/blog/index.php/2012/08/the-hidden-ta...


There is plenty of unincorporated land in the us. You can't have it both ways. You want to live in an area that is the way it is because of housing association rules, and then not live by the rules. If you revoke the rules, your neighbors will leave. You may as well build in unincorporated land to begin with.


> If you revoke the rules, your neighbors will leave. You may as well build in unincorporated land to begin with.

Houston has no zoning regulations, and its one of the fastest growing metros in the US.


Houston has super neighborhoods many of which have deed restrictions which accomplish similar things. Houston is a happy a good way to go. As you can have a poor super neighborhood next to a rich one. But I still hear some people in the rich super neighborhood complaining about the deed restrictions, the only thing separating them from their neighbors across the super neighborhood line. They could have bought in the other super neighborhood, but they didn't want that either...


Not to mention, and here I am forced to curse: how much actual fucking food is there in a shop today?

Seriously, get rid of the sweets (<3) and sweet-like items from the store. What's left? It's usually about 1/4 of the store or less.

Food inflation in quality and quantity is a serious problem and it's damaging our health and wallets.

Relatedly; freddo frogs are becoming an extravagance.

https://www.reddit.com/r/britishproblems/comments/18yx14/the...

At least British and Irish schoolchildren will have no trouble comprehending the idea of inflation in economics and accounting classes.


And don't think deflation hasn't been happening already in the U.S. The only difference is, unlike Japan, unscrupulous U.S. food companies have been cutting ingredient quality and content size, rather than raising price for the past 10 years.

You seem to have gotten confused between inflation and deflation. With deflation, prices decrease, not increase.


Your last paragraph is correct, but I was using the term in more macro environment context.

25 year of unchanged nominal price is symptom of deflationary environment. The reluctance by the Japanese company to raise price even when costs were going up speaks volume about the strong downward pricing pressure in the Japanese market.

Though not to the same degree, similar environment has been brewing here in the U.S. for awhile. Companies don't want to raise prices, and only do so as a last resort.

If economy was better, they would do so without fear that their competitors would not follow suit.


> strong downward pricing pressure in the Japanese market

Downward pricing is what one would expect in any stable market, given that price optimization is the primary market mechanic. Technology is getting ever-better, so it takes ever-larger efforts to erase its gains and create the artificial inflation prescribed by the central banksters.


> Yet we enjoy one of the highest standards of living

The US ranks 16th on the Where-to-be-born Index.[1]

1. https://en.wikipedia.org/wiki/Where-to-be-born_Index


US is #8 in HDI which is the formal measurement for standard of living.

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


HDI is actually a really poor estimator of Standard of Living. It is measurement of development, but it really cannot be used to compare Standard of Living, especially in developed countries. HDI before 2010 was useless for comparing developed countries as it was literally just a composed index of life expectancy, literacy rate and GDP per capita: for most developed countries literacy rate and life expectancy are basically at the top of the index, so the only differentiating factor is GDP per capita (PPP) which is a pretty misleading indicator anyway.

They then tried to make it more relevant in 2010 and also created an income inequality-adjusted version. This new index uses GNI instead of GDP and uses years of schooling rather than literacy rate (which is basically 99-100% for all developed countries) which makes it bit better, but it still doesn't figure in life satisfaction or other relevant measures into standard of living which is why it's still mainly a way to rank developing countries. The income inequality-adjusted version is slightly better, but still doesn't measure any psychological well-being.


The index seems to conflate countries to be born in and countries to be raised in. For example, if there is one country in the world to be born in, I would absolutely pick the US, if only for the ease of travel/migration to many desired countries in the world. For countries to be raised in, the index seems to be more relevant, at least judging by the metrics used.


There are many countries with more visa free travel than the US. And these countries don't have international income tax.


US seems to be quite close to the top with 154 visa-free countries, while the top spot is held by Germany and Sweden with 157 countries.

https://www.passportindex.org/byRank.php


(Not) coincidentally the countries in top-15 of this index are also the ones which are on par with US, compared by ease of travel.


I guess you meant this as confirmation of his/her statement?


Yet people line up for years for a chance to immigrate to the US! Weird!


Healthcare cost partly the result of an aging population with expensive chronic diseases? Priority would be ironically to research anti-aging to extend youthful lifespan. However, some problems are a result of a screwed up incentive structure in healthcare that is yet to be fixed, and may be harder than the technical problem.


Anti-aging treatments wouldn't fix anything. Don't you get it? Our economy is broken because it relies on an ever growing workforce. For a slowing economy you only need natality to be equal with mortality rates. It's a freaking Ponzi scheme.


It doesn't rely on an ever growing workforce. It relies on ever growing consumption, whether that's by a growing work force or a not-growing workforce that's spending more.


We already have human growth hormone, testosterone, igf etc that can make your body heal and recover like a younger person atleast for sometime.

You can also chose to have one child or 4 children. Just depends: do you get more happiness from 1 pampered child, or 4 modestly raised children.


Stagnation is the main threat the world is waking up to.

People will blame other things of course. Things like MENA immigration, climate patterns, crop failures, these are second order affects of stagnation.

The peripheral fails before the center. Never forget that.

I have to congratulate Peter Thiel. He has managed to see a lot of this ahead of almost anybody else I can think of and this is despite being at the heart of the cozy bubble that is Silicon Valley. One of his expressions is that you can have instances of success in an ocean of general failure or something to that effect.

Even on HN a few hours ago I saw a WSJ article proclaiming that everything is smashingly good these days, that three/four decade wage stagnation is a mere blip on the radar. Though I agreed with the substance of the historical facts she stated I also think this is an utterly clueless point of view on human nature that is shared by huge swathes of the middle class. I didn't live in 1850 and I cannot be expected to appreciate the good fortune of the years since then! If you live in a downcycle then that's all you know.

You see the contradictions at their most dire with the pension funds. They require either massive hikes in funding or 6-7 real percent per year. Wages will have to rise suddenly and dramatically and/or else we need massive massive technological changes.

Somehow I see Larry Summers getting called back into Court. Whether monetary policy is enough, that is another question.


An economist named Harry Dent has said the same thing for quite a while and wrote a book (which is a bit hard to read without being versed in financial terms). He had a debate with Jim Rickards where they wound up both saying deflation would happen due to demographics, but disagreed on the power and will of governments to enact inflation to counter it.


The names of those guys make them sound like characters from Gotham city in Batman. I'll have to take a look at the book and debate, whizzbang financial terminology doesn't scare me.


Wages have not been stagnating [1]. Median wage has stagnated but that is due largely to the polarization of the labor market of which has been talked about long before Peter Thiel [2].

[1]: http://www.tradingeconomics.com/united-states/wage-growth

[2]: https://www.researchgate.net/profile/Melissa_Kearney2/public...


I agree with those statements. I'm not sure we agree on what they mean though.

World becomes more zero sum when growth plateaus. Only now it is proposed that everybody and their dog get PhDs in god only knows what.

Diminishing returns are exactly stagnation. I know blue collar workers making more money than people who took extensive study and got 'good' jobs. This is despite the fact those workers haven't actually had wage increases themselves! They're just working long hours for more pay. We're stuck in a rut. It could be the case that technological stagnation is created by technology itself. A hairy subject!

If I remember rightly wage increases for the higher percentile aren't that great either. I mean they are better than zero but not as great as they used to be. Makes sense since their market of consumers is drying up as everybody becomes cash poor except for those making toys for the actual rich.


What does immigration has to do with price deflation?

(I know you can come up with some relation, of course everything is related, but again, it is not straightforward, and you shouldn't just assume that saying a bunch of buzzywords and stating some facts stands out as an explanation)


Without immigration, the US population would have peaked in the 1970s and our economy would be much worse off. We replaced our reducing replacement rate with an increasing immigration rate.

When you have more people wanting stuff, prices rise and jobs create themselves to meet this need. With a declining population, you have fewer people wanting stuff, so prices go down.


Right, but if prices go down, then people can pay less for them and they don't need to earn a lot in their jobs, everything fits and we're as good as in the other scenario.


Sure, until you find yourself in a deflationary spiral and the economy screeches to a halt. Why would you buy a house if you know that next year it will be cheaper? Who would finance a mortgage in a deflationary environment?


Computers, cell phones, and other consumer electronics get cheaper every year for a given level of features and performance. Yet consumers still buy more and more of them.

Certainly I would buy a house if I know that next year it will be cheaper. I need somewhere to live and don't want to have to move over and over again. Nothing about a deflationary environment would prevent lenders from providing mortgage financing. Mortgages were obviously still available to qualified borrowers during the worst of the housing market crash.


Right, I prefer to die of hunger because I think the price of food will be low next year. Do you really believe this? People buy expensive electronics every day even though they know all them will be much cheaper after some time.

Interest rates can adapt to pricing variations expectations, you know that because it works in inflationary environments.


>Sure, until you find yourself in a deflationary spiral and the economy screeches to a halt.

That's the thought experiment, but it doesn't pan out in reality. The US economy experienced long stretches of high growth and low deflation in the 19th century. People still have physical needs even if the currency is deflating.


You get to live in the house.

We'd be better off if houses weren't treated as investments but rather as shelter; see eg SF/peninsula for what happens when people start winning the housing lottery. ie everyone who owns a home is a millionaire.


Immigration staves off demographic time bomb, which is cited as one of the causes (or symptoms depending on who you ask) for Japan's no-growth economic environment.


Immigration pushes back the social welfare Ponzi scheme time bomb. That's it--and that assumes that the imported people aren't net tax eaters themselves. At any rate, you can set off the bomb now or later, but the longer you wait the more explosive it will be.

Back on planet earth, a smaller population is almost always better than a larger one. The only real difference is that a smaller population has more natural resources per person.


I'd like to stay hopeful and perhaps they can figure out a way balance the welfare income and expenditure. But that will probably not happen. The bomb does need to blow to reset the clock.


It is possible: the US can technically be indebted (and thus borrow) infinitely. Sovereign debt is not like private debt, there is no ceiling to it (unless willingly mandated, as the US Congress does).

I'm not going to pretend to know what the future will look like, but presumably some political change involving multiple planetary systems will succeed the US and do something with the debt.

In any case, human population will peak and then start reducing at some point in the not too distant future (unless we expand to other planets). I wonder what happens if the holders of the debt themselves were to perish.


What a terrifying prospect: war waged in order to eliminate a creditor nation.


Although I lean libertarian I don't see how you can control monetary policy without also needing to control population size. Lots of awkward ethical questions nobody wants to talk about here.


I don't get it? Just print money? (Or more formal, do QE?)


What I mean is that there must exist an elemental relationship (min-max limits) between population size and the depth of the division of labour (how complex production can become).

Pairing population to production optimally is a synchronization problem. Cybernetics I suppose, not usually how economists think.

Economic growth and recession could be modulated if there were enough people when we needed them, and there were not, when we did not. Recessions won't go away but they wouldn't be compounded by demographic issues.

Currently this is solved in a haphazard way e.g. using illegal immigration of people like fruit pickers (deporting them when inconvenient) or by green belt zoning and class siloing. That can't be efficient. It couldn't possibly make humans happier. Most actually adopted solutions appear to be quite damaging to humans. How much of this is consciously orchestrated is also hard to ascertain. I suspect it is mostly Scott Alexander's Moloch at work. Every central banker ought to read that poetry because it's quite recognizable.

Since it is unethical to force children to exist (Ceausescu) and also wrong to murder people or prevent them having offspring when demographic issues arise, we need a plausible solution to allow for a world in which people have a realistic chance of having sustenance and purpose in their lives.

Most people really don't like this topic! It is understandable. We prefer not to think of ourselves as elements of production and supply. Of course we are, we're just a special case of it.

All of the problems are ultimately rectified by markets, or failing them, mother Nature. You know what they say about Nature being a mother. My point is that we don't necessarily need to let it get to market corrections if we think ahead.

Suppose you were a Communist official in charge of the One Child policy who anticipated the female infanticide rate. You'd have solved for a good deal of human suffering decades later on with perhaps an afternoon's work. Right place, right time.

Monetary policy tools work on a similar lever principal to this which is a large part of the reason I'm talking about them in the same vein. I'm not confident I know what to do, only that it is a factor. And now; tell me how I'm wrong!


You seem to be trying to say a lot of things without making it clear exactly what the main point is. From what I gather, its that one can control a very exacting control over the market by having a very exacting control over division of labor. Which sounds a lot like communism, which you use in an example. Is that what you're trying to say?


Think of Malthus. He described how human populations could overshoot the food supply because the growth rate in humans was exponential but the growth rate for food production was linear. Famines then follow a predictable cycle.

My hypothesis is that in the economy the growth rate in humans does not relate directly to economic growth. There could exist a religion that promotes large families for example; that's why I said mother nature would ultimately take care of business if things got out of hand.

Sometimes we need more humans but there is a lag time before they appear. Sometimes we need less humans but they stick around absorbing dwindling resources and leaving their children with higher prices later. Both of these outcomes sabotage future growth prospects.

How this relates to economics is that central bankers use interest rates changes in an attempt to produce stable growing economies. As I understand it the mechanism is a kind of lever, by modifying the trajectory of money supply you can slightly influence the larger flow. Central banks then spend their time compiling statistics to anticipate the future.

If one can do that with money then you can do it with humans too by finely tuning the probability of them being able to give birth. Then as long as you can anticipate the amount of workers required you can provide that many at the correct time. Demographic hiccups become a thing of the past.

I leave a lot unsaid here. Evidently controlling one part of the economy causes you to require as you say 'very exacting control' over other parts. As you can see there is nothing controversial here.

I want to point out that the actions of governments tend to support a belief (that they believe) in something of this sort and that changing human production rates is some kind of corollary to changing interest rates. After all the humans use the money. They're the ones incorporating information into prices with their decisions.

This whole topic has the feeling of an 'Ugh field' about it. I understand if I'm downvoted into oblivion but it's an important idea. If I'm totally wrong then great, tell me how.


Lemin Wu has some interesting papers about Malthusian traps: http://behl.berkeley.edu/files/2015/02/WP2015-01_Wu.pdf

Who is that `we' that needs more or fewer humans? Ie economists usually take the supply of humans as an exogenous variable, and try to figure out what they do to maximize their welfare. (And very often also: what they could be doing better.)

Taking humans as an endogenous variables is possible. (I've seen one analysis where they started talking about slaves as capital vs free workers. The reveal was that the author actually wanted to talk about the economics of robots (and other automation) as capital vs free workers---but without triggering people's preconceived notion of what automation can and cannot do to macroeconomics.)


Thanks. I'll have to have a Say-Malthus day soon.

I've always been fascinated by Malthus. Without Malthus I don't think you have a Darwin. I know he gets typed as the doomsayer but there has always been something very elemental about his idea. I think it was the first time I encountered a simple concept that explained deeper patterns and so it stuck with me.

> Who is that `we' that needs more or fewer humans?

I'm trying with some difficulty to avoid value judgments e.g. we should or should not interfere in human reproduction patterns so that's a reasonable question.

I think that 'We' is the information network. I don't mean the Internet or the price system. It's a broader idea that probably fits into ecology, something like the Noosphere. The premise is that there exists a lot of different states the network could be in. It could be in an optimal state or in a sub-optimal one. I'd guess that it's governed by something like Cybernetics but I'm confident we won't know most of the rules and certainly not the emergent consequences of the rules.

To be less handwavy - the 'We' can be the union of the Economy and Ecology sets. It would take humans as being endogenous variables. I'm sure other people have thought of all this before, but it seems difficult to avoid metaphors that could suggest latent policy prescriptions e.g. Spaceship Earth (limited resources) or World System (global government).


Yes, Malthus was indeed an inspiration that got Darwin thinking.

About your ethical problems: you could just go purely formal, and try to present your thoughts without any value judgement. Any prescription would be purely conditional like:

- if you want to maximize this variable, you should do that.

Lemin Wu has some great thoughts and simulations that round out Malthus. He's also interested in why ancient authors, especially Chinese, decry commerce and any economic activity that's not food producing:

> For example, during the Warring Period of China (476-221BC), restraint on luxury was the theme of a series of political and economic reforms. In the face of constant nomadic harassment, King Wu-Ling of Zhao (340-295 BC) commanded his subordinates to take off their wide sleeves and long robes and switch to nomadic uniform—pants, belts and boots— in order to fight as cavalry. Half a century before King Wu-Ling, Shang Yang’s reform swept another kingdom, Qin. The reformer punished commerce, rewarded cultivation, forbade migration and restricted entertainment. In a word, he cut down luxury and directed as many resources as possible to subsistence. The subjects were deprived, but the Qin kingdom defeated all of the six rival kingdoms and united China for the first time in history. A contemporary philosopher commented, “Qin is different from all the other kingdoms. The people are poor and the government is cruel. Whoever hopes for a better life can do nothing but fight hard. This makes the Qin army the strongest of all."

(from http://wulemin.weebly.com/uploads/1/4/6/2/14620598/jmp1110.p... available via http://wulemin.weebly.com/)


PS Happy to have a discussion via email. (Address is in my profile.)


Thanks, that is good of you to offer, I'll let you know how I get on with my Malthus-Say Day once I've done some reading on the material. I get to these things sort of randomly but be sure it'll happen :-)


Have a look at Say's Law. (https://en.wikipedia.org/wiki/Say%27s_law)


Thanks, I'll give it a read. Men in wigs or togas seem to have figured out most things.


Oh, by the way Say's Law only makes sense in a classical setting. (And the market monetarists tell us that NGDP level targeting will make economics approximately classical.)

https://marketmonetarist.com/category/says-law/

Though, I think your time will be better spend reading https://en.wikipedia.org/wiki/Henry_George_theorem and especially http://www.masongaffney.org/publications/G2009-Hidden_Taxabl...


Exactly, they can see that the policies of the US and Europe will lead to lost decades like it has in Japan. You can see it already happening. I believe the problem is the bail outs from the financial crisis and the ongoing belief that nothing can be allowed to fail which is why interest rates have been kept so low. I think they would be much better off raising rates (Fed and ECB simultaneously) - this will lead to some short term pain as businesses that arent very profitable are forced to close. But from the ashes of these 'bad' businesses you will get better ones rising. The metaphor here is of fire which destorys but also clears the way for regrowth.


The world doesn't have to head there. Central banks can produce any amount of inflation they want to, if they have the guts.

See nominal GDP level targeting: http://www.economist.com/blogs/freeexchange/2011/10/monetary...


Yep. We'd rather slowly become more and more sclerotic rather than face so much as a tiny increase in price level.


Some would say that arguments based on demographics are missing the point. Japan has been cannibalizing itself in order to protect its zaibatsus, squeezing every last ounce of productivity from its workers to the point at which they longer reproduce, and enacting corporate welfare policies in the form of QE and ZIRP/ NIRP. The EU and US have been following suit with quantitative easing and stagnant wages, and now we're beginning to experience the same economic decay that Japan has before us.

This whole situation is completely avoidable if someone would just have the courage to stop coddling elites and big business.


Outside of export oriented manufacturing, Japan doesn't have high productivity.


Its seems like a PR piece to push for money into the military industrial complex.

Make shift weapon can be built out of anything almost anywhere - they are a symptom - not a cause

:: angry people -> weapons -> people die

The question is what desperation is driving these people to build these make shift weapon - just like my kitchen knife will switch to a weapon under the right circumstances - what is driving these people to turn their mobile phones into missiles ?


If you are interested in learning about Algebraic structures and group theory from a very practical standpoint I highly recommend

https://github.com/fantasyland/fantasy-land

Also - does anyone show me a practical usecase of the reader monad ? cant you just use partial functions ?

if I am not mistaken isn't reader monad just :

foobar.config ({'name':'hello'});

foobar.run ({'age':'34'});


The reader monad is like read-only thread-local storage. (State or ST would be thread local storage). It provides a command to get the "current state"

  function f() {
    var m = getState().chain(state => {
      // ...
    })
    return m;
  }
or with generators acting like do syntax replacement:

  var f = wrapped(function* () {
    var state = yield getState();
    // ...
    return;
  });
At the end you get an object that contains an unexecuted sequencing of computations that you can run with any state. For example you could run it from a HTTP route handler with the current user contained in the "state":

  var m = f();
  m.runWith({currentUser: request.user})
and now you have access to the user without passing it around everywhere.

All the other analogies in this thread are wrong in terms of what the real API looks like. The real API looks almost exactly like Promises, with `chain` instead of `then`.

This in turn also explains why monad transformers are so important. Having access to just the current user w/o passing it around isn't very useful if e.g. you can't do IO, but having both - now we're talking!


I do not understand how the reader monad is different than promise.

It seems the reader monad just delays execution of some code until you call 'runWith' and you can define state variables throughout your code before calling runWith.


Thats precisely what it does, yes. Its different than a promise because the implementation is different (everything is done synchronously, and getState() returns an action object which then the implementation works on. The result of doing runWith() is also immediately available (not possible with async IO):

  var result = m.runWith(...)
Other than that its almost exactly the same. And so are other monads. The Array monad (that is, if JS arrays actually had that method, which they don't)

  var m = [1,2,3]
    .chain(x => [x, x * 10])
    .chain(y => y < 2 ? [] : [y])
result: [10,2,20,3,30]

Same API (monad), totally different functionality.


so monads are just a way to define an api ?

so anything that is like this :

values = ['coffee','water']

AfterWebSocket = values.sendToWebSocket()

AfterWebSocket.compute (eachValue => x*2)

is that it ?


It has to be the chain method and it has to act in such a way that you pass a function that returns an object of the same type.

For array chain takes a function that returns an array. For promises, chain takes a function that returns a promise object. For Reader, chain takes a function that returns another reader object.

Here is a complete class Reader:

  class Reader {
    constructor(computation) {
        this.computation = computation;
    }
    runWith(data) {
        return this.computation(data)
    }
    chain(readerReturningFn) {
        return new Reader(data => readerReturningFn(this.computation(data))
                                  .runWith(data))
    }
    static of(val) {
        return new Reader(data => val)
    }
    static getState() {
        return new Reader(data => data)
    }
  }

Here is how you can use it:

  var r = Reader.of(5).chain(x => Reader.getState().chain(y => Reader.of(x + y)))
  r.runWith(2)
  > 7
For it to be useful, you want ReaderT, a monad transformer which takes another monad (such as Future) and creates a new monad that provides functionality from both. This gets fairly complicated fairly quickly :D But the result is also a monad, which means it will have the same familiar `chain` based API.

And yes, monads in programming are this simple. Mathematical monads are a wider generalisation of computing monads (just like Iterable would be something more general in the real world, not "things with a next() method that acts like this"), but in terms of programming its a shared API (chain) that acts in a certain way (chains to another object of the same type and flattens one level, whatever that means for the concrete implementation)


So its all just about types, ?

More like a specs that if people follow the world would be a better place ?

what is a monad transformer ?

I understand your code - but fail to see why its so useful :(


Yeah, its about the type / interface / protocol. But they really are very, very useful. There are just so many problems that can be solved with it.

For example there can be a GraphQL monad. Instead of Promise.all you would use GraphQL.parallel(otherMonads), and the implementation can transform that to a single request to the server instead of multiple ones.

Similarly there can be an ORM monad that avoids the n+1 queries problem. parallel(Users.get(id)).chain(users => ...) will transform the parallel query to a single SELECT ... IN query.

Also, have you tried passing the current user around in server side code, everywhere? Its really tedious to do, and Reader solves that!

A monad transformer is (more or less) a function that takes a monad class and returns a new monad class (yes thats the class object, not an instance). So if for example Future were a monad, and you wanted to add Reader functionality, you would create a new class PromiseWithReader:

  var FutureWithReader = ReaderT(Future)
Now you can use this monad to do both getState() and async IO operations within its chained functions.

  function getUserPosts() {
    return getState()
    .chain(state => Posts.getForUserId(state.user.id)) // cheating a bit here
  }
in the route handler:

  getUserPosts.runWith({user: req.currentUser})
  .fork(posts => res.json(posts))
The cool part is you can use getState() at any time to get the state. This will work no matter how deep your functions are: the example above is just with a single function, but that function can call another, which calls another, which calls getState() to get the user. But there is still no need to pass that user through all those calls. And if you use something like a State monad, you'll even be able to modify the contents of the state.

p.s. Future implementation, based on robotlolita's minimal Future class: https://gist.github.com/spion/b433a665ca51d6c38e9f


hey spion !

I read your post and sent you some messages on gitter, it seems you do not use gitter a lot :(


Sorry about that.

Here is an implementation of ReaderT, how it can transform a Future to provide "local readonly state", and a usage example:

https://gist.github.com/spion/b433a665ca51d6c38e9f

Since its JS, I also added automatic lifting, just to annoy Haskell programmers ;)


Reader fulfills a bunch of OO patterns. I like to think of it as "Environment", "Capability", "Configuration", etc., and is related in a way to Dependency Injection.

Basically, you have some computation/object that isn't complete without some "setup info" which, from the point of view of the code being written, is "just there". Like if you had a program that needed access to a particular interface, but you didn't want to manually pass it to every function that cares about it; instead you'd make an object with that interface as its state and write your program as methods on that object. That's just Reader in disguise.

In fact, C++ methods are basically in the Reader monad; they all have an implicit "this" argument which the compiler plumbs around for you.


Interestingly enough "Environment" is another name for the Reader Monad.


well, a 'reader' monad is a monad over a Function[A, B]. So yes, when you say 'the reader monad', what you (probably?) mean is the instance it operates on, which would be a function.

You use the reader monad the thread the same input to multiple functions that may also take additional intput, and also have their own outputs.

You have to keep in mind that since Monads are so common and useful, many languages have syntactic support for them. C#'s LINQ query syntax, scala for expressions and haskell 'do' are all 'monadic comprehension'.


So A reader Monad is similar to class inheritance. Where you provide a dependency ( like a inner class ).

The resulting class can also have other variables and inputs.

Is that a correct analogy ?


I think a better analogy with OO languages would be a Function object for which you've provided one of the arguments in its constructor.

Inheritance is more similar to monad transformers.


Yes, you can just use partial functions.

But partial functions are not always as clean as you think they are. When composing with pure functions for example, you'll save a lot of boilerplate lambdas if you use the monad.


I wrote a simple post showing the 3 main ways to pass state. Check it out! http://deliberate-software.com/haskell-state/


The Reader Monad lets you abstract away local state. You're on the right track with partial functions, but using a monad is cleaner (at least in Haskell...and I'd guess anywhere else). Essentially using the monad instead will let you remove all of the redundant function application you'd have to do otherwise. If you've managed to abstract this step away into a library, take a look at your abstraction. It's probably equivalent to Reader.


And check out ramda-fantasy while you're there!


I created my profile at 2012 - thanks for that information !

Is it possible for me to check the data link to look my name up.


Yes, leakedsource.com, select "email" from the drop-down and use the email you had associated with LinkedIn in 2012.

I'm in the list :( I can't remember what password I was using in 2012, but I changed my password again anyway. At least it was never the password associated with my Gmail login, cause I'm not a derp so I don't use that anywhere but Gmail.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: