Feeds

Google native code browser plug-in gets tickled

It's like JavaScript without the JavaScript

Security and trust: The backbone of doing business over the internet

The Tcl scripting language has been plugged into Google's Native Client, allowing Tcl code to run inside the Google Chrome browser in much the same way that JavaScript does.

Using Native Client – a Google-created plug-in for securely running native code inside the browser – Tcl now has direct access to the Chrome DOM. "The net effect for the Tcl developer is that now he can read and write to the DOM, and be notified of GUI or network events, just like any JavaScript programmer," developer Alexandre Ferrieux tells The Register. "And like for JavaScript, this happens on the client side, which is a game-changer for us Tclers, who are accustomed to being trapped on the server side. [You get] interactive speed regardless of the connectivity."

Ferrieux, the man who moved the language to Native Client, provides a demonstration of Tcl directly accessing the HTML5 canvas element.

Some have claimed that this is the first scripting language running on Native Client, but other languages have made the move as well, including OCaml and Lua. But this is the first language that fits so nicely with Google's wonderfully geeky naming conventions. Some have called this NaTcl. From sodium chloride to, well, sodium tetrachloride.

In February, Google released the first official version of the Native Client SDK. Native Client is designed to speed the performance of web applications, allowing apps coded in, say, C or C++ to be securely transferred over the web and executed inside the browser. The idea is to work around the speed limitations of JavaScript.

"While the [Chrome] team has made JavaScript tremendously faster over the last two years, there's a lot of applications out there that have existing audiences that are [written in native code, such as C and C++], and there are a few that are specialized applications that need every last bit of performance the hardware can offer," Google engineering director Linus Upson told us in December. "Native Client is a way of addressing both those issues."

At one point, Google built a Native Client compiler for Go, its New Age programming language that provides extreme concurrency while running at speeds similar to C. But Go co-creator Rob Pike tells us that the Native Client Go work is now on hold, due to the rapid changes the Native Client team were making to the plug-in.

Originally developed in the late '80s at the University of California Berkeley as the Tool Command Language, Tcl is essentially a scrubbed and enhanced Unix shell. "It dwells in the same area as Lisp and Scheme, in that it has an extremely simple and regular syntax, with next to zero reserved keywords, very few special characters, and a very simple semantics based on a never-violated principle: 'Everything Is a String'," Ferrieux says. "That allows humans to reason about programs with certainty without any knowledge of the implementation details."

Now that Tcl – pronounced "tickle" – is up and running on Native Client, Ferrieux intends to move the accompanying Tk graphical user interface tool kit to the platform as well. "Another important thing from the standpoint of a Tcler with a Tk background, is that thanks to the exquisite flexibility of the language, there's very little more to learn [to make the switch to Native Client]," he says. "Indeed, the complete emulation of Tk's most useful idioms at a syntactic level is possible, and will be completed shortly."

Well, you do have to learn your HTML5. ®

Providing a secure and efficient Helpdesk

More from The Register

next story
New 'Cosmos' browser surfs the net by TXT alone
No data plan? No WiFi? No worries ... except sluggish download speed
'Windows 9' LEAK: Microsoft's playing catchup with Linux
Multiple desktops and live tiles in restored Start button star in new vids
iOS 8 release: WebGL now runs everywhere. Hurrah for 3D graphics!
HTML 5's pretty neat ... when your browser supports it
'People have forgotten just how late the first iPhone arrived ...'
Plus: 'Google's IDEALISM is an injudicious justification for inappropriate biz practices'
Mathematica hits the Web
Wolfram embraces the cloud, promies private cloud cut of its number-cruncher
Mozilla shutters Labs, tells nobody it's been dead for five months
Staffer's blog reveals all as projects languish on GitHub
SUSE Linux owner Attachmate gobbled by Micro Focus for $2.3bn
Merger will lead to mainframe and COBOL powerhouse
iOS 8 Healthkit gets a bug SO Apple KILLS it. That's real healthcare!
Not fit for purpose on day of launch, says Cupertino
prev story

Whitepapers

Secure remote control for conventional and virtual desktops
Balancing user privacy and privileged access, in accordance with compliance frameworks and legislation. Evaluating any potential remote control choice.
WIN a very cool portable ZX Spectrum
Win a one-off portable Spectrum built by legendary hardware hacker Ben Heck
Storage capacity and performance optimization at Mizuno USA
Mizuno USA turn to Tegile storage technology to solve both their SAN and backup issues.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
The next step in data security
With recent increased privacy concerns and computers becoming more powerful, the chance of hackers being able to crack smaller-sized RSA keys increases.