1. 28
    1. 3

      Have you looked at supporting other async runtimes along with Tokio, e.g. smol?

      1. 3

        I actually have considered it, it should quite simple to do, will experiment a bit with it after I get some more progress with https://github.com/Nicelocal/mongo-php-async-driver!

      2. 5

        AGPL, so basically you can’t use it without open sourcing your backend that actually uses this.

        Not that it’s a great idea, it’s cool that it exists, but AGPL is a weirdly aggressive license to use.

        1. 29

          What’s bad about it? the author is contributing his/her work to the commons and wants it to be used to further strengthen the community - something he/she cares about. I’m sure for profit companies can afford to hire and actually pay people to do the work for the software they’re selling. If license is an issue, I’m sure the author would be happy to get paid to provide a commercial license.

          Maybe it’s time we stopped normalizing expectation for free labour.

          1. 2

            They can choose whatever license they want and that is their prerogative.

            But that license incidentally means I can never make a closed source anything with it.

            Given how SaaS is defacto closed source this really just means you can never use it in a business context unless its just toys.

            1. 1

              This “I can’t make a closed source anything with it” complaint is the same as complaining you can’t sell Harry Potter ebooks with the DRM stripped, or rip the copyright headers of BSD licensed code and claim it as your own. Yeah, there’s copyright.

              1. 2

                But I can write PHP and Rust without open sourcing it, and I can use most library functions in SaaS backends.

                So in this way: yes, this is an outlier.

              2. 1

                That license incidentally means you can never make money from it for free. You can certainly make an offer to the author for a commercial license and do your closed source anything with it! You can very much use this in business context as well! Problem solved, next!

                This discussion is making me sad. The force of the corporate overlord mindset is too strong. :( I wonder how things would have looked if permissive open source license wasn’t a thing and all libre software had to be separately commercially licensed. Imagine the author of openssl, or curl, or any of the starved and anemic open projects out there being exploited. I’m sure it’d be raining benjamins on these projects! Instead, we’ve got “if you don’t let me use your work for my profit without paying you anything, you’re bad, think about the children!”

                1. 1

                  But that license incidentally means I can never make a closed source anything with it.

                  And you can never link it with anything under a license that is not compatible with AGPLv3. GPLv3 would be incompatible, except that it includes a special clause to make it compatible. Other weak copyleft licenses probably aren’t. Permissive licenses probably are.

                  To actually be sure, you need to check with your lawyer and the fact that AGPL requires redistribution to downstream users means that you can’t just not distribute to avoid needing to talk to lawyers.

              3. 16

                AGPL is a weirdly aggressive license to use.

                The only thing weirdly aggresive is characterizing reciprocity as aggressive. Why do you find “share unto others as I’ve share unto you” aggresive?

                1. 4

                  The only thing weirdly aggresive is characterizing reciprocity as aggressive. Why do you find “share unto others as I’ve share unto you” aggresive?

                  I personally believe (based in a massive body of evidence from sociology and anthropology) that social pressure is more effective than statute at enforcing social norms. Share with others is an ideology that I agree with, strongly support, and would like to see become the social norm. Trying to force sharing is not, I believe, a good way of promoting that as ingrained behaviour.

                  As soon as you force people to do something, their immediate reaction is to try to find ways out of their obligation. I don’t want people to share code because they have been forced to by an army of lawyers, I want them to share code because they believe that it’s a net benefit for them to do so.

                  For a long time, the FSF had the Objective-C support in GCC on their web site as a case study in how GPL enforcement promoted the cause of Free Software. I think it’s gone now because it was actually a fantastic counterexample.

                  NeXT created the Objective-C front end for GCC and shipped it as a binary-only shared library with NeXTSTEP. You could compile your own GCC but didn’t get the Objective-C bits. They thought this was a clever end-run around the GPL, because they didn’t distribute the two parts linked together. The FSF disagreed and forced them to contribute the code. Hurray, GCC got an Objective-C front end.

                  The FSF took that change and merged it with GCC. NeXT maintained their own internal fork and did a code dump on each release. The compiler bits didn’t include the runtime library, so GCC implemented their own. This worked a bit differently (they wanted it to be in C, NeXT had some assembly paths for things that were impossible to implement in C) and so the compiler code grew a load of if (gnu_runtime) or if (next_runtime) paths.

                  NeXT didn’t care about the GCC runtime so never pulled in any changes from upstream into these files. Every code dump had to be manually merged by the people on the GCC side and some of the changes were very hard. FSF GCC wasn’t able to support declared properties for ages as a result.

                  Eventually Apple gave up on GCC and wrote clang. I contributed an abstraction layer early on to clang that let it handle multiple runtimes easily. When Apple added new features, they extended this interface and left ‘not supported on GNU runtimes’ default behaviours. Maintaining feature parity became easy and open source Objective-C with clang supported all of the new features like declared properties, object literals, exceptions, and even automatic reference counting (which is a massive feature, much larger than all of the rest of Objective-C).

                  As a user of Objective-C on Linux and *BSD (and, occasionally, on Solaris), I was left in a far better position by a model where the major contributors to the compiler were collaborators and not adversaries. If you begin a relationship with potential collaborators by treating them as adversaries then you’re going to struggle to make them willing participants in your dream.

                  Similarly, from the opposite direction, Juniper used to just take forks of FreeBSD as the base of JunOS. This was a bit of an engineering disaster because they’d take a new fork for each product, but they eventually managed to have a single version of JunOS in house. They learned that sometimes things upstream would break their stuff. Sometimes upstream would implement the same features as them but in a different way. They grew to work a lot more closely with upstream and contribute a lot of code because it’s cheaper for them if FreeBSD has features that they need. They weren’t compelled to upstream things, they upstreamed things because they saw real value in doing so. They became active participants in the ecosystem, without any compulsion.

                  1. 2

                    Not sure how to frame it, because I agree with the core of your message, but this is not just a bit of code; this is an adapter to fundamentally extend another programming language.

                    Put another way: imagine that integrating a payment providers SDK forced you to open source your entire codebase.

                    Because ultimately that’s what this is: it’s taking two languages with very permissive licenses (it’s very common to use Rust and PHP to make proprietary SaaS backends; but even if they were AGPL licensed it would be fine) and forcing people who use the bridge between them to open source their entire backends that include that bridging software.

                    AGPL applies to all code that uses this bridge, so this is what I consider invasive.

                    Put yet another way (and, to simplify a bit we will stick to GPL): even if a compiler itself was GPL, it would not force the all code that runs though it to be open sourced. However if you were forced by a language to include a GPL logging library: then your program would have to be open sourced under the terms of the GPL; which is what I would (again) consider to be invasive.

                    WIth an AGPL license located where it is in this case: it’s not changes to the code that are forced to be shared alone, it’s anything that includes this code.

                    Sorry, it’s part of my job to read and understand software licenses to protect my company from accidentally being illegal; and yes, I’m fun at parties.

                    1. 1

                      I didn’t think anyone was being forced to use this library. And within the PHP community some of the most significant projects (WordPress, Mediawiki, Drupal) are distributed under a GNU GPL. Picking a strong copyleft for a PHP project seems consistent.

                  2. 6

                    I’m fine with AGPL ideologically, but the problem here is that the PHP license is not GPL compatible (c.f. https://www.gnu.org/licenses/license-list.html#PHP-3.01), which means that any binaries of this project aren’t redistributable.

                    1. 4

                      Mmm yeah this might be problematic at least according to https://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleAlone, switched to the Apache license.

                      1. 1

                        You could use AGPL with an exception to allow linking to PHP.

                    2. 2

                      Looks like it’s been switched to Apache 2.0