News for hackers. Stuff that matters.
Re:Graphical User Interface Using Flutter in Embedded System... by preommr on Wednesday October 28, 2020 @02:50PM (#24922631)
I can't figure out flutter.

I see so many rave reviews.

But I personally tried it and strongly disliked it. The toolkit and Android Studio run horribly slow - like really slow. And the output is basically this generation's flash. Some of the samples I tried on their gallery are mediocre. Very slight, but noticeable sluggishness. Some are just terrible; the 2d transformations moves at like 7fps. Plus there are so many other small things like issues with scrollbars, things that take time to sort out that native and web have had time to figure out. Also dart is a real PITA coming from typescripts which is basically c#.

Actually, the issue with dart is it's own whole thing. It was meant to be an alternative to js, but not ts has taken over with much greater success. I am not talking about aot or stuff like that - just the dev experience for app dev. Now it's in this really weird spot.

I just don't know. I would honestly have thought that flutter is dead in the water - every personal experience I've had with it has been bad, there are objective facts about it that are bad, and yet so many people love it.

Re:Graphical User Interface Using Flutter in Embedded System... by yagodragon on Wednesday October 28, 2020 @03:25PM (#24923056)
- Flutter has built-in hot reload that enables fast iterations when designing an app. When you need to reset state though you have to reload the app which takes some time but it's not horribly slow.

- The performance of production builds is really good, better than any other cross-platform solution including web apps, PWAs, react native. I've got flutter apps running great on my cheap, old (circa 2015) phone with android 6.0. That's also a huge benefit of flutter, it can target older phones because it doesn't have many dependencies on native widgets etc, it just need a canvas to render.

- Dart not being a successful alternative to js(dart2js compiler), doesn't mean it's a bad language. In fact, Dart 2.0 was a serious update and the language now is great, with sane defaults and a nice standard library. I can't imagine any serious developer who knows at least one popular programming language like java,js,c# that would have problem with Dart. It's very easy to get used to it a couple of hours

> there are objective facts about it that are bad, and yet so many people love it.

can you elaborate more about those facts?

Re:Graphical User Interface Using Flutter in Embedded System... by hokumguru on Wednesday October 28, 2020 @05:15PM (#24924228)
- React native has fast refresh as well, and they recently (4-6 months ago) rebuilt it to be much faster and more stable

- The production builds of RN apps can be on par with fully native applications as well. Discord for iOS is entirely React Native and is probably the most performant app that I use on a daily basis.

Re:Graphical User Interface Using Flutter in Embedded System... by pjmlp on Thursday October 29, 2020 @03:34AM (#24928121)
> - Flutter has built-in hot reload that enables fast iterations when designing an app. When you need to reset state though you have to reload the app which takes some time but it's not horribly slow.

Just like Common Lisp and Smalltalk, and now being added to WPF/WinUI, SwiftUI, Jetpack Compose,....

Re:Graphical User Interface Using Flutter in Embedded System... by onli on Wednesday October 28, 2020 @03:43PM (#24923275)
You do not have to use Android Studio. Use it with Visual Studio code or your FOSS variant of it with the Flutter plugin. That works really well.

> Also dart is a real PITA coming from typescripts which is basically c#.

That's surprising to me. Coming from Ruby Dart was great. Not better, but when you are expecting a tuned up javascript Dart was such a nice surprise. I'd have expected it'd be the same for someone coming from C#. You worked with a current version and gave it a fair shot?

I'm in the Flutter is great camp. The UI you produce with it work great, and the whole process is great. Very powerful and at the same time manageable, a smart small concept at its core, with much around it that makes it powerful. Combine it with GetX and the code you get can also be really nice.

But for Linux? No way, not until they have got a proper beta that is not tied to snap. But maybe Sony is working on that and showing it here? Or I'm just not aware that this is not a real requirement, despite the website making it sound that way?

Re:Graphical User Interface Using Flutter in Embedded System... by okareaman on Wednesday October 28, 2020 @03:07PM (#24922857)
I've been following Dart since it's first release in 2012. I was able to be productive with right away back then. The JavaScript community freaked out because some Google exec in an email said Dart was a JavaScript killer. That did a lot of damage to it's acceptance. Dart was written with 2 things in mind afaik: 1) Replace Java based Google Web Kit used to write JavaScript (GMail circa mid 2000's) and 2) to serve as a backup language in Google lost the Java lawsuit with Oracle. Dart wasn't designed to be a shiny new thing like Swift, Rust or Kotlin, but more of a working language for day to day needs at Google. By those measures, Dart has succeeded admirably with Flutter taking off in popularity. Dart drew a lot of inspiration from C#, so I don't understand that complaint. C#, TypeScript and Dart are similar languages. Finally, Flutter/Dart should be compared to Blazor/C# and I think by that comparison, Flutter wins hands down.
Re:Graphical User Interface Using Flutter in Embedded System... by apta on Wednesday October 28, 2020 @03:42PM (#24923257)
> and I think by that comparison, Flutter wins hands down.

I'd be interested to hear your experience about why that is.

Re:Graphical User Interface Using Flutter in Embedded System... by okareaman on Wednesday October 28, 2020 @06:48PM (#24925056)
I really like C# and .Net for getting the job done but Balzor runs Mono .Net in Wasm and the startup time is brutal for the public internet. 2 to 3 seconds. This leads me to believe Blazor is targeted at corporate intranets on high speed networks where you have a ready supply of C# programmers
Re:Graphical User Interface Using Flutter in Embedded System... by diskzero on Wednesday October 28, 2020 @09:23PM (#24926090)
I developed a fairly complex site using Blazor, starting back in the earliest releases. It was easy to deveolp for and having the depth of .Net (more and more features became available each release) was nice. I also found the build size to be an issue and wouldn't suggest using it for general purpose website. Microsoft really needs to focus on reducing the binary sizes.
Re:Graphical User Interface Using Flutter in Embedded System... by pjmlp on Thursday October 29, 2020 @03:36AM (#24928130)
That is a temporary solution, AOT with CoreRT will be done by .NET 6 (postponed from 5 due to Corona impact on development).
Re:Graphical User Interface Using Flutter in Embedded System... by okareaman on Thursday October 29, 2020 @06:44PM (#24936999)
That's good to hear. Thanks.
Re:Graphical User Interface Using Flutter in Embedded System... by pjmlp on Friday October 30, 2020 @04:34AM (#24940270)
Re:Graphical User Interface Using Flutter in Embedded System... by ulucs on Wednesday October 28, 2020 @03:18PM (#24922975)
If Flutter had a Bolero/F# analogue, that would be a very quick adoption reason for me
Re:Graphical User Interface Using Flutter in Embedded System... by thomasfortes on Wednesday October 28, 2020 @04:31PM (#24923780)
ReveryUI seems like a nice project that works similarly to flutter, unfortunately they aren't sponsored by a giant company, but I would love to use reasonml/ocaml instead of dart (which is in no way a bad language, I just prefer to code in functional languages) to write apps.

https://www.outrunlabs.com/revery/

Re:Graphical User Interface Using Flutter in Embedded System... by Hixie on Wednesday October 28, 2020 @08:16PM (#24925695)
Please don't hesitate to file bugs on any performance issues you see. We care very much about getting excellent performance. There are some specific hardware configurations that we are aware don't behave as well as we'd like (though nothing as bad as you're describing), but that's usually limited to pretty low-end phones where honestly even the OEM software doesn't perform that well...
Re:Graphical User Interface Using Flutter in Embedded System... by chgibb on Wednesday October 28, 2020 @05:00PM (#24924091)
Issues with/dislike of Dart is a pretty common refrain. This project is still very early days but the intent is to bring Flutter into Typescript https://github.com/chgibb/hydro-sdk

Eventually I hope to bring Flutter to C#, Haxe, and (maybe stretching it) eventually Kotlin, Java and Scala.

Re:Graphical User Interface Using Flutter in Embedded System... by mhoad on Wednesday October 28, 2020 @06:19PM (#24924764)
I genuinely don’t get the Dart hate, especially when TypeScript is the alternative. They are so similar.

But this is exactly what happened to Angular. There is a TypeScript version (fairly popular) and a Dart version (barely used outside of Google but is used for some of their biggest money making projects like AdWords).

I’ve only recently discovered Dart having come from Ruby land for the last 8 years and I could easily see Dart becoming my new go-to language in the future.

I think it’s currently criminally underrated and sadly doesn’t have a huge amount of adoption outside of Flutter at the moment but I’m looking to build my next serious web backend with it.

If you’re looking for a good introduction as to why I think it’s such a good language this video does a decent job of explaining the benefits https://youtu.be/J5DQRPRBiFI

Re:Graphical User Interface Using Flutter in Embedded System... by proverbialbunny on Wednesday October 28, 2020 @05:17PM (#24924247)
>Eventually I hope to bring Flutter to C#, Haxe, and (maybe stretching it) eventually Kotlin, Java and Scala.

Like this? https://pub.dev/packages/starflut

"A new flutter plugin project, which supports flutter to interact with other scripting languages such as python, java, ruby, golang, rust, etc. It is easy to use, supports android and ios platform."

Full warning, I have zero experience with this plugin and zero experience with Flutter.

Re:Graphical User Interface Using Flutter in Embedded System... by chgibb on Wednesday October 28, 2020 @09:01PM (#24925957)
Thanks for the link! I actually haven't seen that project before.

As far as I can tell, starflut appears to offer basic script running with pass through of primitive types from Dart -> guest languages.

Hydro-SDK strives to offer far deeper integration between Dart -> guest languages up to and including extending from Dart classes in guest languages, and passing instances seamlessly back and forth with little overhead.

Re:Graphical User Interface Using Flutter in Embedded System... by JD557 on Wednesday October 28, 2020 @05:04PM (#24924135)
As a Scala dev, having flutter support would be awesome.

When I started to learn the language, it was being hyped as a viable alternative for Android apps (which has been abandoned since 2.10, IRCC).

Kotlin seems nice, but after getting used to a stronger type system, it's hard to go back.

Re:Graphical User Interface Using Flutter in Embedded System... by ozyx on Wednesday October 28, 2020 @03:18PM (#24922974)
Were you running debug or release builds? Your experience with sluggishness is very atypical.
Re:Graphical User Interface Using Flutter in Embedded System... by onli on Wednesday October 28, 2020 @03:35PM (#24923173)
Very typical for debug builds though. It's really surprising how big the difference is! Especially on slow hardware. The last app I tested went from almost unusable sluggish to buttery smooth when changing from debug to profile/release mode.
Re:Graphical User Interface Using Flutter in Embedded System... by ironmagma on Wednesday October 28, 2020 @02:56PM (#24922709)
Flutter is just for people who need to get something basic done without too much trouble, I think. It's been over a decade of mobile UI iteration and we still don't have something that does everything for all OSes in a declarative way, so I think we are just doomed to writing a native app for each platform if you want performance, correctness in terms of UI, and productivity.
Re:Graphical User Interface Using Flutter in Embedded System... by The_rationalist on Wednesday October 28, 2020 @03:36PM (#24923195)
And on the other side there is Ionic which is has no real performance issues (contrary to flutter), has the biggest ecosystem (the web) and is elegant, expressive, simple -> The thousands of powerful web APIs, Angular and typescript
Re:Graphical User Interface Using Flutter in Embedded System... by acoard on Wednesday October 28, 2020 @04:41PM (#24923889)
Ionic just wraps the web browser on mobile devices. So you still have to target two browsers, Safari and Chrome.
Re:Graphical User Interface Using Flutter in Embedded System... by tlamponi on Wednesday October 28, 2020 @06:33PM (#24924924)
> The toolkit and Android Studio run horribly slow

I'm doing everything Flutter related with vim + CLI, so one doesn't have to work with android studio, even did so when trying a native Windows build (out of interest) a bit ago.

> And the output is basically this generation's flash.

I did some flash quite a while ago, and no that does not compare at al, similar to that it is not like Java. The closed comparison is possible Qt, from a built output.

> Some of the samples I tried on their gallery are mediocre.

That's true, and I never understood why they don't improve that, it hurts their publicity.

> I would honestly have thought that flutter is dead in the water - every personal experience I've had with it has been bad, there are objective facts about it that are bad, and yet so many people love it.

I thought about roughly the same a year and a half ago, a coworker then did some small private stuff with it, and we talked here and then, as the base premise still sounded interesting. Comparing it now to then it just shows how much improved and gives a glimpse to what more will be possible, and I now could imagine that it will stay and even become rather useful.

tldr; It's IMO far from dead in the water, but there's also quite a bit of work to do.

Re:Graphical User Interface Using Flutter in Embedded System... by malkia on Thursday October 29, 2020 @12:42AM (#24927302)
You should try Visual Studio Code then.
Re:Graphical User Interface Using Flutter in Embedded System... by alexandr1us on Wednesday October 28, 2020 @04:53PM (#24924009)
100% my experience. Everything feels backwards. Dart is huge turn off, there are too many widgets, non native views, horrible native view support. Flutter devs brag about how fast their apps are but honestly I have yet to find Flutter app which isn't sluggish