Dart coding on a Chromebook (Chrome Dev Editor). Does it work? Any restrictions?

650 views
Skip to first unread message

Danny Tuppeny

unread,
Aug 16, 2014, 1:41:04 PM8/16/14
to mi...@dartlang.org
I know Chrome Dev Editor is still a preview, but I wondered if anyone had used it much on a Chromebook? I'm thinking of picking up a Chromebook again; and decent support for Dart might help me decide.

On Windows there are some weird quirks (you have to run Pub Get manually, though it's able to do Pub Serve itself; I think this is symlink-related).

Ideally, I'd like to be able to write Dart for both server and client together; would this work on a Chromebook via Chrome Dev Editor? (and if so, would there be restrictions I wouldn't encounter running the Dart outside of ChromeOS/Chrome Dev Editor?)

Hans - Jürgen Alps

unread,
Aug 16, 2014, 3:26:36 PM8/16/14
to mi...@dartlang.org
Actually CDE is not applicable for developing with dart, because CDE"s performance is very poor and polymer applications don"t work at all with CDE. 
In my opinion Windows and Linux are the best options for developing dart applications. I tried OS X, Linux, Windows and Chrome OS. 

Chrome Books are very cool, if you are using the internet. Even simple office tasks can be easily done with them. I use it for example to participate in this blog. It is booting within a few seconds, but it is not suitable for development. Maybe this will change in the near future. 

Adam Stark

unread,
Aug 16, 2014, 7:46:50 PM8/16/14
to mi...@dartlang.org
Nice tool. I had not seen that before

It looks like it's designed for dart2js and App/Extension development. It doesn't have a copy of the dart vm [I doubt one exists for ChromeOS] so server side would be difficult [or impossible]. ChromeOS is identical to Chrome except for some aesthetic things.

There are a couple code hosting sites, such as koding.com and c9.io, that are built on ubuntu, so you could use those to host DartVM-based servers, with a little bit of setup.

There might be other cloud-based solutions that you can use with a Chromebook.


--
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.



--
Adam Stark

Danny Tuppeny

unread,
Aug 17, 2014, 3:38:04 AM8/17/14
to mi...@dartlang.org

Doesn't dart2js require the Dart VM?

I don't know about ChromeOS, but Windows it looked like was running "pub serve" too; but that would likely also need the VM?

(I guess if dart2js works as advertised, they could've dart2js'd dart2js and pub, but that seems a bit crazy).

Kirth Gersen

unread,
Aug 17, 2014, 10:08:01 AM8/17/14
to mi...@dartlang.org
It's not crazy and that's exactly what they have done. They've bootstrapped dart2js and pub.
Both are written in Dart, compiled to js with dart2js and included as js code in chrome Chrome Dev Editor app.

Adam Stark

unread,
Aug 17, 2014, 11:31:56 AM8/17/14
to mi...@dartlang.org
Yes. They have some js bootstrapping code and dart2js, dartanalyzer, and pub are all run as javascript. As such it is pretty slow at those things.

In fact the only thing that's NOT run as javascript is a PNaCl extension for talking to android devices.

It runs identically under ChromeOS and under Windows (file browsers are different of course), so if you want to try it out on your machine, you can get a pretty good idea of what it can do before trying it on a Chromebook.


--
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.



--
Adam Stark

Danny Tuppeny

unread,
Aug 17, 2014, 11:40:53 AM8/17/14
to mi...@dartlang.org

Thanks for the info, makes sense now!

I'll play around more on Windows to see the limitations.

On Windows I need to run "pub get" manually; how does this work on ChromeOS?

Adam Stark

unread,
Aug 17, 2014, 11:49:54 AM8/17/14
to mi...@dartlang.org
You can right click on the pubspec.yaml file to get a popup menu, and then click on pub get.

Again, this should work on Windows as well.


--
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.



--
Adam Stark

Danny Tuppeny

unread,
Aug 17, 2014, 11:52:21 AM8/17/14
to mi...@dartlang.org
On 17 August 2014 16:49, Adam Stark <llama...@gmail.com> wrote:
You can right click on the pubspec.yaml file to get a popup menu, and then click on pub get.

Again, this should work on Windows as well.

On Windows, you get this:

Inline images 1

That's why I wasn't sure how it worked on Chromebook. From what you've said, I presume it "just works" on ChromeOS? 

Adam Stark

unread,
Aug 17, 2014, 12:02:15 PM8/17/14
to mi...@dartlang.org
I was not sure aware of that issue, since I'm running it on Linux/ChromeOS.

I tested it and can confirm that it works as expected on my Chromebook. It doesn't like when projects are on Google Drive  so I have to keep things in my Downloads folder.


--
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.



--
Adam Stark

Danny Tuppeny

unread,
Aug 17, 2014, 12:03:35 PM8/17/14
to mi...@dartlang.org
On 17 August 2014 17:02, Adam Stark <llama...@gmail.com> wrote:
I was not sure aware of that issue, since I'm running it on Linux/ChromeOS.

I tested it and can confirm that it works as expected on my Chromebook. It doesn't like when projects are on Google Drive  so I have to keep things in my Downloads folder.

Right; thanks for testing :-)
 

Hans - Jürgen Alps

unread,
Aug 18, 2014, 11:03:23 AM8/18/14
to mi...@dartlang.org
Actually CDE is not applicable for developing with dart, because CDE"s performance is very poor and polymer applications don"t work at all with CDE. 
In my opinion Windows and Linux are the best options for developing dart applications. I tried OS X, Linux, Windows and Chrome OS. 

Chrome Books are very cool, if you are using the internet. Even simple office tasks can be easily done with them. I use it for example to participate in this blog. It is booting within a few seconds, but it is not suitable for development. Maybe this will change in the near future. 

--

Bob Nystrom

unread,
Aug 18, 2014, 1:48:09 PM8/18/14
to General Dart Discussion

On Sun, Aug 17, 2014 at 7:08 AM, Kirth Gersen <kge...@hotmail.com> wrote:
It's not crazy and that's exactly what they have done. They've bootstrapped dart2js and pub.
Both are written in Dart, compiled to js with dart2js and included as js code in chrome Chrome Dev Editor app.

This is mostly correct. dart2js can indeed bootstrap itself, which is what you see when you go to try.dartlang.org. CDE is using that too. Most of pub can be compiled to JS as well. However, pub heavily uses "dart:io" and those pieces don't have a JavaScript counterpart. The CDE folks have re-implemented those parts from scratch on top of the browser API. They have a Dart (maybe JS?) implementation of Git, file IO, networking, etc.

Cheers!

- bob

Danny Tuppeny

unread,
Aug 18, 2014, 2:03:04 PM8/18/14
to mi...@dartlang.org
On 16 August 2014 20:26, Hans - Jürgen Alps <hansjuer...@googlemail.com> wrote:
Actually CDE is not applicable for developing with dart, because CDE"s performance is very poor and polymer applications don"t work at all with CDE. 
In my opinion Windows and Linux are the best options for developing dart applications. I tried OS X, Linux, Windows and Chrome OS. 

Chrome Books are very cool, if you are using the internet. Even simple office tasks can be easily done with them. I use it for example to participate in this blog. It is booting within a few seconds, but it is not suitable for development. Maybe this will change in the near future. 

I'm not after a Chromebook as a primary dev machine; I have a beefy computer for most of my dev at home. I have a Samsung Series 7 Slate that I used to use for the odd bit of hacking from the coffee table while watching TV (rather than sitting unsocially in my computer room!); but since moving, there's no coffee table, so a separate keyb/screen is tricky to use!

I'm after something that I could just tinker around with (ideally Dart) and RDP from; unless the performance *really sucks*, I don't think a Chromebook would be too bad. I read the new Acer Chromebook 13 is supposed to perform fairly well (Tegra?); so it's a likely candidate if I do pick one!

Danny Tuppeny

unread,
Aug 18, 2014, 2:06:18 PM8/18/14
to mi...@dartlang.org
On 18 August 2014 18:47, 'Bob Nystrom' via Dart Misc <mi...@dartlang.org> wrote:
It's not crazy and that's exactly what they have done. They've bootstrapped dart2js and pub.
Both are written in Dart, compiled to js with dart2js and included as js code in chrome Chrome Dev Editor app.

This is mostly correct. dart2js can indeed bootstrap itself, which is what you see when you go to try.dartlang.org. CDE is using that too. Most of pub can be compiled to JS as well. However, pub heavily uses "dart:io" and those pieces don't have a JavaScript counterpart. The CDE folks have re-implemented those parts from scratch on top of the browser API. They have a Dart (maybe JS?) implementation of Git, file IO, networking, etc.

Thanks for the info! I do now remember seeing the Git implementation (and being suitable impressed :)).

Are there any (known/public) plans to address this duplicated effort? It seems silly if dart:io has file IO and then people are implementing their own for Chrome extensions; is Dart missing a feature that allows a single API that can have different implementations depending on the runtime it's running in? (I appreciate this might not be trivial, especially with dart2js, but that doesn't make it any less interesting! :))

Bob Nystrom

unread,
Aug 18, 2014, 2:31:27 PM8/18/14
to General Dart Discussion
On Mon, Aug 18, 2014 at 11:06 AM, Danny Tuppeny <da...@tuppeny.com> wrote:
Are there any (known/public) plans to address this duplicated effort?

Not that I'm aware of. We aren't tightly coordinated with the CDE folks.
 
It seems silly if dart:io has file IO and then people are implementing their own for Chrome extensions; is Dart missing a feature that allows a single API that can have different implementations depending on the runtime it's running in? (I appreciate this might not be trivial, especially with dart2js, but that doesn't make it any less interesting! :))

This has been an ongoing discussion for several years. We still don't have a solution, but we are, I hope, finally starting to get some traction on it. I don't have any details yet, though, nor a timeframe.

Cheers!

- bob

Danny Tuppeny

unread,
Aug 18, 2014, 2:45:39 PM8/18/14
to mi...@dartlang.org
On 18 August 2014 19:30, 'Bob Nystrom' via Dart Misc <mi...@dartlang.org> wrote:
It seems silly if dart:io has file IO and then people are implementing their own for Chrome extensions; is Dart missing a feature that allows a single API that can have different implementations depending on the runtime it's running in? (I appreciate this might not be trivial, especially with dart2js, but that doesn't make it any less interesting! :))

This has been an ongoing discussion for several years. We still don't have a solution, but we are, I hope, finally starting to get some traction on it. I don't have any details yet, though, nor a timeframe.

Is there a particular issue in the tracker worth staring for those of us interested in knowing if/when things start moving?

Thanks!

Bob Nystrom

unread,
Aug 18, 2014, 2:53:34 PM8/18/14
to General Dart Discussion
The problem and potential solution are still pretty nebulous, so the bug tracker doesn't encapsulate it well. The best I could find were:


- bob



--

Adam Stark

unread,
Aug 18, 2014, 6:13:45 PM8/18/14
to mi...@dartlang.org
As a side note: Chrome and ChromeOS do let you create TCP socket-based servers in the App runtime using chrome.sockets. There are some Chrome Apps that use chrome sockets to implement torrent servers, and I think CDE itself uses socket-based networking for some things.

So it's not literally impossible to create servers on a Chromebook in Dart, even as it stands, but it's a lot more effort than using DartVM and 'dart:io'.


--
Adam Stark

Danny Tuppeny

unread,
Aug 19, 2014, 7:35:25 AM8/19/14
to mi...@dartlang.org
On Sunday, 17 August 2014 16:31:56 UTC+1, Adam Stark wrote:
Yes. They have some js bootstrapping code and dart2js, dartanalyzer, and pub are all run as javascript. As such it is pretty slow at those things.

Just a thought - when Chrome gets native Dart support (I get the impression this is in-progress?), this dart2js won't be necessary, and there should be a nice speed boost for CDE both on desktops and Chromebooks :-) 

Filipe Morgado

unread,
Aug 19, 2014, 11:21:21 AM8/19/14
to mi...@dartlang.org
The keyword is Oilpan. Chrome still needs a lot of work for that to happen (so does Dart).

CDE will get faster on Dart, but how much? And will it be enough? Dart is still no match for Java/C++ and the DOM is a performance hog when compared to native UIs.
I don't expect it to rival the Dart Editor, Sublime, etc ... any time soon.

Bob Nystrom

unread,
Aug 19, 2014, 12:00:28 PM8/19/14
to General Dart Discussion
On Tue, Aug 19, 2014 at 8:21 AM, Filipe Morgado <pix...@gmail.com> wrote:
Dart is still no match for Java/C++

Actually, if you look here, you'll see Dart holds its own pretty well against Java. There are a few outliers, but those are Java implementations that rely on either threads, fork/join, loading a native library of optimized native code (!), or regexes, which haven't been optimized in Dart yet. Straight line code performance seems to be within a factor of two to Java, at least on those toy benchmarks.
 
and the DOM is a performance hog when compared to native UIs.

This is the real culprit. The DOM was not at all designed for implementing text editors and its entire render model isn't well-suited to it. See also: Atom, Kod, et. al.
 
I don't expect it to rival the Dart Editor, Sublime, etc ... any time soon.

Much of Sublime is actually written in Python. What it has going for it isn't implementation language speed as much as it is not using the DOM to render.

- bob


Danny Tuppeny

unread,
Aug 19, 2014, 1:18:46 PM8/19/14
to mi...@dartlang.org
On 19 August 2014 16:21, Filipe Morgado <pix...@gmail.com> wrote:
The keyword is Oilpan. Chrome still needs a lot of work for that to happen (so does Dart).

CDE will get faster on Dart, but how much? And will it be enough? Dart is still no match for Java/C++ and the DOM is a performance hog when compared to native UIs.
I don't expect it to rival the Dart Editor, Sublime, etc ... any time soon.

Valid! I was thinking about things like the Analysis Service (which presumably will drive code-completion, syntax highlighting, refactoring etc. in CDE) which don't touching the UI but do a lot of code parsing/crunching.

Oilpan sounds interesting; but the design doc suggests it's more about improving code maintainability; I can't see a lot of info on performance - is it intended to have a big impact?

Günter Zöchbauer

unread,
Aug 19, 2014, 1:33:46 PM8/19/14
to mi...@dartlang.org
As I understand it it is a prerequisite for supporting a 2nd script language in Chrome.

Matthew Butler

unread,
Aug 19, 2014, 1:38:27 PM8/19/14
to mi...@dartlang.org


On Tuesday, August 19, 2014 2:18:46 PM UTC-3, Danny Tuppeny wrote:

Oilpan sounds interesting; but the design doc suggests it's more about improving code maintainability; I can't see a lot of info on performance - is it intended to have a big impact?

Currently (though only just started) the performance is on par or in some cases drastically worse than the current memory collection. However, that said, Oilpan will do more than just code maintainability. In particular it will much easier access to DOM Objects by multiple VMs simultaneously. It will increase the security to reduce likelihood of trying to access elements which were freed by one VM but still in use by another. This is why Dartium is for development only and not recommended for daily usage. It is unstable and potentially insecure when working in multi-vm cases.

Danny Tuppeny

unread,
Aug 19, 2014, 1:42:25 PM8/19/14
to mi...@dartlang.org
On 19 August 2014 18:33, Günter Zöchbauer <gzo...@gmail.com> wrote:
As I understand it it is a prerequisite for supporting a 2nd script language in Chrome.
On 19 August 2014 18:38, Matthew Butler <butler....@gmail.com> wrote:
Currently (though only just started) the performance is on par or in some cases drastically worse than the current memory collection. However, that said, Oilpan will do more than just code maintainability. In particular it will much easier access to DOM Objects by multiple VMs simultaneously. It will increase the security to reduce likelihood of trying to access elements which were freed by one VM but still in use by another. This is why Dartium is for development only and not recommended for daily usage. It is unstable and potentially insecure when working in multi-vm cases.

Right; I didn't think about that! Thanks for the info; I'll keep an eye on it :-)

jm

unread,
Aug 19, 2014, 6:49:43 PM8/19/14
to mi...@dartlang.org


Em terça-feira, 19 de agosto de 2014 12h21min21s UTC-3, Filipe Morgado escreveu:

CDE will get faster on Dart, but how much? And will it be enough? Dart is still no match for Java/C++ and the DOM is a performance hog when compared to native UIs.
I don't expect it to rival the Dart Editor, Sublime, etc ... any time soon.

 
I don't know how old you are, but editors on the Z80 (WordStar) worked speedily enough. But now after a 100.000 fold speed (and memory) increase, all we do is... blame the DOM? Do I need to remind you that an editor lacks moving parts and is amongst the simplest of applications? 

Indeed, all HTML editors suck. The Gmail editor is only so-so. A 100.000 fold increase, 10 billions of dollars of yearly profits, and ownership of the Chrome stack don't even buy a decent Undo. 

So don't tell me the problems are technical. It is laughable. 






Bob Nystrom

unread,
Aug 19, 2014, 8:40:58 PM8/19/14
to General Dart Discussion
On Tue, Aug 19, 2014 at 3:49 PM, jm <janm...@gmail.com> wrote:
I don't know how old you are, but editors on the Z80 (WordStar) worked speedily enough.

Well, it also didn't support proportional fonts, anti-aliasing, Unicode, color, syntax highlighting, static analysis, refactoring, scripting, window management, semantic navigation, plug-ins, undo (much less multiple undo), or a mouse. It did support BiDi, so I'll give it that.

Tetris is fast and pretty simple too, but I'm not sure that tells you much about implementing World of WarCraft.

- bob
Reply all
Reply to author
Forward
0 new messages