News for hackers. Stuff that matters.
Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by matthewaveryusa on Thursday January 03, 2019 @10:03AM (#18815572)
Is there any indication on how important/significant Dart will be to Fuchsia? I really like Dart, I think it's a fantastic interpreted language, but it has very little momentum because javascript es6 is good enough. If Fuchsia makes Dart its darling (with flutter?) perhaps the tides can turn?
Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by dman on Thursday January 03, 2019 @10:33AM (#18815805)
Dart can be compiled ahead of time.
Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by jbob2000 on Thursday January 03, 2019 @11:03AM (#18816081)
Most apps/websites show some text and a few pictures, why is this a benefit?
Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by allenbrunson on Thursday January 03, 2019 @11:29AM (#18816310)
Because Dart is also used for compiled Flutter apps, which are meant to compete with native apps written in Java, Kotlin, Objective-C, and Swift. This gives us the obvious advantage of not turning people's phones into space heaters, which would be the case if Flutter apps used an interpreted language.
Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by jbob2000 on Thursday January 03, 2019 @12:03PM (#18816680)
And there is no such thing as a slow Java app? Or a slow Objective-C app? Just because it's compiled, doesn't mean it's better. Some websites turn your phone into a space heater because the developer is shit, not because the tech is bad (HN doesn't make my phone blow up...). Dart will suffer the same problem - shit developers - so developing all this tech mumbo-jumbo is pointless.

AMP, in my opinion, was a step in the right direction. AMP is google's way of saying "you're all shit at developing on the web, use this very restricted way of developing a website and watch how fast it will go".

That's what we need. Don't put developers closer to the computer by giving them compiled languages. Move them as far away from the computer as you can. Languages should be moving in the direction of requiring the developer to do as little as possible. I need to import a package to make HTTP requests in Dart; every fucking app makes HTTP calls these days, how outdated is that? HTTP requests are baked in to javascript, I don't even need to think about what I need to import, I can spend mental cycles on real shit.

Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by kitsunesoba on Thursday January 03, 2019 @12:50PM (#18817191)
Generally speaking in the context of normal, non-game apps I’ve found it rather difficult to write Swift or Objective-C in such an inefficient manner that it keeps the CPU spinning and heats up your device. It’s possible for sure but also requires crazy levels of laziness, incompetence, lack of understanding, or some combination thereof.
Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by skybrian on Thursday January 03, 2019 @02:01PM (#18818050)
This is a weird objection. Import statements have nothing to do with whether a language is interpreted or compiled. It's just a matter of which names the language designers decide should be imported automatically.
Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by jbob2000 on Thursday January 03, 2019 @02:08PM (#18818132)
Haha, fair criticism, but don't miss the forest for trees. My point was about simplicity - I don't need to worry about this when making a website, but there's this new language and now I have to worry about this? It just feels like a step backwards.
Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by skybrian on Thursday January 03, 2019 @03:01PM (#18818688)
I'm sure you're right about how it feels, but "feeling like a step backwards" is normal for learning a new language since there's a learning curve. It seems hard to say if it's actually worse? You didn't start out knowing what all the built-in JavaScript functions were, right?

If you know you want to use Dart's HttpRequest class, you can just type it and a good editor will add the import for you. But people don't start out knowing what to type.

Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by thosakwe on Thursday January 03, 2019 @02:37PM (#18818449)
> I need to import a package to make HTTP requests in Dart

That's actually not true; the functionality is included in both dart:io and dart:html. package:http is just a cross-platform wrapper.

Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by qmarchi on Thursday January 03, 2019 @11:30AM (#18816319)
It's moreso the fact that the underlying pieces improve in quality, goals, and speed.

If more apps are just text and a few pictures, why are they running a full copy of the blink and v8 engines and not just using what's required for the job?

Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by jbob2000 on Thursday January 03, 2019 @11:40AM (#18816417)
Because what's "required" for the job is way too complex for the perceived payoff. That's why the JS/HTML is winning - the time investment to "do something" matches the outcome.
Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by levosmetalo on Thursday January 03, 2019 @10:33AM (#18815804)
I guess if Google want Fuchsia / Flutter to really take off, they will have to port Flutter to Javascript. One may or may not like Dart as a language, but if it didn't get any ground in some many years since it exists, why would it all of a sudden.
Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by allenbrunson on Thursday January 03, 2019 @11:11AM (#18816143)
> I guess if Google want Fuchsia / Flutter to really take off, they will have to port Flutter to Javascript.

just like that time when iOS was suddenly hot, but there were no apps for it, because programmers hated Objective-C and weren't willing to learn it. So Apple released a new SDK and toolchain that allowed them to write apps in C++ instead.

oh wait.

Okay, all snark aside. Come on, guys. Isn't the fact that high tech is always new and innovative considered to be a good thing? So why is there always so much pressure to insist that every new thing has to be exactly like all the old things?

Learning Dart is not difficult. I did it myself, without even trying. I just pretended I already knew it, by following examples I found online. After a couple of weeks, my pretend-knowing turned into real-knowing.

Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by pjmlp on Thursday January 03, 2019 @11:33AM (#18816357)
Thing is, Objective-C was the official language on iOS, and yes they did release C++ support, it is called Objective-C++ and exists since NeXTSTEP days.

Dart is just a programming language trying to get its killer app, which was dropped by Chrome team and gets political answers from Android team.

Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by allenbrunson on Thursday January 03, 2019 @11:37AM (#18816391)
> Thing is, Objective-C was the official language on iOS, and yes they did release C++ support, it is called Objective-C++ and exists since NeXTSTEP days.

I am well aware, I have used Objective-C++ myself, but it's irrelevant. No, you cannot write iOS apps completely in C++. you still have to use Objective-C or Swift when dealing with UI components.

Further, Objective-C is not "just" a programming language, in this case. All of Apple's native frameworks are very strongly influenced by it. They allow you to do things that wouldn't be possible in other languages.

Obviously, it's possible to translate that experience to something else (see Swift), but it's an entirely different experience. Worse, in my opinion.

The same is true of Flutter and Dart. A lot of Flutter's architectural decisions are tied closely to the strengths (and weaknesses) of Dart. It would not make sense to switch to a different implementation language at this point.

Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by pjmlp on Thursday January 03, 2019 @11:46AM (#18816485)
Which is why Fuchsia is getting an UI agnostic composition engine, where Flutter is just another possibility.

While there are experiments in a Rust based UI and now Android.

I bet just like Brillo original plans, Flutter is on its way out.

Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by hawski on Thursday January 03, 2019 @05:51PM (#18820129)
By UI agnostic composition engine do you mean like Wayland? So every app is supposed to paint itself?
Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by pjmlp on Friday January 04, 2019 @01:13AM (#18822308)
Every app is supposed to paint itself on any UI toolkit.
Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by hawski on Friday January 04, 2019 @06:56AM (#18823392)
So what makes UI agnostic composition engine different from other composition engines?

Your answer means just a yes or "your question is irrelevant"? If the latter what I meant is a difference between Wayland and X. Wayland is a dumb pipe. X is mostly used as a dumb pipe, but it offers primitives to do the painting on the server side. Linux or Wayland does not have UI toolkit, but i.e. GNOME has.

Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by pjmlp on Friday January 04, 2019 @02:00PM (#18826661)
Scenic (https://fuchsia.googlesource.com/garnet/+/master/docs/ui/sce...) is similar to the UI compositor in Android, macOS, Windows.

No different than using the UI toolkit of choice, while the window manager takes care of window decorations, OS input events and what have you.

Just push the window contents into the scene graph using Fuchsia IPC.

Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by jcelerier on Thursday January 03, 2019 @05:55PM (#18820173)
> No, you cannot write iOS apps completely in C++.

that's false. At least Qt supports deploying to iOS and you don't have to write a single line of objc

Re:Google’s Fuchsia OS Confirmed to Have Android App Support... by distances on Thursday January 03, 2019 @01:02PM (#18817321)
I would rather think some of Flutter's current rise in popularity is because it's not JavaScript.