Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2010-09

Status of Delphi-like packages (Class+RTTI aware DLL/SO)?

18 messages · 9 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Willibald Krenn

Hi!

Please forgive my ignorance on this topic, but I'd like to know whether someone is working on adding Delphi-like packages to FPC. (At least for the windows/linux platforms.) Somehow the lack of this feature always has stopped me from using fpc/lazarus: For a change, I am thinking of contributing to the efforts unless - of course - the feature's already in the works :).

Cheers,
Willi

P.S.: Way back in time, I did some "investigation" on the Delphi (6) name mangling, see http://edn.embarcadero.com/article/27758 (german only).

GMX DSL SOMMER-SPECIAL: Surf & Phone Flat 16.000 für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl

Reply by email

Žilvinas Ledas
to Willibald Krenn
Willibald Krenn wrote 9 lines
Hi! Please forgive my ignorance on this topic, but I'd like to know whether someone is working on adding Delphi-like packages to FPC. (At least for the windows/linux platforms.) Somehow the lack of this feature always has stopped me from using fpc/lazarus: For a change, I am thinking of contributing to the efforts unless - of course - the feature's already in the works :). Cheers, Willi P.S.: Way back in time, I did some "investigation" on the Delphi (6) name mangling, see http://edn.embarcadero.com/article/27758 (german only).

Hi,
I think you can start by reading http://wiki.freepascal.org/packages and http://wiki.freepascal.org/shared_library .

Regards
Žilvinas Ledas

Reply by email

Marco van de Voort
to Willibald Krenn: Hi! Please forgive my ignorance on this topic, but I'd like to know whether someone is…

In our previous episode, Willibald Krenn said:

Please forgive my ignorance on this topic, but I'd like to know whether someone is working on adding Delphi-like packages to FPC.

To my best knowledge: no.

(At least for the windows/linux platforms.) Somehow the lack of this feature always has stopped me from using fpc/lazarus: For a change, I am thinking of contributing to the efforts unless - of course - the feature's already in the works :).

Some resources you might want to have a look at:

- Maybe not necessary if you know them already intimately, but I kept a bit of a brainstorm on packages here:
http://wiki.freepascal.org/packages

- a bugreport about creating shared libraries using the makefiles: http://bugs.freepascal.org/view.php?id=12492 with 45 comments with a lot of detail.

P.S.: Way back in time, I did some "investigation" on the Delphi (6) name mangling, see http://edn.embarcadero.com/article/27758 (german only).

I don't know if this is necessary for packages, BUT: As far as I know FPC doesn't add the parameter name to the mangling, only the type. Moreover, the type is bare, iow not qualified with unitname. I don't know the status of the other details (like calling conventions).

Reply by email

Dimitri Smits
----- "Willibald Krenn" wrote 16 lines
Hi! Please forgive my ignorance on this topic, but I'd like to know whether someone is working on adding Delphi-like packages to FPC. (At least for the windows/linux platforms.) Somehow the lack of this feature always has stopped me from using fpc/lazarus: For a change, I am thinking of contributing to the efforts unless - of course - the feature's already in the works :). Cheers, Willi P.S.: Way back in time, I did some "investigation" on the Delphi (6) name mangling, see http://edn.embarcadero.com/article/27758 (german only).

aparantly you beat me to it, but I was planning on compiling a mail like this one later today (at home).

Besides you (an me), is there anyone else interested in implementing this? My angle (besides from the obvious dynamic pluginsystem vs "the lazarus/*nix FOSS way" aka rebuild everything when you want something included) is that there are some additions to RTTI that need to be done as well regarding packages, units en the relationships with current RTTI and startup-initialization.

I would be nice to know who wrote/compiled the packages page in the fpc wiki and to get in contact with ppl that want to discuss/implement "delphi packages".

kind regards,
Dimitri Smits

Reply by email

Florian Klaempfl
to Dimitri Smits
Dimitri Smits wrote
My angle (besides from the obvious dynamic pluginsystem

This is why there is no work on a packages system for FPC: there are simply too much different versions around. While Delphi has at most one release per year, FPC/Lazarus has more or less every day a new version. A package compiled for FPC/Lazarus built from todays sources will mostly not work with a program compiled from yesterday sources.

If you want a plugin system, you should create a defined API for this plugin system but not depend on the moving target of packages.

The use of packages for FPC is simply much less than for Delphi.

Reply by email

Marco van de Voort
to Dimitri Smits: aparantly you beat me to it, but I was planning on compiling a mail like this one later…

In our previous episode, Dimitri Smits said:

Show quoted text 6 lines
aparantly you beat me to it, but I was planning on compiling a mail like this one later today (at home). Besides you (an me), is there anyone else interested in implementing this? My angle (besides from the obvious dynamic pluginsystem vs "the lazarus/*nix FOSS way"

Note that I don't hold library packages for Lazarus as very desirable.

aka rebuild everything when you want something included)

Note that I have never heard anybody complain about the quick lazarus startup time relative to Delphi. That is the flip side of dynamic packages !!!

I would be nice to know who wrote/compiled the packages page in the fpc wiki and to get in contact with ppl that want to discuss/implement "delphi packages".

I did.

Reply by email

Willibald Krenn
to Florian Klaempfl: This is why there is no work on a packages system for FPC: there are simply too much…
This is why there is no work on a packages system for FPC: there are simply too much different versions around. While Delphi has at most one release per year, FPC/Lazarus has more or less every day a new version.

Well, but not that much stable releases, I suppose. :) I am sure that Delphi has/had quite a few internal versions too...

A package compiled for FPC/Lazarus built from todays sources will mostly not work with a program compiled from yesterday sources.

Even if you divide up your code into packages (Delphi ones), you are not forced to compile with packages 'enabled'. Hence daily builds can stay perfectly static as is. However, you'd gain the option for stable releases to have modules. Said that, within open source, packages are probably less useful than in the commercial-closed source world.

If you want a plugin system, you should create a defined API for this plugin system but not depend on the moving target of packages.

I tried that once with Delphi/VCL (and mdi-child forms): It was horrible to maintain and utterly difficult to debug. Packages just let you use classes (forms etc.) from within dlls so much more easily. Besides, you can still do your own API on top of packages ;-)

The use of packages for FPC is simply much less than for Delphi.

This is probably true. However, from an end-user's perspective, I would not say that I do a fpc/lazarus re-build every day. I'd rather stick with some stable version and concentrate my own (application) code.

But I guess, my main motivation on this is "fun on hacking a compiler feature" ;-)

Cheers,
Willi

Achtung Sicherheitswarnung: GMX warnt vor Phishing-Attacken! http://portal.gmx.net/de/go/sicherheitspaket

Reply by email

Michael Van Canneyt
to Willibald Krenn
Willibald Krenn wrote 6 lines
> The use of packages for FPC is simply much less than for Delphi. This is probably true. However, from an end-user's perspective, I would not say that I do a fpc/lazarus re-build every day. I'd rather stick with some stable version and concentrate my own (application) code. But I guess, my main motivation on this is "fun on hacking a compiler feature" ;-)

The best motivation we can imagine :-)

Michael.

Reply by email

Florian Klaempfl
to Willibald Krenn: Well, but not that much stable releases, I suppose. :) I am sure that Delphi has/had…
Willibald Krenn wrote 7 lines
> This is why there is no work on a packages system for FPC: there > are simply too much different versions around. While Delphi has at > most one release per year, FPC/Lazarus has more or less every day a > new version. Well, but not that much stable releases, I suppose. :)

No.

Show quoted text 7 lines
> A package compiled for FPC/Lazarus built from todays sources will > mostly not work with a program compiled from yesterday sources. Even if you divide up your code into packages (Delphi ones), you are not forced to compile with packages 'enabled'. Hence daily builds can stay perfectly static as is.

True but building releases with optional dyn. has another disadvantage: they increase heavily the distribution size and people are already complaining now about download size.

But I guess, my main motivation on this is "fun on hacking a compiler feature" ;-)

That's a very good point :) However I fear implementing packages is one of the less fun features.

Reply by email

Andrew Brunner
to Dimitri Smits: aparantly you beat me to it, but I was planning on compiling a mail like this one later…

I really am wanting something for my core objects so they can be loaded and the service application across different network nodes is costly, time and CPU intensive.

Dimitri Smits wrote 31 lines
----- "Willibald Krenn" schreef: > Hi! > > Please forgive my ignorance on this topic, but I'd like to know > whether someone is working on adding Delphi-like packages to FPC. (At > least for the windows/linux platforms.) Somehow the lack of this > feature always has stopped me from using fpc/lazarus: For a change, I > am thinking of contributing to the efforts unless - of course - the > feature's already in the works :). > > Cheers, > Willi > > P.S.: Way back in time, I did some "investigation" on the Delphi (6) > name mangling, see http://edn.embarcadero.com/article/27758 (german > only). > aparantly you beat me to it, but I was planning on compiling a mail like this one later today (at home). Besides you (an me), is there anyone else interested in implementing this? My angle (besides from the obvious dynamic pluginsystem vs "the lazarus/*nix FOSS way" aka rebuild everything when you want something included) is that there are some additions to RTTI that need to be done as well regarding packages, units en the relationships with current RTTI and startup-initialization. I would be nice to know who wrote/compiled the packages page in the fpc wiki and to get in contact with ppl that want to discuss/implement "delphi packages". kind regards, Dimitri Smits _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Florian Klaempfl
to Hans-Peter Diettrich: Right, but that's no reason for not using packages somewhere else. Delphi packages have…
Hans-Peter Diettrich wrote
IMO the implementation of Delphi packages in FPC depends on two things: the resources required for such an implementation, and the chance for closed-source libraries. When we want to disallow or even discourage closed-source FPC projects

I think the modified LGPL clearly shows that we don't want discourage closed-source software.

Reply by email

Marco van de Voort
to Hans-Peter Diettrich: Right, but that's no reason for not using packages somewhere else. Delphi packages have…

In our previous episode, Hans-Peter Diettrich said:

Show quoted text 5 lines
> Note that I have never heard anybody complain about the quick lazarus > startup time relative to Delphi. That is the flip side of dynamic packages > !!! Right, but that's no reason for not using packages somewhere else.

I was only talking about packages in Lazarus (designtime). I don't see a large benefit, and versioning an insurmountable problem.

I think plugin uses for users are a perfectly fine application. Actually that is IMHO pretty muchthe only reason, since I'm no firm believer that in this day and age the possible filesize savings are still that important. (and even less so when this finally reaches production)

Unfortunately, this (packages) is a feature that afaik requires heavy compiler and deep RTL work. Moreover the inner workings of the Delphi package are not very well documented (which is why I created the wikipage)

Show quoted text 5 lines
IMO the implementation of Delphi packages in FPC depends on two things: the resources required for such an implementation, and the chance for closed-source libraries. When we want to disallow or even discourage closed-source FPC projects, I see no urgent need for implementing Delphi packages.

I don't see any connection why the situation with packages would be any different, licensewise, from the current situation with EXEs.

... Most notably since a EXE+packages is essentially just an EXE fragmented over multiple parts.

Reply by email

Hans-Peter Diettrich
to Marco van de Voort: In our previous episode, Dimitri Smits said: Note that I don't hold library packages for…
Note that I have never heard anybody complain about the quick lazarus startup time relative to Delphi. That is the flip side of dynamic packages !!!

Right, but that's no reason for not using packages somewhere else.

Delphi packages have been invented as an improvement of DLLs, to make them type safe etc., and this idea can be used with shared libraries on any platform.

IMO the implementation of Delphi packages in FPC depends on two things: the resources required for such an implementation, and the chance for closed-source libraries. When we want to disallow or even discourage closed-source FPC projects, I see no urgent need for implementing Delphi packages.

DoDi

Reply by email

Florian Klaempfl
to Marco van de Voort: In our previous episode, Hans-Peter Diettrich said: I was only talking about packages in…
Show quoted text 11 lines
> IMO the implementation of Delphi packages in FPC depends on two things: > the resources required for such an implementation, and the chance for > closed-source libraries. When we want to disallow or even discourage > closed-source FPC projects, I see no urgent need for implementing Delphi > packages. I don't see any connection why the situation with packages would be any different, licensewise, from the current situation with EXEs. ... Most notably since a EXE+packages is essentially just an EXE fragmented over multiple parts.

E.g. for a closed source IDE packages are essentially.

Reply by email

Marco van de Voort
to Florian Klaempfl

In our previous episode, Florian Klaempfl said:

Show quoted text 7 lines
> I don't see any connection why the situation with packages would be any > different, licensewise, from the current situation with EXEs. > > ... Most notably since a EXE+packages is essentially just an EXE fragmented > over multiple parts. E.g. for a closed source IDE packages are essentially.

Then you touch the Lazarus license (GPL), still not FPC's.

Moreover, I already said I don't think binary design packages (proprietary or not) are very practical for Lazarus.

Reply by email

Florian Klaempfl
to Marco van de Voort
Marco van de Voort wrote 13 lines
In our previous episode, Florian Klaempfl said: >> I don't see any connection why the situation with packages would be any >> different, licensewise, from the current situation with EXEs. >> >> ... Most notably since a EXE+packages is essentially just an EXE fragmented >> over multiple parts. > > E.g. for a closed source IDE packages are essentially. Then you touch the Lazarus license (GPL), still not FPC's. Moreover, I already said I don't think binary design packages (proprietary or not) are very practical for Lazarus.

Not Lazarus but just some hypothetical 3rd party IDE.

Reply by email