Live data from Hacker News

Flutter 2

developers.googleblog.com

721–730 of 780 posts

Re: Flutter 2

#721

Earlier quoted context omitted.

Qt for WebAssembly: Pizza Shop Application exit (TypeError: undefined is not an object (evaluating 'handle[name]'))

May I ask what browser and version you ran this in? It does look dated but ran okay for me on Firefox 86 and Chrome 89.

Yeap, Safari 14.0.3

Re: Flutter 2

#722
post #679

Earlier quoted context omitted.

Strange how I don't see many of your issues on my side. (parent issue) Tab tabs through text fields only. A) No lag on my laptop B) Zooming to 400% reveals pure vectors for text as well as control decorations, even the fingerprint icon. Only the logo becomes pixelated but that one could of course simply be an SVG instead and not Flutter's problem. C) Yes, this is a common issue with web apps. One often needs to look…

Could be the browser/platform you're using? I'm not sure. I've seen some reports here that the demos work better in Chrome, but that's not exactly a point in Flutter's favor; this is supposed to be a cross-platform toolkit after all. Regardless, odd. A) I'm on Firefox on a Mac Book Pro. My feeling is that should be able to handle a login form, but I mildly suspect that Flutter's dev team is not testing on Firefox at…

I think you're missing the point of touch mode: mouse and touch actually work fine in both modes. The touch mode is just there to demonstrate how Flutter adapts the layout depending on the target modality: see how the controls get larger when you select touch mode.

The Medium post[1] about Web support explains some adaptations they made for Desktop browser, including:

  We also increased the default content density, because mouse pointers support a tighter density than touch devices.
I expect that in a "real" app the default mode is adapted automatically based on the device type.

[1] https://medium.com/flutter/flutter-web-support-hits-the-stab...

Re: Flutter 2

#723
post #196

Earlier quoted context omitted.

Wasm can't do anything JS couldn't do already.

There are a few things that WASM can do that JS can't (at least not now): - Memory management without GC - Unboxed data structures - SIMD - Shared-memory multi-threading - Precompiled snapshots (does not need to be recompiled on page reload)

I should clarify, in the context of the reply I was referring to security. Wasm is inherently as secure as JavaScript.

Re: Flutter 2

#724
post #716

Earlier quoted context omitted.

I’ve used quite a few. What are the popular scripting languages to compare with? Python, Ruby, PHP are probably the only real competitors (disregarding others like VB or Perl). Functional programming is very difficult in those languages due to weird closures, bad lambdas, weird block/proc/lambda rules, etc. async from the ground up means that concurrency story is much better and allows lots of threading (with libuv o…

Have you tried Elixir or any Scheme? If the scope is dynamic languages, both put JavaScript to shame with much more power, useful tools and far fewer non-sensical footguns. If the scope is programming languages in general, since it was stated that JS isn't a "bad language" after all, then you can include a long, long list of type-safe languages that are much better for dealing with both its role in the browser and in…

I necessarily confined myself to popular languages because of all the advantages that brings. If I could choose any language and magically have an awesome ecosystem, I'd definitely choose StandardML with my second choice being Scheme.

Most of the languages you mention are as fast or faster than JS. Most of them are also much more niche. Tooling for most of them is lacking. Others drag around a huge ball and chain in the form of the JVM or .NET (even the light versions are generally much bigger than v8).

Reason/ReScript seems mostly abandoned by Facebook at this point. Elm is very deliberately a one-man show (I don't like that bus factor). Ocaml compatibility and tooling seem easy then drop off a cliff in practice. Haskell is way too worried about math and the illusion of purity (and finding people willing to deal with it is very hard). Swift is Apple-only and doesn't actually bring much to the table (honestly, it seems like a rip-off of Dart with tuples and ref counting instead of a GC). Rust is much lower level and writing something in rust will take far longer than in JS.

Re: Flutter 2

#725
post #590

Earlier quoted context omitted.

Why even make it a 50/50 choice? I hate apps without selectable text and they're everywhere. Translating something becomes a nightmare and that hurts useability. It's like if you made spoiler 50/50. Do you want to see this without clicking? I think we really overlook the thought that had gone into making js, and other open tech.

Exactly. And I didn't even realize how often I subconsciously select text while I read until I saw the relevant xkcd. [1] I truly think my random clicking on paragraphs that I'm approaching isn't just ADHD but a way of helping my eyes stay on track. It's very disconcerting when the text doesn't select. (As, clearly, all these comments noticed as well -- why were we all trying to select the text? To check if it's Flas…

I would even add this XKCD. https://xkcd.com/1174/

Or even translating...

Try putting their demo website in Google Translate or even try to select the text on an email in their demo webmail app to copy paste it in google translate ....

Re: Flutter 2

#726
post #196

Earlier quoted context omitted.

Wasm can't do anything JS couldn't do already.

There are a few things that WASM can do that JS can't (at least not now): - Memory management without GC - Unboxed data structures - SIMD - Shared-memory multi-threading - Precompiled snapshots (does not need to be recompiled on page reload)

Bytecode caching has been a browser feature for years[0]

JS has atomics and shared memory arrays which also basically bypass garbage collection [1]

JS had working simd.js implementations in both Firefox and Chrome until they were pulled in favor of WASM

[0] https://v8.dev/blog/code-caching-for-devs

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

[2] https://github.com/tc39/ecmascript_simd

https://blog.mozilla.org/javascript/2015/03/10/state-of-simd...

https://01.org/blogs/2014/bringing-simd-javascript

Re: Flutter 2

#727
post #196

Earlier quoted context omitted.

Wasm can't do anything JS couldn't do already.

It can do integers.

BigInt landed in ES2020 and has been supported in something like the last 10-20 versions of Chrome and Firefox, so no huge worries about using it (the "current" browser without support is IE11).

The `123|0` type hint is also recognized and implemented by most browsers too. It forces a 31-bit integer on most platforms (and can offer a significant performance boosts if you're running a tight algorithm).

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re: Flutter 2

#728

Earlier quoted context omitted.

Well, if “viable” means “doable but really fiddly”. C/C++ is fine on iOS (at least when interoperating with Obj-C, Swift is trickier). C/C++ is “doable but really fiddly” on Android, same as web. There’s a compiler toolchain but not much IDE support, and you have to do all the JNI marshaling yourself. So C/C++ is only barely usable for common cross-platform code, and yet it’s the best option . What other language are…

> but in practice they don’t interoperate well and they can’t easily be used everywhere. ...and yet, it's still much better than replicating the same code in different languages just to support different platforms. The idea that a platform dictates the language to be used for creating applications on that platform has always been ridiculous, just because it was the status quo on the web for a bit over a decade doesn'…

I at least agree with this! It’s a big shame that the major mobile OS platforms bless only one or two languages for targeting their devices, and are at best neutral, at worst hostile to developing in other languages.

Re: Flutter 2

#729

Earlier quoted context omitted.

Companies are too efficient for that, even if dev salaries were cheaper they would still want to fund just one version and pocket the difference, and eventually market competition will make that the norm.

Counterexample: banks started with shitty cross-platform UI type apps, but those received low customer satisfaction figures so most of them have now switched over to native apps. A similar thing happened with Facebook.

The Web is a shitty cross-platform UI toolkit For building apps. It’s fairly popular.

Re: Flutter 2

#730

Earlier quoted context omitted.

+1 Furthermore users don't care about the technology used to build the application if it works, that's the unfortunate reality.

Users are not knowledgable enough to know what technology was used to build a product, but many have repeatedly complained about non-native UIs. Heck, Lotus Notes went from being a market leader to an also-ran and user complaints about UX to corporate IT departments definitely played a role in convincing those departments in switching away. More recently, this also happened with many mobile apps made with cross platf…

Lotus notes UI issues were extraordinary. Nothing comparable to the native iOS vs Flutter app difference
Post reply on HN