--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.
In the immediate future, wasm is just a smaller binary encoding of asm.js. It still has the same constraints as asm.js which make it a worse compilation target for high level languages than JS itself is. Primarily, that's:1. No GC.2. No DOM access. (Specifically, no references to DOM objects.)If you want to compile a garbage-collected web application language to something that runs on a browser, you need those. JS has them and asm.js/wasm don't.Cheers!- bob
To add to Bob's assessment it also is targeting C/C++ not every language under the sun.
--
WebAssembly is what everybody has been waiting for, since long ago. It tries to solve the same problem as Dart, except its language is lower level, more suitable and flexible as a compilation target, and apparently agreed upon by all major browser vendors.
WebAssembly is what everybody has been waiting for, since long ago. It tries to solve the same problem as Dart, except its language is lower level, more suitable and flexible as a compilation target, and apparently agreed upon by all major browser vendors.Somehow I have the impression people just desire WebAssembly to be what they are waiting for without caring much what it actually is.
--
@Bob. From Brandon's blog post it sounded like the first step was to polyfil with a asm.js parser and the second step was getting the GC in place.I'm guessing it will be sooner rather than later that WebAssembly allows for GCed memory management.
Dart is written in C++ and somehow WASM is aiming for C++ languages, doesn't that help even a little? Now, totally assuming it doesn't, couldn't the GC (and other language features) be included on an "import" before hand or compiled into the byte-code itself?
--
asm.js is an experiment of Mozilla ;) :) and rustlang is alsof from them right?
I don't think WebAssembly (wasm) will ever support big integers, and the lack of fixed-size arithmetic in Dart seems problematic.
I'm not sure what mozilla is getting out of this, but I'm glad they are a part of it as they have generally been the biggest proponents of "Only javascript here!" for a while now. The change of tune is refreshing.
asm.js is an experiment of Mozilla ;) :) and rustlang is alsof from them right?
@Brendan why is there an emphasis in no GC? According to @Bob this is a mayor limitation on many for languajes that might want to target wasm.
--
@Brendan why is there an emphasis in no GC? According to @Bob this is a mayor limitation on many for languajes that might want to target wasm.
To add to Bob's assessment it also is targeting C/C++ not every language under the sun.
Somehow I have the impression people just desire WebAssembly to be what they are waiting for without caring much what it actually is.
--
Rust doesn't need a gc so it should be on the list....
Rust doesn't need a gc so it should be on the list....
from https://github.com/WebAssembly/design/blob/master/HighLevelGoals.md. Notice how languages other than C/C++ are a later feature.
You should probably curb your enthusiasm. Its a good start but its nothing to get excited about yet.
I've often thought that the best interface to a dynamic runtime would be a truly abstract AST rather than source code. Agree on the modern semantics - lexical bindings, closures/first class functions, classes with ref and value semantics, good core primitives/collections with ideally built-in concurrency /co-routines. End religious wars over syntax. Transformations would be tree to tree.
The more enthusiasm for projects like this, the faster and further they will go. Enthusiasm should never be curbed.
The more enthusiasm for projects like this, the faster and further they will go. Enthusiasm should never be curbed.
Can't agree with this at all.There are so many people claming everything they think might attract some attention.What's needed more than enthusiasm is critical thinking and investigating if the right questions were asked.
--
Lets imagine a say Python and Dart have compilers for wasm in a distant future, would it be possible to call instantiated objects from Python in Dart and vice-versa? Whats the story here?
--
Why would you want to use JavaScript crutches outside of JavaScript?
When doing Dart HTML development I've never found the need for $ because you can use object oriented principles to solve the same problem in a much better and more scalable way.
The idea of interfacing with a runtime via an AST is interesting. Especially if the AST has both a readable text format and a dense binary format and can round-trip between the two losslessly. Sidesteps issues with trad byte code in Java/Flash/Dotnet.I suggested something similar at core-dev - but for the higher level dynamic side of things:I've often thought that the best interface to a dynamic runtime would be a truly abstract AST rather than source code. Agree on the modern semantics - lexical bindings, closures/first class functions, classes with ref and value semantics, good core primitives/collections with ideally built-in concurrency /co-routines. End religious wars over syntax. Transformations would be tree to tree.The DartVM is basically a Smalltalk-like runtime, but the interface to this *dynamic* VM is source code with an awful *static* Java-like syntax. So the thing that makes this project interesting is lost.
If there was an AST interface it could be a target for language innovation/experimentation.
At the moment the source syntax and the DartVM are so intertwined that any changes are tricky/expensive. There's nothing wrong with syntax 'sugar' that transforms down to core semantics as long as it's straightforward, non-magical and can be reasoned about.
K.
On Thursday, June 18, 2015 at 9:11:52 AM UTC+1, tomaszkubacki wrote:Hello Dartisians,I'm very curious what this new WebAssembly ( https://github.com/WebAssembly ) initiative means for Dart in general.Will WebAssembly will be just another Dart's compilation target when it matures ?Thoughts ?Cheers,t.k
--
On Saturday, June 20, 2015 at 3:20:18 PM UTC+1, Cristian Garcia wrote:Lets imagine a say Python and Dart have compilers for wasm in a distant future, would it be possible to call instantiated objects from Python in Dart and vice-versa? Whats the story here?I think this is quite distant.
Javascript and perl render in depth tooling and code completiong/analysis nearly impossible since they are so dynamic.
Should our APIs use structures for efficiency, or classes for ease-of-use?
Eitherway, it don't imagine it interoperating well with JS's mutating type system.
(not that I would use it)
/be
On Sat, Jun 20, 2015 at 4:31 AM, kc <kevin...@gmail.com> wrote:The DartVM is basically a Smalltalk-like runtime, but the interface to this *dynamic* VM is source code with an awful *static* Java-like syntax. So the thing that makes this project interesting is lost.I think you're missing the very calculated reasons behind the static nature of Dart (and I don't find the syntax awful at all): toolability. The static features of Dart: the top-level of a Dart file is only declarations, not statements. Imports, classes, functions and typedefs are all declarations. No dynamic property access (without mirrors), is what makes Dart as statically analyzable as it is - as toolable as it is. That analyzability is a huge part of Dart's value proposition.
final Point p = new Point(1,1); // abomination
An AST would only enable different expressions of essentially the same syntax, basically by definition. You couldn't represent a construct that isn't representable already in the AST. ASTs don't define semantics, and having a standard AST wouldn't mean that you could do anything more dynamic that you could now.
At the moment the source syntax and the DartVM are so intertwined that any changes are tricky/expensive. There's nothing wrong with syntax 'sugar' that transforms down to core semantics as long as it's straightforward, non-magical and can be reasoned about.If you're just talking about syntax transformations, you can already do this with text formats... You can even go further than than syntax only transformations if you so wish.
On Mon, Jun 22, 2015 at 10:47 AM, Brendan Eich <brenda...@gmail.com> wrote:On Mon, Jun 22, 2015 at 10:41 AM, Daniel Joyce <daniel....@gmail.com> wrote:Javascript and perl render in depth tooling and code completiong/analysis nearly impossible since they are so dynamic.Please see https://docs.c9.io/v1.0/docs/autocompletion and many other such products.Oh, come on. JavaScript completers are usually very simple and dumb, based on extracting what look like symbols in files. Even when they do analysis (like Closure and Ternjs), they only work for a subset of the language and often rely on extra type information like JSDocs or TypeScript.
On Sat, Jun 20, 2015 at 7:59 AM, kc <kevin...@gmail.com> wrote:On Saturday, June 20, 2015 at 3:20:18 PM UTC+1, Cristian Garcia wrote:Lets imagine a say Python and Dart have compilers for wasm in a distant future, would it be possible to call instantiated objects from Python in Dart and vice-versa? Whats the story here?I think this is quite distant.Distant or not (we can wager, it's all speculation). I took kc's question "what's the story here?" to be asking about the plan of record. The answer (what, not when) is: one VM.So yes, Python or Dart on future wasm with GC, JIT, and other support would interop with the DOM and JS objects in one runtime, using one GC.On "when", I agree this "one runtime to rule them all" is a ways out ;-). Next year will be a stretch.
However, and this is why people are enthusiastic: getting onto the evolutionary path toward this plan-of-record future right now is much better than staying in a two-or-more-runtimes (three-or-more if you count C++ and JS as first two, in today's browsers) planning stage. That stage goes nowhere. (Sorry if I'm beating a dead horse!)
However, and this is why people are enthusiastic: getting onto the evolutionary path toward this plan-of-record future right now is much better than staying in a two-or-more-runtimes (three-or-more if you count C++ and JS as first two, in today's browsers) planning stage. That stage goes nowhere. (Sorry if I'm beating a dead horse!)Wither the DartVM given that it's not going into Chrome (or any other browser)?Well the reason I'm still interested in Dart are the Fletch and Sky experiments for mobile apps. Save us from Java/XML.Dart could give a developer the opportunity to create iOS and Android apps with either 'native' or Sky UI's. And there's still dart2js for the web.The Fletch concurrency story is especially interesting.Sky has selected Dart as it's scripting language.
The DartVM proper - which was planned for Oilpan/Chrome and currently runs in the server and Dartium - I'm not sure it pays for itself.
On Mon, Jun 22, 2015 at 5:08 PM, kc <kevin...@gmail.com> wrote:However, and this is why people are enthusiastic: getting onto the evolutionary path toward this plan-of-record future right now is much better than staying in a two-or-more-runtimes (three-or-more if you count C++ and JS as first two, in today's browsers) planning stage. That stage goes nowhere. (Sorry if I'm beating a dead horse!)Wither the DartVM given that it's not going into Chrome (or any other browser)?Well the reason I'm still interested in Dart are the Fletch and Sky experiments for mobile apps. Save us from Java/XML.Dart could give a developer the opportunity to create iOS and Android apps with either 'native' or Sky UI's. And there's still dart2js for the web.The Fletch concurrency story is especially interesting.Sky has selected Dart as it's scripting language.This is all good and should help level the (proprietor-controlled) native vs. web playing field.
The DartVM proper - which was planned for Oilpan/Chrome and currently runs in the server and Dartium - I'm not sure it pays for itself.The dead horse. Enough beatings!
/be
And by classes, I don't mean only DOM, but any class defined in any module. I wouldn't want JS to be able to override everything I statically declare.
JS has grown like a cancer (no offense). I wouldn't want it to infect such an ambitious project
project.
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.
On Mon, Jun 22, 2015 at 2:17 PM, 'Justin Fagnani' via Dart Misc <mi...@dartlang.org> wrote:On Mon, Jun 22, 2015 at 10:47 AM, Brendan Eich <brenda...@gmail.com> wrote:On Mon, Jun 22, 2015 at 10:41 AM, Daniel Joyce <daniel....@gmail.com> wrote:Javascript and perl render in depth tooling and code completiong/analysis nearly impossible since they are so dynamic.Please see https://docs.c9.io/v1.0/docs/autocompletion and many other such products.Oh, come on. JavaScript completers are usually very simple and dumb, based on extracting what look like symbols in files. Even when they do analysis (like Closure and Ternjs), they only work for a subset of the language and often rely on extra type information like JSDocs or TypeScript.And Dart's unsound type system differs only in degree, not kind. Useful warning systems are useful.
I fear I've stumbled into the "tastes great! less filling!" section of this list. Backing out slowly...
Exactly this. Javascript completers just 'guess' based on symbol scanning,
On Mon, Jun 22, 2015 at 4:37 PM, Brendan Eich <brenda...@gmail.com> wrote:On Mon, Jun 22, 2015 at 2:17 PM, 'Justin Fagnani' via Dart Misc <mi...@dartlang.org> wrote:On Mon, Jun 22, 2015 at 10:47 AM, Brendan Eich <brenda...@gmail.com> wrote:On Mon, Jun 22, 2015 at 10:41 AM, Daniel Joyce <daniel....@gmail.com> wrote:Javascript and perl render in depth tooling and code completiong/analysis nearly impossible since they are so dynamic.Please see https://docs.c9.io/v1.0/docs/autocompletion and many other such products.Oh, come on. JavaScript completers are usually very simple and dumb, based on extracting what look like symbols in files. Even when they do analysis (like Closure and Ternjs), they only work for a subset of the language and often rely on extra type information like JSDocs or TypeScript.And Dart's unsound type system differs only in degree, not kind. Useful warning systems are useful.And even a sound type system won't help know all available properties when dealing in interfaces, so while technically the difference is "only" in degree, it's still a massive difference.
I fear I've stumbled into the "tastes great! less filling!" section of this list. Backing out slowly...I just have a problem with drawing an equivalence, or even near equivalence, in static analyzability between languages like JavaScript and languages like Dart. It borders on dishonesty.
It's ok to say that JavaScript is much more dynamic, and more malleable, with one tradeoff being that it's harder to analyze.
This is a false statement. I'm going to assume that you didn't know of the higher-order JavaScript control flow analysis done by projects like Cloud9, so I'm not going to drop bombs like "borders on dishonesty" :-|. Modern JS tools use static analysis, they do not "guess".
--
> Apps are becoming too big and too complex to not have good static analysis and tooling. Dart is a great attempt; but the IDEs I've tried it in all kinda suck :(really? so you basicly mean the dart analyser sucks ? I find the combination webstorm+ dart really god. But I've only tried javascrip+webstorm and objective c+xcode before. Maybe my expectations are just low...
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.
On 23 June 2015 at 20:46, Brendan Eich <brenda...@gmail.com> wrote:This is a false statement. I'm going to assume that you didn't know of the higher-order JavaScript control flow analysis done by projects like Cloud9, so I'm not going to drop bombs like "borders on dishonesty" :-|. Modern JS tools use static analysis, they do not "guess".I don't want to stoke any flames but I'm genuinely curious about this, as I've always considered this a fairly unsolvable problem...eg.:var a = new Date().getYear == 2010 ? 0 : "";I don't see how tools can provide anything useful information about "a" here.
However, modern autocomplete tooling (the subject up-thread) does not "guess".
JS with junk like `with` is hard to impossible to analyze, period. No question. Dart's a lot easier!It's not just 'with' it's open objects, open prototypes and building them imperatively, mutable proto pointers, 'this' bindings, class expressions, extends expressions. Reflective access (o[p]) being first class with property screws with analysis.
It'll get worse with decorators that mutate property descriptors.
However, modern autocomplete tooling (the subject up-thread) does not "guess".I never said it did
(I mentioned Closure and Tern which go to great lengths to do analysis and inference). Their capabilities simply pale in comparison even to the Dart analyzer, to such a degree that the comparison is silly.
In personal experience, I write JavaScript full time now, and the pain is very real. I've used almost every JS analyzer out there. They all suck (and it's not their fault).
I hope SoundScript and strong mode work out, they seem to be the only hope for mainstream JS programmers.
Right, Daniel J. wrote "guess" -- you wrote that most are "simple and dumb". Re-reading up the thread, I see kc criticized Dart syntax in context of wasm AST code, and you replied with a fine defense of Dart syntax and how it benefits analysis. No one was arguing against that except kc.
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.
I really appreciate the DartVM, Dart by itself is an incredibly nice language, flexible when you needed but with all the static goodies, and very good support on webstorm. Makes coding asynchronous servers a very nice experience, although I'll also give ASP .NET vNext a try now that you can run it free on linux machines.
As an example I had a typo where I was removing something from an array and so nothing was ever being removed. This was caught years later in this code base. Closure compiler never said a word. The Dart analyzer would've freaked out over that.
On Tuesday, June 23, 2015 at 11:48:01 PM UTC+1, Brendan Eich wrote:Right, Daniel J. wrote "guess" -- you wrote that most are "simple and dumb". Re-reading up the thread, I see kc criticized Dart syntax in context of wasm AST code, and you replied with a fine defense of Dart syntax and how it benefits analysis. No one was arguing against that except kc.I was arguing in favour of a sane core runtime object model with pluggable types/analysis. Not against declarative structure or analysis.
I have a feeling that the Java-ish syntax of Dart locks dev's into some misconceptions about Darts core semantics and it's optional/gradual/pluggable type annotation concepts. Perversely the TS type annotation syntax could have made these ideas an easier sell (I think).
// Within a member function
// this.tasks_ was typed as an Array<function>
var tasks = this.tasks_,
index = tasks.indexOf(tasks);
/be
> At some later date, wasm should grow support needed to be a better target for compilation of Dart than JS is today, as Bob noted. In that future wasm iteration, the AST code will still be statically typed. Not redundantly or abundantly, just enough to verify.
If wasm becomes a target of dart compilation, AND wasm is statically typed, then dart has to become statically typed, too. Not redundantly or abundantly, just enough to verify, but still - no more optional typing.
Quote: "In personal experience, I write JavaScript full time now, and the pain is very real."
What could possibly be the reason for writing JavaScript if you do not like it ?
Seriously.
There is Typescript.
And you work even for Google, the company that tries promote Dart as alternative.
There is also type inferencing. I rarely have to sprinkle types in Scala... Static typing and strong type inferencing give you the best of both worlds...
> No, because future wasm will have dynamic language features including an "Any" type and JIT support.@Brendan: "Any" won't help much. Type system in dart is a bit involved. Consider this line:int x="foo";It produces a warning (not an error). How would you compile it to the language with static typing?
You can't sayany x="foo" - because the type says "int".
And you can't compile it toint x="foo" - because in the target language, this would be an error.
Type inference has its own quirks, too. E.g.var x="foo";x=0;produces no errors and no warnings; though type inference exists, it's not equivalent to explicit declaration.(To play with small snippets of the code, you can use https://dartpad.dartlang.org/)This is just a tip of the iceberg. There are errors, warnings and hints, checked mode, VM, dartium, javascript etc. - these notions come into play when one starts wrapping their head around dart's type system.
Again, my guess is that properties of target language had major effect on the design of dart's type system. If target languages changes (e.g becomes statically typed) - the concept might be in need of some rethinking.
I joined the Polymer team which tries to stick to very plain JS (no required build steps, no module systems, etc.) for many reasons.
Every project has their own priorities and makes their own decisions.
If/when JS gets bignums, that'll be a big day for Dart-to-JS compilation. It not being there didn't stop Dart from adding them to the language.
> No, because future wasm will have dynamic language features including an "Any" type and JIT support.@Brendan: "Any" won't help much. Type system in dart is a bit involved. Consider this line:int x="foo";It produces a warning (not an error). How would you compile it to the language with static typing?You can't sayany x="foo" - because the type says "int".And you can't compile it toint x="foo" - because in the target language, this would be an error.Type inference has its own quirks, too. E.g.var x="foo";x=0;produces no errors and no warnings; though type inference exists, it's not equivalent to explicit declaration.(To play with small snippets of the code, you can use https://dartpad.dartlang.org/)
So you mean not really the functionality, but more the looks/ UI etc ?
I guess you are using windows ? Webstorm at windows does feel unpolished and sluggish to me. But on mac, it feels excellent. It is really quite a difference.
But maybe Webstorm is also something you get used to. Every so much time, I find out some new feature of webstorm, and many times, features blow my mind. Things like emmett, live templates, automatic sass compiler, git GUI, pressing alt+enter for quick fixes, debuggin options, ability to have live refreshing docs and code side by side (like dartpad), well and much more.
I joined the Polymer team which tries to stick to very plain JS (no required build steps, no module systems, etc.) for many reasons.Plain JS as in ES5? This makes your comments above more understandable.
But there has been a big shift to Babel/ES6/TS/Flow. Basically there is now enough tooling/analysis available via a mainstream route. This wasn't true when Dart kicked off but it's true now.
It's unlikely Dart will pick up any new users given the announcement that the DartVM is not going into Chrome.
And wasm is the icing on the cake.
The V8 engine will have ES6+/Strong mode/SoundScript + wasm. I'm sure the V8 team are thinking about how to leverage wasm in a SoundScript context with a decent evolutionary path in 1VM.
Every project has their own priorities and makes their own decisions.This is eventually going to hurt Google. Too many languages and runtimes. Dev's need platforms/ecosystems. Fletch and Sky are interesting - but will these experiments turn into products that dev's can rely on.
K.
On Wednesday, June 24, 2015 at 11:45:59 PM UTC+1, Justin Fagnani wrote:
On Thu, Jun 25, 2015 at 4:24 AM, kc <kevin...@gmail.com> wrote:I joined the Polymer team which tries to stick to very plain JS (no required build steps, no module systems, etc.) for many reasons.Plain JS as in ES5? This makes your comments above more understandable.Actually, in my corner of the world I get to use a lot of ES6 (I get totarget io.js and Chrome Canary atm). Growing the language as strict supersets does not make it more analyzable.
But there has been a big shift to Babel/ES6/TS/Flow. Basically there is now enough tooling/analysis available via a mainstream route. This wasn't true when Dart kicked off but it's true now.Nom not in general, maybe a little in practice. Closure compiler has been around a long time doing the herculean work of trying to force JS into analyzable patterns, it's not a new thing. ES6 doesn't help much either. I mentioned several ES6 features that will throw any static analyzer for a loop up thread. Classes in particular don't prevent you from imperatively changing the shape of prototypes or instances, or the prototype chain.
It's unlikely Dart will pick up any new users given the announcement that the DartVM is not going into Chrome.That's provably false inside Google. Probably outside too.
And wasm is the icing on the cake.WASM really doesn't have the effect on Dart that you think it does. It really doesn't change anything at all yet. Asm.js is a JS encoding of a bytecode. WASM is a binary encoding of that. The only way to get any language to run on that is to either 1) not have a runtime, or 2) compile the runtime to WASM. Python, Ruby, Dart, Java, C#, and on and on are not going to magically become viable in WASM when they weren't in asm.js. The to-JS compilers that are available for those languages will continue to target normal JS, as that's the only reasonable solution.
Those compilers all take advantage of (and then work around to varying degrees) the JavaScript object model, and they use much, much more of JavaScript than the asm.js subset. WASM isn't the big breakthrough that's needed, IMO.
To be a better compilation target JS needs things like: value types; Proxies; more optimizations of getters, setters, bound functions, exception handling, Symbol-based property access; much faster postMessage and lighter-weight workers; something like strong mode: a way for a code to opt out of implicit type conversions, boolean coercion, Arrays with holes, shape-changing objects, and all the other things that make JS hard to optimize. Then a compiler can generate an easy to optimize subset of JS, that's still interoperable with the DOM and all the other JS in the wild.The V8 engine will have ES6+/Strong mode/SoundScript + wasm. I'm sure the V8 team are thinking about how to leverage wasm in a SoundScript context with a decent evolutionary path in 1VM.I don't think these things fit together like you imagine. asm.js already doesn't support the things that strong mode limits. SoundScript is concerned with optional typing of objects, asm.js only has numbers, arrays and functions.
Every project has their own priorities and makes their own decisions.This is eventually going to hurt Google. Too many languages and runtimes. Dev's need platforms/ecosystems. Fletch and Sky are interesting - but will these experiments turn into products that dev's can rely on.
"ES6/TS/WASM have done enough to undermine Dart's story. Is there a response."What are you a tabloid reporter @kc?
WASM isn't at a point where you can use a GCed language. Its probably not going to happen for awhile. Until then we're stuck in a compile to JS world not a byte-code world. How many times does this need to be reiterated.