Live data from Hacker News

Show HN: Rust GUI Library via Flutter

cjycode.com

81–90 of 108 posts

Re: Show HN: Rust GUI Library via Flutter

#82
post #52

Earlier quoted context omitted.

In three most narrow definition of safety I agree. But that's a very narrow definition. Rust does offer a lot more: - no undefined behavior - many classes of concurrency bugs prevented by the type system - standard library and much of the ecosystem makes invalid states unrepresentable. E.g. a String is always valid UTF8 Those are things that are true to varying degrees for other languages. Dart does pretty well imho.…

Rust's concurrency is only safe in the very specific use case of threads trying to access common resources on the same memory space. It does nothing to prevent data races between processes, or concurrency errors between threads accessing resources that are external to the process. Scenarios quite relevant in distributed systems.

A bulletproof vest doesn't stop you getting stabbed, it still makes you safer though.

Re: Show HN: Rust GUI Library via Flutter

#83
post #66

Earlier quoted context omitted.

flutter does a so so job on desktop and it's web version is wasm based. the job market for dart flutter is a drop while react is the lake. react with electron, react native, react itself together are still the only ones production ready cross platform GUI with widest adoption

comments about job markets aside… The first and the third paragraphs really haven’t been true for some time now. Flutter is absolutely production ready as a cross platform GUI.

For ios and android maybe but I doubt for web. Also 12k+ open issues, team layoffs and all founders that left don't brink confidence to flutter. I think also roadmap and progress in last year doesn't look stellar.

On the other hand I think flutter lost a lot of benefits comparing to 5 years ago - now we have stable better swift and swiftui and better kotlin with jetpack compose - those support also apple watch, macos, tvos, visions os, Google wear, Google TV and with current jetbrains compose desktops like windows is already stable.

React native and web ecosystem also improved a lot in the last year.

Re: Show HN: Rust GUI Library via Flutter

#84

Nice, I really enjoyed Flutter's approach to building UI, but I didn't really care for Dart all that much. In theory shouldn't it be possible to create a programming language specifically for UI? Something that can be interfaced with from any major programming language. Kinda like protobuf with its IDL format, but instead of defining data, it's declaring user interfaces. Is that a crazy or stupid idea? QT and XAML co…

XAML is very much alive within Avalonia[0], Uno[1] and MAUI[2] (not to mention WPF) :) There is support and growing popularity for declarative UI defined in C#[3] and F#[4] instead though. [0]: https://docs.avaloniaui.net/docs/basics/user-interface/intro... [1]: https://platform.uno/docs/articles/getting-started/counterap... [2]: https://learn.microsoft.com/en-us/dotnet/maui/xaml/fundament... [3]: https://github.com/…

Interesting!

Re: Show HN: Rust GUI Library via Flutter

#85
post #59
post #5

I have been using this to build an app[0] for the last couple of years and I want to say that it has been a pleasure to use, there are some wrinkles but overall I have been very happy with the experience. Upgrading from v1 to v2 was not too difficult and v2 is a significant upgrade with lots of useful features, massively improved codegen experience and support for tokio async were the big gamechangers for me. Writing…

Flutter is not bad, but I hesitate diving into it based upon who controls it. Using a Google product feels like you're in constant threat of it just disappearing. It also still has all the remnants of mobile and fingers and not desktop and mouse. Support for improving this is non-existent in my experience.

If this takes off it is only a matter of time before someone creates a rust based engine around this framework that does not rely on Google. For now, one pro of google maintaining flutter is that they also maintain android.

Re: Show HN: Rust GUI Library via Flutter

#86
post #47
post #36

Earlier quoted context omitted.

At a basic level Flutter renders the entire widget tree and caches components that don't need to re-render rather than applying a diff of changes to the DOM. But it's really the Flutter/Dart API and widgets that make it much easier to work with, if I need to load some data asynchronously I use a `FutureBuilder`, if I need a stream of events I can use `StreamBuilder` etc. Compared to Reacts state, hooks, memo, effects…

I don't quite understand the point about rendering, unless you mean it in the Angular sense (i.e. on every state update, the whole app gets rendered, and elements are updated to the new state during that render). But I can imagine that the API can be easier. I think React handles state fairly well, but as soon as that state needs to interact with things outside the React world (http requests, continuously updating da…

>i.e. on every state update, the whole app gets rendered

Yes, that's basically correct:

>Calling setState notifies the framework that the internal state of this object has changed in a way that might impact the user interface in this subtree, which causes the framework to schedule a build for this State object.[0]

The `build` method rebuilds the entire widget tree. So "the whole app" does not necessarily get re-rendered, only whatever is in the same widget as the changed state or below it, although potentially that can be the whole screen. Flutter also uses an algorithm to detect unchanged widgets and reuse them,[1] but conceptually the whole thing is re-rendered on state change.

[0] https://api.flutter.dev/flutter/widgets/State/setState.html

[1] https://docs.flutter.dev/resources/inside-flutter#linear-rec...

Re: Show HN: Rust GUI Library via Flutter

#87

Earlier quoted context omitted.

Why conflate Google's customer facing products with their OSS technology contributions? It seems a weird comparison to make, as if their sales and marketing departments are the ones behind technology decisions. Angular came out of Google and hasn't gone anywhere. Also GoLang.. even GWT was supported well past its prime and is now maintained by the community. What evidence is there that they abandon languages and fram…

> Why conflate Google's customer facing products with their OSS technology contributions? In the .NET block down the street, we deal with this kind of nonsense almost daily :) https://news.ycombinator.com/item?id=41195650

To be fair, your linked post encourages ignoring packaging guidelines in linux distributions

Re: Show HN: Rust GUI Library via Flutter

#88
post #82
post #52

Earlier quoted context omitted.

Rust's concurrency is only safe in the very specific use case of threads trying to access common resources on the same memory space. It does nothing to prevent data races between processes, or concurrency errors between threads accessing resources that are external to the process. Scenarios quite relevant in distributed systems.

A bulletproof vest doesn't stop you getting stabbed, it still makes you safer though.

Unless it is a skilled shoter doing an head shot, or using high caliber ammunition.

I do agree it helps, but it isn't the improvement over other memory safe languages, that the Rust Evagelism Strike Force makes it to be.

Re: Show HN: Rust GUI Library via Flutter

#89
post #47

Earlier quoted context omitted.

I don't quite understand the point about rendering, unless you mean it in the Angular sense (i.e. on every state update, the whole app gets rendered, and elements are updated to the new state during that render). But I can imagine that the API can be easier. I think React handles state fairly well, but as soon as that state needs to interact with things outside the React world (http requests, continuously updating da…

>i.e. on every state update, the whole app gets rendered Yes, that's basically correct: >Calling setState notifies the framework that the internal state of this object has changed in a way that might impact the user interface in this subtree, which causes the framework to schedule a build for this State object.[0] The `build` method rebuilds the entire widget tree. So "the whole app" does not necessarily get re-rende…

React doesn't work in the same way? I don't know much about it, but I assumed it does.

Re: Show HN: Rust GUI Library via Flutter

#90
Does anyone know if Google plans to sunset the entire Flutter framework over time? Since they fired just about everybody internal who was working on it, I don't have a lot of confidence that Flutter will still have any Google support in 3-5 years. Has anyone talked about forking it and putting it under an independent foundation to ensure its long-term viability? Given Google's track record of long-term support for its various technologies, it would be a shame if Flutter got consigned to history's scrap-heap prematurely.
Post reply on HN