Re: [fpc-devel] Discussion about "Dynamic packages"

2017-04-13 Thread Bishop
04/13/17 23:50:35, (Marco van de Voort) : Thanks, i understand all of this. This what i call plugin system and i know for what it need. In conclusion: Dynamic Packages needs for smooth plugin system in FreePascal. 04/13/17 23:27:06, Sven Barth via fpc-devel

Re: [fpc-devel] Discussion about "Dynamic packages"

2017-04-13 Thread gabor
W dniu 2017-04-13 o 22:27, Sven Barth via fpc-devel pisze: And it's not about saving RAM or disk memory! It's about *binary code reuse*, the ability to fix a bug in multiple executables by merely fixing the one bug in a package. Should not all packages depend on the "fixed" package also be

Re: [fpc-devel] Discussion about "Dynamic packages"

2017-04-13 Thread Marco van de Voort
In our previous episode, Sven Barth via fpc-devel said: > And it's not about saving RAM or disk memory! It's about *binary code > reuse*, the ability to fix a bug in multiple executables by merely > fixing the one bug in a package. And for extensions too. If a program has a package N that

Re: [fpc-devel] Discussion about "Dynamic packages"

2017-04-13 Thread Sven Barth via fpc-devel
On 13.04.2017 20:36, Bishop wrote: > 04/13/17 10:47:54, Michael Van Canneyt : >> Dynamic Packages will in each case be optional, they will not be not > mandatory. > The main question is a bit different. Is performance penalties from > Dynamic Packages will be optional? I

Re: [fpc-devel] Discussion about "Dynamic packages"

2017-04-13 Thread Bishop
04/13/17 10:47:54, Michael Van Canneyt : > Dynamic Packages will in each case be optional, they will not be not mandatory. The main question is a bit different. Is performance penalties from Dynamic Packages will be optional? I try show example. Let's provide that we

Re: [fpc-devel] Discussion about "Dynamic packages"

2017-04-13 Thread Sven Barth via fpc-devel
Am 13.04.2017 12:03 schrieb "Mattias Gaertner" : > > On Thu, 13 Apr 2017 11:28:02 +0200 > Sven Barth via fpc-devel wrote: > > >[...] > > The intended purpose of dynamic packages (and libraries in general) is not > > to save memory (in

[fpc-devel] GetEnvironmentVariable

2017-04-13 Thread Mattias Gaertner
Hi, Under Windows GetEnvironmentVariable(AnsiString) uses the winapi function GetEnvironmentStringsA. Why not simply: Result:=String(GetEnvironmentVariable(UnicodeString(EnvVar))); ? This would save some code and would work with another DefaultSystemCodepage as well. Mattias

Re: [fpc-devel] Discussion about "Dynamic packages"

2017-04-13 Thread Mattias Gaertner
On Thu, 13 Apr 2017 11:28:02 +0200 Sven Barth via fpc-devel wrote: >[...] > The intended purpose of dynamic packages (and libraries in general) is not > to save memory (in fact a binary plus packages would be much larger than > the statically compiled binary), but

Re: [fpc-devel] tbits.NotBits

2017-04-13 Thread Mattias Gaertner
On Thu, 13 Apr 2017 11:28:20 +0200 Andrea Mauri wrote: >[...] > procedure TBits.Setall; > var > loop : longint; > begin > for loop := 0 to FSize - 1 do >FBits^[loop] := 1; Should be FBits^[loop] := not cardinal(0); > end; Btw, it seems TBits misses

Re: [fpc-devel] tbits.NotBits

2017-04-13 Thread Andrea Mauri
AFAIK a.NotBits(b) means (a and not b): a b result 0 0 0 0 1 0 1 0 1 1 1 0 Mattias Thank you Mattias. It works as you described. Anyway, since ClearAll, AndBits, OrBits etc works iterating on FBits : ^TBitArray; they are much faster then the simple iteration along property property Bits[Bit:

Re: [fpc-devel] Discussion about "Dynamic packages"

2017-04-13 Thread Sven Barth via fpc-devel
Am 13.04.2017 08:44 schrieb "Bishop via fpc-devel" < fpc-devel@lists.freepascal.org>: > At first I would like to designate a circle of tasks which in principle can effectively decide by means of system of dynamic packets. Lets remember for what DLL`s and SO`s was be created. It was for memory

Re: [fpc-devel] tbits.NotBits

2017-04-13 Thread Mattias Gaertner
On Thu, 13 Apr 2017 10:52:44 +0200 (CEST) Michael Van Canneyt wrote: >[...] > I am not sure that what you did is supported. > > b.notbits(b) > > I am not sure that you can pass the same instance to b. Just look at the code. It's only a few lines. It is supported.

Re: [fpc-devel] tbits.NotBits

2017-04-13 Thread Michael Van Canneyt
On Thu, 13 Apr 2017, Andrea Mauri wrote: any answer? I asked in the wrong place? where should I ask? You asked in the right place. I just didn't notice your first mail. I am not sure that what you did is supported. b.notbits(b) I am not sure that you can pass the same instance to b. Can

Re: [fpc-devel] tbits.NotBits

2017-04-13 Thread Mattias Gaertner
On Fri, 31 Mar 2017 14:07:09 +0200 Andrea Mauri wrote: > I didn't understand how TBits.NotBits works. AFAIK a.NotBits(b) means (a and not b): a b result 0 0 0 0 1 0 1 0 1 1 1 0 Mattias ___ fpc-devel maillist -

Re: [fpc-devel] tbits.NotBits

2017-04-13 Thread Andrea Mauri
any answer? I asked in the wrong place? where should I ask? Il 31/03/2017 14:10, Andrea Mauri ha scritto: one more thing. there is a method like clearall to set all bits to 1? clearall is much more faster then a simple iteration along all bits Il 31/03/2017 14:07, Andrea Mauri ha scritto: I

Re: [fpc-devel] Discussion about "Dynamic packages"

2017-04-13 Thread Michael Van Canneyt
On Wed, 12 Apr 2017, Bishop via fpc-devel wrote: I had some fears concerning idea development of "Dynamic packages" in FreePascal and possible performance penalties of programs from these changes. This why i start this discussion and try wrote some of my ideas or/and proposal that, as i

[fpc-devel] Discussion about "Dynamic packages"

2017-04-13 Thread Bishop via fpc-devel
I had some fears concerning idea development of "Dynamic packages" in FreePascal and possible performance penalties of programs from these changes. This why i start this discussion and try wrote some of my ideas or/and proposal that, as i think, can help make FreePascal better. At first I