• On TV.com: New TV sex symbol: Vintage black PORSCHE

Business Tech

Read all 'languages' posts in Business Tech
November 12, 2009 4:00 AM PST

Google hopes Go will give a browser boost

by Stephen Shankland
  • 22 comments

Google, ever eager to renovate the computing industry for the benefit of the Web and its own business, is working to link two nascent but potentially significant projects, its experimental Go programming language and its Chrome Web browser.

Gordon, Go's gopher mascot

Specifically, the company is building a foundation to let programs written in Go run directly within a Web browser endowed with Google's Native Client software. Native Client is designed to let browser-based programs run faster than is possible with today's widely used JavaScript; though it's still in its early stages, it's built into Chrome and available as a plug-in for other browsers.

A little poking around the Go source code reveals a reference to NaCl, the abbreviated name for Native Client. And Native Client is indeed on the Go agenda, said Rob Pike, one of the five core members of the Go team, in a Wednesday interview.

"We have an embryonic implementation of the NaCl support for Go using 8g," a compiler that produces code for x86 chips such as Intel's Core line, Pike said. "It's restricted by a couple of details of NaCl's implementation, but we hope to see changes to NaCl one day that will make Go a full-fledged language in that environment."

The Native Client compiler--the tool that converts what people write into software a computer can run--is specially modified to screen out a variety of software instructions that could expose a computer to an attack from a Native Client module downloaded off the Web. And the Native Client software itself checks such modules before they run. The result, if the security approach stands up to security scrutiny, is browser-based software that runs close to the speed of ordinary software that runs natively on a PC.

Google's Rob Pike

Rob Pike discusses the Go programming language at a Google Talk

(Credit: Google)

Native Client has been maturing, the most recent stage being inclusion of NaCl within Google's Chrome browser, though disabled by default for now. Google is using Chrome as a vehicle to distribute other Web technology, too, including Gears, which can let people use Gmail while offline, and WebGL, which gives hardware acceleration to 3D graphics in the browser.

Go is only experimental at this stage, but Google hopes to use it to produce some of the software running on its vast array of servers. Google's scale makes even academic projects potentially commercially relevant, which is enviable to many companies who've tried to get projects off the ground.

Indeed, an episode earlier in the Go team's history is illustrative. Pike, Unix co-inventor Ken Thompson, and Russ Cox all worked on the Plan 9 operating system project that, like Unix, began at Bell Labs. (Yes, Plan 9 is named after Ed Wood's famously bad movie, "Plan 9 from Outer Space.")

Unlike Unix, Plan 9 didn't have much commercial success, although Vita Nuova does sell a version called Inferno. Getting a mainstream operating system off the ground is hard: you must convince programmers, software companies, and hardware makers to embrace it; you must convince people to use it in the real world; and you must keep pace with the evolution of entrenched operating systems.

A bit of Plan 9 lives on inside the Go project, with various Plan 9 tidbits appearing in the Go source code. Pike, though, says there's not much.

Glenda, the Plan 9 bunny mascot, looks similar to Gordon, Go's gopher mascot. Both were drawn by Rob Pike's wife, illustrator Renee French.

Glenda, the Plan 9 bunny mascot, looks similar to Gordon, Go's gopher mascot. Both were drawn by Rob Pike's wife, illustrator Renee French.

(Credit: Bell Labs)

"The 6g/8g/5g compilers are almost completely new but are tied to the open-source Plan 9 compiler suite's C compilers and linker," Pike said. "That's really about it except for the obvious historical connection for some of the protagonists: Ken, Russ, and myself."

Programming languages face similar challenges as operating systems in getting off the ground: A lot of interdependent elements in the ecosystem must all be built simultaneously. It's what's known in the trade as the chicken-and-egg problem: you can't make a chicken without an egg or vice versa.

But Google makes things different for Go. It's devoting real resources to the project and believes it could be useful on its own servers to run software such as the Gmail service Web browsers tap into. It's got the chicken and the egg under its own roof.

And with the money Google could save by increasing the performance or efficiency of its servers even just a fraction of a percent, it has abundant financial incentive to make things work.

Marrying Go to browsers is just another aspect of the same issue.

Assuming Go and Native Client mature enough to be useful, Google can't mandate that Web developers embrace them; indeed, they generally haven't embraced Gears even though it can help with some Web site matters. But again, Google has a browser and some awfully big Web sites it can use to get the ball rolling.

Originally posted at Deep Tech
November 10, 2009 3:00 PM PST

Google hopes to remake programming with Go

by Stephen Shankland
  • 68 comments

Google software luminaries such as Unix co-creator Ken Thompson believe that they can help boost both computing power and programmers' abilities with an experimental programming language project called Go.

And on Tuesday, they're taking the veil of secrecy off Go, releasing what they've built so far and inviting others to join the newly open-source project.

The computing industry is in constant tension between making a fresh start and evolving the current technology. The limits of today's hardware designs and programming technology led the Go team to take the former approach.

Gordon, the Go gopher mascot.

Gordon, the Go gopher mascot, drawn by Rob Pike's wife and illustrator Renee French.

(Credit: Google)

"We found some of those problems to be frustrating and decided that the only way to address them was linguistically," said Rob Pike, a principal software engineer working on Go. "We're systems software people ourselves. We wanted a language to make our lives better."

So far, Google's Go project consists of the programming language, compilers to convert what programmers write into software that computers can run, and a runtime package that endows Go programs with a number of built-in features. It's most similar to C and C++, but, Pike said, it employs modern features and has enough versatility that it could even be used within Web browsers.

Go's assets
There's a huge step between creating a new programming language and building into a major force in the industry. Sun Microsystems, which succeeded with Java, has had less success with a would-be Fortran successor called Fortress.

But Go has some assets most languages don't.

First, the project is at Google, which has a powerful incentive to make something useful in order to get more out of its hundreds of thousands of servers and its countless in-house programmers. An experiment at Google could have more commercial relevance than many other company's actual products, and Go is already graduated from a 20 percent time project to one with formal support.

"We don't intend it to be experimental forever," Pike said. "We really want to build stuff for real with this."

Second, there's the Go team's pedigree. Among them:

Thompson, the winner of the 1983 Turing Award and 1998 National Medal of Technology, who, along with Dennis Ritchie, was an original creator of Unix. Thompson also came up with the B programming language that led to the widely used C from Ritchie.

Pike, a principal software engineer who was a member of Bell Labs' Unix team and a later operating-system project called Plan 9. He's worked with Thompson for years and with him created the widely used UTF-8 character-encoding scheme.

Robert Griesemer, who helped write Java's HotSpot compiler and V8, the Chrome browser's JavaScript engine; Russ Cox, a Plan 9 developer; and Ian Taylor, who has worked on improving the widely used open-source GCC compiler.

The name Go itself stems from the challenging board game, a reference to Google itself and, of course, the idea of going somewhere, Pike said.

What's Go for?
Google has high hopes for Go.

It's designed to address some issues in getting software to take advantage of multicore processors that can perform multiple tasks in parallel. It has an approach to ease some of the pains of object-oriented programming. It has modern language features such as "garbage collection," which helps programmers deal with mundane but important memory management issues. And it's designed to be fast--nearly as fast as programs written in C or C++--and enable fast creation of programs in the first place.

"It seems it's getting much harder to build software than it used to be," even though computers are vastly faster than in the past, Pike said. "The process of software development doesn't feel any better than it did a generation ago. We deliberately tried to make a language that focused in part on rapid development, that compiles really efficiently, and that expresses dependencies efficiently and precisely so the compilation process can be controlled well. I find it much more productive to work in."

When it comes to the speed programs at which programs run, "Our target was to get as close as we could to C or C++," Pike said. They're reasonably close--programs run about 20 percent to 30 percent slower right now, he said.

The Go Web site itself is built with Go, but Google has broader ambitions. The software is designed to build server software--Google's Gmail is one example of what it's suited for. Google thinks that it could be good for other cases, including running software in a Web browser, a task JavaScript handles today.

"It's at least an order of magnitude better than JavaScript," Pike said. Note that Google built its own browser, Chrome, in part to speed JavaScript and Web performance, and that Google already is incorporating its technology such as Native Client and Gears.

Another nice Web-related feature in Go: tasks can be shared by servers and client devices such as PCs or mobile phones that use those services. That makes a service more easily adapted to different amounts of processing power for those clients, Pike said.

Making the most of multicore
Go also is designed to tackle one of today's big challenges, multicore processors. Programs often work sequentially, moving through a task one step at a time, but multicore processors are better at handling many tasks in parallel.

Go is no magic bullet for the problem, but Pike is optimistic that it will help. "We think we have support sufficient to take a crack at it," he said.

Specifically, Go uses a technology dating back to the 1960s called CSP, or communicating sequential processes, that handles interactions among a set of cooperating programs, Pike said. The technology made an appearance in programming languages such as Occom and Erlang, but it generally hasn't been applied in systems programming.

"We don't believe we've solved the multicore-programming problem," Pike said. "But we think we've built an environment in which a certain class of problems can take advantage of the multicore architecture."

The design also can apply, to some extent, to spreading tasks among multiple servers connected over a network, he added.

Lending a hand
The Go team is looking for help. One big area is in improving the runtime library from which Go programs can draw.

Such libraries speed up programming by providing many tools and functions so programmers don't have to create those ingredients on their own, and Go's library includes many elements crucial to Go's design. Go's libraries supply resources for handling concurrency, garbage collection, and other "low-level gunk you don't want to expose to programmers," Pike said.

The Go team also is looking for compiler help. Thompson has written some compiler support for 32-bit and 64-bit x86 processors, and for ARM processors, and Taylor has written a Go front end for the GCC compiler.

ARM processors are dominant in the mobile-phone market that Google is trying to spur into greater activity with the Android operating system, and Go software will be able to run on mobile phones, he said. "We're looking at interesting applications on things like Android phones. We're not sure where that's going to lead, but it's too intriguing to let it go," Pike said.

Google has released many products as open-source software over the years, in part to give something back to the pool from which it's drawn and in part because it stands to gain from the collective-development philosophy. Go fits with those motives.

"We did this to help Google first, but we decided (that) we need to open-source it," Pike said. "It's interesting, but it needs help from the community."

For all Google's ambitions for Go, the company doesn't expect it to erase today's technology.

"I don't think we'll replace anything," Pike said. "We're just putting another player into the arena."

Originally posted at Deep Tech
December 4, 2008 11:13 AM PST

Major Python update makes break with past

by Matthew Broersma
  • 5 comments

Python developers on Wednesday released the final version of Python 3.0, a major reworking of the programming language that is incompatible with the Python 2 series.

code

Python is widely used for Web applications such as YouTube. Python 3.0, also called Python 3000 or Py3K, is the first Python release that is intentionally backwards-incompatible, according to project founder Guido van Rossum.

"Nevertheless, after digesting the changes, you'll find that Python really hasn't changed all that much--by and large, we're mostly fixing well-known annoyances and warts, and removing a lot of old cruft," van Rossum said in a document outlining the changes.

The most significant changes include modifications to the workings of built-in objects, such as dictionaries and strings, and the removal of older features, according to the Python development team. The standard library has been reorganized in some prominent places, developers said.

In general, the changes are designed to simplify Python development and remove needless complexity that has built up over time, according to van Rossum. However, Python developers have long made it clear that the new release would necessitate changes in most Python-based applications.

"3.0 is also known as the release where we break all your code, but we're doing it for a good reason...Pretty much every program will need changes," said release manager Anthony Baxter in a keynote speech at Linux.conf.au in Melbourne in February.

Baxter stressed that the shift would be some time in coming. "2.x is also not going away...We'll keep maintaining (the 2.x series) as long as there is interest and need," he said.

One of the most notable changes is turning the "print" statement, used for all kinds of information output, into a function. "Currently print has awful syntax for doing all sorts of things," Baxter said.

He said another major change is that Unicode will now be the default. "There's a real shambles in Python at the moment when it comes to mixing Unicode and non-Unicode strings," Baxter said.

Other changes, such as altering models used for division and switching the symbols for "not equal" from "" to "!=", have long been discussed in the Python community but have been held back because of fears over backwards compatibility. With the shift to 3.0, the view is: "What the hell. We're breaking the code anyway; let's fix it", Baxter said.

Matthew Broersma of ZDNet.co.uk reported from London.

  • prev
  • 1
  • next
advertisement

E-tailers linked to 'scam' blame customers

Priceline, Classmates.com, and Orbitz say customers should read the fine print before complaining about being charged to join loyalty programs they didn't want.

The 411 on early-termination fees

Verizon Wireless has doubled its early-termination fees for smartphones, but what does it mean for the rest of the industry?

advertisement

About Business Tech

Your destination for the latest news on enterprise-level information technology, from chip research and server design to software issues including programming, open source and patents.

Add this feed to your online news reader

Business Tech topics

Most Discussed



advertisement

Inside CNET News

Scroll Left Scroll Right