Originally posted by Luke_Wolf
View Post
Announcement
Collapse
No announcement yet.
SIMD JavaScript Support Added To Firefox, Under Review For Chrome
Collapse
X
-
Originally posted by brad0 View PostExcept the other options defeat the purpose of using JavaScript... so they're portable.
Most languages are portable (however libraries you use may not be, but that's on you to choose platform independent libraries and frameworks such as Qt), the only advantage that javascript provides due to a freak of nature is that it's the only language native to web browsers (native in the sense it doesn't need a plugin), and if you really want to go with the browser I can use Flash, Java, Silverlight, or NaCl, however if I'm not so insane that I desire such a thing I can write an application targeting the JVM or Mono, or any of the widely ported scripting languages and run applications natively on the device outside of a browser , even making use of the internet as opposed to the web, or I can even use C++ and Qt to write once and compile independent binaries for all of the architectures or if I decide to use LLVM I can even make a JITed version.
Simply put, Portability is not and never was a reason to use Javascript.
the "reason" to use javascript is because it's a language that lets you do quick and dirty things easily for situations (particularly UI) where the best engineering in the world doesn't really matter. For anything else you want at a bare minimum a strict and statically typed language, and I would say preferably one that is explicitly typed, and on top of that JS has a lot of weird stuff going on.Last edited by Luke_Wolf; 31 March 2014, 12:22 AM.
Comment
-
Originally posted by johnmccutchan View PostThis work is a direct port of SIMD types I did for Dart in 2013. Exact same types and operations. If you're interested in seeing what the API looks like, I maintain the ECMAScript proposal as a polyfill library. If you want to experience the full speed of these types today, you can use Dart (the SIMD types are fully accelerated on SSE and NEON in the Dart VM).
More information:
Talk I gave last year
Programming guide
John McCutchan
I was wondering why you didn't include any float64 SIMD types. I have been meaning to port some scientific computing code to Javascript that would greatly benefit from float64 SIMD types. After all, SSE and AVX both include float64 SIMD instructions and ARMv8 includes SIMD float64 as well. For architectures that lack float64 SIMD instructions (such as ARMv7 NEON) you could probably just compile to sequence of scalar instructions anyway so that shouldn't be an issue?
Comment
-
Originally posted by Luke_Wolf View Post"So they're portable"?... Are you daft?
Most languages are portable (however libraries you use may not be, but that's on you to choose platform independent libraries and frameworks such as Qt), the only advantage that javascript provides due to a freak of nature is that it's the only language native to web browsers (native in the sense it doesn't need a plugin), and if you really want to go with the browser I can use Flash, Java, Silverlight, or NaCl, however if I'm not so insane that I desire such a thing I can write an application targeting the JVM or Mono, or any of the widely ported scripting languages and run applications natively on the device outside of a browser , even making use of the internet as opposed to the web, or I can even use C++ and Qt to write once and compile independent binaries for all of the architectures or if I decide to use LLVM I can even make a JITed version.
Simply put, Portability is not and never was a reason to use Javascript.
the "reason" to use javascript is because it's a language that lets you do quick and dirty things easily for situations (particularly UI) where the best engineering in the world doesn't really matter. For anything else you want at a bare minimum a strict and statically typed language, and I would say preferably one that is explicitly typed, and on top of that JS has a lot of weird stuff going on.
Comment
-
Originally posted by Luke_Wolf View Post"So they're portable"?... Are you daft?
Most languages are portable (however libraries you use may not be, but that's on you to choose platform independent libraries and frameworks such as Qt), the only advantage that javascript provides due to a freak of nature is that it's the only language native to web browsers (native in the sense it doesn't need a plugin), and if you really want to go with the browser I can use Flash, Java, Silverlight, or NaCl, however if I'm not so insane that I desire such a thing I can write an application targeting the JVM or Mono, or any of the widely ported scripting languages and run applications natively on the device outside of a browser , even making use of the internet as opposed to the web, or I can even use C++ and Qt to write once and compile independent binaries for all of the architectures or if I decide to use LLVM I can even make a JITed version.
Simply put, Portability is not and never was a reason to use Javascript.
the "reason" to use javascript is because it's a language that lets you do quick and dirty things easily for situations (particularly UI) where the best engineering in the world doesn't really matter. For anything else you want at a bare minimum a strict and statically typed language, and I would say preferably one that is explicitly typed, and on top of that JS has a lot of weird stuff going on.
also... stupid 5 minute edit time limit ...
Comment
-
Originally posted by brad0 View PostYou have a different definition of portable than the people writing these apps. Portable meaning NOT building binaries for a shit load of different OS's, platforms and architectures having to maintain them too. Freak of nature? JavaScript was designed at Netscape for web browsers for client side apps. LOL you're asking if I am daft and then mention Flash, Java, and especially Silverlight and NaCl. What a laugh.
if I'm not so insane that I desire such a thing I can write an application targeting the JVM or Mono, or any of the widely ported scripting languages and run applications natively on the device outside of a browser , even making use of the internet as opposed to the web, or I can even use C++ and Qt to write once and compile independent binaries for all of the architectures or if I decide to use LLVM I can even make a JITed version.
And Yes Javascript was "designed" for that in the same way that HTML was "designed" for displaying information over the web, and they both came out utterly horribly, in large part due to a certain w3c's obsession with not throwing errors and thus enforcing a loose standard, as opposed to everything being strictly validated, although the defacto design nature of the standard didn't help either. (Read up on the history of the <image> tag if you want a perfect example of how defacto their design process was, in spite of discussion of far superior solutions)Last edited by Luke_Wolf; 31 March 2014, 01:36 AM.
Comment
-
Originally posted by Luke_Wolf View PostHigher complexity games that need this kind of performance, emulators, and media processing should not be written in javascript. At most you can argue that the game scripts can be written in javascript but even then there's better options. It's the wrong tool for the job. Typescript and friends improve the situation but even then you're still in a horrible situation.
Javascript is fine for simple games and things that aren't all that complex, animations, UI stuff, things like that. That said I really don't want to imagine the eye-burning horror that an emulator or encoder written in JS will look like in terms of the codebase.
Many companies are replacing legacy apps with JS. Soon JS will run emulators for Flash, Java, Silverlight. A single runtime to rule them all.
Comment
-
Originally posted by Luke_Wolf View PostIf I don't want to build a bunch of binaries for different OSes then I can use Mono, Java, or any of the various scripting languages exactly as I mentioned, I can also create JITed binaries using LLVM as mentioned. In fact I stated exactly as such
Originally posted by Luke_Wolf View PostBut then maybe you just have horrible reading comprehension, or further don't understand that targeting the web browser != portable, beyond it'll work in most web browsers... hopefully.
And Yes Javascript was "designed" for that in the same way that HTML was "designed" for displaying information over the web, and they both came out utterly horribly, in large part due to a certain w3c's obsession with not throwing errors and thus enforcing a loose standard, as opposed to everything being strictly validated, although the defacto design nature of the standard didn't help either. (Read up on the history of the <image> tag if you want a perfect example of how defacto their design process was, in spite of discussion of far superior solutions)
Comment
-
Originally posted by brad0 View PostPortable meaning NOT building binaries for a shit load of different OS's, platforms and architectures having to maintain them too.
And please enlighten us on how it is different to test a software on a Windows & OSX vm, instead of testing a web app on ie6, 7, 8, 9, 10, 11, firefox 23 -> 29, chrome, safari, etc...
And seriously, with good continuous integration you don't even NEED do to the testing yourself, it is all done automagically (provided that you are serious and do write some tests).
Comment
-
Originally posted by caligula View PostNot sure if you're trolling or just stupid. Can't you see we're actively trying to improve JS to support all the possible use cases. In the future, ALL software will be written in JavaScript.
let's break this down by the numbers:
Originally posted by caligula View Post1) JS is dynamic, it's a huge plus
(if you don't see what's wrong with this picture... I don't want to maintain your codebase)
oh sure it may be "easier" for simple problems but have fun debugging. Also how's your tooling? oh wait you don't have any because you can't, that requires strong static typing to work properly.
Originally posted by caligula View Post1b) no need to install binaries
Fact: It's an interepreted language and as a result you need a binary, the interpreter, and JS needs it just as much as any other interpreted language so you get no points.
Originally posted by caligula View Post1c) basically using JS is a zero effort because it works out of the box
Furthermore just what systems are there that I should care about that somehow manage to run a web browser binary in order to be able to run JS but that can't run a program that was written in any common language (C, C++, Python, etc..)?
Originally posted by caligula View Post2) it's user friendly
A user friendly language is toolable, a user friendly language tells you what you're doing wrong and what to change to fix things instead of trying to do weird shit behind your back, a user friendly language works with you to help you write better code. a user friendly language JS is not.
Originally posted by caligula View Post3) easy to use
Originally posted by caligula View Post4) thanks to good compiler optimizations it will be soon "faster than native"
Originally posted by caligula View Post5) it's a great portable, human readable intermediate format (see emscripten et al)
Originally posted by caligula View Post6) good company support
Originally posted by caligula View Post7) good standards support
Originally posted by caligula View Post8) it's fast interpreted language so no slow startup cost like with JVM and Java
Originally posted by caligula View Post9) JS is the new cool kid on the block, Java and native are not.
And while Java is out of the limelight Scala is the language quite popular with the people on the JVM side, and C++ ever since C++11 has been made the cool thing again. In fact whenever it comes up in conversation fellow programmers regard Javascript with disdain, but then I hang out with programmers who like extremely strict standards, strong typing, pedantic compilers, and good tooling.
Originally posted by caligula View PostMany companies are replacing legacy apps with JS. Soon JS will run emulators for Flash, Java, Silverlight. A single runtime to rule them all.
tl;dr:
Comment
Comment