258 karma · joined September 9, 2011
Synchronising a mirror automatically is pretty trivial so I imagine they're usually pretty up to date.
You can store packages on a private git server, see the pubspec.yaml docs here:
https://www.dartlang.org/tools/pub/dependencies.html#git-pac...
It is also possible to run your own private pub server. But currently the only available implementation relies on AppEngine. According to the author it's possible to just implement the fetch protocol using static files served over HTTP. I.e. create some directories and put the json and tar.gz files in the correct places.
https://www.dartlang.org/tools/pub/dependencies.html#hosted-...
So if you want to be consistent you should update your comment to:
If you are cycling or driving wear a helmet.
Risk of head injury per million hours travelled
Cyclist - 0.41 Pedestrian - 0.80 Motor vehicle occupant - 0.46 Motorcyclist - 7.66
"but that doesn't mean your not an idiot for doing it without any good reason."
So by this logic someone not wearing a helmet while in a car is also an idiot ;)
"Why it makes sense to drive wearing a helmet"
Based on:
We can also approach it from the perspective of injuries per million hours from a 1996 Australian study looking at head injury risk before the beginning of any helmet laws:
Risk of head injury per million hours travelled
Cyclist - 0.41 Pedestrian - 0.80 Motor vehicle occupant - 0.46 Motorcyclist - 7.66
http://en.wikipedia.org/wiki/Pumped-storage_hydroelectricity
There are already countries where the cost of electricity from PV is below the cost of electricity bought from the grid. In these countries every Watt you generate yourself saves you money.
These users don't want to get the maximum amount of energy per year, they want to minimize the amount of electricity bought from the grid. They want to better match the generation profile of solar to their load profile. i.e. spread generation across the day - instead of getting it in one big peak in the middle of the day. To do this - it is already common to install east and west facing PV.
But I agree lazy journalism - he's speculating about a future which has already happened in some places.
(Though the i3 does have an ICE range extender option which gives it ~200 miles too)
Or all of the browser vendors could sit down and design a new language based on the experience gained from implementing Dart. This new more easily optimizable language can become a new web standard. After all this is what happened with SPDY and HTTP2.0. This "new language" could also just be a new version of Javascript with a few backwards incompatible changes.
One interesting claim of the DartVM authors is that they have achieved a 10x start up gain over Javascript when using script snapshots. If this turns out to be true, it will add significant pressure for other vendors to implement a similar feature. The only way to get this to work in Javascript is to make backwards incompatible changes. For example only allowing a static top-level structure, as in Dart.
I see the competition from Dart as being good for end users, as it adds pressure on Javascript to evolve. It's also interesting to see the V8 team porting a number of Dart's optimisations to V8.
Note: Dart doesn't have generators, and Ecmascript is not planning on adding optional types.
This is not really possible if you must interpret top level code to build up your top-level declarations, as done in JS.
Using snapshots, the Dart authors have said it should be possible to improve script start up time by 10x over V8. This is a big win for large script heavy apps.
Edit: link https://www.dartlang.org/articles/snapshots/
nit - The Dart team have explicitly said that they are not doing any features based on new computer science research. The Dart project is built on pragmatic engineering decisions, rather than "pushing comp-sci forward".
This is a good thing in my opinion.
It is an old well used benchmark, used for benchmarking object-oriented code with polymorphism.
However it's worth noting that deltablue has been used to benchmark polymorphism in Smalltalk, Self, the JVM, and V8.
Some of Nickolay's numbers are from a version of the code written at Sun labs, presumably for the very purpose of benchmarking the JVM.
I think it's safe to conclude that in many cases the DartVM already performs similarly to the JVM, albeit with a much better start up time.
Charles Nutter has some interesting follow up comments here:
http://blog.headius.com/2013/05/on-languages-vms-optimizatio...
Basically concluding that it's not static typing that matters, but predictable types.
I agree that there are many shades of the rainbow between a JIT and an interpreter.
"V8 compiles JavaScript source code directly into machine code when it is first executed. There are no intermediate byte codes, no interpreter." https://developers.google.com/v8/design#mach_code
Have a read about V8 and the DartVM's architecture. V8, and the DartVM have a different architecture than IE's Chakra and Firefox's monkeys. They use a method JIT which initially generates very simple native machine code directly from the AST. The machine code includes instructions to identify hot code, which is re-compiled again from the AST. The optimizing compiler converts the source into an SSA form, and IR, but this is not byte/bitcode. This is what Bak et al are referring to when they call this architecture a "source code vm".
Lars Bak on channel 9: Bytecodes are a silly thing in my mind. They can be used for different things interpretation. But interpreters are really slow. But they can also be used as a wire format, for instance in .net or java where that's what you ship over the wire. In javascript the wire format is sourcecode, and for each function you have, inside the running javascript program, you have to cook up the source code again. So that is the primary representation. So we just decided why not generate native code right away because the CPU is pretty fast.
http://media.ch9.ms/ch9/e6aa/354bf580-9c93-4383-bab3-cb6a3dd...
Languages such as Java and C# have a distinction between objects and primitives such as int and bool. In Dart all types are objects - even null! This is why Dart is pureOO.
Dart has some of the classic higher order functions in it's core library - i.e. map, reduce etc. But it's not a functional language like Haskell.
Actually, external contributors John Evans and Ladislav Thon submitted and landed patches via github.
https://chromiumcodereview.appspot.com//10168022 https://chromiumcodereview.appspot.com//10166019
Not all of the code is on github but many libraries are. Web ui is developed via github. See here for a full list: