On Tue, Jul 13, 2010 at 12:17 PM, Gustavo Sverzut Barbieri <[email protected]> wrote: > On Tue, Jul 13, 2010 at 1:22 AM, Carsten Haitzler <[email protected]> > wrote: >> On Mon, 12 Jul 2010 21:10:21 -0300 Gustavo Sverzut Barbieri >> <[email protected]> said: >> >> but geneet requires i define my struct in 1 place, and then separately keep a >> geneet description file in sync with that struct. it also doesn't help solve
I didn't get what do you means here. You define the struct in the geneet file and it generates the C code (including the struct). What do you need to sync with this file? >> the "free this for me" code generation too. sure - not a problem in python, >> but >> in c it is. geneet sounds to me like something that only really benefits >> python. for c it makes no real big difference. you still now have 1 place to >> define struct, 1 to define the edd (be it geneet file or boilerplate code >> possibly made shorter with macros) and another to free it. > > Actually we don't have Python-EET, as EET is useless from Python given > it already provide transparent serialization using pickle protocol. > But we could generate the same model in different languages, that's > what Leandro said, we can generate SQL databases and like if required, > or convert between them, etc. IE: one of our internal projects > requires a remote (python+sql) and local (eet) data, we could generate > lots of the code based on this description. > > The free this for me can happen for what is described, you can also > asks for callbacks to be defined in user code, like "my_data" -> > "my_data_free()" calls "my_data_free_user()" function, that is defined > by user. The generated C source can be included our even linked, > depending on what you wish. > > And you don't/shouldn't have to touch the generated files, they are > declared as BUILT_SOURCES in automake. I've used it but I had to make some changes to the generated files - some issues, some extra functions. For example, the X_list_add assumes that you want to append items to the list, but maybe you will need to prepend (my case), you can be interested in promote / demote / count items, and since you don't have access to the list (maybe a function to get the Eina_List would be nice), you have to implement these functions as well. Sure, some improvements are required to geneet, it's just a first version. Anyway, I don't like writing repetitive, boring C code. I've used eet before without geneet and with it now, and it speed up the time I needed to make the same thing and I could spend more time in what matters. I still think it's a good tool to keep in svn. > > >> so... as a tool its usefulness just became rather moot for eet itself as it >> has >> no use for the api that eet itself offers (a c/c++ api). if you stick this in >> the python bindings for eet - sure. it has a use there. > > there are and likely there will not be any python-eet. > > I don't see how define this in a C header would be better. Okay, in > theory you don't need to learn the syntax, but you need to learn the > syntax in the comments. And you have lots of possible errors to handle > you'd not have in the other, like nested structs, possible macros, > typedefs, ... > > As an example, in most of other projects people handle this with > external files usually named ".idl", which are processed and generates > the boring C code. WebKit uses that to generate most of javascript > objects, etc. Other examples are gperf, that uses another format for > their description instead of hacking into own c-like, etc. > > -- > Gustavo Sverzut Barbieri > http://profusion.mobi embedded systems > -------------------------------------- > MSN: [email protected] > Skype: gsbarbieri > Mobile: +55 (19) 9225-2202 > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > enlightenment-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
