HNHacker News
TopNewBestAskShowJobs

Hixie

574 karma · joined February 13, 2010

submissionscomments
Hixie··on Graphical User Interface Using Flutter in Embedded Systems [pdf]
Flutter's Wayland support is used by Google for a consumer product with millions of users. (source: I work for Google.)
Hixie··on Graphical User Interface Using Flutter in Embedded Systems [pdf]
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...
Hixie··on Web support for Flutter goes beta
It's a pretty big app. I'd be curious to see how big the equivalent app built using Web technologies directly would be.

That said, yes, if you want small download sizes on the Web then Flutter isn't the technology for you.

Concretely: our minimal overhead is about 300KB gzipped currently. We expect that to go down a bit before we exit beta, but a "hello world" in Flutter for Web will never get down to the few dozen bytes that you could get using pure HTML.

Fundamentally our approach will always have a large overhead compared to other Web technologies because we don't use most of the built-in features that browsers bring to the table like CSS and HTML and so on. We have our own layout, our own compositing, our own gesture detector, etc. We even blink our own cursor. The only features we use are the lowest-level ones like `canvas` that are needed to actually push pixels to the screen, or ARIA which is needed to expose the accessibility tree.

On the plus side that means you can do anything you want. You want the text cursor to look like a wiggling snake with eyes that follow the mouse cursor? No problem. You want a checkbox that exactly matches the Material Design spec? Or that exactly matches the iOS design language? No problem. The cost is that all that code has to ship with your app.

Hixie··on Web support for Flutter goes beta
Here are some:

- https://developertest.codemagic.app/

- https://flutter.github.io/samples/

- https://hillelcoren.github.io/invoiceninja/

Hixie··on Flutter: UI platform designed for ambient computing
(Flutter TL here)

FWIW, one of our driving values is to specifically _not_ compromise in this way. We actively avoid having a "lowest common denominator" approach. I learnt about the risks of such an approach when I was the HTML spec editor. It's one of the reasons that we have been only adding new platforms very carefully, and it's why we've been focusing so much on mobile first. The vast majority of the team is focused on mobile, with a small team on Web and an even smaller team (1-4 people depending on how you count it) working on desktop.

Hixie··on Flutter: UI platform designed for ambient computing
We don't really "emulate" the UI on Android, FWIW. We have one of several implementations of Material design, another of which is designed for the Android View hierarchy, another is designed for JS on the Web, and so on. In some respects Flutter's implementation is actually ahead of the others, so if anything, they're "emulating" us. :-)
Hixie··on A lighter V8
That's literally how Flutter started. "What if we don't have to be backwards compatible? Let's delete the HTML parsing quirks... and expensive CSS selectors... and... all of the DOM... and JavaScript... and why do we have markup even..."
Hixie··on Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
We compile to JS for execution on the browser. We don't use the NPAPI or Pepper plugin APIs. We intend to work on any standards-compliant browser. (I used to be the editor for the HTML standard, so I have some skin in this game.)

What size would you consider acceptable for a mobile Web app?

Hixie··on Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
Languages I recall us considering include: Java, Kotlin, Swift, C++, Dart, Lisp, Lua, ObjectPascal, Python, C#, Go, Rust, TypeScript, JavaScript itself, Perl.

I wish I had our notes from back then, but I looked for them recently and couldn't find them. Our best theory is we did it on paper or on a whiteboard. :-(

Hixie··on Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
Neither. More like "figuring out your build system and how to integrate with the Flutter embedder API and how to hook all that up to the Dart compiler" and that kind of thing.
Hixie··on Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
If you're aware of areas where our accessibility support isn't up to par, please file a bug: https://github.com/flutter/flutter/issues/new?template=BUG.m...
Hixie··on Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
I'm not sure what it would mean for me to guarantee anything. So far, we've generally been able to release updates ahead of the OS. For example, IIRC we implemented support for the iPhone "notch" before the notched iPhone came out. Similarly, our support for Material widgets has actually been ahead of Android's in many ways. You're right, though, maybe one day it will not be.

In practice, we've found many apps these days don't even try to use the OEM UI style. Instead, they make "branded apps" with very customized widgets. Flutter really shines at this; it's very easy to make custom widgets. (Indeed, all our widgets, including the ones that look like OEM widgets, are just "custom widgets"... it's because it's so easy to make high-quality custom widgets that we're able to make OEM-like widgets so quickly.)

Hixie··on Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
If it is noticeable, please do file a bug with the details of the device on this you're seeing the problem. https://github.com/flutter/flutter/issues/new?template=perfo...
Hixie··on Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
Odd. Accessibility should work fine. If you can reproduce this, can you file a bug with details of your setup? https://github.com/flutter/flutter/issues/new?template=BUG.m...
Hixie··on Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
(I'm the Flutter TL)

Our current plan is to support the complete feature set while still supporting places with connectivity around 5Mbit/s. We are still in very early stages (we only just put out the tech preview today!) but we have some confidence that this is possible. Personally I'm more worried about the performance of layout animations (e.g. resizing paragraphs) than about download size, but again, it's early days still.

Hixie··on Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
Sorry, I just copied and pasted the number as it appears on our benchmark page. :-)
Hixie··on Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
(I'm the Flutter TL.)

As far as the bit about Flutter goes: Flutter was started by engineers from the Chrome team, and myself (who worked in the open source team as editor of the HTML standard). We had no relationship with the Dart team at all until some times into the project, when we were looking around for a language to replace JavaScript in our project (codenamed Sky at the time). We considered a large number of languages but ended up picking Dart because it was the best fit (see the Flutter FAQ for more details). We then had to learn Dart and made friends with the Dart team, with whom we now work very closely.

Hixie··on Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
We're not quite there yet unless you have a high tolerance for pain, but in the coming year we should in a good place to support that kind of thing.
Hixie··on Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
Given our architecture, it doesn't cost us any more performance to look like the OEM widgets than a bespoke widget set, and indeed it shouldn't cost us any more to look like the OEM widgets than it should cost the OEM widgets themselves to look like the OEM widgets, because we're targeting the GPU directly.
Hixie··on Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
https://master-api.flutter.dev/flutter/dart-io/WebSocket-cla...
Hixie··on Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
(I'm the Flutter TL.)

According to today's benchmark numbers, we're at 4414KB on Android and 8572KB on iOS (IIRC, iOS encrypts before compressing so it can't get as good a compression).

This is for our Hello World test app (https://github.com/flutter/flutter/blob/master/examples/hell...), which is more or less the smallest app you can imagine building with Flutter unless you bypass the entire framework and only use the engine directly.

Hixie··on Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
(I'm the Flutter TL.)

Yeah, I was just writing a design doc earlier today and my math for how big a download we could reasonably expect users to wait for was based on a 5Mbit/s download speed. Half a megabyte takes under a second at that speed, but 5 megabytes takes more like 8 seconds. That's a huge difference. In an environment like the Web, where ephemerality is the norm, you really have to stay below 1MB from what I can tell.

Hixie··on Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
(I'm the Flutter TL.)

We support targeting the Web (that's the tech preview we released today), and we support targeting Android, both of which ChromeOS support. We also support development on ChromeOS.

Hixie··on Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
(I'm the Flutter TL.)

As a target platform or as a development platform?

We don't support targeting Linux out of the box today, but we support Linux as a first-class development platform (it's what I use). That said, we do work on Linux, and if you're willing to do a bit of work, you can use it to write Linux apps. If you want to target X11, you'll need something like https://github.com/google/flutter-desktop-embedding whereas if you want to target the hardware directly, you can do something like https://medium.com/flutter-io/flutter-on-raspberry-pi-mostly... .

Hixie··on Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
(I'm the Flutter TL)

If you can tell that we're not using OEM widgets, we consider that a bug. Please file it and explain what the difference is. We're definitely not perfect, but fidelity is a high priority for us this year.

https://github.com/flutter/flutter/issues/new?template=BUG.m...

Hixie··on Flutter desktop shells
We've done significant work on that particular issue in the past few months (primarily, caching compiled skia shaders). The issue wasn't iOS specific. If you have cases that are still problematic on the master channel (on iOS or elsewhere) please please please file a new bug with a test case so we can track down the issue.
Hixie··on A Go Custom Flutter Engine Embedder for Desktop
If it makes you feel better, I _invented_ `<details>` and didn't realize you could do that in markdown...
Hixie··on Flutter: the good, the bad and the ugly
We definitely don't intend to push you into Material... can you elaborate on that? What would we have to change for you to think we were not pushing you into Material?

Regarding the crash logs, it has definitely helped us improve stability. We do try hard to notify you that it's happening. It's opt-out because people don't tend to opt in to that kind of thing and so the data would be more or less useless (not representative of real usage) if we made it opt-in.

Hixie··on Flutter: the good, the bad and the ugly
We started with JavaScript actually. We switched away from JavaScript because it was too quirky, among other things.
Hixie··on Flutter: the good, the bad and the ugly
It's totally fair to say that flutter_driver isn't a great experience today. The reality is that you hardly ever need to use it, though, because you can do pretty much everything you want using unit tests (including doing golden file tests). We mostly only use driver tests for on-device benchmarks.
← PreviousPage 2 of 4Next →