Stream

Join this community to post or comment

Shawn Drape

Discussion  - 
 
Doing some research into ES6 Promises and comparing them with Dart's Futures, I encountered some functionality that I don't see a parallel for; providing input to a generator. (ie. iter.next(32) from the example under "Fulfilling")

Is there a corresponding Dart method, and if not what was the discussion/rationale behind the current implementation?
Introduction. One of the most exciting features introduced in ES6 is generators. Their primary use case is in representing lazy (possibly infinite) sequences. For example, the following function returns the first n positive integers. function count(n){ var res = [] for (var x = 0; x < n; ...
1
Anders Holmgren's profile photoLasse Reichstein's profile photo
6 comments
 
As for why iterators/generators don't take an argument in Dart, it's as simple as it never coming up when they were designed. Iterators are intended as an abstraction over accessing the elements of a collection of elements, just as iterators/enumerators in Java and C#. 
The design in JS6 seems to be more related to coroutines than to iterators - which is perfectly fine, and probably could only happen in a language that introduces generator functions at the same time they introduce iterators.
Both Dart and C# had iterators before they introduced async functions and generators, so the  concept were not linked at design time - iterators came first, generators were made to match iterators. So that's why "moveNext" doesn't take an argument, and that in turn is why "yield" in a generator is a statement, not an expression.


Now, the next question is whether it's possible to write a co-routine/JS6-like generator in Dart.
We can easily do a Generator class extending Iterator and give "moveNext" an optional parameter. It won't be able to pass anything back to existing iterators, but a new iterator written from scratch could use the value. But it won't interact well with sync*/async* functions because there is no way to put the value in there since yield is a statement.
Add a comment...

Emil Persson

Discussion  - 
 
I really think we should have search/add functionality with pub. Similar to composer search/require and npm search/install --save. It's kind of a pain to have to go into the browser to search for everything. Is there a pub public API? In that case, one could just create a little helper program!
3
Günter Zöchbauer's profile photoEmil Persson's profile photo
5 comments
 
What a great world we live in where we can want something, ask if it exists, and get a link to the very thing we're looking for.

This of course goes for both google.com and the Dartisans community ;)
Add a comment...

Thomas Løcke

Discussion  - 
 
I've tried my hand at the Dart emacs mode, but I can't for the life of me make it work properly. When I save files, it keeps yelling at me that it can't do automatic syntax checking, which is correct, since it appears to accept even the most insane stuff without reporting any kind of errors/problems.

I do get somewhat functional syntax highlighting, but is that really all this mode is supposed to do?

Anybody here with Dart/emacs experience who'd be interested in writing a short tutorial on how to get it going, and what it can do?
2
Seth Ladd's profile photoThomas Løcke's profile photo
2 comments
Add a comment...

Peter StJ

Discussion  - 
 
How would you guys rate webstorm dart support when it comes to easily writing code?

I am trying to migrate from DartEditor to WebStorm, but I cannot understand how to do things in WebStrom.

In DartEditor everything was intuitive: when unsure press ctrl+/, list of all public props and methods comes up along with documentation, scroll and find what you might need.

Then lets say a method call is chosen - dart editor automatically gave hint on the params and types. Still unsure - press ctrl+/ again. Lets say we chose to create new instance of class to pass to the method. Not sure what params are there possible for the constructor - press ctrl+/ again... etc, you get the idea.

WebStorm simply does not do that, ctrl+/ only works in the first step, also no help docs are displayed (ctrl+q to show it, that's already two key combos). Couldn't find a way to show parameter types again once between the parenthesis nor to list named params for the call etc.

Maybe I need to learn some more key combos? Or maybe its just that webstorm support for dart is not on par with what DartEditor was providing for writing fast.

Is there a howto/wiki on how to migrate and have all the supported darteditor features in webstorm? (including the ones I mentioned - I loved dart especially for that I do not need to remember method names and call params - the editor was helpful enough with that and providing param naming is clear enough it freed me from remembering those things).

Thank you.
4
Seth Ladd's profile photoDakota Pitts-Price's profile photo
5 comments
 
There is certainly a learning curve to the Jetbrains IDE, but once you learn it its very worth it!
Add a comment...

Eric Koston

Discussion  - 
 
Hi all
Can someone show me, how to use metadata in dart? I saw on Redstone, they use metadata for routes, how they do that?
1
Eric Koston's profile photoGünter Zöchbauer's profile photo
3 comments
 
It's not very difficult. Annotations are just constants prefixed with `@` and an API to acquire them. You should be aware that using mirrors leads to code-bloat for client-side code because dart2js tree-shaking can't know anymore what needs to be retained. You can guide dart2js by adding MirrorsUsed annotations. The `reflectable` package (wip) is an approach to make this easier. 
Add a comment...
 
Awesome-dart is curated list of awesome Dart frameworks, libraries, and software.

It aims to be the definitive guide to what is popular and used by the community, but in order to meet that goal it needs your help!

If you know of an awesome Dart library that isn't already in the list, please create a pull request to add it (just make sure to read the contribution guidelines first). Or if you see something in awesome-dart that you don't believe should be there, create an issue asking for it to be removed.

Awesome-dart is a project by the community, and for the community, so let's all work together to make sure it stays awesome!
awesome-dart - A curated list of awesome Dart frameworks, libraries, and software
23
6
Guillaume Girou's profile photoThomas Schranz's profile photo
Add a comment...

Mike Mitterer

Discussion  - 
 
What do you think about Dart dependency management?
84 votes  -  votes visible to Public
Works fine
49%
It's OK for me
44%
It's broken - Dart Team please fix it
7%
3
Günter Zöchbauer's profile photoRay King's profile photo
13 comments
 
As far package management go's we have it good... Close your eyes and cask your mind back to maven, or spend a Tuesday afternoon hunting down bower issues... I don't think I will see in my lifetime the 'perfect' package manager, but I thankful for Pub....  More importantly we just have one. +Don Olmstead the last thing I want to see us breaking this one unified approach which we have and that works..
Add a comment...

Faisal Abid

Discussion  - 
 
Dart has Google IO presence! If you are going to be at IO, come visit +Jana Moudrá​ and I at the Tech Pod day 2!
34
1
Seth Ladd's profile photoKasper Lund's profile photoGuillaume Girou's profile photo
2 comments
 
Enjoy and rock on! 
Add a comment...

Jack Murphy

Dart Dares  - 
7
Jack Augmate's profile photoChristoph Lachenicht's profile photo
6 comments
 
The RouterLink works only outside of the <router-outlet> element and you need to add the Anuglar transfomer with "mirror_mode: verbose". Sorry not to help with your use case.
Add a comment...

Kenneth Endfinger

Announcements  - 
 
This is interesting.... I like it, I like it a lot.

https://github.com/lrhn/dep-const/blob/master/proposal.md
9
Andres Araujo Azua's profile photoChristoph Lachenicht's profile photo
2 comments
 
+Andres Araujo Azua  you could write in the constructor "router.config({'path'... }). looks better, my opinion. 
Add a comment...

Created by

About this community

This is a place to talk informally with other Dart developers. We welcome all Dartisans, be they curious, experimenting, or experts. Use g.co/dartisans to find us!

Santi Fri

Announcements  - 
 
Today participated in a music contest created in DART platform ... out in the previous Google IO.
Hoy participo en un concurso musical de una plataforma creada  en DART...salió en el anterior Google IO.
 If you like, give it 5 stars. :-)
https://www.soundtrap.com/aceofbase?id=121464
 ·  Translate
7
1
Davy Mitchell's profile photo
Add a comment...

Emil Persson

Server-side  - 
 
Wrote a blog post on deploying Dart apps with Git, and running them as a service. NOTE: Havent tried the whole process out so I might have missed som permission stuff and such.
Deployment with a shared host is always awkward. You need an FTP client, and credentials to access some part of the web directories. Then you need to remotely set up your production database, and it's just not a very pleasant...
5
2
Dmitry Titov's profile photoThomas Schranz's profile photo
Add a comment...

Peter StJ

Discussion  - 
 
I have a question: I read a suggestion on Dart website how to make sure our dart code runs fast when compiled to JS. One of those was 'Avoid setting variables to null'.

Can you elaborate on that - why is this translating into slower JS code?
2
Justin Fagnani's profile photoPeter StJ's profile photo
17 comments
 
+Justin Fagnani is this actually happening for dart (nonnullable)?
Add a comment...

Wojciech Kłujszo

Announcements  - 
 
Dart in TOP 30 :)
TIOBE Index for May 2015. May Headline: Visual Studio languages on the rise. The biggest climbers in the TIOBE index compared to last year are C++ (+1.89), C# (+1.52) and Visual Basic.NET (+1.70). These three programming languages are also the key languages of Microsoft's Visual Studio.
2
Add a comment...
 
 
#dartlang  tool writers. Help me here.

Let's standardize on some nomenclature.

projectDirectory is the thing that contains pubspec.yaml
packageRoot is the directory that contains package sym-links.

Usually, packageRoot is projectDirectory/packages

Let's try to keep our naming a bit consistent so we don't confuse the heck out of people. :-)
4 comments on original post
2
Add a comment...

Peter StJ

Discussion  - 
 
After the recent information of dartEditor's retirement, I took the time to try the new approach for installing dart for local development.

Dart-sdk is available for 32bit linux but is Dartium also available pre-built for 32 bit? The link is say 64.... Do I have to re-install all my machines now?
2
Peter StJ's profile photo
 
I found it - its under 'other releases'. Kind of misleading, but still there:)
Add a comment...

Eric Koston

Discussion  - 
 
Just discover, that Dart is very nice language, hopefully dart team is going to embedded dart into JVM.
Makes fun to code in dart,  great job dart team.
Thanks
#java   #dart  
4
Filipe Morgado's profile photoEric Koston's profile photo
3 comments
 
I think Dart -> Java bytecode like Scala would be great.
Add a comment...
 
Hi, Dartisans! If you like WebStorm and polymer, please vote for feature. It makes WebStorm to recognize core-style as plain CSS.
11
2
Eric Koston's profile photoJustin Fagnani's profile photoVáclav  Pavlíček's profile photoDavid Garcia Alonso's profile photo
7 comments
 
core-style is gone. Now you need to ask JetBrains to support custom CSS properties and
Add a comment...

Jonas Kello

Discussion  - 
 
Has anyone successfully integrated pre-made JS react components into Dart using the react pub package? Eg. is it possible to use the components listed here in Dart?

http://react-components.com/
Searchable repository of React-components
4
Jonas Kello's profile photoDan Schultz's profile photo
10 comments
 
+Jonas Kello I had to export the components globally. I'm attempting to use browserify to package up the material design components and react.js that's packaged with react-dart. I haven't been successful yet tho..

If anyone has gotten this working would love to hear how you did it. Getting all these files bundled up and playing nice with each other is a nightmare in JS.
Add a comment...
 
Your thoughts on Dart server application deployment required ...
moved discussion from https://github.com/dart-lang/sdk/pull/6 @eernst I remember having a discussion (I think with Bob) because I suggested only deleting the build sub-directory which is currently built instead of purging `build` completely each time `pub build xxx` i
11
1
Guillaume Girou's profile photo
Add a comment...