[Xcb] _Problems_ in GSoC, 2011

Josh Triplett josh at joshtriplett.org
Tue Jun 7 01:40:10 PDT 2011


On Tue, Jun 07, 2011 at 11:49:16AM +0530, vikash agrawal wrote:
> On Tue, Jun 7, 2011 at 10:48 AM, Josh Triplett <josh at joshtriplett.org>wrote:
> 
> > On Tue, Jun 07, 2011 at 10:31:49AM +0530, vikash agrawal wrote:
> > > Hello Everyone and Josh,
> > > First of all, I am working very slowly and I apologise for that
> > > But from past few days I am facing several problems. I was trying to
> > > understand c_client.py but there are several variables that I couldn't
> > > figure out, I wasnt able to get the complete senseof these variables
> > > correctly as a result I coudnt understand it to the best [ Having a small
> > > description on variables name and there usage, in the file like fmt, idx
> > or
> > > functions like _n or _c_type_setup would serve the very purpose and would
> > > also act as a documentation on the same. On some instances I tried to
> > > comment the code but did fail as a whole]
> > >  I was very scared and worried too today, with my work and
> > understandability
> > > of the code [ Being my first open source contribution, I am really
> > nervous
> > > ]
> > > As a result I mailed Christopher R [ He has always helped me and I do
> > thank
> > > him for that ] and contacted pharris on IRC. A vote of thanks to both of
> > you
> > > for guiding me and solving catering my needs.
> > >
> > > Finally I have thought to make up a small schedule for some time ( say
> > till
> > > my next milestone )
> > >
> > >    -     As per pharris, I will start with something small like shape.xml
> > or
> > >    something else.
> > >    -     I will compile it and then try to understand the generation on
> > >    shape.h and shape.c
> > >    -     [ Will I need to write test cases ? ] [ if yes the should I go
> > for
> > >    python or C and is there a supporting link for this ]
> > >    -     Say, if I understand it then I will move to xproto.xml, ( or
> > >    xkb.xml )
> > >    -     This patch might take some time for me as I have to start from
> > >    scratch all over again
> > >    -     After this I will once again shift to c_client.py. [ If a
> > >    description can be documented then it would be of great help ]
> > >
> > > Please let me know if I am going wrong some where, I might also shoot
> > many
> > > questions in near future
> >
> > Compiling a simple extension will definitely help you understand how the
> > code generation works.  However, once you understand how the code
> > generation works, don't immediately move on to a more complex extension;
> > instead, see if you can use what you've learned on the small extension
> > to experiment with modifying the code generator to see how it works.
> >
> > Again, you don't have to do all the learning before you do any of the
> > coding; you can learn as you go.  Good lesson to learn for Open Source
> > in general: there's always more to learn, and if you try to learn
> > everything before you do anything, you won't manage to accomplish what
> > you want to do.
> >
> > As far as test cases, you can just run the code generator and see if it
> > produces the right results; if you need help figuring out what the
> > expected results look like, or whether you've gotten closer to reaching
> > them, ask on the list and we can help you figure that out.
> >
> > - Josh Triplett
> >
> 
> Thank You Sir, for replying so soon, and I am starting with shapes.xml and
> shapes.[h,c]
> 
>    - By compiling extension, did you mean getting shapes.[c,h] from the
>    protocol

Yes, by "compiling" here I meant "running the code generator on a .xml
file and getting a .c and .h file out".

>    - Can you please describe the 3rd paragraph bit more elaborately

When you run the code generator on the .xml file for an X extension,
you'll get some .c and .h code out.  When you do development on the code
generator, you should test your modified code generator by running it on
an X extension, getting some modified .c and .h code out, and checking
if the modified .c and .h code has the changes you want it to have.  I'd
suggest using "diff -u" as your primary debugging tool there.

- Josh Triplett


More information about the Xcb mailing list