Show HN: Cap'n Proto, by the ex-maintainer of Protocol Buffers - kentonv
http://kentonv.github.com/capnproto/
======
haberman
I have a lot of respect for Kenton and I'm sure this is high quality work.

The idea of a fixed-length encoding of a protobuf-like structure is a good
idea, and something I have seen explored elsewhere. To me, though, it's
unfortunate to create an entirely new schema language for it, instead of just
making it an alternate encoding of the existing protobuf data model, which it
closely resembles. To have two schema languages that are nearly, but not
quite, isomorphic means that you get no interoperability benefits with any
existing protobuf-based code or data.

The way I see it, the most important feature of protobufs is _not_ the on-the-
wire encoding, but rather the schema. If you start from a schema (and its
associated data model), then you can create as many different encodings as you
want, and convert between them losslessly at any time, while taking advantage
of their different performance characteristics.

For example, Dremel (as described in this paper:
<http://research.google.com/pubs/pub36632.html>) is an extremely fast SQL-
based query engine at Google, which powers the Google cloud product BigQuery
(which I work on). Because Dremel uses Protocol Buffers as its data model, any
set of Protocol Buffers can be dumped into Dremel for fast querying, _without
any kind of data massaging or converting step._ I think this is a really
powerful idea.

I can see reasons why Kenton might have chosen not to use .proto schemas
directly, but I hope that they can eventually converge, because having a
shared schema language is a powerful idea.

~~~
kentonv
This is a good point, and something I considered. There are a few reasons I
decided against using the .proto format:

* In .proto format, it's generally assumed that _removing_ a field, or having a gap in field numbers, is OK. In Cap'n Proto, it's not OK, because offsets of subsequent fields are affected.

* The language frankly has a lot of little ugly quirks that I wanted to get away from.

* I want control over my format so that I can add features that protobufs may not be interested in, like the ability to define constants.

* After proto2 I'm kind of tired of working around legacy. :)

* I'm not working for Google anymore, so I don't have any particular reason to cater to what would make the most sense for Google. Why not use Thrift or POJOs or anything else as the base language? :)

I think most of the benefits you describe could be achieved by writing a
.proto<->.capnp translator, which should not be very hard given that, as you
say, the languages are pretty much isomorphic.

------
necubi
Protobufs are awesomely useful, and this seems like a great enhancement.
However, I'm disappointed that there's no map representation. That's a been
major issue for us with protobufs compared with thrift or json. While you can
represent maps as lists of pairs, it's awkward and lacks the key uniqueness
constraint.

~~~
kentonv
I agree! I actually intend to add maps at some point, just haven't worked out
the details yet. It's a little weird in Cap'n Proto since the in-memory
structure is also the wire format, and the right in-memory representation of a
map is not perfectly obvious (Hash table? B-tree? Red/black?).

~~~
justin66
Thumbs up. Maps are important.

Red black trees are probably the standard. I'd want to sit down and think
about how the wire format sharing the in-memory structure effects things. :)
Do we need to be able to determine the amount of memory used by the map ahead
of time?

~~~
kentonv
> Do we need to be able to determine the amount of memory used by the map
> ahead of time?

That's a very good question and I debate it a lot. Since Cap'n Proto messages
tend to be arena-allocated, dynamically growing space can be problematic.
Currently, for lists, you must specify the list size before filling in the
data. That could be improved in a few ways, but maps will likely be harder.

If you do know sizes in advance, I think hashtables make the most sense. If we
want something that allows dynamic additions and maybe even removals (and can
figure out how to reconcile that with arena allocation), B-trees might be a
really nice approach. Maybe you could even use a huge mmap'd Cap'n Proto file
as a database (warning: very speculative, lots of obstacles to resolve).

------
stephen
Okay, protocol buffers are awesome, so as constructive feedback, I think using
C++ as the source-generation language is a mistake.

We use Thrift, which uses the same approach, and it's a huge PITA to install
the native compiler just to generate some .java files. To the point where,
unlike basically everything else, we don't run the thrift compiler locally on
dev machines, but instead run it on a Hudson machine with thrift carefully
setup and then hope we never have to touch it.

Granted, the runtime library for each language needs to be in that language
(or more likely it's C/C++ bindings), but jumping from "the runtime is
probably C/C++ under the covers" to "let's use C++ to generate the source
code" is a mistake IMO.

Personally, with Thrift, it has kept me from submitting pull requests to help
patch/maintain the generated Java bindings (which were pretty bad at one point
in time).

Along the same lines, I haven't used it yet, but I'm a wanna-be fan of
Scrooge, which uses the Thrift runtime libraries, but does it's own source
code generation:

<https://github.com/twitter/scrooge>

I'm not necessarily saying each language's source code should be generated by
a program that is also written in that language, as I understand it's nice to
reuse the IDL/spec parsing logic ... but, on the other hand, I think that
would maximize the quality of each language's generate source code, since the
barrier for it's own users to maintaining/tweaking would be so much lower.

(I understand you live & breathe C/C++, this feedback is just from a "if you
want to maximize potential contributions to your project" point of view.)

~~~
alexchamberlain
I completely disagree. C++ is a great general purpose languageand 99% dev
machines will have a compiler installed. I know mine doesn't have Java
installed.

~~~
brown9-2
But you would likely have Java installed if you were interested in generating
Java language bindings.

~~~
alexchamberlain
Very good point, very well made.

------
neilk
My first question was: whoa, security? But you answer it in the docs, a bit.

<http://kentonv.github.com/capnproto/encoding.html> (at the end)

How do we know that cycles/deep-nesting are the only possible attacks?

Maybe I'm overreacting - when you say pointers, these are really pointers to
other locations in a file, not to code. I'm trying to think of what you could
do with malformed data, but the worst thing I can think of is seeking to
impossible positions. Maybe you could confuse or crash certain poorly written
libraries, maybe by declaring a size for a data structure larger than the
file. But the damage seems containable.

~~~
kentonv
Oh yes, security is a high priority. It's definitely wrong if malicious data
can crash the receiver. The security notes on that page are not a complete
story, just mentioning a couple of the less-obvious concerns. It's my intent
that the Cap'n Proto runtime should protect the application from all security
issues related to decoding, so that apps don't have to worry about it.

The pointers are not actually native pointers, and when you dereference a
pointer, the implementation does bounds checking to make sure it points within
the message.

I am a security wonk myself and have been thinking carefully about these
things, but I also hope to get a formal security review from a third party
before any production release.

~~~
codexon
Doesn't this mean you are just pushing the decoding overhead into the runtime
instead of upon receiving?

~~~
kentonv
To some extent, yes. But the total overhead of bounds-checking pointers in a
Cap'n Proto message is orders of magnitude smaller than the overhead of
decoding an equivalent protobuf message. (You can see this in my benchmarks.
Look for "object manipulation time". It's usually a bit slower for Cap'n
Proto, but the total time is dwarfed by I/O time.)

------
shin_lao
Big fan of protobuf here. Awesome work.

We did something along those lines for our product except we used Boost.Fusion
to generate the serialization code which enables us to skip the interface
compilation phase altogether.

Basically you have any structure, you Boost.Fusion adapt it and bam!, cross-
platform binary serialization at compile-time.

The best is that this approach works for everything. Want JSON? Bam! You got
JSON.

One trick we used is to zero-copy the big chunks of memory. Don't know if
that's the case here. It's tricky though because if you do asynchronous I/O
later you have to make sure the original buffer stays alive long enough.

(ps: getters and setters, this is soooo last century ;) )

~~~
kentonv
Thanks!

Yeah, getters and setters are old school, but still necessary in C++,
especially in this case since the underlying data isn't necessarily in native
format. In more modern languages I'd hope to use properties. :)

I do hope to write a JSON transcoder as well, so that for those cases where
you really need to send/receive JSON, you can do that, while still using the
same protocol spec.

~~~
onedognight
> Yeah, getters and setters are old school, but still necessary in C++

Why isn't operator= usable in this case?

~~~
kentonv
Because you need an lvalue to assign to, which turns out to be pretty painful
when the underlying data is not (quite) in native format. The lvalue can't
just be a reference to the underlying data, so instead you need to set up some
parallel set of objects somewhere that wrap the data, and each of these
objects probably needs to contain a pointer, so they may end up being bigger
than the actual data they are wrapping. It really isn't worth the effort.

------
prodigal_erik
I have to question the value of avoiding deserialization. With no type tag
space reserved in structures or pointers, are there any strongly-typed
language runtimes (i.e., not C) which can actually use this as the definitive
in-memory representation? If you have to wrap proxy objects around a Cap'n
Proto blob, the cost of continual indirections will quickly exceed the cost of
just deserializing into native objects.

I'm glad to see efforts to move away from encoding the schema (ids and types)
into every field of every message, though. I can't remember the last time I
found a use for self-describing data of a type that was completely unknown
when I wrote the code. And the suggested packing format looks feasible, where
too many protocol designers think everyone can afford to gzip everything by
default (and make a general-purpose library re-deduce where the redundancy is
in your schema, when certain bits are inevitably constant for every message
you could ever send).

~~~
kentonv
This will tend to depend on the details of the language.

In Java, there is java.nio.ByteBuffer which (I think) can basically do
everything that is done with pointer arithmetic in the C++ implementation.

In, say, Python, it may make more sense to decode the message to Py objects
upfront. You could use Python's struct packing library to do this fairly
efficiently, and you could lazily decode sub-objects. If you are using Python,
you probably aren't going for blazing speed anyway.

Another possibility in many languages is to write bindings that call into C++,
though that obviously has a bunch of trade-offs.

Finally, if you're communicating with browser-side Javascript, you probably
just want to transcode the object to/from JSON on the server side. I intend to
provide libraries that make that easy.

------
jmillikin
Overall, I love how this looks -- it's a nice evolution of protobufs.

I had a couple issues/questions while reading through the site, so I'll just
throw them in here:

      > struct Date {
      >   year @0 :Int16;
      >   month @1 :UInt8;
      >   day @2 :UInt8;
      > }

That's a fairly awkward syntax, even more than .proto files. I notice your
compiler is written in Haskell, so it should be pretty easy to define a human-
friendly syntax and parse it with Attoparsec and friends. In particular, the
use of colons and semicolons here seems unnecessary.

Are you set on that syntax, or would you accept patches to change it? I don't
know how much breaking change you'd be willing to accept at this point.

      > Fields (and enum values, and interface methods) must
      > be numbered consecutively starting from zero in the
      > order in which they were added.

I disagree with this decision. Being able to set tag numbers in arbitrary
order makes reading the text format of a proto message (e.g. during debugging)
much nicer, because fields can be grouped according to their purpose rather
than whenever they happened to be added to a message.

Speaking of which, I don't see any specification for a text-based
serialization format on this site. If I were you, I'd just steal Protobuf's
because it's simple and easy to read/write.

      > Unlike Protobufs, you cannot skip numbers when defining
      > fields – but there was never any reason to do so anyway.

For me, the reason to skip field numbers is when some older version of the
message defined some field, but new messages removed it and clients should not
know about it. Typically, I indicate this by replacing the field definition
with a comment to ensure the field number isn't accidentally re-used. This
reduces the amount of legacy cruft in .proto files.

      > GCC 4.7 Needed
      >
      > If you are using GCC, you MUST use at least version
      > 4.7 as Cap’n Proto uses recently-implemented C++11
      > features. If you are using some other compiler…
      > good luck.

One of the best features of protobufs is that they are easily portable between
many platforms and languages. If the C++ implementation requires advanced
modern compiler features, that will severely reduce the number of developers
who are able to use it. It would be better to write the reference
implementation such that it's supported even by ancient compilers, so that
users don't have to worry about upgrading lots of other packages just to try
out CAPNP.

      > For example, exceptions are thrown on assertion
      > failures (indicating bugs in the code), network
      > failures, and invalid input. Exceptions thrown by
      > Cap’n Proto are never part of the interface and
      > never need to be caught in correct usage.

I'm fine with making assertion failures throw exceptions that "never need to
be caught", but network failures and invalid input are very much things that
should be treated as common events.

Error reporting (via return values or out-parameters) will make the interface
slightly less elegant. This is fine. The benefit of having proper error
handling by far outweighs minor verbosity of error checking.

      > Text: Like Data, but the content must be valid
      > UTF-8, the last byte of the content must be zero,
      > and no other byte of the content can be zero.

If there's a length prefix, why bother with a terminating NUL? D-Bus does the
same thing, and it serves no reason except to add another possible error
condition.

      > So when Directory.open is called remotely, the
      > content of a FileInfo (including values for name
      > and size) is transmitted back, but for the file field,
      > only the address of some remote File object is sent.

It's not obvious how such address-passing can be implemented, without falling
into the black hole that is CORBA. I don't see anything on the encoding page
about it, either. Is an address some sort of 64-bit cookie, a string, or
something more complex? How does using addresses work when the server is
written in a language that doesn't have the concept of addressable values?

      > The Cap’n Proto RPC protocol is not yet defined.
      > See the language spec’s section on interfaces for a
      > hint of what it will do.

Roughly what is the timeline for defining the RPC protocol? I've been working
on a Protobuf-based RPC protocol for a while (it'll replace my use of D-Bus
for inter-machine and low-overhead inter-process communication), but it
probably won't be in even a beta state for at least another two or three
months. If you don't have any immediate plans, I'd love to merge my work into
CAPNP.

~~~
kentonv
Thanks for the feedback!

      > Are you set on that syntax, or would you accept patches to change it?

I'm not wedded to the syntax. Maybe start a thread on the discussion group and
see what people think?

      > Being able to set tag numbers in arbitrary order makes reading the
      > text format of a proto message (e.g. during debugging) much nicer,
      > because fields can be grouped according to their purpose rather than
      > whenever they happened to be added to a message.

I think a text format should write fields in the order in which they appear,
not the order of the numbers. These don't have to be the same order. The
purpose of the numbers is to allow you to insert a new field in an arbitrary
position in your struct def without breaking wire-compatibility, rather than
requiring you to add all new fields at the end.

Maybe the wording in the docs is confusing?

      > Speaking of which, I don't see any specification for a text-based
      > serialization format on this site. If I were you, I'd just steal
      > Protobuf's because it's simple and easy to read/write.

I intend to support JSON transcoding. The protobuf format is kind of quirky,
although it is nice that it doesn't require as much quoting. Maybe the JSON
transcoder could have a "less quoted" mode that breaks standards somewhat.

      > For me, the reason to skip field numbers is when some older version
      > of the message defined some field, but new messages removed it and
      > clients should not know about it.

In practice, you actually shouldn't do that even with protobufs, because if
you accidentally reuse that field number, you might misinterpret old data.
Hence the convention with protobufs is usually to rename fields to
"OBSOLETE_N".

Cap'n Proto can't allow you to remove fields because that would change the
offsets of subsequent fields. But you can certainly rename fields.

      > If the C++ implementation requires advanced modern compiler features,
      > that will severely reduce the number of developers who are able to
      > use it.

This is true, but C++11 features are really useful, and the implementation
(and even its interface) simply would not be as good without them. If this is
a big problem, perhaps someone will start maintaining a back-port to C++98, as
if it were another language.

      > I'm fine with making assertion failures throw exceptions that "never
      > need to be caught", but network failures and invalid input are very
      > much things that should be treated as common events.

I think my wording in the docs may be a little off, in that it isn't
completely clear what I mean by "correct usage". Yes, clearly you should catch
network errors in a distributed environment. But typically the only things you
really want to know about the error are:

* Should I retry? * What error message should I log / display?

Cap'n Proto exceptions can be caught and will carry this information. The
point is more that these are logistical issues, not correctness issues. The
"correct" output of your program never depends on what exceptions were thrown
-- if any exception is thrown, either you don't produce output at all, or you
solve the problem and produce the same output that you would have otherwise.

Exceptions are somewhat necessary in Cap'n Proto because validation happens as
you walk the message tree. Having every getter possibly return an error code
would be pretty painful. You can, however, configure it so that getters flip
an error flag and then return a default value on error. As long as you check
that error flag before outputting garbage, you should be fine.

      > If there's a length prefix, why bother with a terminating NUL?

It's helpful if the recipient intends to use the strings in C/C++ code -- they
can avoid a copy. For example, if the message contains a file name and the
recipient wants to open() it, they need a NUL-terminated string, and
malloc()/copying one is kind of sad. Although I want to support many
languages, I expect Cap'n Proto users to be biased towards C/C++ since those
are the people who care deeply about speed.

      > It's not obvious how such address-passing can be implemented...

This is certainly a complicated problem, but solvable. I wrote some comments
elsewhere:

<https://news.ycombinator.com/item?id=5482782>

I look to things like the E programming language and Tahoe-LAFS for
inspiration here.

      > Roughly what is the timeline for defining the RPC protocol?

I'm working full-time on Cap'n Proto right now. It's always hard to predict
coding timelines, but I am hoping to have something within a month or two.

      > it'll replace my use of D-Bus for inter-machine and low-overhead
      > inter-process communication

Hey, that sounds like exactly the main use case I'm interested in. I want to
pass messages in shared memory, so making an IPC is basically no more
expensive than posting to a semaphore. This makes it more plausible to have a
sandboxed process which essentially makes all its system calls via IPC to the
sandbox, without as much of a speed hit.

Please do join the discussion group and tell us about your work! I'd love to
have your help, or at the very least exchange notes. :)

------
_chrismccreadie
As a user of the excellent Protocol Buffers this is great news. I was
especially interested in the Inter-Process communication and random access.
Hopefully we'll see some ports to other languages soon.

~~~
kentonv
Thanks! Anyone who wants to own the implementation in their favorite language
should let me know. :D

------
famousactress
Awesome! I'm a huge fan of binary protocols like this. Couple questions:

1\. It appears from the encoding docs that length for TEXT fields are in
bytes, not characters.. is that correct? Hessian made this awful flaw which
meant writing an efficient parser was painful because the entire string
couldn't be copied into a buffer in one shot.

2\. I'm unclear on first reading how references are supported. One of my
gripes with formats like Java's Serialization is that it's effectively un-
streamable since a parser needs to hold every object in memory for the life of
the stream in case they're referenced later. I read the 'far pointers' and
'serialization over a stream' stuff.. Am I to understand that the idea is that
your stream would be batched up into these frame-chunks of multiple segments
and the far-pointers would be valid only within those frames?

~~~
kentonv
Thanks for the feedback!

> 1\. It appears from the encoding docs that length for TEXT > fields are in
> bytes, not in characters..

Correct. Text is UTF-8 encoded, and the length sent on the wire is bytes.

You make a good point that this can be frustrating in languages where UTF-8
isn't the standard representation for text. Though, is it really a character
count that you want, or is it a UTF-16 length? Depends on the language, again.
Hmm, this could get ugly...

I think we can optimize around this problem by taking advantage of the fact
that Cap'n Proto implementations will generally use arena allocation (since
message objects must be allocated in contiguous segments). Just start by
attempting to encode the string into whatever space is left in the current
segment. If it turns out to be enough, which it usually will, great! Mark the
space as allocated. If not, you have to back-track and try a slower path.

> 2\. I'm unclear on first reading how references are supported.

Usually you send a whole "message" (composed of N "segments") at a time, and
that message cannot have pointers to any data objects outside the message (but
can have pointers to interfaces). A sophisticated protocol could send one
segment at a time, and the receiver could request additional segments when the
far pointers pointing into them are first accessed (this could all be
transparent to the application). In general, though, if you want your message
to reference things outside the message, you probably want to use interfaces.

<http://kentonv.github.com/capnproto/language.html#interfaces>

These let the receiver call back at some arbitrary time in the future. (The
details of how these will be implemented is not specified yet, but it'll be
something like what E does.)

~~~
famousactress
To be clear, I think a character count isn't what you want. That's easy enough
to do post-parse. A byte count is most useful so that can make a single call
to pull the value into memory. A buddy and I wrote python bindings for Hessian
and the fact they were encoding character counts and not byte count caused us
pain.

Makes sense regarding pointers within messages, and interfaces.

~~~
kentonv
Ohhhhhh, yeah, I misread what you were saying. Yes, the count on the wire is a
byte count. :)

------
joshrotenberg
Best commit message:

Day 1: Learn Haskell, write a parser.

------
_pmf_
There's a huge opportunity for serialization protocols between PC based hosts
and embedded systems. Protocols that are able to serialize without dynamic
allocation are really hard to find, so I'll definitely be looking into this.

The dependency on C++ and a rather recent version of GCC is a deal-breaker for
some of the embedded platforms I work with, however.

~~~
kentonv
Hmm, I think you'd probably want to treat embedded C/C++ as if it were a
different programming language -- so, a separate code generator and runtime
library would need to be written. Then you could really make sure everything
works in an appropriate way for the platform, without fighting with the
desktop/server devs.

But yes, Cap'n Proto would probably be a great fit for that environment, and
I'd love to see someone take on this target. :)

------
skybrian
How large will interface pointers be? It seems like they'd have to be at least
as large as an auth cookie since that's basically what they are.

Also, it seems like in a cluster, you'd need the ability for any server to
generate many auth cookies that will work on any other server when the client
makes its next request.

~~~
kentonv
> How large will interface pointers be? It seems like they'd have to be at
> least as large as an auth cookie since that's basically what they are.

That's one possible implementation. 128 crypto-random bits should be enough.

Another possible implementation is to say that the interface can only be
accessed through the same connection over which the pointer was sent. In this
case you don't need any crypto (other than SSL on the connection, perhaps).
The interface pointer can just be an integer, sequentially counting from zero.

The latter approach of course means that in case of network failure you lose
all your pointers. Depending on the use case this may be fine -- perhaps you
just need to fetch them again on re-connect. If it's not fine, then yes, you
need some sort of unguessable capability string.

> Also, it seems like in a cluster, you'd need the ability for any server to
> generate many auth cookies that will work on any other server when the
> client makes its next request.

For long-lived capabilities, yes, you'll probably want them to be backed by
data in a database so that they can easily relocate to a different machine.

But for the all-pointers-break-when-the-connection-closes approach, there's no
issue.

I expect the first iteration of the RPC system will only support this latter
approach. The former approach clearly requires help from the application, so
will take longer.

------
wging
And it's (partly) written in Haskell! _swoon_

~~~
kentonv
Haskell was a lot of fun to learn, but I'm a n00b. My Haskell code probably
sucks. :( Luckily since it's just a parser/code generator it probably doesn't
matter too much. :)

~~~
ky3
Have you tried running hlint?

~~~
kentonv
Yep, it was pretty helpful for learning.

------
Kequc
I love this tongue in cheek speed comparison.

~~~
kentonv
It was especially funny because I originally announced the project on Google+
(where my former Google coworkers follow me) on April 1st. Half of them
thought it was a joke. :)

~~~
mikeash
I saw it today (the 2nd) and still thought it was a joke.

------
revelation
Theres still a serialization step, so this is not an infinite improvement.

The real "zero serialization" is writing stuff 1:1 from memory to disk (or
where you want it to go). This works great in languages like C where you can
make assumptions for memory layout and use mostly POD-types [1]. But even
then, you still have to fixup pointers.

[1]: I guess this is the reason why fread has split the amount of bytes to
read into a "size of item" and "items" parameter:
<http://linux.die.net/man/3/fread>

~~~
kentonv
> Theres still a serialization step, so this is not an infinite improvement.

There is? What happens during the serialization step?

> The real "zero serialization" is writing stuff 1:1 from memory to disk

Is that not exactly what Cap'n Proto does?

------
tomp
It's unfortunate that in 2013, we're still developing protocols and formats
that have weird Unicode support. Cap'n Proto only seems to support Modified
UTF-8, which doesn't include NULL bytes[1]. Though I believe support for full
UTF-8 would be a trivial change, requiring no changes to code.

[1] <http://en.wikipedia.org/wiki/UTF-8#Modified_UTF-8>

~~~
kentonv
You're right. Someone brought this up on the mailing list, and I agreed that
the no-NUL-in-content restriction could be dropped. A NUL byte will still be
required at the end, and it will be up to apps to decide if they want to add
further restrictions.

~~~
tomp
I agree with ending null bytes. It eases cross-language compatibility, and it
usually costs nothing because it fits into the padding bytes anyway. Btw,
that's exactly what OCaml does (string have length, can include nulls, but
still end with null bytes, to be passable to C functions).

------
Swannie
Sorry, I thought this was an April Fools!

I saw "Infinitely Faster", and though uhh huh, of course. Then I clicked to
the next page and "Note: Cap'n Proto is not ready yet" made me even more
sure... only when I came here was it clear that the technical discussion
wasn't a continuation of the joke!

------
rburhum
Can somebody comment about this vs MessagePack please?

~~~
kentonv
Well, I'm obviously biased, but:

MessagePack is a binary encoding of JSON, which actually makes it pretty
different from both Cap'n Proto and Protocol Buffers, both of which require
you to explicitly specify your type in an IDL (interface definition language).

There are trade-offs. The IDL is extra work. But when you encode an object in
MessagePack, the full names of every field must be encoded on the wire. In
Cap'n Proto (or Protobufs), those names are elided, saving space.

MessagePack is also primarily a sequential format (like protobufs). You have
to parse the whole message before you can operate on it. Cap'n Proto is
random-access, which is why it needs to parse step -- it can just operate on
the raw bytes in-memory as you go.

The down side of a random-access format is that it will tend to be fatter
since all the widths are fixed. E.g. Protobufs or MessagePack will encode an
int32 up to 127 in 1 byte, but Cap'n Proto will always use 4. That said, Cap'n
Proto mitigates this by offering a simple "packing" scheme that compacts zero-
valued bytes, and that tends to bring it to parity with protobufs for message
size (haven't compared with MessagePack). The down side of this packing is
that it of course means the protocol is back to being sequential, since you
have to unpack it first. The packing is very fast, though, as it can be
implemented in a tight loop with almost no branches.

------
wololo
hey kenton, any public thoughts on russ smith's similar project several years
back?

~~~
kentonv
I'm not familiar. Do you have a link?

~~~
wololo
will respond off-thread

------
peterwwillis
_"Note: Cap'n Proto is not ready yet"_

Okey doke. _Closes window_

(i wonder if you put half the effort into the code that you did this web site
whether you'd have a finished product...)

~~~
jamesaguilar
Measurably less effort has been put into the docs than the code. You can
verify this for yourself by checking the commits:
<https://github.com/kentonv/capnproto/commits/master?page=1>

Also, wow, your attitude is horrifically bad.

~~~
peterwwillis
_Also, wow, your attitude is horrifically bad._

You have an intense feeling of fear, shock or disgust because I don't want to
use an unready product that I feel has an unnecessarily polished web site?

I'd hate to see your face once I review the code.

~~~
jamesaguilar
Oo, and you like to do the thing where you look up the dictionary definitions
of words used to criticize you for their literal meaning. Cool.

My problem is not with your choice to use or not use. It's with the words you
use to dismiss something that is well-within the norms of what's posted on
here. Unfinished products go on HN all the time.

And, the website's not even that polished! It's a bunch of markdown design
documents with two or three graphics attached. So, you have a bad attitude and
you're wrong. That's off-putting, and apparently not just to me.

Oh, big bad Peter's going to review some pre-alpha open source code and
dislike it. That is sure something that's going to make my face scrunch up.

~~~
peterwwillis
I'm glad you think i'm cool. Sorry I don't tow the party line and blow every
dev who releases a _lack_ of a product so they can build interest based on
promises (though I realize there is code available in this instance). I'm also
sorry you don't like the website. And thank you for mentioning my name, I so
love to see it in print. And sorry about your scrunchy face.

~~~
jamesaguilar
I'm fairly sure your sexual services would not be required by "every dev" who
posts their unfinished open source projects on HN. Courtesy, on the other
hand, or barring that, silence, could be useful.

<http://ycombinator.com/newsguidelines.html>


Ask HN: What are some of the best open-source projects for beginners? - jacorreia

I know for myself it was a huge decision, what to contribute to at first. I'm sure there are tons of beginners out there who would appreciate a step in the right direction!
======
austincheney
As a web developer I enjoy contributing to projects that help me to identify
stupid things, because there is an abundance of stupid in web technologies. I
enjoy contributing to things like JSLint and Pretty Diff.

Sometimes contributions can be as simple as bug reports or feature
suggestions. This kind of information is golden for complex projects
maintained by very few individuals.

------
smurfpandey
If you are a javascript developer than you can start with libraries available
on Github. I started with a small plugin called jPulse, few days back i sent a
pull request to an yeoman plugin. Easiest way is by looking into the projects
that you use yourself, that way you will have an understanding of how
everything works, and you will be in a better position to contribute

------
mmaunder
I'm not sure what languages you know, but WordPress is a great one if you can
program in PHP. The code is easy to read and there's plenty of room for
contributions and improvement in WordPress core. Also the community is really
friendly and welcoming.

~~~
csixty4
There's even a list of "Good First Bugs for New Contributors":
[https://core.trac.wordpress.org/tickets/good-first-
bugs](https://core.trac.wordpress.org/tickets/good-first-bugs)

------
cnst
The best is start with what you use, and are passionate about.

I started with Mozilla, then moved on to OpenBSD, FreeBSD, *BSD.

Find something that you love, with a part that annoys you, fix it, see how it
goes.


Egypt discovers 40 mummies in ancient chambers in Minya - BobbyVsTheDevil
https://www.timesofisrael.com/egypt-discovers-40-mummies-in-ancient-chambers-in-minya/
======
retSava
As far as my understanding goes, finding mummies in Egypt is similar to
finding dinosaur fossils - it's common and rarely something that gets/should
get broad attention. It's more a marketing thing, which the article also acks:

> Egypt has made a series of archaeological finds recently, and it has been
> heavily promoting them to revive its tourism industry

This find seems to be along those lines.

Visited Egypt a couple of times, really incredible to walk around in primarily
Luxor temples. A tip for tourists - buy an egyptian newspaper (in arabic) and
carry around visibly. Learn to say "no thanks" in as good arabic as you can
(something like "la-a shukran"). That makes things easier.

~~~
rblion
Came here to say this. I want to visit Egypt for the history but I honestly
think I'd be content with the museums in NYC and London.

Only Giza and Luxor are my list still, I'll have to wait until a safer time
though according to friends who just went and didn't have a pleasant
experience.

~~~
thekid314
It's perfectly safe here. Come now before the crowds get much bigger. Around
the tourist sites you will meet plenty of people trying to get you to ride a
horse, or pay a tip for any little service. You can just ignore them, and
there's no tip necessary. Take Uber everywhere and you won't even have to
worry about taxis.

The real locations in Luxor and the Egypt Museum are much more interesting
than the exhibit in London (though the exhibit in London has better labels).

*I'm a white guy writing this from Cairo. [https://www.DavidDegner.com](https://www.DavidDegner.com)

~~~
rblion
Thanks for the nudge and the tips, I'll definitely refer back to these!

Most of my fears are in my head and can be circumvented with proper planning
and Couchsurfing.

I challenge myself with travel/adventure every year. I think this is the next
leap of faith I need to take. In 2017, I went to Colombia and last fall, I
camped out in WY/MT during bear/elk/moose season.

Is there a decent dev community there? Maybe I can make some friends before
landing, that always makes things easier.

I love your site BTW. I'll look through it all later!

~~~
thekid314
Find my email on my website and I can hook you up with some dwvwlopers

------
dr_dshiv
Best point of interest here -- did they use old manuscripts as part of the
wrapping?

I wish we spent a fraction of the money for LHC on finding ancient texts, for
which we know (statistically) are undiscovered. The benefits to society and
science are just as profound (e.g., to decode charred scrolls of Herculaneum)


Making Science a Presidential Priority - muriithi
http://www.businessweek.com/bwdaily/dnflash/content/feb2008/db2008028_503873.htm?chan=top+news_top+news+index_businessweek+exclusives

======
yummyfajitas
Sounds great, in principle. Here is what would happen if it actually occurred:

Various big projects of dubious value (particle accelerators, LIGO) will go
begging for money. Any candidate who doesn't want to support them will be
portrayed as anti-science. The majority of the effort will be placed here
(scientists care more about grants than politics).

Standard science issues where the science doesn't fit the party line will be
highlighted: evolution, climate change and sex ed. For the most part, science
will be used as a club to beat republicans with. They certainly deserve it
(1), but not only them.

Non-standard science issues that cut against democrats will be mostly ignored
(race/sex differences in intelligence, lawyers suing doctors without
scientific evidence, the possible link between abortion/miscarriage and breast
cancer) . No one will ask the candidates what they think about Larry Summers
or James Watson.

It sounds like a great idea. But I know my colleagues well enough to know that
if it happens, it will simply turn into a "give us money, we hate republicans"
event.

(1) At various points, I noticed birth control (non-condom) includes the
warning "Does not prevent aids or other STDs." Until I heard McCain speak on
the topic, I didn't think anyone was actually dumb enough to think it did.


Let Kids Rule the School - robg
http://www.nytimes.com/2011/03/15/opinion/15engel.html?hp
======
RiderOfGiraffes
I have said repeatedly:

Why should students do PhDs? For the _vast_ majority of people a PhD is of
absolutely zero value.

Why should students go to college/university? For the _vast_ majority of
people a degree is of absolutely zero value.

Why should students finish High School? For the _vast_ majority of people a
High School diploma is of absolutely zero value.

School is all about assessment, but life is about abilities and skills. Why
are we teaching math that's targeted at the pinnacle of calculus, when
absolutely no one uses calculus outside of a very, _very_ small percentage of
people in highly technical, extremely uncommon professions or jobs?

It's the underlying abilities and skills that these kids, and then young
adults, need. (Actually, there's much more needed if you want to go on to
programming, engineering, physics, _etc,_ and I haven't forgotten that. But
what percentage of people do those? What percentage _want_ to do those?)

But they don't get to develop or exercise those abilities and skills. And the
reason is that these can't be assessed _en masse_ \- which is required for
schools.

So how can we develop these skills and abilities in the students, and then
make sure that they have the evidence of them with which to go into the job
market? Employers really no longer care about diplomas, degrees and
qualifications, because they no longer trust them. Instead, every employer
that I know of now asks for those out of habit, but administer their own
aptitude tests.

Remember, though, that we can't let potential employers drive education,
because the students don't yet know what they might want to do, because they
don't know what's possible.

It's hard, and experiments such as those reported here are tremendously
valuable and interesting. I just hope we see them bear fruit, in the form of
balanced, valuable, _educated_ young adults.


Introducing The New IFTTT - johns
http://blog.ifttt.com/post/25506427600/thenewifttt
======
amolsarva
Note to hardware hackers: IFTTT almost certainly started with some musings
about "wouldn't it be cool if I could make my household X trigger web API Y"
and for many entrepreneurs would have led to a startup about smart gadgets.
There have been many over the years.

The very clever thing about IFTTT is they sat and cheaply began the process of
building the web layer.

I like it!

WeMo is likely the first of many many gadgets and interfaces where they can
accept links.

Now they wait and see how quickly the China Ecosystem and the gadget makers
like Belkin deliver lots of nice cheap easy trigger devices.

BugLabs...Nest...Dropcam...LG Smart Refrigerators...Toyota Prius...

~~~
asmithmd1
It would be more exciting if they had an API.

I don't see any way to add channels - either a hardware one or a software one.
You could use RSS but that is it. And I don't see any way to add an action.
They could very easily add a "web hook" URL for a custom action.

I get really annoyed when I see sites like this that anoint winners. They
already have an API to work with outside sites but they just don't publish it

~~~
johns
I started last week to work on the API. Stay tuned.

~~~
willwhitney
Exciting stuff! That seems like an interesting way to bring back in the
hardware possibilities from the comment above - using an ifttt API in tandem
with smart devices could eliminate a ton of work in developing automation.

Also, what's ifttt like to work for so far?

~~~
johns
Very fun and small team of 8 with great vision. Starting the week before this
redesign was a little hectic, but it was worth the effort. Only big things to
come :)

------
graham_king_3
People who know seem excited about this, so I spent two minutes following
links. I still have no idea what ifttt is.

This would help:

\- Change the tagline from "Put the Internet to work for you" to something
more descriptive.

\- Have a prominent "About" link on the blog. Write an About page, or better
put some content on your home page.

~~~
johns
I'll work on getting better info on the blog. In the mean time, here's our
about page <http://ifttt.com/wtf>

~~~
planetguy
Even that needs a lot of work.

Okay, so I can create "connections" on an "if this then that" basis. I need
more examples of the sorts of thises and thats that I can use as input and
output, though. Like, apparently I can control my home appliances? And... what
else?

~~~
dandelany
Really? The second heading on the page clearly gives five examples with an
obvious link to 46 more.

~~~
CGamesPlay
Why do I need another website to do Twitter, Facebook, Evernote, Email, or
Weather? I already have apps that do whatever it is those things are.

No, the page in question does have 1 really good example, the if Instagram
then Dropbox example. I think the homepage of IFTT would benefit from a nice
animation where the "this" and "then" options cycle through various options.
It would show how any tigger can be combined with any action and highlight a
few of the good use cases.

------
newman314
This is a little off-topic but I would still like someone from ifttt to answer
in more detail the method that they use to store passwords for 3rd party
sites.

I think this is an important detail for an app like ifttt as they necessarily
have to store the actual passwords in a form that they can reverse encryption
(for websites that do not support something like OAuth) for in order to submit
on the user's behalf. So it's important to get some transparency on the
mechanism by which ifttt does this.

I also posed the question here a while ago: [http://www.quora.com/How-does-
ifttt-securely-store-passwords...](http://www.quora.com/How-does-ifttt-
securely-store-passwords-for-sites-that-do-not-use-OAuth-or-similar-methods)

~~~
JoshTriplett
> I also posed the question here a while ago: [http://www.quora.com/How-does-
> ifttt-securely-store-passwords...](http://www.quora.com/How-does-ifttt-
> securely-store-passwords-for-sites-that-do-not-use-OAuth-or-similar-methods)

And you appear to have received an answer there, as well. Anything using OAuth
doesn't need to store passwords, and for anything else ifttt stores the
password in an encrypted (but obviously retrievable) form. I don't see how
they could do otherwise; at most, they could refuse to interoperate with any
sites not supporting OAuth, and I don't see the benefit to that.

~~~
newman314
To be clear, I was looking for more detail around _how_ they were doing the
reversible encryption.

------
masonhensley
It is a bummer that the Belkin WeMo's are going to be so expensive.

<http://www.belkin.com/wemo/> ($50 switch, $100 for switch + motion sensor)

<http://ifttt.com/wemo_switch>

If I was looking to dip my toe into some home automation toys, I would rather
pick up a Nest($250) and one of the iOS/Android powered home locks (~$300)
than the equivalent # of WeMos(at $50/per)... but that's just me. To get real
value out of a WeMo system, I figure you need at least 10 spread around your
house.

If the WeMo's were $20-25/ apiece and they had a wall switch version, I think
Belkin & IFTTT would be a game changer in the home automation space.

~~~
paulgerhardt
>one of the iOS/Android powered home locks (~$300)

Check out Lockitron! (<https://lockitron.com>) - we come with an API, no
monthly fee, and a variety of locks that will work on most doors or apartment
buzzer systems.

~~~
koide
What's the solution when your phone is stolen/offline/out of order?

~~~
jroll
Lockitron also offers locks with a keypad, and every lock comes with a
Bluetooth keyfob for emergencies like this. <3 lockitron.

~~~
Poiesis
I don't see any keypads on the site. Is this true?

A keypad backup is a very desirable feature to me. Possibly to lots of others
too, I would think.

~~~
paulgerhardt
Ah, yes, a bit of a secret those. We're currently doing field tests with our
keypad locks.

------
ckluis
Hell yeah for marketing this is cool:

IF retweeted

Then Turn Strobe Light On

Then Wait 5 seconds

Then Turn Strobe Light Off

~~~
Kronopath
Sounds like it could give you a seizure if your tweet went viral.

~~~
ckluis
Ha! It could be a lot of fun to think of potential dashboard (1 for each
sale/sign-up seems like a good metric for some startups) related
hardware/software interfaces.

------
perlgeek
I've skimmed the first two screen-heights of that page, and I still have no
idea what it actually is or does. Maybe link to an explanation somewhere?

~~~
johns
<http://ifttt.com/wtf>

Edit: Sorry for the trouble. We're working getting a link to our About page
from the blog. If you hit the home page, the giant 'Learn more' link has been
really successful at getting people there.

------
nemo1618
Wow, how have I not heard of WeMo before? Though Belkin is typically a little
overpriced, I think they've opened the door for other companies (Phillips,
maybe?) to offer their own version. I'm definitely looking forward to
automating my dorm next year.

~~~
follower
I wondered the same thing as I've been researching controllable power sockets
for a while (although more looking at digital IO/USB control).

I only discovered WeMo today via a comment on Twitter. Though they were
announced back in January as available in "US summer" it seems they've been
pretty much under the radar since then until now.

------
neutronicus
My first thought on seeing the name was that it had something to do with
Fourier transforms.

------
leejoramo
I would use IFTT if I could pay them money.

I am wary of building on top of any third party web service, but I free
services like this I may play with but never depend on for personal or
business use.

~~~
frio
I've upvoted you, but I really want to second this verbally too. I don't see
any adverts on IFTTT (and even if they were: once setup, I wouldn't be
visiting the site often and seeing them), and don't understand how they're
monetising. This is a service I'd really like to use, but I don't want to come
to depend upon it, then find it folding (either due to monetary problems, or
acquired by a third party and being shut down).

Some information on how they intend to stay alive would be fantastic.

~~~
jleader
I wondered about that too, and one thing that occurred to me was that if they
get popular, they've got access to combine data about their users across all
the source and sink services the users use. That is, they can get all my
readily available Facebook data (friends, likes, etc.), my Twitter feed and
follower/followee/favorites lists, etc.

I doubt IFTTT is doing such data fusion today (their userbase is probably too
small to make it worthwhile), but I wonder if that's the eventual plan. To
advertisers, that sort of data could be immensely valuable for ad targetting.

------
Cogito
I very much like it, two comments:

There doesn't seem to be any interface for adding multiple channels of the
same type. My use case: a personal gmail account and a google apps email
account. In general, it would be good to be able to add multiples of any
channel, eg

\- multiple time channels for different time zones

\- multiple twitter accounts

\- multiple sms accounts

The ability to share recipes is great, however it is too hard to browse them.
Of the ~35000 shared recipes I suspect many are variations on a theme, and
whilst the ability to filter by channel and the ranking by popularity are
useful much more could be done. In particular,

\- being able to choose existing tags when creating new recipes

\- being able to browse existing tags

\- suggesting recipes that are similar to the one I am adding, or even
creating!

Love to see how this progresses, especially as the API opens up.

------
mikemoka
I am happy about their foray into the physical world but there is a much more
critical feature still missing in my opinion: the possibility to check for a
desired trigger (e.g. stocks) at a specific time/date or, in general, the
possibility to combine multiple triggers at once

------
sp332
I'm not clear on the difference between a trigger and a quick trigger. Is it
just that regular triggers are run in batch jobs, and quick triggers are
processed individually?

~~~
jashmenn
Most of the triggers on IFTTT require polling to receive updates. We poll the
sources roughly every 15 minutes.

Quick triggers, on the other hand, are event-driven.

So, for instance, if you had a task that was "IF I send IFTTT a Google Chat
THEN post to Twitter" we'll now post your tweet within a couple of seconds
(vs. before it would have been within 15 minutes)

------
cjdavis
If you are looking for 'microcontrollers <-> webservices with full restful
api' then Cosm looks pretty good. Arduino, Nanode, mbed, devices running
OpenWRT...

They just changed names from Pachube.

<https://cosm.com/>

------
Maro
This is the first time I hear about IFTTT. I like it very much. The name is
terrible though. The other similar startup on HN, Zapier, has a much better,
easier to remember name. I'd go as far as to suggest to change the name.
Here's one: apibit.com is still available.

~~~
icebraining
"If this then that" is a terrible and hard to remember name?

IFTTT is just the acronym.

------
neilparikh
The Belkin WeMo looks useful, but looking over its site quickly, it doesn't
appear to be programmable through an API.

Does anyone know of a similar product which can be programmed through an API?

~~~
rubergly
it sounds like IFTTT is its API.

------
esente
Not really excited. There are not many new channels, and those are mainly for
some additional devices. Some may find them useful though.

~~~
johns
The key thing for the new channels is that it's the first expansion outside
the screen and into the physical world. A lot more to come in that area, stay
tuned.

~~~
jedahan
like the pebble yea?

~~~
johns
Yep!

------
alttab
If its an introduction, how can I read the entire post without knowing what
the hell it is?

------
rjwillers
Is there any updates on the ifttt api? When is the ETA?


Show HN: Visualize Kickstarter Projects - Written in Clojure with C2 - dwwoelfel
http://canhekick.it/

======
dwwoelfel
A few cool things about CanHeKickIt:

The entire app is written in Clojure, with the exception of some less for css.

I'm using ClojureScript, a compiler for Clojure that targets JavaScript. This
means that I'm able to use the same code on the front-end as I do on the back-
end. The code that draws the graph, for instance, is exactly the same in
Clojure and ClojureScript. Most everything works even if javascript is
disabled (try <http://canhekick.it/togglejs>).

It uses a kd-tree to store the points in the graph. This lets me efficiently
place the tooltip when someone hovers over the graph.

------
danso
Some design comments:

\- far too much space is used for the colored boxes, which shout the stats
that should be easily apparent from the visualization.

\- categories need to be included...the titles can often reveal nothing about
the project

\- you might as well add the thumbnails of the projects

~~~
dwwoelfel
Thanks for the suggestions! I really appreciate you commenting on my work.

Those colored boxes are meant to serve as a legend for the graphs. Maybe I'll
be better off with some tooltips on the horizontal bar instead.

I shrunk the boxes and put them all on one line for now. Thanks again for
pointing that out. What I have now isn't perfect, but it's much better.

As far as categories and thumbnails go, I'm not sure that's the direction I'm
headed. I don't want to replicate anything Kickstarter already does and I'd
prefer to categorize things based on the data.

I'm working on applying a bit of the machine learning I learned from the
Coursera class to predict success. If I can do that, I'll be the first to
categorize the projects by probability of success.


Proposed new schedule for JDK 8 - austinbv
http://mail.openjdk.java.net/pipermail/jdk8-dev/2013-April/002336.html

======
pswenson
My proposed security fix: kill the Java Browser Plugin.

~~~
moondowner
I agree. All the bad rep Java gets is from the Applet 0-day hacks.

Java 8 to deprecate the Browser Plugin, Applets and all related stuff to it,
and for those who need this technology can use Java 7 and other previous
releases.

~~~
mdmarra
Then you're going to have all kind of apps stuck on older Java versions
forever. While I'd love to see it happen, it would be Oracle shooting
themselves in the foot with their enterprise customers, which - let's face it
- is who they actually care about.

~~~
bradleyjg
Although I don't have numbers, I'm not aware of very many enterprises with
extensive fleets of java applets. Java in the enterprise tends to be either
stand alone programs (i.e. Swing), or EJB driven middleware with JSP on the
front end.

~~~
smackay
Big chunks of dealing with the government (taxes, etc.) in Portugal are in the
form of Java applets. I think this is repeated across Europe.

Most of the apps are little more than forms - there's a lot of logic in the
way the different fields are filled out and the validation and business logic
is probably quite complex. Since everything must be checked on the server
anyway there's nothing stopping it from being migrated to pure HTML.

~~~
iso8859-1
There is nothing stopping any web app from not using applets.

------
hugi
Kill the Java browser plugin. Also, delay by another year and use the
opportunity to bring in Jigsaw. Lambdas are nice, but in the big picture,
Jigsaw is huge.

~~~
batgaijin
what does jigsaw bring to the table? what does its existence imply?

~~~
suyash
Read about it and ask more specific questions:
<http://openjdk.java.net/projects/jigsaw/>

~~~
warmwaffles
I had no idea this existed. This would be nice. I used to like Java's
packaging, until I was introduced to better methods of packaging, like Ruby,
Python, etc... Glad to see that this is on the table.

------
suyash
We can wait till 03/2014 for JDK 8. I don't want to jump on buggy code. Good
idea by Oracle not to scope creep by delaying but fixing security bugs and
making the code base more stable.

------
iso8859-1
I am happy about the renewed focus on security. As far as I remember, people
were pretty skeptical and didn't think Oracle would fix the JRE once the
exploits started getting discovered so frequently.

------
JulianMorrison
Versioned jarballs with versioned dependencies PLEASE. Seriously, Ruby is
laughing at you.

~~~
moondowner
Jarballs? I don't know why Ruby would be laughing. Maven and Gradle are doing
their job fine of handling project dependencies.

~~~
JulianMorrison
Build dependencies, yes.

Runtime dependencies for upgrade in situ, not so much.


Nature manages information, the currency of life, with exquisite efficiency - dnetesn
http://nautil.us/issue/7/waste/nature-the-it-wizard

======
dchichkov
_"...Not only does DNA store information at a density per unit volume
exceeding any other known medium, it can achieve one quarter of the maximum
information density allowed by the laws of physics..."_

Hmm... That number 1/4 of the Bekenstein bound seems suspicious. A quick
search gives:

[http://www.forbes.com/sites/quora/2013/05/22/can-data-
storag...](http://www.forbes.com/sites/quora/2013/05/22/can-data-storage-ever-
reach-an-absolute-limit/)

 _" A gram of dry DNA is about one cubic centimeter, so the radius is 0.0062
meters. So, the best DNA storage can do with those dimensions is 5.6_10^15
bits. A Bekenstein-bound storage device with those dimensions would store
about 1.6 _10^38 bits. "_

That's 10^22 difference. Not 1/4\. That's more like it ... A Bekenstein bound
is Plank-level. Around 8mb per something like a volume of an electron. And DNA
uses chemical level. Configurations of atoms.

~~~
zallarak
Agreed. The interesting thing about DNA is not its raw storage capabilities,
but with how it interacts with itself and its environment to expose and
withdraw certain portions of itself for protein synthesis.

------
trhway
>A fractal drawn on a two-dimensional sheet of paper, for example, has a
higher dimension—say, 2.1. This is a useful feature, allowing nature to pack
some part of a fourth dimension into three-dimensional space.

if i remember correctly fractal can't have dimension higher than the space it
is embedded in. It can have dimension higher than its local dimension though
(that what makes it a fractal :) - a fractal drawn on a 2D plane using lines
has local dimension of 1 while it's fractal dimension can be anything up to 2,
yet can't be greater than 2. The same way with nervous system, blood
arteries/veins - these are just 1D pipes locally, yet as fractals they get to
2.x thus achieving good density in 3D volume of the body with amount/size much
less than just a regular network of pipes would do.

~~~
gus_massa
Short version: Yes a fractal in a 2D piece of paper must have dimension at
most 2.

Long version: There are a lot of definitions of fractal dimension
([http://en.wikipedia.org/wiki/Hausdorff_dimension](http://en.wikipedia.org/wiki/Hausdorff_dimension)
,
[http://en.wikipedia.org/wiki/Minkowski%E2%80%93Bouligand_dim...](http://en.wikipedia.org/wiki/Minkowski%E2%80%93Bouligand_dimension)
, ...) but they are not equivalent.

In all the sensible dimensions, if X is included in Y then dim(X) <= dim(Y).
I'm tempted to write that this holds in every possible dimension, but I think
that there are no official criteria to classify something as a fractal
dimension. Anyone can propose a new definition of a new fractal dimension, and
if it does not have some minimal property it will be simply ignored. The
problem is that the set of minimal properties is not well defined, it's more a
mater of mathematical taste and usage adoption in the mathematical comunity.

More technical details:

For example, a nice property is that the dimension is countably additive. The
Hausdorf dimension has this property, but the box counting dimension doesn't
have this property. Should we eliminate the box counting dimension?

On the other hand it's easier to estimate the box counting dimension than the
Hausdorf dimension. So, what definition is more useful?

------
sinkasapa
I found the lack of citations in this article to be both disappointing and
suspicious. When you conclude "we will need a vastly different approach to
science in order to understand the higher-order, emergent capabilities of
nature’s self-organizing structures", I feel like more evidence is required.
Though the author did mention some exciting ideas and research, she left it to
the audience to follow up on where she might have gotten them from.

------
jasode
>Not only does DNA store information at a density per unit volume

I'm surprised the author didn't mention that the human DNA sequence is ~750
megabytes of data.[1] And that 750MB is replicated billions (or trillions) of
times across all living cells of the body. A sort of living organism RAID
redundancy.

[1][http://newsroom.ucr.edu/1776](http://newsroom.ucr.edu/1776)

------
mrqwerty
This article takes a broad view of an interesting subject. You twits are
arguing over the tiniest of minutiae and completely missing the big picture.
Both the fractal dimension inaccuracy and the issue of information density
within DNA are entirely irrelevant to the thesis being put forward. This is
something I really dislike about hacker news.

~~~
sinkasapa
This is something I like about hacker news. There are people here who
recognize that a thesis stands on the accuracy of its arguments.

------
Aardwolf
The article implies fractal dimension, e.g. a 2.1 dimensional fractal on a 2D
sheet, could allow more computation.

Is that true? Could one make CPU on a 2D chip surface in a fractal pattern and
use that for faster computation? Or fancy supercomputer topologies?

I always thought fractal dimension was more of an abstract concept, not
actually practical. Sounds awesome though.

~~~
HCIdivision17
I think `trhway above has it right. A 2.1 dimensional fractal would be very
much like a bumpy sheet in 3-space. A 2.9 dimensional fractal would be a
fairly convoluted crumpled sheet. [0]

You'd be amazed how much of the fractal stuff is practical. You don't need to
deal with infinities before it becomes useful. For example, fractal antennas
can filter for multiple frequencies well (instead of tuning for just one
perfectly)[1]. On this topic, check out space-filling curve - it's pretty cool
stuff, and the wiki page has a nice diagram of the Peano curve[2].

It's sort of like imaginary numbers. At first glance they seem like a very
theoretical construct, but it soon becomes apparent they're everywhere. You
can't hardly do any sort of electrical engineering with out them. Likewise
with fractals (and the oft associated field of chaos).

[0]
[http://en.wikipedia.org/wiki/Fractal_dimension#Introduction](http://en.wikipedia.org/wiki/Fractal_dimension#Introduction)
See paragraph 3. It makes intuitive sense as you see a 1-dimensional line fill
the space of a 2-dimensional plane.

[1]
[http://en.wikipedia.org/wiki/Fractal_antenna](http://en.wikipedia.org/wiki/Fractal_antenna)

[2] [http://en.wikipedia.org/wiki/Space-
filling_curve](http://en.wikipedia.org/wiki/Space-filling_curve)

EDIT: whoops, missed a reference. (And sorry they're all Wikipedia - there's a
ton of great material on this stuff. Many books on chaos will talk about
fractals extensively, but the best don't shy from the math!)

~~~
Retra
I don't think putting 'fractals' on the front of a discussion is very useful.
A line segment is a fractal. A dot is a fractal. Everything can be a fractal
in the right light. Of course they are useful -- but not usually just because
they are fractals.

It's too much woo.


Ask HN: How do you define a toxic workplace? - ANPEQ-1
I've seen a lot of people talking about how non-toxic/worker friendly workplaces can be a strategic advantage, and I tend to believe it - but I'd be curious as to what you folks define as 'toxic'.
Is it diverse demographic representation? If so, what's the right mix?
Is it just high retention?
Is it a good Glassdoor rating?
======
tlb
"A toxic workplace is a workplace that is marked by significant drama and
infighting, where personal battles often harm productivity". More at
[https://en.wikipedia.org/wiki/Toxic_workplace](https://en.wikipedia.org/wiki/Toxic_workplace)

------
Blakestr
When you are in love with the work but don't want to go into the workplace
because of the people who are there.

------
943_924
Glassdoor has made themselves next to meaningless since they'll take money
from anyone who wants their bad reviews taken down and honestly we need a new
player in the area who actually cares about transparency over taking bribes.

------
twoquestions
In addition to what others have said, it could also be where your're evaluated
on non-work factors. Nepotism is the classic case, but it's still very
frustrating when your status at work is decided on factors that aren't
disclosed to you.

Or worse, when working to create value _reduces_ your status, because you
"should" be able to keep employed on your social status alone. Having to
create value to keep that paycheck coming signals social weakness.

------
bwb
When you realize there are cameras watching every desk at the office.

------
gshdg
A workplace that’s dehumanizing or that forces you to be your worst instead of
your best self in order to survive or succeed.


Hurricane Sandy donation sign on Apple home page - soupboy
http://www.apple.com/#sandy

======
soupboy
I can't follow the link because I don't have iTunes installed on my work
computer, but I find this really interesting because I can't remember ever
seeing something like this on the Apple home page


Making remote working secure, resilient and reliable (UK) - bdfh42
https://www.innovateuk.org/competition-display-page/-/asset_publisher/RqEt2AKmEBhi/content/making-remote-working-secure-resilient-and-reliable?p_p_auth=DS6E30vo&utm_source=http%3a%2f%2fengage.innovateuk.org%2ftechnologystrategyboardlz%2f&utm_medium=email&utm_campaign=Making+remote+working+secure%2c+resilient+and+reliable+C1&utm_term=Funding%c2%a0Available+-+Making+remote+working+secure%2c+resilient+and+reliable&utm_content=110504&gator_td=Levqfc3Qfs2%2fKfoJEIotibbqJiDXJG%2bfWjY8mJyeQP0fzgz%2bPXWT9aURBiMaOi%2fIP%2flE8nfRIU4jQqK4f5UplxA2oe28aOr1Xgb6J44tEHQJ4hWclCCN0v5kBJ2l6dHPfVdVT0mqHoySLPtBL0LbujSyfcTq0zmmPSZ4jxE1VtYBsQ%2fGKDFAAXTUYbeZKgaYpE%2b1i%2fSN2TAQyvNraMdaAh3Ahh3rq8wWHl775yEQ21o%3d
======
bdfh42
An interesting arena for a start-up with 60% funding ready and waiting.


Regulators looking at antibacterial in soap - frankus
http://www.reuters.com/article/idUSTRE63759M20100408

======
chaosmachine
ADA seems to think Triclosan is just fine in toothpaste:

[http://web.archive.org/web/20071024144101/http://www.ada.org...](http://web.archive.org/web/20071024144101/http://www.ada.org/prof/resources/pubs/adanews/adanewsarticle.asp?articleid=1375)


Layoffs and Loyalty in a Liquid Valley - tim_sw
https://medium.com/@louisgray/layoffs-and-loyalty-in-a-liquid-valley-4b42bd5e26d7
======
hwstar
You need to be prepared at all times. You never know when (not if) they are
going to come for you. I lasted 25 years and 11 months at one company before
they came for me. (In hindsight, I should have quit long before the company
got into such dire straits, but it was an easy commute, and the co-workers
were great people to work with)

Layoffs in the tech industry will happen. An emergency fund or F.U. money is
required to deal with it. Once you are over 50 like me, you need to be in a
position financially to live several years without a paycheck because it could
take years for the job market dynamics to change and become more favourable
for the employee.

During the time you are out of work for a long stretch take some time to learn
some new skills, contributing to open source software is an excellent way to
do this.

You must always place your interests ahead of the company you are currently
working for, the company is not going to place your interests ahead of it's
own. You are just a pawn to them. If the companies interests start to conflict
with yours, then you must be prepared to leave (either voluntarily or they'll
do it for you at their time and place of choosing).

~~~
carsongross
> 25 years and 11 months

> You need to be in a position financially to live several years without a
> paycheck because it could take years for the job market dynamics to change
> and become more favourable for the employee.

How insane is that?

Add to the fact that cost of living is so high now in the Bay Area, and safe
returns are so low, that building up any sort of true emergency savings is
difficult... Insane.

~~~
nostrademons
Save 20% of your income for 25 years and you'll have 5 years living expenses
saved up. That's assuming _zero_ returns on capital, beyond inflation. It just
means assuming that your $125K/year salary is actually $100K, or your
$100K/year salary is actually $80K. There are people - even in the Bay Area -
who live on less than half of that.

~~~
naveen99
Do you mean 20% excluding retirement programs ? Remember to do that after
maximizing contributions to your 401k, ira, etc... At layoff time you might be
able to extract some money without penalty and with minimal taxes.

------
ChuckMcM
This is a pretty straight call on things. Nobody likes getting laid off, even
if they had the day before been wishing they would get laid off. It feels
wrong, it feels personal, and it feels bad.

That said, it forces you to look at new opportunities and that can be a good
thing. There was a person I knew at Sun who was layed off and that forced them
to find a new job and they landed at a company that then went public and they
made several million dollars. It really struck me how what seemed like
something horrible for them really was the key to their future success.

The key for me was realizing that different people, in different situations,
respond very differently to the folks around them. I've seen it work both ways
where a "star" from Company A was recruited to work at the company I was
working at and they flamed out miserably, and I've seen people that were very
unproductive get layed off an blossom in a new environment into superstars.

I wish sometimes someone would do a long duration study of folks in the bay
area to quantify the expected value of staying or leaving. My instinct tells
me that the smart ones leave, the "loyal" ones pay a price for their loyalty
that they don't expect.

~~~
gopalv
> My instinct tells me that the smart ones leave, the "loyal" ones pay a price
> for their loyalty that they don't expect.

The opportunities that come up for a "smart" person is many-fold for the ones
who're not acknowledged as smart - the difference in productivity might be
minimal, but the label can be sticky purely due to narcissism.

Don't get me wrong. Self belief is an important part of signing up for a
challenge that is bigger than anything you've done before - instead of being
given a new badge & the same job elsewhere.

Then, there's the trouble with the signaling of "loyalty".

Not looking for another job is too easy to qualify as loyalty. But that's what
mostly gets put up as being loyal, which is fairly low-bar for anyone.

Now, the trouble is removing the "just not looking" confounding factor from a
proper study - relying on self-reporting for that is going to produce bias.

Loyalty as a word has come to mean a pseudo-virtue which is papered over the
actual rational decision to stick with what you've got, considering all the
risks. And people who can't see opportunity over the horizon rarely get to
better places.

The fact that people blossom when they get laid off takes away that illusion -
there is no status quo bias or loss aversion to overcome. Immediately people
are less risk averse to new roles, knock on more doors & grow.

Loyalty as practiced would mean acting in mutual benefit always - not
sacrifice.

------
alain94040
Loyalty works at the person level. That engineer you got along with great?
They are your best source of future employment. When they move to a new great
opportunity, they call who they know and trust. It better be you.

~~~
a3n
Exactly. If there's any loyalty, it's in these personal relationships within a
company. Regardless of how loyal you are to each other, if the company bottom
line says you're gone, then you're gone, and the notice will probably come
from a person to whom you are loyal.

It's just bidness.

------
acjohnson55
Loyalty shouldn't be thought of as synonymous with ongoing employment. Loyalty
is staying true to the deal you made when you were hired. And for most people,
that's at-will. Going above and beyond the call of duty as an employee is
great, but that should be out of symbiosis, not sacrifice.

You can be loyal to a company and to your colleagues while moving on to a new
job. If you're advancing on the world, you may well find ways to send
opportunities to the people and businesses you've worked with in the past.
Likewise, good employers (companies and bosses) are loyal by putting people
first, even when the employment relationship is ending.

------
xacaxulu
Stay loyal, but always keep your options open. Never stop networking, never
stop exploring new opportunities.

------
mschuster91
What I don't get is: can you really be terminated without notice in the US?

In Germany, you have iirc minimum 4 weeks delay.

~~~
hdctambien
Most states in America (all of them?) have an At-Will Employment law.

That means you can quit your job at any time, for any reason, effective
immediately.

It also means you can be fired at any time, for any reason (Except illegal
reasons). effective immediately.

This is a description of the law in Texas:
[http://www.davidcholmeslaw.com/blog/what-is-the-at-will-
empl...](http://www.davidcholmeslaw.com/blog/what-is-the-at-will-employment-
rule-in-texas/)

~~~
krapp
>It also means you can be fired at any time, for any reason (Except illegal
reasons). effective immediately.

In practice this means you can usually be fired for illegal reasons as well,
as long as the company can maintain plausible deniability.

------
pkaye
Loyalty should be to individuals, not companies.

------
20years
Wow this highlights how brutal and vulnerable working in the tech space really
is.

~~~
thrway2busy
yeah I knkow - you might need to spend up to four weeks and go through, I shit
you not, _dozens_ of unpaid interviews - robbing you of 2 hours each, and not
just once but often two or three times - before you get your next $80K-$140K
job offer. The tech space is absolutely brutal. Nobody other than 90% of
people would think this is a tenable lifestyle.

~~~
shopinterest
It all depends, tech/developer vs BD/Marketing - Have experienced the up/down
too of the Bay Area, and sometimes it takes months to get back in the saddle.
Everyone wants the perfect employee, ready to go, nothing to train, Knows all
stacks, all systems, liked by all 6-8 people who interview him/her, asks for
10% less than market rate.

Some companies want you to be an unicorn yourself, I've gone through stuff
like:

'So you have years of mobile ad marketing and also years of online security
service experience, years doing app marketing, already know our reporting and
tracking systems, but you DONT have experience specific marketing on an online
security app? Thanks for coming'

------
dudul
Loyalty is a one way street in business, don't be a fool, do what's right for
you.


25 Billion App Countdown - Apple - sinzone
http://www.apple.com/itunes/25-billion-app-countdown/

======
tree_of_item
I wonder if I could write a bot to game this in time. Pick an app with a known
size and see how much the counter changes in the time it takes to download it.


Solo founders - epi0Bauqu
http://jmillerinc.com/2010/07/06/solo-founders/
======
limedaring
One major point missed by this article is motivation — with a team of
founders, drive to work is very high. You have someone else to interact with,
work with, and keep you on task. I've found that working on projects solo,
it's a lot easier to "fall off the wagon", so to speak — get distracted
working on the wrong things, working without feedback, or stop working at all.
This obviously differs from person to person, but it's one of the reasons why
I believe more in a team rather than a single founder.

~~~
DenisM
On the flip side - if your partners are demotivated you will lose motivation
too. It's just an echo chamber.

It's much better to draw inspiration from your users and solid metrics about
your business.

~~~
limedaring
Not always. When one partner is demotivated, he/she has the other partner to
turn to, discuss the problem, and pivot/change the project if necessary. The
motivated partner can also start this conversation as well. Compare that to a
solo founder who wouldn't have this support.

I'm not saying drawing inspiration from the users isn't important (ideally,
all founders should be doing this anyways), but having another person on the
team significantly helps to start.

------
rdl
One of the biggest reasons solo founder projects fail more than multiple
founder companies is that a multi-founder company has already passed some
tests of market, product, and team.

If an idea is incredibly stupid, but it's your idea, you can easily become
deluded into thinking it's actually a great idea. Being able to convince
another person that the idea is good is definitely a sign that the idea is
good.

It's also a good check on the quality of the team -- if someone is obviously
such a screw up that you'd never want to work with him, you wouldn't work with
him. Even fairly defective people can notice flaws in others. Therefore, a
group of 2+ people probably means the members are at least tolerable.

~~~
kranner
Pre-launch marketing or blogging can give you a lot of feedback about your
idea.

I wouldn't consider a cofounder unless they could add serious value beyond
feedback.

------
lhorie
The link at the bottom has better content on the "why be a solo founder"
question

<http://www.somestartup.com/?p=36>

~~~
daniel-cussen
Thanks for the article, I just posted it.

------
Tawheed
There are a number of disadvantages to being a solo-founder; however, as long
as you are cognizant about it, you can take steps to compensate.

The real question you want to ask yourself is why you're going the solo-route.
As a solo founder myself, I'm fine with the tradeoffs because it affords me
certain other liberties. Do some soul searching and get in synch with
yourself.

One of the compensating measures I have is a Braintrust with other solo
founders. It's a pretty good place to bounce ideas off of other people in
similar situations. Let me know if you are interested in joining.

------
damoncali
Isn't a solo founder just a team waiting to happen?

~~~
avk
I don't think so. If by team you mean co-founders, then no; as a single
founder I spend 0 time and effort on recruiting co-founders. If by team you
mean other employees, then optimistically, sure, but again, it's not something
I'm spending any time on now.


Folders : a language where programs are encoded as hierarchies of folders - tangue
http://danieltemkin.com/Esolangs/Folders/
======
reidacdc
This is fun, esoteric programming languages can help you think about things
differently, and often change your perspective.

But I think one of the central conceits is wrong? They claim folders take up
zero space on disk. I assume they're pulling my leg.

I'm not a Windows expert by any stretch, there are certainly accounting rules
that I don't know, but things that persist across reboots and travel with the
disk between computers definitely are stored somewhere on the disk.


Step-By-Step Fundraising Tactics from an NYC Founder Who Raised $750M - imartin2k
http://firstround.com/review/step-by-step-fundraising-tactics-from-the-nyc-legend-who-raised-750m/
======
nawgszy
Not really a criticism, but this read a bit like a slimy dating guide.
"Remember, like everyone else they want to feel wanted for more than their
money". "Keep them all interested until you've made up your mind". "Subtly let
them know that you're wanted by others".

On an unrelated note: I don't know why I can never contribute constructively
on this site, but here I am.

~~~
CalChris
Given that this was published by a VC and that the writer has been on both
sides of the table, I think you're misreading it.

~~~
nawgszy
I wasn't really trying to imply it's bad advice or isn't ethical or anything.
I get that the parallel I decided to draw does indeed somewhat imply that, but
my intentions weren't as such. Just struck me as funny.

------
bsder
> “When I plan to be raising in six months, I’m already out there, proactively
> connecting with VCs, having coffees, making as many of them aware of my
> company as possible,” says Ryan. “The conversation is safer when I’m not
> raising money.”

Yeah, because so many of us can pick up the phone and have VC's go have coffee
with us for no reason at all. <rolls eyes>

Starting off an article on fundraising with "Have a lot of rich friends"
doesn't actually add credibility to the rest of the article.

~~~
badspeler
I mean, being rich is by far the most important factor for success followed by
having rich friends.

------
iamleppert
Does it strike me odd that CEOs and founders complain about fund raising?
That's one of the most important parts of their job. And I don't see how
having 20 VC pitch meetings lasting 30 minutes on average over the course of
three months is exactly "hard" work. I'd expect nothing less, and perhaps even
more. Or at least some kind of analytical approach to the process that is both
reasoned and strategic as it is diligent. I'd assume after the first few
presentations you'd pretty much have it down save for some specific research
on the firm. If its a lot of e-mailing and paper/busy work, one can hire an
assistant or PT contract staff to help.

This is the kind of work I'd relegate as a skill, but not a pure talent if
that makes any sense. Some people are probably more natural than others but
the skills required aren't worth staking your life on, and this is very much
one of those things where all the value comes from experience and knowing the
right people.

If people don't want to fundraise, the solution is simple: don't be a CEO or
start a company.

~~~
adventured
> Does it strike me odd that CEOs and founders complain about fund raising?
> That's one of the most important parts of their job.

> If people don't want to fundraise, the solution is simple: don't be a CEO or
> start a company.

That has to be heavily qualified, as it applies to a _very small_ subset of
CEOs and founders. Your last statement is radically off-base vs the reality of
who starts most new companies in the US. The extreme majority, 99%, of all
CEOs and founders in the US do not actively fund raise as part of their jobs.
They have actual operating businesses that require their attention and pay for
themselves with sales, or otherwise are bootstrapping on variations of self-
funding. _Few_ start-ups in the US are backed by venture capitalists or
involve VC fund raising.

~500,000 new businesses are started every month in the US. ~400k-500k new
employer businesses are started each year. Less than 1% of all of those
businesses are backed by venture capitalists.

------
kosei
Frankly, this seems like a great article pointing out exactly why the VC and
startup space is such a male dominated area. So many clear male biases here
(exude confidence, fake it until you make it, etc)

~~~
snappyTertle
Are you saying non males don't have confidence and can't fake it until they
make it?

~~~
DeltaCoast
I think they may be referencing a confidence gap[1]. 'Fake until you make it'
seems like it's referring to imposters syndrome[2]. I haven't found any
evidence that it's more prevalent in women than men. Anecdotally women's
credentials & skills in tech are often more scrutinized than men which makes
'faking it' seem less possible.

1.[https://scholar.harvard.edu/files/sarsons/files/confidence_f...](https://scholar.harvard.edu/files/sarsons/files/confidence_final.pdf)

2.[http://www.paulineroseclance.com/pdf/ip_high_achieving_women...](http://www.paulineroseclance.com/pdf/ip_high_achieving_women.pdf)

------
hoodoof
I deeply hope to never raise money in my life.

~~~
owens99
The wealthiest among all my investors (who are also self-made) never raised VC
for their startups. All bootstrapped.

Too many founders pour their life into a project and end up making less than
their investors do from the sale of their own company.

That said, if you can raise a lot for very little equity in a short time, it
can be worth it.

~~~
danieltillett
This is the real secret of the VC industry. Bootstrapping is only harder at
the beginning.

------
yosho
One of the better fundraising guides out there for sure.

------
simonebrunozzi
This is a joke. "You basically start to believe your own bullshit after a
while, and that’s a good thing." How can this be taken as serious advice?

I hate this guy, and what this guy represents. I am not a bullshitter, and I
will never be one. I'd rather not raise money and fail, than bullshit my way
to IPO.

------
ceeker
Probably one of the best articles I have read about fund raising. It is much
more tactical than the typical advice you see on this topic. First Round has a
lot of fluff articles but this one is really worth reading.

------
juskrey
Bullshitology

~~~
bob_theslob646
Why?

~~~
moocowtruck
the entire thing is a step by step guide how to bullshit people so you get
cash; that's probably why

------
moocowtruck
so the name of the game is lie through your teeth, and learn about your
opponent so you can lie better..

------
LeoJiWoo
Is this still applicable? I've been hearing seed funding is dramatically
drying up.

------
flyinglizard
This was the best article I remember reading about the subject.

------
fencepost
Kevin Ryan, of DoubleClick, Gilt, Mongo DB, BusinessInsider, and Nomad Health.

Edit: fine, no snarky comments


Algolia raises a $18.3M Series A - jlemoine
http://techcrunch.com/2015/05/20/algolia-grabs-18-3-million-from-accel-for-its-search-api-on-steroids/

======
thomasfromcdnjs
Congratulations team Algolia! We loved all the help Sylvain gave us with the
cdnjs.com search. It just works, and faster than anything I've ever seen.


My Setup: Passwords, 2FA, and Yubikeys - captn3m0
https://captnemo.in/blog/2020/01/04/security-setup/?2
======
captn3m0
I recently moved to running my `pass` setup against my Yubikey and wrote about
everything surrounding it, including the various failure modes I could think
of.

Running GPG/SSH alongside `pass` on the Yubikey was a gradual process, but I'm
so glad I managed to get it working correctly. Open to suggestions if there's
anything HN thinks can be improved :)


NASA Spacecraft Dives Between Saturn and Its Rings - danparsonson
https://www.nasa.gov/feature/jpl/nasa-spacecraft-dives-between-saturn-and-its-rings
======
ahmeni
As someone working on what amounts to fairly trivial applications in the
enterprise, it's amazing to see engineering efforts like this take place over
nearly 20 years of in-flight time.

------
hackuser
It's amazing to me how normalized these accomplishments has become. Humanity
didn't master rocketry until the mid-20th century, and now we regularly have
robotic vehicles flying around other planets (and sending photos to us).

Perhaps it's an example of how humans naturally notice only change. This is
just more of the same, I suppose.

And we also hear how incompetent and inefficient NASA and the whole U.S.
government are. They certainly could improve but they also just flew a craft
around Saturn, for 12 years. What was it that you were working on again?

~~~
Kattywumpus
You also have to compare NASA's incredible success rate to others in their
field. In 2013, China's Yutu moon rover broke down in less than a month. In
2014, the ESA's Philae lander failed to launch its harpoons and fire the
thruster necessary to attach the probe to the comet's surface, and ultimately
bounced into a dark crater. In 2011, Russia's ambitious Phobos-Grunt mission
to return a sample of Martian soil never got beyond low Earth orbit because of
a rocket misfire.

I'm not saying other space agencies aren't doing impressive and amazing work.
(Both Yutu and Philae were able to keep functioning and achieve at least some
of their mission objectives.) I'm just saying space exploration is Really
Hard. And NASA and its partners keep succeeding, even when they try crazy new
things, like landing the SUV-sized Curiosity rover with the Rube Goldberg-like
"Sky Crane maneuver", or sending a nearly two-decade-old spacecraft through
the narrow gap between Saturn's rings and the planet's atmosphere.

We take their successes for granted, like this stuff is easy, but it's not,
even for teams of well-funded geniuses. Worth taking a second to appreciate
the engineering achievement as well as the science.

------
obeattie
Cassini has been the most incredible mission… so many fascinating discoveries
and wonderful imagery. We really need to do more (far more) missions like
this.

~~~
cyberpunk
I've really been enjoying it also, we're so far past the expected lifespan of
this mission every new picture and reading is a gift; well done to all
involved! We get things right sometimes! The software onboard remains a bit of
a black box though; I'd really love to know the software architecture of these
things...

I'm not too up on the capabilities of Cassini, but considering how long it's
been in action would I be right to guess we're not going to get any kind of
'steaming video' of the final dive? Some pics will get picked up before it
meets its end in saturn's atmosphere would be great anyway!

I'm hoping we can find enough out with Cassini's swan song to get interest up
enough to fund lander missions to Europa and Titan (if we can work out how to
totally sterilize things, right?) but I don't think anything is on the cards
currently..

Wishlist stuff: I really love the pics; but having HD video streams from twhat
he next gen of craft will be would be so amazing, I really hope we get there
someday...

I'm very much looking forwards to the James Webb scope when it gets launched
too!

Edit: You can see some pics here [0] and one of my favourites [1].

[0] : [https://saturn.jpl.nasa.gov/galleries/raw-
images/](https://saturn.jpl.nasa.gov/galleries/raw-images/) [1] :
[https://saturnraw.jpl.nasa.gov/multimedia/images/raw/casJPGF...](https://saturnraw.jpl.nasa.gov/multimedia/images/raw/casJPGFullS99/N00280312.jpg)

~~~
therein
Those raw images are mind blowing. Kerbal Space Program isn't too far off. :)

[https://saturnraw.jpl.nasa.gov/multimedia/images/raw/casJPGF...](https://saturnraw.jpl.nasa.gov/multimedia/images/raw/casJPGFullS95/N00265856.jpg)

~~~
cyberpunk
Just to geek out even more-- I really liked this one of enceladus too [0] ...
I wish I knew an astronomer who could explain what that 'shooting star'
looking thing is in that pic..

Do you have any ideas?

I'd expect every bit of light to be streaked if it was a long exposure, so it
has to be something moving? Massive "I'm totally uneducated on all this stuff"
disclaimer -- but if this pic was taken from inside saturn's atmosphere; did
it capture a 'shooting star' ??

[0]:
[https://saturnraw.jpl.nasa.gov/multimedia/images/raw/casJPGF...](https://saturnraw.jpl.nasa.gov/multimedia/images/raw/casJPGFullS99/N00280320.jpg)

~~~
mturmon
It's probably a cosmic ray, which overloads the CCD detector in a streak-like
pattern as it flies through the focal plane. All uncorrected deep space
imagery has them.

~~~
cyberpunk
Aha; thanks! I'm pretty sure I like the effect even more because of your
explanation though!

------
eu
The FAQ[0] about the images has some interesting things in it:

> Why are there images of different sizes?

> The Cassini cameras are 1-megapixel cameras. A normal image is 1024 x 1024
> pixels. Using a technique called "summation" the cameras have the ability to
> combine pixels together to get smaller but less noisy images. This results
> in smaller images that take a lot less time to readout out and take up less
> data volume. Summation is very useful if a scientist needs to conserve both.
> In the 2 x 2 mode, the camera takes a 2 x 2 pixel square and averages those
> values into a single pixel. Images in this mode will be 512 x 512 pixels. In
> the 4 x 4 mode, the camera takes a 4 x 4 pixel square and makes that a
> single pixel. Images in this mode are 256 x 256 in size.

[0]
[https://saturn.jpl.nasa.gov/faq/#raw_images](https://saturn.jpl.nasa.gov/faq/#raw_images)

------
DonbunEf7
Amazing


Ask HN: How do you manage cloud costs? - edcr
In large teams it is pretty easy to end up with things like unused vm's, files stored and forgotten about in s3/blobs etc, machines left running over weekends etc when not in use.
How do people make sure they aren't wasting money like this or don't they?
Thanks!
======
mattbgates
I use DreamCompute, which is DreamHost's OpenStack cloud computing. The
smallest instance cost just $4.50 a month at 512 MB and $6.00 for 1 GB. Each
instance comes with 80 GB SSD + 100 GB block and bandwidth is currently
unmetered, though DreamHost has stated they will likely be charging in the
future. I can't imagine they would charge a fortune for it and would likely
keep it very competitive. Having scoured the Internet for a better cloud
system than that and better rates, I haven't seen anything that beats it.

I currently have a fair-amount-of-traffic website sitting on the 1 GB server,
while I have several web apps, which aren't getting traffic at the moment,
sitting on a smaller single server.

I don't have teams, but it is pretty easy to know what instances I spin up and
which ones I'm using. Regardless of whether the server is being used or not,
you still get charged. So to not get charged, I only use what I need.

I remember using AWS once, really just for testing, and somehow wracked up a
bill for $90 or something like that, despite not getting much traffic. I think
I set up a portfolio website, WordPress with like 6 pages, and forgot about
it. I doubt it was getting a lot of traffic. Luckily, Amazon actually refunded
me. So sometimes pay-for-usage is not always the best way to do things.

But as far as uptime for DreamCompute, so far, other than figuring out how
much I had needed in the beginning.. because I had originally set my 1 GB
server to 512 MB, the website kept crashing. Once I figured out I needed more
RAM and put caching in place, the uptime has been 100%.

~~~
edcr
Cheers Matt - it is more how do I make sure we aren't spending money on things
we don't need - we have lots of developers and whenever I go through
everything manually I end up seeing things that aren't being used.

------
QuinnyPig
It's harder than it looks. Solving this problem is my entire business model.

Stopping unused resources is half of it-- the overlooked other half is
understanding what the bill shows you. Finance doesn't care about how much is
compute vs storage, they care about COGS vs R&D spend.

One-off cost reductions are relatively easy; coming up with a longer term
approach takes significantly more work.

~~~
edcr
Cool I'm thinking of doing something for azure but not sure if anyone cares
(anyone seriously using azure gets lots of free credits) :)


Testing HTTP caching in Go - santiaago
http://www.sanarias.com/blog/215TestingHTTPcachinginGo

======
alimoeeny
The article is very good, I read it all the way to the end and learned quite a
few things. But the title is just a bit misleading, it is more like "test
coverage in go, with an example using http cache". Thanks for writing and
sharing.

~~~
artifaxx
That is very true, but at least the article has links to the previous
tutorials that fill out the background of the topic.

------
jzelinskie
Serious question: is properly handling the "Not Modified " status code really
considered caching or is there a better name? Maybe client-side caching? HTTP
caching in my mind is associated with something like varnish.

~~~
garfij
Yes, that along with dealing with Last-Modified, If-Not-Modified, ETag, and
other similar HTTP Headers is what is meant by HTTP Caching.

From what I can tell Varnish uses these same concepts to do what they do
(caching HTTP reverse proxy).

See

* [https://tools.ietf.org/html/rfc7234#section-1](https://tools.ietf.org/html/rfc7234#section-1)

* [http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html](http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html)

* [https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching_FA...](https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching_FAQ)


Edward Snowden says British spy agency GCHQ 'worse' than NSA - SonicSoul
http://www.globalpost.com/dispatch/news/regions/europe/united-kingdom/130621/edward-snowden-gchq-tempora-worse-nsa-prism

======
daledavies
Time to dust off the IP Over Avian Carriers RCF maybe?

~~~
milliams
Then all they have to do is stop the pigeon
([https://en.wikipedia.org/wiki/Dastardly_and_Muttley_in_Their...](https://en.wikipedia.org/wiki/Dastardly_and_Muttley_in_Their_Flying_Machines)).