On Oct 23, 10:51 pm, Marc Gravell [EMAIL PROTECTED] wrote:
Plus, with a pre-build protoc, I might be able to do some work on
protobuf-net code-generation (I never did get VS working with the
official version...).
Cool. We should get together some time and see whether we can't pool
our efforts
Abstractly, a lot of graph algorithms fall into this paradigm:
foreach node in the graph
neighbors = getNeighbors(graph, node);
doSomething(node, neighbors);
end
I am trying to parallelize this operation for large graphs with
millions of nodes. So, one approach would be to partition
In general, protocol buffers can be used to encode individual chunks within
a stream, but representing the entire stream as a protocol buffer won't work
very well.
On Thu, Oct 23, 2008 at 8:14 PM, sureshkk [EMAIL PROTECTED] wrote:
Hi,
I am looking at a use case where one needs to transfer
I'm writing the code-generation logic for protobuf-net, and I have got
it loading a compiled proto set (FileDescriptorSet). However, when
doing this I had a number of issues with invalid enum values (from
descriptor.proto, compiled via protoc).
In particular, OptimizeMode, CType and
I might have found the answer... if you try to provide a different
value, the parser will treat it like an unknown field (from the
language guide). So this means that enums are essentially unchecked:
invalid values are silently ignored?
Marc
--~--~-~--~~~---~--~~
More: actually, the problem wasn't in the file - it was in the
defaults... for example:
enum Label {
// 0 is reserved for errors
LABEL_OPTIONAL = 1;
LABEL_REQUIRED = 2;
LABEL_REPEATED = 3;
// TODO(sanjay): Should we add LABEL_MAP?
};
...
optional Label
The reasoning for unknown enums being treated as unknown fields goes
something like this:
We cannot simply use an unknown numeric value since many languages do not
allow enum types to represent numeric values other than the set of values
explicitly defined for them. Furthermore, even if they did,
Makes sense - it just seems a little odd that the optional enums don't
have a valid default...
Marc
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Protocol Buffers group.
To post to this group, send email to
Oh, the implicit default for enums is the first defined value, not zero.
On Fri, Oct 24, 2008 at 3:03 PM, Marc Gravell [EMAIL PROTECTED]wrote:
Makes sense - it just seems a little odd that the optional enums don't
have a valid default...
Marc