Earlier quoted context omitted.
> By writing wlroots in C, we make it easy for a half dozen projects to make bindings to other programming languages. Rust is the same in this regard, you can bind it to any other language. And it doesn't have the horrible downsides of C. So why not use it? > wlroots brings together over a dozen different libraries and interfaces which are implemented in C. That's an issue as well, and this of course runs deep. But s…
>So why not use it? Because I don't like it, and I do like C. Rust is not the second coming of Christ, it's a programming language and has many shortcomings and tradeoffs.
Giving up on wlroots-rs
71–80 of 126 posts
Re: Giving up on wlroots-rs
#72> Way Cooler is a Wayland compositor that was written in Rust using wlc I know it is not easy, but I wish the author could have started with a paragraph that could help someone like me know whether or not the rest of the article would be something I would like to read. How about something like this (and of course I may some of the facts wrong, but I want to be as constructive as I can): "Wayland is a Windows manager…
But seriously, this sounds more like the responsibility of the link submitter and/or this website then every person on the internet that wants to write a blog post for a limited audience.
Re: Giving up on wlroots-rs
#73Earlier quoted context omitted.
re: the handles to handles stuff ... I don't think that's so silly really, when you are talking about a resource that in some fundamental sense belongs to a different system (in this case OpenGL). Sure, that system gave you a handle, but if the semantics of managing that handle aren't 1:1 matched with your languages model of things, another level of indirection is a clean way to handle it.
And just think about what most file and I/O wrappers, that are part of the standard library in most higher level languages, e.g. file objects in python, streams in C++ etc., naturally do: They also just wrap (for example) POSIX file descriptors, which are handles, with their own handles, i.e. the file object/Stream/whatever.
Re: Giving up on wlroots-rs
#74Earlier quoted context omitted.
>So why not use it? Because I don't like it, and I do like C. Rust is not the second coming of Christ, it's a programming language and has many shortcomings and tradeoffs.
Which is fine, everyone has their own taste and every language has its shortcomings, but then why didn't you say that from the beginning? Instead you made up a stupid argument that with wlroots being written in Rust other projects would have had a much harder time to make bindings to other programming languages. Which is of course bullshit since Rust allows you to provide a C ABI, hence creating language bindings is…
No, because C already uses the C ABI. You have to have a separate interface to your Rust code which uses the C ABI, and an uncomfortable transition point between C-land and Rust-land. This is definitely not as simple as it is with C.
Re: Giving up on wlroots-rs
#75This code fn some_wlroots_callback(output_handle: OutputHandle, surface_handle: SurfaceHandle) { output_handle.run(|output| { surface_handle.run(|surface| { // maybe some more nested layers... }).unwrap() }).unwrap() } is just screaming continuation monad. You see the same code pattern in early Node.js code (sometimes leading to callback hell). In the JavaScript world, the problem was solved using Promises, and then…
JavaScript and Haskell get to enjoy the productivity of using a tracing GC though.
Re: Giving up on wlroots-rs
#76Does wlroots itself present good code quality or it is basically a horrible wrapper to support every Xorg use case?
wlroots is generally highly regarded in the Wayland community, both in terms of technical design and code quality. There's a reason that every Wayland project which started since wlroots has used wlroots, and those who didn't at first eventually rewrote their code to use wlroots.
Re: Giving up on wlroots-rs
#77Earlier quoted context omitted.
wlroots is generally highly regarded in the Wayland community, both in terms of technical design and code quality. There's a reason that every Wayland project which started since wlroots has used wlroots, and those who didn't at first eventually rewrote their code to use wlroots.
I get the sense that most adopted wlroots because Wayland is a complex protocol. There's no alternative to wlroots so part of the reason everybody uses it is because there's no choice if you don't want to start from nothing.
Re: Giving up on wlroots-rs
#78Question (for any more knowledgable readers here) from someone with a somewhat shallow understanding of the topics discussed: Does this end up being primarily a negative reflection on the general structure of: (a) Rust (b) wl-roots (c) Wayland (d) all three (e) none of the above, it's merely the incidental reality of trying to write code that's compatible/usable across multiple language ecosystems and none of the 3 p…
Re: Giving up on wlroots-rs
#79Earlier quoted context omitted.
I'm surprised to see you agree strongly. A Rust re-write for the political/ideological reason of "only using Rust" seems not good engineering by definition - it is not an engineering decision. However, most of the time that someone would rewrite for the sake of using Rust, it would naturally be to get the advertised benefits of the language. If you believe you will have safer, more manageable code in pure Rust, you a…
I think we're differing on semantics. > it would naturally be to get the advertised benefits of the language I think "naturally" is doing a lot of work here; this is not "for the sake of using Rust", it's to gain the benefits of the language.
Speculating: I think many Rust rewrite projects are criticised under “for the sake of it” when in fact there is a clear decision that Rust is just a better choice in 2019 (i.e. the decision was not political, but the criticism assumed it was). Many of those will nonetheless peter out because forks are hard. Such a result is only a partial judgement on the original decision.
Re: Giving up on wlroots-rs
#80Earlier quoted context omitted.
I'm surprised nobody mentioned this yet- a rust rewrite means you are more likely to invite contributions from a larger community.
> rust rewrite means you are more likely to invite contributions from a larger community I'd be really interested to know why you think that's the case. Somewhere around 3% of programmers know Rust, while over 20% know C. https://insights.stackoverflow.com/survey/2019#technology Naively, I would have thought that a C project would invite contributions from a much larger community. Sure (as I've personally experienced…