Analysis of Google Dart
An anonymous reader writes "Google's new language landed with a loud thud, causing lots of interesting debates about the best place to stick semicolons... An article [in InfoQ] ... looks at some of the less discussed features. Snapshots seem to bring something like Smalltalk images and allow instant startup of applications (something Java has spent the last 15 years not delivering). Isolates are like OS processes and communicate with message passing — and as the article suggests, can fix the problem of Garbage Collection pauses by splitting up the heap (sounds like Erlang). There's more, mostly about features that remove some dynamic behavior in order to make startup and code analysis easier. Maybe Dart is worth a second look?"
1 == false
Yeah, everything except for true evaluates to false.
Do you even lift?
These aren't the 'roids you're looking for.
I have a little hint for you . . .
You're uglier than all of them.
Oh please,
Java (or more correctly; its user base) has been crying out for some sort of faster startup since the mid 90s. No other problem has done more to keep Java off the desktop that the very slow startup times. If Java applets started as quickly as Flash objects manage to then we would still be seeing Java implemented on major web sites. I could never understand why Java doesn't snapshot and cache a prelinked version of a class the first time it loads, if anything the JVM is getting slower - the demo Java Applets on my website take about as long to start up in 2011 as they did in 2000 but my computer is many times faster.
sheep.horse - does not contain information on sheep or horses.
You really have a chip on your shoulder. This is a issue that is important for browser side environment, it's not about Java. Are you feeling insecure?
Why is Snark Required?
Amen. The only time I can see method injection making sense is if you are writing a small program intended only to be maintained by yourself for less than two years of operation. Anything else and *keeping it simple* (eg. Java) more than makes up for a little extra boilerplate.
Did we strike a nerve?
Forgive us if the lack of a promise from Sun/Oracle to implement it didn't stop us from feeling it was necessary for startup times to be quicker than that of a slug crossing a freeway.
Promised, no, but it was one of the first applications we were looking at when Java was first announced and before browser applets became a big thing. Think about a cross between the JVM and VMWare's migration capability with some instant suspend / resume thrown in. IIRC, there were even articles about this sort of thing in DDJ.
When did we get the first look?
You an not wrong, but are missing the point. Java conceded the desktop to other technologies not because it was an inferior language (I find that even the much-maligned Swing produces very nice UIs) but because it took an age to start, making it unacceptable for any kind of in-browser use.
sheep.horse - does not contain information on sheep or horses.
And you'll find that applets are slow because the Java plugin distributed and maintained by Sun/Oracle doesn't use any kind of preloading as far as I can see. Who knows if Dart is better in this regard, but Java is it's own worst enemy when it comes to startup times. It is a shame, because I like almost everything else about it.
sheep.horse - does not contain information on sheep or horses.
Many girls are worth a second look, but each time I try, they're still as ugly as they were...
I can't grasp girl analogies... can you please come with a car one?
Questions raise, answers kill. Raise questions to stay alive.
Go is a language out of Google. Now Dart? Is Dart supposed to replace Go, or does Dart meet a different need?
Maybe Dart is worth a second look?"
nope! sorry google, we are still not interested
Can someone more experienced on the topic explain in-depth why people are complaining about there being "null" in Dart? I think it's pretty clear what not having a null reference would solve, but what are the solutions around not having null in cases where it is often used?
The startup time is not significantly higher than a large binary application like Firefox or Chrome are.
You need to download some updates. Java 1.2 hasn't been used for a while.
I do not fail; I succeed at finding out what does not work.
Oh please,
Java (or more correctly; its user base) has been crying out for some sort of faster startup since the mid 90s. No other problem has done more to keep Java off the desktop that the very slow startup times. If Java applets started as quickly as Flash objects manage to then we would still be seeing Java implemented on major web sites. I could never understand why Java doesn't snapshot and cache a prelinked version of a class the first time it loads, if anything the JVM is getting slower - the demo Java Applets on my website take about as long to start up in 2011 as they did in 2000 but my computer is many times faster.
Maybe the Java that ships with OS X is specially optimized (I'm joking), but the background of your website takes longer to load and render than any of your applets do.
link
This is fast enough for CLI usage outside of tight loops. For repeated usage, I'll concede you'd be better off finding a way to feed bulk data in rather than small chunks.
echo "class Hello {public static void main(String args[]) {System.out.println(\"Hello World\");}}" > Hello.java && javac Hello.java && time java Hello
Hello World
real 0m0.189s
user 0m0.210s
sys 0m0.033s
I understand Java is generally no speed demon compared to native compiled code, and desktop hard drive performance has almost stood still for ten years, but come on.
I have a *very* hard time believing that Java load times are as big a limiting factor in desktop app production than people make it appear to be.
Xbox Live much, bro?
Tsk. How'd I end up getting sucked into a Java discussion on a new technology thread? Must... resist.... urge... to... post...
I do not fail; I succeed at finding out what does not work.
Wow. so many expletives. I won't bash Java, but it is certainly no faster at startup than its competitors. Coming from the .NET camp, I have to admit CLR apps are just as relatively slow to start, although the slow startup can be somewhat mitigated with pre-compilation.
Unless an app has high demands for startup or IO times, all managed (that includes you, Java!) languages suffer from the same initial performance hit while the runtime loads and data structures get cached. Stop the arguments about launch time, they are idiotic unless you are strictly talking about browser apps.
I just tried Hello World in Groovy and it took almost a whole second (measured with time: 0,7s avg, 0.952s max, 0.668s min) for it to run on my MacBookPro (latest high end 17" model, not ssd).
Perl did it in about 0.007s average (0.011s max, 0.003s min), Python in 0.020s average (0.023s max, 0.017s min).
So in practice it takes a 100 times longer to load with no libraries included, it get worse if you do have dependencies.
Not an issue for a server/deamon app, a real big deal if you need to write a command line tool.
It doesn't matter what angle you look at a Pontiac Aztec, it's still as ugly as it was when they first rolled it off the line. (?)
Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
I understand Java is generally no speed demon compared to native compiled code, and desktop hard drive performance has almost stood still for ten years,
If by "stood still" you mean "almost tripled for mechanical drives", then yea, sure, i suppose.
Every few days someone comes by with a new programming language claiming to be the best thing since sliced bread. Nobody every shows a scrap of proof.
+1. I have never needed mod points this badly...
Not everything that can be measured matters; Not everything that matters can be measured.
http://code.google.com/p/jdart/
Web is boring ;) Let's see Dart running on the Desktop.
0 == false // expected
1 == false // wtf?
Yeah, everything except for true evaluates to false.
Hmm, that is a bit stupid... I think the opposite rule — everything evaluates to true except for false (used by e.g. Lua) — makes a lot more sense. It'll trip up C programmers too, but at least it naturally supports the "have some value" idiom, where you can use false as an out-of-band "not initialized" value in statements like "if (var) do-something-with-var", or "if (! var) var = init-value;".
I get the feeling that the reason Google keeps coming up with new languages is not really that existing languages aren't good enough, but rather that they've hired so many rock-star programmers. Programmers love to make new computer languages, and it's not like you can tell a rock-star what to do...
We live, as we dream -- alone....
Java's slow startup times (and yes, Sun/Oracle recognizes it's slow and has projects specifically to address it) are directly related to how many classes you load. Hello World doesn't exactly stress the classloader now does it.
Now I could just Google this, but I'm wondering what ever happened to Google Go. Anyone here using it?
Java may not have promised it, but earlier languages it copied from had it so maybe people assumed it was coming.
If Java applets started as quickly as Flash objects manage to then we would still be seeing Java implemented on major web sites.
First, the Flash run-time is incredibly tiny. It used to be under 1MB, and it's still not all that much bigger. Compare to browsers that need 100MB to display "Hello, World".
Second, Flash can display without loading the entire file. It's an animation format, remember. There are two streams, a timeline of events and a collection of assets (images, etc.) As soon as some timeline data and the assets called out in it have been loaded, play can start. Files are explicitly laid out in time order of use. That was a really good design decision.
Java is just loading and running programs. There's nothing special about the way it starts. First the VM has to load, then the JIT compiler has to do its thing, and then you get to execute something. There's no explicit concept of time, as their is with Flash files.
Thank heavens. Preloading is not wanted if you don't know that the user is going to need it.
"Google's new language landed with a loud thud, causing lots of interesting debates about the best place to stick semicolons..." I did not RTFA but a search on the page for "semi" did not show any hits on semicolons. But then again. I know where they can stick their semicolons. But if I write it my post will be caught by the profanity filter.
Did anyone else read this whole thing in Sam Kinison's voice?
"Freedom in the USA is not the ability to do what you want. It is the ability to stop others from doing what THEY want"
Like any other new programming language of the past decade, Dart sounds like a solution to problems I don't have.
Show me something that I can't do in existing, established languages. Or show me something that works considerably easier, faster or better - with the stress on considerably.
Otherwise, no matter what your pitch is, I simply don't need it.
Assorted stuff I do sometimes: Lemuria.org
you are supposed to increase the amount of alcohol in your bloodstream inbetween looks...
Assorted stuff I do sometimes: Lemuria.org
Say I wanted to write ls in Java. Startup time would be very important to me. Having dived back into Java development recently the bloat is getting me down. Nobody does anything small, except on Android where Dalvik does some of the caching and optimizing instead of the normal Java runtime.
http://michaelsmith.id.au
The JVM starts up fast enough at this point that it's not even worth caring about in the main part. It's the loading of the application on top which can take some time depending on what it is. It would be nice to be able to suspend an application and take a snapshot which could be instantly restarted (or clone) but I suspect that would be a function of the operating system and not easy given things like memory mapped files, open sockets etc.
Flash is more powerful than you would think. I felt the same way you did until I started doing some stuff in it for a class. I've been doing DSP work (implemented an FFT among other things) as well as toying with a game (a game loop real game not some timeline BS). I even wrote a scripting language for said game that runs in Actionscript. "Sup dawg we heard you like scripting languages" I know I know :P
Smalltalks seem to be doing well lately. It's not that weird for Google to jump on that bandwagon, is it? In any case, it can't be worse than Javascript.
Many girls are worth a second look, but each time I try, they're still as ugly as they were...
- aaaa, likely you are not looking at the right parts.
You can't handle the truth.
Oh Jesus fucking Christ! ...
+1 Funny
+1 Blasphemy
+1 for pissing yourself
+2 for admitting it
I thought the PT Cruiser was ugly, but the original Aztek looks like its bounding box was textured.
"You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
.Net takes just as long to fire up an application on my box as Java does.
MS didn't get away with making Java proprietary, why do you think .Net exists? It's modelled on Java.
I just tried Hello World in Groovy and it took almost a whole second (measured with time: 0,7s avg, 0.952s max, 0.668s min) for it to run on my MacBookPro (latest high end 17" model, not ssd).
I'm writing a 68K emulator. Hello World in 68K machine code running in my emulator, itself running in another instance of the same emulator, running in a 68K application on Mac OS 9 (using Apple's 68K emulator) in SheepShaver (emulating PowerPC) on a 2.8 GHz MacBook Pro -- that's four levels of emulation, two of them completely unoptimized -- takes less than half a second.
I just don't see what the problem is.
In general, it is safe and legal to kill your children. -- POSIX Programmer's Guide
Not an issue for a server/deamon app, a real big deal if you need to write a command line tool.
Many java services that I've had to start, they they've started, but they haven't ACTUALLY started. It's very annoying to start tomcat, get a response back suggesting things are a go, and then visiting localhost only to find out that started meant it started the paperwork to authorise the release of the forms for a port request, to be signed in triplicate and verified by 20 notaries.
But it hasn't actually started the service.
I'm god, but it's a bit of a drag really...
. net sucks. Perl, Pascal, all interpreted languages are a dead end. They're ui elements that don't count. If you can't use your available source to build theOS the compiler and core apps, you lose.
An example of an OS or a libc (or analogous system library) written without assembler in studio please!
All hope abandon ye who enter here.
As another poster mentioned, its not the "main" class that takes time its all the other jar files a real world app needs. A detailed analysis of this was presented at Balisage 2009 by Norm Walsh and myself. http://www.calldei.com/pubs/Balisage2009/index.html http://www.balisage.net/Proceedings/vol4/html/Lee01/BalisageVol4-Lee01.html Includes some pretty pictures and charts running tests across multiple OS's and platforms running real world XML processing in java, both by piecemeal (starting java for each operation) vs integrated into a single app (xproc and xmlsh). Results are 50x and up performance difference between having to start java for each operation or not. And these are pretty hefty operations to begin with (not "hello world"). -David
I disagree. Java's startup time is a minor annoyance today on any PC purchased in the last three years that's better than a netbook. In the late 1990s and early 2000s Java was dog slow on consumer grade devices. And Java Web Start, Sun's platform for delivering convenient Java applets over the web with defined security rules and digital signatures, was an incredible pain in the neck to set up. You could argue it never got widespread use because of Microsoft, but I would say all of the work involved in getting it to operate properly was enough to kill it all by itself, and Microsoft didn't need to do a thing.
I've spent the last years being paid a pretty penny to write Java code. I'm not going to switch because I can't pay the mortgage and daycare going from "senior java developer" to "junior foo developer". But the language is choking on its own bloat and even with brilliant toolkits like Play Framework it's a headache to use.
To remind an old joke:
Knock knock!
Who's there?
.
.
.
.
.
.
.
Java!
is the slug compiled or interpreted?
who prays for Satan? Who in 18 centuries has had the humanity to pray for the 1 sinner that needed it most? ~Mark Twain
Swing
How DARE you even speak that word on a family forum, young man!
SJW: Someone who has run out of real oppression, and has to fake it.
Say I wanted to write ls in Java. Startup time would be very important to me
They'd say your entire userland should be happening inside a JVM, so you wouldn't notice the startup time.
In some universes that may work.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
is the slug compiled or interpreted?
In the case of Java, it's both.
Java: All the restrictions of a compiled language, plus the inconveniences of an interpreted one!
Oracle is welcome to contact me, my services as a slogan-writer are available and quite reasonably priced (by Oracle standards).
What we need more of is science!
I hear you I manage a medium Tomcat farm (few hundred machines) and and some of the servers can take up to 15m to load (we have GBs of caches to fill) and we actually tail the tomcat logs to look for a 'ready to serve pages' notice.
Humor. It is a difficult concept. It is not logical.
SJW: Someone who has run out of real oppression, and has to fake it.
Swing is also a lot more predictable and better thought out API than SWT although the latter benefits from greater native OS integration. SWT suffers from some really ugly APIs and hacks to work around limitations in native widgets.
I even wrote a scripting language for said game that runs in Actionscript. "Sup dawg we heard you like scripting languages" I know I know :P
Despite the name Actionscript is a compiled language.
Actually, .NET apps typically take less to start, but that's because .NET exposes a way to pre-JIT bytecode on a given machine and cache that - NGen - which is usually done by the installer of a managed app. In theory, JVM could do the same thing - see Excelsior JET etc - it's just that few people seem to be interested.
Say I wanted to write ls in Java. Startup time would be very important to me
They'd say your entire userland should be happening inside a JVM, so you wouldn't notice the startup time.
In some universes that may work.
And I shall call it Eclipse.
http://michaelsmith.id.au
Secondary education is irrelevant when butting heads with anonymous coward.
Touché , Mr. Smith.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
Yeah, assembler is great when you're coding for one machine. C subsumed assembler with _asm. That was brilliant. Maybe Dennis Ritchie was smarter than you think. Frankly reading his work his intellectual judo is amazing. You should try it. You would get religion. As I write this the K&R book is under my hand. It was writ in 1988 and since then nothing in it has come untrue. It differs little from the 1978 work.
In 1978 all of the computers on Earth could not in their aggregate compete with a single modern server - not in processor power, not in RAM. In no way. The people who made those things could not imagine our future day. Somehow Dennis Ritchie did and so now the computer in your pocket that's also a phone runs an OS that's compiled in a language he wrote, more than 80 percent of the time running an OS created or inspired by his work on Unix. iOS is derived from the BSD branch of Unix and powers iPhones, iPads and iPods (all writ in C derivatives). Linux is an OS inspired by Unix that powers Android phones and most world-facing servers, and is also writ in C.
libc is writ mostly in C by purpose, and includes only those few bits of assembler required to make the hardware fit. It's a strong point of C that these are the only bits that need rewritten to port Unix to a new chip. This is by purpose. Underlying hardware will differ, and this interface allows chip designers to connect with potential users through a utility called Lex. Compare and contrast Windows Mobile, which needs to be rewrit in assembler from the ground up to make it run on a new chip, with the concomitant debugging starting over from scratch. That's a non-winner. By being, C has influenced hardware designers to be compatible with it.
Remember, the idea of porting an OS, applications and data from one hardware and software architecture to another was a new idea back then. Computers were new and there were only a few of them. Persistence of data and apps as the core utility was a new idea. Dennis Ritchie invented that, and invented a method to serve that need with C and Unix. Some of us old geezers yet live who watched that happen.
In short, you're either confused or arguing with the wrong guy. Have you checked the bulletin board lately?
Help stamp out iliturcy.