50
Why not fork Lemmy? (programming.dev)
submitted 10 months ago* (last edited 9 months ago) by CoderSupreme@programming.dev to c/foss@beehaw.org

I've read this comment on lemmy's github repository by sbordeyne:

I closed it cause I have no interest in having to battle dessalines on minor nitpicks. Feel free to take the branch and reopen the pull request.

My thought process was that since lemmy is open source, we should be free to add new features without having to battle over philosophies, which was made apparent to me with his reviews and very strong opinions over which features to greenlight and which features to debate at length over (see infinite scrolling, and this very issue which was only approved on the condition we make it a setting that is off by default). I just don't have the energy to contribute and be challenged on every little thing, I'll just remain a plain user of the platform and not bother contributing to the project anymore.

Originally posted by sbordeyne in #282 (comment)

Instead of contributing to a project where only @dessalines@lemmy.ml, lionirdeadman and @nutomic@lemmy.ml dictate what gets approved, why not make a fork with the settings most people agree on?

My stance is that I wouldn't contribute to a project hosted on GitHub, or a project that considers a few opinions more important than the majority.

Controversial takes

spoiler dessalines doesn't want SEO so we get URLs for robots

It might makes sense for the semantic web, but IMO it really doesn't add that much value... look at how silly this type of thinking has gotten w/ reddit: https://www.reddit.com/r/aww/comments/glenz4/cute_baby_bunnies_think_the_golden_retriever_is/

Its gotten to reddit/community/comments/post_id/weird_lengthened_post_name, when it should be just reddit/post/postid

Originally posted by @dessalines@lemmy.ml in https://github.com/LemmyNet/lemmy/issues/875#issuecomment-652165036 :::

:::

In my opinion, open-source projects should follow a set of principles to ensure transparency, community engagement, and effective development. Here are some key points that encapsulate these principles:

  • Clear Decision-Making Process for Future Releases: Open-source projects should have a well-defined process for deciding what features and improvements make it into each release. This process should be documented and accessible to the community. (For example, you can read about how Discourse decides what goes into each release here).

  • Complaint-Driven Development: Embrace the concept of "complaint-driven development," where user feedback and complaints guide the prioritization of issues and features to address.

  • Transparent Donation Management: Be open about how donation money is allocated. Implementing a bounty system can further enhance transparency, enabling contributors to work on specific tasks for financial rewards.

  • Inclusive Community Involvement: Encourage active participation from the community in brainstorming and voting on potential features before finalizing the project roadmap. Community input can be invaluable in shaping the project's direction.

  • Public Roadmap: Maintain a publicly accessible roadmap that outlines what is planned for upcoming releases. This roadmap should include the status of each feature or enhancement to keep users informed.

  • User-Friendly Feature Request Process: Provide a public feature request forum where users can submit their ideas. Clearly outline the process for how these requests will be reviewed and prioritized, ensuring transparency in the decision-making.

  • Effective Communication Channels: Avoid using disorganized or private communication platforms for project-related discussions. Instead, opt for well-structured, publicly accessible channels that don't require users to log in to access information.

  • Document with a Blog: Utilize a blog or similar documentation platform to keep users and contributors informed about important project updates, changes, and developments.

you are viewing a single comment's thread
view the rest of the comments
[-] T0RB1T@beehaw.org 15 points 9 months ago

For those of us who have never used Rust, and mostly just heard good things... why is Rust bad for a web app and UI? I've heard it's safer from memory vulnerabilities, and easier to code than most low-level languages, and much faster than high-level languages.

I chose Lemmy because it's written in Rust, and kbin is written in PHP.

[-] 1stTime4MeInMCU@mander.xyz 21 points 9 months ago* (last edited 9 months ago)

My opinion, hopefully I don’t get downvoted into oblivion lol: Rust is great for lots of things and its to be commended for forward thinking on so many neglected areas of software development from the last 20 years. I use it almost every day for hobby stuff and have used it from time to time professionally (among Java, python, typescript, c++).

That being said amongst many of its users it has an almost cult like belief in its supremacy and imho attracts some bad people (not all). Because of how much it protects you, many bad developers find it and fall it love with it because it forces them to code correctly and then they can’t imagine that anybody else doesn’t need the guard rails they do. They also see that some of the smartest and best developments in software engineering happen in this space and want to attach themselves to it, and then use it as a bludgeon against others. Lots of very important software was written in languages that are not rust and they work just fine, were able to meet deadlines / be profitable Etc etc. but there is this attitude from many that if you aren't picking Rust these days what are you even doing???

Rust is great but it’s sometimes messy and not the right tool for the job. The whole “slower to develop but faster to correct” (which I’d say needs some real data to prove out, but for the sake of argument let’s say is true) is a trade off, not something that automatically makes it better. Sometimes due to circumstances way beyond your own control as a developer, you won’t know what the right answer is until halfway into development and there are languages that accommodate that scenario much better (imo). This is one of many of rust’s short comings. For a website, it’s just an unusual tool that even if equally useful from a language standpoint doesn’t have as much tooling and community support around it as other web languages. But I’d say it’s not equal even from a baseline level (again, my opinion. I’ve used rust plenty but I’ve never used it for web dev so I’m talking out my butt). Philosophically, does it make sense to over engineer a super powerful Ferrari of a website when a Toyota Camry will do? Especially when the Camry is tried and true and will likely let you be more agile.

You can do anything in any language, but should you?

[-] T0RB1T@beehaw.org 7 points 9 months ago

That all makes a lot of sense. I really only ever got remotely competent with Python, and the one university course I did in c was rough. I passed it, but felt like I barely understood what I was doing the whole time.

I can understand how ease of writing and general community mindshare can be the most important factors.

[-] 1stTime4MeInMCU@mander.xyz 7 points 9 months ago* (last edited 9 months ago)

That's too bad, I feel like mastering C is the key to having a super solid foundation for all things how computers work. (Not blaming you, most courses just blast through C without exploring the what and whys). There is something to be said for just getting people productive and for that Python is excellent and immediately engaging. Python is probably my best and favorite language, but I think from a wholistic understanding point of view its hard to beat a solid C foundation to build out from.

[-] MasterBuilder@lemmy.one 2 points 9 months ago

Lower level languages are definitely helpful in learning how computers work. When I was in college, I was not taught C, but our algorithms course was in C. We were expected to learn it on our own.

lisp and Prolog were used for AI - those we learned in class. Assembly was the ultimate "get intimate with the machine" language, and we wrote a simple compiler for VMS.

All of this is meant to help us understand how to work with machines. It doesn't mean that that's how we should work with machines. Sometimes the higher level language is the better choice. Sometimes it is not. We are expected to make that decision based on the situation at hand.

[-] Penguincoder@beehaw.org 18 points 9 months ago* (last edited 9 months ago)

I had a bunch of stuff typed here (probably too much), clicked a damn icon on this UI and POOF when my entire comment....

These are my opinions, probably not shared with others and surely not the end all be all to 'why not Rust?'

Rust is hard. Rust is slow to iterate with and compile. Here's a highlevel overview of the things you'd need to learn to effectively understand Rust code; not even speaking to learning enough of that to write it. Rust gets touted as secure, and it is more secure than other low level languages like C/C++. That does not make it invulnerable to exploits. It gives a false sense of security to developers who think My app can't be hacked, it's written in Rust!!. While Rust is better at memory management and protecting against run time errors related to memory issues, that doesn't make it 100% safe. That removes almost one class of potential exploits, not all of them, and can't protect the developer against other developer created issues. Rust code is still written by people. People still write insecure code even in Rust. Computers are dumb as hell; but fast. People are smart as hell, but SLOW. Combine the two and you get stupid things faster; not smarter things better.

  • Rust development is hard, hard to learn, very hard to do right
  • Rust is not suited for a web application. Would you tell someone to go write the web application and web page in C/C++? Nope. There's a reason for that. Not suited to it. Square peg, round hole
  • There's always exploits being discovered. Rust handles some things better, but uhhh.. Go look at some Lemmy Rust code. Definitely still has vulnerabilities; Rust won't save you from yourself.

Something like Golang is much better choice for development of a web service that has sane API handling. By the time to add in more error handling, more type checking, more passing around of this function or that data, and more checking it on the sender and receiver side...etc. By the time you're writing Rust safely and correctly; it is much slower than what you may be lead to believe.

Go is primarily designed for speed of development (including compilation times), rather than speed of execution. Go programmers tend to value clear code over fast code. Why does a microsecond longer matter for a website? Maybe in some backend PLC land there's a damn good use for that performance. For a networked web application; it's a pointless metric. That is not going to be your bottleneck.


Rust is hard to understand just reading it let alone determine why it's doing something.


Rust

fn does_what(n: u64) -> bool {
    match n {
        0...1 => false,
        _ => !(2..n).any(|d| n % d == 0),
    }
}

Golang

func doesWhat(value int) bool {
    for i := 2; i <= int(math.Floor(float64(value)/2)); i++ {
        if value %i == 0 {
            return false
        }
    }
    return value > 1
}

Not talking about the functionality merits of the two, but in comparing the _code itself. One of those is much easier to determine what's going on and what it should be doing versus the other. I don't feel like fighting my code. Programming is a tool to help. If it takes more work to use the tool to achieve your goal, it's the wrong tool. Rust is the wrong tool for web development.

[-] Schmeckinger@feddit.de 20 points 9 months ago* (last edited 9 months ago)

You could have written the same code in rust. Also once you are used to rust it's not hard at all. It's just different from all the tools that you used before.

[-] 1stTime4MeInMCU@mander.xyz 8 points 9 months ago

You can write anything in anything. The downsides have to be outweighed by the positives and OP is suggesting there isn't enough positive.

[-] Penguincoder@beehaw.org 5 points 9 months ago* (last edited 9 months ago)

Reductionist, Sunk Cost Fallacy, Choice-support bias, list goes on.

[-] MasterBuilder@lemmy.one 2 points 9 months ago

Can you counter those for those of us who are spectators?

[-] Penguincoder@beehaw.org 2 points 9 months ago

Nah, I don't have patience or desire to.

[-] MasterBuilder@lemmy.one 5 points 9 months ago

I suppose the question is whether Rust is worth the extra work. I know nothing of rust. I know C#, JavaScript, and some other web app tools. Is Rust significantly better than those? Are there enough developers interested in Rust to encouage robust participation?

Can Lemmy handle plugins in a language agnostic way? If so, that might be a better route. Again,I am not advocating anything, just raising questions that can lead to an informed decision.

[-] Dark_Arc@social.packetloss.gg 2 points 9 months ago* (last edited 9 months ago)

This is the problem I always run into. I'm very skilled with C++ and Python, a little rusty (though I've written hundreds of thousands of lines) with Java and Ruby... Rust hasn't offered me anything to justify the learning curve.

It also scares me as it's evolving quickly... perhaps too quickly. It seems like a complicated language that's just getting more and more complicated.

I've had the same issue with Go (module the ever increasing complexity/rapid evolution). For Rust C++ or Java better suit my experience, for Go it's Java and Python.

[-] T0RB1T@beehaw.org 2 points 9 months ago

That all makes sense.

[-] jarfil@beehaw.org 2 points 9 months ago* (last edited 9 months ago)

Why does a microsecond longer matter for a website?

Because some more microseconds later, it's the difference between being able to serve 1k requests per second and dropping connections, vs. 100k requests per second and working smoothly.

Rust is a great tool for backend development, which is all that Lemmy server is. The frontend Lemmy-UI is written in JavaScript.

BTW, in your example, I find the Rust version easier to understand 🤷

[-] BarryZuckerkorn@beehaw.org 1 points 9 months ago

Because some more microseconds later, it’s the difference between being able to serve 1k requests per second and dropping connections, vs. 100k requests per second and working smoothly.

Doesn't this assume that the bottleneck is that particular function? If the service as a whole chokes on something else at 500 requests per second, then making that particular function capable of handling 100k requests isn't going to make a difference. For web apps, the bottleneck is often some kind of storage I/O or the limits of the network infrastructure.

[-] ShittyKopper@lemmy.blahaj.zone 14 points 9 months ago* (last edited 9 months ago)

A long-running web thing like Lemmy doesn't need the processing benefits of native compilation, and can avoid memory vulnerabilities with a garbage collector. Most things it does are IO bound (receive data from other servers, send data to other servers, occasionally render some HTML, interact with a database...) so you're really not benefiting from anything specific to Rust, but you are losing a significant amount of developer effort into things like working with the borrow checker or the infamously long compilation times that could instead go into implementing functionality.

You could make something just as performant as Lemmy is today with Python or JS (JS would particularly work well given the prevalance of JITs).

[-] squaresinger@feddit.de 11 points 9 months ago

but you are losing a significant amount of developer effort into things like working with the borrow checker or the infamously long compilation times that could instead go into implementing functionality.

And into learning the language. With Rust still being a very rare skill, you are losing out on many good developers who could help out but don't, because they don't know Rust. And many of those who do help out, don't know Rust well and will just stumble trough it and write Rust code as if they were writing their main language.

It's kinda like getting people from all over the world to contribute to the welsh Wikipedia. Most will just give up. Many will use a dictionary or Google translate. And only a tiny portion actually know Welsh.

[-] Penguincoder@beehaw.org 9 points 9 months ago

Most things it does are IO bound [...] so you’re really not benefiting from anything specific to Rust,

Preach.

[-] neshura@bookwormstory.social 3 points 9 months ago

I agree that Rust is definitely not ideal for server backends (imo it's not bad, just fine but then again I use it a lot for private projects) but I disagree with your take on JS/Python. Sure that would work but given the performance issues on large instances already going for either of these two, even with JITs, is a bit of a hot take imo. Go probably would have been a way better choice given its relatively low entry bar.

[-] ShittyKopper@lemmy.blahaj.zone 2 points 9 months ago

AFAIK the issues l.w et al are struggling with are to do with the database. The language you're calling out to Postgres doesn't really matter when it's Postgres that's taking a lifetime computing through your hell-query.

I don't know much about Go (I should really take a closer look at it) but it's definitely also a valid candidate. (Perhaps a bit too bare bones for my personal liking, but hey you can't win em all)

[-] bedrooms@kbin.social 10 points 9 months ago

The benefits of Rust turned out to be irrelevant for Lemmy. Then the downside kicks in. To give you some context, sone people Rust is more difficult than C++, which was indeed one of the most difficult (if not the most).

[-] OneRedFox@beehaw.org 8 points 9 months ago

Unless you have a Google-tier workload, it's probably not worth the effort to deal with the learning curve and manual memory management of Rust. Not to mention that the language isn't particularly common among web devs, so finding developers for it will be annoying compared to something else. Logic errors will be a more relevant issue with a web app (things like not setting your JSON Web Tokens to expire) and Rust won't save you from that.

Rust is great if you're building something like a browser engine where there's big performance requirements, a huge attack surface, and you'd benefit from explicitly marking where memory errors can occur (also compiler-managed concurrency/parallelism).

[-] ShittyKopper@lemmy.blahaj.zone 1 points 9 months ago

Logic errors will be a more relevant issue with a web app (things like not setting your JSON Web Tokens to expire) and Rust won’t save you from that.

I'm sure there is some arcane feature of Rust that'd let you encode that in the type checker somehow. Yeah it'd be completely unreadable and unmaintainable but knowing the Rust community there's probably someone mad enough to take a crack at it.

[-] OneRedFox@beehaw.org 1 points 9 months ago

Well, there are some things you can do if you're familiar with functional programming, Domain Driven Design, and Railway Oriented Programming where you can use the type system and structural pattern matching to make your life easier when it comes to designing program logic, but it still requires competence and there's easier languages than Rust that also have the necessary features.

this post was submitted on 04 Sep 2023
50 points (100.0% liked)

Free and Open Source Software

17156 readers
108 users here now

If it's free and open source and it's also software, it can be discussed here. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS