• 0 Posts
  • 15 Comments
Joined 1Y ago
cake
Cake day: Jun 17, 2023

help-circle
rss

There is a small “print this book” link in the top corner next to the github link that can save as a PDF. Might not give you the nicest page layout but hell, it is free. And free to read online, and free to read offline with rustup docs --book.


Flow control like return and break work differently in async blocks. They are much closer to closures than blocks in this regard. And need to be as they are lazily evaluated (like closures) and may even be evaluated well after the code that contains them has finished.


Looks like it is now failing on the SQL fmt checks - which you have not changed and so are likely a problem in master. Seems https://github.com/LemmyNet/lemmy/pull/3800 fixes that issue and you are likely going to need to wait for that to be merged first. Or otherwise talk to the maintainers about it since it is broken in master and there is aPR to fix the issue.


Looks to be failing a cargo fmt check: https://woodpecker.join-lemmy.org/repos/129/pipeline/1821/8

+ cargo +nightly-2023-07-10 fmt -- --check
Diff in /woodpecker/src/github.com/LemmyNet/lemmy/crates/utils/src/rate_limit/mod.rs at line 224:
 use std::sync::atomic::{AtomicUsize, Ordering};
 static CONCURRENT_API_USE: AtomicUsize = AtomicUsize::new(0);
 
-
 impl<s> Service for RateLimitedMiddleware<s>
 where
   S: Service + 'static,

If I read that right you have one extra blank new line that the nightly rust fmt is not happy about.

You should just need to run cargo fmt on the code, might need the same nightly version as above though.</s></s>


The JVM languages are extremely versatile and capable of doing anything

You can say this about any mainstream language. So it does not really mean much on its own. Technically speaking all mainstream languages are equally powerful (them all being Turing complete), so the only real question is how easy/hard they make particular things that you might want to do and things you should avoid doing. Personally I do find rust strikes this balance best over all the languages I have tried.


And that is what it comes down to - binaries vs libraries. For a binary GPL is not that much of a problem for corporations, they can still work with it without giving up their propriety code they ship with it. But for a library, that would force them to give up everything which is a step too far for most corporations. If a language used GPL licences for the majority of their library code then it would basically discourage corporations from using those libraries - and without libraries how much use is a general purpose language?

then we’ll forever be stuck in a world of companies actively blocking the spread of knowledge, selling us software filled with DRM and proprietary software, making insane profits

I don’t think we would. Remember, rust and go are both languages written by corporations, with a large number of libraries written by people working for those corporations with most of the libraries still being open source under permissive licences. If the GPL did not exist would that change anything here? And the same goes for NPM, and python packages and a lot of other popular languages. Corporations do give back to these projects, quite a lot, much more than pure volunteers at any rate. Yet they don’t need to given the MIT/BSD licences, they still do.

Now, some companies do leach far more then they give back. But that does not diminish the amount that companies overall have given to the OSS world.

I don’t think it’s fair and GPL may not be solution for all the problems, but what else it to be done?

There are instances where it is unfair. And those instances the GPL does not actually help as much as you think. Like the amazon profiting off offering elastic search as a service without giving much back to the project. If they have not made any major changes to the code base they are well within their rights to sell it as a service under the GPL. Hell, they don’t even need to share changes they do make unless they start distributing the binaries - which does not happen when offering it as a hosted service.

And you wont stop behaviour like this from the greedy corporations with some copyleft licence IMO - if what you make is popular and has a licence that stops them from using it then they have the resources and reach to create a competitor that out classes your solution. Licences wont solve that problem at all, that is just an inherit flaw with the capitalistic world we live in. Copyleft licences are just a band aid over that real problem so there is only so much they can really do, and which is further weakened by the cost of trying to enforce the license. Without the FSF which is another corporation fighting on the behalf of individuals, the GPL would not be worth anything, a licence is only as valuable as your ability to enforce it.

So really, the whole system is just broken. But even in this broken system, permissive licences don’t get abused nearly as much as they could be. Corporations have realised there is some value in having multiple others maintain common tools and libraries they use to build things. And so they continue to invest in OSS projects (more and more in recent years compared to the earlier days).


A store, as in a place to store or accumulate things. Not as in shop, a place to buy things. Seems like it is still applicable here.


it is currently maintained by someone with an official affiliation of director at Mozilla corp.

So, the person that started it as a hobby got hired at a relevant field? That in of its self does not mean much. Most people that work on OSS technology are funded in some form by a company. Very very few people are funded by purely by the community or have an unrelated job and everyone needs to earn a living to eat. And it is not uncommon to get hired for the work you have done in your spare time, even if that work never gets used by the company.

This is not an uncommon story overall.


You should be specific then, you only said modern appstores which does include those I mentioned. So while some appstores are incompatible with the GPL that does not include all modern appstores. Fairly sure googles appstore has some GPL stuff on it? Not sure about microsofts. All depends on their license. IMO best not to assume everyone is as restrictive as Apple is.


However, it’s still definitely not proportionate to the value that the community contributes back and basically gives to the corporations for free with most of them packaging these libraries and binaries and selling their software for much higher profit without ever contributing anything back.

I think you massively underestimate how much corporations contribute to OSS technology. Even the linux kernel has over 80% of contributions being from people paid to do so:

The number of paid developers is on the rise, as companies aggressively recruit top Linux talent. More than 80 percent of kernel development is done by developers who are being paid for their work. Volunteer developers tend not to stay that way for long.

https://www.linuxfoundation.org/press/press-release/the-linux-foundation-releases-linux-development-report

If you removed all that support, and everything RedHat, Canonical etc have done then the Linux land scape would be baron today. Hell even Debian is basically backed by corporate sponsors to fund their work.

And after all of that, if corporations did not use Linux or any OSS projects at all then there would be far fewer people getting introduced to it at work, then wanting to contribute back in their spare time.

So even if companies take far more then they give back, they also give back far more than people doing it for the love of the software. And while some companies might be much more of a leach off what OSS provides, overall corporations give a lot back to the OSS movement.

the MIT and Apache 2.0 licenses became the de facto standard, and that was without much pressure from the big corporations, though rust has its origins under the umbrella of Mozilla so it’s not that surprising given this context.

There is actually a big pressure here, libraries under the GPL are very toxic to companies (binaries, like the kernel, much less so). If you base an entire core of a languages library under the GPL then no major company would ever touch that language. This would basically doom the language to a forever niche language. All major languages have a huge amount contributed to them via companies - most having been created by companies to begin with. Most of the popular libraries are written by people who are hired to write in that language and write these things if not while they are being paid to do so then because they might want to use the libraries during their jobs.

The LGPL might have mitigated this a bit, but companies are still wary of it. And every barrier put up would stunt the languages growth.

We live in a world dominated by corporations and what they do - volunteer effort (while still valuable) is just a drop in the ocean. A software license wont change this, but can have dramatic consequences on your product depending on what it is you are developing. And the GPL is not always the right choice for a project, especially a library.


That only talks about the Apple app store licence. Not App stores in general. All depends on the licence they impose on the apps. Flatpak, snap, flathub for instance are all app stores that distrabute lots of opensource code, some of which if GPL.


Does anyone else see this or am I just too paranoid ?

IMO you are being paranoid. Corporations don’t care about these utilities. They can build stuff using coreutils under the GPL without major issue. Unless they modify the source of the coreutils its self they don’t have to share anything. So it does not really matter what license it is under. And really these tools are extremely basic - not exactly hard to rewrite any of them from scratch if required (as prof of all the different implementations out there, like this and busybox to name two).

I highly doubt these are sponsored by any big corp, just hobbyists/students that think it is interesting project to undertake that don’t care as much about the GPL as much as they care about doing something interesting to them.


That is because GPL libraries are a pain for corporations. And popular languages like rust are built by corporations and a lot of the libraries for them are built by corporations. Rust would not be the same language as it is today without their contributions. If it were all GPL far few companies would want to use it so far fewer developers would be able to use it which would stunt its popularity. This is also true of python libraries and npm libraries which are mostly under permissive licences.


I do wonder how it would hold up on court to basically clone something by rewriting it in a different programming language and then relicense it.

I believe that the US court has already rules that programming APIs are not copyrightable - only the implementation is. So a rewrite of something does not infringe on the original. Though proving you have not copied source from the original is harder - a clean room rewrite is generally preferred for such things (where the authors have not seen the original implementation ever before). I believe the google vs oracle lawsuits over java/openjdk was where the precedence was set. Though I am not a lawyer and could have gotten this wrong.


You are probably looking for a database (possibly an embedded database) that supports a key/value or document store. Using those keywords will let you find things similar to what you are looking for.

But some you might want to look at are:

  1. Surrealdb which will give you a document, relational or graph storage/querying and it also supports embedding in rust application in addition to running as a stand alone service (with multinode support). This is the most flexible option in how you run it and what you can do with this.
  2. Bonsaidb is another document database that can run stand-alone and I think can be embedded as well.
  3. Sled which a simpler embedded key/value store.
  4. Persy which is a embedded key/value storage engine for rust.

Then there is always redis which is the standard key/value store or really data structures as a service solution for most languages and sees a lot of production use. This is stand-alone service only though and cannot be embedded in a rust binary.