Account Options

  1. Sign in
The new Google Groups is coming soon. Learn about the new features you'll find.
Google Groups Home for dartlang.org
« Groups Home
Dart compiler in dart
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jim Hugunin  
View profile  
 More options Oct 24 2011, 6:12 pm
From: Jim Hugunin <jim...@google.com>
Date: Mon, 24 Oct 2011 15:12:02 -0700
Local: Mon, Oct 24 2011 6:12 pm
Subject: Dart compiler in dart

Olov's thread brings up an excellent question about language tools for dart
written in dart - along with some impressive early work in that direction.
 To answer his primary question:

Yes, we are working on building a complete dart compiler in dart.  If you
would like to see the current very early shape of this code you can find it
here:
  http://code.google.com/p/dart/source/browse/#svn%2Fexperimental%2Ffrog

Short history:

I've spent the past ten months working as the tech lead on a project to
build web applications on top of the emerging dart language.  This has been
a great education for me about how the web works and a wonderful
opportunity to help drive this language and tools to be great for actual
app developers.  I'm very proud of the swarm application that we built both
for its beautiful UI and for the way we were able to drive the initial
uncertain phases of the language and tools based on concrete development
experience.

However, an interesting thing happened over the past 10 months.  Dart has
matured enough to be fun to develop in.  As I started to enjoy coding in
the language more, one day, about three weeks ago, I decided to try to
write a dart compiler in itself.  Yes, I am one of those odd people who
sometimes decide that the most fun to be had on a rainy Sunday is to write
a compiler for a new language.  This particular Sunday turned out to be one
of those glorious beginnings of a 48 hour coding binge that led to an
initial barely usable dart compiler in dart.

I've spent most of my career trying to end the battles between the dynamic
and static worlds and instead bring them together so that each side can
enjoy the benefits of the other.  Writing this compiler in dart is the
first time that I've really felt the effortless blend of these worlds that
I've been seeking.  In the past, I've always written the first version of a
compiler in a dynamic language (usually Python) in order to enable rapid
experimentation and avoid premature commitments.  However, when the
structure was sufficiently solid, I would always move to a more static
language (usually Java or C#) in order to better support a larger code base
with more contributors.  Dart is the first time that I have been able to
start off writing code in a very dynamic fashion and incrementally add
static checks as designs become solid or complexity warrants the effort.

Over the past three weeks, I've taken this very rough prototype forward -
with the help of several other outstanding compiler developers.  So far, it
has scaled exactly as I would have hoped with the value of explicit
interfaces and other types showing itself at points of interaction - but
not really being required on the insides of well-defined modules.  We've
made a lot of progress on this compiler already and feel that it is time to
get it out into the open.

This compiler is roughly three weeks old.  It has some nice properties with
self-hosting and generating moderately readable JS output.  However, it is
currently only passing two-thirds of the dart test suite - and a quick grep
for TODO in the code base will show you how much is left to be done.  If
you like to live on the bleeding edge, feel free to take a look and give us
your feedback.  If you'd like something more stable, please keep using our
more mature tools.

Thanks - Jim Hugunin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Olov Lassus  
View profile  
 More options Oct 25 2011, 2:35 am
From: Olov Lassus <olov.las...@gmail.com>
Date: Tue, 25 Oct 2011 08:35:35 +0200
Local: Tues, Oct 25 2011 2:35 am
Subject: Re: [misc] Dart compiler in dart

On Tue, Oct 25, 2011 at 12:12 AM, Jim Hugunin <jim...@google.com> wrote:
> Olov's thread brings up an excellent question about language tools for dart
> written in dart - along with some impressive early work in that direction.
>  To answer his primary question:
> Yes, we are working on building a complete dart compiler in dart.  If you
> would like to see the current very early shape of this code you can find it
> here:
>   http://code.google.com/p/dart/source/browse/#svn%2Fexperimental%2Ffrog

This is great. I kind of hoped that the team had an internal parser
prototype ready to be released and this is much more than that. The
scanner port didn't take me more than a day so I'll gladly put that to
rest, especially now that I don't have to create and maintain another
parser. It was also a useful learning experience in terms of mapping
Java to Dart.

Thanks for sharing your history and experience with writing code in
Dart, I enjoyed reading it. I've followed your work since the early
Jython days and am glad to see you involved in Dart.

> This compiler is roughly three weeks old.  It has some nice properties with
> self-hosting and generating moderately readable JS output.  However, it is
> currently only passing two-thirds of the dart test suite - and a quick grep
> for TODO in the code base will show you how much is left to be done.  If you
> like to live on the bleeding edge, feel free to take a look and give us your
> feedback.  If you'd like something more stable, please keep using our more
> mature tools.

I think you meant that it is only failing one-third of the dart test
suite. Seriously, this is really impressive. Thanks again for
releasing early. Now you'll have to excuse me, I've got some code
reading to do.

> Thanks - Jim Hugunin

/Olov

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »