HNHacker News
TopNewBestAskShowJobs

tored

1,022 karma · joined October 29, 2020

submissionscomments
tored··on Upcoming Hardening in PHP
Typically you emit E_DEPRECATED for a full major version, then in the next major version you throw an error, e.g if it would land in PHP 9.0 then E_DEPRECATED for non-compliant functions and in PHP 10.0 start throwing errors.
tored··on Upcoming Hardening in PHP
If I understood your proposal correctly, to get the new behavior add an explicit stop to the function, my proposal add attribute to keep old behavior.

Thus if understanding this right that would require to update every function signature to new behavior rather than marking a few functions to get the old behavior and automatically get the new better behavior of every other function for free.

tored··on Upcoming Hardening in PHP
Since PHP introduced the formal RFC process for changing the language things has become much less cowboy and much more professional.

Typically it is features before that causes problems.

tored··on Upcoming Hardening in PHP
Mark the function with an attribute to allow the old behavior. See link for similar use case.

https://www.php.net/manual/en/class.allowdynamicproperties.p...

tored··on We're Leaving Kubernetes
These days with many working on remote location you also need to include the VPN latency.
tored··on We're Leaving Kubernetes
Running an IDE over ssh or samba is just an awful experience, but generally if I want a command line tool to be installed I need to be either root or I need to ask the administrator of the server to install it, on my own machine I can install whatever I want and I can run whatever operating system or distro I want.

And if I'm traveling I can bring my laptop with me, can't do that with a server.

tored··on We're Leaving Kubernetes
The painful part of that setup is that all the tools you want to use on the source code must either run on the server itself, thus installed somehow, or some slow remote mounted filesystem, this severely limits the tools you may want to use.
tored··on Cash: A small jQuery alternative for modern browsers
Enjoy!

    <html>
    <head>
        <script src="https://code.jquery.com/jquery-4.0.0-beta.2.js"></script>
    </head>
    <body>
    <ul id="list">
        <li>foo</li>
        <li>bar</li>
        <li>gnord</li>
    </ul>
    <script>
        (function ($) {
            "use strict";

            if ("development") {
                // jQuery strict mode, logs errors on empty selectors if not opting out
                const getStackTrace = function (error) {
                    const stack = error.stack || '';
                    return stack
                        .split('\n')
                        .map(function (line) {
                            return line.trim();
                        })
                        .filter(function (line) {
                            return !!line;
                        });
                };

                // by calling try() we silence selectors that returns empty
                // problem is that this function runs after the selector
                $.fn.try = function () {
                    this.__store.try = true;
                    return this;
                };

                // thus we use the GC to check when the jQuery object is destroyed
                const registry = new FinalizationRegistry((store) => {
                    if (!store.try) {
                        console.error(
                            'Empty result for selector "' + store.selector + '"',
                            getStackTrace(store.error)
                        );
                    }
                });

                // override the init method
                const jQueryInit = $.fn.init;
                $.fn.init = function (selector, context) {
                    const result = new jQueryInit(selector, context);
                    if (selector && result.length === 0) {
                        const store = {selector: selector, try: false, error: new Error()};
                        result.__store = store;
                        registry.register(result, store);
                    }
                    return result;
                };
            } else {
                $.fn.try = function () {
                    return this;
                };
            }
        })(jQuery);

        // normal usage, have result, no error
        $("#list li").each(function (i, el) {
            console.log(el);
        });

        // empty result, triggers error log
        $("#nolist li").each(function (i, el) {
            console.log(el);
        });

        // empty result but with try, no error
        $("#trylist li").try().each(function (i, el) {
            console.log(el);
        });
    </script>
    </body>
    </html>
tored··on Cash: A small jQuery alternative for modern browsers
Fully agree, the default should be strict, jQuery based code requires every developer to be aware of every selector used in the project and remember to update it when the DOM changes. That is of course impossible.

I think it is possible to replace the jQuery init function with your own implementation that enforces length.

tored··on CrowdStrike broke Debian and Rocky Linux months ago
Do sysadmins actually run any of them for large systems like stores, hospitals, airports etc?
tored··on CrowdStrike broke Debian and Rocky Linux months ago
Sure, but can you realistically run an up-to-date server today without systemd? Especially for these organisation that runs stuff like CrowdStike.
tored··on Mangrove trees are on the move, taking the tropics with them
Them branches go round and round this year.
tored··on Sublime Merge
I added

  "update_check": false
to my Preferences.sublime-settings for ST3, seems to have solved it.
tored··on Sublime Merge
I use WinMerge for that, unfortunately, as the name implies, Windows only.
tored··on Writing GUI apps for Windows is painful
Probably the best option for the author, bit surprised that this was not listed as option, especially since he considered writing HTML/CSS for Sciter.
tored··on Writing GUI apps for Windows is painful
A. PureBasic

B. PureBasic

tored··on Writing GUI apps for Windows is painful
Tested Geany Editor on Windows the other day, it uses GTK, great editor but horribly slow on Windows, just scrolling a small file (less than 100 lines) was sluggish.
tored··on Open source 'Eclipse Theia IDE' exits beta to challenge Visual Studio Code
It exist cross platform GUI frameworks that is maintained by much smaller organizations than Microsoft, if they can do it, Microsoft can do it too.
tored··on Google dropping continuous scroll in search results
Probably curated by an intern.
tored··on Julian Assange has reached a plea deal with the U.S., allowing him to go free
This previous event from 2001 could be one reason

TLDR; Sweden turned over two Egyptians asylum seekers to the CIA

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

tored··on IKEA's retailer's solved global 'unhappy worker' crisis by raising salaries
So you are a Bolshevik after all. I never miss.
tored··on IKEA's retailer's solved global 'unhappy worker' crisis by raising salaries
The greatest hour of the Social democrats was when they kicked out the Bolsheviks from the party in 1917 as reaction to the Bolshevik Revolution in Russia. This made Social democrats a reform party that accepted the already existing parliamentary system and the monarchy ("den borgerliga demokratin"). And by doing so the Social democrats paved the road to becoming one of the most successful political parties in the West.

By marginalizing the Bolsheviks it is likely that this saved Sweden from a bloody civil war, a civil war that our dear neighbors in Finland suffered from. Our modern history could have been very different, Swedes fighting other Swedes in bloody battles, an open wound that could have been present to this day. For saving Sweden and Swedes from this horror, I’m ever grateful.

That is why I rank Hjalmar Branting as the greatest leader of Social democrats, greater than both Hansson and Erlander.

I am of course fully aware about these affairs you mention, what I’m arguing is that Bolsheviks was accepted back into the movement in 70s.

There were many signs of this, not only in the policies that was enacted but also things like the open flirtation with communist dictatorships and letting well known communists back into the movement.

tored··on IKEA's retailer's solved global 'unhappy worker' crisis by raising salaries
If the reforms leads to Bolshevism then it is Bolshevism. What Bolsheviks never accept is that society is more than their political ideas.

It is important to remember that the Social democrats is the political wing to the LO union. It is the union that has permanent seat in the governing board of the Social democrats (Verkställande utskottet), not the other way around. It is the LO union that funds the Social democrats. It is in the union where the real power is (at least back then).

What the union wanted was to get the political wing to implement a legislation so that the union could confiscate private business. This would have been the end of Sweden's pluralistic parliamentarism. Instead an all ruling union with unelected bureaucrats with it's own political wing would have almost total control economically and eventually politically and then later socially.

Your timeline is completely messed up, jumping years back and forth, probably intentionally to confuse the reader what actually happened. Here is a real timeline with the most important dates

  1973 September: Social democrats wins election
  1974          : LAS Lag om anställningsskydd (Employment Protection Act)
                  Abandoning the spirit of Saltsjöbadsavtalet from 1938
  1974          : General parental insurance
  1975 August   : LO union present the idea of Löntagarfonder (Employee funds)
                  20% of company profits should forcibly be transformed
                  to equity issuance and handed to the union
                  No limit on number of shares, i.e eventual union takeover
  1975 November : Dictator of Spain Francisco Franco dies
  1975 New Years: Union boss Hans Ericson vacations in Spanish Canary Islands
  1976 March    : Astrid Lindgren writes here famous story about high taxes 
                  in "Pomperipossa i Monismanien"
  1976 April    : Ingmar Bergman leaves Sweden
  1976 May      : Reduction of taxes as a response to
                  Astrid Lindgren critique about high taxes
  1976 Summer   : LO union decides on supporting Löntagarfonder
  1976 Autumn   : Right wing opposition attacks the Löntagarfonder,
                  calling it "Öststatssocialism" (East State Socialism)
  1976 September: Social democrats loses election to the Right wing opposition
                  First pure right wing government since 1936
                  Coup d'état as a famous social democrat called it
  1978          : Pamphlet "Fritt näringsliv eller fondsocialism", 
                  opposition from the Swedish employers' organization SAF
  1979 September: Right wing wins election
  1982 Februari : Revised version legislation for LAS 
                  (note this is by the right wing government)
  1982 September: Social democrats wins election
  1982 October  : Big Bang, massive devaluation of 16% for the Swedish Krona (SEK)
  1983 October  : Massive demonstrations against Löntagarfonder 
  1983 December : Revised and water downed version, because of the massive protests,  
                  of Löntagarfonder implemented    
                  5 different funds 
                  each fund could not own more than 8% of a company (less than 50%)
  1985 September: Social democrats wins election
  1985 December : Swedish Centralbank (Riksbanken) decided together with the
                  social democratic finance minister to approve de facto 
                  unlimited loans for commercial bank customers
  1986 Februari : Prime minister Olof Palme murdered
  1988 September: Social democrats wins election 
                  (probably would have lost if Palme hadn't been murdred)
  1989 November : Berlin wall falls
  1990 August   : Iraq invades Kuwait, increased interest rates follows
  1990 October  : Investment company Nyckeln cannot pay its debt 
                  speculation on real-estate with massive loans
                  Begins the Banking, Housing and Financial crisis in Sweden
                  Banks and real-estate companies goes bankrupt
  1991 September: Right wing wins election
                  First decision of new government is to scrap Löntagarfonder
  1992 Autumn   : Floating exchange rate for the Swedish Krona (SEK)
                  after a failed attempt to defend a fixed exchange rate
                  The era of politicians devaluing the currency is over
  1994 September: Social democrats wins
  1996          : Finanspolitiska ramverket (Fiscal policy framework)
                  no more overspending by politicians, end of Keynesian politics
  1998 September: Social democrats wins
  1999 Januari  : Independent Central bank by law
                  No more money printing by politicians 
                  to bribe the electorate

What does this all sum up to? That the "reform politics" of the Social democrats died in the 1980s. The 1990s was the tough years of cleaning that mess up.

Today the Social democrats is just an empty shell of its former glory. Just an empty vessel for corruption and greed without any new ideas or reforms.

tored··on IKEA's retailer's solved global 'unhappy worker' crisis by raising salaries
Ladies and gentlemen, this is what a sore loser looks like. No arguments left, only smears. Desperate because you are used to that your bullying tactic works, that people back off and gets sidetracked, but here it didn't, which I already explained to you that you get nowhere with that here.

Swedes rejected your ideas, first in the general election of 1976, were Social democrats got ousted and lost an election for the first time in 40 years, and the second time in of the largest demonstrations ever recorded in Swedish history, the 4th of October demonstration of 1983, against fund socialism.

And if you are old enough you saw your own movement die with the fall of the Berlin wall on the ninth of November 1989. I remember, I saw it on Television.

tored··on IKEA's retailer's solved global 'unhappy worker' crisis by raising salaries
> Pomperipossa is not a real person

No shit. Talk about desperate argument.

She didn't need to pay the 102% tax in the end because of the Social democrats changed the law (as I already described earlier) because it became too unpopular, if they hadn't she would have. Thus is was not made up, it was a reality. Confirmed by the report from Ratio. Thus if Astrid Lindgren hadn't written that article Social democrats would have been perfectly fine with Swedes paying more than 100% in taxes. That is why Social democrats during this era were radicals. And also even after the change in law you could still pay 90% tax.

> You must have a very weird view of how power was transfered from the tsar to the bolsheviks

It didn't happened that way. It was the Mensheviks that took the power from the Tsar in the February Revolution of 1917. The Bolsheviks took in turn power from the Mensheviks in the October Revolution of 1917 and then murdered the Tsar and his family who was already in house arrest by the Mensheviks. Thus Bolsheviks did not remove the Tsar from power, a common falsehood by Bolsheviks, because he had already abdicated.

The Russian Civil War was a consequence of the Bolshevik Revolution against the Provisional Government, which was not accepted by many different political groups, everything from social democrats, liberals to monarchists. Somehow Bolsheviks always forgets this important detail. Wonder why.

But anyway, I was correct about Löntagarfonderna, the implementation, the goal and it's consequences.

tored··on IKEA's retailer's solved global 'unhappy worker' crisis by raising salaries
No, I'm not part of that movement, another smear, directly from the communist handbook. But you will get nowhere with that here.

It is of course fine to question IKEA's business practices, myself is critical of many, personally I'm all in favour of unions as a union member myself, what is not okay is for bolsjeviks to steal companies by using the force of the government and undermine the entire economic model of society in a similar fashion what happened to the kulaks.

> Your link confirms what I wrote earlier.

No, read again, it confirms that Astrid Lindgren payed 101.06% in taxes. And Astrid Lindgren was not the only one affected by this extreme taxation.

Confirmed by this report https://cms.ratio.se/app/uploads/2014/11/den_svenska_modelle...

  Marginalskatten var runt mitten av 1970-talet mycket hög (se figur 4); den högsta 
  marginalskatten var i mitten av 1970-talet runt 87 procent. Beaktades även 
  förmögenhetsskatten kunde marginalskatten överstiga 100 procent för kapitalinkomster 
  och för rörelsekapital kunde marginalskatten också överstiga 100 procent om hänsyn
  togs till både inkomstskatt och egenavgifter (Grosskopf & Rabe, 1991). 
  Detta uppmärksammades av Astrid Lindgren och föranledde henne att skriva en saga om 
  Pomperipossa (Pomperipossa i Monismanien, 1976) som levde i ett
  fantasiland (Monismanien), framställt som en idyll i mångt och mycket men
  där Pomperipossa tvingades att betala mer i skatt än vad hon tjänade (102 procent).
  Astrid Lindgren beskrev på ett målande sätt Sverige och sin egen situation vilket
  ledde till ett skatteuppror i Sverige och att den 100 procentliga marginalskatten
  ganska snart justerades nedåt (Grosskopf & Rabe, 1991) även om marginalskatten 
  på rörelsekapital fortfarande kunde uppgå till 90 procent.
Never trust left wing radicals on history or on anything actually. Lies are part of their ideology in order to turn society upside down.

And why are you denying it? This is what your movement wanted and still wants, that we all should be tax slaves under an anonymous bureaucracy.

In every answer you keep bringing in irrelevant arguments, but that is typical of left wing radicals, they need to create a myth that they are fighting the good fight against all these fascists, so that they can impose a tyranny on all of us.

tored··on IKEA's retailer's solved global 'unhappy worker' crisis by raising salaries
I have not lied, another smear from you.

It doesn't matter what Kamprad's political opinions was in his youth, using socialism to take over private companies as the Social democrats did is still wrong regardless. Are you going to call the family Rausing (creator of Tetra Pak) for fascist as well because the didn't want union bureaucrats to take over their creation?

In what way would union bureaucrats be better stewards than business owners? We had union bureaucrat recently who ran the country, Stefan Löfven, probably the worst prime minister in history.

Social democrats during the leadership of Olof Palme were definitely radicals. During this era they expanded the government and increased taxation massively, which led to a high currency devaluation, i.e made the Swedes poorer, typical socialism. As Olof Palme's successor Göran Persson said it, something like ~ Social democrats always puts democracy before socialism, Olof Palme did the opposite ~. Fitting end that Palme got murdered like something you hear about from 3rd World Marxist kleptocracies.

More than 100% in taxes is 100% true, here you can read all about it

https://timbro.se/smedjan/den-sanna-sagan-om-pomperipossa-i-...

That is why the Government reacted and made a change to the tax legislation within two months, why would they if it wasn't over 100%? Even the most radical couldn't defend this absurdity.

Saltsjöbadsavtalet was not about parliamentary decision, it was about consensus between employers and employees, which led to the Golden years. A consensus that the Social democrats broke when they passed LAS in the seventies. (Also Social democrats is again abandoning the Swedish model by accepting that EU can pass minimal wage legislation)

Without Kamprad there would be no IKEA, thus nowhere for workers to work. That is the thing to understand, Kamprad was one in a billion, radicals exists in the thousands, useless of course because they don't create anything of value.

Why everything is tied up around the stock market is because of neoliberalism, a consequence of the right wing's radicalization as I described earlier, typical for neoliberalism and marxism is that they both believe in printing money out of thin air and then speculate with it. Who benefits? Not the poor of course, it is the receivers of that printed money, for neoliberalism that would be bankers and capitalists and in marxism that would be bureaucrats and politicians, as it was in the Soviet union.

tored··on IKEA's retailer's solved global 'unhappy worker' crisis by raising salaries
I notice that you try to smear Kamprad in order to set the tone in order to defend union take over of companies by force, a typical tactic of the radicals. IKEA was Kamprad's own creation, not the creation of some union bureaucrat.

The Wikipedia article, both the Swedish and the English version, is fuzzy about the details how it worked, they took the company’s own money and use that to buy the company’s shares by forcing them to sell by equity issuance. Goal was to take over private companies and create socialism.

Social democrats were reformist but became radicals during the leadership of Olof Palme. This was not the only one radical thing that they did, another was the famous Pomperipossa taxation where some Swedes payed more than 100% in taxes. This led to other Swedes leaving the country, like the famous movie maker and director Ingmar Bergman.

As I wrote in another comment, this had disastrous consequences for Sweden, large companies left and we went from a consensus culture around business and politics (Saltsjöbadsandan) to a something much more antagonistic.

This radicalized the right wing in Sweden to become neoliberal for many decades to come, which led to other negative consequences.

tored··on IKEA's retailer's solved global 'unhappy worker' crisis by raising salaries
Not in the interest of the workers, in the interest of the union (LO), they used the companies own money to do this, ie take the company own money and use that to buy the company’s shares by forcing them to sell by equity issuance.

The end goal was to take over companies and be owned by the unions.

This had disastrous consequences for Sweden, many companies left, one was IKEA. It created an hostile climate, instead of the previous decades of consensus between buiness and politics it created an antagonistic atmosphere.

The Social democrats lost their first election in 40 years.

The system was scrapped in the early nineties.

Kamprad got paranoid over the realization that politicians and bureaucrats could take over his life work and thus he moves to Switzerland and then created this non-profit to make sure it always remained in his family.

tored··on IKEA's retailer's solved global 'unhappy worker' crisis by raising salaries
This scheme was the consequence of radical Swedish politicians, the Socialdemocrats, that tried to take over Kamprad’s own creation by pure theft.

https://sv.m.wikipedia.org/wiki/L%C3%B6ntagarfonder

← PreviousPage 3 of 26Next →