Google Ports Box2D Demo To Dart 194
mikejuk writes with an excerpt from an article at i-programmer about a neat graphics demo written in Dart: "One of the difficulties in getting a new computer language accepted by a wider audience is that there is doubt that it is real. Is it a toy language that just proves a concept or can it do real work? In the case of Dart, which is Google's replacement for JavaScript, the development is speeding ahead at a rate that is impressive but worrying. To prove that Dart is already a language that can be used, we now have a port of the well known 2D physics engine Box2D, the one Angry Birds uses, to Dart."
Box2D has previously been ported to Javascript. Source is available at Google Code (under the Apache license). Note that you'll need Chromium to run the demos.
Not again! (Score:2, Insightful)
Note that you'll need Chromium to run the demos
As a web developer and after all the nuisance old IE's gave me and other web developers back in the day, this is really what's stupid with Chromium and Google's approach. They're mimicking the old Microsoft here - make your own "standards" and break the web by making features and sites that only work Google's browser. I seriously thought we would had been past that and the old IE's were the last browsers that didn't adhere to standards. IE9 is now fully standards compliant, and what does Google do? Oh yes,
Re:Not again! (Score:5, Insightful)
Re: (Score:2)
That, plus the fact that Dart compiles to Javascript.
Indeed, what is the problem?
Re: (Score:2)
What they're doing is not really that different from when Microsoft introduced VBScript or attempted to steamroller Office Open XML throu
Re: (Score:2)
without submitting to standards bodies, without forming concensus from other browser makers to agree or disagree to use the tech and basically using the weight of their entire company to foist these standards onto the web whether they are ready for it or not
Does somebody do that? All major features were introduced independently and codified later. It's a race between browsers to see who can invent the next big thing - MS, Mozilla, Google, Apple, Opera, everyone introduces new features and implements interesting features introduced by others every release.
Sure, not every feature sticks - nobody flocks to Chrome to check out WebP, and nobody flocks to FF to check out Javascript 1.8.5.
You make it sound like Google has browser monopoly and can pull their weight be
Situation: there are n+1 competing standards ... (Score:3, Funny)
The same problem that there would be with lots of people if Microsoft started suddenly introducing their own "standards" again. There's still some issues because of all that bs 10 years ago, but now it has almost gone away. There really isn't any need to broke the web again. And how to create something better? Work out a standard of it.
What a great idea! I'll hop to it right now!
Situation: there are n+1 competing standards [xkcd.com].
Re:Not again! (Score:5, Insightful)
2. Insisting on a consensus before every new technological upgrade would be frustratingly slow and the whole process can be held back by one individual. That's not how technology improves.
Re: (Score:2)
That has nothing to do with it. Do you imply Microsoft dropped javascript back in the days? Of course, they did not.
It's called embrace, extend, extinguish. You did not remember the lesson with IE?
Re: (Score:2)
Neither embracing nor extending are the evil part, and Google doesnt have a history of Embrace, Extend, Extinguish.
Re: (Score:2, Interesting)
And then
java: dalvik <=> j++
javascript: dart <=> vbscript
html: nacl <=> activex
opengl: renderscript <=> directx
Now I'm not claiming that Google is the same as Microsoft, I don't think this. But honestly, I still have some concerns.
Re: (Score:2)
You mean like Linus Extended Minix as Linux? And for the record, android uses a Linux kernel, and is technically as much Linux as Debian and CentOS.
Re: (Score:2)
Google's model seems to be Invent, Entrap, Abandon. Well for anything outside of Search and E-mail anyway. We are all still wondering how this is supposed to be profitable, and when they will drop Droid.
Re: (Score:2)
Re: (Score:2)
So you'd prefer that all innovation be done by committee?
There is very little resemblance between what Google is doing here and what Microsoft did back then, and if you really believe that these situations are similar, I suspect you misunderstand Google's goals behind Chrome/Chromium.
Re: (Score:2)
in the hopes that you will use their products (The OS for MS, Google app for Google) instead of their competition
That tells me you misunderstand Google's goals with respect to Chrome. Why do you believe that increased usage of Chrome implies increased usage of (any) Google property?
To put this another way, it is not necessary for other web browsers to "fail" or lose market share to Chrome for Chrome to be a success for Google. Once you understand why that is, you will understand why drawing a parallel to IE is a flawed exercise.
Re: (Score:2, Troll)
The same problem that there would be with lots of people if Microsoft started suddenly introducing their own "standards" again.
Microsoft does not just "introduce" standards, MS strong arms everybody to adopt those MS proprietary standards. MS does not do this to improve technology, but to preserve their abusive monopoly. MS does not play nice with anybody else, and never has.
There's still some issues because of all that bs 10 years ago, but now it has almost gone away.
OOXML was ten years ago? Silverlight was ten years ago?
I am glad to see MS "introduce" all they standards they want, as long as they standards are fully open; but they never are.
Re: (Score:2)
Re:Not again! (Score:5, Insightful)
And when you submit your new idea to the standard committee the very first thing they will ask for is demonstration of existing practice. Standards committees do not design new features. They observe existing practices and extensions and adopt them, possibly with some modification. To get something standardized you must first make it, work out the kinks, show why it's helpful, and get people to use it in practice. Only then will a standards committee consider it for the next version.
Re: (Score:2)
As long as they release all the specs and dont act anticompetitively (constantly change the standard and strongarm vendors to comply), that wouldnt be a problem at all.
IIRC, a lot of the HTML5 stuff was based on stuff people had started doing outside the spec since HTML 4 was so limited. What, is all progress supposed to cease until the W3C gets its collective act together and makes an executive decision about what the web wants?
Re: (Score:2)
IIRC, a lot of the HTML5 stuff was based on stuff people had started doing outside the spec since HTML 4 was so limited. What, is all progress supposed to cease until the W3C gets its collective act together and makes an executive decision about what the web wants?
They still haven't finalized it. Don't plan to until at least 2014, last I read.
Re: (Score:2)
This was more of a problem in the past because nobody had anybody elses source code, so cross pollination of code didn't happen and competing implementations were more often incompatible.
While I still don't like like random new things appearing outside the standards without good reason, doing it in an open source application is much less of a problem.
Re: (Score:2)
Some Discrepancies with Your Bitching (Score:5, Informative)
They're mimicking the old Microsoft here - make your own "standards" and break the web by making features and sites that only work Google's browser.
From Dart's wikipedia page [wikipedia.org]:
Google will offer a cross compiler that compiles Dart to ECMAScript 3 on the fly, for compatibility with non-Dart browsers.
And, in fact, dartc already cross compiles Dart code to plain Javascript. Once it's integrated into browsers, use it or don't use it.
It's like Microsoft all again.
Right, that's a stretch. You conveniently cherry pick details here. For example, NaCl is released under a BSD license [google.com] with source code readily available. Are you saying the same was true of ActiveX since it's launch?
Re: (Score:2)
>> And, in fact, dartc already cross compiles Dart code to plain Javascript
Last I checked, it compiled "hello world" into a 17K line Javascript program. Not exactly optimal.
Re:Some Discrepancies with Your Bitching (Score:4, Informative)
Seems like they've worked on it since the last time you checked: http://www.dartlang.org/support/faq.html#hello-world-js-size [dartlang.org]
Re: (Score:2)
So the net result is basically that users of Chrome on Google services will get the faster Dart version, whereas users of other web browsers will get a slower version that's been compiled to JavaScript badly. What's more, Google has very little incentive to optimise either the JavaScript version or Chrome's JavaScript support at that point, leaving other websites with a choice: use Dart and get decent performance on Chrome and sucky performance elsewhere, or use plain JavaScript and get decent performance e
Re:Some Discrepancies with Your Bitching (Score:4, Informative)
Net result of any new extension is that users of the browser implementing it get a faster and better version. If it turns out to be a good idea other browsers follow and everyone ends with a net benefit.
Canvas, for example, was Apple's extension in WebKit, year or two later other engines caught up to it too.
XHR was created by MS for Outlook Web Access, with other browsers implementing it in a year or two after that, and W3C draft standard appearing only 5 or 6 years later.
That's how innovation worked in browsers for a dozen years.
Re: (Score:2)
Net result of any new extension is that users of the browser implementing it get a faster and better version.
Except they don't necessarily. Canvas and XHR were popular because they were relatively small features that could be added incrementally without disturbing anything else, though XHR wasn't actually entirely compatible between browsers initially precisely because it was a Microsoft-specific feature implemented in a Microsoft-specific way. Dart requires rewriting or replacing the entire JavaScript engine of the browser in question, including its interface to the DOM and every other feature like Canvas or XHR
Re: (Score:2)
Why should it _replace_ JS engine? Sometimes I feel people forgot that <script> element has language="" attribute there for a reason.
Scripting engine shouldn't be hard coupled with the main application. Exposing DOM should be as easy as creating new FFI wrappers for the same old objects JS engine calls on.
Google guys seems to have it right, if they managed to include a new scripting layer without disturbing their old V8.
Of course what I (and I'm sure I'm not only one) really wish for would be not a si
Re: (Score:2)
Why should it _replace_ JS engine? Sometimes I feel people forgot that <script> element has language="" attribute there for a reason.
It doesn't have to, but the alternative is to bloat the browser with two independent JavaScript interpreters each with their own interface to the DOM and everything. Also, I think that may require some hairy code to allow objects to from one to be accessed in the other.
Google guys seems to have it right, if they managed to include a new scripting layer without disturbing their old V8.
I'm pretty sure that they designed it to be integrated heavily with V8 at the very least, if not an actual part of it. Dart was even created by the same person as V8.
Re: (Score:2)
Yes, it's hard, but doable. Re: bloat, it depends. Lua, for example, is around 100kB. Even if bindings take twice or four times that, it's an insignificant blip - just compare to single xul.dll's 16Mb or opera.dll's 15 or chrome.dll's 29. And all of those are just _parts_ of the application (well, except Opera, there it seems to be all there is + 1Mb of application exe)
A side note, per my observations, many would be happy to see Lua embedded in browsers, there's already Emscripten and there was a NaCl Lua b
Re: (Score:3)
There's no point to start learning and using something that will be dead soon.
But your problem is already solved then. So what's the fuss over?
Re: (Score:3)
But why would anyone start to use this? Google has a huge problem with quickly abandoning projects. They just throw something at wall and see if it sticks
I have to agree with you on this point. Google does that all the time.
Re: (Score:2)
Yes they do, but the ones that work they stick with ...
It's called real world testing, rather than plow on with a project when it is not working in the real world they move on to another idea ...
Re:Some Discrepancies with Your Bitching (Score:5, Insightful)
ActiveX was an "open" standard in the sense that Netscape could have implemented it if they wanted to ..... on Windows only. That's because the bulk of the APIs you needed to use to write an ActiveX control were just the regular Win32 APIs. Netscape had a policy of supporting not just Windows but all operating systems. That's why Microsoft made ActiveX - they saw weakness (other platforms gui frameworks kind of sucked at the time, so pandering to them restricted developers a lot), and they attempted to exploit it (by allowing developers to build better apps that were Windows only).
Was ActiveX "evil"? Well, it was certainly platform specific. Making things like this NOT platform specific is a ton of work, NaCL uses techniques and technologies that didn't exist back then, and they had no incentives to do it. Whether it was wrong to do depends on your views on the importance of features vs platform independence.
NaCL is different to ActiveX in some really important, fundamental ways. Firstly, the APIs it exposes to native code are really small: just Pepper, which provides you with the real basics along with some well accepted cross-platform APIs like OpenGL. Importantly there's no GUI toolkit. If you want buttons and sliders, you need to use HTML, not Win32/GTK/Cocoa. In fact NaCL will prevent you from accessing these APIs entirely!
Secondly, it's got a strong focus on security. NaCL code has security properties that are provable using static analysis. It also runs in a sandbox for a second level of defence. This is very different to ActiveX, which relied entirely on Authenticode, and suffered some serious UI problems that made it vulnerable (modal dialog boxes).
Thirdly, everything you need to implement NaCL is open source, so other browser makers can (and maybe will) adopt it. The core runtime and execution technologies are all open source, with the bulk of the integration work being joining Pepper to your browser. Mozilla already supports Pepper and I guess other browsers will too soon (maybe not IE). It really wasn't possible for Netscape to support ActiveX for all their users in the 90s, but it's quite feasible for Apple, Microsoft, MozCorp and Opera to support all their users with NaCL, especially now the dependency on x86 has been broken.
Re: (Score:2)
Re: (Score:2, Informative)
I think you fundamentally misunderstand the purpose of Chrome/Chromium, and that misunderstanding is blinding you to the very obvious differences between what Google is doing with Chromium (NaCl, Dart, SPDY) and what Microsoft did with IE. If you start instead from the right premise, and realize that everything Google has done has been open-sourced, you start to get a better appreciation for what's really going on.
Re: (Score:2)
everything Google has done has been open-sourced
Just because it's open sourced doesn't mean it's of any use to other browsers. NaCl is tied to a huge Chrome-specific set of APIs that are deeply integrated into the browser and probably not practical for anyone else to implement, Dart is part of their JavaScript VM which no-one else uses and again the JavaScript VM and browser are so deeply integrated no-one else could use it, and SPDY is pretty much the same and in addition is undocumented and requires modified SSL libraries.
Re: (Score:2)
...Okay, and? Where's the issue with that, exactly?
Re: (Score:2)
You do realize that BSD license lets you take the source, modify it, and tack your own proprietary license on top of it, right?
Its not viral, like GPL.
TechGuys is an MS Shill. (Score:2, Informative)
Here we go again! [slashdot.org]
Every time I click on a news story involving Google, I'm all but positive that the first post will be:
a) Posted with a 2.5+ million UID
b) Over 100 words long, yet still posted the same minute the story goes live
c) Negative towards Google
Here we go again. Welcome back CmdrPony / InsightIn140Bytes / DCTech. Happy shilling. Hope you karma manages to hold out for more than 4 days this time.
Re: (Score:2, Funny)
Well, Google is the new Microsoft!
Re: (Score:2)
Pro tip: subscribers get to see stories ahead of time. You don't have to be a shill to write a long first post.
Re: (Score:2)
Does he look like a subscriber to you?
Re:Not again! (Score:5, Insightful)
You do know how web standards work right? It goes something like this:
1. A bunch of people come up with ideas that would be cool to have in browsers.
2. Some of them add those things to browsers.
3. After we figure out which approach works / is most acceptable to all browser makers, it becomes a standard.
For some reason it's a common belief that it works the other way around (make standard -> implement standard), but anyone know hows anything about programming can tell you why setting everything in stone and then writing the software is a terrible idea.
Re: (Score:2)
...anyone know hows anything about programming can tell you why setting everything in stone and then writing the software is a terrible idea.
Okay, pretend I know nothing of programming and explain to me why this is a bad idea.
Re: (Score:2)
Set in stone? Really, so all the browsers did not update themselves to meet the standards as they evolved?
Well IE lagged behind, and is now playing catchup but they now all implement the published standards even though they did not before, and mostly implement the core of what will be HTML5
They all implemented what they thought the standard would be or should be, and then modified their system to be closer to the actual standard and it was worked out ... which is how it should work ...
Re: (Score:2)
There is something called 'requirements' - stuff people want to do, and there is something called 'solutions' - software that does stuff. As soon as human being starts to use a piece of software, it changes their requirements, because they have new ideas of stuff they want to do. Hence it is impossible to define the 'true' requirements before the software exists, because the true requirements don't exist until the software does, and vice versa. Softwar
Re: (Score:2)
They may have crap mistakes in them that people will have to support for years to come, and a hundred million web developers will curse your hubris writing standards for stuff you don't understand and didn't check was okay.
Or, as is often the case, no one will support the standard.
Re: (Score:2)
NaCl and Dart are both fundamentally unacceptable to at least Firefox though - they consider them basically impossible to implement. Google is going ahead with them anyway. I don't think any of the other browser manufacturers are any more willing either.
Re: (Score:2)
NaCl and Dart are both fundamentally unacceptable to at least Firefox though - they consider them basically impossible to implement. Google is going ahead with them anyway. I don't think any of the other browser manufacturers are any more willing either.
So they fail. What's the problem?
Google wants to convince other people to implement something they like, so they created their own implementation to demonstrate it. How else do you expect them to convince anyone? Or should they just leave things how they are and get off your lawn?
This has been modded interesting? (Score:2)
A remark like is is modded interesting? Really?
I've been a /. user since 1996 and I'm seriously considering leaving this site. The user-interface is broken and unintelligible and the comments seem to be heading towards brain-dead.
Y
Re: (Score:2)
Re: (Score:2)
There's a large difference tho.
Google has the public opinion still on it's side. MS had lost it way before they started ActiveX.
And technically - Google's stuff is usually slightly better and more open (because yeah, no matter what you hear, some MS still is actually genuinely awesome.Surface, Kinnect, Singularity, etc, are actually splendid, some of which are open too)
And that is why Google is currently a danger for the free web we still have today.
Re: (Score:3)
Another example is NaCl, or Native Client, which tries to mimic Microsoft's ActiveX, and again
And Mozilla's NPAPI plugins....
But of course thats different, right?
Re: (Score:2)
IE9 is now fully standards compliant
No, it isn't.
As a web developer I was really looking forward to IE9 so I could finally have a single set of HTML templates for all browsers.
Sadly, IE9 only meant I have to maintain yet another set of browser-specific hacks.
Not to say chrome doesn't have it's faults, but they're nowhere near as bad as IE's were, and in many ways still are.
Re: (Score:2)
Depends on your perspective, as to if they were Mistakes for Microsoft. Yes there were other factors, like their near total owner ship position on the Desktop, something Google kinda enjoys today with search, but whatever Microsoft did it worked in sense.
IE became the web browser, many websites took the attitude other browsers need bother with a GET. Microsoft's position on the desktop was if anything cemented because you more or less needed a Microsoft platform to use 80% of the WWW. It got them a footi
Re: (Score:2)
It only runs on Chromium (not even Chrome) because it's a work in progress so obviously no one else is going to support it.
I'm actually going to have to believe the astroturf accusations or assume you're an idiot for not comprehending it's not ready for everyone to use.
Hello this is the mid 1990s (Score:2)
This is enough for me not to bother clicking on the link. Saying this about your web page is a risky strategy and I guess only Google can get away with this and get a subset of people to dutifully switch browsers just to see what the exciting page has on it (and possibly Apple could too).
Moving on.
Re:Google Shill (Score:2, Funny)
Anonymous Coward is a known Google shill.
Re:Micro$oft Shill (Score:4)
Slashdot posts cannot be censored or filtered off the site. We don't do that here. They can't even be taken back by the author after you've pressed "submit" and believe me, I've put a few I'd like to have back. On the balance I prefer it this way, and well, as the post accepted page says, you should have thought of that before you pressed "submit".
Shill posts detract. Pointing out shill posts detract. But there's nothing to be done. There are financial interests involved, and they will spam. There are folks who want to white-knight slashdot as a forum for Truth, and I'm guilty of that now and then even though I know that's not what it's for. As a wise someone once said (and I paraphrase), "the value of a free thing approaches zero over time". The moderation system works.
Dart looks to be interesting tech. No doubt Google will look to make it an open standard that anyone can implement - even IE. And that will move us closer to the day that all apps are web apps, which cannot be anything but a good thing. It's time that the client architecture was unhooked from the application ecosystem at the network layer. In fact, it's at least 15 years past time for that. That was the goal of X Windows (not to be confused with the upstart), back in the day (onion, belt, lawn, etc).
Re: (Score:3, Insightful)
So pointing out that MS screwed up in the past and using concrete examples that another company is making the same mistake is somehow MS propaganda? MS did some crap (works, Vista, IE 7, patent crap threatening without stating exactly what is being infringed, etc), they did some good things (Win 95-8 (for it's day was really cool if not exactly that stable), Win 7, .Ne/VS I'd put in that list), but regardless saying someone other than MS is being stupid doesn't make you an MS shill.
Re: (Score:2)
AFAIK the problem was never "innovation", which is what OP is accusing Google and MS of, it was the way MS pushed innovation, and then subtly sabotaged efforts to make compliant implementations (like, by only releasing part of a spec, or by leaving the spec open so that various compliant implementations would have different renderings, with MS's being the only correct one).
The comparison to ActiveX is retarded anyways, since Firefox already has that: its called NPAPI, and its used for flash, silverlight, an
Re: (Score:2, Insightful)
No, the problem is brand new accounts using a distortion of the facts to push an agenda (pro or anti a specific company). The problem was never that Microsoft added new features to IE. Individual vendors adding things to their browsers is how we got all of the features of the modern web - including images! The problems were that they implemented features that were tied closely to Windows (e.g. ActiveX: run a Windows x86 binary in a web page) and that they pushed their developer tools, which generated IE-
Re: (Score:3)
I still don't see how the poster was promoting a specific company by pointing out there mistakes but okay I'll give you that new accounts going off pushing a particular idea might be astro-turfing. One could argue a lot of new accounts get away with pushing No-Company (TM) products though as in it is okay to go off on Richard Stallman like rants of craziness as long as you are pushing FOSS without being labelled an astro-turfer. Techies have their preferred tech and likely will post about what they care abo
Re: (Score:2)
Ah there is the /. hate I've grown to love. Thanks.
Re: (Score:2)
I have to admit, that I am very pro-linux and very pro-google.
I still think there is a big difference between Google and Microsoft in this case. Microsoft tends to do things to create lock in wherever they can. Back then by doing things with HTML, addons, etc, to tie you to Windows. Now by having a signed boot loader that can only boot Windows 8 on the ARM platform. They play "open" where they have to, but play "lock in" and "monopoly" whenever they think they can get away with it. This means if they could
Re: (Score:3, Insightful)
Nobody ever claimed such.
However, just because someone has reached a conclusion you don't like doesn't make them mentally deranged or a paid astroturfer. If you believe a position to be wrong, it's so much more persuasive to respond to the points one by one rather than shoo them off with personal attacks, which only serves to please those who already agreed with you.
Re: (Score:3)
I don't understand what the big fuz is about. It's not like they wrote a AAA game engine in dart, it's just an over hyped physics approximator. The demos aren't even interactive (and one performs @5fps). For all you know (no, not really) the bytecode it loads is just a predefined animation. So what if they are trying to do it wrong? Let them go that way, as long as they don't break support for the standardized www framework, I have no problem with them wasting cycles.
There are enough devs out there, with en
Re: (Score:2)
I've said this a few times, but I guess there's little harm in repeating it one more time.
1) The way to identify astroturfers is not through content, but through posting patterns. Content is just a very small part that only indicates who hired that person.
2) Do you argue with ads? Do you also go one by one through ads, debunking every claim? Maybe you do it for a few, but it's not feasible to do it for every one. Furthermore, you can't have an honest debate with them. The best you can hope for is to alert o
Re: (Score:2)
Bullshit. The posting pattern here is either mental derangement of clinical scale, or a paid astroturfing effort.
You know, you can actually read the posting pattern by clicking on somebodies name. If you had known this, you might have based your accusations of "posting pattern" based on more than a single post. But then you wouldn't have been able to just cry faul.
I might not agree with TechGuys opinions, but they don't seem too much out-of-the-ordinary or biased towards/against any particular company. I've seen decidedly more pro-MS/anti-everything-else posting histories for some other users.
Re: (Score:2)
Yes, it does, one of its common meanings / usages is "something that is at odds with"; much like two orthagonal lines do not "agree" with each other, and are "at odds".
Re: (Score:2)
No. In professional literature and discussion, "orthogonal" always refers to independent -- as in, separated design elements are orthogonal, or this discussion is orthogonal to TFA. I have not once heard it used in the manner you describe, and find that implication to be, well, orthogonal to its actual meaning *grin*.
Re: (Score:2)
The term orthagonal has a meaning referring to two elements at 90-degree angles with each other:
http://en.wikipedia.org/wiki/Orthogonality [wikipedia.org]
It has somewhat different meanings depending on the context, but most involve the idea of perpendicular, non-overlapping, varying independently, or uncorrelated.
There are many ways to use it, and your claim that it ONLY means "independent" is definitely wrong-- ask any professional mathematician.
Re: (Score:2)
Given the cost of solutions these days, I suppose it would be more accurate to write A$$le.
But I'm above that.
Re: (Score:2)
Re: (Score:2)
The JS port (Score:5, Informative)
Other uses for Dart? (Score:3)
Is this a programming language with an existing shell script interpreter style implementation, too? If so, then I might have actual use for it. Basically, that means a light-weight interpreter (light enough to use it during system boot up to run rc scripts, so not more bloated than bash in its basic form) could be named in the script like having "#!/bin/dart" on the first line, and it would execute the file however it is designed to run them. I'm not talking about using in a browser here. For extended features beyond shell script code, it should have modules (in binary .so files or in Dart) that it can load.
I'm just starting to use Lua for this kind of thing now. Lua was intended as an embedded language, but has a shell script style interpreter which is pretty much a nice example of simple embedding. If they put Dart in a browser, and implemented it cleanly in the process, then a shell script embedding should be trivial. Have they done that?
I'd be more impressed if they make Dart do all these kinds of things (including directly run in a web server) than by implementing Box2D in it. That would mean a clear separation of execution from environment, something that Javascript only partially succeeded doing. Something that Lua did succeed at, but I still want a C-like syntax class for.
Oh, and I would definitely love to have a clean integer-only typing available, something I consider a major problem with Javascript.
Re: (Score:2, Interesting)
Yes, you can run it from the command line via the Dart VM without translating it to Javascript. Haven't tried #!/bin/dart style invocation though - but being open source someone is probably working towards it if it doesn't yet support it.
I've used Dart a bit and it really is a great language - not so different that it takes ages to learn, but IMHO a big improvement on both Java and Javascript.
Re: (Score:2)
Yes, you can run it from the command line via the Dart VM without translating it to Javascript. Haven't tried #!/bin/dart style invocation though - but being open source someone is probably working towards it if it doesn't yet support it.
I've used Dart a bit and it really is a great language - not so different that it takes ages to learn, but IMHO a big improvement on both Java and Javascript.
It should not be hard. Someone already familiar with how the Dart native runtime engine works (I'm not one of those, so excuse me if that term to describe it is technically wrong, but I think you probably know what I am referring to) should be able to whip it out in a day or so and clean it up in a few weeks. They just need to set up a few pieces: the common language interpreter, a minimal library where needed, and something to make sure the hash-bang in line one is treated as a comment that can supply pa
Re: (Score:2)
Is this a programming language with an existing shell script interpreter style implementation, too?
An interpreted language bundled with a REPL? I'm not sure if Dart has a REPL, but it would be pretty trivial to implement. Fortunately the Dart specification *does* support shebangs (so #!/usr/bin/dart), check out the relevant section here [google.com] (they call it a script tag). Here's an excerpt:
A library may optionally begin with a script tag, which can be used to identify the interpreter of the script to whatever computing environment the script is embedded in. A script tag begins with the characters #! and ends at the end of the line. Any characters after #! are ignored by the Dart implementation.
I don't understand why they need the #! script tag for a library. How about for a main script? Just put that on a "hello world" example, make it executable, and see if it runs.
So where's the source code to build /usr/bin/dart from? I don't see a download link on their website.
Re: (Score:2)
So, Google has invented "a method to obscure documentation"? Have they patented it?
Re: (Score:2)
I give up. Too much obscurity. Back to Lua and Pike.
Re: (Score:2)
OMG! The language documentation does not show it has any way to do division (much less what kind of division it would do if it has such an operator).
Is JavaScript really that nice?? (Score:2)
Am I really the only one on Slashdot who dislikes JavaScript? Every time I have to work with JS, I feel like shooting myself in the head -> Little IDE support, no type safety, no compile phase... These things make it extremely hard to work on a large application base. In fact, at work we have a custom Java -> JavaScript compiler, which makes things a lot more manageable. Most of the bugs we get in our issue tracker are related to the web interface which is still written in plain JavaScript.
I actually
Re: (Score:3)
Most people working with Javascript don't really know the language that well. It's easy to get frustrated that way, because JS's C-like syntax makes you think it's a C-like language, which actually it isn't.
There is a lot wrong with JS, nobody is denying that. But it also has its nice elements. And since every device on the planet is equipped with a browser running Javascript these days, the language really is here to stay. So instead of hating it, its a lot more constructive to try and understand it, so yo
Re: (Score:2)
The problem is that most people who love Javascript seem to love it for the bad parts -- the "everything goes" language parts. There's no classes, just anonymous functions. Some people seem to love this half-assed prototype-based OOP and label it with words like "expressive" and "powerful". It's not so powerful when you're building complex RIAs. In that case, it's really dreadful compared to class-based OOP languages. As people start developing more advanced HTML5 apps, this will become apparent. There's no
Re: (Score:2)
I would say it is more the fact is is called JAVAscript which makes people think it is a Java-like language, which actually it isn't.
Re: (Score:2)
Re:Is JavaScript really that nice?? (Score:4, Insightful)
Little IDE support is helped by building IDEs, not coming up with a new language that has even less IDE support.
Dart doesn't do type safety by default. There have been proposals to add optional type annotations of the sort Dart _does_ have to JS... and they were shot down by certain members of the JS standards committee, last I checked. Don't recall what the stance of Google's representatives on it was, but they weren't the ones pushing it.
As far as a compile phase goes, Dart doesn't have one either unless you're cross-compiling it to JavaScript. You just load your Dart code directly in the browser, which then compiles it. That's what browsers do with JS too.
So ignoring for the moment whether these things are good or not, I don't see Dart making much of an improvement over JS here, except in the type-safety department, where Google didn't exactly try to improve JS in the first place.
Re: (Score:3)
JavaScript is really very simple to use.
Build an object model from your data. Merge your model with your view. Bind your model, view and dat source with PubSub events. Controllers update the model, subscribed views then update to match and the data source gets an async update in the background.
Was that hard or complicated?
This is a known and solved architecture that can be applied to DOM views, Canvas views or SVG views.
If you want to get fancy you can add support to filter, sort or mutate your data. You ca
Re: (Score:2)
JavaScript is really very simple to abuse.
tftfy
Re: (Score:2)
Could be a mixed blessing. I've found that test driven development solves this kind of issue. Setting up Jenkins or Hudson CI is not terribly complicated. Write unit tests as you code. Then when you refactor down the road you'll have full coverage for any errors/failed tests. You can run it with a watch script or as an ANT build script or manually.
Look into CommonJS or AMD modular JS for separating your code into manageable chunks and handling dependencies.
Eclipse or Aptana make nice IDEs. Good refactoring
Care to explain? (Score:3)
the development is speeding ahead at a rate that is impressive but worrying.
Worrying because...?
Awesome (Score:2)
but can it deal with a concave polygon?
"Is it a toy language that just proves a concept or can it do real work?"
depends on the work at hand
Re: (Score:2)
so no you have to come up with a workaround to concave polygons which pushes you harder against its body limits , and yes I have used box2d before
Re: (Score:2)
Re: (Score:2, Interesting)
Are you talking about the same Bing that came pre-installed as the default (un-changeable without rooting) search option on my wife's Verizon Samsung Fascinate? The same Bing that when I type something into the browser to search expecting google results like my unbranded Samsung Galaxy S does (nearly the same damn phone), I instead get Bing results that have nearly NO RELEVANCE to what I was searching for?
And that's the gods honest truth.
An example...
"teamhacksung ics build 14 galaxy s"
This update for build
Re: (Score:2)
ha I guess I shouldn't have actually read the thread before copying/pasting the google link ;) That takes you to the LAST page (since that's where I was.. on build 13 and decided to read the posts on 14 before I update). Oh well.. at least you end up at the beginning or end, and not randomly in the middle!