On Tuesday 26 April 2011  21:55, Gustavo Sverzut Barbieri wrote :
> On Tue, Apr 26, 2011 at 8:09 PM, Jérémy Zurcher <[email protected]> wrote:
> > Hi Gustavo
> >
> > On Tuesday 26 April 2011  10:37, Gustavo Sverzut Barbieri wrote :
> >>
> >> It's useless to expose such details, as we don't even write C code
> >> that uses it. Just bind ecore_evas and you'll be fine.
> > yeah right, please don't be reductive
> > enlightenment.org says Evas is a canvas display library, state aware ...
> > I'm sure you know what we are talking about.
> > assume I want to write a game, or an animated graph library,
> > can I code and ruby and chose my tools ?
> 
> In very rare cases you'll create the Evas* with evas itself. Often
> what you use is ecore_evas_new() then get the Evas* with
> ecore_evas_get(). The functions you and raster mentioned are useless
> for 99.99999999% of the code, as it's already done inside Ecore_Evas
> itself.
rare cases exists, as long as the code is working and easy to maintain,
what's so wrong ?? btw as syntax trial, I wanted to rewrite the example
http://docs.enlightenment.org/auto/evas/ so I needed an Evas_Engine_Buffer_Info
mapping, end of the story.
> 
> 
> >> Moreover, bindings should try to integrate nicely with environment,
> >> not blindly write code. For example, never expose eina_list, use
> >> Ruby's builtin list instead. Same for hash, stringshares and all.
> > integrate nicely is the goal, wait a little bit more it's 0.0.2 now.
> > blindly write code ... Hallelujah I see again !
> > FFI philosophy is to access C API "AS IS" and to access it
> > through ruby code, so it is portable between ruby VM implementations
> > (MRI,JRuby,rubinius,...) if you want to use ruby array instead of
> > eina_list you'll have to write C code to glue them together which is
> > another type of project.
> 
> Do it. It is really, really annoying to get Eina_List from a language
> that have builtin list types, such as JavaScript, Python or Ruby.
have you seen any implementation of Eina_List, Eina_Hash or something in
ffi-efl, wait till there's something wrong, then you'll be able to say
whatever you want and I'll carefully listen.
> 
> 
> >> Jérémy even mentioned Ecore_Getopt, which is a bad example given that
> >> most high level languages have such thing nicely exposed... at least
> >> it is the case with Python (that I used optparse as base to create
> >> Ecore_Getopt).
> > once again use what you want, some might even prefer getopt(3) than 
> > Evas_Getopt ?!?!
> > btw Evas_Getopt was an exercice for me as it's the first time I use ruby-ffi
> > and it was an excellent one to test struct mapping!
> 
> Forget about it and do something more useful, Elementary is a good start.
learning is never a waste of time.
and as I see it now, ffi-efl won't need Elm_* struct mapping soon.
> 
> Ecore_Getopt is more powerful than regular getopt as it will do type
> parsing (bool, int, string, lists) as well as generate help output.
> But most highlevel languages provide something like this. I don't know
> about Ruby, but it may have something equivalent to Python's optparse
> (again, I translated Python's optparse to C and it's Ecore_Getopt).
I known about python, ruby and more, thanks. once again it's
working in a rubiish way, and is mainly for test purpose, so what's all that 
about ?
> 
> > so shall I continue to expose the whole efl stack so people can access efl 
> > full power
> > or must I only expose the elementary top level widgets so one can write
> > GUI for it's mobile phone ??
>
> The level should be Elementary -> Evas -> Ecore -> Edje. But be
> selective about evas, you first need basic Evas_Object* manipulation,
> like 
> evas_object_{move,resize,del,show,hide,clip_set,clip_unset,color_set,color_get,geometry_get,visible_get...}.
already done in 0.0.2, did you looked at
https://github.com/jeremyz/ffi-efl/blob/master/test/test_elm_win_class.rb
did you read and understand the method_missing in
https://github.com/jeremyz/ffi-efl/blob/master/lib/efl/ffi.rb
> Then some very-often used objects like (in order) rectangle, image,
> text... you likely will never use textblock from Ruby, as it's so
created with Evas_Object *(evas_object_(rectangle|image|text)_add(Evas *e)
so I first wrote classes for the common parts : Evas and Evas_Object
> complex it's better to use it from Edje/Elementary.  Ecore you first
> need some main loop operations like ecore_timer_*, ecore_animator_*,
> ecore_idler_*...  Then some ecore_evas (but most of it is handled
> inside elm_win_add()). Edje is simple and useful, but many functions
> are already covered by elementary wrappers in elm_layout.
what you use or not, what you like or dislike ( I quit python years
ago because I thought that amongs other using indentation as syntax
structuration was very wrong ... people still use it )
> 
> Also, note that some functions are not actually functions but
> static-inline or macros, you should expose those as well.
... thanks a lot ??? note that it's ffi-efl 0.0.2
> 
> And last but not least, try to provide common Ruby constructions with
> EFL, so Ruby developers will feel comfortable. In Python we did a
once again see 
https://github.com/jeremyz/ffi-efl/blob/master/test/test_elm_win_class.rb 
> C-like version (obj.color_set(r, g, b, a)) and a Pythonic version
> (obj.color = (r, g, b, a)), as well as helpers like obj.center and
> similar.a
finaly something usefull, generic handling of all setters done in a few blindly 
written lines
https://github.com/jeremyz/ffi-efl/commit/7c63402a0087554395b97f6edc6c4cb7f10f6320

well, well boring I say
> 
> -- 
> Gustavo Sverzut Barbieri
> http://profusion.mobi embedded systems
> --------------------------------------
> MSN: [email protected]
> Skype: gsbarbieri
> Mobile: +55 (19) 9225-2202

-- 
Jérémy Zurcher
av General Guisan 49
1400 Yverdon-les-bains
+41 (0) 79 599 84 27

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to