Archive

theodp writes “‘People are thoroughly excited [about JavaScript],’ writes Lincoln Baxter. ‘However, I’d akin this to people discovering Perl during the advent of C and C++ (mirror). Does it work? Yes. Is it pretty? Not by a long shot.’ Baxter adds, ‘While I do like both languages, JavaScript [is] just waiting for the next technology to come around and make it look like Perl does today: pervasive, but lacking enterprise adoption on large applications.’”

hypnosec writes “Oracle has proposed a new project for OpenJDK — Nashorn, which aims to implement a high-performance yet lightweight JavaScript runtime that would run on the JVM natively. Nashorn will be headed by Jim Laskey, multi-language Lead at Oracle and the project will be sponsored by HotSpot group. The project proposes an implementation of JavaScript such that it can run standalone JavaScript applications via the JSR 223 APIs. Nashorn’s design will enable it to take advantage of new JVM technologies like the MethodHandles and the InvokeDynamic APIs.”

An anonymous reader writes “When Pete London posted a resume on LinkedIn in December 2009, the JavaScript specialist stumbled into a trap of sorts. Shortly after creating a profile he received a message from a recruiter at Google. Just days later, another from Mozilla. Facebook reached out the next month and over the course of the next two years, nearly every big name in tech – attempt to lure him to a new employer. He received 530 messages in all, or one every 40 hours … the only problem? Pete London didn’t exist.”

An anonymous reader writes “When Pete London posted a resume on LinkedIn in December 2009, the JavaScript specialist stumbled into a trap of sorts. Shortly after creating a profile he received a message from a recruiter at Google. Just days later, another from Mozilla. Facebook reached out the next month and over the course of the next two years, nearly every big name in tech – attempt to lure him to a new employer. He received 530 messages in all, or one every 40 hours … the only problem? Pete London didn’t exist.”

Emscripten is an LLVM-based compiler from dozens of languages to Javascript (previously demoed as a repl and used to port Doom to the browser), and some recent changes have made it a bit faster, and allowed it to compile itself. Some highlights include a redundant variable eliminator, parallelization of the optimizier and compiler, and a new relooper. From the developer’s weblog: “With all of the emscripten optimization passes now in JavaScript, I then worked on parallelizing that. … The speedup can be close to linear in the number of cores. … For the LLVM to JS compiler, I made the emscripten compiler parallel as well: It splits up the LLVM IR into 3 main parts: type data, function data, and globals. The function data part is unsurprisingly by far the largest in all cases I checked (95% or so), and it can in principle be parallelized – so I did that. Like in the optimizer, we use a Python process pool which feeds chunks of function data to multiple JavaScript compiler instances. There is some overhead due to chunking, and the type data and globals phases are not parallelized, but overall this can be a close to linear speedup. … [On the new relooper] Note that this update makes Emscripten a ‘self-hosting compiler’ in a sense: one of the major optimization passes must be compiled to JS from C++, using Emscripten itself. Since this is an optimization pass, there is no chicken-and-egg problem: We bootstrap the relooper by first compiling it without optimizations, which works because we don’t need to reloop there. We then use that unoptimized build of the relooper (which reloops properly, but slowly since it itself is unoptimized) in Emscripten to compile the relooper once more, generating the final fully-optimized version of the relooper, or ‘relooped relooper’ if you will.”

Emscripten is an LLVM-based compiler from dozens of languages to JavaScript (previously demoed as a repl and used to port Doom to the browser), and some recent changes have made it a bit faster, and allowed it to compile itself. Some highlights include a redundant variable eliminator, parallelization of the optimizier and compiler, and a new relooper. From the developer’s weblog: “With all of the emscripten optimization passes now in JavaScript, I then worked on parallelizing that. … The speedup can be close to linear in the number of cores. … For the LLVM to JS compiler, I made the emscripten compiler parallel as well: It splits up the LLVM IR into 3 main parts: type data, function data, and globals. The function data part is unsurprisingly by far the largest in all cases I checked (95% or so), and it can in principle be parallelized – so I did that. Like in the optimizer, we use a Python process pool which feeds chunks of function data to multiple JavaScript compiler instances. There is some overhead due to chunking, and the type data and globals phases are not parallelized, but overall this can be a close to linear speedup. … [On the new relooper] Note that this update makes Emscripten a ‘self-hosting compiler’ in a sense: one of the major optimization passes must be compiled to JS from C++, using Emscripten itself. Since this is an optimization pass, there is no chicken-and-egg problem: We bootstrap the relooper by first compiling it without optimizations, which works because we don’t need to reloop there. We then use that unoptimized build of the relooper (which reloops properly, but slowly since it itself is unoptimized) in Emscripten to compile the relooper once more, generating the final fully-optimized version of the relooper, or ‘relooped relooper’ if you will.”

mikejuk writes “Everyone seems to have a replacement for JavaScript — Google even has two. Now Microsoft has revealed that Anders Hejlsberg, the father of C# among other languages, has been working on a replacement and it has released a preview of TypeScript. The good news is that it is compatible with JavaScript — you can simply load JavaScript code and run it. JavaScript programs are TypeScript programs.To improve on JavaScript, TypeScript lets you include annotations that allow the compiler to understand what objects and functions support. The annotations are removed by the compiler, making it a zero overhead facility. It also adds a full class construct to make it more like traditional object oriented languages. Not every JavaScript programmer will be pleased about the shift in emphasis, but the way it compiles to a JavaScript constructor is fairly transparent. At this early stage it is difficult to see the development as good. It isn’t particularly good for JavaScript developers who already have alternatives, and it isn’t good for C# developers who now have confirmation that Ander Hejlsberg is looking elsewhere for his future.”Update: 10/01 20:34 GMT by U L : It’s also freely available under under the Apache 2.0 license, and there’s a language specification available. It looks pretty interesting: it even has ML-style type inference (including e.g. deducing the types of higher order functions).