News for hackers. Stuff that matters.
Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by ceronman on Tuesday January 10, 2017 @07:26PM (#13370674)
You don't always have to jump to the hype train! Yes, you don't hear much about Dart here on HN, but the project is far from dead. The most important thing is that Dart works, it's stable and production ready and it's being used in production not only by Google but also by other companies.

Dart is a very refreshing change for front-end development. No fatigue! Great tooling, nice language without surprises and optional static typing.

On the backend you get probably the fastests dynamic language out there, maybe competing only with LuaGIT.

The new Flutter for high performance mobile app development looks seriously awesome. I specially love the instant live reloading.

Dart's package ecosystem (pub.dartlang.org) seems healthy with constant updates and new packages.

I have no idea how TIOBE works, but I find weird that people accuse Google of manipulating it to promote Dart. I believe it's the opposite, Google has done very little to promote Dart, and that's why you don't hear about it very often. I believe the project deserves more promotion because it's seriously good. Give it a try one of these days!

EDIT: I do not work for Google

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by pjmlp on Wednesday January 11, 2017 @02:04AM (#13372302)
For me the project died when Google decided it wasn't worth it to support it any longer in Chrome and Angular team decided to use TypeScript instead.

Regarding Flutter, I watched the conference where it was presented and none of the devices I own was able to launch the application.

https://play.google.com/store/apps/details?id=io.flutter.gal...

Unless Google does actually use the language to the point a few well known companies think it is valuable to use in their own products and talk about it, e.g. "X rewrote Z in Dart", I don't see much of a future to the language.

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by devsquid on Wednesday January 11, 2017 @04:16AM (#13372739)
I feel your sentiment. But I always thought getting browsers to adopt Dart was a crazy and impossible idea. I was actually glad when I heard they had abandoned that plan.

Flutter confuses me. Its annoying you have to use their DSL for layouts rather than HTML and what about native widgets, like WebViews or VideoPlayers?

With them drastically speeding up the Dart2JS compiler and implementing a strong typed mode, I am quite pleased with Dart's direction.

I do still fear for its future. It would be really to sad to see Dart die. The last web app I made, I was able to make the entire thing in under 90kbs, including HTML, CSS, SVGs, and JS. Dart allows me to write desktop like applications for the web with any extra overhead.

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by chriswarbo on Wednesday January 11, 2017 @11:39AM (#13375173)
> I feel your sentiment. But I always thought getting browsers to adopt Dart was a crazy and impossible idea. I was actually glad when I heard they had abandoned that plan.

I agree; a saner approach than adding one particular language at a time to browsers is to give browsers support/hooks which arbitrary language implementors can target, without having to perform gymnastics like compiling to JS.

It looks like WebAssembly is (at least the first step) in that direction, so Dart and others can use that as and when it matures, without creating a legacy of language-specific issues for future generations of Web implementors and archivists do deal with.

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by zeveb on Wednesday January 11, 2017 @11:41AM (#13375201)
> But I always thought getting browsers to adopt Dart was a crazy and impossible idea.

I don't know — browsers are already planning to adopt a non-JavaScript language (WebAssembly); it's entirely possible that maybe, just maybe they might start to support more than just the late-90s mistake which is JavaScript.

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by pjmlp on Wednesday January 11, 2017 @01:43PM (#13376341)
As someone that enjoys more developing native apps than web ones, I imagine Web Assembly will eventually be the revenge of plugins.

How long it will take for Canvas/WebGL + WebAssembly frameworks to appear?

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by devsquid on Wednesday January 11, 2017 @04:30PM (#13377653)
Eventually someones going to create a XML based layout language to use to construct views in the Canvas, we could even call it HTML ;)

I'm not a web developer either and I look forward to WASM and its potential. But I really like HTML, I've used lots of layout languages before and I think HTML is the best I've used. The only thing I find HTML to be obtuse about is complex animations.

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by pritambarhate on Wednesday January 11, 2017 @03:22AM (#13372544)
> For me the project died when Google decided it wasn't worth it to support it any longer in Chrome and Angular team decided to use TypeScript instead.

For me too. I have spent 3-4 hours looking through the samples etc. But even with TypeScript being so popular, it's hard to find quick samples for tasks one wants to do. So investing in one more new language didn't seem that attractive.

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by munificent on Wednesday January 11, 2017 @11:17AM (#13374965)
> Unless Google does actually use the language to the point a few well known companies think it is valuable to use in their own products and talk about it

https://www.dartlang.org/community/who-uses-dart

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by mraleph on Wednesday January 11, 2017 @03:03AM (#13372485)
> Regarding Flutter [...] none of the devices I own was able to launch the application.

Is it still the case that none of your devices are able to launch Flutter Galler App? In an unfortunate coincidence the build that was published to Play Store right before the Dart Summit was flawed and declared that it is incompatible with most of the devices except for latest generation ones. This was rapidly fixed - but fixed build did not get into the Play Store on time.

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by longsigh on Wednesday January 11, 2017 @03:39PM (#13377308)
I just checked my Moto G 3rd generation again and it doesn't work. There is a corresponding open issue, but it makes me leery about using it for now.

https://github.com/flutter/flutter/issues/5737

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by pjmlp on Wednesday January 11, 2017 @05:15AM (#13372932)
I didn't bother to test it again.

Just tried it now on a Samsung S3 (Android 4.3).

It does launch now, just the rendering is a bit wrong.

The Android Application bar overlaps with the one generated by Flutter, thus only showing the lower half.

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by mraleph on Wednesday January 11, 2017 @05:47AM (#13373053)
Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by pjmlp on Wednesday January 11, 2017 @06:07AM (#13373132)
Yes, that is the one.
Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by on_and_off on Wednesday January 11, 2017 @10:32AM (#13374593)
>"X rewrote Z in Dart"

I don't believe I has any chance to happen this way.

I work on a big mobile app, I can see us adopt Kotlin, since we can mixup java and kotlin naturally (it outputs bytecode, so it is very interop). Flutter ? Even if you fix the runtime (and that's a big if), it means rewriting the whole app from scratch.

What I can see happen is google releasing Fuchsia as the future of Android and flutter on Android as a way to bridge the gap.

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by shagie on Tuesday January 10, 2017 @09:25PM (#13371249)
As noted in http://www.tiobe.com/tiobe-index/ the changes in google's indexing algorithms caused massive swings in their index. If you search google for "Java programming" and "C programming" you'll note approximately the same ratio of the "Java ratings" to "C ratings".

The results of the toibe index are heavily influenced by google's search.

People working on Dart working at google would likely be familiar with how to create a page that has improved google visibility compared to say... the R or objective C communities. This isn't a "ohh, nefarious!" type thing but rather a "how to make a web page that conforms to everything that google search would want" is part of the way one would think.

It is possible to game tiobe given that its strongly influenced by google's search results. If you go glance at delphi's history in 2008, you'll see gamification of it - http://web.archive.org/web/20120312021442/http://delphi.org/... http://web.archive.org/web/20120312021416/http://delphi.org/... http://web.archive.org/web/20120312021435/http://delphi.org/... - and then you go look at the graph for delphi, and you'll see http://www.tiobe.com/tiobe-index/delphi-object-pascal/ .

Simply having well crafted pages that get indexed well for Dart would be sufficient to bump a language on Tiobe. And that's why its all a load of marketing.

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by munificent on Wednesday January 11, 2017 @11:24AM (#13375018)
Hi, I'm on the Dart team.

The people who work on dartlang.org do try to make it search friendly, of course, but I don't think anyone on the team takes TIOBE very seriously.

According to their chart, C lost half of its popularity in 2016, and Delphi is more popular than Go and Objective-C.

I could be wrong, but I think the spike in Dart's popularity recently is mostly because there was a world championship in "dart" (the pub game) recently.

The primary goal of the TIOBE index is not to accurately measure language popularity, it's to increase the popularity of tiobe.com. And, at that, they're doing a great job.

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by bitmapbrother on Wednesday January 11, 2017 @12:15AM (#13371936)
>The results of the toibe index are heavily influenced by google's search.

From TIOBE:

The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. It is important to note that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by TheAceOfHearts on Tuesday January 10, 2017 @08:27PM (#13371000)
I've looked into Dart a few times and thought it looked interesting, but never really dug much into it. I've also really only heard of it being used in Google. Oh, and I remember hearing Notch was using it in a game jam a few years back.

I saw Flutter when it was first announced, and something that caught my eye back then was that it looked like it took some inspiration from React. I'm a big fan of React. Their home page [0] says: "Note: Flutter is an early-stage open-source project. We hope you try Flutter out and send us feedback." Would you say it's ready for production?

Could you provide other examples of use-cases for which you'd use Dart? Does it have good editor integration for autocompletion and linting? Is debugging painful? One of my favorite things about JS is Chrome Dev Tools.

I don't mean for this to come off as rude or negative, but I'd be interested in hearing a bit about where you consider the language or ecosystem falls short. I find discussing the downsides, limitations, and problems helps in understanding the tool and setting expectations. Nobody expects a magic wand solution, of course.

One of my pain points from working with a large SPA is architecting the application so it's easy to lazily views as needed. By itself it's not very difficult, but getting the whole build / development / test environment workflows setup is more challenging to get right. Does Dart have good tooling for generating builds? I use Webpack with the large JS SPA I work on, and one of its killer feature is that it'll crawl the dependency graph, copying assets to the output folder, and updating references. Unfortunately, the default behavior makes it most easy to generate a single large JS bundle.

[0] https://flutter.io/

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by ceronman on Tuesday January 10, 2017 @08:44PM (#13371070)
I haven't used Flutter yet, and I think it's probably not production ready yet, but I think it has a lot of potential.

Regarding editor support, it's been great from the very beginning. A few years ago, the Dart Editor was a pleasure to use and nothing else in frontend development was even close, this was before vscode existed. It had integrated debugger and code completion worked really well, it's a bit sad that they decided to discontinue the editor, but these days WebStorm has all the features and more. There are also Atom and vscode plugins but I haven't tried them.

Debugging experience I think it's one of the highlights of Dart tooling. The observatory tool is great and it not only helps with debugging but also with profiling. I seriously recommend it.

More good tooling in Dart includes the package manager which is very well designed and easy to use, and the code formatter which just does the right thing.

Where it falls short: JavaScript interoperation. There is some, but very limited. They are working on it, but it's not quite there yet.

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by munificent on Wednesday January 11, 2017 @11:28AM (#13375055)
> Does it have good editor integration for autocompletion and linting?

Yes, we have full IDE support in IntelliJ with auto-complete, go to definition, find references, and all the other navigation stuff you expect from a modern typed language.

Similar features are integrated into most other editors too, though I'm not as personally familiar with them. I know we have a lot of people using Dart with Sublime, Atom, Emacs, and Vim.

> Is debugging painful? One of my favorite things about JS is Chrome Dev Tools.

There's debugger integration into IntelliJ and Atom. If you're using the dev_compiler[1], it generates human-friendly JS that you can step through, and also generates full source maps[2]. That all works really nicely with Chrome Dev Tools.

The VM also includes a really powerful profiler/debugger[3] that you can connect to with a browser to poke around and see what's going on in your running program.

[1]: https://github.com/dart-lang/sdk/tree/master/pkg/dev_compile...

[2]: https://www.html5rocks.com/en/tutorials/developertools/sourc...

[3]: https://dart-lang.github.io/observatory/

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by j1436go on Wednesday January 11, 2017 @01:22AM (#13372154)
I'm missing autocompletion for vim.
Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by bitmapbrother on Wednesday January 11, 2017 @12:11AM (#13371922)
The Chrome Dev tools are nice, but I'll take full integration with IntelliJ IDE any day.

https://flutter.io/intellij-ide/

Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by devsquid on Tuesday January 10, 2017 @07:31PM (#13370700)
The one issue I had with Dart, was typing was optional. But at the last DartCon they announced they are creating a strong typed mode, which forces typing and type correctness and it generates higher preforming code. Yay!
Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by leftrightupdown on Tuesday January 10, 2017 @07:35PM (#13370728)
i think strong typing generates same code as optional typing if you are not using dart dev compiler.
Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by dragonwriter on Tuesday January 10, 2017 @08:00PM (#13370859)
When you say the "dev compiler" are you referring to the DartVM? While (embedded in Dartium browser) that's used for dev convenience for front-end, it's also (without the browser, obviously) the main target for back end Dart.
Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by devsquid on Tuesday January 10, 2017 @08:04PM (#13370882)
The dev compiler translates Dart code into human readable JS code. So you can write a library in Dart and still provide JS code someone could realistically adapt to their environment or if Dart were to go away it would allow you an easy path of escape.
Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by munificent on Wednesday January 11, 2017 @11:29AM (#13375063)
That's true today, but we're integrating strong mode into the VM and dart2js right now. Soon, the whole platform will have full support for it and all of the benefits you get from a sound type system.
Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by devsquid on Tuesday January 10, 2017 @07:53PM (#13370813)
I think they mentioned some gains in the size of the compiled JS. I don't remember tho.
Re:Dart in 2016: Fastest growing language at Google, 2nd fas... by stonemetal on Wednesday January 11, 2017 @11:47AM (#13375250)
TIOBE goes to Alexa goes down the list and gets the top 25 sites that have a search box on the front page, and will tell you how many results come back from a search(this means odd choices like ebay are in the mix). 15 of the 25 are Google owned ie google.com, google.fr, youtube.com. They then search for "X programming" and use the reported number of results.

Therefore it would be very easy for someone at google to manipulate the index. I am not sure why they would bother since the index means nothing. There are much easier ways for Google to make Dart a thing if they wanted it to be a thing.