Author Archives: Open Source Programs Office

Building a Build System: Bazel reaches Beta

We're excited to announce the Beta release of Bazel, an open source build system designed to support a wide variety of different programming languages and platforms.

There are lots of other build systems out there -- Maven, Gradle, Ant, Make, and CMake just to name a few. So what’s special about Bazel? Bazel is what we use to build the large majority of software within Google. As such, it has been designed to handle build problems specific to Google’s development environment, including a massive, shared code repository in which all software is built from source, a heavy emphasis on automated testing and release processes, and language and platform diversity. Bazel isn’t right for every use case, but we believe that we’re not the only ones facing these kinds of problems and we want to contribute what we’ve learned so far to the larger developer community.

Our Beta release provides:


Check out the tutorial app to see a working example using several languages.

We still have a long way to go.  Looking ahead towards our 1.0.0 release, we plan to provide Windows support, distributed caching, and Go support among other features. See our roadmap for more details and follow our blog or Twitter account for regular updates.  Feel free to contact us with questions or feedback on the mailing list or IRC (#bazel on freenode).

By Jeff Cox, Bazel team


The 11th year of Google Summer of Code comes to an end


GoogleSummer_2015logo.jpg
Another year of Google Summer of Code, our program designed to introduce university students from around the world to open source development, is drawing to a close.


In April, we accepted 1,051 university students from 73 countries. These students wrote code for 137 mentoring organizations. We also had 1,918 mentors from 70 countries help them out. We are excited to announce that 87%* (916) of the students passed their final evaluations. To see more about how that compares to previous years, check out our statistics from the last ten years of the program.   


And we’re not done yet: this November, we’ll be hosting our yearly mentor summit in Sunnyvale, California. We’ll welcome representative mentors and organization administrators from each of the mentoring organizations from this year’s program to meet and exchange ideas.


Now that the coding period has concluded, students are busy preparing their code samples for all eyes to see. Soon you will be able to visit the program site where organizations will have links to the students’ code repositories.

Thank you to all of the students, mentors and organization administrators that have helped to make this 11th year of the Google Summer of Code a great success!

By Carol Smith, Open Source Programs

* This number could change slightly in the next few weeks.

My sweet adventures with Sugar Labs and Google Code-in

Today we have a guest post from Sam Parkinson, a 15 year-old Google Code-in 2014 grand prize winner. Sam worked with Sugar Labs for two instances of Google Code-in and tells us more about his journey navigating the world of free and open source software. We hope this is only the beginning of Sam’s contributions.
Ever since I was young, naive and enjoying my first tastes of Linux, I've wanted to contribute to the FOSS community. For me, Google Code-in (GCI) made that dream come true. I was lucky enough to be able to participate for the last two years with the mentoring organization Sugar Labs.

Sugar Labs is a “desktop environment without a desktop” that uses Python. Officially, Sugar Labs is the core component of a worldwide effort to provide every child with an equal opportunity for a quality education. Available in 25 languages, Sugar Labs activities are used every school day by nearly 3 million children in more than 40 countries.

I started my FOSS journey in GCI 2013 by completing the simple task of changing a ValueError to a logged exception. At first, my confidence level went from "yeah, I know some cool Python tricks" to "omg! how do I code?". I discovered new (and sometimes confusing) things like PEP8, git-branch and mailing lists. However, having the GCI and Sugar Labs communities as a support system made my dream of contributing to FOSS manageable by breaking it up into small, manageable tasks.

I worked on some pretty cool features, like adding a nutcracker-style mode in a Speak activity, where users could insert a picture of a face and have it talk to them.
I also worked on some not-so-fun tasks, like fixing bugs caused by GTK updates while trying not to break compatibility with ancient versions. But by the end of GCI 2014, I had learned how to pass code reviews and even completed some of my own. Hopefully I’ve programmed something that has made somebody smile.

In 2014, I was lucky enough to be chosen as a GCI winner. The grand prize trip was the cherry on top of the proverbial cake. I got to meet the amazing people I'd been hacking with, plus some pretty inspiring people from Google and other FOSS projects. I found it mind blowing to actually talk with people about programming face to face, and even better to sit around laughing about the programming culture. A highlight of the trip was meeting Walter Bender, one of the Sugar Labs mentors. Together we hacked on a project improving the Sugar Labs website. It’s not done, but it’s in better shape than it was before, and I can claim that I did some coding during the trip.

GCI was truly something that changed my life. I went from being an open source newbie to being able to contribute to really cool projects, thanks to the amazing GCI and Sugar Labs communities. It's something that I would recommend any young programmer consider doing. Participating in GCI is something that can make dreams come true.

By Sam Parkinson, Google Code-in grand prize winner

Go 1.5 is released

(Cross-posted from the Go Blog)

Today the Go project is proud to release Go 1.5, the sixth major stable release of Go.

This release includes significant changes to the implementation. The compiler tool chain was translated from C to Go, removing the last vestiges of C code from the Go code base. The garbage collector was completely redesigned, yielding a dramatic reduction in garbage collection pause times. Related improvements to the scheduler allowed us to change the default GOMAXPROCS value (the number of concurrently executing goroutines) from 1 to the number of available CPUs. Changes to the linker enable distributing Go packages as shared libraries to link into Go programs, and building Go packages into archives or shared libraries that may be linked into or loaded by C programs (design doc).

The release also includes improvements to the developer tools. Support for "internal" packages permits sharing implementation details between packages. Experimental support for "vendoring" external dependencies is a step toward a standard mechanism for managing dependencies in Go programs. The new "go tool trace" command enables the visualisation of  program traces generated by new tracing infrastructure in the runtime. The new "go doc" command is a substitute for the original "godoc" that provides an improved command-line interface.

There are also several new operating system and architecture ports. The more mature new ports are darwin/arm, darwin/arm64 (Apple's iPhone and iPad devices), and linux/arm64. There is also experimental support for ppc64 and ppc64le (IBM PowerPC 64-bit, big and little endian).
The new darwin/arm64 port and external linking features fuel the Go mobile project, an experiment to see how Go might be used for building apps on Android and iOS devices. (The Go mobile work itself is not part of this release.)

The only language change was the lifting of a restriction in the map literal syntax to make them more succinct and consistent with slice literals.

The standard library saw many additions and improvements, too. The flag package now shows cleaner usage messages. The math/big package now provides a Float type for computing with arbitrary-precision floating point numbers. An improvement to the DNS resolver on Linux and BSD systems has removed the cgo requirement for programs that do name lookups. The go/types package has been moved to the standard library from the golang.org/x/tools repository. (The new go/constant and go/importer packages are also a result of this move.) The reflect package provides the new ArrayOf and FuncOf functions, analogous to the existing SliceOf function. And, of course, there is the usual list of smaller fixes and improvements.

For the full story, see the detailed release notes. Or if you just can't wait to get started, head over to the downloads page to get Go 1.5 now.

by Andrew Gerrand, Go team

Announcing Shaderc: tools for compiling graphics shaders

Over the weekend, we released Shaderc: a library and command-line tool for translating graphics shaders from GLSL into SPIR-V.  It is a wrapper around Glslang, the open source reference compiler for GLSL published by the Khronos Group.

Shaderc is designed to be as developer-friendly as possible and encourage the widest adoption of best-in-class open GLSL compiler technology. It offers:

  • A C API that is portable, thread-safe, and easy to use.
  • An idiomatic object-based C++ API.  This is a headers-only wrapper around the C API, to minimize the impact of potential changes in the environment's C++ ABI.
  • glslc, a command-line shader compiler.  Its arguments and file handling are similar to Clang and GCC, for easy integration with standard build systems.

Shaderc works on Linux, and there is an initial port to Windows.

The Shaderc project is released under the Apache License, Version 2.0, and is available immediately on GitHub at http://github.com/google/shaderc. Contributions from the community are welcome.

By David Neto and Dejan Mircevski, Google Engineering

Haskell Hacking in the Google Zurich Office

The Google Open Source Programs Office recently co-sponsored a three-day hackathon for Haskell, an open source functional programming language. Johan Tibell from Google’s Zurich office talks more about the event below.



On the weekend of May 29th, 120 Haskell enthusiasts got together for the 5th installment of ZuriHac, a yearly open source Haskell hackathon held in Zurich, Switzerland. This year we were back where it all started in 2010: the ground floor of the Google Zurich office.


The schedule was packed solid, and we also put together a complete three day experience for the many beginners in attendance. One room was dedicated to beginner talks and staffed by volunteer mentors (thanks all of you!) that made sure everyone had someone to turn to for questions or just some casual chatting about Haskell. Videos from three of those talks are now online: Monads by Example, Beginning Web Programming in Haskell, and Performance.


The main event featured a mind-bending talk about interesting implementations of sorting algorithms by Edward Kmett (slides) and a deep-dive into writing high-performance binary serialization code by Duncan Coutts (slides).


20150529_131051.jpg
We ran out of whiteboards so we had to use flipcharts!



After the intense hacking sessions, we had organized barbeques down by the Zurich lake. We had a very good turnout, taking over a large part of the park.


2015-05-29 18-38-22.JPG
Sharing a public barbeque with the locals.



All in all it was a very intense and enjoyable weekend, and we’ll try to organize the event again next year. Perhaps we can beat the current 120 attendee record!

By Johan Tibell, YouTube team


(edited 23 July 2015 with a correct link for the Beginning Web Programming in Haskell video. Thanks to our sharp-eyed reader who commented!)

Google Summer of Code 2015 midterms are here!

GoogleSummer_2015logo_horizontal.jpg

Today marks the halfway point of Google Summer of Code 2015. Both students and mentors will be submitting their midterm evaluations of one another through Friday, July 3 as indicated in our timeline. If you would like to read more about these midterm evaluations, please check out the "How Do Evaluations Work?" link on our FAQ.

The next milestone for the program will be the “pencils down” date of August 17, after which students can take a week to scrub their code, write tests, improve calculations and generally polish their work before the firm end of coding on August 21.

There has been fantastic progress made so far, and we encourage all the students, mentors, and org admins to keep up the great work!


by Carol Smith, Open Source Team