[-] BB_C@programming.dev 0 points 2 days ago

Use libcosmic 😑

No, but seriously.. skip to the end.

Iced and Egui both can’t handle Arabic, which is a deal breaker.

Iced can handle Arabic shaping-wise when cosmic-text is used, but it can't handle the direction (yet). If you only need it for the interface, a shit workaround would be to prefix all text with an RLM (RIGHT-TO-LEFT Mark). This would left-align all text of course.

Iced takes forever to compile and iterate, maybe that’ll be fixed with dynamic linking.

Fast iteration is already fixed by using cranelift in your release-dev profile (or whatever you want to call it), and mold as a linker. The binary will be slower, but iteration will be much much faster.


Okay, something helpful instead: Did you try asking in the rust:gnome.org matrix room mentioned in the project page?

[-] BB_C@programming.dev 3 points 6 days ago* (last edited 5 days ago)

&Bar is a reference to something. That something is either a part of self, or a part of the static context. There is no other context because there is no runtime/GC. So there is no logical not-nonsensical scenario where this would be both a valid and a limiting situation in Rust. And this is why your surface analogy to Index is invalid.

If the return value may depend on something other than self or the static context, and still need to be reference-like, then the trait definition is wrong. It should either return a Cow, or go for the obvious generalization of returning impl AsRef<Bar> values. With that generalization, references, Cows, and more can be returned.

There is also the possibility that the trait definition is right, and you (the implementer) are trying to break a (probably) deliberate constraint (e.g. the return value in Index being tied to &self).

I would wager a guess that what you call an escape hatchet is considered a very bad C# style anyway (or will/should be). Just like how mutable statics are considered very bad in Rust 😉

[-] BB_C@programming.dev 1 points 6 days ago

Cow does not work when you are actually required to return a reference

What does that even mean? Can you provide a practical example?

(I'm assuming you're familiar with Deref and autoref/autoderef behaviors in Rust.)

[-] BB_C@programming.dev 7 points 6 days ago

Is what the author calls a C# borrow checker purely lexically based? The first error message gives that impression. And if it is, then it wouldn't qualify for any such comparisons with 2018+ Rust.

[-] BB_C@programming.dev 4 points 6 days ago
  1. Unconvincing use-case: why is returning an Option not an option?
  2. Unconvincing objection: what concrete problems are caused by utilizing Cows?
  3. Wrong demonstrated "solution": why would one have to create a value and leak it with each call instead of using one LazyLock static?
26
74
submitted 2 months ago by BB_C@programming.dev to c/rust@programming.dev
[-] BB_C@programming.dev 23 points 3 months ago

Yesterday I was browsing /r/programming

:tabclose

[-] BB_C@programming.dev 24 points 3 months ago

Hate to break it to you, but you're not really learning.

[-] BB_C@programming.dev 23 points 3 months ago

You should be thankful it's not 18446744073709551615 days to go.

[-] BB_C@programming.dev 38 points 4 months ago

A reminder that the Servo project has resumed active development since the start of 2023, and is making good progress every month.

If you're looking for a serious in-progress effort to create a new open, safe, performant, independent, and fully-featured web engine, that's the one you should be keeping an eye on.

It won't be easy trying to catch up to continuously evolving and changing web standards, but that's the only effort with a chance.

10
submitted 5 months ago by BB_C@programming.dev to c/rust@programming.dev
20
submitted 5 months ago by BB_C@programming.dev to c/rust@programming.dev
[-] BB_C@programming.dev 51 points 6 months ago* (last edited 6 months ago)

Examples ARE usage documentation.

What value is this blog supposed to be adding exactly?
The fact that top-level and API descriptive explanations are important?
The fact that some projects don't have complete documentation?
To whom exactly would this be considered new information?

[-] BB_C@programming.dev 29 points 11 months ago

What’s interesting is that this problem is largely solved for C and C++: Linux distributions like Debian

[closes tab]

[-] BB_C@programming.dev 23 points 1 year ago* (last edited 1 year ago)

fn foo(&big, &chungus)

is out,

async fn foo(&BIG_GLOBAL_STATIC_REF_OR_SIMILAR_HORROR, sendable_chungus.clone())

is in.

Or maybe you know

fn foo(&big, &chungus)

is out

async fn foo(big, chungus) -> (big, chungus)

is in

Or

async fn foo(big, chungus) {
  // ...
  tx.send((big, chungus)).await?;
  // ...
}

is in

Moving (movable/sendable) data is not limited by number or direction, you know. And that second one even makes use of them great Hoare channels! And gives us control on how long we hold on to data before sending it back (modified or not). But I digress. Let's go back to the important talking point that Hoare was right!

view more: next ›

BB_C

joined 1 year ago