537
PieFed be like (thelemmy.club)
you are viewing a single comment's thread
view the rest of the comments

Notice how the OP specifically said well-known and widely used. Yes Rust is currently cool, but way way more people can actually work productively with Python.

[-] Korne127@lemmy.world 80 points 1 month ago

Wait… PieFed uses Python? Holy shit… as someone who regularly uses both, Rust is such a better fit for something like this on this scale. That's actually one of the best arguments I've heard against PieFed

[-] ProdigalFrog@slrpnk.net 43 points 1 month ago* (last edited 1 month ago)

From what I understand, the limitation in speed/scalability for lemmy/piefed/mbin is the database, not the back end language, so the specific language used appears to matter much less than it would seem.

Piefed has some some pretty great features over lemmy, but for the sysadmin side of things, it has a noticeable improvement regarding network resource usage, and potentially raw speed.

Piefed also appears to be less buggy overall. As an example, Lemmy has suffered from a persistent memory leak that's been around for years, with no fix in sight. You can see the opinion of our sysadmin who has been running slrpnk.net (lemmy instance) for 5 years now to find that just because lemmy is built in a memory-safe language, it doesn't automatically translate to a good experience.

[-] Valmond@lemmy.dbzer0.com 8 points 1 month ago

Yeah, hopefully it will move forward faster than the snail pace of rusty lemmy.

I bet more people will be able to tinker with the python sources than rust sources...

Those kind of things do matter!

[-] placebo@lemmy.zip 21 points 1 month ago

Python and bootstrap. Honestly, piefed feels like someone's final cs50 project - which is why I'm hesitant to jump.

[-] Strawberry@lemmy.blahaj.zone 9 points 1 month ago

bootstrap 🤢🤮

[-] onlinepersona@programming.dev 8 points 1 month ago

Lemmy is so heave that @jeena@piefed.jeena.net replaced his lemmy instance with a piefed instance and it's using less resources. I like Rust, but like every tool, it has to be used properly.

[-] acockworkorange@mander.xyz 5 points 1 month ago

Why would it be a better fit?

[-] Miaou@jlai.lu 7 points 1 month ago

Resource efficiency is important for self hosted software. That's one reason matrix is a pita to self host, for example.

[-] Shatur@lemmy.ml 66 points 1 month ago

I think for a large project Rust should be easier to manage in the long run.

[-] SpaceNoodle@lemmy.world 9 points 1 month ago

Well, you've got another think coming.

[-] DarkSideOfTheMoon@lemmy.world 5 points 1 month ago

Also it’s safer and much faster than python.

[-] acockworkorange@mander.xyz 0 points 1 month ago

This is like MINIX vs Linux all over again. Yes, the microkernel architecture is a better concept, but the monolithic Linux was a better implementation.

[-] TheTechnician27@lemmy.world 39 points 1 month ago* (last edited 1 month ago)

Notice how the OP specifically said well-known and widely used.

I did notice. If Rust isn't "widely used", then I'll need to let Apple, Microsoft, Google, Amazon, Mozilla, Huawei, Meta, the Linux kernel devs, and a fuckload of open-source projects know that they actually don't exist.

It's plently widely used, and unlike ~~a scripting language~~ (edit: Python), it's performant – as server software should be. Rust is not a hard language to use or learn either, and it's great for large projects.

[-] r4venw@sh.itjust.works 15 points 1 month ago

While I agree with the general sentiment, scripting languages are perfectly fine to use for server software. Would you call hackernews slow? Its been running on lisp (originally Arc, now common lisp) for its entire existence. Another fun example of popular interpreter is, y'know, the JVM.

[-] SlurpingPus@lemmy.world 4 points 1 month ago* (last edited 1 month ago)

Common Lisp could be compiled, so not the best example.

Lua is a way better example, since Lua scripts often finish in the time it takes Python to get going at all. And that's with interpreted Lua, without JIT. I once straight up had to recheck if I left the dummy static output in there instead of calling my script, because the result was appearing instantly.

There's also Fennel, a Lisp compiled to Lua on the fly. Since Lua is so snappy, the compilation overhead is unnoticeable.

[-] rimu@piefed.social 7 points 1 month ago* (last edited 1 month ago)

Performance is an attractive metric because it's something you can put a number on. It's measurable, so comparisons are easy.

But there are so many other metrics that are more important.

Still, https://leafo.net/lapis/ looks like something I'd like to try sometime. I don't know anything about the Lua web framework ecosystem, that's just the first search result I found. Do you have any recommendations?

[-] SlurpingPus@lemmy.world 2 points 1 month ago* (last edited 1 month ago)

I'm more familiar with Lua for desktop scripting — I'm using it whenever I can, if it's something that's more than like three lines in Bash and the Lua libraries aren't too bad. I'm even using it on the phone when dragging around blocks in Automate becomes too much (its minuscule footprint comes handy there). There's also the excellent automation app Hammerspoon for Mac, which uses Lua for its scripting.

I've been vaguely looking now and then into using it for web in the manner of node.js, with asynchrony being handled on the Lua side — but was offput by the fact that many popular Luarocks libraries presumed synchronous workings, and async requires installing different libs if they even exist. Node has it better since the libs were developed to be async from the start. Iirc Luvit is what I was looking at, there are both libs and some kinda frameworks for it.

OpenResty and frameworks for it like Lapis could be the better way to go. Nginx is pretty much mandatory anyway, and afaiu synchronous libs can be used then, leaving it to Nginx to chuck requests into multiple Lua threads. A drawback is that LuaJIT, used in Resty, still supports only Lua 5.1 features, which is pretty damn old.

I haven't looked into Lua for web in a few years, but since apparently nothing like Hammerspoon with its built-in http server exists for Linux, I'll need to pick it up again, just to do some custom remote control from the phone.

[-] irelephant@anarchist.nexus 1 points 1 month ago

I'm a big fan of lapis. It's built on openresty, a fork of nginx that embeds luajit into it. This means you can make use of all the features nginx has in your application. It's really fast in my experience.

I have a medium-ish project written in lapis here: https://codeberg.org/irelephant/kittygram

There isn't really much of an ecosystem around lua, lapis is really the only "proper" framework. There is stuff like redbean and mako which are cool, but not as complete/friendly to use as lapis imo.
Luarocks can be a bit of a pain as well (make sure to install packages for lua 5.1).

Lapis is made by the same person who made itch.io too, which i think it cool.

[-] rimu@piefed.social 2 points 1 month ago

Great to see a real app built with it. It reminds me of Flask a lot, although I guess all mvc frameworks are pretty similar.

I would be surprised if you'd argue that more devs can write Rust than Python.

Web servers spent most of their time with IO, because the real work is mostly done by the DB. That's why especially Node is very fast and influential design wise. But PHP, Ruby and Python are all very popular and valid choices for web servers. In the end, if you need real performance you have to scale horizontally anyways. And the small gains you make in a compiled language matter even less.

[-] RollForInitiative@feddit.org 7 points 1 month ago

Coming from a Python and Java background Rust is way harder to learn. Don't get me wrong, i like Rust, but it feels way harder. But i agree that its great for large projects and performance-wise!

[-] OpenStars@piefed.social 6 points 1 month ago
[-] RollForInitiative@feddit.org 2 points 1 month ago

The author makes some good points, interesting read. Thanks for the link.

[-] davidagain@lemmy.world 4 points 1 month ago

Rust is not a hard language to use or learn

Rust is a superb language, but it is famously not easy to learn.

[-] IMALlama@lemmy.world 1 points 1 month ago

I dunno, my first functional programming language really through me through a loop. I am starting my first Rust project and so far it doesn't look to be that horrible.

[-] davidagain@lemmy.world 2 points 1 month ago

Functional programming is very different in how you get stuff done.

I would recommend learning Elm first for functional programming before trying anything hairier like Haskell etc.

Elm is a small and lovely language for writing web pages/sites/user interfaces, and has a blisteringly fast compiler that is also the most genuinely helpful of all the compilers I've ever used.

It's a blissfully stable antidote to JavaScript's exhausting "that whole approach is so last month" churn.

[-] IMALlama@lemmy.world 2 points 1 month ago

Thanks for the suggestion! I will take a look once I make some more progress on my rust project. Time is tight these days, so I need to limit the quantity of things I attempt to do in parallel.

[-] davidagain@lemmy.world 2 points 1 month ago

Good plan. One paradigm shift at time! All the best with the rust project.

[-] Miaou@jlai.lu 18 points 1 month ago

Way more people work with python, productively is arguable

this post was submitted on 28 Dec 2025
537 points (91.5% liked)

Fediverse memes

2905 readers
95 users here now

Memes about the Fediverse.

Rules

General
  1. Be respectful
  2. Post on topic
  3. No bigotry or hate speech
  4. Memes should not be personal attacks towards other users
  5. We are not YPTB. If you have a problem with the way an instance or community is run, then take it up over at !yepowertrippinbastards@lemmy.dbzer0.com.
    • Addendum: Yes we know that you think ml/hexbear/grad are tankies and or .world are a bunch of liberals but it gets old quickly. Try and come up with new material.
  6. This is not the place to start flamewars between Lemmy, Mbin and Piefed.

Elsewhere in the Fediverse

Other relevant communities:

founded 1 year ago
MODERATORS