Yes. But I would put that on the level of COM, not the win32 api.TJF wrote: Do you know the GObject Introspection (GI) project?
Moreover, where can I find gobject versions of e.g. database client libraries as mysql, postgresql, pcre, libc etc?
Yes. But I would put that on the level of COM, not the win32 api.TJF wrote: Do you know the GObject Introspection (GI) project?
Gtk+ one the level of COM?marcov wrote:Yes. But I would put that on the level of COM, not the win32 api.
GNOME-DB (libGda)marcov wrote:Moreover, where can I find gobject versions of e.g. database client libraries as mysql, postgresql, pcre, libc etc?
Why not? GDI+ is COM based, so is DirectX. Maybe more specifically IDispatch even.TJF wrote:Gtk+ one the level of COM?marcov wrote:Yes. But I would put that on the level of COM, not the win32 api.
GNOME-DB (libGda)[/quote]marcov wrote:Moreover, where can I find gobject versions of e.g. database client libraries as mysql, postgresql, pcre, libc etc?
Yes, often you throw oranges in a apple discussion.marcov wrote:Apples and oranges.
Yes, that's how we started, until you askedmarcov wrote:We were talking about getting access to APIs ...
What's wrong when I answer?marcov wrote:...where can I find gobject versions ...
They are not gobject versions of the postgresql APIs. They are database abstraction that happens to be gobject and support postgresql. Something totally different from a postgresql API that is easy to convert to new languages because of gobject.TJF wrote:Yes, that's how we started, until you askedmarcov wrote:We were talking about getting access to APIs ...
What's wrong when I answer?marcov wrote:...where can I find gobject versions ...
No. I gave an example why I wanted access to the postgresql API. I didn't ask for any abstraction, which I merely illustrated by saying that I already had a more established framework for that.Now you want to put your own abstraction layer on top of an existing one.
Me to, and I use this database abstraction since Delphi2, circa '97 (the interfaces, there are several implementations and major rewrites, proprietary and free ones).I prefer to use existing software (that's why we initially talked about API access).
That's what I was doing more or less. Adding apis (or expanding their use) to venerable well known abstraction layers. That was an example.Sometimes I have to improve a library. When I need a Firebird DB access, I write a prowider adapter for libGda instead of building a further abstaction layer and wait for anybody to write the matching client providers
We use FreeTDS (strictly) too, but Delphi supports it via ADO/dblib. FPC is has had improvements recently, so maybe that route can be reattempted (dblib/ADO is said to be more performant). There are also 3rd party proprietary drivers that speak wire protocol directly, usually from a more performance perspective.. (Btw: Oracle is included since 4.2, Firebird is under development, SQLserver isn't important (an alternative may be freeTDS). And yes, some parts of the GNOME-DB website are outdated.)
No, of course not. Today is my birthday, so other parties are more important.Did you have to much Christmass parties today?
So happy birthday!marcov wrote:Today is my birthday
Oh these words are very harsh :(. I read the whole post I advice when you don't like a community and community don't like you the best solution is to not come there back. I have seen you telling many time how bad FreeBASIC really is and great glories of ScriptBASIC. And your claim of 'thousands' of embedded controllers I doubt is true but even then note that FreeBASIC get thousands of downloads EVERY WEEK.ScriptBasic wrote:The thousands of embedded controllers running ScriptBASIC in firmware don't post to the forum. It just shows how ignorant some people can be. ScriptBasic is an API and folks here treat it like it's PowerBASIC trying to take it's users away and sell them something. Get a life.
Are you sure? IMHO you'll have to integrate something like fb-frog or h_2_bi into the fbc to make use of the C symbols in FB source. (fb-frog doesn't handle macros yet and h_2_bi macros need adaption for that purpose.)leodescal wrote:ScriptBasic wrote:And about one good greatness of Oxygen BASIC, ability to include C libraries directly, well it wouldn't be much problematic to solve this problem in FreeBASIC as FreeBASIC ALREADY have a working C emitter.
Indeed, and the macros could contain full inline C programs, so that would more or less implementing a full FB+C hybrid frontend, and to interoperate the FB language must fully map to C on each level.TJF wrote:Are you sure? IMHO you'll have to integrate something like fb-frog or h_2_bi into the fbc to make use of the C symbols in FB source. (fb-frog doesn't handle macros yet and h_2_bi macros need adaption for that purpose.)leodescal wrote:ScriptBasic wrote:And about one good greatness of Oxygen BASIC, ability to include C libraries directly, well it wouldn't be much problematic to solve this problem in FreeBASIC as FreeBASIC ALREADY have a working C emitter.
Right. First of all, the symbol names (variables, types, macros, ...) in FB source have to be case-sensitve. It's neccessary to define a new dialect (ie #LANG "polyglot"). What happens when the code is in mixed dialects?marcov wrote:(and that mapping is not entirely the same as having a C backend. E.g. if you have some automated type, the C code in macros won't respect that, while the FB code compiled to C by the backend will)
I made two of these tools (h_2_bi and GirToBac -- the most advanced, I guess). And I've some experience in translating small and not so small headers. But I'm still searching for a better solution.angros47 wrote:The solution is to provide tools for translating c header files to FreeBasic: translation might work or not, but it can be fixed by hand. Such a tool already exist: swig.
Sorry, that's wrong. Directly including C headers by fbc will solve the inline function problem.angros47 wrote:About C header files: some of them are just declarations, but other can contain code (i.e. inline functions)... just like FreeBasic include files. So, any solution for including .h files would cause more troubled than help ...
Not talking about using it directly in FB source, that is theoretically possible because there are C preprocessor modules already in open source compiler, so building on that base ability to 'perfectly' translate is possible but extremely difficult work full of endless cycles of tries to do if my experience with translations between complex programming languages are any true...I did tried basic C -> BASIC translators some time ago in free time for fun, but C have a very liberal syntax, you can theoretically write whole programs in a line!TJF wrote:Are you sure? IMHO you'll have to integrate something like fb-frog or h_2_bi into the fbc to make use of the C symbols in FB source. (fb-frog doesn't handle macros yet and h_2_bi macros need adaption for that purpose.)leodescal wrote:ScriptBasic wrote:And about one good greatness of Oxygen BASIC, ability to include C libraries directly, well it wouldn't be much problematic to solve this problem in FreeBASIC as FreeBASIC ALREADY have a working C emitter.