That is quite literally a national socialist perspective of someone who is okay with only having socialism in her or his own country while the rest of the world is not important. I'm not against the market, I'm saying if you are, too, and you don't like the way the market works at the moment (poor people come to rich countries), stop fighting the symptoms (migration) and do something about the causes (poverty, conflict, often, but not always, caused by the richer countries). It's actually quite interesting to see how the proponents of free market capitalism are usually the first ones to cry for artificial market restrictions such as closed borders, high tariffs or laws that help the creation of monopolies and oligopolies...
If capitalism really were such a win-win situation with oh so much trickle down, then the poorer countries, which mostly are capitalist now, should grow and grow and grow. Instead they send more and more poor people to the richer countreis, why is that if we're helping them grow so well? Shouldn't they be happily optimistic?

And the caveat with the perfect free market (multiple competing participants on the supply and demand side) is that it is not stable. The government has to stabilize it and if you remove all the supports in the name of freedom, it will come crashing down on you sooner or later.
Fair enough so long as you mean lower cases national socialism and not the fascist one that was created. The term was used a lot by Karl Marx and it doesn't necessarily mean you don't care about the rest of the world, they were to be taken care of by exporting said socialism through revolution.

I agree on the difficulties of capitalism. The poorer countries are actually growing at a great pace but their institutions are weak and frankly their birth rates are far too high leading to vast unemployment. A large part of it would really be the increase of mechanization and use of robots. The biggest enemy of unskilled labor workers in the US has been these factors not foreign competition. The American south no longer needs cotton pickers. Ford Motor Company doesn't need hundreds of thousands employed in a single factory. Heavy machinery has replaced armies of manual laborers in construction and public works.
The same is true in most poor countries. Inhabitants of poor countries also have the same general hopes and dreams of success as anyone else does, toiling at thankless tasks or farming ancestral lands understandably have little appeal. There's no shortage of people in every country that see the millions made by athletes and aspire to be one as well to the detriment of studies for practical useful skills.
That's why I tried to point out that immigrant as it was a century ago doesn't make sense, the world and working world no longer work the same. Upward mobility is more and more difficult, especially so for someone hindered by language, education, and licenses/documentation.

As for the poorer countries, the instability and short tenure of their governments isn't exactly helping. Some such as Zimbabwe have tried to right past wrongs too quickly and without foresight and destroyed their status as a food exporter to the detriment of themselves most of all. Others such as in the Sahel face increasing desertification making the the usable land smaller and smaller while the population keeps growing.

All 1st world countries have problems with birth rates. It's just a fact that as people get more affluent they have less children. The easy and less offensive answer is immigration to fill those lower paying jobs that citizens are unwilling to do. Why though should this be an option, if there is unemployment there should be people that must do those jobs. As a socialist I'd expect you to want those jobs to actually pay a salary that someone would then be enticed to do said job instead of keeping that a job for the impoverished in slums to do.

If the trend of the last hundred years continues there will be fewer and fewer jobs for unskilled laborers so why would mass immigration of unskilled laborers be a good thing?
I know you and Montmorency are against any interventions at all to stabilize other countries, isn't allowing mass migration in a form intervention as well. It let's other countries delay necessary reforms in corruption, security, and education. I'd argue that the more effective way to address concerns in those countries would be to help develop industry there as well. I'm no puritan free-market capitalist so I'd think it'd be in the interest of those nations to impose tariffs on goods competing with their native agriculture and industries. All 1st world countries do the same, sometimes in the form of safety standards or quality standards but no one appreciates cheap raw materials or finished goods destroying the manufacturing and agricultural industries they have.

I think we all for the most part agree that controlled economies don't work and neither do completely free market economies. A mix of both regulation and encouragement is necessary. Sadly profit is a great incentive for innovation and improvement but the disparity between the top and bottom doesn't need to be as stark as it is in the US or gulf states for it to create innovation and improvement.
Labor is also a good in a market, allowing the dumping of too much cheap labor upsets the market balance just as too much cheap food makes growing staple crops unsustainable. It too needs to be restricted and regulated in terms of it's the ability of the state to educate and retrain the labor pool as necessary. The current mass migration of unskilled labor has created a glut the market which is stagnating wages and encourages the rapid creation of banned goods. In 1st world countries that'd be drug and sex trafficking while in 3rd world countries it's those to plus slave trafficking, and financing of terrorism.
Allowing this glut to grow even more in competition for jobs that are being more and more replaced by machines only exasperates the situation. Especially when unskilled jobs are essentially pawned off of immigrants or exported to foreign sweet shops and is in effect outsourcing being poor to other ethnicities. That in effect creates problems not just of class inequality but gets blurred into the rising racism that grows in response to this. A hundred year ago every European country had slums but they weren't racial slums, now that exporting being poor to other people is the norm you've got racial slums. Instead of addressing the concerns that create these slum conditions and endemic poverty these countries have allowed the host nation citizens easier upward mobility while tolerating a new untouchable class.

If the current trend of mechanization and robots continues there will be less and less employment availble for those in poverty so why do we encourage the growth this unskilled labor pool?
Intersting article on Japan's possible future:

https://www.japantimes.co.jp/opinion.../#.WluoH6inGHs
Why Japan’s low birth rate makes economic sense
Spoiler Alert, click show to read: 
PROVIDENCE, RHODE ISLAND – Japan’s low birth rate is often framed as the definitive crisis facing the country. A shrinking population constricts the labor force, drives economic stagnation, exacerbates elderly care costs, and eventually leads to cultural collapse. But is this actually true? I argue that Japan’s shrinking population is not all bad, and may actually present a hidden advantage to navigating this century’s artificial intelligence revolution.

To begin, I’d like to address the argument typically presented against Japan’s current demographic trends. Broadly, Japan is believed to be experiencing a collective action problem. While it may make sense for individual families to have few or no children due to monetary and temporal constraints, collectively the country as a whole should want more kids. Therefore, government policies are needed to incent childbirth — which we see implemented today with middling efficacy.

But why should Japan want more children? The obvious, direct consequence of a lower birth rate is a constricting labor supply. But fewer workers is not necessarily a bad thing. Thinning labor puts upward pressure on wages, increasing living standards and reducing unemployment. In fact, reducing the labor supply is the rationale commonly given (though arguably justified) for reducing immigration in my home country of the United States. The counterbalancing risk, of course, is that expensive labor makes Japanese products less competitive, reducing exports and shrinking GDP.

But this downside is only true if labor cannot be effectively substituted with technology. And there is very good reason to believe that not just the Japanese — but the global labor force — is due for a massive labor substitution. Advances in artificial intelligence (AI) and automation will eliminate between 30 percent to 60 percent of today’s jobs, depending on which major study you prefer. Positions like trucking, cashiering and clerking will be first to go; but even relatively skilled jobs like paralegals and analysts are predicted to be lost within two decades.

Given this massive technological shift, a reduced birth rate makes anticipatory sense. In the U.S., futurists like the firm Y-Combinator are advocating for a universal basic human income to address social instability due to spiking unemployment. But in Japan, the labor supply is preemptively thinning. The reasons behind Japan’s low birthrate may not necessarily be healthy — overly demanding jobs, lack of institutional support for families, and more — but that does not mean the outcome of these factors is wholly undesirable.

And there may be other, unanticipated benefits to a shrinking Japan. The country’s population is three times the size of California’s — packed in a significantly smaller land mass. Compounding crowding is Japan’s mountainous terrain, which covers over 70 percent of the country. Population thinning may reduce congestion in cities, render urban housing more affordable, and even ease crowding on Japan’s packed commuter trains.

Finally, a reduction in Japan’s population may ultimately catalyze necessary societal reform. Already Japan’s low birthrate is prompting limited immigration reform, making it easier for certain categories of foreigners to live and work in the country. Japan is not self-destructive; it stands to reason that if population shrinkage continues, Japan will increasingly modernize its immigration policies. Ultimately, labor market forces may incite Japan to open up in a way inconceivable to the country now, but vital to its continued success as an economic power.

So what are the downsides to Japan’s low birthrate? The two most typically cited are burdensome elderly care, and weakening national security. Let’s look at each in turn.

As global life expectancy increases, the costs of caring for the elderly will naturally rise in most major economies. It is not the rising cost of elderly care by itself that’s the problem, but the per-capita burden of these costs. An aging population isn’t bad if the productive workforce remains large proportionally. And in Japan, this just might be the case. The retirement age is projected to rise to 65 in the next few years; as major companies recognize older employees can still contribute to the workforce. And human-centered jobs like elderly care are cited as some of the best insulated against AI displacement. Almost circuitously, an older population may prove a source of employment.

What about national security, and Japan’s reduced ability to protect itself? Here again the coming technology revolution might suggest this is not as much of a problem as it seems. I believe the interdependent nature of today’s largest economies makes direct conflict unlikely, and even then Japan is bulwarked by its military relationship with the U.S. And if you believe, like I do, that digital warfare, IP-theft and cybercrimes are likely the battlefields of tomorrow, then a shrinking population simply reduces the surface area of the target.

The arguments presented here are intentionally overstated for the sake of brevity. I do not believe that a shrinking population is an unequivocal good. For example, I am particularly concerned about the cultural risks to Japan, and Japan’s diminishing influence abroad. And taken reductio ad absurdum, a declining population threatens the end of Japan itself. My point is chiefly that the coming technology shift means our old assumptions about human capital and domestic productivity do not necessarily hold.

Ultimately, I would prefer Japan to have a higher birthrate — like most rational thinkers. But I also try to look on the bright side of the population chasm. As AI eliminates traditional employment, Japan may actually be well-positioned to safely navigate its transition.