[Rprotobuf-yada] lots of updates

Romain Francois romain.francois at dbmail.com
Wed Nov 4 19:17:39 CET 2009


On 11/04/2009 06:39 PM, Dirk Eddelbuettel wrote:
>
> Wow! You have so much frigging energy!
>
> On 4 November 2009 at 18:07, Romain François wrote:
> | Hi,
> |
> | Back from the connectionless couple of days in london. I've commited
>
> I didn't know til yesterday that you were there (at least in part) for the
> London-R meeting. Nice!
>
> | lots of updates to the package.
> |
> | - mutators are now fully working, with all types: primitives, enums,
> | messages
> | - "update" method
> | - "new" takes care of the ... which is used to fill the message (using
> | update)
> | - "clone" method to clone a message
> | - "with" method so that we can evaluate an expression "with" a message
> | - "has" method to indicate if a message has a given field set
> | - "as.list" method
> | - more completions
>
> And you even went to one namespace only :)

I sort of intercepted your commit. I hope I did not do damage otherwise, 
please let me know if you commited something else that disappeared

> Still builds fine. I just added one random commit to get rid of three
> harmless -Wall warnings.
>
> | It's all documented.
>
> Could you possibly set up a little demo() file that just 'does stuff' ?
> Otherwise I get lost between the different man pages.

Sure. The page for the protobufMessage class is the one that contains 
most of the stuff.

> | I've updated the version to 0.0-3 as well.
> |
> | Here is the TODO file that I've commited :
> |
> | * finalizers
> | * serialize/parse messages from/to connections
> | * unit testing
> | * vignette
> | * what to do when unload the package
> | * useR abstract
> | * useR presentation
> |
> | Now, what we really need is ability to serialize and parse these
> | messages from streams, preferably R connections. Does one of you have an
> | idea about streaming these messages in and out ?
> |
> | We need to use these C++ methods of the Message class:
> |
> | bool ParseFromIstream(istream * input)
> | bool SerializeToOstream(ostream * output) const
> |
> | meaning we need to create istream and ostream based on R connections.
>
> Never tried that.  We could start pedestrian and parse from text connections
> (files) first and later bring things down to C++ in a more general way.

Files are easy, but kind of boring. One potential way I'd like to use 
this is to communicate with some other process, so typically send the 
message through a binary socket, and it would be a pity to have to go 
through files for this

We can take R connections completely out of the loop and sort of 
recreate them, but that's a shame I think.

> By the way, if there are Rcpp you need or could think of let me know!

If we can manage to disguise r connections as c++ streams, I think this 
fits nicer in Rcpp than in RProtoBuf.

> Dirk
>
>
> | Romain
> |
> |
> | --
> | Romain Francois
> | Professional R Enthusiast
> | +33(0) 6 28 91 30 30
> | http://romainfrancois.blog.free.fr
> | |- http://tr.im/BcPw : celebrating R commit #50000
> | |- http://tr.im/ztCu : RGG #158:161: examples of package IDPmisc
> | `- http://tr.im/yw8E : New R package : sos


-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/BcPw : celebrating R commit #50000
|- http://tr.im/ztCu : RGG #158:161: examples of package IDPmisc
`- http://tr.im/yw8E : New R package : sos



More information about the Rprotobuf-yada mailing list