Commit 7fbaeb4d authored by Kenton Varda's avatar Kenton Varda

Add a blog section to the site and populate it with an announcement of the 0.1 release.

parent 53d5cd8f
safe: true safe: true
permalink: /news/:year-:month-:day-:title.html
<div style="float: right">
<a class="github_link" style="color: #fff"
href="https://github.com/kentonv/capnproto">Develop</a>
<a class="groups_link" style="color: #fff"
href="https://groups.google.com/group/capnproto">Discuss</a>
<a class="groups_link" style="color: #fff"
href="https://groups.google.com/group/capnproto-announce">Stay Updated</a>
</div>
<div style="clear: right;"> </div>
<div style="clear: both;"></div>
</section>
</div>
<!-- FOOTER -->
<div id="footer_wrap" class="outer">
<footer class="inner">
<p class="copyright">Cap'n Proto maintained by <a href="https://github.com/kentonv">kentonv</a></p>
<p>Design by <a href="http://www.starfruit-cafe.net/blog">sailorhg</a> ∙ Published with <a href="http://pages.github.com">GitHub Pages</a></p>
</footer>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-39711112-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<meta name="description" content="Capnproto : Cap'n Proto serialization/RPC system" />
<meta name="viewport" content="width=480">
<link rel="stylesheet" type="text/css" media="screen" href="/stylesheets/stylesheet.css">
<title>Cap'n Proto</title>
<script type="text/javascript" src="/javascripts/main.js"></script>
</head>
<body class="desktop">
<!-- HEADER -->
<div id="header_wrap" class="outer">
<header class="inner">
<img src="/images/captain_proto.png">
<div id="infinitely_faster">
<img src="/images/infinitely_faster.png">
</div>
</header>
<a id="discuss_banner" href="https://groups.google.com/group/capnproto">Discuss on Groups</a>
<a id="forkme_banner" href="https://github.com/kentonv/capnproto">View on GitHub</a>
</div>
<!-- MAIN CONTENT -->
<div id="main_content_wrap" class="outer">
<section id="menu">
<ul>
<li><a href="/index.html">Introduction</a></li>
<li><a href="/news/">News</a></li>
<li><a href="/install.html">Installation</a></li>
<li><a href="/language.html">Schema Language</a></li>
<li><a href="/encoding.html">Encoding</a></li>
<li><a href="/rpc.html">RPC Protocol</a></li>
<li><a href="/cxx.html">C++ Runtime</a></li>
<li><a href="/otherlang.html">Other Languages</a></li>
</ul>
</section>
<section id="main_content" class="inner">
<!DOCTYPE html> {% include header.html %}
<html> {{ content }}
<script type="text/javascript">setupSidebar()</script>
<head> {% include footer.html %}
<meta charset='utf-8' />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<meta name="description" content="Capnproto : Cap'n Proto serialization/RPC system" />
<meta name="viewport" content="width=480">
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">
<title>Cap'n Proto</title>
</head>
<body class="desktop">
<!-- HEADER -->
<div id="header_wrap" class="outer">
<header class="inner">
<img src="images/captain_proto.png">
<div id="infinitely_faster">
<img src="images/infinitely_faster.png">
</div>
</header>
<a id="discuss_banner" href="https://groups.google.com/group/capnproto">Discuss on Groups</a>
<a id="forkme_banner" href="https://github.com/kentonv/capnproto">View on GitHub</a>
</div>
<!-- MAIN CONTENT -->
<div id="main_content_wrap" class="outer">
<section id="menu">
<ul>
<li><a href="index.html">Introduction</a></li>
<li><a href="install.html">Installation</a></li>
<li><a href="language.html">Schema Language</a></li>
<li><a href="encoding.html">Encoding</a></li>
<li><a href="rpc.html">RPC Protocol</a></li>
<li><a href="cxx.html">C++ Runtime</a></li>
<li><a href="otherlang.html">Other Languages</a></li>
</ul>
</section>
<script type="text/javascript">
// Highlight the current page in the sidebar, make the sidebar items easy to click, and
// make the sidebar float when scrolled, unless there isn't enough space.
(function () {
var pathname = document.location.pathname;
var last = pathname.lastIndexOf('/');
var filename = pathname.substring(last);
if (filename == "/") {
filename = "/index.html";
}
var menu = document.getElementById("menu");
var setMenuLayout = function() {
if (window.innerWidth < 900) {
document.body.className = "narrow";
menu.className = "";
} else {
if (document.body.clientWidth < 1340) {
document.body.className = "normal";
} else {
document.body.className = "wide";
}
if (window.scrollY < 410 || window.innerHeight < menu.clientHeight + 100) {
menu.className = "";
} else {
menu.className = "floating";
}
}
};
setMenuLayout();
window.onresize = setMenuLayout;
window.onscroll = setMenuLayout;
var items = menu.getElementsByTagName("li");
for (var i = 0; i < items.length; i++) {
var link = items[i].getElementsByTagName("a")[0];
var href = link.href;
if (href.lastIndexOf(filename) >= 0) {
var parent = link.parentNode;
parent.removeChild(link);
var p = document.createElement("p");
p.appendChild(document.createTextNode(link.innerText || link.textContent));
p.onclick = (function(url) {
return function(event) {
window.location.href = url;
event.stopPropagation();
}
})(href + "#main_content");
parent.appendChild(p);
items[i].className = "selected";
var toc = document.createElement("ul");
toc.id = "toc";
items[i].appendChild(toc);
} else {
items[i].onclick = (function(url) {
return function(event) {
window.location.href = url;
event.stopPropagation();
}
})(href);
}
}
})();
</script>
<section id="main_content" class="inner">
{{ content }}
<div style="clear: left;"></div>
</section>
</div>
<!-- FOOTER -->
<div id="footer_wrap" class="outer">
<footer class="inner">
<p class="copyright">Cap'n Proto maintained by <a href="https://github.com/kentonv">kentonv</a></p>
<p>Design by <a href="http://www.starfruit-cafe.net/blog">sailorhg</a> ∙ Published with <a href="http://pages.github.com">GitHub Pages</a></p>
</footer>
</div>
<script type="text/javascript">
// Inject a table of contents into the sidebar.
(function() {
var toc = document.getElementById("toc");
if (toc) {
var content = document.getElementById("main_content").childNodes;
var headings = [];
for (var i = 0; i < content.length; i++) {
if (content[i].tagName == "H2" ||
content[i].tagName == "H3" ||
content[i].tagName == "H4") {
headings.push(content[i]);
}
}
var levels = [toc];
for (var i in headings) {
var hl = headings[i].tagName.slice(1) - 1;
while (hl > levels.length) {
var parent = levels[levels.length - 1];
var item = parent.childNodes[parent.childNodes.length - 1];
var sublist = document.createElement("ul");
item.appendChild(sublist);
levels.push(sublist);
}
while (hl < levels.length) {
levels.pop();
}
var parent = levels[levels.length - 1];
var item = document.createElement("li");
var p = document.createElement("p");
var link = document.createElement("a");
link.appendChild(document.createTextNode(headings[i].innerText || headings[i].textContent));
link.href = "#" + headings[i].id;
p.appendChild(link);
p.onclick = (function(url) {
return function(event) {
window.location.href = url;
event.stopPropagation();
}
})(link.href);
item.appendChild(p);
parent.appendChild(item);
}
}
var menu = document.getElementById("menu");
document.getElementById("main_content").style.minHeight = menu.clientHeight + 100 + "px";
})()
</script>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-39711112-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</body>
</html>
{% include header.html %}
<div class="hmargin" style="float: right"><a class="groups_link" style="color: #fff"
href="https://groups.google.com/group/capnproto-announce">Stay Updated</a></div>
<h1>News</h1>
<h2>{{ page.title }}</h2>
<p class="author">
<a href="https://github.com/{{ page.author }}">{{ page.author }}</a>
on <span class="date">{{ page.date | date_to_string }}</span>
</p>
{{ content }}
<script type="text/javascript">setupNewsSidebar([
{% for post in site.posts %}
{ title: "{{ post.title }}", url: "{{ post.url }}" },
{% endfor %}
]);</script>
{% include footer.html %}
---
layout: post
title: Announcing Cap'n Proto
author: kentonv
---
<img src='/images/infinity-times-faster.png' style='width:334px; height:306px; float: right;'>
So, uh... I have a confession to make.
I may have rewritten Protocol Buffers.
Again.
[And it's infinity times faster.](http://kentonv.github.com/capnproto)
---
layout: post
title: Cap'n Proto Beta Release
author: kentonv
---
It's been nearly three months since Cap'n Proto was originally announced, and by now you're
probably wondering what I've been up to. The answer is basically
[non-stop coding](https://github.com/kentonv/capnproto/commits/master). Features were implemented,
code was refactored, tests were written, and now Cap'n Proto is beginning to resemble something
like a real product. But as is so often the case with me, I've been so engrossed in coding that I
forgot to post updates!
Well, that changes today, with the first official release of Cap'n Proto, v0.1. While not yet
"done", this release should be usable for Real Work. Feature-wise, for C++, the library is roughly
on par with [Google's Protocol Buffers](http://protobuf.googlecode.com) (which, as you know, I used
to maintain). Features include:
* Types: numbers, bytes, text, enums, lists, structs, and unions.
* Code generation from schema definition files.
* Reading from and writing to file descriptors (or other streams).
* Text-format output (e.g. for debugging).
* Reflection, for writing generic code that dynamically walks over message contents.
* Dynamic schema loading (to manipulate types not known at compile time).
* Code generator plugins for extending the compiler to support new languages.
* Tested on Linux and Mac OSX with GCC and Clang.
Notably missing from this list is RPC (something Protocol Buffers never provided either). The RPC
system is still in the design phase, but will be implemented over the coming weeks.
Also missing is support for languages other than C++. However, I'm happy to report that a number
of awesome contributors have stepped up and are working on
[implementations in C, Go, Python](/otherlang.html), and a few others not yet announced. None of
these are "ready" just yet, but watch this space. (Would you like to work on an implementation in
your favorite language? [Let us know!](https://groups.google.com/group/capnproto))
Going forward, Cap'n Proto releases will occur more frequently, perhaps every 2-4 weeks.
Consider [signing up for release announcements](https://groups.google.com/group/capnproto-announce).
In any case, go [download the release](/install.html) and
[tell us your thoughts](https://groups.google.com/group/capnproto).
...@@ -334,6 +334,10 @@ NUL-terminated `const char*`. ...@@ -334,6 +334,10 @@ NUL-terminated `const char*`.
Interfaces (RPC) are not yet implemented at this time. Interfaces (RPC) are not yet implemented at this time.
### Constants
Constants are not yet implemented at this time. (They are not hard, but they are low-priority.)
## Messages and I/O ## Messages and I/O
To create a new message, you must start by creating a `capnp::MessageBuilder` To create a new message, you must start by creating a `capnp::MessageBuilder`
...@@ -588,11 +592,11 @@ learned the hard way: ...@@ -588,11 +592,11 @@ learned the hard way:
quickly. quickly.
* The in-memory representation of messages in Protobuf-C++ involves many heap objects. Each * The in-memory representation of messages in Protobuf-C++ involves many heap objects. Each
message is an object, each non-primitive repeated field allocates an array of pointers to more message (struct) is an object, each non-primitive repeated field allocates an array of pointers
objects, and each string may actually add two heap objects. Cap'n Proto by its nature uses to more objects, and each string may actually add two heap objects. Cap'n Proto by its nature
arena allocation, so the entire message is allocated in a few contiguous segments. This means uses arena allocation, so the entire message is allocated in a few contiguous segments. This
Cap'n Proto spends very little time allocating memory, stores messages more compactly, and avoids means Cap'n Proto spends very little time allocating memory, stores messages more compactly, and
memory fragmentation. avoids memory fragmentation.
* Related to the last point, Protobuf-C++ relies heavily on object reuse for performance. * Related to the last point, Protobuf-C++ relies heavily on object reuse for performance.
Building or parsing into a newly-allocated Protobuf object is significantly slower than using Building or parsing into a newly-allocated Protobuf object is significantly slower than using
......
...@@ -4,10 +4,6 @@ layout: page ...@@ -4,10 +4,6 @@ layout: page
# Encoding Spec # Encoding Spec
## NOT FINALIZED
The Cap'n Proto encoding is still evolving. Anything in this document could still change.
## Organization ## Organization
### 64-bit Words ### 64-bit Words
......
...@@ -85,12 +85,4 @@ languages, let us know on the [discussion group](https://groups.google.com/group ...@@ -85,12 +85,4 @@ languages, let us know on the [discussion group](https://groups.google.com/group
you'd just like to know when it's ready, add yourself to the you'd just like to know when it's ready, add yourself to the
[announcement list](https://groups.google.com/group/capnproto-announce). [announcement list](https://groups.google.com/group/capnproto-announce).
<div style="float: right"> {% include buttons.html %}
<a class="github_link" style="color: #fff"
href="https://github.com/kentonv/capnproto">Develop</a>
<a class="groups_link" style="color: #fff"
href="https://groups.google.com/group/capnproto">Discuss</a>
<a class="groups_link" style="color: #fff"
href="https://groups.google.com/group/capnproto-announce">Stay Updated</a>
</div>
<div style="clear: right;"> </div>
...@@ -4,31 +4,31 @@ layout: page ...@@ -4,31 +4,31 @@ layout: page
# Installation # Installation
<p style="font-size: 125%; font-weight: bold;">Note: Cap'n Proto is not ready yet</p> <p style="font-size: 125%; font-weight: bold;">Note: Cap'n Proto is in BETA</p>
<div style="float: right"><a class="groups_link" style="color: #fff" <div style="float: right"><a class="groups_link" style="color: #fff"
href="https://groups.google.com/group/capnproto-announce">Sign Up for Updates</a></div> href="https://groups.google.com/group/capnproto-announce">Sign Up for Updates</a></div>
As of this writing, Cap'n Proto is in the very early stages of development. It is still missing As of this writing, Cap'n Proto is in beta. The serialization layer is close to feature-complete
many essential features: and we don't anticipate any further changes to the wire format. That said, if you want to use it,
you should keep in mind some caveats:
* **Security:** There are almost certainly a few exploitable security bugs in the Cap'n Proto * **Security:** Although Kenton has some background in security, there are almost certainly a few
code. You should not use Cap'n Proto on untrusted data until a proper security review has been exploitable security bugs in the Cap'n Proto code. You should not use Cap'n Proto on untrusted
completed. data until a proper security review has been completed.
* **Stability:** The Cap'n Proto format is still changing. Any data written today probably won't * **API Stability:** The Cap'n Proto programming interface may still change in ways that break
be understood by future versions. Additionally, the programming interface is still evolving, so existing code. Such changes are likely to be minor and should not affect the wire format.
code written today probably won't work with future versions.
* **Performance:** While Cap'n Proto is inherently fast by design, the implementation has not yet * **Performance:** While Cap'n Proto is inherently fast by design, the implementation has not yet
undergone serious profiling and optimization. Currenlty it only beats Protobufs in realistic-ish undergone serious profiling and optimization. Currently it only beats Protobufs in realistic-ish
end-to-end benchmarks by, like, 2x-5x. We can do better. end-to-end benchmarks by around 2x-5x. We can do better.
* **RPC:** The RPC protocol has not yet been specified, much less implemented. * **RPC:** The RPC protocol has not yet been specified, much less implemented.
* **Support for languages other than C++:** Hasn't been started yet. * **Support for languages other than C++:** Work is being done to support languages other than C++,
* Many other little things. but at this time only the C++ implementation is ready to be used.
Therefore, these instructions are for those that would like to hack on Cap'n Proto. If that's you, If you'd like to hack on Cap'n Proto, you should join the
you should join the [discussion group](https://groups.google.com/group/capnproto)! [discussion group](https://groups.google.com/group/capnproto)!
Or, if you just want to know when it's ready, add yourself to the If you'd just like to receive updates as things progress, add yourself to the
[announce list](https://groups.google.com/group/capnproto-announce). [announce list](https://groups.google.com/group/capnproto-announce).
## Installing the Cap'n Proto Compiler ## Installing the Cap'n Proto Compiler
...@@ -40,16 +40,23 @@ First, install [Cabal](http://www.haskell.org/cabal/), e.g. on Ubuntu: ...@@ -40,16 +40,23 @@ First, install [Cabal](http://www.haskell.org/cabal/), e.g. on Ubuntu:
sudo apt-get install cabal-install sudo apt-get install cabal-install
Now you can check out, build, and install `capnpc` like so: Now you can download and install the release tarball:
git clone https://github.com/kentonv/capnproto.git curl -O [TODO: URL]
cd capnproto/compiler cabal install capnproto-compiler-0.1.0.tar.gz
cabal install capnproto-compiler.cabal
Be sure that the Cabal bin directory (e.g. `$HOME/.cabal/bin` on Ubuntu or Be sure that the Cabal bin directory (e.g. `$HOME/.cabal/bin` on Ubuntu or
`$HOME/Library/Haskell/bin` on Mac OSX) is in your `PATH` before you attempt to build the C++ `$HOME/Library/Haskell/bin` on Mac OSX) is in your `PATH` before you attempt to build the C++
runtime. runtime.
### Building the compiler from Git mainline
If you want to try out the latest -- possibly broken! -- compiler, do:
git clone https://github.com/kentonv/capnproto.git
cd capnproto/compiler
cabal install capnproto-compiler.cabal
## Installing the C++ Runtime ## Installing the C++ Runtime
### GCC 4.7 or Clang 3.2 Needed ### GCC 4.7 or Clang 3.2 Needed
...@@ -101,9 +108,15 @@ Hopefully, Xcode 5.0 will be released soon with a newer Clang, making this extra ...@@ -101,9 +108,15 @@ Hopefully, Xcode 5.0 will be released soon with a newer Clang, making this extra
### Building from a release package ### Building from a release package
If you downloaded a release version of the Cap'n Proto C++ runtime, you may build and install it First, make sure you've installed the Cap'n Proto compiler, described above. You MUST use the
in the usual way: exact same version of the compiler and the runtime library! That means if you installed `capnpc`
from Git, you must install the runtime from Git.
You may download and install the release version of the C++ runtime like so:
curl -O [TODO: URL]
tar zxvf capnproto-c++-0.1.0.tar.gz
cd capnproto-c++-0.1.0
./configure ./configure
make -j6 check make -j6 check
sudo make install sudo make install
......
function initSidebar() {
var filename = document.location.pathname;
if (filename == "/") {
filename = "/index.html";
} else if (filename.slice(0, 6) == "/news/") {
filename = "/news/";
}
var menu = document.getElementById("menu");
var setMenuLayout = function() {
if (window.innerWidth < 900) {
document.body.className = "narrow";
menu.className = "";
} else {
if (document.body.clientWidth < 1340) {
document.body.className = "normal";
} else {
document.body.className = "wide";
}
if (window.scrollY < 410 || window.innerHeight < menu.clientHeight + 100) {
menu.className = "";
} else {
menu.className = "floating";
}
}
};
setMenuLayout();
window.onresize = setMenuLayout;
window.onscroll = setMenuLayout;
var items = menu.getElementsByTagName("li");
var toc = null;
for (var i = 0; i < items.length; i++) {
var link = items[i].getElementsByTagName("a")[0];
var href = link.href;
if (href.lastIndexOf(filename) >= 0) {
var parent = link.parentNode;
parent.removeChild(link);
var p = document.createElement("p");
p.appendChild(document.createTextNode(link.innerText || link.textContent));
p.onclick = (function(url) {
return function(event) {
window.location.href = url;
event.stopPropagation();
}
})(href + "#main_content");
parent.appendChild(p);
items[i].className = "selected";
toc = document.createElement("ul");
toc.id = "toc";
items[i].appendChild(toc);
} else {
items[i].onclick = (function(url) {
return function(event) {
window.location.href = url;
event.stopPropagation();
}
})(href);
}
}
document.getElementById("main_content").style.minHeight = menu.clientHeight + 100 + "px";
return toc;
}
function setupSidebar() {
var toc = initSidebar();
if (toc) {
var content = document.getElementById("main_content").childNodes;
var headings = [];
for (var i = 0; i < content.length; i++) {
if (content[i].tagName == "H2" ||
content[i].tagName == "H3" ||
content[i].tagName == "H4") {
headings.push(content[i]);
}
}
var levels = [toc];
for (var i in headings) {
var hl = headings[i].tagName.slice(1) - 1;
while (hl > levels.length) {
var parent = levels[levels.length - 1];
var item = parent.childNodes[parent.childNodes.length - 1];
var sublist = document.createElement("ul");
item.appendChild(sublist);
levels.push(sublist);
}
while (hl < levels.length) {
levels.pop();
}
var parent = levels[levels.length - 1];
var item = document.createElement("li");
var p = document.createElement("p");
var link = document.createElement("a");
link.appendChild(document.createTextNode(headings[i].innerText || headings[i].textContent));
var hlinks = headings[i].getElementsByTagName("a");
if (hlinks.length == 1) {
link.href = hlinks[0].href;
} else {
link.href = "#" + headings[i].id;
}
p.appendChild(link);
p.onclick = (function(url) {
return function(event) {
window.location.href = url;
event.stopPropagation();
}
})(link.href);
item.appendChild(p);
parent.appendChild(item);
}
}
}
function setupNewsSidebar(items) {
var toc = initSidebar();
if (toc) {
for (var i in items) {
var item = document.createElement("li");
var p = document.createElement("p");
var link = document.createElement("a");
link.appendChild(document.createTextNode(items[i].title));
link.href = items[i].url;
p.appendChild(link);
p.onclick = (function(url) {
return function(event) {
window.location.href = url;
event.stopPropagation();
}
})(link.href);
item.appendChild(p);
toc.appendChild(item);
}
}
}
---
---
{% include header.html %}
<div class="hmargin" style="float: right"><a class="groups_link" style="color: #fff"
href="https://groups.google.com/group/capnproto-announce">Stay Updated</a></div>
<h1>News</h1>
{% for post in site.posts %}
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
<p class="author">
<a href="https://github.com/{{ post.author }}">{{ post.author }}</a>
on <span class="date">{{ post.date | date_to_string }}</span>
</p>
{{ post.content }}
{% endfor %}
<script type="text/javascript">setupSidebar()</script>
{% include footer.html %}
...@@ -73,6 +73,10 @@ h1, h2, h3, h4, h5, h6 { ...@@ -73,6 +73,10 @@ h1, h2, h3, h4, h5, h6 {
letter-spacing: -1px; letter-spacing: -1px;
} }
.hmargin {
margin: 10px 0 0 0;
}
h1 { h1 {
font-size: 36px; font-size: 36px;
font-weight: 700; font-weight: 700;
...@@ -253,6 +257,17 @@ img { ...@@ -253,6 +257,17 @@ img {
max-width: 100%; max-width: 100%;
} }
p.author {
margin: -1em 0 0 0;
padding: 0;
font-size: 80%;
color: #888;
}
h1>a, h2>a {
color: black;
}
/******************************************************************************* /*******************************************************************************
Full-Width Styles Full-Width Styles
*******************************************************************************/ *******************************************************************************/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment