@p@lain@graf@mint@Moon security isn't the reason I want it rewritten in Rust. It's because I refuse to learn Elixir and fundamentally speaking it will always be inferior to a non-VM, non-GC'd language.
Mitra has the right idea just going ahead and using Actix. Actix/Tokio will absolutely annihilate whatever routing framework Pleroma uses (Phoenix?) .
@p@lain@graf@mint@Moon Pleroma is I/O bound partially because it was written in a language specifically designed to be incredibly slow and wasteful when it comes to reuse of memory.
It cannot be repeated enough. Functional programming languages are totally orthogonal to how computers actually work and you can never take advantage of the properties of a computer if you view how a computer actually operates as a flaw that requires a rube goldberg machine to pretend doesn't exist. But of course, never will cease to exist because ultimately you are trying to get a computer to do a thing, not just turn on and get warm (as the intended purpose of functional programming languages).
@p@Moon@graf@lain@mint also you will _NEVER_ get to performance nirvana if you think you can just throw your bullshit into some job framework bullshit bloat system and it's going to be great. Only _YOU_, the actual programmer of the actual software know what your data actually looks like can create an ideal solution. It's not even that hard, people think writing their own stuff is hard because they look at these megabloat frameworks and they're huge. It doesn't have to be huge when it's built around (correct) assumptions.
@p@lain@graf@mint@Moon I didn't read all this but I'm just going to say you can't throw your hands up and complain about the IO bottleneck when pleroma is leaving tons of memory on the table.
Databases are great, but they're a not replacement for local process memory. Pleroma isn't doing any schizo sharding hyper-galaxy-scale shit. It's just a single frontend and a postgresql database. Cache shit, CACHE CACHE CACHE PUT THINGS IN THE MEMORY AND THEN READ THEM FROM MEMORY MARK THEM AS DIRTY WHEN NEEDED AND REFRESH. WHO CARES IF IT'S THERE'S NANOSECOND ATOMIC RACE CONDITION OVER THE EXISTENCE OF A PEPE THE FROG IMAGE JUST PRESS F5 NIGGA ITS FAST
@p@lain@graf@mint@Moon people need to be reminded that the state of webdev is really bad and what's worse is people applaud each other for how bad it is.
@alex@lain@graf@n-2-l@mint@Moon Pleroma needs to talk to the DB less. While faster DBs are a nice idea, they will always been significantly slower than retrieving from local process memory. It's not just the overhead of (de)serialization, DBs must be hyper-generic and account for all possible scenarios. The reality is you can make reasonable assumptions about your data and those reasonable assumptions unlock worlds of optimizations.
@alex@lain@graf@n-2-l@mint@Moon Pleroma doesn't cache enough. Like I said the bottleneck is IO. I struggle to get it to use more memory, I tune all the lame VM options and yet it never really caches more. Meanwhile as a functional GC'd VM language Elixir is constantly allocating and throwing away memory. Even Rust isn't perfect since it tends to promote RAII which involves allocating and throwing away memory.
One of the architectural decisions I did in sneedforo was to cache as much data as reasonable in memory. Avoiding queries to the DB. Imagine the insane performance gains Pleroma could have if it actually cached stuff in an intelligent way. Oh, but that's a little complicated, right? What is the states become stale, that could be a problem. Bro, just don't be a soydev and think about it hard.
@alex@lain@graf@n-2-l@mint@Moon almost everything I run is never CPU bottlenecked, and that's a bad thing. They're always IO bottlenecked, pleroma, matrix, everything. The CPU is literally just sleeping while waiting for data to move from disk to ram to CPU. If the software was good that data would be in CPU cache, it would be in memory, it wouldn't be on disk. It wouldn't be constantly doing system calls to the kernel and sleeping on mutexes.
If the software was good, it'd be using 100% on all cores.
@swastika@alex@lain@graf@mint@Moon bro you don't know shit about code don't even pretend. Rust is because because of cargo and that it's slow? Elixir is a high abstraction bytecode garbage collected virtual machined spook language.
@Moon@alex@lain@graf@mint I don't care this is insane. No one is saying move UGC text to a different domain. No, it's the _SAFE_ stuff that should be moved to a different domain. Images are literally the easy part, sanitizing text is the hard part but it's a solved problem if you use someone else's library.
I'm tired of seeing webshitters pretend like they're real devs while working in soy languages with soy frameworks and in the end they're very proud of themselves for displaying text and images on a webpage poorly, in under 4GB of per-tab RAM usage.
Take your L and don't tell me to move shit to a different domain. Don't pretend like you wrote this down anywhere in the docs, because you didn't, no, it's just retroactive cope.
@mint@alex@lain@graf lmao "displaying images on a website is too complicated and it keeps injecting javascript so just host all your images on a different domain instead".
I wrote my own MIME detection crap in Rust in a few hours, optional ffmpeg integration for codec detection. Apparently no Elixir dev can do this.
also we deserve this, we need to take accountability. It's not fault of the politicians or the banker or the whatever. It's your fault, it's your neighbors fault, it's your colleagues fault, it's your fucking dogs fault. Fuck you, you deserve it.
The nigger cattle who voted for this will hold themselves blameless, because actually drumpf, or whatever. They will acknowledge the corruption, but simply throw their hands up and declare that "democracy is broken and everyone is bad but my guy is corrupt in a different way". They will never, ever come to the ultimate realization that democracy is an elaborate scam. Nigger cattle should not be allowed to vote. 90% of the human population is unfit for anything beyond simple NPC behavior patterns.
Democracy and freedom are oxymorons. It is the tyranny of the easily controlled nigger cattle.