Re: [Demexp-dev] XDR _int32 attribute
Hello Thomas, 2005/9/25, Thomas Petazzoni [EMAIL PROTECTED]: While trying to compile the demexp XDR file with an other RPC generator, I found that this generator doesn't understand the « _int32 » attribute used at three places in the XDR file. I've grepped RFC 1014, and haven't found any occurence for this attribute. What is it ? Is it specific to ocamlrpcgen ? Defined in a revised RFC ? Yes, it is specific to ocamlrpcgen. It is used to tell the compiler to map the specified RPC int into an OCaml Int32. By default, I map all int to native 31-bits OCaml integers. I suppose you implementation maps int to int32 so you can safely ignore it with something like: #define _int32 /* nothing */ Yours, d. ___ Demexp-dev mailing list Demexp-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/demexp-dev
Re: [Demexp-dev] Problem with preference saving ?
Hi Thomas, 2005/9/25, Thomas Petazzoni [EMAIL PROTECTED]: Today, when I tried to modify the preferences in my 0.6.2 demexp client, the new preferences were not taken into account when restarting the client. What do you mean exactly by the new preferences were not taken into account? Did you try to specify a new default server different that tuxinette.linux-france.org:5? Did you launch the client with the URL of the new server in the command line? There is currently an issue with the client: if launched without command line demexp URL, the tuxinette:5 is used as default server. Yours, d. ___ Demexp-dev mailing list Demexp-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/demexp-dev
Re: [Demexp-dev] XDR _int32 attribute
Hello, 2005/9/26, Thomas Petazzoni [EMAIL PROTECTED]: So, a simple «int» should be 32-bits signed integer. If ocamlrpcgen doesn't do that by default, then I suppose it's broken. AFAIR, ocamlrpcgen maps by default XDR int to opaque 4-bytes type, that should be manually converted to OCaml native int, int32, etc. *I* decided to consider XDR int as 31-bits OCaml native ints, for easier programming. I don't have the source at hand, but if there are simple «int» in your XDR file, then it means that they are limited to 31-bits, which is not correct according to the RFC. In fact, all XDR int (except those marked _int32) used in the current protocol are used as identifiers starting at 0 (or for ranges of small size). Those identifiers are created on the server, so this invariant is enforced by the server. So we have some delay before reaching 1 billion tags or questions (ok, like 640 KB is sufficient for now ;-). So we can say that the specification of demexp protocol is a subset of XDR types, with int limited to 31 bits (once again, except for those marked as _int32). However, I don't know how to specifiy this cleanly, except as a comment in the XDR file (which I should add). If you have any suggestion... If you follow strictly XDR standard and always interpret int as 32 bits, you are always safe. Just for the culture, what's the purpose of the remaining bit in native OCaml integers ? The lowest bit is always set to one for an integer, so that integers (odd numbers) can be easily distinguished from pointers (word aligned, even numbers) by the garbage collector. A similar trick is used in other GCs, like the one used in GNU SmallTalk. Yep, that's what I did for the moment, but I just wanted to make sure that this wasn't going to create an incompatibility while communicating with the server. This should not. However, if you see a way that such a restriction on integers could trigger an issue, please tell it to us. Interoperability is only tested when two *different* implementations can communicate, so your work and detailed review is quite useful and appreciated. Yours, d. ___ Demexp-dev mailing list Demexp-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/demexp-dev
Re: [Demexp-dev] Problem with preference saving ?
Hi David, David MENTRE wrote: Did you try to specify a new default server different that tuxinette.linux-france.org:5? Did you launch the client with the URL of the new server in the command line? Here are the steps to reproduce (from my remembers): - rm -rf ~/.demexp* - demexp-client-gtk2 - warns about login as Anonymous - the client lists all question of tuxinette:5 - go in Edit-Preferences - change login to root/demexp, put something in delegate, and change server to localhost - save, quit the client - demexp-client-gtk2 - still the warning about login as Anonymous - client logged on tuxinette:5, and not localhost:5 Note: I might be doing something wrong. But I think it worked previously. Sincerly, Thomas -- Thomas Petazzoni [EMAIL PROTECTED] ___ Demexp-dev mailing list Demexp-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/demexp-dev