News for hackers. Stuff that matters.

creachadair

It will indeed be interesting to see. :)

You're right that the work needed to connect (say) a compiler or static analyzer to (say) an editor is usually substantial.

Right now, projects typically duplicate this work over and over again, for each combination of language and editor. We've found that for a lot of common cases you can re-use the work you did to instrument a given compiler and/or editor for others to mix and match, if they can agree on a format for the data.

Obviously this doesn't work for every such problem, but in our experience it's surprisingly effective for most of the day-to-day tasks engineers need to solve, such as figuring out what will break if I commit this change to the repo.

Kythe is indeed based on the Grok project that Steve described in https://www.youtube.com/watch?v=KTJs-0EInW8
You can build the same tools as before -- the purpose of Kythe isn't to fundamentally change the kinds of tools you can make, it's intended to make it easier to glue those tools together.

Google uses this approach internally to generate cross-references for a huge, heterogeneous multi-language codebase. Linking across generated code, connecting documentation to its references, and exposing all those features in editors, code browsers, code-review tools, and so forth, are all a lot easier when that information has a common representation.

And of course, those problems exist even in much smaller codebases. Kythe isn't really a "product", but rather an interlanguage for tools that manipulate source code.

Re:C: A Technological Landmine on Friday July 31, 2009 @05:52PM (#735475)
> That, combined with structs, unions, and it's basic data types allow you to use it for virtually ANY protocol.

Sadly, when you use C to implement low-level binary wire protocols, you quickly discover that structs, bit-fields, and unions are nearly useless because they are incompletely defined. Byte order is undefined. Structure layout is mostly undefined -- you pick field order, but you can't choose packing, alignment, or padding rules. The sizes of the integer types vary by platform and compiler. Bit field layout, packing, and alignment are almost completely undefined.

What you're left to work with are unsigned characters, pointers, and bitwise operations. You have to pack and unpack everything manually, or your code won't port. It's enough to get the job done, but it's like using a wrench to pound in screws.

I could do with a little less specificity of action, myself.