onlinepersona

joined 2 years ago
MODERATOR OF
[–] onlinepersona@programming.dev 14 points 2 weeks ago

Beyond concerns about the accuracy of age-assurance technology and the VPN workaround, the new search engine rules will still allow users to access adult content simply by not logging in.

[–] onlinepersona@programming.dev -1 points 2 weeks ago* (last edited 2 weeks ago)

This dude could look at TuxedoComputers and Slimbook. They make good laptops.

Anti Commercial-AI license

[–] onlinepersona@programming.dev 0 points 2 weeks ago (19 children)

What's going on there? MacOS and OSX are counted separately.

Anti Commercial-AI license

[–] onlinepersona@programming.dev 64 points 2 weeks ago (10 children)

That must be a mistake. Are there any Finish people on Lemmy? I'd like to know if they are observing this on the ground, because honestly, if every 4th person had Linux there it would be somewhat visible. Even non-techies in the family or friend circle would mention it or ask about switching to it, or there would be a popular store to buy stuff with linux pre-installed.

Anti Commercial-AI license

And somehow there are people out there that think it's OK for this to happen to games too to then spread misinformation about Stop Killing Games.

Anti Commercial-AI license

[–] onlinepersona@programming.dev 14 points 2 weeks ago* (last edited 2 weeks ago) (4 children)

The Lemmy money is spread across 3 devs or so? And they have been writing it since 2018 or something. It's not surprising that they have more momentum and name recognition.

PieFed is new and on Codeberg. Especially the Codeberg thing, I like. It does lack a CI though. How stable is it?

Anti Commercial-AI license

[–] onlinepersona@programming.dev 2 points 3 weeks ago* (last edited 3 weeks ago)

That tracks. Fuck those big corps. All they want to do is optimise costs.

CC BY-NC-SA 4.0

[–] onlinepersona@programming.dev 1 points 3 weeks ago* (last edited 3 weeks ago)

And Apple. And Amazon. Actually, all the stuff from Magastan.

Anti Commercial-AI license

The Stop Killing Games movement is great because it brought this kind of thing to light. I just hope it will succeed and not just fizzle out after gamers think getting 1M signatures is the end of the road. There is a long battle ahead.

Anti Commercial-AI license

[–] onlinepersona@programming.dev 1 points 3 weeks ago* (last edited 3 weeks ago)

Louis Rossman will cry tears of joy if this gets adopted in its current form. I bet the MAGA cohort and their ilk will do their best to water it down and call it patriotism, then clap when it's either passed as a diluted mess or rejected.

Anti Commercial-AI license

 

It's been a while since picking up rust, but until now, most of what I've written has been CLI tools, proc macro libs, and async networking stuff. Web/application servers have been kept at arm's length while waiting for something to come around like Django.

For those not in the know, Django is a web framework written in Python. It's opinionated, extensive, has many features, and has stellar documentation. It's old too and had major problems taking advantage of (back them) python's new async capabilities as well as "new" technologies like WebSockets. Popular frameworks popped up in the meantime like Flask and FastAPI that do use new technologies and python language features like type hints, however nothing has really come to be quite like Django.

Django's ORM

As usual, there are camps when it comes to this, but I'm in the "keep SQL away from me" or "one language for all" camp. Django's ORM does a mighty fine job of doing so. It's possible to write a django application without ever seeing a line of SQL. It helps me immensely to just think about models, application logic, and presentation.

Django allows defining your models in python, generating and handling database migrations, making complex queries of 1-1, 1-n, m-n relations without an SQL syntax, storing objects, locking rows, optimising queries (again without knowing SQL), and much more.

Queries

My favorite, powerful query simplifications are QuerySet.select_related() and QuerySet.prefetch_related(). An example of Queryset.select_related:

This is useful for a tree of 1-n objects. An example from the documentation: a Book has an author (foreignkey) which is a Person (1-n), with a hometown (foreignkey) that is a City (1-n). An author can have written many books (n-1), a city can have many people (1-n).

Say you wanted to find 10 books from an author that lives in "Marrakesh" with the associated objects (Book, Person, City). In Django that's

# Hits the database with joins to the author and hometown tables.
books = Book.objects
  .filter(author_hometown__name="Marrakesh")
  .select_related("author__hometown")[:10]
book = book[0]
person = book.author  # Doesn't hit the database.
city = person.hometown  # Doesn't hit the database.

QuerySet.prefetch_related() does the same for m-n / many-to-many relationships and some other queries (see doc). No messing around with SQL, just python.

Migrations

The ORM also takes care of generating and managing migrations for you. To me, that's a major plus as it offloads the need for me to think about whether a specific type exists in the DB of choice. Most of the time django will handle it transparently. There are even django extensions / apps to optimise more SQL query generation like adding views, or choosing which index to use for a specific type or table, and so on.

Django's documentation

If I'm not mistaken, it follows the diátaxis method of documentation

diataxis

which fits the project very well and allows getting started with django very easily as well as finding good, low-level, in-depth information quickly. Many projects have documentation but it's everywhere and nowhere in terms of location (where to find specific things) and depth (high-level vs low-level), making it less optimal for beginners and experts alike. If you want to step up your documentation game, do give diátaxis a shot.

What prompted this

I'm currently 3 days into exploring the rust web framework ecosystem and banging my head against it. It's very commendable what people have written in their free time and shared with the world, so I will not disparage any projects here. It would just be really cool if a django-like, batteries-included project started or reached production quality sometime. The closest candidate I found is Cot.

Cot started in June 2024 and is a long way from django's level but has already grown to something quite impressive. If time allowed it and the project weren't on GitHub, and had a matrix chatroom, it would surely get contributions from me. Here's the announcement on the main dev's blog, which reflects some of my frustrations with the current web framework ecosystem in Rust.

Until Cot is ready, I'll probably be using axum for application server, diesel for the DB-glue, and possibly leptos, yew, or just plain Rinja. Unless of course somebody knows of a django-like web framework in rust that isn't on awesome-rust...

Anti Commercial-AI license

 

I've tried watching videos about it, but they are not analysing the reasons. Instead it's just whining about the symptoms and hypocrisy of rich CEOs firing employees then buying a yacht. We all know it's terrible, but my question is "why". "herp derp, capitalism" and "omg, it's the fucking CEOs" doesn't explain anything.

 

As of 2025-03-02, the matrix foundation has not released a single financial report despite being a non-profit.

 

We don't want to deal with the administration required to properly handle donations. If we don't need funding, we won't risk becoming dependent on it. And also: no donations means no expectations. This means that people working on LibreWolf are free to move on to other projects whenever they want.

 

Basically, I'd like to have my own domain e.g onlinepersona@mydomain.com but not go through the hassle of hosting my own email service: I'd like to use another service that handled SPF, DMARC, and whatever else for me, grab the emails from their service using POP, and make it available to my email client on android and Linux using IMAP. SMTP will be through the third party.

This way, if the third party starts doing some bullshit like trying to lock me in, donating to a dickhead, or whatever else I disagree with, I can cancel my subscription, move to another third party, and keep all mails on my server.

How can I achieve this? Which search terms should I be using? "Self host email server" brings up stuff that's the equivalent of self-hosting gmail, AOL, posteo, kollabnow, or whatever, but that's not what I want. "Selfhost POP relay" doesn't have much better results, always bringing up SMTP relay...

 

I think it's obvious (and has been) that the linux kernel needs more contributors and more maintainers to share the load*. The Linux Foundation spending 2% on kernel development in 2024 (page 18) does something but not nearly enough.

Is there a way that we as a community / third parties / non kernel devs can fund kernel developers and maybe even get a kernel maintainer in there? Maybe something already exists or do we have to start something ourselves?

*: Yes, I understand our overworked maintainer problem (being one of these people myself), but here we have people actually doing the work! - Greg KH

 

I've got 64 GB of RAM and would like to force cargo to dump build artifacts into it. So basically the target/ directory should end up there.

Unless I'm mistaken RAM is much faster than SSDs and since I do rebuild quite often, it would save some R/W cycles on my SSD and allow faster file access.

I do jot mind doing a full rebuild every morning

Solution:

These 2 comments gave me the best indication how to do it: cargo ramdisk and build.target-dir config options.

Would be great if cargo had a build.target-dir-prefix though. One could set and env var CARGO_TARGET_DIR_PREFIX and point it at /dev/shm or /tmp if it's a tmpfs and every rust project would have its artefacts end up in RAM.

 

How do admins feel about users requesting (or creating) communities on here for blogging purposes? For example /c/online persona or /c/online persona sibling or something similar.

I saw somebody talking about how they started doing that on another server and simply linking to it on reddit to get traction in the fediverse. It seems like a great idea to me. Blogs are shared quite often and them being on Lemmy allows for new entries to simply show up in the local feed. They can be easily crossposted and commented on in Lemmy and across the fediverse if I'm not mistaken.

The only problem I could see is are naming conflicts. For example if somebody reads this and immediately creates /c/onlinepersona to block me from creating that to force a report to the admins. Or the reverse, a user creating the name "programming-guides" to then claim a community with the same name.

Thoughts?

Anti Commercial-AI license

 

Every week or so there seems to be drama about some old dude shouting about how rust in the Linux kernel is bad. Given all the open hostility, is there easier way for R4L to continue their work?

 

I know little about gradle and have only just started exploring it, so this is just a question out of curiosity.

It's supposedly a language agnostic dependency manager and builder, yet it seems to have only found its niche in Java. C/C++ projects could definitely do with dependency resolution...

 

I've inherited a systemd service and it uses BindReadOnlyPaths to make certain paths available to the service (doc)

A bind mount makes a particular file or directory available at an additional place in the unit's view of the file system. Any bind mounts created with this option are specific to the unit, and are not visible in the host's mount table.

The service is running using a specific user and I would like the user to access those read-only paths outside of the service. Is there an possibility within systemd that would allow me to do that?

Edit: solved it with a systemd bind mount

view more: ‹ prev next ›