Re: Deserializing Messages of unknown type at compile-time

2008-09-08 Thread Kenton Varda
On Mon, Sep 8, 2008 at 4:33 AM, [EMAIL PROTECTED] wrote: More tricky. Given a stream and an instance, I'm trying to get the Descriptor by calling Message#getDescriptorForType() on the instance and passing the return value, along with an input stream, to

Re: how to handle message spanning multiple packets?

2008-09-08 Thread Kenton Varda
Protocol Buffers solve the problem of converting structured data into a flat byte array. They do not solve the problem of communicating that byte array over a network; that's the job of some other library. Sorry to disappoint. On Sun, Sep 7, 2008 at 10:58 AM, Mateusz Berezecki [EMAIL

Re: Deserializing Messages of unknown type at compile-time

2008-09-08 Thread Kenton Varda
On Mon, Sep 8, 2008 at 6:18 PM, Alex Loddengaard [EMAIL PROTECTED]wrote: On Tue, Sep 9, 2008 at 1:16 AM, Kenton Varda [EMAIL PROTECTED] wrote: That won't work. DynamicMessage is a different class; it does not know how to instantiate the protocol-compiler-generated version of the class

Re: Deserializing Messages of unknown type at compile-time

2008-09-08 Thread Kenton Varda
On Mon, Sep 8, 2008 at 6:27 PM, Kenton Varda [EMAIL PROTECTED] wrote: On Mon, Sep 8, 2008 at 6:18 PM, Alex Loddengaard [EMAIL PROTECTED] wrote: On Tue, Sep 9, 2008 at 1:16 AM, Kenton Varda [EMAIL PROTECTED] wrote: That won't work. DynamicMessage is a different class; it does not know

Re: Deserializing Messages of unknown type at compile-time

2008-09-09 Thread Kenton Varda
On Mon, Sep 8, 2008 at 9:11 PM, Alex Loddengaard [EMAIL PROTECTED]wrote: I have a follow-up question: Will using *messageInstance.newBuilderForType().mergeFrom(input).build();*work for a stream that contains trailing binary information? No, it won't work. Protocol buffers are not

Re: Deserializing Messages of unknown type at compile-time

2008-09-09 Thread Kenton Varda
integration with Hadoop. Thanks for resolving this issue, Kenton! Alex On Tue, Sep 9, 2008 at 9:42 AM, Alex Loddengaard [EMAIL PROTECTED] wrote: On Tue, Sep 9, 2008 at 9:28 AM, Kenton Varda [EMAIL PROTECTED] wrote: To clarify: In my original message I was saying that you should call

Re: Scientific Applications

2008-09-11 Thread Kenton Varda
Regarding speed, make sure you have: option optimize_for = SPEED; in your .proto file. (The default is to optimize for code size, since people should only optimize for speed after profiles show that they need it.) Regarding reading only part of a file: Protocol buffers are designed to be

Re: Scientific Applications

2008-09-12 Thread Kenton Varda
Note that the inefficiency of repeated primitive types will be fixed... eventually... but, yeah, right now it's no good. On Fri, Sep 12, 2008 at 2:09 AM, Chris [EMAIL PROTECTED] wrote: Nicolas wrote: Can anyone with some experience in these matters, and especially of alternative formats,

Re: Deserializing Messages of unknown type at compile-time

2008-09-12 Thread Kenton Varda
Even if the message contains only one, non-repeated field, ParseFrom*() will keep reading until EOF or an error. At Google, we have lots of various container formats, for streaming, record-based files, database tables, etc., where each record is a protocol buffer. All of these formats store the

Re: Deleting one of a repeated field?

2008-09-16 Thread Kenton Varda
, Kenton Varda [EMAIL PROTECTED] wrote: For C++, use the RepeatedField interfaces: http://code.google.com/apis/protocolbuffers/docs/reference/cpp/google... You can get a mutable pointer to a RepeatedField or RepeatedPtrField that represents a field named foo by calling the message's

Re: How to properly implement RpcChannel::CallMethod

2008-09-16 Thread Kenton Varda
You should send the method's name along with the request. The receiver can then look up the MethodDescriptor from the service's ServiceDescriptor, using FindMethodByName(). You might even encode your messages like this: message RpcRequest { required string method_name = 1; // The serialized

Re: Protocol Buffers can't use in visual studio 2003 ?

2008-09-16 Thread Kenton Varda
I don't think DLLs or LIBs created with a never version of MSVC will work with MSVC 2003. Protobufs use STL heavily in the interface, and I think the STL classes change from version to version. On Tue, Sep 16, 2008 at 4:44 AM, Niall [EMAIL PROTECTED] wrote: I get the same runtime error with

Re: [PATCH] Add options to change generated file extensions to C++ generator.

2008-09-16 Thread Kenton Varda
On Mon, Sep 15, 2008 at 6:14 PM, Leandro Lucarella [EMAIL PROTECTED] wrote: I understand your concern but I don't think looking after the user should stay in the way of flexibility. I surely prefere flexibility than people looking after me just in case I can't meassure the consequences.

Re: Protocol Buffers can't use in visual studio 2003 ?

2008-09-16 Thread Kenton Varda
Even if only the implementation changes -- specifically, the class's memory layout -- that will cause a binary incompatibility, especially since STL is all templates. It seems the debug vs. release versions of MSVC's STL are not even binary compatible, so being compatible between two versions of

Re: Protocol Buffers can't use in visual studio 2003 ?

2008-09-16 Thread Kenton Varda
I think you'll have to run it in a debugger and try to figure out the cause of the crash you're seeing. I don't have a copy of MSVC '03, but if you send me the stack trace I could try to guess what's going on. On Tue, Sep 16, 2008 at 1:03 PM, Niall [EMAIL PROTECTED] wrote: Finally. I see what

Re: Emulate hash_map using map when necessary.

2008-09-19 Thread Kenton Varda
submitted. Thanks for prodding me into fixing this. :) On Fri, Sep 19, 2008 at 6:41 AM, [EMAIL PROTECTED] wrote: You can submit it, the code is correct. Thank you. -- *De :* Kenton Varda [mailto:[EMAIL PROTECTED] *Envoyé :* 18 septembre 2008 17:13

Re: Any small sample Class Service code for Java

2008-09-19 Thread Kenton Varda
On Fri, Sep 19, 2008 at 9:50 AM, Mars [EMAIL PROTECTED] wrote: just want to find some sample code for Class Service: http://code.google.com/apis/protocolbuffers/docs/reference/python/google.protobuf.service.Service-class.html That's the Python version. Shouldn't you be looking at the Java

Re: Does SerializeToXxx() guarantee a call to ByteSize()?

2008-09-19 Thread Kenton Varda
You probably shouldn't rely on this. Some of the serialization methods will guarantee this, some won't. What you can do is call ByteSize() yourself, and then use SerializeWithCachedSizes(), which requires that ByteSize() was already called and won't call it again. You'll have to do a small

Re: Unable to Complie and Run Example

2008-09-22 Thread Kenton Varda
Use the Makefile. If you don't have make, then don't worry about it and compile and run the Java files like you would any Java executable class. add_person_java is really just an alias for java AddPerson. On Mon, Sep 22, 2008 at 8:16 AM, Adrian [EMAIL PROTECTED] wrote: I was able to install

Re: Proto file format problem

2008-09-22 Thread Kenton Varda
I think the documentation should be changed; I'll fix that. However, negative enum values should probably be discouraged as they will always be encoded as 10 bytes on the wire. On Mon, Sep 22, 2008 at 3:08 AM, Chris [EMAIL PROTECTED] wrote: There is a disagreement between the documentation at

Re: Does SerializeToXxx() guarantee a call to ByteSize()?

2008-09-22 Thread Kenton Varda
On Fri, Sep 19, 2008 at 7:39 PM, Leandro Lucarella [EMAIL PROTECTED] wrote: Kenton Varda, el 19 de septiembre a las 16:12 me escribiste: You probably shouldn't rely on this. Some of the serialization methods will guarantee this, some won't. What you can do is call ByteSize() yourself

Re: Issue dynamically reloading libprotobuf?

2008-09-23 Thread Kenton Varda
Unfortunately, the protocol buffer library was designed in an environment where all code is statically-linked, and it probably won't work so well with dynamically-loaded code. The problem is that at start-up, descriptors are built for each compiled-in message type and registered in a singleton

Re: protobuf-perlxs

2008-09-23 Thread Kenton Varda
I've added this to the wiki. On Mon, Sep 22, 2008 at 3:50 PM, Dave Bailey [EMAIL PROTECTED] wrote: Hi, I've uploaded my Perl/XS code generator for Protocol Buffers: http://code.google.com/p/protobuf-perlxs This is a work in progress, of course. I have gotten this to work on my Linux

Re: Patch to eliminate warning when building

2008-09-23 Thread Kenton Varda
I've submitted this patch (or something equivalent, anyway). Sorry for the delay. On Sat, Sep 6, 2008 at 12:08 AM, Mats Kindahl [EMAIL PROTECTED] wrote: Kenton Varda wrote: I don't think GCC generates this warning with -Wall and -Werror alone. Maybe this is the result of -pedantic

Re: xlC suffers the same can't-decide-which-template-to-use as Symbian

2008-09-24 Thread Kenton Varda
Thanks. Can you send this to me via codereview.appspot.com? On Wed, Sep 24, 2008 at 4:25 PM, Travis Pouarz [EMAIL PROTECTED] wrote: based on 2.0.1 release since I don't see any Subversion repos of trunk What do you mean? http://protobuf.googlecode.com/svn/trunk/

Re: Major update submitted; 2.0.2 release soon

2008-09-25 Thread Kenton Varda
the unknown field loading/storing/writing. But work is busy right now, so I won't estimate how long I will take. I have more than a few questions about the new options below: Kenton Varda wrote: * It is now possible to define custom options, which are basically annotations which may

Re: License changing to BSD.

2008-09-25 Thread Kenton Varda
. Why did you decide against GPLv3? 2008/9/24 Kenton Varda [EMAIL PROTECTED] Hi all, We've decided to change the license for Protocol Buffers from Apache 2.0 to BSD. In general we like the Apache 2.0 license better, but unfortunately it is not compatible with GPLv2. We decided that allowing

Re: xlC suffers the same can't-decide-which-template-to-use as Symbian

2008-09-25 Thread Kenton Varda
It seems like something went wrong with the upload. When I look at the side-by-side diffs it just says error: old chunk mismatch. Do you have any idea what might have gone wrong? On Wed, Sep 24, 2008 at 6:31 PM, Travis Pouarz [EMAIL PROTECTED] wrote: On Sep 24, 7:17 pm, Kenton Varda [EMAIL

Re: Two test suite failures on AIX 5.3 / xlC 7.0

2008-09-25 Thread Kenton Varda
On Wed, Sep 24, 2008 at 4:37 PM, Travis Pouarz [EMAIL PROTECTED] wrote: This first one reveals a disagreement about whether a directory name should be followed by a slash: [ RUN ] CommandLineInterfaceTest.OutputDirectoryIsFileError

Re: xlC suffers the same can't-decide-which-template-to-use as Symbian

2008-09-25 Thread Kenton Varda
I still only see the first patch set. On Thu, Sep 25, 2008 at 4:29 PM, Travis Pouarz [EMAIL PROTECTED] wrote: http://codereview.appspot.com/6051 On Sep 25, 1:12 pm, Kenton Varda [EMAIL PROTECTED] wrote: It seems like something went wrong with the upload. When I look at the side

Re: xlC suffers the same can't-decide-which-template-to-use as Symbian

2008-09-25 Thread Kenton Varda
Apparently codereview.appspot.com allows over-zealous browser caching. I had to refresh. I see it now. Will review tonight or tomorrow. On Thu, Sep 25, 2008 at 5:37 PM, Travis [EMAIL PROTECTED] wrote: On Sep 25, 2008, at 6:51 PM, Kenton Varda wrote: I still only see the first patch set

Re: xlC suffers the same can't-decide-which-template-to-use as Symbian

2008-09-25 Thread Kenton Varda
at 7:40 PM, Kenton Varda [EMAIL PROTECTED] wrote: Apparently codereview.appspot.com allows over-zealous browser caching. I had to refresh. I see it now. Will review tonight or tomorrow. On Thu, Sep 25, 2008 at 5:37 PM, Travis [EMAIL PROTECTED] wrote: On Sep 25, 2008, at 6:51 PM, Kenton

Re: xlC suffers the same can't-decide-which-template-to-use as Symbian

2008-09-26 Thread Kenton Varda
OK, let me know when it's in. Thanks! BTW, if your changes haven't been submitted to upstream gtest, I'll make sure they get there. On Fri, Sep 26, 2008 at 6:53 AM, Travis [EMAIL PROTECTED] wrote: Which just leaves the legal annoyance... Have you signed the contributor license agreement?

Re: Things to do with extensible options....

2008-09-26 Thread Kenton Varda
Interesting ideas. Before we get too creative, though, let me say a word of caution: if an option affects the generated code in all languages (e.g. by changing the wire format), then it can't really be a custom option, since it will have to be compiled into protoc anyway. I'm very wary about

Re: repeated fields

2008-09-28 Thread Kenton Varda
of repeated fields when parsing a buffer or is my idea for distributing the players anyway a bad solution ? Regards, Rico On Sep 24, 7:04 pm, [EMAIL PROTECTED] wrote: Hello Kenton, Thanks a lot! That is exactly what I was looking for! Regards, Rico On 24 Sep., 18:56, Kenton

Re: protobuf-c compilation problem

2008-09-29 Thread Kenton Varda
[cc Dave Benson, author of the C bindings] On Mon, Sep 29, 2008 at 2:05 AM, Doron Tal [EMAIL PROTECTED] wrote: Hi, I'm new to protobuf, and I want to use the new c binding. However, compilation does not pass. Thanks for your help, Doron [doron-lx] protobuf-c-0.4 make Making all in

MSVC build switched to static linking

2008-09-29 Thread Kenton Varda
Hi all, Just before building the 2.0.2 release candidate, I submitted a change to make static linking the default for the protobuf libraries under MSVC. This seems necessary to avoid some of the problems inherent in DLLs which have been discussed here, such as the fact that each DLL has a

Re: License of the output (the flex/bison problem)

2008-09-30 Thread Kenton Varda
The code generated by protoc requires linking against the protobuf libraries, so the Protocol Buffers license terms apply to you either way. I can talk to our licensing people and get this clarified if you want, but given this, does it still matter? BTW, v2.0.2 (to be released later this week)

Re: Support VC6?

2008-09-30 Thread Kenton Varda
I don't have any plans to support VC6, but if someone does the port and submits a patch I'll be happy to apply it (assuming it doesn't harm other platforms). On Mon, Sep 29, 2008 at 8:37 PM, Angus [EMAIL PROTECTED] wrote: I'm working on several VC6 client server projects and want to migrate

Re: License of the output (the flex/bison problem)

2008-09-30 Thread Kenton Varda
Our lawyer's opinion seems to be that the generated code is owned by the owner of the input file by default, even without a special note. However, I've added a note to COPYING.txt anyway to make it completely clear. http://protobuf.googlecode.com/svn/trunk/COPYING.txt On Tue, Sep 30, 2008 at

Re: Can a text formated Flat file be parsed to PB message given the format of message in .proto file?

2008-10-06 Thread Kenton Varda
You can use TextFormat for this. Say your file is going to have a set of FooMessages in it. Then, define a message like: message FooSet { repeated FooMessage foo = 1; } Now, your file can look like this: foo { ... contents of the first FooMessage ... } foo { ... the

Re: Solaris 10 Compile problem

2008-10-07 Thread Kenton Varda
Hi Chad, First, please be aware that protobuf@googlegroups.com is a public mailing list with non-Googlers on it. If you need to communicate anything confidential or Google-specific, please e-mail the appropriate internal mailing list. Anyway, I'm afraid you're going to have to help out with

Re: Import broken?

2008-10-09 Thread Kenton Varda
protobuf_BuildDesc_RequestHeader_2eproto() should be declared in RequestHeader.pb.h. Is it not? What exact flags are you passing to protoc? On Thu, Oct 9, 2008 at 8:29 AM, [EMAIL PROTECTED] wrote: I'm in the process of evaluating PB for a distributed cross language project I'm on. I've

Re: Import broken?

2008-10-09 Thread Kenton Varda
On Thu, Oct 9, 2008 at 12:52 PM, [EMAIL PROTECTED] wrote: protoc.exe --cpp_out= [Fully qualified path name] Ah, ok, you've identified a bug. protoc is supposed to reject any input file which is not located within the import path. The import path is specified using --proto_path and defaults

Re: Options in 2.0.2 broken?

2008-10-10 Thread Kenton Varda
Looks like a bug to me. Thanks for catching it. On Fri, Oct 10, 2008 at 10:19 AM, Jon Skeet [EMAIL PROTECTED] wrote: On Oct 10, 5:33 pm, Jon Skeet [EMAIL PROTECTED] wrote: Anyone fancy pointing out my stupid mistake? Got it! Not only does options.proto need to import google/protobuf/

Re: Extension question

2008-10-10 Thread Kenton Varda
Extensions work analogously to the generated accessors you'd see for a normal field of the same type. So, for a message-typed field, there is no set accessor. Instead, there is a mutable accessor. So, you want to do: Request request; Renderer* renderer =

Re: Import broken?

2008-10-10 Thread Kenton Varda
the relative path and expands it out to a fully qualified path, filename and extension and passes it to protoc. On Oct 9, 5:00 pm, Kenton Varda [EMAIL PROTECTED] wrote: On Thu, Oct 9, 2008 at 12:52 PM, [EMAIL PROTECTED] wrote: protoc.exe --cpp_out= [Fully qualified path name] Ah, ok, you've

Re: How can I compile the protobuf with stlport?

2008-10-10 Thread Kenton Varda
I'm not familiar with stlport. One thing you could try doing is editing config.h manually and removing all the HASH_* #defines. Then the code will fall back to using map instead of hash_map, which should work since map has a standard interface. On Fri, Oct 10, 2008 at 2:58 AM, [EMAIL PROTECTED]

Re: Merge two messages into one file

2008-10-10 Thread Kenton Varda
Sorry, I'm not sure I understand the question. What, exactly, is the main problem you're having? On Fri, Oct 10, 2008 at 3:11 AM, [EMAIL PROTECTED] [EMAIL PROTECTED]wrote: I have some kind of requirement that I did not find answer from the document. May someone help me. I have different

Re: invalid tag (zero)

2008-10-13 Thread Kenton Varda
Are you sure that the data you are sending to the parser is exactly the same data that was generated by the serializer? Remember that protocol buffers are not self-delimiting, so you need to make sure that you limit the input to the exact number of bytes that were produced when serializing. If

Re: 2.0.2 release is up

2008-10-13 Thread Kenton Varda
On Mon, Oct 13, 2008 at 2:26 AM, edan [EMAIL PROTECTED] wrote: I quick google didn't turn up much for me on what that actually means - does it mean anything to y'all? Yes, this was an overzealous warning present in one version of GCC which was promptly toned down in subsequent versions. You

Re: How can I compile the protobuf with stlport?

2008-10-13 Thread Kenton Varda
, Kenton Varda [EMAIL PROTECTED] wrote: I'm not familiar with stlport. One thing you could try doing is editing config.h manually and removing all the HASH_* #defines. Then the code will fall back to using map instead of hash_map, which should work since map has a standard interface

Re: Unknown Message Type

2008-10-14 Thread Kenton Varda
You can create a message like this: message Container { // One of the following will be filled in. optional Ping ping = 1; optional StatusUpdate status_update = 2; optional FindWorker find_worker = 3; } Now send Containers over the wire instead of instances of the individual message

Re: Popping values from repeated fields

2008-10-15 Thread Kenton Varda
In which language? On Wed, Oct 15, 2008 at 1:50 AM, Andy [EMAIL PROTECTED] wrote: Hi, We can push values onto repeated fields. Is there a way of popping values from the same? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Popping values from repeated fields

2008-10-16 Thread Kenton Varda
Currently, no, you can only clear the whole list and start over. I would be amenable to a patch, though, if people feel this would be a useful addition. On Wed, Oct 15, 2008 at 8:36 PM, Andrew Wachira [EMAIL PROTECTED] wrote: In the Java language. On 10/15/08, Kenton Varda [EMAIL PROTECTED

Re: How should I Input the path of compiling .proto files?

2008-10-16 Thread Kenton Varda
/test.pb.h: while trying to create directory ./C:: Invalid argument C:/Projects/Apps_main/C++/Common/test.pb.cc: while trying to create directory ./C:: Invalid argument On Sep 2, 2:22 pm, Kenton Varda [EMAIL PROTECTED] wrote: On Tue, Sep 2, 2008 at 10:06 AM, [EMAIL PROTECTED] wrote

Re: Protocol Buffer as XCode Framework

2008-10-16 Thread Kenton Varda
I'm not sure how mac frameworks work, but it looks like your compiler is not linking against the protobuf library. On Thu, Oct 16, 2008 at 9:41 AM, Carlos Gamboa [EMAIL PROTECTED] wrote: Hello. I am trying to add the protocol buffer to my application (for iphone) and i have been struggling

Re: using RPC on asynchronous server

2008-10-16 Thread Kenton Varda
Many (most?) servers at Google use asynchronous protobuf RPC. I'm not sure how to answer your question, though. Can you be more specific? On Tue, Oct 14, 2008 at 7:16 AM, muqu [EMAIL PROTECTED] wrote: Anybody can shine some light on their experience on using the PB RPC on an asynchronous

Re: Patch to quiet compiler warnings from generated service code

2008-10-16 Thread Kenton Varda
I've made this change in SVN. Thanks. On Thu, Oct 2, 2008 at 12:40 PM, Caleb [EMAIL PROTECTED] wrote: When run with high warning levels, gcc complains that the 'request' and 'response' arguments are unused for all of the stub service functions generated by the protoc compiler. Here's the

Re: protocol buffers not repeating items marked repeated

2008-10-20 Thread Kenton Varda
I don't see any obvious problems. Try printing the whole message just before serializing and just after parsing to see if they are both as you expect. On Sat, Oct 18, 2008 at 11:24 PM, comsatcat [EMAIL PROTECTED] wrote: I have a simple client server in python... I have the following protobuf

Re: Cross compiling

2008-10-20 Thread Kenton Varda
The code generated by protoc is identical on all platforms, so you can use the same protoc that you compiled for Linux. You only have to cross-compile the libprotobuf library. Cross-compiling should work exactly like it does with any other autoconf-based package. On Mon, Oct 20, 2008 at 6:58

Re: Patch for zero_copy_stream_impl.cc

2008-10-20 Thread Kenton Varda
Would you care to add some tests to the unit test to check for these bugs? Otherwise, I'll do that when I apply these patches. On Mon, Oct 20, 2008 at 2:13 PM, [EMAIL PROTECTED] wrote: Sorry, I did some reading, and this should the format I send patch in: Index:

Re: Patch for zero_copy_stream_impl.cc

2008-10-20 Thread Kenton Varda
Oh, and thanks for catching these! On Mon, Oct 20, 2008 at 2:38 PM, Kenton Varda [EMAIL PROTECTED] wrote: Would you care to add some tests to the unit test to check for these bugs? Otherwise, I'll do that when I apply these patches. On Mon, Oct 20, 2008 at 2:13 PM, [EMAIL PROTECTED] wrote

Re: cross compile errors

2008-10-21 Thread Kenton Varda
For the first case, the problem is that the build is trying to run protoc as part of the build process, and it's trying to use the cross-compiled protoc. I think you can fix this by editing src/Makefile.am at line 201 to change this: unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs)

Re: Why copy read stream and zero-copy read streams are not compatible?

2008-10-21 Thread Kenton Varda
You could always have your class implement ZeroCopyInputStream and *contain* an implementation of CopyingInputStream, like: class MyStream : public ZeroCopyInputStream { public: MyStream(); virtual ~MyStream(); CopyingInputStream* AsCopyingInputStream() { return

Re: importing across dlls

2008-10-21 Thread Kenton Varda
I believe this was fixed in 2.0.2. What version are you using? On Tue, Oct 21, 2008 at 11:21 AM, [EMAIL PROTECTED] wrote: I have a protoc file named UniqueID.proto that is compiled into and exported from Communication.dll. I have a protoc file named Base.proto that is compiled into and

Re: importing across dlls

2008-10-21 Thread Kenton Varda
On Tue, Oct 21, 2008 at 12:13 PM, [EMAIL PROTECTED] wrote: Would simply changing FileGenerator::GenerateHeader to output the dllexport_decl in the forward declaration of BuildDescriptors function work? Yes, that is the fix. --~--~-~--~~~---~--~~ You received

Re: Compressed protobufs?

2008-10-21 Thread Kenton Varda
There is no built-in support for this, but there's nothing stopping you from applying whatever compression you want to the serialized data. On Tue, Oct 21, 2008 at 1:08 PM, GDR [EMAIL PROTECTED] wrote: I noticed the protocol buffers store strings in their uncompressed form. Is there any

Re: Failed Test

2008-10-22 Thread Kenton Varda
[+petar] I believe this is a known issue with 64-bit systems, and you can ignore it (it's only the test that is broken). On Tue, Oct 21, 2008 at 2:40 PM, [EMAIL PROTECTED] wrote: I just ran into some test errors before installing the python tools and after installing the protocol buffer

Re: Make check reports error

2008-10-22 Thread Kenton Varda
On Wed, Oct 22, 2008 at 7:23 AM, Niclas Blomgren [EMAIL PROTECTED] wrote: Solaris: I'm guessing this was a sparc system, not x86? Was it 32-bit or 64-bit? I think someone else reported the same problem but we were not able to track it down. Cygwin: Can you include the text of the actual

Re: Standard for RPC proto

2008-10-22 Thread Kenton Varda
Google's RPC system is huge and bloated, and designed explicitly for our hardware and data center configurations. So, I don't think publishing our protocol would be very helpful, and it would take a lot of work just to document it properly. I'm not even sure if our protocol makes sense for use

Re: Serializing Large Collections: SerializePartial ParsePartial

2008-10-22 Thread Kenton Varda
The Partial serialize and parse routines actually do something completely unrelated: they allow the message to be missing required fields. So, that doesn't help you. I'm afraid protocol buffers are not designed for storing very large collections in a single message. Instead, you should be

Re: Make check reports error

2008-10-23 Thread Kenton Varda
:* den 23 oktober 2008 09:50 *To:* 'Kenton Varda' *Cc:* protobuf@googlegroups.com *Subject:* RE: Make check reports error Hi! Solaris: Yes it was a sparc system. 64-bit. Cygwin: Ok here it is. I have also attached the entire make check in a logfile. [ RUN

Re: Where are the pre-compiled lib and supporting header files?

2008-10-23 Thread Kenton Varda
We do not provide a pre-compiled library because it is important that you use a version of the library compiled with the same compiler version which you will be using with your own code. Even on Windows, different versions of MSVC have slightly different STL implementations. Since the protocol

Re: Any way to dissect ProtBuf serialized data without knowing the structure in advance?

2008-10-23 Thread Kenton Varda
From the command line, you can do: protoc --decode_raw data_file This will give you as much information as can be determined without a type definition, to give you an idea of what's there. In C++, you can use the UnknownFieldSet class to parse and inspect a message of unknown type. On Wed,

Re: strings with fixed length

2008-10-23 Thread Kenton Varda
STL strings never shrink. When they're cleared, they keep their memory around for reuse. So, you could take advantage of that to accomplish what you want by setting all your string fields to values of the maximum size and then clearing them. For example: StaticSizeMsg msg;

Re: Streaming

2008-10-24 Thread Kenton Varda
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

Re: strings with fixed length

2008-10-24 Thread Kenton Varda
On Fri, Oct 24, 2008 at 8:34 AM, [EMAIL PROTECTED] wrote: I have a similar problem... we try to do our own memory management for events that we publish/subscribe with some fixed sized pools. I don't suppose there is a way to pass a block of memory to a message upon construction so it uses

Re: Zero enums

2008-10-24 Thread Kenton Varda
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,

Re: Zero enums

2008-10-24 Thread Kenton Varda
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

Re: Zero enums

2008-10-24 Thread Kenton Varda
That is, the first value defined in the .proto file. So if you have: enum Foo { A = 123; B = 6; C = 900; D = 0; } The default is A. On Fri, Oct 24, 2008 at 5:33 PM, Kenton Varda [EMAIL PROTECTED] wrote: Oh, the implicit default for enums is the first defined value

Re: Zero enums

2008-10-27 Thread Kenton Varda
Added to my todo list. On Sat, Oct 25, 2008 at 1:19 AM, Marc Gravell [EMAIL PROTECTED]wrote: Ah! Right. That makes more sense. Could that perhaps be added to the language guide Optional Fields And Default Values? Marc --~--~-~--~~~---~--~~ You received

Re: Problem with spaces in path on windows

2008-10-27 Thread Kenton Varda
Can you give a specific example of a complete protoc command and the error it produces? protoc should not care about spaces in file names as long as they are properly quoted. On Mon, Oct 27, 2008 at 6:49 AM, sdx [EMAIL PROTECTED] wrote: Hi, While trying to invoke the protoc compiler on the

Re: JSON format for ProtocolBuffers

2008-10-27 Thread Kenton Varda
It would be pretty easy to write code that serializes or parses java protocol message objects in JSON format using the protobuf reflection interface (see the Message and Builder interfaces). I don't know of any existing implementations, though. On Sun, Oct 26, 2008 at 2:11 PM, Richard [EMAIL

Re: reading one message at a time

2008-10-27 Thread Kenton Varda
The protocol buffer format expects you to remember where the message ends; it cannot figure out for itself. So, you need to write the size of each message to your file before you write the message itself. On Mon, Oct 27, 2008 at 11:42 AM, Amit Gupta [EMAIL PROTECTED] wrote: I have message

Re: speed - python implementation

2008-10-27 Thread Kenton Varda
[+petar] On Mon, Oct 27, 2008 at 10:47 AM, andres [EMAIL PROTECTED] wrote: Hi, I would like to use protocol buffers in my python code but currently the serialization and parsing methods are too slow compared to cPickle. I've read several posts stating that this is because the python

Re: protoc and python imports

2008-10-27 Thread Kenton Varda
I'm not sure I understand. What would you expect the import line importing a_pb2 to look like? My understanding is that Python imports are absolute, not relative to the importing file. On Sat, Oct 25, 2008 at 7:11 PM, Alan Kligman [EMAIL PROTECTED]wrote: I'm having a problem with protoc

Re: Standard for RPC proto

2008-10-27 Thread Kenton Varda
I don't really have a stake in the design of a protobuf-based RPC format. However, I'd like to point out that the design philosophy we tend to prefer at Google is to keep each layer of the system as simple as possible, and implement orthogonal features using separate layers. Authentication is a

Re: protoc and python imports

2008-10-28 Thread Kenton Varda
on the output from protoc, which could get nasty. On Oct 27, 5:44 pm, Kenton Varda [EMAIL PROTECTED] wrote: I'm not sure I understand. What would you expect the import line importing a_pb2 to look like? My understanding is that Python imports are absolute, not relative to the importing file

Re: reading one message at a time

2008-10-28 Thread Kenton Varda
On Tue, Oct 28, 2008 at 6:35 AM, Moonstruck [EMAIL PROTECTED] wrote: you mean we should write the file like this? (sizeof a message) | (serialized message) | (sizeof another message) | (another serialized message) || so on and so forth while reading, we'd first read the message size,

Re: Standard for RPC proto

2008-10-28 Thread Kenton Varda
Ever notice how practically no one uses HTTP auth? :) On Tue, Oct 28, 2008 at 1:16 AM, Paul P. Komkoff Jr [EMAIL PROTECTED]wrote: On Oct 28, 2:02 am, Kenton Varda [EMAIL PROTECTED] wrote: I don't really have a stake in the design of a protobuf-based RPC format. However, I'd like to point

Re: protoc / license

2008-10-31 Thread Kenton Varda
The protoc code is licensed under the New BSD license, which is extremely permissive. You will have to include a copyright notice but that's about it. Read COPYING.txt for the full license -- it's quite short. On Fri, Oct 31, 2008 at 2:30 PM, Marc Gravell [EMAIL PROTECTED]wrote: (probably one

Re: Best way to define matrix4x4

2008-10-31 Thread Kenton Varda
The version with a single repeated field (which presumably you expect to always have size 16) will be slightly more efficient on the wire and significantly more efficient in-memory (assuming you're using C++). I think you'll find the single repeated field version more usable, too -- you can

Re: Python implementation questions

2008-11-05 Thread Kenton Varda
[cc'ing Petar] On Tue, Nov 4, 2008 at 11:23 PM, DVusBoy [EMAIL PROTECTED] wrote: Hi, I have a couple of questions regarding the Python implementation. 1. There is a discrepancy between the function signatures of the prototype in google.protobuf.message.Message.ListFields(self,

GCC 4.3.0 x64 (Fedora 9) bug fixed

2008-11-05 Thread Kenton Varda
Hi all, I finally got time to install Fedora 9 and track down the bug that causes protoc v2.0.2 to crash on that platform. I've submitted a fix to SVN (rev 70). The underlying problem is actually a compiler bug in GCC 4.3.0, although arguably the code in question was not as robust as it could

Re: separate files per each message type

2008-11-06 Thread Kenton Varda
You would have to define each message in a separate .proto file. On Thu, Nov 6, 2008 at 1:37 AM, [EMAIL PROTECTED] wrote: Hi guys! I'm a new user. Can somebody kindly tell me how do I generate classes in separate files (h' and cpp' files for each message)? Thanks! Omer

Re: Interface and Implementation

2008-11-06 Thread Kenton Varda
Hi Jeff, I've read your message a few times now and I have to admit I don't really understand what you're getting at. Can you give a small example of each of the approaches you're considering? On Wed, Nov 5, 2008 at 12:06 AM, codeazure [EMAIL PROTECTED] wrote: Does anyone have any thoughts on

Re: Interface and Implementation

2008-11-06 Thread Kenton Varda
is, there's no definitive answer, and you'll need to weigh the trade-offs in the context of your application. On Thu, Nov 6, 2008 at 2:44 PM, codeazure [EMAIL PROTECTED] wrote: On Nov 7, 7:14 am, Kenton Varda [EMAIL PROTECTED] wrote: I've read your message a few times now and I have to admit I

Sparc 64-bit bug fixed

2008-11-06 Thread Kenton Varda
I just submitted revision 72, which fixes the bug that caused the tests to crash on 64-bit sparc machines. It turns out DynamicMessage computed some byte offsets incorrectly leading to alignment problems. The new code should be more robust. I'll probably do a 2.0.3 release within the next week

Re: Python for Symbian

2008-11-07 Thread Kenton Varda
The Python implementation currently does not require any non-Python libraries at runtime. You'll probably have to try it to see if it works on Symbian, though. :) On Fri, Nov 7, 2008 at 5:15 AM, Maximilian [EMAIL PROTECTED]wrote: Hi, Is it possible, to use Protobuf for python on Python for

  1   2   3   4   5   6   7   8   9   10   >