[url=http://meincmagazine.com/civis/viewtopic.php?p=24547395#p24547395:ykq27jga said:Kitzbuehl[/url]":ykq27jga]The main objective of Java, and so Javascript, stand in the fact to have only one language for any software or hardware platform.
[url=http://meincmagazine.com/civis/viewtopic.php?p=24547239#p24547239:34rk0otz said:kruzes[/url]":34rk0otz]This isn't exactly right. Google expressed an interest in figuring out why asm.js ran slow in V8. They found out that some of things in the asm.js spec were handled particularly badly by the V8 JIT, and proceeded to a) promptly fix the low hanging fruit and b) understand how the overall design can better accommodate something like asm.js.Other browsers don't have special asm.js support at all. Google expressed some interest in adding asm.js optimizations to Chrome, but it hasn't done so yet. Worse, our testing showed that the use of asm.js actually hurt performance in non-asm.js browsers.
As far as I can tell, there has been no effort underway to support looking for a "use asm" string placed in the first line of a top-level function
and if one is found use this other compiler that works in a totally different way instead.
[url=http://meincmagazine.com/civis/viewtopic.php?p=24548691#p24548691:2oibnzmt said:CobraA2[/url]":2oibnzmt]These engines brought something new to the world of JavaScript: high performance achieved through just-in-time (JIT) compilation.
I'd like a fact check on this. I could've sworn I remember JIT compilation in the '90s. V8 was a major performance boost, but I don't think it was the first to use JIT. I think it changed how JIT worked, not whether or not it was JIT.
It did no such thing.[url=http://meincmagazine.com/civis/viewtopic.php?p=24547397#p24547397:xbqntkg8 said:computers_are_bad[/url]":xbqntkg8]This is a mostly useless comparison because the native code explicitly had SIMD instructions disabled. It's easy to make native code look slow when you deliberately cripple it.
[url=http://meincmagazine.com/civis/viewtopic.php?p=24548223#p24548223:1v0rszxf said:atu30004[/url]":1v0rszxf]I haven't read any of the comments, so please forgive me if this has been pointed out by someone else.
It seems to me that it is just now being realised that all the "advances" in programming of the last many years--starting with 'object-oriented' programming--comes at a price: complexity at the "out-of-sight-out-of-mind (machine; memory-consumption) level. Certainly, program creation is apparently easier than it used to be, but people are rightly starting to investigate and ask, "Just exactly why is "C" and "assembly language" so much faster than anything else we do?"
The proper place to start, to solve a problem such as this, is at the beginning.
[url=http://meincmagazine.com/civis/viewtopic.php?p=24546719#p24546719:26zscy15 said:TheFerenc[/url]":26zscy15][url=http://meincmagazine.com/civis/viewtopic.php?p=24546673#p24546673:26zscy15 said:smoofles[/url]":26zscy15]Their rendering engine still sucks balls. Fast computing only helps so much if you can't even get image scaling right or you engine starts acting up with complicated (HTML-based) scenes.
But, hey, good that they can run a 3D engine in the browser and offer a Social API. Who needs HTML/CSS rendering quality, amirite?
Just try using the digikey search box. In IE, there is a clearly delineated search box. In firefox on my RHEL6 install, the word "Search" is in one white box, while the actual text entry field is another, identical, offset and weirdly placed white box. Makes it a real PITA to search for things, since the first thought of most people (IME), is to click on the thing that looks like a text box with the word Search in it.
Hi Peter, I work on the Native Client team. Can you mention a few things that make it more involved? We'd love to be able to make this easier.I would like to look at NaCl too, but making it work is a little more involved than asm.js. If there's enough interest, it's certainly something I could take a look at.
[url=http://meincmagazine.com/civis/viewtopic.php?p=24546019#p24546019:3hc6ucjs said:Faramir[/url]":3hc6ucjs]I don't understand why people seem to think that every sort of program should run in a browser.
Triple A video games, scientific computing programs, and computer assisted design programs seem particularly ill suited to a web browser strait jacket, that nonetheless people are enthusiastically working on.
The number one answer seems to be that people trust the browsers' sandboxes which seems a) unwarranted and b) overkill for the problem of untrusted code.
[url=http://meincmagazine.com/civis/viewtopic.php?p=24547169#p24547169:2uvipi0b said:szpet[/url]":2uvipi0b]Flash has this kind of thing since long time:[url=http://meincmagazine.com/civis/viewtopic.php?p=24546633#p24546633:2uvipi0b said:thegeneral[/url]":2uvipi0b]The wonders of a post Flash world.
http://gaming.adobe.com/technologies/flascc/
The wonders of reinventing.
Flash is dead or dieing on a lot of platforms that matter.[url=http://meincmagazine.com/civis/viewtopic.php?p=24548775#p24548775:30km2fre said:paleozogt[/url]":30km2fre]I know everyone hates Flash, but fyi Adobe's FlasCC (formerly Alchemy) has been doing this (LLVM->AS3) since 2008. It even has support for proper threading.
[url=http://meincmagazine.com/civis/viewtopic.php?p=24548871#p24548871:2steore8 said:Sobels[/url]":2steore8][url=http://meincmagazine.com/civis/viewtopic.php?p=24548691#p24548691:2steore8 said:CobraA2[/url]":2steore8]These engines brought something new to the world of JavaScript: high performance achieved through just-in-time (JIT) compilation.
I'd like a fact check on this. I could've sworn I remember JIT compilation in the '90s. V8 was a major performance boost, but I don't think it was the first to use JIT. I think it changed how JIT worked, not whether or not it was JIT.
The oldest example of JIT in action was used to run LISP in the 60's. However, V8 and Tracemonkey were the first JIT compilers for Javascript. Before then, Javascript was run in an interpreter. The switch to a JIT compiler from an interpreter brought massive, massive speed boosts with it.
[url=http://meincmagazine.com/civis/viewtopic.php?p=24550233#p24550233:2a2chgqy said:name99[/url]":2a2chgqy][url=http://meincmagazine.com/civis/viewtopic.php?p=24547169#p24547169:2a2chgqy said:szpet[/url]":2a2chgqy]Flash has this kind of thing since long time:[url=http://meincmagazine.com/civis/viewtopic.php?p=24546633#p24546633:2a2chgqy said:thegeneral[/url]":2a2chgqy]The wonders of a post Flash world.
http://gaming.adobe.com/technologies/flascc/
The wonders of reinventing.
And yet no-one gives a damn about it.
Perhaps this tells us something of the consequences of sitting on your ass for ten years, shipping a product that is slow and riddled with security bugs?
Hi.[url=http://meincmagazine.com/civis/viewtopic.php?p=24550071#p24550071:1599firt said:binji[/url]":1599firt]Hi Peter, I work on the Native Client team. Can you mention a few things that make it more involved? We'd love to be able to make this easier.I would like to look at NaCl too, but making it work is a little more involved than asm.js. If there's enough interest, it's certainly something I could take a look at.
Even if the javascript runs identically across platforms you still have to do a lot of customization to deal with radically different display and input hardware. And even after you've done all that what you are left with is strictly inferior to something actually designed for each platform. It is for that reason, among others, you don't see many java swing GUIs, which is the last technology that promised write once, run anywhere.[url=http://meincmagazine.com/civis/viewtopic.php?p=24550157#p24550157:f5jnaze3 said:jimjimjimjimjim[/url]":f5jnaze3][url=http://meincmagazine.com/civis/viewtopic.php?p=24546019#p24546019:f5jnaze3 said:Faramir[/url]":f5jnaze3]I don't understand why people seem to think that every sort of program should run in a browser.
Triple A video games, scientific computing programs, and computer assisted design programs seem particularly ill suited to a web browser strait jacket, that nonetheless people are enthusiastically working on.
The number one answer seems to be that people trust the browsers' sandboxes which seems a) unwarranted and b) overkill for the problem of untrusted code.
The alternative to having everything run in a browser seems to be platform specific apps (iOS, Android, Windows, etc).
That scheme doesn't sound very secure. Your site can't be a trusted source for reusable components, since you could modify the component.[url=http://meincmagazine.com/civis/viewtopic.php?p=24550919#p24550919:3g8b88bb said:Tundro Walker[/url]":3g8b88bb]What I think would be interesting is if maybe someone like the W3C came up with a "standardized" javascript usage library. A lot of sites that use javascript do the same things with it... buttons, banners, etc. If there was a standardized library, a page could say something like "look for this standardized, compiled component on user machine first, and if it's not found then snag the component from us, compile it, and keep it in cache for future use (from us and other sites that may use it)." I guess that would be sort of like javascript versions of dll's. Instead of each site dumping their own version into your web cache, they can trim down the javascript to a standardized library for most of the functions. Maybe I'm talking out of my ass here.
HTML have something like this in that more widgets, for lack of a better word, are getting tags that are then left up to the browser implementer to build. So for example, instead of choosing one of the hundred date pickers out there, in a compliant browser you can include: <input type="date"> and the browser chooses a widget that works for its environment. No need to download or parse any javascript for that widget, it's all built into the browser.[url=http://meincmagazine.com/civis/viewtopic.php?p=24550919#p24550919:qda1wk9f said:Tundro Walker[/url]":qda1wk9f]What I think would be interesting is if maybe someone like the W3C came up with a "standardized" javascript usage library. A lot of sites that use javascript do the same things with it... buttons, banners, etc. If there was a standardized library, a page could say something like "look for this standardized, compiled component on user machine first, and if it's not found then snag the component from us, compile it, and keep it in cache for future use (from us and other sites that may use it)." I guess that would be sort of like javascript versions of dll's. Instead of each site dumping their own version into your web cache, they can trim down the javascript to a standardized library for most of the functions. Maybe I'm talking out of my ass here.
They do. However, the problem with Javascript isn't just dynamic typing, it's portability and usability; Javascript isn't precompiled, and is instead sent as source code so that any browser that supports Javascript can run it, with no worries about the hardware that a browser is running on.[url=http://meincmagazine.com/civis/viewtopic.php?p=24548349#p24548349:3ep8zgu1 said:Brutha[/url]":3ep8zgu1]Why can't someone apply the same solutions Apple does with obj-c? v-table lookups, etc?
[url=http://meincmagazine.com/civis/viewtopic.php?p=24546057#p24546057:rlwuglk6 said:styron[/url]":rlwuglk6][url=http://meincmagazine.com/civis/viewtopic.php?p=24546019#p24546019:rlwuglk6 said:Faramir[/url]":rlwuglk6]I don't understand why people seem to think that every sort of program should run in a browser.
Triple A video games, scientific computing programs, and computer assisted design programs seem particularly ill suited to a web browser strait jacket, that nonetheless people are enthusiastically working on.
The number one answer seems to be that people trust the browsers' sandboxes which a) seems unwarranted and b) seems like overkill for the problem of untrusted code.
10 yrs ago I would wonder why people would want to stream music or video instead of downloading it and playing it locally.
That way they could play it again and again without wasting network traffic/bandwidth and they wouldn't have to put up with excessive compression, buffering headaches, broken connections etc.
Now I hardly care, and streaming has some advantages around multiple devices and not having to maintain media libraries etc.
Apps moving to browsers is the same kind of progression. Yes it kind of sucks at the moment (especially for complex apps), but year by year it sucks less, and the advantages around not having to maintain software start becoming more compelling.
It isn't about right now - it's about 5-10yrs time.
[url=http://meincmagazine.com/civis/viewtopic.php?p=24551665#p24551665:7lshhll9 said:Haravikk[/url]":7lshhll9]They do. However, the problem with Javascript isn't just dynamic typing, it's portability and usability; Javascript isn't precompiled, and is instead sent as source code so that any browser that supports Javascript can run it, with no worries about the hardware that a browser is running on.[url=http://meincmagazine.com/civis/viewtopic.php?p=24548349#p24548349:7lshhll9 said:Brutha[/url]":7lshhll9]Why can't someone apply the same solutions Apple does with obj-c? v-table lookups, etc?
However, this means that Javascript is completely uncompiled when it enters a user's browser, and as a result compilers can't just compile code to be as optimal as possible, because they also need to be able to compile it quickly (otherwise a site would seem slow and unresponsive).
There are ways to compile Javascript into a runnable binary like C or C++, and these can be pretty fast. Even so, Javascript's free-form dynamic variables and handling of objects can be a bit of a hurdle, as they're even less restrictive than Objective-C's capabilities.
var i = 0;
...
i = "Hello World!"
One of the interesting thing about dynamic typing is how rarely the extreme flexibility it offers is actually used.
E.g. you'll almost never see code like this:
Modern javascript engines exploit this fact, and optimize the heck out of the the i-will-always-be-numeric-path, but they can't get rid of the guards that check to insure that always remains true. The big advantage to static analysis (i.e. compiling) is that you can sometimes get rid of those guards altogether.Code:var i = 0; ... i = "Hello World!"
[url=http://meincmagazine.com/civis/viewtopic.php?p=24550489#p24550489:316zmasw said:Faramir[/url]":316zmasw]Even if the javascript runs identically across platforms you still have to do a lot of customization to deal with radically different display and input hardware. And even after you've done all that what you are left with is strictly inferior to something actually designed for each platform. It is for that reason, among others, you don't see many java swing GUIs, which is the last technology that promised write once, run anywhere.[url=http://meincmagazine.com/civis/viewtopic.php?p=24550157#p24550157:316zmasw said:jimjimjimjimjim[/url]":316zmasw][url=http://meincmagazine.com/civis/viewtopic.php?p=24546019#p24546019:316zmasw said:Faramir[/url]":316zmasw]I don't understand why people seem to think that every sort of program should run in a browser.
Triple A video games, scientific computing programs, and computer assisted design programs seem particularly ill suited to a web browser strait jacket, that nonetheless people are enthusiastically working on.
The number one answer seems to be that people trust the browsers' sandboxes which seems a) unwarranted and b) overkill for the problem of untrusted code.
The alternative to having everything run in a browser seems to be platform specific apps (iOS, Android, Windows, etc).
This doesn't mean that Chakra is necessarily slower in "real life"; the code produced by Emscripten is substantially unlike any normal code that browsers would run. It may not be altogether surprising that they don't handle it well.
[url=http://meincmagazine.com/civis/viewtopic.php?p=24551773#p24551773:2xsenw16 said:simpleWho[/url]":2xsenw16]Local playback is still better than streaming. All youtube videos play better when downloaded locally. It lets me use the awesome feature of vlc to speed up the playback to reduce my viewing time by one half.
IE11 will have WebGL. So "it certainly wasn't for WebGL" is not that certain.[url=http://meincmagazine.com/civis/viewtopic.php?p=24553527#p24553527:2748in6j said:Matt Raymond[/url]":2748in6j]This doesn't mean that Chakra is necessarily slower in "real life"; the code produced by Emscripten is substantially unlike any normal code that browsers would run. It may not be altogether surprising that they don't handle it well.
Stop making excuses for Chakra. Emscripten outputs JavaScript that uses typed arrays to increase performance, and Internet Explorer 10 is supposed to support Typed Arrays. If not for things like Emscripten, why did they add support for Typed Arrays in the first place, because it certainly wasn't for WebGL.
The browser is an ideal distribution platform since pretty much *everyone* has one on pretty much *every* device they have.[url=http://meincmagazine.com/civis/viewtopic.php?p=24546019#p24546019:1br2ldps said:Faramir[/url]":1br2ldps]I don't understand why people seem to think that every sort of program should run in a browser.
[url=http://meincmagazine.com/civis/viewtopic.php?p=24550489#p24550489:1e3bfsds said:Faramir[/url]":1e3bfsds]
Even if the javascript runs identically across platforms you still have to do a lot of customization to deal with radically different display and input hardware. And even after you've done all that what you are left with is strictly inferior to something actually designed for each platform. It is for that reason, among others, you don't see many java swing GUIs, which is the last technology that promised write once, run anywhere.
[url=http://meincmagazine.com/civis/viewtopic.php?p=24545787#p24545787:18kfmtol said:Matty[/url]":18kfmtol]The web has come to so much success because it is open.
Sure you can obfuscate Javascript to some extent, but it is rare.
I'm sure many on this site have had a peek at other sites JS/CSS/HTML.
I'd be worried about a web where asm.js became the norm. Closed applications would be the norm.