Re: [fpc-pascal] The new Delphi 2010 RTTI

2010-12-23 Thread alexv...@mail.ru

22.12.2010 21:52, Michael Van Canneyt пишет:


Therefore, until the time someone finds a cross-platform way to 
implement packages, I see no reason not to start on RTTI. They can 
perfectly be implented independently

or even in parallel.

Wine has ability to load windows libraries on linux. This technology 
could be used to implement cross-platform packages.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] The new Delphi 2010 RTTI

2010-12-23 Thread alexv...@mail.ru

23.12.2010 17:52, Marco van de Voort пишет:

In our previous episode, alexv...@mail.ru said:

Therefore, until the time someone finds a cross-platform way to
implement packages, I see no reason not to start on RTTI. They can
perfectly be implented independently
or even in parallel.


Wine has ability to load windows libraries on linux.

.. into windows programs.


This technology could be used to implement cross-platform packages.

Yes, run the FPC/win32 binary in Wine :-)

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



I`ve heard that some cross-platform projects use this to build 
cross-platform plug-ins.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] The new Delphi 2010 RTTI

2011-01-09 Thread alexv...@mail.ru

24.12.2010 17:31, Sven Barth пишет:


Yeah... and only works on i386- and x86_64-linux.

Runtime packages will come sooner or later, maybe not this year (ok... 
that's hard to beat ^^) and maybe not next year. But when they come 
they'll be implemented in a good cross platform way without such 
hackish approaches like requiring Wine or some other big dependencies.





I mentioned WINE only as as example of possibility to use native 
binaries from one platform in another. FPC should use own format of 
dynamic library and own dynamic linker code embedded into executable. 
This solution could be crossplaform.


Regards,
Alexander

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] The new Delphi 2010 RTTI

2011-01-10 Thread alexv...@mail.ru

10.01.2011 12:05, Sven Barth пишет:
No, FPC should rely on the operating system for dynamic linking. There 
is no use in duplicating a functionality that is already there. One 
"just" needs to spot all problems that might arise on different 
platforms when using dynamic libraries (e.g. symbol resolution on 
Windows vs. ELF based systems).


Regards,
Sven

If so, there must be an executable format supported by all FPC target 
platforms natively. I don't know any such format. We have to duplicate 
some OS functions to make things crossplatform.


Alex.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] The new Delphi 2010 RTTI

2011-01-10 Thread alexv...@mail.ru

10.01.2011 12:50, michael.vancann...@wisa.be пишет:




Why ? There is no need for that; You can perfectly use the OS 
functionality.

All you need to do is add a layer on top which hides the OS specifics.
Borland could do it, so we can do it too.

The main problem is the Windows target where a library is more like a 
self-contained exe. On Linux (and probably Mac OS), libraries already 
work as packages are intended to work.


Michael.

Delphi package is standart DLL with PE file format - it is not portable 
without things like Wine for example.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] The new Delphi 2010 RTTI

2011-01-10 Thread alexv...@mail.ru

10.01.2011 12:58, Matt Emson пишет:

On 10/01/2011 09:26, alexv...@mail.ru wrote:


If so, there must be an executable format supported by all FPC target 
platforms natively. I don't know any such format. We have to 
duplicate some OS functions to make things crossplatform.


I don't think that is what Sven meant. I think the executable format 
would be that of the native platform. However, the interface to the 
library (the exported symbols and such) would be a common interface 
that abstracts away the specifics of the underlying OS Library loading 
routines.


M

But I want packages to be binary portable between OS (on target 
processor architecture)

Alex

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] The new Delphi 2010 RTTI

2011-01-10 Thread alexv...@mail.ru

10.01.2011 13:05, michael.vancann...@wisa.be пишет:



On Mon, 10 Jan 2011, Vincent Snijders wrote:


2011/1/10 alexv...@mail.ru :


But I want packages to be binary portable between OS (on target 
processor

architecture)



I don't think that is feasible, unless you don't use any OS features.


Exactly.

Even just because FPC supports multiple CPUs; You can't use an i386 
package on SPARC or ARM.


So you'll always have to recompile your package for all platforms that 
you want to support.



But only for all processors, not for all existing combinations of 
processor and OS.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: OS independent packages was Re: [fpc-pascal] The new Delphi 2010 RTTI

2011-01-10 Thread alexv...@mail.ru

10.01.2011 13:19, Florian Klaempfl пишет:

Am 10.01.2011 11:16, schrieb alexv...@mail.ru:

10.01.2011 13:05, michael.vancann...@wisa.be пишет:


On Mon, 10 Jan 2011, Vincent Snijders wrote:


2011/1/10 alexv...@mail.ru:

But I want packages to be binary portable between OS (on target
processor
architecture)


I don't think that is feasible, unless you don't use any OS features.

Exactly.

Even just because FPC supports multiple CPUs; You can't use an i386
package on SPARC or ARM.

So you'll always have to recompile your package for all platforms that
you want to support.



But only for all processors, not for all existing combinations of
processor and OS.

The rtl package is OS specific anyways and as soon as you depend on the
rtl package (an fpc package will always depend on it), you need to build
your package for any FPC version, processor and OS combination.

I have a few drafts of another design 
http://wiki.freepascal.org/User:AlexVinS/Packages


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] The new Delphi 2010 RTTI

2011-01-10 Thread alexv...@mail.ru

10.01.2011 13:50, michael.vancann...@wisa.be пишет:



On Mon, 10 Jan 2011, alexv...@mail.ru wrote:


10.01.2011 13:05, michael.vancann...@wisa.be пишет:



On Mon, 10 Jan 2011, Vincent Snijders wrote:


2011/1/10 alexv...@mail.ru :


But I want packages to be binary portable between OS (on target 
processor

architecture)



I don't think that is feasible, unless you don't use any OS features.


Exactly.

Even just because FPC supports multiple CPUs; You can't use an i386 
package on SPARC or ARM.


So you'll always have to recompile your package for all platforms 
that you want to support.



But only for all processors, not for all existing combinations of 
processor and OS.


You should re-read Florian's email, and *fully* understand the 
consequences.


Your proposal requires that we emulate all OSes on all other OSes, 
because
the basic package (rtl or whatever it will be called) always depends 
on the OS. There is no way around this.


My solution, in short,  is that packages should have OS independent 
interface to RTL built into executable visible to packages as RTL built 
as c package (with is a bridge to real RTL).

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] The new Delphi 2010 RTTI

2011-01-10 Thread alexv...@mail.ru

10.01.2011 14:09, michael.vancann...@wisa.be пишет:



I understood that. Assuming you can make this interface (which I don't
believe), your solution is still not realistic:

And how will you make a package that uses a os-specific function OS 
independent ? (for instance, a package with a control that uses a 
WinAPI call.)


Of course nohow. But this package is not portable by desing and could be 
simply loaded, load needed OS libraries and execute.

So a package with the LCL is by definition impossible.

LCL itself is by design crossplatform. And if component developers don't 
use OS and widget set functions directly the are crossplatform to. 
Widget sets (and any platform dependend code) should be isolated in 
separate packages, LCL application load widget set package at startup 
and use it. It is only impossible to switch widget sets at runtime.


So with packages Application can use ANY widget set.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] The new Delphi 2010 RTTI

2011-01-10 Thread alexv...@mail.ru

10.01.2011 15:31, Marco van de Voort пишет:

In our previous episode, alexv...@mail.ru said:

But I want packages to be binary portable between OS (on target
processor architecture)

That's effectively not possible with all OSes providing such emulation ABI.

Esperanto for OSes so to speak.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Does "inefficiently" meansperformance decreaseis this case? Is it 
significant?

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal