Skip to content

Instantly share code, notes, and snippets.

Kenton Varda kentonv

Block or report user

Report or block kentonv

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am kentonv on github.
  • I am kentonv (https://keybase.io/kentonv) on keybase.
  • I have a public key whose fingerprint is 8802 23DF 25AA 25A9 433A F0FB 4067 8458 440D DCF1

To claim this, I am signing this object:

View gist:5579014
kenton@megaman:~/workspace/capnproto/doc:master$ echo -e '<div><span>@Foo</span>\n\n</div>' | maruku
___________________________________________________________________________
| Maruku tells you:
+---------------------------------------------------------------------------
| Malformed HTML starting at "<div><span>@Foo</span>"
| ---------------------------------------------------------------------------
| <div><span>@Foo</span>EOF
| |---------------------------------------------------------------------------
| +--- Byte 0
@kentonv
kentonv / rpc.capnp
Last active Dec 19, 2015
Cap'n Proto RPC protocol straw man
View rpc.capnp
# Recall that Cap'n Proto RPC allows messages to contain references to remote objects that
# implement interfaces. These references are called "capabilities", because they both designate
# the remote object to use and confer permission to use it.
#
# Cap'n Proto RPC takes place over a connection -- any bi-directional stream. The protocol does
# not distinguish between client and server as both ends can receive capabilities from the other
# and subsequently make calls to those capabilities.
#
# Capabilities are, at least initially, tied to connections. If the connection dies, all
# capabilities received through it are lost. The ability to persist capabilities across
@kentonv
kentonv / kwargs.c++
Created Nov 19, 2013
Keyword args in C++?
View kwargs.c++
// Keyword args. In C++.
//
// Compile with:
// g++ -std=c++11 kwargs.c++
#include <utility>
#include <assert.h>
#include <string.h>
#include <vector>
#include <initializer_list>
@kentonv
kentonv / SCM_RIGHTS.md
Last active Apr 22, 2019
SCM_RIGHTS API quirks
View SCM_RIGHTS.md

As tested on Linux:

  • An SCM_RIGHTS ancillary message is "attached" to the range of data bytes sent in the same sendmsg() call.
  • However, as always, recvmsg() calls on the receiving end don't necessarily map 1:1 to sendmsg() calls. Messages can be coalesced or split.
  • The recvmsg() call that receives the first byte of the ancillary message's byte range also receives the ancillary message itself.
  • To prevent multiple ancillary messages being delivered
You can’t perform that action at this time.