Re: GVariant for prez!

2009-05-07 Thread Matthias Clasen
I have been asked to chime in here again... After re-reading this whole thread, and some of the bugzilla discussion, I come away with a lot of sympathy for Davids basic approach, which I understood as follows: Have an api that lets us do dbus calls using 'native' types (probably with some way to

Re: GVariant for prez!

2009-05-07 Thread Brian J. Tarricone
On Thu, 7 May 2009 23:32:05 -0400 Matthias Clasen wrote: - Find a more suitable name for GVariant, maybe. Havoc had 'GBinaryValue' earlier... GSerializedValue? A bit long... GFlatValue? GComplexValue? (eh.) -brian ___ gtk-devel-list

Re: GVariant for prez!

2009-05-04 Thread Simon McVittie
On Sat, 02 May 2009 at 13:02:39 -0400, David Zeuthen wrote: My view is that it's not really realistic to do this, I think it's a convenient thing that I can get/pass well-known data-types like GHashTable or GPtrArray from/to remote objects. This allows adding D-Bus support to

Re: GVariant for prez!

2009-05-04 Thread David Zeuthen
On Mon, 2009-05-04 at 13:26 +0100, Simon McVittie wrote: On Sat, 02 May 2009 at 13:02:39 -0400, David Zeuthen wrote: My view is that it's not really realistic to do this, I think it's a convenient thing that I can get/pass well-known data-types like GHashTable or GPtrArray from/to

Re: GVariant for prez!

2009-05-04 Thread Simon McVittie
On Mon, 04 May 2009 at 10:25:06 -0400, David Zeuthen wrote: In contrast, most D-Bus clients that I write these days are not based on the stick GValue in GHashTable, use GValueArray as a struct design because it's just incredibly awkward to work with. You're clearly not happy with the

Re: GVariant for prez!

2009-05-04 Thread Mikkel Kamstrup Erlandsen
2009/5/4 Simon McVittie simon.mcvit...@collabora.co.uk: On Sat, 02 May 2009 at 13:02:39 -0400, David Zeuthen wrote:  o I'm worried that GVariant supports a superset of the D-Bus    protocol. Right, ideally GVariant as merged in GLib should support exactly the D-Bus protocol (either by code

Re: GVariant for prez!

2009-05-04 Thread Simon McVittie
On Mon, 04 May 2009 at 20:30:13 +0200, Mikkel Kamstrup Erlandsen wrote: 2009/5/4 Simon McVittie simon.mcvit...@collabora.co.uk: On Sat, 02 May 2009 at 13:02:39 -0400, David Zeuthen wrote:  o I'm worried that GVariant supports a superset of the D-Bus    protocol. Right, ideally GVariant

Re: GVariant for prez!

2009-05-04 Thread David Zeuthen
On Mon, 2009-05-04 at 19:12 +0100, Simon McVittie wrote: You're clearly not happy with the representations chosen by dbus-glib (and I agree that they're not so good - they rarely match an existing API, and they don't match the real D-Bus data model either). I hope I'm misunderstanding your

Re: GVariant for prez!

2009-05-02 Thread David Zeuthen
Hey Ryan, I took a closer look at GVariant today so here are some more comments, take them, leave them or do whatever you want with them ;-) Most of these comments are general but, for other readers, it might help to also read the conversations in

Re: GVariant for prez!

2009-05-02 Thread Havoc Pennington
Hi, On Sat, May 2, 2009 at 1:02 PM, David Zeuthen da...@fubar.dk wrote:  o It seems like you (or Simon or both) expect GVariant to be the only   container type in town for C bindings for D-Bus (as per the D-Bus   library bug report). E.g. you expect the C programmers to deal with   a{ss} as a

Re: GVariant for prez!

2009-05-02 Thread David Zeuthen
On Sat, 2009-05-02 at 13:35 -0400, Havoc Pennington wrote: Hi, On Sat, May 2, 2009 at 1:02 PM, David Zeuthen da...@fubar.dk wrote: o It seems like you (or Simon or both) expect GVariant to be the only container type in town for C bindings for D-Bus (as per the D-Bus library bug

Re: GVariant for prez!

2009-04-13 Thread Mikkel Kamstrup Erlandsen
2009/4/9 Dan Winship d...@gnome.org: Ryan Lortie wrote: The type system, of course, is that of DBus. I love your feedback.  Please give it all to me. I took at a look at GVariant from the perspective of could I make libsoup's XML-RPC (and future JSON) code use GVariant instead of GValue.

Re: GVariant for prez!

2009-04-13 Thread Havoc Pennington
Hi, On Mon, Apr 13, 2009 at 7:45 AM, Mikkel Kamstrup Erlandsen mikkel.kamst...@gmail.com wrote:  * I really hope there is room in GVariant for NULL values in some way or other. Without a NULL it is hard to map stuff from an SQL DB directly to the serialization format without nasty hacks. This

Re: GVariant for prez!

2009-04-13 Thread Freddie Unpenstein
From: Mikkel Kamstrup Erlandsen, Date: 13/04/2009 21:45, Wrote: How about dropping GVariant data in a human readable form to a file? I often find myself in the following scenario: I have data that is really not well suited for GConf and can't fit in a GKeyFile, and I also want to allow

Re: GVariant for prez!

2009-04-13 Thread Havoc Pennington
Hi, On Mon, Apr 13, 2009 at 3:00 PM, Ryan Lortie de...@desrt.ca wrote: GVariant has nullable (maybe) types which were a proposed extension to DBus some time ago but never materialised.  iirc, Havoc, you had a favourable opinion of this extension but wasn't sure exactly how we'd handle the

Re: GVariant for prez!

2009-04-13 Thread Havoc Pennington
Hi, On Mon, Apr 13, 2009 at 3:00 PM, Ryan Lortie de...@desrt.ca wrote:  - dictionary entries in GVariant can stand freely (ie: they are not    restricted to being contained in an array). What does it mean if you have a free-floating dict entry? Are you supposed to treat as a dict with one

Re: GVariant for prez!

2009-04-13 Thread Ryan Lortie
Mikkel Kamstrup Erlandsen wrote: I have been silently anticipating GVariant for a while now and I am very happy to see it coming forth now. I am bit in the same camp as Dan here... My primary interest is not necessarily passing GVariants over DBus (although I would also love to do that), but

Re: GVariant for prez!

2009-04-13 Thread Ryan Lortie
Havoc Pennington wrote: Reading the gvariant and gbus source btw, this would be somewhat misleading at the moment; gvariant's type system is a dbus superset, and its serialization format is a proposed dbus v2 format that may or may not ever get used by dbus. (One of the main barriers being that

Re: GVariant for prez!

2009-04-13 Thread Simon McVittie
On Mon, 13 Apr 2009 at 15:56:36 -0400, Havoc Pennington wrote: It looked like you might allow non-string dict keys, was one I noticed. Er, so does D-Bus... Telepathy uses a{uu} in at least one place. I personally think D-Bus has about the right balance for what to allow as a key in a dict (any

Re: GVariant for prez!

2009-04-13 Thread Havoc Pennington
Hi, On Mon, Apr 13, 2009 at 4:32 PM, Simon McVittie simon.mcvit...@collabora.co.uk wrote: On Mon, 13 Apr 2009 at 15:56:36 -0400, Havoc Pennington wrote: It looked like you might allow non-string dict keys, was one I noticed. Er, so does D-Bus... Telepathy uses a{uu} in at least one place. I

Re: GVariant for prez!

2009-04-13 Thread Ryan Lortie
Havoc Pennington wrote: Hi, On Mon, Apr 13, 2009 at 4:32 PM, Simon McVittie simon.mcvit...@collabora.co.uk wrote: On Mon, 13 Apr 2009 at 15:56:36 -0400, Havoc Pennington wrote: It looked like you might allow non-string dict keys, was one I noticed. Er, so does D-Bus... Telepathy uses a{uu}

Re: GVariant for prez!

2009-04-12 Thread Christian Dywan
Am Sat, 11 Apr 2009 13:55:36 -0400 schrieb Havoc Pennington havoc.penning...@gmail.com: Hi, On Sat, Apr 11, 2009 at 11:06 AM, Matthias Clasen matthias.cla...@gmail.com wrote: What David is saying (and I'm sure you understood) is that glib already comes with a type system, namely GType.

Re: GVariant for prez!

2009-04-12 Thread Havoc Pennington
Hi, On Sun, Apr 12, 2009 at 9:14 AM, Christian Dywan christ...@imendio.com wrote: You are asserting that something like a gint or guint is not something that can be saved to disk. I'm not saying that; I'm saying they can only be saved to disk by converting them to a fixed-size integer. int is

Re: GVariant for prez!

2009-04-12 Thread Havoc Pennington
Hi, On Sun, Apr 12, 2009 at 9:14 AM, Christian Dywan christ...@imendio.com wrote: Using G_TYPE_FOO in the API is imho a lot more agreeable than any new string signature. Sure it's more to type, but at the same time it's more comprehensible. :) I don't disagree for C. One thing to note

Re: GVariant for prez!

2009-04-12 Thread Havoc Pennington
Hi, On Thu, Apr 9, 2009 at 11:38 AM, Dan Winship d...@gnome.org wrote: So, my feedback is, if the type system is explicitly just D-Bus and nothing else, shouldn't it be called GDBusType or something? (I'm not saying it's *bad* that it's D-Bus-specific, just that it should be more explicit

Re: GVariant for prez!

2009-04-12 Thread Larry Reaves
On Sun, 2009-04-12 at 14:55 -0400, Havoc Pennington wrote: Hi, On Sun, Apr 12, 2009 at 9:14 AM, Christian Dywan christ...@imendio.com wrote: You are asserting that something like a gint or guint is not something that can be saved to disk. I'm not saying that; I'm saying they can only

Re: GVariant for prez!

2009-04-11 Thread Alexander Larsson
On Thu, 2009-04-09 at 11:38 -0400, Dan Winship wrote: Ryan Lortie wrote: The type system, of course, is that of DBus. I love your feedback. Please give it all to me. I took at a look at GVariant from the perspective of could I make libsoup's XML-RPC (and future JSON) code use GVariant

Re: GVariant for prez!

2009-04-11 Thread Ryan Lortie
Dan Winship wrote: (Alternate possibility: add a way to include type tags, so that callers and callees can agree that a particular x is to be treated as a time_t and not a generic int64. Eg, a signature of :x would mean a (string) type tag followed by an int64, but it would be distinct from sx

Re: GVariant for prez!

2009-04-11 Thread Dan Winship
Ryan Lortie wrote: Dan Winship wrote: (Alternate possibility: add a way to include type tags, so that callers and callees can agree that a particular x is to be treated as a time_t and not a generic int64. Eg, a signature of :x would mean a (string) type tag followed by an int64, but it would

Re: GVariant for prez!

2009-04-11 Thread Matthias Clasen
On Wed, Apr 8, 2009 at 5:22 PM, Ryan Lortie de...@desrt.ca wrote: Hi David Thanks for your reply. David Zeuthen wrote:  - GVariant brings in a completely new type system That's not entirely true.  The DBus type system is being used and loved by many people already and GVariant is using

Re: GVariant for prez!

2009-04-11 Thread Havoc Pennington
Hi, On Sat, Apr 11, 2009 at 11:06 AM, Matthias Clasen matthias.cla...@gmail.com wrote: What David is saying (and I'm sure you understood) is that glib already comes with a type system, namely GType. Adding a completely separate one next to it in the same module is problematic, even if it is

Re: GVariant for prez!

2009-04-11 Thread Havoc Pennington
Hi, On Thu, Apr 9, 2009 at 11:38 AM, Dan Winship d...@gnome.org wrote: So, my feedback is, if the type system is explicitly just D-Bus and nothing else, shouldn't it be called GDBusType or something? (I'm not saying it's *bad* that it's D-Bus-specific, just that it should be more explicit

Re: GVariant for prez!

2009-04-09 Thread Dan Winship
Ryan Lortie wrote: The type system, of course, is that of DBus. I love your feedback. Please give it all to me. I took at a look at GVariant from the perspective of could I make libsoup's XML-RPC (and future JSON) code use GVariant instead of GValue. (For more background, see the thread

Re: GVariant for prez!

2009-04-08 Thread Alberto Ruiz
2009/4/8 Ryan Lortie de...@desrt.ca: Hello Everyone! I'm proposing GVariant for inclusion in glib this cycle. Nice! At last! All hail to desrt :-D I've created a 'gvariant' branch of glib and pushed it to the official repository. For those who don't know what GVariant is, please see the

Re: GVariant for prez!

2009-04-08 Thread David Zeuthen
Hey Ryan, On Wed, 2009-04-08 at 10:17 -0400, Ryan Lortie wrote: Hello Everyone! I'm proposing GVariant for inclusion in glib this cycle. I've created a 'gvariant' branch of glib and pushed it to the official repository. For those who don't know what GVariant is, please see the

Re: GVariant for prez!

2009-04-08 Thread Ryan Lortie
Hi David Thanks for your reply. David Zeuthen wrote: - GVariant brings in a completely new type system That's not entirely true. The DBus type system is being used and loved by many people already and GVariant is using that type system. GVariant merely brings this type system into glib.