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

> The rise in popularity of Laravel making it the de-facto choice of framework within PHP.

In the US.

> What edge does PHP still have compared to other languages?

Horizontal scaling due to the nothing shared architecture: need more perfs? Add a server. Which is an exact match with Kubernetes (replace server with replica). But usually your performance problem is not the executing code but the database.

> PHP needs to get rid of having Nginx/FastCGI as a requirement. Let PHP-FPM speak HTTP directly. If you want to terminate TLS via Nginx, it becomes a choice, not a requirement.

FrankenPHP is this.

Seems like your beef is not with php itself (aside from the compiling part) but the Laravel ecosystem. You may want to check Symfony and its ecosystem and what is being cooked outside Laravel.


> In the US.

any numbers to back this up? Laravel is very popular in EU Africa and Asia as well.

> Horizontal scaling due to the nothing shared architecture

Virtually no language that can be used as web stack has any restriction on horizontal scaling? Can you name one example?

> But usually your performance problem is not the executing code but the database.

the endless performance benchmarks would beg to differ. Sure, _any_ IO can and will be the bottleneck, but unless your code base is just 100 loc, you will see other bottlenecks.

> FrankenPHP is this.

so why keep fastcgi? what is the advantage over http (transport, not talking about static assets)?

> Seems like your beef is not with php itself

I do not have any beef with PHP or ecosystem. The complete top-half of my blog post is actually giving kudos to what makes PHP great.

My main take is simply that advantages that PHP had previously are having less impact in todays world :)


> if you have thousands of microservices

You just replaced ns memory accesses by ms API calls. Just the moment people were starting to maybe start thinking about performances again this train-wreck of power wastefulness had to appear.


One of the advantages of an autocracy: you don't need people's approval every 5 years so you can plan for decades. When you're right it is awesome. When you're wrong, well that's what the army is for.


The actual reality of how China works is much more complicated than this "select from a dropdown menu" system you are implying.

For one thing it's made up of fairly autonomous provinces that all compete between each others, for another the actual strategy has been heavily relying on extensive local experimentation to find growth models that can be applied nationally.


Nah he's correct, local government compete on implementation details, not overall strategy that is monopolize by the central government. Which has the same pitfalls (-see zero-covid or the debt crisis owing to gdp targets)


Also if any of the local governors / entrepreneurs cross a line they just disappear to focus on reading. Some of them might reappear after a decade having thoroughly understood the textbooks.

For example Jack Ma reappeared after his successful re-education.


China is the only country that can control their billionaire while US is the other way around


China doesn't have a debt crisis.


> One of the advantages of an autocracy: you don't need people's approval every 5 years so you can plan for decades.

This is a funny thing to say about a system known for its regular issuance of 5-year plans. They have festivals and everything.


You can badmouth about China all you want but at least they are consistent where they stand

while US flip flopping about invading middle east (like usual) or Greenland


I don't think he was badmouthing China at all. He's basically using different words to make the exact same point you're trying to make.

When there's no real accountability, in a reasonable timeframe, it's much easier to plan long term.

It's the same within companies. When the CEO assumes he'll be around for 5 years, should he shoot for the 10 year goal and reduce outcomes in the early years? Or does he just optimize for the next 5 years, thereby neglecting the long term goal?


"When you're wrong, well that's what the army is for."

he is implying that China bad action can be solved by PL red Army


He's not implying, he stated it directly.

If you think he's wrong then tell me - what do you believe would happen there in the event of widespread social unrest or grievances against the sitting government?


They used to be, but after millions of people died, they realized that they had to do better. The rest is history.


GP isn't "badmouthing" China, that description applies to every non-democratic country, one leader with the power, not the people.

Autocracies are great in the hands of a competent leader who plans the economy long term, and the grows of the country for the benefit of the country and society (look up "benevolent dictators"). They are not afraid of long term plans, or pleasing the population in the short term. He can break some eggs now to feed the whole country tomorrow. This is not something a democratic leader can afford. They live in 4-5 years cycles to please an electorate who looks for immediate benefits.

In the hands of an incompetent and abusive leader autocracy is a nightmare that's supported only by fear and violence against the people. These are most dictatorships. Society suffers but can't do anything for fear of being steamrolled by the army.

China is straddling a middle ground where the country grew by leaps and bounds, faster than anything else in history probably, but they also use a heavy hand to do this.


I don't think this democratic vs autocratic framing is entirely correct; most of the commenters here fail to mention the political ideology of capitalism. Pre-2000 several European nation had long term plans despite being democracies. The move to further integrate into the EU meant added political pressure to adopt more liberal postures like breaking state ownership of essential industries and that meant also no more of those medium to long term plans for those states.

This isn't China vs the rest, this is US Capitalist view of the world vs the rest. China in this present conversation is only an example of a country that has not succumbed to the desiderata of the unrestrained Capitalist.


Good point but the scale and success rate of the way China does it compared to any other democracy, or any country, in the past puts them in a different league entirely. They are on their 15th 5 year plan and look at the results.

A successful planned economy needs an autocratic leader, or a majority of people with foresight and willingness to delay gratification working together. There were very few moments in time when this intersection happened.

The last time someone had real planned economy in Europe was in communism time, with the 5-year plans and those were a joke, paper exercises to please the leaders. Those economies slowly failed. The planning you talk about post-'90 was relatively minor, more like a few ongoing projects.

Populists and corruption invaded the scene and promised the world now, making realists/idealists look even worse. Promise of short term gain is such an easy sell that it organically became the tool of choice for would-be leaders. Worse even, once the former opposition got to power they tore down what was built by the predecessor, started over to shape it in their image, brought in their cronies. This is human nature, the US didn't invent short sightedness or gullibility, they just exploited and monetized these common flaws in people.


Or you get trump, autocrat corruption without the planning.


> Or you get

That "or" is described one paragraph down. It's the most common type of autocracy actually because it's the easiest to pull off. Incompetent and corrupt leader, access to an army, biggest temptation is for easy profit.

Democracies are very susceptible to this type of leader in the short term. They start as populists and for a while it's easy to fool people into electing them. Until pockets and bellies start to stay empty. When popular support vanishes the army might step in to take that role and it turns into an autocracy.

Successful planned economies need first and foremost a competent leader who's not tempted by short term personal gain but mainly long term gains for the country. They're rare as hen's teeth.


>Democracies are very susceptible

Some democracies for sure, having a US style president makes it much easier.

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


You can get those in a democracy too!

The real difference is how can you get rid of those


Did you forget about what happened with Hong Kong?


(throwaway for this comment)

I see this question a lot and as someone who has traveled to and sometimes lived in Hong Kong for the past 20 years, the truth is on a day-to-day level, there isn’t really much change.

I’m sure if you’re an activist there are huge changes. But as a regular person, life feels the same (even my local and expat friends feel this way).

Also one thing to be clear about is Hong Kong never had a democracy. The governor was always appointed by the UK. It was only when the handover was certain, the UK tried to introduce voting. The UK also tried to pressure Portugal to stop giving citizenship to the people of Macau, because the UK didn’t want to do the same for Hongkongers.


He's probably forbidden from speaking about it.


The eradication of democracy in HK is extremely sad, but unfortunately it was only ever leased from China and the UK did not have a sound basis in international law for not handing it back.


> it was only ever leased from China

Only part of Hong Kong, the New Territories, was leased from China. Hong Kong Island and Kowloon were ceded to the UK in perpetuality.

The UK didn't have to give them back but it also didn't have a reliable fresh water supply for such a large city that didn't depend on mainland China.


Ceded at gunpoint. When might makes right, it makes sense China would try to get it back when strong enough.


The same is true for Vladivostok but Xi seems pretty relaxed about that.


Ah, so international law matters? In that case, surely China will follow the verdict of the South China Sea Arbitration?


No, because PCA ruling is lawfare and not international law.

PRC is legally fully compliant with her UNCLOS accession obligations.


That's selection bias. China was "lucky" to had the best strategy. But what about the dictatorships who stocked to the wrong strategy.

Though it is still interesting to research about Industry politics. In Europe almost all economics looked trapped into the capitalism Vs socialism trap.


It also makes feedback illegal, so corruption and bad decisions get unfixed, untill both not only eat any gains but make the whole thing collapse.


Its complicated... You can't function without feedback. Imagine you have a pothole, a 0 feedback society would tell you that the contractor the government selected is perfect and there are no pot holes in ba sing se. If you actually go to china you would find that roads are genuinely pothole-free. Obviously there are feedback channels. You can't run a country with zero feedback. China knows this and they monitor a lot of things. There are channels (like they have online petition platforms, 12345 hotline - organised demonstrations are not allowed). Theres also a whole industry around gathering metrics from citizen surveys and online studies. Every government program is measured carefully and methodically. Is it democratic in the western sense? no. Will you get killed for reporting a pothole or flaw? Absolutely not.


Yeah but China have death penalty for corruption while Trump literally selling subscription for faster tweet access


There is also some indirect bonus: if people's healthcare is not tied to their employer then it's easier to look for a new one. Also if the system is done well, then many companies would lose the incentives they currently have for not giving full-time employment.


Called visual snow. Many people who suffer from it also have tinnitus.

And they're not "floaters" but look like old school TV statics. Easier to see over plain color (blue sky, night time etc.).

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


Visual snow is different from floaters, though.


Floaters are protein debris flakes literally floating in the fluid of your eyeballs. They're not neurological. They become most noticable when moving your eyes. And over time their appearance changes as they slowly migrate, often times going in and out of focus.


You're right, but not everyone can tell the difference and not everyone can describe their experiences very well. There's also the blue field entoptic phenomenon (white blood cells!), and a bunch of similar things within the eye which can look similar to "floaters".


Having both floaters and visual snow, there is absolutely no way anyone would ever mix them up, though. Incredibly different experience.


> the internet was being built around non-fiction

I guess you don't tread the same internet waters.

https://www.royalroad.com/home https://archiveofourown.org/ and the good old link rings like https://topwebfiction.com/


https://fanfiction.net/ https://forums.spacebattles.com/ https://forums.sufficientvelocity.com/ https://questden.org/ and of course usenet before it. the internet was always built around fiction.


You forgot questionable questing

https://forum.questionablequesting.com/


I mean I didn't want to link the pornfic site lol. I didn't link asstr either.


Questionable questing came out of SpaceBattles/Sufficient Velocity during one of their schisms.


Yeah from a perspective of grouping it definitely belongs in the SB/SV/QQ list.

From a perspective of should I link unsuspecting people to a site with a SFW section that can be described as 'vestigial', or maybe 'decorative', I thought "better not." :)


Give https://storywatch.org a try...I am trying to recreate some of the old school web fiction link rings.


Wattpads also been around for nearly 20 years as well.


They went full corporate. Naver (Korean manhwa conglomerate) bought them.


i know, i'm being a bit emotional here, ha

i'm mostly reacting to the default thing that people scroll are reddit, facebook, instagram, ahem hn

which are all non-fiction... i wanted to build something easy to scroll in line at the grocery store that was fiction


I think the dissonance you’re running into here is that places like Reddit are not monolithic. Saying Reddit, basically a very large collection of user submitted writing, is _entirely_ non-fiction is not correct and ignores years of short stories, web serials, fanfiction, role playing, story telling, and all manner of creative fictional writing. I’d wager to say the bulk of such work on the internet exists under the Reddit umbrella, or is at a minimum cross-posted there.


Many items on those are fiction. Some even intentionally so.


Also LinkedIn, Reddit, most Substack, large chunks of HN…


These days Patreon is another big platform


> Don't reinvent a type system

I'd like to add: stay away from using arrays and user defined types. They feel like a good idea at first, but will become a problem when using fetched data in your code.

And another miss, if you're managing your servers: pgtune. The default postgres configuration is very conservative regarding resources so you can get good performance gains just by adjusting them to your server specifications.


Agreed. Jsonb is the only thing I'll use, and that's only if I'm getting/setting the whole col at once, not doing SQL that goes into the payload.


> “you can’t do crimes on our servers”, “you can’t host malware on our servers”

So most of the cryptocurrency projects.


> I'll spin up a "quality pass" agent that will make sure all tests/lint etc. pass

Why would you need an agent more than one time to create a script then use one command to launch it? What's the added value of the agent there?


The quality pass:

1. Merges in the dev branch

2. runs the various tests and static checks

3. Fixes any small issues with the context of what was fixed on this branch

4. Stops and reports if there's any major issues

Or

5. Handles the merge back to dev if all is green.


I'd like to add: pgbench? Why not HammerDB?


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

Search: