Defines asm.js, a strict subset of JavaScript that can be used as a low-level, efficient target language for compilers.
Not only is JavaScript making other high-level languages obsolete, but it's making low-level languages obsolete as well! Contact your hardware manufacturers: tell them you want JavaScript all the way down.
Also, there's this funny language that compiles down to Axxembler, called Cymta. It's stuff only le illogical racist cretins use, because le JEW SHIT is le future XD
Name:
Anonymous2013-02-15 17:46
0x10c is the most powerful assembly language.
Name:
Anonymous2013-02-15 18:27
the future is here!
i've been warning /prog/ for the last year, and have even helpfully shown how using anything other than javascript was pure stupidity. did /prog/ listen? nope!
and now they can't believe their eyes. the web is here. it is the future. javascript is your new god.
Function parameters in asm.js are provided a type annotation by means of an explicit coercion on function entry: function diag(x, y) {
x = +x; // x has type double
y = +y; // y has type double
return +sqrt(square(x) + square(y));
}
Terrible!
Replying to this thread means accepting the Jews as your new overlords.
Post under your own risk.
Name:
Anonymous2013-02-15 19:02
What's the point of hacking on a ``type system'' to a dynamically typed language when we have C and Pascal and many more statically typed low-level languages?
>>1 David Herman, Mozilla, <dherman@mozilla.com>
Luke Wagner, Mozilla, <luke@mozilla.com>
Alon Zakai, Mozilla, <azakai@mozilla.com>
Visiting Mozilla office must be like visiting synagogue.
Name:
Anonymous2013-02-15 20:10
>>10
I accept and await my orders (hopefully they will involve stomping spamming antisemitic pieces of shit in the face).
>>16
"Oh, no, I didn't find this in the trash can, I found it in my uncle's anus!"
Back to Twatter, please.
Name:
Anonymous2013-02-15 23:00
Don't you find it funny, how people say that JavaScript is easy?
I personally find JS harder to learn than plain C, just because it has everything C has and a plethora of higher-level features, like DOM or dynamic-typing (in addition to static typing).
Name:
Anonymous2013-02-15 23:01
>>18
Also, not that C has just single type - int, to which all other types can be coerced.
JavaScript is inconsistent and broken:
1. The Achilles Heel of JavaScript is its inconsistent behavior across implementations. It is virtually impossible to use it to do anything robust on the client side.
2. JavaScript type system is broken: it is weak and its automatic coercion astonishes: "1"+"2"=="12" and "1"+1=='12', but "1"-2==-1, "2"*"3"==6, and (x="1",++x)==2. [123]==123, but [123][0]!=123[0]. Even worse: (a=[0], a==a && a==!a)==true; Following statements are also true: Math.min()>Math.max(), " \t\r\n"==0, ",,,"==Array((null,'cool',false,NaN,4)), new Array([],null,undefined,null)==",,,", ''!='0', 0=='', 0=='0', false!='false', false=='0', false!=undefined, false!=null, null==undefined, NaN!=NaN, []+[]=="", []+{}=="[object Object]", {}+[]==0, {}+{}==NaN, despite (typeof NaN)=="number", so ("S"-1=="S"-1)==false. Given function f(number) {return number && + number | 0 || 0;}, we have f("1")==1, f("1.2")==1, f("-1.2")==-1, f(1.2)==1, f(0)==0, f("0")==0, f(NaN)==0, f(1/0)==0. Whereas most languages have one universal singular value (null/nil/Void/whatever), JavaScript has three: "false", "null" and "undefined". That leads to confusing and irregular semantics. No numerical tower or even obvious integer types: the only numeric type supported is an IEEE754 double-precision float. Hacks like `(x+y)|0` are employed to coerce doubles to integers.
3. Broken lexical scoping: unlike C/C++/Java/C#/etc, where variables introduced in an anonymous block within a function are only valid within that block; in JavaScript such variables are valid for the entire function. JavaScript employs unintuitive process called declaration hoisting, in which all function and variable declarations are moved to the top of their containing scope. If a variable is declared and assigned in one statement then the statement is split into two, with only the declaration getting hoisted. This produces a lot of subtle bugs, like for example non-obvious hiding of outer variables or `f` in `var f = function() {…}` being present as undefined, while `function f() {…}` would always be defined. Every script is executed in a single global namespace that is accessible in browsers with the window object.
4. Annoying gotcha in array constructor: new Array() produces empty array; new Array(2,3) produces array with 2 and 5 as its elements; new Array(5) does not produce array with 5 as its single element; instead, it returns a 5-element array. In JavaScript an array with 2 elements can have length of 7, while an array with 7 elements can have length 2, because length property always returns the last numeric index, plus one. JavaScript has no out of bounds error: you can freely retrieve an element at any index and no error will be produced, even if element is undefined. JavaScript provides no reliable way to iterate array by index, instead for(var X in Xs) gives elements in completely undefined order.
7. Crippled syntax impeding functional programming: )}();)}();)}();)}();
>>33
>LLLLLLLLLLLEEEEEEEEEEEEEEEELLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
>DAT WAS TOALTALLY LE EGIN GRO!!!!!!
(a=[0], a==a && a==!a)==true; that would be an inclusive and?
false!='false', false=='0', false!=undefined, false!=null, null==undefined mostly ok
function f(number) {return number && + number | 0 || 0;}, we have f("1")==1, f("1.2")==1, f("-1.2")==-1, f(1.2)==1, f(0)==0, f("0")==0, f(NaN)==0, f(1/0)==0. still fairly consistent... ^^