News for hackers. Stuff that matters.
Re:Dart 1.5 by ben336 on Friday June 27, 2014 @12:49PM (#7954922)
Is anybody using Dart for significant production code outside of Google? (Not mocking, genuinely curious to hear whats being done with it)
Re:Dart 1.5 by adrianlmm on Friday June 27, 2014 @01:15PM (#7955088)
I use Dart in production, it has its advatages like:

1.- It is better than JavaScript, is like using C# with a litle mix of Java.

2.- It comes with its own libraries, no more underscore.js or other patch libraries that JS needs, it is already in the toolkit.

3.- It comes with the Dart Editor, where you can debug your code easily, for scalable projects I find this to be invaluable.

4.- It will run in all your browsers, because it will export your code to JavaScript, but not only export it, it will optimize it and will run really fast.

5.- The pub library, go to pub.dartlang.org and you will find lots of packages that you can install and use, like a bootjack, a bootstrap port in Dart.

There are prolly many more, but these are the ones that come to my head right now.

But it also has its own problems like:

1.- No Dart support for Chrome yet and we don't know if there will ever be at this point.

2.- The generated JavaScript will be huge, and I mean huge, mine is like 460k per file and I'm not using polymer, when I used polymer the generated JavaScript was over one megabyte, just insane in the cloud.

3.- Get use to regressions, with every point update I've have issues, I upgraded from 1.4 to 1.5 two days ago, now my code is broken It runs, but it will for example run futures twice, So I went back to 1.4 for now, I had some other issues with UTF when migrating from 1.3 to 1.4 so, get use to.

4.- They are slow fixing bugs, looks like polymer and speed are their priorities, but when you need something trivial that other languajes have had for years and you report a bug it will get ignored, I've waited for 18 months and my open bugs are not fixed yet.

I would say that Dart is nice and you should give it a chance.

Re:Dart 1.5 by pyre on Friday June 27, 2014 @02:37PM (#7955555)
> 2.- The generated JavaScript will be huge, and I mean huge, mine is like 460k per file and I'm not using polymer, when I used polymer the generated JavaScript was over one megabyte, just insane in the cloud.

If you include all of your 'standard' libraries in a JS app, it can be pretty big. I basically pull everything together for an Ember app I work on, and all-told it's ~3MB prior to minification. Minification takes it down to ~1.5MB, and Gzip-compression on the server takes it sub-1MB (can't recall the number off-hand). It's not that far off from what you might have in a JS-heavy app.

Re:Dart 1.5 by lennel on Friday June 27, 2014 @02:42PM (#7955596)
Tree shaking is what you lack (yes I know Dart has tree shaking but its cross compilation has a big result)! I love the closure compiler in advanced mode for this reason.
Re:Dart 1.5 by sethladd on Friday June 27, 2014 @03:04PM (#7955723)
Thanks for the helpful feedback! The latest version of Polymer.dart removes the need for reflection at compile time, and our output is much smaller today. Curious when you last tried compiling a Polymer Dart app?

[disclaimer: I work for the Dart team.]

Re:Dart 1.5 by adrianlmm on Friday June 27, 2014 @08:27PM (#7956930)
The last time I used polymer was in Dart 1.3 I believe, then I migrated all to "dart:html" and started managing all the DOM events my self, so, I'm afraid I can't give you that information. Btw, thanks for your hard work, I really apreciate it.
Re:Dart 1.5 by sethladd on Friday June 27, 2014 @10:03PM (#7957182)
Our pleasure. If you're curious, I'd recommend trying Polymer.dart again. The latest version (0.11) has a transformer that replaces the reflection code with static code. The resulting output is much smaller. :)
Re:Dart 1.5 by GrandTheftR on Friday June 27, 2014 @01:30PM (#7955166)
Given the size of the generated JS file, do you find it is an issue?
Re:Dart 1.5 by adrianlmm on Friday June 27, 2014 @01:35PM (#7955190)
When you host your Project in the cloud and you pay for the bandwidth quota then you learn the value of small generated JavaScript, but if it is a Project where bandwidth does not generate a cost like an intranet or VPN, then it doesn't really matter.
Re:Dart 1.5 by u124556 on Friday June 27, 2014 @01:54PM (#7955309)
Does it have anything like AngularJS?
Re:Dart 1.5 by spankalee on Friday June 27, 2014 @02:37PM (#7955557)
As mentioned already, there is AngularDart, but we also have a full port of Polymer to Dart, so you can write web components in Dart.

https://www.dartlang.org/polymer-dart/

We also have Dart packages for the Polymer project's core-elements and paper-elements (Material Design, nee Quantum Paper) that were announced at I/O.

http://pub.dartlang.org/packages/paper_elements

Web components and Dart is a really powerful combination for apps.

Re:Dart 1.5 by iagooar on Friday June 27, 2014 @02:04PM (#7955373)
It has AngularDart, an official port of AngularJS to Dart. Seems promising, will try it if and only if Dart gets native support in Chrome.
Re:Dart 1.5 by Punoxysm on Friday June 27, 2014 @02:04PM (#7955372)
Re:Dart 1.5 by adrianlmm on Friday June 27, 2014 @02:03PM (#7955365)
Yes, it has AngulartDart.
Re:Dart 1.5 by smizell on Friday June 27, 2014 @01:03PM (#7955005)
I think Blossom [1] switched to it. They had some articles on their blog about the switch [2].

[1] https://www.blossom.io/ [2] http://www.ramen.io/post/46936028144/we-are-switching-to-dar...

Re:Dart 1.5 by tosh on Friday June 27, 2014 @02:43PM (#7955599)
Thanks for the mention (CEO here).

We're super happy with Dart & really excited about polymer. Love the language & platform in general.

We'll put out some essays, code snippets & lessons learned in the next few days :)

Stay tuned.

Re:Dart 1.5 by amartya916 on Friday June 27, 2014 @02:51PM (#7955657)
Yup. At Sendbloom.co we have used Dart to build a tool that is used by sales people to send out email campaigns. The tool is inspired by quartz composer/Max MSP's interaction paradigms (drag-and-drop visual programming). As someone else mentioned, Dart code can be fairly verbose, but it is very readable and programming with it is a joy when compared to writing vanilla javascript/jquery. I'd be happy to answer if you have any other questions about Dart.
Re:Dart 1.5 by spankalee on Friday June 27, 2014 @09:48PM (#7957159)
I would love to see a demo of that!

And how are you finding Dart to be verbose? In my experience it can be more concise than JS because of short lambdas, no function keyword, method cascades, real classes, the fluent Iterable and Stream interfaces.

On the other hand, I see some Dart programmers use a lot of classes and type all their variables. I'm curious what ended up being verbose for you.

Re:Dart 1.5 by mda on Friday June 27, 2014 @01:03PM (#7955004)
Re:Dart 1.5 by gsnedders on Friday June 27, 2014 @02:15PM (#7955438)
Surprisingly few Google properties on there, I must say. Yes, many most certainly have large existing code-bases, but that it doesn't include things like the new Google Maps (which, AIUI, has relatively little in common with the old version) seems… interesting.
Re:Dart 1.5 by spankalee on Friday June 27, 2014 @02:39PM (#7955571)
Google Maps was almost certainly started before Dart was released.