Re: [protobuf] 2.4.0 and lazy UTF-8 conversions in Java
On Nov 30, 2010, at 20:35 , Kenton Varda wrote: BTW, we actually ended up reverting your change and replacing it with the new implementation. We found that having two references increased memory pressure too much. I thought I had mentioned this to you; sorry if I forgot. Ah; I'm not surprised, which is why it was conditional on the SPEED implementation. It wasn't just two references, but two copies of each string as well. The instanceof approach to switch between the two is a good idea. When I wrote my implementation, I was concerned about the thread-safeness issues, although I don't think I ever considered this particular version. However, I think this can be made thread-safe, even without volatile (although I only understand the JMM enough to be dangerous). Evan -- Evan Jones http://evanjones.ca/ -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Re: Issue 243 in protobuf: Improve mergeDelimitedFrom in the java Impl to setSizeLimit on the CodedInputStream
Comment #9 on issue 243 by john.carrino: Improve mergeDelimitedFrom in the java Impl to setSizeLimit on the CodedInputStream http://code.google.com/p/protobuf/issues/detail?id=243 Cool, I am down with writing to a stream with a bunch of messages in it. A useful tool to do so would be the static readRawVarint32 method because I would like to encode how many instances of each method type will be in the stream before they are written out. An example would be that if I want to put 3 A messages on the stream, I'd write a varint 3, followed by 3 calls to writeDelimited. Then when I parse, I'd like to be able to read just up to the end of those 3 messages without spilling into the rest of the stream. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
Re: [protobuf] Any Python wrappers for the C++ implementation?
Protobuf 2.4.0 will include an implementation of the Python API that is backed by C++ objects. The interface is identical to the existing Python API, and you can wrap it around existing C++ objects or have it construct its own. This code is already is SVN. Unfortunately the team is someone backlogged and we haven't been able to make a lot of progress on an official release. But it should be a lot easier to get the SVN code working than to write your own. :) On Tue, Nov 30, 2010 at 11:22 PM, Yang Zhang yanghates...@gmail.com wrote: Has anyone written (a tool for generating) Python wrappers around the C++ generated code and is willing to share this? I'm looking to do the same, so this would save me a bit of research time. (It's fine if it's not a general tool and this is specific to some schema.) Thanks! -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.comprotobuf%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
Re: [protobuf] Any Python wrappers for the C++ implementation?
Thanks Kenton, we'll take a look. Out of curiosity, any ETA on 2.4.0? On Wed, Dec 1, 2010 at 12:04 PM, Kenton Varda ken...@google.com wrote: Protobuf 2.4.0 will include an implementation of the Python API that is backed by C++ objects. The interface is identical to the existing Python API, and you can wrap it around existing C++ objects or have it construct its own. This code is already is SVN. Unfortunately the team is someone backlogged and we haven't been able to make a lot of progress on an official release. But it should be a lot easier to get the SVN code working than to write your own. :) On Tue, Nov 30, 2010 at 11:22 PM, Yang Zhang yanghates...@gmail.com wrote: Has anyone written (a tool for generating) Python wrappers around the C++ generated code and is willing to share this? I'm looking to do the same, so this would save me a bit of research time. (It's fine if it's not a general tool and this is specific to some schema.) Thanks! -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Re: Issue 243 in protobuf: Improve mergeDelimitedFrom in the java Impl to setSizeLimit on the CodedInputStream
Comment #10 on issue 243 by ken...@google.com: Improve mergeDelimitedFrom in the java Impl to setSizeLimit on the CodedInputStream http://code.google.com/p/protobuf/issues/detail?id=243 How about you define a header message which you read first, like: message Header { // The number of A messages following the header. optional int32 aCount = 1 [default=0]; } So instead of calling readRawVarint32(), you call Header.parseDelimitedFrom() to parse a Header message, then use that to control subsequent reads. You may find in the future that you want to add other metadata to the header as well, which you will be able to do easily since it's a protocol message. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Re: Issue 243 in protobuf: Improve mergeDelimitedFrom in the java Impl to setSizeLimit on the CodedInputStream
Comment #11 on issue 243 by john.carrino: Improve mergeDelimitedFrom in the java Impl to setSizeLimit on the CodedInputStream http://code.google.com/p/protobuf/issues/detail?id=243 That's seems like a good way to go. It's protos all the way down. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] protobuf json codec
I have written a json codec for protobuf which uses jackson as the underlying parsing framework. It is twice as fast for json-protobuf conversion compared to the json codec at http://code.google.com/p/protobuf-java-format/ and about the same for protobuf-json conversion. This is the first draft, and I plan to plugin other serialization schemes like xml. Appreciate feedback from the community. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
Re: [protobuf] protobuf json codec
Missed out the link the source code. Please find the codec I wrote at https://github.com/sijuv/protobuf-codec On Thu, Dec 2, 2010 at 10:41 AM, Siju varghese.s...@gmail.com wrote: I have written a json codec for protobuf which uses jackson as the underlying parsing framework. It is twice as fast for json-protobuf conversion compared to the json codec at http://code.google.com/p/protobuf-java-format/ and about the same for protobuf-json conversion. This is the first draft, and I plan to plugin other serialization schemes like xml. Appreciate feedback from the community. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.comprotobuf%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Issue 245 in protobuf: index package conflicts with index argument name
Status: New Owner: ken...@google.com Labels: Type-Defect Priority-Medium New issue 245 by yanghatespam: index package conflicts with index argument name http://code.google.com/p/protobuf/issues/detail?id=245 If you have: option java_package = index; that will conflict with the argument name index, e.g.: public index.SearchPb.Field.Builder addFieldsBuilder( int index) { return getFieldsFieldBuilder().addBuilder( index, index.SearchPb.Field.getDefaultInstance()); } resulting in javac spitting: build/protobuf/java/index/SearchPb.java:3475: int cannot be dereferenced index, index.SearchPb.Field.getDefaultInstance()); -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Re: Issue 245 in protobuf: index package conflicts with index argument name
Comment #1 on issue 245 by yanghatespam: index package conflicts with index argument name http://code.google.com/p/protobuf/issues/detail?id=245 This is with svn r93 -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Issue 246 in protobuf: Lots of warning: [serial] serializable class ... has no definition of serialVersionUID
Status: New Owner: ken...@google.com Labels: Type-Defect Priority-Medium New issue 246 by yanghatespam: Lots of warning: [serial] serializable class ... has no definition of serialVersionUID http://code.google.com/p/protobuf/issues/detail?id=246 The generated classes are marked serializable but result in these warnings because they don't have serialVersionUIDs. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Re: Issue 246 in protobuf: Lots of warning: [serial] serializable class ... has no definition of serialVersionUID
Comment #1 on issue 246 by yanghatespam: Lots of warning: [serial] serializable class ... has no definition of serialVersionUID http://code.google.com/p/protobuf/issues/detail?id=246 This is also against svn r92 (no problems with 2.3.0). -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Re: Issue 245 in protobuf: index package conflicts with index argument name
Updates: Status: WontFix Comment #2 on issue 245 by ken...@google.com: index package conflicts with index argument name http://code.google.com/p/protobuf/issues/detail?id=245 The Java package naming convention says that the first component of a package name should be a TLD. index is not a TLD. AFAIK, there is no way we can completely avoid the possibility of conflicts here. The only thing we could possibly do is add obfuscation to all private names in generated code to make conflicts less likely. I don't think this is a big enough problem to warrant the tedious work involved, especially given that the package naming convention should prevent conflicts already, therefore I am marking this won't fix. That said, if you really, truly need your top-level package to be named index, feel free to send me a patch against the Java code generator to rename this one variable. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Re: Issue 245 in protobuf: index package conflicts with index argument name
Comment #3 on issue 245 by yanghatespam: index package conflicts with index argument name http://code.google.com/p/protobuf/issues/detail?id=245 We've already changed our code (you gave us a good impetus for finally renaming that poorly named package), but it *is* legal Java. Perhaps adding a quite note to the documentation would be a nice resolution? -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Re: Issue 246 in protobuf: Lots of warning: [serial] serializable class ... has no definition of serialVersionUID
Comment #3 on issue 246 by yanghatespam: Lots of warning: [serial] serializable class ... has no definition of serialVersionUID http://code.google.com/p/protobuf/issues/detail?id=246 You're right, I meant r352. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Re: Issue 245 in protobuf: index package conflicts with index argument name
Comment #4 on issue 245 by ken...@google.com: index package conflicts with index argument name http://code.google.com/p/protobuf/issues/detail?id=245 index is just one of many names that will cause this problem. And package names are only one kind of problem. If you name a field descriptor, you'll see a different kind of problem. We don't have an exhaustive list of these, and creating one would be almost as tedious as just fixing them all. So I'm not sure what to put in the note... Some valid .proto files may generate code that doesn't compile cleanly in some languages.? Seems not very helpful... -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.