This may not be directly apparent to "typical" HN crowd, but PHP is having a quiet renaissance, thanks in part to a standardization of tools and processes, a more mature ecosystem (Laravel has been a huge factor here) plus the performance improvements since PHP 7.
I didn't know about this until a while back, I was at a meetup. Casually talking to other JS developers, I mentioned off-hand how I had written PHP was back in like 2010-2012. Started talking shit about the language and a guy behind me called me out and went on a long spiel about how great it has become.
Now that file-based routing is making a comeback (https://enhance.dev), it would be interesting (and hilarious) to see it come full circle and we all go back to writing SSR with PHP.
It is having quite the renaissance. Unfortunately, a lot of long standing PHP code bases remain vanilla with globals everywhere are bad practices. Nothing wrong with vanilla PHP, but it really starts to limit what you can get done when you have a very transaction script[1] oriented code base and there are no good abstractions and layers.
I'd say the issue isn't PHP (8.1 is actually packing a ton of awesome features), but more so old PHP programming practices that are still very prevalent.
Would you say it's similar to the problems that modern c++ has with older (pre c++-11 even) code? I quite like modern c++ and use it along with rust, but haven't done a lot with older code bases (my definition being before the c++11 standard became commonplace) . We enforce it at work, although we have a few c libraries in the mix, that we plan on "rewriting" when "we" get the chance (I don't see that happening :) ) . Just curious. I have done nothing in php other than a couple of silly examples and setting up a couple servers to use wordpress.
This is a lot of what I'm seeing. You can write a nice, pleasant application with laravelle, but so many of the existing PHP developers don't write code like that. They use the horrible practices that they started with. I don't know how the PHP community is going to overcome this, and failure to will hurt adoption.
I mean, the same is true of javascript, part and parcel of having a low barrier to entry is that people who put low effort into their work can use it...
As to how we're sorting that; pretty much the only major project I can think of that I'd describe as "actively legacy" in its codebase/style is WordPress, and that's a hairy discussion around moving forward vs. backwards compatibility of their plugin/theme ecosystem which is their primary USP.
Practically every other serious project has moved to the composer/PSR-4 autoloading model, and a lot of them also make use of static analysis/linting tools to squash potential bugs and enforce standards.
If you're a web dev company that values maintainable code you can weed out these legacy slapdashers in recruiting.
And those legacy projects out in the wild? Not my concern until someone brings one to us saying they want x feature added, we point out the Y,Z and Q faults / security issues with their slapdash code, and negotiate a price on a sane rebuild that'll be maintainable going forward.
It may be a bit of mess, but it's being made better little by little each day, and the naysayers can complain about PHP all they want, I'm still getting paid to write PHP.
I think the sticking power of languages like PHP, Java and the like are chronically underestimated. They may not be growing as fast as ${LANGUAGE}, but they sure aren't going away either. The benefit of having a stable and mature ecosystem to can't be overstated.
You can probably in general estimate the expected lifetime of a language to be at twice as long as it has currently existed.
as an ASP Classic then ASP.Net developer of nearly 20 years, I know I've never wanted for a job/gig/contract/whatever. C# and ASP.Net aren't sexy, but they are staples in the corporate world.
I think the parent is just saying that Laravel has a lot to do with PHP's renaissance. Codeigniter 4 was a complete rewrite to bring it up to modern PHP standards. I haven't used it, but I hear it's quite good.
Any good summaries of what's been happening or background on the renaissance, I used to do some PHP. Mainly Python now, but PHP even in its old incarnation I had a sort of love for its idiosyncrasies
Also likewise to the team, kudos to the people who built Castopod
OTOH, I'd say language changes/improvements, PSR, the tooling of course (Composer/Packagist, tons of CLI tools), the frameworks (Laravel or Symfony, with CakePHP & CodeIgniter still rocking, also micro-frameworks like Slim/Lumen), the libraries (Symfony components, FriendsOfPHP, thephpleague.com), debugging (PHPStan, Phan, Psalm, PHP Insights), refactoring (PHP CS Fixer, PHP_CodeSniffer, Rector), async/event driven (Open Swoole, ReactPHP).
On Linux, production multi-PHP deployment is dead-simple thanks to the excellent DEB.SURY.ORG (for DEB based distros) and REMI (for RPM based distros) repos. It's also more common to deploy PHP via PHP-FPM and Nginx nowadays. Homebrew does a decent job on macOS too, multi-PHP deployment is also easy when coupled with Nginx/PHP-FPM. For Windows I have no idea but as long as you got XAMPP and MAMP, well :) Lots of Docker based solutions too like LocalWP (not just for WP), Lando, Laragon, DDEV to name a few.
There's also excellent support in editors/IDEs, either by default (in JetBrain's PHPStorm, Nova, KDevelop or Kate Editor) or via plugins for VSCode, Sublime Text, Atom and others.
Being use PHP when it was Personal Home Page, also dropped out since PHP5 to node and now deno. Wonder what changed in 7 that makes it worth at look again now days.
7 brought a huge speed boost. (typically 100% or more without any code change required).
Not specific to 7, but 2 things I think have helped a lot are:
* PSR standards
* composer packaging
Initial PSR work helped define some package interop standards. I'm not sure how useful ongoing PSR work today is (no doubt there's some incremental benefits?).
Composer is a great package manager, and helped usher in a lot more sharing/reusability of common components.
Laravel bundles a number of Symfony components, for example (many frameworks do).
The speed alone in 7 was big, and we've seen some more incremental improvments in 8 and 8.1 and 8.2. It's hard to find current benchmarking tools that compare the 5 series with 7 and 8. I found one showing 5->7 on a mandelbrot run.
* PHP 5.0 was 251s
* PHP 5.1 was 87s
* PHP 5.6 was 29s
* PHP 7.0 was 15s
* PHP 7.1 was 9s
The 'experimental JIT' work (at that time) yielded 4s.
That benchmark was from 2016, so... way out of date now, but other numbers I've seen were 7.1->7.4 was another ... 10% improvement on average, and depending on workload, you might see another 10-20% improvement from 7.4->8.0.
Kinsta has some interesting useful benchmarks on 'real world' apps
You're welcome. Much of the speed bump in 7 came from reworking internal memory usage and allocation. A pointer for an array entry used to be 128 bytes - each array entry had a 128 byte overhead. It was reworked and refactored down to... 42? or 44? You can probably imagine the impact that might have on memory allocation.
It’s just a pity it has to be Laravel, which is riddled with magic, bad practices, hardly - if at all - typed code, and little inefficiencies everywhere you care to take a look. Compared to Symfony, it’s a dirty, steaming, mess.
That’s not to say you can’t build great things on Laravel, and it’s undeniably sparking lots of creativity - I just wish the better competitor had won. Betamax all over again.
Symfony may be technically better but Laravel won because Taylor is a genius at creating a community and I personally feel that the "magic" of Laravel is what made it easier for devs that needed lower barrier to entry. Then an entire ecosystem was created like "laravel Forge" (to manage servers) and many others including even serverless PHP using Laravel Vapor.
Lately though, I am beginning to get annoyed with Laravel due to way too many breaking changes with major releases literally within months and definitely a bit exhausted trying to keep up. I understand they are going full scale modernized approach but after Laravel 6, it has been too many major releases.
I am aware of that as we use Laravel heavily at my company. It depends on how you define "win". Laravel won as in getting the adoption by developers due to its ecosystem and low barrier to entry. Symfony is more component based (powerful) but you need to put it all together which is a bit more work.
I personally love Symfony even though it was a lot easier to start and go to market with Laravel.
I abandoned PHP in 2013 for Go.
Never looked back.
Sometimes I have to fix PHP code, I hate it every time.
I can't take PHP seriously.
When ever I see a project advertised that's written in PHP I never consider it. It's like spam mails.
Performance matters and PHP doesn't perform, not compared to Go.
That's one reason, the other was the absolute stupidity of the PHP crowd.
Their new dogma and wrong paradigms applied to the language.
Symfony is god awful, it's slow to develop with, performs awfully, dependency hell, overly complicated without reason.
I had to rewrite 3 sites, 1 is still left to do, in Go because there is no upgrade path to current versions. Major security issues. Do I have to run PHP7.3 with manual fixes and Symfony 2.3. I can't upgrade, I have to rewrite from scratch, and because of that I'm doing it with Go.
Worst decision ever to use Symfony.
And the arrogance of this Stof guy, stubborn but full of himself.
And his work had so many security issues.
The whole OO fetish back in 2013 with Java methodology with the sheep crowd killed PHP for me.
I actually loved the language for its simplicity, I came from C++ in 2001 and loved it.
In 2010-2013 it became a monster.
Clueless students repeating stuff they learned somewhere, stupid people really
I've been using Castopod for over a year. I deployed it for my podcast using https://linode.com on Debian after my last web host lost my data in some sort of internal mistake (or rogue-employee deletion). I used the experience as a chance to learn some server administration and to "self-host" our own show.
It's been a great experience. The developers and community is active on Discord (before that, I had only used irc and webchat) and they are always willing to help. The software is always getting new podcasting 2.0 features and actually feels exiting again, similar to podcasting circa 2004.
Adam Curry seems to have coined it. He pushed out a bunch of RSS extensions in recent years and called it "Podcasting 2.0" but they are very "we had a podcasting wishlist and wrote a spec" and not very "we wanted to make something with a high chance of adoption". 99% or more of podcast listens are made through an app which supports zero "Podcasting 2.0" features, and listeners are not clamoring for the ability to use them.
I'm a little surprised that Podcasting 2.0 isn't more well known here on HN. It includes a lot of the popular concepts like decentralization, cryptocurrency, alternative uses of distribution (IPFS) and Dave Jones seems to be writing all of his new sub-projects in Rust... what buzzwords am I missing?
This may cause some issue with Castro Podcasts app on iOS which may feel the name is too similar. I know I was confused and was wondering why they would have open-sourced this.
Great work though, don’t mean to detract from any of the hard work on the platform, and naming things is hard.
Which client do you use to subscribe and listen to podcasts?
I am a fan of BeyondPod which has a great automatic sorting feature, but dev seems stalled. Thanks!
Started using it when other tools didn't have all the features that I need. I settled down and never compared tools any more.
My only problem with it is that some podcasts take a little to appear in its platform and nobody makes links for it. I'd like a single source of all podcasts.
I really want to rely solely on Podverse on Android but I end up using AntennaPod because of the feature to use a local folder as a pseudo podcast feed. That combined with NewPipe's ability to pull down just the audio track from a YouTube video means that for content published to YouTube where the video provides nothing of value I can pull that down directly into a podcast client and listen as though the content were published as a podcast (like it should have been in the first place). If Podverse has this ability I don't know about it... I should ping Mitch and find out/put in a feature request!
Just the normal Podcasts app on iOS. It was good and then they broke it and it sucked but they've made it usable again… though the UI is still a confusing mess. I don't think anyone who develops that app at Apple is dogfooding it, at least not anyone in charge of its UI.
I've considered trying others now and then, but since they usually came down to paying a fee to find and resubscribe to all of the podcasts I'm already subscribed to, I could never get over the hump and switch to one full time.
There's an app on iOS called 'Sodes which is pretty good. Its the first one I found while browsing that supports 2x playback and actually lets you add podcasts by RSS feed rather than being limited to their curated list of podcasts.
I've been using Overcast (iOS) since it launched. Marco has done a lot of work with his Smart Speed and Voice Boost features over the years and they're a core part of what keeps me using the app.
What is a "listen-to-click" ad? I can't find a definition of what it actually is anywhere. Google returns either javascript click event stuff, suspicious youtube videos, or the vague Ad Aures page.
>Get all the insights of your podcasts and episodes following the market standard with IABv2 guidelines. All of the gathered data is anonymized, with respect for your listeners' rights and in conformity with GDPR, CCPA and LGPD laws.
The first half of this would imply that the second half is a lie...
what do you mean, https://github.com/ad-aures/castopod states the license as AGPL which is just as FOSS as any other project to the likes or mastodon or peertube.
how does it matter there is an advertising company paying for the project as long as the code is open for scrutiny and is a FOSS project?
the likes of amazon and amd and even adobe is funding blender so does that mean those projects are ruined by corporate money?
https://fund.blender.org/
Chromium is under a BSD license, explicitly allowing Google to build a proprietary product on top that siphoning all the users' data to make money off of it and influence where the http world goes.
The product here is under a Copyleft license. Any derivative is at the service of humanity at large, today and tomorrow. It is much harder to exploit people this way.
Open Source has never served the users, it has always been about the editors. A Copyleft license is a good way just like a public institution at the helm is.
Google could build a proprietary service on top of an AGPL Chromium. All they would have to do is either not accept external contributions (they already sponsor most if not all of the development anyway) or require contributions to sign a CLA to give them the copyright to it (they already require you to sign that anyway)
The scenario the GP outlines is one where Google is the sole licensor of Chromium. They could then build proprietary (or whatever!) versions of that however they liked, since they'd have copyright to the whole thing.
If Chromium were AGPL they couldn't build a proprietary service. They couldn't even build a service that earns them money but can't be copy pasted as-is by anyone else such that it would earn money to someone else. That's the whole point. If one benefits, everyone benefits
The point is that if you have the copyright to a project and you release it as AGPL, it has absolutely no affect on what you can do with it. You can also relicense it to others and tell them they don't have to follow AGPL either.
So if Chromium were AGPL, Google could do anything they felt like doing with it, just like now. Google just wouldn't be able to keep anybody else from doing stuff with it for versions that they released under AGPL, as long as those people didn't violate it.
also the way google dumps code is also a factor, is it going to be repo where we can keep track of the whole development process, or just a code dump every once in a while.
To be fair, I think that what we are seeing happening to Chromium has little to do with it being open source and more with the fact that it has essentially become the de facto web browser. If google released an entirely rewritten and closed-source version of Chrome tomorrow, 95% of the people would not bat an eye and keep using it.
Corporations contributing to FOSS have agenda, but so have individuals. Being open source isn’t everything, but it is a damn good start.
So GP would be justified in preferring the FOSS solution if it meets their technical requirements vs the commercial OSS solution because at one point they could be the only option and abuse that network effect / monopoly.
My point was it's who is developing the software because it takes effort for another maintainer to step up and it doesn't always happen. Also if a commercial company digs a big enough moat with the open source product they could abuse it, so do you trust them now?
Similar to Google abusing Chromium, Castopod could one day be in that position if you don't support FOSS alternatives today. That would be the mindset to put yourself in.
That being said, I don't think it matters as much as the browser space, but I'm not in the podcast community. I could see though that it could potentially be very costly to have a monopoly for podcast hosting, but currently that's Spotify right?
Note: I have no preference here, just assuming what motivates GP's preference.
I think the first paragraph captures the core of the issue: which solution best meets their requirements. I don’t have a podcast (yet!), but it seems like the two projects don’t have the exact same feature set.
Isn’t it the beauty of open source that you and I are able to take that project and make it “better”? That we are able to maintain it with our time and energy?
The mindset of “FOSS or nothing” (FOSS in the sense of “not supported by corporate interests”) is noble but also a little bit naive. Nothing is free, and even the greatest FOSS projects rely on corporate and individual contributions (monetary or otherwise). I think that wholesale dismissing an (F)OSS product because it is backed by a commercial company is just showing them that the alternative (closed source software) is the more sensible choice.
Chrome-imium did not become the default because it was open-source and no other better “FOSS” alternatives were available, it did because it has relentlessly been pushed to users on the single most visited webpage in the world for years. If you and I did not use Chrome (which we probably both don’t, I’ll allow to infer from your stance), Chrome would still be the de facto browser today. Is this better than another “strictly” FOSS browser being the de facto default? No. Is it better than a closed source browser (Netscape or IE) being the de facto browser? Definitely, at least we could/can fork it.
>Castopod could one day be in that position if you don't support FOSS alternatives today. That would be the mindset to put yourself in.
they can't turn an AGPL license code into proprietary one. Open source and FOSS are similar but ideologically different beasts.
One gives the downstream developer to decide the license of their work, including the ability of allowing them to turn it into proprietary code while FOSS forces all code to be foss and never proprietary
>Similar to Google abusing Chromium
chromium is under BSD while this is under AGPL. there is a world of difference between these two licenses. One allows proprietary forks while another forbids it.
Or we can let the enemy's own resources contribute to their demise. Let Google work on Chromium, but use the browsers that take the engine and do the things that are in our interests. Brave is not implementing v3.
Brave isn't implementing v3 immediately, but Chromium is their upstream and I haven't seen them claim they will be able to resist indefinitely. They have their own non-extension adblocker for which v3/no-v3 is irrelevant.
The tweet you're referring to in the GP simply says "Brave will support Manifest V2 extensions such as uBlock Origin even after Chrome stops doing so". Which would be true statement even if that support only lasts for a day after Chrome stops supporting V2. That is to say, this does not look like a guarantee of indefinite support by any means, but rather extended support (for an undetermined amount of time).
Instead of getting attached to semantics, how about looking at it from the perspective of business and economics?
If your business depends on the idea that Big Tech can not track you, you need to do whatever it takes to keep it a reality. The cost of supporting a fork of Chromium might be too much when you are starting out, but when you are already a company of 100+ employees and 60M+ MAU, it becomes acceptable.
So, yes, if I had to guess with the information currently available, I'd say that Brave will keep away from v2 as long as it possible and as long ad the user base shows that this is what they want from their browser.
But Brave does, as mentioned before, have their own built-in adblocker (based in part on uBlock Origin), which doesn't depend on extension features. uBlock Origin does still have some additional functionality that the built-in "Shields" don't, but mostly it's not dissimilar. So, given that an ad-blocking experience on Brave doesn't depend on extensions entirely in the first place, I would think that would be a business/econ reason why they may not want to divert lots of resources into maintaining v2.
(Not sure where 'semantics' came from in the first place here.)
Returning HTML code in a render function is even pretty standard, I've seen this in Python / Flask too.
Judging code quality is hard, it seems to me the best clue is how it is easy to add new features / do refactors without breaking things, not how you feel about PHP and HTML being mixed.
Looks like a mess with code cutting and pasting HTML together, escaping things without a clear plan. That’s a sign of a million security problems waiting to happen.
Kudos to the folks who built Castopod.