Even if you could, Linus Torvalds is not a fan of the v3 license.
Why not?
Even if you could, Linus Torvalds is not a fan of the v3 license.
Why not?
The Free Software Foundation explicitly forbade tivoization in version 3 of the GNU General Public License. However, although version 3 has been adopted by many software projects, the authors of the Linux kernel have notably declined to move from version 2 to version 3.
How come Linux doesn’t use GPL v3?
I wouldn’t say it’s truly decentralised in its current state.
Should the government collect taxes on the buoyant times but then refund them during market downturns? That would be a nightmare. No government wants to be on the hook for refunds during a downturn.
AFAIK Danish tax on stock gains/losses works like this. Stock gains are heavily taxed while stock losses give you a tax rebate.
That would only fix the community for your own instance (and your instance would be out of sync with other instances). This is not a viable solution.
It’s funny how it used to be expensive. In Danish we have a saying to say someone is poor if “they can’t even afford salt for their egg”, as if an egg is cheaper than salt. Because it actually used to be that way.
One more vote for using WASM. Using WASM has the benefit of allowing the user to use almost whatever language they want, as long as it can compile to WASM. So the user doesn’t have to learn some bespoke scripting-specific language.
Definitely let go. Rust has some OOP features, but it’s mostly just the OOP idea of interfaces, which Rust models with traits. You can also do dynamic dispatch, which is another OOP feature, but you should almost never use this in Rust unless you absolutely have to. Then there’s encapsulation which is hugely important in Rust too, but yea outside of that kind of thing, I don’t think OOP patterns are too useful. Honestly, if you ask me, many of these “OOP patterns” are really just solving problems that OOP causes in the first place.
Feel free to ask any other questions.
Thanks for explaining further, it’s a lot clearer now what you want to do. And no, I don’t think this DAO thing is idiomatic for Rust and you probably don’t want to do it like that. I’m not familiar with the pattern though, I’m not too much into OOP myself.
Anyways, I’ve worked a lot with axum and sqlx before so I can tell you what I’d do.
I am writing an axum backend which (like other backends) needs to do stuff in the database. As some endpoints update the database (and sometimes over multiple sql statements) I want to pass around the transaction as this embodies the connection I am using to update the database.
This makes sense. You just want a database connection pool (sqlx provides this) in your axum state so your handlers can get connections to the database.
To separate the axum stuff (parameters, urls and whatnot) from the actual database logic, I’ve first pulled out all the database interactions into separate functions. Because those functions are logically groups (e.g. stuff happening with invoices, others with contacts etc), I thought it was a good idea to create a “dao” struct (and agreed: my OO brain kicked in here which might be debatable). This would group the interactions for each logical domain into a short-lived data access struct.
Again, not sure what this DAO struct actually entails, but what I would do and have done in the past is just do exactly what you said before: “I want to pass around the transaction”. So I would make my functions take the Transaction
struct from sqlx (IIRC it has some type parameters and a life time but you can use a type alias to make it less verbose) and then I would just use that transaction in the function to call SQL. If you have a function that needs access to the database but doesn’t need a transaction, you can just use a plain connection instead of a transaction.
To prevent passing around the transaction/connection, i wanted to pass that along during construction
I’m not sure what you mean with “pass along during construction” but in any case, why do you want to avoid passing the transaction/connection? I feel like that is exactly what you should do. That is what you need to do anyway. Rust favours explicitness and you need to pass the transaction/connection to functions for them to use it, so just pass it.
That’s not what I said. Read about the XY problem and then come back and explain what you actually want to achieve, and give some more information like code examples.
This screams of XY problem. You’ve gotten a new problem from using this method and you’re asking for help for that, but probably there is an underlying better solution that solves your actual use case without running into this problem at all.
Yea it’s cool. Although, regarding sublinks, it really looks like the project has stalled.
It doesn’t really help for me, but the beauty of the fediverse is that it doesn’t have to. You can like PieFed, I can prefer Lemmy and we can both still talk :)
On the other hand, it has some weirdly opinionated features:
For me this is the matrix sequels and Indiana Jones 4. All of them are absolutely fantastic.
It creates circles of like-minded people where it is really easy to reject “other” thoughts and accept “our” ideas without much questioning.
I know it sounds counter-intuitive, but there is an argument to be made that we should actually go back to smaller, more secluded forums on the internet that are less connected with outside views.
That’s a highly specific comm though and most instances/comms would not be okay losing the history. You also inevitably stunt growth and lose some users during such a migration. It would be much better if ActivityPub allowed an instance to change its underlying representation, while keeping all the users and post and data but unfortunately this is basically impossible.
Hmm okay. I do think we have something similar here where there might be meetings that we call “citizen meetings” where anyone is invited to come and hear about a current political topic. It’s mostly informative and people can ask questions and stuff, not related to campaigning or elections mostly I would say. So yea I don’t think that is too weird honestly.
What do all you guys use these setups for?